@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
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ Drop-in SDK for React, Vue, Svelte, Angular, Solid.js, Qwik, Preact, and vanilla
|
|
|
5
5
|
|
|
6
6
|
[npm version](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
7
7
|
[downloads](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
8
|
-
[license](
|
|
9
|
-
[docs](https://commentkit.dev/
|
|
8
|
+
[license](./LICENSE)
|
|
9
|
+
[docs](https://commentkit.dev/developers)
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ Drop-in SDK for React, Vue, Svelte, Angular, Solid.js, Qwik, Preact, and vanilla
|
|
|
36
36
|
| **Hold-to-Activate** | Configure select mode to be active only while a modifier key is held (`Alt`, `Meta`, `Control`, `Shift`) |
|
|
37
37
|
| **Animation Freeze** | While selecting, all host-page CSS animations, transitions, and Web Animations API tweens pause |
|
|
38
38
|
| **Touch Mode** | Long-press opens the context menu on touch devices |
|
|
39
|
-
| **MCP
|
|
39
|
+
| **MCP Companion** | Separate repository companion for MCP integrations; public npm distribution is not yet available |
|
|
40
40
|
| **Keyboard Shortcuts** | Full keyboard navigation and tool shortcuts |
|
|
41
41
|
| **Shadow DOM Isolation** | UI is fully isolated from your app's styles |
|
|
42
42
|
| **Environment Scoping** | New comments are tagged to production, staging, preview, or dev |
|
|
@@ -48,52 +48,54 @@ Drop-in SDK for React, Vue, Svelte, Angular, Solid.js, Qwik, Preact, and vanilla
|
|
|
48
48
|
|
|
49
49
|
### 1. Install
|
|
50
50
|
|
|
51
|
+
For an app that already has matching React and ReactDOM 18+ versions:
|
|
52
|
+
|
|
51
53
|
```bash
|
|
52
54
|
npm install @commentkit/comment-kit
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
For vanilla, Vue, Svelte, Angular, Solid, Qwik, or Preact apps using the built-in widget:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install @commentkit/comment-kit react react-dom
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Every adapter renders the same React widget. React and ReactDOM are optional in package metadata so a headless installation can omit them; **all built-in UI integrations still need both**. Keep existing compatible React versions rather than upgrading them just to install CommentKit. Your adapter's framework is also a peer dependency.
|
|
64
|
+
|
|
65
|
+
The package is ESM-only; use `import`, not CommonJS `require()`. For default screenshots and image captures, also install `html2canvas`, or supply a custom `screenshotProvider`:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install html2canvas
|
|
69
|
+
```
|
|
70
|
+
|
|
55
71
|
### 2. Get Your API Key
|
|
56
72
|
|
|
57
73
|
1. Sign up at [commentkit.dev](https://commentkit.dev)
|
|
58
74
|
2. Create an organization
|
|
59
75
|
3. Create a project inside the organization
|
|
60
|
-
4.
|
|
76
|
+
4. Add the website domains that may use this project to its **allowed domains**
|
|
77
|
+
5. Copy the **API key** from the project dashboard
|
|
61
78
|
|
|
62
|
-
Each project gets its own API key. The SDK reads
|
|
79
|
+
Each project gets its own browser-facing API key. The SDK reads the project ID, WebSocket configuration and features from the API automatically. An empty origin allowlist denies browser requests by default. The project key identifies the project; a verified user session is still required to read private context and mutate feedback. Never embed user Bearer tokens or server credentials in your application source.
|
|
63
80
|
|
|
64
81
|
### 3. Add to Your App
|
|
65
82
|
|
|
66
|
-
**
|
|
83
|
+
On localhost the toolbar is visible. On production, staging and preview sites, press **Cmd/Ctrl + Shift + K** to open sign-in, then verify your email with OTP. Mount one instance for the app and clean it up when its host unmounts.
|
|
67
84
|
|
|
68
|
-
Next.js
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
// app/comment-kit-client.tsx
|
|
72
|
-
"use client";
|
|
73
|
-
import dynamic from "next/dynamic";
|
|
74
|
-
|
|
75
|
-
const CommentKit = dynamic(
|
|
76
|
-
() => import("@commentkit/comment-kit/react").then((m) => m.CommentKit),
|
|
77
|
-
{
|
|
78
|
-
ssr: false,
|
|
79
|
-
},
|
|
80
|
-
);
|
|
85
|
+
**Next.js (App Router)**
|
|
81
86
|
|
|
82
|
-
|
|
83
|
-
return <CommentKit apiKey={props.apiKey} />;
|
|
84
|
-
}
|
|
85
|
-
```
|
|
87
|
+
Import the client entry directly from your layout. The published React entry retains its `"use client"` boundary, and browser UI mounting happens after hydration. A `next/dynamic` wrapper with `ssr: false` is no longer required.
|
|
86
88
|
|
|
87
89
|
```tsx
|
|
88
90
|
// app/layout.tsx
|
|
89
|
-
import {
|
|
91
|
+
import { CommentKit } from "@commentkit/comment-kit/react";
|
|
90
92
|
|
|
91
93
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
92
94
|
return (
|
|
93
95
|
<html lang="en">
|
|
94
96
|
<body>
|
|
95
97
|
{children}
|
|
96
|
-
<
|
|
98
|
+
<CommentKit apiKey="your-api-key" />
|
|
97
99
|
</body>
|
|
98
100
|
</html>
|
|
99
101
|
);
|
|
@@ -180,25 +182,25 @@ const { isAuthenticated, comments, toggleOverlay } = useCommentKit({
|
|
|
180
182
|
Or register as a plugin:
|
|
181
183
|
|
|
182
184
|
```ts
|
|
183
|
-
// main.ts —
|
|
185
|
+
// main.ts — registers the <CommentKit> component
|
|
184
186
|
import { CommentKitPlugin } from "@commentkit/comment-kit/vue";
|
|
185
187
|
|
|
186
188
|
app.use(CommentKitPlugin);
|
|
187
189
|
```
|
|
188
190
|
|
|
191
|
+
Then mount `<CommentKit api-key="your-api-key" />` once in your root template.
|
|
192
|
+
|
|
189
193
|
**Nuxt 3 / Nuxt 4**
|
|
190
194
|
|
|
191
|
-
|
|
195
|
+
For a client-only Nuxt integration, use a component whose filename ends in `.client.vue`. Its setup registers the hook, and Nuxt handles client mounting.
|
|
192
196
|
|
|
193
197
|
```vue
|
|
194
198
|
<!-- components/CommentKitClient.client.vue -->
|
|
195
199
|
<script setup lang="ts">
|
|
196
|
-
import { onMounted } from "vue";
|
|
197
200
|
import { useCommentKit } from "@commentkit/comment-kit/vue";
|
|
198
201
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
});
|
|
202
|
+
// Register lifecycle hooks during setup; the .client.vue boundary handles SSR.
|
|
203
|
+
useCommentKit({ apiKey: "your-api-key" });
|
|
202
204
|
</script>
|
|
203
205
|
|
|
204
206
|
<template><div /></template>
|
|
@@ -234,18 +236,28 @@ onMounted(() => {
|
|
|
234
236
|
|
|
235
237
|
**SvelteKit**
|
|
236
238
|
|
|
237
|
-
|
|
239
|
+
For an explicit client-only SvelteKit integration, create the store after a dynamic import and return synchronous teardown from `onMount`. `useCommentKit` registers Svelte lifecycle hooks, so call it during component initialization rather than after an `await`.
|
|
238
240
|
|
|
239
241
|
```svelte
|
|
240
242
|
<!-- src/routes/+layout.svelte -->
|
|
241
243
|
<script lang="ts">
|
|
242
244
|
import { onMount } from "svelte";
|
|
243
|
-
import {
|
|
244
|
-
|
|
245
|
-
onMount(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
import type { SvelteCommentKitStore } from "@commentkit/comment-kit/svelte";
|
|
246
|
+
|
|
247
|
+
onMount(() => {
|
|
248
|
+
let disposed = false;
|
|
249
|
+
let store: SvelteCommentKitStore | undefined;
|
|
250
|
+
|
|
251
|
+
void import("@commentkit/comment-kit/svelte")
|
|
252
|
+
.then(({ createCommentKitStore }) => {
|
|
253
|
+
if (!disposed) store = createCommentKitStore({ apiKey: "your-api-key" });
|
|
254
|
+
})
|
|
255
|
+
.catch((error) => console.error("CommentKit could not load", error));
|
|
256
|
+
|
|
257
|
+
return () => {
|
|
258
|
+
disposed = true;
|
|
259
|
+
store?.destroy();
|
|
260
|
+
};
|
|
249
261
|
});
|
|
250
262
|
</script>
|
|
251
263
|
|
|
@@ -272,11 +284,12 @@ export const appConfig = {
|
|
|
272
284
|
|
|
273
285
|
```typescript
|
|
274
286
|
// app.component.ts
|
|
287
|
+
import { Component, inject } from "@angular/core";
|
|
275
288
|
import { CommentKitService } from "@commentkit/comment-kit/angular";
|
|
276
289
|
|
|
277
|
-
@Component({
|
|
290
|
+
@Component({ selector: "app-root", standalone: true, template: "<main>Your app</main>" })
|
|
278
291
|
export class AppComponent {
|
|
279
|
-
|
|
292
|
+
private readonly commentKit = inject(CommentKitService);
|
|
280
293
|
|
|
281
294
|
// RxJS observables — auto-emit on state changes
|
|
282
295
|
comments$ = this.commentKit.comments$;
|
|
@@ -303,19 +316,27 @@ function App() {
|
|
|
303
316
|
|
|
304
317
|
```tsx
|
|
305
318
|
import { component$ } from "@builder.io/qwik";
|
|
306
|
-
import { useCommentKit
|
|
319
|
+
import { useCommentKit } from "@commentkit/comment-kit/qwik";
|
|
307
320
|
|
|
308
321
|
export default component$(() => {
|
|
309
|
-
//
|
|
310
|
-
//
|
|
311
|
-
const {
|
|
322
|
+
// The hook uses useVisibleTask$ to mount only on the client.
|
|
323
|
+
// The Shadow DOM widget still requires React and ReactDOM.
|
|
324
|
+
const { core, isReady } = useCommentKit({
|
|
312
325
|
apiKey: "your-api-key",
|
|
313
326
|
});
|
|
314
327
|
|
|
315
|
-
return
|
|
328
|
+
return (
|
|
329
|
+
<button disabled={!isReady.value} onClick$={() => core.value?.toggleOverlay()}>
|
|
330
|
+
Toggle comments
|
|
331
|
+
</button>
|
|
332
|
+
);
|
|
316
333
|
});
|
|
317
334
|
```
|
|
318
335
|
|
|
336
|
+
Call the hook inside `component$`. In Qwik event handlers, access methods through the destructured `core` signal as above; do not capture plain bridge callbacks across an `onClick$` boundary. `useCommentKit$` remains a deprecated compatibility alias.
|
|
337
|
+
|
|
338
|
+
Use Qwik's optimizer and its supported Vite version to build the host app. Qwik 1.20.2 has an upstream declaration error that requires `skipLibCheck: true`; CommentKit's consumer API expressions are still checked. Client-only function options such as `screenshotProvider` cannot survive server serialization; Qwik callbacks that must resume should use `onReady$` and `onError$`.
|
|
339
|
+
|
|
319
340
|
**Preact**
|
|
320
341
|
|
|
321
342
|
```tsx
|
|
@@ -323,7 +344,7 @@ import { useCommentKit } from "@commentkit/comment-kit/preact";
|
|
|
323
344
|
|
|
324
345
|
function App() {
|
|
325
346
|
// Preact hooks — lightweight React alternative.
|
|
326
|
-
// Full UI mounts in Shadow DOM via React (
|
|
347
|
+
// Full UI mounts in Shadow DOM via React and ReactDOM (UI peers).
|
|
327
348
|
const { state, core } = useCommentKit({
|
|
328
349
|
apiKey: "your-api-key",
|
|
329
350
|
});
|
|
@@ -371,10 +392,12 @@ Or use vanilla JS in any `.astro` page:
|
|
|
371
392
|
</script>
|
|
372
393
|
```
|
|
373
394
|
|
|
374
|
-
**Vanilla JavaScript**
|
|
395
|
+
**Vanilla JavaScript with a bundler**
|
|
396
|
+
|
|
397
|
+
The following package import is resolved by a bundler such as Vite. A standalone HTML page needs a browser-ready bundle or an import map for the SDK and its peers; browsers do not resolve bare npm package names by themselves.
|
|
375
398
|
|
|
376
399
|
```html
|
|
377
|
-
<!-- CommentKit
|
|
400
|
+
<!-- In a bundler-managed HTML entry, CommentKit mounts its widget on demand.
|
|
378
401
|
Theme follows .dark class on <html> or system preference.
|
|
379
402
|
Tooltips, dialogs, and panels are built-in. -->
|
|
380
403
|
<script type="module">
|
|
@@ -389,6 +412,37 @@ Or use vanilla JS in any `.astro` page:
|
|
|
389
412
|
|
|
390
413
|
---
|
|
391
414
|
|
|
415
|
+
## Headless and Demo Entries
|
|
416
|
+
|
|
417
|
+
Use the engine without the built-in widget or React dependencies:
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
import { CommentKitCore } from "@commentkit/comment-kit/headless";
|
|
421
|
+
|
|
422
|
+
const core = new CommentKitCore({ apiKey: "your-api-key" });
|
|
423
|
+
const unsubscribe = core.on("state:changed", (state) => {
|
|
424
|
+
// Render state in your own interface.
|
|
425
|
+
console.log(state.comments);
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
// When your integration unmounts:
|
|
429
|
+
// unsubscribe();
|
|
430
|
+
// core.destroy();
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
The headless entry exports the engine, API types, and helpers without widget mounting or `window.CommentKit` registration. Browser features such as element selection and screenshots still require a DOM.
|
|
434
|
+
|
|
435
|
+
For a website's opt-in product sandbox, load the dedicated demo entry on demand:
|
|
436
|
+
|
|
437
|
+
```ts
|
|
438
|
+
// Inside your "Try the demo" click handler:
|
|
439
|
+
const { createCommentKitDemo } = await import("@commentkit/comment-kit/demo");
|
|
440
|
+
const demo = await createCommentKitDemo({ storageKey: "website-demo" });
|
|
441
|
+
// demo.reset() starts a fresh sandbox; demo.destroy() removes it.
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
The real widget uses a private browser store with a fixed 24-hour lifetime and a memory fallback when storage is unavailable. No project key, OTP, production API writes, uploads, or realtime connection is created. The demo UI needs React and ReactDOM. Its complete lifecycle and limits are in the included [private-demo guide](./docs/local-demo.md). The old root `createCommentKitDemo` export remains as a deprecated lazy compatibility wrapper.
|
|
445
|
+
|
|
392
446
|
## Member Invite Links
|
|
393
447
|
|
|
394
448
|
Invite external collaborators by email — they verify via OTP before they can comment:
|
|
@@ -440,11 +494,11 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
440
494
|
|
|
441
495
|
**Svelte family** — `@commentkit/comment-kit/svelte`
|
|
442
496
|
|
|
443
|
-
| Framework / Tool | Notes
|
|
444
|
-
| ------------------------ |
|
|
445
|
-
| Svelte 5 | Vite, esbuild — same import
|
|
446
|
-
| SvelteKit |
|
|
447
|
-
| Laravel Inertia (Svelte) | Mount in `app.ts`
|
|
497
|
+
| Framework / Tool | Notes |
|
|
498
|
+
| ------------------------ | --------------------------------------------------------------------- |
|
|
499
|
+
| Svelte 5 | Vite, esbuild — same import |
|
|
500
|
+
| SvelteKit | Create the store in `onMount` and destroy it on cleanup (see snippet) |
|
|
501
|
+
| Laravel Inertia (Svelte) | Mount in `app.ts` |
|
|
448
502
|
|
|
449
503
|
**Angular family** — `@commentkit/comment-kit/angular`
|
|
450
504
|
|
|
@@ -464,10 +518,10 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
464
518
|
|
|
465
519
|
**Qwik family** — `@commentkit/comment-kit/qwik`
|
|
466
520
|
|
|
467
|
-
| Framework / Tool | Notes
|
|
468
|
-
| ---------------- |
|
|
469
|
-
| Qwik |
|
|
470
|
-
| QwikCity | Same;
|
|
521
|
+
| Framework / Tool | Notes |
|
|
522
|
+
| ---------------- | ----------------------------------------------------------------------- |
|
|
523
|
+
| Qwik | Call `useCommentKit` inside `component$`; the hook owns client mounting |
|
|
524
|
+
| QwikCity | Same; use in the root component or a shared layout |
|
|
471
525
|
|
|
472
526
|
**Preact family** — `@commentkit/comment-kit/preact`
|
|
473
527
|
|
|
@@ -485,19 +539,19 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
485
539
|
|
|
486
540
|
**Vanilla / Web Components / HTML-first** — `@commentkit/comment-kit`
|
|
487
541
|
|
|
488
|
-
| Framework / Tool | Notes
|
|
489
|
-
| -------------------------- |
|
|
490
|
-
| Plain HTML (no framework) |
|
|
491
|
-
| Web Components / Lit | Mount in `connectedCallback` of a host component
|
|
492
|
-
| Stencil | Mount in `componentDidLoad`
|
|
493
|
-
| Marko (eBay) | Mount in client init
|
|
494
|
-
| Alpine.js / Petite-Vue | `<script>` tag at end of `<body>`
|
|
495
|
-
| htmx | Same as plain HTML
|
|
496
|
-
| Stimulus / Hotwire (Rails) | Mount in a Stimulus controller's `connect()`
|
|
497
|
-
| Phoenix LiveView | Mount in a `hook.mounted()`
|
|
498
|
-
| Laravel Livewire | Mount in Livewire hook
|
|
499
|
-
| Laravel Filament | Drop the `<script>` into a custom page layout
|
|
500
|
-
| Mitosis | Mount in the compiled framework's init
|
|
542
|
+
| Framework / Tool | Notes |
|
|
543
|
+
| -------------------------- | --------------------------------------------------------------------- |
|
|
544
|
+
| Plain HTML (no framework) | Browser-ready bundle or import map, then `new CommentKit({ apiKey })` |
|
|
545
|
+
| Web Components / Lit | Mount in `connectedCallback` of a host component |
|
|
546
|
+
| Stencil | Mount in `componentDidLoad` |
|
|
547
|
+
| Marko (eBay) | Mount in client init |
|
|
548
|
+
| Alpine.js / Petite-Vue | `<script>` tag at end of `<body>` |
|
|
549
|
+
| htmx | Same as plain HTML |
|
|
550
|
+
| Stimulus / Hotwire (Rails) | Mount in a Stimulus controller's `connect()` |
|
|
551
|
+
| Phoenix LiveView | Mount in a `hook.mounted()` |
|
|
552
|
+
| Laravel Livewire | Mount in Livewire hook |
|
|
553
|
+
| Laravel Filament | Drop the `<script>` into a custom page layout |
|
|
554
|
+
| Mitosis | Mount in the compiled framework's init |
|
|
501
555
|
|
|
502
556
|
**WebView / hybrid shells** — `@commentkit/comment-kit` (vanilla), works the same as a normal page
|
|
503
557
|
|
|
@@ -537,7 +591,7 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
537
591
|
| ? | Show shortcuts overlay |
|
|
538
592
|
| Esc | Close / deselect / exit mode |
|
|
539
593
|
|
|
540
|
-
>
|
|
594
|
+
> Tool shortcuts require authentication and a visible overlay or active tool, with no input focused. Cmd/Ctrl + Shift + K also opens sign-in before authentication. Cmd/Ctrl + C respects active text selections — system copy still wins when text is highlighted.
|
|
541
595
|
|
|
542
596
|
---
|
|
543
597
|
|
|
@@ -545,7 +599,7 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
545
599
|
|
|
546
600
|
| Package | Required | Min Version |
|
|
547
601
|
| ----------------------------------- | ----------------------------------------------------------------------------- | ----------- |
|
|
548
|
-
| `react` + `react-dom` |
|
|
602
|
+
| `react` + `react-dom` | Built-in UI, including vanilla and non-React adapters | `>=18.0.0` |
|
|
549
603
|
| `vue` | Only for Vue apps | `>=3.0.0` |
|
|
550
604
|
| `svelte` | Only for Svelte apps | `>=4.0.0` |
|
|
551
605
|
| `@angular/core` + `@angular/common` | Only for Angular apps | `>=17.0.0` |
|
|
@@ -553,11 +607,11 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
553
607
|
| `solid-js` | Only for Solid.js apps | `>=1.0.0` |
|
|
554
608
|
| `@builder.io/qwik` | Only for Qwik apps | `>=1.0.0` |
|
|
555
609
|
| `preact` | Only for Preact apps | `>=10.0.0` |
|
|
556
|
-
| `html2canvas` |
|
|
610
|
+
| `html2canvas` | For default screenshots; not needed with a custom `screenshotProvider` | `>=1.4.0` |
|
|
557
611
|
| `pusher-js` | Bundled — no install needed (inlined into the SDK for real-time) | — |
|
|
558
612
|
| `element-source` | Optional — enables file:line + component stack in agent context and dev grabs | `>=0.0.5` |
|
|
559
613
|
|
|
560
|
-
|
|
614
|
+
**Migration note:** React and ReactDOM are now optional npm peers, so npm will not install them automatically for a new headless-only consumer. UI consumers must declare compatible versions of both explicitly. Headless imports from `@commentkit/comment-kit/headless` do not require either. The minimum UI peer version remains React 18; using a non-React adapter does not remove this UI runtime requirement.
|
|
561
615
|
|
|
562
616
|
## Agent Handoff
|
|
563
617
|
|
|
@@ -594,7 +648,7 @@ Source resolution kicks in when the optional `element-source` peer dep is instal
|
|
|
594
648
|
|
|
595
649
|
### 3. Bulk export of stakeholder comments (developer, local)
|
|
596
650
|
|
|
597
|
-
The toolbar's **Dev export** button (visible only on localhost) opens a side panel listing
|
|
651
|
+
The toolbar's **Dev export** button (visible only on localhost) opens a side panel listing loaded open stakeholder comments from production / staging / preview. Load additional pages in the comments panel before exporting a larger selection. Select N comments, click **Copy N for agent**, and the clipboard receives one bundled Markdown payload — each comment's content, replies, author, page URL, the stakeholder's screenshot, the element's resolved source location (looked up against the developer's local build), and the selector / XPath fallback.
|
|
598
652
|
|
|
599
653
|
```ts
|
|
600
654
|
await commentKit.copyAgentContext({
|
|
@@ -607,11 +661,9 @@ const prompt = await commentKit.formatAgentContextAsync({ includeResolved: false
|
|
|
607
661
|
|
|
608
662
|
### MCP server
|
|
609
663
|
|
|
610
|
-
The
|
|
664
|
+
The separate `comment-kit-mcp` companion implements `list_comments`, `get_comment`, and `search_comments` for MCP clients. It is not included in this SDK, and that package name is not currently available from the public npm registry. Do not use an `npx comment-kit-mcp` command until its distribution is published.
|
|
611
665
|
|
|
612
|
-
|
|
613
|
-
npx -y comment-kit-mcp
|
|
614
|
-
```
|
|
666
|
+
Contributors with access to the private repository can follow the [MCP development guide](https://github.com/commentkit/comment-kit/blob/main/mcp/README.md). Clipboard-based agent handoff works directly from the SDK and does not require this companion.
|
|
615
667
|
|
|
616
668
|
---
|
|
617
669
|
|
|
@@ -622,6 +674,7 @@ Most apps only need `apiKey`. Everything else is auto-configured.
|
|
|
622
674
|
```typescript
|
|
623
675
|
{
|
|
624
676
|
apiKey: "your-api-key", // required — from dashboard
|
|
677
|
+
branch: "main", // optional — tag new feedback and filter this branch
|
|
625
678
|
enabled: true, // optional — set false to disable completely
|
|
626
679
|
screenshotProvider: async (el) => {...}, // optional — replaces html2canvas
|
|
627
680
|
ui: {
|
|
@@ -640,12 +693,20 @@ Most apps only need `apiKey`. Everything else is auto-configured.
|
|
|
640
693
|
}
|
|
641
694
|
```
|
|
642
695
|
|
|
696
|
+
### Project context and branches
|
|
697
|
+
|
|
698
|
+
After authentication, the SDK retrieves the actual team members, roles, storage usage and saved branches from the backend. The panel's **All** tab spans project pages; **Page** filters loaded threads to the current path. Use **Load more comments** to retrieve additional records. Shared links retrieve their target even when it is not in the first page.
|
|
699
|
+
|
|
700
|
+
`core.setBranch("preview")` filters that branch and tags new comments. `core.setBranch(null)` shows all branches. `core.reloadProjectContext()` refreshes members and usage. These APIs require the backend upgrade described below; old untagged records stay visible under All branches. `core.reloadComments()` refreshes the first page of the active branch, while `loadMoreComments()` appends the next page.
|
|
701
|
+
|
|
702
|
+
The production composer uploads files before saving, reuses completed uploads when a save is retried, and sends description, checklist, assignee, mention and device context with the record. Reply quotes and reactions persist on the corresponding message. `ReplyOptions`, `ReplyTarget`, `CommentCreateOptions`, `CommentDeviceInfo` and `ProjectContext` are available from the headless entry.
|
|
703
|
+
|
|
643
704
|
### Realtime at scale
|
|
644
705
|
|
|
645
706
|
Live cursors are the one realtime feature whose cost grows with the number of
|
|
646
707
|
simultaneous viewers — each client can receive up to _(online peers × ~30fps)_
|
|
647
|
-
cursor events. The SDK
|
|
648
|
-
inbound
|
|
708
|
+
cursor events. The SDK bounds rendered cursor state and updates with three
|
|
709
|
+
inbound limits (per-peer ~30fps throttle, a distinct-cursor cap, and a global
|
|
649
710
|
per-second emit budget), and the online-users roster is capped at 500. For very
|
|
650
711
|
high-concurrency projects where cursor sharing isn't worth the bandwidth, set
|
|
651
712
|
`realtime.cursors: false` (stops outbound cursor whispers and drops inbound
|
|
@@ -664,27 +725,40 @@ To disable in production:
|
|
|
664
725
|
|
|
665
726
|
CommentKit is designed to be safe for production use on customer-facing websites.
|
|
666
727
|
|
|
667
|
-
| Concern | How CommentKit handles it
|
|
668
|
-
| ----------------------------- |
|
|
669
|
-
| **No telemetry** | The SDK sends
|
|
670
|
-
| **
|
|
671
|
-
| **No install scripts** | `
|
|
672
|
-
| **No dynamic code execution** | Zero `eval()`, `new Function()`, `innerHTML`, or `document.write`.
|
|
673
|
-
| **Shadow DOM isolation** |
|
|
674
|
-
| **Source maps disabled** | No `.map` files ship. No `sourceMappingURL` in built files.
|
|
675
|
-
| **OTP authentication** | All commenters verify via email OTP. No passwords stored.
|
|
676
|
-
| **Session persistence** | Sanctum Bearer token is kept in **sessionStorage** (tab-scoped) so in-tab refresh keeps auth and the offline queue can drain. Closing the tab clears the session; logout / auth-expiry also clear the offline queue. Prefer Bearer over `X-User-Email` (spoofable).
|
|
677
|
-
| **Origin allowlist** | Browser requests must match the project's `allowed_domains` (wildcards like `*.example.com` supported). Empty allowlists deny browser traffic unless the backend enables `COMMENTKIT_ALLOW_EMPTY_ALLOWED_DOMAINS`. Server/MCP clients may omit `Origin`.
|
|
678
|
-
| **
|
|
728
|
+
| Concern | How CommentKit handles it |
|
|
729
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
730
|
+
| **No telemetry** | The SDK sends no analytics or tracking events. Submitted feedback includes its author, page, content, attachments and optional browser/OS/viewport context. |
|
|
731
|
+
| **Network requests** | API calls use `api.commentkit.dev` by default or your configured `baseUrl`; realtime connects to the host returned by project configuration. Displayed attachments and avatars load their supplied URLs. Google Fonts is contacted only when you opt in via `ui.loadRemoteFonts: true`. |
|
|
732
|
+
| **No install scripts** | This package declares no `preinstall`, `install` or `postinstall` hooks. Build and publication checks are separate maintainer scripts. |
|
|
733
|
+
| **No dynamic code execution** | Zero `eval()`, `new Function()`, `innerHTML`, or `document.write`. |
|
|
734
|
+
| **Shadow DOM isolation** | Widget styles are scoped inside Shadow DOM. Annotation, element capture and screenshots intentionally inspect the host page to attach feedback; host permissions and browser restrictions still apply. |
|
|
735
|
+
| **Source maps disabled** | No `.map` files ship. No `sourceMappingURL` in built files. |
|
|
736
|
+
| **OTP authentication** | All commenters verify via email OTP. No passwords stored. |
|
|
737
|
+
| **Session persistence** | Sanctum Bearer token is kept in **sessionStorage** (tab-scoped) so in-tab refresh keeps auth and the offline queue can drain. Closing the tab clears the session; logout / auth-expiry also clear the offline queue. Prefer Bearer over `X-User-Email` (spoofable). |
|
|
738
|
+
| **Origin allowlist** | Browser requests must match the project's `allowed_domains` (wildcards like `*.example.com` supported). Empty allowlists deny browser traffic unless the backend enables `COMMENTKIT_ALLOW_EMPTY_ALLOWED_DOMAINS`. Server/MCP clients may omit `Origin`. |
|
|
739
|
+
| **Stored data** | Authenticated comments store author identity, feedback and submitted context. The SDK uses tab-scoped session storage and a bounded local retry queue; the private demo uses a separate expiring browser store. |
|
|
740
|
+
|
|
741
|
+
The retry queue uses project-scoped `localStorage` and binds each mutation to its authenticated user. It can outlive a tab; replay requires the same user to sign in again. Logout and expired sessions clear it. Browser storage is best-effort, and raw file uploads are not persisted for offline replay. Observe offline events to distinguish queued feedback from feedback saved on the server.
|
|
679
742
|
|
|
680
743
|
### Backend API contract (SDK ↔ backend-v2)
|
|
681
744
|
|
|
682
745
|
- Base path is `/api` (not `/api/v1`). Default host: `https://api.commentkit.dev/api`.
|
|
683
746
|
- Auth: `X-API-Key` on every route; user identity via `Authorization: Bearer` (Sanctum ability `sdk`). Prefer Bearer over `X-User-Email` (only honored when `COMMENTKIT_ALLOW_EMAIL_AUTH=true`).
|
|
684
|
-
- Attachments:
|
|
747
|
+
- Attachments: upload drafts to `POST .../files`, then pass `attachment_ids` on comment/reply create or update. Direct uploads may target an authorized `comment_id` or `reply_id`. Unlinked drafts do not appear on comments.
|
|
685
748
|
- MCP comment reads may use API key only when `COMMENTKIT_MACHINE_READ_ENABLED` is on; mutations still need Bearer.
|
|
686
749
|
- Realtime: bind `comment_completed` separately from `comment_updated`.
|
|
687
750
|
|
|
751
|
+
### Backend upgrade order
|
|
752
|
+
|
|
753
|
+
This release adds server-backed widget context, reply quotes/reactions, metadata and lifecycle timestamps. Customers using CommentKit’s hosted service only install the SDK after CommentKit has deployed its matching API. The following sequence is for operators of the backend-v2 deployment:
|
|
754
|
+
|
|
755
|
+
1. Prepare a database backup and the matching backend release. Apply its additive migrations with the backend release’s `php artisan migrate --force` command before routing traffic to new server code. Required migrations are `2026_10_16_105715_add_widget_context_to_comments_and_replies` and `2026_10_16_114945_add_status_timestamps_to_comments_table`.
|
|
756
|
+
2. Deploy that API, configure the project’s allowed domains, and verify OTP delivery, authenticated `/api/projects/{slug}/context`, comment/reply retrieval, attachments and realtime. Existing clients remain supported; historical lifecycle dates stay null.
|
|
757
|
+
3. Install the candidate SDK in staging. Verify create/reply/edit/reaction/resolve/reopen and reload against that deployed API with a dedicated test project. The private local demo does not exercise the API or migrations.
|
|
758
|
+
4. Release the website integration, then publish the new npm version only after the deployment checks and release approval. If the client must be rolled back, keep the additive schema in place; do not drop columns containing newly stored feedback.
|
|
759
|
+
|
|
760
|
+
An older API’s missing context route is tolerated during a rolling upgrade, but that fallback does not provide the new persistent workflows. Do not treat a working local demo as proof that the production backend is ready.
|
|
761
|
+
|
|
688
762
|
### Screenshot redaction
|
|
689
763
|
|
|
690
764
|
Screenshots mask `input[type="password"]` fields by default. To exclude any other sensitive element from capture, mark it with the `data-commentkit-redact` attribute — redacted elements are blanked out before the image leaves the browser.
|
|
@@ -705,45 +779,43 @@ See [SECURITY.md](./SECURITY.md) for how to report security issues and our suppo
|
|
|
705
779
|
|
|
706
780
|
## Bundle Size
|
|
707
781
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
| React (`@commentkit/comment-kit/react`) | 450 KB | ~117 KB |
|
|
712
|
-
| Vue (`@commentkit/comment-kit/vue`) | 104 KB | ~25 KB |
|
|
713
|
-
| Svelte (`@commentkit/comment-kit/svelte`) | 104 KB | ~25 KB |
|
|
714
|
-
| Angular (`@commentkit/comment-kit/angular`) | 111 KB | ~26 KB |
|
|
715
|
-
| Solid.js (`@commentkit/comment-kit/solid`) | 103 KB | ~25 KB |
|
|
716
|
-
| Qwik (`@commentkit/comment-kit/qwik`) | 102 KB | ~25 KB |
|
|
717
|
-
| Preact (`@commentkit/comment-kit/preact`) | 102 KB | ~25 KB |
|
|
782
|
+
The shared ESM build stores common engine, UI, and styles once across all framework adapters. A small activation shell loads first; the full widget and its styles load when a visible surface is requested. Drawing, screenshot selection/annotation, element grabs, developer export, and the image lightbox load when used. Access rules, restored sessions, invites, and explicit tool requests still determine when the UI appears.
|
|
783
|
+
|
|
784
|
+
Measured from the current development build on 2026-10-16; KB below means 1,000 bytes:
|
|
718
785
|
|
|
719
|
-
|
|
786
|
+
| Measurement | Before | Current |
|
|
787
|
+
| ----------------------------------------------------- | -------: | -------: |
|
|
788
|
+
| React initial SDK code, gzip | 262.8 KB | 42.2 KB |
|
|
789
|
+
| React through first widget open, cumulative gzip | — | 306.3 KB |
|
|
790
|
+
| React with every reachable optional chunk, gzip | 289.3 KB | 368.1 KB |
|
|
791
|
+
| Compressed npm archive, all adapters and declarations | 2.33 MB | 432.9 KB |
|
|
792
|
+
|
|
793
|
+
These are different measurements. Browser estimates sum each SDK chunk compressed with gzip level 9 and exclude React, ReactDOM, framework peers, `html2canvas`, and `element-source`. First-open size includes the initial code; it is not an additional 306.3 KB. The npm archive includes every adapter and is not a browser download. Host bundling, caching, and enabled realtime features affect actual requests. Archive size is approximate and changes with included documentation.
|
|
794
|
+
|
|
795
|
+
The initial React load is smaller because work is deferred; the complete optional feature set has not been removed. All 46 retained primitive families remain available; the main product screens now use their audited compositions. Contributors with repository access can read the [full port audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-full-port-audit.md) and [performance baseline](https://github.com/commentkit/comment-kit/blob/main/docs/package-performance-audit.md) for verification, limitations and reproduction commands. `npm run build` enforces the package and load-stage size budgets.
|
|
720
796
|
|
|
721
797
|
---
|
|
722
798
|
|
|
723
799
|
## Tech Stack
|
|
724
800
|
|
|
725
|
-
| Layer | Technology
|
|
726
|
-
| ------------- |
|
|
727
|
-
| Language | TypeScript (strict mode)
|
|
728
|
-
| UI Framework | React 19
|
|
729
|
-
| CSS Isolation | Shadow DOM with scoped CSS custom properties
|
|
730
|
-
| Real-Time | Pusher.js / Laravel Reverb (WebSocket)
|
|
731
|
-
| Bundler | Vite+ (Rolldown)
|
|
732
|
-
| Testing | Vitest
|
|
733
|
-
| Linting | OXC (oxlint)
|
|
734
|
-
| Formatting | OXC (oxfmt)
|
|
801
|
+
| Layer | Technology |
|
|
802
|
+
| ------------- | --------------------------------------------------------------------------- |
|
|
803
|
+
| Language | TypeScript (strict mode) |
|
|
804
|
+
| UI Framework | React 18+ peers; developed with React 19 and Base UI 1.9 primitives |
|
|
805
|
+
| CSS Isolation | Shadow DOM with scoped CSS custom properties |
|
|
806
|
+
| Real-Time | Pusher.js / Laravel Reverb (WebSocket) |
|
|
807
|
+
| Bundler | Vite+ (Rolldown) |
|
|
808
|
+
| Testing | Vitest 5 with standard V8 coverage + Playwright browser and consumer checks |
|
|
809
|
+
| Linting | OXC (oxlint) |
|
|
810
|
+
| Formatting | OXC (oxfmt) |
|
|
735
811
|
|
|
736
812
|
---
|
|
737
813
|
|
|
738
814
|
## Browser Support
|
|
739
815
|
|
|
740
|
-
|
|
741
|
-
| ------------- | ------- |
|
|
742
|
-
| Chrome / Edge | 80+ |
|
|
743
|
-
| Firefox | 80+ |
|
|
744
|
-
| Safari | 14+ |
|
|
816
|
+
Use current evergreen Chrome, Edge, Firefox or Safari. The UI requires Shadow DOM, Pointer Events and modern CSS color functions (`oklch` and `color-mix`). The browser test matrix targets current Playwright Chromium, Firefox and WebKit engines; older browser versions are not validated.
|
|
745
817
|
|
|
746
|
-
|
|
818
|
+
The published package declares **Node.js >=18**. Developing or building this repository requires **Node.js 24.15+** for the current Vite+, TypeScript, and framework toolchain. That development requirement does not raise the React 18 UI peer minimum.
|
|
747
819
|
|
|
748
820
|
---
|
|
749
821
|
|
|
@@ -751,6 +823,8 @@ Requires **Node.js >= 18** for build tooling.
|
|
|
751
823
|
|
|
752
824
|
For custom integrations, events, selective subscriptions, and TypeScript types, see the [API Reference](./docs/api-reference.md).
|
|
753
825
|
|
|
826
|
+
The repository is private. Contributors with access can run `npm run dev` and open `/design-system` to inspect all 46 internal primitive families in light/dark mode and RTL. The [development catalog guide](https://github.com/commentkit/comment-kit/blob/main/dev/README.md) explains its 111 examples and browser checks; the [primitive audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-primitive-parity-audit.md) records comparisons with the React reference. Open `/design-system/product` for the assembled panel, thread, composer, filters and settings with local fixture data and a simulated failed-save option. The [product audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-product-port-audit.md) records source comparisons and supported behavior. The gallery and its local fonts are development assets, excluded from the published package.
|
|
827
|
+
|
|
754
828
|
---
|
|
755
829
|
|
|
756
830
|
## License
|
|
@@ -761,10 +835,9 @@ CommentKit is proprietary software. See [LICENSE](./LICENSE) for details.
|
|
|
761
835
|
|
|
762
836
|
## Links
|
|
763
837
|
|
|
764
|
-
- [
|
|
765
|
-
- [
|
|
838
|
+
- [Developer guide](https://commentkit.dev/developers)
|
|
839
|
+
- [Sign in](https://commentkit.dev/auth/otp)
|
|
766
840
|
- [Changelog](./CHANGELOG.md)
|
|
767
|
-
- [GitHub](https://github.com/commentkit/comment-kit)
|
|
841
|
+
- [GitHub (private contributor repository)](https://github.com/commentkit/comment-kit)
|
|
768
842
|
- [npm](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
769
843
|
- [Twitter / X](https://x.com/commentkit)
|
|
770
|
-
- [Discord](https://discord.gg/commentkit)
|