@caspeco/casper-ui-library 10.4.0 → 10.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (781) 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.js +31 -36
  401. package/dist/components/phone-input/country-list.js +45 -25
  402. package/dist/components/phone-input/country-selector.js +167 -115
  403. package/dist/components/phone-input/phone-input-helpers.js +91 -119
  404. package/dist/components/phone-input/phone-input.js +47 -42
  405. package/dist/components/phone-input/translations.js +53 -53
  406. package/dist/components/phone-input/use-phone-input.js +110 -137
  407. package/dist/components/quantity-button/minus-button.js +18 -16
  408. package/dist/components/quantity-button/plus-button.js +18 -16
  409. package/dist/components/quantity-button/quantity-button.js +72 -40
  410. package/dist/components/radio/check-icon.js +5 -5
  411. package/dist/components/radio/hover-styles.js +21 -36
  412. package/dist/components/radio/radio-group-context.js +5 -6
  413. package/dist/components/radio/radio-group-recipe.js +124 -142
  414. package/dist/components/radio/radio-group.js +30 -28
  415. package/dist/components/radio/radio.js +72 -55
  416. package/dist/components/radio-card/hover-styles.js +21 -36
  417. package/dist/components/radio-card/radio-card-group.js +24 -25
  418. package/dist/components/radio-card/radio-card.js +87 -67
  419. package/dist/components/rich-text-editor/boolean-control.js +51 -54
  420. package/dist/components/rich-text-editor/extensions.js +39 -34
  421. package/dist/components/rich-text-editor/index.js +26 -22
  422. package/dist/components/rich-text-editor/rich-text-editor-context.js +9 -11
  423. package/dist/components/rich-text-editor/rich-text-editor-control.js +290 -284
  424. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +71 -83
  425. package/dist/components/rich-text-editor/rich-text-editor.js +72 -69
  426. package/dist/components/rich-text-editor/rich-text-renderer.js +32 -32
  427. package/dist/components/rich-text-editor/translations.js +119 -119
  428. package/dist/components/rich-text-editor/use-rich-text-editor.js +22 -29
  429. package/dist/components/segmented-control/segmented-control-item.js +24 -25
  430. package/dist/components/segmented-control/segmented-control.js +49 -40
  431. package/dist/components/select/select-recipe.js +91 -106
  432. package/dist/components/select/select.js +27 -29
  433. package/dist/components/skeleton/skeleton-text.js +18 -19
  434. package/dist/components/skeleton/skeleton.js +19 -20
  435. package/dist/components/spinner/spinner.js +44 -28
  436. package/dist/components/stack/stack.js +18 -18
  437. package/dist/components/stepper/check-icon.js +5 -5
  438. package/dist/components/stepper/step-context.js +5 -5
  439. package/dist/components/stepper/step.js +111 -106
  440. package/dist/components/stepper/stepper.js +42 -43
  441. package/dist/components/stepper/times-icon.js +5 -5
  442. package/dist/components/switch/hover-styles.js +30 -44
  443. package/dist/components/switch/switch-recipe.js +76 -84
  444. package/dist/components/switch/switch.d.ts +3 -3
  445. package/dist/components/switch/switch.d.ts.map +1 -1
  446. package/dist/components/switch/switch.js +30 -31
  447. package/dist/components/switch/types.d.ts +4 -2
  448. package/dist/components/switch/types.d.ts.map +1 -1
  449. package/dist/components/table/helper.d.ts +6 -0
  450. package/dist/components/table/helper.d.ts.map +1 -1
  451. package/dist/components/table/helper.js +29 -9
  452. package/dist/components/table/index.d.ts +1 -1
  453. package/dist/components/table/index.d.ts.map +1 -1
  454. package/dist/components/table/table-cell.d.ts.map +1 -1
  455. package/dist/components/table/table-cell.js +136 -122
  456. package/dist/components/table/table-column-resize-handle.d.ts +12 -0
  457. package/dist/components/table/table-column-resize-handle.d.ts.map +1 -0
  458. package/dist/components/table/table-column-resize-handle.js +69 -0
  459. package/dist/components/table/table-content.d.ts.map +1 -1
  460. package/dist/components/table/table-content.js +174 -98
  461. package/dist/components/table/table-context-provider.d.ts +7 -2
  462. package/dist/components/table/table-context-provider.d.ts.map +1 -1
  463. package/dist/components/table/table-context-provider.js +203 -151
  464. package/dist/components/table/table-context.d.ts +24 -0
  465. package/dist/components/table/table-context.d.ts.map +1 -1
  466. package/dist/components/table/table-context.js +18 -11
  467. package/dist/components/table/table-filter.js +170 -118
  468. package/dist/components/table/table-header-dropdown.js +131 -89
  469. package/dist/components/table/table-header-row.d.ts.map +1 -1
  470. package/dist/components/table/table-header-row.js +202 -140
  471. package/dist/components/table/table-recipe.d.ts.map +1 -1
  472. package/dist/components/table/table-recipe.js +75 -96
  473. package/dist/components/table/table-row-expand-toggle-button.js +28 -35
  474. package/dist/components/table/table-row.d.ts.map +1 -1
  475. package/dist/components/table/table-row.js +51 -41
  476. package/dist/components/table/table-toolbar-actions.js +19 -19
  477. package/dist/components/table/table-toolbar-add-button.js +18 -13
  478. package/dist/components/table/table-toolbar-search.js +17 -12
  479. package/dist/components/table/table-toolbar-settings.js +180 -133
  480. package/dist/components/table/table-toolbar.js +72 -51
  481. package/dist/components/table/table.composition.d.ts +1 -0
  482. package/dist/components/table/table.composition.d.ts.map +1 -1
  483. package/dist/components/table/table.constants.d.ts +4 -0
  484. package/dist/components/table/table.constants.d.ts.map +1 -1
  485. package/dist/components/table/table.constants.js +9 -4
  486. package/dist/components/table/table.d.ts +1 -1
  487. package/dist/components/table/table.d.ts.map +1 -1
  488. package/dist/components/table/table.js +41 -37
  489. package/dist/components/table/translations.d.ts +7 -0
  490. package/dist/components/table/translations.d.ts.map +1 -1
  491. package/dist/components/table/translations.js +199 -194
  492. package/dist/components/table/types.d.ts +33 -2
  493. package/dist/components/table/types.d.ts.map +1 -1
  494. package/dist/components/tabs/tab-list.js +16 -17
  495. package/dist/components/tabs/tab-panel.js +14 -14
  496. package/dist/components/tabs/tab-panels.js +15 -15
  497. package/dist/components/tabs/tab-with-image.js +60 -53
  498. package/dist/components/tabs/tab.js +26 -22
  499. package/dist/components/tabs/tabs-recipe.js +96 -116
  500. package/dist/components/tabs/tabs.js +25 -24
  501. package/dist/components/tag/tag-recipe.js +225 -252
  502. package/dist/components/tag/tag.js +121 -62
  503. package/dist/components/text/text-recipe.js +3 -8
  504. package/dist/components/text/text.js +26 -27
  505. package/dist/components/textarea/textarea-recipe.js +90 -96
  506. package/dist/components/textarea/textarea.js +19 -19
  507. package/dist/components/toaster/toast-store.d.ts +2 -2
  508. package/dist/components/toaster/toast-store.d.ts.map +1 -1
  509. package/dist/components/toaster/toast-store.js +25 -32
  510. package/dist/components/toaster/toaster.js +39 -34
  511. package/dist/components/toggle-button/toggle-button.js +23 -25
  512. package/dist/components/toggle-button/use-button-children.js +36 -35
  513. package/dist/components/tooltip/tooltip.js +43 -47
  514. package/dist/hooks/use-color-mode.js +17 -22
  515. package/dist/hooks/use-disclosure.js +10 -13
  516. package/dist/hooks/use-measured-width.js +21 -21
  517. package/dist/hooks/use-remove-attributes.js +25 -24
  518. package/dist/index.js +396 -802
  519. package/dist/node_modules/@dnd-kit/abstract/index.js +658 -1185
  520. package/dist/node_modules/@dnd-kit/collision/dist/index.js +51 -90
  521. package/dist/node_modules/@dnd-kit/dom/index.js +1256 -1518
  522. package/dist/node_modules/@dnd-kit/dom/sortable.js +529 -654
  523. package/dist/node_modules/@dnd-kit/dom/utilities.js +772 -940
  524. package/dist/node_modules/@dnd-kit/geometry/dist/index.js +228 -196
  525. package/dist/node_modules/@dnd-kit/react/hooks.js +51 -63
  526. package/dist/node_modules/@dnd-kit/react/index.js +175 -235
  527. package/dist/node_modules/@dnd-kit/react/sortable.js +67 -142
  528. package/dist/node_modules/@dnd-kit/react/utilities.js +7 -9
  529. package/dist/node_modules/@dnd-kit/state/dist/index.js +157 -172
  530. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +154 -243
  531. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +294 -369
  532. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +95 -133
  533. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +96 -122
  534. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +249 -264
  535. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +34 -88
  536. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +74 -88
  537. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1463 -1822
  538. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +633 -768
  539. package/dist/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +30 -32
  540. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +35 -48
  541. package/dist/node_modules/@tiptap/core/dist/index.js +3433 -3946
  542. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +19 -19
  543. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +73 -1498
  544. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +71 -84
  545. package/dist/node_modules/@tiptap/extension-code/dist/index.js +65 -70
  546. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +155 -216
  547. package/dist/node_modules/@tiptap/extension-document/dist/index.js +9 -11
  548. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +48 -60
  549. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +65 -66
  550. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +47 -55
  551. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +68 -82
  552. package/dist/node_modules/@tiptap/extension-link/dist/index.js +365 -334
  553. package/dist/node_modules/@tiptap/extension-list/dist/index.js +936 -1105
  554. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +43 -48
  555. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +53 -65
  556. package/dist/node_modules/@tiptap/extension-text/dist/index.js +12 -12
  557. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +60 -64
  558. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -462
  559. package/dist/node_modules/@tiptap/react/dist/index.js +314 -0
  560. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +23 -24
  561. package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -4
  562. package/dist/node_modules/country-flag-icons/modules/hasFlag.js +6 -6
  563. package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +5469 -6298
  564. package/dist/node_modules/country-flag-icons/react/3x2/index.js +273 -269
  565. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +5 -6
  566. package/dist/node_modules/date-fns/_lib/defaultOptions.js +6 -6
  567. package/dist/node_modules/date-fns/_lib/format/formatters.js +385 -544
  568. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +42 -57
  569. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +37 -48
  570. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +7 -17
  571. package/dist/node_modules/date-fns/_lib/normalizeDates.js +6 -9
  572. package/dist/node_modules/date-fns/_lib/protectedTokens.js +19 -16
  573. package/dist/node_modules/date-fns/addDays.js +8 -8
  574. package/dist/node_modules/date-fns/addMonths.js +11 -18
  575. package/dist/node_modules/date-fns/addWeeks.js +6 -6
  576. package/dist/node_modules/date-fns/constants.js +10 -6
  577. package/dist/node_modules/date-fns/constructFrom.js +6 -6
  578. package/dist/node_modules/date-fns/constructNow.js +6 -6
  579. package/dist/node_modules/date-fns/differenceInCalendarDays.js +10 -14
  580. package/dist/node_modules/date-fns/endOfDay.js +7 -7
  581. package/dist/node_modules/date-fns/endOfMonth.js +7 -7
  582. package/dist/node_modules/date-fns/format.js +57 -55
  583. package/dist/node_modules/date-fns/getDayOfYear.js +9 -9
  584. package/dist/node_modules/date-fns/getISOWeek.js +10 -10
  585. package/dist/node_modules/date-fns/getISOWeekYear.js +13 -13
  586. package/dist/node_modules/date-fns/getWeek.js +10 -10
  587. package/dist/node_modules/date-fns/getWeekYear.js +14 -14
  588. package/dist/node_modules/date-fns/isBefore.js +6 -6
  589. package/dist/node_modules/date-fns/isDate.js +5 -5
  590. package/dist/node_modules/date-fns/isPast.js +6 -6
  591. package/dist/node_modules/date-fns/isSameDay.js +8 -12
  592. package/dist/node_modules/date-fns/isSameMonth.js +7 -11
  593. package/dist/node_modules/date-fns/isSameWeek.js +8 -12
  594. package/dist/node_modules/date-fns/isSameYear.js +7 -11
  595. package/dist/node_modules/date-fns/isToday.js +7 -10
  596. package/dist/node_modules/date-fns/isValid.js +7 -7
  597. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
  598. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
  599. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
  600. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
  601. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +68 -69
  602. package/dist/node_modules/date-fns/locale/da/_lib/formatLong.js +31 -32
  603. package/dist/node_modules/date-fns/locale/da/_lib/formatRelative.js +11 -11
  604. package/dist/node_modules/date-fns/locale/da/_lib/localize.js +193 -142
  605. package/dist/node_modules/date-fns/locale/da/_lib/match.js +123 -109
  606. package/dist/node_modules/date-fns/locale/da.js +17 -17
  607. package/dist/node_modules/date-fns/locale/en-GB/_lib/formatLong.js +31 -32
  608. package/dist/node_modules/date-fns/locale/en-GB.js +18 -18
  609. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
  610. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
  611. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
  612. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
  613. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
  614. package/dist/node_modules/date-fns/locale/en-US.js +18 -18
  615. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +68 -69
  616. package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +31 -32
  617. package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +18 -18
  618. package/dist/node_modules/date-fns/locale/es/_lib/localize.js +192 -141
  619. package/dist/node_modules/date-fns/locale/es/_lib/match.js +127 -114
  620. package/dist/node_modules/date-fns/locale/es.js +18 -18
  621. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +161 -162
  622. package/dist/node_modules/date-fns/locale/et/_lib/formatLong.js +31 -32
  623. package/dist/node_modules/date-fns/locale/et/_lib/formatRelative.js +11 -11
  624. package/dist/node_modules/date-fns/locale/et/_lib/localize.js +196 -152
  625. package/dist/node_modules/date-fns/locale/et/_lib/match.js +109 -107
  626. package/dist/node_modules/date-fns/locale/et.js +19 -19
  627. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +101 -101
  628. package/dist/node_modules/date-fns/locale/fi/_lib/formatLong.js +31 -32
  629. package/dist/node_modules/date-fns/locale/fi/_lib/formatRelative.js +11 -11
  630. package/dist/node_modules/date-fns/locale/fi/_lib/localize.js +192 -140
  631. package/dist/node_modules/date-fns/locale/fi/_lib/match.js +122 -108
  632. package/dist/node_modules/date-fns/locale/fi.js +18 -18
  633. package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
  634. package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
  635. package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
  636. package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
  637. package/dist/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
  638. package/dist/node_modules/date-fns/locale/fr.js +18 -18
  639. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +93 -109
  640. package/dist/node_modules/date-fns/locale/lt/_lib/formatLong.js +31 -32
  641. package/dist/node_modules/date-fns/locale/lt/_lib/formatRelative.js +11 -11
  642. package/dist/node_modules/date-fns/locale/lt/_lib/localize.js +298 -195
  643. package/dist/node_modules/date-fns/locale/lt/_lib/match.js +154 -121
  644. package/dist/node_modules/date-fns/locale/lt.js +19 -19
  645. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +226 -120
  646. package/dist/node_modules/date-fns/locale/lv/_lib/formatLong.js +31 -32
  647. package/dist/node_modules/date-fns/locale/lv/_lib/formatRelative.js +22 -22
  648. package/dist/node_modules/date-fns/locale/lv/_lib/localize.js +298 -221
  649. package/dist/node_modules/date-fns/locale/lv/_lib/match.js +138 -112
  650. package/dist/node_modules/date-fns/locale/lv.js +18 -18
  651. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +68 -69
  652. package/dist/node_modules/date-fns/locale/nb/_lib/formatLong.js +31 -32
  653. package/dist/node_modules/date-fns/locale/nb/_lib/formatRelative.js +11 -11
  654. package/dist/node_modules/date-fns/locale/nb/_lib/localize.js +159 -108
  655. package/dist/node_modules/date-fns/locale/nb/_lib/match.js +112 -108
  656. package/dist/node_modules/date-fns/locale/nb.js +18 -18
  657. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +68 -69
  658. package/dist/node_modules/date-fns/locale/nl/_lib/formatLong.js +31 -32
  659. package/dist/node_modules/date-fns/locale/nl/_lib/formatRelative.js +11 -11
  660. package/dist/node_modules/date-fns/locale/nl/_lib/localize.js +160 -109
  661. package/dist/node_modules/date-fns/locale/nl/_lib/match.js +120 -108
  662. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatDistance.js +68 -69
  663. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatLong.js +31 -32
  664. package/dist/node_modules/date-fns/locale/nl-BE/_lib/formatRelative.js +11 -11
  665. package/dist/node_modules/date-fns/locale/nl-BE/_lib/localize.js +160 -109
  666. package/dist/node_modules/date-fns/locale/nl-BE/_lib/match.js +120 -108
  667. package/dist/node_modules/date-fns/locale/nl-BE.js +18 -18
  668. package/dist/node_modules/date-fns/locale/nl.js +18 -18
  669. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +82 -86
  670. package/dist/node_modules/date-fns/locale/sv/_lib/formatLong.js +31 -32
  671. package/dist/node_modules/date-fns/locale/sv/_lib/formatRelative.js +11 -11
  672. package/dist/node_modules/date-fns/locale/sv/_lib/localize.js +199 -142
  673. package/dist/node_modules/date-fns/locale/sv/_lib/match.js +109 -107
  674. package/dist/node_modules/date-fns/locale/sv.js +18 -18
  675. package/dist/node_modules/date-fns/startOfDay.js +7 -7
  676. package/dist/node_modules/date-fns/startOfISOWeek.js +9 -6
  677. package/dist/node_modules/date-fns/startOfISOWeekYear.js +9 -9
  678. package/dist/node_modules/date-fns/startOfMonth.js +7 -7
  679. package/dist/node_modules/date-fns/startOfWeek.js +8 -8
  680. package/dist/node_modules/date-fns/startOfWeekYear.js +10 -10
  681. package/dist/node_modules/date-fns/startOfYear.js +7 -7
  682. package/dist/node_modules/date-fns/subDays.js +6 -6
  683. package/dist/node_modules/date-fns/subMonths.js +6 -6
  684. package/dist/node_modules/date-fns/subWeeks.js +6 -6
  685. package/dist/node_modules/date-fns/toDate.js +6 -6
  686. package/dist/node_modules/fast-equals/dist/es/index.js +239 -298
  687. package/dist/node_modules/libphonenumber-js/es6/ParseError.js +116 -89
  688. package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +155 -183
  689. package/dist/node_modules/libphonenumber-js/es6/constants.js +4 -10
  690. package/dist/node_modules/libphonenumber-js/es6/format.js +70 -91
  691. package/dist/node_modules/libphonenumber-js/es6/getCountries.js +5 -5
  692. package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +8 -10
  693. package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +5 -5
  694. package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +19 -14
  695. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +9 -9
  696. package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +15 -17
  697. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +35 -45
  698. package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +20 -26
  699. package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +17 -22
  700. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +24 -36
  701. package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +26 -30
  702. package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +13 -21
  703. package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +10 -24
  704. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +10 -11
  705. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +6 -8
  706. package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +39 -39
  707. package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +9 -11
  708. package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +56 -47
  709. package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +12 -12
  710. package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +5 -5
  711. package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +5 -5
  712. package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +6 -6
  713. package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +9 -17
  714. package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +5 -5
  715. package/dist/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
  716. package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +46 -77
  717. package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +17 -18
  718. package/dist/node_modules/libphonenumber-js/es6/isPossible.js +29 -32
  719. package/dist/node_modules/libphonenumber-js/es6/isValid.js +12 -13
  720. package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +55 -52
  721. package/dist/node_modules/libphonenumber-js/es6/metadata.js +462 -482
  722. package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +97 -95
  723. package/dist/node_modules/libphonenumber-js/es6/parse.js +98 -133
  724. package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +43 -35
  725. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +8 -8
  726. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +51 -48
  727. package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +59 -55
  728. package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +13 -13
  729. package/dist/node_modules/libphonenumber-js/metadata.min.json.js +7437 -3
  730. package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +6 -6
  731. package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +6 -6
  732. package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +7 -7
  733. package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +6 -6
  734. package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +7 -7
  735. package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +6 -6
  736. package/dist/node_modules/linkifyjs/dist/linkify.js +486 -679
  737. package/dist/node_modules/next-themes/dist/index.js +120 -85
  738. package/dist/node_modules/orderedmap/dist/index.js +64 -100
  739. package/dist/node_modules/prosemirror-commands/dist/index.js +313 -368
  740. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +109 -84
  741. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +162 -195
  742. package/dist/node_modules/prosemirror-history/dist/index.js +203 -239
  743. package/dist/node_modules/prosemirror-keymap/dist/index.js +45 -57
  744. package/dist/node_modules/prosemirror-model/dist/index.js +1783 -2735
  745. package/dist/node_modules/prosemirror-schema-list/dist/index.js +66 -81
  746. package/dist/node_modules/prosemirror-state/dist/index.js +517 -814
  747. package/dist/node_modules/prosemirror-transform/dist/index.js +1104 -1505
  748. package/dist/node_modules/prosemirror-view/dist/index.js +3274 -3782
  749. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +15 -21
  750. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +12 -14
  751. package/dist/node_modules/react/compiler-runtime.js +10 -10
  752. package/dist/node_modules/rope-sequence/dist/index.js +82 -99
  753. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -58
  754. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -57
  755. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -58
  756. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -46
  757. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -10
  758. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -10
  759. package/dist/node_modules/w3c-keyname/index.js +87 -92
  760. package/dist/theme/component-recipes.js +52 -53
  761. package/dist/theme/theme-casper-ui.js +179 -420
  762. package/dist/theme/theme-helper.js +4 -4
  763. package/dist/theme/theme-provider.js +33 -34
  764. package/dist/theme/theme-style-props.d.ts.map +1 -1
  765. package/dist/theme/theme-tokens.js +22 -12
  766. package/dist/theme/theme-types.js +22 -12
  767. package/dist/theme/theme.js +213 -268
  768. package/package.json +30 -29
  769. package/dist/_virtual/compiler-runtime.js +0 -5
  770. package/dist/_virtual/compiler-runtime2.js +0 -4
  771. package/dist/_virtual/index.js +0 -5
  772. package/dist/_virtual/index2.js +0 -4
  773. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  774. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  775. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  776. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  777. package/dist/_virtual/with-selector.development.js +0 -4
  778. package/dist/_virtual/with-selector.js +0 -5
  779. package/dist/_virtual/with-selector.production.js +0 -4
  780. package/dist/_virtual/with-selector2.js +0 -4
  781. package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +0 -506
