@caspeco/casper-ui-library 10.3.1 → 10.5.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 (785) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/_virtual/builtin_esm-external-require-react.js +9 -0
  3. package/dist/components/accordion/accordion-context.js +5 -6
  4. package/dist/components/accordion/accordion-item.js +28 -40
  5. package/dist/components/accordion/accordion-panel.js +17 -14
  6. package/dist/components/accordion/accordion-recipe.js +85 -120
  7. package/dist/components/accordion/accordion.js +23 -20
  8. package/dist/components/alert/alert.js +80 -59
  9. package/dist/components/alert/helper.js +30 -42
  10. package/dist/components/alert/types.d.ts.map +1 -1
  11. package/dist/components/badge/badge-recipe.js +57 -49
  12. package/dist/components/badge/badge.js +66 -71
  13. package/dist/components/badge/helper.js +8 -9
  14. package/dist/components/box/box.js +14 -11
  15. package/dist/components/breadcrumbs/breadcrumb-item.js +21 -17
  16. package/dist/components/breadcrumbs/breadcrumb-link.js +21 -20
  17. package/dist/components/breadcrumbs/breadcrumbs.js +123 -90
  18. package/dist/components/button/button-recipe.js +280 -315
  19. package/dist/components/button/button.js +39 -40
  20. package/dist/components/checkbox/checkbox-icon.js +38 -46
  21. package/dist/components/checkbox/checkbox-recipe.js +176 -204
  22. package/dist/components/checkbox/checkbox.js +43 -36
  23. package/dist/components/checkbox/icons/check.js +5 -5
  24. package/dist/components/checkbox/icons/minus.js +5 -5
  25. package/dist/components/checkbox/icons/plus.js +5 -5
  26. package/dist/components/checkbox-group/checkbox-group.js +17 -16
  27. package/dist/components/collapsible/collapsible.js +117 -101
  28. package/dist/components/collapsible/translations.js +29 -29
  29. package/dist/components/combobox/combobox-button.js +173 -143
  30. package/dist/components/combobox/combobox-item.js +45 -23
  31. package/dist/components/combobox/combobox-menu.js +240 -190
  32. package/dist/components/combobox/combobox-recipe.js +69 -103
  33. package/dist/components/combobox/combobox.js +243 -273
  34. package/dist/components/combobox/translations.js +49 -50
  35. package/dist/components/date-picker/base-date-picker.js +238 -248
  36. package/dist/components/date-picker/date-cell-recipe.js +149 -179
  37. package/dist/components/date-picker/date-multi-picker.js +35 -29
  38. package/dist/components/date-picker/date-picker-date-cell.js +109 -114
  39. package/dist/components/date-picker/date-picker-header.js +152 -170
  40. package/dist/components/date-picker/date-picker-week-cell.js +41 -43
  41. package/dist/components/date-picker/date-picker.js +32 -29
  42. package/dist/components/date-picker/date-range-picker.js +29 -24
  43. package/dist/components/date-picker/date-week-picker.js +29 -22
  44. package/dist/components/date-picker/datepicker-week-recipe.js +75 -91
  45. package/dist/components/date-picker/helper.js +11 -16
  46. package/dist/components/divider/divider-recipe.js +9 -11
  47. package/dist/components/divider/divider.js +19 -18
  48. package/dist/components/drawer/drawer-recipe.js +21 -50
  49. package/dist/components/drawer/drawer.js +45 -41
  50. package/dist/components/drawer/inline-drawer.js +69 -66
  51. package/dist/components/drawer/use-drawer-key-down.js +20 -20
  52. package/dist/components/fieldset/fieldset-error-text.js +15 -15
  53. package/dist/components/fieldset/fieldset-helper-text.js +15 -15
  54. package/dist/components/fieldset/fieldset-legend.js +15 -15
  55. package/dist/components/fieldset/fieldset-recipe.js +14 -24
  56. package/dist/components/fieldset/fieldset.js +17 -17
  57. package/dist/components/flex/flex.js +15 -15
  58. package/dist/components/form-control/form-control-recipe.js +42 -46
  59. package/dist/components/form-control/form-control.js +19 -19
  60. package/dist/components/form-control/form-error-message.js +15 -15
  61. package/dist/components/form-control/form-helper-text.js +15 -15
  62. package/dist/components/form-control/form-label.js +24 -26
  63. package/dist/components/grid/grid-item.js +15 -15
  64. package/dist/components/grid/grid.js +15 -15
  65. package/dist/components/heading/heading.js +24 -23
  66. package/dist/components/highlight/highlight.js +22 -21
  67. package/dist/components/icon/create-icon.js +27 -26
  68. package/dist/components/icon/icons/absence-icon.js +5 -5
  69. package/dist/components/icon/icons/accessibility-icon.js +5 -5
  70. package/dist/components/icon/icons/add-absence-icon.js +5 -5
  71. package/dist/components/icon/icons/add-emoji-icon.js +5 -5
  72. package/dist/components/icon/icons/add-icon.js +5 -5
  73. package/dist/components/icon/icons/apple-icon.js +5 -5
  74. package/dist/components/icon/icons/apps-icon.js +5 -5
  75. package/dist/components/icon/icons/archive-icon.js +6 -6
  76. package/dist/components/icon/icons/area-icon.js +5 -5
  77. package/dist/components/icon/icons/at-icon.js +5 -5
  78. package/dist/components/icon/icons/attachment-icon.js +5 -5
  79. package/dist/components/icon/icons/baby-icon.js +5 -5
  80. package/dist/components/icon/icons/back-icon.js +5 -5
  81. package/dist/components/icon/icons/backspace-icon.js +5 -5
  82. package/dist/components/icon/icons/bank-icon.js +5 -5
  83. package/dist/components/icon/icons/bank-id-icon.js +5 -5
  84. package/dist/components/icon/icons/barcode-icon.js +5 -5
  85. package/dist/components/icon/icons/bell-icon.js +5 -5
  86. package/dist/components/icon/icons/bolt-icon.js +7 -7
  87. package/dist/components/icon/icons/calendar-icon.js +5 -5
  88. package/dist/components/icon/icons/camera-icon.js +5 -5
  89. package/dist/components/icon/icons/cancel-icon.js +5 -5
  90. package/dist/components/icon/icons/card-icon.js +5 -5
  91. package/dist/components/icon/icons/cart-icon.js +5 -5
  92. package/dist/components/icon/icons/caspeco-icon.js +7 -7
  93. package/dist/components/icon/icons/channels-icon.js +5 -5
  94. package/dist/components/icon/icons/chart-icon.js +5 -5
  95. package/dist/components/icon/icons/chart-line-icon.js +5 -5
  96. package/dist/components/icon/icons/chart-mixed-icon.js +5 -5
  97. package/dist/components/icon/icons/chart-pie-icon.js +5 -5
  98. package/dist/components/icon/icons/chart-scatter-icon.js +5 -5
  99. package/dist/components/icon/icons/check-icon.js +5 -5
  100. package/dist/components/icon/icons/checkbox-icon.js +5 -5
  101. package/dist/components/icon/icons/chevron-left-icon.js +5 -5
  102. package/dist/components/icon/icons/chevron-right-icon.js +5 -5
  103. package/dist/components/icon/icons/child-icon.js +5 -5
  104. package/dist/components/icon/icons/circle-info-icon.js +5 -5
  105. package/dist/components/icon/icons/circle-parking-icon.js +5 -5
  106. package/dist/components/icon/icons/circle-question-icon.js +5 -5
  107. package/dist/components/icon/icons/circle-select-icon.js +5 -5
  108. package/dist/components/icon/icons/circle-success-icon.js +5 -5
  109. package/dist/components/icon/icons/circle-user-icon.js +5 -5
  110. package/dist/components/icon/icons/clear-icon.js +5 -5
  111. package/dist/components/icon/icons/close-icon.js +5 -5
  112. package/dist/components/icon/icons/closed-icon.js +5 -5
  113. package/dist/components/icon/icons/collapse-icon.js +5 -5
  114. package/dist/components/icon/icons/color-icon.js +5 -5
  115. package/dist/components/icon/icons/columns-icon.js +5 -5
  116. package/dist/components/icon/icons/comment-add-icon.js +5 -5
  117. package/dist/components/icon/icons/comment-icon.js +5 -5
  118. package/dist/components/icon/icons/cookies-icon.js +5 -5
  119. package/dist/components/icon/icons/copy-icon.js +5 -5
  120. package/dist/components/icon/icons/date-icon.js +5 -5
  121. package/dist/components/icon/icons/decrease-icon.js +4 -4
  122. package/dist/components/icon/icons/delete-icon.js +5 -5
  123. package/dist/components/icon/icons/deliverect-icon.js +5 -5
  124. package/dist/components/icon/icons/delivery-icon.js +5 -5
  125. package/dist/components/icon/icons/description-icon.js +5 -5
  126. package/dist/components/icon/icons/discount-icon.js +5 -5
  127. package/dist/components/icon/icons/distribute-evenly-icon.js +5 -5
  128. package/dist/components/icon/icons/door-closed-icon.js +5 -5
  129. package/dist/components/icon/icons/door-open-icon.js +5 -5
  130. package/dist/components/icon/icons/down-icon.js +5 -5
  131. package/dist/components/icon/icons/eat-in-icon.js +5 -5
  132. package/dist/components/icon/icons/edit-icon.js +5 -5
  133. package/dist/components/icon/icons/email-icon.js +5 -5
  134. package/dist/components/icon/icons/error-icon.js +5 -5
  135. package/dist/components/icon/icons/expand-icon.js +5 -5
  136. package/dist/components/icon/icons/export-icon.js +5 -5
  137. package/dist/components/icon/icons/extract-icon.js +5 -5
  138. package/dist/components/icon/icons/facebook-icon.js +5 -5
  139. package/dist/components/icon/icons/failed-print-icon.js +5 -5
  140. package/dist/components/icon/icons/file-icon.js +5 -5
  141. package/dist/components/icon/icons/filter-icon.js +5 -5
  142. package/dist/components/icon/icons/folder-icon.js +5 -5
  143. package/dist/components/icon/icons/foodora-icon.js +5 -5
  144. package/dist/components/icon/icons/forward-icon.js +5 -5
  145. package/dist/components/icon/icons/glovo-icon.js +7 -7
  146. package/dist/components/icon/icons/goal-icon.js +5 -5
  147. package/dist/components/icon/icons/google-icon.js +5 -5
  148. package/dist/components/icon/icons/grip-more-icon.js +5 -5
  149. package/dist/components/icon/icons/hash-icon.js +5 -5
  150. package/dist/components/icon/icons/hexagon-error-icon.js +5 -5
  151. package/dist/components/icon/icons/hide-icon.js +5 -5
  152. package/dist/components/icon/icons/history-icon.js +5 -5
  153. package/dist/components/icon/icons/icon-picker-anchor-icon.js +5 -5
  154. package/dist/components/icon/icons/icon-picker-asterisk-icon.js +5 -5
  155. package/dist/components/icon/icons/icon-picker-beer-icon.js +5 -5
  156. package/dist/components/icon/icons/icon-picker-bicycle-icon.js +5 -5
  157. package/dist/components/icon/icons/icon-picker-binoculars-icon.js +5 -5
  158. package/dist/components/icon/icons/icon-picker-bomb-icon.js +5 -5
  159. package/dist/components/icon/icons/icon-picker-car-icon.js +5 -5
  160. package/dist/components/icon/icons/icon-picker-cocktail-icon.js +5 -5
  161. package/dist/components/icon/icons/icon-picker-gem-icon.js +5 -5
  162. package/dist/components/icon/icons/icon-picker-heart-full-icon.js +5 -5
  163. package/dist/components/icon/icons/icon-picker-heart-icon.js +5 -5
  164. package/dist/components/icon/icons/icon-picker-magnet-icon.js +5 -5
  165. package/dist/components/icon/icons/icon-picker-money-icon.js +5 -5
  166. package/dist/components/icon/icons/icon-picker-moon-icon.js +5 -5
  167. package/dist/components/icon/icons/icon-picker-music-icon.js +5 -5
  168. package/dist/components/icon/icons/icon-picker-star-full-icon.js +5 -5
  169. package/dist/components/icon/icons/icon-picker-star-half-icon.js +5 -5
  170. package/dist/components/icon/icons/icon-picker-star-icon.js +5 -5
  171. package/dist/components/icon/icons/icon-picker-tint-icon.js +5 -5
  172. package/dist/components/icon/icons/icon-picker-tree-icon.js +5 -5
  173. package/dist/components/icon/icons/icon-picker-utensils-icon.js +5 -5
  174. package/dist/components/icon/icons/icon-picker-wheelchair-icon.js +5 -5
  175. package/dist/components/icon/icons/image-icon.js +5 -5
  176. package/dist/components/icon/icons/import-icon.js +5 -5
  177. package/dist/components/icon/icons/inbox-icon.js +5 -5
  178. package/dist/components/icon/icons/increase-icon.js +5 -5
  179. package/dist/components/icon/icons/indeterminate-icon.js +4 -4
  180. package/dist/components/icon/icons/index.d.ts +1 -0
  181. package/dist/components/icon/icons/index.d.ts.map +1 -1
  182. package/dist/components/icon/icons/info-icon.js +5 -5
  183. package/dist/components/icon/icons/inheritance-icon.js +5 -5
  184. package/dist/components/icon/icons/just-eat-icon.js +5 -5
  185. package/dist/components/icon/icons/karma-icon.js +5 -5
  186. package/dist/components/icon/icons/key-command-icon.js +5 -5
  187. package/dist/components/icon/icons/key-enter-icon.js +5 -5
  188. package/dist/components/icon/icons/key-icon.js +5 -5
  189. package/dist/components/icon/icons/key-option-icon.js +5 -5
  190. package/dist/components/icon/icons/language-icon.js +5 -5
  191. package/dist/components/icon/icons/link-broken-icon.js +5 -5
  192. package/dist/components/icon/icons/link-external-icon.js +5 -5
  193. package/dist/components/icon/icons/link-icon.js +5 -5
  194. package/dist/components/icon/icons/list-ol-icon.js +5 -5
  195. package/dist/components/icon/icons/list-ul-icon.js +5 -5
  196. package/dist/components/icon/icons/loading-icon.js +5 -5
  197. package/dist/components/icon/icons/location-icon.js +5 -5
  198. package/dist/components/icon/icons/lock-icon.js +5 -5
  199. package/dist/components/icon/icons/log-in-icon.js +5 -5
  200. package/dist/components/icon/icons/log-out-icon.js +5 -5
  201. package/dist/components/icon/icons/map-icon.js +5 -5
  202. package/dist/components/icon/icons/maximize-icon.js +5 -5
  203. package/dist/components/icon/icons/members-icon.js +5 -5
  204. package/dist/components/icon/icons/menu-hide-icon.js +5 -5
  205. package/dist/components/icon/icons/menu-icon.js +5 -5
  206. package/dist/components/icon/icons/menu-show-icon.js +5 -5
  207. package/dist/components/icon/icons/message-add-icon.js +5 -5
  208. package/dist/components/icon/icons/message-icon.js +5 -5
  209. package/dist/components/icon/icons/message-lines-icon.js +5 -5
  210. package/dist/components/icon/icons/minimize-icon.js +5 -5
  211. package/dist/components/icon/icons/minimize-window-icon.js +5 -5
  212. package/dist/components/icon/icons/mobile-rotate-icon.js +5 -5
  213. package/dist/components/icon/icons/module-accounting-icon.js +5 -5
  214. package/dist/components/icon/icons/module-ai-forecast-icon.js +5 -5
  215. package/dist/components/icon/icons/module-app-icon.js +5 -5
  216. package/dist/components/icon/icons/module-articles-icon.js +5 -5
  217. package/dist/components/icon/icons/module-benchmark-icon.js +5 -5
  218. package/dist/components/icon/icons/module-booking-icon.js +5 -5
  219. package/dist/components/icon/icons/module-cai-icon.js +5 -5
  220. package/dist/components/icon/icons/module-campaigns-icon.js +5 -5
  221. package/dist/components/icon/icons/module-cashier-icon.js +5 -5
  222. package/dist/components/icon/icons/module-communication-icon.js +5 -5
  223. package/dist/components/icon/icons/module-copilot-icon.js +5 -5
  224. package/dist/components/icon/icons/module-dashboard-icon.js +5 -5
  225. package/dist/components/icon/icons/module-document-icon.js +5 -5
  226. package/dist/components/icon/icons/module-employees-icon.js +5 -5
  227. package/dist/components/icon/icons/module-feed-icon.js +5 -5
  228. package/dist/components/icon/icons/module-history-icon.js +5 -5
  229. package/dist/components/icon/icons/module-home-icon.js +5 -5
  230. package/dist/components/icon/icons/module-insights-icon.js +5 -5
  231. package/dist/components/icon/icons/module-kds-icon.js +5 -5
  232. package/dist/components/icon/icons/module-members-icon.js +5 -5
  233. package/dist/components/icon/icons/module-menus-icon.js +5 -5
  234. package/dist/components/icon/icons/module-my-city-icon.js +5 -5
  235. package/dist/components/icon/icons/module-notification-center-icon.js +5 -5
  236. package/dist/components/icon/icons/module-online-order-icon.js +5 -5
  237. package/dist/components/icon/icons/module-organisation-icon.js +5 -5
  238. package/dist/components/icon/icons/module-pos-icon.js +5 -5
  239. package/dist/components/icon/icons/module-pulse-icon.js +5 -5
  240. package/dist/components/icon/icons/module-result-icon.js +5 -5
  241. package/dist/components/icon/icons/module-salary-icon.js +5 -5
  242. package/dist/components/icon/icons/module-schedule-icon.js +5 -5
  243. package/dist/components/icon/icons/module-settings-alt-icon.js +5 -5
  244. package/dist/components/icon/icons/module-settings-icon.js +5 -5
  245. package/dist/components/icon/icons/module-support-icon.js +5 -5
  246. package/dist/components/icon/icons/module-survey-icon.js +5 -5
  247. package/dist/components/icon/icons/module-table-map-icon.js +6 -6
  248. package/dist/components/icon/icons/module-tablet-icon.js +5 -5
  249. package/dist/components/icon/icons/module-time-icon.js +5 -5
  250. package/dist/components/icon/icons/module-timeline-icon.js +5 -5
  251. package/dist/components/icon/icons/module-tip-icon.js +5 -5
  252. package/dist/components/icon/icons/module-to-do-icon.js +5 -5
  253. package/dist/components/icon/icons/module-tools-icon.js +5 -5
  254. package/dist/components/icon/icons/module-top-list-icon.js +5 -5
  255. package/dist/components/icon/icons/module-web-charts-icon.js +5 -5
  256. package/dist/components/icon/icons/module-web-icon.js +5 -5
  257. package/dist/components/icon/icons/more-horizontal-icon.js +5 -5
  258. package/dist/components/icon/icons/more-vertical-icon.js +5 -5
  259. package/dist/components/icon/icons/nfc-icon.js +5 -5
  260. package/dist/components/icon/icons/no-cart-icon.js +5 -5
  261. package/dist/components/icon/icons/note-icon.js +5 -5
  262. package/dist/components/icon/icons/number-icon.js +6 -6
  263. package/dist/components/icon/icons/open-modal-icon.js +5 -5
  264. package/dist/components/icon/icons/parking-icon.js +5 -5
  265. package/dist/components/icon/icons/party-horn-icon.js +5 -5
  266. package/dist/components/icon/icons/paste-icon.d.ts +2 -0
  267. package/dist/components/icon/icons/paste-icon.d.ts.map +1 -0
  268. package/dist/components/icon/icons/paste-icon.js +5 -0
  269. package/dist/components/icon/icons/pause-icon.js +5 -5
  270. package/dist/components/icon/icons/payment-card-icon.js +5 -5
  271. package/dist/components/icon/icons/payment-cash-icon.js +5 -5
  272. package/dist/components/icon/icons/payment-generic-icon.js +5 -5
  273. package/dist/components/icon/icons/payment-giftcard-icon.js +5 -5
  274. package/dist/components/icon/icons/payment-hotel-icon.js +5 -5
  275. package/dist/components/icon/icons/payment-invoice-icon.js +5 -5
  276. package/dist/components/icon/icons/percentage-icon.js +5 -5
  277. package/dist/components/icon/icons/phone-icon.js +5 -5
  278. package/dist/components/icon/icons/pin-icon.js +5 -5
  279. package/dist/components/icon/icons/pin-map-icon.js +5 -5
  280. package/dist/components/icon/icons/play-icon.js +5 -5
  281. package/dist/components/icon/icons/preview-icon.js +5 -5
  282. package/dist/components/icon/icons/print-icon.js +5 -5
  283. package/dist/components/icon/icons/privacy-icon.js +5 -5
  284. package/dist/components/icon/icons/product-admin-icon.js +5 -5
  285. package/dist/components/icon/icons/product-analytics-icon.js +5 -5
  286. package/dist/components/icon/icons/product-booking-icon.js +5 -5
  287. package/dist/components/icon/icons/product-checkout-icon.js +5 -5
  288. package/dist/components/icon/icons/product-my-pages-icon.js +5 -5
  289. package/dist/components/icon/icons/product-staff-icon.js +5 -5
  290. package/dist/components/icon/icons/puck-icon.js +5 -5
  291. package/dist/components/icon/icons/qr-code-icon.js +5 -5
  292. package/dist/components/icon/icons/question-icon.js +5 -5
  293. package/dist/components/icon/icons/radio-icon.js +5 -5
  294. package/dist/components/icon/icons/receipt-icon.js +5 -5
  295. package/dist/components/icon/icons/redo-icon.js +5 -5
  296. package/dist/components/icon/icons/refund-icon.js +5 -5
  297. package/dist/components/icon/icons/remove-icon.js +5 -5
  298. package/dist/components/icon/icons/replace-icon.js +5 -5
  299. package/dist/components/icon/icons/schedule-icon.js +5 -5
  300. package/dist/components/icon/icons/search-icon.js +5 -5
  301. package/dist/components/icon/icons/select-icon.js +4 -4
  302. package/dist/components/icon/icons/send-icon.js +5 -5
  303. package/dist/components/icon/icons/share-icon.js +5 -5
  304. package/dist/components/icon/icons/show-icon.js +5 -5
  305. package/dist/components/icon/icons/shuffle-icon.js +5 -5
  306. package/dist/components/icon/icons/sidebar-hide-icon.js +4 -4
  307. package/dist/components/icon/icons/sidebar-left-icon.js +4 -4
  308. package/dist/components/icon/icons/sidebar-right-icon.js +5 -5
  309. package/dist/components/icon/icons/sidebar-show-icon.js +5 -5
  310. package/dist/components/icon/icons/sliders-icon.js +5 -5
  311. package/dist/components/icon/icons/slightly-sad-icon.js +5 -5
  312. package/dist/components/icon/icons/smile-icon.js +5 -5
  313. package/dist/components/icon/icons/sort-asc-icon.js +5 -5
  314. package/dist/components/icon/icons/sort-desc-icon.js +5 -5
  315. package/dist/components/icon/icons/split-icon.js +5 -5
  316. package/dist/components/icon/icons/status-icon.js +5 -5
  317. package/dist/components/icon/icons/stop-icon.js +5 -5
  318. package/dist/components/icon/icons/submenu-icon.js +5 -5
  319. package/dist/components/icon/icons/success-icon.js +5 -5
  320. package/dist/components/icon/icons/swap-icon.js +5 -5
  321. package/dist/components/icon/icons/swatch-icon.js +5 -5
  322. package/dist/components/icon/icons/sweat-icon.js +5 -5
  323. package/dist/components/icon/icons/table-icon.js +5 -5
  324. package/dist/components/icon/icons/table-map-icon.js +5 -5
  325. package/dist/components/icon/icons/take-away-dot-com-icon.js +5 -5
  326. package/dist/components/icon/icons/take-away-icon.js +5 -5
  327. package/dist/components/icon/icons/talk-icon.js +5 -5
  328. package/dist/components/icon/icons/thumbtack-icon.js +5 -5
  329. package/dist/components/icon/icons/time-icon.js +5 -5
  330. package/dist/components/icon/icons/timeline-icon.js +5 -5
  331. package/dist/components/icon/icons/tip-icon.js +5 -5
  332. package/dist/components/icon/icons/title-icon.js +5 -5
  333. package/dist/components/icon/icons/translate-icon.js +5 -5
  334. package/dist/components/icon/icons/tree-view-collapse-icon.js +4 -4
  335. package/dist/components/icon/icons/tree-view-expand-icon.js +4 -4
  336. package/dist/components/icon/icons/tree-view-last-icon.js +4 -4
  337. package/dist/components/icon/icons/trend-down-icon.js +5 -5
  338. package/dist/components/icon/icons/trend-up-icon.js +5 -5
  339. package/dist/components/icon/icons/triangle-warning-icon.js +5 -5
  340. package/dist/components/icon/icons/trivec-icon.js +6 -6
  341. package/dist/components/icon/icons/uber-eats-icon.js +5 -5
  342. package/dist/components/icon/icons/undo-icon.js +5 -5
  343. package/dist/components/icon/icons/unlock-icon.js +5 -5
  344. package/dist/components/icon/icons/unwrap-content-icon.js +5 -5
  345. package/dist/components/icon/icons/up-icon.js +5 -5
  346. package/dist/components/icon/icons/user-group-icon.js +5 -5
  347. package/dist/components/icon/icons/user-icon.js +5 -5
  348. package/dist/components/icon/icons/user-permissions-icon.js +5 -5
  349. package/dist/components/icon/icons/user-wait-icon.js +5 -5
  350. package/dist/components/icon/icons/users-icon.js +5 -5
  351. package/dist/components/icon/icons/version-control-icon.js +5 -5
  352. package/dist/components/icon/icons/volume-high-icon.js +5 -5
  353. package/dist/components/icon/icons/volume-icon.js +5 -5
  354. package/dist/components/icon/icons/volume-low-icon.js +5 -5
  355. package/dist/components/icon/icons/volume-off-icon.js +5 -5
  356. package/dist/components/icon/icons/warning-icon.js +5 -5
  357. package/dist/components/icon/icons/waste-icon.js +5 -5
  358. package/dist/components/icon/icons/wifi-icon.js +5 -5
  359. package/dist/components/icon/icons/wifi-off-icon.js +5 -5
  360. package/dist/components/icon/icons/wolt-icon.js +5 -5
  361. package/dist/components/icon/icons/wrap-content-icon.js +5 -5
  362. package/dist/components/icon-button/icon-button.js +37 -39
  363. package/dist/components/image/image.js +12 -14
  364. package/dist/components/image-upload/image-cropper.helper.js +74 -82
  365. package/dist/components/image-upload/image-cropper.js +156 -183
  366. package/dist/components/image-upload/image-upload-dropzone.js +134 -112
  367. package/dist/components/image-upload/image-upload-helper.js +15 -19
  368. package/dist/components/image-upload/image-upload-icons.js +52 -20
  369. package/dist/components/image-upload/image-upload-modal.js +131 -106
  370. package/dist/components/image-upload/image-upload.js +96 -86
  371. package/dist/components/image-upload/translations.js +65 -65
  372. package/dist/components/image-upload/types.js +6 -4
  373. package/dist/components/input/helper.js +18 -29
  374. package/dist/components/input/input-addon-recipe.js +37 -43
  375. package/dist/components/input/input-recipe.js +124 -133
  376. package/dist/components/input/input.js +78 -83
  377. package/dist/components/link/link-recipe.js +18 -22
  378. package/dist/components/link/link.js +14 -14
  379. package/dist/components/list/list-item.js +15 -15
  380. package/dist/components/list/list.js +19 -20
  381. package/dist/components/menu/helper.js +12 -16
  382. package/dist/components/menu/menu-box-button.js +22 -18
  383. package/dist/components/menu/menu-button.js +18 -16
  384. package/dist/components/menu/menu-divider.js +31 -28
  385. package/dist/components/menu/menu-group.js +138 -142
  386. package/dist/components/menu/menu-icon-button.js +13 -11
  387. package/dist/components/menu/menu-item.js +44 -45
  388. package/dist/components/menu/menu-list.js +14 -15
  389. package/dist/components/menu/menu-recipe.js +67 -81
  390. package/dist/components/menu/menu.js +34 -41
  391. package/dist/components/message/message.js +52 -38
  392. package/dist/components/modal/modal-body-context.js +6 -7
  393. package/dist/components/modal/modal-body.js +17 -17
  394. package/dist/components/modal/modal-close-button.js +23 -18
  395. package/dist/components/modal/modal-footer.js +29 -32
  396. package/dist/components/modal/modal-header.js +17 -17
  397. package/dist/components/modal/modal-recipe.js +110 -141
  398. package/dist/components/modal/modal.js +54 -58
  399. package/dist/components/navigation-list/navigation-list-item.js +76 -88
  400. package/dist/components/navigation-list/navigation-list.js +23 -17
  401. package/dist/components/paginator/paginator-recipe.js +34 -40
  402. package/dist/components/paginator/paginator.js +65 -70
  403. package/dist/components/paginator/translations.js +35 -35
  404. package/dist/components/phone-input/country-data.js +31 -36
  405. package/dist/components/phone-input/country-list.js +45 -25
  406. package/dist/components/phone-input/country-selector.js +167 -115
  407. package/dist/components/phone-input/phone-input-helpers.js +91 -119
  408. package/dist/components/phone-input/phone-input.js +47 -42
  409. package/dist/components/phone-input/translations.js +53 -53
  410. package/dist/components/phone-input/use-phone-input.js +110 -137
  411. package/dist/components/quantity-button/minus-button.js +18 -16
  412. package/dist/components/quantity-button/plus-button.js +18 -16
  413. package/dist/components/quantity-button/quantity-button.js +72 -40
  414. package/dist/components/radio/check-icon.js +5 -5
  415. package/dist/components/radio/hover-styles.js +21 -36
  416. package/dist/components/radio/radio-group-context.js +5 -6
  417. package/dist/components/radio/radio-group-recipe.js +124 -142
  418. package/dist/components/radio/radio-group.js +30 -28
  419. package/dist/components/radio/radio.js +72 -55
  420. package/dist/components/radio-card/hover-styles.js +21 -36
  421. package/dist/components/radio-card/radio-card-group.js +24 -25
  422. package/dist/components/radio-card/radio-card.js +87 -67
  423. package/dist/components/rich-text-editor/boolean-control.js +51 -54
  424. package/dist/components/rich-text-editor/extensions.js +39 -34
  425. package/dist/components/rich-text-editor/index.js +26 -22
  426. package/dist/components/rich-text-editor/rich-text-editor-context.js +9 -11
  427. package/dist/components/rich-text-editor/rich-text-editor-control.js +290 -284
  428. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +71 -83
  429. package/dist/components/rich-text-editor/rich-text-editor.js +72 -69
  430. package/dist/components/rich-text-editor/rich-text-renderer.js +32 -32
  431. package/dist/components/rich-text-editor/translations.js +119 -119
  432. package/dist/components/rich-text-editor/use-rich-text-editor.js +22 -29
  433. package/dist/components/segmented-control/segmented-control-item.js +24 -25
  434. package/dist/components/segmented-control/segmented-control.js +49 -40
  435. package/dist/components/select/select-recipe.js +91 -106
  436. package/dist/components/select/select.js +27 -29
  437. package/dist/components/skeleton/skeleton-text.js +18 -19
  438. package/dist/components/skeleton/skeleton.js +19 -20
  439. package/dist/components/spinner/spinner.js +44 -28
  440. package/dist/components/stack/stack.js +18 -18
  441. package/dist/components/stepper/check-icon.js +5 -5
  442. package/dist/components/stepper/step-context.js +5 -5
  443. package/dist/components/stepper/step.js +111 -106
  444. package/dist/components/stepper/stepper.js +42 -43
  445. package/dist/components/stepper/times-icon.js +5 -5
  446. package/dist/components/switch/hover-styles.js +30 -44
  447. package/dist/components/switch/switch-recipe.js +76 -84
  448. package/dist/components/switch/switch.d.ts +3 -3
  449. package/dist/components/switch/switch.d.ts.map +1 -1
  450. package/dist/components/switch/switch.js +30 -31
  451. package/dist/components/switch/types.d.ts +4 -2
  452. package/dist/components/switch/types.d.ts.map +1 -1
  453. package/dist/components/table/helper.d.ts +6 -0
  454. package/dist/components/table/helper.d.ts.map +1 -1
  455. package/dist/components/table/helper.js +29 -9
  456. package/dist/components/table/index.d.ts +1 -1
  457. package/dist/components/table/index.d.ts.map +1 -1
  458. package/dist/components/table/table-cell.d.ts.map +1 -1
  459. package/dist/components/table/table-cell.js +136 -122
  460. package/dist/components/table/table-column-resize-handle.d.ts +12 -0
  461. package/dist/components/table/table-column-resize-handle.d.ts.map +1 -0
  462. package/dist/components/table/table-column-resize-handle.js +69 -0
  463. package/dist/components/table/table-content.d.ts.map +1 -1
  464. package/dist/components/table/table-content.js +174 -98
  465. package/dist/components/table/table-context-provider.d.ts +7 -2
  466. package/dist/components/table/table-context-provider.d.ts.map +1 -1
  467. package/dist/components/table/table-context-provider.js +203 -151
  468. package/dist/components/table/table-context.d.ts +24 -0
  469. package/dist/components/table/table-context.d.ts.map +1 -1
  470. package/dist/components/table/table-context.js +18 -11
  471. package/dist/components/table/table-filter.js +170 -118
  472. package/dist/components/table/table-header-dropdown.js +131 -89
  473. package/dist/components/table/table-header-row.d.ts.map +1 -1
  474. package/dist/components/table/table-header-row.js +202 -140
  475. package/dist/components/table/table-recipe.d.ts.map +1 -1
  476. package/dist/components/table/table-recipe.js +75 -96
  477. package/dist/components/table/table-row-expand-toggle-button.js +28 -35
  478. package/dist/components/table/table-row.d.ts.map +1 -1
  479. package/dist/components/table/table-row.js +51 -41
  480. package/dist/components/table/table-toolbar-actions.js +19 -19
  481. package/dist/components/table/table-toolbar-add-button.js +18 -13
  482. package/dist/components/table/table-toolbar-search.js +17 -12
  483. package/dist/components/table/table-toolbar-settings.js +180 -133
  484. package/dist/components/table/table-toolbar.js +72 -51
  485. package/dist/components/table/table.composition.d.ts +1 -0
  486. package/dist/components/table/table.composition.d.ts.map +1 -1
  487. package/dist/components/table/table.constants.d.ts +4 -0
  488. package/dist/components/table/table.constants.d.ts.map +1 -1
  489. package/dist/components/table/table.constants.js +9 -4
  490. package/dist/components/table/table.d.ts +1 -1
  491. package/dist/components/table/table.d.ts.map +1 -1
  492. package/dist/components/table/table.js +41 -37
  493. package/dist/components/table/translations.d.ts +7 -0
  494. package/dist/components/table/translations.d.ts.map +1 -1
  495. package/dist/components/table/translations.js +199 -194
  496. package/dist/components/table/types.d.ts +33 -2
  497. package/dist/components/table/types.d.ts.map +1 -1
  498. package/dist/components/tabs/tab-list.js +16 -17
  499. package/dist/components/tabs/tab-panel.js +14 -14
  500. package/dist/components/tabs/tab-panels.js +15 -15
  501. package/dist/components/tabs/tab-with-image.js +60 -53
  502. package/dist/components/tabs/tab.js +26 -22
  503. package/dist/components/tabs/tabs-recipe.js +96 -116
  504. package/dist/components/tabs/tabs.js +25 -24
  505. package/dist/components/tag/tag-recipe.js +225 -252
  506. package/dist/components/tag/tag.js +121 -62
  507. package/dist/components/text/text-recipe.js +3 -8
  508. package/dist/components/text/text.js +26 -27
  509. package/dist/components/textarea/textarea-recipe.js +90 -96
  510. package/dist/components/textarea/textarea.js +19 -19
  511. package/dist/components/toaster/toast-store.d.ts +2 -2
  512. package/dist/components/toaster/toast-store.d.ts.map +1 -1
  513. package/dist/components/toaster/toast-store.js +25 -32
  514. package/dist/components/toaster/toaster.js +39 -34
  515. package/dist/components/toggle-button/toggle-button.js +23 -25
  516. package/dist/components/toggle-button/use-button-children.js +36 -35
  517. package/dist/components/tooltip/tooltip.js +43 -47
  518. package/dist/hooks/use-color-mode.js +17 -22
  519. package/dist/hooks/use-disclosure.js +10 -13
  520. package/dist/hooks/use-measured-width.js +21 -21
  521. package/dist/hooks/use-remove-attributes.js +25 -24
  522. package/dist/index.js +395 -799
  523. package/dist/node_modules/@dnd-kit/abstract/index.js +658 -1185
  524. package/dist/node_modules/@dnd-kit/collision/dist/index.js +51 -90
  525. package/dist/node_modules/@dnd-kit/dom/index.js +1256 -1518
  526. package/dist/node_modules/@dnd-kit/dom/sortable.js +529 -654
  527. package/dist/node_modules/@dnd-kit/dom/utilities.js +772 -940
  528. package/dist/node_modules/@dnd-kit/geometry/dist/index.js +228 -196
  529. package/dist/node_modules/@dnd-kit/react/hooks.js +51 -63
  530. package/dist/node_modules/@dnd-kit/react/index.js +175 -235
  531. package/dist/node_modules/@dnd-kit/react/sortable.js +67 -142
  532. package/dist/node_modules/@dnd-kit/react/utilities.js +7 -9
  533. package/dist/node_modules/@dnd-kit/state/dist/index.js +157 -172
  534. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +154 -243
  535. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +294 -369
  536. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +95 -133
  537. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +96 -122
  538. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +249 -264
  539. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +34 -88
  540. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +74 -88
  541. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1463 -1822
  542. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +633 -768
  543. package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +30 -32
  544. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +35 -48
  545. package/dist/node_modules/@tiptap/core/dist/index.js +3433 -3946
  546. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -19
  547. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +73 -1498
  548. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +71 -84
  549. package/dist/node_modules/@tiptap/extension-code/dist/index.js +65 -70
  550. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +155 -216
  551. package/dist/node_modules/@tiptap/extension-document/dist/index.js +9 -11
  552. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +48 -60
  553. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +65 -66
  554. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +47 -55
  555. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +68 -82
  556. package/dist/node_modules/@tiptap/extension-link/dist/index.js +365 -334
  557. package/dist/node_modules/@tiptap/extension-list/dist/index.js +936 -1105
  558. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +43 -48
  559. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +53 -65
  560. package/dist/node_modules/@tiptap/extension-text/dist/index.js +12 -12
  561. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +60 -64
  562. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -462
  563. package/dist/node_modules/@tiptap/react/dist/index.js +314 -0
  564. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +23 -24
  565. package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -4
  566. package/dist/node_modules/country-flag-icons/modules/hasFlag.js +6 -6
  567. package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +5469 -6298
  568. package/dist/node_modules/country-flag-icons/react/3x2/index.js +273 -269
  569. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +5 -6
  570. package/dist/node_modules/date-fns/_lib/defaultOptions.js +6 -6
  571. package/dist/node_modules/date-fns/_lib/format/formatters.js +385 -544
  572. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +42 -57
  573. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +37 -48
  574. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +7 -17
  575. package/dist/node_modules/date-fns/_lib/normalizeDates.js +6 -9
  576. package/dist/node_modules/date-fns/_lib/protectedTokens.js +19 -16
  577. package/dist/node_modules/date-fns/addDays.js +8 -8
  578. package/dist/node_modules/date-fns/addMonths.js +11 -18
  579. package/dist/node_modules/date-fns/addWeeks.js +6 -6
  580. package/dist/node_modules/date-fns/constants.js +10 -6
  581. package/dist/node_modules/date-fns/constructFrom.js +6 -6
  582. package/dist/node_modules/date-fns/constructNow.js +6 -6
  583. package/dist/node_modules/date-fns/differenceInCalendarDays.js +10 -14
  584. package/dist/node_modules/date-fns/endOfDay.js +7 -7
  585. package/dist/node_modules/date-fns/endOfMonth.js +7 -7
  586. package/dist/node_modules/date-fns/format.js +57 -55
  587. package/dist/node_modules/date-fns/getDayOfYear.js +9 -9
  588. package/dist/node_modules/date-fns/getISOWeek.js +10 -10
  589. package/dist/node_modules/date-fns/getISOWeekYear.js +13 -13
  590. package/dist/node_modules/date-fns/getWeek.js +10 -10
  591. package/dist/node_modules/date-fns/getWeekYear.js +14 -14
  592. package/dist/node_modules/date-fns/isBefore.js +6 -6
  593. package/dist/node_modules/date-fns/isDate.js +5 -5
  594. package/dist/node_modules/date-fns/isPast.js +6 -6
  595. package/dist/node_modules/date-fns/isSameDay.js +8 -12
  596. package/dist/node_modules/date-fns/isSameMonth.js +7 -11
  597. package/dist/node_modules/date-fns/isSameWeek.js +8 -12
  598. package/dist/node_modules/date-fns/isSameYear.js +7 -11
  599. package/dist/node_modules/date-fns/isToday.js +7 -10
  600. package/dist/node_modules/date-fns/isValid.js +7 -7
  601. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
  602. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
  603. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
  604. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
  605. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +68 -69
  606. package/dist/node_modules/date-fns/locale/da/_lib/formatLong.js +31 -32
  607. package/dist/node_modules/date-fns/locale/da/_lib/formatRelative.js +11 -11
  608. package/dist/node_modules/date-fns/locale/da/_lib/localize.js +193 -142
  609. package/dist/node_modules/date-fns/locale/da/_lib/match.js +123 -109
  610. package/dist/node_modules/date-fns/locale/da.js +17 -17
  611. package/dist/node_modules/date-fns/locale/en-GB/_lib/formatLong.js +31 -32
  612. package/dist/node_modules/date-fns/locale/en-GB.js +18 -18
  613. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
  614. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
  615. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
  616. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
  617. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
  618. package/dist/node_modules/date-fns/locale/en-US.js +18 -18
  619. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +68 -69
  620. package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +31 -32
  621. package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -18
  622. package/dist/node_modules/date-fns/locale/es/_lib/localize.js +192 -141
  623. package/dist/node_modules/date-fns/locale/es/_lib/match.js +127 -114
  624. package/dist/node_modules/date-fns/locale/es.js +18 -18
  625. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +161 -162
  626. package/dist/node_modules/date-fns/locale/et/_lib/formatLong.js +31 -32
  627. package/dist/node_modules/date-fns/locale/et/_lib/formatRelative.js +11 -11
  628. package/dist/node_modules/date-fns/locale/et/_lib/localize.js +196 -152
  629. package/dist/node_modules/date-fns/locale/et/_lib/match.js +109 -107
  630. package/dist/node_modules/date-fns/locale/et.js +19 -19
  631. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +101 -101
  632. package/dist/node_modules/date-fns/locale/fi/_lib/formatLong.js +31 -32
  633. package/dist/node_modules/date-fns/locale/fi/_lib/formatRelative.js +11 -11
  634. package/dist/node_modules/date-fns/locale/fi/_lib/localize.js +192 -140
  635. package/dist/node_modules/date-fns/locale/fi/_lib/match.js +122 -108
  636. package/dist/node_modules/date-fns/locale/fi.js +18 -18
  637. package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
  638. package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
  639. package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
  640. package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
  641. package/dist/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
  642. package/dist/node_modules/date-fns/locale/fr.js +18 -18
  643. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +93 -109
  644. package/dist/node_modules/date-fns/locale/lt/_lib/formatLong.js +31 -32
  645. package/dist/node_modules/date-fns/locale/lt/_lib/formatRelative.js +11 -11
  646. package/dist/node_modules/date-fns/locale/lt/_lib/localize.js +298 -195
  647. package/dist/node_modules/date-fns/locale/lt/_lib/match.js +154 -121
  648. package/dist/node_modules/date-fns/locale/lt.js +19 -19
  649. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +226 -120
  650. package/dist/node_modules/date-fns/locale/lv/_lib/formatLong.js +31 -32
  651. package/dist/node_modules/date-fns/locale/lv/_lib/formatRelative.js +22 -22
  652. package/dist/node_modules/date-fns/locale/lv/_lib/localize.js +298 -221
  653. package/dist/node_modules/date-fns/locale/lv/_lib/match.js +138 -112
  654. package/dist/node_modules/date-fns/locale/lv.js +18 -18
  655. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +68 -69
  656. package/dist/node_modules/date-fns/locale/nb/_lib/formatLong.js +31 -32
  657. package/dist/node_modules/date-fns/locale/nb/_lib/formatRelative.js +11 -11
  658. package/dist/node_modules/date-fns/locale/nb/_lib/localize.js +159 -108
  659. package/dist/node_modules/date-fns/locale/nb/_lib/match.js +112 -108
  660. package/dist/node_modules/date-fns/locale/nb.js +18 -18
  661. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +68 -69
  662. package/dist/node_modules/date-fns/locale/nl/_lib/formatLong.js +31 -32
  663. package/dist/node_modules/date-fns/locale/nl/_lib/formatRelative.js +11 -11
  664. package/dist/node_modules/date-fns/locale/nl/_lib/localize.js +160 -109
  665. package/dist/node_modules/date-fns/locale/nl/_lib/match.js +120 -108
  666. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js +68 -69
  667. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatLong.js +31 -32
  668. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js +11 -11
  669. package/dist/node_modules/date-fns/locale/nl-BE/_lib/localize.js +160 -109
  670. package/dist/node_modules/date-fns/locale/nl-BE/_lib/match.js +120 -108
  671. package/dist/node_modules/date-fns/locale/nl-BE.js +18 -18
  672. package/dist/node_modules/date-fns/locale/nl.js +18 -18
  673. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +82 -86
  674. package/dist/node_modules/date-fns/locale/sv/_lib/formatLong.js +31 -32
  675. package/dist/node_modules/date-fns/locale/sv/_lib/formatRelative.js +11 -11
  676. package/dist/node_modules/date-fns/locale/sv/_lib/localize.js +199 -142
  677. package/dist/node_modules/date-fns/locale/sv/_lib/match.js +109 -107
  678. package/dist/node_modules/date-fns/locale/sv.js +18 -18
  679. package/dist/node_modules/date-fns/startOfDay.js +7 -7
  680. package/dist/node_modules/date-fns/startOfISOWeek.js +9 -6
  681. package/dist/node_modules/date-fns/startOfISOWeekYear.js +9 -9
  682. package/dist/node_modules/date-fns/startOfMonth.js +7 -7
  683. package/dist/node_modules/date-fns/startOfWeek.js +8 -8
  684. package/dist/node_modules/date-fns/startOfWeekYear.js +10 -10
  685. package/dist/node_modules/date-fns/startOfYear.js +7 -7
  686. package/dist/node_modules/date-fns/subDays.js +6 -6
  687. package/dist/node_modules/date-fns/subMonths.js +6 -6
  688. package/dist/node_modules/date-fns/subWeeks.js +6 -6
  689. package/dist/node_modules/date-fns/toDate.js +6 -6
  690. package/dist/node_modules/fast-equals/dist/es/index.js +239 -298
  691. package/dist/node_modules/libphonenumber-js/es6/ParseError.js +116 -89
  692. package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +155 -183
  693. package/dist/node_modules/libphonenumber-js/es6/constants.js +4 -10
  694. package/dist/node_modules/libphonenumber-js/es6/format.js +70 -91
  695. package/dist/node_modules/libphonenumber-js/es6/getCountries.js +5 -5
  696. package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +8 -10
  697. package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +5 -5
  698. package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +19 -14
  699. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +9 -9
  700. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +15 -17
  701. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +35 -45
  702. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +20 -26
  703. package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +17 -22
  704. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +24 -36
  705. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +26 -30
  706. package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +13 -21
  707. package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +10 -24
  708. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +10 -11
  709. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +6 -8
  710. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +39 -39
  711. package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +9 -11
  712. package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +56 -47
  713. package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +12 -12
  714. package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +5 -5
  715. package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +5 -5
  716. package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +6 -6
  717. package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +9 -17
  718. package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +5 -5
  719. package/dist/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
  720. package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +46 -77
  721. package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +17 -18
  722. package/dist/node_modules/libphonenumber-js/es6/isPossible.js +29 -32
  723. package/dist/node_modules/libphonenumber-js/es6/isValid.js +12 -13
  724. package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +55 -52
  725. package/dist/node_modules/libphonenumber-js/es6/metadata.js +462 -482
  726. package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +97 -95
  727. package/dist/node_modules/libphonenumber-js/es6/parse.js +98 -133
  728. package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +43 -35
  729. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +8 -8
  730. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +51 -48
  731. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +59 -55
  732. package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +13 -13
  733. package/dist/node_modules/libphonenumber-js/metadata.min.json.js +7437 -3
  734. package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +6 -6
  735. package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +6 -6
  736. package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +7 -7
  737. package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +6 -6
  738. package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +7 -7
  739. package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +6 -6
  740. package/dist/node_modules/linkifyjs/dist/linkify.js +486 -679
  741. package/dist/node_modules/next-themes/dist/index.js +120 -85
  742. package/dist/node_modules/orderedmap/dist/index.js +64 -100
  743. package/dist/node_modules/prosemirror-commands/dist/index.js +313 -368
  744. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +109 -84
  745. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +162 -195
  746. package/dist/node_modules/prosemirror-history/dist/index.js +203 -239
  747. package/dist/node_modules/prosemirror-keymap/dist/index.js +45 -57
  748. package/dist/node_modules/prosemirror-model/dist/index.js +1783 -2735
  749. package/dist/node_modules/prosemirror-schema-list/dist/index.js +66 -81
  750. package/dist/node_modules/prosemirror-state/dist/index.js +517 -814
  751. package/dist/node_modules/prosemirror-transform/dist/index.js +1104 -1505
  752. package/dist/node_modules/prosemirror-view/dist/index.js +3274 -3782
  753. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +15 -21
  754. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +12 -14
  755. package/dist/node_modules/react/compiler-runtime.js +10 -10
  756. package/dist/node_modules/rope-sequence/dist/index.js +82 -99
  757. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -58
  758. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -57
  759. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -58
  760. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -46
  761. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -10
  762. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -10
  763. package/dist/node_modules/w3c-keyname/index.js +87 -92
  764. package/dist/theme/component-recipes.js +52 -53
  765. package/dist/theme/theme-casper-ui.js +179 -420
  766. package/dist/theme/theme-helper.js +4 -4
  767. package/dist/theme/theme-provider.js +33 -34
  768. package/dist/theme/theme-style-props.d.ts.map +1 -1
  769. package/dist/theme/theme-tokens.js +22 -12
  770. package/dist/theme/theme-types.js +22 -12
  771. package/dist/theme/theme.js +213 -268
  772. package/package.json +30 -29
  773. package/dist/_virtual/compiler-runtime.js +0 -5
  774. package/dist/_virtual/compiler-runtime2.js +0 -4
  775. package/dist/_virtual/index.js +0 -5
  776. package/dist/_virtual/index2.js +0 -4
  777. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  778. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  779. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  780. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  781. package/dist/_virtual/with-selector.development.js +0 -4
  782. package/dist/_virtual/with-selector.js +0 -5
  783. package/dist/_virtual/with-selector.production.js +0 -4
  784. package/dist/_virtual/with-selector2.js +0 -4
  785. package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +0 -506
