@caspeco/casper-ui-library 10.4.0 → 10.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (842) 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/info-icon.js +5 -5
  181. package/dist/components/icon/icons/inheritance-icon.js +5 -5
  182. package/dist/components/icon/icons/just-eat-icon.js +5 -5
  183. package/dist/components/icon/icons/karma-icon.js +5 -5
  184. package/dist/components/icon/icons/key-command-icon.js +5 -5
  185. package/dist/components/icon/icons/key-enter-icon.js +5 -5
  186. package/dist/components/icon/icons/key-icon.js +5 -5
  187. package/dist/components/icon/icons/key-option-icon.js +5 -5
  188. package/dist/components/icon/icons/language-icon.js +5 -5
  189. package/dist/components/icon/icons/link-broken-icon.js +5 -5
  190. package/dist/components/icon/icons/link-external-icon.js +5 -5
  191. package/dist/components/icon/icons/link-icon.js +5 -5
  192. package/dist/components/icon/icons/list-ol-icon.js +5 -5
  193. package/dist/components/icon/icons/list-ul-icon.js +5 -5
  194. package/dist/components/icon/icons/loading-icon.js +5 -5
  195. package/dist/components/icon/icons/location-icon.js +5 -5
  196. package/dist/components/icon/icons/lock-icon.js +5 -5
  197. package/dist/components/icon/icons/log-in-icon.js +5 -5
  198. package/dist/components/icon/icons/log-out-icon.js +5 -5
  199. package/dist/components/icon/icons/map-icon.js +5 -5
  200. package/dist/components/icon/icons/maximize-icon.js +5 -5
  201. package/dist/components/icon/icons/members-icon.js +5 -5
  202. package/dist/components/icon/icons/menu-hide-icon.js +5 -5
  203. package/dist/components/icon/icons/menu-icon.js +5 -5
  204. package/dist/components/icon/icons/menu-show-icon.js +5 -5
  205. package/dist/components/icon/icons/message-add-icon.js +5 -5
  206. package/dist/components/icon/icons/message-icon.js +5 -5
  207. package/dist/components/icon/icons/message-lines-icon.js +5 -5
  208. package/dist/components/icon/icons/minimize-icon.js +5 -5
  209. package/dist/components/icon/icons/minimize-window-icon.js +5 -5
  210. package/dist/components/icon/icons/mobile-rotate-icon.js +5 -5
  211. package/dist/components/icon/icons/module-accounting-icon.js +5 -5
  212. package/dist/components/icon/icons/module-ai-forecast-icon.js +5 -5
  213. package/dist/components/icon/icons/module-app-icon.js +5 -5
  214. package/dist/components/icon/icons/module-articles-icon.js +5 -5
  215. package/dist/components/icon/icons/module-benchmark-icon.js +5 -5
  216. package/dist/components/icon/icons/module-booking-icon.js +5 -5
  217. package/dist/components/icon/icons/module-cai-icon.js +5 -5
  218. package/dist/components/icon/icons/module-campaigns-icon.js +5 -5
  219. package/dist/components/icon/icons/module-cashier-icon.js +5 -5
  220. package/dist/components/icon/icons/module-communication-icon.js +5 -5
  221. package/dist/components/icon/icons/module-copilot-icon.js +5 -5
  222. package/dist/components/icon/icons/module-dashboard-icon.js +5 -5
  223. package/dist/components/icon/icons/module-document-icon.js +5 -5
  224. package/dist/components/icon/icons/module-employees-icon.js +5 -5
  225. package/dist/components/icon/icons/module-feed-icon.js +5 -5
  226. package/dist/components/icon/icons/module-history-icon.js +5 -5
  227. package/dist/components/icon/icons/module-home-icon.js +5 -5
  228. package/dist/components/icon/icons/module-insights-icon.js +5 -5
  229. package/dist/components/icon/icons/module-kds-icon.js +5 -5
  230. package/dist/components/icon/icons/module-members-icon.js +5 -5
  231. package/dist/components/icon/icons/module-menus-icon.js +5 -5
  232. package/dist/components/icon/icons/module-my-city-icon.js +5 -5
  233. package/dist/components/icon/icons/module-notification-center-icon.js +5 -5
  234. package/dist/components/icon/icons/module-online-order-icon.js +5 -5
  235. package/dist/components/icon/icons/module-organisation-icon.js +5 -5
  236. package/dist/components/icon/icons/module-pos-icon.js +5 -5
  237. package/dist/components/icon/icons/module-pulse-icon.js +5 -5
  238. package/dist/components/icon/icons/module-result-icon.js +5 -5
  239. package/dist/components/icon/icons/module-salary-icon.js +5 -5
  240. package/dist/components/icon/icons/module-schedule-icon.js +5 -5
  241. package/dist/components/icon/icons/module-settings-alt-icon.js +5 -5
  242. package/dist/components/icon/icons/module-settings-icon.js +5 -5
  243. package/dist/components/icon/icons/module-support-icon.js +5 -5
  244. package/dist/components/icon/icons/module-survey-icon.js +5 -5
  245. package/dist/components/icon/icons/module-table-map-icon.js +6 -6
  246. package/dist/components/icon/icons/module-tablet-icon.js +5 -5
  247. package/dist/components/icon/icons/module-time-icon.js +5 -5
  248. package/dist/components/icon/icons/module-timeline-icon.js +5 -5
  249. package/dist/components/icon/icons/module-tip-icon.js +5 -5
  250. package/dist/components/icon/icons/module-to-do-icon.js +5 -5
  251. package/dist/components/icon/icons/module-tools-icon.js +5 -5
  252. package/dist/components/icon/icons/module-top-list-icon.js +5 -5
  253. package/dist/components/icon/icons/module-web-charts-icon.js +5 -5
  254. package/dist/components/icon/icons/module-web-icon.js +5 -5
  255. package/dist/components/icon/icons/more-horizontal-icon.js +5 -5
  256. package/dist/components/icon/icons/more-vertical-icon.js +5 -5
  257. package/dist/components/icon/icons/nfc-icon.js +5 -5
  258. package/dist/components/icon/icons/no-cart-icon.js +5 -5
  259. package/dist/components/icon/icons/note-icon.js +5 -5
  260. package/dist/components/icon/icons/number-icon.js +6 -6
  261. package/dist/components/icon/icons/open-modal-icon.js +5 -5
  262. package/dist/components/icon/icons/parking-icon.js +5 -5
  263. package/dist/components/icon/icons/party-horn-icon.js +5 -5
  264. package/dist/components/icon/icons/paste-icon.js +5 -5
  265. package/dist/components/icon/icons/pause-icon.js +5 -5
  266. package/dist/components/icon/icons/payment-card-icon.js +5 -5
  267. package/dist/components/icon/icons/payment-cash-icon.js +5 -5
  268. package/dist/components/icon/icons/payment-generic-icon.js +5 -5
  269. package/dist/components/icon/icons/payment-giftcard-icon.js +5 -5
  270. package/dist/components/icon/icons/payment-hotel-icon.js +5 -5
  271. package/dist/components/icon/icons/payment-invoice-icon.js +5 -5
  272. package/dist/components/icon/icons/percentage-icon.js +5 -5
  273. package/dist/components/icon/icons/phone-icon.js +5 -5
  274. package/dist/components/icon/icons/pin-icon.js +5 -5
  275. package/dist/components/icon/icons/pin-map-icon.js +5 -5
  276. package/dist/components/icon/icons/play-icon.js +5 -5
  277. package/dist/components/icon/icons/preview-icon.js +5 -5
  278. package/dist/components/icon/icons/print-icon.js +5 -5
  279. package/dist/components/icon/icons/privacy-icon.js +5 -5
  280. package/dist/components/icon/icons/product-admin-icon.js +5 -5
  281. package/dist/components/icon/icons/product-analytics-icon.js +5 -5
  282. package/dist/components/icon/icons/product-booking-icon.js +5 -5
  283. package/dist/components/icon/icons/product-checkout-icon.js +5 -5
  284. package/dist/components/icon/icons/product-my-pages-icon.js +5 -5
  285. package/dist/components/icon/icons/product-staff-icon.js +5 -5
  286. package/dist/components/icon/icons/puck-icon.js +5 -5
  287. package/dist/components/icon/icons/qr-code-icon.js +5 -5
  288. package/dist/components/icon/icons/question-icon.js +5 -5
  289. package/dist/components/icon/icons/radio-icon.js +5 -5
  290. package/dist/components/icon/icons/receipt-icon.js +5 -5
  291. package/dist/components/icon/icons/redo-icon.js +5 -5
  292. package/dist/components/icon/icons/refund-icon.js +5 -5
  293. package/dist/components/icon/icons/remove-icon.js +5 -5
  294. package/dist/components/icon/icons/replace-icon.js +5 -5
  295. package/dist/components/icon/icons/schedule-icon.js +5 -5
  296. package/dist/components/icon/icons/search-icon.js +5 -5
  297. package/dist/components/icon/icons/select-icon.js +4 -4
  298. package/dist/components/icon/icons/send-icon.js +5 -5
  299. package/dist/components/icon/icons/share-icon.js +5 -5
  300. package/dist/components/icon/icons/show-icon.js +5 -5
  301. package/dist/components/icon/icons/shuffle-icon.js +5 -5
  302. package/dist/components/icon/icons/sidebar-hide-icon.js +4 -4
  303. package/dist/components/icon/icons/sidebar-left-icon.js +4 -4
  304. package/dist/components/icon/icons/sidebar-right-icon.js +5 -5
  305. package/dist/components/icon/icons/sidebar-show-icon.js +5 -5
  306. package/dist/components/icon/icons/sliders-icon.js +5 -5
  307. package/dist/components/icon/icons/slightly-sad-icon.js +5 -5
  308. package/dist/components/icon/icons/smile-icon.js +5 -5
  309. package/dist/components/icon/icons/sort-asc-icon.js +5 -5
  310. package/dist/components/icon/icons/sort-desc-icon.js +5 -5
  311. package/dist/components/icon/icons/split-icon.js +5 -5
  312. package/dist/components/icon/icons/status-icon.js +5 -5
  313. package/dist/components/icon/icons/stop-icon.js +5 -5
  314. package/dist/components/icon/icons/submenu-icon.js +5 -5
  315. package/dist/components/icon/icons/success-icon.js +5 -5
  316. package/dist/components/icon/icons/swap-icon.js +5 -5
  317. package/dist/components/icon/icons/swatch-icon.js +5 -5
  318. package/dist/components/icon/icons/sweat-icon.js +5 -5
  319. package/dist/components/icon/icons/table-icon.js +5 -5
  320. package/dist/components/icon/icons/table-map-icon.js +5 -5
  321. package/dist/components/icon/icons/take-away-dot-com-icon.js +5 -5
  322. package/dist/components/icon/icons/take-away-icon.js +5 -5
  323. package/dist/components/icon/icons/talk-icon.js +5 -5
  324. package/dist/components/icon/icons/thumbtack-icon.js +5 -5
  325. package/dist/components/icon/icons/time-icon.js +5 -5
  326. package/dist/components/icon/icons/timeline-icon.js +5 -5
  327. package/dist/components/icon/icons/tip-icon.js +5 -5
  328. package/dist/components/icon/icons/title-icon.js +5 -5
  329. package/dist/components/icon/icons/translate-icon.js +5 -5
  330. package/dist/components/icon/icons/tree-view-collapse-icon.js +4 -4
  331. package/dist/components/icon/icons/tree-view-expand-icon.js +4 -4
  332. package/dist/components/icon/icons/tree-view-last-icon.js +4 -4
  333. package/dist/components/icon/icons/trend-down-icon.js +5 -5
  334. package/dist/components/icon/icons/trend-up-icon.js +5 -5
  335. package/dist/components/icon/icons/triangle-warning-icon.js +5 -5
  336. package/dist/components/icon/icons/trivec-icon.js +6 -6
  337. package/dist/components/icon/icons/uber-eats-icon.js +5 -5
  338. package/dist/components/icon/icons/undo-icon.js +5 -5
  339. package/dist/components/icon/icons/unlock-icon.js +5 -5
  340. package/dist/components/icon/icons/unwrap-content-icon.js +5 -5
  341. package/dist/components/icon/icons/up-icon.js +5 -5
  342. package/dist/components/icon/icons/user-group-icon.js +5 -5
  343. package/dist/components/icon/icons/user-icon.js +5 -5
  344. package/dist/components/icon/icons/user-permissions-icon.js +5 -5
  345. package/dist/components/icon/icons/user-wait-icon.js +5 -5
  346. package/dist/components/icon/icons/users-icon.js +5 -5
  347. package/dist/components/icon/icons/version-control-icon.js +5 -5
  348. package/dist/components/icon/icons/volume-high-icon.js +5 -5
  349. package/dist/components/icon/icons/volume-icon.js +5 -5
  350. package/dist/components/icon/icons/volume-low-icon.js +5 -5
  351. package/dist/components/icon/icons/volume-off-icon.js +5 -5
  352. package/dist/components/icon/icons/warning-icon.js +5 -5
  353. package/dist/components/icon/icons/waste-icon.js +5 -5
  354. package/dist/components/icon/icons/wifi-icon.js +5 -5
  355. package/dist/components/icon/icons/wifi-off-icon.js +5 -5
  356. package/dist/components/icon/icons/wolt-icon.js +5 -5
  357. package/dist/components/icon/icons/wrap-content-icon.js +5 -5
  358. package/dist/components/icon-button/icon-button.js +37 -39
  359. package/dist/components/image/image.js +12 -14
  360. package/dist/components/image-upload/image-cropper.helper.js +74 -82
  361. package/dist/components/image-upload/image-cropper.js +156 -183
  362. package/dist/components/image-upload/image-upload-dropzone.js +134 -112
  363. package/dist/components/image-upload/image-upload-helper.js +15 -19
  364. package/dist/components/image-upload/image-upload-icons.js +52 -20
  365. package/dist/components/image-upload/image-upload-modal.js +131 -106
  366. package/dist/components/image-upload/image-upload.js +96 -86
  367. package/dist/components/image-upload/translations.js +65 -65
  368. package/dist/components/image-upload/types.js +6 -4
  369. package/dist/components/input/helper.js +18 -29
  370. package/dist/components/input/input-addon-recipe.js +37 -43
  371. package/dist/components/input/input-recipe.js +124 -133
  372. package/dist/components/input/input.js +78 -83
  373. package/dist/components/link/link-recipe.js +18 -22
  374. package/dist/components/link/link.js +14 -14
  375. package/dist/components/list/list-item.js +15 -15
  376. package/dist/components/list/list.js +19 -20
  377. package/dist/components/menu/helper.js +12 -16
  378. package/dist/components/menu/menu-box-button.js +22 -18
  379. package/dist/components/menu/menu-button.js +18 -16
  380. package/dist/components/menu/menu-divider.js +31 -28
  381. package/dist/components/menu/menu-group.js +138 -142
  382. package/dist/components/menu/menu-icon-button.js +13 -11
  383. package/dist/components/menu/menu-item.js +44 -45
  384. package/dist/components/menu/menu-list.js +14 -15
  385. package/dist/components/menu/menu-recipe.js +67 -81
  386. package/dist/components/menu/menu.js +34 -41
  387. package/dist/components/message/message.js +52 -38
  388. package/dist/components/modal/modal-body-context.js +6 -7
  389. package/dist/components/modal/modal-body.js +17 -17
  390. package/dist/components/modal/modal-close-button.js +23 -18
  391. package/dist/components/modal/modal-footer.js +29 -32
  392. package/dist/components/modal/modal-header.js +17 -17
  393. package/dist/components/modal/modal-recipe.js +110 -141
  394. package/dist/components/modal/modal.js +54 -58
  395. package/dist/components/navigation-list/navigation-list-item.js +76 -88
  396. package/dist/components/navigation-list/navigation-list.js +23 -17
  397. package/dist/components/paginator/paginator-recipe.js +34 -40
  398. package/dist/components/paginator/paginator.js +65 -70
  399. package/dist/components/paginator/translations.js +35 -35
  400. package/dist/components/phone-input/country-data.d.ts +1 -1
  401. package/dist/components/phone-input/country-data.d.ts.map +1 -1
  402. package/dist/components/phone-input/country-data.js +31 -36
  403. package/dist/components/phone-input/country-list.d.ts +1 -1
  404. package/dist/components/phone-input/country-list.d.ts.map +1 -1
  405. package/dist/components/phone-input/country-list.js +46 -25
  406. package/dist/components/phone-input/country-selector.d.ts +1 -1
  407. package/dist/components/phone-input/country-selector.d.ts.map +1 -1
  408. package/dist/components/phone-input/country-selector.js +167 -115
  409. package/dist/components/phone-input/phone-input-helpers.d.ts +1 -1
  410. package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -1
  411. package/dist/components/phone-input/phone-input-helpers.js +91 -119
  412. package/dist/components/phone-input/phone-input.js +47 -42
  413. package/dist/components/phone-input/translations.js +53 -53
  414. package/dist/components/phone-input/types.d.ts +1 -1
  415. package/dist/components/phone-input/types.d.ts.map +1 -1
  416. package/dist/components/phone-input/use-phone-input.d.ts +1 -1
  417. package/dist/components/phone-input/use-phone-input.d.ts.map +1 -1
  418. package/dist/components/phone-input/use-phone-input.js +110 -137
  419. package/dist/components/quantity-button/minus-button.js +18 -16
  420. package/dist/components/quantity-button/plus-button.js +18 -16
  421. package/dist/components/quantity-button/quantity-button.js +72 -40
  422. package/dist/components/radio/check-icon.js +5 -5
  423. package/dist/components/radio/hover-styles.js +21 -36
  424. package/dist/components/radio/radio-group-context.js +5 -6
  425. package/dist/components/radio/radio-group-recipe.js +124 -142
  426. package/dist/components/radio/radio-group.js +30 -28
  427. package/dist/components/radio/radio.js +72 -55
  428. package/dist/components/radio-card/hover-styles.js +21 -36
  429. package/dist/components/radio-card/radio-card-group.js +24 -25
  430. package/dist/components/radio-card/radio-card.js +87 -67
  431. package/dist/components/rich-text-editor/boolean-control.js +51 -54
  432. package/dist/components/rich-text-editor/extensions.js +39 -34
  433. package/dist/components/rich-text-editor/index.js +26 -22
  434. package/dist/components/rich-text-editor/rich-text-editor-context.js +9 -11
  435. package/dist/components/rich-text-editor/rich-text-editor-control.js +290 -284
  436. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +71 -83
  437. package/dist/components/rich-text-editor/rich-text-editor.js +72 -69
  438. package/dist/components/rich-text-editor/rich-text-renderer.js +32 -32
  439. package/dist/components/rich-text-editor/translations.js +119 -119
  440. package/dist/components/rich-text-editor/use-rich-text-editor.js +22 -29
  441. package/dist/components/segmented-control/segmented-control-item.js +24 -25
  442. package/dist/components/segmented-control/segmented-control.js +49 -40
  443. package/dist/components/select/select-recipe.js +91 -106
  444. package/dist/components/select/select.js +27 -29
  445. package/dist/components/skeleton/skeleton-text.js +18 -19
  446. package/dist/components/skeleton/skeleton.js +19 -20
  447. package/dist/components/spinner/spinner.js +44 -28
  448. package/dist/components/stack/stack.js +18 -18
  449. package/dist/components/stepper/check-icon.js +5 -5
  450. package/dist/components/stepper/step-context.js +5 -5
  451. package/dist/components/stepper/step.js +111 -106
  452. package/dist/components/stepper/stepper.js +42 -43
  453. package/dist/components/stepper/times-icon.js +5 -5
  454. package/dist/components/switch/hover-styles.js +30 -44
  455. package/dist/components/switch/switch-recipe.js +76 -84
  456. package/dist/components/switch/switch.d.ts +3 -3
  457. package/dist/components/switch/switch.d.ts.map +1 -1
  458. package/dist/components/switch/switch.js +30 -31
  459. package/dist/components/switch/types.d.ts +4 -2
  460. package/dist/components/switch/types.d.ts.map +1 -1
  461. package/dist/components/table/helper.d.ts +6 -0
  462. package/dist/components/table/helper.d.ts.map +1 -1
  463. package/dist/components/table/helper.js +29 -9
  464. package/dist/components/table/index.d.ts +1 -1
  465. package/dist/components/table/index.d.ts.map +1 -1
  466. package/dist/components/table/table-cell.d.ts.map +1 -1
  467. package/dist/components/table/table-cell.js +136 -122
  468. package/dist/components/table/table-column-resize-handle.d.ts +12 -0
  469. package/dist/components/table/table-column-resize-handle.d.ts.map +1 -0
  470. package/dist/components/table/table-column-resize-handle.js +69 -0
  471. package/dist/components/table/table-content.d.ts.map +1 -1
  472. package/dist/components/table/table-content.js +174 -98
  473. package/dist/components/table/table-context-provider.d.ts +7 -2
  474. package/dist/components/table/table-context-provider.d.ts.map +1 -1
  475. package/dist/components/table/table-context-provider.js +203 -151
  476. package/dist/components/table/table-context.d.ts +24 -0
  477. package/dist/components/table/table-context.d.ts.map +1 -1
  478. package/dist/components/table/table-context.js +18 -11
  479. package/dist/components/table/table-filter.js +170 -118
  480. package/dist/components/table/table-header-dropdown.js +131 -89
  481. package/dist/components/table/table-header-row.d.ts.map +1 -1
  482. package/dist/components/table/table-header-row.js +202 -140
  483. package/dist/components/table/table-recipe.d.ts.map +1 -1
  484. package/dist/components/table/table-recipe.js +75 -96
  485. package/dist/components/table/table-row-expand-toggle-button.js +28 -35
  486. package/dist/components/table/table-row.d.ts.map +1 -1
  487. package/dist/components/table/table-row.js +51 -41
  488. package/dist/components/table/table-toolbar-actions.js +19 -19
  489. package/dist/components/table/table-toolbar-add-button.js +18 -13
  490. package/dist/components/table/table-toolbar-search.js +17 -12
  491. package/dist/components/table/table-toolbar-settings.js +180 -133
  492. package/dist/components/table/table-toolbar.js +72 -51
  493. package/dist/components/table/table.composition.d.ts +1 -0
  494. package/dist/components/table/table.composition.d.ts.map +1 -1
  495. package/dist/components/table/table.constants.d.ts +4 -0
  496. package/dist/components/table/table.constants.d.ts.map +1 -1
  497. package/dist/components/table/table.constants.js +9 -4
  498. package/dist/components/table/table.d.ts +1 -1
  499. package/dist/components/table/table.d.ts.map +1 -1
  500. package/dist/components/table/table.js +41 -37
  501. package/dist/components/table/translations.d.ts +7 -0
  502. package/dist/components/table/translations.d.ts.map +1 -1
  503. package/dist/components/table/translations.js +199 -194
  504. package/dist/components/table/types.d.ts +33 -2
  505. package/dist/components/table/types.d.ts.map +1 -1
  506. package/dist/components/tabs/tab-list.js +16 -17
  507. package/dist/components/tabs/tab-panel.js +14 -14
  508. package/dist/components/tabs/tab-panels.js +15 -15
  509. package/dist/components/tabs/tab-with-image.js +60 -53
  510. package/dist/components/tabs/tab.js +26 -22
  511. package/dist/components/tabs/tabs-recipe.js +96 -116
  512. package/dist/components/tabs/tabs.js +25 -24
  513. package/dist/components/tag/tag-recipe.js +225 -252
  514. package/dist/components/tag/tag.js +121 -62
  515. package/dist/components/text/text-recipe.js +3 -8
  516. package/dist/components/text/text.js +26 -27
  517. package/dist/components/textarea/textarea-recipe.js +90 -96
  518. package/dist/components/textarea/textarea.js +19 -19
  519. package/dist/components/toaster/toast-store.d.ts +2 -2
  520. package/dist/components/toaster/toast-store.d.ts.map +1 -1
  521. package/dist/components/toaster/toast-store.js +25 -32
  522. package/dist/components/toaster/toaster.js +39 -34
  523. package/dist/components/toggle-button/toggle-button.js +23 -25
  524. package/dist/components/toggle-button/use-button-children.js +36 -35
  525. package/dist/components/tooltip/tooltip.js +43 -47
  526. package/dist/hooks/use-color-mode.js +17 -22
  527. package/dist/hooks/use-disclosure.js +10 -13
  528. package/dist/hooks/use-measured-width.js +21 -21
  529. package/dist/hooks/use-remove-attributes.js +25 -24
  530. package/dist/index.js +396 -802
  531. package/dist/node_modules/@dnd-kit/abstract/index.js +658 -1185
  532. package/dist/node_modules/@dnd-kit/collision/dist/index.js +51 -90
  533. package/dist/node_modules/@dnd-kit/dom/index.js +1256 -1518
  534. package/dist/node_modules/@dnd-kit/dom/sortable.js +529 -654
  535. package/dist/node_modules/@dnd-kit/dom/utilities.js +772 -940
  536. package/dist/node_modules/@dnd-kit/geometry/dist/index.js +228 -196
  537. package/dist/node_modules/@dnd-kit/react/hooks.js +51 -63
  538. package/dist/node_modules/@dnd-kit/react/index.js +175 -235
  539. package/dist/node_modules/@dnd-kit/react/sortable.js +67 -142
  540. package/dist/node_modules/@dnd-kit/react/utilities.js +7 -9
  541. package/dist/node_modules/@dnd-kit/state/dist/index.js +157 -172
  542. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +154 -243
  543. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +294 -369
  544. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +95 -133
  545. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +96 -122
  546. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +249 -264
  547. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +34 -88
  548. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +74 -88
  549. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1463 -1822
  550. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +633 -768
  551. package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +30 -32
  552. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +35 -48
  553. package/dist/node_modules/@tiptap/core/dist/index.js +3433 -3946
  554. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -19
  555. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +73 -1498
  556. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +71 -84
  557. package/dist/node_modules/@tiptap/extension-code/dist/index.js +65 -70
  558. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +155 -216
  559. package/dist/node_modules/@tiptap/extension-document/dist/index.js +9 -11
  560. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +48 -60
  561. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +65 -66
  562. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +47 -55
  563. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +68 -82
  564. package/dist/node_modules/@tiptap/extension-link/dist/index.js +365 -334
  565. package/dist/node_modules/@tiptap/extension-list/dist/index.js +936 -1105
  566. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +43 -48
  567. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +53 -65
  568. package/dist/node_modules/@tiptap/extension-text/dist/index.js +12 -12
  569. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +60 -64
  570. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -462
  571. package/dist/node_modules/@tiptap/react/dist/index.js +314 -0
  572. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +23 -24
  573. package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -4
  574. package/dist/node_modules/country-flag-icons/modules/hasFlag.js +6 -6
  575. package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +5469 -6298
  576. package/dist/node_modules/country-flag-icons/react/3x2/index.js +273 -269
  577. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +5 -6
  578. package/dist/node_modules/date-fns/_lib/defaultOptions.js +6 -6
  579. package/dist/node_modules/date-fns/_lib/format/formatters.js +385 -544
  580. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +42 -57
  581. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +37 -48
  582. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +7 -17
  583. package/dist/node_modules/date-fns/_lib/normalizeDates.js +6 -9
  584. package/dist/node_modules/date-fns/_lib/protectedTokens.js +19 -16
  585. package/dist/node_modules/date-fns/addDays.js +8 -8
  586. package/dist/node_modules/date-fns/addMonths.js +11 -18
  587. package/dist/node_modules/date-fns/addWeeks.js +6 -6
  588. package/dist/node_modules/date-fns/constants.js +10 -6
  589. package/dist/node_modules/date-fns/constructFrom.js +6 -6
  590. package/dist/node_modules/date-fns/constructNow.js +6 -6
  591. package/dist/node_modules/date-fns/differenceInCalendarDays.js +10 -14
  592. package/dist/node_modules/date-fns/endOfDay.js +7 -7
  593. package/dist/node_modules/date-fns/endOfMonth.js +7 -7
  594. package/dist/node_modules/date-fns/format.js +57 -55
  595. package/dist/node_modules/date-fns/getDayOfYear.js +9 -9
  596. package/dist/node_modules/date-fns/getISOWeek.js +10 -10
  597. package/dist/node_modules/date-fns/getISOWeekYear.js +13 -13
  598. package/dist/node_modules/date-fns/getWeek.js +10 -10
  599. package/dist/node_modules/date-fns/getWeekYear.js +14 -14
  600. package/dist/node_modules/date-fns/isBefore.js +6 -6
  601. package/dist/node_modules/date-fns/isDate.js +5 -5
  602. package/dist/node_modules/date-fns/isPast.js +6 -6
  603. package/dist/node_modules/date-fns/isSameDay.js +8 -12
  604. package/dist/node_modules/date-fns/isSameMonth.js +7 -11
  605. package/dist/node_modules/date-fns/isSameWeek.js +8 -12
  606. package/dist/node_modules/date-fns/isSameYear.js +7 -11
  607. package/dist/node_modules/date-fns/isToday.js +7 -10
  608. package/dist/node_modules/date-fns/isValid.js +7 -7
  609. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
  610. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
  611. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
  612. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
  613. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +68 -69
  614. package/dist/node_modules/date-fns/locale/da/_lib/formatLong.js +31 -32
  615. package/dist/node_modules/date-fns/locale/da/_lib/formatRelative.js +11 -11
  616. package/dist/node_modules/date-fns/locale/da/_lib/localize.js +193 -142
  617. package/dist/node_modules/date-fns/locale/da/_lib/match.js +123 -109
  618. package/dist/node_modules/date-fns/locale/da.js +17 -17
  619. package/dist/node_modules/date-fns/locale/en-GB/_lib/formatLong.js +31 -32
  620. package/dist/node_modules/date-fns/locale/en-GB.js +18 -18
  621. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
  622. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
  623. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
  624. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
  625. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
  626. package/dist/node_modules/date-fns/locale/en-US.js +18 -18
  627. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +68 -69
  628. package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +31 -32
  629. package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -18
  630. package/dist/node_modules/date-fns/locale/es/_lib/localize.js +192 -141
  631. package/dist/node_modules/date-fns/locale/es/_lib/match.js +127 -114
  632. package/dist/node_modules/date-fns/locale/es.js +18 -18
  633. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +161 -162
  634. package/dist/node_modules/date-fns/locale/et/_lib/formatLong.js +31 -32
  635. package/dist/node_modules/date-fns/locale/et/_lib/formatRelative.js +11 -11
  636. package/dist/node_modules/date-fns/locale/et/_lib/localize.js +196 -152
  637. package/dist/node_modules/date-fns/locale/et/_lib/match.js +109 -107
  638. package/dist/node_modules/date-fns/locale/et.js +19 -19
  639. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +101 -101
  640. package/dist/node_modules/date-fns/locale/fi/_lib/formatLong.js +31 -32
  641. package/dist/node_modules/date-fns/locale/fi/_lib/formatRelative.js +11 -11
  642. package/dist/node_modules/date-fns/locale/fi/_lib/localize.js +192 -140
  643. package/dist/node_modules/date-fns/locale/fi/_lib/match.js +122 -108
  644. package/dist/node_modules/date-fns/locale/fi.js +18 -18
  645. package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
  646. package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
  647. package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
  648. package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
  649. package/dist/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
  650. package/dist/node_modules/date-fns/locale/fr.js +18 -18
  651. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +93 -109
  652. package/dist/node_modules/date-fns/locale/lt/_lib/formatLong.js +31 -32
  653. package/dist/node_modules/date-fns/locale/lt/_lib/formatRelative.js +11 -11
  654. package/dist/node_modules/date-fns/locale/lt/_lib/localize.js +298 -195
  655. package/dist/node_modules/date-fns/locale/lt/_lib/match.js +154 -121
  656. package/dist/node_modules/date-fns/locale/lt.js +19 -19
  657. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +226 -120
  658. package/dist/node_modules/date-fns/locale/lv/_lib/formatLong.js +31 -32
  659. package/dist/node_modules/date-fns/locale/lv/_lib/formatRelative.js +22 -22
  660. package/dist/node_modules/date-fns/locale/lv/_lib/localize.js +298 -221
  661. package/dist/node_modules/date-fns/locale/lv/_lib/match.js +138 -112
  662. package/dist/node_modules/date-fns/locale/lv.js +18 -18
  663. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +68 -69
  664. package/dist/node_modules/date-fns/locale/nb/_lib/formatLong.js +31 -32
  665. package/dist/node_modules/date-fns/locale/nb/_lib/formatRelative.js +11 -11
  666. package/dist/node_modules/date-fns/locale/nb/_lib/localize.js +159 -108
  667. package/dist/node_modules/date-fns/locale/nb/_lib/match.js +112 -108
  668. package/dist/node_modules/date-fns/locale/nb.js +18 -18
  669. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +68 -69
  670. package/dist/node_modules/date-fns/locale/nl/_lib/formatLong.js +31 -32
  671. package/dist/node_modules/date-fns/locale/nl/_lib/formatRelative.js +11 -11
  672. package/dist/node_modules/date-fns/locale/nl/_lib/localize.js +160 -109
  673. package/dist/node_modules/date-fns/locale/nl/_lib/match.js +120 -108
  674. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js +68 -69
  675. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatLong.js +31 -32
  676. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js +11 -11
  677. package/dist/node_modules/date-fns/locale/nl-BE/_lib/localize.js +160 -109
  678. package/dist/node_modules/date-fns/locale/nl-BE/_lib/match.js +120 -108
  679. package/dist/node_modules/date-fns/locale/nl-BE.js +18 -18
  680. package/dist/node_modules/date-fns/locale/nl.js +18 -18
  681. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +82 -86
  682. package/dist/node_modules/date-fns/locale/sv/_lib/formatLong.js +31 -32
  683. package/dist/node_modules/date-fns/locale/sv/_lib/formatRelative.js +11 -11
  684. package/dist/node_modules/date-fns/locale/sv/_lib/localize.js +199 -142
  685. package/dist/node_modules/date-fns/locale/sv/_lib/match.js +109 -107
  686. package/dist/node_modules/date-fns/locale/sv.js +18 -18
  687. package/dist/node_modules/date-fns/startOfDay.js +7 -7
  688. package/dist/node_modules/date-fns/startOfISOWeek.js +9 -6
  689. package/dist/node_modules/date-fns/startOfISOWeekYear.js +9 -9
  690. package/dist/node_modules/date-fns/startOfMonth.js +7 -7
  691. package/dist/node_modules/date-fns/startOfWeek.js +8 -8
  692. package/dist/node_modules/date-fns/startOfWeekYear.js +10 -10
  693. package/dist/node_modules/date-fns/startOfYear.js +7 -7
  694. package/dist/node_modules/date-fns/subDays.js +6 -6
  695. package/dist/node_modules/date-fns/subMonths.js +6 -6
  696. package/dist/node_modules/date-fns/subWeeks.js +6 -6
  697. package/dist/node_modules/date-fns/toDate.js +6 -6
  698. package/dist/node_modules/fast-equals/dist/es/index.js +239 -298
  699. package/dist/node_modules/libphonenumber-js/es6-modern/ParseError.js +8 -0
  700. package/dist/node_modules/libphonenumber-js/es6-modern/PhoneNumber.js +73 -0
  701. package/dist/node_modules/libphonenumber-js/es6-modern/constants.js +4 -0
  702. package/dist/node_modules/libphonenumber-js/es6-modern/format.js +77 -0
  703. package/dist/node_modules/libphonenumber-js/es6-modern/getCountries.js +7 -0
  704. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/RFC3966.js +8 -0
  705. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/applyInternationalSeparatorStyle.js +7 -0
  706. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/checkNumberLength.js +21 -0
  707. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extension/createExtensionPattern.js +9 -0
  708. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extension/extractExtension.js +17 -0
  709. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractCountryCallingCode.js +37 -0
  710. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
  711. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +21 -0
  712. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractNationalNumber.js +27 -0
  713. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
  714. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractPhoneContext.js +16 -0
  715. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/formatNationalNumberUsingFormat.js +9 -0
  716. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getCountryAndCallingCodeFromOneOfThem.js +12 -0
  717. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getCountryByCallingCode.js +8 -0
  718. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getCountryByNationalNumber.js +14 -0
  719. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getIddPrefix.js +10 -0
  720. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getNumberType.js +30 -0
  721. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getPossibleCountriesForNumber.js +12 -0
  722. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/isCallingCode.js +7 -0
  723. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/isCountryCode.js +7 -0
  724. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/isObject.js +7 -0
  725. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/isViablePhoneNumber.js +12 -0
  726. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/matchesEntirely.js +6 -0
  727. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/mergeArrays.js +8 -0
  728. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/parseDigits.js +48 -0
  729. package/dist/node_modules/libphonenumber-js/es6-modern/helpers/stripIddPrefix.js +16 -0
  730. package/dist/node_modules/libphonenumber-js/es6-modern/isPossible.js +32 -0
  731. package/dist/node_modules/libphonenumber-js/es6-modern/isValid.js +13 -0
  732. package/dist/node_modules/libphonenumber-js/es6-modern/isValidPhoneNumber.js +20 -0
  733. package/dist/node_modules/libphonenumber-js/es6-modern/metadata.js +254 -0
  734. package/dist/node_modules/libphonenumber-js/es6-modern/normalizeArguments.js +26 -0
  735. package/dist/node_modules/libphonenumber-js/es6-modern/parse.js +100 -0
  736. package/dist/node_modules/libphonenumber-js/es6-modern/parseIncompletePhoneNumber.js +19 -0
  737. package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumber.js +9 -0
  738. package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumberWithError_.js +16 -0
  739. package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumber_.js +24 -0
  740. package/dist/node_modules/libphonenumber-js/es6-modern/tools/semver-compare.js +14 -0
  741. package/dist/node_modules/libphonenumber-js/max/es6/exports/PhoneNumber.js +10 -0
  742. package/dist/node_modules/libphonenumber-js/max/es6/exports/getCountries.js +8 -0
  743. package/dist/node_modules/libphonenumber-js/max/es6/exports/getCountryCallingCode.js +8 -0
  744. package/dist/node_modules/libphonenumber-js/max/es6/exports/isSupportedCountry.js +8 -0
  745. package/dist/node_modules/libphonenumber-js/max/es6/exports/isValidPhoneNumber.js +8 -0
  746. package/dist/node_modules/libphonenumber-js/max/es6/exports/parsePhoneNumber.js +9 -0
  747. package/dist/node_modules/libphonenumber-js/max/es6/exports/withMetadataArgument.js +10 -0
  748. package/dist/node_modules/libphonenumber-js/metadata.max.json.js +10497 -0
  749. package/dist/node_modules/linkifyjs/dist/linkify.js +486 -679
  750. package/dist/node_modules/next-themes/dist/index.js +120 -85
  751. package/dist/node_modules/orderedmap/dist/index.js +64 -100
  752. package/dist/node_modules/prosemirror-commands/dist/index.js +313 -368
  753. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +109 -84
  754. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +162 -195
  755. package/dist/node_modules/prosemirror-history/dist/index.js +203 -239
  756. package/dist/node_modules/prosemirror-keymap/dist/index.js +45 -57
  757. package/dist/node_modules/prosemirror-model/dist/index.js +1783 -2735
  758. package/dist/node_modules/prosemirror-schema-list/dist/index.js +66 -81
  759. package/dist/node_modules/prosemirror-state/dist/index.js +517 -814
  760. package/dist/node_modules/prosemirror-transform/dist/index.js +1104 -1505
  761. package/dist/node_modules/prosemirror-view/dist/index.js +3274 -3782
  762. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +15 -21
  763. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +12 -14
  764. package/dist/node_modules/react/compiler-runtime.js +10 -10
  765. package/dist/node_modules/rope-sequence/dist/index.js +82 -99
  766. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -58
  767. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -57
  768. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -58
  769. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -46
  770. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -10
  771. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -10
  772. package/dist/node_modules/w3c-keyname/index.js +87 -92
  773. package/dist/theme/component-recipes.js +52 -53
  774. package/dist/theme/theme-casper-ui.js +179 -420
  775. package/dist/theme/theme-helper.js +4 -4
  776. package/dist/theme/theme-provider.js +33 -34
  777. package/dist/theme/theme-style-props.d.ts.map +1 -1
  778. package/dist/theme/theme-tokens.js +22 -12
  779. package/dist/theme/theme-types.js +22 -12
  780. package/dist/theme/theme.js +213 -268
  781. package/package.json +30 -29
  782. package/dist/_virtual/compiler-runtime.js +0 -5
  783. package/dist/_virtual/compiler-runtime2.js +0 -4
  784. package/dist/_virtual/index.js +0 -5
  785. package/dist/_virtual/index2.js +0 -4
  786. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  787. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  788. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  789. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  790. package/dist/_virtual/with-selector.development.js +0 -4
  791. package/dist/_virtual/with-selector.js +0 -5
  792. package/dist/_virtual/with-selector.production.js +0 -4
  793. package/dist/_virtual/with-selector2.js +0 -4
  794. package/dist/node_modules/libphonenumber-js/es6/ParseError.js +0 -89
  795. package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -192
  796. package/dist/node_modules/libphonenumber-js/es6/constants.js +0 -10
  797. package/dist/node_modules/libphonenumber-js/es6/format.js +0 -98
  798. package/dist/node_modules/libphonenumber-js/es6/getCountries.js +0 -7
  799. package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -11
  800. package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -7
  801. package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -16
  802. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -11
  803. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -18
  804. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -46
  805. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -27
  806. package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -23
  807. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -39
  808. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -31
  809. package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -23
  810. package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -25
  811. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +0 -12
  812. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -9
  813. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -43
  814. package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -12
  815. package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -52
  816. package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -14
  817. package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +0 -7
  818. package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +0 -7
  819. package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -7
  820. package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -20
  821. package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -6
  822. package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -79
  823. package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -19
  824. package/dist/node_modules/libphonenumber-js/es6/isPossible.js +0 -35
  825. package/dist/node_modules/libphonenumber-js/es6/isValid.js +0 -14
  826. package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +0 -59
  827. package/dist/node_modules/libphonenumber-js/es6/metadata.js +0 -494
  828. package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -108
  829. package/dist/node_modules/libphonenumber-js/es6/parse.js +0 -138
  830. package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -40
  831. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -9
  832. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -55
  833. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -62
  834. package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -14
  835. package/dist/node_modules/libphonenumber-js/metadata.min.json.js +0 -4
  836. package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +0 -8
  837. package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +0 -8
  838. package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +0 -8
  839. package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +0 -8
  840. package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -8
  841. package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -8
  842. package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +0 -506
