@commentkit/comment-kit 0.6.8 → 0.6.9

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 (330) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +73 -45
  3. package/dist/angular.es.js +47 -3411
  4. package/dist/comment-kit.es.js +13 -3184
  5. package/dist/demo.es.js +395 -0
  6. package/dist/headless.es.js +4 -0
  7. package/dist/preact.es.js +79 -3443
  8. package/dist/qwik.es.js +79 -3443
  9. package/dist/react.es.js +80 -28447
  10. package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
  11. package/dist/shared/annotation-toolbar-pX17NLmJ.js +1104 -0
  12. package/dist/shared/bridge-DRE03N9X.js +174 -0
  13. package/dist/shared/button-By0hGrJK.js +505 -0
  14. package/dist/shared/button-group-CHfMRXyA.js +93 -0
  15. package/dist/shared/clamp-CcFVX0vC.js +55 -0
  16. package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +126 -0
  17. package/dist/shared/comment-image-lightbox-0VdAs2iT.js +178 -0
  18. package/dist/shared/comment-kit-core-D0kY00St.js +3083 -0
  19. package/dist/shared/comment-kit-ui-D2j2gvnm.js +16685 -0
  20. package/dist/shared/comment-screenshot-annotator-BuojwviY.js +137 -0
  21. package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +144 -0
  22. package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
  23. package/dist/shared/dev-export-panel-BLngcr5q.js +208 -0
  24. package/dist/shared/dev-grab-pDAfH2lr.js +203 -0
  25. package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
  26. package/dist/shared/element-selector-CtFzgHvq.js +852 -0
  27. package/dist/shared/errors-Bu5ajEmB.js +22 -0
  28. package/dist/shared/icons-BSHCWYO1.js +267 -0
  29. package/dist/shared/local-demo-context-BohlYbHt.js +6 -0
  30. package/dist/shared/mount-ui-CVivB_eQ.js +193 -0
  31. package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-BEl7Qn-8.js} +93 -127
  32. package/dist/{core/realtime-C3_O7gi2.js → shared/realtime-BG_t_ze7.js} +75 -72
  33. package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +669 -0
  34. package/dist/shared/separator-DusFNTs-.js +3915 -0
  35. package/dist/shared/shadow-root-CmYXiSRR.js +135 -0
  36. package/dist/shared/styles-D_FEJZ9G.js +2 -0
  37. package/dist/shared/useLabelableId-DGbfdMi_.js +155 -0
  38. package/dist/shared/useValueChanged-DQXLia-2.js +92 -0
  39. package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
  40. package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-BTRqNTB7.js} +90 -148
  41. package/dist/solid.es.js +63 -3427
  42. package/dist/svelte.es.js +78 -3442
  43. package/dist/types/adapters/bridge.d.ts +1 -1
  44. package/dist/types/angular/index.d.ts +2 -2
  45. package/dist/types/core/comment-kit-core.d.ts +10 -1
  46. package/dist/types/core/local-demo.d.ts +59 -0
  47. package/dist/types/demo.d.ts +17 -0
  48. package/dist/types/headless.d.ts +8 -0
  49. package/dist/types/index.d.ts +14 -16
  50. package/dist/vue.es.js +80 -3443
  51. package/package.json +55 -37
  52. package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
  53. package/dist/angular/comment-kit-ui-D-LUFD6n.js +0 -24898
  54. package/dist/angular/dom-Cx1nMbdI.js +0 -104
  55. package/dist/angular/mount-ui-C9PJ5aK_.js +0 -72
  56. package/dist/angular/realtime-VrKV0lPI.js +0 -567
  57. package/dist/angular/shadow-root-yMOaW9pk.js +0 -93
  58. package/dist/angular/styles-CMz7-p8x.js +0 -2
  59. package/dist/angular/widget-theme-CYPYAwhR.js +0 -24
  60. package/dist/comment-kit.css +0 -2
  61. package/dist/core/chunk-t7YoJN_i.js +0 -11
  62. package/dist/core/comment-kit-ui-Ct4E18do.js +0 -24898
  63. package/dist/core/error-boundary-CN_BGsYl.js +0 -21
  64. package/dist/core/mount-ui-Bfnuuesk.js +0 -72
  65. package/dist/core/pusher-CizoY5NA.js +0 -2504
  66. package/dist/core/shadow-root-DAtdjHG2.js +0 -93
  67. package/dist/core/styles-ClRoB6ro.js +0 -2
  68. package/dist/core/widget-theme-BWDYr7VR.js +0 -24
  69. package/dist/preact/chunk-CZ0PdaaN.js +0 -11
  70. package/dist/preact/comment-kit-ui-DEzn7J_P.js +0 -24898
  71. package/dist/preact/dom-_ULpq7rg.js +0 -104
  72. package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
  73. package/dist/preact/limits-C3ZEKcL_.js +0 -71
  74. package/dist/preact/mount-ui-Dx8en--W.js +0 -72
  75. package/dist/preact/pusher-BP4kCufH.js +0 -2504
  76. package/dist/preact/realtime-COin_nJF.js +0 -567
  77. package/dist/preact/shadow-root-D-NcwruG.js +0 -93
  78. package/dist/preact/styles-D6i7be5-.js +0 -2
  79. package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
  80. package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
  81. package/dist/qwik/comment-kit-ui-Dvwee2tw.js +0 -24898
  82. package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
  83. package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
  84. package/dist/qwik/limits-DK35yjGY.js +0 -71
  85. package/dist/qwik/mount-ui-DSAwNk_d.js +0 -72
  86. package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
  87. package/dist/qwik/realtime-DhfcBrwF.js +0 -567
  88. package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
  89. package/dist/qwik/styles-DmEmq5Lh.js +0 -2
  90. package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
  91. package/dist/react/chunk--MHYZ-zp.js +0 -12
  92. package/dist/react/limits-CpprSem3.js +0 -175
  93. package/dist/react/pusher-3dki8s2l.js +0 -2505
  94. package/dist/react/realtime-DGqScuox.js +0 -567
  95. package/dist/solid/chunk-B2NCWFvW.js +0 -11
  96. package/dist/solid/comment-kit-ui-ACW8BpEm.js +0 -24898
  97. package/dist/solid/dom-DqDH-Gml.js +0 -104
  98. package/dist/solid/error-boundary-9mimpbZA.js +0 -21
  99. package/dist/solid/limits-B_69IbLl.js +0 -71
  100. package/dist/solid/mount-ui-Dq1wj_tx.js +0 -72
  101. package/dist/solid/pusher-_RVNpj1f.js +0 -2504
  102. package/dist/solid/realtime-DbUJK4gU.js +0 -567
  103. package/dist/solid/shadow-root-CssU3bQb.js +0 -93
  104. package/dist/solid/styles-DbueS9xx.js +0 -2
  105. package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
  106. package/dist/svelte/chunk-Pi70BKld.js +0 -11
  107. package/dist/svelte/comment-kit-ui-Cx4u1g77.js +0 -24898
  108. package/dist/svelte/dom-MyTrWzy_.js +0 -104
  109. package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
  110. package/dist/svelte/limits-CURF22v3.js +0 -71
  111. package/dist/svelte/mount-ui-CBoNGLNS.js +0 -72
  112. package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
  113. package/dist/svelte/realtime-M1CJbCBA.js +0 -567
  114. package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
  115. package/dist/svelte/styles-BK_MaUpD.js +0 -2
  116. package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
  117. package/dist/types/adapters/errors.d.ts +0 -3
  118. package/dist/types/core/auth.d.ts +0 -18
  119. package/dist/types/core/comments.d.ts +0 -43
  120. package/dist/types/core/dev-grab.d.ts +0 -14
  121. package/dist/types/core/keyboard.d.ts +0 -12
  122. package/dist/types/core/limits.d.ts +0 -52
  123. package/dist/types/core/offline-queue.d.ts +0 -23
  124. package/dist/types/core/realtime.d.ts +0 -9
  125. package/dist/types/core/screenshot.d.ts +0 -12
  126. package/dist/types/core/session.d.ts +0 -9
  127. package/dist/types/core/source-resolver.d.ts +0 -19
  128. package/dist/types/core/state.d.ts +0 -24
  129. package/dist/types/react/comment-kit-ui.d.ts +0 -9
  130. package/dist/types/react/comments/comment-flow.d.ts +0 -8
  131. package/dist/types/react/comments/outcomes.d.ts +0 -28
  132. package/dist/types/react/comments/pin-geometry.d.ts +0 -12
  133. package/dist/types/react/comments/view-model.d.ts +0 -66
  134. package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
  135. package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
  136. package/dist/types/react/components/comment-actions.d.ts +0 -19
  137. package/dist/types/react/components/comment-body.d.ts +0 -8
  138. package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
  139. package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
  140. package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
  141. package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
  142. package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
  143. package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
  144. package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
  145. package/dist/types/react/components/comment-composer-media.d.ts +0 -17
  146. package/dist/types/react/components/comment-composer.d.ts +0 -4
  147. package/dist/types/react/components/comment-composer.types.d.ts +0 -41
  148. package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
  149. package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
  150. package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
  151. package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
  152. package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
  153. package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
  154. package/dist/types/react/components/comment-error-banner.d.ts +0 -8
  155. package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
  156. package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
  157. package/dist/types/react/components/comment-fab.d.ts +0 -34
  158. package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
  159. package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
  160. package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
  161. package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
  162. package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
  163. package/dist/types/react/components/comment-header.d.ts +0 -34
  164. package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
  165. package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
  166. package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
  167. package/dist/types/react/components/comment-images.d.ts +0 -7
  168. package/dist/types/react/components/comment-item.d.ts +0 -26
  169. package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
  170. package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
  171. package/dist/types/react/components/comment-kit.d.ts +0 -12
  172. package/dist/types/react/components/comment-list-filters.d.ts +0 -14
  173. package/dist/types/react/components/comment-login-modal.d.ts +0 -20
  174. package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
  175. package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
  176. package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
  177. package/dist/types/react/components/comment-marker.d.ts +0 -15
  178. package/dist/types/react/components/comment-member-list.d.ts +0 -10
  179. package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
  180. package/dist/types/react/components/comment-online-users.d.ts +0 -8
  181. package/dist/types/react/components/comment-page-ref.d.ts +0 -9
  182. package/dist/types/react/components/comment-panel-header.d.ts +0 -22
  183. package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
  184. package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
  185. package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
  186. package/dist/types/react/components/comment-panel.d.ts +0 -37
  187. package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
  188. package/dist/types/react/components/comment-reactions.d.ts +0 -11
  189. package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
  190. package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
  191. package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
  192. package/dist/types/react/components/comment-search-bar.d.ts +0 -7
  193. package/dist/types/react/components/comment-settings-view.d.ts +0 -20
  194. package/dist/types/react/components/comment-skeletons.d.ts +0 -9
  195. package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
  196. package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
  197. package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
  198. package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
  199. package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
  200. package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
  201. package/dist/types/react/components/comment-thread-list.d.ts +0 -16
  202. package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
  203. package/dist/types/react/components/comment-users-context.d.ts +0 -15
  204. package/dist/types/react/components/comment-utils.d.ts +0 -20
  205. package/dist/types/react/components/comment.d.ts +0 -26
  206. package/dist/types/react/components/constants.d.ts +0 -50
  207. package/dist/types/react/components/dev-export-panel.d.ts +0 -10
  208. package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
  209. package/dist/types/react/components/element-selector.d.ts +0 -11
  210. package/dist/types/react/components/live-region.d.ts +0 -16
  211. package/dist/types/react/components/screenshot-capture.d.ts +0 -17
  212. package/dist/types/react/components/status-indicator.d.ts +0 -43
  213. package/dist/types/react/components/ui.d.ts +0 -44
  214. package/dist/types/react/components/use-comment-composer.d.ts +0 -28
  215. package/dist/types/react/error-boundary.d.ts +0 -25
  216. package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
  217. package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
  218. package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
  219. package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
  220. package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
  221. package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
  222. package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
  223. package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
  224. package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
  225. package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
  226. package/dist/types/react/hooks/use-drawing.d.ts +0 -32
  227. package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
  228. package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
  229. package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
  230. package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
  231. package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
  232. package/dist/types/react/hooks/use-websocket.d.ts +0 -9
  233. package/dist/types/react/is-local-host.d.ts +0 -2
  234. package/dist/types/react/mount-ui.d.ts +0 -19
  235. package/dist/types/react/shadow-root.d.ts +0 -23
  236. package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
  237. package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
  238. package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
  239. package/dist/types/react/ui/lib/cn.d.ts +0 -12
  240. package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
  241. package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
  242. package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
  243. package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
  244. package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
  245. package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
  246. package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
  247. package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
  248. package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
  249. package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
  250. package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
  251. package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
  252. package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
  253. package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
  254. package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
  255. package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
  256. package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
  257. package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
  258. package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
  259. package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
  260. package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
  261. package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
  262. package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
  263. package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
  264. package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
  265. package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
  266. package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
  267. package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
  268. package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
  269. package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
  270. package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
  271. package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
  272. package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
  273. package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
  274. package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
  275. package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
  276. package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
  277. package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
  278. package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
  279. package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
  280. package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
  281. package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
  282. package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
  283. package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
  284. package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
  285. package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
  286. package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
  287. package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
  288. package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
  289. package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
  290. package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
  291. package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
  292. package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
  293. package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
  294. package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
  295. package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
  296. package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
  297. package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
  298. package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
  299. package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
  300. package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
  301. package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
  302. package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
  303. package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
  304. package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
  305. package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
  306. package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
  307. package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
  308. package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
  309. package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
  310. package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
  311. package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
  312. package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
  313. package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
  314. package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
  315. package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
  316. package/dist/types/utils/freeze-animations.d.ts +0 -8
  317. package/dist/types/utils/text.d.ts +0 -9
  318. package/dist/types/utils/validation.d.ts +0 -10
  319. package/dist/vue/chunk-DHrubWSL.js +0 -11
  320. package/dist/vue/comment-kit-ui-C3zijClM.js +0 -24898
  321. package/dist/vue/dom-C7krZAR8.js +0 -104
  322. package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
  323. package/dist/vue/limits-B6csdQeI.js +0 -71
  324. package/dist/vue/mount-ui-18BnLwCO.js +0 -72
  325. package/dist/vue/pusher-cmjNbW6a.js +0 -2504
  326. package/dist/vue/realtime-B0B5cE-E.js +0 -567
  327. package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
  328. package/dist/vue/styles-B0NAkbKu.js +0 -2
  329. package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
  330. /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