@@ -1,1202 +1,675 @@
1
- import { effects as ot, ValueHistory as xe, snapshot as ut, reactive as y, derived as b } from "../state/dist/index.js";
2
- import { Position as ze } from "../geometry/dist/index.js";
3
- import { untracked as k, effect as Tt, batch as rt, signal as vt } from "../../@preact/signals-core/dist/signals-core.module.js";
4
- var Ae = Object.create, _t = Object.defineProperty, Fe = Object.defineProperties, Le = Object.getOwnPropertyDescriptor, Ve = Object.getOwnPropertyDescriptors, nt = Object.getOwnPropertySymbols, $t = Object.prototype.hasOwnProperty, Gt = Object.prototype.propertyIsEnumerable, Kt = (t, e) => (e = Symbol[t]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + t), U = (t) => {
5
- throw TypeError(t);
6
- }, pt = (t, e, s) => e in t ? _t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, yt = (t, e) => {
7
- for (var s in e || (e = {}))
8
- $t.call(e, s) && pt(t, s, e[s]);
9
- if (nt)
10
- for (var s of nt(e))
11
- Gt.call(e, s) && pt(t, s, e[s]);
12
- return t;
13
- }, mt = (t, e) => Fe(t, Ve(e)), Ht = (t, e) => _t(t, "name", { value: e, configurable: !0 }), Bt = (t, e) => {
14
- var s = {};
15
- for (var i in t)
16
- $t.call(t, i) && e.indexOf(i) < 0 && (s[i] = t[i]);
17
- if (t != null && nt)
18
- for (var i of nt(t))
19
- e.indexOf(i) < 0 && Gt.call(t, i) && (s[i] = t[i]);
20
- return s;
21
- }, T = (t) => {
22
- var e;
23
- return [, , , Ae((e = t?.[Kt("metadata")]) != null ? e : null)];
24
- }, Jt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], K = (t) => t !== void 0 && typeof t != "function" ? U("Function expected") : t, je = (t, e, s, i, r) => ({ kind: Jt[t], name: e, metadata: i, addInitializer: (n) => s._ ? U("Already initialized") : r.push(K(n || null)) }), V = (t, e) => pt(e, Kt("metadata"), t[3]), c = (t, e, s, i) => {
25
- for (var r = 0, n = t[e >> 1], l = n && n.length; r < l; r++) e & 1 ? n[r].call(s) : i = n[r].call(s, i);
26
- return i;
27
- }, u = (t, e, s, i, r, n) => {
28
- var l, o, h, d, g, a = e & 7, D = !!(e & 8), m = !!(e & 16), A = a > 3 ? t.length + 1 : a ? D ? 1 : 2 : 0, X = Jt[a + 5], $ = a > 3 && (t[A - 1] = []), j = t[A] || (t[A] = []), M = a && (!m && !D && (r = r.prototype), a < 5 && (a > 3 || !m) && Le(a < 4 ? r : { get [s]() {
29
- return v(this, n);
30
- }, set [s](O) {
31
- return I(this, n, O);
32
- } }, s));
33
- a ? m && a < 4 && Ht(n, (a > 2 ? "set " : a > 1 ? "get " : "") + s) : Ht(r, s);
34
- for (var G = i.length - 1; G >= 0; G--)
35
- d = je(a, s, h = {}, t[3], j), a && (d.static = D, d.private = m, g = d.access = { has: m ? (O) => qe(r, O) : (O) => s in O }, a ^ 3 && (g.get = m ? (O) => (a ^ 1 ? v : Qt)(O, r, a ^ 4 ? n : M.get) : (O) => O[s]), a > 2 && (g.set = m ? (O, lt) => I(O, r, lt, a ^ 4 ? n : M.set) : (O, lt) => O[s] = lt)), o = (0, i[G])(a ? a < 4 ? m ? n : M[X] : a > 4 ? void 0 : { get: M.get, set: M.set } : r, d), h._ = 1, a ^ 4 || o === void 0 ? K(o) && (a > 4 ? $.unshift(o) : a ? m ? n = o : M[X] = o : r = o) : typeof o != "object" || o === null ? U("Object expected") : (K(l = o.get) && (M.get = l), K(l = o.set) && (M.set = l), K(l = o.init) && $.unshift(l));
36
- return a || V(t, r), M && _t(r, s, M), m ? a ^ 4 ? n : M : r;
37
- }, wt = (t, e, s) => e.has(t) || U("Cannot " + s), qe = (t, e) => Object(e) !== e ? U('Cannot use the "in" operator on this value') : t.has(e), v = (t, e, s) => (wt(t, e, "read from private field"), s ? s.call(t) : e.get(t)), p = (t, e, s) => e.has(t) ? U("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), I = (t, e, s, i) => (wt(t, e, "write to private field"), i ? i.call(t, s) : e.set(t, s), s), Qt = (t, e, s) => (wt(t, e, "access private method"), s);
38
- function Xt(t, e) {
39
- return {
40
- plugin: t,
41
- options: e
42
- };
1
+ import { batch as e, effect as t, signal as n, untracked as r } from "../../@preact/signals-core/dist/signals-core.module.js";
2
+ import { ValueHistory as i, derived as a, effects as o, reactive as s, snapshot as c } from "../state/dist/index.js";
3
+ import { Position as l } from "../geometry/dist/index.js";
4
+ //#region ../../node_modules/@dnd-kit/abstract/index.js
5
+ var u = Object.create, ee = Object.defineProperty, d = Object.defineProperties, te = Object.getOwnPropertyDescriptor, f = Object.getOwnPropertyDescriptors, p = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable, g = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), _ = (e) => {
6
+ throw TypeError(e);
7
+ }, ne = (e, t, n) => t in e ? ee(e, t, {
8
+ enumerable: !0,
9
+ configurable: !0,
10
+ writable: !0,
11
+ value: n
12
+ }) : e[t] = n, v = (e, t) => {
13
+ for (var n in t ||= {}) m.call(t, n) && ne(e, n, t[n]);
14
+ if (p) for (var n of p(t)) h.call(t, n) && ne(e, n, t[n]);
15
+ return e;
16
+ }, y = (e, t) => d(e, f(t)), re = (e, t) => ee(e, "name", {
17
+ value: t,
18
+ configurable: !0
19
+ }), ie = (e, t) => {
20
+ var n = {};
21
+ for (var r in e) m.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
22
+ if (e != null && p) for (var r of p(e)) t.indexOf(r) < 0 && h.call(e, r) && (n[r] = e[r]);
23
+ return n;
24
+ }, b = (e) => [
25
+ ,
26
+ ,
27
+ ,
28
+ u(e?.[g("metadata")] ?? null)
29
+ ], ae = [
30
+ "class",
31
+ "method",
32
+ "getter",
33
+ "setter",
34
+ "accessor",
35
+ "field",
36
+ "value",
37
+ "get",
38
+ "set"
39
+ ], x = (e) => e !== void 0 && typeof e != "function" ? _("Function expected") : e, oe = (e, t, n, r, i) => ({
40
+ kind: ae[e],
41
+ name: t,
42
+ metadata: r,
43
+ addInitializer: (e) => n._ ? _("Already initialized") : i.push(x(e || null))
44
+ }), S = (e, t) => ne(t, g("metadata"), e[3]), C = (e, t, n, r) => {
45
+ for (var i = 0, a = e[t >> 1], o = a && a.length; i < o; i++) t & 1 ? a[i].call(n) : r = a[i].call(n, r);
46
+ return r;
47
+ }, w = (e, t, n, r, i, a) => {
48
+ var o, s, c, l, u, d = t & 7, f = !!(t & 8), p = !!(t & 16), m = d > 3 ? e.length + 1 : d ? f ? 1 : 2 : 0, h = ae[d + 5], g = d > 3 && (e[m - 1] = []), ne = e[m] || (e[m] = []), v = d && (!p && !f && (i = i.prototype), d < 5 && (d > 3 || !p) && te(d < 4 ? i : {
49
+ get [n]() {
50
+ return T(this, a);
51
+ },
52
+ set [n](e) {
53
+ return D(this, a, e);
54
+ }
55
+ }, n));
56
+ d ? p && d < 4 && re(a, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : re(i, n);
57
+ for (var y = r.length - 1; y >= 0; y--) l = oe(d, n, c = {}, e[3], ne), d && (l.static = f, l.private = p, u = l.access = { has: p ? (e) => ce(i, e) : (e) => n in e }, d ^ 3 && (u.get = p ? (e) => (d ^ 1 ? T : le)(e, i, d ^ 4 ? a : v.get) : (e) => e[n]), d > 2 && (u.set = p ? (e, t) => D(e, i, t, d ^ 4 ? a : v.set) : (e, t) => e[n] = t)), s = (0, r[y])(d ? d < 4 ? p ? a : v[h] : d > 4 ? void 0 : {
58
+ get: v.get,
59
+ set: v.set
60
+ } : i, l), c._ = 1, d ^ 4 || s === void 0 ? x(s) && (d > 4 ? g.unshift(s) : d ? p ? a = s : v[h] = s : i = s) : typeof s != "object" || !s ? _("Object expected") : (x(o = s.get) && (v.get = o), x(o = s.set) && (v.set = o), x(o = s.init) && g.unshift(o));
61
+ return d || S(e, i), v && ee(i, n, v), p ? d ^ 4 ? a : v : i;
62
+ }, se = (e, t, n) => t.has(e) || _("Cannot " + n), ce = (e, t) => Object(t) === t ? e.has(t) : _("Cannot use the \"in\" operator on this value"), T = (e, t, n) => (se(e, t, "read from private field"), n ? n.call(e) : t.get(e)), E = (e, t, n) => t.has(e) ? _("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), D = (e, t, n, r) => (se(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), le = (e, t, n) => (se(e, t, "access private method"), n);
63
+ function ue(e, t) {
64
+ return {
65
+ plugin: e,
66
+ options: t
67
+ };
43
68
  }
44
- function Ze(t) {
45
- return (e) => Xt(t, e);
69
+ function de(e) {
70
+ return (t) => ue(e, t);
46
71
  }
47
- function at(t) {
48
- return typeof t == "function" ? {
49
- plugin: t,
50
- options: void 0
51
- } : t;
72
+ function O(e) {
73
+ return typeof e == "function" ? {
74
+ plugin: e,
75
+ options: void 0
76
+ } : e;
52
77
  }
53
- var Yt, Q, bt, Z;
54
- Yt = [y];
55
- var F = class {
56
- /**
57
- * Creates a new plugin instance.
58
- *
59
- * @param manager - The drag and drop manager that owns this plugin
60
- * @param options - Optional configuration for the plugin
61
- */
62
- constructor(t, e) {
63
- this.manager = t, this.options = e, p(this, bt, c(Q, 8, this, !1)), c(Q, 11, this), p(this, Z, /* @__PURE__ */ new Set());
64
- }
65
- /**
66
- * Enables a disabled plugin instance.
67
- *
68
- * @remarks
69
- * This method triggers effects when called.
70
- */
71
- enable() {
72
- this.disabled = !1;
73
- }
74
- /**
75
- * Disables an enabled plugin instance.
76
- *
77
- * @remarks
78
- * This method triggers effects when called.
79
- */
80
- disable() {
81
- this.disabled = !0;
82
- }
83
- /**
84
- * Checks if the plugin instance is disabled.
85
- *
86
- * @returns true if the plugin is disabled
87
- * @remarks
88
- * This method does not trigger effects when accessed.
89
- */
90
- isDisabled() {
91
- return k(() => this.disabled);
92
- }
93
- /**
94
- * Configures a plugin instance with new options.
95
- *
96
- * @param options - The new options to apply
97
- */
98
- configure(t) {
99
- this.options = t;
100
- }
101
- /**
102
- * Registers an effect that will be cleaned up when the plugin is destroyed.
103
- *
104
- * @param callback - The effect callback to register
105
- * @returns A function to dispose of the effect
106
- */
107
- registerEffect(t) {
108
- const e = Tt(t.bind(this));
109
- return v(this, Z).add(e), e;
110
- }
111
- /**
112
- * Destroys a plugin instance and cleans up its resources.
113
- *
114
- * @remarks
115
- * This method:
116
- * - Calls all registered cleanup functions
117
- * - Should be overridden by subclasses to clean up additional resources
118
- */
119
- destroy() {
120
- v(this, Z).forEach((t) => t());
121
- }
122
- /**
123
- * Configures a plugin constructor with options.
124
- *
125
- * @param options - The options to configure the constructor with
126
- * @returns The configured plugin constructor
127
- *
128
- * @remarks
129
- * This method is used to configure the options that the
130
- * plugin constructor will use to create plugin instances.
131
- */
132
- static configure(t) {
133
- return Xt(this, t);
134
- }
78
+ var fe = [s], k, pe, me, A = class {
79
+ constructor(e, t) {
80
+ this.manager = e, this.options = t, E(this, pe, C(k, 8, this, !1)), C(k, 11, this), E(this, me, /* @__PURE__ */ new Set());
81
+ }
82
+ enable() {
83
+ this.disabled = !1;
84
+ }
85
+ disable() {
86
+ this.disabled = !0;
87
+ }
88
+ isDisabled() {
89
+ return r(() => this.disabled);
90
+ }
91
+ configure(e) {
92
+ this.options = e;
93
+ }
94
+ registerEffect(e) {
95
+ let n = t(e.bind(this));
96
+ return T(this, me).add(n), n;
97
+ }
98
+ destroy() {
99
+ T(this, me).forEach((e) => e());
100
+ }
101
+ static configure(e) {
102
+ return ue(this, e);
103
+ }
135
104
  };
136
- Q = T(null);
137
- bt = /* @__PURE__ */ new WeakMap();
138
- Z = /* @__PURE__ */ new WeakMap();
139
- u(Q, 4, "disabled", Yt, F, bt);
140
- V(Q, F);
141
- var Zt = class extends F {
142
- }, tt, dt = class {
143
- /**
144
- * Creates a new plugin registry.
145
- *
146
- * @param manager - The drag and drop manager that owns this registry
147
- */
148
- constructor(t) {
149
- this.manager = t, this.instances = /* @__PURE__ */ new Map(), p(this, tt, []);
150
- }
151
- /**
152
- * Gets all registered plugin instances.
153
- *
154
- * @returns An array of all active plugin instances
155
- */
156
- get values() {
157
- return Array.from(this.instances.values());
158
- }
159
- /**
160
- * Sets the list of plugins to be used by the registry.
161
- *
162
- * @param entries - Array of plugin constructors or descriptors
163
- * @remarks
164
- * This method:
165
- * - Filters out duplicate plugins
166
- * - Unregisters plugins that are no longer in use
167
- * - Registers new plugins with their options
168
- */
169
- set values(t) {
170
- const e = t.map(at).reduce((i, r) => {
171
- const n = i.find(({ plugin: l }) => l === r.plugin);
172
- return n ? (n.options = r.options, i) : [...i, r];
173
- }, []), s = e.map(({ plugin: i }) => i);
174
- for (const i of v(this, tt))
175
- if (!s.includes(i)) {
176
- if (i.prototype instanceof Zt)
177
- continue;
178
- this.unregister(i);
179
- }
180
- for (const { plugin: i, options: r } of e)
181
- this.register(i, r);
182
- I(this, tt, s);
183
- }
184
- /**
185
- * Gets a plugin instance by its constructor.
186
- *
187
- * @param plugin - The plugin constructor to look up
188
- * @returns The plugin instance or undefined if not found
189
- */
190
- get(t) {
191
- return this.instances.get(t);
192
- }
193
- /**
194
- * Registers a new plugin instance.
195
- *
196
- * @param plugin - The plugin constructor to register
197
- * @param options - Optional configuration for the plugin
198
- * @returns The registered plugin instance
199
- * @remarks
200
- * If the plugin is already registered, its options will be updated
201
- * and the existing instance will be returned.
202
- */
203
- register(t, e) {
204
- const s = this.instances.get(t);
205
- if (s)
206
- return s.options !== e && (s.options = e), s;
207
- const i = new t(this.manager, e);
208
- return this.instances.set(t, i), i;
209
- }
210
- /**
211
- * Unregisters a plugin instance.
212
- *
213
- * @param plugin - The plugin constructor to unregister
214
- * @remarks
215
- * This method:
216
- * - Destroys the plugin instance
217
- * - Removes it from the registry
218
- */
219
- unregister(t) {
220
- const e = this.instances.get(t);
221
- e && (e.destroy(), this.instances.delete(t));
222
- }
223
- /**
224
- * Destroys all registered plugin instances.
225
- *
226
- * @remarks
227
- * This method:
228
- * - Calls destroy() on all plugin instances
229
- * - Clears the registry
230
- */
231
- destroy() {
232
- for (const t of this.instances.values())
233
- t.destroy();
234
- this.instances.clear();
235
- }
105
+ k = b(null), pe = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), w(k, 4, "disabled", fe, A, pe), S(k, A);
106
+ var he = class extends A {}, j, M = class {
107
+ constructor(e) {
108
+ this.manager = e, this.instances = /* @__PURE__ */ new Map(), E(this, j, []);
109
+ }
110
+ get values() {
111
+ return Array.from(this.instances.values());
112
+ }
113
+ set values(e) {
114
+ let t = e.map(O).reduce((e, t) => {
115
+ let n = e.find(({ plugin: e }) => e === t.plugin);
116
+ return n ? (n.options = t.options, e) : [...e, t];
117
+ }, []), n = t.map(({ plugin: e }) => e);
118
+ for (let e of T(this, j)) if (!n.includes(e)) {
119
+ if (e.prototype instanceof he) continue;
120
+ this.unregister(e);
121
+ }
122
+ for (let { plugin: e, options: n } of t) this.register(e, n);
123
+ D(this, j, n);
124
+ }
125
+ get(e) {
126
+ return this.instances.get(e);
127
+ }
128
+ register(e, t) {
129
+ let n = this.instances.get(e);
130
+ if (n) return n.options !== t && (n.options = t), n;
131
+ let r = new e(this.manager, t);
132
+ return this.instances.set(e, r), r;
133
+ }
134
+ unregister(e) {
135
+ let t = this.instances.get(e);
136
+ t && (t.destroy(), this.instances.delete(e));
137
+ }
138
+ destroy() {
139
+ for (let e of this.instances.values()) e.destroy();
140
+ this.instances.clear();
141
+ }
236
142
  };
237
- tt = /* @__PURE__ */ new WeakMap();
238
- function He(t, e) {
239
- return t.priority === e.priority ? t.type === e.type ? e.value - t.value : e.type - t.type : e.priority - t.priority;
143
+ j = /* @__PURE__ */ new WeakMap();
144
+ function ge(e, t) {
145
+ return e.priority === t.priority ? e.type === t.type ? t.value - e.value : t.type - e.type : t.priority - e.priority;
240
146
  }
241
- var Y = [], q, H, Re = class extends F {
242
- /**
243
- * Creates a new CollisionObserver instance.
244
- *
245
- * @param manager - The drag drop manager instance
246
- */
247
- constructor(t) {
248
- super(t), p(this, q), p(this, H), this.computeCollisions = this.computeCollisions.bind(this), I(this, H, vt(Y)), this.destroy = ot(
249
- () => {
250
- const e = this.computeCollisions(), s = k(
251
- () => this.manager.dragOperation.position.current
252
- );
253
- if (e !== Y) {
254
- const i = v(this, q);
255
- if (I(this, q, s), i && s.x == i.x && s.y == i.y)
256
- return;
257
- } else
258
- I(this, q, void 0);
259
- v(this, H).value = e;
260
- },
261
- () => {
262
- const { dragOperation: e } = this.manager;
263
- e.status.initialized && this.forceUpdate();
264
- }
265
- );
266
- }
267
- /**
268
- * Forces an immediate update of collision detection.
269
- *
270
- * @param immediate - If true, updates collisions immediately. If false, resets previous coordinates.
271
- */
272
- forceUpdate(t = !0) {
273
- k(() => {
274
- t ? v(this, H).value = this.computeCollisions() : I(this, q, void 0);
275
- });
276
- }
277
- /**
278
- * Computes collisions between draggable and droppable elements.
279
- *
280
- * @param entries - Optional array of droppable elements to check. If not provided, uses all registered droppables.
281
- * @param collisionDetector - Optional custom collision detector function
282
- * @returns Array of detected collisions, sorted by priority
283
- */
284
- computeCollisions(t, e) {
285
- const { registry: s, dragOperation: i } = this.manager, { source: r, shape: n, status: l } = i;
286
- if (!l.initialized || !n)
287
- return Y;
288
- const o = [], h = [];
289
- for (const d of t ?? s.droppables) {
290
- if (d.disabled || r && !d.accepts(r))
291
- continue;
292
- const g = e ?? d.collisionDetector;
293
- if (!g)
294
- continue;
295
- h.push(d), d.shape;
296
- const a = k(
297
- () => g({
298
- droppable: d,
299
- dragOperation: i
300
- })
301
- );
302
- a && (d.collisionPriority != null && (a.priority = d.collisionPriority), o.push(a));
303
- }
304
- return h.length === 0 ? Y : (o.sort(He), o);
305
- }
306
- /**
307
- * Gets the current collisions signal value.
308
- */
309
- get collisions() {
310
- return v(this, H).value;
311
- }
147
+ var N = [], P, F, _e = class extends A {
148
+ constructor(e) {
149
+ super(e), E(this, P), E(this, F), this.computeCollisions = this.computeCollisions.bind(this), D(this, F, n(N)), this.destroy = o(() => {
150
+ let e = this.computeCollisions(), t = r(() => this.manager.dragOperation.position.current);
151
+ if (e !== N) {
152
+ let e = T(this, P);
153
+ if (D(this, P, t), e && t.x == e.x && t.y == e.y) return;
154
+ } else D(this, P, void 0);
155
+ T(this, F).value = e;
156
+ }, () => {
157
+ let { dragOperation: e } = this.manager;
158
+ e.status.initialized && this.forceUpdate();
159
+ });
160
+ }
161
+ forceUpdate(e = !0) {
162
+ r(() => {
163
+ e ? T(this, F).value = this.computeCollisions() : D(this, P, void 0);
164
+ });
165
+ }
166
+ computeCollisions(e, t) {
167
+ let { registry: n, dragOperation: i } = this.manager, { source: a, shape: o, status: s } = i;
168
+ if (!s.initialized || !o) return N;
169
+ let c = [], l = [];
170
+ for (let o of e ?? n.droppables) {
171
+ if (o.disabled || a && !o.accepts(a)) continue;
172
+ let e = t ?? o.collisionDetector;
173
+ if (!e) continue;
174
+ l.push(o), o.shape;
175
+ let n = r(() => e({
176
+ droppable: o,
177
+ dragOperation: i
178
+ }));
179
+ n && (o.collisionPriority != null && (n.priority = o.collisionPriority), c.push(n));
180
+ }
181
+ return l.length === 0 ? N : (c.sort(ge), c);
182
+ }
183
+ get collisions() {
184
+ return T(this, F).value;
185
+ }
312
186
  };
313
- q = /* @__PURE__ */ new WeakMap();
314
- H = /* @__PURE__ */ new WeakMap();
315
- var te, ee, se, Dt, ie, S, Mt, N, Ot, It;
316
- se = [y], ee = [y], te = [y];
317
- var P = class L {
318
- /**
319
- * Creates a new instance of the `Entity` class.
320
- *
321
- * @param input - An object containing the initial properties of the entity.
322
- * @param manager - The manager that controls the drag and drop operations.
323
- */
324
- constructor(e, s) {
325
- p(this, Mt, c(S, 8, this)), c(S, 11, this), p(this, N), p(this, Ot, c(S, 12, this)), c(S, 15, this), p(this, It, c(S, 16, this)), c(S, 19, this);
326
- const { effects: i, id: r, data: n = {}, disabled: l = !1, register: o = !0 } = e;
327
- let h = r;
328
- I(this, N, vt(r)), this.manager = s, this.data = n, this.disabled = l, this.effects = () => {
329
- var d;
330
- return [
331
- () => {
332
- const { id: g, manager: a } = this;
333
- if (g !== h)
334
- return h = g, a?.registry.register(this), () => a?.registry.unregister(this);
335
- },
336
- ...(d = i?.()) != null ? d : []
337
- ];
338
- }, this.register = this.register.bind(this), this.unregister = this.unregister.bind(this), this.destroy = this.destroy.bind(this), s && o && queueMicrotask(this.register);
339
- }
340
- get id() {
341
- var e, s;
342
- const i = v(this, N).value;
343
- return (s = (e = L.pendingIdChanges) == null ? void 0 : e.get(this)) != null ? s : i;
344
- }
345
- set id(e) {
346
- var s, i;
347
- const r = (i = (s = L.pendingIdChanges) == null ? void 0 : s.get(this)) != null ? i : v(this, N).peek();
348
- e !== r && (L.pendingIdChanges || (L.pendingIdChanges = /* @__PURE__ */ new Map(), queueMicrotask(() => {
349
- var n;
350
- return Qt(n = L, Dt, ie).call(n);
351
- })), L.pendingIdChanges.set(this, e));
352
- }
353
- /**
354
- * A method that registers the entity with the manager.
355
- * @returns CleanupFunction | void
356
- */
357
- register() {
358
- var e;
359
- return (e = this.manager) == null ? void 0 : e.registry.register(this);
360
- }
361
- /**
362
- * A method that unregisters the entity from the manager.
363
- * @returns void
364
- */
365
- unregister() {
366
- var e;
367
- (e = this.manager) == null || e.registry.unregister(this);
368
- }
369
- /**
370
- * A method that cleans up the entity when it is no longer needed.
371
- * @returns void
372
- */
373
- destroy() {
374
- var e;
375
- (e = this.manager) == null || e.registry.unregister(this);
376
- }
377
- };
378
- S = T(null);
379
- Dt = /* @__PURE__ */ new WeakSet();
380
- ie = function() {
381
- const t = P.pendingIdChanges;
382
- P.pendingIdChanges = null, t && rt(() => {
383
- for (const [e, s] of t)
384
- v(e, N).value = s;
385
- });
187
+ P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap();
188
+ var ve, ye, be = [s], xe, Se, I, Ce, L, we, Te;
189
+ ye = [s], ve = [s];
190
+ var R = class e {
191
+ constructor(e, t) {
192
+ E(this, Ce, C(I, 8, this)), C(I, 11, this), E(this, L), E(this, we, C(I, 12, this)), C(I, 15, this), E(this, Te, C(I, 16, this)), C(I, 19, this);
193
+ let { effects: r, id: i, data: a = {}, disabled: o = !1, register: s = !0 } = e, c = i;
194
+ D(this, L, n(i)), this.manager = t, this.data = a, this.disabled = o, this.effects = () => [() => {
195
+ let { id: e, manager: t } = this;
196
+ if (e !== c) return c = e, t?.registry.register(this), () => t?.registry.unregister(this);
197
+ }, ...r?.() ?? []], this.register = this.register.bind(this), this.unregister = this.unregister.bind(this), this.destroy = this.destroy.bind(this), t && s && queueMicrotask(this.register);
198
+ }
199
+ get id() {
200
+ let t = T(this, L).value;
201
+ return e.pendingIdChanges?.get(this) ?? t;
202
+ }
203
+ set id(t) {
204
+ t !== (e.pendingIdChanges?.get(this) ?? T(this, L).peek()) && (e.pendingIdChanges || (e.pendingIdChanges = /* @__PURE__ */ new Map(), queueMicrotask(() => {
205
+ var t;
206
+ return le(t = e, xe, Se).call(t);
207
+ })), e.pendingIdChanges.set(this, t));
208
+ }
209
+ register() {
210
+ return this.manager?.registry.register(this);
211
+ }
212
+ unregister() {
213
+ var e;
214
+ (e = this.manager) == null || e.registry.unregister(this);
215
+ }
216
+ destroy() {
217
+ var e;
218
+ (e = this.manager) == null || e.registry.unregister(this);
219
+ }
386
220
  };
387
- Mt = /* @__PURE__ */ new WeakMap();
388
- N = /* @__PURE__ */ new WeakMap();
389
- Ot = /* @__PURE__ */ new WeakMap();
390
- It = /* @__PURE__ */ new WeakMap();
391
- u(S, 4, "manager", se, P, Mt);
392
- u(S, 4, "data", ee, P, Ot);
393
- u(S, 4, "disabled", te, P, It);
394
- p(P, Dt);
395
- V(S, P);
396
- P.pendingIdChanges = null;
397
- var ct = P, Rt = class {
398
- constructor() {
399
- this.map = vt(/* @__PURE__ */ new Map()), this.cleanupFunctions = /* @__PURE__ */ new WeakMap(), this.register = (t, e) => {
400
- const s = this.map.peek(), i = s.get(t), r = () => this.unregister(t, e);
401
- if (i === e) return r;
402
- if (i && i.id === t) {
403
- const o = this.cleanupFunctions.get(i);
404
- o?.(), this.cleanupFunctions.delete(i);
405
- }
406
- const n = new Map(s);
407
- for (const [o, h] of s)
408
- if (h === e && o !== t) {
409
- n.delete(o);
410
- break;
411
- }
412
- n.set(t, e), this.map.value = n;
413
- const l = ot(...e.effects());
414
- return this.cleanupFunctions.set(e, l), r;
415
- }, this.unregister = (t, e) => {
416
- const s = this.map.peek();
417
- if (s.get(t) !== e)
418
- return;
419
- const i = this.cleanupFunctions.get(e);
420
- i?.(), this.cleanupFunctions.delete(e);
421
- const r = new Map(s);
422
- r.delete(t), this.map.value = r;
423
- };
424
- }
425
- /**
426
- * Iterator for the EntityRegistry class.
427
- * @returns An iterator for the values in the map.
428
- */
429
- [Symbol.iterator]() {
430
- return this.map.peek().values();
431
- }
432
- get value() {
433
- return this.map.value.values();
434
- }
435
- /**
436
- * Checks if a entity with the given identifier exists in the registry.
437
- * @param identifier - The unique identifier of the entity.
438
- * @returns True if the entity exists, false otherwise.
439
- */
440
- has(t) {
441
- return this.map.value.has(t);
442
- }
443
- /**
444
- * Retrieves a entity from the registry using its identifier.
445
- * @param identifier - The unique identifier of the entity.
446
- * @returns The entity if it exists, undefined otherwise.
447
- */
448
- get(t) {
449
- return this.map.value.get(t);
450
- }
451
- /**
452
- * Destroys all entries in the registry and clears the registry.
453
- */
454
- destroy() {
455
- for (const t of this) {
456
- const e = this.cleanupFunctions.get(t);
457
- e?.(), t.destroy();
458
- }
459
- this.map.value = /* @__PURE__ */ new Map();
460
- }
461
- }, re, ne, ae, oe, ce, le, gt, w, kt, Et, St, C = class extends (gt = ct, le = [y], ce = [y], oe = [y], ae = [b], ne = [b], re = [b], gt) {
462
- constructor(e, s) {
463
- var i = e, { modifiers: r, type: n, sensors: l, plugins: o, effects: h } = i, d = Bt(i, ["modifiers", "type", "sensors", "plugins", "effects"]);
464
- super(
465
- mt(yt({}, d), {
466
- effects: () => {
467
- var g;
468
- return [
469
- ...(g = h?.()) != null ? g : [],
470
- () => {
471
- const { manager: a, plugins: D } = this;
472
- if (!(!a || !D))
473
- for (const m of D) {
474
- const { plugin: A } = at(m);
475
- a.registry.plugins.register(A);
476
- }
477
- }
478
- ];
479
- }
480
- }),
481
- s
482
- ), c(w, 5, this), p(this, kt, c(w, 8, this)), c(w, 11, this), p(this, Et, c(w, 12, this)), c(w, 15, this), p(this, St, c(w, 16, this, this.isDragSource ? "dragging" : "idle")), c(w, 19, this), this.type = n, this.sensors = l, this.modifiers = r, this.alignment = d.alignment, this.plugins = o;
483
- }
484
- /**
485
- * Look up per-entity options for a given plugin constructor.
486
- */
487
- pluginConfig(e) {
488
- if (this.plugins)
489
- for (const s of this.plugins) {
490
- const i = at(s);
491
- if (i.plugin === e) return i.options;
492
- }
493
- }
494
- get isDropping() {
495
- return this.status === "dropping" && this.isDragSource;
496
- }
497
- get isDragging() {
498
- return this.status === "dragging" && this.isDragSource;
499
- }
500
- get isDragSource() {
501
- var e, s;
502
- return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.source) == null ? void 0 : s.id) === this.id;
503
- }
221
+ I = b(null), xe = /* @__PURE__ */ new WeakSet(), Se = function() {
222
+ let t = R.pendingIdChanges;
223
+ R.pendingIdChanges = null, t && e(() => {
224
+ for (let [e, n] of t) T(e, L).value = n;
225
+ });
226
+ }, Ce = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), w(I, 4, "manager", be, R, Ce), w(I, 4, "data", ye, R, we), w(I, 4, "disabled", ve, R, Te), E(R, xe), S(I, R), R.pendingIdChanges = null;
227
+ var z = R, Ee = class {
228
+ constructor() {
229
+ this.map = n(/* @__PURE__ */ new Map()), this.cleanupFunctions = /* @__PURE__ */ new WeakMap(), this.register = (e, t) => {
230
+ let n = this.map.peek(), r = n.get(e), i = () => this.unregister(e, t);
231
+ if (r === t) return i;
232
+ r && r.id === e && (this.cleanupFunctions.get(r)?.(), this.cleanupFunctions.delete(r));
233
+ let a = new Map(n);
234
+ for (let [r, i] of n) if (i === t && r !== e) {
235
+ a.delete(r);
236
+ break;
237
+ }
238
+ a.set(e, t), this.map.value = a;
239
+ let s = o(...t.effects());
240
+ return this.cleanupFunctions.set(t, s), i;
241
+ }, this.unregister = (e, t) => {
242
+ let n = this.map.peek();
243
+ if (n.get(e) !== t) return;
244
+ this.cleanupFunctions.get(t)?.(), this.cleanupFunctions.delete(t);
245
+ let r = new Map(n);
246
+ r.delete(e), this.map.value = r;
247
+ };
248
+ }
249
+ [Symbol.iterator]() {
250
+ return this.map.peek().values();
251
+ }
252
+ get value() {
253
+ return this.map.value.values();
254
+ }
255
+ has(e) {
256
+ return this.map.value.has(e);
257
+ }
258
+ get(e) {
259
+ return this.map.value.get(e);
260
+ }
261
+ destroy() {
262
+ for (let e of this) this.cleanupFunctions.get(e)?.(), e.destroy();
263
+ this.map.value = /* @__PURE__ */ new Map();
264
+ }
265
+ }, De, Oe, ke, Ae, je, Me, Ne, B, Pe, Fe, Ie, V = class extends (Ne = z, Me = [s], je = [s], Ae = [s], ke = [a], Oe = [a], De = [a], Ne) {
266
+ constructor(e, t) {
267
+ var n = e, { modifiers: r, type: i, sensors: a, plugins: o, effects: s } = n, c = ie(n, [
268
+ "modifiers",
269
+ "type",
270
+ "sensors",
271
+ "plugins",
272
+ "effects"
273
+ ]);
274
+ super(y(v({}, c), { effects: () => [...s?.() ?? [], () => {
275
+ let { manager: e, plugins: t } = this;
276
+ if (!(!e || !t)) for (let n of t) {
277
+ let { plugin: t } = O(n);
278
+ e.registry.plugins.register(t);
279
+ }
280
+ }] }), t), C(B, 5, this), E(this, Pe, C(B, 8, this)), C(B, 11, this), E(this, Fe, C(B, 12, this)), C(B, 15, this), E(this, Ie, C(B, 16, this, this.isDragSource ? "dragging" : "idle")), C(B, 19, this), this.type = i, this.sensors = a, this.modifiers = r, this.alignment = c.alignment, this.plugins = o;
281
+ }
282
+ pluginConfig(e) {
283
+ if (this.plugins) for (let t of this.plugins) {
284
+ let n = O(t);
285
+ if (n.plugin === e) return n.options;
286
+ }
287
+ }
288
+ get isDropping() {
289
+ return this.status === "dropping" && this.isDragSource;
290
+ }
291
+ get isDragging() {
292
+ return this.status === "dragging" && this.isDragSource;
293
+ }
294
+ get isDragSource() {
295
+ return this.manager?.dragOperation.source?.id === this.id;
296
+ }
504
297
  };
505
- w = T(gt);
506
- kt = /* @__PURE__ */ new WeakMap();
507
- Et = /* @__PURE__ */ new WeakMap();
508
- St = /* @__PURE__ */ new WeakMap();
509
- u(w, 4, "type", le, C, kt);
510
- u(w, 4, "modifiers", ce, C, Et);
511
- u(w, 4, "status", oe, C, St);
512
- u(w, 2, "isDropping", ae, C);
513
- u(w, 2, "isDragging", ne, C);
514
- u(w, 2, "isDragSource", re, C);
515
- V(w, C);
516
- var ue, de, he, pe, ge, fe, ft, _, Wt, Pt, Ct, xt, zt, x = class extends (ft = ct, fe = [y], ge = [y], pe = [y], he = [y], de = [y], ue = [b], ft) {
517
- constructor(e, s) {
518
- var i = e, { accept: r, collisionDetector: n, collisionPriority: l, type: o } = i, h = Bt(i, ["accept", "collisionDetector", "collisionPriority", "type"]);
519
- super(h, s), c(_, 5, this), p(this, Wt, c(_, 8, this)), c(_, 11, this), p(this, Pt, c(_, 12, this)), c(_, 15, this), p(this, Ct, c(_, 16, this)), c(_, 19, this), p(this, xt, c(_, 20, this)), c(_, 23, this), p(this, zt, c(_, 24, this)), c(_, 27, this), this.accept = r, this.collisionDetector = n, this.collisionPriority = l, this.type = o;
520
- }
521
- /**
522
- * Checks whether or not the droppable accepts a given draggable.
523
- *
524
- * @param draggable - The draggable to check
525
- * @returns true if the draggable can be dropped here
526
- */
527
- accepts(e) {
528
- const { accept: s } = this;
529
- return s ? typeof s == "function" ? s(e) : e.type ? Array.isArray(s) ? s.includes(e.type) : e.type === s : !1 : !0;
530
- }
531
- get isDropTarget() {
532
- var e, s;
533
- return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.target) == null ? void 0 : s.id) === this.id;
534
- }
298
+ B = b(Ne), Pe = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), w(B, 4, "type", Me, V, Pe), w(B, 4, "modifiers", je, V, Fe), w(B, 4, "status", Ae, V, Ie), w(B, 2, "isDropping", ke, V), w(B, 2, "isDragging", Oe, V), w(B, 2, "isDragSource", De, V), S(B, V);
299
+ var Le, Re, ze, Be, Ve, He, Ue, H, We, Ge, Ke, qe, Je, U = class extends (Ue = z, He = [s], Ve = [s], Be = [s], ze = [s], Re = [s], Le = [a], Ue) {
300
+ constructor(e, t) {
301
+ var n = e, { accept: r, collisionDetector: i, collisionPriority: a, type: o } = n, s = ie(n, [
302
+ "accept",
303
+ "collisionDetector",
304
+ "collisionPriority",
305
+ "type"
306
+ ]);
307
+ super(s, t), C(H, 5, this), E(this, We, C(H, 8, this)), C(H, 11, this), E(this, Ge, C(H, 12, this)), C(H, 15, this), E(this, Ke, C(H, 16, this)), C(H, 19, this), E(this, qe, C(H, 20, this)), C(H, 23, this), E(this, Je, C(H, 24, this)), C(H, 27, this), this.accept = r, this.collisionDetector = i, this.collisionPriority = a, this.type = o;
308
+ }
309
+ accepts(e) {
310
+ let { accept: t } = this;
311
+ return t ? typeof t == "function" ? t(e) : e.type ? Array.isArray(t) ? t.includes(e.type) : e.type === t : !1 : !0;
312
+ }
313
+ get isDropTarget() {
314
+ return this.manager?.dragOperation.target?.id === this.id;
315
+ }
535
316
  };
536
- _ = T(ft);
537
- Wt = /* @__PURE__ */ new WeakMap();
538
- Pt = /* @__PURE__ */ new WeakMap();
539
- Ct = /* @__PURE__ */ new WeakMap();
540
- xt = /* @__PURE__ */ new WeakMap();
541
- zt = /* @__PURE__ */ new WeakMap();
542
- u(_, 4, "accept", fe, x, Wt);
543
- u(_, 4, "type", ge, x, Pt);
544
- u(_, 4, "collisionDetector", pe, x, Ct);
545
- u(_, 4, "collisionPriority", he, x, xt);
546
- u(_, 4, "shape", de, x, zt);
547
- u(_, 2, "isDropTarget", ue, x);
548
- V(_, x);
549
- var Ne = class {
550
- constructor() {
551
- this.registry = /* @__PURE__ */ new Map();
552
- }
553
- /**
554
- * Adds an event listener for the specified event type.
555
- *
556
- * @param name - The name of the event to listen for
557
- * @param handler - The function to call when the event occurs
558
- * @returns A function to remove the event listener
559
- */
560
- addEventListener(t, e) {
561
- const { registry: s } = this, i = new Set(s.get(t));
562
- return i.add(e), s.set(t, i), () => this.removeEventListener(t, e);
563
- }
564
- /**
565
- * Removes an event listener for the specified event type.
566
- *
567
- * @param name - The name of the event
568
- * @param handler - The function to remove
569
- */
570
- removeEventListener(t, e) {
571
- const { registry: s } = this, i = new Set(s.get(t));
572
- i.delete(e), s.set(t, i);
573
- }
574
- /**
575
- * Dispatches an event to all registered listeners.
576
- *
577
- * @param name - The name of the event to dispatch
578
- * @param args - Arguments to pass to the event handlers
579
- */
580
- dispatch(t, ...e) {
581
- const { registry: s } = this, i = s.get(t);
582
- if (i)
583
- for (const r of i)
584
- r(...e);
585
- }
586
- }, Ue = class extends Ne {
587
- /**
588
- * Creates a new drag and drop monitor.
589
- *
590
- * @param manager - The drag and drop manager to monitor
591
- */
592
- constructor(t) {
593
- super(), this.manager = t;
594
- }
595
- /**
596
- * Dispatches a drag and drop event.
597
- *
598
- * @param type - The type of event to dispatch
599
- * @param event - The event data to dispatch
600
- */
601
- dispatch(t, e) {
602
- const s = [e, this.manager];
603
- super.dispatch(t, ...s);
604
- }
317
+ H = b(Ue), We = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), w(H, 4, "accept", He, U, We), w(H, 4, "type", Ve, U, Ge), w(H, 4, "collisionDetector", Be, U, Ke), w(H, 4, "collisionPriority", ze, U, qe), w(H, 4, "shape", Re, U, Je), w(H, 2, "isDropTarget", Le, U), S(H, U);
318
+ var Ye = class {
319
+ constructor() {
320
+ this.registry = /* @__PURE__ */ new Map();
321
+ }
322
+ addEventListener(e, t) {
323
+ let { registry: n } = this, r = new Set(n.get(e));
324
+ return r.add(t), n.set(e, r), () => this.removeEventListener(e, t);
325
+ }
326
+ removeEventListener(e, t) {
327
+ let { registry: n } = this, r = new Set(n.get(e));
328
+ r.delete(t), n.set(e, r);
329
+ }
330
+ dispatch(e, ...t) {
331
+ let { registry: n } = this, r = n.get(e);
332
+ if (r) for (let e of r) e(...t);
333
+ }
334
+ }, Xe = class extends Ye {
335
+ constructor(e) {
336
+ super(), this.manager = e;
337
+ }
338
+ dispatch(e, t) {
339
+ let n = [t, this.manager];
340
+ super.dispatch(e, ...n);
341
+ }
605
342
  };
606
- function et(t, e = !0) {
607
- let s = !1;
608
- return mt(yt({}, t), {
609
- cancelable: e,
610
- get defaultPrevented() {
611
- return s;
612
- },
613
- preventDefault() {
614
- e && (s = !0);
615
- }
616
- });
343
+ function W(e, t = !0) {
344
+ let n = !1;
345
+ return y(v({}, e), {
346
+ cancelable: t,
347
+ get defaultPrevented() {
348
+ return n;
349
+ },
350
+ preventDefault() {
351
+ t && (n = !0);
352
+ }
353
+ });
617
354
  }
618
- var Te = class extends Zt {
619
- constructor(t) {
620
- super(t);
621
- const e = (i, r) => i.map(({ id: n }) => n).join("") === r.map(({ id: n }) => n).join("");
622
- let s = [];
623
- this.destroy = ot(
624
- () => {
625
- const { dragOperation: i, collisionObserver: r } = t;
626
- i.status.initializing && (s = [], r.enable());
627
- },
628
- () => {
629
- const { collisionObserver: i, monitor: r } = t, { collisions: n } = i;
630
- if (i.isDisabled() || ct.pendingIdChanges)
631
- return;
632
- const l = et({
633
- collisions: n
634
- });
635
- if (r.dispatch("collision", l), l.defaultPrevented || e(n, s))
636
- return;
637
- s = n;
638
- const [o] = n;
639
- k(() => {
640
- var h;
641
- o?.id !== ((h = t.dragOperation.target) == null ? void 0 : h.id) && (i.disable(), t.actions.setDropTarget(o?.id).then(() => {
642
- i.enable();
643
- }));
644
- });
645
- }
646
- );
647
- }
648
- }, $e = /* @__PURE__ */ ((t) => (t[t.Lowest = 0] = "Lowest", t[t.Low = 1] = "Low", t[t.Normal = 2] = "Normal", t[t.High = 3] = "High", t[t.Highest = 4] = "Highest", t))($e || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Collision = 0] = "Collision", t[t.ShapeIntersection = 1] = "ShapeIntersection", t[t.PointerIntersection = 2] = "PointerIntersection", t))(Ge || {}), ve, _e, ye, me, we, be, De, E, At;
649
- De = [y], be = [b], we = [b], me = [b], ye = [b], _e = [b], ve = [b];
650
- var z = class {
651
- constructor() {
652
- c(E, 5, this), p(this, At, c(
653
- E,
654
- 8,
655
- this,
656
- "idle"
657
- /* Idle */
658
- )), c(E, 11, this);
659
- }
660
- get current() {
661
- return this.value;
662
- }
663
- get idle() {
664
- return this.value === "idle";
665
- }
666
- get initializing() {
667
- return this.value === "initializing";
668
- }
669
- get initialized() {
670
- const { value: t } = this;
671
- return t !== "idle" && t !== "initialization-pending";
672
- }
673
- get dragging() {
674
- return this.value === "dragging";
675
- }
676
- get dropped() {
677
- return this.value === "dropped";
678
- }
679
- /**
680
- * Sets the current status value.
681
- *
682
- * @param value - The new status value
683
- */
684
- set(t) {
685
- this.value = t;
686
- }
687
- };
688
- E = T(null);
689
- At = /* @__PURE__ */ new WeakMap();
690
- u(E, 4, "value", De, z, At);
691
- u(E, 2, "current", be, z);
692
- u(E, 2, "idle", we, z);
693
- u(E, 2, "initializing", me, z);
694
- u(E, 2, "initialized", ye, z);
695
- u(E, 2, "dragging", _e, z);
696
- u(E, 2, "dropped", ve, z);
697
- V(E, z);
698
- var Ke = class {
699
- /**
700
- * Creates a new instance of drag actions.
701
- *
702
- * @param manager - The drag and drop manager instance
703
- */
704
- constructor(t) {
705
- this.manager = t;
706
- }
707
- /**
708
- * Sets the source of the drag operation.
709
- *
710
- * @param source - The draggable entity or its unique identifier
711
- */
712
- setDragSource(t) {
713
- const { dragOperation: e } = this.manager;
714
- e.sourceIdentifier = typeof t == "string" || typeof t == "number" ? t : t.id;
715
- }
716
- /**
717
- * Sets the target of the drop operation.
718
- *
719
- * @param identifier - The unique identifier of the droppable entity or null/undefined
720
- * @returns A promise that resolves to true if the drop was prevented
721
- */
722
- setDropTarget(t) {
723
- return k(() => {
724
- const { dragOperation: e } = this.manager, s = t ?? null;
725
- if (e.targetIdentifier === s)
726
- return Promise.resolve(!1);
727
- e.targetIdentifier = s;
728
- const i = et({
729
- operation: e.snapshot()
730
- });
731
- return e.status.dragging && this.manager.monitor.dispatch("dragover", i), this.manager.renderer.rendering.then(() => i.defaultPrevented);
732
- });
733
- }
734
- /**
735
- * Starts a new drag operation.
736
- *
737
- * @param args - Configuration for the drag operation
738
- * @param args.event - The event that initiated the drag
739
- * @param args.source - The source draggable entity or its identifier
740
- * @param args.coordinates - The initial coordinates of the drag
741
- * @returns true if the drag operation started successfully
742
- * @throws {Error} If there is no drag source or another operation is active
743
- */
744
- start(t) {
745
- return k(() => {
746
- const { dragOperation: e } = this.manager;
747
- if (t.source != null && this.setDragSource(t.source), !e.source)
748
- throw new Error("Cannot start a drag operation without a drag source");
749
- if (!e.status.idle)
750
- throw new Error(
751
- "Cannot start a drag operation while another is active"
752
- );
753
- const i = new AbortController(), { event: r, coordinates: n } = t;
754
- rt(() => {
755
- e.status.set(
756
- "initialization-pending"
757
- /* InitializationPending */
758
- ), e.shape = null, e.canceled = !1, e.activatorEvent = r ?? null, e.position.reset(n);
759
- });
760
- const l = et({
761
- operation: e.snapshot()
762
- });
763
- return this.manager.monitor.dispatch("beforedragstart", l), l.defaultPrevented ? (e.reset(), i.abort(), i) : (e.status.set(
764
- "initializing"
765
- /* Initializing */
766
- ), e.controller = i, this.manager.renderer.rendering.then(() => {
767
- if (i.signal.aborted) return;
768
- const { status: o } = e;
769
- o.current === "initializing" && rt(() => {
770
- e.status.set(
771
- "dragging"
772
- /* Dragging */
773
- ), this.manager.monitor.dispatch("dragstart", {
774
- nativeEvent: r,
775
- operation: e.snapshot(),
776
- cancelable: !1
777
- });
778
- });
779
- }), i);
780
- });
781
- }
782
- /**
783
- * Moves the dragged entity to a new position.
784
- *
785
- * @param args - Configuration for the move operation
786
- * @param args.by - Relative coordinates to move by
787
- * @param args.to - Absolute coordinates to move to
788
- * @param args.event - The event that triggered the move
789
- * @param args.cancelable - Whether the move can be canceled
790
- * @param args.propagate - Whether to dispatch dragmove events
791
- */
792
- move(t) {
793
- return k(() => {
794
- var e, s;
795
- const { dragOperation: i } = this.manager, { status: r, controller: n } = i;
796
- if (!r.dragging || !n || n.signal.aborted)
797
- return;
798
- const l = et(
799
- {
800
- nativeEvent: t.event,
801
- operation: i.snapshot(),
802
- by: t.by,
803
- to: t.to
804
- },
805
- (e = t.cancelable) != null ? e : !0
806
- );
807
- ((s = t.propagate) == null || s) && this.manager.monitor.dispatch("dragmove", l), queueMicrotask(() => {
808
- var o, h, d, g, a;
809
- if (l.defaultPrevented)
810
- return;
811
- const D = (a = t.to) != null ? a : {
812
- x: i.position.current.x + ((h = (o = t.by) == null ? void 0 : o.x) != null ? h : 0),
813
- y: i.position.current.y + ((g = (d = t.by) == null ? void 0 : d.y) != null ? g : 0)
814
- };
815
- i.position.current = D;
816
- });
817
- });
818
- }
819
- /**
820
- * Stops the current drag operation.
821
- *
822
- * @param args - Configuration for stopping the operation
823
- * @param args.event - The event that triggered the stop
824
- * @param args.canceled - Whether the operation was canceled
825
- * @remarks
826
- * This method:
827
- * - Dispatches a dragend event
828
- * - Allows suspension of the operation
829
- * - Handles cleanup of the operation state
830
- */
831
- stop(t = {}) {
832
- return k(() => {
833
- var e, s;
834
- const { dragOperation: i } = this.manager, { controller: r } = i;
835
- if (!r || r.signal.aborted) return;
836
- let n;
837
- const l = () => {
838
- const h = {
839
- resume: () => {
840
- },
841
- abort: () => {
842
- }
843
- };
844
- return n = new Promise((d, g) => {
845
- h.resume = d, h.abort = g;
846
- }), h;
847
- };
848
- r.abort();
849
- const o = () => {
850
- this.manager.renderer.rendering.then(() => {
851
- i.status.set(
852
- "dropped"
853
- /* Dropped */
854
- );
855
- const h = k(
856
- () => {
857
- var g;
858
- return ((g = i.source) == null ? void 0 : g.status) === "dropping";
859
- }
860
- ), d = () => {
861
- i.controller === r && (i.controller = void 0), i.reset();
862
- };
863
- if (h) {
864
- const { source: g } = i, a = Tt(() => {
865
- g?.status === "idle" && (a(), d());
866
- });
867
- } else
868
- this.manager.renderer.rendering.then(d);
869
- });
870
- };
871
- i.canceled = (e = t.canceled) != null ? e : !1, this.manager.monitor.dispatch("dragend", {
872
- nativeEvent: t.event,
873
- operation: i.snapshot(),
874
- canceled: (s = t.canceled) != null ? s : !1,
875
- suspend: l
876
- }), n ? n.then(o).catch(() => i.reset()) : o();
877
- });
878
- }
879
- }, Nt = class extends F {
880
- /**
881
- * Creates a new sensor instance.
882
- *
883
- * @param manager - The drag drop manager instance
884
- * @param options - Optional sensor configuration
885
- */
886
- constructor(t, e) {
887
- super(t, e), this.manager = t, this.options = e;
888
- }
889
- }, ss = class extends AbortController {
890
- constructor(t, e) {
891
- super(), this.constraints = t, this.onActivate = e, this.activated = !1;
892
- for (const s of t ?? [])
893
- s.controller = this;
894
- }
895
- onEvent(t) {
896
- var e;
897
- if (!this.activated)
898
- if ((e = this.constraints) != null && e.length)
899
- for (const s of this.constraints)
900
- s.onEvent(t);
901
- else
902
- this.activate(t);
903
- }
904
- activate(t) {
905
- this.activated || (this.activated = !0, this.onActivate(t));
906
- }
907
- abort(t) {
908
- this.activated = !1, super.abort(t);
909
- }
910
- }, st, is = class {
911
- constructor(t) {
912
- this.options = t, p(this, st);
913
- }
914
- set controller(t) {
915
- I(this, st, t), t.signal.addEventListener("abort", () => this.abort());
916
- }
917
- /**
918
- * Called when the activation is triggered.
919
- */
920
- activate(t) {
921
- var e;
922
- (e = v(this, st)) == null || e.activate(t);
923
- }
355
+ var Ze = class extends he {
356
+ constructor(e) {
357
+ super(e);
358
+ let t = (e, t) => e.map(({ id: e }) => e).join("") === t.map(({ id: e }) => e).join(""), n = [];
359
+ this.destroy = o(() => {
360
+ let { dragOperation: t, collisionObserver: r } = e;
361
+ t.status.initializing && (n = [], r.enable());
362
+ }, () => {
363
+ let { collisionObserver: i, monitor: a } = e, { collisions: o } = i;
364
+ if (i.isDisabled() || z.pendingIdChanges) return;
365
+ let s = W({ collisions: o });
366
+ if (a.dispatch("collision", s), s.defaultPrevented || t(o, n)) return;
367
+ n = o;
368
+ let [c] = o;
369
+ r(() => {
370
+ c?.id !== e.dragOperation.target?.id && (i.disable(), e.actions.setDropTarget(c?.id).then(() => {
371
+ i.enable();
372
+ }));
373
+ });
374
+ });
375
+ }
376
+ }, Qe = /* @__PURE__ */ ((e) => (e[e.Lowest = 0] = "Lowest", e[e.Low = 1] = "Low", e[e.Normal = 2] = "Normal", e[e.High = 3] = "High", e[e.Highest = 4] = "Highest", e))(Qe || {}), $e = /* @__PURE__ */ ((e) => (e[e.Collision = 0] = "Collision", e[e.ShapeIntersection = 1] = "ShapeIntersection", e[e.PointerIntersection = 2] = "PointerIntersection", e))($e || {}), et, tt, nt, rt, it, at, ot = [s], G, st;
377
+ at = [a], it = [a], rt = [a], nt = [a], tt = [a], et = [a];
378
+ var K = class {
379
+ constructor() {
380
+ C(G, 5, this), E(this, st, C(G, 8, this, "idle")), C(G, 11, this);
381
+ }
382
+ get current() {
383
+ return this.value;
384
+ }
385
+ get idle() {
386
+ return this.value === "idle";
387
+ }
388
+ get initializing() {
389
+ return this.value === "initializing";
390
+ }
391
+ get initialized() {
392
+ let { value: e } = this;
393
+ return e !== "idle" && e !== "initialization-pending";
394
+ }
395
+ get dragging() {
396
+ return this.value === "dragging";
397
+ }
398
+ get dropped() {
399
+ return this.value === "dropped";
400
+ }
401
+ set(e) {
402
+ this.value = e;
403
+ }
924
404
  };
925
- st = /* @__PURE__ */ new WeakMap();
926
- var Ut = class extends F {
927
- /**
928
- * Creates a new modifier instance.
929
- *
930
- * @param manager - The drag and drop manager that owns this modifier
931
- * @param options - Optional configuration for the modifier
932
- */
933
- constructor(t, e) {
934
- super(t, e), this.manager = t, this.options = e;
935
- }
936
- /**
937
- * Applies the modifier to the current drag operation.
938
- *
939
- * @param operation - The current state of the drag operation
940
- * @returns The transformed coordinates
941
- *
942
- * @remarks
943
- * Override this method to implement custom transformation logic.
944
- * The default implementation returns the original transform unchanged.
945
- */
946
- apply(t) {
947
- return t.transform;
948
- }
949
- }, Be = class {
950
- /**
951
- * Creates a new registry instance.
952
- *
953
- * @param manager - The drag and drop manager that owns this registry
954
- */
955
- constructor(t) {
956
- this.draggables = new Rt(), this.droppables = new Rt(), this.plugins = new dt(t), this.sensors = new dt(t), this.modifiers = new dt(t);
957
- }
958
- register(t, e) {
959
- if (t instanceof C)
960
- return this.draggables.register(t.id, t);
961
- if (t instanceof x)
962
- return this.droppables.register(t.id, t);
963
- if (t.prototype instanceof Ut)
964
- return this.modifiers.register(t, e);
965
- if (t.prototype instanceof Nt)
966
- return this.sensors.register(t, e);
967
- if (t.prototype instanceof F)
968
- return this.plugins.register(t, e);
969
- throw new Error("Invalid instance type");
970
- }
971
- unregister(t) {
972
- if (t instanceof ct)
973
- return t instanceof C ? this.draggables.unregister(t.id, t) : t instanceof x ? this.droppables.unregister(t.id, t) : () => {
974
- };
975
- if (t.prototype instanceof Ut)
976
- return this.modifiers.unregister(t);
977
- if (t.prototype instanceof Nt)
978
- return this.sensors.unregister(t);
979
- if (t.prototype instanceof F)
980
- return this.plugins.unregister(t);
981
- throw new Error("Invalid instance type");
982
- }
983
- /**
984
- * Destroys all registered entities and cleans up resources.
985
- *
986
- * @remarks
987
- * This method:
988
- * - Destroys all draggable and droppable entities
989
- * - Destroys all plugins, sensors, and modifiers
990
- * - Cleans up any associated resources
991
- */
992
- destroy() {
993
- this.draggables.destroy(), this.droppables.destroy(), this.plugins.destroy(), this.sensors.destroy(), this.modifiers.destroy();
994
- }
995
- }, Me, Oe, Ie, ke, Ee, Se, We, Pe, Ce, B, it, R, f, Ft, Lt, Vt, jt, qt, J;
996
- Ce = [b], Pe = [y], We = [y], Se = [y], Ee = [y], ke = [y], Ie = [b], Oe = [b], Me = [b];
997
- var W = class {
998
- /**
999
- * Creates a new drag operation instance.
1000
- *
1001
- * @param manager - The drag and drop manager that owns this operation
1002
- */
1003
- constructor(t) {
1004
- c(f, 5, this), p(this, B), p(this, it), p(this, R, new xe(
1005
- void 0,
1006
- (e, s) => e && s ? e.equals(s) : e === s
1007
- )), this.status = new z(), p(this, Ft, c(f, 8, this, !1)), c(f, 11, this), p(this, Lt, c(f, 12, this, null)), c(f, 15, this), p(this, Vt, c(f, 16, this, null)), c(f, 19, this), p(this, jt, c(f, 20, this, null)), c(f, 23, this), p(this, qt, c(f, 24, this, [])), c(f, 27, this), this.position = new ze({ x: 0, y: 0 }), p(this, J, { x: 0, y: 0 }), I(this, B, t);
1008
- }
1009
- get shape() {
1010
- const { current: t, initial: e, previous: s } = v(this, R);
1011
- return !t || !e ? null : { current: t, initial: e, previous: s };
1012
- }
1013
- /**
1014
- * Sets the shape of the dragged entity.
1015
- *
1016
- * @param value - The new shape or null to reset
1017
- */
1018
- set shape(t) {
1019
- t ? v(this, R).current = t : v(this, R).reset();
1020
- }
1021
- get source() {
1022
- var t;
1023
- const e = this.sourceIdentifier;
1024
- if (e == null) return null;
1025
- const s = v(this, B).registry.draggables.get(e);
1026
- return s && I(this, it, s), (t = s ?? v(this, it)) != null ? t : null;
1027
- }
1028
- get target() {
1029
- var t;
1030
- const e = this.targetIdentifier;
1031
- return e != null && (t = v(this, B).registry.droppables.get(e)) != null ? t : null;
1032
- }
1033
- get transform() {
1034
- const { x: t, y: e } = this.position.delta;
1035
- let s = { x: t, y: e };
1036
- for (const i of this.modifiers)
1037
- s = i.apply(mt(yt({}, this.snapshot()), {
1038
- transform: s
1039
- }));
1040
- return I(this, J, s), s;
1041
- }
1042
- /**
1043
- * Creates a snapshot of the current drag operation state.
1044
- *
1045
- * @returns An immutable snapshot of the current operation state
1046
- */
1047
- snapshot() {
1048
- return k(() => ({
1049
- source: this.source,
1050
- target: this.target,
1051
- activatorEvent: this.activatorEvent,
1052
- transform: v(this, J),
1053
- shape: this.shape ? ut(this.shape) : null,
1054
- position: ut(this.position),
1055
- status: ut(this.status),
1056
- canceled: this.canceled
1057
- }));
1058
- }
1059
- /**
1060
- * Resets the drag operation to its initial state.
1061
- *
1062
- * @remarks
1063
- * This method:
1064
- * - Sets status to idle
1065
- * - Clears source and target identifiers
1066
- * - Resets shape history
1067
- * - Resets position and transform
1068
- * - Clears modifiers
1069
- */
1070
- reset() {
1071
- rt(() => {
1072
- this.status.set(
1073
- "idle"
1074
- /* Idle */
1075
- ), this.sourceIdentifier = null, this.targetIdentifier = null, v(this, R).reset(), this.position.reset({ x: 0, y: 0 }), I(this, J, { x: 0, y: 0 }), this.modifiers = [];
1076
- });
1077
- }
405
+ G = b(null), st = /* @__PURE__ */ new WeakMap(), w(G, 4, "value", ot, K, st), w(G, 2, "current", at, K), w(G, 2, "idle", it, K), w(G, 2, "initializing", rt, K), w(G, 2, "initialized", nt, K), w(G, 2, "dragging", tt, K), w(G, 2, "dropped", et, K), S(G, K);
406
+ var ct = class {
407
+ constructor(e) {
408
+ this.manager = e;
409
+ }
410
+ setDragSource(e) {
411
+ let { dragOperation: t } = this.manager;
412
+ t.sourceIdentifier = typeof e == "string" || typeof e == "number" ? e : e.id;
413
+ }
414
+ setDropTarget(e) {
415
+ return r(() => {
416
+ let { dragOperation: t } = this.manager, n = e ?? null;
417
+ if (t.targetIdentifier === n) return Promise.resolve(!1);
418
+ t.targetIdentifier = n;
419
+ let r = W({ operation: t.snapshot() });
420
+ return t.status.dragging && this.manager.monitor.dispatch("dragover", r), this.manager.renderer.rendering.then(() => r.defaultPrevented);
421
+ });
422
+ }
423
+ start(t) {
424
+ return r(() => {
425
+ let { dragOperation: n } = this.manager;
426
+ if (t.source != null && this.setDragSource(t.source), !n.source) throw Error("Cannot start a drag operation without a drag source");
427
+ if (!n.status.idle) throw Error("Cannot start a drag operation while another is active");
428
+ let r = new AbortController(), { event: i, coordinates: a } = t;
429
+ e(() => {
430
+ n.status.set("initialization-pending"), n.shape = null, n.canceled = !1, n.activatorEvent = i ?? null, n.position.reset(a);
431
+ });
432
+ let o = W({ operation: n.snapshot() });
433
+ return this.manager.monitor.dispatch("beforedragstart", o), o.defaultPrevented ? (n.reset(), r.abort(), r) : (n.status.set("initializing"), n.controller = r, this.manager.renderer.rendering.then(() => {
434
+ if (r.signal.aborted) return;
435
+ let { status: t } = n;
436
+ t.current === "initializing" && e(() => {
437
+ n.status.set("dragging"), this.manager.monitor.dispatch("dragstart", {
438
+ nativeEvent: i,
439
+ operation: n.snapshot(),
440
+ cancelable: !1
441
+ });
442
+ });
443
+ }), r);
444
+ });
445
+ }
446
+ move(e) {
447
+ return r(() => {
448
+ let { dragOperation: t } = this.manager, { status: n, controller: r } = t;
449
+ if (!n.dragging || !r || r.signal.aborted) return;
450
+ let i = W({
451
+ nativeEvent: e.event,
452
+ operation: t.snapshot(),
453
+ by: e.by,
454
+ to: e.to
455
+ }, e.cancelable ?? !0);
456
+ (e.propagate ?? !0) && this.manager.monitor.dispatch("dragmove", i), queueMicrotask(() => {
457
+ if (i.defaultPrevented) return;
458
+ let n = e.to ?? {
459
+ x: t.position.current.x + (e.by?.x ?? 0),
460
+ y: t.position.current.y + (e.by?.y ?? 0)
461
+ };
462
+ t.position.current = n;
463
+ });
464
+ });
465
+ }
466
+ stop(e = {}) {
467
+ return r(() => {
468
+ let { dragOperation: n } = this.manager, { controller: i } = n;
469
+ if (!i || i.signal.aborted) return;
470
+ let a, o = () => {
471
+ let e = {
472
+ resume: () => {},
473
+ abort: () => {}
474
+ };
475
+ return a = new Promise((t, n) => {
476
+ e.resume = t, e.abort = n;
477
+ }), e;
478
+ };
479
+ i.abort();
480
+ let s = () => {
481
+ this.manager.renderer.rendering.then(() => {
482
+ n.status.set("dropped");
483
+ let e = r(() => n.source?.status === "dropping"), a = () => {
484
+ n.controller === i && (n.controller = void 0), n.reset();
485
+ };
486
+ if (e) {
487
+ let { source: e } = n, r = t(() => {
488
+ e?.status === "idle" && (r(), a());
489
+ });
490
+ } else this.manager.renderer.rendering.then(a);
491
+ });
492
+ };
493
+ n.canceled = e.canceled ?? !1, this.manager.monitor.dispatch("dragend", {
494
+ nativeEvent: e.event,
495
+ operation: n.snapshot(),
496
+ canceled: e.canceled ?? !1,
497
+ suspend: o
498
+ }), a ? a.then(s).catch(() => n.reset()) : s();
499
+ });
500
+ }
501
+ }, lt = class extends A {
502
+ constructor(e, t) {
503
+ super(e, t), this.manager = e, this.options = t;
504
+ }
505
+ }, ut = class extends AbortController {
506
+ constructor(e, t) {
507
+ super(), this.constraints = e, this.onActivate = t, this.activated = !1;
508
+ for (let t of e ?? []) t.controller = this;
509
+ }
510
+ onEvent(e) {
511
+ if (!this.activated) {
512
+ if (this.constraints?.length) for (let t of this.constraints) t.onEvent(e);
513
+ else this.activate(e);
514
+ }
515
+ }
516
+ activate(e) {
517
+ this.activated || (this.activated = !0, this.onActivate(e));
518
+ }
519
+ abort(e) {
520
+ this.activated = !1, super.abort(e);
521
+ }
522
+ }, q, dt = class {
523
+ constructor(e) {
524
+ this.options = e, E(this, q);
525
+ }
526
+ set controller(e) {
527
+ D(this, q, e), e.signal.addEventListener("abort", () => this.abort());
528
+ }
529
+ activate(e) {
530
+ var t;
531
+ (t = T(this, q)) == null || t.activate(e);
532
+ }
1078
533
  };
1079
- f = T(null);
1080
- B = /* @__PURE__ */ new WeakMap();
1081
- it = /* @__PURE__ */ new WeakMap();
1082
- R = /* @__PURE__ */ new WeakMap();
1083
- Ft = /* @__PURE__ */ new WeakMap();
1084
- Lt = /* @__PURE__ */ new WeakMap();
1085
- Vt = /* @__PURE__ */ new WeakMap();
1086
- jt = /* @__PURE__ */ new WeakMap();
1087
- qt = /* @__PURE__ */ new WeakMap();
1088
- J = /* @__PURE__ */ new WeakMap();
1089
- u(f, 2, "shape", Ce, W);
1090
- u(f, 4, "canceled", Pe, W, Ft);
1091
- u(f, 4, "activatorEvent", We, W, Lt);
1092
- u(f, 4, "sourceIdentifier", Se, W, Vt);
1093
- u(f, 4, "targetIdentifier", Ee, W, jt);
1094
- u(f, 4, "modifiers", ke, W, qt);
1095
- u(f, 2, "source", Ie, W);
1096
- u(f, 2, "target", Oe, W);
1097
- u(f, 2, "transform", Me, W);
1098
- V(f, W);
1099
- var Je = {
1100
- get rendering() {
1101
- return Promise.resolve();
1102
- }
534
+ q = /* @__PURE__ */ new WeakMap();
535
+ var ft = class extends A {
536
+ constructor(e, t) {
537
+ super(e, t), this.manager = e, this.options = t;
538
+ }
539
+ apply(e) {
540
+ return e.transform;
541
+ }
542
+ }, pt = class {
543
+ constructor(e) {
544
+ this.draggables = new Ee(), this.droppables = new Ee(), this.plugins = new M(e), this.sensors = new M(e), this.modifiers = new M(e);
545
+ }
546
+ register(e, t) {
547
+ if (e instanceof V) return this.draggables.register(e.id, e);
548
+ if (e instanceof U) return this.droppables.register(e.id, e);
549
+ if (e.prototype instanceof ft) return this.modifiers.register(e, t);
550
+ if (e.prototype instanceof lt) return this.sensors.register(e, t);
551
+ if (e.prototype instanceof A) return this.plugins.register(e, t);
552
+ throw Error("Invalid instance type");
553
+ }
554
+ unregister(e) {
555
+ if (e instanceof z) return e instanceof V ? this.draggables.unregister(e.id, e) : e instanceof U ? this.droppables.unregister(e.id, e) : () => {};
556
+ if (e.prototype instanceof ft) return this.modifiers.unregister(e);
557
+ if (e.prototype instanceof lt) return this.sensors.unregister(e);
558
+ if (e.prototype instanceof A) return this.plugins.unregister(e);
559
+ throw Error("Invalid instance type");
560
+ }
561
+ destroy() {
562
+ this.draggables.destroy(), this.droppables.destroy(), this.plugins.destroy(), this.sensors.destroy(), this.modifiers.destroy();
563
+ }
564
+ }, mt, ht, gt, _t, vt, yt, bt, xt, St = [a], J, Y, X, Z, Ct, wt, Tt, Et, Dt, Q;
565
+ xt = [s], bt = [s], yt = [s], vt = [s], _t = [s], gt = [a], ht = [a], mt = [a];
566
+ var $ = class {
567
+ constructor(e) {
568
+ C(Z, 5, this), E(this, J), E(this, Y), E(this, X, new i(void 0, (e, t) => e && t ? e.equals(t) : e === t)), this.status = new K(), E(this, Ct, C(Z, 8, this, !1)), C(Z, 11, this), E(this, wt, C(Z, 12, this, null)), C(Z, 15, this), E(this, Tt, C(Z, 16, this, null)), C(Z, 19, this), E(this, Et, C(Z, 20, this, null)), C(Z, 23, this), E(this, Dt, C(Z, 24, this, [])), C(Z, 27, this), this.position = new l({
569
+ x: 0,
570
+ y: 0
571
+ }), E(this, Q, {
572
+ x: 0,
573
+ y: 0
574
+ }), D(this, J, e);
575
+ }
576
+ get shape() {
577
+ let { current: e, initial: t, previous: n } = T(this, X);
578
+ return !e || !t ? null : {
579
+ current: e,
580
+ initial: t,
581
+ previous: n
582
+ };
583
+ }
584
+ set shape(e) {
585
+ e ? T(this, X).current = e : T(this, X).reset();
586
+ }
587
+ get source() {
588
+ let e = this.sourceIdentifier;
589
+ if (e == null) return null;
590
+ let t = T(this, J).registry.draggables.get(e);
591
+ return t && D(this, Y, t), t ?? T(this, Y) ?? null;
592
+ }
593
+ get target() {
594
+ let e = this.targetIdentifier;
595
+ return e == null ? null : T(this, J).registry.droppables.get(e) ?? null;
596
+ }
597
+ get transform() {
598
+ let { x: e, y: t } = this.position.delta, n = {
599
+ x: e,
600
+ y: t
601
+ };
602
+ for (let e of this.modifiers) n = e.apply(y(v({}, this.snapshot()), { transform: n }));
603
+ return D(this, Q, n), n;
604
+ }
605
+ snapshot() {
606
+ return r(() => ({
607
+ source: this.source,
608
+ target: this.target,
609
+ activatorEvent: this.activatorEvent,
610
+ transform: T(this, Q),
611
+ shape: this.shape ? c(this.shape) : null,
612
+ position: c(this.position),
613
+ status: c(this.status),
614
+ canceled: this.canceled
615
+ }));
616
+ }
617
+ reset() {
618
+ e(() => {
619
+ this.status.set("idle"), this.sourceIdentifier = null, this.targetIdentifier = null, T(this, X).reset(), this.position.reset({
620
+ x: 0,
621
+ y: 0
622
+ }), D(this, Q, {
623
+ x: 0,
624
+ y: 0
625
+ }), this.modifiers = [];
626
+ });
627
+ }
1103
628
  };
1104
- function ht(t, e) {
1105
- return typeof t == "function" ? t(e) : t ?? e;
629
+ Z = b(null), J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), w(Z, 2, "shape", St, $), w(Z, 4, "canceled", xt, $, Ct), w(Z, 4, "activatorEvent", bt, $, wt), w(Z, 4, "sourceIdentifier", yt, $, Tt), w(Z, 4, "targetIdentifier", vt, $, Et), w(Z, 4, "modifiers", _t, $, Dt), w(Z, 2, "source", gt, $), w(Z, 2, "target", ht, $), w(Z, 2, "transform", mt, $), S(Z, $);
630
+ var Ot = { get rendering() {
631
+ return Promise.resolve();
632
+ } };
633
+ function kt(e, t) {
634
+ return typeof e == "function" ? e(t) : e ?? t;
1106
635
  }
1107
- var rs = class {
1108
- /**
1109
- * Creates a new drag and drop manager instance.
1110
- *
1111
- * @param config - Optional configuration for plugins, sensors, modifiers, and renderer
1112
- */
1113
- constructor(e) {
1114
- this.destroy = () => {
1115
- this.dragOperation.status.idle || this.actions.stop({ canceled: !0 }), this.dragOperation.modifiers.forEach((D) => D.destroy()), this.registry.destroy(), this.collisionObserver.destroy();
1116
- };
1117
- var s;
1118
- const i = e ?? {}, r = ht(i.plugins, []), n = ht(i.sensors, []), l = ht(i.modifiers, []), o = (s = i.renderer) != null ? s : Je, h = new Ue(this), d = new Be(this);
1119
- this.registry = d, this.monitor = h, this.renderer = o, this.actions = new Ke(this), this.dragOperation = new W(this), this.collisionObserver = new Re(this), this.plugins = [Te, ...r], this.modifiers = l, this.sensors = n;
1120
- const { destroy: g } = this, a = ot(() => {
1121
- var D, m, A;
1122
- const X = k(() => this.dragOperation.modifiers), $ = this.modifiers;
1123
- for (const j of X)
1124
- $.includes(j) || j.destroy();
1125
- this.dragOperation.modifiers = (A = (m = (D = this.dragOperation.source) == null ? void 0 : D.modifiers) == null ? void 0 : m.map((j) => {
1126
- const { plugin: M, options: G } = at(j);
1127
- return new M(this, G);
1128
- })) != null ? A : $;
1129
- });
1130
- this.destroy = () => {
1131
- a(), g();
1132
- };
1133
- }
1134
- /**
1135
- * Gets the list of active plugins.
1136
- *
1137
- * @returns Array of active plugin instances
1138
- */
1139
- get plugins() {
1140
- return this.registry.plugins.values;
1141
- }
1142
- /**
1143
- * Sets the list of plugins to be used by the manager.
1144
- *
1145
- * @param plugins - Array of plugin constructors or instances
1146
- */
1147
- set plugins(e) {
1148
- this.registry.plugins.values = e;
1149
- }
1150
- /**
1151
- * Gets the list of active modifiers.
1152
- *
1153
- * @returns Array of active modifier instances
1154
- */
1155
- get modifiers() {
1156
- return this.registry.modifiers.values;
1157
- }
1158
- /**
1159
- * Sets the list of modifiers to be used by the manager.
1160
- *
1161
- * @param modifiers - Array of modifier constructors or instances
1162
- */
1163
- set modifiers(e) {
1164
- this.registry.modifiers.values = e;
1165
- }
1166
- /**
1167
- * Gets the list of active sensors.
1168
- *
1169
- * @returns Array of active sensor instances
1170
- */
1171
- get sensors() {
1172
- return this.registry.sensors.values;
1173
- }
1174
- /**
1175
- * Sets the list of sensors to be used by the manager.
1176
- *
1177
- * @param sensors - Array of sensor constructors or instances
1178
- */
1179
- set sensors(e) {
1180
- this.registry.sensors.values = e;
1181
- }
1182
- };
1183
- export {
1184
- is as ActivationConstraint,
1185
- ss as ActivationController,
1186
- $e as CollisionPriority,
1187
- Ge as CollisionType,
1188
- Zt as CorePlugin,
1189
- rs as DragDropManager,
1190
- z as DragOperationStatus,
1191
- C as Draggable,
1192
- x as Droppable,
1193
- Ut as Modifier,
1194
- F as Plugin,
1195
- dt as PluginRegistry,
1196
- Nt as Sensor,
1197
- Ze as configurator,
1198
- Xt as configure,
1199
- at as descriptor,
1200
- ht as resolveCustomizable,
1201
- He as sortCollisions
636
+ var At = class {
637
+ constructor(e) {
638
+ this.destroy = () => {
639
+ this.dragOperation.status.idle || this.actions.stop({ canceled: !0 }), this.dragOperation.modifiers.forEach((e) => e.destroy()), this.registry.destroy(), this.collisionObserver.destroy();
640
+ };
641
+ let t = e ?? {}, n = kt(t.plugins, []), i = kt(t.sensors, []), a = kt(t.modifiers, []), s = t.renderer ?? Ot, c = new Xe(this), l = new pt(this);
642
+ this.registry = l, this.monitor = c, this.renderer = s, this.actions = new ct(this), this.dragOperation = new $(this), this.collisionObserver = new _e(this), this.plugins = [Ze, ...n], this.modifiers = a, this.sensors = i;
643
+ let { destroy: u } = this, ee = o(() => {
644
+ let e = r(() => this.dragOperation.modifiers), t = this.modifiers;
645
+ for (let n of e) t.includes(n) || n.destroy();
646
+ this.dragOperation.modifiers = (this.dragOperation.source?.modifiers)?.map((e) => {
647
+ let { plugin: t, options: n } = O(e);
648
+ return new t(this, n);
649
+ }) ?? t;
650
+ });
651
+ this.destroy = () => {
652
+ ee(), u();
653
+ };
654
+ }
655
+ get plugins() {
656
+ return this.registry.plugins.values;
657
+ }
658
+ set plugins(e) {
659
+ this.registry.plugins.values = e;
660
+ }
661
+ get modifiers() {
662
+ return this.registry.modifiers.values;
663
+ }
664
+ set modifiers(e) {
665
+ this.registry.modifiers.values = e;
666
+ }
667
+ get sensors() {
668
+ return this.registry.sensors.values;
669
+ }
670
+ set sensors(e) {
671
+ this.registry.sensors.values = e;
672
+ }
1202
673
  };
674
+ //#endregion
675
+ export { dt as ActivationConstraint, ut as ActivationController, Qe as CollisionPriority, $e as CollisionType, he as CorePlugin, At as DragDropManager, K as DragOperationStatus, V as Draggable, U as Droppable, ft as Modifier, A as Plugin, M as PluginRegistry, lt as Sensor, de as configurator, ue as configure, O as descriptor, kt as resolveCustomizable, ge as sortCollisions };