@commentkit/comment-kit 0.6.7 → 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.
- package/CHANGELOG.md +43 -0
- package/README.md +73 -45
- package/dist/angular.es.js +47 -3411
- package/dist/comment-kit.es.js +13 -3184
- package/dist/demo.es.js +395 -0
- package/dist/headless.es.js +4 -0
- package/dist/preact.es.js +79 -3443
- package/dist/qwik.es.js +79 -3443
- package/dist/react.es.js +80 -28447
- package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
- package/dist/shared/annotation-toolbar-pX17NLmJ.js +1104 -0
- package/dist/shared/bridge-DRE03N9X.js +174 -0
- package/dist/shared/button-By0hGrJK.js +505 -0
- package/dist/shared/button-group-CHfMRXyA.js +93 -0
- package/dist/shared/clamp-CcFVX0vC.js +55 -0
- package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +126 -0
- package/dist/shared/comment-image-lightbox-0VdAs2iT.js +178 -0
- package/dist/shared/comment-kit-core-D0kY00St.js +3083 -0
- package/dist/shared/comment-kit-ui-D2j2gvnm.js +16685 -0
- package/dist/shared/comment-screenshot-annotator-BuojwviY.js +137 -0
- package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +144 -0
- package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
- package/dist/shared/dev-export-panel-BLngcr5q.js +208 -0
- package/dist/shared/dev-grab-pDAfH2lr.js +203 -0
- package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
- package/dist/shared/element-selector-CtFzgHvq.js +852 -0
- package/dist/shared/errors-Bu5ajEmB.js +22 -0
- package/dist/shared/icons-BSHCWYO1.js +267 -0
- package/dist/shared/local-demo-context-BohlYbHt.js +6 -0
- package/dist/shared/mount-ui-CVivB_eQ.js +193 -0
- package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-BEl7Qn-8.js} +93 -127
- package/dist/{core/realtime-C3_O7gi2.js → shared/realtime-BG_t_ze7.js} +75 -72
- package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +669 -0
- package/dist/shared/separator-DusFNTs-.js +3915 -0
- package/dist/shared/shadow-root-CmYXiSRR.js +135 -0
- package/dist/shared/styles-D_FEJZ9G.js +2 -0
- package/dist/shared/useLabelableId-DGbfdMi_.js +155 -0
- package/dist/shared/useValueChanged-DQXLia-2.js +92 -0
- package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
- package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-BTRqNTB7.js} +90 -148
- package/dist/solid.es.js +63 -3427
- package/dist/svelte.es.js +78 -3442
- package/dist/types/adapters/bridge.d.ts +1 -1
- package/dist/types/angular/index.d.ts +2 -2
- package/dist/types/core/comment-kit-core.d.ts +10 -1
- package/dist/types/core/local-demo.d.ts +59 -0
- package/dist/types/demo.d.ts +17 -0
- package/dist/types/headless.d.ts +8 -0
- package/dist/types/index.d.ts +14 -16
- package/dist/vue.es.js +80 -3443
- package/package.json +55 -37
- package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
- package/dist/angular/comment-kit-ui-ClsgTVKj.js +0 -24898
- package/dist/angular/dom-Cx1nMbdI.js +0 -104
- package/dist/angular/mount-ui-EPLnH0YJ.js +0 -72
- package/dist/angular/realtime-VrKV0lPI.js +0 -567
- package/dist/angular/shadow-root-yMOaW9pk.js +0 -93
- package/dist/angular/styles-CMz7-p8x.js +0 -2
- package/dist/angular/widget-theme-CYPYAwhR.js +0 -24
- package/dist/comment-kit.css +0 -2
- package/dist/core/chunk-t7YoJN_i.js +0 -11
- package/dist/core/comment-kit-ui-BTYGcSK-.js +0 -24898
- package/dist/core/error-boundary-CN_BGsYl.js +0 -21
- package/dist/core/mount-ui-B6jipL2Z.js +0 -72
- package/dist/core/pusher-CizoY5NA.js +0 -2504
- package/dist/core/shadow-root-DAtdjHG2.js +0 -93
- package/dist/core/styles-ClRoB6ro.js +0 -2
- package/dist/core/widget-theme-BWDYr7VR.js +0 -24
- package/dist/preact/chunk-CZ0PdaaN.js +0 -11
- package/dist/preact/comment-kit-ui-nhY36fa4.js +0 -24898
- package/dist/preact/dom-_ULpq7rg.js +0 -104
- package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
- package/dist/preact/limits-C3ZEKcL_.js +0 -71
- package/dist/preact/mount-ui-Dri-RQe3.js +0 -72
- package/dist/preact/pusher-BP4kCufH.js +0 -2504
- package/dist/preact/realtime-COin_nJF.js +0 -567
- package/dist/preact/shadow-root-D-NcwruG.js +0 -93
- package/dist/preact/styles-D6i7be5-.js +0 -2
- package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
- package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
- package/dist/qwik/comment-kit-ui-B2oSKreb.js +0 -24898
- package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
- package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
- package/dist/qwik/limits-DK35yjGY.js +0 -71
- package/dist/qwik/mount-ui-DkvDtcft.js +0 -72
- package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
- package/dist/qwik/realtime-DhfcBrwF.js +0 -567
- package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
- package/dist/qwik/styles-DmEmq5Lh.js +0 -2
- package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
- package/dist/react/chunk--MHYZ-zp.js +0 -12
- package/dist/react/limits-CpprSem3.js +0 -175
- package/dist/react/pusher-3dki8s2l.js +0 -2505
- package/dist/react/realtime-DGqScuox.js +0 -567
- package/dist/solid/chunk-B2NCWFvW.js +0 -11
- package/dist/solid/comment-kit-ui-B7GeN0T8.js +0 -24898
- package/dist/solid/dom-DqDH-Gml.js +0 -104
- package/dist/solid/error-boundary-9mimpbZA.js +0 -21
- package/dist/solid/limits-B_69IbLl.js +0 -71
- package/dist/solid/mount-ui-CTFITRP7.js +0 -72
- package/dist/solid/pusher-_RVNpj1f.js +0 -2504
- package/dist/solid/realtime-DbUJK4gU.js +0 -567
- package/dist/solid/shadow-root-CssU3bQb.js +0 -93
- package/dist/solid/styles-DbueS9xx.js +0 -2
- package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
- package/dist/svelte/chunk-Pi70BKld.js +0 -11
- package/dist/svelte/comment-kit-ui-CKmdu0gr.js +0 -24898
- package/dist/svelte/dom-MyTrWzy_.js +0 -104
- package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
- package/dist/svelte/limits-CURF22v3.js +0 -71
- package/dist/svelte/mount-ui-N1vul-tl.js +0 -72
- package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
- package/dist/svelte/realtime-M1CJbCBA.js +0 -567
- package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
- package/dist/svelte/styles-BK_MaUpD.js +0 -2
- package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
- package/dist/types/adapters/errors.d.ts +0 -3
- package/dist/types/core/auth.d.ts +0 -18
- package/dist/types/core/comments.d.ts +0 -43
- package/dist/types/core/dev-grab.d.ts +0 -14
- package/dist/types/core/keyboard.d.ts +0 -12
- package/dist/types/core/limits.d.ts +0 -52
- package/dist/types/core/offline-queue.d.ts +0 -23
- package/dist/types/core/realtime.d.ts +0 -9
- package/dist/types/core/screenshot.d.ts +0 -12
- package/dist/types/core/session.d.ts +0 -9
- package/dist/types/core/source-resolver.d.ts +0 -19
- package/dist/types/core/state.d.ts +0 -24
- package/dist/types/react/comment-kit-ui.d.ts +0 -9
- package/dist/types/react/comments/comment-flow.d.ts +0 -8
- package/dist/types/react/comments/outcomes.d.ts +0 -28
- package/dist/types/react/comments/pin-geometry.d.ts +0 -12
- package/dist/types/react/comments/view-model.d.ts +0 -66
- package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
- package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
- package/dist/types/react/components/comment-actions.d.ts +0 -19
- package/dist/types/react/components/comment-body.d.ts +0 -8
- package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
- package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
- package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
- package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
- package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
- package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
- package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
- package/dist/types/react/components/comment-composer-media.d.ts +0 -17
- package/dist/types/react/components/comment-composer.d.ts +0 -4
- package/dist/types/react/components/comment-composer.types.d.ts +0 -41
- package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
- package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
- package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
- package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
- package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
- package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
- package/dist/types/react/components/comment-error-banner.d.ts +0 -8
- package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
- package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
- package/dist/types/react/components/comment-fab.d.ts +0 -34
- package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
- package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
- package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
- package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
- package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
- package/dist/types/react/components/comment-header.d.ts +0 -34
- package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
- package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
- package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
- package/dist/types/react/components/comment-images.d.ts +0 -7
- package/dist/types/react/components/comment-item.d.ts +0 -26
- package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
- package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
- package/dist/types/react/components/comment-kit.d.ts +0 -12
- package/dist/types/react/components/comment-list-filters.d.ts +0 -14
- package/dist/types/react/components/comment-login-modal.d.ts +0 -20
- package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
- package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
- package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
- package/dist/types/react/components/comment-marker.d.ts +0 -15
- package/dist/types/react/components/comment-member-list.d.ts +0 -10
- package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
- package/dist/types/react/components/comment-online-users.d.ts +0 -8
- package/dist/types/react/components/comment-page-ref.d.ts +0 -9
- package/dist/types/react/components/comment-panel-header.d.ts +0 -22
- package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
- package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
- package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
- package/dist/types/react/components/comment-panel.d.ts +0 -37
- package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
- package/dist/types/react/components/comment-reactions.d.ts +0 -11
- package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
- package/dist/types/react/components/comment-search-bar.d.ts +0 -7
- package/dist/types/react/components/comment-settings-view.d.ts +0 -20
- package/dist/types/react/components/comment-skeletons.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
- package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
- package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
- package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
- package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
- package/dist/types/react/components/comment-thread-list.d.ts +0 -16
- package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
- package/dist/types/react/components/comment-users-context.d.ts +0 -15
- package/dist/types/react/components/comment-utils.d.ts +0 -20
- package/dist/types/react/components/comment.d.ts +0 -26
- package/dist/types/react/components/constants.d.ts +0 -50
- package/dist/types/react/components/dev-export-panel.d.ts +0 -10
- package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
- package/dist/types/react/components/element-selector.d.ts +0 -11
- package/dist/types/react/components/live-region.d.ts +0 -16
- package/dist/types/react/components/screenshot-capture.d.ts +0 -17
- package/dist/types/react/components/status-indicator.d.ts +0 -43
- package/dist/types/react/components/ui.d.ts +0 -44
- package/dist/types/react/components/use-comment-composer.d.ts +0 -28
- package/dist/types/react/error-boundary.d.ts +0 -25
- package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
- package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
- package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
- package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
- package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
- package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
- package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
- package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
- package/dist/types/react/hooks/use-drawing.d.ts +0 -32
- package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
- package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
- package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
- package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
- package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
- package/dist/types/react/hooks/use-websocket.d.ts +0 -9
- package/dist/types/react/is-local-host.d.ts +0 -2
- package/dist/types/react/mount-ui.d.ts +0 -19
- package/dist/types/react/shadow-root.d.ts +0 -23
- package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
- package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
- package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
- package/dist/types/react/ui/lib/cn.d.ts +0 -12
- package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
- package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
- package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
- package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
- package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
- package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
- package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
- package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
- package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
- package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
- package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
- package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
- package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
- package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
- package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
- package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
- package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
- package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
- package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
- package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
- package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
- package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
- package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
- package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
- package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
- package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
- package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
- package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
- package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
- package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
- package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
- package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
- package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
- package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
- package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
- package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
- package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
- package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
- package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
- package/dist/types/utils/freeze-animations.d.ts +0 -8
- package/dist/types/utils/text.d.ts +0 -9
- package/dist/types/utils/validation.d.ts +0 -10
- package/dist/vue/chunk-DHrubWSL.js +0 -11
- package/dist/vue/comment-kit-ui-MfED5JLH.js +0 -24898
- package/dist/vue/dom-C7krZAR8.js +0 -104
- package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
- package/dist/vue/limits-B6csdQeI.js +0 -71
- package/dist/vue/mount-ui-C85XBX4V.js +0 -72
- package/dist/vue/pusher-cmjNbW6a.js +0 -2504
- package/dist/vue/realtime-B0B5cE-E.js +0 -567
- package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
- package/dist/vue/styles-B0NAkbKu.js +0 -2
- package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
- /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as s } from "./
|
|
3
|
-
|
|
1
|
+
import { t as e } from "./websocket-manager-BTRqNTB7.js";
|
|
2
|
+
import { a as t, c as n, i as r, o as i, s as a } from "./validation-C7QG8j7Z.js";
|
|
3
|
+
import { i as o } from "./comment-kit-core-D0kY00St.js";
|
|
4
|
+
import { o as s } from "./dom-Bhf4WFtY.js";
|
|
5
|
+
var c = o.ID, l = o.CONTENT, u = o.NAME, d = o.EMAIL, f = o.PAGE, p = o.EMOJI, m = o.ONLINE_USERS, h = o.REACTION_COUNT, g = 33, _ = 1e3, v = o.CURSOR_EMITS_PER_SEC;
|
|
4
6
|
function y(e) {
|
|
5
|
-
let t = e.config.realtime,
|
|
7
|
+
let t = e.config.realtime, n = t?.maxRenderedCursors;
|
|
6
8
|
return {
|
|
7
9
|
cursors: t?.cursors !== !1,
|
|
8
10
|
presence: t?.presence !== !1,
|
|
9
|
-
maxRenderedCursors: typeof
|
|
11
|
+
maxRenderedCursors: typeof n == "number" && Number.isFinite(n) && n >= 0 ? Math.min(Math.floor(n), m) : o.RENDERED_CURSORS
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
|
-
var b = new Set([
|
|
14
|
+
var b = /* @__PURE__ */ new Set([
|
|
13
15
|
"pin",
|
|
14
16
|
"highlight",
|
|
15
17
|
"drawing"
|
|
16
|
-
]), x = new Set([
|
|
18
|
+
]), x = /* @__PURE__ */ new Set([
|
|
17
19
|
"open",
|
|
18
20
|
"resolved",
|
|
19
21
|
"complete"
|
|
20
|
-
]), S = new Set([
|
|
22
|
+
]), S = /* @__PURE__ */ new Set([
|
|
21
23
|
"low",
|
|
22
24
|
"medium",
|
|
23
25
|
"high",
|
|
24
26
|
"urgent"
|
|
25
|
-
]), C = new Set([
|
|
27
|
+
]), C = /* @__PURE__ */ new Set([
|
|
26
28
|
"path",
|
|
27
29
|
"line",
|
|
28
30
|
"rectangle",
|
|
29
31
|
"circle",
|
|
30
32
|
"text"
|
|
31
33
|
]);
|
|
32
|
-
function w(e,
|
|
33
|
-
return
|
|
34
|
+
function w(e, t) {
|
|
35
|
+
return a(e, t);
|
|
34
36
|
}
|
|
35
37
|
function T(e) {
|
|
36
38
|
return w(e, c);
|
|
@@ -40,8 +42,8 @@ function E(e) {
|
|
|
40
42
|
let t = e.trim(), n = t.indexOf("@");
|
|
41
43
|
return n > 0 && n === t.lastIndexOf("@") && n < t.length - 1 && !/\s/.test(t);
|
|
42
44
|
}
|
|
43
|
-
function D(
|
|
44
|
-
return e
|
|
45
|
+
function D(e) {
|
|
46
|
+
return i(e) && T(e.id) && w(e.name, u) && E(e.email) && n(e.avatar, f) && n(e.organizationId, c);
|
|
45
47
|
}
|
|
46
48
|
function O(e) {
|
|
47
49
|
return {
|
|
@@ -63,14 +65,14 @@ function k(e) {
|
|
|
63
65
|
}
|
|
64
66
|
return t;
|
|
65
67
|
}
|
|
66
|
-
function A(
|
|
67
|
-
return e
|
|
68
|
+
function A(e) {
|
|
69
|
+
return i(e) ? t(e.x) && t(e.y) : !1;
|
|
68
70
|
}
|
|
69
|
-
function j(
|
|
70
|
-
return e
|
|
71
|
+
function j(e) {
|
|
72
|
+
return i(e) && w(e.url, f) && w(e.path, f) && w(e.title, f);
|
|
71
73
|
}
|
|
72
|
-
function M(
|
|
73
|
-
return e
|
|
74
|
+
function M(e) {
|
|
75
|
+
return i(e) && R(e.emoji) && Number.isInteger(e.count) && e.count >= 0 && e.count <= h && typeof e.reacted == "boolean";
|
|
74
76
|
}
|
|
75
77
|
function N(e) {
|
|
76
78
|
return {
|
|
@@ -79,22 +81,22 @@ function N(e) {
|
|
|
79
81
|
...e.reactions === void 0 ? {} : { reactions: (e.reactions ?? []).filter(M) }
|
|
80
82
|
};
|
|
81
83
|
}
|
|
82
|
-
function P(
|
|
83
|
-
return !e
|
|
84
|
+
function P(e) {
|
|
85
|
+
return !i(e) || !T(e.id) || !b.has(e.type) || !w(e.content, l) || !A(e.position) || !x.has(e.status) || !S.has(e.priority) || !D(e.author) || !T(e.userId) || !w(e.createdAt, f) || !w(e.updatedAt, f) || !j(e.page) || !Array.isArray(e.replies) || !Array.isArray(e.attachments) ? null : N(structuredClone(e));
|
|
84
86
|
}
|
|
85
|
-
function F(
|
|
86
|
-
return !e
|
|
87
|
+
function F(e) {
|
|
88
|
+
return !i(e) || !T(e.id) || !w(e.content, l) || !D(e.author) || !w(e.createdAt, f) ? null : structuredClone(e);
|
|
87
89
|
}
|
|
88
|
-
function I(
|
|
89
|
-
return !e
|
|
90
|
-
x:
|
|
91
|
-
y:
|
|
92
|
-
page:
|
|
93
|
-
user: O(
|
|
90
|
+
function I(e) {
|
|
91
|
+
return !i(e) || !D(e.user) || !r(e.x) || e.x < 0 || e.x > 100 || !r(e.y) || e.y < 0 || e.y > 100 || !w(e.page, f) ? null : {
|
|
92
|
+
x: e.x,
|
|
93
|
+
y: e.y,
|
|
94
|
+
page: e.page.trim(),
|
|
95
|
+
user: O(e.user)
|
|
94
96
|
};
|
|
95
97
|
}
|
|
96
|
-
function L(
|
|
97
|
-
return e
|
|
98
|
+
function L(e) {
|
|
99
|
+
return i(e) ? w(e.type, o.DRAWING_TYPE) && C.has(e.type) && w(e.stroke, o.COLOR) && r(e.strokeWidth) && e.strokeWidth >= 0 && w(e.fill, o.COLOR) && n(e.d, o.DRAWING_PATH_DATA) && n(e.text, o.DRAWING_TEXT) && (e.x === void 0 || r(e.x)) && (e.y === void 0 || r(e.y)) && (e.width === void 0 || r(e.width)) && (e.height === void 0 || r(e.height)) : !1;
|
|
98
100
|
}
|
|
99
101
|
function R(e) {
|
|
100
102
|
return w(e, p);
|
|
@@ -120,9 +122,9 @@ function H(t, n) {
|
|
|
120
122
|
} catch {}
|
|
121
123
|
n.wsManager = null;
|
|
122
124
|
}
|
|
123
|
-
let r = t.config.baseUrl || "https://api.commentkit.dev/api",
|
|
125
|
+
let r = t.config.baseUrl || "https://api.commentkit.dev/api", a = t.getState().currentUser, o = y(t);
|
|
124
126
|
try {
|
|
125
|
-
n.wsManager = new
|
|
127
|
+
n.wsManager = new e({
|
|
126
128
|
key: t.config.reverb.key,
|
|
127
129
|
wsHost: t.config.reverb.host,
|
|
128
130
|
wsPort: t.config.reverb.port ?? 443,
|
|
@@ -131,11 +133,11 @@ function H(t, n) {
|
|
|
131
133
|
projectId: t.config.projectId || "",
|
|
132
134
|
apiKey: t.config.apiKey,
|
|
133
135
|
authEndpoint: `${r}/broadcasting/auth`,
|
|
134
|
-
userEmail:
|
|
135
|
-
userInfo:
|
|
136
|
-
id:
|
|
137
|
-
name:
|
|
138
|
-
email:
|
|
136
|
+
userEmail: a?.email,
|
|
137
|
+
userInfo: a ? {
|
|
138
|
+
id: a.id,
|
|
139
|
+
name: a.name,
|
|
140
|
+
email: a.email
|
|
139
141
|
} : void 0
|
|
140
142
|
});
|
|
141
143
|
} catch (e) {
|
|
@@ -167,20 +169,20 @@ function H(t, n) {
|
|
|
167
169
|
if (!B(n, l)) return;
|
|
168
170
|
let r = P(e);
|
|
169
171
|
r && (V(t, r), t.emit("comment:updated", r));
|
|
170
|
-
})), c.push(l.on("comment:deleted", (
|
|
171
|
-
if (!B(n, l) || !e
|
|
172
|
-
let
|
|
172
|
+
})), c.push(l.on("comment:deleted", (e) => {
|
|
173
|
+
if (!B(n, l) || !i(e) || !T(e.id)) return;
|
|
174
|
+
let r = e.id.trim();
|
|
173
175
|
t.setState({
|
|
174
|
-
comments: t.getState().comments.filter((e) => e.id !==
|
|
175
|
-
selectedComment: t.getState().selectedComment?.id ===
|
|
176
|
-
}), t.emit("comment:deleted", { id:
|
|
177
|
-
})), c.push(l.on("reply:added", (
|
|
178
|
-
if (!B(n, l) || !e
|
|
179
|
-
let
|
|
180
|
-
if (!
|
|
181
|
-
let a =
|
|
176
|
+
comments: t.getState().comments.filter((e) => e.id !== r),
|
|
177
|
+
selectedComment: t.getState().selectedComment?.id === r ? null : t.getState().selectedComment
|
|
178
|
+
}), t.emit("comment:deleted", { id: r });
|
|
179
|
+
})), c.push(l.on("reply:added", (e) => {
|
|
180
|
+
if (!B(n, l) || !i(e) || !T(e.commentId)) return;
|
|
181
|
+
let r = F(e.reply);
|
|
182
|
+
if (!r) return;
|
|
183
|
+
let a = e.commentId.trim(), o = t.getState().comments.map((e) => e.id !== a || e.replies.some((e) => e.id === r.id) ? e : {
|
|
182
184
|
...e,
|
|
183
|
-
replies: [...e.replies,
|
|
185
|
+
replies: [...e.replies, r]
|
|
184
186
|
});
|
|
185
187
|
t.setState({ comments: o });
|
|
186
188
|
let s = o.find((e) => e.id === a);
|
|
@@ -207,18 +209,18 @@ function H(t, n) {
|
|
|
207
209
|
}, d = (e, t, n) => (e ?? []).filter((e) => R(e.emoji) && Number.isInteger(e.count) && e.count > 0 && e.count <= h).map((e) => e.emoji === t ? {
|
|
208
210
|
...e,
|
|
209
211
|
count: n ? e.count : e.count - 1,
|
|
210
|
-
reacted: n
|
|
211
|
-
} : e).filter((e) => e.count > 0), f = (
|
|
212
|
-
if (!B(n, l) || !e
|
|
213
|
-
let a =
|
|
212
|
+
reacted: !n && e.reacted
|
|
213
|
+
} : e).filter((e) => e.count > 0), f = (e, r) => {
|
|
214
|
+
if (!B(n, l) || !i(e) || !T(e.commentId) || !R(e.emoji) || !T(e.userId)) return;
|
|
215
|
+
let a = e.commentId.trim(), o = T(e.replyId) ? e.replyId.trim() : null, s = e.emoji.trim(), c = e.userId.trim() === t.getState().currentUser?.id;
|
|
214
216
|
t.setState({ comments: t.getState().comments.map((e) => e.id === a ? o === null ? {
|
|
215
217
|
...e,
|
|
216
|
-
reactions:
|
|
218
|
+
reactions: r(e.reactions, s, c)
|
|
217
219
|
} : {
|
|
218
220
|
...e,
|
|
219
221
|
replies: e.replies.map((e) => e.id === o ? {
|
|
220
222
|
...e,
|
|
221
|
-
reactions:
|
|
223
|
+
reactions: r(e.reactions, s, c)
|
|
222
224
|
} : e)
|
|
223
225
|
} : e) });
|
|
224
226
|
};
|
|
@@ -236,22 +238,22 @@ function H(t, n) {
|
|
|
236
238
|
else return;
|
|
237
239
|
}
|
|
238
240
|
s !== void 0 && i - s < g || (i - m >= _ && (m = i, b = 0), !(b >= v) && (b++, p.set(a, i), t.emit("cursor:move", r)));
|
|
239
|
-
})), c.push(l.on("cursor:leave", (
|
|
240
|
-
|
|
241
|
+
})), c.push(l.on("cursor:leave", (e) => {
|
|
242
|
+
B(n, l) && i(e) && T(e.userId) && (p.delete(e.userId.trim()), t.emit("cursor:leave", { userId: e.userId.trim() }));
|
|
241
243
|
})), c.push(l.on("user:joined", (e) => {
|
|
242
|
-
|
|
243
|
-
})), c.push(l.on("user:left", (
|
|
244
|
-
|
|
245
|
-
})), c.push(l.on("presence:update", (
|
|
246
|
-
if (!B(n, l) || !o.presence || !e
|
|
247
|
-
let
|
|
248
|
-
if (!
|
|
249
|
-
let a = { users:
|
|
250
|
-
t.setState({ onlineUsers:
|
|
251
|
-
})), c.push(l.on("drawing:stroke", (
|
|
252
|
-
|
|
253
|
-
userId:
|
|
254
|
-
path: structuredClone(
|
|
244
|
+
B(n, l) && D(e) && t.emit("user:joined", O(e));
|
|
245
|
+
})), c.push(l.on("user:left", (e) => {
|
|
246
|
+
B(n, l) && i(e) && T(e.userId) && t.emit("user:left", { userId: e.userId.trim() });
|
|
247
|
+
})), c.push(l.on("presence:update", (e) => {
|
|
248
|
+
if (!B(n, l) || !o.presence || !i(e)) return;
|
|
249
|
+
let r = k(e.users);
|
|
250
|
+
if (!r) return;
|
|
251
|
+
let a = { users: r };
|
|
252
|
+
t.setState({ onlineUsers: r }), t.emit("presence:update", a);
|
|
253
|
+
})), c.push(l.on("drawing:stroke", (e) => {
|
|
254
|
+
B(n, l) && i(e) && T(e.userId) && L(e.path) && t.emit("drawing:stroke", {
|
|
255
|
+
userId: e.userId.trim(),
|
|
256
|
+
path: structuredClone(e.path)
|
|
255
257
|
});
|
|
256
258
|
}));
|
|
257
259
|
try {
|
|
@@ -264,7 +266,8 @@ function H(t, n) {
|
|
|
264
266
|
t.setState({ connectionStatus: "error" }), t.handleError(e);
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
|
-
|
|
269
|
+
/* v8 ignore next -- SSR guard unreachable in jsdom */
|
|
270
|
+
typeof document < "u" && typeof window < "u" && o.cursors && (n.mouseMoveHandler = (e) => {
|
|
268
271
|
if (t.getState().isOverlayVisible && n.wsManager?.isConnected()) {
|
|
269
272
|
if (window.innerWidth <= 0 || window.innerHeight <= 0) return;
|
|
270
273
|
let t = Math.max(0, Math.min(100, e.clientX / window.innerWidth * 100)), r = Math.max(0, Math.min(100, e.clientY / window.innerHeight * 100));
|