@youcan/celeste 0.6.98 → 0.6.99

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 (908) hide show
  1. package/dist/cjs/alert.cjs +2 -0
  2. package/dist/cjs/alpha-slider.cjs +2 -0
  3. package/dist/cjs/badge.cjs +2 -0
  4. package/dist/cjs/button.cjs +2 -0
  5. package/dist/cjs/checkbox-card.cjs +2 -0
  6. package/dist/cjs/checkbox-label.cjs +2 -0
  7. package/dist/cjs/checkbox.cjs +2 -0
  8. package/dist/cjs/chunks/alert.cjs +103 -0
  9. package/dist/cjs/chunks/alpha-slider.cjs +119 -0
  10. package/dist/cjs/chunks/badge.cjs +59 -0
  11. package/dist/cjs/chunks/button.cjs +43 -0
  12. package/dist/cjs/chunks/checkbox-card.cjs +100 -0
  13. package/dist/cjs/chunks/checkbox-label.cjs +94 -0
  14. package/dist/cjs/chunks/checkbox.cjs +40 -0
  15. package/dist/cjs/chunks/collapsible-content.cjs +30 -0
  16. package/dist/cjs/chunks/collapsible-trigger.cjs +27 -0
  17. package/dist/cjs/chunks/collapsible.cjs +31 -0
  18. package/dist/cjs/chunks/color-area.cjs +174 -0
  19. package/dist/cjs/chunks/color-picker.cjs +458 -0
  20. package/dist/cjs/chunks/color-swatch.cjs +65 -0
  21. package/dist/cjs/chunks/combobox-anchor.cjs +33 -0
  22. package/dist/cjs/chunks/combobox-empty.cjs +36 -0
  23. package/dist/cjs/chunks/combobox-group.cjs +43 -0
  24. package/dist/cjs/chunks/combobox-input.cjs +72 -0
  25. package/dist/cjs/chunks/combobox-item.cjs +95 -0
  26. package/dist/cjs/chunks/combobox-list.cjs +66 -0
  27. package/dist/cjs/chunks/combobox-root.cjs +50 -0
  28. package/dist/cjs/chunks/combobox-separator.cjs +36 -0
  29. package/dist/cjs/chunks/combobox-trigger.cjs +45 -0
  30. package/dist/cjs/chunks/combobox.cjs +199 -0
  31. package/dist/cjs/chunks/compact-button.cjs +44 -0
  32. package/dist/cjs/chunks/components.cjs +310 -0
  33. package/dist/cjs/chunks/content-divider.cjs +60 -0
  34. package/dist/cjs/chunks/core.cjs +325 -0
  35. package/dist/cjs/chunks/counter-input.cjs +75 -0
  36. package/dist/cjs/chunks/digit-input-group.cjs +34 -0
  37. package/dist/cjs/chunks/digit-input-slot.cjs +33 -0
  38. package/dist/cjs/chunks/digit-input.cjs +54 -0
  39. package/dist/cjs/chunks/dropdown-menu-content.cjs +62 -0
  40. package/dist/cjs/chunks/dropdown-menu-group.cjs +30 -0
  41. package/dist/cjs/chunks/dropdown-menu-item.cjs +49 -0
  42. package/dist/cjs/chunks/dropdown-menu-label.cjs +34 -0
  43. package/dist/cjs/chunks/dropdown-menu-separator.cjs +31 -0
  44. package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +59 -0
  45. package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +45 -0
  46. package/dist/cjs/chunks/dropdown-menu-sub.cjs +28 -0
  47. package/dist/cjs/chunks/dropdown-menu-trigger.cjs +31 -0
  48. package/dist/cjs/chunks/dropdown-menu.cjs +38 -0
  49. package/dist/cjs/chunks/extra-settings.cjs +134 -0
  50. package/dist/cjs/chunks/fancy-button.cjs +42 -0
  51. package/dist/cjs/chunks/file-upload-area.cjs +139 -0
  52. package/dist/cjs/chunks/hint-text.cjs +38 -0
  53. package/dist/cjs/chunks/hue-slider.cjs +120 -0
  54. package/dist/cjs/chunks/label.cjs +64 -0
  55. package/dist/cjs/chunks/link-bubble.cjs +198 -0
  56. package/dist/cjs/chunks/link-button.cjs +48 -0
  57. package/dist/cjs/chunks/menus.cjs +1173 -0
  58. package/dist/cjs/chunks/modal-body.cjs +25 -0
  59. package/dist/cjs/chunks/modal-close.cjs +27 -0
  60. package/dist/cjs/chunks/modal-content.cjs +53 -0
  61. package/dist/cjs/chunks/modal-footer.cjs +25 -0
  62. package/dist/cjs/chunks/modal-header.cjs +83 -0
  63. package/dist/cjs/chunks/modal-trigger.cjs +27 -0
  64. package/dist/cjs/chunks/modal.cjs +29 -0
  65. package/dist/cjs/chunks/pagination-content.cjs +34 -0
  66. package/dist/cjs/chunks/pagination-ellipsis.cjs +37 -0
  67. package/dist/cjs/chunks/pagination-first.cjs +34 -0
  68. package/dist/cjs/chunks/pagination-item.cjs +37 -0
  69. package/dist/cjs/chunks/pagination-last.cjs +34 -0
  70. package/dist/cjs/chunks/pagination-next.cjs +34 -0
  71. package/dist/cjs/chunks/pagination-previous.cjs +34 -0
  72. package/dist/cjs/chunks/pagination.cjs +60 -0
  73. package/dist/cjs/chunks/popover-content.cjs +113 -0
  74. package/dist/cjs/chunks/popover-trigger.cjs +30 -0
  75. package/dist/cjs/chunks/popover.cjs +29 -0
  76. package/dist/cjs/chunks/progress-bar.cjs +73 -0
  77. package/dist/cjs/chunks/progress-circle.cjs +95 -0
  78. package/dist/cjs/chunks/radio-group-card.cjs +100 -0
  79. package/dist/cjs/chunks/radio-group-item.cjs +36 -0
  80. package/dist/cjs/chunks/radio-group-label.cjs +94 -0
  81. package/dist/cjs/chunks/radio-group.cjs +41 -0
  82. package/dist/cjs/chunks/rich-editor.cjs +5187 -0
  83. package/dist/cjs/chunks/scroll-area.cjs +46 -0
  84. package/dist/cjs/chunks/scroll-bar.cjs +37 -0
  85. package/dist/cjs/chunks/segmented-control-item.cjs +43 -0
  86. package/dist/cjs/chunks/segmented-control.cjs +43 -0
  87. package/dist/cjs/chunks/select-content.cjs +66 -0
  88. package/dist/cjs/chunks/select-group.cjs +27 -0
  89. package/dist/cjs/chunks/select-icon.cjs +27 -0
  90. package/dist/cjs/chunks/select-item.cjs +43 -0
  91. package/dist/cjs/chunks/select-label.cjs +35 -0
  92. package/dist/cjs/chunks/select-separator.cjs +31 -0
  93. package/dist/cjs/chunks/select-trigger.cjs +41 -0
  94. package/dist/cjs/chunks/select-value.cjs +35 -0
  95. package/dist/cjs/chunks/select.cjs +40 -0
  96. package/dist/cjs/chunks/sheet-close.cjs +32 -0
  97. package/dist/cjs/chunks/sheet-content.cjs +65 -0
  98. package/dist/cjs/chunks/sheet-description.cjs +34 -0
  99. package/dist/cjs/chunks/sheet-footer.cjs +25 -0
  100. package/dist/cjs/chunks/sheet-header.cjs +25 -0
  101. package/dist/cjs/chunks/sheet-title.cjs +34 -0
  102. package/dist/cjs/chunks/sheet-trigger.cjs +27 -0
  103. package/dist/cjs/chunks/sheet.cjs +29 -0
  104. package/dist/cjs/chunks/sidebar-content.cjs +25 -0
  105. package/dist/cjs/chunks/sidebar-element.cjs +33 -0
  106. package/dist/cjs/chunks/sidebar-footer.cjs +25 -0
  107. package/dist/cjs/chunks/sidebar-group-content.cjs +28 -0
  108. package/dist/cjs/chunks/sidebar-group-label.cjs +38 -0
  109. package/dist/cjs/chunks/sidebar-group.cjs +25 -0
  110. package/dist/cjs/chunks/sidebar-header.cjs +25 -0
  111. package/dist/cjs/chunks/sidebar-menu-action.cjs +39 -0
  112. package/dist/cjs/chunks/sidebar-menu-badge.cjs +43 -0
  113. package/dist/cjs/chunks/sidebar-menu-button.cjs +44 -0
  114. package/dist/cjs/chunks/sidebar-menu-item.cjs +25 -0
  115. package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +47 -0
  116. package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +25 -0
  117. package/dist/cjs/chunks/sidebar-menu-sub.cjs +25 -0
  118. package/dist/cjs/chunks/sidebar-menu.cjs +25 -0
  119. package/dist/cjs/chunks/sidebar-provider.cjs +73 -0
  120. package/dist/cjs/chunks/sidebar-trigger.cjs +38 -0
  121. package/dist/cjs/chunks/sidebar.cjs +69 -0
  122. package/dist/cjs/chunks/slider.cjs +51 -0
  123. package/dist/cjs/chunks/social-button.cjs +42 -0
  124. package/dist/cjs/chunks/sonner-alert.cjs +42 -0
  125. package/dist/cjs/chunks/sonner.cjs +1222 -0
  126. package/dist/cjs/chunks/status-badge.cjs +50 -0
  127. package/dist/cjs/chunks/switch.cjs +40 -0
  128. package/dist/cjs/chunks/tab-menu-content.cjs +36 -0
  129. package/dist/cjs/chunks/tab-menu-item.cjs +44 -0
  130. package/dist/cjs/chunks/tab-menu-list.cjs +35 -0
  131. package/dist/cjs/chunks/tab-menu.cjs +36 -0
  132. package/dist/cjs/chunks/table-body.cjs +25 -0
  133. package/dist/cjs/chunks/table-caption.cjs +25 -0
  134. package/dist/cjs/chunks/table-cell.cjs +31 -0
  135. package/dist/cjs/chunks/table-footer.cjs +25 -0
  136. package/dist/cjs/chunks/table-head.cjs +31 -0
  137. package/dist/cjs/chunks/table-header.cjs +22 -0
  138. package/dist/cjs/chunks/table-row.cjs +34 -0
  139. package/dist/cjs/chunks/table.cjs +45 -0
  140. package/dist/cjs/chunks/table2.cjs +26 -0
  141. package/dist/cjs/chunks/tag.cjs +58 -0
  142. package/dist/cjs/chunks/text-input-affix.cjs +31 -0
  143. package/dist/cjs/chunks/text-input-button.cjs +39 -0
  144. package/dist/cjs/chunks/text-input.cjs +118 -0
  145. package/dist/cjs/chunks/textarea.cjs +61 -0
  146. package/dist/cjs/chunks/tooltip-content.cjs +108 -0
  147. package/dist/cjs/chunks/tooltip-provider.cjs +31 -0
  148. package/dist/cjs/chunks/tooltip-root.cjs +40 -0
  149. package/dist/cjs/chunks/tooltip-trigger.cjs +27 -0
  150. package/dist/cjs/chunks/tooltip.cjs +99 -0
  151. package/dist/cjs/chunks/use-color-model.cjs +943 -0
  152. package/dist/cjs/collapsible-content.cjs +2 -0
  153. package/dist/cjs/collapsible-trigger.cjs +2 -0
  154. package/dist/cjs/collapsible.cjs +2 -0
  155. package/dist/cjs/color-area.cjs +2 -0
  156. package/dist/cjs/color-picker.cjs +2 -0
  157. package/dist/cjs/color-swatch.cjs +2 -0
  158. package/dist/cjs/combobox-anchor.cjs +2 -0
  159. package/dist/cjs/combobox-empty.cjs +2 -0
  160. package/dist/cjs/combobox-group.cjs +2 -0
  161. package/dist/cjs/combobox-input.cjs +2 -0
  162. package/dist/cjs/combobox-item.cjs +2 -0
  163. package/dist/cjs/combobox-list.cjs +2 -0
  164. package/dist/cjs/combobox-root.cjs +2 -0
  165. package/dist/cjs/combobox-separator.cjs +2 -0
  166. package/dist/cjs/combobox-trigger.cjs +2 -0
  167. package/dist/cjs/combobox.cjs +2 -0
  168. package/dist/cjs/command-group.cjs +37 -0
  169. package/dist/cjs/command-input.cjs +42 -0
  170. package/dist/cjs/command-item.cjs +31 -0
  171. package/dist/cjs/command-list.cjs +56 -0
  172. package/dist/cjs/command-root.cjs +51 -0
  173. package/dist/cjs/command-separator.cjs +31 -0
  174. package/dist/cjs/compact-button.cjs +2 -0
  175. package/dist/cjs/config.cjs +301 -0
  176. package/dist/cjs/content-divider.cjs +2 -0
  177. package/dist/cjs/counter-input.cjs +2 -0
  178. package/dist/cjs/digit-input-group.cjs +2 -0
  179. package/dist/cjs/digit-input-slot.cjs +2 -0
  180. package/dist/cjs/digit-input.cjs +2 -0
  181. package/dist/cjs/dropdown-menu-content.cjs +2 -0
  182. package/dist/cjs/dropdown-menu-group.cjs +2 -0
  183. package/dist/cjs/dropdown-menu-item.cjs +2 -0
  184. package/dist/cjs/dropdown-menu-label.cjs +2 -0
  185. package/dist/cjs/dropdown-menu-separator.cjs +2 -0
  186. package/dist/cjs/dropdown-menu-sub-content.cjs +2 -0
  187. package/dist/cjs/dropdown-menu-sub-trigger.cjs +2 -0
  188. package/dist/cjs/dropdown-menu-sub.cjs +2 -0
  189. package/dist/cjs/dropdown-menu-trigger.cjs +2 -0
  190. package/dist/cjs/dropdown-menu.cjs +2 -0
  191. package/dist/cjs/extra-settings.cjs +2 -0
  192. package/dist/cjs/fancy-button.cjs +2 -0
  193. package/dist/cjs/file-upload-area.cjs +2 -0
  194. package/dist/cjs/hint-text.cjs +2 -0
  195. package/dist/cjs/hue-slider.cjs +2 -0
  196. package/dist/cjs/index.cjs +375 -0
  197. package/dist/cjs/label.cjs +2 -0
  198. package/dist/cjs/link-bubble.cjs +2 -0
  199. package/dist/cjs/link-button.cjs +2 -0
  200. package/dist/cjs/modal-body.cjs +2 -0
  201. package/dist/cjs/modal-close.cjs +2 -0
  202. package/dist/cjs/modal-content.cjs +2 -0
  203. package/dist/cjs/modal-footer.cjs +2 -0
  204. package/dist/cjs/modal-header.cjs +2 -0
  205. package/dist/cjs/modal-trigger.cjs +2 -0
  206. package/dist/cjs/modal.cjs +2 -0
  207. package/dist/cjs/pagination-content.cjs +2 -0
  208. package/dist/cjs/pagination-ellipsis.cjs +2 -0
  209. package/dist/cjs/pagination-first.cjs +2 -0
  210. package/dist/cjs/pagination-item.cjs +2 -0
  211. package/dist/cjs/pagination-last.cjs +2 -0
  212. package/dist/cjs/pagination-next.cjs +2 -0
  213. package/dist/cjs/pagination-previous.cjs +2 -0
  214. package/dist/cjs/pagination.cjs +2 -0
  215. package/dist/cjs/popover-content.cjs +2 -0
  216. package/dist/cjs/popover-trigger.cjs +2 -0
  217. package/dist/cjs/popover.cjs +2 -0
  218. package/dist/cjs/progress-bar.cjs +2 -0
  219. package/dist/cjs/progress-circle.cjs +2 -0
  220. package/dist/cjs/radio-group-card.cjs +2 -0
  221. package/dist/cjs/radio-group-item.cjs +2 -0
  222. package/dist/cjs/radio-group-label.cjs +2 -0
  223. package/dist/cjs/radio-group.cjs +2 -0
  224. package/dist/cjs/rich-editor.cjs +2 -0
  225. package/dist/cjs/scroll-area.cjs +2 -0
  226. package/dist/cjs/scroll-bar.cjs +2 -0
  227. package/dist/cjs/segmented-control-item.cjs +2 -0
  228. package/dist/cjs/segmented-control.cjs +2 -0
  229. package/dist/cjs/select-content.cjs +2 -0
  230. package/dist/cjs/select-group.cjs +2 -0
  231. package/dist/cjs/select-icon.cjs +2 -0
  232. package/dist/cjs/select-item.cjs +2 -0
  233. package/dist/cjs/select-label.cjs +2 -0
  234. package/dist/cjs/select-separator.cjs +2 -0
  235. package/dist/cjs/select-trigger.cjs +2 -0
  236. package/dist/cjs/select-value.cjs +2 -0
  237. package/dist/cjs/select.cjs +2 -0
  238. package/dist/cjs/sheet-close.cjs +2 -0
  239. package/dist/cjs/sheet-content.cjs +2 -0
  240. package/dist/cjs/sheet-description.cjs +2 -0
  241. package/dist/cjs/sheet-footer.cjs +2 -0
  242. package/dist/cjs/sheet-header.cjs +2 -0
  243. package/dist/cjs/sheet-title.cjs +2 -0
  244. package/dist/cjs/sheet-trigger.cjs +2 -0
  245. package/dist/cjs/sheet.cjs +2 -0
  246. package/dist/cjs/sidebar-content.cjs +2 -0
  247. package/dist/cjs/sidebar-element.cjs +2 -0
  248. package/dist/cjs/sidebar-footer.cjs +2 -0
  249. package/dist/cjs/sidebar-group-content.cjs +2 -0
  250. package/dist/cjs/sidebar-group-label.cjs +2 -0
  251. package/dist/cjs/sidebar-group.cjs +2 -0
  252. package/dist/cjs/sidebar-header.cjs +2 -0
  253. package/dist/cjs/sidebar-menu-action.cjs +2 -0
  254. package/dist/cjs/sidebar-menu-badge.cjs +2 -0
  255. package/dist/cjs/sidebar-menu-button.cjs +2 -0
  256. package/dist/cjs/sidebar-menu-item.cjs +2 -0
  257. package/dist/cjs/sidebar-menu-sub-button.cjs +2 -0
  258. package/dist/cjs/sidebar-menu-sub-item.cjs +2 -0
  259. package/dist/cjs/sidebar-menu-sub.cjs +2 -0
  260. package/dist/cjs/sidebar-menu.cjs +2 -0
  261. package/dist/cjs/sidebar-provider.cjs +2 -0
  262. package/dist/cjs/sidebar-separator.cjs +2 -0
  263. package/dist/cjs/sidebar-trigger.cjs +2 -0
  264. package/dist/cjs/sidebar.cjs +2 -0
  265. package/dist/cjs/slider.cjs +2 -0
  266. package/dist/cjs/social-button.cjs +2 -0
  267. package/dist/cjs/sonner-alert.cjs +2 -0
  268. package/dist/cjs/sonner.cjs +2 -0
  269. package/dist/cjs/status-badge.cjs +2 -0
  270. package/dist/cjs/switch.cjs +2 -0
  271. package/dist/cjs/tab-menu-content.cjs +2 -0
  272. package/dist/cjs/tab-menu-item.cjs +2 -0
  273. package/dist/cjs/tab-menu-list.cjs +2 -0
  274. package/dist/cjs/tab-menu.cjs +2 -0
  275. package/dist/cjs/table-body.cjs +2 -0
  276. package/dist/cjs/table-caption.cjs +2 -0
  277. package/dist/cjs/table-cell.cjs +2 -0
  278. package/dist/cjs/table-empty.cjs +2 -0
  279. package/dist/cjs/table-footer.cjs +2 -0
  280. package/dist/cjs/table-head.cjs +2 -0
  281. package/dist/cjs/table-header.cjs +2 -0
  282. package/dist/cjs/table-row.cjs +2 -0
  283. package/dist/cjs/table.cjs +2 -0
  284. package/dist/cjs/tag.cjs +2 -0
  285. package/dist/cjs/text-input-affix.cjs +2 -0
  286. package/dist/cjs/text-input-button.cjs +2 -0
  287. package/dist/cjs/text-input.cjs +2 -0
  288. package/dist/cjs/textarea.cjs +2 -0
  289. package/dist/cjs/tooltip-content.cjs +2 -0
  290. package/dist/cjs/tooltip-provider.cjs +2 -0
  291. package/dist/cjs/tooltip-root.cjs +2 -0
  292. package/dist/cjs/tooltip-trigger.cjs +2 -0
  293. package/dist/cjs/tooltip.cjs +2 -0
  294. package/dist/cjs/use-color-model.cjs +4 -0
  295. package/dist/cjs/use-delegated-props.cjs +16 -0
  296. package/dist/cjs/use-sidebar.cjs +19 -0
  297. package/dist/cjs/use-user-select.cjs +41 -0
  298. package/package.json +3 -3
  299. package/dist/cjs/alert.js +0 -2
  300. package/dist/cjs/alpha-slider.js +0 -2
  301. package/dist/cjs/badge.js +0 -2
  302. package/dist/cjs/button.js +0 -2
  303. package/dist/cjs/checkbox-card.js +0 -2
  304. package/dist/cjs/checkbox-label.js +0 -2
  305. package/dist/cjs/checkbox.js +0 -2
  306. package/dist/cjs/chunks/alert.js +0 -103
  307. package/dist/cjs/chunks/alpha-slider.js +0 -119
  308. package/dist/cjs/chunks/badge.js +0 -59
  309. package/dist/cjs/chunks/button.js +0 -43
  310. package/dist/cjs/chunks/checkbox-card.js +0 -100
  311. package/dist/cjs/chunks/checkbox-label.js +0 -94
  312. package/dist/cjs/chunks/checkbox.js +0 -40
  313. package/dist/cjs/chunks/collapsible-content.js +0 -30
  314. package/dist/cjs/chunks/collapsible-trigger.js +0 -27
  315. package/dist/cjs/chunks/collapsible.js +0 -31
  316. package/dist/cjs/chunks/color-area.js +0 -174
  317. package/dist/cjs/chunks/color-picker.js +0 -458
  318. package/dist/cjs/chunks/color-swatch.js +0 -65
  319. package/dist/cjs/chunks/combobox-anchor.js +0 -33
  320. package/dist/cjs/chunks/combobox-empty.js +0 -36
  321. package/dist/cjs/chunks/combobox-group.js +0 -43
  322. package/dist/cjs/chunks/combobox-input.js +0 -72
  323. package/dist/cjs/chunks/combobox-item.js +0 -95
  324. package/dist/cjs/chunks/combobox-list.js +0 -66
  325. package/dist/cjs/chunks/combobox-root.js +0 -50
  326. package/dist/cjs/chunks/combobox-separator.js +0 -36
  327. package/dist/cjs/chunks/combobox-trigger.js +0 -45
  328. package/dist/cjs/chunks/combobox.js +0 -199
  329. package/dist/cjs/chunks/compact-button.js +0 -44
  330. package/dist/cjs/chunks/components.js +0 -310
  331. package/dist/cjs/chunks/content-divider.js +0 -60
  332. package/dist/cjs/chunks/core.js +0 -325
  333. package/dist/cjs/chunks/counter-input.js +0 -75
  334. package/dist/cjs/chunks/digit-input-group.js +0 -34
  335. package/dist/cjs/chunks/digit-input-slot.js +0 -33
  336. package/dist/cjs/chunks/digit-input.js +0 -54
  337. package/dist/cjs/chunks/dropdown-menu-content.js +0 -62
  338. package/dist/cjs/chunks/dropdown-menu-group.js +0 -30
  339. package/dist/cjs/chunks/dropdown-menu-item.js +0 -49
  340. package/dist/cjs/chunks/dropdown-menu-label.js +0 -34
  341. package/dist/cjs/chunks/dropdown-menu-separator.js +0 -31
  342. package/dist/cjs/chunks/dropdown-menu-sub-content.js +0 -59
  343. package/dist/cjs/chunks/dropdown-menu-sub-trigger.js +0 -45
  344. package/dist/cjs/chunks/dropdown-menu-sub.js +0 -28
  345. package/dist/cjs/chunks/dropdown-menu-trigger.js +0 -31
  346. package/dist/cjs/chunks/dropdown-menu.js +0 -38
  347. package/dist/cjs/chunks/extra-settings.js +0 -134
  348. package/dist/cjs/chunks/fancy-button.js +0 -42
  349. package/dist/cjs/chunks/file-upload-area.js +0 -139
  350. package/dist/cjs/chunks/hint-text.js +0 -38
  351. package/dist/cjs/chunks/hue-slider.js +0 -120
  352. package/dist/cjs/chunks/label.js +0 -64
  353. package/dist/cjs/chunks/link-bubble.js +0 -198
  354. package/dist/cjs/chunks/link-button.js +0 -48
  355. package/dist/cjs/chunks/menus.js +0 -1173
  356. package/dist/cjs/chunks/modal-body.js +0 -25
  357. package/dist/cjs/chunks/modal-close.js +0 -27
  358. package/dist/cjs/chunks/modal-content.js +0 -53
  359. package/dist/cjs/chunks/modal-footer.js +0 -25
  360. package/dist/cjs/chunks/modal-header.js +0 -83
  361. package/dist/cjs/chunks/modal-trigger.js +0 -27
  362. package/dist/cjs/chunks/modal.js +0 -29
  363. package/dist/cjs/chunks/pagination-content.js +0 -34
  364. package/dist/cjs/chunks/pagination-ellipsis.js +0 -37
  365. package/dist/cjs/chunks/pagination-first.js +0 -34
  366. package/dist/cjs/chunks/pagination-item.js +0 -37
  367. package/dist/cjs/chunks/pagination-last.js +0 -34
  368. package/dist/cjs/chunks/pagination-next.js +0 -34
  369. package/dist/cjs/chunks/pagination-previous.js +0 -34
  370. package/dist/cjs/chunks/pagination.js +0 -60
  371. package/dist/cjs/chunks/popover-content.js +0 -113
  372. package/dist/cjs/chunks/popover-trigger.js +0 -30
  373. package/dist/cjs/chunks/popover.js +0 -29
  374. package/dist/cjs/chunks/progress-bar.js +0 -73
  375. package/dist/cjs/chunks/progress-circle.js +0 -95
  376. package/dist/cjs/chunks/radio-group-card.js +0 -100
  377. package/dist/cjs/chunks/radio-group-item.js +0 -36
  378. package/dist/cjs/chunks/radio-group-label.js +0 -94
  379. package/dist/cjs/chunks/radio-group.js +0 -41
  380. package/dist/cjs/chunks/rich-editor.js +0 -5187
  381. package/dist/cjs/chunks/scroll-area.js +0 -46
  382. package/dist/cjs/chunks/scroll-bar.js +0 -37
  383. package/dist/cjs/chunks/segmented-control-item.js +0 -43
  384. package/dist/cjs/chunks/segmented-control.js +0 -43
  385. package/dist/cjs/chunks/select-content.js +0 -66
  386. package/dist/cjs/chunks/select-group.js +0 -27
  387. package/dist/cjs/chunks/select-icon.js +0 -27
  388. package/dist/cjs/chunks/select-item.js +0 -43
  389. package/dist/cjs/chunks/select-label.js +0 -35
  390. package/dist/cjs/chunks/select-separator.js +0 -31
  391. package/dist/cjs/chunks/select-trigger.js +0 -41
  392. package/dist/cjs/chunks/select-value.js +0 -35
  393. package/dist/cjs/chunks/select.js +0 -40
  394. package/dist/cjs/chunks/sheet-close.js +0 -32
  395. package/dist/cjs/chunks/sheet-content.js +0 -65
  396. package/dist/cjs/chunks/sheet-description.js +0 -34
  397. package/dist/cjs/chunks/sheet-footer.js +0 -25
  398. package/dist/cjs/chunks/sheet-header.js +0 -25
  399. package/dist/cjs/chunks/sheet-title.js +0 -34
  400. package/dist/cjs/chunks/sheet-trigger.js +0 -27
  401. package/dist/cjs/chunks/sheet.js +0 -29
  402. package/dist/cjs/chunks/sidebar-content.js +0 -25
  403. package/dist/cjs/chunks/sidebar-element.js +0 -33
  404. package/dist/cjs/chunks/sidebar-footer.js +0 -25
  405. package/dist/cjs/chunks/sidebar-group-content.js +0 -28
  406. package/dist/cjs/chunks/sidebar-group-label.js +0 -38
  407. package/dist/cjs/chunks/sidebar-group.js +0 -25
  408. package/dist/cjs/chunks/sidebar-header.js +0 -25
  409. package/dist/cjs/chunks/sidebar-menu-action.js +0 -39
  410. package/dist/cjs/chunks/sidebar-menu-badge.js +0 -43
  411. package/dist/cjs/chunks/sidebar-menu-button.js +0 -44
  412. package/dist/cjs/chunks/sidebar-menu-item.js +0 -25
  413. package/dist/cjs/chunks/sidebar-menu-sub-button.js +0 -47
  414. package/dist/cjs/chunks/sidebar-menu-sub-item.js +0 -25
  415. package/dist/cjs/chunks/sidebar-menu-sub.js +0 -25
  416. package/dist/cjs/chunks/sidebar-menu.js +0 -25
  417. package/dist/cjs/chunks/sidebar-provider.js +0 -73
  418. package/dist/cjs/chunks/sidebar-trigger.js +0 -38
  419. package/dist/cjs/chunks/sidebar.js +0 -69
  420. package/dist/cjs/chunks/slider.js +0 -51
  421. package/dist/cjs/chunks/social-button.js +0 -42
  422. package/dist/cjs/chunks/sonner-alert.js +0 -42
  423. package/dist/cjs/chunks/sonner.js +0 -1222
  424. package/dist/cjs/chunks/status-badge.js +0 -50
  425. package/dist/cjs/chunks/switch.js +0 -40
  426. package/dist/cjs/chunks/tab-menu-content.js +0 -36
  427. package/dist/cjs/chunks/tab-menu-item.js +0 -44
  428. package/dist/cjs/chunks/tab-menu-list.js +0 -35
  429. package/dist/cjs/chunks/tab-menu.js +0 -36
  430. package/dist/cjs/chunks/table-body.js +0 -25
  431. package/dist/cjs/chunks/table-caption.js +0 -25
  432. package/dist/cjs/chunks/table-cell.js +0 -31
  433. package/dist/cjs/chunks/table-footer.js +0 -25
  434. package/dist/cjs/chunks/table-head.js +0 -31
  435. package/dist/cjs/chunks/table-header.js +0 -22
  436. package/dist/cjs/chunks/table-row.js +0 -34
  437. package/dist/cjs/chunks/table.js +0 -45
  438. package/dist/cjs/chunks/table2.js +0 -26
  439. package/dist/cjs/chunks/tag.js +0 -58
  440. package/dist/cjs/chunks/text-input-affix.js +0 -31
  441. package/dist/cjs/chunks/text-input-button.js +0 -39
  442. package/dist/cjs/chunks/text-input.js +0 -118
  443. package/dist/cjs/chunks/textarea.js +0 -61
  444. package/dist/cjs/chunks/tooltip-content.js +0 -108
  445. package/dist/cjs/chunks/tooltip-provider.js +0 -31
  446. package/dist/cjs/chunks/tooltip-root.js +0 -40
  447. package/dist/cjs/chunks/tooltip-trigger.js +0 -27
  448. package/dist/cjs/chunks/tooltip.js +0 -99
  449. package/dist/cjs/chunks/use-color-model.js +0 -943
  450. package/dist/cjs/collapsible-content.js +0 -2
  451. package/dist/cjs/collapsible-trigger.js +0 -2
  452. package/dist/cjs/collapsible.js +0 -2
  453. package/dist/cjs/color-area.js +0 -2
  454. package/dist/cjs/color-picker.js +0 -2
  455. package/dist/cjs/color-swatch.js +0 -2
  456. package/dist/cjs/combobox-anchor.js +0 -2
  457. package/dist/cjs/combobox-empty.js +0 -2
  458. package/dist/cjs/combobox-group.js +0 -2
  459. package/dist/cjs/combobox-input.js +0 -2
  460. package/dist/cjs/combobox-item.js +0 -2
  461. package/dist/cjs/combobox-list.js +0 -2
  462. package/dist/cjs/combobox-root.js +0 -2
  463. package/dist/cjs/combobox-separator.js +0 -2
  464. package/dist/cjs/combobox-trigger.js +0 -2
  465. package/dist/cjs/combobox.js +0 -2
  466. package/dist/cjs/command-group.js +0 -37
  467. package/dist/cjs/command-input.js +0 -42
  468. package/dist/cjs/command-item.js +0 -31
  469. package/dist/cjs/command-list.js +0 -56
  470. package/dist/cjs/command-root.js +0 -51
  471. package/dist/cjs/command-separator.js +0 -31
  472. package/dist/cjs/compact-button.js +0 -2
  473. package/dist/cjs/config.js +0 -301
  474. package/dist/cjs/content-divider.js +0 -2
  475. package/dist/cjs/counter-input.js +0 -2
  476. package/dist/cjs/digit-input-group.js +0 -2
  477. package/dist/cjs/digit-input-slot.js +0 -2
  478. package/dist/cjs/digit-input.js +0 -2
  479. package/dist/cjs/dropdown-menu-content.js +0 -2
  480. package/dist/cjs/dropdown-menu-group.js +0 -2
  481. package/dist/cjs/dropdown-menu-item.js +0 -2
  482. package/dist/cjs/dropdown-menu-label.js +0 -2
  483. package/dist/cjs/dropdown-menu-separator.js +0 -2
  484. package/dist/cjs/dropdown-menu-sub-content.js +0 -2
  485. package/dist/cjs/dropdown-menu-sub-trigger.js +0 -2
  486. package/dist/cjs/dropdown-menu-sub.js +0 -2
  487. package/dist/cjs/dropdown-menu-trigger.js +0 -2
  488. package/dist/cjs/dropdown-menu.js +0 -2
  489. package/dist/cjs/extra-settings.js +0 -2
  490. package/dist/cjs/fancy-button.js +0 -2
  491. package/dist/cjs/file-upload-area.js +0 -2
  492. package/dist/cjs/hint-text.js +0 -2
  493. package/dist/cjs/hue-slider.js +0 -2
  494. package/dist/cjs/index.js +0 -375
  495. package/dist/cjs/label.js +0 -2
  496. package/dist/cjs/link-bubble.js +0 -2
  497. package/dist/cjs/link-button.js +0 -2
  498. package/dist/cjs/modal-body.js +0 -2
  499. package/dist/cjs/modal-close.js +0 -2
  500. package/dist/cjs/modal-content.js +0 -2
  501. package/dist/cjs/modal-footer.js +0 -2
  502. package/dist/cjs/modal-header.js +0 -2
  503. package/dist/cjs/modal-trigger.js +0 -2
  504. package/dist/cjs/modal.js +0 -2
  505. package/dist/cjs/pagination-content.js +0 -2
  506. package/dist/cjs/pagination-ellipsis.js +0 -2
  507. package/dist/cjs/pagination-first.js +0 -2
  508. package/dist/cjs/pagination-item.js +0 -2
  509. package/dist/cjs/pagination-last.js +0 -2
  510. package/dist/cjs/pagination-next.js +0 -2
  511. package/dist/cjs/pagination-previous.js +0 -2
  512. package/dist/cjs/pagination.js +0 -2
  513. package/dist/cjs/popover-content.js +0 -2
  514. package/dist/cjs/popover-trigger.js +0 -2
  515. package/dist/cjs/popover.js +0 -2
  516. package/dist/cjs/progress-bar.js +0 -2
  517. package/dist/cjs/progress-circle.js +0 -2
  518. package/dist/cjs/radio-group-card.js +0 -2
  519. package/dist/cjs/radio-group-item.js +0 -2
  520. package/dist/cjs/radio-group-label.js +0 -2
  521. package/dist/cjs/radio-group.js +0 -2
  522. package/dist/cjs/rich-editor.js +0 -2
  523. package/dist/cjs/scroll-area.js +0 -2
  524. package/dist/cjs/scroll-bar.js +0 -2
  525. package/dist/cjs/segmented-control-item.js +0 -2
  526. package/dist/cjs/segmented-control.js +0 -2
  527. package/dist/cjs/select-content.js +0 -2
  528. package/dist/cjs/select-group.js +0 -2
  529. package/dist/cjs/select-icon.js +0 -2
  530. package/dist/cjs/select-item.js +0 -2
  531. package/dist/cjs/select-label.js +0 -2
  532. package/dist/cjs/select-separator.js +0 -2
  533. package/dist/cjs/select-trigger.js +0 -2
  534. package/dist/cjs/select-value.js +0 -2
  535. package/dist/cjs/select.js +0 -2
  536. package/dist/cjs/sheet-close.js +0 -2
  537. package/dist/cjs/sheet-content.js +0 -2
  538. package/dist/cjs/sheet-description.js +0 -2
  539. package/dist/cjs/sheet-footer.js +0 -2
  540. package/dist/cjs/sheet-header.js +0 -2
  541. package/dist/cjs/sheet-title.js +0 -2
  542. package/dist/cjs/sheet-trigger.js +0 -2
  543. package/dist/cjs/sheet.js +0 -2
  544. package/dist/cjs/sidebar-content.js +0 -2
  545. package/dist/cjs/sidebar-element.js +0 -2
  546. package/dist/cjs/sidebar-footer.js +0 -2
  547. package/dist/cjs/sidebar-group-content.js +0 -2
  548. package/dist/cjs/sidebar-group-label.js +0 -2
  549. package/dist/cjs/sidebar-group.js +0 -2
  550. package/dist/cjs/sidebar-header.js +0 -2
  551. package/dist/cjs/sidebar-menu-action.js +0 -2
  552. package/dist/cjs/sidebar-menu-badge.js +0 -2
  553. package/dist/cjs/sidebar-menu-button.js +0 -2
  554. package/dist/cjs/sidebar-menu-item.js +0 -2
  555. package/dist/cjs/sidebar-menu-sub-button.js +0 -2
  556. package/dist/cjs/sidebar-menu-sub-item.js +0 -2
  557. package/dist/cjs/sidebar-menu-sub.js +0 -2
  558. package/dist/cjs/sidebar-menu.js +0 -2
  559. package/dist/cjs/sidebar-provider.js +0 -2
  560. package/dist/cjs/sidebar-separator.js +0 -2
  561. package/dist/cjs/sidebar-trigger.js +0 -2
  562. package/dist/cjs/sidebar.js +0 -2
  563. package/dist/cjs/slider.js +0 -2
  564. package/dist/cjs/social-button.js +0 -2
  565. package/dist/cjs/sonner-alert.js +0 -2
  566. package/dist/cjs/sonner.js +0 -2
  567. package/dist/cjs/status-badge.js +0 -2
  568. package/dist/cjs/switch.js +0 -2
  569. package/dist/cjs/tab-menu-content.js +0 -2
  570. package/dist/cjs/tab-menu-item.js +0 -2
  571. package/dist/cjs/tab-menu-list.js +0 -2
  572. package/dist/cjs/tab-menu.js +0 -2
  573. package/dist/cjs/table-body.js +0 -2
  574. package/dist/cjs/table-caption.js +0 -2
  575. package/dist/cjs/table-cell.js +0 -2
  576. package/dist/cjs/table-empty.js +0 -2
  577. package/dist/cjs/table-footer.js +0 -2
  578. package/dist/cjs/table-head.js +0 -2
  579. package/dist/cjs/table-header.js +0 -2
  580. package/dist/cjs/table-row.js +0 -2
  581. package/dist/cjs/table.js +0 -2
  582. package/dist/cjs/tag.js +0 -2
  583. package/dist/cjs/text-input-affix.js +0 -2
  584. package/dist/cjs/text-input-button.js +0 -2
  585. package/dist/cjs/text-input.js +0 -2
  586. package/dist/cjs/textarea.js +0 -2
  587. package/dist/cjs/tooltip-content.js +0 -2
  588. package/dist/cjs/tooltip-provider.js +0 -2
  589. package/dist/cjs/tooltip-root.js +0 -2
  590. package/dist/cjs/tooltip-trigger.js +0 -2
  591. package/dist/cjs/tooltip.js +0 -2
  592. package/dist/cjs/use-color-model.js +0 -4
  593. package/dist/cjs/use-delegated-props.js +0 -16
  594. package/dist/cjs/use-sidebar.js +0 -19
  595. package/dist/cjs/use-user-select.js +0 -41
  596. /package/dist/cjs/chunks/{_plugin-vue_export-helper.js → _plugin-vue_export-helper.cjs} +0 -0
  597. /package/dist/cjs/chunks/{clsx.js → clsx.cjs} +0 -0
  598. /package/dist/cjs/chunks/{dist.js → dist.cjs} +0 -0
  599. /package/dist/cjs/chunks/{dist2.js → dist2.cjs} +0 -0
  600. /package/dist/cjs/{color.js → color.cjs} +0 -0
  601. /package/dist/cjs/{crypto.js → crypto.cjs} +0 -0
  602. /package/dist/cjs/{shims.js → shims.cjs} +0 -0
  603. /package/dist/cjs/{types.js → types.cjs} +0 -0
  604. /package/dist/{esm → es}/alert.js +0 -0
  605. /package/dist/{esm → es}/alpha-slider.js +0 -0
  606. /package/dist/{esm → es}/badge.js +0 -0
  607. /package/dist/{esm → es}/button.js +0 -0
  608. /package/dist/{esm → es}/checkbox-card.js +0 -0
  609. /package/dist/{esm → es}/checkbox-label.js +0 -0
  610. /package/dist/{esm → es}/checkbox.js +0 -0
  611. /package/dist/{esm → es}/chunks/_plugin-vue_export-helper.js +0 -0
  612. /package/dist/{esm → es}/chunks/alert.js +0 -0
  613. /package/dist/{esm → es}/chunks/alpha-slider.js +0 -0
  614. /package/dist/{esm → es}/chunks/badge.js +0 -0
  615. /package/dist/{esm → es}/chunks/button.js +0 -0
  616. /package/dist/{esm → es}/chunks/checkbox-card.js +0 -0
  617. /package/dist/{esm → es}/chunks/checkbox-label.js +0 -0
  618. /package/dist/{esm → es}/chunks/checkbox.js +0 -0
  619. /package/dist/{esm → es}/chunks/clsx.js +0 -0
  620. /package/dist/{esm → es}/chunks/collapsible-content.js +0 -0
  621. /package/dist/{esm → es}/chunks/collapsible-trigger.js +0 -0
  622. /package/dist/{esm → es}/chunks/collapsible.js +0 -0
  623. /package/dist/{esm → es}/chunks/color-area.js +0 -0
  624. /package/dist/{esm → es}/chunks/color-picker.js +0 -0
  625. /package/dist/{esm → es}/chunks/color-swatch.js +0 -0
  626. /package/dist/{esm → es}/chunks/combobox-anchor.js +0 -0
  627. /package/dist/{esm → es}/chunks/combobox-empty.js +0 -0
  628. /package/dist/{esm → es}/chunks/combobox-group.js +0 -0
  629. /package/dist/{esm → es}/chunks/combobox-input.js +0 -0
  630. /package/dist/{esm → es}/chunks/combobox-item.js +0 -0
  631. /package/dist/{esm → es}/chunks/combobox-list.js +0 -0
  632. /package/dist/{esm → es}/chunks/combobox-root.js +0 -0
  633. /package/dist/{esm → es}/chunks/combobox-separator.js +0 -0
  634. /package/dist/{esm → es}/chunks/combobox-trigger.js +0 -0
  635. /package/dist/{esm → es}/chunks/combobox.js +0 -0
  636. /package/dist/{esm → es}/chunks/compact-button.js +0 -0
  637. /package/dist/{esm → es}/chunks/components.js +0 -0
  638. /package/dist/{esm → es}/chunks/content-divider.js +0 -0
  639. /package/dist/{esm → es}/chunks/core.js +0 -0
  640. /package/dist/{esm → es}/chunks/counter-input.js +0 -0
  641. /package/dist/{esm → es}/chunks/digit-input-group.js +0 -0
  642. /package/dist/{esm → es}/chunks/digit-input-slot.js +0 -0
  643. /package/dist/{esm → es}/chunks/digit-input.js +0 -0
  644. /package/dist/{esm → es}/chunks/dist.js +0 -0
  645. /package/dist/{esm → es}/chunks/dist2.js +0 -0
  646. /package/dist/{esm → es}/chunks/dropdown-menu-content.js +0 -0
  647. /package/dist/{esm → es}/chunks/dropdown-menu-group.js +0 -0
  648. /package/dist/{esm → es}/chunks/dropdown-menu-item.js +0 -0
  649. /package/dist/{esm → es}/chunks/dropdown-menu-label.js +0 -0
  650. /package/dist/{esm → es}/chunks/dropdown-menu-separator.js +0 -0
  651. /package/dist/{esm → es}/chunks/dropdown-menu-sub-content.js +0 -0
  652. /package/dist/{esm → es}/chunks/dropdown-menu-sub-trigger.js +0 -0
  653. /package/dist/{esm → es}/chunks/dropdown-menu-sub.js +0 -0
  654. /package/dist/{esm → es}/chunks/dropdown-menu-trigger.js +0 -0
  655. /package/dist/{esm → es}/chunks/dropdown-menu.js +0 -0
  656. /package/dist/{esm → es}/chunks/extra-settings.js +0 -0
  657. /package/dist/{esm → es}/chunks/fancy-button.js +0 -0
  658. /package/dist/{esm → es}/chunks/file-upload-area.js +0 -0
  659. /package/dist/{esm → es}/chunks/hint-text.js +0 -0
  660. /package/dist/{esm → es}/chunks/hue-slider.js +0 -0
  661. /package/dist/{esm → es}/chunks/label.js +0 -0
  662. /package/dist/{esm → es}/chunks/link-bubble.js +0 -0
  663. /package/dist/{esm → es}/chunks/link-button.js +0 -0
  664. /package/dist/{esm → es}/chunks/menus.js +0 -0
  665. /package/dist/{esm → es}/chunks/modal-body.js +0 -0
  666. /package/dist/{esm → es}/chunks/modal-close.js +0 -0
  667. /package/dist/{esm → es}/chunks/modal-content.js +0 -0
  668. /package/dist/{esm → es}/chunks/modal-footer.js +0 -0
  669. /package/dist/{esm → es}/chunks/modal-header.js +0 -0
  670. /package/dist/{esm → es}/chunks/modal-trigger.js +0 -0
  671. /package/dist/{esm → es}/chunks/modal.js +0 -0
  672. /package/dist/{esm → es}/chunks/pagination-content.js +0 -0
  673. /package/dist/{esm → es}/chunks/pagination-ellipsis.js +0 -0
  674. /package/dist/{esm → es}/chunks/pagination-first.js +0 -0
  675. /package/dist/{esm → es}/chunks/pagination-item.js +0 -0
  676. /package/dist/{esm → es}/chunks/pagination-last.js +0 -0
  677. /package/dist/{esm → es}/chunks/pagination-next.js +0 -0
  678. /package/dist/{esm → es}/chunks/pagination-previous.js +0 -0
  679. /package/dist/{esm → es}/chunks/pagination.js +0 -0
  680. /package/dist/{esm → es}/chunks/popover-content.js +0 -0
  681. /package/dist/{esm → es}/chunks/popover-trigger.js +0 -0
  682. /package/dist/{esm → es}/chunks/popover.js +0 -0
  683. /package/dist/{esm → es}/chunks/progress-bar.js +0 -0
  684. /package/dist/{esm → es}/chunks/progress-circle.js +0 -0
  685. /package/dist/{esm → es}/chunks/radio-group-card.js +0 -0
  686. /package/dist/{esm → es}/chunks/radio-group-item.js +0 -0
  687. /package/dist/{esm → es}/chunks/radio-group-label.js +0 -0
  688. /package/dist/{esm → es}/chunks/radio-group.js +0 -0
  689. /package/dist/{esm → es}/chunks/rich-editor.js +0 -0
  690. /package/dist/{esm → es}/chunks/scroll-area.js +0 -0
  691. /package/dist/{esm → es}/chunks/scroll-bar.js +0 -0
  692. /package/dist/{esm → es}/chunks/segmented-control-item.js +0 -0
  693. /package/dist/{esm → es}/chunks/segmented-control.js +0 -0
  694. /package/dist/{esm → es}/chunks/select-content.js +0 -0
  695. /package/dist/{esm → es}/chunks/select-group.js +0 -0
  696. /package/dist/{esm → es}/chunks/select-icon.js +0 -0
  697. /package/dist/{esm → es}/chunks/select-item.js +0 -0
  698. /package/dist/{esm → es}/chunks/select-label.js +0 -0
  699. /package/dist/{esm → es}/chunks/select-separator.js +0 -0
  700. /package/dist/{esm → es}/chunks/select-trigger.js +0 -0
  701. /package/dist/{esm → es}/chunks/select-value.js +0 -0
  702. /package/dist/{esm → es}/chunks/select.js +0 -0
  703. /package/dist/{esm → es}/chunks/sheet-close.js +0 -0
  704. /package/dist/{esm → es}/chunks/sheet-content.js +0 -0
  705. /package/dist/{esm → es}/chunks/sheet-description.js +0 -0
  706. /package/dist/{esm → es}/chunks/sheet-footer.js +0 -0
  707. /package/dist/{esm → es}/chunks/sheet-header.js +0 -0
  708. /package/dist/{esm → es}/chunks/sheet-title.js +0 -0
  709. /package/dist/{esm → es}/chunks/sheet-trigger.js +0 -0
  710. /package/dist/{esm → es}/chunks/sheet.js +0 -0
  711. /package/dist/{esm → es}/chunks/sidebar-content.js +0 -0
  712. /package/dist/{esm → es}/chunks/sidebar-element.js +0 -0
  713. /package/dist/{esm → es}/chunks/sidebar-footer.js +0 -0
  714. /package/dist/{esm → es}/chunks/sidebar-group-content.js +0 -0
  715. /package/dist/{esm → es}/chunks/sidebar-group-label.js +0 -0
  716. /package/dist/{esm → es}/chunks/sidebar-group.js +0 -0
  717. /package/dist/{esm → es}/chunks/sidebar-header.js +0 -0
  718. /package/dist/{esm → es}/chunks/sidebar-menu-action.js +0 -0
  719. /package/dist/{esm → es}/chunks/sidebar-menu-badge.js +0 -0
  720. /package/dist/{esm → es}/chunks/sidebar-menu-button.js +0 -0
  721. /package/dist/{esm → es}/chunks/sidebar-menu-item.js +0 -0
  722. /package/dist/{esm → es}/chunks/sidebar-menu-sub-button.js +0 -0
  723. /package/dist/{esm → es}/chunks/sidebar-menu-sub-item.js +0 -0
  724. /package/dist/{esm → es}/chunks/sidebar-menu-sub.js +0 -0
  725. /package/dist/{esm → es}/chunks/sidebar-menu.js +0 -0
  726. /package/dist/{esm → es}/chunks/sidebar-provider.js +0 -0
  727. /package/dist/{esm → es}/chunks/sidebar-trigger.js +0 -0
  728. /package/dist/{esm → es}/chunks/sidebar.js +0 -0
  729. /package/dist/{esm → es}/chunks/slider.js +0 -0
  730. /package/dist/{esm → es}/chunks/social-button.js +0 -0
  731. /package/dist/{esm → es}/chunks/sonner-alert.js +0 -0
  732. /package/dist/{esm → es}/chunks/sonner.js +0 -0
  733. /package/dist/{esm → es}/chunks/status-badge.js +0 -0
  734. /package/dist/{esm → es}/chunks/switch.js +0 -0
  735. /package/dist/{esm → es}/chunks/tab-menu-content.js +0 -0
  736. /package/dist/{esm → es}/chunks/tab-menu-item.js +0 -0
  737. /package/dist/{esm → es}/chunks/tab-menu-list.js +0 -0
  738. /package/dist/{esm → es}/chunks/tab-menu.js +0 -0
  739. /package/dist/{esm → es}/chunks/table-body.js +0 -0
  740. /package/dist/{esm → es}/chunks/table-caption.js +0 -0
  741. /package/dist/{esm → es}/chunks/table-cell.js +0 -0
  742. /package/dist/{esm → es}/chunks/table-footer.js +0 -0
  743. /package/dist/{esm → es}/chunks/table-head.js +0 -0
  744. /package/dist/{esm → es}/chunks/table-header.js +0 -0
  745. /package/dist/{esm → es}/chunks/table-row.js +0 -0
  746. /package/dist/{esm → es}/chunks/table.js +0 -0
  747. /package/dist/{esm → es}/chunks/table2.js +0 -0
  748. /package/dist/{esm → es}/chunks/tag.js +0 -0
  749. /package/dist/{esm → es}/chunks/text-input-affix.js +0 -0
  750. /package/dist/{esm → es}/chunks/text-input-button.js +0 -0
  751. /package/dist/{esm → es}/chunks/text-input.js +0 -0
  752. /package/dist/{esm → es}/chunks/textarea.js +0 -0
  753. /package/dist/{esm → es}/chunks/tooltip-content.js +0 -0
  754. /package/dist/{esm → es}/chunks/tooltip-provider.js +0 -0
  755. /package/dist/{esm → es}/chunks/tooltip-root.js +0 -0
  756. /package/dist/{esm → es}/chunks/tooltip-trigger.js +0 -0
  757. /package/dist/{esm → es}/chunks/tooltip.js +0 -0
  758. /package/dist/{esm → es}/chunks/use-color-model.js +0 -0
  759. /package/dist/{esm → es}/collapsible-content.js +0 -0
  760. /package/dist/{esm → es}/collapsible-trigger.js +0 -0
  761. /package/dist/{esm → es}/collapsible.js +0 -0
  762. /package/dist/{esm → es}/color-area.js +0 -0
  763. /package/dist/{esm → es}/color-picker.js +0 -0
  764. /package/dist/{esm → es}/color-swatch.js +0 -0
  765. /package/dist/{esm → es}/color.js +0 -0
  766. /package/dist/{esm → es}/combobox-anchor.js +0 -0
  767. /package/dist/{esm → es}/combobox-empty.js +0 -0
  768. /package/dist/{esm → es}/combobox-group.js +0 -0
  769. /package/dist/{esm → es}/combobox-input.js +0 -0
  770. /package/dist/{esm → es}/combobox-item.js +0 -0
  771. /package/dist/{esm → es}/combobox-list.js +0 -0
  772. /package/dist/{esm → es}/combobox-root.js +0 -0
  773. /package/dist/{esm → es}/combobox-separator.js +0 -0
  774. /package/dist/{esm → es}/combobox-trigger.js +0 -0
  775. /package/dist/{esm → es}/combobox.js +0 -0
  776. /package/dist/{esm → es}/command-group.js +0 -0
  777. /package/dist/{esm → es}/command-input.js +0 -0
  778. /package/dist/{esm → es}/command-item.js +0 -0
  779. /package/dist/{esm → es}/command-list.js +0 -0
  780. /package/dist/{esm → es}/command-root.js +0 -0
  781. /package/dist/{esm → es}/command-separator.js +0 -0
  782. /package/dist/{esm → es}/compact-button.js +0 -0
  783. /package/dist/{esm → es}/config.js +0 -0
  784. /package/dist/{esm → es}/content-divider.js +0 -0
  785. /package/dist/{esm → es}/counter-input.js +0 -0
  786. /package/dist/{esm → es}/crypto.js +0 -0
  787. /package/dist/{esm → es}/digit-input-group.js +0 -0
  788. /package/dist/{esm → es}/digit-input-slot.js +0 -0
  789. /package/dist/{esm → es}/digit-input.js +0 -0
  790. /package/dist/{esm → es}/dropdown-menu-content.js +0 -0
  791. /package/dist/{esm → es}/dropdown-menu-group.js +0 -0
  792. /package/dist/{esm → es}/dropdown-menu-item.js +0 -0
  793. /package/dist/{esm → es}/dropdown-menu-label.js +0 -0
  794. /package/dist/{esm → es}/dropdown-menu-separator.js +0 -0
  795. /package/dist/{esm → es}/dropdown-menu-sub-content.js +0 -0
  796. /package/dist/{esm → es}/dropdown-menu-sub-trigger.js +0 -0
  797. /package/dist/{esm → es}/dropdown-menu-sub.js +0 -0
  798. /package/dist/{esm → es}/dropdown-menu-trigger.js +0 -0
  799. /package/dist/{esm → es}/dropdown-menu.js +0 -0
  800. /package/dist/{esm → es}/extra-settings.js +0 -0
  801. /package/dist/{esm → es}/fancy-button.js +0 -0
  802. /package/dist/{esm → es}/file-upload-area.js +0 -0
  803. /package/dist/{esm → es}/hint-text.js +0 -0
  804. /package/dist/{esm → es}/hue-slider.js +0 -0
  805. /package/dist/{esm → es}/index.js +0 -0
  806. /package/dist/{esm → es}/label.js +0 -0
  807. /package/dist/{esm → es}/link-bubble.js +0 -0
  808. /package/dist/{esm → es}/link-button.js +0 -0
  809. /package/dist/{esm → es}/modal-body.js +0 -0
  810. /package/dist/{esm → es}/modal-close.js +0 -0
  811. /package/dist/{esm → es}/modal-content.js +0 -0
  812. /package/dist/{esm → es}/modal-footer.js +0 -0
  813. /package/dist/{esm → es}/modal-header.js +0 -0
  814. /package/dist/{esm → es}/modal-trigger.js +0 -0
  815. /package/dist/{esm → es}/modal.js +0 -0
  816. /package/dist/{esm → es}/pagination-content.js +0 -0
  817. /package/dist/{esm → es}/pagination-ellipsis.js +0 -0
  818. /package/dist/{esm → es}/pagination-first.js +0 -0
  819. /package/dist/{esm → es}/pagination-item.js +0 -0
  820. /package/dist/{esm → es}/pagination-last.js +0 -0
  821. /package/dist/{esm → es}/pagination-next.js +0 -0
  822. /package/dist/{esm → es}/pagination-previous.js +0 -0
  823. /package/dist/{esm → es}/pagination.js +0 -0
  824. /package/dist/{esm → es}/popover-content.js +0 -0
  825. /package/dist/{esm → es}/popover-trigger.js +0 -0
  826. /package/dist/{esm → es}/popover.js +0 -0
  827. /package/dist/{esm → es}/progress-bar.js +0 -0
  828. /package/dist/{esm → es}/progress-circle.js +0 -0
  829. /package/dist/{esm → es}/radio-group-card.js +0 -0
  830. /package/dist/{esm → es}/radio-group-item.js +0 -0
  831. /package/dist/{esm → es}/radio-group-label.js +0 -0
  832. /package/dist/{esm → es}/radio-group.js +0 -0
  833. /package/dist/{esm → es}/rich-editor.js +0 -0
  834. /package/dist/{esm → es}/scroll-area.js +0 -0
  835. /package/dist/{esm → es}/scroll-bar.js +0 -0
  836. /package/dist/{esm → es}/segmented-control-item.js +0 -0
  837. /package/dist/{esm → es}/segmented-control.js +0 -0
  838. /package/dist/{esm → es}/select-content.js +0 -0
  839. /package/dist/{esm → es}/select-group.js +0 -0
  840. /package/dist/{esm → es}/select-icon.js +0 -0
  841. /package/dist/{esm → es}/select-item.js +0 -0
  842. /package/dist/{esm → es}/select-label.js +0 -0
  843. /package/dist/{esm → es}/select-separator.js +0 -0
  844. /package/dist/{esm → es}/select-trigger.js +0 -0
  845. /package/dist/{esm → es}/select-value.js +0 -0
  846. /package/dist/{esm → es}/select.js +0 -0
  847. /package/dist/{esm → es}/sheet-close.js +0 -0
  848. /package/dist/{esm → es}/sheet-content.js +0 -0
  849. /package/dist/{esm → es}/sheet-description.js +0 -0
  850. /package/dist/{esm → es}/sheet-footer.js +0 -0
  851. /package/dist/{esm → es}/sheet-header.js +0 -0
  852. /package/dist/{esm → es}/sheet-title.js +0 -0
  853. /package/dist/{esm → es}/sheet-trigger.js +0 -0
  854. /package/dist/{esm → es}/sheet.js +0 -0
  855. /package/dist/{esm → es}/shims.js +0 -0
  856. /package/dist/{esm → es}/sidebar-content.js +0 -0
  857. /package/dist/{esm → es}/sidebar-element.js +0 -0
  858. /package/dist/{esm → es}/sidebar-footer.js +0 -0
  859. /package/dist/{esm → es}/sidebar-group-content.js +0 -0
  860. /package/dist/{esm → es}/sidebar-group-label.js +0 -0
  861. /package/dist/{esm → es}/sidebar-group.js +0 -0
  862. /package/dist/{esm → es}/sidebar-header.js +0 -0
  863. /package/dist/{esm → es}/sidebar-menu-action.js +0 -0
  864. /package/dist/{esm → es}/sidebar-menu-badge.js +0 -0
  865. /package/dist/{esm → es}/sidebar-menu-button.js +0 -0
  866. /package/dist/{esm → es}/sidebar-menu-item.js +0 -0
  867. /package/dist/{esm → es}/sidebar-menu-sub-button.js +0 -0
  868. /package/dist/{esm → es}/sidebar-menu-sub-item.js +0 -0
  869. /package/dist/{esm → es}/sidebar-menu-sub.js +0 -0
  870. /package/dist/{esm → es}/sidebar-menu.js +0 -0
  871. /package/dist/{esm → es}/sidebar-provider.js +0 -0
  872. /package/dist/{esm → es}/sidebar-separator.js +0 -0
  873. /package/dist/{esm → es}/sidebar-trigger.js +0 -0
  874. /package/dist/{esm → es}/sidebar.js +0 -0
  875. /package/dist/{esm → es}/slider.js +0 -0
  876. /package/dist/{esm → es}/social-button.js +0 -0
  877. /package/dist/{esm → es}/sonner-alert.js +0 -0
  878. /package/dist/{esm → es}/sonner.js +0 -0
  879. /package/dist/{esm → es}/status-badge.js +0 -0
  880. /package/dist/{esm → es}/switch.js +0 -0
  881. /package/dist/{esm → es}/tab-menu-content.js +0 -0
  882. /package/dist/{esm → es}/tab-menu-item.js +0 -0
  883. /package/dist/{esm → es}/tab-menu-list.js +0 -0
  884. /package/dist/{esm → es}/tab-menu.js +0 -0
  885. /package/dist/{esm → es}/table-body.js +0 -0
  886. /package/dist/{esm → es}/table-caption.js +0 -0
  887. /package/dist/{esm → es}/table-cell.js +0 -0
  888. /package/dist/{esm → es}/table-empty.js +0 -0
  889. /package/dist/{esm → es}/table-footer.js +0 -0
  890. /package/dist/{esm → es}/table-head.js +0 -0
  891. /package/dist/{esm → es}/table-header.js +0 -0
  892. /package/dist/{esm → es}/table-row.js +0 -0
  893. /package/dist/{esm → es}/table.js +0 -0
  894. /package/dist/{esm → es}/tag.js +0 -0
  895. /package/dist/{esm → es}/text-input-affix.js +0 -0
  896. /package/dist/{esm → es}/text-input-button.js +0 -0
  897. /package/dist/{esm → es}/text-input.js +0 -0
  898. /package/dist/{esm → es}/textarea.js +0 -0
  899. /package/dist/{esm → es}/tooltip-content.js +0 -0
  900. /package/dist/{esm → es}/tooltip-provider.js +0 -0
  901. /package/dist/{esm → es}/tooltip-root.js +0 -0
  902. /package/dist/{esm → es}/tooltip-trigger.js +0 -0
  903. /package/dist/{esm → es}/tooltip.js +0 -0
  904. /package/dist/{esm → es}/types.js +0 -0
  905. /package/dist/{esm → es}/use-color-model.js +0 -0
  906. /package/dist/{esm → es}/use-delegated-props.js +0 -0
  907. /package/dist/{esm → es}/use-sidebar.js +0 -0
  908. /package/dist/{esm → es}/use-user-select.js +0 -0
@@ -1,1173 +0,0 @@
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;