@@ -1,1499 +1,74 @@
1
- import { Node as yt, wrappingInputRule as xt, mergeAttributes as Nt } from "../../core/dist/index.js";
2
- import { createElement as Z } from "../../core/dist/jsx-runtime/jsx-runtime.js";
3
- function it(i, t, e) {
4
- for (let r = 0; ; r++) {
5
- if (r == i.childCount || r == t.childCount)
6
- return i.childCount == t.childCount ? null : e;
7
- let n = i.child(r), s = t.child(r);
8
- if (n == s) {
9
- e += n.nodeSize;
10
- continue;
11
- }
12
- if (!n.sameMarkup(s))
13
- return e;
14
- if (n.isText && n.text != s.text) {
15
- for (let o = 0; n.text[o] == s.text[o]; o++)
16
- e++;
17
- return e;
18
- }
19
- if (n.content.size || s.content.size) {
20
- let o = it(n.content, s.content, e + 1);
21
- if (o != null)
22
- return o;
23
- }
24
- e += n.nodeSize;
25
- }
26
- }
27
- function st(i, t, e, r) {
28
- for (let n = i.childCount, s = t.childCount; ; ) {
29
- if (n == 0 || s == 0)
30
- return n == s ? null : { a: e, b: r };
31
- let o = i.child(--n), a = t.child(--s), l = o.nodeSize;
32
- if (o == a) {
33
- e -= l, r -= l;
34
- continue;
35
- }
36
- if (!o.sameMarkup(a))
37
- return { a: e, b: r };
38
- if (o.isText && o.text != a.text) {
39
- let h = 0, u = Math.min(o.text.length, a.text.length);
40
- for (; h < u && o.text[o.text.length - h - 1] == a.text[a.text.length - h - 1]; )
41
- h++, e--, r--;
42
- return { a: e, b: r };
43
- }
44
- if (o.content.size || a.content.size) {
45
- let h = st(o.content, a.content, e - 1, r - 1);
46
- if (h)
47
- return h;
48
- }
49
- e -= l, r -= l;
50
- }
51
- }
52
- var g = class m {
53
- /**
54
- @internal
55
- */
56
- constructor(t, e) {
57
- if (this.content = t, this.size = e || 0, e == null)
58
- for (let r = 0; r < t.length; r++)
59
- this.size += t[r].nodeSize;
60
- }
61
- /**
62
- Invoke a callback for all descendant nodes between the given two
63
- positions (relative to start of this fragment). Doesn't descend
64
- into a node when the callback returns `false`.
65
- */
66
- nodesBetween(t, e, r, n = 0, s) {
67
- for (let o = 0, a = 0; a < e; o++) {
68
- let l = this.content[o], h = a + l.nodeSize;
69
- if (h > t && r(l, n + a, s || null, o) !== !1 && l.content.size) {
70
- let u = a + 1;
71
- l.nodesBetween(Math.max(0, t - u), Math.min(l.content.size, e - u), r, n + u);
72
- }
73
- a = h;
74
- }
75
- }
76
- /**
77
- Call the given callback for every descendant node. `pos` will be
78
- relative to the start of the fragment. The callback may return
79
- `false` to prevent traversal of a given node's children.
80
- */
81
- descendants(t) {
82
- this.nodesBetween(0, this.size, t);
83
- }
84
- /**
85
- Extract the text between `from` and `to`. See the same method on
86
- [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).
87
- */
88
- textBetween(t, e, r, n) {
89
- let s = "", o = !0;
90
- return this.nodesBetween(t, e, (a, l) => {
91
- let h = a.isText ? a.text.slice(Math.max(t, l) - l, e - l) : a.isLeaf ? n ? typeof n == "function" ? n(a) : n : a.type.spec.leafText ? a.type.spec.leafText(a) : "" : "";
92
- a.isBlock && (a.isLeaf && h || a.isTextblock) && r && (o ? o = !1 : s += r), s += h;
93
- }, 0), s;
94
- }
95
- /**
96
- Create a new fragment containing the combined content of this
97
- fragment and the other.
98
- */
99
- append(t) {
100
- if (!t.size)
101
- return this;
102
- if (!this.size)
103
- return t;
104
- let e = this.lastChild, r = t.firstChild, n = this.content.slice(), s = 0;
105
- for (e.isText && e.sameMarkup(r) && (n[n.length - 1] = e.withText(e.text + r.text), s = 1); s < t.content.length; s++)
106
- n.push(t.content[s]);
107
- return new m(n, this.size + t.size);
108
- }
109
- /**
110
- Cut out the sub-fragment between the two given positions.
111
- */
112
- cut(t, e = this.size) {
113
- if (t == 0 && e == this.size)
114
- return this;
115
- let r = [], n = 0;
116
- if (e > t)
117
- for (let s = 0, o = 0; o < e; s++) {
118
- let a = this.content[s], l = o + a.nodeSize;
119
- l > t && ((o < t || l > e) && (a.isText ? a = a.cut(Math.max(0, t - o), Math.min(a.text.length, e - o)) : a = a.cut(Math.max(0, t - o - 1), Math.min(a.content.size, e - o - 1))), r.push(a), n += a.nodeSize), o = l;
120
- }
121
- return new m(r, n);
122
- }
123
- /**
124
- @internal
125
- */
126
- cutByIndex(t, e) {
127
- return t == e ? m.empty : t == 0 && e == this.content.length ? this : new m(this.content.slice(t, e));
128
- }
129
- /**
130
- Create a new fragment in which the node at the given index is
131
- replaced by the given node.
132
- */
133
- replaceChild(t, e) {
134
- let r = this.content[t];
135
- if (r == e)
136
- return this;
137
- let n = this.content.slice(), s = this.size + e.nodeSize - r.nodeSize;
138
- return n[t] = e, new m(n, s);
139
- }
140
- /**
141
- Create a new fragment by prepending the given node to this
142
- fragment.
143
- */
144
- addToStart(t) {
145
- return new m([t].concat(this.content), this.size + t.nodeSize);
146
- }
147
- /**
148
- Create a new fragment by appending the given node to this
149
- fragment.
150
- */
151
- addToEnd(t) {
152
- return new m(this.content.concat(t), this.size + t.nodeSize);
153
- }
154
- /**
155
- Compare this fragment to another one.
156
- */
157
- eq(t) {
158
- if (this.content.length != t.content.length)
159
- return !1;
160
- for (let e = 0; e < this.content.length; e++)
161
- if (!this.content[e].eq(t.content[e]))
162
- return !1;
163
- return !0;
164
- }
165
- /**
166
- The first child of the fragment, or `null` if it is empty.
167
- */
168
- get firstChild() {
169
- return this.content.length ? this.content[0] : null;
170
- }
171
- /**
172
- The last child of the fragment, or `null` if it is empty.
173
- */
174
- get lastChild() {
175
- return this.content.length ? this.content[this.content.length - 1] : null;
176
- }
177
- /**
178
- The number of child nodes in this fragment.
179
- */
180
- get childCount() {
181
- return this.content.length;
182
- }
183
- /**
184
- Get the child node at the given index. Raise an error when the
185
- index is out of range.
186
- */
187
- child(t) {
188
- let e = this.content[t];
189
- if (!e)
190
- throw new RangeError("Index " + t + " out of range for " + this);
191
- return e;
192
- }
193
- /**
194
- Get the child node at the given index, if it exists.
195
- */
196
- maybeChild(t) {
197
- return this.content[t] || null;
198
- }
199
- /**
200
- Call `f` for every child node, passing the node, its offset
201
- into this parent node, and its index.
202
- */
203
- forEach(t) {
204
- for (let e = 0, r = 0; e < this.content.length; e++) {
205
- let n = this.content[e];
206
- t(n, r, e), r += n.nodeSize;
207
- }
208
- }
209
- /**
210
- Find the first position at which this fragment and another
211
- fragment differ, or `null` if they are the same.
212
- */
213
- findDiffStart(t, e = 0) {
214
- return it(this, t, e);
215
- }
216
- /**
217
- Find the first position, searching from the end, at which this
218
- fragment and the given fragment differ, or `null` if they are
219
- the same. Since this position will not be the same in both
220
- nodes, an object with two separate positions is returned.
221
- */
222
- findDiffEnd(t, e = this.size, r = t.size) {
223
- return st(this, t, e, r);
224
- }
225
- /**
226
- Find the index and inner offset corresponding to a given relative
227
- position in this fragment. The result object will be reused
228
- (overwritten) the next time the function is called. @internal
229
- */
230
- findIndex(t) {
231
- if (t == 0)
232
- return F(0, t);
233
- if (t == this.size)
234
- return F(this.content.length, t);
235
- if (t > this.size || t < 0)
236
- throw new RangeError(`Position ${t} outside of fragment (${this})`);
237
- for (let e = 0, r = 0; ; e++) {
238
- let n = this.child(e), s = r + n.nodeSize;
239
- if (s >= t)
240
- return s == t ? F(e + 1, s) : F(e, r);
241
- r = s;
242
- }
243
- }
244
- /**
245
- Return a debugging string that describes this fragment.
246
- */
247
- toString() {
248
- return "<" + this.toStringInner() + ">";
249
- }
250
- /**
251
- @internal
252
- */
253
- toStringInner() {
254
- return this.content.join(", ");
255
- }
256
- /**
257
- Create a JSON-serializeable representation of this fragment.
258
- */
259
- toJSON() {
260
- return this.content.length ? this.content.map((t) => t.toJSON()) : null;
261
- }
262
- /**
263
- Deserialize a fragment from its JSON representation.
264
- */
265
- static fromJSON(t, e) {
266
- if (!e)
267
- return m.empty;
268
- if (!Array.isArray(e))
269
- throw new RangeError("Invalid input for Fragment.fromJSON");
270
- return m.fromArray(e.map(t.nodeFromJSON));
271
- }
272
- /**
273
- Build a fragment from an array of nodes. Ensures that adjacent
274
- text nodes with the same marks are joined together.
275
- */
276
- static fromArray(t) {
277
- if (!t.length)
278
- return m.empty;
279
- let e, r = 0;
280
- for (let n = 0; n < t.length; n++) {
281
- let s = t[n];
282
- r += s.nodeSize, n && s.isText && t[n - 1].sameMarkup(s) ? (e || (e = t.slice(0, n)), e[e.length - 1] = s.withText(e[e.length - 1].text + s.text)) : e && e.push(s);
283
- }
284
- return new m(e || t, r);
285
- }
286
- /**
287
- Create a fragment from something that can be interpreted as a
288
- set of nodes. For `null`, it returns the empty fragment. For a
289
- fragment, the fragment itself. For a node or array of nodes, a
290
- fragment containing those nodes.
291
- */
292
- static from(t) {
293
- if (!t)
294
- return m.empty;
295
- if (t instanceof m)
296
- return t;
297
- if (Array.isArray(t))
298
- return this.fromArray(t);
299
- if (t.attrs)
300
- return new m([t], t.nodeSize);
301
- throw new RangeError("Can not convert " + t + " to a Fragment" + (t.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
302
- }
303
- };
304
- g.empty = new g([], 0);
305
- var H = { index: 0, offset: 0 };
306
- function F(i, t) {
307
- return H.index = i, H.offset = t, H;
308
- }
309
- var Rt = class extends Error {
310
- }, c = class y {
311
- /**
312
- Create a slice. When specifying a non-zero open depth, you must
313
- make sure that there are nodes of at least that depth at the
314
- appropriate side of the fragment—i.e. if the fragment is an
315
- empty paragraph node, `openStart` and `openEnd` can't be greater
316
- than 1.
317
-
318
- It is not necessary for the content of open nodes to conform to
319
- the schema's content constraints, though it should be a valid
320
- start/end/middle for such a node, depending on which sides are
321
- open.
322
- */
323
- constructor(t, e, r) {
324
- this.content = t, this.openStart = e, this.openEnd = r;
325
- }
326
- /**
327
- The size this slice would add when inserted into a document.
328
- */
329
- get size() {
330
- return this.content.size - this.openStart - this.openEnd;
331
- }
332
- /**
333
- @internal
334
- */
335
- insertAt(t, e) {
336
- let r = at(this.content, t + this.openStart, e, this.openStart + 1, this.openEnd + 1);
337
- return r && new y(r, this.openStart, this.openEnd);
338
- }
339
- /**
340
- @internal
341
- */
342
- removeBetween(t, e) {
343
- return new y(ot(this.content, t + this.openStart, e + this.openStart), this.openStart, this.openEnd);
344
- }
345
- /**
346
- Tests whether this slice is equal to another slice.
347
- */
348
- eq(t) {
349
- return this.content.eq(t.content) && this.openStart == t.openStart && this.openEnd == t.openEnd;
350
- }
351
- /**
352
- @internal
353
- */
354
- toString() {
355
- return this.content + "(" + this.openStart + "," + this.openEnd + ")";
356
- }
357
- /**
358
- Convert a slice to a JSON-serializable representation.
359
- */
360
- toJSON() {
361
- if (!this.content.size)
362
- return null;
363
- let t = { content: this.content.toJSON() };
364
- return this.openStart > 0 && (t.openStart = this.openStart), this.openEnd > 0 && (t.openEnd = this.openEnd), t;
365
- }
366
- /**
367
- Deserialize a slice from its JSON representation.
368
- */
369
- static fromJSON(t, e) {
370
- if (!e)
371
- return y.empty;
372
- let r = e.openStart || 0, n = e.openEnd || 0;
373
- if (typeof r != "number" || typeof n != "number")
374
- throw new RangeError("Invalid input for Slice.fromJSON");
375
- return new y(g.fromJSON(t, e.content), r, n);
376
- }
377
- /**
378
- Create a slice from a fragment by taking the maximum possible
379
- open value on both side of the fragment.
380
- */
381
- static maxOpen(t, e = !0) {
382
- let r = 0, n = 0;
383
- for (let s = t.firstChild; s && !s.isLeaf && (e || !s.type.spec.isolating); s = s.firstChild)
384
- r++;
385
- for (let s = t.lastChild; s && !s.isLeaf && (e || !s.type.spec.isolating); s = s.lastChild)
386
- n++;
387
- return new y(t, r, n);
388
- }
389
- };
390
- c.empty = new c(g.empty, 0, 0);
391
- function ot(i, t, e) {
392
- let { index: r, offset: n } = i.findIndex(t), s = i.maybeChild(r), { index: o, offset: a } = i.findIndex(e);
393
- if (n == t || s.isText) {
394
- if (a != e && !i.child(o).isText)
395
- throw new RangeError("Removing non-flat range");
396
- return i.cut(0, t).append(i.cut(e));
397
- }
398
- if (r != o)
399
- throw new RangeError("Removing non-flat range");
400
- return i.replaceChild(r, s.copy(ot(s.content, t - n - 1, e - n - 1)));
401
- }
402
- function at(i, t, e, r, n, s) {
403
- let { index: o, offset: a } = i.findIndex(t), l = i.maybeChild(o);
404
- if (a == t || l.isText)
405
- return s && r <= 0 && n <= 0 && !s.canReplace(o, o, e) ? null : i.cut(0, t).append(e).append(i.cut(t));
406
- let h = at(l.content, t - a - 1, e, o == 0 ? r - 1 : 0, o == i.childCount - 1 ? n - 1 : 0, l);
407
- return h && i.replaceChild(o, l.copy(h));
408
- }
409
- var lt = 65535, ht = Math.pow(2, 16);
410
- function Et(i, t) {
411
- return i + t * ht;
412
- }
413
- function j(i) {
414
- return i & lt;
415
- }
416
- function Ot(i) {
417
- return (i - (i & lt)) / ht;
418
- }
419
- var ut = 1, ct = 2, D = 4, ft = 8, _ = class {
420
- /**
421
- @internal
422
- */
423
- constructor(i, t, e) {
424
- this.pos = i, this.delInfo = t, this.recover = e;
425
- }
426
- /**
427
- Tells you whether the position was deleted, that is, whether the
428
- step removed the token on the side queried (via the `assoc`)
429
- argument from the document.
430
- */
431
- get deleted() {
432
- return (this.delInfo & ft) > 0;
433
- }
434
- /**
435
- Tells you whether the token before the mapped position was deleted.
436
- */
437
- get deletedBefore() {
438
- return (this.delInfo & (ut | D)) > 0;
439
- }
440
- /**
441
- True when the token after the mapped position was deleted.
442
- */
443
- get deletedAfter() {
444
- return (this.delInfo & (ct | D)) > 0;
445
- }
446
- /**
447
- Tells whether any of the steps mapped through deletes across the
448
- position (including both the token before and after the
449
- position).
450
- */
451
- get deletedAcross() {
452
- return (this.delInfo & D) > 0;
453
- }
454
- }, k = class x {
455
- /**
456
- Create a position map. The modifications to the document are
457
- represented as an array of numbers, in which each group of three
458
- represents a modified chunk as `[start, oldSize, newSize]`.
459
- */
460
- constructor(t, e = !1) {
461
- if (this.ranges = t, this.inverted = e, !t.length && x.empty)
462
- return x.empty;
463
- }
464
- /**
465
- @internal
466
- */
467
- recover(t) {
468
- let e = 0, r = j(t);
469
- if (!this.inverted)
470
- for (let n = 0; n < r; n++)
471
- e += this.ranges[n * 3 + 2] - this.ranges[n * 3 + 1];
472
- return this.ranges[r * 3] + e + Ot(t);
473
- }
474
- mapResult(t, e = 1) {
475
- return this._map(t, e, !1);
476
- }
477
- map(t, e = 1) {
478
- return this._map(t, e, !0);
479
- }
480
- /**
481
- @internal
482
- */
483
- _map(t, e, r) {
484
- let n = 0, s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
485
- for (let a = 0; a < this.ranges.length; a += 3) {
486
- let l = this.ranges[a] - (this.inverted ? n : 0);
487
- if (l > t)
488
- break;
489
- let h = this.ranges[a + s], u = this.ranges[a + o], S = l + h;
490
- if (t <= S) {
491
- let X = h ? t == l ? -1 : t == S ? 1 : e : e, O = l + n + (X < 0 ? 0 : u);
492
- if (r)
493
- return O;
494
- let v = t == (e < 0 ? l : S) ? null : Et(a / 3, t - l), Y = t == l ? ct : t == S ? ut : D;
495
- return (e < 0 ? t != l : t != S) && (Y |= ft), new _(O, Y, v);
496
- }
497
- n += u - h;
498
- }
499
- return r ? t + n : new _(t + n, 0, null);
500
- }
501
- /**
502
- @internal
503
- */
504
- touches(t, e) {
505
- let r = 0, n = j(e), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
506
- for (let a = 0; a < this.ranges.length; a += 3) {
507
- let l = this.ranges[a] - (this.inverted ? r : 0);
508
- if (l > t)
509
- break;
510
- let h = this.ranges[a + s], u = l + h;
511
- if (t <= u && a == n * 3)
512
- return !0;
513
- r += this.ranges[a + o] - h;
514
- }
515
- return !1;
516
- }
517
- /**
518
- Calls the given function on each of the changed ranges included in
519
- this map.
520
- */
521
- forEach(t) {
522
- let e = this.inverted ? 2 : 1, r = this.inverted ? 1 : 2;
523
- for (let n = 0, s = 0; n < this.ranges.length; n += 3) {
524
- let o = this.ranges[n], a = o - (this.inverted ? s : 0), l = o + (this.inverted ? 0 : s), h = this.ranges[n + e], u = this.ranges[n + r];
525
- t(a, a + h, l, l + u), s += u - h;
526
- }
527
- }
528
- /**
529
- Create an inverted version of this map. The result can be used to
530
- map positions in the post-step document to the pre-step document.
531
- */
532
- invert() {
533
- return new x(this.ranges, !this.inverted);
534
- }
535
- /**
536
- @internal
537
- */
538
- toString() {
539
- return (this.inverted ? "-" : "") + JSON.stringify(this.ranges);
540
- }
541
- /**
542
- Create a map that moves all positions by offset `n` (which may be
543
- negative). This can be useful when applying steps meant for a
544
- sub-document to a larger document, or vice-versa.
545
- */
546
- static offset(t) {
547
- return t == 0 ? x.empty : new x(t < 0 ? [0, -t, 0] : [0, 0, t]);
548
- }
549
- };
550
- k.empty = new k([]);
551
- var W = /* @__PURE__ */ Object.create(null), p = class {
552
- /**
553
- Get the step map that represents the changes made by this step,
554
- and which can be used to transform between positions in the old
555
- and the new document.
556
- */
557
- getMap() {
558
- return k.empty;
559
- }
560
- /**
561
- Try to merge this step with another one, to be applied directly
562
- after it. Returns the merged step when possible, null if the
563
- steps can't be merged.
564
- */
565
- merge(i) {
566
- return null;
567
- }
568
- /**
569
- Deserialize a step from its JSON representation. Will call
570
- through to the step class' own implementation of this method.
571
- */
572
- static fromJSON(i, t) {
573
- if (!t || !t.stepType)
574
- throw new RangeError("Invalid input for Step.fromJSON");
575
- let e = W[t.stepType];
576
- if (!e)
577
- throw new RangeError(`No step type ${t.stepType} defined`);
578
- return e.fromJSON(i, t);
579
- }
580
- /**
581
- To be able to serialize steps to JSON, each step needs a string
582
- ID to attach to its JSON representation. Use this method to
583
- register an ID for your step classes. Try to pick something
584
- that's unlikely to clash with steps from other modules.
585
- */
586
- static jsonID(i, t) {
587
- if (i in W)
588
- throw new RangeError("Duplicate use of step JSON ID " + i);
589
- return W[i] = t, t.prototype.jsonID = i, t;
590
- }
591
- }, d = class I {
592
- /**
593
- @internal
594
- */
595
- constructor(t, e) {
596
- this.doc = t, this.failed = e;
597
- }
598
- /**
599
- Create a successful step result.
600
- */
601
- static ok(t) {
602
- return new I(t, null);
603
- }
604
- /**
605
- Create a failed step result.
606
- */
607
- static fail(t) {
608
- return new I(null, t);
609
- }
610
- /**
611
- Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
612
- arguments. Create a successful result if it succeeds, and a
613
- failed one if it throws a `ReplaceError`.
614
- */
615
- static fromReplace(t, e, r, n) {
616
- try {
617
- return I.ok(t.replace(e, r, n));
618
- } catch (s) {
619
- if (s instanceof Rt)
620
- return I.fail(s.message);
621
- throw s;
622
- }
623
- }
624
- };
625
- function Q(i, t, e) {
626
- let r = [];
627
- for (let n = 0; n < i.childCount; n++) {
628
- let s = i.child(n);
629
- s.content.size && (s = s.copy(Q(s.content, t, s))), s.isInline && (s = t(s, e, n)), r.push(s);
630
- }
631
- return g.fromArray(r);
632
- }
633
- var pt = class z extends p {
634
- /**
635
- Create a mark step.
636
- */
637
- constructor(t, e, r) {
638
- super(), this.from = t, this.to = e, this.mark = r;
639
- }
640
- apply(t) {
641
- let e = t.slice(this.from, this.to), r = t.resolve(this.from), n = r.node(r.sharedDepth(this.to)), s = new c(Q(e.content, (o, a) => !o.isAtom || !a.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), n), e.openStart, e.openEnd);
642
- return d.fromReplace(t, this.from, this.to, s);
643
- }
644
- invert() {
645
- return new mt(this.from, this.to, this.mark);
646
- }
647
- map(t) {
648
- let e = t.mapResult(this.from, 1), r = t.mapResult(this.to, -1);
649
- return e.deleted && r.deleted || e.pos >= r.pos ? null : new z(e.pos, r.pos, this.mark);
650
- }
651
- merge(t) {
652
- return t instanceof z && t.mark.eq(this.mark) && this.from <= t.to && this.to >= t.from ? new z(Math.min(this.from, t.from), Math.max(this.to, t.to), this.mark) : null;
653
- }
654
- toJSON() {
655
- return {
656
- stepType: "addMark",
657
- mark: this.mark.toJSON(),
658
- from: this.from,
659
- to: this.to
660
- };
661
- }
662
- /**
663
- @internal
664
- */
665
- static fromJSON(t, e) {
666
- if (typeof e.from != "number" || typeof e.to != "number")
667
- throw new RangeError("Invalid input for AddMarkStep.fromJSON");
668
- return new z(e.from, e.to, t.markFromJSON(e.mark));
669
- }
670
- };
671
- p.jsonID("addMark", pt);
672
- var mt = class T extends p {
673
- /**
674
- Create a mark-removing step.
675
- */
676
- constructor(t, e, r) {
677
- super(), this.from = t, this.to = e, this.mark = r;
678
- }
679
- apply(t) {
680
- let e = t.slice(this.from, this.to), r = new c(Q(e.content, (n) => n.mark(this.mark.removeFromSet(n.marks)), t), e.openStart, e.openEnd);
681
- return d.fromReplace(t, this.from, this.to, r);
682
- }
683
- invert() {
684
- return new pt(this.from, this.to, this.mark);
685
- }
686
- map(t) {
687
- let e = t.mapResult(this.from, 1), r = t.mapResult(this.to, -1);
688
- return e.deleted && r.deleted || e.pos >= r.pos ? null : new T(e.pos, r.pos, this.mark);
689
- }
690
- merge(t) {
691
- return t instanceof T && t.mark.eq(this.mark) && this.from <= t.to && this.to >= t.from ? new T(Math.min(this.from, t.from), Math.max(this.to, t.to), this.mark) : null;
692
- }
693
- toJSON() {
694
- return {
695
- stepType: "removeMark",
696
- mark: this.mark.toJSON(),
697
- from: this.from,
698
- to: this.to
699
- };
700
- }
701
- /**
702
- @internal
703
- */
704
- static fromJSON(t, e) {
705
- if (typeof e.from != "number" || typeof e.to != "number")
706
- throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
707
- return new T(e.from, e.to, t.markFromJSON(e.mark));
708
- }
709
- };
710
- p.jsonID("removeMark", mt);
711
- var dt = class J extends p {
712
- /**
713
- Create a node mark step.
714
- */
715
- constructor(t, e) {
716
- super(), this.pos = t, this.mark = e;
717
- }
718
- apply(t) {
719
- let e = t.nodeAt(this.pos);
720
- if (!e)
721
- return d.fail("No node at mark step's position");
722
- let r = e.type.create(e.attrs, null, this.mark.addToSet(e.marks));
723
- return d.fromReplace(t, this.pos, this.pos + 1, new c(g.from(r), 0, e.isLeaf ? 0 : 1));
724
- }
725
- invert(t) {
726
- let e = t.nodeAt(this.pos);
727
- if (e) {
728
- let r = this.mark.addToSet(e.marks);
729
- if (r.length == e.marks.length) {
730
- for (let n = 0; n < e.marks.length; n++)
731
- if (!e.marks[n].isInSet(r))
732
- return new J(this.pos, e.marks[n]);
733
- return new J(this.pos, this.mark);
734
- }
735
- }
736
- return new St(this.pos, this.mark);
737
- }
738
- map(t) {
739
- let e = t.mapResult(this.pos, 1);
740
- return e.deletedAfter ? null : new J(e.pos, this.mark);
741
- }
742
- toJSON() {
743
- return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
744
- }
745
- /**
746
- @internal
747
- */
748
- static fromJSON(t, e) {
749
- if (typeof e.pos != "number")
750
- throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
751
- return new J(e.pos, t.markFromJSON(e.mark));
752
- }
753
- };
754
- p.jsonID("addNodeMark", dt);
755
- var St = class V extends p {
756
- /**
757
- Create a mark-removing step.
758
- */
759
- constructor(t, e) {
760
- super(), this.pos = t, this.mark = e;
761
- }
762
- apply(t) {
763
- let e = t.nodeAt(this.pos);
764
- if (!e)
765
- return d.fail("No node at mark step's position");
766
- let r = e.type.create(e.attrs, null, this.mark.removeFromSet(e.marks));
767
- return d.fromReplace(t, this.pos, this.pos + 1, new c(g.from(r), 0, e.isLeaf ? 0 : 1));
768
- }
769
- invert(t) {
770
- let e = t.nodeAt(this.pos);
771
- return !e || !this.mark.isInSet(e.marks) ? this : new dt(this.pos, this.mark);
772
- }
773
- map(t) {
774
- let e = t.mapResult(this.pos, 1);
775
- return e.deletedAfter ? null : new V(e.pos, this.mark);
776
- }
777
- toJSON() {
778
- return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
779
- }
780
- /**
781
- @internal
782
- */
783
- static fromJSON(t, e) {
784
- if (typeof e.pos != "number")
785
- throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
786
- return new V(e.pos, t.markFromJSON(e.mark));
787
- }
788
- };
789
- p.jsonID("removeNodeMark", St);
790
- var U = class w extends p {
791
- /**
792
- The given `slice` should fit the 'gap' between `from` and
793
- `to`—the depths must line up, and the surrounding nodes must be
794
- able to be joined with the open sides of the slice. When
795
- `structure` is true, the step will fail if the content between
796
- from and to is not just a sequence of closing and then opening
797
- tokens (this is to guard against rebased replace steps
798
- overwriting something they weren't supposed to).
799
- */
800
- constructor(t, e, r, n = !1) {
801
- super(), this.from = t, this.to = e, this.slice = r, this.structure = n;
802
- }
803
- apply(t) {
804
- return this.structure && G(t, this.from, this.to) ? d.fail("Structure replace would overwrite content") : d.fromReplace(t, this.from, this.to, this.slice);
805
- }
806
- getMap() {
807
- return new k([this.from, this.to - this.from, this.slice.size]);
808
- }
809
- invert(t) {
810
- return new w(this.from, this.from + this.slice.size, t.slice(this.from, this.to));
811
- }
812
- map(t) {
813
- let e = t.mapResult(this.to, -1), r = this.from == this.to && w.MAP_BIAS < 0 ? e : t.mapResult(this.from, 1);
814
- return r.deletedAcross && e.deletedAcross ? null : new w(r.pos, Math.max(r.pos, e.pos), this.slice, this.structure);
815
- }
816
- merge(t) {
817
- if (!(t instanceof w) || t.structure || this.structure)
818
- return null;
819
- if (this.from + this.slice.size == t.from && !this.slice.openEnd && !t.slice.openStart) {
820
- let e = this.slice.size + t.slice.size == 0 ? c.empty : new c(this.slice.content.append(t.slice.content), this.slice.openStart, t.slice.openEnd);
821
- return new w(this.from, this.to + (t.to - t.from), e, this.structure);
822
- } else if (t.to == this.from && !this.slice.openStart && !t.slice.openEnd) {
823
- let e = this.slice.size + t.slice.size == 0 ? c.empty : new c(t.slice.content.append(this.slice.content), t.slice.openStart, this.slice.openEnd);
824
- return new w(t.from, this.to, e, this.structure);
825
- } else
826
- return null;
827
- }
828
- toJSON() {
829
- let t = { stepType: "replace", from: this.from, to: this.to };
830
- return this.slice.size && (t.slice = this.slice.toJSON()), this.structure && (t.structure = !0), t;
831
- }
832
- /**
833
- @internal
834
- */
835
- static fromJSON(t, e) {
836
- if (typeof e.from != "number" || typeof e.to != "number")
837
- throw new RangeError("Invalid input for ReplaceStep.fromJSON");
838
- return new w(e.from, e.to, c.fromJSON(t, e.slice), !!e.structure);
839
- }
840
- };
841
- U.MAP_BIAS = 1;
842
- p.jsonID("replace", U);
843
- var gt = class q extends p {
844
- /**
845
- Create a replace-around step with the given range and gap.
846
- `insert` should be the point in the slice into which the content
847
- of the gap should be moved. `structure` has the same meaning as
848
- it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.
849
- */
850
- constructor(t, e, r, n, s, o, a = !1) {
851
- super(), this.from = t, this.to = e, this.gapFrom = r, this.gapTo = n, this.slice = s, this.insert = o, this.structure = a;
852
- }
853
- apply(t) {
854
- if (this.structure && (G(t, this.from, this.gapFrom) || G(t, this.gapTo, this.to)))
855
- return d.fail("Structure gap-replace would overwrite content");
856
- let e = t.slice(this.gapFrom, this.gapTo);
857
- if (e.openStart || e.openEnd)
858
- return d.fail("Gap is not a flat range");
859
- let r = this.slice.insertAt(this.insert, e.content);
860
- return r ? d.fromReplace(t, this.from, this.to, r) : d.fail("Content does not fit in gap");
861
- }
862
- getMap() {
863
- return new k([
864
- this.from,
865
- this.gapFrom - this.from,
866
- this.insert,
867
- this.gapTo,
868
- this.to - this.gapTo,
869
- this.slice.size - this.insert
870
- ]);
871
- }
872
- invert(t) {
873
- let e = this.gapTo - this.gapFrom;
874
- return new q(this.from, this.from + this.slice.size + e, this.from + this.insert, this.from + this.insert + e, t.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
875
- }
876
- map(t) {
877
- let e = t.mapResult(this.from, 1), r = t.mapResult(this.to, -1), n = this.from == this.gapFrom ? e.pos : t.map(this.gapFrom, -1), s = this.to == this.gapTo ? r.pos : t.map(this.gapTo, 1);
878
- return e.deletedAcross && r.deletedAcross || n < e.pos || s > r.pos ? null : new q(e.pos, r.pos, n, s, this.slice, this.insert, this.structure);
879
- }
880
- toJSON() {
881
- let t = {
882
- stepType: "replaceAround",
883
- from: this.from,
884
- to: this.to,
885
- gapFrom: this.gapFrom,
886
- gapTo: this.gapTo,
887
- insert: this.insert
888
- };
889
- return this.slice.size && (t.slice = this.slice.toJSON()), this.structure && (t.structure = !0), t;
890
- }
891
- /**
892
- @internal
893
- */
894
- static fromJSON(t, e) {
895
- if (typeof e.from != "number" || typeof e.to != "number" || typeof e.gapFrom != "number" || typeof e.gapTo != "number" || typeof e.insert != "number")
896
- throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
897
- return new q(e.from, e.to, e.gapFrom, e.gapTo, c.fromJSON(t, e.slice), e.insert, !!e.structure);
898
- }
899
- };
900
- p.jsonID("replaceAround", gt);
901
- function G(i, t, e) {
902
- let r = i.resolve(t), n = e - t, s = r.depth;
903
- for (; n > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
904
- s--, n--;
905
- if (n > 0) {
906
- let o = r.node(s).maybeChild(r.indexAfter(s));
907
- for (; n > 0; ) {
908
- if (!o || o.isLeaf)
909
- return !0;
910
- o = o.firstChild, n--;
911
- }
912
- }
913
- return !1;
914
- }
915
- var It = class L extends p {
916
- /**
917
- Construct an attribute step.
918
- */
919
- constructor(t, e, r) {
920
- super(), this.pos = t, this.attr = e, this.value = r;
921
- }
922
- apply(t) {
923
- let e = t.nodeAt(this.pos);
924
- if (!e)
925
- return d.fail("No node at attribute step's position");
926
- let r = /* @__PURE__ */ Object.create(null);
927
- for (let s in e.attrs)
928
- r[s] = e.attrs[s];
929
- r[this.attr] = this.value;
930
- let n = e.type.create(r, null, e.marks);
931
- return d.fromReplace(t, this.pos, this.pos + 1, new c(g.from(n), 0, e.isLeaf ? 0 : 1));
932
- }
933
- getMap() {
934
- return k.empty;
935
- }
936
- invert(t) {
937
- return new L(this.pos, this.attr, t.nodeAt(this.pos).attrs[this.attr]);
938
- }
939
- map(t) {
940
- let e = t.mapResult(this.pos, 1);
941
- return e.deletedAfter ? null : new L(e.pos, this.attr, this.value);
942
- }
943
- toJSON() {
944
- return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
945
- }
946
- static fromJSON(t, e) {
947
- if (typeof e.pos != "number" || typeof e.attr != "string")
948
- throw new RangeError("Invalid input for AttrStep.fromJSON");
949
- return new L(e.pos, e.attr, e.value);
950
- }
951
- };
952
- p.jsonID("attr", It);
953
- var zt = class K extends p {
954
- /**
955
- Construct an attribute step.
956
- */
957
- constructor(t, e) {
958
- super(), this.attr = t, this.value = e;
959
- }
960
- apply(t) {
961
- let e = /* @__PURE__ */ Object.create(null);
962
- for (let n in t.attrs)
963
- e[n] = t.attrs[n];
964
- e[this.attr] = this.value;
965
- let r = t.type.create(e, t.content, t.marks);
966
- return d.ok(r);
967
- }
968
- getMap() {
969
- return k.empty;
970
- }
971
- invert(t) {
972
- return new K(this.attr, t.attrs[this.attr]);
973
- }
974
- map(t) {
975
- return this;
976
- }
977
- toJSON() {
978
- return { stepType: "docAttr", attr: this.attr, value: this.value };
979
- }
980
- static fromJSON(t, e) {
981
- if (typeof e.attr != "string")
982
- throw new RangeError("Invalid input for DocAttrStep.fromJSON");
983
- return new K(e.attr, e.value);
984
- }
985
- };
986
- p.jsonID("docAttr", zt);
987
- var C = class extends Error {
988
- };
989
- C = function i(t) {
990
- let e = Error.call(this, t);
991
- return e.__proto__ = i.prototype, e;
992
- };
993
- C.prototype = Object.create(Error.prototype);
994
- C.prototype.constructor = C;
995
- C.prototype.name = "TransformError";
996
- var $ = /* @__PURE__ */ Object.create(null), f = class {
997
- /**
998
- Initialize a selection with the head and anchor and ranges. If no
999
- ranges are given, constructs a single range across `$anchor` and
1000
- `$head`.
1001
- */
1002
- constructor(i, t, e) {
1003
- this.$anchor = i, this.$head = t, this.ranges = e || [new Tt(i.min(t), i.max(t))];
1004
- }
1005
- /**
1006
- The selection's anchor, as an unresolved position.
1007
- */
1008
- get anchor() {
1009
- return this.$anchor.pos;
1010
- }
1011
- /**
1012
- The selection's head.
1013
- */
1014
- get head() {
1015
- return this.$head.pos;
1016
- }
1017
- /**
1018
- The lower bound of the selection's main range.
1019
- */
1020
- get from() {
1021
- return this.$from.pos;
1022
- }
1023
- /**
1024
- The upper bound of the selection's main range.
1025
- */
1026
- get to() {
1027
- return this.$to.pos;
1028
- }
1029
- /**
1030
- The resolved lower bound of the selection's main range.
1031
- */
1032
- get $from() {
1033
- return this.ranges[0].$from;
1034
- }
1035
- /**
1036
- The resolved upper bound of the selection's main range.
1037
- */
1038
- get $to() {
1039
- return this.ranges[0].$to;
1040
- }
1041
- /**
1042
- Indicates whether the selection contains any content.
1043
- */
1044
- get empty() {
1045
- let i = this.ranges;
1046
- for (let t = 0; t < i.length; t++)
1047
- if (i[t].$from.pos != i[t].$to.pos)
1048
- return !1;
1049
- return !0;
1050
- }
1051
- /**
1052
- Get the content of this selection as a slice.
1053
- */
1054
- content() {
1055
- return this.$from.doc.slice(this.from, this.to, !0);
1056
- }
1057
- /**
1058
- Replace the selection with a slice or, if no slice is given,
1059
- delete the selection. Will append to the given transaction.
1060
- */
1061
- replace(i, t = c.empty) {
1062
- let e = t.content.lastChild, r = null;
1063
- for (let o = 0; o < t.openEnd; o++)
1064
- r = e, e = e.lastChild;
1065
- let n = i.steps.length, s = this.ranges;
1066
- for (let o = 0; o < s.length; o++) {
1067
- let { $from: a, $to: l } = s[o], h = i.mapping.slice(n);
1068
- i.replaceRange(h.map(a.pos), h.map(l.pos), o ? c.empty : t), o == 0 && rt(i, n, (e ? e.isInline : r && r.isTextblock) ? -1 : 1);
1069
- }
1070
- }
1071
- /**
1072
- Replace the selection with the given node, appending the changes
1073
- to the given transaction.
1074
- */
1075
- replaceWith(i, t) {
1076
- let e = i.steps.length, r = this.ranges;
1077
- for (let n = 0; n < r.length; n++) {
1078
- let { $from: s, $to: o } = r[n], a = i.mapping.slice(e), l = a.map(s.pos), h = a.map(o.pos);
1079
- n ? i.deleteRange(l, h) : (i.replaceRangeWith(l, h, t), rt(i, e, t.isInline ? -1 : 1));
1080
- }
1081
- }
1082
- /**
1083
- Find a valid cursor or leaf node selection starting at the given
1084
- position and searching back if `dir` is negative, and forward if
1085
- positive. When `textOnly` is true, only consider cursor
1086
- selections. Will return null when no valid selection position is
1087
- found.
1088
- */
1089
- static findFrom(i, t, e = !1) {
1090
- let r = i.parent.inlineContent ? new R(i) : N(i.node(0), i.parent, i.pos, i.index(), t, e);
1091
- if (r)
1092
- return r;
1093
- for (let n = i.depth - 1; n >= 0; n--) {
1094
- let s = t < 0 ? N(i.node(0), i.node(n), i.before(n + 1), i.index(n), t, e) : N(i.node(0), i.node(n), i.after(n + 1), i.index(n) + 1, t, e);
1095
- if (s)
1096
- return s;
1097
- }
1098
- return null;
1099
- }
1100
- /**
1101
- Find a valid cursor or leaf node selection near the given
1102
- position. Searches forward first by default, but if `bias` is
1103
- negative, it will search backwards first.
1104
- */
1105
- static near(i, t = 1) {
1106
- return this.findFrom(i, t) || this.findFrom(i, -t) || new b(i.node(0));
1107
- }
1108
- /**
1109
- Find the cursor or leaf node selection closest to the start of
1110
- the given document. Will return an
1111
- [`AllSelection`](https://prosemirror.net/docs/ref/#state.AllSelection) if no valid position
1112
- exists.
1113
- */
1114
- static atStart(i) {
1115
- return N(i, i, 0, 0, 1) || new b(i);
1116
- }
1117
- /**
1118
- Find the cursor or leaf node selection closest to the end of the
1119
- given document.
1120
- */
1121
- static atEnd(i) {
1122
- return N(i, i, i.content.size, i.childCount, -1) || new b(i);
1123
- }
1124
- /**
1125
- Deserialize the JSON representation of a selection. Must be
1126
- implemented for custom classes (as a static class method).
1127
- */
1128
- static fromJSON(i, t) {
1129
- if (!t || !t.type)
1130
- throw new RangeError("Invalid input for Selection.fromJSON");
1131
- let e = $[t.type];
1132
- if (!e)
1133
- throw new RangeError(`No selection type ${t.type} defined`);
1134
- return e.fromJSON(i, t);
1135
- }
1136
- /**
1137
- To be able to deserialize selections from JSON, custom selection
1138
- classes must register themselves with an ID string, so that they
1139
- can be disambiguated. Try to pick something that's unlikely to
1140
- clash with classes from other modules.
1141
- */
1142
- static jsonID(i, t) {
1143
- if (i in $)
1144
- throw new RangeError("Duplicate use of selection JSON ID " + i);
1145
- return $[i] = t, t.prototype.jsonID = i, t;
1146
- }
1147
- /**
1148
- Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
1149
- which is a value that can be mapped without having access to a
1150
- current document, and later resolved to a real selection for a
1151
- given document again. (This is used mostly by the history to
1152
- track and restore old selections.) The default implementation of
1153
- this method just converts the selection to a text selection and
1154
- returns the bookmark for that.
1155
- */
1156
- getBookmark() {
1157
- return R.between(this.$anchor, this.$head).getBookmark();
1158
- }
1159
- };
1160
- f.prototype.visible = !0;
1161
- var Tt = class {
1162
- /**
1163
- Create a range.
1164
- */
1165
- constructor(i, t) {
1166
- this.$from = i, this.$to = t;
1167
- }
1168
- }, tt = !1;
1169
- function et(i) {
1170
- !tt && !i.parent.inlineContent && (tt = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + i.parent.type.name + ")"));
1171
- }
1172
- var R = class A extends f {
1173
- /**
1174
- Construct a text selection between the given points.
1175
- */
1176
- constructor(t, e = t) {
1177
- et(t), et(e), super(t, e);
1178
- }
1179
- /**
1180
- Returns a resolved position if this is a cursor selection (an
1181
- empty text selection), and null otherwise.
1182
- */
1183
- get $cursor() {
1184
- return this.$anchor.pos == this.$head.pos ? this.$head : null;
1185
- }
1186
- map(t, e) {
1187
- let r = t.resolve(e.map(this.head));
1188
- if (!r.parent.inlineContent)
1189
- return f.near(r);
1190
- let n = t.resolve(e.map(this.anchor));
1191
- return new A(n.parent.inlineContent ? n : r, r);
1192
- }
1193
- replace(t, e = c.empty) {
1194
- if (super.replace(t, e), e == c.empty) {
1195
- let r = this.$from.marksAcross(this.$to);
1196
- r && t.ensureMarks(r);
1197
- }
1198
- }
1199
- eq(t) {
1200
- return t instanceof A && t.anchor == this.anchor && t.head == this.head;
1201
- }
1202
- getBookmark() {
1203
- return new wt(this.anchor, this.head);
1204
- }
1205
- toJSON() {
1206
- return { type: "text", anchor: this.anchor, head: this.head };
1207
- }
1208
- /**
1209
- @internal
1210
- */
1211
- static fromJSON(t, e) {
1212
- if (typeof e.anchor != "number" || typeof e.head != "number")
1213
- throw new RangeError("Invalid input for TextSelection.fromJSON");
1214
- return new A(t.resolve(e.anchor), t.resolve(e.head));
1215
- }
1216
- /**
1217
- Create a text selection from non-resolved positions.
1218
- */
1219
- static create(t, e, r = e) {
1220
- let n = t.resolve(e);
1221
- return new this(n, r == e ? n : t.resolve(r));
1222
- }
1223
- /**
1224
- Return a text selection that spans the given positions or, if
1225
- they aren't text positions, find a text selection near them.
1226
- `bias` determines whether the method searches forward (default)
1227
- or backwards (negative number) first. Will fall back to calling
1228
- [`Selection.near`](https://prosemirror.net/docs/ref/#state.Selection^near) when the document
1229
- doesn't contain a valid text position.
1230
- */
1231
- static between(t, e, r) {
1232
- let n = t.pos - e.pos;
1233
- if ((!r || n) && (r = n >= 0 ? 1 : -1), !e.parent.inlineContent) {
1234
- let s = f.findFrom(e, r, !0) || f.findFrom(e, -r, !0);
1235
- if (s)
1236
- e = s.$head;
1237
- else
1238
- return f.near(e, r);
1239
- }
1240
- return t.parent.inlineContent || (n == 0 ? t = e : (t = (f.findFrom(t, -r, !0) || f.findFrom(t, r, !0)).$anchor, t.pos < e.pos != n < 0 && (t = e))), new A(t, e);
1241
- }
1242
- };
1243
- f.jsonID("text", R);
1244
- var wt = class kt {
1245
- constructor(t, e) {
1246
- this.anchor = t, this.head = e;
1247
- }
1248
- map(t) {
1249
- return new kt(t.map(this.anchor), t.map(this.head));
1250
- }
1251
- resolve(t) {
1252
- return R.between(t.resolve(this.anchor), t.resolve(this.head));
1253
- }
1254
- }, E = class M extends f {
1255
- /**
1256
- Create a node selection. Does not verify the validity of its
1257
- argument.
1258
- */
1259
- constructor(t) {
1260
- let e = t.nodeAfter, r = t.node(0).resolve(t.pos + e.nodeSize);
1261
- super(t, r), this.node = e;
1262
- }
1263
- map(t, e) {
1264
- let { deleted: r, pos: n } = e.mapResult(this.anchor), s = t.resolve(n);
1265
- return r ? f.near(s) : new M(s);
1266
- }
1267
- content() {
1268
- return new c(g.from(this.node), 0, 0);
1269
- }
1270
- eq(t) {
1271
- return t instanceof M && t.anchor == this.anchor;
1272
- }
1273
- toJSON() {
1274
- return { type: "node", anchor: this.anchor };
1275
- }
1276
- getBookmark() {
1277
- return new Jt(this.anchor);
1278
- }
1279
- /**
1280
- @internal
1281
- */
1282
- static fromJSON(t, e) {
1283
- if (typeof e.anchor != "number")
1284
- throw new RangeError("Invalid input for NodeSelection.fromJSON");
1285
- return new M(t.resolve(e.anchor));
1286
- }
1287
- /**
1288
- Create a node selection from non-resolved positions.
1289
- */
1290
- static create(t, e) {
1291
- return new M(t.resolve(e));
1292
- }
1293
- /**
1294
- Determines whether the given node may be selected as a node
1295
- selection.
1296
- */
1297
- static isSelectable(t) {
1298
- return !t.isText && t.type.spec.selectable !== !1;
1299
- }
1300
- };
1301
- E.prototype.visible = !1;
1302
- f.jsonID("node", E);
1303
- var Jt = class vt {
1304
- constructor(t) {
1305
- this.anchor = t;
1306
- }
1307
- map(t) {
1308
- let { deleted: e, pos: r } = t.mapResult(this.anchor);
1309
- return e ? new wt(r, r) : new vt(r);
1310
- }
1311
- resolve(t) {
1312
- let e = t.resolve(this.anchor), r = e.nodeAfter;
1313
- return r && E.isSelectable(r) ? new E(e) : f.near(e);
1314
- }
1315
- }, b = class P extends f {
1316
- /**
1317
- Create an all-selection over the given document.
1318
- */
1319
- constructor(t) {
1320
- super(t.resolve(0), t.resolve(t.content.size));
1321
- }
1322
- replace(t, e = c.empty) {
1323
- if (e == c.empty) {
1324
- t.delete(0, t.doc.content.size);
1325
- let r = f.atStart(t.doc);
1326
- r.eq(t.selection) || t.setSelection(r);
1327
- } else
1328
- super.replace(t, e);
1329
- }
1330
- toJSON() {
1331
- return { type: "all" };
1332
- }
1333
- /**
1334
- @internal
1335
- */
1336
- static fromJSON(t) {
1337
- return new P(t);
1338
- }
1339
- map(t) {
1340
- return new P(t);
1341
- }
1342
- eq(t) {
1343
- return t instanceof P;
1344
- }
1345
- getBookmark() {
1346
- return At;
1347
- }
1348
- };
1349
- f.jsonID("all", b);
1350
- var At = {
1351
- map() {
1352
- return this;
1353
- },
1354
- resolve(i) {
1355
- return new b(i);
1356
- }
1357
- };
1358
- function N(i, t, e, r, n, s = !1) {
1359
- if (t.inlineContent)
1360
- return R.create(i, e);
1361
- for (let o = r - (n > 0 ? 0 : 1); n > 0 ? o < t.childCount : o >= 0; o += n) {
1362
- let a = t.child(o);
1363
- if (a.isAtom) {
1364
- if (!s && E.isSelectable(a))
1365
- return E.create(i, e - (n < 0 ? a.nodeSize : 0));
1366
- } else {
1367
- let l = N(i, a, e + n, n < 0 ? a.childCount : 0, n, s);
1368
- if (l)
1369
- return l;
1370
- }
1371
- e += a.nodeSize * n;
1372
- }
1373
- return null;
1374
- }
1375
- function rt(i, t, e) {
1376
- let r = i.steps.length - 1;
1377
- if (r < t)
1378
- return;
1379
- let n = i.steps[r];
1380
- if (!(n instanceof U || n instanceof gt))
1381
- return;
1382
- let s = i.mapping.maps[r], o;
1383
- s.forEach((a, l, h, u) => {
1384
- o == null && (o = u);
1385
- }), i.setSelection(f.near(i.doc.resolve(o), e));
1386
- }
1387
- function nt(i, t) {
1388
- return !t || !i ? i : i.bind(t);
1389
- }
1390
- var B = class {
1391
- constructor(i, t, e) {
1392
- this.name = i, this.init = nt(t.init, e), this.apply = nt(t.apply, e);
1393
- }
1394
- };
1395
- new B("doc", {
1396
- init(i) {
1397
- return i.doc || i.schema.topNodeType.createAndFill();
1398
- },
1399
- apply(i) {
1400
- return i.doc;
1401
- }
1402
- }), new B("selection", {
1403
- init(i, t) {
1404
- return i.selection || f.atStart(t.doc);
1405
- },
1406
- apply(i) {
1407
- return i.selection;
1408
- }
1409
- }), new B("storedMarks", {
1410
- init(i) {
1411
- return i.storedMarks || null;
1412
- },
1413
- apply(i, t, e, r) {
1414
- return r.selection.$cursor ? i.storedMarks : null;
1415
- }
1416
- }), new B("scrollToSelection", {
1417
- init() {
1418
- return 0;
1419
- },
1420
- apply(i, t) {
1421
- return i.scrolledIntoView ? t + 1 : t;
1422
- }
1
+ import { Slice as e } from "../../../prosemirror-model/dist/index.js";
2
+ import { TextSelection as t } from "../../../prosemirror-state/dist/index.js";
3
+ import { Node as n, mergeAttributes as r, wrappingInputRule as i } from "../../core/dist/index.js";
4
+ import { createElement as a } from "../../core/dist/jsx-runtime/jsx-runtime.js";
5
+ //#region ../../node_modules/@tiptap/extension-blockquote/dist/index.js
6
+ var o = (n, r) => {
7
+ let { state: i } = n, { selection: a } = i;
8
+ if (!a.empty) return !1;
9
+ let { $from: o } = a;
10
+ if (o.parentOffset !== 0) return !1;
11
+ let s = o.depth - 1;
12
+ if (s < 0) return !1;
13
+ let c = o.node(s), l = o.index(s);
14
+ if (l === 0) return !1;
15
+ if (c.type === r) return n.commands.lift(r.name);
16
+ let u = c.child(l - 1);
17
+ if (u.type !== r || !u.lastChild?.isTextblock) return !1;
18
+ let d = o.before() - 1 - 1;
19
+ return n.commands.command(({ tr: n, dispatch: r }) => {
20
+ if (!r) return !0;
21
+ let i = o.parent.content, a = new e(i, 0, 0);
22
+ return n.replace(d, o.after(), a), n.setSelection(t.create(n.doc, d + i.size)), n.scrollIntoView(), r(n), !0;
23
+ });
24
+ }, s = /^\s*>\s$/, c = n.create({
25
+ name: "blockquote",
26
+ addOptions() {
27
+ return { HTMLAttributes: {} };
28
+ },
29
+ content: "block+",
30
+ group: "block",
31
+ defining: !0,
32
+ parseHTML() {
33
+ return [{ tag: "blockquote" }];
34
+ },
35
+ renderHTML({ HTMLAttributes: e }) {
36
+ return /* @__PURE__ */ a("blockquote", {
37
+ ...r(this.options.HTMLAttributes, e),
38
+ children: /* @__PURE__ */ a("slot", {})
39
+ });
40
+ },
41
+ parseMarkdown: (e, t) => {
42
+ let n = t.parseBlockChildren ?? t.parseChildren;
43
+ return t.createNode("blockquote", void 0, n(e.tokens || []));
44
+ },
45
+ renderMarkdown: (e, t) => {
46
+ if (!e.content) return "";
47
+ let n = [];
48
+ return e.content.forEach((e, r) => {
49
+ let i = (t.renderChild?.call(t, e, r) ?? t.renderChildren([e])).split("\n").map((e) => e.trim() === "" ? ">" : `> ${e}`);
50
+ n.push(i.join("\n"));
51
+ }), n.join("\n>\n");
52
+ },
53
+ addCommands() {
54
+ return {
55
+ setBlockquote: () => ({ commands: e }) => e.wrapIn(this.name),
56
+ toggleBlockquote: () => ({ commands: e }) => e.toggleWrap(this.name),
57
+ unsetBlockquote: () => ({ commands: e }) => e.lift(this.name)
58
+ };
59
+ },
60
+ addKeyboardShortcuts() {
61
+ return {
62
+ "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
63
+ Backspace: () => o(this.editor, this.type)
64
+ };
65
+ },
66
+ addInputRules() {
67
+ return [i({
68
+ find: s,
69
+ type: this.type
70
+ })];
71
+ }
1423
72
  });
1424
- var Mt = (i, t) => {
1425
- var e;
1426
- const { state: r, view: n } = i, { selection: s } = r;
1427
- if (!s.empty) return !1;
1428
- const { $from: o } = s;
1429
- if (o.parentOffset !== 0) return !1;
1430
- const a = o.depth - 1, l = o.node(a), h = o.index(a);
1431
- if (h === 0) return !1;
1432
- if (l.type === t)
1433
- return i.commands.lift(t.name);
1434
- const u = l.child(h - 1);
1435
- if (u.type !== t || !((e = u.lastChild) != null && e.isTextblock))
1436
- return !1;
1437
- const S = o.before(), O = S - 1 - 1, { tr: v } = r;
1438
- return v.delete(S, o.after()).insert(O, o.parent.content), v.setSelection(R.create(v.doc, O)), n.dispatch(v.scrollIntoView()), !0;
1439
- }, bt = /^\s*>\s$/, Bt = yt.create({
1440
- name: "blockquote",
1441
- addOptions() {
1442
- return {
1443
- HTMLAttributes: {}
1444
- };
1445
- },
1446
- content: "block+",
1447
- group: "block",
1448
- defining: !0,
1449
- parseHTML() {
1450
- return [{ tag: "blockquote" }];
1451
- },
1452
- renderHTML({ HTMLAttributes: i }) {
1453
- return /* @__PURE__ */ Z("blockquote", { ...Nt(this.options.HTMLAttributes, i), children: /* @__PURE__ */ Z("slot", {}) });
1454
- },
1455
- parseMarkdown: (i, t) => {
1456
- var e;
1457
- const r = (e = t.parseBlockChildren) != null ? e : t.parseChildren;
1458
- return t.createNode("blockquote", void 0, r(i.tokens || []));
1459
- },
1460
- renderMarkdown: (i, t) => {
1461
- if (!i.content)
1462
- return "";
1463
- const e = ">", r = [];
1464
- return i.content.forEach((n, s) => {
1465
- var o, a;
1466
- const u = ((a = (o = t.renderChild) == null ? void 0 : o.call(t, n, s)) != null ? a : t.renderChildren([n])).split(`
1467
- `).map((S) => S.trim() === "" ? e : `${e} ${S}`);
1468
- r.push(u.join(`
1469
- `));
1470
- }), r.join(`
1471
- ${e}
1472
- `);
1473
- },
1474
- addCommands() {
1475
- return {
1476
- setBlockquote: () => ({ commands: i }) => i.wrapIn(this.name),
1477
- toggleBlockquote: () => ({ commands: i }) => i.toggleWrap(this.name),
1478
- unsetBlockquote: () => ({ commands: i }) => i.lift(this.name)
1479
- };
1480
- },
1481
- addKeyboardShortcuts() {
1482
- return {
1483
- "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
1484
- Backspace: () => Mt(this.editor, this.type)
1485
- };
1486
- },
1487
- addInputRules() {
1488
- return [
1489
- xt({
1490
- find: bt,
1491
- type: this.type
1492
- })
1493
- ];
1494
- }
1495
- });
1496
- export {
1497
- Bt as Blockquote,
1498
- bt as inputRegex
1499
- };
73
+ //#endregion
74
+ export { c as Blockquote, s as inputRegex };