@youcan/celeste 0.6.97 → 0.6.98

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 (978) hide show
  1. package/dist/celeste.css +2034 -2034
  2. package/dist/cjs/alert.js +2 -112
  3. package/dist/cjs/alpha-slider.js +2 -3
  4. package/dist/cjs/badge.js +2 -59
  5. package/dist/cjs/button.js +2 -40
  6. package/dist/cjs/checkbox-card.js +2 -111
  7. package/dist/cjs/checkbox-label.js +2 -110
  8. package/dist/cjs/checkbox.js +2 -4
  9. package/dist/cjs/chunks/_plugin-vue_export-helper.js +12 -8
  10. package/dist/cjs/chunks/alert.js +103 -0
  11. package/dist/cjs/chunks/alpha-slider.js +110 -118
  12. package/dist/cjs/chunks/badge.js +59 -0
  13. package/dist/cjs/chunks/button.js +43 -0
  14. package/dist/cjs/chunks/checkbox-card.js +100 -0
  15. package/dist/cjs/chunks/checkbox-label.js +94 -0
  16. package/dist/cjs/chunks/checkbox.js +39 -37
  17. package/dist/cjs/chunks/clsx.js +17 -11
  18. package/dist/cjs/chunks/collapsible-content.js +29 -26
  19. package/dist/cjs/chunks/collapsible-trigger.js +26 -21
  20. package/dist/cjs/chunks/collapsible.js +30 -27
  21. package/dist/cjs/chunks/color-area.js +174 -0
  22. package/dist/cjs/chunks/color-picker.js +458 -0
  23. package/dist/cjs/chunks/color-swatch.js +65 -0
  24. package/dist/cjs/chunks/combobox-anchor.js +32 -30
  25. package/dist/cjs/chunks/combobox-empty.js +36 -0
  26. package/dist/cjs/chunks/combobox-group.js +43 -0
  27. package/dist/cjs/chunks/combobox-input.js +72 -0
  28. package/dist/cjs/chunks/combobox-item.js +95 -0
  29. package/dist/cjs/chunks/combobox-list.js +66 -0
  30. package/dist/cjs/chunks/combobox-root.js +50 -0
  31. package/dist/cjs/chunks/combobox-separator.js +36 -0
  32. package/dist/cjs/chunks/combobox-trigger.js +45 -0
  33. package/dist/cjs/chunks/combobox.js +199 -0
  34. package/dist/cjs/chunks/compact-button.js +44 -0
  35. package/dist/cjs/chunks/components.js +310 -0
  36. package/dist/cjs/chunks/content-divider.js +60 -0
  37. package/dist/cjs/chunks/core.js +325 -0
  38. package/dist/cjs/chunks/counter-input.js +74 -69
  39. package/dist/cjs/chunks/digit-input-group.js +34 -0
  40. package/dist/cjs/chunks/digit-input-slot.js +33 -0
  41. package/dist/cjs/chunks/digit-input.js +54 -0
  42. package/dist/cjs/chunks/dist.js +12213 -0
  43. package/dist/cjs/chunks/dist2.js +15565 -0
  44. package/dist/cjs/chunks/dropdown-menu-content.js +62 -0
  45. package/dist/cjs/chunks/dropdown-menu-group.js +30 -0
  46. package/dist/cjs/chunks/dropdown-menu-item.js +49 -0
  47. package/dist/cjs/chunks/dropdown-menu-label.js +34 -0
  48. package/dist/cjs/chunks/dropdown-menu-separator.js +31 -0
  49. package/dist/cjs/chunks/dropdown-menu-sub-content.js +59 -0
  50. package/dist/cjs/chunks/dropdown-menu-sub-trigger.js +45 -0
  51. package/dist/cjs/chunks/dropdown-menu-sub.js +27 -24
  52. package/dist/cjs/chunks/dropdown-menu-trigger.js +31 -0
  53. package/dist/cjs/chunks/dropdown-menu.js +38 -0
  54. package/dist/cjs/chunks/extra-settings.js +134 -0
  55. package/dist/cjs/chunks/fancy-button.js +42 -0
  56. package/dist/cjs/chunks/file-upload-area.js +139 -0
  57. package/dist/cjs/chunks/hint-text.js +38 -0
  58. package/dist/cjs/chunks/hue-slider.js +120 -0
  59. package/dist/cjs/chunks/label.js +64 -0
  60. package/dist/cjs/chunks/link-bubble.js +198 -0
  61. package/dist/cjs/chunks/link-button.js +48 -0
  62. package/dist/cjs/chunks/menus.js +1173 -0
  63. package/dist/cjs/chunks/modal-body.js +25 -0
  64. package/dist/cjs/chunks/modal-close.js +26 -21
  65. package/dist/cjs/chunks/modal-content.js +53 -0
  66. package/dist/cjs/chunks/modal-footer.js +25 -0
  67. package/dist/cjs/chunks/modal-header.js +83 -0
  68. package/dist/cjs/chunks/modal-trigger.js +26 -21
  69. package/dist/cjs/chunks/modal.js +28 -25
  70. package/dist/cjs/chunks/pagination-content.js +34 -0
  71. package/dist/cjs/chunks/pagination-ellipsis.js +37 -0
  72. package/dist/cjs/chunks/pagination-first.js +33 -31
  73. package/dist/cjs/chunks/pagination-item.js +36 -31
  74. package/dist/cjs/chunks/pagination-last.js +33 -31
  75. package/dist/cjs/chunks/pagination-next.js +33 -31
  76. package/dist/cjs/chunks/pagination-previous.js +33 -31
  77. package/dist/cjs/chunks/pagination.js +60 -0
  78. package/dist/cjs/chunks/popover-content.js +113 -0
  79. package/dist/cjs/chunks/popover-trigger.js +30 -0
  80. package/dist/cjs/chunks/popover.js +28 -25
  81. package/dist/cjs/chunks/progress-bar.js +73 -0
  82. package/dist/cjs/chunks/progress-circle.js +95 -0
  83. package/dist/cjs/chunks/radio-group-card.js +100 -0
  84. package/dist/cjs/chunks/radio-group-item.js +35 -33
  85. package/dist/cjs/chunks/radio-group-label.js +94 -0
  86. package/dist/cjs/chunks/radio-group.js +40 -38
  87. package/dist/cjs/chunks/rich-editor.js +5187 -0
  88. package/dist/cjs/chunks/scroll-area.js +46 -0
  89. package/dist/cjs/chunks/scroll-bar.js +37 -0
  90. package/dist/cjs/chunks/segmented-control-item.js +43 -0
  91. package/dist/cjs/chunks/segmented-control.js +43 -0
  92. package/dist/cjs/chunks/select-content.js +66 -0
  93. package/dist/cjs/chunks/select-group.js +26 -21
  94. package/dist/cjs/chunks/select-icon.js +27 -0
  95. package/dist/cjs/chunks/select-item.js +43 -0
  96. package/dist/cjs/chunks/select-label.js +35 -0
  97. package/dist/cjs/chunks/select-separator.js +31 -0
  98. package/dist/cjs/chunks/select-trigger.js +41 -0
  99. package/dist/cjs/chunks/select-value.js +35 -0
  100. package/dist/cjs/chunks/select.js +39 -37
  101. package/dist/cjs/chunks/sheet-close.js +32 -0
  102. package/dist/cjs/chunks/sheet-content.js +65 -0
  103. package/dist/cjs/chunks/sheet-description.js +34 -0
  104. package/dist/cjs/chunks/sheet-footer.js +25 -0
  105. package/dist/cjs/chunks/sheet-header.js +25 -0
  106. package/dist/cjs/chunks/sheet-title.js +34 -0
  107. package/dist/cjs/chunks/sheet-trigger.js +26 -21
  108. package/dist/cjs/chunks/sheet.js +28 -25
  109. package/dist/cjs/chunks/sidebar-content.js +24 -20
  110. package/dist/cjs/chunks/sidebar-element.js +32 -27
  111. package/dist/cjs/chunks/sidebar-footer.js +24 -20
  112. package/dist/cjs/chunks/sidebar-group-content.js +28 -0
  113. package/dist/cjs/chunks/sidebar-group-label.js +37 -28
  114. package/dist/cjs/chunks/sidebar-group.js +24 -20
  115. package/dist/cjs/chunks/sidebar-header.js +24 -20
  116. package/dist/cjs/chunks/sidebar-menu-action.js +38 -33
  117. package/dist/cjs/chunks/sidebar-menu-badge.js +42 -28
  118. package/dist/cjs/chunks/sidebar-menu-button.js +43 -38
  119. package/dist/cjs/chunks/sidebar-menu-item.js +24 -20
  120. package/dist/cjs/chunks/sidebar-menu-sub-button.js +46 -36
  121. package/dist/cjs/chunks/sidebar-menu-sub-item.js +24 -20
  122. package/dist/cjs/chunks/sidebar-menu-sub.js +24 -20
  123. package/dist/cjs/chunks/sidebar-menu.js +24 -20
  124. package/dist/cjs/chunks/sidebar-provider.js +73 -0
  125. package/dist/cjs/chunks/sidebar-trigger.js +38 -0
  126. package/dist/cjs/chunks/sidebar.js +67 -82
  127. package/dist/cjs/chunks/slider.js +50 -51
  128. package/dist/cjs/chunks/social-button.js +42 -0
  129. package/dist/cjs/chunks/sonner-alert.js +42 -0
  130. package/dist/cjs/chunks/sonner.js +1175 -1175
  131. package/dist/cjs/chunks/status-badge.js +50 -0
  132. package/dist/cjs/chunks/switch.js +39 -37
  133. package/dist/cjs/chunks/tab-menu-content.js +36 -0
  134. package/dist/cjs/chunks/tab-menu-item.js +44 -0
  135. package/dist/cjs/chunks/tab-menu-list.js +35 -0
  136. package/dist/cjs/chunks/tab-menu.js +36 -0
  137. package/dist/cjs/chunks/table-body.js +25 -0
  138. package/dist/cjs/chunks/table-caption.js +25 -0
  139. package/dist/cjs/chunks/table-cell.js +31 -0
  140. package/dist/cjs/chunks/table-footer.js +25 -0
  141. package/dist/cjs/chunks/table-head.js +31 -0
  142. package/dist/cjs/chunks/table-header.js +21 -19
  143. package/dist/cjs/chunks/table-row.js +34 -0
  144. package/dist/cjs/chunks/table.js +45 -0
  145. package/dist/cjs/chunks/table2.js +26 -0
  146. package/dist/cjs/chunks/tag.js +58 -0
  147. package/dist/cjs/chunks/text-input-affix.js +31 -0
  148. package/dist/cjs/chunks/text-input-button.js +39 -0
  149. package/dist/cjs/chunks/text-input.js +118 -0
  150. package/dist/cjs/chunks/textarea.js +61 -0
  151. package/dist/cjs/chunks/tooltip-content.js +108 -0
  152. package/dist/cjs/chunks/tooltip-provider.js +30 -25
  153. package/dist/cjs/chunks/tooltip-root.js +39 -35
  154. package/dist/cjs/chunks/tooltip-trigger.js +26 -22
  155. package/dist/cjs/chunks/tooltip.js +98 -83
  156. package/dist/cjs/chunks/use-color-model.js +943 -0
  157. package/dist/cjs/collapsible-content.js +2 -4
  158. package/dist/cjs/collapsible-trigger.js +2 -3
  159. package/dist/cjs/collapsible.js +2 -3
  160. package/dist/cjs/color-area.js +2 -176
  161. package/dist/cjs/color-picker.js +2 -518
  162. package/dist/cjs/color-swatch.js +2 -61
  163. package/dist/cjs/color.js +72 -70
  164. package/dist/cjs/combobox-anchor.js +2 -3
  165. package/dist/cjs/combobox-empty.js +2 -33
  166. package/dist/cjs/combobox-group.js +2 -43
  167. package/dist/cjs/combobox-input.js +2 -65
  168. package/dist/cjs/combobox-item.js +2 -111
  169. package/dist/cjs/combobox-list.js +2 -63
  170. package/dist/cjs/combobox-root.js +2 -42
  171. package/dist/cjs/combobox-separator.js +2 -33
  172. package/dist/cjs/combobox-trigger.js +2 -48
  173. package/dist/cjs/combobox.js +2 -240
  174. package/dist/cjs/command-group.js +36 -40
  175. package/dist/cjs/command-input.js +40 -40
  176. package/dist/cjs/command-item.js +30 -33
  177. package/dist/cjs/command-list.js +55 -51
  178. package/dist/cjs/command-root.js +50 -45
  179. package/dist/cjs/command-separator.js +30 -31
  180. package/dist/cjs/compact-button.js +2 -43
  181. package/dist/cjs/config.js +292 -127
  182. package/dist/cjs/content-divider.js +2 -3
  183. package/dist/cjs/counter-input.js +2 -4
  184. package/dist/cjs/crypto.js +3 -4
  185. package/dist/cjs/digit-input-group.js +2 -32
  186. package/dist/cjs/digit-input-slot.js +2 -29
  187. package/dist/cjs/digit-input.js +2 -47
  188. package/dist/cjs/dropdown-menu-content.js +2 -54
  189. package/dist/cjs/dropdown-menu-group.js +2 -25
  190. package/dist/cjs/dropdown-menu-item.js +2 -54
  191. package/dist/cjs/dropdown-menu-label.js +2 -32
  192. package/dist/cjs/dropdown-menu-separator.js +2 -26
  193. package/dist/cjs/dropdown-menu-sub-content.js +2 -51
  194. package/dist/cjs/dropdown-menu-sub-trigger.js +2 -45
  195. package/dist/cjs/dropdown-menu-sub.js +2 -3
  196. package/dist/cjs/dropdown-menu-trigger.js +2 -27
  197. package/dist/cjs/dropdown-menu.js +2 -36
  198. package/dist/cjs/extra-settings.js +2 -156
  199. package/dist/cjs/fancy-button.js +2 -38
  200. package/dist/cjs/file-upload-area.js +2 -146
  201. package/dist/cjs/hint-text.js +2 -37
  202. package/dist/cjs/hue-slider.js +2 -134
  203. package/dist/cjs/index.js +369 -520
  204. package/dist/cjs/label.js +2 -59
  205. package/dist/cjs/link-bubble.js +2 -242
  206. package/dist/cjs/link-button.js +2 -44
  207. package/dist/cjs/modal-body.js +2 -23
  208. package/dist/cjs/modal-close.js +2 -3
  209. package/dist/cjs/modal-content.js +2 -49
  210. package/dist/cjs/modal-footer.js +2 -23
  211. package/dist/cjs/modal-header.js +2 -82
  212. package/dist/cjs/modal-trigger.js +2 -3
  213. package/dist/cjs/modal.js +2 -3
  214. package/dist/cjs/pagination-content.js +2 -31
  215. package/dist/cjs/pagination-ellipsis.js +2 -35
  216. package/dist/cjs/pagination-first.js +2 -3
  217. package/dist/cjs/pagination-item.js +2 -3
  218. package/dist/cjs/pagination-last.js +2 -3
  219. package/dist/cjs/pagination-next.js +2 -3
  220. package/dist/cjs/pagination-previous.js +2 -3
  221. package/dist/cjs/pagination.js +2 -60
  222. package/dist/cjs/popover-content.js +2 -106
  223. package/dist/cjs/popover-trigger.js +2 -25
  224. package/dist/cjs/popover.js +2 -3
  225. package/dist/cjs/progress-bar.js +2 -85
  226. package/dist/cjs/progress-circle.js +2 -93
  227. package/dist/cjs/radio-group-card.js +2 -111
  228. package/dist/cjs/radio-group-item.js +2 -4
  229. package/dist/cjs/radio-group-label.js +2 -110
  230. package/dist/cjs/radio-group.js +2 -4
  231. package/dist/cjs/rich-editor.js +2 -430
  232. package/dist/cjs/scroll-area.js +2 -43
  233. package/dist/cjs/scroll-bar.js +2 -33
  234. package/dist/cjs/segmented-control-item.js +2 -40
  235. package/dist/cjs/segmented-control.js +2 -41
  236. package/dist/cjs/select-content.js +2 -62
  237. package/dist/cjs/select-group.js +2 -3
  238. package/dist/cjs/select-icon.js +2 -25
  239. package/dist/cjs/select-item.js +2 -45
  240. package/dist/cjs/select-label.js +2 -32
  241. package/dist/cjs/select-separator.js +2 -26
  242. package/dist/cjs/select-trigger.js +2 -41
  243. package/dist/cjs/select-value.js +2 -32
  244. package/dist/cjs/select.js +2 -3
  245. package/dist/cjs/sheet-close.js +2 -29
  246. package/dist/cjs/sheet-content.js +2 -61
  247. package/dist/cjs/sheet-description.js +2 -31
  248. package/dist/cjs/sheet-footer.js +2 -28
  249. package/dist/cjs/sheet-header.js +2 -23
  250. package/dist/cjs/sheet-title.js +2 -31
  251. package/dist/cjs/sheet-trigger.js +2 -3
  252. package/dist/cjs/sheet.js +2 -3
  253. package/dist/cjs/shims.js +0 -1
  254. package/dist/cjs/sidebar-content.js +2 -4
  255. package/dist/cjs/sidebar-element.js +2 -4
  256. package/dist/cjs/sidebar-footer.js +2 -4
  257. package/dist/cjs/sidebar-group-content.js +2 -24
  258. package/dist/cjs/sidebar-group-label.js +2 -4
  259. package/dist/cjs/sidebar-group.js +2 -4
  260. package/dist/cjs/sidebar-header.js +2 -4
  261. package/dist/cjs/sidebar-menu-action.js +2 -4
  262. package/dist/cjs/sidebar-menu-badge.js +2 -4
  263. package/dist/cjs/sidebar-menu-button.js +2 -4
  264. package/dist/cjs/sidebar-menu-item.js +2 -4
  265. package/dist/cjs/sidebar-menu-sub-button.js +2 -4
  266. package/dist/cjs/sidebar-menu-sub-item.js +2 -4
  267. package/dist/cjs/sidebar-menu-sub.js +2 -4
  268. package/dist/cjs/sidebar-menu.js +2 -4
  269. package/dist/cjs/sidebar-provider.js +2 -3
  270. package/dist/cjs/sidebar-separator.js +2 -3
  271. package/dist/cjs/sidebar-trigger.js +2 -34
  272. package/dist/cjs/sidebar.js +2 -4
  273. package/dist/cjs/slider.js +2 -4
  274. package/dist/cjs/social-button.js +2 -45
  275. package/dist/cjs/sonner-alert.js +2 -42
  276. package/dist/cjs/sonner.js +2 -3
  277. package/dist/cjs/status-badge.js +2 -50
  278. package/dist/cjs/switch.js +2 -4
  279. package/dist/cjs/tab-menu-content.js +2 -33
  280. package/dist/cjs/tab-menu-item.js +2 -45
  281. package/dist/cjs/tab-menu-list.js +2 -35
  282. package/dist/cjs/tab-menu.js +2 -33
  283. package/dist/cjs/table-body.js +2 -23
  284. package/dist/cjs/table-caption.js +2 -23
  285. package/dist/cjs/table-cell.js +2 -26
  286. package/dist/cjs/table-empty.js +2 -44
  287. package/dist/cjs/table-footer.js +2 -23
  288. package/dist/cjs/table-head.js +2 -24
  289. package/dist/cjs/table-header.js +2 -3
  290. package/dist/cjs/table-row.js +2 -32
  291. package/dist/cjs/table.js +2 -26
  292. package/dist/cjs/tag.js +2 -47
  293. package/dist/cjs/text-input-affix.js +2 -27
  294. package/dist/cjs/text-input-button.js +2 -32
  295. package/dist/cjs/text-input.js +2 -120
  296. package/dist/cjs/textarea.js +2 -57
  297. package/dist/cjs/tooltip-content.js +2 -94
  298. package/dist/cjs/tooltip-provider.js +2 -3
  299. package/dist/cjs/tooltip-root.js +2 -3
  300. package/dist/cjs/tooltip-trigger.js +2 -3
  301. package/dist/cjs/tooltip.js +2 -3
  302. package/dist/cjs/types.js +0 -1
  303. package/dist/cjs/use-color-model.js +3 -32
  304. package/dist/cjs/use-delegated-props.js +12 -10
  305. package/dist/cjs/use-sidebar.js +10 -9
  306. package/dist/cjs/use-user-select.js +37 -35
  307. package/dist/components/alert/alert.d.ts +14 -9
  308. package/dist/components/badge/badge.d.ts +4 -3
  309. package/dist/components/badge/status-badge.d.ts +4 -3
  310. package/dist/components/button/button.d.ts +5 -4
  311. package/dist/components/button/compact-button.d.ts +3 -2
  312. package/dist/components/button/fancy-button.d.ts +5 -4
  313. package/dist/components/button/link-button.d.ts +5 -4
  314. package/dist/components/button/social-button.d.ts +3 -2
  315. package/dist/components/checkbox/checkbox-card.d.ts +23 -21
  316. package/dist/components/checkbox/checkbox-label.d.ts +17 -16
  317. package/dist/components/checkbox/checkbox.d.ts +2 -1
  318. package/dist/components/collapsible/collapsible-content.d.ts +5 -4
  319. package/dist/components/collapsible/collapsible-trigger.d.ts +5 -4
  320. package/dist/components/collapsible/collapsible.d.ts +6 -5
  321. package/dist/components/color-picker/alpha-slider.d.ts +4 -5
  322. package/dist/components/color-picker/color-area.d.ts +2 -3
  323. package/dist/components/color-picker/color-picker.d.ts +5 -4
  324. package/dist/components/color-picker/color-swatch.d.ts +4 -3
  325. package/dist/components/color-picker/hue-slider.d.ts +7 -8
  326. package/dist/components/combobox/combobox-anchor.d.ts +7 -11
  327. package/dist/components/combobox/combobox-empty.d.ts +7 -11
  328. package/dist/components/combobox/combobox-group.d.ts +7 -11
  329. package/dist/components/combobox/combobox-input.d.ts +5 -3
  330. package/dist/components/combobox/combobox-item.d.ts +7 -5
  331. package/dist/components/combobox/combobox-list.d.ts +7 -11
  332. package/dist/components/combobox/combobox-root.d.ts +7 -11
  333. package/dist/components/combobox/combobox-separator.d.ts +7 -11
  334. package/dist/components/combobox/combobox-trigger.d.ts +5 -4
  335. package/dist/components/combobox/combobox.d.ts +9 -7
  336. package/dist/components/content-divider/content-divider.d.ts +3 -2
  337. package/dist/components/counter-input/counter-input.d.ts +2 -1
  338. package/dist/components/digit-input/digit-input-group.d.ts +7 -11
  339. package/dist/components/digit-input/digit-input-slot.d.ts +2 -1
  340. package/dist/components/digit-input/digit-input.d.ts +7 -11
  341. package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +7 -11
  342. package/dist/components/dropdown-menu/dropdown-menu-group.d.ts +7 -11
  343. package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +11 -13
  344. package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +7 -11
  345. package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +2 -1
  346. package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +7 -11
  347. package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +9 -12
  348. package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +7 -11
  349. package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +7 -11
  350. package/dist/components/dropdown-menu/dropdown-menu.d.ts +7 -11
  351. package/dist/components/file-upload/file-upload-area.d.ts +8 -9
  352. package/dist/components/hint-text/hint-text.d.ts +4 -3
  353. package/dist/components/label/label.d.ts +11 -14
  354. package/dist/components/modal/modal-body.d.ts +7 -11
  355. package/dist/components/modal/modal-close.d.ts +7 -11
  356. package/dist/components/modal/modal-content.d.ts +7 -11
  357. package/dist/components/modal/modal-footer.d.ts +7 -11
  358. package/dist/components/modal/modal-header.d.ts +3 -2
  359. package/dist/components/modal/modal-trigger.d.ts +7 -11
  360. package/dist/components/modal/modal.d.ts +7 -11
  361. package/dist/components/pagination/pagination-content.d.ts +6 -5
  362. package/dist/components/pagination/pagination-ellipsis.d.ts +5 -4
  363. package/dist/components/pagination/pagination-first.d.ts +5 -4
  364. package/dist/components/pagination/pagination-item.d.ts +5 -4
  365. package/dist/components/pagination/pagination-last.d.ts +5 -4
  366. package/dist/components/pagination/pagination-next.d.ts +5 -4
  367. package/dist/components/pagination/pagination-previous.d.ts +5 -4
  368. package/dist/components/pagination/pagination.d.ts +12 -9
  369. package/dist/components/popover/popover-content.d.ts +7 -5
  370. package/dist/components/popover/popover-trigger.d.ts +7 -11
  371. package/dist/components/popover/popover.d.ts +7 -11
  372. package/dist/components/progress/progress-bar.d.ts +10 -13
  373. package/dist/components/progress/progress-circle.d.ts +7 -11
  374. package/dist/components/radio-group/radio-group-card.d.ts +23 -21
  375. package/dist/components/radio-group/radio-group-item.d.ts +2 -1
  376. package/dist/components/radio-group/radio-group-label.d.ts +17 -16
  377. package/dist/components/radio-group/radio-group.d.ts +7 -11
  378. package/dist/components/rich-editor/extra-settings.d.ts +2 -1
  379. package/dist/components/rich-editor/link-bubble.d.ts +3 -4
  380. package/dist/components/rich-editor/rich-editor.d.ts +2 -1
  381. package/dist/components/scroll-area/scroll-area.d.ts +7 -11
  382. package/dist/components/scroll-area/scroll-bar.d.ts +2 -1
  383. package/dist/components/segmented-control/segmented-control-item.d.ts +7 -11
  384. package/dist/components/segmented-control/segmented-control.d.ts +7 -11
  385. package/dist/components/select/select-content.d.ts +7 -11
  386. package/dist/components/select/select-group.d.ts +7 -11
  387. package/dist/components/select/select-icon.d.ts +7 -11
  388. package/dist/components/select/select-item.d.ts +7 -11
  389. package/dist/components/select/select-label.d.ts +7 -11
  390. package/dist/components/select/select-separator.d.ts +2 -1
  391. package/dist/components/select/select-trigger.d.ts +7 -11
  392. package/dist/components/select/select-value.d.ts +7 -11
  393. package/dist/components/select/select.d.ts +7 -11
  394. package/dist/components/sheet/sheet-close.d.ts +5 -4
  395. package/dist/components/sheet/sheet-content.d.ts +5 -4
  396. package/dist/components/sheet/sheet-description.d.ts +5 -4
  397. package/dist/components/sheet/sheet-footer.d.ts +5 -4
  398. package/dist/components/sheet/sheet-header.d.ts +5 -4
  399. package/dist/components/sheet/sheet-title.d.ts +5 -4
  400. package/dist/components/sheet/sheet-trigger.d.ts +5 -4
  401. package/dist/components/sheet/sheet.d.ts +7 -11
  402. package/dist/components/sidebar/sidebar-content.d.ts +7 -11
  403. package/dist/components/sidebar/sidebar-element.d.ts +5 -4
  404. package/dist/components/sidebar/sidebar-footer.d.ts +5 -4
  405. package/dist/components/sidebar/sidebar-group-content.d.ts +7 -11
  406. package/dist/components/sidebar/sidebar-group-label.d.ts +7 -11
  407. package/dist/components/sidebar/sidebar-group.d.ts +7 -11
  408. package/dist/components/sidebar/sidebar-header.d.ts +5 -4
  409. package/dist/components/sidebar/sidebar-menu-action.d.ts +5 -4
  410. package/dist/components/sidebar/sidebar-menu-badge.d.ts +4 -3
  411. package/dist/components/sidebar/sidebar-menu-button.d.ts +7 -11
  412. package/dist/components/sidebar/sidebar-menu-item.d.ts +7 -11
  413. package/dist/components/sidebar/sidebar-menu-sub-button.d.ts +5 -4
  414. package/dist/components/sidebar/sidebar-menu-sub-item.d.ts +7 -11
  415. package/dist/components/sidebar/sidebar-menu-sub.d.ts +7 -11
  416. package/dist/components/sidebar/sidebar-menu.d.ts +7 -11
  417. package/dist/components/sidebar/sidebar-provider.d.ts +8 -12
  418. package/dist/components/sidebar/sidebar-separator.d.ts +2 -1
  419. package/dist/components/sidebar/sidebar-trigger.d.ts +2 -1
  420. package/dist/components/sidebar/sidebar.d.ts +7 -5
  421. package/dist/components/slider/slider.d.ts +2 -1
  422. package/dist/components/sonner/sonner-alert.d.ts +3 -2
  423. package/dist/components/sonner/sonner.d.ts +2 -1
  424. package/dist/components/switch/switch.d.ts +2 -1
  425. package/dist/components/tab-menu/tab-menu-content.d.ts +7 -11
  426. package/dist/components/tab-menu/tab-menu-item.d.ts +11 -13
  427. package/dist/components/tab-menu/tab-menu-list.d.ts +7 -11
  428. package/dist/components/tab-menu/tab-menu.d.ts +7 -11
  429. package/dist/components/table/table-body.d.ts +5 -4
  430. package/dist/components/table/table-caption.d.ts +5 -4
  431. package/dist/components/table/table-cell.d.ts +6 -5
  432. package/dist/components/table/table-empty.d.ts +5 -4
  433. package/dist/components/table/table-footer.d.ts +5 -4
  434. package/dist/components/table/table-head.d.ts +6 -5
  435. package/dist/components/table/table-header.d.ts +5 -4
  436. package/dist/components/table/table-row.d.ts +5 -4
  437. package/dist/components/table/table.d.ts +5 -4
  438. package/dist/components/tag/tag.d.ts +5 -4
  439. package/dist/components/text-input/text-input-affix.d.ts +7 -11
  440. package/dist/components/text-input/text-input-button.d.ts +7 -11
  441. package/dist/components/text-input/text-input.d.ts +21 -15
  442. package/dist/components/textarea/textarea.d.ts +9 -8
  443. package/dist/components/tooltip/tooltip-content.d.ts +5 -4
  444. package/dist/components/tooltip/tooltip-provider.d.ts +5 -4
  445. package/dist/components/tooltip/tooltip-root.d.ts +5 -4
  446. package/dist/components/tooltip/tooltip-trigger.d.ts +5 -4
  447. package/dist/components/tooltip/tooltip.d.ts +5 -4
  448. package/dist/esm/alert.js +2 -0
  449. package/dist/esm/alpha-slider.js +2 -0
  450. package/dist/esm/badge.js +2 -0
  451. package/dist/esm/button.js +2 -0
  452. package/dist/esm/checkbox-card.js +2 -0
  453. package/dist/esm/checkbox-label.js +2 -0
  454. package/dist/esm/checkbox.js +2 -0
  455. package/dist/esm/chunks/_plugin-vue_export-helper.js +8 -0
  456. package/dist/esm/chunks/alert.js +96 -0
  457. package/dist/esm/chunks/alpha-slider.js +113 -0
  458. package/dist/esm/chunks/badge.js +52 -0
  459. package/dist/esm/chunks/button.js +36 -0
  460. package/dist/esm/chunks/checkbox-card.js +94 -0
  461. package/dist/esm/chunks/checkbox-label.js +88 -0
  462. package/dist/esm/chunks/checkbox.js +35 -0
  463. package/dist/esm/chunks/clsx.js +16 -0
  464. package/dist/esm/chunks/collapsible-content.js +25 -0
  465. package/dist/esm/chunks/collapsible-trigger.js +22 -0
  466. package/dist/esm/chunks/collapsible.js +26 -0
  467. package/dist/esm/chunks/color-area.js +166 -0
  468. package/dist/esm/chunks/color-picker.js +452 -0
  469. package/dist/esm/chunks/color-swatch.js +58 -0
  470. package/dist/esm/chunks/combobox-anchor.js +28 -0
  471. package/dist/esm/chunks/combobox-empty.js +29 -0
  472. package/dist/esm/chunks/combobox-group.js +36 -0
  473. package/dist/esm/chunks/combobox-input.js +65 -0
  474. package/dist/esm/chunks/combobox-item.js +89 -0
  475. package/dist/esm/chunks/combobox-list.js +59 -0
  476. package/dist/esm/chunks/combobox-root.js +43 -0
  477. package/dist/esm/chunks/combobox-separator.js +29 -0
  478. package/dist/esm/chunks/combobox-trigger.js +38 -0
  479. package/dist/esm/chunks/combobox.js +193 -0
  480. package/dist/esm/chunks/compact-button.js +37 -0
  481. package/dist/esm/chunks/components.js +299 -0
  482. package/dist/esm/chunks/content-divider.js +55 -0
  483. package/dist/esm/chunks/core.js +289 -0
  484. package/dist/esm/chunks/counter-input.js +70 -0
  485. package/dist/esm/chunks/digit-input-group.js +27 -0
  486. package/dist/esm/chunks/digit-input-slot.js +26 -0
  487. package/dist/esm/chunks/digit-input.js +47 -0
  488. package/dist/esm/chunks/dist.js +11525 -0
  489. package/dist/esm/chunks/dist2.js +15302 -0
  490. package/dist/esm/chunks/dropdown-menu-content.js +55 -0
  491. package/dist/esm/chunks/dropdown-menu-group.js +23 -0
  492. package/dist/esm/chunks/dropdown-menu-item.js +43 -0
  493. package/dist/esm/chunks/dropdown-menu-label.js +27 -0
  494. package/dist/esm/chunks/dropdown-menu-separator.js +24 -0
  495. package/dist/esm/chunks/dropdown-menu-sub-content.js +52 -0
  496. package/dist/esm/chunks/dropdown-menu-sub-trigger.js +39 -0
  497. package/dist/esm/chunks/dropdown-menu-sub.js +23 -0
  498. package/dist/esm/chunks/dropdown-menu-trigger.js +24 -0
  499. package/dist/esm/chunks/dropdown-menu.js +31 -0
  500. package/dist/esm/chunks/extra-settings.js +127 -0
  501. package/dist/esm/chunks/fancy-button.js +35 -0
  502. package/dist/esm/chunks/file-upload-area.js +132 -0
  503. package/dist/esm/chunks/hint-text.js +31 -0
  504. package/dist/esm/chunks/hue-slider.js +113 -0
  505. package/dist/esm/chunks/label.js +58 -0
  506. package/dist/esm/chunks/link-bubble.js +191 -0
  507. package/dist/esm/chunks/link-button.js +41 -0
  508. package/dist/esm/chunks/menus.js +1173 -0
  509. package/dist/esm/chunks/modal-body.js +17 -0
  510. package/dist/esm/chunks/modal-close.js +22 -0
  511. package/dist/esm/chunks/modal-content.js +46 -0
  512. package/dist/esm/chunks/modal-footer.js +17 -0
  513. package/dist/esm/chunks/modal-header.js +77 -0
  514. package/dist/esm/chunks/modal-trigger.js +22 -0
  515. package/dist/esm/chunks/modal.js +24 -0
  516. package/dist/esm/chunks/pagination-content.js +27 -0
  517. package/dist/esm/chunks/pagination-ellipsis.js +30 -0
  518. package/dist/esm/chunks/pagination-first.js +29 -0
  519. package/dist/esm/chunks/pagination-item.js +32 -0
  520. package/dist/esm/chunks/pagination-last.js +29 -0
  521. package/dist/esm/chunks/pagination-next.js +29 -0
  522. package/dist/esm/chunks/pagination-previous.js +29 -0
  523. package/dist/esm/chunks/pagination.js +54 -0
  524. package/dist/esm/chunks/popover-content.js +107 -0
  525. package/dist/esm/chunks/popover-trigger.js +23 -0
  526. package/dist/esm/chunks/popover.js +24 -0
  527. package/dist/esm/chunks/progress-bar.js +67 -0
  528. package/dist/esm/chunks/progress-circle.js +89 -0
  529. package/dist/esm/chunks/radio-group-card.js +94 -0
  530. package/dist/esm/chunks/radio-group-item.js +31 -0
  531. package/dist/esm/chunks/radio-group-label.js +88 -0
  532. package/dist/esm/chunks/radio-group.js +36 -0
  533. package/dist/esm/chunks/rich-editor.js +5180 -0
  534. package/dist/esm/chunks/scroll-area.js +39 -0
  535. package/dist/esm/chunks/scroll-bar.js +30 -0
  536. package/dist/esm/chunks/segmented-control-item.js +36 -0
  537. package/dist/esm/chunks/segmented-control.js +36 -0
  538. package/dist/esm/chunks/select-content.js +59 -0
  539. package/dist/esm/chunks/select-group.js +22 -0
  540. package/dist/esm/chunks/select-icon.js +19 -0
  541. package/dist/esm/chunks/select-item.js +36 -0
  542. package/dist/esm/chunks/select-label.js +28 -0
  543. package/dist/esm/chunks/select-separator.js +24 -0
  544. package/dist/esm/chunks/select-trigger.js +34 -0
  545. package/dist/esm/chunks/select-value.js +28 -0
  546. package/dist/esm/chunks/select.js +35 -0
  547. package/dist/esm/chunks/sheet-close.js +25 -0
  548. package/dist/esm/chunks/sheet-content.js +58 -0
  549. package/dist/esm/chunks/sheet-description.js +27 -0
  550. package/dist/esm/chunks/sheet-footer.js +17 -0
  551. package/dist/esm/chunks/sheet-header.js +17 -0
  552. package/dist/esm/chunks/sheet-title.js +27 -0
  553. package/dist/esm/chunks/sheet-trigger.js +22 -0
  554. package/dist/esm/chunks/sheet.js +24 -0
  555. package/dist/esm/chunks/sidebar-content.js +19 -0
  556. package/dist/esm/chunks/sidebar-element.js +28 -0
  557. package/dist/esm/chunks/sidebar-footer.js +19 -0
  558. package/dist/esm/chunks/sidebar-group-content.js +20 -0
  559. package/dist/esm/chunks/sidebar-group-label.js +33 -0
  560. package/dist/esm/chunks/sidebar-group.js +19 -0
  561. package/dist/esm/chunks/sidebar-header.js +19 -0
  562. package/dist/esm/chunks/sidebar-menu-action.js +34 -0
  563. package/dist/esm/chunks/sidebar-menu-badge.js +37 -0
  564. package/dist/esm/chunks/sidebar-menu-button.js +39 -0
  565. package/dist/esm/chunks/sidebar-menu-item.js +19 -0
  566. package/dist/esm/chunks/sidebar-menu-sub-button.js +42 -0
  567. package/dist/esm/chunks/sidebar-menu-sub-item.js +19 -0
  568. package/dist/esm/chunks/sidebar-menu-sub.js +19 -0
  569. package/dist/esm/chunks/sidebar-menu.js +19 -0
  570. package/dist/esm/chunks/sidebar-provider.js +67 -0
  571. package/dist/esm/chunks/sidebar-trigger.js +30 -0
  572. package/dist/esm/chunks/sidebar.js +63 -0
  573. package/dist/esm/chunks/slider.js +46 -0
  574. package/dist/esm/chunks/social-button.js +36 -0
  575. package/dist/esm/chunks/sonner-alert.js +34 -0
  576. package/dist/esm/chunks/sonner.js +1210 -0
  577. package/dist/esm/chunks/status-badge.js +43 -0
  578. package/dist/esm/chunks/switch.js +35 -0
  579. package/dist/esm/chunks/tab-menu-content.js +29 -0
  580. package/dist/esm/chunks/tab-menu-item.js +38 -0
  581. package/dist/esm/chunks/tab-menu-list.js +28 -0
  582. package/dist/esm/chunks/tab-menu.js +29 -0
  583. package/dist/esm/chunks/table-body.js +17 -0
  584. package/dist/esm/chunks/table-caption.js +17 -0
  585. package/dist/esm/chunks/table-cell.js +23 -0
  586. package/dist/esm/chunks/table-footer.js +17 -0
  587. package/dist/esm/chunks/table-head.js +23 -0
  588. package/dist/esm/chunks/table-header.js +16 -0
  589. package/dist/esm/chunks/table-row.js +26 -0
  590. package/dist/esm/chunks/table.js +38 -0
  591. package/dist/esm/chunks/table2.js +19 -0
  592. package/dist/esm/chunks/tag.js +52 -0
  593. package/dist/esm/chunks/text-input-affix.js +23 -0
  594. package/dist/esm/chunks/text-input-button.js +31 -0
  595. package/dist/esm/chunks/text-input.js +112 -0
  596. package/dist/esm/chunks/textarea.js +54 -0
  597. package/dist/esm/chunks/tooltip-content.js +102 -0
  598. package/dist/esm/chunks/tooltip-provider.js +26 -0
  599. package/dist/esm/chunks/tooltip-root.js +35 -0
  600. package/dist/esm/chunks/tooltip-trigger.js +22 -0
  601. package/dist/esm/chunks/tooltip.js +94 -0
  602. package/dist/esm/chunks/use-color-model.js +925 -0
  603. package/dist/esm/collapsible-content.js +2 -0
  604. package/dist/esm/collapsible-trigger.js +2 -0
  605. package/dist/esm/collapsible.js +2 -0
  606. package/dist/esm/color-area.js +2 -0
  607. package/dist/esm/color-picker.js +2 -0
  608. package/dist/esm/color-swatch.js +2 -0
  609. package/dist/esm/color.js +92 -0
  610. package/dist/esm/combobox-anchor.js +2 -0
  611. package/dist/esm/combobox-empty.js +2 -0
  612. package/dist/esm/combobox-group.js +2 -0
  613. package/dist/esm/combobox-input.js +2 -0
  614. package/dist/esm/combobox-item.js +2 -0
  615. package/dist/esm/combobox-list.js +2 -0
  616. package/dist/esm/combobox-root.js +2 -0
  617. package/dist/esm/combobox-separator.js +2 -0
  618. package/dist/esm/combobox-trigger.js +2 -0
  619. package/dist/esm/combobox.js +2 -0
  620. package/dist/esm/command-group.js +35 -0
  621. package/dist/esm/command-input.js +41 -0
  622. package/dist/esm/command-item.js +31 -0
  623. package/dist/esm/command-list.js +56 -0
  624. package/dist/esm/command-root.js +51 -0
  625. package/dist/esm/command-separator.js +29 -0
  626. package/dist/esm/compact-button.js +2 -0
  627. package/dist/esm/config.js +298 -0
  628. package/dist/esm/content-divider.js +2 -0
  629. package/dist/esm/counter-input.js +2 -0
  630. package/dist/esm/crypto.js +6 -0
  631. package/dist/esm/digit-input-group.js +2 -0
  632. package/dist/esm/digit-input-slot.js +2 -0
  633. package/dist/esm/digit-input.js +2 -0
  634. package/dist/esm/dropdown-menu-content.js +2 -0
  635. package/dist/esm/dropdown-menu-group.js +2 -0
  636. package/dist/esm/dropdown-menu-item.js +2 -0
  637. package/dist/esm/dropdown-menu-label.js +2 -0
  638. package/dist/esm/dropdown-menu-separator.js +2 -0
  639. package/dist/esm/dropdown-menu-sub-content.js +2 -0
  640. package/dist/esm/dropdown-menu-sub-trigger.js +2 -0
  641. package/dist/esm/dropdown-menu-sub.js +2 -0
  642. package/dist/esm/dropdown-menu-trigger.js +2 -0
  643. package/dist/esm/dropdown-menu.js +2 -0
  644. package/dist/esm/extra-settings.js +2 -0
  645. package/dist/esm/fancy-button.js +2 -0
  646. package/dist/esm/file-upload-area.js +2 -0
  647. package/dist/esm/hint-text.js +2 -0
  648. package/dist/esm/hue-slider.js +2 -0
  649. package/dist/esm/index.js +212 -0
  650. package/dist/esm/label.js +2 -0
  651. package/dist/esm/link-bubble.js +2 -0
  652. package/dist/esm/link-button.js +2 -0
  653. package/dist/esm/modal-body.js +2 -0
  654. package/dist/esm/modal-close.js +2 -0
  655. package/dist/esm/modal-content.js +2 -0
  656. package/dist/esm/modal-footer.js +2 -0
  657. package/dist/esm/modal-header.js +2 -0
  658. package/dist/esm/modal-trigger.js +2 -0
  659. package/dist/esm/modal.js +2 -0
  660. package/dist/esm/pagination-content.js +2 -0
  661. package/dist/esm/pagination-ellipsis.js +2 -0
  662. package/dist/esm/pagination-first.js +2 -0
  663. package/dist/esm/pagination-item.js +2 -0
  664. package/dist/esm/pagination-last.js +2 -0
  665. package/dist/esm/pagination-next.js +2 -0
  666. package/dist/esm/pagination-previous.js +2 -0
  667. package/dist/esm/pagination.js +2 -0
  668. package/dist/esm/popover-content.js +2 -0
  669. package/dist/esm/popover-trigger.js +2 -0
  670. package/dist/esm/popover.js +2 -0
  671. package/dist/esm/progress-bar.js +2 -0
  672. package/dist/esm/progress-circle.js +2 -0
  673. package/dist/esm/radio-group-card.js +2 -0
  674. package/dist/esm/radio-group-item.js +2 -0
  675. package/dist/esm/radio-group-label.js +2 -0
  676. package/dist/esm/radio-group.js +2 -0
  677. package/dist/esm/rich-editor.js +2 -0
  678. package/dist/esm/scroll-area.js +2 -0
  679. package/dist/esm/scroll-bar.js +2 -0
  680. package/dist/esm/segmented-control-item.js +2 -0
  681. package/dist/esm/segmented-control.js +2 -0
  682. package/dist/esm/select-content.js +2 -0
  683. package/dist/esm/select-group.js +2 -0
  684. package/dist/esm/select-icon.js +2 -0
  685. package/dist/esm/select-item.js +2 -0
  686. package/dist/esm/select-label.js +2 -0
  687. package/dist/esm/select-separator.js +2 -0
  688. package/dist/esm/select-trigger.js +2 -0
  689. package/dist/esm/select-value.js +2 -0
  690. package/dist/esm/select.js +2 -0
  691. package/dist/esm/sheet-close.js +2 -0
  692. package/dist/esm/sheet-content.js +2 -0
  693. package/dist/esm/sheet-description.js +2 -0
  694. package/dist/esm/sheet-footer.js +2 -0
  695. package/dist/esm/sheet-header.js +2 -0
  696. package/dist/esm/sheet-title.js +2 -0
  697. package/dist/esm/sheet-trigger.js +2 -0
  698. package/dist/esm/sheet.js +2 -0
  699. package/dist/esm/shims.js +0 -0
  700. package/dist/esm/sidebar-content.js +2 -0
  701. package/dist/esm/sidebar-element.js +2 -0
  702. package/dist/esm/sidebar-footer.js +2 -0
  703. package/dist/esm/sidebar-group-content.js +2 -0
  704. package/dist/esm/sidebar-group-label.js +2 -0
  705. package/dist/esm/sidebar-group.js +2 -0
  706. package/dist/esm/sidebar-header.js +2 -0
  707. package/dist/esm/sidebar-menu-action.js +2 -0
  708. package/dist/esm/sidebar-menu-badge.js +2 -0
  709. package/dist/esm/sidebar-menu-button.js +2 -0
  710. package/dist/esm/sidebar-menu-item.js +2 -0
  711. package/dist/esm/sidebar-menu-sub-button.js +2 -0
  712. package/dist/esm/sidebar-menu-sub-item.js +2 -0
  713. package/dist/esm/sidebar-menu-sub.js +2 -0
  714. package/dist/esm/sidebar-menu.js +2 -0
  715. package/dist/esm/sidebar-provider.js +2 -0
  716. package/dist/esm/sidebar-separator.js +2 -0
  717. package/dist/esm/sidebar-trigger.js +2 -0
  718. package/dist/esm/sidebar.js +2 -0
  719. package/dist/esm/slider.js +2 -0
  720. package/dist/esm/social-button.js +2 -0
  721. package/dist/esm/sonner-alert.js +2 -0
  722. package/dist/esm/sonner.js +2 -0
  723. package/dist/esm/status-badge.js +2 -0
  724. package/dist/esm/switch.js +2 -0
  725. package/dist/esm/tab-menu-content.js +2 -0
  726. package/dist/esm/tab-menu-item.js +2 -0
  727. package/dist/esm/tab-menu-list.js +2 -0
  728. package/dist/esm/tab-menu.js +2 -0
  729. package/dist/esm/table-body.js +2 -0
  730. package/dist/esm/table-caption.js +2 -0
  731. package/dist/esm/table-cell.js +2 -0
  732. package/dist/esm/table-empty.js +2 -0
  733. package/dist/esm/table-footer.js +2 -0
  734. package/dist/esm/table-head.js +2 -0
  735. package/dist/esm/table-header.js +2 -0
  736. package/dist/esm/table-row.js +2 -0
  737. package/dist/esm/table.js +2 -0
  738. package/dist/esm/tag.js +2 -0
  739. package/dist/esm/text-input-affix.js +2 -0
  740. package/dist/esm/text-input-button.js +2 -0
  741. package/dist/esm/text-input.js +2 -0
  742. package/dist/esm/textarea.js +2 -0
  743. package/dist/esm/tooltip-content.js +2 -0
  744. package/dist/esm/tooltip-provider.js +2 -0
  745. package/dist/esm/tooltip-root.js +2 -0
  746. package/dist/esm/tooltip-trigger.js +2 -0
  747. package/dist/esm/tooltip.js +2 -0
  748. package/dist/esm/types.js +0 -0
  749. package/dist/esm/use-color-model.js +2 -0
  750. package/dist/esm/use-delegated-props.js +14 -0
  751. package/dist/esm/use-sidebar.js +11 -0
  752. package/dist/esm/use-user-select.js +39 -0
  753. package/package.json +10 -10
  754. package/dist/cjs/chunks/content-divider.vue_vue_type_style_index_0_lang.js +0 -52
  755. package/dist/cjs/chunks/index.js +0 -10879
  756. package/dist/cjs/chunks/index2.js +0 -90
  757. package/dist/cjs/chunks/index3.js +0 -272
  758. package/dist/cjs/chunks/index4.js +0 -1486
  759. package/dist/cjs/chunks/index5.js +0 -17162
  760. package/dist/cjs/chunks/rich-editor.vue_vue_type_style_index_0_scoped_4e1c9896_lang.js +0 -5272
  761. package/dist/cjs/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +0 -63
  762. package/dist/cjs/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +0 -137
  763. package/dist/cjs/chunks/tinycolor.js +0 -965
  764. package/dist/es/alert.js +0 -113
  765. package/dist/es/alpha-slider.js +0 -4
  766. package/dist/es/badge.js +0 -60
  767. package/dist/es/button.js +0 -41
  768. package/dist/es/checkbox-card.js +0 -112
  769. package/dist/es/checkbox-label.js +0 -111
  770. package/dist/es/checkbox.js +0 -5
  771. package/dist/es/chunks/_plugin-vue_export-helper.js +0 -10
  772. package/dist/es/chunks/alpha-slider.js +0 -128
  773. package/dist/es/chunks/checkbox.js +0 -39
  774. package/dist/es/chunks/clsx.js +0 -16
  775. package/dist/es/chunks/collapsible-content.js +0 -28
  776. package/dist/es/chunks/collapsible-trigger.js +0 -23
  777. package/dist/es/chunks/collapsible.js +0 -29
  778. package/dist/es/chunks/combobox-anchor.js +0 -32
  779. package/dist/es/chunks/content-divider.vue_vue_type_style_index_0_lang.js +0 -53
  780. package/dist/es/chunks/counter-input.js +0 -71
  781. package/dist/es/chunks/dropdown-menu-sub.js +0 -26
  782. package/dist/es/chunks/index.js +0 -10864
  783. package/dist/es/chunks/index2.js +0 -91
  784. package/dist/es/chunks/index3.js +0 -273
  785. package/dist/es/chunks/index4.js +0 -1486
  786. package/dist/es/chunks/index5.js +0 -17163
  787. package/dist/es/chunks/modal-close.js +0 -23
  788. package/dist/es/chunks/modal-trigger.js +0 -23
  789. package/dist/es/chunks/modal.js +0 -27
  790. package/dist/es/chunks/pagination-first.js +0 -33
  791. package/dist/es/chunks/pagination-item.js +0 -33
  792. package/dist/es/chunks/pagination-last.js +0 -33
  793. package/dist/es/chunks/pagination-next.js +0 -33
  794. package/dist/es/chunks/pagination-previous.js +0 -33
  795. package/dist/es/chunks/popover.js +0 -27
  796. package/dist/es/chunks/radio-group-item.js +0 -35
  797. package/dist/es/chunks/radio-group.js +0 -40
  798. package/dist/es/chunks/rich-editor.vue_vue_type_style_index_0_scoped_4e1c9896_lang.js +0 -5273
  799. package/dist/es/chunks/select-group.js +0 -23
  800. package/dist/es/chunks/select.js +0 -39
  801. package/dist/es/chunks/sheet-trigger.js +0 -23
  802. package/dist/es/chunks/sheet.js +0 -27
  803. package/dist/es/chunks/sidebar-content.js +0 -22
  804. package/dist/es/chunks/sidebar-element.js +0 -29
  805. package/dist/es/chunks/sidebar-footer.js +0 -22
  806. package/dist/es/chunks/sidebar-group-label.js +0 -30
  807. package/dist/es/chunks/sidebar-group.js +0 -22
  808. package/dist/es/chunks/sidebar-header.js +0 -22
  809. package/dist/es/chunks/sidebar-menu-action.js +0 -35
  810. package/dist/es/chunks/sidebar-menu-badge.js +0 -30
  811. package/dist/es/chunks/sidebar-menu-button.js +0 -40
  812. package/dist/es/chunks/sidebar-menu-item.js +0 -22
  813. package/dist/es/chunks/sidebar-menu-sub-button.js +0 -38
  814. package/dist/es/chunks/sidebar-menu-sub-item.js +0 -22
  815. package/dist/es/chunks/sidebar-menu-sub.js +0 -22
  816. package/dist/es/chunks/sidebar-menu.js +0 -22
  817. package/dist/es/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +0 -64
  818. package/dist/es/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +0 -138
  819. package/dist/es/chunks/sidebar.js +0 -85
  820. package/dist/es/chunks/slider.js +0 -53
  821. package/dist/es/chunks/sonner.js +0 -1223
  822. package/dist/es/chunks/switch.js +0 -39
  823. package/dist/es/chunks/table-header.js +0 -21
  824. package/dist/es/chunks/tinycolor.js +0 -966
  825. package/dist/es/chunks/tooltip-provider.js +0 -27
  826. package/dist/es/chunks/tooltip-root.js +0 -37
  827. package/dist/es/chunks/tooltip-trigger.js +0 -24
  828. package/dist/es/chunks/tooltip.js +0 -85
  829. package/dist/es/collapsible-content.js +0 -5
  830. package/dist/es/collapsible-trigger.js +0 -4
  831. package/dist/es/collapsible.js +0 -4
  832. package/dist/es/color-area.js +0 -177
  833. package/dist/es/color-picker.js +0 -519
  834. package/dist/es/color-swatch.js +0 -62
  835. package/dist/es/color.js +0 -102
  836. package/dist/es/combobox-anchor.js +0 -4
  837. package/dist/es/combobox-empty.js +0 -34
  838. package/dist/es/combobox-group.js +0 -44
  839. package/dist/es/combobox-input.js +0 -66
  840. package/dist/es/combobox-item.js +0 -112
  841. package/dist/es/combobox-list.js +0 -64
  842. package/dist/es/combobox-root.js +0 -43
  843. package/dist/es/combobox-separator.js +0 -34
  844. package/dist/es/combobox-trigger.js +0 -49
  845. package/dist/es/combobox.js +0 -241
  846. package/dist/es/command-group.js +0 -42
  847. package/dist/es/command-input.js +0 -43
  848. package/dist/es/command-item.js +0 -35
  849. package/dist/es/command-list.js +0 -53
  850. package/dist/es/command-root.js +0 -47
  851. package/dist/es/command-separator.js +0 -33
  852. package/dist/es/compact-button.js +0 -44
  853. package/dist/es/config.js +0 -136
  854. package/dist/es/content-divider.js +0 -4
  855. package/dist/es/counter-input.js +0 -5
  856. package/dist/es/crypto.js +0 -8
  857. package/dist/es/digit-input-group.js +0 -33
  858. package/dist/es/digit-input-slot.js +0 -30
  859. package/dist/es/digit-input.js +0 -48
  860. package/dist/es/dropdown-menu-content.js +0 -55
  861. package/dist/es/dropdown-menu-group.js +0 -26
  862. package/dist/es/dropdown-menu-item.js +0 -55
  863. package/dist/es/dropdown-menu-label.js +0 -33
  864. package/dist/es/dropdown-menu-separator.js +0 -27
  865. package/dist/es/dropdown-menu-sub-content.js +0 -52
  866. package/dist/es/dropdown-menu-sub-trigger.js +0 -46
  867. package/dist/es/dropdown-menu-sub.js +0 -4
  868. package/dist/es/dropdown-menu-trigger.js +0 -28
  869. package/dist/es/dropdown-menu.js +0 -37
  870. package/dist/es/extra-settings.js +0 -157
  871. package/dist/es/fancy-button.js +0 -39
  872. package/dist/es/file-upload-area.js +0 -147
  873. package/dist/es/hint-text.js +0 -38
  874. package/dist/es/hue-slider.js +0 -135
  875. package/dist/es/index.js +0 -526
  876. package/dist/es/label.js +0 -60
  877. package/dist/es/link-bubble.js +0 -243
  878. package/dist/es/link-button.js +0 -45
  879. package/dist/es/modal-body.js +0 -24
  880. package/dist/es/modal-close.js +0 -4
  881. package/dist/es/modal-content.js +0 -50
  882. package/dist/es/modal-footer.js +0 -24
  883. package/dist/es/modal-header.js +0 -83
  884. package/dist/es/modal-trigger.js +0 -4
  885. package/dist/es/modal.js +0 -4
  886. package/dist/es/pagination-content.js +0 -32
  887. package/dist/es/pagination-ellipsis.js +0 -36
  888. package/dist/es/pagination-first.js +0 -4
  889. package/dist/es/pagination-item.js +0 -4
  890. package/dist/es/pagination-last.js +0 -4
  891. package/dist/es/pagination-next.js +0 -4
  892. package/dist/es/pagination-previous.js +0 -4
  893. package/dist/es/pagination.js +0 -61
  894. package/dist/es/popover-content.js +0 -107
  895. package/dist/es/popover-trigger.js +0 -26
  896. package/dist/es/popover.js +0 -4
  897. package/dist/es/progress-bar.js +0 -86
  898. package/dist/es/progress-circle.js +0 -94
  899. package/dist/es/radio-group-card.js +0 -112
  900. package/dist/es/radio-group-item.js +0 -5
  901. package/dist/es/radio-group-label.js +0 -111
  902. package/dist/es/radio-group.js +0 -5
  903. package/dist/es/rich-editor.js +0 -431
  904. package/dist/es/scroll-area.js +0 -44
  905. package/dist/es/scroll-bar.js +0 -34
  906. package/dist/es/segmented-control-item.js +0 -41
  907. package/dist/es/segmented-control.js +0 -42
  908. package/dist/es/select-content.js +0 -63
  909. package/dist/es/select-group.js +0 -4
  910. package/dist/es/select-icon.js +0 -26
  911. package/dist/es/select-item.js +0 -46
  912. package/dist/es/select-label.js +0 -33
  913. package/dist/es/select-separator.js +0 -27
  914. package/dist/es/select-trigger.js +0 -42
  915. package/dist/es/select-value.js +0 -33
  916. package/dist/es/select.js +0 -4
  917. package/dist/es/sheet-close.js +0 -30
  918. package/dist/es/sheet-content.js +0 -62
  919. package/dist/es/sheet-description.js +0 -32
  920. package/dist/es/sheet-footer.js +0 -29
  921. package/dist/es/sheet-header.js +0 -24
  922. package/dist/es/sheet-title.js +0 -32
  923. package/dist/es/sheet-trigger.js +0 -4
  924. package/dist/es/sheet.js +0 -4
  925. package/dist/es/shims.js +0 -1
  926. package/dist/es/sidebar-content.js +0 -5
  927. package/dist/es/sidebar-element.js +0 -5
  928. package/dist/es/sidebar-footer.js +0 -5
  929. package/dist/es/sidebar-group-content.js +0 -25
  930. package/dist/es/sidebar-group-label.js +0 -5
  931. package/dist/es/sidebar-group.js +0 -5
  932. package/dist/es/sidebar-header.js +0 -5
  933. package/dist/es/sidebar-menu-action.js +0 -5
  934. package/dist/es/sidebar-menu-badge.js +0 -5
  935. package/dist/es/sidebar-menu-button.js +0 -5
  936. package/dist/es/sidebar-menu-item.js +0 -5
  937. package/dist/es/sidebar-menu-sub-button.js +0 -5
  938. package/dist/es/sidebar-menu-sub-item.js +0 -5
  939. package/dist/es/sidebar-menu-sub.js +0 -5
  940. package/dist/es/sidebar-menu.js +0 -5
  941. package/dist/es/sidebar-provider.js +0 -4
  942. package/dist/es/sidebar-separator.js +0 -4
  943. package/dist/es/sidebar-trigger.js +0 -35
  944. package/dist/es/sidebar.js +0 -5
  945. package/dist/es/slider.js +0 -5
  946. package/dist/es/social-button.js +0 -46
  947. package/dist/es/sonner-alert.js +0 -43
  948. package/dist/es/sonner.js +0 -4
  949. package/dist/es/status-badge.js +0 -51
  950. package/dist/es/switch.js +0 -5
  951. package/dist/es/tab-menu-content.js +0 -34
  952. package/dist/es/tab-menu-item.js +0 -46
  953. package/dist/es/tab-menu-list.js +0 -36
  954. package/dist/es/tab-menu.js +0 -34
  955. package/dist/es/table-body.js +0 -24
  956. package/dist/es/table-caption.js +0 -24
  957. package/dist/es/table-cell.js +0 -27
  958. package/dist/es/table-empty.js +0 -45
  959. package/dist/es/table-footer.js +0 -24
  960. package/dist/es/table-head.js +0 -25
  961. package/dist/es/table-header.js +0 -4
  962. package/dist/es/table-row.js +0 -33
  963. package/dist/es/table.js +0 -27
  964. package/dist/es/tag.js +0 -48
  965. package/dist/es/text-input-affix.js +0 -28
  966. package/dist/es/text-input-button.js +0 -33
  967. package/dist/es/text-input.js +0 -121
  968. package/dist/es/textarea.js +0 -58
  969. package/dist/es/tooltip-content.js +0 -95
  970. package/dist/es/tooltip-provider.js +0 -4
  971. package/dist/es/tooltip-root.js +0 -4
  972. package/dist/es/tooltip-trigger.js +0 -4
  973. package/dist/es/tooltip.js +0 -4
  974. package/dist/es/types.js +0 -1
  975. package/dist/es/use-color-model.js +0 -33
  976. package/dist/es/use-delegated-props.js +0 -14
  977. package/dist/es/use-sidebar.js +0 -18
  978. package/dist/es/use-user-select.js +0 -39