@@ -1,822 +1,525 @@
1
- import { Slice as m, Fragment as B, Node as x, Mark as R } from "../../prosemirror-model/dist/index.js";
2
- import { ReplaceStep as P, ReplaceAroundStep as K, Transform as $ } from "../../prosemirror-transform/dist/index.js";
3
- const O = /* @__PURE__ */ Object.create(null);
4
- class l {
5
- /**
6
- Initialize a selection with the head and anchor and ranges. If no
7
- ranges are given, constructs a single range across `$anchor` and
8
- `$head`.
9
- */
10
- constructor(e, t, r) {
11
- this.$anchor = e, this.$head = t, this.ranges = r || [new q(e.min(t), e.max(t))];
12
- }
13
- /**
14
- The selection's anchor, as an unresolved position.
15
- */
16
- get anchor() {
17
- return this.$anchor.pos;
18
- }
19
- /**
20
- The selection's head.
21
- */
22
- get head() {
23
- return this.$head.pos;
24
- }
25
- /**
26
- The lower bound of the selection's main range.
27
- */
28
- get from() {
29
- return this.$from.pos;
30
- }
31
- /**
32
- The upper bound of the selection's main range.
33
- */
34
- get to() {
35
- return this.$to.pos;
36
- }
37
- /**
38
- The resolved lower bound of the selection's main range.
39
- */
40
- get $from() {
41
- return this.ranges[0].$from;
42
- }
43
- /**
44
- The resolved upper bound of the selection's main range.
45
- */
46
- get $to() {
47
- return this.ranges[0].$to;
48
- }
49
- /**
50
- Indicates whether the selection contains any content.
51
- */
52
- get empty() {
53
- let e = this.ranges;
54
- for (let t = 0; t < e.length; t++)
55
- if (e[t].$from.pos != e[t].$to.pos)
56
- return !1;
57
- return !0;
58
- }
59
- /**
60
- Get the content of this selection as a slice.
61
- */
62
- content() {
63
- return this.$from.doc.slice(this.from, this.to, !0);
64
- }
65
- /**
66
- Replace the selection with a slice or, if no slice is given,
67
- delete the selection. Will append to the given transaction.
68
- */
69
- replace(e, t = m.empty) {
70
- let r = t.content.lastChild, n = null;
71
- for (let a = 0; a < t.openEnd; a++)
72
- n = r, r = r.lastChild;
73
- let s = e.steps.length, o = this.ranges;
74
- for (let a = 0; a < o.length; a++) {
75
- let { $from: c, $to: u } = o[a], h = e.mapping.slice(s);
76
- e.replaceRange(h.map(c.pos), h.map(u.pos), a ? m.empty : t), a == 0 && E(e, s, (r ? r.isInline : n && n.isTextblock) ? -1 : 1);
77
- }
78
- }
79
- /**
80
- Replace the selection with the given node, appending the changes
81
- to the given transaction.
82
- */
83
- replaceWith(e, t) {
84
- let r = e.steps.length, n = this.ranges;
85
- for (let s = 0; s < n.length; s++) {
86
- let { $from: o, $to: a } = n[s], c = e.mapping.slice(r), u = c.map(o.pos), h = c.map(a.pos);
87
- s ? e.deleteRange(u, h) : (e.replaceRangeWith(u, h, t), E(e, r, t.isInline ? -1 : 1));
88
- }
89
- }
90
- /**
91
- Find a valid cursor or leaf node selection starting at the given
92
- position and searching back if `dir` is negative, and forward if
93
- positive. When `textOnly` is true, only consider cursor
94
- selections. Will return null when no valid selection position is
95
- found.
96
- */
97
- static findFrom(e, t, r = !1) {
98
- let n = e.parent.inlineContent ? new f(e) : g(e.node(0), e.parent, e.pos, e.index(), t, r);
99
- if (n)
100
- return n;
101
- for (let s = e.depth - 1; s >= 0; s--) {
102
- let o = t < 0 ? g(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : g(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
103
- if (o)
104
- return o;
105
- }
106
- return null;
107
- }
108
- /**
109
- Find a valid cursor or leaf node selection near the given
110
- position. Searches forward first by default, but if `bias` is
111
- negative, it will search backwards first.
112
- */
113
- static near(e, t = 1) {
114
- return this.findFrom(e, t) || this.findFrom(e, -t) || new d(e.node(0));
115
- }
116
- /**
117
- Find the cursor or leaf node selection closest to the start of
118
- the given document. Will return an
119
- [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position
120
- exists.
121
- */
122
- static atStart(e) {
123
- return g(e, e, 0, 0, 1) || new d(e);
124
- }
125
- /**
126
- Find the cursor or leaf node selection closest to the end of the
127
- given document.
128
- */
129
- static atEnd(e) {
130
- return g(e, e, e.content.size, e.childCount, -1) || new d(e);
131
- }
132
- /**
133
- Deserialize the JSON representation of a selection. Must be
134
- implemented for custom classes (as a static class method).
135
- */
136
- static fromJSON(e, t) {
137
- if (!t || !t.type)
138
- throw new RangeError("Invalid input for Selection.fromJSON");
139
- let r = O[t.type];
140
- if (!r)
141
- throw new RangeError(`No selection type ${t.type} defined`);
142
- return r.fromJSON(e, t);
143
- }
144
- /**
145
- To be able to deserialize selections from JSON, custom selection
146
- classes must register themselves with an ID string, so that they
147
- can be disambiguated. Try to pick something that's unlikely to
148
- clash with classes from other modules.
149
- */
150
- static jsonID(e, t) {
151
- if (e in O)
152
- throw new RangeError("Duplicate use of selection JSON ID " + e);
153
- return O[e] = t, t.prototype.jsonID = e, t;
154
- }
155
- /**
156
- Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
157
- which is a value that can be mapped without having access to a
158
- current document, and later resolved to a real selection for a
159
- given document again. (This is used mostly by the history to
160
- track and restore old selections.) The default implementation of
161
- this method just converts the selection to a text selection and
162
- returns the bookmark for that.
163
- */
164
- getBookmark() {
165
- return f.between(this.$anchor, this.$head).getBookmark();
166
- }
167
- }
168
- l.prototype.visible = !0;
169
- class q {
170
- /**
171
- Create a range.
172
- */
173
- constructor(e, t) {
174
- this.$from = e, this.$to = t;
175
- }
176
- }
177
- let I = !1;
178
- function T(i) {
179
- !I && !i.parent.inlineContent && (I = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + i.parent.type.name + ")"));
180
- }
181
- class f extends l {
182
- /**
183
- Construct a text selection between the given points.
184
- */
185
- constructor(e, t = e) {
186
- T(e), T(t), super(e, t);
187
- }
188
- /**
189
- Returns a resolved position if this is a cursor selection (an
190
- empty text selection), and null otherwise.
191
- */
192
- get $cursor() {
193
- return this.$anchor.pos == this.$head.pos ? this.$head : null;
194
- }
195
- map(e, t) {
196
- let r = e.resolve(t.map(this.head));
197
- if (!r.parent.inlineContent)
198
- return l.near(r);
199
- let n = e.resolve(t.map(this.anchor));
200
- return new f(n.parent.inlineContent ? n : r, r);
201
- }
202
- replace(e, t = m.empty) {
203
- if (super.replace(e, t), t == m.empty) {
204
- let r = this.$from.marksAcross(this.$to);
205
- r && e.ensureMarks(r);
206
- }
207
- }
208
- eq(e) {
209
- return e instanceof f && e.anchor == this.anchor && e.head == this.head;
210
- }
211
- getBookmark() {
212
- return new y(this.anchor, this.head);
213
- }
214
- toJSON() {
215
- return { type: "text", anchor: this.anchor, head: this.head };
216
- }
217
- /**
218
- @internal
219
- */
220
- static fromJSON(e, t) {
221
- if (typeof t.anchor != "number" || typeof t.head != "number")
222
- throw new RangeError("Invalid input for TextSelection.fromJSON");
223
- return new f(e.resolve(t.anchor), e.resolve(t.head));
224
- }
225
- /**
226
- Create a text selection from non-resolved positions.
227
- */
228
- static create(e, t, r = t) {
229
- let n = e.resolve(t);
230
- return new this(n, r == t ? n : e.resolve(r));
231
- }
232
- /**
233
- Return a text selection that spans the given positions or, if
234
- they aren't text positions, find a text selection near them.
235
- `bias` determines whether the method searches forward (default)
236
- or backwards (negative number) first. Will fall back to calling
237
- [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document
238
- doesn't contain a valid text position.
239
- */
240
- static between(e, t, r) {
241
- let n = e.pos - t.pos;
242
- if ((!r || n) && (r = n >= 0 ? 1 : -1), !t.parent.inlineContent) {
243
- let s = l.findFrom(t, r, !0) || l.findFrom(t, -r, !0);
244
- if (s)
245
- t = s.$head;
246
- else
247
- return l.near(t, r);
248
- }
249
- return e.parent.inlineContent || (n == 0 ? e = t : (e = (l.findFrom(e, -r, !0) || l.findFrom(e, r, !0)).$anchor, e.pos < t.pos != n < 0 && (e = t))), new f(e, t);
250
- }
251
- }
252
- l.jsonID("text", f);
253
- class y {
254
- constructor(e, t) {
255
- this.anchor = e, this.head = t;
256
- }
257
- map(e) {
258
- return new y(e.map(this.anchor), e.map(this.head));
259
- }
260
- resolve(e) {
261
- return f.between(e.resolve(this.anchor), e.resolve(this.head));
262
- }
263
- }
264
- class p extends l {
265
- /**
266
- Create a node selection. Does not verify the validity of its
267
- argument.
268
- */
269
- constructor(e) {
270
- let t = e.nodeAfter, r = e.node(0).resolve(e.pos + t.nodeSize);
271
- super(e, r), this.node = t;
272
- }
273
- map(e, t) {
274
- let { deleted: r, pos: n } = t.mapResult(this.anchor), s = e.resolve(n);
275
- return r ? l.near(s) : new p(s);
276
- }
277
- content() {
278
- return new m(B.from(this.node), 0, 0);
279
- }
280
- eq(e) {
281
- return e instanceof p && e.anchor == this.anchor;
282
- }
283
- toJSON() {
284
- return { type: "node", anchor: this.anchor };
285
- }
286
- getBookmark() {
287
- return new J(this.anchor);
288
- }
289
- /**
290
- @internal
291
- */
292
- static fromJSON(e, t) {
293
- if (typeof t.anchor != "number")
294
- throw new RangeError("Invalid input for NodeSelection.fromJSON");
295
- return new p(e.resolve(t.anchor));
296
- }
297
- /**
298
- Create a node selection from non-resolved positions.
299
- */
300
- static create(e, t) {
301
- return new p(e.resolve(t));
302
- }
303
- /**
304
- Determines whether the given node may be selected as a node
305
- selection.
306
- */
307
- static isSelectable(e) {
308
- return !e.isText && e.type.spec.selectable !== !1;
309
- }
310
- }
311
- p.prototype.visible = !1;
312
- l.jsonID("node", p);
313
- class J {
314
- constructor(e) {
315
- this.anchor = e;
316
- }
317
- map(e) {
318
- let { deleted: t, pos: r } = e.mapResult(this.anchor);
319
- return t ? new y(r, r) : new J(r);
320
- }
321
- resolve(e) {
322
- let t = e.resolve(this.anchor), r = t.nodeAfter;
323
- return r && p.isSelectable(r) ? new p(t) : l.near(t);
324
- }
325
- }
326
- class d extends l {
327
- /**
328
- Create an all-selection over the given document.
329
- */
330
- constructor(e) {
331
- super(e.resolve(0), e.resolve(e.content.size));
332
- }
333
- replace(e, t = m.empty) {
334
- if (t == m.empty) {
335
- e.delete(0, e.doc.content.size);
336
- let r = l.atStart(e.doc);
337
- r.eq(e.selection) || e.setSelection(r);
338
- } else
339
- super.replace(e, t);
340
- }
341
- toJSON() {
342
- return { type: "all" };
343
- }
344
- /**
345
- @internal
346
- */
347
- static fromJSON(e) {
348
- return new d(e);
349
- }
350
- map(e) {
351
- return new d(e);
352
- }
353
- eq(e) {
354
- return e instanceof d;
355
- }
356
- getBookmark() {
357
- return z;
358
- }
359
- }
360
- l.jsonID("all", d);
361
- const z = {
362
- map() {
363
- return this;
364
- },
365
- resolve(i) {
366
- return new d(i);
367
- }
1
+ import { Fragment as e, Mark as t, Node as n, Slice as r } from "../../prosemirror-model/dist/index.js";
2
+ import { ReplaceAroundStep as i, ReplaceStep as a, Transform as o } from "../../prosemirror-transform/dist/index.js";
3
+ //#region ../../node_modules/prosemirror-state/dist/index.js
4
+ var s = Object.create(null), c = class {
5
+ constructor(e, t, n) {
6
+ this.$anchor = e, this.$head = t, this.ranges = n || [new l(e.min(t), e.max(t))];
7
+ }
8
+ get anchor() {
9
+ return this.$anchor.pos;
10
+ }
11
+ get head() {
12
+ return this.$head.pos;
13
+ }
14
+ get from() {
15
+ return this.$from.pos;
16
+ }
17
+ get to() {
18
+ return this.$to.pos;
19
+ }
20
+ get $from() {
21
+ return this.ranges[0].$from;
22
+ }
23
+ get $to() {
24
+ return this.ranges[0].$to;
25
+ }
26
+ get empty() {
27
+ let e = this.ranges;
28
+ for (let t = 0; t < e.length; t++) if (e[t].$from.pos != e[t].$to.pos) return !1;
29
+ return !0;
30
+ }
31
+ content() {
32
+ return this.$from.doc.slice(this.from, this.to, !0);
33
+ }
34
+ replace(e, t = r.empty) {
35
+ let n = t.content.lastChild, i = null;
36
+ for (let e = 0; e < t.openEnd; e++) i = n, n = n.lastChild;
37
+ let a = e.steps.length, o = this.ranges;
38
+ for (let s = 0; s < o.length; s++) {
39
+ let { $from: c, $to: l } = o[s], u = e.mapping.slice(a);
40
+ e.replaceRange(u.map(c.pos), u.map(l.pos), s ? r.empty : t), s == 0 && y(e, a, (n ? n.isInline : i && i.isTextblock) ? -1 : 1);
41
+ }
42
+ }
43
+ replaceWith(e, t) {
44
+ let n = e.steps.length, r = this.ranges;
45
+ for (let i = 0; i < r.length; i++) {
46
+ let { $from: a, $to: o } = r[i], s = e.mapping.slice(n), c = s.map(a.pos), l = s.map(o.pos);
47
+ i ? e.deleteRange(c, l) : (e.replaceRangeWith(c, l, t), y(e, n, t.isInline ? -1 : 1));
48
+ }
49
+ }
50
+ static findFrom(e, t, n = !1) {
51
+ let r = e.parent.inlineContent ? new f(e) : v(e.node(0), e.parent, e.pos, e.index(), t, n);
52
+ if (r) return r;
53
+ for (let r = e.depth - 1; r >= 0; r--) {
54
+ let i = t < 0 ? v(e.node(0), e.node(r), e.before(r + 1), e.index(r), t, n) : v(e.node(0), e.node(r), e.after(r + 1), e.index(r) + 1, t, n);
55
+ if (i) return i;
56
+ }
57
+ return null;
58
+ }
59
+ static near(e, t = 1) {
60
+ return this.findFrom(e, t) || this.findFrom(e, -t) || new g(e.node(0));
61
+ }
62
+ static atStart(e) {
63
+ return v(e, e, 0, 0, 1) || new g(e);
64
+ }
65
+ static atEnd(e) {
66
+ return v(e, e, e.content.size, e.childCount, -1) || new g(e);
67
+ }
68
+ static fromJSON(e, t) {
69
+ if (!t || !t.type) throw RangeError("Invalid input for Selection.fromJSON");
70
+ let n = s[t.type];
71
+ if (!n) throw RangeError(`No selection type ${t.type} defined`);
72
+ return n.fromJSON(e, t);
73
+ }
74
+ static jsonID(e, t) {
75
+ if (e in s) throw RangeError("Duplicate use of selection JSON ID " + e);
76
+ return s[e] = t, t.prototype.jsonID = e, t;
77
+ }
78
+ getBookmark() {
79
+ return f.between(this.$anchor, this.$head).getBookmark();
80
+ }
368
81
  };
369
- function g(i, e, t, r, n, s = !1) {
370
- if (e.inlineContent)
371
- return f.create(i, t);
372
- for (let o = r - (n > 0 ? 0 : 1); n > 0 ? o < e.childCount : o >= 0; o += n) {
373
- let a = e.child(o);
374
- if (a.isAtom) {
375
- if (!s && p.isSelectable(a))
376
- return p.create(i, t - (n < 0 ? a.nodeSize : 0));
377
- } else {
378
- let c = g(i, a, t + n, n < 0 ? a.childCount : 0, n, s);
379
- if (c)
380
- return c;
381
- }
382
- t += a.nodeSize * n;
383
- }
384
- return null;
385
- }
386
- function E(i, e, t) {
387
- let r = i.steps.length - 1;
388
- if (r < e)
389
- return;
390
- let n = i.steps[r];
391
- if (!(n instanceof P || n instanceof K))
392
- return;
393
- let s = i.mapping.maps[r], o;
394
- s.forEach((a, c, u, h) => {
395
- o == null && (o = h);
396
- }), i.setSelection(l.near(i.doc.resolve(o), t));
397
- }
398
- const b = 1, k = 2, F = 4;
399
- class W extends $ {
400
- /**
401
- @internal
402
- */
403
- constructor(e) {
404
- super(e.doc), this.curSelectionFor = 0, this.updated = 0, this.meta = /* @__PURE__ */ Object.create(null), this.time = Date.now(), this.curSelection = e.selection, this.storedMarks = e.storedMarks;
405
- }
406
- /**
407
- The transaction's current selection. This defaults to the editor
408
- selection [mapped](https://prosemirror.net/docs/ref/#state.Selection.map) through the steps in the
409
- transaction, but can be overwritten with
410
- [`setSelection`](https://prosemirror.net/docs/ref/#state.Transaction.setSelection).
411
- */
412
- get selection() {
413
- return this.curSelectionFor < this.steps.length && (this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor)), this.curSelectionFor = this.steps.length), this.curSelection;
414
- }
415
- /**
416
- Update the transaction's current selection. Will determine the
417
- selection that the editor gets when the transaction is applied.
418
- */
419
- setSelection(e) {
420
- if (e.$from.doc != this.doc)
421
- throw new RangeError("Selection passed to setSelection must point at the current document");
422
- return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | b) & ~k, this.storedMarks = null, this;
423
- }
424
- /**
425
- Whether the selection was explicitly updated by this transaction.
426
- */
427
- get selectionSet() {
428
- return (this.updated & b) > 0;
429
- }
430
- /**
431
- Set the current stored marks.
432
- */
433
- setStoredMarks(e) {
434
- return this.storedMarks = e, this.updated |= k, this;
435
- }
436
- /**
437
- Make sure the current stored marks or, if that is null, the marks
438
- at the selection, match the given set of marks. Does nothing if
439
- this is already the case.
440
- */
441
- ensureMarks(e) {
442
- return R.sameSet(this.storedMarks || this.selection.$from.marks(), e) || this.setStoredMarks(e), this;
443
- }
444
- /**
445
- Add a mark to the set of stored marks.
446
- */
447
- addStoredMark(e) {
448
- return this.ensureMarks(e.addToSet(this.storedMarks || this.selection.$head.marks()));
449
- }
450
- /**
451
- Remove a mark or mark type from the set of stored marks.
452
- */
453
- removeStoredMark(e) {
454
- return this.ensureMarks(e.removeFromSet(this.storedMarks || this.selection.$head.marks()));
455
- }
456
- /**
457
- Whether the stored marks were explicitly set for this transaction.
458
- */
459
- get storedMarksSet() {
460
- return (this.updated & k) > 0;
461
- }
462
- /**
463
- @internal
464
- */
465
- addStep(e, t) {
466
- super.addStep(e, t), this.updated = this.updated & ~k, this.storedMarks = null;
467
- }
468
- /**
469
- Update the timestamp for the transaction.
470
- */
471
- setTime(e) {
472
- return this.time = e, this;
473
- }
474
- /**
475
- Replace the current selection with the given slice.
476
- */
477
- replaceSelection(e) {
478
- return this.selection.replace(this, e), this;
479
- }
480
- /**
481
- Replace the selection with the given node. When `inheritMarks` is
482
- true and the content is inline, it inherits the marks from the
483
- place where it is inserted.
484
- */
485
- replaceSelectionWith(e, t = !0) {
486
- let r = this.selection;
487
- return t && (e = e.mark(this.storedMarks || (r.empty ? r.$from.marks() : r.$from.marksAcross(r.$to) || R.none))), r.replaceWith(this, e), this;
488
- }
489
- /**
490
- Delete the selection.
491
- */
492
- deleteSelection() {
493
- return this.selection.replace(this), this;
494
- }
495
- /**
496
- Replace the given range, or the selection if no range is given,
497
- with a text node containing the given string.
498
- */
499
- insertText(e, t, r) {
500
- let n = this.doc.type.schema;
501
- if (t == null)
502
- return e ? this.replaceSelectionWith(n.text(e), !0) : this.deleteSelection();
503
- {
504
- if (r == null && (r = t), !e)
505
- return this.deleteRange(t, r);
506
- let s = this.storedMarks;
507
- if (!s) {
508
- let o = this.doc.resolve(t);
509
- s = r == t ? o.marks() : o.marksAcross(this.doc.resolve(r));
510
- }
511
- return this.replaceRangeWith(t, r, n.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(l.near(this.selection.$to)), this;
512
- }
513
- }
514
- /**
515
- Store a metadata property in this transaction, keyed either by
516
- name or by plugin.
517
- */
518
- setMeta(e, t) {
519
- return this.meta[typeof e == "string" ? e : e.key] = t, this;
520
- }
521
- /**
522
- Retrieve a metadata property for a given name or plugin.
523
- */
524
- getMeta(e) {
525
- return this.meta[typeof e == "string" ? e : e.key];
526
- }
527
- /**
528
- Returns true if this transaction doesn't contain any metadata,
529
- and can thus safely be extended.
530
- */
531
- get isGeneric() {
532
- for (let e in this.meta)
533
- return !1;
534
- return !0;
535
- }
536
- /**
537
- Indicate that the editor should scroll the selection into view
538
- when updated to the state produced by this transaction.
539
- */
540
- scrollIntoView() {
541
- return this.updated |= F, this;
542
- }
543
- /**
544
- True when this transaction has had `scrollIntoView` called on it.
545
- */
546
- get scrolledIntoView() {
547
- return (this.updated & F) > 0;
548
- }
82
+ c.prototype.visible = !0;
83
+ var l = class {
84
+ constructor(e, t) {
85
+ this.$from = e, this.$to = t;
86
+ }
87
+ }, u = !1;
88
+ function d(e) {
89
+ !u && !e.parent.inlineContent && (u = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + e.parent.type.name + ")"));
549
90
  }
