@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.
- package/CHANGELOG.md +71 -2
- package/LICENSE +18 -2
- package/README.md +198 -125
- package/SECURITY.md +48 -0
- package/dist/THIRD_PARTY_NOTICES.txt +284 -0
- package/dist/angular.es.js +68 -3419
- package/dist/comment-kit.es.js +33 -3192
- package/dist/demo.es.js +472 -0
- package/dist/headless.es.js +4 -0
- package/dist/preact.es.js +79 -3443
- package/dist/qwik.es.js +1 -3474
- package/dist/qwik.qwik.mjs +114 -0
- package/dist/react.es.js +80 -28447
- package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
- package/dist/shared/annotation-icons-Dh-bmNYK.js +172 -0
- package/dist/shared/annotation-toolbar-B9SxYqoF.js +1093 -0
- package/dist/shared/bridge-CJoGYngu.js +177 -0
- package/dist/shared/button-By0hGrJK.js +505 -0
- package/dist/shared/button-group-Cl9CrvvU.js +93 -0
- package/dist/shared/comment-drawing-canvas-Dzb5YoFw.js +124 -0
- package/dist/shared/comment-image-lightbox-BPYJT1sB.js +183 -0
- package/dist/shared/comment-kit-core-BaSuMzp9.js +3381 -0
- package/dist/shared/comment-kit-ui-CzfdAZs2.js +20181 -0
- package/dist/shared/comment-screenshot-annotator-C7X-_bm6.js +151 -0
- package/dist/shared/comment-screenshot-overlay-wIrZrcRy.js +206 -0
- package/dist/shared/comment-utils-BycYTSxA.js +602 -0
- package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
- package/dist/shared/dev-export-panel-FwFVdady.js +208 -0
- package/dist/shared/dev-grab-DDqg0LQf.js +203 -0
- package/dist/shared/dist-De294MVF.js +623 -0
- package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
- package/dist/shared/element-selector-BhJm-NSs.js +858 -0
- package/dist/shared/errors-Bu5ajEmB.js +22 -0
- package/dist/shared/icons-nzMOLzrm.js +266 -0
- package/dist/shared/mount-ui--ijs8pWT.js +193 -0
- package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-ipHMJnO_.js} +93 -127
- package/dist/shared/realtime-Dk41VwKg.js +302 -0
- package/dist/shared/separator-XDBsaWyw.js +4021 -0
- package/dist/shared/shadow-root-C5v-T8lQ.js +135 -0
- package/dist/shared/styles-D3yMtaec.js +2 -0
- package/dist/shared/useValueChanged-CrzfD8l-.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-DhLWh3Jr.js} +90 -148
- package/dist/solid.es.js +63 -3427
- package/dist/svelte.es.js +78 -3442
- package/dist/types/adapters/bridge.d.ts +10 -13
- package/dist/types/angular/index.d.ts +17 -7
- package/dist/types/core/api-client.d.ts +16 -17
- package/dist/types/core/comment-kit-core.d.ts +29 -12
- package/dist/types/core/local-demo.d.ts +60 -0
- package/dist/types/core/types.d.ts +68 -0
- package/dist/types/demo.d.ts +17 -0
- package/dist/types/headless.d.ts +8 -0
- package/dist/types/index.d.ts +22 -20
- package/dist/types/qwik/index.d.ts +4 -1
- package/dist/vue.es.js +80 -3443
- package/docs/api-reference.md +372 -0
- package/docs/local-demo.md +60 -0
- package/package.json +69 -41
- package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
- package/dist/angular/comment-kit-ui-D-LUFD6n.js +0 -24898
- package/dist/angular/dom-Cx1nMbdI.js +0 -104
- package/dist/angular/mount-ui-C9PJ5aK_.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-Ct4E18do.js +0 -24898
- package/dist/core/error-boundary-CN_BGsYl.js +0 -21
- package/dist/core/mount-ui-Bfnuuesk.js +0 -72
- package/dist/core/pusher-CizoY5NA.js +0 -2504
- package/dist/core/realtime-C3_O7gi2.js +0 -278
- 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-DEzn7J_P.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-Dx8en--W.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-Dvwee2tw.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-DSAwNk_d.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-ACW8BpEm.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-Dq1wj_tx.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-Cx4u1g77.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-CBoNGLNS.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-C3zijClM.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-18BnLwCO.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
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./annotation-toolbar-B9SxYqoF.js";
|
|
2
|
+
import { A as r, i, m as a, p as o, r as s } from "./comment-kit-ui-CzfdAZs2.js";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
function d(e) {
|
|
6
|
+
return new Promise((t, n) => {
|
|
7
|
+
let r = new Image(), i = setTimeout(() => n(/* @__PURE__ */ Error("Screenshot loading timed out. Try capturing it again.")), 15e3);
|
|
8
|
+
r.onload = () => {
|
|
9
|
+
clearTimeout(i), t(r);
|
|
10
|
+
}, r.onerror = () => {
|
|
11
|
+
clearTimeout(i), n(/* @__PURE__ */ Error("Could not load screenshot. Try capturing it again."));
|
|
12
|
+
}, r.src = e;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function f({ imageUrl: f, availableUsers: p = [], onSave: m, onCancel: h }) {
|
|
16
|
+
let g = t(), _ = c.useRef(null), v = c.useRef(null), y = c.useRef(0), [b, x] = c.useState(null), [S, C] = c.useState(() => ({
|
|
17
|
+
w: window.innerWidth,
|
|
18
|
+
h: window.innerHeight
|
|
19
|
+
}));
|
|
20
|
+
c.useEffect(() => {
|
|
21
|
+
let e = () => C({
|
|
22
|
+
w: window.innerWidth,
|
|
23
|
+
h: window.innerHeight
|
|
24
|
+
});
|
|
25
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
26
|
+
}, []), c.useEffect(() => () => {
|
|
27
|
+
y.current += 1;
|
|
28
|
+
}, []);
|
|
29
|
+
let w = c.useCallback(() => {
|
|
30
|
+
y.current += 1, h();
|
|
31
|
+
}, [h]), T = S.w < 1024, E = Math.max(160, Math.min(S.w - (T ? 32 : 428), 800)), D = Math.max(160, T ? Math.min(S.h * .42, 520) : S.h - 160), O = b?.w ?? E, k = b?.h ?? D;
|
|
32
|
+
if (T) O = E, b && b.w > 0 && (k = E * b.h / b.w);
|
|
33
|
+
else {
|
|
34
|
+
let e = Math.min(E / O, D / k, 1);
|
|
35
|
+
O *= e, k *= e;
|
|
36
|
+
}
|
|
37
|
+
let A = b?.w ?? O, j = b?.h ?? k, M = g.paths.flatMap((e) => {
|
|
38
|
+
let t = i(e);
|
|
39
|
+
return t ? [t] : [];
|
|
40
|
+
}), N = g.activePath ? i(g.activePath) : null, P = (e) => {
|
|
41
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
42
|
+
return !t.width || !t.height ? null : {
|
|
43
|
+
x: (e.clientX - t.left) * A / t.width,
|
|
44
|
+
y: (e.clientY - t.top) * j / t.height
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
return e(g.undo, g.redo, w), /* @__PURE__ */ u("div", {
|
|
48
|
+
"data-commentkit-ui": "",
|
|
49
|
+
"data-slot": "comment-screenshot-annotator",
|
|
50
|
+
className: "ck-screenshot-annotator",
|
|
51
|
+
children: [/* @__PURE__ */ l("div", {
|
|
52
|
+
className: "ck-screenshot-annotator-layout",
|
|
53
|
+
children: /* @__PURE__ */ u("div", {
|
|
54
|
+
className: "ck-screenshot-annotator-stage",
|
|
55
|
+
children: [/* @__PURE__ */ u("div", {
|
|
56
|
+
className: "ck-screenshot-annotator-media",
|
|
57
|
+
children: [/* @__PURE__ */ l("div", {
|
|
58
|
+
className: "ck-screenshot-annotator-toolbar",
|
|
59
|
+
children: /* @__PURE__ */ l(n, {
|
|
60
|
+
colors: r,
|
|
61
|
+
drawing: g,
|
|
62
|
+
onCancel: w
|
|
63
|
+
})
|
|
64
|
+
}), /* @__PURE__ */ u("div", {
|
|
65
|
+
className: "ck-screenshot-annotator-canvas",
|
|
66
|
+
style: {
|
|
67
|
+
"--ck-w": `${O}px`,
|
|
68
|
+
"--ck-h": `${k}px`,
|
|
69
|
+
"--ck-frame": `${D}px`
|
|
70
|
+
},
|
|
71
|
+
children: [/* @__PURE__ */ l("img", {
|
|
72
|
+
src: f,
|
|
73
|
+
alt: "Screenshot",
|
|
74
|
+
className: "ck-screenshot-annotator-image",
|
|
75
|
+
draggable: !1,
|
|
76
|
+
onLoad: (e) => {
|
|
77
|
+
let t = e.currentTarget;
|
|
78
|
+
t.naturalWidth && t.naturalHeight && x({
|
|
79
|
+
w: t.naturalWidth,
|
|
80
|
+
h: t.naturalHeight
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}), /* @__PURE__ */ u("svg", {
|
|
84
|
+
ref: _,
|
|
85
|
+
role: "application",
|
|
86
|
+
"aria-label": "Annotation canvas",
|
|
87
|
+
className: "ck-screenshot-annotator-strokes",
|
|
88
|
+
width: O,
|
|
89
|
+
height: k,
|
|
90
|
+
viewBox: `0 0 ${A} ${j}`,
|
|
91
|
+
onPointerDown: (e) => {
|
|
92
|
+
if (e.button !== 0 || v.current !== null) return;
|
|
93
|
+
let t = P(e);
|
|
94
|
+
if (t) {
|
|
95
|
+
v.current = e.pointerId;
|
|
96
|
+
try {
|
|
97
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
98
|
+
} catch {}
|
|
99
|
+
g.startPath(t.x, t.y, A / O);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
onPointerMove: (e) => {
|
|
103
|
+
if (v.current !== e.pointerId) return;
|
|
104
|
+
let t = P(e);
|
|
105
|
+
t && g.addPoint(t.x, t.y);
|
|
106
|
+
},
|
|
107
|
+
onPointerUp: (e) => {
|
|
108
|
+
v.current === e.pointerId && (v.current = null, e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), g.endPath());
|
|
109
|
+
},
|
|
110
|
+
onPointerCancel: (e) => {
|
|
111
|
+
v.current === e.pointerId && (v.current = null, g.cancelPath());
|
|
112
|
+
},
|
|
113
|
+
children: [M.map((e, t) => /* @__PURE__ */ l(s, { path: e }, `${e.type}-${t}`)), N ? /* @__PURE__ */ l(s, { path: N }) : null]
|
|
114
|
+
})]
|
|
115
|
+
})]
|
|
116
|
+
}), /* @__PURE__ */ l("div", {
|
|
117
|
+
className: "ck-screenshot-annotator-composer",
|
|
118
|
+
children: /* @__PURE__ */ l(a, {
|
|
119
|
+
mode: "new-thread",
|
|
120
|
+
placeholder: "Describe what you see...",
|
|
121
|
+
availableUsers: p,
|
|
122
|
+
onSubmit: async (e, t) => {
|
|
123
|
+
let n = y.current, r = _.current;
|
|
124
|
+
if (!r || g.paths.length === 0) {
|
|
125
|
+
await m(f, e, t);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let i = await d(f), a = document.createElement("canvas");
|
|
129
|
+
a.width = i.naturalWidth, a.height = i.naturalHeight;
|
|
130
|
+
let o = a.getContext("2d");
|
|
131
|
+
if (!o) throw Error("Screenshot annotation is unavailable in this browser.");
|
|
132
|
+
o.drawImage(i, 0, 0);
|
|
133
|
+
let s = r.cloneNode(!0);
|
|
134
|
+
s.setAttribute("xmlns", "http://www.w3.org/2000/svg"), s.setAttribute("width", String(a.width)), s.setAttribute("height", String(a.height));
|
|
135
|
+
let c = new XMLSerializer().serializeToString(s), l = URL.createObjectURL(new Blob([c], { type: "image/svg+xml;charset=utf-8" }));
|
|
136
|
+
try {
|
|
137
|
+
let r = await d(l);
|
|
138
|
+
if (n !== y.current) return;
|
|
139
|
+
o.drawImage(r, 0, 0, a.width, a.height), await m(a.toDataURL("image/png"), e, t);
|
|
140
|
+
} finally {
|
|
141
|
+
URL.revokeObjectURL(l);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
onCancel: w
|
|
145
|
+
})
|
|
146
|
+
})]
|
|
147
|
+
})
|
|
148
|
+
}), /* @__PURE__ */ l(o, { mode: "draw" })]
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
export { f as CommentScreenshotAnnotator };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { t as e } from "./button-By0hGrJK.js";
|
|
2
|
+
import { O as t, h as n, p as r } from "./comment-kit-ui-CzfdAZs2.js";
|
|
3
|
+
import { d as i, i as a } from "./annotation-icons-Dh-bmNYK.js";
|
|
4
|
+
import * as o from "react";
|
|
5
|
+
import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
6
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
var m = ".ck-annotation-toolbar{background-color:var(--background);width:100%;max-width:100%;box-shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a, 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:2rem;flex-wrap:wrap;justify-content:center;align-items:center;gap:.375rem .5rem;margin-inline:auto;padding:.375rem;display:flex}@media (width>=1024px){.ck-annotation-toolbar{width:fit-content}}.ck-annotation-separator.ck-separator[data-orientation=vertical]{height:1rem;display:none}@media (width>=1024px){.ck-annotation-separator.ck-separator[data-orientation=vertical]{display:block}}.ck-annotation-stroke{align-items:center;gap:.5rem;width:7rem;padding-inline:.25rem;display:flex}@media (width>=1024px){.ck-annotation-stroke{width:12rem}}.ck-annotation-slider{flex:auto;min-width:0}.ck-annotation-stroke-label{color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:.75rem;line-height:1rem}.ck-annotation-swatch{background-color:var(--ck-bg);width:.875rem;height:.875rem;box-shadow:0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:999px}.ck-annotation-tooltip{align-items:center;gap:.375rem;display:inline-flex}.ck-annotation-save--disabled{opacity:.5}.ck-screenshot-overlay{z-index:var(--z-ck-overlay);cursor:none;pointer-events:auto;touch-action:none;outline:none;position:fixed;inset:0}.ck-screenshot-selection{pointer-events:none;inset-inline-start:var(--ck-x);top:var(--ck-y);width:var(--ck-w);height:var(--ck-h);box-shadow:0 0 0 2px var(--primary);background:color-mix(in oklch, var(--primary) 10%, transparent);position:fixed}.ck-screenshot-overlay-bar{inset-inline-start:50%;z-index:10;background:var(--background);max-width:calc(100vw - 1.5rem);color:var(--foreground);box-shadow:var(--shadow-lg), 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);cursor:auto;border-radius:2rem;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;display:flex;position:fixed;top:1rem;transform:translate(-50%)}.ck-screenshot-overlay-bar>svg{flex-shrink:0;width:1rem;height:1rem}.ck-screenshot-overlay-bar>button{margin-inline-start:.25rem}.ck-screenshot-overlay-error{border-radius:var(--radius-md);background:var(--background);width:max-content;max-width:calc(100vw - 1.5rem);color:var(--destructive);margin:.75rem auto;padding:.75rem;font-size:.875rem;position:absolute;top:5rem;left:50%;transform:translate(-50%)}.ck-screenshot-overlay-bar>span,.ck-screenshot-overlay-bar>svg{color:var(--muted-foreground)}@media (width<=767px){.ck-screenshot-overlay-bar{width:max-content}}.ck-screenshot-annotator{z-index:var(--z-ck-overlay);pointer-events:auto;background:#0000004d;position:fixed;inset:0;overflow-y:auto}@supports ((-webkit-backdrop-filter:blur(4px)) or (backdrop-filter:blur(4px))){.ck-screenshot-annotator{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.ck-screenshot-annotator-layout{justify-content:center;align-items:flex-start;width:100%;min-height:100%;padding:.75rem;display:flex}.ck-screenshot-annotator-stage{flex-direction:column;align-items:stretch;gap:.75rem;width:100%;max-width:100%;display:flex}.ck-screenshot-annotator-media{flex-direction:column;align-items:center;gap:.75rem;width:100%;min-width:0;display:flex}.ck-screenshot-annotator-toolbar{width:100%;min-width:0}.ck-screenshot-annotator-canvas{width:100%;max-width:100%;max-height:var(--ck-frame);box-shadow:var(--shadow-xl), 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);position:relative;overflow:auto}.ck-screenshot-annotator-image{width:var(--ck-w);height:var(--ck-h);-webkit-user-select:none;user-select:none;max-width:none;display:block}.ck-screenshot-annotator-strokes{cursor:none;touch-action:none;position:absolute;inset:0}.ck-screenshot-annotator-composer{flex-direction:column;width:100%;min-width:0;display:flex}@media (width>=1024px){.ck-screenshot-annotator-layout{align-items:center;padding:1rem}.ck-screenshot-annotator-stage{flex-direction:row;align-items:flex-start;gap:1.5rem;width:auto}.ck-screenshot-annotator-media{width:auto}.ck-screenshot-annotator-canvas{width:var(--ck-w);height:var(--ck-h);max-height:none;overflow:hidden}.ck-screenshot-annotator-composer{flex-shrink:0;width:380px}}", h = 15e3, g = 32e6;
|
|
8
|
+
async function _(e, t, n) {
|
|
9
|
+
let r = e.dimensions.width / n.width, i = e.dimensions.height / n.height, a = new Image(), o = new Promise((e, t) => {
|
|
10
|
+
a.onload = () => e(), a.onerror = () => t(/* @__PURE__ */ Error("Could not load captured screenshot"));
|
|
11
|
+
});
|
|
12
|
+
a.src = e.dataUrl, await o;
|
|
13
|
+
let s = document.createElement("canvas");
|
|
14
|
+
if (s.width = Math.max(1, Math.round(t.width * r)), s.height = Math.max(1, Math.round(t.height * i)), s.width > 16384 || s.height > 16384 || s.width * s.height > g) throw Error("Selected area is too large to capture");
|
|
15
|
+
let c = s.getContext("2d");
|
|
16
|
+
if (!c) throw Error("Screenshot cropping is unavailable in this browser");
|
|
17
|
+
return c.drawImage(a, (t.x + n.scrollX) * r, (t.y + n.scrollY) * i, s.width, s.height, 0, 0, s.width, s.height), s.toDataURL("image/png");
|
|
18
|
+
}
|
|
19
|
+
function v(e) {
|
|
20
|
+
try {
|
|
21
|
+
return e.matches?.("[data-commentkit],[data-commentkit-host],[data-commentkit-ui],[data-commentkit-panel],input[type=\"password\"],[data-commentkit-redact],[data-html2canvas-ignore]") ?? !1;
|
|
22
|
+
} catch {
|
|
23
|
+
return !1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function y(e) {
|
|
27
|
+
let [t, n] = u(null), [r, i] = u(!1), [a, o] = u(null), d = l(0), f = l(!1), p = l(void 0);
|
|
28
|
+
return c(() => () => {
|
|
29
|
+
d.current += 1, clearTimeout(p.current);
|
|
30
|
+
}, []), {
|
|
31
|
+
imageUrl: t,
|
|
32
|
+
capturing: r,
|
|
33
|
+
error: a,
|
|
34
|
+
capture: s(async (t) => {
|
|
35
|
+
if (f.current) return;
|
|
36
|
+
f.current = !0;
|
|
37
|
+
let r = ++d.current;
|
|
38
|
+
i(!0), o(null);
|
|
39
|
+
try {
|
|
40
|
+
let i = await Promise.race([(async () => {
|
|
41
|
+
let n = {
|
|
42
|
+
width: Math.max(document.documentElement.scrollWidth, document.body?.scrollWidth ?? 0, window.innerWidth),
|
|
43
|
+
height: Math.max(document.documentElement.scrollHeight, document.body?.scrollHeight ?? 0, window.innerHeight),
|
|
44
|
+
scrollX: window.scrollX,
|
|
45
|
+
scrollY: window.scrollY
|
|
46
|
+
};
|
|
47
|
+
if (e) {
|
|
48
|
+
let r = await e();
|
|
49
|
+
if (!r) throw Error("Screenshot provider could not capture this page");
|
|
50
|
+
return t ? _(r, t, n) : r.dataUrl;
|
|
51
|
+
}
|
|
52
|
+
let i;
|
|
53
|
+
try {
|
|
54
|
+
i = (await import("html2canvas")).default;
|
|
55
|
+
} catch {
|
|
56
|
+
throw Error("Screenshot requires either a custom screenshotProvider in config or html2canvas installed. Install html2canvas: npm install html2canvas — or provide config.screenshotProvider.");
|
|
57
|
+
}
|
|
58
|
+
if (r !== d.current) return null;
|
|
59
|
+
let a = n.width, o = n.height, s = t?.width ?? a, c = t?.height ?? o;
|
|
60
|
+
if (s > 16384 || c > 16384 || s * c > g) throw Error("Selected area is too large to capture");
|
|
61
|
+
return (await i(document.body, {
|
|
62
|
+
useCORS: !0,
|
|
63
|
+
allowTaint: !1,
|
|
64
|
+
scale: 1,
|
|
65
|
+
logging: !1,
|
|
66
|
+
ignoreElements: v,
|
|
67
|
+
x: t ? t.x + n.scrollX : 0,
|
|
68
|
+
y: t ? t.y + n.scrollY : 0,
|
|
69
|
+
width: t?.width ?? a,
|
|
70
|
+
height: t?.height ?? o,
|
|
71
|
+
windowWidth: a,
|
|
72
|
+
windowHeight: o,
|
|
73
|
+
scrollX: 0,
|
|
74
|
+
scrollY: 0
|
|
75
|
+
})).toDataURL("image/png");
|
|
76
|
+
})(), new Promise((e, t) => {
|
|
77
|
+
p.current = setTimeout(() => t(/* @__PURE__ */ Error("Screenshot timed out")), h);
|
|
78
|
+
})]);
|
|
79
|
+
r === d.current && i && n(i);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
if (r !== d.current) return;
|
|
82
|
+
console.error("[CommentKit] Screenshot failed:", e), n(null), o("Could not capture the page. Try again, or cancel to return to the page.");
|
|
83
|
+
} finally {
|
|
84
|
+
r === d.current && (clearTimeout(p.current), p.current = void 0, f.current = !1, i(!1));
|
|
85
|
+
}
|
|
86
|
+
}, [e]),
|
|
87
|
+
reset: s(() => {
|
|
88
|
+
d.current += 1, clearTimeout(p.current), p.current = void 0, f.current = !1, i(!1), n(null), o(null);
|
|
89
|
+
}, [])
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
var b = () => import("./comment-screenshot-annotator-C7X-_bm6.js");
|
|
93
|
+
function x({ capturePage: s, availableUsers: c = [], onSave: l, onCancel: u }) {
|
|
94
|
+
let { imageUrl: d, capturing: m, error: h, capture: g, reset: _ } = y(s), v = o.useRef(null), [x, S] = o.useState(null), [C, w] = o.useState(null), T = x !== null, E = o.useMemo(() => !x || !C ? null : {
|
|
95
|
+
x: Math.min(x.x, C.x),
|
|
96
|
+
y: Math.min(x.y, C.y),
|
|
97
|
+
width: Math.abs(C.x - x.x),
|
|
98
|
+
height: Math.abs(C.y - x.y)
|
|
99
|
+
}, [C, x]), D = o.useCallback(() => {
|
|
100
|
+
g();
|
|
101
|
+
}, [g]), O = (e) => {
|
|
102
|
+
if (!(e.button !== 0 || d || m) && v.current === null) {
|
|
103
|
+
v.current = e.pointerId;
|
|
104
|
+
try {
|
|
105
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
106
|
+
} catch {}
|
|
107
|
+
S({
|
|
108
|
+
x: e.clientX,
|
|
109
|
+
y: e.clientY
|
|
110
|
+
}), w({
|
|
111
|
+
x: e.clientX,
|
|
112
|
+
y: e.clientY
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}, k = (e) => {
|
|
116
|
+
T && !d && v.current === e.pointerId && w({
|
|
117
|
+
x: e.clientX,
|
|
118
|
+
y: e.clientY
|
|
119
|
+
});
|
|
120
|
+
}, A = (e) => {
|
|
121
|
+
if (v.current !== e.pointerId) return;
|
|
122
|
+
if (v.current = null, e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), !T || !E || d) {
|
|
123
|
+
S(null), w(null);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
let t = E.width >= 20 && E.height >= 20 ? E : void 0;
|
|
127
|
+
S(null), w(null), g(t);
|
|
128
|
+
}, j = (e) => {
|
|
129
|
+
d || m || e.target !== e.currentTarget || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), D());
|
|
130
|
+
}, M = o.useCallback(() => {
|
|
131
|
+
_(), u();
|
|
132
|
+
}, [_, u]);
|
|
133
|
+
return o.useEffect(() => {
|
|
134
|
+
if (d) return;
|
|
135
|
+
let e = (e) => {
|
|
136
|
+
e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), M());
|
|
137
|
+
};
|
|
138
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
139
|
+
}, [d, M]), d ? /* @__PURE__ */ f(t, {
|
|
140
|
+
load: b,
|
|
141
|
+
label: "screenshot editor",
|
|
142
|
+
onCancel: M,
|
|
143
|
+
children: ({ CommentScreenshotAnnotator: e }) => /* @__PURE__ */ f(e, {
|
|
144
|
+
imageUrl: d,
|
|
145
|
+
availableUsers: c,
|
|
146
|
+
onSave: l,
|
|
147
|
+
onCancel: M
|
|
148
|
+
})
|
|
149
|
+
}) : /* @__PURE__ */ p("div", {
|
|
150
|
+
role: "button",
|
|
151
|
+
tabIndex: 0,
|
|
152
|
+
"data-commentkit-ui": "",
|
|
153
|
+
"data-slot": "comment-screenshot-overlay",
|
|
154
|
+
className: "ck-screenshot-overlay",
|
|
155
|
+
"aria-label": "Drag to select a region, or press Enter for the full page",
|
|
156
|
+
onPointerDown: O,
|
|
157
|
+
onPointerMove: k,
|
|
158
|
+
onPointerUp: A,
|
|
159
|
+
onPointerCancel: () => {
|
|
160
|
+
v.current = null, S(null), w(null);
|
|
161
|
+
},
|
|
162
|
+
onKeyDown: j,
|
|
163
|
+
children: [
|
|
164
|
+
E && E.width > 5 && E.height > 5 ? /* @__PURE__ */ f("div", {
|
|
165
|
+
className: "ck-screenshot-selection",
|
|
166
|
+
style: {
|
|
167
|
+
"--ck-x": `${E.x}px`,
|
|
168
|
+
"--ck-y": `${E.y}px`,
|
|
169
|
+
"--ck-w": `${E.width}px`,
|
|
170
|
+
"--ck-h": `${E.height}px`
|
|
171
|
+
}
|
|
172
|
+
}) : null,
|
|
173
|
+
/* @__PURE__ */ p("div", {
|
|
174
|
+
className: "ck-screenshot-overlay-bar",
|
|
175
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
176
|
+
children: [
|
|
177
|
+
f(m ? n : a, {}),
|
|
178
|
+
/* @__PURE__ */ f("span", { children: m ? "Capturing…" : "Drag to select region, or click for full page" }),
|
|
179
|
+
/* @__PURE__ */ f(e, {
|
|
180
|
+
type: "button",
|
|
181
|
+
variant: "ghost",
|
|
182
|
+
size: "icon-sm",
|
|
183
|
+
"aria-label": "Cancel screenshot",
|
|
184
|
+
onClick: (e) => {
|
|
185
|
+
e.stopPropagation(), M();
|
|
186
|
+
},
|
|
187
|
+
children: /* @__PURE__ */ f(i, {})
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
}),
|
|
191
|
+
h ? /* @__PURE__ */ f("p", {
|
|
192
|
+
role: "alert",
|
|
193
|
+
className: "ck-screenshot-overlay-error",
|
|
194
|
+
children: h
|
|
195
|
+
}) : null,
|
|
196
|
+
/* @__PURE__ */ f(r, { mode: "screenshot" })
|
|
197
|
+
]
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function S(e) {
|
|
201
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("style", {
|
|
202
|
+
"data-ck-tool-styles": "screenshot",
|
|
203
|
+
children: m
|
|
204
|
+
}), /* @__PURE__ */ f(x, { ...e })] });
|
|
205
|
+
}
|
|
206
|
+
export { S as CommentScreenshotOverlay };
|