@commentkit/comment-kit 0.6.8 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/CHANGELOG.md +71 -2
  2. package/LICENSE +18 -2
  3. package/README.md +198 -125
  4. package/SECURITY.md +48 -0
  5. package/dist/THIRD_PARTY_NOTICES.txt +284 -0
  6. package/dist/angular.es.js +68 -3419
  7. package/dist/comment-kit.es.js +33 -3192
  8. package/dist/demo.es.js +472 -0
  9. package/dist/headless.es.js +4 -0
  10. package/dist/preact.es.js +79 -3443
  11. package/dist/qwik.es.js +1 -3474
  12. package/dist/qwik.qwik.mjs +114 -0
  13. package/dist/react.es.js +80 -28447
  14. package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
  15. package/dist/shared/annotation-icons-Dh-bmNYK.js +172 -0
  16. package/dist/shared/annotation-toolbar-B9SxYqoF.js +1093 -0
  17. package/dist/shared/bridge-CJoGYngu.js +177 -0
  18. package/dist/shared/button-By0hGrJK.js +505 -0
  19. package/dist/shared/button-group-Cl9CrvvU.js +93 -0
  20. package/dist/shared/comment-drawing-canvas-Dzb5YoFw.js +124 -0
  21. package/dist/shared/comment-image-lightbox-BPYJT1sB.js +183 -0
  22. package/dist/shared/comment-kit-core-BaSuMzp9.js +3381 -0
  23. package/dist/shared/comment-kit-ui-CzfdAZs2.js +20181 -0
  24. package/dist/shared/comment-screenshot-annotator-C7X-_bm6.js +151 -0
  25. package/dist/shared/comment-screenshot-overlay-wIrZrcRy.js +206 -0
  26. package/dist/shared/comment-utils-BycYTSxA.js +602 -0
  27. package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
  28. package/dist/shared/dev-export-panel-FwFVdady.js +208 -0
  29. package/dist/shared/dev-grab-DDqg0LQf.js +203 -0
  30. package/dist/shared/dist-De294MVF.js +623 -0
  31. package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
  32. package/dist/shared/element-selector-BhJm-NSs.js +858 -0
  33. package/dist/shared/errors-Bu5ajEmB.js +22 -0
  34. package/dist/shared/icons-nzMOLzrm.js +266 -0
  35. package/dist/shared/mount-ui--ijs8pWT.js +193 -0
  36. package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-ipHMJnO_.js} +93 -127
  37. package/dist/shared/realtime-Dk41VwKg.js +302 -0
  38. package/dist/shared/separator-XDBsaWyw.js +4021 -0
  39. package/dist/shared/shadow-root-C5v-T8lQ.js +135 -0
  40. package/dist/shared/styles-D3yMtaec.js +2 -0
  41. package/dist/shared/useValueChanged-CrzfD8l-.js +92 -0
  42. package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
  43. package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-DhLWh3Jr.js} +90 -148
  44. package/dist/solid.es.js +63 -3427
  45. package/dist/svelte.es.js +78 -3442
  46. package/dist/types/adapters/bridge.d.ts +10 -13
  47. package/dist/types/angular/index.d.ts +17 -7
  48. package/dist/types/core/api-client.d.ts +16 -17
  49. package/dist/types/core/comment-kit-core.d.ts +29 -12
  50. package/dist/types/core/local-demo.d.ts +60 -0
  51. package/dist/types/core/types.d.ts +68 -0
  52. package/dist/types/demo.d.ts +17 -0
  53. package/dist/types/headless.d.ts +8 -0
  54. package/dist/types/index.d.ts +22 -20
  55. package/dist/types/qwik/index.d.ts +4 -1
  56. package/dist/vue.es.js +80 -3443
  57. package/docs/api-reference.md +372 -0
  58. package/docs/local-demo.md +60 -0
  59. package/package.json +69 -41
  60. package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
  61. package/dist/angular/comment-kit-ui-D-LUFD6n.js +0 -24898
  62. package/dist/angular/dom-Cx1nMbdI.js +0 -104
  63. package/dist/angular/mount-ui-C9PJ5aK_.js +0 -72
  64. package/dist/angular/realtime-VrKV0lPI.js +0 -567
  65. package/dist/angular/shadow-root-yMOaW9pk.js +0 -93
  66. package/dist/angular/styles-CMz7-p8x.js +0 -2
  67. package/dist/angular/widget-theme-CYPYAwhR.js +0 -24
  68. package/dist/comment-kit.css +0 -2
  69. package/dist/core/chunk-t7YoJN_i.js +0 -11
  70. package/dist/core/comment-kit-ui-Ct4E18do.js +0 -24898
  71. package/dist/core/error-boundary-CN_BGsYl.js +0 -21
  72. package/dist/core/mount-ui-Bfnuuesk.js +0 -72
  73. package/dist/core/pusher-CizoY5NA.js +0 -2504
  74. package/dist/core/realtime-C3_O7gi2.js +0 -278
  75. package/dist/core/shadow-root-DAtdjHG2.js +0 -93
  76. package/dist/core/styles-ClRoB6ro.js +0 -2
  77. package/dist/core/widget-theme-BWDYr7VR.js +0 -24
  78. package/dist/preact/chunk-CZ0PdaaN.js +0 -11
  79. package/dist/preact/comment-kit-ui-DEzn7J_P.js +0 -24898
  80. package/dist/preact/dom-_ULpq7rg.js +0 -104
  81. package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
  82. package/dist/preact/limits-C3ZEKcL_.js +0 -71
  83. package/dist/preact/mount-ui-Dx8en--W.js +0 -72
  84. package/dist/preact/pusher-BP4kCufH.js +0 -2504
  85. package/dist/preact/realtime-COin_nJF.js +0 -567
  86. package/dist/preact/shadow-root-D-NcwruG.js +0 -93
  87. package/dist/preact/styles-D6i7be5-.js +0 -2
  88. package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
  89. package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
  90. package/dist/qwik/comment-kit-ui-Dvwee2tw.js +0 -24898
  91. package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
  92. package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
  93. package/dist/qwik/limits-DK35yjGY.js +0 -71
  94. package/dist/qwik/mount-ui-DSAwNk_d.js +0 -72
  95. package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
  96. package/dist/qwik/realtime-DhfcBrwF.js +0 -567
  97. package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
  98. package/dist/qwik/styles-DmEmq5Lh.js +0 -2
  99. package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
  100. package/dist/react/chunk--MHYZ-zp.js +0 -12
  101. package/dist/react/limits-CpprSem3.js +0 -175
  102. package/dist/react/pusher-3dki8s2l.js +0 -2505
  103. package/dist/react/realtime-DGqScuox.js +0 -567
  104. package/dist/solid/chunk-B2NCWFvW.js +0 -11
  105. package/dist/solid/comment-kit-ui-ACW8BpEm.js +0 -24898
  106. package/dist/solid/dom-DqDH-Gml.js +0 -104
  107. package/dist/solid/error-boundary-9mimpbZA.js +0 -21
  108. package/dist/solid/limits-B_69IbLl.js +0 -71
  109. package/dist/solid/mount-ui-Dq1wj_tx.js +0 -72
  110. package/dist/solid/pusher-_RVNpj1f.js +0 -2504
  111. package/dist/solid/realtime-DbUJK4gU.js +0 -567
  112. package/dist/solid/shadow-root-CssU3bQb.js +0 -93
  113. package/dist/solid/styles-DbueS9xx.js +0 -2
  114. package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
  115. package/dist/svelte/chunk-Pi70BKld.js +0 -11
  116. package/dist/svelte/comment-kit-ui-Cx4u1g77.js +0 -24898
  117. package/dist/svelte/dom-MyTrWzy_.js +0 -104
  118. package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
  119. package/dist/svelte/limits-CURF22v3.js +0 -71
  120. package/dist/svelte/mount-ui-CBoNGLNS.js +0 -72
  121. package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
  122. package/dist/svelte/realtime-M1CJbCBA.js +0 -567
  123. package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
  124. package/dist/svelte/styles-BK_MaUpD.js +0 -2
  125. package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
  126. package/dist/types/adapters/errors.d.ts +0 -3
  127. package/dist/types/core/auth.d.ts +0 -18
  128. package/dist/types/core/comments.d.ts +0 -43
  129. package/dist/types/core/dev-grab.d.ts +0 -14
  130. package/dist/types/core/keyboard.d.ts +0 -12
  131. package/dist/types/core/limits.d.ts +0 -52
  132. package/dist/types/core/offline-queue.d.ts +0 -23
  133. package/dist/types/core/realtime.d.ts +0 -9
  134. package/dist/types/core/screenshot.d.ts +0 -12
  135. package/dist/types/core/session.d.ts +0 -9
  136. package/dist/types/core/source-resolver.d.ts +0 -19
  137. package/dist/types/core/state.d.ts +0 -24
  138. package/dist/types/react/comment-kit-ui.d.ts +0 -9
  139. package/dist/types/react/comments/comment-flow.d.ts +0 -8
  140. package/dist/types/react/comments/outcomes.d.ts +0 -28
  141. package/dist/types/react/comments/pin-geometry.d.ts +0 -12
  142. package/dist/types/react/comments/view-model.d.ts +0 -66
  143. package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
  144. package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
  145. package/dist/types/react/components/comment-actions.d.ts +0 -19
  146. package/dist/types/react/components/comment-body.d.ts +0 -8
  147. package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
  148. package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
  149. package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
  150. package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
  151. package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
  152. package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
  153. package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
  154. package/dist/types/react/components/comment-composer-media.d.ts +0 -17
  155. package/dist/types/react/components/comment-composer.d.ts +0 -4
  156. package/dist/types/react/components/comment-composer.types.d.ts +0 -41
  157. package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
  158. package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
  159. package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
  160. package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
  161. package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
  162. package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
  163. package/dist/types/react/components/comment-error-banner.d.ts +0 -8
  164. package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
  165. package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
  166. package/dist/types/react/components/comment-fab.d.ts +0 -34
  167. package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
  168. package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
  169. package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
  170. package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
  171. package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
  172. package/dist/types/react/components/comment-header.d.ts +0 -34
  173. package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
  174. package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
  175. package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
  176. package/dist/types/react/components/comment-images.d.ts +0 -7
  177. package/dist/types/react/components/comment-item.d.ts +0 -26
  178. package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
  179. package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
  180. package/dist/types/react/components/comment-kit.d.ts +0 -12
  181. package/dist/types/react/components/comment-list-filters.d.ts +0 -14
  182. package/dist/types/react/components/comment-login-modal.d.ts +0 -20
  183. package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
  184. package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
  185. package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
  186. package/dist/types/react/components/comment-marker.d.ts +0 -15
  187. package/dist/types/react/components/comment-member-list.d.ts +0 -10
  188. package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
  189. package/dist/types/react/components/comment-online-users.d.ts +0 -8
  190. package/dist/types/react/components/comment-page-ref.d.ts +0 -9
  191. package/dist/types/react/components/comment-panel-header.d.ts +0 -22
  192. package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
  193. package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
  194. package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
  195. package/dist/types/react/components/comment-panel.d.ts +0 -37
  196. package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
  197. package/dist/types/react/components/comment-reactions.d.ts +0 -11
  198. package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
  199. package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
  200. package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
  201. package/dist/types/react/components/comment-search-bar.d.ts +0 -7
  202. package/dist/types/react/components/comment-settings-view.d.ts +0 -20
  203. package/dist/types/react/components/comment-skeletons.d.ts +0 -9
  204. package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
  205. package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
  206. package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
  207. package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
  208. package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
  209. package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
  210. package/dist/types/react/components/comment-thread-list.d.ts +0 -16
  211. package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
  212. package/dist/types/react/components/comment-users-context.d.ts +0 -15
  213. package/dist/types/react/components/comment-utils.d.ts +0 -20
  214. package/dist/types/react/components/comment.d.ts +0 -26
  215. package/dist/types/react/components/constants.d.ts +0 -50
  216. package/dist/types/react/components/dev-export-panel.d.ts +0 -10
  217. package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
  218. package/dist/types/react/components/element-selector.d.ts +0 -11
  219. package/dist/types/react/components/live-region.d.ts +0 -16
  220. package/dist/types/react/components/screenshot-capture.d.ts +0 -17
  221. package/dist/types/react/components/status-indicator.d.ts +0 -43
  222. package/dist/types/react/components/ui.d.ts +0 -44
  223. package/dist/types/react/components/use-comment-composer.d.ts +0 -28
  224. package/dist/types/react/error-boundary.d.ts +0 -25
  225. package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
  226. package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
  227. package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
  228. package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
  229. package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
  230. package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
  231. package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
  232. package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
  233. package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
  234. package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
  235. package/dist/types/react/hooks/use-drawing.d.ts +0 -32
  236. package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
  237. package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
  238. package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
  239. package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
  240. package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
  241. package/dist/types/react/hooks/use-websocket.d.ts +0 -9
  242. package/dist/types/react/is-local-host.d.ts +0 -2
  243. package/dist/types/react/mount-ui.d.ts +0 -19
  244. package/dist/types/react/shadow-root.d.ts +0 -23
  245. package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
  246. package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
  247. package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
  248. package/dist/types/react/ui/lib/cn.d.ts +0 -12
  249. package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
  250. package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
  251. package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
  252. package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
  253. package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
  254. package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
  255. package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
  256. package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
  257. package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
  258. package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
  259. package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
  260. package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
  261. package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
  262. package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
  263. package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
  264. package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
  265. package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
  266. package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
  267. package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
  268. package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
  269. package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
  270. package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
  271. package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
  272. package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
  273. package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
  274. package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
  275. package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
  276. package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
  277. package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
  278. package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
  279. package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
  280. package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
  281. package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
  282. package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
  283. package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
  284. package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
  285. package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
  286. package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
  287. package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
  288. package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
  289. package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
  290. package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
  291. package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
  292. package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
  293. package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
  294. package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
  295. package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
  296. package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
  297. package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
  298. package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
  299. package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
  300. package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
  301. package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
  302. package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
  303. package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
  304. package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
  305. package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
  306. package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
  307. package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
  308. package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
  309. package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
  310. package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
  311. package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
  312. package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
  313. package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
  314. package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
  315. package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
  316. package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
  317. package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
  318. package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
  319. package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
  320. package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
  321. package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
  322. package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
  323. package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
  324. package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
  325. package/dist/types/utils/freeze-animations.d.ts +0 -8
  326. package/dist/types/utils/text.d.ts +0 -9
  327. package/dist/types/utils/validation.d.ts +0 -10
  328. package/dist/vue/chunk-DHrubWSL.js +0 -11
  329. package/dist/vue/comment-kit-ui-C3zijClM.js +0 -24898
  330. package/dist/vue/dom-C7krZAR8.js +0 -104
  331. package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
  332. package/dist/vue/limits-B6csdQeI.js +0 -71
  333. package/dist/vue/mount-ui-18BnLwCO.js +0 -72
  334. package/dist/vue/pusher-cmjNbW6a.js +0 -2504
  335. package/dist/vue/realtime-B0B5cE-E.js +0 -567
  336. package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
  337. package/dist/vue/styles-B0NAkbKu.js +0 -2
  338. package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
  339. /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