550
- function D(i, e) {
551
- return !e || !i ? i : i.bind(e);
552
- }
553
- class S {
554
- constructor(e, t, r) {
555
- this.name = e, this.init = D(t.init, r), this.apply = D(t.apply, r);
556
- }
557
- }
558
- const L = [
559
- new S("doc", {
560
- init(i) {
561
- return i.doc || i.schema.topNodeType.createAndFill();
562
- },
563
- apply(i) {
564
- return i.doc;
565
- }
566
- }),
567
- new S("selection", {
568
- init(i, e) {
569
- return i.selection || l.atStart(e.doc);
570
- },
571
- apply(i) {
572
- return i.selection;
573
- }
574
- }),
575
- new S("storedMarks", {
576
- init(i) {
577
- return i.storedMarks || null;
578
- },
579
- apply(i, e, t, r) {
580
- return r.selection.$cursor ? i.storedMarks : null;
581
- }
582
- }),
583
- new S("scrollToSelection", {
584
- init() {
585
- return 0;
586
- },
587
- apply(i, e) {
588
- return i.scrolledIntoView ? e + 1 : e;
589
- }
590
- })
591
- ];
592
- class v {
593
- constructor(e, t) {
594
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = L.slice(), t && t.forEach((r) => {
595
- if (this.pluginsByKey[r.key])
596
- throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
597
- this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new S(r.key, r.spec.state, r));
598
- });
599
- }
600
- }
601
- class w {
602
- /**
603
- @internal
604
- */
605
- constructor(e) {
606
- this.config = e;
607
- }
608
- /**
609
- The schema of the state's document.
610
- */
611
- get schema() {
612
- return this.config.schema;
613
- }
614
- /**
615
- The plugins that are active in this state.
616
- */
617
- get plugins() {
618
- return this.config.plugins;
619
- }
620
- /**
621
- Apply the given transaction to produce a new state.
622
- */
623
- apply(e) {
624
- return this.applyTransaction(e).state;
625
- }
626
- /**
627
- @internal
628
- */
629
- filterTransaction(e, t = -1) {
630
- for (let r = 0; r < this.config.plugins.length; r++)
631
- if (r != t) {
632
- let n = this.config.plugins[r];
633
- if (n.spec.filterTransaction && !n.spec.filterTransaction.call(n, e, this))
634
- return !1;
635
- }
636
- return !0;
637
- }
638
- /**
639
- Verbose variant of [`apply`](https://prosemirror.net/docs/ref/#state.EditorState.apply) that
640
- returns the precise transactions that were applied (which might
641
- be influenced by the [transaction
642
- hooks](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction) of
643
- plugins) along with the new state.
644
- */
645
- applyTransaction(e) {
646
- if (!this.filterTransaction(e))
647
- return { state: this, transactions: [] };
648
- let t = [e], r = this.applyInner(e), n = null;
649
- for (; ; ) {
650
- let s = !1;
651
- for (let o = 0; o < this.config.plugins.length; o++) {
652
- let a = this.config.plugins[o];
653
- if (a.spec.appendTransaction) {
654
- let c = n ? n[o].n : 0, u = n ? n[o].state : this, h = c < t.length && a.spec.appendTransaction.call(a, c ? t.slice(c) : t, u, r);
655
- if (h && r.filterTransaction(h, o)) {
656
- if (h.setMeta("appendedTransaction", e), !n) {
657
- n = [];
658
- for (let M = 0; M < this.config.plugins.length; M++)
659
- n.push(M < o ? { state: r, n: t.length } : { state: this, n: 0 });
660
- }
661
- t.push(h), r = r.applyInner(h), s = !0;
662
- }
663
- n && (n[o] = { state: r, n: t.length });
664
- }
665
- }
666
- if (!s)
667
- return { state: r, transactions: t };
668
- }
669
- }
670
- /**
671
- @internal
672
- */
673
- applyInner(e) {
674
- if (!e.before.eq(this.doc))
675
- throw new RangeError("Applying a mismatched transaction");
676
- let t = new w(this.config), r = this.config.fields;
677
- for (let n = 0; n < r.length; n++) {
678
- let s = r[n];
679
- t[s.name] = s.apply(e, this[s.name], this, t);
680
- }
681
- return t;
682
- }
683
- /**
684
- Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
685
- */
686
- get tr() {
687
- return new W(this);
688
- }
689
- /**
690
- Create a new state.
691
- */
692
- static create(e) {
693
- let t = new v(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new w(t);
694
- for (let n = 0; n < t.fields.length; n++)
695
- r[t.fields[n].name] = t.fields[n].init(e, r);
696
- return r;
697
- }
698
- /**
699
- Create a new state based on this one, but with an adjusted set
700
- of active plugins. State fields that exist in both sets of
701
- plugins are kept unchanged. Those that no longer exist are
702
- dropped, and those that are new are initialized using their
703
- [`init`](https://prosemirror.net/docs/ref/#state.StateField.init) method, passing in the new
704
- configuration object..
705
- */
706
- reconfigure(e) {
707
- let t = new v(this.schema, e.plugins), r = t.fields, n = new w(t);
708
- for (let s = 0; s < r.length; s++) {
709
- let o = r[s].name;
710
- n[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, n);
711
- }
712
- return n;
713
- }
714
- /**
715
- Serialize this state to JSON. If you want to serialize the state
716
- of plugins, pass an object mapping property names to use in the
717
- resulting JSON object to plugin objects. The argument may also be
718
- a string or number, in which case it is ignored, to support the
719
- way `JSON.stringify` calls `toString` methods.
720
- */
721
- toJSON(e) {
722
- let t = { doc: this.doc.toJSON(), selection: this.selection.toJSON() };
723
- if (this.storedMarks && (t.storedMarks = this.storedMarks.map((r) => r.toJSON())), e && typeof e == "object")
724
- for (let r in e) {
725
- if (r == "doc" || r == "selection")
726
- throw new RangeError("The JSON fields `doc` and `selection` are reserved");
727
- let n = e[r], s = n.spec.state;
728
- s && s.toJSON && (t[r] = s.toJSON.call(n, this[n.key]));
729
- }
730
- return t;
731
- }
732
- /**
733
- Deserialize a JSON representation of a state. `config` should
734
- have at least a `schema` field, and should contain array of
735
- plugins to initialize the state with. `pluginFields` can be used
736
- to deserialize the state of plugins, by associating plugin
737
- instances with the property names they use in the JSON object.
738
- */
739
- static fromJSON(e, t, r) {
740
- if (!t)
741
- throw new RangeError("Invalid input for EditorState.fromJSON");
742
- if (!e.schema)
743
- throw new RangeError("Required config field 'schema' missing");
744
- let n = new v(e.schema, e.plugins), s = new w(n);
745
- return n.fields.forEach((o) => {
746
- if (o.name == "doc")
747
- s.doc = x.fromJSON(e.schema, t.doc);
748
- else if (o.name == "selection")
749
- s.selection = l.fromJSON(s.doc, t.selection);
750
- else if (o.name == "storedMarks")
751
- t.storedMarks && (s.storedMarks = t.storedMarks.map(e.schema.markFromJSON));
752
- else {
753
- if (r)
754
- for (let a in r) {
755
- let c = r[a], u = c.spec.state;
756
- if (c.key == o.name && u && u.fromJSON && Object.prototype.hasOwnProperty.call(t, a)) {
757
- s[o.name] = u.fromJSON.call(c, e, t[a], s);
758
- return;
759
- }
760
- }
761
- s[o.name] = o.init(e, s);
762
- }
763
- }), s;
764
- }
91
+ var f = class e extends c {
92
+ constructor(e, t = e) {
93
+ d(e), d(t), super(e, t);
94
+ }
95
+ get $cursor() {
96
+ return this.$anchor.pos == this.$head.pos ? this.$head : null;
97
+ }
98
+ map(t, n) {
99
+ let r = t.resolve(n.map(this.head));
100
+ if (!r.parent.inlineContent) return c.near(r);
101
+ let i = t.resolve(n.map(this.anchor));
102
+ return new e(i.parent.inlineContent ? i : r, r);
103
+ }
104
+ replace(e, t = r.empty) {
105
+ if (super.replace(e, t), t == r.empty) {
106
+ let t = this.$from.marksAcross(this.$to);
107
+ t && e.ensureMarks(t);
108
+ }
109
+ }
110
+ eq(t) {
111
+ return t instanceof e && t.anchor == this.anchor && t.head == this.head;
112
+ }
113
+ getBookmark() {
114
+ return new p(this.anchor, this.head);
115
+ }
116
+ toJSON() {
117
+ return {
118
+ type: "text",
119
+ anchor: this.anchor,
120
+ head: this.head
121
+ };
122
+ }
123
+ static fromJSON(t, n) {
124
+ if (typeof n.anchor != "number" || typeof n.head != "number") throw RangeError("Invalid input for TextSelection.fromJSON");
125
+ return new e(t.resolve(n.anchor), t.resolve(n.head));
126
+ }
127
+ static create(e, t, n = t) {
128
+ let r = e.resolve(t);
129
+ return new this(r, n == t ? r : e.resolve(n));
130
+ }
131
+ static between(t, n, r) {
132
+ let i = t.pos - n.pos;
133
+ if ((!r || i) && (r = i >= 0 ? 1 : -1), !n.parent.inlineContent) {
134
+ let e = c.findFrom(n, r, !0) || c.findFrom(n, -r, !0);
135
+ if (e) n = e.$head;
136
+ else return c.near(n, r);
137
+ }
138
+ return t.parent.inlineContent || (i == 0 ? t = n : (t = (c.findFrom(t, -r, !0) || c.findFrom(t, r, !0)).$anchor, t.pos < n.pos != i < 0 && (t = n))), new e(t, n);
139
+ }
140
+ };
141
+ c.jsonID("text", f);
142
+ var p = class e {
143
+ constructor(e, t) {
144
+ this.anchor = e, this.head = t;
145
+ }
146
+ map(t) {
147
+ return new e(t.map(this.anchor), t.map(this.head));
148
+ }
149
+ resolve(e) {
150
+ return f.between(e.resolve(this.anchor), e.resolve(this.head));
151
+ }
152
+ }, m = class t extends c {
153
+ constructor(e) {
154
+ let t = e.nodeAfter, n = e.node(0).resolve(e.pos + t.nodeSize);
155
+ super(e, n), this.node = t;
156
+ }
157
+ map(e, n) {
158
+ let { deleted: r, pos: i } = n.mapResult(this.anchor), a = e.resolve(i);
159
+ return r ? c.near(a) : new t(a);
160
+ }
161
+ content() {
162
+ return new r(e.from(this.node), 0, 0);
163
+ }
164
+ eq(e) {
165
+ return e instanceof t && e.anchor == this.anchor;
166
+ }
167
+ toJSON() {
168
+ return {
169
+ type: "node",
170
+ anchor: this.anchor
171
+ };
172
+ }
173
+ getBookmark() {
174
+ return new h(this.anchor);
175
+ }
176
+ static fromJSON(e, n) {
177
+ if (typeof n.anchor != "number") throw RangeError("Invalid input for NodeSelection.fromJSON");
178
+ return new t(e.resolve(n.anchor));
179
+ }
180
+ static create(e, n) {
181
+ return new t(e.resolve(n));
182
+ }
183
+ static isSelectable(e) {
184
+ return !e.isText && e.type.spec.selectable !== !1;
185
+ }
186
+ };
187
+ m.prototype.visible = !1, c.jsonID("node", m);
188
+ var h = class e {
189
+ constructor(e) {
190
+ this.anchor = e;
191
+ }
192
+ map(t) {
193
+ let { deleted: n, pos: r } = t.mapResult(this.anchor);
194
+ return n ? new p(r, r) : new e(r);
195
+ }
196
+ resolve(e) {
197
+ let t = e.resolve(this.anchor), n = t.nodeAfter;
198
+ return n && m.isSelectable(n) ? new m(t) : c.near(t);
199
+ }
200
+ }, g = class e extends c {
201
+ constructor(e) {
202
+ super(e.resolve(0), e.resolve(e.content.size));
203
+ }
204
+ replace(e, t = r.empty) {
205
+ if (t == r.empty) {
206
+ e.delete(0, e.doc.content.size);
207
+ let t = c.atStart(e.doc);
208
+ t.eq(e.selection) || e.setSelection(t);
209
+ } else super.replace(e, t);
210
+ }
211
+ toJSON() {
212
+ return { type: "all" };
213
+ }
214
+ static fromJSON(t) {
215
+ return new e(t);
216
+ }
217
+ map(t) {
218
+ return new e(t);
219
+ }
220
+ eq(t) {
221
+ return t instanceof e;
222
+ }
223
+ getBookmark() {
224
+ return _;
225
+ }
226
+ };
227
+ c.jsonID("all", g);
228
+ var _ = {
229
+ map() {
230
+ return this;
231
+ },
232
+ resolve(e) {
233
+ return new g(e);
234
+ }
235
+ };
236
+ function v(e, t, n, r, i, a = !1) {
237
+ if (t.inlineContent) return f.create(e, n);
238
+ for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < t.childCount : o >= 0; o += i) {
239
+ let r = t.child(o);
240
+ if (!r.isAtom) {
241
+ let t = v(e, r, n + i, i < 0 ? r.childCount : 0, i, a);
242
+ if (t) return t;
243
+ } else if (!a && m.isSelectable(r)) return m.create(e, n - (i < 0 ? r.nodeSize : 0));
244
+ n += r.nodeSize * i;
245
+ }
246
+ return null;
765
247
  }
766
- function A(i, e, t) {
767
- for (let r in i) {
768
- let n = i[r];
769
- n instanceof Function ? n = n.bind(e) : r == "handleDOMEvents" && (n = A(n, e, {})), t[r] = n;
770
- }
771
- return t;
248
+ function y(e, t, n) {
249
+ let r = e.steps.length - 1;
250
+ if (r < t) return;
251
+ let o = e.steps[r];
252
+ if (!(o instanceof a || o instanceof i)) return;
253
+ let s = e.mapping.maps[r], l;
254
+ s.forEach((e, t, n, r) => {
255
+ l ??= r;
256
+ }), e.setSelection(c.near(e.doc.resolve(l), n));
772
257
  }
773
- class G {
774
- /**
775
- Create a plugin.
776
- */
777
- constructor(e) {
778
- this.spec = e, this.props = {}, e.props && A(e.props, this, this.props), this.key = e.key ? e.key.key : C("plugin");
779
- }
780
- /**
781
- Extract the plugin's state field from an editor state.
782
- */
783
- getState(e) {
784
- return e[this.key];
785
- }
258
+ var b = 1, x = 2, S = 4, C = class extends o {
259
+ constructor(e) {
260
+ super(e.doc), this.curSelectionFor = 0, this.updated = 0, this.meta = Object.create(null), this.time = Date.now(), this.curSelection = e.selection, this.storedMarks = e.storedMarks;
261
+ }
262
+ get selection() {
263
+ return this.curSelectionFor < this.steps.length && (this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor)), this.curSelectionFor = this.steps.length), this.curSelection;
264
+ }
265
+ setSelection(e) {
266
+ if (e.$from.doc != this.doc) throw RangeError("Selection passed to setSelection must point at the current document");
267
+ return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | b) & -3, this.storedMarks = null, this;
268
+ }
269
+ get selectionSet() {
270
+ return (this.updated & b) > 0;
271
+ }
272
+ setStoredMarks(e) {
273
+ return this.storedMarks = e, this.updated |= x, this;
274
+ }
275
+ ensureMarks(e) {
276
+ return t.sameSet(this.storedMarks || this.selection.$from.marks(), e) || this.setStoredMarks(e), this;
277
+ }
278
+ addStoredMark(e) {
279
+ return this.ensureMarks(e.addToSet(this.storedMarks || this.selection.$head.marks()));
280
+ }
281
+ removeStoredMark(e) {
282
+ return this.ensureMarks(e.removeFromSet(this.storedMarks || this.selection.$head.marks()));
283
+ }
284
+ get storedMarksSet() {
285
+ return (this.updated & x) > 0;
286
+ }
287
+ addStep(e, t) {
288
+ super.addStep(e, t), this.updated &= -3, this.storedMarks = null;
289
+ }
290
+ setTime(e) {
291
+ return this.time = e, this;
292
+ }
293
+ replaceSelection(e) {
294
+ return this.selection.replace(this, e), this;
295
+ }
296
+ replaceSelectionWith(e, n = !0) {
297
+ let r = this.selection;
298
+ return n && (e = e.mark(this.storedMarks || (r.empty ? r.$from.marks() : r.$from.marksAcross(r.$to) || t.none))), r.replaceWith(this, e), this;
299
+ }
300
+ deleteSelection() {
301
+ return this.selection.replace(this), this;
302
+ }
303
+ insertText(e, t, n) {
304
+ let r = this.doc.type.schema;
305
+ if (t == null) return e ? this.replaceSelectionWith(r.text(e), !0) : this.deleteSelection();
306
+ {
307
+ if (n ??= t, !e) return this.deleteRange(t, n);
308
+ let i = this.storedMarks;
309
+ if (!i) {
310
+ let e = this.doc.resolve(t);
311
+ i = n == t ? e.marks() : e.marksAcross(this.doc.resolve(n));
312
+ }
313
+ return this.replaceRangeWith(t, n, r.text(e, i)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(c.near(this.selection.$to)), this;
314
+ }
315
+ }
316
+ setMeta(e, t) {
317
+ return this.meta[typeof e == "string" ? e : e.key] = t, this;
318
+ }
319
+ getMeta(e) {
320
+ return this.meta[typeof e == "string" ? e : e.key];
321
+ }
322
+ get isGeneric() {
323
+ for (let e in this.meta) return !1;
324
+ return !0;
325
+ }
326
+ scrollIntoView() {
327
+ return this.updated |= S, this;
328
+ }
329
+ get scrolledIntoView() {
330
+ return (this.updated & S) > 0;
331
+ }
332
+ };
333
+ function w(e, t) {
334
+ return !t || !e ? e : e.bind(t);
786
335
  }
787
- const N = /* @__PURE__ */ Object.create(null);
788
- function C(i) {
789
- return i in N ? i + "$" + ++N[i] : (N[i] = 0, i + "$");
336
+ var T = class {
337
+ constructor(e, t, n) {
338
+ this.name = e, this.init = w(t.init, n), this.apply = w(t.apply, n);
339
+ }
340
+ }, E = [
341
+ new T("doc", {
342
+ init(e) {
343
+ return e.doc || e.schema.topNodeType.createAndFill();
344
+ },
345
+ apply(e) {
346
+ return e.doc;
347
+ }
348
+ }),
349
+ new T("selection", {
350
+ init(e, t) {
351
+ return e.selection || c.atStart(t.doc);
352
+ },
353
+ apply(e) {
354
+ return e.selection;
355
+ }
356
+ }),
357
+ new T("storedMarks", {
358
+ init(e) {
359
+ return e.storedMarks || null;
360
+ },
361
+ apply(e, t, n, r) {
362
+ return r.selection.$cursor ? e.storedMarks : null;
363
+ }
364
+ }),
365
+ new T("scrollToSelection", {
366
+ init() {
367
+ return 0;
368
+ },
369
+ apply(e, t) {
370
+ return e.scrolledIntoView ? t + 1 : t;
371
+ }
372
+ })
373
+ ], D = class {
374
+ constructor(e, t) {
375
+ this.schema = e, this.plugins = [], this.pluginsByKey = Object.create(null), this.fields = E.slice(), t && t.forEach((e) => {
376
+ if (this.pluginsByKey[e.key]) throw RangeError("Adding different instances of a keyed plugin (" + e.key + ")");
377
+ this.plugins.push(e), this.pluginsByKey[e.key] = e, e.spec.state && this.fields.push(new T(e.key, e.spec.state, e));
378
+ });
379
+ }
380
+ }, O = class e {
381
+ constructor(e) {
382
+ this.config = e;
383
+ }
384
+ get schema() {
385
+ return this.config.schema;
386
+ }
387
+ get plugins() {
388
+ return this.config.plugins;
389
+ }
390
+ apply(e) {
391
+ return this.applyTransaction(e).state;
392
+ }
393
+ filterTransaction(e, t = -1) {
394
+ for (let n = 0; n < this.config.plugins.length; n++) if (n != t) {
395
+ let t = this.config.plugins[n];
396
+ if (t.spec.filterTransaction && !t.spec.filterTransaction.call(t, e, this)) return !1;
397
+ }
398
+ return !0;
399
+ }
400
+ applyTransaction(e) {
401
+ if (!this.filterTransaction(e)) return {
402
+ state: this,
403
+ transactions: []
404
+ };
405
+ let t = [e], n = this.applyInner(e), r = null;
406
+ for (;;) {
407
+ let i = !1;
408
+ for (let a = 0; a < this.config.plugins.length; a++) {
409
+ let o = this.config.plugins[a];
410
+ if (o.spec.appendTransaction) {
411
+ let s = r ? r[a].n : 0, c = r ? r[a].state : this, l = s < t.length && o.spec.appendTransaction.call(o, s ? t.slice(s) : t, c, n);
412
+ if (l && n.filterTransaction(l, a)) {
413
+ if (l.setMeta("appendedTransaction", e), !r) {
414
+ r = [];
415
+ for (let e = 0; e < this.config.plugins.length; e++) r.push(e < a ? {
416
+ state: n,
417
+ n: t.length
418
+ } : {
419
+ state: this,
420
+ n: 0
421
+ });
422
+ }
423
+ t.push(l), n = n.applyInner(l), i = !0;
424
+ }
425
+ r && (r[a] = {
426
+ state: n,
427
+ n: t.length
428
+ });
429
+ }
430
+ }
431
+ if (!i) return {
432
+ state: n,
433
+ transactions: t
434
+ };
435
+ }
436
+ }
437
+ applyInner(t) {
438
+ if (!t.before.eq(this.doc)) throw RangeError("Applying a mismatched transaction");
439
+ let n = new e(this.config), r = this.config.fields;
440
+ for (let e = 0; e < r.length; e++) {
441
+ let i = r[e];
442
+ n[i.name] = i.apply(t, this[i.name], this, n);
443
+ }
444
+ return n;
445
+ }
446
+ get tr() {
447
+ return new C(this);
448
+ }
449
+ static create(t) {
450
+ let n = new D(t.doc ? t.doc.type.schema : t.schema, t.plugins), r = new e(n);
451
+ for (let e = 0; e < n.fields.length; e++) r[n.fields[e].name] = n.fields[e].init(t, r);
452
+ return r;
453
+ }
454
+ reconfigure(t) {
455
+ let n = new D(this.schema, t.plugins), r = n.fields, i = new e(n);
456
+ for (let e = 0; e < r.length; e++) {
457
+ let n = r[e].name;
458
+ i[n] = this.hasOwnProperty(n) ? this[n] : r[e].init(t, i);
459
+ }
460
+ return i;
461
+ }
462
+ toJSON(e) {
463
+ let t = {
464
+ doc: this.doc.toJSON(),
465
+ selection: this.selection.toJSON()
466
+ };
467
+ if (this.storedMarks && (t.storedMarks = this.storedMarks.map((e) => e.toJSON())), e && typeof e == "object") for (let n in e) {
468
+ if (n == "doc" || n == "selection") throw RangeError("The JSON fields `doc` and `selection` are reserved");
469
+ let r = e[n], i = r.spec.state;
470
+ i && i.toJSON && (t[n] = i.toJSON.call(r, this[r.key]));
471
+ }
472
+ return t;
473
+ }
474
+ static fromJSON(t, r, i) {
475
+ if (!r) throw RangeError("Invalid input for EditorState.fromJSON");
476
+ if (!t.schema) throw RangeError("Required config field 'schema' missing");
477
+ let a = new D(t.schema, t.plugins), o = new e(a);
478
+ return a.fields.forEach((e) => {
479
+ if (e.name == "doc") o.doc = n.fromJSON(t.schema, r.doc);
480
+ else if (e.name == "selection") o.selection = c.fromJSON(o.doc, r.selection);
481
+ else if (e.name == "storedMarks") r.storedMarks && (o.storedMarks = r.storedMarks.map(t.schema.markFromJSON));
482
+ else {
483
+ if (i) for (let n in i) {
484
+ let a = i[n], s = a.spec.state;
485
+ if (a.key == e.name && s && s.fromJSON && Object.prototype.hasOwnProperty.call(r, n)) {
486
+ o[e.name] = s.fromJSON.call(a, t, r[n], o);
487
+ return;
488
+ }
489
+ }
490
+ o[e.name] = e.init(t, o);
491
+ }
492
+ }), o;
493
+ }
494
+ };
495
+ function k(e, t, n) {
496
+ for (let r in e) {
497
+ let i = e[r];
498
+ i instanceof Function ? i = i.bind(t) : r == "handleDOMEvents" && (i = k(i, t, {})), n[r] = i;
499
+ }
500
+ return n;
790
501
  }
791
- class H {
792
- /**
793
- Create a plugin key.
794
- */
795
- constructor(e = "key") {
796
- this.key = C(e);
797
- }
798
- /**
799
- Get the active plugin with this key, if any, from an editor
800
- state.
801
- */
802
- get(e) {
803
- return e.config.pluginsByKey[this.key];
804
- }
805
- /**
806
- Get the plugin's state from an editor state.
807
- */
808
- getState(e) {
809
- return e[this.key];
810
- }
502
+ var A = class {
503
+ constructor(e) {
504
+ this.spec = e, this.props = {}, e.props && k(e.props, this, this.props), this.key = e.key ? e.key.key : M("plugin");
505
+ }
506
+ getState(e) {
507
+ return e[this.key];
508
+ }
509
+ }, j = Object.create(null);
510
+ function M(e) {
511
+ return e in j ? e + "$" + ++j[e] : (j[e] = 0, e + "$");
811
512
  }
812
- export {
813
- d as AllSelection,
814
- w as EditorState,
815
- p as NodeSelection,
816
- G as Plugin,
817
- H as PluginKey,
818
- l as Selection,
819
- q as SelectionRange,
820
- f as TextSelection,
821
- W as Transaction
513
+ var N = class {
514
+ constructor(e = "key") {
515
+ this.key = M(e);
516
+ }
517
+ get(e) {
518
+ return e.config.pluginsByKey[this.key];
519
+ }
520
+ getState(e) {
521
+ return e[this.key];
522
+ }
822
523
  };
524
+ //#endregion
525
+ export { g as AllSelection, O as EditorState, m as NodeSelection, A as Plugin, N as PluginKey, c as Selection, l as SelectionRange, f as TextSelection, C as Transaction };