@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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* writable/derived, BehaviorSubject, signals, etc.).
|
|
9
9
|
*/
|
|
10
10
|
import type { CommentKitCore } from "../core/comment-kit-core";
|
|
11
|
-
import type { ApiError, AgentContextExport, AgentContextOptions, Comment, DevGrabBundle, DevGrabOptions, DevGrabResult, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User } from "../core/types";
|
|
11
|
+
import type { ApiError, AgentContextExport, AgentContextOptions, Comment, ReplyOptions, CommentCreateOptions, DevGrabBundle, DevGrabOptions, DevGrabResult, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User } from "../core/types";
|
|
12
12
|
export interface AdapterMethods {
|
|
13
13
|
validateInvite: (email: string) => Promise<void>;
|
|
14
14
|
login: (email: string) => Promise<void>;
|
|
@@ -23,24 +23,21 @@ export interface AdapterMethods {
|
|
|
23
23
|
toggleShortcutsOverlay: () => void;
|
|
24
24
|
setPanelView: (view: PanelView) => void;
|
|
25
25
|
loadMoreComments: () => Promise<void>;
|
|
26
|
+
reloadComments: () => Promise<void>;
|
|
27
|
+
setBranch: (branch: string | null) => Promise<void>;
|
|
28
|
+
reloadProjectContext: () => Promise<void>;
|
|
26
29
|
getProjectMembers: () => Promise<User[]>;
|
|
27
|
-
createComment: (type: "pin" | "highlight" | "drawing", content: string, position: Position, priority?: "low" | "medium" | "high" | "urgent", textSelection?: TextSelection, drawingData?: DrawingData, options?:
|
|
28
|
-
description?: string;
|
|
29
|
-
assignees?: User[];
|
|
30
|
-
checklist?: TaskChecklistItem[];
|
|
31
|
-
files?: File[];
|
|
32
|
-
attachmentIds?: Array<string | number>;
|
|
33
|
-
}) => Promise<void>;
|
|
30
|
+
createComment: (type: "pin" | "highlight" | "drawing", content: string, position: Position, priority?: "low" | "medium" | "high" | "urgent", textSelection?: TextSelection, drawingData?: DrawingData, options?: CommentCreateOptions) => Promise<void>;
|
|
34
31
|
updateComment: (commentId: string, updates: Partial<Comment>) => Promise<void>;
|
|
35
32
|
deleteComment: (id: string) => Promise<void>;
|
|
36
33
|
resolveComment: (id: string) => Promise<void>;
|
|
37
34
|
unresolveComment: (id: string) => Promise<void>;
|
|
38
35
|
completeComment: (id: string) => Promise<void>;
|
|
39
36
|
selectComment: (comment: Comment | null) => void;
|
|
40
|
-
addReply: (commentId: string, content: string) => Promise<void>;
|
|
41
|
-
updateReply: (commentId: string, replyId: string, content: string) => Promise<void>;
|
|
37
|
+
addReply: (commentId: string, content: string, options?: ReplyOptions) => Promise<void>;
|
|
38
|
+
updateReply: (commentId: string, replyId: string, content: string, options?: ReplyOptions) => Promise<void>;
|
|
42
39
|
deleteReply: (commentId: string, replyId: string) => Promise<void>;
|
|
43
|
-
reactToComment: (commentId: string, emoji: string) => Promise<void>;
|
|
40
|
+
reactToComment: (commentId: string, emoji: string, replyId?: string) => Promise<void>;
|
|
44
41
|
updateCommentPosition: (commentId: string, x: number, y: number) => Promise<void>;
|
|
45
42
|
createHighlight: (textSelection: TextSelection, content: string) => Promise<void>;
|
|
46
43
|
createDrawing: (drawingData: DrawingData, position: Position, content: string) => Promise<void>;
|
|
@@ -110,7 +107,7 @@ export declare const STATE_SELECTORS: {
|
|
|
110
107
|
readonly isSidebarVisible: (s: CommentKitState | null) => boolean;
|
|
111
108
|
readonly currentUser: (s: CommentKitState | null) => User | null;
|
|
112
109
|
readonly comments: (s: CommentKitState | null) => Comment[];
|
|
113
|
-
readonly activeTool: (s: CommentKitState | null) => "
|
|
110
|
+
readonly activeTool: (s: CommentKitState | null) => "comment" | "draw" | "highlight" | "screenshot" | "select" | null;
|
|
114
111
|
readonly otpStep: (s: CommentKitState | null) => import("..").OtpStep;
|
|
115
112
|
readonly otpEmail: (s: CommentKitState | null) => string | null;
|
|
116
113
|
readonly pendingMutationCount: (s: CommentKitState | null) => number;
|
|
@@ -122,4 +119,4 @@ export declare const STATE_SELECTORS: {
|
|
|
122
119
|
readonly activeDrawing: (s: CommentKitState | null) => DrawingData | null;
|
|
123
120
|
readonly activeScreenshot: (s: CommentKitState | null) => ScreenshotResult | null;
|
|
124
121
|
};
|
|
125
|
-
export type { ApiError, Comment, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User, };
|
|
122
|
+
export type { ApiError, Comment, ReplyOptions, CommentCreateOptions, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User, };
|
|
@@ -37,8 +37,8 @@ export declare class CommentKitService implements OnDestroy {
|
|
|
37
37
|
readonly isSidebarVisible$: import("rxjs").Observable<boolean>;
|
|
38
38
|
readonly currentUser$: import("rxjs").Observable<import("./index.ts").User | null>;
|
|
39
39
|
readonly comments$: import("rxjs").Observable<import("./index.ts").Comment[]>;
|
|
40
|
-
readonly activeTool$: import("rxjs").Observable<"
|
|
41
|
-
readonly otpStep$: import("rxjs").Observable<import("../
|
|
40
|
+
readonly activeTool$: import("rxjs").Observable<"comment" | "draw" | "highlight" | "screenshot" | "select" | null>;
|
|
41
|
+
readonly otpStep$: import("rxjs").Observable<import("../headless.ts").OtpStep>;
|
|
42
42
|
readonly otpEmail$: import("rxjs").Observable<string | null>;
|
|
43
43
|
readonly pendingMutationCount$: import("rxjs").Observable<number>;
|
|
44
44
|
readonly isOnline$: import("rxjs").Observable<boolean>;
|
|
@@ -67,6 +67,9 @@ export declare class CommentKitService implements OnDestroy {
|
|
|
67
67
|
toggleShortcutsOverlay(): void;
|
|
68
68
|
setPanelView(view: CommentKitState["panelView"]): void;
|
|
69
69
|
loadMoreComments(): Promise<void>;
|
|
70
|
+
reloadComments(): Promise<void>;
|
|
71
|
+
setBranch(...args: Parameters<AdapterMethods["setBranch"]>): Promise<void>;
|
|
72
|
+
reloadProjectContext(): Promise<void>;
|
|
70
73
|
getProjectMembers(): Promise<import("./index.ts").User[]>;
|
|
71
74
|
createComment(...args: Parameters<AdapterMethods["createComment"]>): Promise<void>;
|
|
72
75
|
updateComment(...args: Parameters<AdapterMethods["updateComment"]>): Promise<void>;
|
|
@@ -75,10 +78,10 @@ export declare class CommentKitService implements OnDestroy {
|
|
|
75
78
|
unresolveComment(id: string): Promise<void>;
|
|
76
79
|
completeComment(id: string): Promise<void>;
|
|
77
80
|
selectComment(...args: Parameters<AdapterMethods["selectComment"]>): void;
|
|
78
|
-
addReply(
|
|
79
|
-
updateReply(
|
|
81
|
+
addReply(...args: Parameters<AdapterMethods["addReply"]>): Promise<void>;
|
|
82
|
+
updateReply(...args: Parameters<AdapterMethods["updateReply"]>): Promise<void>;
|
|
80
83
|
deleteReply(commentId: string, replyId: string): Promise<void>;
|
|
81
|
-
reactToComment(
|
|
84
|
+
reactToComment(...args: Parameters<AdapterMethods["reactToComment"]>): Promise<void>;
|
|
82
85
|
updateCommentPosition(commentId: string, x: number, y: number): Promise<void>;
|
|
83
86
|
createHighlight(...args: Parameters<AdapterMethods["createHighlight"]>): Promise<void>;
|
|
84
87
|
createDrawing(...args: Parameters<AdapterMethods["createDrawing"]>): Promise<void>;
|
|
@@ -87,7 +90,7 @@ export declare class CommentKitService implements OnDestroy {
|
|
|
87
90
|
captureScreenshot(...args: Parameters<AdapterMethods["captureScreenshot"]>): Promise<import("./index.ts").ScreenshotResult | null>;
|
|
88
91
|
uploadScreenshot(...args: Parameters<AdapterMethods["uploadScreenshot"]>): Promise<import("./index.ts").Comment | null>;
|
|
89
92
|
setActiveScreenshot(...args: Parameters<AdapterMethods["setActiveScreenshot"]>): void;
|
|
90
|
-
uploadFiles(
|
|
93
|
+
uploadFiles(...args: Parameters<AdapterMethods["uploadFiles"]>): Promise<string[]>;
|
|
91
94
|
markThreadSeen(threadId: string): void;
|
|
92
95
|
isThreadNew(threadId: string): boolean;
|
|
93
96
|
markAllActivitiesRead(): void;
|
|
@@ -116,7 +119,14 @@ export declare class CommentKitService implements OnDestroy {
|
|
|
116
119
|
destroy(): void;
|
|
117
120
|
}
|
|
118
121
|
export declare function createCommentKitService(): CommentKitService;
|
|
119
|
-
export declare function provideCommentKit(config: AngularCommentKitConfig): (
|
|
122
|
+
export declare function provideCommentKit(config: AngularCommentKitConfig): ({
|
|
123
|
+
provide: typeof CommentKitService;
|
|
124
|
+
useFactory: (options: AngularCommentKitConfig) => CommentKitService;
|
|
125
|
+
deps: InjectionToken<CommentKitConfig>[];
|
|
126
|
+
useValue?: undefined;
|
|
127
|
+
} | {
|
|
128
|
+
useFactory?: undefined;
|
|
129
|
+
deps?: undefined;
|
|
120
130
|
provide: InjectionToken<CommentKitConfig>;
|
|
121
131
|
useValue: AngularCommentKitConfig;
|
|
122
132
|
})[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AuthResponse, Comment, CommentEnvironment, DrawingData, InviteValidationResponse, Mention, OtpResponse, OtpVerifyResponse, Position, ResolvedConfig,
|
|
1
|
+
import type { AuthResponse, Comment, CommentEnvironment, CommentCreateOptions, CommentDeviceInfo, ProjectContext, ReplyOptions, DrawingData, InviteValidationResponse, Mention, OtpResponse, OtpVerifyResponse, Position, ResolvedConfig, TextSelection, User } from "./types";
|
|
2
2
|
export declare class ApiClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private apiKey;
|
|
5
5
|
private projectId;
|
|
6
6
|
private userEmail;
|
|
7
7
|
private authToken;
|
|
8
|
+
private authRevision;
|
|
8
9
|
private environment;
|
|
9
10
|
private onAuthExpired;
|
|
10
11
|
constructor(config: ResolvedConfig);
|
|
@@ -23,7 +24,7 @@ export declare class ApiClient {
|
|
|
23
24
|
requestOtp(email: string): Promise<OtpResponse>;
|
|
24
25
|
verifyOtp(email: string, otp: string): Promise<OtpVerifyResponse>;
|
|
25
26
|
validateInvite(token: string, email: string): Promise<InviteValidationResponse>;
|
|
26
|
-
getComments(pagePath?: string, status?: "open" | "resolved" | "all", page?: number, limit?: number, environment?: CommentEnvironment): Promise<{
|
|
27
|
+
getComments(pagePath?: string, status?: "open" | "resolved" | "all", page?: number, limit?: number, environment?: CommentEnvironment, branch?: string | null): Promise<{
|
|
27
28
|
comments: Comment[];
|
|
28
29
|
pagination: {
|
|
29
30
|
total: number;
|
|
@@ -32,6 +33,7 @@ export declare class ApiClient {
|
|
|
32
33
|
limit: number;
|
|
33
34
|
};
|
|
34
35
|
}>;
|
|
36
|
+
getComment(commentId: string): Promise<Comment>;
|
|
35
37
|
/**
|
|
36
38
|
* Build an Idempotency-Key header from a client-supplied key. The backend
|
|
37
39
|
* dedups retried creates/replies on this key, so an offline-queue replay (or
|
|
@@ -43,37 +45,30 @@ export declare class ApiClient {
|
|
|
43
45
|
url: string;
|
|
44
46
|
path: string;
|
|
45
47
|
title: string;
|
|
46
|
-
}, priority?: "low" | "medium" | "high" | "urgent", textSelection?: TextSelection, drawingData?: DrawingData, options?:
|
|
47
|
-
|
|
48
|
-
assignees?: User[];
|
|
49
|
-
checklist?: TaskChecklistItem[];
|
|
50
|
-
mentions?: Mention[];
|
|
51
|
-
/** Link previously uploaded orphan attachment ids. */
|
|
52
|
-
attachmentIds?: Array<string | number>;
|
|
53
|
-
}, idempotencyKey?: string): Promise<Comment>;
|
|
54
|
-
updateComment(commentId: string, updates: Partial<Pick<Comment, "content" | "status" | "priority" | "description" | "assignees" | "checklist" | "textSelection" | "drawingData"> & {
|
|
48
|
+
}, priority?: "low" | "medium" | "high" | "urgent", textSelection?: TextSelection, drawingData?: DrawingData, options?: CommentCreateOptions, idempotencyKey?: string): Promise<Comment>;
|
|
49
|
+
updateComment(commentId: string, updates: Partial<Pick<Comment, "content" | "status" | "priority" | "description" | "assignees" | "checklist" | "textSelection" | "drawingData" | "mentions"> & {
|
|
55
50
|
attachmentIds?: Array<string | number>;
|
|
56
51
|
}>): Promise<Comment>;
|
|
57
52
|
deleteComment(commentId: string): Promise<void>;
|
|
58
|
-
addReply(commentId: string, content: string, idempotencyKey?: string): Promise<Comment["replies"][0]>;
|
|
59
|
-
updateReply(commentId: string, replyId: string, content: string): Promise<Comment["replies"][0]>;
|
|
53
|
+
addReply(commentId: string, content: string, idempotencyKey?: string, options?: ReplyOptions): Promise<Comment["replies"][0]>;
|
|
54
|
+
updateReply(commentId: string, replyId: string, content: string, options?: ReplyOptions): Promise<Comment["replies"][0]>;
|
|
60
55
|
deleteReply(commentId: string, replyId: string): Promise<void>;
|
|
61
56
|
resolveComment(commentId: string): Promise<Comment>;
|
|
62
57
|
unresolveComment(commentId: string): Promise<Comment>;
|
|
63
58
|
markComplete(commentId: string): Promise<Comment>;
|
|
64
|
-
addReaction(commentId: string, emoji: string): Promise<void>;
|
|
65
|
-
removeReaction(commentId: string, emoji: string): Promise<void>;
|
|
59
|
+
addReaction(commentId: string, emoji: string, replyId?: string): Promise<void>;
|
|
60
|
+
removeReaction(commentId: string, emoji: string, replyId?: string): Promise<void>;
|
|
66
61
|
updatePosition(commentId: string, position: Position): Promise<Comment>;
|
|
67
62
|
createHighlight(content: string, textSelection: TextSelection, page: {
|
|
68
63
|
url: string;
|
|
69
64
|
path: string;
|
|
70
65
|
title: string;
|
|
71
|
-
}, priority?: "low" | "medium" | "high" | "urgent", idempotencyKey?: string): Promise<Comment>;
|
|
66
|
+
}, priority?: "low" | "medium" | "high" | "urgent", idempotencyKey?: string, options?: CommentCreateOptions): Promise<Comment>;
|
|
72
67
|
createDrawing(content: string, drawingData: DrawingData, position: Position, page: {
|
|
73
68
|
url: string;
|
|
74
69
|
path: string;
|
|
75
70
|
title: string;
|
|
76
|
-
}, idempotencyKey?: string): Promise<Comment>;
|
|
71
|
+
}, idempotencyKey?: string, options?: CommentCreateOptions): Promise<Comment>;
|
|
77
72
|
private validateFile;
|
|
78
73
|
/**
|
|
79
74
|
* Upload a file. Pass `commentId` (and optionally `replyId`) so the backend
|
|
@@ -90,6 +85,7 @@ export declare class ApiClient {
|
|
|
90
85
|
url: string;
|
|
91
86
|
thumbnail?: string;
|
|
92
87
|
filename?: string;
|
|
88
|
+
mimeType?: string;
|
|
93
89
|
size: number;
|
|
94
90
|
}>;
|
|
95
91
|
uploadScreenshot(file: File, metadata: {
|
|
@@ -100,11 +96,14 @@ export declare class ApiClient {
|
|
|
100
96
|
path: string;
|
|
101
97
|
title: string;
|
|
102
98
|
};
|
|
99
|
+
branch?: string;
|
|
100
|
+
deviceInfo?: CommentDeviceInfo;
|
|
103
101
|
}): Promise<Comment>;
|
|
104
102
|
uploadFiles(files: File[], options?: {
|
|
105
103
|
commentId?: string;
|
|
106
104
|
replyId?: string;
|
|
107
105
|
}): Promise<string[]>;
|
|
106
|
+
getProjectContext(): Promise<ProjectContext>;
|
|
108
107
|
getProjectMembers(): Promise<User[]>;
|
|
109
108
|
}
|
|
110
109
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from "../utils/event-emitter";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LocalDemoStore } from "./local-demo";
|
|
3
|
+
import type { AgentContextExport, AgentContextOptions, Comment, CommentCreateOptions, ReplyOptions, CommentKitConfig, CommentKitState, DevGrabBundle, DevGrabOptions, DevGrabResult, DrawingData, DrawingPath, Position, ResolvedConfig, ScreenshotResult, StateSlice, TextSelection, ToolType, Unsubscribe, User } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* Current SDK version — compared against the backend's sdkLatestVersion on
|
|
5
6
|
* init. Injected from package.json at build time (vite `define`) so it can't
|
|
@@ -10,6 +11,7 @@ export declare const SDK_VERSION: string;
|
|
|
10
11
|
export declare class CommentKitCore extends EventEmitter {
|
|
11
12
|
private state;
|
|
12
13
|
private apiClient;
|
|
14
|
+
private readonly localDemo;
|
|
13
15
|
private wsManager;
|
|
14
16
|
private wsUnsubscribers;
|
|
15
17
|
private config;
|
|
@@ -23,6 +25,13 @@ export declare class CommentKitCore extends EventEmitter {
|
|
|
23
25
|
private offlineHandler;
|
|
24
26
|
private initialized;
|
|
25
27
|
private destroyed;
|
|
28
|
+
private sessionRevision;
|
|
29
|
+
private authRequestRevision;
|
|
30
|
+
private commentsFetchRevision;
|
|
31
|
+
private contextFetchRevision;
|
|
32
|
+
private deepLinkRequest;
|
|
33
|
+
private reactionRequests;
|
|
34
|
+
private draftUploads;
|
|
26
35
|
private screenshotProvider;
|
|
27
36
|
private bootRetryTimer;
|
|
28
37
|
private bootAttempts;
|
|
@@ -43,7 +52,12 @@ export declare class CommentKitCore extends EventEmitter {
|
|
|
43
52
|
private kbdCallbacks;
|
|
44
53
|
private commentCb;
|
|
45
54
|
private realtimeRefs;
|
|
46
|
-
constructor(config: CommentKitConfig | ResolvedConfig);
|
|
55
|
+
constructor(config: CommentKitConfig | ResolvedConfig, localDemo?: LocalDemoStore);
|
|
56
|
+
/** True only for a separately constructed, browser-local sandbox. */
|
|
57
|
+
isLocalDemo(): boolean;
|
|
58
|
+
private restoreDemoState;
|
|
59
|
+
/** Reveal the local sandbox with the pin tool. Normal instances are unaffected. */
|
|
60
|
+
startLocalDemo(): void;
|
|
47
61
|
private detectEnvironment;
|
|
48
62
|
private boot;
|
|
49
63
|
/**
|
|
@@ -102,6 +116,7 @@ export declare class CommentKitCore extends EventEmitter {
|
|
|
102
116
|
private restorePersistedSession;
|
|
103
117
|
/** Shared post-auth path used by OTP verify and session restore. */
|
|
104
118
|
private afterAuthenticated;
|
|
119
|
+
private beginAuthRequest;
|
|
105
120
|
login(email: string): Promise<void>;
|
|
106
121
|
private otpFailedAttempts;
|
|
107
122
|
private otpCooldownUntil;
|
|
@@ -120,7 +135,10 @@ export declare class CommentKitCore extends EventEmitter {
|
|
|
120
135
|
toggleSidebar(): void;
|
|
121
136
|
private overlayBeforeTool;
|
|
122
137
|
setTool(tool: ToolType): void;
|
|
138
|
+
private operationContext;
|
|
139
|
+
private operationCallbacks;
|
|
123
140
|
private loadMoreGuard;
|
|
141
|
+
private commentsRequestContext;
|
|
124
142
|
private loadComments;
|
|
125
143
|
loadMoreComments(): Promise<void>;
|
|
126
144
|
/**
|
|
@@ -129,23 +147,22 @@ export declare class CommentKitCore extends EventEmitter {
|
|
|
129
147
|
* loaded, this refreshes existing data — e.g. to pick up remote edits.
|
|
130
148
|
*/
|
|
131
149
|
reloadComments(): Promise<void>;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}): Promise<void>;
|
|
150
|
+
/** Refresh authenticated member, plan and usage data without fabricating demo values. */
|
|
151
|
+
reloadProjectContext(): Promise<void>;
|
|
152
|
+
setBranch(branch: string | null): Promise<void>;
|
|
153
|
+
/** Upload drafts before creating their record. Reuse successful uploads if saving is retried. */
|
|
154
|
+
uploadDraftFiles(files: File[]): Promise<string[]>;
|
|
155
|
+
createComment(type: "pin" | "highlight" | "drawing", content: string, position: Position, priority?: "low" | "medium" | "high" | "urgent", textSelection?: TextSelection, drawingData?: DrawingData, options?: CommentCreateOptions): Promise<void>;
|
|
139
156
|
updateComment(commentId: string, updates: Partial<Comment>): Promise<void>;
|
|
140
157
|
deleteComment(commentId: string): Promise<void>;
|
|
141
|
-
addReply(commentId: string, content: string): Promise<void>;
|
|
142
|
-
updateReply(commentId: string, replyId: string, content: string): Promise<void>;
|
|
158
|
+
addReply(commentId: string, content: string, options?: ReplyOptions): Promise<void>;
|
|
159
|
+
updateReply(commentId: string, replyId: string, content: string, options?: ReplyOptions): Promise<void>;
|
|
143
160
|
deleteReply(commentId: string, replyId: string): Promise<void>;
|
|
144
161
|
resolveComment(commentId: string): Promise<void>;
|
|
145
162
|
unresolveComment(commentId: string): Promise<void>;
|
|
146
163
|
selectComment(comment: Comment | null): void;
|
|
147
164
|
completeComment(commentId: string): Promise<void>;
|
|
148
|
-
reactToComment(commentId: string, emoji: string): Promise<void>;
|
|
165
|
+
reactToComment(commentId: string, emoji: string, replyId?: string): Promise<void>;
|
|
149
166
|
updateCommentPosition(commentId: string, x: number, y: number): Promise<void>;
|
|
150
167
|
private offlinePersistUnsub;
|
|
151
168
|
/**
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ApiClient } from "./api-client";
|
|
2
|
+
import type { Comment, CommentKitConfig } from "./types";
|
|
3
|
+
/** A demo window is fixed at creation; reading or editing never extends it. */
|
|
4
|
+
export declare const LOCAL_DEMO_TTL: number;
|
|
5
|
+
export interface CommentKitDemoOptions {
|
|
6
|
+
/** A name scoped below commentkit:demo:. Never used for production sessions. */
|
|
7
|
+
storageKey?: string;
|
|
8
|
+
ui?: Pick<NonNullable<CommentKitConfig["ui"]>, "theme" | "position">;
|
|
9
|
+
}
|
|
10
|
+
export interface CommentKitDemoSession {
|
|
11
|
+
expiresAt: number;
|
|
12
|
+
persistence: "localStorage" | "memory";
|
|
13
|
+
commentCount: number;
|
|
14
|
+
expired: boolean;
|
|
15
|
+
}
|
|
16
|
+
type ChangeReason = "persist" | "reset" | "expired" | "storage";
|
|
17
|
+
type PublicApiClient = Pick<ApiClient, keyof ApiClient>;
|
|
18
|
+
/** A closed local store: it has no fetch, token, websocket, upload, or queue dependency. */
|
|
19
|
+
export declare class LocalDemoStore {
|
|
20
|
+
readonly user: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
email: string;
|
|
24
|
+
avatar?: string;
|
|
25
|
+
organizationId?: string;
|
|
26
|
+
};
|
|
27
|
+
readonly storageKey: string;
|
|
28
|
+
private storage;
|
|
29
|
+
private data;
|
|
30
|
+
private timer;
|
|
31
|
+
private destroyed;
|
|
32
|
+
private expiryNotified;
|
|
33
|
+
private revision;
|
|
34
|
+
private listeners;
|
|
35
|
+
private lastSerialized;
|
|
36
|
+
constructor(options?: CommentKitDemoOptions);
|
|
37
|
+
private hydrate;
|
|
38
|
+
private persist;
|
|
39
|
+
private armExpiry;
|
|
40
|
+
private onFocus;
|
|
41
|
+
private onStorage;
|
|
42
|
+
private sync;
|
|
43
|
+
checkExpiry(): boolean;
|
|
44
|
+
getSession(): CommentKitDemoSession;
|
|
45
|
+
getComments(): Comment[];
|
|
46
|
+
subscribe(listener: (reason: ChangeReason) => void): () => void;
|
|
47
|
+
refresh(): void;
|
|
48
|
+
getRevision(): number;
|
|
49
|
+
private notify;
|
|
50
|
+
reset(): void;
|
|
51
|
+
activate(): void;
|
|
52
|
+
private write;
|
|
53
|
+
private find;
|
|
54
|
+
private modify;
|
|
55
|
+
private quote;
|
|
56
|
+
readonly client: PublicApiClient;
|
|
57
|
+
private unavailable;
|
|
58
|
+
destroy(): void;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -197,6 +197,57 @@ export interface Project {
|
|
|
197
197
|
createdAt?: string;
|
|
198
198
|
updatedAt?: string;
|
|
199
199
|
}
|
|
200
|
+
/** Authenticated project data used by the embedded member and settings views. */
|
|
201
|
+
export interface ProjectContext {
|
|
202
|
+
project: Pick<Project, "id" | "name" | "slug">;
|
|
203
|
+
organization: {
|
|
204
|
+
id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
plan: "none" | "pro" | "ltd";
|
|
207
|
+
};
|
|
208
|
+
members: Array<User & {
|
|
209
|
+
role: "owner" | "admin" | "member";
|
|
210
|
+
}>;
|
|
211
|
+
usage: {
|
|
212
|
+
used: number;
|
|
213
|
+
limit: number | null;
|
|
214
|
+
label: string;
|
|
215
|
+
};
|
|
216
|
+
branches: Array<{
|
|
217
|
+
name: string;
|
|
218
|
+
}>;
|
|
219
|
+
permissions: {
|
|
220
|
+
canManageComments: boolean;
|
|
221
|
+
canInvite: boolean;
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
export interface CommentDeviceInfo {
|
|
225
|
+
browser: string;
|
|
226
|
+
os: string;
|
|
227
|
+
windowSize: string;
|
|
228
|
+
devicePixelRatio: number;
|
|
229
|
+
deployment?: string;
|
|
230
|
+
type: "desktop" | "mobile";
|
|
231
|
+
}
|
|
232
|
+
export interface ReplyTarget {
|
|
233
|
+
id: string;
|
|
234
|
+
type: "comment" | "reply";
|
|
235
|
+
}
|
|
236
|
+
export interface ReplyOptions {
|
|
237
|
+
attachmentIds?: Array<string | number>;
|
|
238
|
+
mentions?: Mention[];
|
|
239
|
+
replyTo?: ReplyTarget;
|
|
240
|
+
}
|
|
241
|
+
export interface CommentCreateOptions {
|
|
242
|
+
description?: string;
|
|
243
|
+
assignees?: User[];
|
|
244
|
+
checklist?: TaskChecklistItem[];
|
|
245
|
+
mentions?: Mention[];
|
|
246
|
+
files?: File[];
|
|
247
|
+
attachmentIds?: Array<string | number>;
|
|
248
|
+
branch?: string;
|
|
249
|
+
deviceInfo?: CommentDeviceInfo;
|
|
250
|
+
}
|
|
200
251
|
export type TaskStatus = "open" | "resolved" | "complete";
|
|
201
252
|
export interface TaskChecklistItem {
|
|
202
253
|
id: string;
|
|
@@ -205,6 +256,8 @@ export interface TaskChecklistItem {
|
|
|
205
256
|
sortOrder?: number;
|
|
206
257
|
}
|
|
207
258
|
export interface CommentReaction {
|
|
259
|
+
/** Participant IDs let realtime consumers derive their own reacted state. */
|
|
260
|
+
userIds?: string[];
|
|
208
261
|
emoji: string;
|
|
209
262
|
count: number;
|
|
210
263
|
reacted: boolean;
|
|
@@ -225,11 +278,15 @@ export interface Comment {
|
|
|
225
278
|
status: TaskStatus;
|
|
226
279
|
priority: "low" | "medium" | "high" | "urgent";
|
|
227
280
|
environment?: CommentEnvironment;
|
|
281
|
+
branch?: string;
|
|
282
|
+
deviceInfo?: CommentDeviceInfo;
|
|
228
283
|
author: User;
|
|
229
284
|
userId: string;
|
|
230
285
|
createdAt: string;
|
|
231
286
|
updatedAt: string;
|
|
232
287
|
isEdited?: boolean;
|
|
288
|
+
resolvedAt?: string;
|
|
289
|
+
completedAt?: string;
|
|
233
290
|
page: {
|
|
234
291
|
url: string;
|
|
235
292
|
path: string;
|
|
@@ -246,6 +303,10 @@ export interface Comment {
|
|
|
246
303
|
drawingData?: DrawingData;
|
|
247
304
|
}
|
|
248
305
|
export interface Reply {
|
|
306
|
+
replyTo?: ReplyTarget & {
|
|
307
|
+
authorName: string;
|
|
308
|
+
body: string;
|
|
309
|
+
};
|
|
249
310
|
id: string;
|
|
250
311
|
content: string;
|
|
251
312
|
author: User;
|
|
@@ -256,6 +317,7 @@ export interface Reply {
|
|
|
256
317
|
attachments?: Attachment[];
|
|
257
318
|
}
|
|
258
319
|
export interface Attachment {
|
|
320
|
+
mimeType?: string;
|
|
259
321
|
id: string;
|
|
260
322
|
type: "screenshot" | "file" | "drawing";
|
|
261
323
|
url: string;
|
|
@@ -333,6 +395,8 @@ export interface PaginationInfo {
|
|
|
333
395
|
}
|
|
334
396
|
export interface QueuedMutation {
|
|
335
397
|
id: string;
|
|
398
|
+
/** Authenticated author captured at enqueue time. Legacy entries without an owner cannot replay. */
|
|
399
|
+
ownerId?: string;
|
|
336
400
|
type: "createComment" | "createHighlight" | "createDrawing" | "updateComment" | "deleteComment" | "resolveComment" | "unresolveComment" | "completeComment" | "addReply" | "reactToComment" | "updatePosition";
|
|
337
401
|
args: any[];
|
|
338
402
|
timestamp: number;
|
|
@@ -347,6 +411,8 @@ export interface QueuedMutation {
|
|
|
347
411
|
export type StateSlice = "auth" | "ui" | "comments" | "realtime";
|
|
348
412
|
export type ScreenshotProvider = (element: HTMLElement, options?: ScreenshotOptions) => Promise<ScreenshotResult>;
|
|
349
413
|
export interface CommentKitConfig {
|
|
414
|
+
/** Optional actual deployment branch, e.g. from your build environment. */
|
|
415
|
+
branch?: string;
|
|
350
416
|
/** API key from the CommentKit dashboard. */
|
|
351
417
|
apiKey: string;
|
|
352
418
|
/** API base URL override. Useful for self-hosted, staging, and local API deployments. */
|
|
@@ -443,6 +509,8 @@ export interface CommentKitState {
|
|
|
443
509
|
isShortcutsOverlayVisible: boolean;
|
|
444
510
|
currentUser: User | null;
|
|
445
511
|
project: Project | null;
|
|
512
|
+
projectContext?: ProjectContext | null;
|
|
513
|
+
activeBranch?: string | null;
|
|
446
514
|
comments: Comment[];
|
|
447
515
|
activeTool: ToolType;
|
|
448
516
|
selectedComment: Comment | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CommentKitCore } from "./core/comment-kit-core";
|
|
2
|
+
import type { CommentKitDemoOptions, CommentKitDemoSession } from "./core/local-demo";
|
|
3
|
+
export type { CommentKitDemoOptions, CommentKitDemoSession } from "./core/local-demo";
|
|
4
|
+
/** A real SDK instance with a private, fixed 24-hour browser-local data store. */
|
|
5
|
+
export interface CommentKitDemo {
|
|
6
|
+
start(): void;
|
|
7
|
+
reset(): void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
getSession(): CommentKitDemoSession;
|
|
10
|
+
getCore(): CommentKitCore;
|
|
11
|
+
onSessionChange(listener: (session: CommentKitDemoSession) => void): () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Opt-in sandbox. No project/API key, OTP, production session, network client,
|
|
15
|
+
* realtime connection, file upload, or offline mutation queue is created.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createCommentKitDemo(options?: CommentKitDemoOptions): Promise<CommentKitDemo>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Engine, protocol types and helpers without any UI runtime or global registration. */
|
|
2
|
+
export { ApiClient, formatMention, parseMentions, stripMentionMarkup } from "./core/api-client";
|
|
3
|
+
export { createAgentContext, formatAgentContext } from "./core/agent-context";
|
|
4
|
+
export { CommentKitCore, SDK_VERSION } from "./core/comment-kit-core";
|
|
5
|
+
export { WebSocketManager } from "./core/websocket-manager";
|
|
6
|
+
export type { ActivityItem, AgentCommentContext, AgentContextExport, AgentContextOptions, AgentElementContext, ApiError, AssigneeFilter, Attachment, AuthResponse, Comment, CommentCreateOptions, CommentDeviceInfo, CommentFilter, CommentKitConfig, CommentKitEvents, CommentKitState, CommentMode, CommentReaction, ConnectionStatus, CursorPosition, DeviceInfo, DevGrabAttachment, DevGrabAttachmentPathSource, DevGrabOptions, DrawingData, DrawingPath, EventListener, InviteValidationResponse, Mention, Organization, OrganizationMember, OtpResponse, OtpStep, OtpVerifyResponse, PageFilter, PaginationInfo, PanelView, Position, PriorityFilter, Project, ProjectContext, QueuedMutation, RealtimeMessage, Reply, ReplyOptions, ReplyTarget, ScreenshotOptions, ScreenshotProvider, ScreenshotResult, SortOrder, StateSlice, StatusFilter, TaskChecklistItem, TaskStatus, TextSelection, ToolType, Unsubscribe, User, UserFilter, } from "./core/types";
|
|
7
|
+
export { debounce, findElement, generateId, generateSelector, generateXPath, getCurrentPage, getElementBounds, getSelectionRange, getSelectionText, isElementVisible, isInteractiveElement, percentageToViewport, throttle, viewportToPercentage, } from "./utils/dom";
|
|
8
|
+
export { EventEmitter } from "./utils/event-emitter";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export { debounce, findElement, generateId, generateSelector, generateXPath, getCurrentPage, getElementBounds, getSelectionRange, getSelectionText, isElementVisible, isInteractiveElement, percentageToViewport, throttle, viewportToPercentage, } from "./utils/dom";
|
|
7
|
-
export { EventEmitter } from "./utils/event-emitter";
|
|
1
|
+
import type { CommentKitDemo, CommentKitDemoOptions } from "./demo";
|
|
2
|
+
/** @deprecated Prefer the dedicated `@commentkit/comment-kit/demo` entry. */
|
|
3
|
+
export declare function createCommentKitDemo(options?: CommentKitDemoOptions): Promise<CommentKitDemo>;
|
|
4
|
+
export type { CommentKitDemo, CommentKitDemoOptions, CommentKitDemoSession } from "./demo";
|
|
5
|
+
export * from "./headless";
|
|
8
6
|
import type { CommentKitConfig, CommentKitEvents, DrawingData, DrawingPath, EventListener, ScreenshotResult } from "./core/types";
|
|
9
7
|
import { CommentKitCore } from "./core/comment-kit-core";
|
|
10
8
|
export declare class CommentKit {
|
|
@@ -13,7 +11,7 @@ export declare class CommentKit {
|
|
|
13
11
|
private destroyed;
|
|
14
12
|
constructor(config: CommentKitConfig);
|
|
15
13
|
private mount;
|
|
16
|
-
getState(): import("
|
|
14
|
+
getState(): import("./headless").CommentKitState;
|
|
17
15
|
getConfig(): Readonly<CommentKitConfig>;
|
|
18
16
|
getFeatures(): {
|
|
19
17
|
comments?: boolean;
|
|
@@ -39,40 +37,44 @@ export declare class CommentKit {
|
|
|
39
37
|
unresolveComment(id: string): Promise<void>;
|
|
40
38
|
completeComment(id: string): Promise<void>;
|
|
41
39
|
selectComment(comment: Parameters<CommentKitCore["selectComment"]>[0]): void;
|
|
42
|
-
addReply(
|
|
43
|
-
updateReply(
|
|
40
|
+
addReply(...args: Parameters<CommentKitCore["addReply"]>): Promise<void>;
|
|
41
|
+
updateReply(...args: Parameters<CommentKitCore["updateReply"]>): Promise<void>;
|
|
44
42
|
deleteReply(commentId: string, replyId: string): Promise<void>;
|
|
45
|
-
reactToComment(
|
|
43
|
+
reactToComment(...args: Parameters<CommentKitCore["reactToComment"]>): Promise<void>;
|
|
46
44
|
updateCommentPosition(commentId: string, x: number, y: number): Promise<void>;
|
|
45
|
+
setBranch(branch: string | null): Promise<void>;
|
|
46
|
+
reloadProjectContext(): Promise<void>;
|
|
47
|
+
reloadComments(): Promise<void>;
|
|
47
48
|
loadMoreComments(): Promise<void>;
|
|
48
49
|
createHighlight(...args: Parameters<CommentKitCore["createHighlight"]>): Promise<void>;
|
|
49
50
|
createDrawing(...args: Parameters<CommentKitCore["createDrawing"]>): Promise<void>;
|
|
50
51
|
setActiveDrawing(drawing: DrawingData | null): void;
|
|
51
52
|
sendDrawingStroke(path: DrawingPath): void;
|
|
52
53
|
captureScreenshot(el?: HTMLElement): Promise<ScreenshotResult | null>;
|
|
53
|
-
uploadScreenshot(...args: Parameters<CommentKitCore["uploadScreenshot"]>): Promise<import("
|
|
54
|
+
uploadScreenshot(...args: Parameters<CommentKitCore["uploadScreenshot"]>): Promise<import("./headless").Comment | null>;
|
|
54
55
|
setActiveScreenshot(screenshot: ScreenshotResult | null): void;
|
|
55
|
-
uploadFiles(
|
|
56
|
-
getOnlineUsers(): import("
|
|
57
|
-
getProjectMembers(): Promise<import("
|
|
56
|
+
uploadFiles(...args: Parameters<CommentKitCore["uploadFiles"]>): Promise<string[]>;
|
|
57
|
+
getOnlineUsers(): import("./headless").User[];
|
|
58
|
+
getProjectMembers(): Promise<import("./headless").User[]>;
|
|
58
59
|
toggleShortcutsOverlay(): void;
|
|
59
60
|
markThreadSeen(threadId: string): void;
|
|
60
61
|
isThreadNew(threadId: string): boolean;
|
|
62
|
+
blockEscape(): () => void;
|
|
61
63
|
setPanelView(view: Parameters<CommentKitCore["setPanelView"]>[0]): void;
|
|
62
64
|
markAllActivitiesRead(): void;
|
|
63
65
|
getUnreadActivityCount(): number;
|
|
64
66
|
getPendingMutationCount(): number;
|
|
65
|
-
getAgentContext(...args: Parameters<CommentKitCore["getAgentContext"]>): import("
|
|
66
|
-
getAgentContextAsync(...args: Parameters<CommentKitCore["getAgentContextAsync"]>): Promise<import("
|
|
67
|
+
getAgentContext(...args: Parameters<CommentKitCore["getAgentContext"]>): import("./headless").AgentContextExport;
|
|
68
|
+
getAgentContextAsync(...args: Parameters<CommentKitCore["getAgentContextAsync"]>): Promise<import("./headless").AgentContextExport>;
|
|
67
69
|
formatAgentContext(...args: Parameters<CommentKitCore["formatAgentContext"]>): string;
|
|
68
70
|
formatAgentContextAsync(...args: Parameters<CommentKitCore["formatAgentContextAsync"]>): Promise<string>;
|
|
69
71
|
copyAgentContext(...args: Parameters<CommentKitCore["copyAgentContext"]>): Promise<string>;
|
|
70
72
|
grabElement(...args: Parameters<CommentKitCore["grabElement"]>): Promise<import("./core/types").DevGrabResult | null>;
|
|
71
73
|
grabElements(...args: Parameters<CommentKitCore["grabElements"]>): Promise<import("./core/types").DevGrabBundle | null>;
|
|
72
|
-
on<K extends keyof CommentKitEvents>(event: K, listener: EventListener<CommentKitEvents[K]>): import("
|
|
74
|
+
on<K extends keyof CommentKitEvents>(event: K, listener: EventListener<CommentKitEvents[K]>): import("./headless").Unsubscribe;
|
|
73
75
|
off<K extends keyof CommentKitEvents>(event: K, listener: EventListener<CommentKitEvents[K]>): void;
|
|
74
|
-
onSlice(...args: Parameters<CommentKitCore["onSlice"]>): import("
|
|
75
|
-
select(...args: Parameters<CommentKitCore["select"]>): import("
|
|
76
|
+
onSlice(...args: Parameters<CommentKitCore["onSlice"]>): import("./headless").Unsubscribe;
|
|
77
|
+
select(...args: Parameters<CommentKitCore["select"]>): import("./headless").Unsubscribe;
|
|
76
78
|
getCore(): CommentKitCore;
|
|
77
79
|
destroy(): void;
|
|
78
80
|
}
|
|
@@ -66,5 +66,8 @@ export interface QwikCommentKitReturn extends AdapterMethods {
|
|
|
66
66
|
* read the live instance from the returned `core` signal instead:
|
|
67
67
|
* `core.value?.toggleOverlay()`.
|
|
68
68
|
*/
|
|
69
|
-
export declare function useCommentKit
|
|
69
|
+
export declare function useCommentKit(options: QwikCommentKitOptions): QwikCommentKitReturn;
|
|
70
|
+
/** @deprecated Use useCommentKit: its argument is configuration, not a QRL. */
|
|
71
|
+
export { useCommentKit as useCommentKit$ };
|
|
72
|
+
export { useCommentKit as useCommentKitQrl };
|
|
70
73
|
export type { AgentCommentContext, AgentContextExport, AgentContextOptions, AgentElementContext, ApiError, Comment, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DevGrabAttachment, DevGrabAttachmentPathSource, DevGrabOptions, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User, } from "../core/types";
|