@@ -0,0 +1,1093 @@
1
+ import { D as e, I as t, L as n, T as r, c as i, d as a, f as o, g as s, m as c, p as l, s as u, t as d, u as f } from "./button-By0hGrJK.js";
2
+ import { $t as p, Ct as m, Et as h, Nt as ee, Ot as g, Tt as _, Zt as v, en as y, i as b, o as x, r as S, t as C, x as w, xt as T } from "./separator-XDBsaWyw.js";
3
+ import { E as te, M as ne, S as re, h as ie, j as ae, n as oe, t as se, u as ce, y as le } from "./useValueChanged-CrzfD8l-.js";
4
+ import { i as ue } from "./ShadowRootContext-Bv-4aElu.js";
5
+ import { a as de, c as fe, d as pe, i as me, o as he, r as ge, s as E, t as D, u as _e } from "./button-group-Cl9CrvvU.js";
6
+ import { C as ve, D as O, E as k, F as A, I as j, L as M, M as N, N as ye, P, S as F, T as be, _ as I, a as xe, c as L, g as Se, j as Ce, k as R, l as z, o as B, v as we, w as Te, x as V } from "./comment-kit-ui-CzfdAZs2.js";
7
+ import { a as Ee, c as De, d as H, l as U, n as Oe, o as W, r as ke, s as Ae, t as G, u as K } from "./annotation-icons-Dh-bmNYK.js";
8
+ import * as q from "react";
9
+ import { jsx as J, jsxs as Y } from "react/jsx-runtime";
10
+ var je = () => () => {}, Me = () => !0, Ne = () => !1;
11
+ function Pe() {
12
+ return w(je, Me, Ne);
13
+ }
14
+ function Fe() {
15
+ let [e, t] = q.useState(!1);
16
+ return q.useEffect(() => {
17
+ t(!0);
18
+ }, []), e;
19
+ }
20
+ var Ie = l(18) ? Pe : Fe;
21
+ function Le() {
22
+ return !Ie();
23
+ }
24
+ function Re(e) {
25
+ let { script: t } = e, { nonce: n } = z();
26
+ return Le() ? /*#__PURE__*/ J("script", {
27
+ nonce: n,
28
+ dangerouslySetInnerHTML: { __html: t },
29
+ suppressHydrationWarning: !0
30
+ }) : null;
31
+ }
32
+ function X() {
33
+ let e = q.useRef(0), [t, n] = q.useState({
34
+ paths: [],
35
+ undone: [],
36
+ activePath: null,
37
+ tool: "pen",
38
+ color: R,
39
+ strokeWidth: 3
40
+ }), r = q.useCallback((e) => {
41
+ n((t) => ({
42
+ ...t,
43
+ tool: e
44
+ }));
45
+ }, []), i = q.useCallback((e) => {
46
+ n((t) => ({
47
+ ...t,
48
+ color: e
49
+ }));
50
+ }, []), a = q.useCallback((e) => {
51
+ n((t) => ({
52
+ ...t,
53
+ strokeWidth: e
54
+ }));
55
+ }, []), o = q.useCallback((t, r, i = 1) => {
56
+ let a = `path-${String(++e.current)}`;
57
+ n((e) => ({
58
+ ...e,
59
+ activePath: {
60
+ id: a,
61
+ tool: e.tool,
62
+ points: [{
63
+ x: t,
64
+ y: r
65
+ }],
66
+ color: e.color,
67
+ strokeWidth: e.strokeWidth * i
68
+ }
69
+ }));
70
+ }, []), s = q.useCallback((e, t) => {
71
+ n((n) => {
72
+ if (!n.activePath) return n;
73
+ if (n.activePath.tool === "pen") return {
74
+ ...n,
75
+ activePath: {
76
+ ...n.activePath,
77
+ points: [...n.activePath.points, {
78
+ x: e,
79
+ y: t
80
+ }]
81
+ }
82
+ };
83
+ let r = n.activePath.points[0] ?? {
84
+ x: 0,
85
+ y: 0
86
+ };
87
+ return {
88
+ ...n,
89
+ activePath: {
90
+ ...n.activePath,
91
+ points: [r, {
92
+ x: e,
93
+ y: t
94
+ }]
95
+ }
96
+ };
97
+ });
98
+ }, []), c = q.useCallback(() => {
99
+ n((e) => !e.activePath || e.activePath.points.length < 2 ? {
100
+ ...e,
101
+ activePath: null
102
+ } : {
103
+ ...e,
104
+ paths: [...e.paths, e.activePath],
105
+ undone: [],
106
+ activePath: null
107
+ });
108
+ }, []), l = q.useCallback(() => {
109
+ n((e) => ({
110
+ ...e,
111
+ activePath: null
112
+ }));
113
+ }, []), u = q.useCallback(() => {
114
+ n((e) => e.paths.length === 0 ? e : {
115
+ ...e,
116
+ paths: e.paths.slice(0, -1),
117
+ undone: [...e.undone, ...e.paths.slice(-1)]
118
+ });
119
+ }, []), d = q.useCallback(() => {
120
+ n((e) => e.undone.length === 0 ? e : {
121
+ ...e,
122
+ paths: [...e.paths, ...e.undone.slice(-1)],
123
+ undone: e.undone.slice(0, -1)
124
+ });
125
+ }, []), f = q.useCallback(() => {
126
+ n((e) => ({
127
+ ...e,
128
+ paths: [],
129
+ undone: [],
130
+ activePath: null
131
+ }));
132
+ }, []);
133
+ return {
134
+ ...t,
135
+ setTool: r,
136
+ setColor: i,
137
+ setStrokeWidth: a,
138
+ startPath: o,
139
+ addPoint: s,
140
+ endPath: c,
141
+ cancelPath: l,
142
+ undo: u,
143
+ redo: d,
144
+ clear: f,
145
+ canUndo: t.paths.length > 0,
146
+ canRedo: t.undone.length > 0
147
+ };
148
+ }
149
+ function ze(e) {
150
+ let t = e.composedPath?.()[0] ?? e.target;
151
+ return t instanceof Element ? [
152
+ "INPUT",
153
+ "TEXTAREA",
154
+ "SELECT"
155
+ ].includes(t.tagName) || t instanceof HTMLElement && t.isContentEditable : !1;
156
+ }
157
+ function Z(e, t, n) {
158
+ q.useEffect(() => {
159
+ let r = (r) => {
160
+ if (r.defaultPrevented || r.isComposing || ze(r)) return;
161
+ let i = r.key.toLowerCase();
162
+ (r.metaKey || r.ctrlKey) && !r.altKey && (i === "z" || i === "y") ? (r.preventDefault(), i === "y" || r.shiftKey ? t() : e()) : r.key === "Escape" && (r.preventDefault(), n());
163
+ };
164
+ return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
165
+ }, [
166
+ e,
167
+ t,
168
+ n
169
+ ]);
170
+ }
171
+ function Be(e, t) {
172
+ return e - t;
173
+ }
174
+ function Ve(e, t, n, r, i, a) {
175
+ let o = L(e, n, r);
176
+ if (!i) return o;
177
+ let s = a.slice();
178
+ return s[t] = L(o, a[t - 1] ?? -Infinity, a[t + 1] ?? Infinity), s.sort(Be);
179
+ }
180
+ function He(e, t, n) {
181
+ if (!Array.isArray(e)) return !0;
182
+ let r = t * n;
183
+ for (let t = 0; t < e.length - 1; t += 1) if (!(Math.abs(e[t] - e[t + 1]) >= r)) return !1;
184
+ return !0;
185
+ }
186
+ var Q = () => null, Ue = {
187
+ activeThumbIndex: Q,
188
+ max: Q,
189
+ min: Q,
190
+ minStepsBetweenValues: Q,
191
+ step: Q,
192
+ values: Q,
193
+ ...O
194
+ }, We = /*#__PURE__*/ q.createContext(void 0);
195
+ process.env.NODE_ENV !== "production" && (We.displayName = "SliderRootContext");
196
+ function Ge() {
197
+ let e = q.useContext(We);
198
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? t(62) : "Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.");
199
+ return e;
200
+ }
201
+ function Ke(e, t) {
202
+ return e === t || Array.isArray(e) && Array.isArray(t) && we(e, t);
203
+ }
204
+ var qe = /*#__PURE__*/ q.forwardRef(function(e, t) {
205
+ let { "aria-labelledby": r, className: i, defaultValue: a, disabled: s = !1, id: l, format: u, largeStep: d = 10, locale: h, render: ee, max: g = 100, min: _ = 0, minStepsBetweenValues: y = 0, form: b, name: x, onValueChange: S, onValueCommitted: C, orientation: w = "horizontal", step: T = 1, thumbCollisionBehavior: te = "push", thumbAlignment: ce = "center", value: ue, style: de, ...fe } = e, pe = oe(l), me = Se(pe), he = c(S), ge = c(C), { clearErrors: E } = ve(), { state: D, disabled: _e, name: O, setTouched: j, setDirty: M, validityData: N, validation: P } = k(), { labelId: be } = F(), [xe, Ce] = q.useState(), R = r ?? I(be, xe), z = _e || s, B = O ?? x, [V, Ee] = A({
206
+ controlled: ue,
207
+ default: a ?? _,
208
+ name: "Slider"
209
+ }), De = q.useRef(null), H = q.useRef(null), U = q.useRef([]), Oe = q.useRef(null), W = q.useRef(-1), ke = q.useRef(null), Ae = q.useRef(re), [G, K] = q.useState(-1), [Y, je] = q.useState(-1), [Me, Ne] = q.useState(!1), [Pe, Fe] = q.useState(() => /* @__PURE__ */ new Map()), [Ie, Le] = q.useState([void 0, void 0]), Re = c((e) => {
210
+ K(e), e !== -1 && je(e);
211
+ }), X = c((e) => {
212
+ e && (H.current = e);
213
+ }), ze = Array.isArray(V), Z = q.useMemo(() => ze ? V.map((e) => L(e, _, g)).sort(Be) : [L(V, _, g)], [
214
+ g,
215
+ _,
216
+ ze,
217
+ V
218
+ ]), Q = ze ? Z : Z[0];
219
+ Te(P.inputRef, pe, Q, void 0, !z, x), se(Q, () => {
220
+ E(B), P.change(Q);
221
+ let e = N.initialValue, t;
222
+ t = Array.isArray(Q) && Array.isArray(e) ? !we(Q, e) : Q !== e, M(t);
223
+ });
224
+ let Ge = c((e, t) => {
225
+ if (Number.isNaN(e) || Ke(e, V)) return !1;
226
+ let n = t.event, r = n.constructor, i = new r(n.type, n);
227
+ return Object.defineProperty(i, "target", {
228
+ writable: !0,
229
+ value: {
230
+ value: e,
231
+ name: B
232
+ }
233
+ }), t.event = i, he(e, t), !t.isCanceled && (Ae.current = t.reason, Ee(e), !0);
234
+ }), qe = c((e, t, n) => {
235
+ let r = Ve(e, t, _, g, ze, Z);
236
+ if (He(r, T, y)) {
237
+ let e = "key" in n ? le : ie, i = Ge(r, ae(e, n.nativeEvent, void 0, { activeThumbIndex: t }));
238
+ j(!0), i && ge(r, ne(e, n.nativeEvent));
239
+ }
240
+ });
241
+ process.env.NODE_ENV !== "production" && _ >= g && o("Slider `max` must be greater than `min`."), n(() => {
242
+ if (!z) return;
243
+ let e = v(m(De.current));
244
+ p(De.current, e) && e.blur(), G !== -1 && Re(-1);
245
+ }, [
246
+ G,
247
+ z,
248
+ Re
249
+ ]);
250
+ let $ = q.useMemo(() => ({
251
+ ...D,
252
+ activeThumbIndex: G,
253
+ disabled: z,
254
+ dragging: Me,
255
+ orientation: w,
256
+ max: g,
257
+ min: _,
258
+ minStepsBetweenValues: y,
259
+ step: T,
260
+ values: Z
261
+ }), [
262
+ D,
263
+ G,
264
+ z,
265
+ Me,
266
+ g,
267
+ _,
268
+ y,
269
+ w,
270
+ T,
271
+ Z
272
+ ]), Je = q.useMemo(() => ({
273
+ active: G,
274
+ controlRef: H,
275
+ disabled: z,
276
+ dragging: Me,
277
+ validation: P,
278
+ format: u,
279
+ handleInputChange: qe,
280
+ indicatorPosition: Ie,
281
+ inset: ce !== "center",
282
+ isArrayValue: ze,
283
+ labelId: R,
284
+ rootLabelId: me,
285
+ largeStep: d,
286
+ lastUsedThumbIndex: Y,
287
+ lastChangeReasonRef: Ae,
288
+ form: b,
289
+ locale: h,
290
+ max: g,
291
+ min: _,
292
+ minStepsBetweenValues: y,
293
+ name: B,
294
+ onValueCommitted: ge,
295
+ orientation: w,
296
+ pressedThumbCenterOffsetRef: Oe,
297
+ pressedThumbIndexRef: W,
298
+ pressedValuesRef: ke,
299
+ registerFieldControlRef: X,
300
+ renderBeforeHydration: ce === "edge",
301
+ setActive: Re,
302
+ setDragging: Ne,
303
+ setIndicatorPosition: Le,
304
+ setLabelId: Ce,
305
+ setValue: Ge,
306
+ state: $,
307
+ step: T,
308
+ thumbCollisionBehavior: te,
309
+ thumbMap: Pe,
310
+ thumbRefs: U,
311
+ values: Z
312
+ }), [
313
+ G,
314
+ R,
315
+ me,
316
+ z,
317
+ Me,
318
+ P,
319
+ u,
320
+ qe,
321
+ Ie,
322
+ d,
323
+ Y,
324
+ b,
325
+ h,
326
+ g,
327
+ _,
328
+ y,
329
+ B,
330
+ ge,
331
+ w,
332
+ ze,
333
+ X,
334
+ Re,
335
+ Ge,
336
+ $,
337
+ T,
338
+ te,
339
+ ce,
340
+ Pe,
341
+ Z
342
+ ]), Ye = f("div", e, {
343
+ state: $,
344
+ ref: [t, De],
345
+ props: [
346
+ {
347
+ "aria-labelledby": R,
348
+ id: pe,
349
+ role: "group"
350
+ },
351
+ fe,
352
+ (e) => P.getValidationProps(z, e)
353
+ ],
354
+ stateAttributesMapping: Ue
355
+ });
356
+ return /*#__PURE__*/ J(We.Provider, {
357
+ value: Je,
358
+ children: /*#__PURE__*/ J(ye, {
359
+ elementsRef: U,
360
+ onMapChange: Fe,
361
+ children: Ye
362
+ })
363
+ });
364
+ });
365
+ process.env.NODE_ENV !== "production" && (qe.displayName = "SliderRoot");
366
+ function $(e) {
367
+ return e === "touch" || e === "pen";
368
+ }
369
+ function Je(e, t) {
370
+ let n = e.getBoundingClientRect();
371
+ return t ? (n.top + n.bottom) / 2 : (n.left + n.right) / 2;
372
+ }
373
+ function Ye(e) {
374
+ if (e === 0) return 0;
375
+ if (Math.abs(e) < 1) {
376
+ let t = e.toExponential().split("e-"), n = t[0].split(".")[1];
377
+ return (n ? n.length : 0) + parseInt(t[1], 10);
378
+ }
379
+ let t = e.toString().split(".")[1];
380
+ return t ? t.length : 0;
381
+ }
382
+ function Xe(e, t, n) {
383
+ let r = Math.round((e - n) / t) * t + n;
384
+ return Number(r.toFixed(Math.max(Ye(t), Ye(n))));
385
+ }
386
+ function Ze(e, t, n, r, i, a, o, s) {
387
+ let c = e.slice(), l = a * o, u = c.length - 1, d = s ?? e, f = r + t * l, p = i - (u - t) * l;
388
+ c[t] = L(n, f, p);
389
+ for (let e = t + 1; e <= u; e += 1) {
390
+ let t = c[e - 1] + l, n = i - (u - e) * l, r = d[e], a = Math.max(c[e], t);
391
+ r < a && (a = Math.max(r, t)), c[e] = L(a, t, n);
392
+ }
393
+ for (let e = t - 1; e >= 0; --e) {
394
+ let t = c[e + 1] - l, n = r + e * l, i = d[e], a = Math.min(c[e], t);
395
+ i > a && (a = Math.min(i, t)), c[e] = L(a, n, t);
396
+ }
397
+ for (let e = 0; e <= u; e += 1) c[e] = Number(c[e].toFixed(12));
398
+ return c;
399
+ }
400
+ function Qe(e, t, n, r, i, a, o, s, c, l) {
401
+ let u = n ?? t, d = r ?? t;
402
+ if (!(u.length > 1)) return {
403
+ value: a,
404
+ thumbIndex: 0,
405
+ didSwap: !1
406
+ };
407
+ let f = c * l;
408
+ if (e === "push") return {
409
+ value: Ze(u, i, a, o, s, c, l),
410
+ thumbIndex: i,
411
+ didSwap: !1
412
+ };
413
+ let p = u.slice(), m = p[i - 1], h = p[i + 1], ee = m == null ? o : m + f, g = h == null ? s : h - f, _ = Number(L(a, ee, g).toFixed(12));
414
+ switch (p[i] = _, e) {
415
+ case "swap": {
416
+ let e = u[i], t = 1e-7, n = a > e, r = a < e, ee = n && h != null && a >= h - t, g = r && m != null && a <= m + t;
417
+ if (!ee && !g) return {
418
+ value: p,
419
+ thumbIndex: i,
420
+ didSwap: !1
421
+ };
422
+ let v = ee ? i + 1 : i - 1, y = p.map((e, t) => t === i ? _ : d[t] ?? u[t]), b = a;
423
+ b = ee ? Math.max(a, p[v]) : Math.min(a, p[v]);
424
+ let x = Ze(p, v, b, o, s, c, l, y), S = ee ? v - 1 : v + 1, C = x[S - 1], w = x[S + 1], T = C == null ? o : C + f;
425
+ T = Math.max(T, o + S * f);
426
+ let te = w == null ? s : w - f;
427
+ te = Math.min(te, s - (x.length - 1 - S) * f);
428
+ let ne = L(_, T, te);
429
+ return x[S] = Number(ne.toFixed(12)), {
430
+ value: x,
431
+ thumbIndex: v,
432
+ didSwap: !0
433
+ };
434
+ }
435
+ default: return {
436
+ value: p,
437
+ thumbIndex: i,
438
+ didSwap: !1
439
+ };
440
+ }
441
+ }
442
+ var $e = 2;
443
+ function et(e, t) {
444
+ if (!e) return {
445
+ start: 0,
446
+ end: 0
447
+ };
448
+ function n(e) {
449
+ let t = e == null ? 0 : parseFloat(e);
450
+ return Number.isNaN(t) ? 0 : t;
451
+ }
452
+ let r = t ? "Top" : "InlineStart", i = t ? "Bottom" : "InlineEnd";
453
+ return {
454
+ start: n(e[`border${r}Width`]) + n(e[`padding${r}`]),
455
+ end: n(e[`border${i}Width`]) + n(e[`padding${i}`])
456
+ };
457
+ }
458
+ function tt(e, t) {
459
+ if (t.current != null && e.changedTouches) {
460
+ let n = e;
461
+ for (let e = 0; e < n.changedTouches.length; e += 1) {
462
+ let r = n.changedTouches[e];
463
+ if (r.identifier === t.current) return {
464
+ x: r.clientX,
465
+ y: r.clientY
466
+ };
467
+ }
468
+ return null;
469
+ }
470
+ return {
471
+ x: e.clientX,
472
+ y: e.clientY
473
+ };
474
+ }
475
+ var nt = /*#__PURE__*/ q.forwardRef(function(t, n) {
476
+ let { render: i, className: a, style: o, ...s } = t, { disabled: l, dragging: u, inset: d, isArrayValue: ee, lastChangeReasonRef: b, max: x, min: S, minStepsBetweenValues: C, onValueCommitted: w, orientation: T, pressedThumbCenterOffsetRef: re, pressedThumbIndexRef: ie, pressedValuesRef: oe, registerFieldControlRef: se, renderBeforeHydration: le, setActive: de, setDragging: fe, setValue: pe, state: me, step: he, thumbCollisionBehavior: ge, thumbRefs: E, values: D } = Ge(), _e = ue(), ve = D.length > 1, O = T === "vertical", k = q.useRef(null), A = q.useRef(null), j = c((e) => {
477
+ e && A.current == null && (A.current = r(e).getComputedStyle(e));
478
+ }), M = q.useRef(null), N = q.useRef(0), ye = q.useRef(0), P = q.useRef(null), F = q.useRef(!1), be = h(D);
479
+ function I(e) {
480
+ return e?.querySelector("input[type=\"range\"]");
481
+ }
482
+ function xe(e) {
483
+ ie.current = e, E.current[e] || (re.current = null);
484
+ }
485
+ function Se() {
486
+ ie.current = -1, re.current = null;
487
+ }
488
+ function Ce(t) {
489
+ return e(t) ? E.current.some((n) => !e(n) || !p(n, t) ? !1 : I(n)?.disabled === !0) : !1;
490
+ }
491
+ function R(e) {
492
+ let t = k.current, n = ie.current;
493
+ if (!t || n < 0 || n >= D.length) return n >= D.length && (P.current = null), null;
494
+ let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = et(A.current, O), l = ye.current, u = (O ? i : r) - c.start - c.end - l * 2, d = re.current ?? 0, f = e.x - d, p = e.y - d, m = O ? a - p - c.end : (_e === "rtl" ? s - f : f - o) - c.start, h = L((m - l) / u, 0, 1), g = (x - S) * h + S;
495
+ return g = Xe(g, he, S), g = L(g, S, x), ve ? Qe(ge, D, be.current, oe.current, n, g, S, x, he, C) : {
496
+ value: ee ? [g] : g,
497
+ thumbIndex: n,
498
+ didSwap: !1
499
+ };
500
+ }
501
+ function z(t) {
502
+ oe.current = ve ? D.slice() : null, P.current = null, be.current = D;
503
+ let n = ie.current, r = n;
504
+ if (n > -1 && n < D.length) {
505
+ if (D[n] === x) {
506
+ let e = n;
507
+ for (; e > 0 && D[e - 1] === x;) --e;
508
+ r = e;
509
+ }
510
+ } else {
511
+ let n = O ? "y" : "x", i;
512
+ r = -1;
513
+ for (let a = 0; a < E.current.length; a += 1) {
514
+ let o = E.current[a];
515
+ if (e(o) && !I(o)?.disabled) {
516
+ let e = Je(o, O), s = Math.abs(t[n] - e);
517
+ (i === void 0 || s <= i) && (r = a, i = s);
518
+ }
519
+ }
520
+ }
521
+ if (r > -1 && r !== n && xe(r), d) {
522
+ let t = E.current[r];
523
+ if (e(t)) {
524
+ let e = t.getBoundingClientRect();
525
+ ye.current = e[O ? "height" : "width"] / 2;
526
+ }
527
+ }
528
+ }
529
+ function B(e) {
530
+ let t = I(E.current?.[e]);
531
+ t && t.focus({
532
+ preventScroll: !0,
533
+ focusVisible: !1
534
+ });
535
+ }
536
+ function we(e, t, n) {
537
+ let r = pe(e.value, ae(t, n, void 0, { activeThumbIndex: e.thumbIndex }));
538
+ return r && (P.current = e.value, be.current = Array.isArray(e.value) ? e.value : [e.value], e.didSwap && (xe(e.thumbIndex), B(e.thumbIndex))), r;
539
+ }
540
+ let Te = c((e) => {
541
+ let t = tt(e, M);
542
+ if (t == null) return;
543
+ if (N.current += 1, e.type === "pointermove" && e.buttons === 0) {
544
+ V(e);
545
+ return;
546
+ }
547
+ let n = R(t);
548
+ n != null && He(n.value, he, C) && (!u && N.current > $e && fe(!0), we(n, ce, e));
549
+ }), V = c((e) => {
550
+ if (tt(e, M) == null) return;
551
+ de(-1), fe(!1), re.current = null;
552
+ let t = P.current;
553
+ if (Array.isArray(t) && t.length !== D.length && (P.current = null), P.current != null) {
554
+ let t = b.current;
555
+ w(P.current, ne(t, e));
556
+ }
557
+ "pointerType" in e && k.current?.hasPointerCapture(e.pointerId) && k.current?.releasePointerCapture(e.pointerId), ie.current = -1, H();
558
+ }), Ee = c((e) => {
559
+ M.current ?? V(e);
560
+ }), De = c((e) => {
561
+ let t = F.current;
562
+ if (F.current = !1, l) return;
563
+ if (Ce(y(e))) {
564
+ Se();
565
+ return;
566
+ }
567
+ let n = e.changedTouches[0];
568
+ if (n == null) return;
569
+ if (M.current = n.identifier, !t) {
570
+ let t = {
571
+ x: n.clientX,
572
+ y: n.clientY
573
+ };
574
+ z(t);
575
+ let r = R(t);
576
+ if (r == null) return;
577
+ B(r.thumbIndex), we(r, te, e), N.current = 0;
578
+ }
579
+ let r = m(k.current);
580
+ r.addEventListener("touchmove", Te, { passive: !0 }), r.addEventListener("touchend", V, { passive: !0 }), r.addEventListener("touchcancel", V, { passive: !0 });
581
+ }), H = c(() => {
582
+ let e = m(k.current);
583
+ e.removeEventListener("pointermove", Te), e.removeEventListener("pointerup", V), e.removeEventListener("pointercancel", Ee), e.removeEventListener("touchmove", Te), e.removeEventListener("touchend", V), e.removeEventListener("touchcancel", V), M.current = null, oe.current = null, P.current = null, F.current = !1;
584
+ }), U = _();
585
+ return q.useEffect(() => {
586
+ let e = k.current;
587
+ if (!e) return () => H();
588
+ let t = g(e, "touchstart", De, { passive: !0 });
589
+ return () => {
590
+ t(), U.cancel(), H();
591
+ };
592
+ }, [
593
+ H,
594
+ De,
595
+ k,
596
+ U
597
+ ]), q.useEffect(() => {
598
+ l && H();
599
+ }, [l, H]), f("div", t, {
600
+ state: me,
601
+ ref: [
602
+ n,
603
+ se,
604
+ k,
605
+ j
606
+ ],
607
+ props: [{
608
+ "data-base-ui-slider-control": le ? "" : void 0,
609
+ onPointerDown(t) {
610
+ F.current = !1;
611
+ let n = k.current, r = y(t.nativeEvent);
612
+ if (!n || l || t.defaultPrevented || !e(r) || t.button !== 0) return;
613
+ if (Ce(r)) {
614
+ Se();
615
+ return;
616
+ }
617
+ let i = {
618
+ x: t.clientX,
619
+ y: t.clientY
620
+ };
621
+ z(i);
622
+ let a = R(i);
623
+ if (a == null) return;
624
+ p(E.current[a.thumbIndex], v(m(n))) ? t.preventDefault() : U.request(() => {
625
+ B(a.thumbIndex);
626
+ }), fe(!0), re.current ?? we(a, te, t.nativeEvent), t.nativeEvent.pointerId && n.setPointerCapture(t.nativeEvent.pointerId), N.current = 0, F.current = $(t.pointerType);
627
+ let o = m(n);
628
+ o.addEventListener("pointermove", Te, { passive: !0 }), o.addEventListener("pointerup", V, { once: !0 }), o.addEventListener("pointercancel", Ee, { once: !0 });
629
+ }
630
+ }, s],
631
+ stateAttributesMapping: Ue
632
+ });
633
+ });
634
+ process.env.NODE_ENV !== "production" && (nt.displayName = "SliderControl");
635
+ var rt = /*#__PURE__*/ q.forwardRef(function(e, t) {
636
+ let { render: n, className: r, style: i, ...a } = e, { state: o } = Ge();
637
+ return f("div", e, {
638
+ state: o,
639
+ ref: t,
640
+ props: [{ style: { position: "relative" } }, a],
641
+ stateAttributesMapping: Ue
642
+ });
643
+ });
644
+ process.env.NODE_ENV !== "production" && (rt.displayName = "SliderTrack");
645
+ var it = "data-index", at, ot = /* @__PURE__ */ new Set([
646
+ ...E,
647
+ pe,
648
+ _e
649
+ ]);
650
+ function st(e, t, n, r) {
651
+ if (!(t < 0)) return e.length === 2 ? `${B(e[t], r, n)} ${t === 0 ? "start" : "end"} range` : n ? B(e[t], r, n) : void 0;
652
+ }
653
+ function ct(e, t, n, r, i) {
654
+ let a = e + t * n, o = Number(a.toFixed(Math.max(Ye(e), Ye(t), Ye(r))));
655
+ return L(o, r, i);
656
+ }
657
+ var lt = /*#__PURE__*/ q.forwardRef(function(e, t) {
658
+ let { render: i, children: o, className: l, "aria-describedby": u, "aria-label": d, "aria-labelledby": m, "aria-valuetext": h, disabled: g = !1, getAriaLabel: _, getAriaValueText: v, id: y, index: b, inputRef: x, onBlur: S, onFocus: C, onKeyDown: w, tabIndex: te, style: ne, ...re } = e, ie = oe(y), { active: ae, lastUsedThumbIndex: se, controlRef: ce, disabled: le, validation: D, format: ve, handleInputChange: O, inset: A, isArrayValue: j, labelId: M, largeStep: N, locale: ye, max: F, min: I, minStepsBetweenValues: L, form: Se, name: Ce, orientation: R, pressedThumbCenterOffsetRef: z, pressedThumbIndexRef: we, renderBeforeHydration: Te, setActive: Ee, setIndicatorPosition: De, state: H, step: U, thumbRefs: Oe, values: W } = Ge(), ke = ue(), Ae = g || le, G = W.length > 1, K = R === "vertical", je = ke === "rtl", { setTouched: Me, validationMode: Ne } = k(), Pe = q.useRef(null), Fe = q.useRef(null), Ie = be(Ae, Fe), X = q.useRef(!1), ze = c((e) => {
659
+ X.current || C?.(e);
660
+ }), Z = c((e) => {
661
+ X.current || S?.(e);
662
+ }), Be = oe(), He = V(), Q = G ? Be : He, We = q.useMemo(() => ({ inputId: Q }), [Q]), { ref: Ke, index: qe } = P({ metadata: We }), $ = G ? b ?? qe : 0, Ye = $ === W.length - 1, Ze = W[$], Qe = xe(Ze, I, F), [$e, et] = q.useState(), tt = Le(), nt = se >= 0 && se < W.length ? se : -1, rt = c(() => {
663
+ let e = ce.current, t = Pe.current;
664
+ if (!e || !t) return;
665
+ let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = K ? "height" : "width", a = r[i] - n[i], o = (n[i] / 2 + a * Qe / 100) / r[i] * 100, s = Number.isFinite(o) ? o : void 0;
666
+ et(s), $ === 0 ? De((e) => [s, e[1]]) : Ye && De((e) => [e[0], s]);
667
+ });
668
+ n(() => {
669
+ A && queueMicrotask(rt);
670
+ }, [rt, A]), n(() => {
671
+ A && rt();
672
+ }, [
673
+ rt,
674
+ A,
675
+ Qe
676
+ ]), n(() => {
677
+ if (!A) return;
678
+ let e = ce.current, t = Pe.current;
679
+ if (!e || !t) return;
680
+ let n = r(e).ResizeObserver;
681
+ if (typeof n != "function") return;
682
+ let i = new n(rt);
683
+ return i.observe(e), i.observe(t), () => {
684
+ i.disconnect();
685
+ };
686
+ }, [
687
+ ce,
688
+ rt,
689
+ A
690
+ ]);
691
+ let lt = K ? "bottom" : "insetInlineStart", ut = K ? "left" : "top", dt;
692
+ G ? ae === $ ? dt = 2 : nt === $ && (dt = 1) : ae === $ && (dt = 1);
693
+ let ft;
694
+ ft = !A && !Number.isFinite(Qe) ? T : {
695
+ position: "absolute",
696
+ [lt]: A ? "var(--position)" : `${Qe}%`,
697
+ [ut]: "50%",
698
+ translate: `${(K || !je ? -1 : 1) * 50}% ${(K ? 1 : -1) * 50}%`,
699
+ zIndex: dt,
700
+ ...A && {
701
+ "--position": `${$e ?? 0}%`,
702
+ visibility: Te && tt || $e === void 0 ? "hidden" : void 0
703
+ }
704
+ };
705
+ let pt;
706
+ K && (pt = je ? "vertical-rl" : "vertical-lr");
707
+ let mt = typeof _ == "function" ? _($) : d, ht = a({
708
+ "aria-label": mt,
709
+ "aria-labelledby": m ?? (mt == null ? M : void 0),
710
+ "aria-describedby": u,
711
+ "aria-orientation": R,
712
+ "aria-valuenow": Ze,
713
+ "aria-valuetext": typeof v == "function" ? v(B(Ze, ye, ve), Ze, $) : h ?? st(W, $, ve, ye),
714
+ disabled: Ae,
715
+ form: Se,
716
+ id: Q,
717
+ max: F,
718
+ min: I,
719
+ name: Ce,
720
+ onChange(e) {
721
+ O(e.currentTarget.valueAsNumber, $, e);
722
+ },
723
+ onFocus(e) {
724
+ let t = X.current;
725
+ X.current = !1, Ee($), Ie(!0), t && e.stopPropagation();
726
+ },
727
+ onBlur(e) {
728
+ X.current ? e.stopPropagation() : (Ee(-1), !Oe.current.some((t) => p(t, e.relatedTarget)) && (Me(!0), Ie(!1), Ne === "onBlur" && D.commit(Ve(Ze, $, I, F, j, W))));
729
+ },
730
+ onKeyDown(e) {
731
+ if (e.defaultPrevented || !ot.has(e.key)) return;
732
+ E.has(e.key) && e.stopPropagation();
733
+ let t = null, n = 0, r = e.shiftKey ? N : U, i = Xe(Ze, U, I);
734
+ switch (e.key) {
735
+ case he:
736
+ n = 1;
737
+ break;
738
+ case de:
739
+ n = je ? -1 : 1;
740
+ break;
741
+ case ge:
742
+ n = -1;
743
+ break;
744
+ case me:
745
+ n = je ? 1 : -1;
746
+ break;
747
+ case pe:
748
+ r = N, n = 1;
749
+ break;
750
+ case _e:
751
+ r = N, n = -1;
752
+ break;
753
+ case "End":
754
+ t = G && Number.isFinite(W[$ + 1]) ? W[$ + 1] - U * L : F;
755
+ break;
756
+ case fe: t = G && Number.isFinite(W[$ - 1]) ? W[$ - 1] + U * L : I;
757
+ }
758
+ if (n !== 0 && (t = ct(i, r, n, I, F)), t !== null) {
759
+ let n = e.currentTarget;
760
+ ee(n) || (X.current = !0, n.blur(), n.focus({
761
+ preventScroll: !0,
762
+ focusVisible: !0
763
+ })), O(t, $, e), e.preventDefault();
764
+ }
765
+ },
766
+ step: U,
767
+ style: {
768
+ ...T,
769
+ width: "100%",
770
+ height: "100%",
771
+ writingMode: pt
772
+ },
773
+ tabIndex: te,
774
+ type: "range",
775
+ value: Ze ?? ""
776
+ }, (e) => D.getValidationProps(Ae, e), {
777
+ onFocus: ze,
778
+ onBlur: Z,
779
+ onKeyDown: w
780
+ }), gt = s(Fe, D.inputRef, x);
781
+ return f("div", e, {
782
+ state: H,
783
+ ref: [
784
+ t,
785
+ Ke,
786
+ Pe
787
+ ],
788
+ props: [{
789
+ [it]: $,
790
+ children: /*#__PURE__*/ Y(q.Fragment, { children: [
791
+ o,
792
+ /*#__PURE__*/ J("input", {
793
+ ref: gt,
794
+ ...ht,
795
+ suppressHydrationWarning: !0
796
+ }),
797
+ A && Ye && Te && (at ||= /*#__PURE__*/ J(Re, { script: "" }))
798
+ ] }),
799
+ id: ie,
800
+ onPointerDown(e) {
801
+ if (Ae) return;
802
+ we.current = $;
803
+ let t = Je(e.currentTarget, K);
804
+ z.current = (K ? e.clientY : e.clientX) - t;
805
+ },
806
+ style: ft,
807
+ suppressHydrationWarning: Te || void 0
808
+ }, re],
809
+ stateAttributesMapping: Ue
810
+ });
811
+ });
812
+ process.env.NODE_ENV !== "production" && (lt.displayName = "SliderThumb");
813
+ function ut(e, t, n, r, i, a) {
814
+ let o = {
815
+ visibility: a || n && (r === void 0 || t && i === void 0) ? "hidden" : void 0,
816
+ position: e ? "absolute" : "relative",
817
+ [e ? "width" : "height"]: "inherit"
818
+ }, s = `${r ?? 0}%`, c = `${(i ?? 0) - (r ?? 0)}%`;
819
+ return n && (o["--start-position"] = s, s = "var(--start-position)", t && (o["--relative-size"] = c, c = "var(--relative-size)")), o[e ? "bottom" : "insetInlineStart"] = t ? s : 0, o[e ? "height" : "width"] = t ? c : s, o;
820
+ }
821
+ var dt = /*#__PURE__*/ q.forwardRef(function(e, t) {
822
+ let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: s, max: c, min: l, orientation: u, renderBeforeHydration: d, state: p, values: m } = Ge(), h = Le(), ee = ut(u === "vertical", m.length > 1, s, s ? o[0] : xe(m[0], l, c), s ? o[1] : xe(m[m.length - 1], l, c), s && d && h);
823
+ return f("div", e, {
824
+ state: p,
825
+ ref: t,
826
+ props: [{
827
+ "data-base-ui-slider-indicator": d ? "" : void 0,
828
+ style: ee,
829
+ suppressHydrationWarning: d || void 0
830
+ }, a],
831
+ stateAttributesMapping: Ue
832
+ });
833
+ });
834
+ process.env.NODE_ENV !== "production" && (dt.displayName = "SliderIndicator");
835
+ var ft = q.forwardRef(function({ className: e, defaultValue: t, value: n, min: r = 0, max: a = 100, thumbAriaLabels: o, ...s }, c) {
836
+ let l = q.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r], [
837
+ n,
838
+ t,
839
+ r
840
+ ]);
841
+ return /* @__PURE__ */ J(qe, {
842
+ ref: c,
843
+ className: i("ck-slider", e),
844
+ "data-slot": "slider",
845
+ defaultValue: t,
846
+ value: n,
847
+ min: r,
848
+ max: a,
849
+ thumbAlignment: "edge",
850
+ ...s,
851
+ children: /* @__PURE__ */ Y(nt, {
852
+ className: "ck-slider-control",
853
+ children: [/* @__PURE__ */ J(rt, {
854
+ "data-slot": "slider-track",
855
+ className: "ck-slider-track",
856
+ children: /* @__PURE__ */ J(dt, {
857
+ "data-slot": "slider-range",
858
+ className: "ck-slider-range"
859
+ })
860
+ }), Array.from({ length: l.length }, (e, t) => /* @__PURE__ */ J(lt, {
861
+ "data-slot": "slider-thumb",
862
+ className: "ck-slider-thumb",
863
+ "aria-label": o?.[t] ?? (l.length > 1 ? `Value ${t + 1} of ${l.length}` : "Value")
864
+ }, t))]
865
+ })
866
+ });
867
+ });
868
+ ft.displayName = "Slider";
869
+ var pt = [
870
+ "pen",
871
+ "line",
872
+ "rect",
873
+ "circle",
874
+ "arrow"
875
+ ];
876
+ function mt(e) {
877
+ return e != null && pt.includes(e);
878
+ }
879
+ var ht = [
880
+ {
881
+ value: "pen",
882
+ label: "Pen",
883
+ icon: De
884
+ },
885
+ {
886
+ value: "line",
887
+ label: "Line",
888
+ icon: Ae
889
+ },
890
+ {
891
+ value: "rect",
892
+ label: "Rectangle",
893
+ icon: U
894
+ },
895
+ {
896
+ value: "circle",
897
+ label: "Circle",
898
+ icon: W
899
+ },
900
+ {
901
+ value: "arrow",
902
+ label: "Arrow",
903
+ icon: ke
904
+ }
905
+ ], gt = q.memo(function({ tools: e, colors: t, drawing: n, onSave: r, saveDisabled: i, onCancel: a }) {
906
+ let o = e ? ht.filter((t) => e.includes(t.value)) : ht;
907
+ function s(e) {
908
+ let t = e[0];
909
+ mt(t) && n.setTool(t);
910
+ }
911
+ function c(e) {
912
+ let t = e[0];
913
+ t && n.setColor(t);
914
+ }
915
+ return /* @__PURE__ */ Y("div", {
916
+ className: "ck-annotation-toolbar",
917
+ role: "toolbar",
918
+ "aria-label": "Annotation tools",
919
+ children: [
920
+ /* @__PURE__ */ J(Ce, {
921
+ value: [n.tool],
922
+ onValueChange: s,
923
+ size: "sm",
924
+ spacing: 1,
925
+ "aria-label": "Drawing tool",
926
+ children: o.map(({ value: e, label: t, icon: n }) => /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
927
+ render: /* @__PURE__ */ J(N, {
928
+ value: e,
929
+ "aria-label": t
930
+ }),
931
+ children: /* @__PURE__ */ J(n, {
932
+ size: 16,
933
+ stroke: 2
934
+ })
935
+ }), /* @__PURE__ */ J(b, { children: t })] }, e))
936
+ }),
937
+ /* @__PURE__ */ J(C, {
938
+ orientation: "vertical",
939
+ className: "ck-annotation-separator"
940
+ }),
941
+ /* @__PURE__ */ J(Ce, {
942
+ value: [n.color],
943
+ onValueChange: c,
944
+ size: "sm",
945
+ spacing: 1,
946
+ "aria-label": "Stroke color",
947
+ children: t.map((e) => /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
948
+ render: /* @__PURE__ */ J(N, {
949
+ value: e.value,
950
+ "aria-label": e.label
951
+ }),
952
+ children: /* @__PURE__ */ J("span", {
953
+ className: "ck-annotation-swatch",
954
+ style: { "--ck-bg": e.value }
955
+ })
956
+ }), /* @__PURE__ */ J(b, { children: e.label })] }, e.value))
957
+ }),
958
+ /* @__PURE__ */ J(C, {
959
+ orientation: "vertical",
960
+ className: "ck-annotation-separator"
961
+ }),
962
+ /* @__PURE__ */ Y("div", {
963
+ className: "ck-annotation-stroke",
964
+ children: [/* @__PURE__ */ J(ft, {
965
+ className: "ck-annotation-slider",
966
+ value: [n.strokeWidth],
967
+ onValueChange: (e) => {
968
+ let t = Array.isArray(e) ? e[0] : e;
969
+ t != null && Number.isFinite(t) && n.setStrokeWidth(t);
970
+ },
971
+ min: 1,
972
+ max: 12,
973
+ step: 1,
974
+ "aria-label": "Stroke width"
975
+ }), /* @__PURE__ */ Y("span", {
976
+ className: "ck-annotation-stroke-label",
977
+ children: [n.strokeWidth, "px"]
978
+ })]
979
+ }),
980
+ /* @__PURE__ */ J(C, {
981
+ orientation: "vertical",
982
+ className: "ck-annotation-separator"
983
+ }),
984
+ /* @__PURE__ */ Y(D, { children: [
985
+ /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
986
+ render: /* @__PURE__ */ J(d, {
987
+ variant: "outline",
988
+ size: "icon-sm",
989
+ "aria-label": "Undo",
990
+ onClick: () => n.undo(),
991
+ disabled: !n.canUndo
992
+ }),
993
+ children: /* @__PURE__ */ J(G, {
994
+ size: 16,
995
+ stroke: 2
996
+ })
997
+ }), /* @__PURE__ */ J(b, { children: /* @__PURE__ */ Y("span", {
998
+ className: "ck-annotation-tooltip",
999
+ children: [
1000
+ "Undo",
1001
+ " ",
1002
+ /* @__PURE__ */ Y(M, { children: [/* @__PURE__ */ J(j, { children: "⌘" }), /* @__PURE__ */ J(j, { children: "Z" })] })
1003
+ ]
1004
+ }) })] }),
1005
+ /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
1006
+ render: /* @__PURE__ */ J(d, {
1007
+ variant: "outline",
1008
+ size: "icon-sm",
1009
+ "aria-label": "Redo",
1010
+ onClick: () => n.redo(),
1011
+ disabled: !n.canRedo
1012
+ }),
1013
+ children: /* @__PURE__ */ J(Oe, {
1014
+ size: 16,
1015
+ stroke: 2
1016
+ })
1017
+ }), /* @__PURE__ */ J(b, { children: /* @__PURE__ */ Y("span", {
1018
+ className: "ck-annotation-tooltip",
1019
+ children: [
1020
+ "Redo",
1021
+ " ",
1022
+ /* @__PURE__ */ Y(M, { children: [
1023
+ /* @__PURE__ */ J(j, { children: "⌘" }),
1024
+ /* @__PURE__ */ J(j, { children: "⇧" }),
1025
+ /* @__PURE__ */ J(j, { children: "Z" })
1026
+ ] })
1027
+ ]
1028
+ }) })] }),
1029
+ /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
1030
+ render: /* @__PURE__ */ J(d, {
1031
+ variant: "outline",
1032
+ size: "icon-sm",
1033
+ "aria-label": "Clear all",
1034
+ onClick: () => n.clear(),
1035
+ disabled: n.paths.length === 0
1036
+ }),
1037
+ children: /* @__PURE__ */ J(K, {
1038
+ size: 16,
1039
+ stroke: 2
1040
+ })
1041
+ }), /* @__PURE__ */ J(b, { children: "Clear all" })] })
1042
+ ] }),
1043
+ /* @__PURE__ */ J(C, {
1044
+ orientation: "vertical",
1045
+ className: "ck-annotation-separator"
1046
+ }),
1047
+ r ? /* @__PURE__ */ Y(D, { children: [/* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
1048
+ render: /* @__PURE__ */ J(d, {
1049
+ variant: "outline",
1050
+ size: "icon-sm",
1051
+ "aria-label": "Cancel",
1052
+ onClick: a
1053
+ }),
1054
+ children: /* @__PURE__ */ J(H, {
1055
+ size: 16,
1056
+ stroke: 2
1057
+ })
1058
+ }), /* @__PURE__ */ J(b, { children: /* @__PURE__ */ Y("span", {
1059
+ className: "ck-annotation-tooltip",
1060
+ children: ["Cancel ", /* @__PURE__ */ J(j, { children: "Esc" })]
1061
+ }) })] }), /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
1062
+ render: /* @__PURE__ */ J(d, {
1063
+ size: "icon-sm",
1064
+ "aria-label": "Save drawing",
1065
+ "aria-disabled": i || void 0,
1066
+ className: u(i && "ck-annotation-save--disabled"),
1067
+ onClick: () => {
1068
+ i || r();
1069
+ }
1070
+ }),
1071
+ children: /* @__PURE__ */ J(Ee, {
1072
+ size: 16,
1073
+ stroke: 2
1074
+ })
1075
+ }), /* @__PURE__ */ J(b, { children: i ? "Draw something first" : "Save drawing" })] })] }) : /* @__PURE__ */ Y(S, { children: [/* @__PURE__ */ J(x, {
1076
+ render: /* @__PURE__ */ J(d, {
1077
+ variant: "outline",
1078
+ size: "icon-sm",
1079
+ "aria-label": "Cancel",
1080
+ onClick: a
1081
+ }),
1082
+ children: /* @__PURE__ */ J(H, {
1083
+ size: 16,
1084
+ stroke: 2
1085
+ })
1086
+ }), /* @__PURE__ */ J(b, { children: /* @__PURE__ */ Y("span", {
1087
+ className: "ck-annotation-tooltip",
1088
+ children: ["Cancel ", /* @__PURE__ */ J(j, { children: "Esc" })]
1089
+ }) })] })
1090
+ ]
1091
+ });
1092
+ });
1093
+ export { Z as n, X as r, gt as t };