@@ -0,0 +1,1173 @@
1
+ const require_dist = require("./dist.js");
2
+ const require_dist$1 = require("./dist2.js");
3
+ let vue = require("vue");
4
+ //#region ../../node_modules/.pnpm/prosemirror-tables@1.7.1/node_modules/prosemirror-tables/dist/index.js
5
+ var readFromCache;
6
+ var addToCache;
7
+ if (typeof WeakMap != "undefined") {
8
+ let cache = /* @__PURE__ */ new WeakMap();
9
+ readFromCache = (key) => cache.get(key);
10
+ addToCache = (key, value) => {
11
+ cache.set(key, value);
12
+ return value;
13
+ };
14
+ } else {
15
+ const cache = [];
16
+ const cacheSize = 10;
17
+ let cachePos = 0;
18
+ readFromCache = (key) => {
19
+ for (let i = 0; i < cache.length; i += 2) if (cache[i] == key) return cache[i + 1];
20
+ };
21
+ addToCache = (key, value) => {
22
+ if (cachePos == cacheSize) cachePos = 0;
23
+ cache[cachePos++] = key;
24
+ return cache[cachePos++] = value;
25
+ };
26
+ }
27
+ var TableMap = class {
28
+ constructor(width, height, map, problems) {
29
+ this.width = width;
30
+ this.height = height;
31
+ this.map = map;
32
+ this.problems = problems;
33
+ }
34
+ findCell(pos) {
35
+ for (let i = 0; i < this.map.length; i++) {
36
+ const curPos = this.map[i];
37
+ if (curPos != pos) continue;
38
+ const left = i % this.width;
39
+ const top = i / this.width | 0;
40
+ let right = left + 1;
41
+ let bottom = top + 1;
42
+ for (let j = 1; right < this.width && this.map[i + j] == curPos; j++) right++;
43
+ for (let j = 1; bottom < this.height && this.map[i + this.width * j] == curPos; j++) bottom++;
44
+ return {
45
+ left,
46
+ top,
47
+ right,
48
+ bottom
49
+ };
50
+ }
51
+ throw new RangeError(`No cell with offset ${pos} found`);
52
+ }
53
+ colCount(pos) {
54
+ for (let i = 0; i < this.map.length; i++) if (this.map[i] == pos) return i % this.width;
55
+ throw new RangeError(`No cell with offset ${pos} found`);
56
+ }
57
+ nextCell(pos, axis, dir) {
58
+ const { left, right, top, bottom } = this.findCell(pos);
59
+ if (axis == "horiz") {
60
+ if (dir < 0 ? left == 0 : right == this.width) return null;
61
+ return this.map[top * this.width + (dir < 0 ? left - 1 : right)];
62
+ } else {
63
+ if (dir < 0 ? top == 0 : bottom == this.height) return null;
64
+ return this.map[left + this.width * (dir < 0 ? top - 1 : bottom)];
65
+ }
66
+ }
67
+ rectBetween(a, b) {
68
+ const { left: leftA, right: rightA, top: topA, bottom: bottomA } = this.findCell(a);
69
+ const { left: leftB, right: rightB, top: topB, bottom: bottomB } = this.findCell(b);
70
+ return {
71
+ left: Math.min(leftA, leftB),
72
+ top: Math.min(topA, topB),
73
+ right: Math.max(rightA, rightB),
74
+ bottom: Math.max(bottomA, bottomB)
75
+ };
76
+ }
77
+ cellsInRect(rect) {
78
+ const result = [];
79
+ const seen = {};
80
+ for (let row = rect.top; row < rect.bottom; row++) for (let col = rect.left; col < rect.right; col++) {
81
+ const index = row * this.width + col;
82
+ const pos = this.map[index];
83
+ if (seen[pos]) continue;
84
+ seen[pos] = true;
85
+ if (col == rect.left && col && this.map[index - 1] == pos || row == rect.top && row && this.map[index - this.width] == pos) continue;
86
+ result.push(pos);
87
+ }
88
+ return result;
89
+ }
90
+ positionAt(row, col, table) {
91
+ for (let i = 0, rowStart = 0;; i++) {
92
+ const rowEnd = rowStart + table.child(i).nodeSize;
93
+ if (i == row) {
94
+ let index = col + row * this.width;
95
+ const rowEndIndex = (row + 1) * this.width;
96
+ while (index < rowEndIndex && this.map[index] < rowStart) index++;
97
+ return index == rowEndIndex ? rowEnd - 1 : this.map[index];
98
+ }
99
+ rowStart = rowEnd;
100
+ }
101
+ }
102
+ static get(table) {
103
+ return readFromCache(table) || addToCache(table, computeMap(table));
104
+ }
105
+ };
106
+ function computeMap(table) {
107
+ if (table.type.spec.tableRole != "table") throw new RangeError("Not a table node: " + table.type.name);
108
+ const width = findWidth(table), height = table.childCount;
109
+ const map = [];
110
+ let mapPos = 0;
111
+ let problems = null;
112
+ const colWidths = [];
113
+ for (let i = 0, e = width * height; i < e; i++) map[i] = 0;
114
+ for (let row = 0, pos = 0; row < height; row++) {
115
+ const rowNode = table.child(row);
116
+ pos++;
117
+ for (let i = 0;; i++) {
118
+ while (mapPos < map.length && map[mapPos] != 0) mapPos++;
119
+ if (i == rowNode.childCount) break;
120
+ const cellNode = rowNode.child(i);
121
+ const { colspan, rowspan, colwidth } = cellNode.attrs;
122
+ for (let h = 0; h < rowspan; h++) {
123
+ if (h + row >= height) {
124
+ (problems || (problems = [])).push({
125
+ type: "overlong_rowspan",
126
+ pos,
127
+ n: rowspan - h
128
+ });
129
+ break;
130
+ }
131
+ const start = mapPos + h * width;
132
+ for (let w = 0; w < colspan; w++) {
133
+ if (map[start + w] == 0) map[start + w] = pos;
134
+ else (problems || (problems = [])).push({
135
+ type: "collision",
136
+ row,
137
+ pos,
138
+ n: colspan - w
139
+ });
140
+ const colW = colwidth && colwidth[w];
141
+ if (colW) {
142
+ const widthIndex = (start + w) % width * 2, prev = colWidths[widthIndex];
143
+ if (prev == null || prev != colW && colWidths[widthIndex + 1] == 1) {
144
+ colWidths[widthIndex] = colW;
145
+ colWidths[widthIndex + 1] = 1;
146
+ } else if (prev == colW) colWidths[widthIndex + 1]++;
147
+ }
148
+ }
149
+ }
150
+ mapPos += colspan;
151
+ pos += cellNode.nodeSize;
152
+ }
153
+ const expectedPos = (row + 1) * width;
154
+ let missing = 0;
155
+ while (mapPos < expectedPos) if (map[mapPos++] == 0) missing++;
156
+ if (missing) (problems || (problems = [])).push({
157
+ type: "missing",
158
+ row,
159
+ n: missing
160
+ });
161
+ pos++;
162
+ }
163
+ if (width === 0 || height === 0) (problems || (problems = [])).push({ type: "zero_sized" });
164
+ const tableMap = new TableMap(width, height, map, problems);
165
+ let badWidths = false;
166
+ for (let i = 0; !badWidths && i < colWidths.length; i += 2) if (colWidths[i] != null && colWidths[i + 1] < height) badWidths = true;
167
+ if (badWidths) findBadColWidths(tableMap, colWidths, table);
168
+ return tableMap;
169
+ }
170
+ function findWidth(table) {
171
+ let width = -1;
172
+ let hasRowSpan = false;
173
+ for (let row = 0; row < table.childCount; row++) {
174
+ const rowNode = table.child(row);
175
+ let rowWidth = 0;
176
+ if (hasRowSpan) for (let j = 0; j < row; j++) {
177
+ const prevRow = table.child(j);
178
+ for (let i = 0; i < prevRow.childCount; i++) {
179
+ const cell = prevRow.child(i);
180
+ if (j + cell.attrs.rowspan > row) rowWidth += cell.attrs.colspan;
181
+ }
182
+ }
183
+ for (let i = 0; i < rowNode.childCount; i++) {
184
+ const cell = rowNode.child(i);
185
+ rowWidth += cell.attrs.colspan;
186
+ if (cell.attrs.rowspan > 1) hasRowSpan = true;
187
+ }
188
+ if (width == -1) width = rowWidth;
189
+ else if (width != rowWidth) width = Math.max(width, rowWidth);
190
+ }
191
+ return width;
192
+ }
193
+ function findBadColWidths(map, colWidths, table) {
194
+ if (!map.problems) map.problems = [];
195
+ const seen = {};
196
+ for (let i = 0; i < map.map.length; i++) {
197
+ const pos = map.map[i];
198
+ if (seen[pos]) continue;
199
+ seen[pos] = true;
200
+ const node = table.nodeAt(pos);
201
+ if (!node) throw new RangeError(`No cell with offset ${pos} found`);
202
+ let updated = null;
203
+ const attrs = node.attrs;
204
+ for (let j = 0; j < attrs.colspan; j++) {
205
+ const colWidth = colWidths[(i + j) % map.width * 2];
206
+ if (colWidth != null && (!attrs.colwidth || attrs.colwidth[j] != colWidth)) (updated || (updated = freshColWidth(attrs)))[j] = colWidth;
207
+ }
208
+ if (updated) map.problems.unshift({
209
+ type: "colwidth mismatch",
210
+ pos,
211
+ colwidth: updated
212
+ });
213
+ }
214
+ }
215
+ function freshColWidth(attrs) {
216
+ if (attrs.colwidth) return attrs.colwidth.slice();
217
+ const result = [];
218
+ for (let i = 0; i < attrs.colspan; i++) result.push(0);
219
+ return result;
220
+ }
221
+ function tableNodeTypes(schema) {
222
+ let result = schema.cached.tableNodeTypes;
223
+ if (!result) {
224
+ result = schema.cached.tableNodeTypes = {};
225
+ for (const name in schema.nodes) {
226
+ const type = schema.nodes[name], role = type.spec.tableRole;
227
+ if (role) result[role] = type;
228
+ }
229
+ }
230
+ return result;
231
+ }
232
+ new require_dist$1.PluginKey("selectingCells");
233
+ function cellAround($pos) {
234
+ for (let d = $pos.depth - 1; d > 0; d--) if ($pos.node(d).type.spec.tableRole == "row") return $pos.node(0).resolve($pos.before(d + 1));
235
+ return null;
236
+ }
237
+ function isInTable(state) {
238
+ const $head = state.selection.$head;
239
+ for (let d = $head.depth; d > 0; d--) if ($head.node(d).type.spec.tableRole == "row") return true;
240
+ return false;
241
+ }
242
+ function selectionCell(state) {
243
+ const sel = state.selection;
244
+ if ("$anchorCell" in sel && sel.$anchorCell) return sel.$anchorCell.pos > sel.$headCell.pos ? sel.$anchorCell : sel.$headCell;
245
+ else if ("node" in sel && sel.node && sel.node.type.spec.tableRole == "cell") return sel.$anchor;
246
+ const $cell = cellAround(sel.$head) || cellNear(sel.$head);
247
+ if ($cell) return $cell;
248
+ throw new RangeError(`No cell found around position ${sel.head}`);
249
+ }
250
+ function cellNear($pos) {
251
+ for (let after = $pos.nodeAfter, pos = $pos.pos; after; after = after.firstChild, pos++) {
252
+ const role = after.type.spec.tableRole;
253
+ if (role == "cell" || role == "header_cell") return $pos.doc.resolve(pos);
254
+ }
255
+ for (let before = $pos.nodeBefore, pos = $pos.pos; before; before = before.lastChild, pos--) {
256
+ const role = before.type.spec.tableRole;
257
+ if (role == "cell" || role == "header_cell") return $pos.doc.resolve(pos - before.nodeSize);
258
+ }
259
+ }
260
+ function pointsAtCell($pos) {
261
+ return $pos.parent.type.spec.tableRole == "row" && !!$pos.nodeAfter;
262
+ }
263
+ function inSameTable($cellA, $cellB) {
264
+ return $cellA.depth == $cellB.depth && $cellA.pos >= $cellB.start(-1) && $cellA.pos <= $cellB.end(-1);
265
+ }
266
+ function nextCell($pos, axis, dir) {
267
+ const table = $pos.node(-1);
268
+ const map = TableMap.get(table);
269
+ const tableStart = $pos.start(-1);
270
+ const moved = map.nextCell($pos.pos - tableStart, axis, dir);
271
+ return moved == null ? null : $pos.node(0).resolve(tableStart + moved);
272
+ }
273
+ function removeColSpan(attrs, pos, n = 1) {
274
+ const result = {
275
+ ...attrs,
276
+ colspan: attrs.colspan - n
277
+ };
278
+ if (result.colwidth) {
279
+ result.colwidth = result.colwidth.slice();
280
+ result.colwidth.splice(pos, n);
281
+ if (!result.colwidth.some((w) => w > 0)) result.colwidth = null;
282
+ }
283
+ return result;
284
+ }
285
+ var CellSelection = class _CellSelection extends require_dist$1.Selection {
286
+ constructor($anchorCell, $headCell = $anchorCell) {
287
+ const table = $anchorCell.node(-1);
288
+ const map = TableMap.get(table);
289
+ const tableStart = $anchorCell.start(-1);
290
+ const rect = map.rectBetween($anchorCell.pos - tableStart, $headCell.pos - tableStart);
291
+ const doc = $anchorCell.node(0);
292
+ const cells = map.cellsInRect(rect).filter((p) => p != $headCell.pos - tableStart);
293
+ cells.unshift($headCell.pos - tableStart);
294
+ const ranges = cells.map((pos) => {
295
+ const cell = table.nodeAt(pos);
296
+ if (!cell) throw RangeError(`No cell with offset ${pos} found`);
297
+ const from = tableStart + pos + 1;
298
+ return new require_dist$1.SelectionRange(doc.resolve(from), doc.resolve(from + cell.content.size));
299
+ });
300
+ super(ranges[0].$from, ranges[0].$to, ranges);
301
+ this.$anchorCell = $anchorCell;
302
+ this.$headCell = $headCell;
303
+ }
304
+ map(doc, mapping) {
305
+ const $anchorCell = doc.resolve(mapping.map(this.$anchorCell.pos));
306
+ const $headCell = doc.resolve(mapping.map(this.$headCell.pos));
307
+ if (pointsAtCell($anchorCell) && pointsAtCell($headCell) && inSameTable($anchorCell, $headCell)) {
308
+ const tableChanged = this.$anchorCell.node(-1) != $anchorCell.node(-1);
309
+ if (tableChanged && this.isRowSelection()) return _CellSelection.rowSelection($anchorCell, $headCell);
310
+ else if (tableChanged && this.isColSelection()) return _CellSelection.colSelection($anchorCell, $headCell);
311
+ else return new _CellSelection($anchorCell, $headCell);
312
+ }
313
+ return require_dist$1.TextSelection.between($anchorCell, $headCell);
314
+ }
315
+ content() {
316
+ const table = this.$anchorCell.node(-1);
317
+ const map = TableMap.get(table);
318
+ const tableStart = this.$anchorCell.start(-1);
319
+ const rect = map.rectBetween(this.$anchorCell.pos - tableStart, this.$headCell.pos - tableStart);
320
+ const seen = {};
321
+ const rows = [];
322
+ for (let row = rect.top; row < rect.bottom; row++) {
323
+ const rowContent = [];
324
+ for (let index = row * map.width + rect.left, col = rect.left; col < rect.right; col++, index++) {
325
+ const pos = map.map[index];
326
+ if (seen[pos]) continue;
327
+ seen[pos] = true;
328
+ const cellRect = map.findCell(pos);
329
+ let cell = table.nodeAt(pos);
330
+ if (!cell) throw RangeError(`No cell with offset ${pos} found`);
331
+ const extraLeft = rect.left - cellRect.left;
332
+ const extraRight = cellRect.right - rect.right;
333
+ if (extraLeft > 0 || extraRight > 0) {
334
+ let attrs = cell.attrs;
335
+ if (extraLeft > 0) attrs = removeColSpan(attrs, 0, extraLeft);
336
+ if (extraRight > 0) attrs = removeColSpan(attrs, attrs.colspan - extraRight, extraRight);
337
+ if (cellRect.left < rect.left) {
338
+ cell = cell.type.createAndFill(attrs);
339
+ if (!cell) throw RangeError(`Could not create cell with attrs ${JSON.stringify(attrs)}`);
340
+ } else cell = cell.type.create(attrs, cell.content);
341
+ }
342
+ if (cellRect.top < rect.top || cellRect.bottom > rect.bottom) {
343
+ const attrs = {
344
+ ...cell.attrs,
345
+ rowspan: Math.min(cellRect.bottom, rect.bottom) - Math.max(cellRect.top, rect.top)
346
+ };
347
+ if (cellRect.top < rect.top) cell = cell.type.createAndFill(attrs);
348
+ else cell = cell.type.create(attrs, cell.content);
349
+ }
350
+ rowContent.push(cell);
351
+ }
352
+ rows.push(table.child(row).copy(require_dist$1.Fragment.from(rowContent)));
353
+ }
354
+ const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
355
+ return new require_dist$1.Slice(require_dist$1.Fragment.from(fragment), 1, 1);
356
+ }
357
+ replace(tr, content = require_dist$1.Slice.empty) {
358
+ const mapFrom = tr.steps.length, ranges = this.ranges;
359
+ for (let i = 0; i < ranges.length; i++) {
360
+ const { $from, $to } = ranges[i], mapping = tr.mapping.slice(mapFrom);
361
+ tr.replace(mapping.map($from.pos), mapping.map($to.pos), i ? require_dist$1.Slice.empty : content);
362
+ }
363
+ const sel = require_dist$1.Selection.findFrom(tr.doc.resolve(tr.mapping.slice(mapFrom).map(this.to)), -1);
364
+ if (sel) tr.setSelection(sel);
365
+ }
366
+ replaceWith(tr, node) {
367
+ this.replace(tr, new require_dist$1.Slice(require_dist$1.Fragment.from(node), 0, 0));
368
+ }
369
+ forEachCell(f) {
370
+ const table = this.$anchorCell.node(-1);
371
+ const map = TableMap.get(table);
372
+ const tableStart = this.$anchorCell.start(-1);
373
+ const cells = map.cellsInRect(map.rectBetween(this.$anchorCell.pos - tableStart, this.$headCell.pos - tableStart));
374
+ for (let i = 0; i < cells.length; i++) f(table.nodeAt(cells[i]), tableStart + cells[i]);
375
+ }
376
+ isColSelection() {
377
+ const anchorTop = this.$anchorCell.index(-1);
378
+ const headTop = this.$headCell.index(-1);
379
+ if (Math.min(anchorTop, headTop) > 0) return false;
380
+ const anchorBottom = anchorTop + this.$anchorCell.nodeAfter.attrs.rowspan;
381
+ const headBottom = headTop + this.$headCell.nodeAfter.attrs.rowspan;
382
+ return Math.max(anchorBottom, headBottom) == this.$headCell.node(-1).childCount;
383
+ }
384
+ static colSelection($anchorCell, $headCell = $anchorCell) {
385
+ const table = $anchorCell.node(-1);
386
+ const map = TableMap.get(table);
387
+ const tableStart = $anchorCell.start(-1);
388
+ const anchorRect = map.findCell($anchorCell.pos - tableStart);
389
+ const headRect = map.findCell($headCell.pos - tableStart);
390
+ const doc = $anchorCell.node(0);
391
+ if (anchorRect.top <= headRect.top) {
392
+ if (anchorRect.top > 0) $anchorCell = doc.resolve(tableStart + map.map[anchorRect.left]);
393
+ if (headRect.bottom < map.height) $headCell = doc.resolve(tableStart + map.map[map.width * (map.height - 1) + headRect.right - 1]);
394
+ } else {
395
+ if (headRect.top > 0) $headCell = doc.resolve(tableStart + map.map[headRect.left]);
396
+ if (anchorRect.bottom < map.height) $anchorCell = doc.resolve(tableStart + map.map[map.width * (map.height - 1) + anchorRect.right - 1]);
397
+ }
398
+ return new _CellSelection($anchorCell, $headCell);
399
+ }
400
+ isRowSelection() {
401
+ const table = this.$anchorCell.node(-1);
402
+ const map = TableMap.get(table);
403
+ const tableStart = this.$anchorCell.start(-1);
404
+ const anchorLeft = map.colCount(this.$anchorCell.pos - tableStart);
405
+ const headLeft = map.colCount(this.$headCell.pos - tableStart);
406
+ if (Math.min(anchorLeft, headLeft) > 0) return false;
407
+ const anchorRight = anchorLeft + this.$anchorCell.nodeAfter.attrs.colspan;
408
+ const headRight = headLeft + this.$headCell.nodeAfter.attrs.colspan;
409
+ return Math.max(anchorRight, headRight) == map.width;
410
+ }
411
+ eq(other) {
412
+ return other instanceof _CellSelection && other.$anchorCell.pos == this.$anchorCell.pos && other.$headCell.pos == this.$headCell.pos;
413
+ }
414
+ static rowSelection($anchorCell, $headCell = $anchorCell) {
415
+ const table = $anchorCell.node(-1);
416
+ const map = TableMap.get(table);
417
+ const tableStart = $anchorCell.start(-1);
418
+ const anchorRect = map.findCell($anchorCell.pos - tableStart);
419
+ const headRect = map.findCell($headCell.pos - tableStart);
420
+ const doc = $anchorCell.node(0);
421
+ if (anchorRect.left <= headRect.left) {
422
+ if (anchorRect.left > 0) $anchorCell = doc.resolve(tableStart + map.map[anchorRect.top * map.width]);
423
+ if (headRect.right < map.width) $headCell = doc.resolve(tableStart + map.map[map.width * (headRect.top + 1) - 1]);
424
+ } else {
425
+ if (headRect.left > 0) $headCell = doc.resolve(tableStart + map.map[headRect.top * map.width]);
426
+ if (anchorRect.right < map.width) $anchorCell = doc.resolve(tableStart + map.map[map.width * (anchorRect.top + 1) - 1]);
427
+ }
428
+ return new _CellSelection($anchorCell, $headCell);
429
+ }
430
+ toJSON() {
431
+ return {
432
+ type: "cell",
433
+ anchor: this.$anchorCell.pos,
434
+ head: this.$headCell.pos
435
+ };
436
+ }
437
+ static fromJSON(doc, json) {
438
+ return new _CellSelection(doc.resolve(json.anchor), doc.resolve(json.head));
439
+ }
440
+ static create(doc, anchorCell, headCell = anchorCell) {
441
+ return new _CellSelection(doc.resolve(anchorCell), doc.resolve(headCell));
442
+ }
443
+ getBookmark() {
444
+ return new CellBookmark(this.$anchorCell.pos, this.$headCell.pos);
445
+ }
446
+ };
447
+ CellSelection.prototype.visible = false;
448
+ require_dist$1.Selection.jsonID("cell", CellSelection);
449
+ var CellBookmark = class _CellBookmark {
450
+ constructor(anchor, head) {
451
+ this.anchor = anchor;
452
+ this.head = head;
453
+ }
454
+ map(mapping) {
455
+ return new _CellBookmark(mapping.map(this.anchor), mapping.map(this.head));
456
+ }
457
+ resolve(doc) {
458
+ const $anchorCell = doc.resolve(this.anchor), $headCell = doc.resolve(this.head);
459
+ if ($anchorCell.parent.type.spec.tableRole == "row" && $headCell.parent.type.spec.tableRole == "row" && $anchorCell.index() < $anchorCell.parent.childCount && $headCell.index() < $headCell.parent.childCount && inSameTable($anchorCell, $headCell)) return new CellSelection($anchorCell, $headCell);
460
+ else return require_dist$1.Selection.near($headCell, 1);
461
+ }
462
+ };
463
+ new require_dist$1.PluginKey("fix-tables");
464
+ function selectedRect(state) {
465
+ const sel = state.selection;
466
+ const $pos = selectionCell(state);
467
+ const table = $pos.node(-1);
468
+ const tableStart = $pos.start(-1);
469
+ const map = TableMap.get(table);
470
+ return {
471
+ ...sel instanceof CellSelection ? map.rectBetween(sel.$anchorCell.pos - tableStart, sel.$headCell.pos - tableStart) : map.findCell($pos.pos - tableStart),
472
+ tableStart,
473
+ map,
474
+ table
475
+ };
476
+ }
477
+ function deprecated_toggleHeader(type) {
478
+ return function(state, dispatch) {
479
+ if (!isInTable(state)) return false;
480
+ if (dispatch) {
481
+ const types = tableNodeTypes(state.schema);
482
+ const rect = selectedRect(state), tr = state.tr;
483
+ const cells = rect.map.cellsInRect(type == "column" ? {
484
+ left: rect.left,
485
+ top: 0,
486
+ right: rect.right,
487
+ bottom: rect.map.height
488
+ } : type == "row" ? {
489
+ left: 0,
490
+ top: rect.top,
491
+ right: rect.map.width,
492
+ bottom: rect.bottom
493
+ } : rect);
494
+ const nodes = cells.map((pos) => rect.table.nodeAt(pos));
495
+ for (let i = 0; i < cells.length; i++) if (nodes[i].type == types.header_cell) tr.setNodeMarkup(rect.tableStart + cells[i], types.cell, nodes[i].attrs);
496
+ if (tr.steps.length == 0) for (let i = 0; i < cells.length; i++) tr.setNodeMarkup(rect.tableStart + cells[i], types.header_cell, nodes[i].attrs);
497
+ dispatch(tr);
498
+ }
499
+ return true;
500
+ };
501
+ }
502
+ function isHeaderEnabledByType(type, rect, types) {
503
+ const cellPositions = rect.map.cellsInRect({
504
+ left: 0,
505
+ top: 0,
506
+ right: type == "row" ? rect.map.width : 1,
507
+ bottom: type == "column" ? rect.map.height : 1
508
+ });
509
+ for (let i = 0; i < cellPositions.length; i++) {
510
+ const cell = rect.table.nodeAt(cellPositions[i]);
511
+ if (cell && cell.type !== types.header_cell) return false;
512
+ }
513
+ return true;
514
+ }
515
+ function toggleHeader(type, options) {
516
+ options = options || { useDeprecatedLogic: false };
517
+ if (options.useDeprecatedLogic) return deprecated_toggleHeader(type);
518
+ return function(state, dispatch) {
519
+ if (!isInTable(state)) return false;
520
+ if (dispatch) {
521
+ const types = tableNodeTypes(state.schema);
522
+ const rect = selectedRect(state), tr = state.tr;
523
+ const isHeaderRowEnabled = isHeaderEnabledByType("row", rect, types);
524
+ const isHeaderColumnEnabled = isHeaderEnabledByType("column", rect, types);
525
+ const selectionStartsAt = (type === "column" ? isHeaderRowEnabled : type === "row" ? isHeaderColumnEnabled : false) ? 1 : 0;
526
+ const cellsRect = type == "column" ? {
527
+ left: 0,
528
+ top: selectionStartsAt,
529
+ right: 1,
530
+ bottom: rect.map.height
531
+ } : type == "row" ? {
532
+ left: selectionStartsAt,
533
+ top: 0,
534
+ right: rect.map.width,
535
+ bottom: 1
536
+ } : rect;
537
+ const newType = type == "column" ? isHeaderColumnEnabled ? types.cell : types.header_cell : type == "row" ? isHeaderRowEnabled ? types.cell : types.header_cell : types.cell;
538
+ rect.map.cellsInRect(cellsRect).forEach((relativeCellPos) => {
539
+ const cellPos = relativeCellPos + rect.tableStart;
540
+ const cell = tr.doc.nodeAt(cellPos);
541
+ if (cell) tr.setNodeMarkup(cellPos, newType, cell.attrs);
542
+ });
543
+ dispatch(tr);
544
+ }
545
+ return true;
546
+ };
547
+ }
548
+ toggleHeader("row", { useDeprecatedLogic: true });
549
+ toggleHeader("column", { useDeprecatedLogic: true });
550
+ toggleHeader("cell", { useDeprecatedLogic: true });
551
+ function deleteCellSelection(state, dispatch) {
552
+ const sel = state.selection;
553
+ if (!(sel instanceof CellSelection)) return false;
554
+ if (dispatch) {
555
+ const tr = state.tr;
556
+ const baseContent = tableNodeTypes(state.schema).cell.createAndFill().content;
557
+ sel.forEachCell((cell, pos) => {
558
+ if (!cell.content.eq(baseContent)) tr.replace(tr.mapping.map(pos + 1), tr.mapping.map(pos + cell.nodeSize - 1), new require_dist$1.Slice(baseContent, 0, 0));
559
+ });
560
+ if (tr.docChanged) dispatch(tr);
561
+ }
562
+ return true;
563
+ }
564
+ require_dist$1.keydownHandler({
565
+ ArrowLeft: arrow("horiz", -1),
566
+ ArrowRight: arrow("horiz", 1),
567
+ ArrowUp: arrow("vert", -1),
568
+ ArrowDown: arrow("vert", 1),
569
+ "Shift-ArrowLeft": shiftArrow("horiz", -1),
570
+ "Shift-ArrowRight": shiftArrow("horiz", 1),
571
+ "Shift-ArrowUp": shiftArrow("vert", -1),
572
+ "Shift-ArrowDown": shiftArrow("vert", 1),
573
+ Backspace: deleteCellSelection,
574
+ "Mod-Backspace": deleteCellSelection,
575
+ Delete: deleteCellSelection,
576
+ "Mod-Delete": deleteCellSelection
577
+ });
578
+ function maybeSetSelection(state, dispatch, selection) {
579
+ if (selection.eq(state.selection)) return false;
580
+ if (dispatch) dispatch(state.tr.setSelection(selection).scrollIntoView());
581
+ return true;
582
+ }
583
+ function arrow(axis, dir) {
584
+ return (state, dispatch, view) => {
585
+ if (!view) return false;
586
+ const sel = state.selection;
587
+ if (sel instanceof CellSelection) return maybeSetSelection(state, dispatch, require_dist$1.Selection.near(sel.$headCell, dir));
588
+ if (axis != "horiz" && !sel.empty) return false;
589
+ const end = atEndOfCell(view, axis, dir);
590
+ if (end == null) return false;
591
+ if (axis == "horiz") return maybeSetSelection(state, dispatch, require_dist$1.Selection.near(state.doc.resolve(sel.head + dir), dir));
592
+ else {
593
+ const $cell = state.doc.resolve(end);
594
+ const $next = nextCell($cell, axis, dir);
595
+ let newSel;
596
+ if ($next) newSel = require_dist$1.Selection.near($next, 1);
597
+ else if (dir < 0) newSel = require_dist$1.Selection.near(state.doc.resolve($cell.before(-1)), -1);
598
+ else newSel = require_dist$1.Selection.near(state.doc.resolve($cell.after(-1)), 1);
599
+ return maybeSetSelection(state, dispatch, newSel);
600
+ }
601
+ };
602
+ }
603
+ function shiftArrow(axis, dir) {
604
+ return (state, dispatch, view) => {
605
+ if (!view) return false;
606
+ const sel = state.selection;
607
+ let cellSel;
608
+ if (sel instanceof CellSelection) cellSel = sel;
609
+ else {
610
+ const end = atEndOfCell(view, axis, dir);
611
+ if (end == null) return false;
612
+ cellSel = new CellSelection(state.doc.resolve(end));
613
+ }
614
+ const $head = nextCell(cellSel.$headCell, axis, dir);
615
+ if (!$head) return false;
616
+ return maybeSetSelection(state, dispatch, new CellSelection(cellSel.$anchorCell, $head));
617
+ };
618
+ }
619
+ function atEndOfCell(view, axis, dir) {
620
+ if (!(view.state.selection instanceof require_dist$1.TextSelection)) return null;
621
+ const { $head } = view.state.selection;
622
+ for (let d = $head.depth - 1; d >= 0; d--) {
623
+ const parent = $head.node(d);
624
+ if ((dir < 0 ? $head.index(d) : $head.indexAfter(d)) != (dir < 0 ? 0 : parent.childCount)) return null;
625
+ if (parent.type.spec.tableRole == "cell" || parent.type.spec.tableRole == "header_cell") {
626
+ const cellPos = $head.before(d);
627
+ const dirStr = axis == "vert" ? dir > 0 ? "down" : "up" : dir > 0 ? "right" : "left";
628
+ return view.endOfTextblock(dirStr) ? cellPos : null;
629
+ }
630
+ }
631
+ return null;
632
+ }
633
+ new require_dist$1.PluginKey("tableColumnResizing");
634
+ //#endregion
635
+ //#region ../../node_modules/.pnpm/@tiptap+vue-3@3.11.0_@floating-ui+dom@1.6.13_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+p_6dhb34rvoqevq5xeb47hxntupe/node_modules/@tiptap/vue-3/dist/menus/index.js
636
+ function combineDOMRects(rect1, rect2) {
637
+ const top = Math.min(rect1.top, rect2.top);
638
+ const bottom = Math.max(rect1.bottom, rect2.bottom);
639
+ const left = Math.min(rect1.left, rect2.left);
640
+ const width = Math.max(rect1.right, rect2.right) - left;
641
+ const height = bottom - top;
642
+ return new DOMRect(left, top, width, height);
643
+ }
644
+ var BubbleMenuView = class {
645
+ constructor({ editor, element, view, updateDelay = 250, resizeDelay = 60, shouldShow, appendTo, getReferencedVirtualElement, options }) {
646
+ this.preventHide = false;
647
+ this.isVisible = false;
648
+ this.scrollTarget = window;
649
+ this.floatingUIOptions = {
650
+ strategy: "absolute",
651
+ placement: "top",
652
+ offset: 8,
653
+ flip: {},
654
+ shift: {},
655
+ arrow: false,
656
+ size: false,
657
+ autoPlacement: false,
658
+ hide: false,
659
+ inline: false,
660
+ onShow: void 0,
661
+ onHide: void 0,
662
+ onUpdate: void 0,
663
+ onDestroy: void 0
664
+ };
665
+ this.shouldShow = ({ view, state, from, to }) => {
666
+ const { doc, selection } = state;
667
+ const { empty } = selection;
668
+ const isEmptyTextBlock = !doc.textBetween(from, to).length && require_dist$1.isTextSelection(state.selection);
669
+ const isChildOfMenu = this.element.contains(document.activeElement);
670
+ if (!(view.hasFocus() || isChildOfMenu) || empty || isEmptyTextBlock || !this.editor.isEditable) return false;
671
+ return true;
672
+ };
673
+ this.mousedownHandler = () => {
674
+ this.preventHide = true;
675
+ };
676
+ this.dragstartHandler = () => {
677
+ this.hide();
678
+ };
679
+ /**
680
+ * Handles the window resize event to update the position of the bubble menu.
681
+ * It uses a debounce mechanism to prevent excessive updates.
682
+ * The delay is defined by the `resizeDelay` property.
683
+ */
684
+ this.resizeHandler = () => {
685
+ if (this.resizeDebounceTimer) clearTimeout(this.resizeDebounceTimer);
686
+ this.resizeDebounceTimer = window.setTimeout(() => {
687
+ this.updatePosition();
688
+ }, this.resizeDelay);
689
+ };
690
+ this.focusHandler = () => {
691
+ setTimeout(() => this.update(this.editor.view));
692
+ };
693
+ this.blurHandler = ({ event }) => {
694
+ var _a;
695
+ if (this.editor.isDestroyed) {
696
+ this.destroy();
697
+ return;
698
+ }
699
+ if (this.preventHide) {
700
+ this.preventHide = false;
701
+ return;
702
+ }
703
+ if ((event == null ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) == null ? void 0 : _a.contains(event.relatedTarget))) return;
704
+ if ((event == null ? void 0 : event.relatedTarget) === this.editor.view.dom) return;
705
+ this.hide();
706
+ };
707
+ this.handleDebouncedUpdate = (view, oldState) => {
708
+ const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));
709
+ const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));
710
+ if (!selectionChanged && !docChanged) return;
711
+ if (this.updateDebounceTimer) clearTimeout(this.updateDebounceTimer);
712
+ this.updateDebounceTimer = window.setTimeout(() => {
713
+ this.updateHandler(view, selectionChanged, docChanged, oldState);
714
+ }, this.updateDelay);
715
+ };
716
+ this.updateHandler = (view, selectionChanged, docChanged, oldState) => {
717
+ const { composing } = view;
718
+ if (composing || !selectionChanged && !docChanged) return;
719
+ if (!this.getShouldShow(oldState)) {
720
+ this.hide();
721
+ return;
722
+ }
723
+ this.updatePosition();
724
+ this.show();
725
+ };
726
+ this.transactionHandler = ({ transaction: tr }) => {
727
+ if (tr.getMeta("bubbleMenu") === "updatePosition") this.updatePosition();
728
+ };
729
+ var _a;
730
+ this.editor = editor;
731
+ this.element = element;
732
+ this.view = view;
733
+ this.updateDelay = updateDelay;
734
+ this.resizeDelay = resizeDelay;
735
+ this.appendTo = appendTo;
736
+ this.scrollTarget = (_a = options == null ? void 0 : options.scrollTarget) != null ? _a : window;
737
+ this.getReferencedVirtualElement = getReferencedVirtualElement;
738
+ this.floatingUIOptions = {
739
+ ...this.floatingUIOptions,
740
+ ...options
741
+ };
742
+ this.element.tabIndex = 0;
743
+ if (shouldShow) this.shouldShow = shouldShow;
744
+ this.element.addEventListener("mousedown", this.mousedownHandler, { capture: true });
745
+ this.view.dom.addEventListener("dragstart", this.dragstartHandler);
746
+ this.editor.on("focus", this.focusHandler);
747
+ this.editor.on("blur", this.blurHandler);
748
+ this.editor.on("transaction", this.transactionHandler);
749
+ window.addEventListener("resize", this.resizeHandler);
750
+ this.scrollTarget.addEventListener("scroll", this.resizeHandler);
751
+ this.update(view, view.state);
752
+ if (this.getShouldShow()) {
753
+ this.show();
754
+ this.updatePosition();
755
+ }
756
+ }
757
+ get middlewares() {
758
+ const middlewares = [];
759
+ if (this.floatingUIOptions.flip) middlewares.push(require_dist.flip(typeof this.floatingUIOptions.flip !== "boolean" ? this.floatingUIOptions.flip : void 0));
760
+ if (this.floatingUIOptions.shift) middlewares.push(require_dist.shift(typeof this.floatingUIOptions.shift !== "boolean" ? this.floatingUIOptions.shift : void 0));
761
+ if (this.floatingUIOptions.offset) middlewares.push(require_dist.offset(typeof this.floatingUIOptions.offset !== "boolean" ? this.floatingUIOptions.offset : void 0));
762
+ if (this.floatingUIOptions.arrow) middlewares.push(require_dist.arrow(this.floatingUIOptions.arrow));
763
+ if (this.floatingUIOptions.size) middlewares.push(require_dist.size(typeof this.floatingUIOptions.size !== "boolean" ? this.floatingUIOptions.size : void 0));
764
+ if (this.floatingUIOptions.autoPlacement) middlewares.push(require_dist.autoPlacement(typeof this.floatingUIOptions.autoPlacement !== "boolean" ? this.floatingUIOptions.autoPlacement : void 0));
765
+ if (this.floatingUIOptions.hide) middlewares.push(require_dist.hide(typeof this.floatingUIOptions.hide !== "boolean" ? this.floatingUIOptions.hide : void 0));
766
+ if (this.floatingUIOptions.inline) middlewares.push(require_dist.inline(typeof this.floatingUIOptions.inline !== "boolean" ? this.floatingUIOptions.inline : void 0));
767
+ return middlewares;
768
+ }
769
+ get virtualElement() {
770
+ var _a;
771
+ const { selection } = this.editor.state;
772
+ const referencedVirtualElement = (_a = this.getReferencedVirtualElement) == null ? void 0 : _a.call(this);
773
+ if (referencedVirtualElement) return referencedVirtualElement;
774
+ const domRect = require_dist$1.posToDOMRect(this.view, selection.from, selection.to);
775
+ let virtualElement = {
776
+ getBoundingClientRect: () => domRect,
777
+ getClientRects: () => [domRect]
778
+ };
779
+ if (selection instanceof require_dist$1.NodeSelection) {
780
+ let node = this.view.nodeDOM(selection.from);
781
+ const nodeViewWrapper = node.dataset.nodeViewWrapper ? node : node.querySelector("[data-node-view-wrapper]");
782
+ if (nodeViewWrapper) node = nodeViewWrapper;
783
+ if (node) virtualElement = {
784
+ getBoundingClientRect: () => node.getBoundingClientRect(),
785
+ getClientRects: () => [node.getBoundingClientRect()]
786
+ };
787
+ }
788
+ if (selection instanceof CellSelection) {
789
+ const { $anchorCell, $headCell } = selection;
790
+ const from = $anchorCell ? $anchorCell.pos : $headCell.pos;
791
+ const to = $headCell ? $headCell.pos : $anchorCell.pos;
792
+ const fromDOM = this.view.nodeDOM(from);
793
+ const toDOM = this.view.nodeDOM(to);
794
+ if (!fromDOM || !toDOM) return;
795
+ const clientRect = fromDOM === toDOM ? fromDOM.getBoundingClientRect() : combineDOMRects(fromDOM.getBoundingClientRect(), toDOM.getBoundingClientRect());
796
+ virtualElement = {
797
+ getBoundingClientRect: () => clientRect,
798
+ getClientRects: () => [clientRect]
799
+ };
800
+ }
801
+ return virtualElement;
802
+ }
803
+ updatePosition() {
804
+ const virtualElement = this.virtualElement;
805
+ if (!virtualElement) return;
806
+ require_dist.computePosition(virtualElement, this.element, {
807
+ placement: this.floatingUIOptions.placement,
808
+ strategy: this.floatingUIOptions.strategy,
809
+ middleware: this.middlewares
810
+ }).then(({ x, y, strategy }) => {
811
+ this.element.style.width = "max-content";
812
+ this.element.style.position = strategy;
813
+ this.element.style.left = `${x}px`;
814
+ this.element.style.top = `${y}px`;
815
+ if (this.isVisible && this.floatingUIOptions.onUpdate) this.floatingUIOptions.onUpdate();
816
+ });
817
+ }
818
+ update(view, oldState) {
819
+ const { state } = view;
820
+ const hasValidSelection = state.selection.from !== state.selection.to;
821
+ if (this.updateDelay > 0 && hasValidSelection) {
822
+ this.handleDebouncedUpdate(view, oldState);
823
+ return;
824
+ }
825
+ const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));
826
+ const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));
827
+ this.updateHandler(view, selectionChanged, docChanged, oldState);
828
+ }
829
+ getShouldShow(oldState) {
830
+ var _a;
831
+ const { state } = this.view;
832
+ const { selection } = state;
833
+ const { ranges } = selection;
834
+ const from = Math.min(...ranges.map((range) => range.$from.pos));
835
+ const to = Math.max(...ranges.map((range) => range.$to.pos));
836
+ return ((_a = this.shouldShow) == null ? void 0 : _a.call(this, {
837
+ editor: this.editor,
838
+ element: this.element,
839
+ view: this.view,
840
+ state,
841
+ oldState,
842
+ from,
843
+ to
844
+ })) || false;
845
+ }
846
+ show() {
847
+ var _a;
848
+ if (this.isVisible) return;
849
+ this.element.style.visibility = "visible";
850
+ this.element.style.opacity = "1";
851
+ const appendToElement = typeof this.appendTo === "function" ? this.appendTo() : this.appendTo;
852
+ (_a = appendToElement != null ? appendToElement : this.view.dom.parentElement) == null || _a.appendChild(this.element);
853
+ if (this.floatingUIOptions.onShow) this.floatingUIOptions.onShow();
854
+ this.isVisible = true;
855
+ }
856
+ hide() {
857
+ if (!this.isVisible) return;
858
+ this.element.style.visibility = "hidden";
859
+ this.element.style.opacity = "0";
860
+ this.element.remove();
861
+ if (this.floatingUIOptions.onHide) this.floatingUIOptions.onHide();
862
+ this.isVisible = false;
863
+ }
864
+ destroy() {
865
+ this.hide();
866
+ this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
867
+ this.view.dom.removeEventListener("dragstart", this.dragstartHandler);
868
+ window.removeEventListener("resize", this.resizeHandler);
869
+ this.scrollTarget.removeEventListener("scroll", this.resizeHandler);
870
+ this.editor.off("focus", this.focusHandler);
871
+ this.editor.off("blur", this.blurHandler);
872
+ this.editor.off("transaction", this.transactionHandler);
873
+ if (this.floatingUIOptions.onDestroy) this.floatingUIOptions.onDestroy();
874
+ }
875
+ };
876
+ var BubbleMenuPlugin = (options) => {
877
+ return new require_dist$1.Plugin({
878
+ key: typeof options.pluginKey === "string" ? new require_dist$1.PluginKey(options.pluginKey) : options.pluginKey,
879
+ view: (view) => new BubbleMenuView({
880
+ view,
881
+ ...options
882
+ })
883
+ });
884
+ };
885
+ var BubbleMenu = (0, vue.defineComponent)({
886
+ name: "BubbleMenu",
887
+ inheritAttrs: false,
888
+ props: {
889
+ pluginKey: {
890
+ type: [String, Object],
891
+ default: "bubbleMenu"
892
+ },
893
+ editor: {
894
+ type: Object,
895
+ required: true
896
+ },
897
+ updateDelay: {
898
+ type: Number,
899
+ default: void 0
900
+ },
901
+ resizeDelay: {
902
+ type: Number,
903
+ default: void 0
904
+ },
905
+ options: {
906
+ type: Object,
907
+ default: () => ({})
908
+ },
909
+ appendTo: {
910
+ type: Object,
911
+ default: void 0
912
+ },
913
+ shouldShow: {
914
+ type: Function,
915
+ default: null
916
+ },
917
+ getReferencedVirtualElement: {
918
+ type: Function,
919
+ default: void 0
920
+ }
921
+ },
922
+ setup(props, { slots, attrs }) {
923
+ const root = (0, vue.ref)(null);
924
+ (0, vue.onMounted)(() => {
925
+ const { editor, options, pluginKey, resizeDelay, appendTo, shouldShow, getReferencedVirtualElement, updateDelay } = props;
926
+ const el = root.value;
927
+ if (!el) return;
928
+ el.style.visibility = "hidden";
929
+ el.style.position = "absolute";
930
+ el.remove();
931
+ (0, vue.nextTick)(() => {
932
+ editor.registerPlugin(BubbleMenuPlugin({
933
+ editor,
934
+ element: el,
935
+ options,
936
+ pluginKey,
937
+ resizeDelay,
938
+ appendTo,
939
+ shouldShow,
940
+ getReferencedVirtualElement,
941
+ updateDelay
942
+ }));
943
+ });
944
+ });
945
+ (0, vue.onBeforeUnmount)(() => {
946
+ const { pluginKey, editor } = props;
947
+ editor.unregisterPlugin(pluginKey);
948
+ });
949
+ return () => {
950
+ var _a;
951
+ return (0, vue.h)("div", {
952
+ ref: root,
953
+ ...attrs
954
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
955
+ };
956
+ }
957
+ });
958
+ var FloatingMenuView = class {
959
+ constructor({ editor, element, view, options, appendTo, shouldShow }) {
960
+ this.preventHide = false;
961
+ this.isVisible = false;
962
+ this.shouldShow = ({ view, state }) => {
963
+ const { selection } = state;
964
+ const { $anchor, empty } = selection;
965
+ const isRootDepth = $anchor.depth === 1;
966
+ const isEmptyTextBlock = $anchor.parent.isTextblock && !$anchor.parent.type.spec.code && !$anchor.parent.textContent && $anchor.parent.childCount === 0 && !this.getTextContent($anchor.parent);
967
+ if (!view.hasFocus() || !empty || !isRootDepth || !isEmptyTextBlock || !this.editor.isEditable) return false;
968
+ return true;
969
+ };
970
+ this.floatingUIOptions = {
971
+ strategy: "absolute",
972
+ placement: "right",
973
+ offset: 8,
974
+ flip: {},
975
+ shift: {},
976
+ arrow: false,
977
+ size: false,
978
+ autoPlacement: false,
979
+ hide: false,
980
+ inline: false
981
+ };
982
+ this.updateHandler = (view, selectionChanged, docChanged, oldState) => {
983
+ const { composing } = view;
984
+ if (composing || !selectionChanged && !docChanged) return;
985
+ if (!this.getShouldShow(oldState)) {
986
+ this.hide();
987
+ return;
988
+ }
989
+ this.updatePosition();
990
+ this.show();
991
+ };
992
+ this.mousedownHandler = () => {
993
+ this.preventHide = true;
994
+ };
995
+ this.focusHandler = () => {
996
+ setTimeout(() => this.update(this.editor.view));
997
+ };
998
+ this.blurHandler = ({ event }) => {
999
+ var _a;
1000
+ if (this.preventHide) {
1001
+ this.preventHide = false;
1002
+ return;
1003
+ }
1004
+ if ((event == null ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) == null ? void 0 : _a.contains(event.relatedTarget))) return;
1005
+ if ((event == null ? void 0 : event.relatedTarget) === this.editor.view.dom) return;
1006
+ this.hide();
1007
+ };
1008
+ this.editor = editor;
1009
+ this.element = element;
1010
+ this.view = view;
1011
+ this.appendTo = appendTo;
1012
+ this.floatingUIOptions = {
1013
+ ...this.floatingUIOptions,
1014
+ ...options
1015
+ };
1016
+ this.element.tabIndex = 0;
1017
+ if (shouldShow) this.shouldShow = shouldShow;
1018
+ this.element.addEventListener("mousedown", this.mousedownHandler, { capture: true });
1019
+ this.editor.on("focus", this.focusHandler);
1020
+ this.editor.on("blur", this.blurHandler);
1021
+ this.update(view, view.state);
1022
+ if (this.getShouldShow()) {
1023
+ this.show();
1024
+ this.updatePosition();
1025
+ }
1026
+ }
1027
+ getTextContent(node) {
1028
+ return require_dist$1.getText(node, { textSerializers: require_dist$1.getTextSerializersFromSchema(this.editor.schema) });
1029
+ }
1030
+ get middlewares() {
1031
+ const middlewares = [];
1032
+ if (this.floatingUIOptions.flip) middlewares.push(require_dist.flip(typeof this.floatingUIOptions.flip !== "boolean" ? this.floatingUIOptions.flip : void 0));
1033
+ if (this.floatingUIOptions.shift) middlewares.push(require_dist.shift(typeof this.floatingUIOptions.shift !== "boolean" ? this.floatingUIOptions.shift : void 0));
1034
+ if (this.floatingUIOptions.offset) middlewares.push(require_dist.offset(typeof this.floatingUIOptions.offset !== "boolean" ? this.floatingUIOptions.offset : void 0));
1035
+ if (this.floatingUIOptions.arrow) middlewares.push(require_dist.arrow(this.floatingUIOptions.arrow));
1036
+ if (this.floatingUIOptions.size) middlewares.push(require_dist.size(typeof this.floatingUIOptions.size !== "boolean" ? this.floatingUIOptions.size : void 0));
1037
+ if (this.floatingUIOptions.autoPlacement) middlewares.push(require_dist.autoPlacement(typeof this.floatingUIOptions.autoPlacement !== "boolean" ? this.floatingUIOptions.autoPlacement : void 0));
1038
+ if (this.floatingUIOptions.hide) middlewares.push(require_dist.hide(typeof this.floatingUIOptions.hide !== "boolean" ? this.floatingUIOptions.hide : void 0));
1039
+ if (this.floatingUIOptions.inline) middlewares.push(require_dist.inline(typeof this.floatingUIOptions.inline !== "boolean" ? this.floatingUIOptions.inline : void 0));
1040
+ return middlewares;
1041
+ }
1042
+ getShouldShow(oldState) {
1043
+ var _a;
1044
+ const { state } = this.view;
1045
+ const { selection } = state;
1046
+ const { ranges } = selection;
1047
+ const from = Math.min(...ranges.map((range) => range.$from.pos));
1048
+ const to = Math.max(...ranges.map((range) => range.$to.pos));
1049
+ return (_a = this.shouldShow) == null ? void 0 : _a.call(this, {
1050
+ editor: this.editor,
1051
+ view: this.view,
1052
+ state,
1053
+ oldState,
1054
+ from,
1055
+ to
1056
+ });
1057
+ }
1058
+ updatePosition() {
1059
+ const { selection } = this.editor.state;
1060
+ const domRect = require_dist$1.posToDOMRect(this.view, selection.from, selection.to);
1061
+ require_dist.computePosition({
1062
+ getBoundingClientRect: () => domRect,
1063
+ getClientRects: () => [domRect]
1064
+ }, this.element, {
1065
+ placement: this.floatingUIOptions.placement,
1066
+ strategy: this.floatingUIOptions.strategy,
1067
+ middleware: this.middlewares
1068
+ }).then(({ x, y, strategy }) => {
1069
+ this.element.style.width = "max-content";
1070
+ this.element.style.position = strategy;
1071
+ this.element.style.left = `${x}px`;
1072
+ this.element.style.top = `${y}px`;
1073
+ if (this.isVisible && this.floatingUIOptions.onUpdate) this.floatingUIOptions.onUpdate();
1074
+ });
1075
+ }
1076
+ update(view, oldState) {
1077
+ const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));
1078
+ const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));
1079
+ this.updateHandler(view, selectionChanged, docChanged, oldState);
1080
+ }
1081
+ show() {
1082
+ var _a;
1083
+ if (this.isVisible) return;
1084
+ this.element.style.visibility = "visible";
1085
+ this.element.style.opacity = "1";
1086
+ const appendToElement = typeof this.appendTo === "function" ? this.appendTo() : this.appendTo;
1087
+ (_a = appendToElement != null ? appendToElement : this.view.dom.parentElement) == null || _a.appendChild(this.element);
1088
+ if (this.floatingUIOptions.onShow) this.floatingUIOptions.onShow();
1089
+ this.isVisible = true;
1090
+ }
1091
+ hide() {
1092
+ if (!this.isVisible) return;
1093
+ this.element.style.visibility = "hidden";
1094
+ this.element.style.opacity = "0";
1095
+ this.element.remove();
1096
+ if (this.floatingUIOptions.onHide) this.floatingUIOptions.onHide();
1097
+ this.isVisible = false;
1098
+ }
1099
+ destroy() {
1100
+ this.hide();
1101
+ this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
1102
+ this.editor.off("focus", this.focusHandler);
1103
+ this.editor.off("blur", this.blurHandler);
1104
+ if (this.floatingUIOptions.onDestroy) this.floatingUIOptions.onDestroy();
1105
+ }
1106
+ };
1107
+ var FloatingMenuPlugin = (options) => {
1108
+ return new require_dist$1.Plugin({
1109
+ key: typeof options.pluginKey === "string" ? new require_dist$1.PluginKey(options.pluginKey) : options.pluginKey,
1110
+ view: (view) => new FloatingMenuView({
1111
+ view,
1112
+ ...options
1113
+ })
1114
+ });
1115
+ };
1116
+ (0, vue.defineComponent)({
1117
+ name: "FloatingMenu",
1118
+ inheritAttrs: false,
1119
+ props: {
1120
+ pluginKey: {
1121
+ type: null,
1122
+ default: "floatingMenu"
1123
+ },
1124
+ editor: {
1125
+ type: Object,
1126
+ required: true
1127
+ },
1128
+ options: {
1129
+ type: Object,
1130
+ default: () => ({})
1131
+ },
1132
+ appendTo: {
1133
+ type: Object,
1134
+ default: void 0
1135
+ },
1136
+ shouldShow: {
1137
+ type: Function,
1138
+ default: null
1139
+ }
1140
+ },
1141
+ setup(props, { slots, attrs }) {
1142
+ const root = (0, vue.ref)(null);
1143
+ (0, vue.onMounted)(() => {
1144
+ const { pluginKey, editor, options, appendTo, shouldShow } = props;
1145
+ const el = root.value;
1146
+ if (!el) return;
1147
+ el.style.visibility = "hidden";
1148
+ el.style.position = "absolute";
1149
+ el.remove();
1150
+ editor.registerPlugin(FloatingMenuPlugin({
1151
+ pluginKey,
1152
+ editor,
1153
+ element: el,
1154
+ options,
1155
+ appendTo,
1156
+ shouldShow
1157
+ }));
1158
+ });
1159
+ (0, vue.onBeforeUnmount)(() => {
1160
+ const { pluginKey, editor } = props;
1161
+ editor.unregisterPlugin(pluginKey);
1162
+ });
1163
+ return () => {
1164
+ var _a;
1165
+ return (0, vue.h)("div", {
1166
+ ref: root,
1167
+ ...attrs
1168
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
1169
+ };
1170
+ }
1171
+ });
1172
+ //#endregion
1173
+ exports.BubbleMenu = BubbleMenu;