@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,155 @@
1
+ import { B as e, I as t, L as n, V as r, m as i, z as a } from "./button-By0hGrJK.js";
2
+ import { n as o } from "./useValueChanged-DQXLia-2.js";
3
+ import * as s from "react";
4
+ var c = "data-valid", l = "data-invalid", u = {
5
+ badInput: !1,
6
+ customError: !1,
7
+ patternMismatch: !1,
8
+ rangeOverflow: !1,
9
+ rangeUnderflow: !1,
10
+ stepMismatch: !1,
11
+ tooLong: !1,
12
+ tooShort: !1,
13
+ typeMismatch: !1,
14
+ valid: null,
15
+ valueMissing: !1
16
+ }, d = {
17
+ disabled: !1,
18
+ valid: null,
19
+ touched: !1,
20
+ dirty: !1,
21
+ filled: !1,
22
+ focused: !1
23
+ }, f = { valid(e) {
24
+ return e === null ? null : e ? { [c]: "" } : { [l]: "" };
25
+ } }, p = {
26
+ invalid: void 0,
27
+ name: void 0,
28
+ validityData: {
29
+ state: u,
30
+ errors: [],
31
+ error: "",
32
+ value: "",
33
+ initialValue: null
34
+ },
35
+ setValidityData: e,
36
+ disabled: void 0,
37
+ setTouched: e,
38
+ setDirty: e,
39
+ setFilled: e,
40
+ setFocused: e,
41
+ focusOwnerRef: { current: void 0 },
42
+ validationMode: "onSubmit",
43
+ shouldValidateOnChange: () => !1,
44
+ state: d,
45
+ registerFieldControl: e,
46
+ validation: {
47
+ getValidationProps: (e, t = a) => t,
48
+ inputRef: { current: null },
49
+ registeredInputs: /* @__PURE__ */ new Map(),
50
+ registerInput: e,
51
+ getInputControl: () => null,
52
+ commit: async () => {},
53
+ change: e
54
+ }
55
+ }, m = /*#__PURE__*/ s.createContext(p);
56
+ process.env.NODE_ENV !== "production" && (m.displayName = "FieldRootContext");
57
+ function h(n = !0) {
58
+ let r = s.useContext(m);
59
+ if (r.setValidityData === e && !n) throw Error(process.env.NODE_ENV === "production" ? t(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
60
+ return r;
61
+ }
62
+ function g(e, t, r) {
63
+ let { setFocused: a, focusOwnerRef: o } = h(), s = i((t) => {
64
+ (t ? !e : o.current === s) && (o.current = t && s, r?.(t), a(t));
65
+ });
66
+ return n(() => {
67
+ let e = t.current;
68
+ return e?.getRootNode()?.activeElement === e && s(!0), () => s(!1);
69
+ }, [
70
+ e,
71
+ t,
72
+ s
73
+ ]), s;
74
+ }
75
+ function _(e, t, i, a, o = !0, s) {
76
+ let { registerFieldControl: c } = h(), l = r(() => Symbol());
77
+ n(() => {
78
+ let n = l.current;
79
+ o ? c(n, {
80
+ controlRef: e,
81
+ getValue: a,
82
+ id: t,
83
+ name: s,
84
+ value: i
85
+ }) : c(n, void 0);
86
+ }, [
87
+ e,
88
+ o,
89
+ a,
90
+ t,
91
+ s,
92
+ c,
93
+ l,
94
+ i
95
+ ]), n(() => {
96
+ let e = l.current;
97
+ return () => {
98
+ c(e, void 0);
99
+ };
100
+ }, [c, l]);
101
+ }
102
+ var v = /*#__PURE__*/ s.createContext({
103
+ elementRef: { current: null },
104
+ formRef: { current: { fields: /* @__PURE__ */ new Map() } },
105
+ errors: {},
106
+ clearErrors: e,
107
+ validationMode: "onSubmit",
108
+ submitCountRef: { current: 0 }
109
+ });
110
+ process.env.NODE_ENV !== "production" && (v.displayName = "FormContext");
111
+ function y() {
112
+ return s.useContext(v);
113
+ }
114
+ var b = /*#__PURE__*/ s.createContext({
115
+ controlId: void 0,
116
+ registerControlId: e,
117
+ resetControlId: e,
118
+ labelId: void 0,
119
+ setLabelId: e,
120
+ messageIds: [],
121
+ setMessageIds: e,
122
+ getDescriptionProps: (e) => e
123
+ });
124
+ process.env.NODE_ENV !== "production" && (b.displayName = "LabelableContext");
125
+ function x() {
126
+ return s.useContext(b);
127
+ }
128
+ function S(t = {}) {
129
+ let { id: a, enabled: c = !0 } = t, { controlId: l, registerControlId: u, resetControlId: d } = x(), f = o(), p = r(() => Symbol()), m = s.useRef(!1), h = s.useRef(!1), g = i(() => {
130
+ m.current && u !== e && (m.current = !1, u(p.current, void 0));
131
+ });
132
+ return n(() => {
133
+ if (!c || u === e) {
134
+ g();
135
+ return;
136
+ }
137
+ let t;
138
+ if (a !== void 0) h.current = !0, t = a;
139
+ else if (h.current) t = f;
140
+ else {
141
+ d();
142
+ return;
143
+ }
144
+ t === void 0 ? g() : (m.current = !0, u(p.current, t));
145
+ }, [
146
+ a,
147
+ c,
148
+ u,
149
+ d,
150
+ f,
151
+ p,
152
+ g
153
+ ]), n(() => g, [g]), (c ? l : void 0) ?? a ?? f;
154
+ }
155
+ export { g as a, _ as i, x as n, h as o, y as r, f as s, S as t };
@@ -0,0 +1,92 @@
1
+ import { L as e, R as t, V as n, h as r, m as i, z as a } from "./button-By0hGrJK.js";
2
+ import * as o from "react";
3
+ function s(e) {
4
+ o.useEffect(e, t);
5
+ }
6
+ var c = 0, l = class e {
7
+ static create() {
8
+ return new e();
9
+ }
10
+ currentId = c;
11
+ start(e, t) {
12
+ this.clear(), this.currentId = setTimeout(() => {
13
+ this.currentId = c, t();
14
+ }, e);
15
+ }
16
+ isStarted() {
17
+ return this.currentId !== c;
18
+ }
19
+ clear = () => {
20
+ this.currentId !== c && (clearTimeout(this.currentId), this.currentId = c);
21
+ };
22
+ disposeEffect = () => this.clear;
23
+ };
24
+ function u() {
25
+ let e = n(l.create).current;
26
+ return s(e.disposeEffect), e;
27
+ }
28
+ function d(e, t, n, r) {
29
+ let i = !1, o = !1, s = r ?? a;
30
+ return {
31
+ reason: e,
32
+ event: t ?? new Event("base-ui"),
33
+ cancel() {
34
+ i = !0;
35
+ },
36
+ allowPropagation() {
37
+ o = !0;
38
+ },
39
+ get isCanceled() {
40
+ return i;
41
+ },
42
+ get isPropagationAllowed() {
43
+ return o;
44
+ },
45
+ trigger: n,
46
+ ...s
47
+ };
48
+ }
49
+ function f(e, t, n) {
50
+ let r = n ?? a;
51
+ return {
52
+ reason: e,
53
+ event: t ?? new Event("base-ui"),
54
+ ...r
55
+ };
56
+ }
57
+ var p = "none", m = "trigger-press", h = "trigger-hover", g = "trigger-focus", _ = "outside-press", v = "item-press", y = "close-press", b = "track-press", x = "input-change", S = "focus-out", C = "escape-key", w = "list-navigation", T = "keyboard", E = "pointer", D = "drag", O = "cancel-open", k = "sibling-open", A = "disabled", j = "missing", M = "initial", N = "imperative-action", P = "window-resize";
58
+ function F() {
59
+ let [, e] = o.useState({});
60
+ return o.useCallback(() => {
61
+ e({});
62
+ }, []);
63
+ }
64
+ var I = 0;
65
+ function L(e, t = "mui") {
66
+ let n = o.useRef(void 0), r = F(), i = e ?? n.current;
67
+ return o.useEffect(() => {
68
+ n.current ?? (I += 1, n.current = `${t}-${I}`, e ?? r());
69
+ }, [
70
+ e,
71
+ t,
72
+ r
73
+ ]), i;
74
+ }
75
+ var R = r.useId;
76
+ function z(e, t) {
77
+ if (R !== void 0) {
78
+ let n = R();
79
+ return e ?? (t ? `${t}-${n}` : n);
80
+ }
81
+ return L(e, t);
82
+ }
83
+ function B(e) {
84
+ return z(e, "base-ui");
85
+ }
86
+ function V(t, n) {
87
+ let r = o.useRef(t), a = i(n);
88
+ e(() => {
89
+ r.current !== t && a(r.current), r.current = t;
90
+ }, [t, a]);
91
+ }
92
+ export { u as A, g as C, d as D, P as E, f as O, b as S, m as T, j as _, O as a, E as b, D as c, N as d, M as f, w as g, T as h, F as i, s as j, l as k, C as l, v as m, B as n, y as o, x as p, z as r, A as s, V as t, S as u, p as v, h as w, k as x, _ as y };
@@ -37,35 +37,9 @@ function c(e, t = 254) {
37
37
  let r = n.indexOf("@");
38
38
  return r > 0 && r === n.lastIndexOf("@") && r < n.length - 1 && !/\s/.test(n);
39
39
  }
40
- var l = new Set(/* @__PURE__ */ "exe.dll.bat.cmd.com.msi.scr.pif.cpl.sh.bash.zsh.ps1.py.rb.pl.php.jar.js.mjs.cjs.html.htm.xhtml.svg.swf.wasm".split("."));
40
+ var l = /* @__PURE__ */ new Set(/* @__PURE__ */ "exe.dll.bat.cmd.com.msi.scr.pif.cpl.sh.bash.zsh.ps1.py.rb.pl.php.jar.js.mjs.cjs.html.htm.xhtml.svg.swf.wasm".split("."));
41
41
  function u(e) {
42
42
  let t = e.lastIndexOf("."), n = t >= 0 ? e.slice(t + 1).toLowerCase() : "";
43
43
  return l.has(n);
44
44
  }
45
- var d = Object.freeze({
46
- ID: 256,
47
- CONTENT: 1e4,
48
- REPLY_CONTENT: 5e3,
49
- NAME: 500,
50
- EMAIL: 254,
51
- PAGE: 2e3,
52
- SELECTOR: 2048,
53
- EMOJI: 32,
54
- COLOR: 128,
55
- DRAWING_PATH_DATA: 5e4,
56
- DRAWING_TEXT: 5e3,
57
- DRAWING_TYPE: 20,
58
- DRAWING_PATHS: 1e3,
59
- TEXT_SELECTION: 2e4,
60
- DESCRIPTION: 1e4,
61
- ASSIGNEES: 100,
62
- CHECKLIST_ITEMS: 100,
63
- CHECKLIST_LABEL: 500,
64
- ONLINE_USERS: 500,
65
- RENDERED_CURSORS: 24,
66
- CURSOR_EMITS_PER_SEC: 240,
67
- REACTION_COUNT: 1e6,
68
- PENDING_MUTATIONS: 1e3,
69
- RETRY_DELAY: 3e4
70
- });
71
- export { r as a, s as c, c as d, t as i, o as l, u as n, i as o, e as r, n as s, d as t, a as u };
45
+ export { i as a, o as c, r as i, a as l, e as n, n as o, t as r, s, u as t, c as u };
@@ -1,160 +1,108 @@
1
- import { n as e } from "./chunk-t7YoJN_i.js";
2
- function t(e) {
3
- for (let t = 0; t < e.length; t++) {
4
- let n = e.charCodeAt(t);
5
- if (n < 32 || n === 127) return !0;
6
- }
7
- return !1;
8
- }
9
- function n(e) {
10
- for (let t = 0; t < e.length; t++) {
11
- let n = e.charCodeAt(t);
12
- if (n < 32 && n !== 9 && n !== 10 && n !== 13 || n === 127) return !0;
13
- }
14
- return !1;
15
- }
16
- function r(e) {
17
- return typeof e == "object" && !!e && !Array.isArray(e);
18
- }
19
- function i(e) {
20
- return typeof e == "number" && Number.isFinite(e);
21
- }
22
- function a(e) {
23
- return i(e) && e >= 0 && e <= 100;
24
- }
25
- function o(e, n) {
26
- return typeof e == "string" && e.trim().length > 0 && e.length <= n && !t(e);
27
- }
28
- function s(e, n) {
29
- return e === void 0 || typeof e == "string" && e.length <= n && !t(e);
30
- }
31
- function c(e, t) {
32
- return typeof e == "string" && e.trim().length > 0 && e.length <= t && !n(e);
33
- }
34
- function l(e, t = 254) {
35
- if (!o(e, t)) return !1;
36
- let n = e.trim();
37
- if (n !== e) return !1;
38
- let r = n.indexOf("@");
39
- return r > 0 && r === n.lastIndexOf("@") && r < n.length - 1 && !/\s/.test(n);
40
- }
41
- var u = new Set(/* @__PURE__ */ "exe.dll.bat.cmd.com.msi.scr.pif.cpl.sh.bash.zsh.ps1.py.rb.pl.php.jar.js.mjs.cjs.html.htm.xhtml.svg.swf.wasm".split("."));
42
- function d(e) {
43
- let t = e.lastIndexOf("."), n = t >= 0 ? e.slice(t + 1).toLowerCase() : "";
44
- return u.has(n);
45
- }
46
- var f = Object.freeze({
47
- ID: 256,
48
- CONTENT: 1e4,
49
- REPLY_CONTENT: 5e3,
50
- NAME: 500,
51
- EMAIL: 254,
52
- PAGE: 2e3,
53
- SELECTOR: 2048,
54
- EMOJI: 32,
55
- COLOR: 128,
56
- DRAWING_PATH_DATA: 5e4,
57
- DRAWING_TEXT: 5e3,
58
- DRAWING_TYPE: 20,
59
- DRAWING_PATHS: 1e3,
60
- TEXT_SELECTION: 2e4,
61
- DESCRIPTION: 1e4,
62
- ASSIGNEES: 100,
63
- CHECKLIST_ITEMS: 100,
64
- CHECKLIST_LABEL: 500,
65
- ONLINE_USERS: 500,
66
- RENDERED_CURSORS: 24,
67
- CURSOR_EMITS_PER_SEC: 240,
68
- REACTION_COUNT: 1e6,
69
- PENDING_MUTATIONS: 1e3,
70
- RETRY_DELAY: 3e4
71
- }), p = null;
72
- function m() {
73
- return p ||= import("./pusher-CizoY5NA.js").then((t) => /* @__PURE__ */ e(t.default, 1)).then((e) => e.default ?? e), p;
1
+ import { c as e, i as t, l as n, o as r, s as i, u as a } from "./validation-C7QG8j7Z.js";
2
+ import { i as o } from "./comment-kit-core-D0kY00St.js";
3
+ var s = Object.create, c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.getPrototypeOf, f = Object.prototype.hasOwnProperty, p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), m = (e, t) => {
4
+ let n = {};
5
+ for (var r in e) c(n, r, {
6
+ get: e[r],
7
+ enumerable: !0
8
+ });
9
+ return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
10
+ }, h = (e, t, n, r) => {
11
+ if (t && typeof t == "object" || typeof t == "function") for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !f.call(e, s) && s !== n && c(e, s, {
12
+ get: ((e) => t[e]).bind(null, s),
13
+ enumerable: !(r = l(t, s)) || r.enumerable
14
+ });
15
+ return e;
16
+ }, g = (e, t, n) => (n = e == null ? {} : s(d(e)), h(t || !e || !e.__esModule || !f.call(e, "default") ? c(n, "default", {
17
+ value: e,
18
+ enumerable: !0
19
+ }) : n, e)), _ = null;
20
+ function v() {
21
+ return _ ||= import("./pusher-BEl7Qn-8.js").then((e) => /* @__PURE__ */ g(e.default, 1)).then((e) => e.default ?? e), _;
74
22
  }
75
- var h = f.ID, g = f.NAME, _ = f.EMAIL, v = f.PAGE, y = f.COLOR, b = f.DRAWING_PATH_DATA, x = f.DRAWING_TEXT, S = f.ONLINE_USERS, C = {
23
+ var y = o.ID, b = o.NAME, x = o.EMAIL, S = o.PAGE, C = o.COLOR, w = o.DRAWING_PATH_DATA, T = o.DRAWING_TEXT, E = o.ONLINE_USERS, D = {
76
24
  id: "unknown",
77
25
  name: "Unknown",
78
26
  email: "unknown@example.invalid"
79
- }, w = new Set([
27
+ }, O = /* @__PURE__ */ new Set([
80
28
  "client-cursor_move",
81
29
  "client-cursor_leave",
82
30
  "client-drawing_stroke"
83
- ]), T = new Set([
31
+ ]), k = /* @__PURE__ */ new Set([
84
32
  "path",
85
33
  "line",
86
34
  "rectangle",
87
35
  "circle",
88
36
  "text"
89
37
  ]);
90
- function E(e) {
91
- return o(e, h);
38
+ function A(e) {
39
+ return n(e, y);
92
40
  }
93
- function D(e) {
94
- return r(e) ? E(e.id) && o(e.name, g) && l(e.email) && s(e.avatar, v) : !1;
41
+ function j(t) {
42
+ return r(t) ? A(t.id) && n(t.name, b) && a(t.email) && e(t.avatar, S) : !1;
95
43
  }
96
- function O(e) {
97
- return r(e) ? E(e.id) && c(e.content, f.CONTENT) && E(e.userId) && r(e.position) && i(e.position.x) && i(e.position.y) && D(e.author) : !1;
44
+ function M(e) {
45
+ return r(e) ? A(e.id) && i(e.content, o.CONTENT) && A(e.userId) && r(e.position) && t(e.position.x) && t(e.position.y) && j(e.author) : !1;
98
46
  }
99
- function k(e) {
100
- return r(e) ? E(e.id) && c(e.content, f.CONTENT) && D(e.author) : !1;
47
+ function N(e) {
48
+ return r(e) ? A(e.id) && i(e.content, o.CONTENT) && j(e.author) : !1;
101
49
  }
102
- function A(e) {
103
- return r(e) ? i(e.x) && e.x >= 0 && e.x <= 100 && i(e.y) && e.y >= 0 && e.y <= 100 && o(e.page, v) : !1;
50
+ function P(e) {
51
+ return r(e) ? t(e.x) && e.x >= 0 && e.x <= 100 && t(e.y) && e.y >= 0 && e.y <= 100 && n(e.page, S) : !1;
104
52
  }
105
- function j(e) {
106
- return !r(e) || !o(e.type, 20) || !T.has(e.type) || !o(e.stroke, y) || !i(e.strokeWidth) || e.strokeWidth <= 0 || e.strokeWidth > 100 || !o(e.fill, y) ? !1 : s(e.d, b) && s(e.text, x) && (e.x === void 0 || i(e.x)) && (e.y === void 0 || i(e.y)) && (e.width === void 0 || i(e.width)) && (e.height === void 0 || i(e.height));
53
+ function F(i) {
54
+ return !r(i) || !n(i.type, 20) || !k.has(i.type) || !n(i.stroke, C) || !t(i.strokeWidth) || i.strokeWidth <= 0 || i.strokeWidth > 100 || !n(i.fill, C) ? !1 : e(i.d, w) && e(i.text, T) && (i.x === void 0 || t(i.x)) && (i.y === void 0 || t(i.y)) && (i.width === void 0 || t(i.width)) && (i.height === void 0 || t(i.height));
107
55
  }
108
- function M(e) {
56
+ function I(e) {
109
57
  return {
110
- id: e.id.slice(0, h),
111
- name: e.name.slice(0, g),
112
- email: e.email.slice(0, _),
113
- ...e.avatar ? { avatar: e.avatar.slice(0, v) } : {},
114
- ...e.organizationId ? { organizationId: e.organizationId.slice(0, h) } : {}
58
+ id: e.id.slice(0, y),
59
+ name: e.name.slice(0, b),
60
+ email: e.email.slice(0, x),
61
+ ...e.avatar ? { avatar: e.avatar.slice(0, S) } : {},
62
+ ...e.organizationId ? { organizationId: e.organizationId.slice(0, y) } : {}
115
63
  };
116
64
  }
117
- function N(e) {
118
- return o(e, v) ? e : "";
65
+ function L(e) {
66
+ return n(e, S) ? e : "";
119
67
  }
120
- function P(e) {
68
+ function R(e) {
121
69
  let t = e.toLowerCase().replace(/^\[|\]$/g, "");
122
70
  return t === "localhost" || t === "127.0.0.1" || t === "::1";
123
71
  }
124
- function F(e) {
125
- return o(e, 253) && (e === "localhost" || /^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(e));
72
+ function z(e) {
73
+ return n(e, 253) && (e === "localhost" || /^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$/.test(e));
126
74
  }
127
- function I() {
128
- return { ...C };
75
+ function B() {
76
+ return { ...D };
129
77
  }
130
- function L(e) {
78
+ function V(e) {
131
79
  let t = String(e.projectId).trim();
132
- if (!E(t) || !/^[\w.-]+$/.test(t)) throw Error("Invalid WebSocket projectId");
133
- let n;
80
+ if (!A(t) || !/^[\w.-]+$/.test(t)) throw Error("Invalid WebSocket projectId");
81
+ let r;
134
82
  try {
135
- n = new URL(e.authEndpoint);
83
+ r = new URL(e.authEndpoint);
136
84
  } catch {
137
85
  throw Error("Invalid WebSocket auth endpoint");
138
86
  }
139
- if (n.protocol !== "https:" && !(n.protocol === "http:" && P(n.hostname))) throw Error("Invalid WebSocket auth endpoint");
140
- if (!o(e.key, 256)) throw Error("Invalid WebSocket key");
141
- if (!F(e.wsHost)) throw Error("Invalid WebSocket host");
142
- if (!o(e.apiKey, 512)) throw Error("Invalid WebSocket API key");
143
- if (e.userEmail && !l(e.userEmail)) throw Error("Invalid WebSocket user email");
144
- if (e.userInfo && !D(e.userInfo)) throw Error("Invalid WebSocket user info");
87
+ if (r.protocol !== "https:" && !(r.protocol === "http:" && R(r.hostname))) throw Error("Invalid WebSocket auth endpoint");
88
+ if (!n(e.key, 256)) throw Error("Invalid WebSocket key");
89
+ if (!z(e.wsHost)) throw Error("Invalid WebSocket host");
90
+ if (!n(e.apiKey, 512)) throw Error("Invalid WebSocket API key");
91
+ if (e.userEmail && !a(e.userEmail)) throw Error("Invalid WebSocket user email");
92
+ if (e.userInfo && !j(e.userInfo)) throw Error("Invalid WebSocket user info");
145
93
  return {
146
94
  ...e,
147
95
  projectId: t,
148
- authEndpoint: n.toString(),
149
- userInfo: e.userInfo ? M(e.userInfo) : void 0
96
+ authEndpoint: r.toString(),
97
+ userInfo: e.userInfo ? I(e.userInfo) : void 0
150
98
  };
151
99
  }
152
- var R = class e {
100
+ var H = class e {
153
101
  static {
154
102
  this.MAX_LISTENERS_PER_EVENT = 100;
155
103
  }
156
104
  constructor(e) {
157
- this.listeners = /* @__PURE__ */ new Map(), this.pusher = null, this.presenceChannel = null, this.onlineUsers = /* @__PURE__ */ new Map(), this.lastCursorUpdate = 0, this.cursorThrottle = 50, this.reconnectAttempts = 0, this.connecting = null, this.destroyed = !1, this.config = L(e);
105
+ this.listeners = /* @__PURE__ */ new Map(), this.pusher = null, this.presenceChannel = null, this.onlineUsers = /* @__PURE__ */ new Map(), this.lastCursorUpdate = 0, this.cursorThrottle = 50, this.reconnectAttempts = 0, this.connecting = null, this.destroyed = !1, this.config = V(e);
158
106
  }
159
107
  on(t, n) {
160
108
  let r = this.listeners.get(t);
@@ -178,7 +126,7 @@ var R = class e {
178
126
  }
179
127
  async openConnection() {
180
128
  if (this.pusher || this.destroyed) return;
181
- let e = await m();
129
+ let e = await v();
182
130
  if (this.destroyed) return;
183
131
  let t = { "X-API-Key": this.config.apiKey };
184
132
  this.config.userEmail && (t["X-User-Email"] = this.config.userEmail), this.pusher = new e(this.config.key, {
@@ -218,13 +166,7 @@ var R = class e {
218
166
  }), this.subscribeToChannel();
219
167
  }
220
168
  reconnect() {
221
- if (!this.destroyed) {
222
- if (!this.pusher) {
223
- this.connect();
224
- return;
225
- }
226
- this.pusher.connect();
227
- }
169
+ this.destroyed || (this.pusher ? this.pusher.connect() : this.connect());
228
170
  }
229
171
  disconnect() {
230
172
  this.presenceChannel &&= (this.pusher?.unsubscribe(`presence-project.${this.config.projectId}`), null), this.pusher &&= (this.pusher.disconnect(), null), this.onlineUsers.clear();
@@ -240,64 +182,64 @@ var R = class e {
240
182
  let e = `presence-project.${this.config.projectId}`;
241
183
  this.presenceChannel = this.pusher.subscribe(e), this.presenceChannel.bind("pusher:subscription_succeeded", (e) => {
242
184
  this.onlineUsers.clear(), e.each((e) => {
243
- if (this.onlineUsers.size >= S) return;
185
+ if (this.onlineUsers.size >= E) return;
244
186
  let t = this.memberToUser(e);
245
187
  t && this.onlineUsers.set(t.id, t);
246
188
  }), this.emit("presence:update", { users: this.getOnlineUsers() });
247
189
  }), this.presenceChannel.bind("pusher:member_added", (e) => {
248
190
  let t = this.memberToUser(e);
249
191
  if (t) {
250
- if (!this.onlineUsers.has(t.id) && this.onlineUsers.size >= S) return;
192
+ if (!this.onlineUsers.has(t.id) && this.onlineUsers.size >= E) return;
251
193
  this.onlineUsers.set(t.id, t), this.emit("user:joined", t), this.emit("presence:update", { users: this.getOnlineUsers() });
252
194
  }
253
195
  }), this.presenceChannel.bind("pusher:member_removed", (e) => {
254
- if (!E(e.id)) return;
196
+ if (!A(e.id)) return;
255
197
  let t = e.id;
256
198
  this.onlineUsers.delete(t), this.emit("user:left", { userId: t }), this.emit("presence:update", { users: this.getOnlineUsers() });
257
199
  }), this.presenceChannel.bind("pusher:subscription_error", (e) => {
258
200
  console.error("[CommentKit WS] Channel subscription error:", e);
259
- let t = o(e.type, 80) ? e.type : "unknown";
201
+ let t = n(e.type, 80) ? e.type : "unknown";
260
202
  this.emit("error", /* @__PURE__ */ Error(`Channel subscription failed: ${t}`));
261
203
  });
262
204
  let t = (e, t) => {
263
205
  this.presenceChannel?.bind(e, t), this.presenceChannel?.bind(`.${e}`, t);
264
206
  };
265
207
  t("comment_created", (e) => {
266
- O(e) && this.emit("comment:created", e);
208
+ M(e) && this.emit("comment:created", e);
267
209
  }), t("comment_updated", (e) => {
268
- O(e) && this.emit("comment:updated", e);
210
+ M(e) && this.emit("comment:updated", e);
269
211
  }), t("comment_deleted", (e) => {
270
212
  let t = e;
271
- r(t) && E(t.id) && this.emit("comment:deleted", { id: t.id });
213
+ r(t) && A(t.id) && this.emit("comment:deleted", { id: t.id });
272
214
  }), t("comment_resolved", (e) => {
273
- O(e) && this.emit("comment:resolved", e);
215
+ M(e) && this.emit("comment:resolved", e);
274
216
  }), t("comment_completed", (e) => {
275
- O(e) && this.emit("comment:completed", e);
217
+ M(e) && this.emit("comment:completed", e);
276
218
  }), t("reply_added", (e) => {
277
219
  let t = e;
278
- r(t) && E(t.commentId) && k(t.reply) && this.emit("reply:added", {
220
+ r(t) && A(t.commentId) && N(t.reply) && this.emit("reply:added", {
279
221
  commentId: t.commentId,
280
222
  reply: t.reply
281
223
  });
282
224
  }), t("reaction_added", (e) => {
283
225
  let t = e;
284
- r(t) && E(t.commentId) && o(t.emoji, 32) && E(t.userId) && this.emit("reaction:added", {
226
+ r(t) && A(t.commentId) && n(t.emoji, 32) && A(t.userId) && this.emit("reaction:added", {
285
227
  commentId: t.commentId,
286
- ...E(t.replyId) ? { replyId: t.replyId } : {},
228
+ ...A(t.replyId) ? { replyId: t.replyId } : {},
287
229
  emoji: t.emoji,
288
230
  userId: t.userId
289
231
  });
290
232
  }), t("reaction_removed", (e) => {
291
233
  let t = e;
292
- r(t) && E(t.commentId) && o(t.emoji, 32) && E(t.userId) && this.emit("reaction:removed", {
234
+ r(t) && A(t.commentId) && n(t.emoji, 32) && A(t.userId) && this.emit("reaction:removed", {
293
235
  commentId: t.commentId,
294
- ...E(t.replyId) ? { replyId: t.replyId } : {},
236
+ ...A(t.replyId) ? { replyId: t.replyId } : {},
295
237
  emoji: t.emoji,
296
238
  userId: t.userId
297
239
  });
298
240
  }), this.presenceChannel.bind("client-cursor_move", (e) => {
299
- if (A(e)) {
300
- let t = e, n = D(t.user) ? t.user : I();
241
+ if (P(e)) {
242
+ let t = e, n = j(t.user) ? t.user : B();
301
243
  this.emit("cursor:move", {
302
244
  ...e,
303
245
  user: n
@@ -305,17 +247,17 @@ var R = class e {
305
247
  }
306
248
  }), this.presenceChannel.bind("client-cursor_leave", (e) => {
307
249
  let t = e;
308
- r(t) && E(t.userId) && this.emit("cursor:leave", { userId: t.userId });
250
+ r(t) && A(t.userId) && this.emit("cursor:leave", { userId: t.userId });
309
251
  }), this.presenceChannel.bind("client-drawing_stroke", (e) => {
310
252
  let t = e;
311
- r(t) && E(t.userId) && j(t.path) && this.emit("drawing:stroke", {
253
+ r(t) && A(t.userId) && F(t.path) && this.emit("drawing:stroke", {
312
254
  userId: t.userId,
313
255
  path: t.path
314
256
  });
315
257
  });
316
258
  }
317
259
  memberToUser(e) {
318
- if (!E(e.id)) return null;
260
+ if (!A(e.id)) return null;
319
261
  let t = e.info;
320
262
  if (!t) return null;
321
263
  let n = t.email == null || t.email === "" ? `${String(e.id)}@presence.invalid` : t.email, r = {
@@ -324,32 +266,32 @@ var R = class e {
324
266
  email: n,
325
267
  avatar: t.avatar
326
268
  };
327
- return D(r) ? M(r) : null;
269
+ return j(r) ? I(r) : null;
328
270
  }
329
271
  sendCursorMove(e, t, n) {
330
272
  if (!Number.isFinite(e) || !Number.isFinite(t)) return;
331
- let r = N(n);
273
+ let r = L(n);
332
274
  if (!r) return;
333
275
  let i = Math.max(0, Math.min(100, e)), a = Math.max(0, Math.min(100, t)), o = Date.now();
334
276
  o - this.lastCursorUpdate < this.cursorThrottle || (this.lastCursorUpdate = o, this.triggerClientEvent("client-cursor_move", {
335
277
  x: i,
336
278
  y: a,
337
279
  page: r,
338
- user: this.config.userInfo || I()
280
+ user: this.config.userInfo || B()
339
281
  }));
340
282
  }
341
283
  sendCursorLeave() {
342
284
  this.triggerClientEvent("client-cursor_leave", { userId: this.config.userInfo?.id || "unknown" });
343
285
  }
344
286
  sendDrawingStroke(e) {
345
- j(e) && this.triggerClientEvent("client-drawing_stroke", {
287
+ F(e) && this.triggerClientEvent("client-drawing_stroke", {
346
288
  userId: this.config.userInfo?.id || "unknown",
347
289
  path: e
348
290
  });
349
291
  }
350
292
  requestPresence() {}
351
293
  triggerClientEvent(e, t) {
352
- if (w.has(e) && this.presenceChannel) try {
294
+ if (O.has(e) && this.presenceChannel) try {
353
295
  this.presenceChannel.trigger(e, t);
354
296
  } catch {}
355
297
  }
@@ -357,4 +299,4 @@ var R = class e {
357
299
  this.destroyed = !0, this.disconnect(), this.listeners.clear();
358
300
  }
359
301
  };
360
- export { n as a, r as c, o as d, l as f, t as i, c as l, f as n, i as o, d as r, a as s, R as t, s as u };
302
+ export { p as n, m as r, H as t };