@@ -0,0 +1,669 @@
1
+ import { I as e, L as t, R as n, V as r, a as i, c as a, g as o, i as s, m as c, n as l, o as u, s as d, u as f, z as p } from "./button-By0hGrJK.js";
2
+ import { Qt as m, _t as h, dt as g, ft as _, gt as v, pt as y } from "./separator-DusFNTs-.js";
3
+ import { D as b, n as x, v as S } from "./useValueChanged-DQXLia-2.js";
4
+ import { i as C } from "./ShadowRootContext-Bv-4aElu.js";
5
+ import { t as w } from "./createReactComponent-BZHeRbD0.js";
6
+ import { a as T, f as E, i as D, l as O, o as k, p as A, r as j, s as M } from "./button-group-CHfMRXyA.js";
7
+ import { r as N } from "./clamp-CcFVX0vC.js";
8
+ import * as P from "react";
9
+ import { jsx as F } from "react/jsx-runtime";
10
+ var I = w("outline", "arrow-up-right", "ArrowUpRight", [["path", {
11
+ d: "M17 7l-10 10",
12
+ key: "svg-0"
13
+ }], ["path", {
14
+ d: "M8 7l9 0l0 9",
15
+ key: "svg-1"
16
+ }]]), L = w("outline", "check", "Check", [["path", {
17
+ d: "M5 12l5 5l10 -10",
18
+ key: "svg-0"
19
+ }]]), R = P.forwardRef(function({ className: e, ...t }, n) {
20
+ return /* @__PURE__ */ F("kbd", {
21
+ ref: n,
22
+ "data-slot": "kbd",
23
+ className: d("ck-kbd", e),
24
+ ...t
25
+ });
26
+ });
27
+ R.displayName = "Kbd";
28
+ var z = P.forwardRef(function({ className: e, ...t }, n) {
29
+ return /* @__PURE__ */ F("kbd", {
30
+ ref: n,
31
+ "data-slot": "kbd-group",
32
+ className: d("ck-kbd-group", e),
33
+ ...t
34
+ });
35
+ });
36
+ z.displayName = "KbdGroup";
37
+ var B = /*#__PURE__*/ P.createContext(void 0);
38
+ process.env.NODE_ENV !== "production" && (B.displayName = "ToggleGroupContext");
39
+ function ee() {
40
+ return P.useContext(B);
41
+ }
42
+ var V = /*#__PURE__*/ P.createContext({
43
+ register: () => {},
44
+ unregister: () => {},
45
+ subscribeMapChange: () => () => {},
46
+ nextIndexRef: { current: 0 }
47
+ });
48
+ process.env.NODE_ENV !== "production" && (V.displayName = "CompositeListContext");
49
+ function H() {
50
+ return P.useContext(V);
51
+ }
52
+ function te(e = {}) {
53
+ let { guess: n, label: r, metadata: i, textRef: a, index: o } = e, { register: s, unregister: c, subscribeMapChange: l, nextIndexRef: u } = H(), d = P.useRef(-1), [f, p] = P.useState(o == null && n ? () => {
54
+ if (d.current === -1) {
55
+ let e = u.current;
56
+ u.current += 1, d.current = e;
57
+ }
58
+ return d.current;
59
+ } : -1), m = o ?? f, h = P.useRef(null), g = P.useCallback((e) => {
60
+ let t = h.current;
61
+ t && c(t), h.current = e, e && s(e, {
62
+ metadata: i ?? null,
63
+ index: o ?? null,
64
+ label: r,
65
+ textRef: a
66
+ });
67
+ }, [
68
+ o,
69
+ s,
70
+ c,
71
+ i,
72
+ r,
73
+ a
74
+ ]);
75
+ return t(() => {
76
+ if (o == null) return l((e) => {
77
+ let t = h.current ? e.get(h.current)?.index : null;
78
+ t != null && p(t);
79
+ });
80
+ }, [o, l]), {
81
+ ref: g,
82
+ index: m
83
+ };
84
+ }
85
+ function ne(e = {}) {
86
+ let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: r } = i(), { ref: a, index: s } = te(e), c = n === s, l = P.useRef(null), u = o(a, l);
87
+ return {
88
+ compositeProps: {
89
+ tabIndex: c ? 0 : -1,
90
+ onFocus() {
91
+ r(s);
92
+ },
93
+ onMouseMove() {
94
+ let e = l.current;
95
+ if (!t || !e) return;
96
+ let n = e.hasAttribute("disabled") || e.ariaDisabled === "true";
97
+ !c && !n && e.focus();
98
+ }
99
+ },
100
+ compositeRef: u,
101
+ index: s
102
+ };
103
+ }
104
+ function U(e) {
105
+ let { render: t, className: r, style: i, state: a = p, props: o = n, refs: s = n, metadata: c, stateAttributesMapping: l, tag: u = "div", ...d } = e, { compositeProps: m, compositeRef: h } = ne({ metadata: c });
106
+ return f(u, e, {
107
+ state: a,
108
+ ref: [h, ...s],
109
+ props: [
110
+ m,
111
+ ...o,
112
+ d
113
+ ],
114
+ stateAttributesMapping: l
115
+ });
116
+ }
117
+ var W = /*#__PURE__*/ P.forwardRef(function(e, t) {
118
+ let { className: n, defaultPressed: r = !1, disabled: i = !1, form: a, onPressedChange: o, pressed: s, render: c, type: d, value: p, nativeButton: m = !0, style: h, ...g } = e, _ = x(p || void 0), v = ee(), y = v?.value ?? [], C = (i || v?.disabled) ?? !1;
119
+ process.env.NODE_ENV !== "production" && P.useEffect(() => {
120
+ v && p === void 0 && v.isValueInitialized && u("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.", "This will cause issues between the Toggle Group and Toggle values.", "Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.");
121
+ }, [
122
+ v,
123
+ p,
124
+ v?.isValueInitialized
125
+ ]);
126
+ let [w, T] = N({
127
+ controlled: v ? _ !== void 0 && y.indexOf(_) > -1 : s,
128
+ default: r,
129
+ name: "Toggle",
130
+ state: "pressed"
131
+ }), { getButtonProps: E, buttonRef: D } = l({
132
+ disabled: C,
133
+ native: m
134
+ }), O = {
135
+ disabled: C,
136
+ pressed: w
137
+ }, k = [D, t], A = [
138
+ {
139
+ "aria-pressed": w,
140
+ onClick(e) {
141
+ let t = !w, n = b(S, e.nativeEvent);
142
+ o?.(t, n), !n.isCanceled && (_ && v?.setGroupValue?.(_, t, n), !n.isCanceled && T(t));
143
+ }
144
+ },
145
+ g,
146
+ E
147
+ ], j = f("button", e, {
148
+ enabled: !v,
149
+ state: O,
150
+ ref: k,
151
+ props: A
152
+ }), M = P.useMemo(() => ({
153
+ disabled: C,
154
+ focusableWhenDisabled: !1
155
+ }), [C]);
156
+ return v ? /*#__PURE__*/ F(U, {
157
+ tag: "button",
158
+ render: c,
159
+ className: n,
160
+ style: h,
161
+ metadata: M,
162
+ state: O,
163
+ refs: k,
164
+ props: A
165
+ }) : j;
166
+ });
167
+ process.env.NODE_ENV !== "production" && (W.displayName = "Toggle");
168
+ function G(e) {
169
+ let { children: n, elementsRef: i, labelsRef: a, onMapChange: o } = e, s = c(o), [, l] = P.useState(0), u = r(ie).current, d = r(re).current, f = P.useRef(0), p = P.useRef(!0), m = P.useRef(null), h = P.useRef(null), g = c(() => {
170
+ p.current || (p.current = !0, l((e) => e + 1));
171
+ }), _ = c((e, t) => {
172
+ d.set(e, t), g();
173
+ }), v = c((e) => {
174
+ d.delete(e), g();
175
+ }), y = c((e) => {
176
+ let t = /* @__PURE__ */ new Map();
177
+ return i.current.length = 0, a && (a.current.length = 0), e.forEach((e) => {
178
+ t.set(e.element, {
179
+ ...e.registration.metadata ?? {},
180
+ index: e.index
181
+ }), i.current[e.index] = e.element, a && (a.current[e.index] = e.registration.label === void 0 ? e.registration.textRef?.current?.textContent ?? e.element.textContent : e.registration.label);
182
+ }), f.current = i.current.length, t;
183
+ });
184
+ function b(e) {
185
+ if (h.current?.disconnect(), h.current = null, typeof MutationObserver != "function" || e.length < 2) return;
186
+ let t = new MutationObserver((n) => {
187
+ if (!se(n)) return;
188
+ let r = null;
189
+ for (let n of e) if (n.isConnected) {
190
+ if (r && K(r, n) > 0) {
191
+ t.disconnect(), g();
192
+ return;
193
+ }
194
+ r = n;
195
+ }
196
+ });
197
+ h.current = t;
198
+ let n = /* @__PURE__ */ new Set();
199
+ for (let t = 1; t < e.length; t += 1) {
200
+ let r = oe(e[t - 1], e[t]);
201
+ r && n.add(r);
202
+ }
203
+ n.forEach((e) => t.observe(e, { childList: !0 }));
204
+ }
205
+ let x = c(() => {
206
+ let [e, t] = ae(d), n = y(e), r = m.current, i = !r || r.length !== e.length || e.some((e, t) => {
207
+ let n = r[t];
208
+ return e.index !== n.index || e.element !== n.element || e.registration.index !== n.registration.index || e.registration.metadata !== n.registration.metadata;
209
+ });
210
+ b(t), m.current = e, p.current = !1, i && (u.forEach((e) => e(n)), s(n));
211
+ });
212
+ t(() => (!p.current && m.current && y(m.current), () => {
213
+ i.current = [], a && (a.current = []);
214
+ }), [
215
+ i,
216
+ a,
217
+ y
218
+ ]), t(() => {
219
+ p.current && x();
220
+ }), t(() => () => {
221
+ h.current?.disconnect(), p.current = !0;
222
+ }, []);
223
+ let S = c((e) => (u.add(e), () => {
224
+ u.delete(e);
225
+ })), C = P.useMemo(() => ({
226
+ register: _,
227
+ unregister: v,
228
+ subscribeMapChange: S,
229
+ nextIndexRef: f
230
+ }), [
231
+ _,
232
+ v,
233
+ S,
234
+ f
235
+ ]);
236
+ return /*#__PURE__*/ F(V.Provider, {
237
+ value: C,
238
+ children: n
239
+ });
240
+ }
241
+ function re() {
242
+ return /* @__PURE__ */ new Map();
243
+ }
244
+ function ie() {
245
+ return /* @__PURE__ */ new Set();
246
+ }
247
+ function ae(e) {
248
+ let t = /* @__PURE__ */ new Set(), n = [], r = [];
249
+ e.forEach((e, i) => {
250
+ if (!i.isConnected) return;
251
+ let a = e.index, o = {
252
+ index: a ?? -1,
253
+ element: i,
254
+ registration: e
255
+ };
256
+ a === null ? r.push(o) : a >= 0 && (t.add(a), n.push(o));
257
+ });
258
+ let i = 0;
259
+ return r.sort((e, t) => K(e.element, t.element)), r.forEach((e) => {
260
+ for (; t.has(i);) i += 1;
261
+ e.index = i, n.push(e), i += 1;
262
+ }), t.size > 0 && n.sort((e, t) => e.index - t.index), [n, r.map((e) => e.element)];
263
+ }
264
+ function oe(e, t) {
265
+ let n = e.parentElement;
266
+ for (; n && !n.contains(t);) n = n.parentElement;
267
+ return n;
268
+ }
269
+ function se(e) {
270
+ for (let t of e) for (let e = 0; e < t.removedNodes.length; e += 1) if (t.removedNodes[e].isConnected) return !0;
271
+ return !1;
272
+ }
273
+ function K(e, t) {
274
+ return e.nextElementSibling === t ? -1 : t.nextElementSibling === e ? 1 : e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
275
+ }
276
+ function q(e) {
277
+ return e == null || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true";
278
+ }
279
+ var ce = "data-composite-item-active";
280
+ function le(e) {
281
+ let { loopFocus: r = !0, orientation: i = "both", grid: a, onLoop: s, direction: l, highlightedIndex: u, onHighlightedIndexChange: d, rootRef: f, enableHomeAndEndKeys: p = !1, stopEventPropagation: b, disabledIndices: x, modifierKeys: S = n } = e, [C, w] = P.useState(0), O = a != null, N = P.useRef(null), F = o(N, f), I = P.useRef([]), L = P.useRef(!1), R = P.useRef(null), z = u ?? C, B = c((e, t = !1) => {
282
+ if (R.current = I.current[e] ?? null, (d ?? w)(e), t) {
283
+ let t = I.current[e];
284
+ A(N.current, t, l, i);
285
+ }
286
+ }), ee = c((e) => {
287
+ if (e.size === 0) return;
288
+ if (L.current) {
289
+ let e = I.current, t = e.indexOf(R.current);
290
+ if (t === -1) {
291
+ let t = e[z];
292
+ !t || h(e, z, x) ? B(ue(e, x)) : R.current = t;
293
+ } else t !== z && B(t);
294
+ return;
295
+ }
296
+ L.current = !0;
297
+ let t = Array.from(e.keys()), n = t.find((e) => e?.hasAttribute("data-composite-item-active")) ?? null, r = n ? e.get(n)?.index ?? -1 : -1;
298
+ if (r !== -1) B(r);
299
+ else if (h(t, z, x)) {
300
+ let e = g(t, { disabledIndices: x });
301
+ v(t, e) || B(e);
302
+ }
303
+ A(N.current, n, l, i);
304
+ });
305
+ t(() => {
306
+ if (x == null || u != null || !L.current) return;
307
+ let e = I.current;
308
+ if (h(e, z, x)) {
309
+ let t = g(e, { disabledIndices: x });
310
+ v(e, t) || B(t);
311
+ }
312
+ }, [
313
+ x,
314
+ u,
315
+ z,
316
+ I,
317
+ B
318
+ ]);
319
+ let V = c((e, t, n) => s ? s(e, t, n, I) : n), H = c((e) => {
320
+ let t = e.key === "Home" || e.key === "End";
321
+ if (!M.has(e.key) || !p && t || de(e, S) || !N.current) return;
322
+ let n = l === "rtl", o = n ? D : T, c = n ? T : D, u = i === "vertical" ? j : o, d = i === "vertical" ? k : c, f = m(e.nativeEvent);
323
+ if (f != null && E(f) && !q(f)) {
324
+ let t = f.selectionStart, n = f.selectionEnd, r = f.value;
325
+ if (t == null || e.shiftKey || t !== n || e.key !== d && t < r.length || e.key !== u && t > 0) return;
326
+ }
327
+ let h = z, C = y(I, x), w = _(I, x);
328
+ a != null && (h = a({
329
+ disabledIndices: x,
330
+ elementsRef: I,
331
+ event: e,
332
+ highlightedIndex: z,
333
+ loopFocus: r,
334
+ maxIndex: w,
335
+ minIndex: C,
336
+ onLoop: V,
337
+ orientation: i,
338
+ rtl: n
339
+ }));
340
+ let A = i !== "vertical" && e.key === o || i !== "horizontal" && e.key === "ArrowDown", P = i !== "vertical" && e.key === c || i !== "horizontal" && e.key === "ArrowUp";
341
+ p && (e.key === "Home" ? h = C : e.key === "End" && (h = w)), h === z && (A || P) && (r && h === w && A ? (h = C, s && (h = s(e, z, h, I))) : r && h === C && P ? (h = w, s && (h = s(e, z, h, I))) : h = g(I.current, {
342
+ startingIndex: h,
343
+ decrement: P,
344
+ disabledIndices: x
345
+ })), h !== z && !v(I.current, h) && (b && e.stopPropagation(), (O || t || A || P) && e.preventDefault(), B(h, !0), queueMicrotask(() => {
346
+ I.current[h]?.focus();
347
+ }));
348
+ });
349
+ return {
350
+ props: {
351
+ ref: F,
352
+ onFocus(e) {
353
+ let t = N.current, n = m(e.nativeEvent);
354
+ t && n != null && E(n) && n.setSelectionRange(0, n.value.length);
355
+ },
356
+ onKeyDown: H
357
+ },
358
+ highlightedIndex: z,
359
+ onHighlightedIndexChange: B,
360
+ elementsRef: I,
361
+ onMapChange: ee,
362
+ relayKeyboardEvent: H
363
+ };
364
+ }
365
+ function ue(e, t) {
366
+ let n = -1;
367
+ for (let r = 0; r < e.length; r += 1) {
368
+ let i = e[r];
369
+ if (i && !h(e, r, t)) {
370
+ if (i.hasAttribute("data-composite-item-active")) return r;
371
+ n === -1 && (n = r);
372
+ }
373
+ }
374
+ return Math.max(n, 0);
375
+ }
376
+ function de(e, t) {
377
+ for (let n of O) if (!t.includes(n) && e.getModifierState(n)) return !0;
378
+ return !1;
379
+ }
380
+ function J(e) {
381
+ let { render: t, className: r, style: i, refs: a = n, props: o = n, state: c = p, stateAttributesMapping: l, highlightedIndex: u, onHighlightedIndexChange: d, orientation: m, grid: h, loopFocus: g, onLoop: _, enableHomeAndEndKeys: v, onMapChange: y, stopEventPropagation: b = !0, rootRef: x, disabledIndices: S, modifierKeys: w, highlightItemOnHover: T = !1, tag: E = "div", ...D } = e, { props: O, highlightedIndex: k, onHighlightedIndexChange: A, elementsRef: j, onMapChange: M, relayKeyboardEvent: N } = le({
382
+ grid: h,
383
+ loopFocus: g,
384
+ onLoop: _,
385
+ orientation: m,
386
+ highlightedIndex: u,
387
+ onHighlightedIndexChange: d,
388
+ rootRef: x,
389
+ stopEventPropagation: b,
390
+ enableHomeAndEndKeys: v,
391
+ direction: C(),
392
+ disabledIndices: S,
393
+ modifierKeys: w
394
+ }), I = f(E, e, {
395
+ state: c,
396
+ ref: a,
397
+ props: [
398
+ O,
399
+ ...o,
400
+ D
401
+ ],
402
+ stateAttributesMapping: l
403
+ }), L = P.useMemo(() => ({
404
+ highlightedIndex: k,
405
+ onHighlightedIndexChange: A,
406
+ highlightItemOnHover: T,
407
+ relayKeyboardEvent: N
408
+ }), [
409
+ k,
410
+ A,
411
+ T,
412
+ N
413
+ ]);
414
+ return /*#__PURE__*/ F(s.Provider, {
415
+ value: L,
416
+ children: /*#__PURE__*/ F(G, {
417
+ elementsRef: j,
418
+ onMapChange: (e) => {
419
+ y?.(e), M(e);
420
+ },
421
+ children: I
422
+ })
423
+ });
424
+ }
425
+ var Y = /*#__PURE__*/ P.createContext(void 0);
426
+ process.env.NODE_ENV !== "production" && (Y.displayName = "ToolbarRootContext");
427
+ function X(t) {
428
+ let n = P.useContext(Y);
429
+ if (n === void 0 && !t) throw Error(process.env.NODE_ENV === "production" ? e(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
430
+ return n;
431
+ }
432
+ var Z = /*#__PURE__*/ P.createContext(void 0);
433
+ process.env.NODE_ENV !== "production" && (Z.displayName = "ToolbarGroupContext");
434
+ function fe() {
435
+ return P.useContext(Z);
436
+ }
437
+ var pe = /*#__PURE__*/ P.forwardRef(function(e, t) {
438
+ let { defaultValue: r, disabled: i = !1, loopFocus: a = !0, onValueChange: o, orientation: s = "horizontal", multiple: l = !1, value: u, className: d, render: p, style: m, ...h } = e, g = X(!0), _ = fe(), v = r ?? n, y = u !== void 0 || r !== void 0, b = (g?.disabled ?? !1) || (_?.disabled ?? !1) || i, [x, S] = N({
439
+ controlled: u,
440
+ default: v,
441
+ name: "ToggleGroup",
442
+ state: "value"
443
+ }), C = c((e, t, n) => {
444
+ let r;
445
+ l ? (r = x.slice(), t ? r.push(e) : r.splice(x.indexOf(e), 1)) : r = t ? [e] : [], o?.(r, n), !n.isCanceled && S(r);
446
+ }), w = {
447
+ disabled: b,
448
+ multiple: l,
449
+ orientation: s
450
+ }, T = P.useMemo(() => ({
451
+ disabled: b,
452
+ setGroupValue: C,
453
+ value: x,
454
+ isValueInitialized: y
455
+ }), [
456
+ b,
457
+ C,
458
+ x,
459
+ y
460
+ ]), E = { role: "group" }, D = f("div", e, {
461
+ enabled: !!g,
462
+ state: w,
463
+ ref: t,
464
+ props: [E, h]
465
+ });
466
+ return /*#__PURE__*/ F(B.Provider, {
467
+ value: T,
468
+ children: g ? D : /*#__PURE__*/ F(J, {
469
+ render: p,
470
+ className: d,
471
+ style: m,
472
+ state: w,
473
+ refs: [t],
474
+ props: [E, h],
475
+ loopFocus: a,
476
+ enableHomeAndEndKeys: !0,
477
+ orientation: s
478
+ })
479
+ });
480
+ });
481
+ process.env.NODE_ENV !== "production" && (pe.displayName = "ToggleGroup");
482
+ var me = P.createContext({}), he = P.forwardRef(function({ className: e, variant: t, size: n, spacing: r = 2, orientation: i = "horizontal", children: o, style: s, ...c }, l) {
483
+ return /* @__PURE__ */ F(pe, {
484
+ ref: l,
485
+ "data-slot": "toggle-group",
486
+ "data-variant": t,
487
+ "data-size": n,
488
+ "data-spacing": r,
489
+ "data-orientation": i,
490
+ orientation: i,
491
+ style: typeof s == "function" ? (e) => ({
492
+ "--gap": r,
493
+ ...s(e)
494
+ }) : {
495
+ "--gap": r,
496
+ ...s
497
+ },
498
+ className: a("ck-toggle-group", e),
499
+ ...c,
500
+ children: /* @__PURE__ */ F(me.Provider, {
501
+ value: {
502
+ variant: t,
503
+ size: n,
504
+ spacing: r,
505
+ orientation: i
506
+ },
507
+ children: o
508
+ })
509
+ });
510
+ });
511
+ he.displayName = "ToggleGroup";
512
+ var ge = P.forwardRef(function({ className: e, children: t, variant: n = "default", size: r = "default", ...i }, o) {
513
+ let s = P.useContext(me);
514
+ return /* @__PURE__ */ F(W, {
515
+ ref: o,
516
+ "data-slot": "toggle-group-item",
517
+ "data-variant": s.variant ?? n,
518
+ "data-size": s.size ?? r,
519
+ "data-spacing": s.spacing,
520
+ className: a("ck-toggle ck-toggle-group-item", e),
521
+ ...i,
522
+ children: t
523
+ });
524
+ });
525
+ ge.displayName = "ToggleGroupItem";
526
+ function _e(e) {
527
+ return Array.isArray(e) ? e.map((e) => _e(e)).join(",") : e == null ? "" : String(e);
528
+ }
529
+ function Q(e) {
530
+ return String(Math.round(e * 100) / 100);
531
+ }
532
+ function ve(e, t, n, r, i) {
533
+ let a = Math.atan2(r - t, n - e), o = Math.max(12, i * 4);
534
+ return {
535
+ x1: n - o * Math.cos(a - Math.PI / 6),
536
+ y1: r - o * Math.sin(a - Math.PI / 6),
537
+ x2: n - o * Math.cos(a + Math.PI / 6),
538
+ y2: r - o * Math.sin(a + Math.PI / 6)
539
+ };
540
+ }
541
+ function ye(e) {
542
+ if (e.points.length < 2) return null;
543
+ let t = e.points[0], n = e.points[e.points.length - 1];
544
+ if (!t || !n) return null;
545
+ let r = e.color, i = e.strokeWidth;
546
+ if (e.tool === "pen") return {
547
+ type: "path",
548
+ d: e.points.map((e, t) => `${t === 0 ? "M" : "L"} ${Q(e.x)} ${Q(e.y)}`).join(" "),
549
+ stroke: r,
550
+ strokeWidth: i,
551
+ fill: "none"
552
+ };
553
+ if (e.tool === "line") return {
554
+ type: "line",
555
+ x: t.x,
556
+ y: t.y,
557
+ width: n.x - t.x,
558
+ height: n.y - t.y,
559
+ stroke: r,
560
+ strokeWidth: i,
561
+ fill: "none"
562
+ };
563
+ if (e.tool === "rect") return {
564
+ type: "rectangle",
565
+ x: Math.min(t.x, n.x),
566
+ y: Math.min(t.y, n.y),
567
+ width: Math.abs(n.x - t.x),
568
+ height: Math.abs(n.y - t.y),
569
+ stroke: r,
570
+ strokeWidth: i,
571
+ fill: "none"
572
+ };
573
+ if (e.tool === "circle") return {
574
+ type: "circle",
575
+ x: Math.min(t.x, n.x),
576
+ y: Math.min(t.y, n.y),
577
+ width: Math.abs(n.x - t.x),
578
+ height: Math.abs(n.y - t.y),
579
+ stroke: r,
580
+ strokeWidth: i,
581
+ fill: "none"
582
+ };
583
+ let a = ve(t.x, t.y, n.x, n.y, i);
584
+ return {
585
+ type: "path",
586
+ d: [
587
+ `M ${Q(t.x)} ${Q(t.y)} L ${Q(n.x)} ${Q(n.y)}`,
588
+ `M ${Q(n.x)} ${Q(n.y)} L ${Q(a.x1)} ${Q(a.y1)}`,
589
+ `M ${Q(n.x)} ${Q(n.y)} L ${Q(a.x2)} ${Q(a.y2)}`
590
+ ].join(" "),
591
+ stroke: r,
592
+ strokeWidth: i,
593
+ fill: "none"
594
+ };
595
+ }
596
+ var be = P.memo(function({ path: e }) {
597
+ let t = {
598
+ stroke: e.stroke,
599
+ strokeWidth: e.strokeWidth,
600
+ fill: e.fill || "none",
601
+ strokeLinecap: "round",
602
+ strokeLinejoin: "round",
603
+ pointerEvents: "none"
604
+ }, n = e.x ?? 0, r = e.y ?? 0, i = e.width ?? 0, a = e.height ?? 0;
605
+ switch (e.type) {
606
+ case "path": return e.d ? /* @__PURE__ */ F("path", {
607
+ d: e.d,
608
+ ...t
609
+ }) : null;
610
+ case "line": return /* @__PURE__ */ F("line", {
611
+ x1: n,
612
+ y1: r,
613
+ x2: n + i,
614
+ y2: r + a,
615
+ ...t
616
+ });
617
+ case "rectangle": return /* @__PURE__ */ F("rect", {
618
+ x: n,
619
+ y: r,
620
+ width: i,
621
+ height: a,
622
+ ...t
623
+ });
624
+ case "circle": return /* @__PURE__ */ F("ellipse", {
625
+ cx: n + i / 2,
626
+ cy: r + a / 2,
627
+ rx: i / 2,
628
+ ry: a / 2,
629
+ ...t
630
+ });
631
+ case "text": return e.text ? /* @__PURE__ */ F("text", {
632
+ x: n,
633
+ y: r,
634
+ fill: e.stroke,
635
+ fontSize: e.strokeWidth * 4,
636
+ pointerEvents: "none",
637
+ children: e.text
638
+ }) : null;
639
+ default: return null;
640
+ }
641
+ }), $ = /* @__PURE__ */ new Map();
642
+ function xe(e, t) {
643
+ let n = JSON.stringify({
644
+ locale: _e(e),
645
+ options: t
646
+ }), r = $.get(n);
647
+ if (r) return r;
648
+ let i = new Intl.NumberFormat(e, t);
649
+ return $.set(n, i), i;
650
+ }
651
+ function Se(e, t, n) {
652
+ return e == null ? "" : xe(t, n).format(e);
653
+ }
654
+ function Ce(e, t, n) {
655
+ return (e - t) * 100 / (n - t);
656
+ }
657
+ function we(e, t, n = Object.is) {
658
+ let { length: r } = e;
659
+ if (r !== t.length) return !1;
660
+ for (let i = 0; i < r; i += 1) if (!n(e[i], t[i])) return !1;
661
+ return !0;
662
+ }
663
+ function Te(e) {
664
+ return e == null ? void 0 : `${e}-label`;
665
+ }
666
+ function Ee(e, t) {
667
+ return e ?? t;
668
+ }
669
+ export { te as _, Se as a, L as b, he as c, J as d, ce as f, ne as g, U as h, Ce as i, ge as l, G as m, Ee as n, be as o, q as p, we as r, ye as s, Te as t, X as u, R as v, I as x, z as y };