@commentkit/comment-kit 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +73 -45
- package/dist/angular.es.js +47 -3411
- package/dist/comment-kit.es.js +13 -3184
- package/dist/demo.es.js +395 -0
- package/dist/headless.es.js +4 -0
- package/dist/preact.es.js +79 -3443
- package/dist/qwik.es.js +79 -3443
- package/dist/react.es.js +80 -28447
- package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
- package/dist/shared/annotation-toolbar-pX17NLmJ.js +1104 -0
- package/dist/shared/bridge-DRE03N9X.js +174 -0
- package/dist/shared/button-By0hGrJK.js +505 -0
- package/dist/shared/button-group-CHfMRXyA.js +93 -0
- package/dist/shared/clamp-CcFVX0vC.js +55 -0
- package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +126 -0
- package/dist/shared/comment-image-lightbox-0VdAs2iT.js +178 -0
- package/dist/shared/comment-kit-core-D0kY00St.js +3083 -0
- package/dist/shared/comment-kit-ui-D2j2gvnm.js +16685 -0
- package/dist/shared/comment-screenshot-annotator-BuojwviY.js +137 -0
- package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +144 -0
- package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
- package/dist/shared/dev-export-panel-BLngcr5q.js +208 -0
- package/dist/shared/dev-grab-pDAfH2lr.js +203 -0
- package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
- package/dist/shared/element-selector-CtFzgHvq.js +852 -0
- package/dist/shared/errors-Bu5ajEmB.js +22 -0
- package/dist/shared/icons-BSHCWYO1.js +267 -0
- package/dist/shared/local-demo-context-BohlYbHt.js +6 -0
- package/dist/shared/mount-ui-CVivB_eQ.js +193 -0
- package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-BEl7Qn-8.js} +93 -127
- package/dist/{core/realtime-C3_O7gi2.js → shared/realtime-BG_t_ze7.js} +75 -72
- package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +669 -0
- package/dist/shared/separator-DusFNTs-.js +3915 -0
- package/dist/shared/shadow-root-CmYXiSRR.js +135 -0
- package/dist/shared/styles-D_FEJZ9G.js +2 -0
- package/dist/shared/useLabelableId-DGbfdMi_.js +155 -0
- package/dist/shared/useValueChanged-DQXLia-2.js +92 -0
- package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
- package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-BTRqNTB7.js} +90 -148
- package/dist/solid.es.js +63 -3427
- package/dist/svelte.es.js +78 -3442
- package/dist/types/adapters/bridge.d.ts +1 -1
- package/dist/types/angular/index.d.ts +2 -2
- package/dist/types/core/comment-kit-core.d.ts +10 -1
- package/dist/types/core/local-demo.d.ts +59 -0
- package/dist/types/demo.d.ts +17 -0
- package/dist/types/headless.d.ts +8 -0
- package/dist/types/index.d.ts +14 -16
- package/dist/vue.es.js +80 -3443
- package/package.json +55 -37
- package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
- package/dist/angular/comment-kit-ui-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/shadow-root-DAtdjHG2.js +0 -93
- package/dist/core/styles-ClRoB6ro.js +0 -2
- package/dist/core/widget-theme-BWDYr7VR.js +0 -24
- package/dist/preact/chunk-CZ0PdaaN.js +0 -11
- package/dist/preact/comment-kit-ui-DEzn7J_P.js +0 -24898
- package/dist/preact/dom-_ULpq7rg.js +0 -104
- package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
- package/dist/preact/limits-C3ZEKcL_.js +0 -71
- package/dist/preact/mount-ui-Dx8en--W.js +0 -72
- package/dist/preact/pusher-BP4kCufH.js +0 -2504
- package/dist/preact/realtime-COin_nJF.js +0 -567
- package/dist/preact/shadow-root-D-NcwruG.js +0 -93
- package/dist/preact/styles-D6i7be5-.js +0 -2
- package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
- package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
- package/dist/qwik/comment-kit-ui-Dvwee2tw.js +0 -24898
- package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
- package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
- package/dist/qwik/limits-DK35yjGY.js +0 -71
- package/dist/qwik/mount-ui-DSAwNk_d.js +0 -72
- package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
- package/dist/qwik/realtime-DhfcBrwF.js +0 -567
- package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
- package/dist/qwik/styles-DmEmq5Lh.js +0 -2
- package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
- package/dist/react/chunk--MHYZ-zp.js +0 -12
- package/dist/react/limits-CpprSem3.js +0 -175
- package/dist/react/pusher-3dki8s2l.js +0 -2505
- package/dist/react/realtime-DGqScuox.js +0 -567
- package/dist/solid/chunk-B2NCWFvW.js +0 -11
- package/dist/solid/comment-kit-ui-ACW8BpEm.js +0 -24898
- package/dist/solid/dom-DqDH-Gml.js +0 -104
- package/dist/solid/error-boundary-9mimpbZA.js +0 -21
- package/dist/solid/limits-B_69IbLl.js +0 -71
- package/dist/solid/mount-ui-Dq1wj_tx.js +0 -72
- package/dist/solid/pusher-_RVNpj1f.js +0 -2504
- package/dist/solid/realtime-DbUJK4gU.js +0 -567
- package/dist/solid/shadow-root-CssU3bQb.js +0 -93
- package/dist/solid/styles-DbueS9xx.js +0 -2
- package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
- package/dist/svelte/chunk-Pi70BKld.js +0 -11
- package/dist/svelte/comment-kit-ui-Cx4u1g77.js +0 -24898
- package/dist/svelte/dom-MyTrWzy_.js +0 -104
- package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
- package/dist/svelte/limits-CURF22v3.js +0 -71
- package/dist/svelte/mount-ui-CBoNGLNS.js +0 -72
- package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
- package/dist/svelte/realtime-M1CJbCBA.js +0 -567
- package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
- package/dist/svelte/styles-BK_MaUpD.js +0 -2
- package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
- package/dist/types/adapters/errors.d.ts +0 -3
- package/dist/types/core/auth.d.ts +0 -18
- package/dist/types/core/comments.d.ts +0 -43
- package/dist/types/core/dev-grab.d.ts +0 -14
- package/dist/types/core/keyboard.d.ts +0 -12
- package/dist/types/core/limits.d.ts +0 -52
- package/dist/types/core/offline-queue.d.ts +0 -23
- package/dist/types/core/realtime.d.ts +0 -9
- package/dist/types/core/screenshot.d.ts +0 -12
- package/dist/types/core/session.d.ts +0 -9
- package/dist/types/core/source-resolver.d.ts +0 -19
- package/dist/types/core/state.d.ts +0 -24
- package/dist/types/react/comment-kit-ui.d.ts +0 -9
- package/dist/types/react/comments/comment-flow.d.ts +0 -8
- package/dist/types/react/comments/outcomes.d.ts +0 -28
- package/dist/types/react/comments/pin-geometry.d.ts +0 -12
- package/dist/types/react/comments/view-model.d.ts +0 -66
- package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
- package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
- package/dist/types/react/components/comment-actions.d.ts +0 -19
- package/dist/types/react/components/comment-body.d.ts +0 -8
- package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
- package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
- package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
- package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
- package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
- package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
- package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
- package/dist/types/react/components/comment-composer-media.d.ts +0 -17
- package/dist/types/react/components/comment-composer.d.ts +0 -4
- package/dist/types/react/components/comment-composer.types.d.ts +0 -41
- package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
- package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
- package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
- package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
- package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
- package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
- package/dist/types/react/components/comment-error-banner.d.ts +0 -8
- package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
- package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
- package/dist/types/react/components/comment-fab.d.ts +0 -34
- package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
- package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
- package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
- package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
- package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
- package/dist/types/react/components/comment-header.d.ts +0 -34
- package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
- package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
- package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
- package/dist/types/react/components/comment-images.d.ts +0 -7
- package/dist/types/react/components/comment-item.d.ts +0 -26
- package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
- package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
- package/dist/types/react/components/comment-kit.d.ts +0 -12
- package/dist/types/react/components/comment-list-filters.d.ts +0 -14
- package/dist/types/react/components/comment-login-modal.d.ts +0 -20
- package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
- package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
- package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
- package/dist/types/react/components/comment-marker.d.ts +0 -15
- package/dist/types/react/components/comment-member-list.d.ts +0 -10
- package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
- package/dist/types/react/components/comment-online-users.d.ts +0 -8
- package/dist/types/react/components/comment-page-ref.d.ts +0 -9
- package/dist/types/react/components/comment-panel-header.d.ts +0 -22
- package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
- package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
- package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
- package/dist/types/react/components/comment-panel.d.ts +0 -37
- package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
- package/dist/types/react/components/comment-reactions.d.ts +0 -11
- package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
- package/dist/types/react/components/comment-search-bar.d.ts +0 -7
- package/dist/types/react/components/comment-settings-view.d.ts +0 -20
- package/dist/types/react/components/comment-skeletons.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
- package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
- package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
- package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
- package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
- package/dist/types/react/components/comment-thread-list.d.ts +0 -16
- package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
- package/dist/types/react/components/comment-users-context.d.ts +0 -15
- package/dist/types/react/components/comment-utils.d.ts +0 -20
- package/dist/types/react/components/comment.d.ts +0 -26
- package/dist/types/react/components/constants.d.ts +0 -50
- package/dist/types/react/components/dev-export-panel.d.ts +0 -10
- package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
- package/dist/types/react/components/element-selector.d.ts +0 -11
- package/dist/types/react/components/live-region.d.ts +0 -16
- package/dist/types/react/components/screenshot-capture.d.ts +0 -17
- package/dist/types/react/components/status-indicator.d.ts +0 -43
- package/dist/types/react/components/ui.d.ts +0 -44
- package/dist/types/react/components/use-comment-composer.d.ts +0 -28
- package/dist/types/react/error-boundary.d.ts +0 -25
- package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
- package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
- package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
- package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
- package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
- package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
- package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
- package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
- package/dist/types/react/hooks/use-drawing.d.ts +0 -32
- package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
- package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
- package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
- package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
- package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
- package/dist/types/react/hooks/use-websocket.d.ts +0 -9
- package/dist/types/react/is-local-host.d.ts +0 -2
- package/dist/types/react/mount-ui.d.ts +0 -19
- package/dist/types/react/shadow-root.d.ts +0 -23
- package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
- package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
- package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
- package/dist/types/react/ui/lib/cn.d.ts +0 -12
- package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
- package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
- package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
- package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
- package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
- package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
- package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
- package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
- package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
- package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
- package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
- package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
- package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
- package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
- package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
- package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
- package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
- package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
- package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
- package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
- package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
- package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
- package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
- package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
- package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
- package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
- package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
- package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
- package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
- package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
- package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
- package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
- package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
- package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
- package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
- package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
- package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
- package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
- package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
- package/dist/types/utils/freeze-animations.d.ts +0 -8
- package/dist/types/utils/text.d.ts +0 -9
- package/dist/types/utils/validation.d.ts +0 -10
- package/dist/vue/chunk-DHrubWSL.js +0 -11
- package/dist/vue/comment-kit-ui-C3zijClM.js +0 -24898
- package/dist/vue/dom-C7krZAR8.js +0 -104
- package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
- package/dist/vue/limits-B6csdQeI.js +0 -71
- package/dist/vue/mount-ui-18BnLwCO.js +0 -72
- package/dist/vue/pusher-cmjNbW6a.js +0 -2504
- package/dist/vue/realtime-B0B5cE-E.js +0 -567
- package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
- package/dist/vue/styles-B0NAkbKu.js +0 -2
- package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
- /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function e(e) {
|
|
2
|
+
return typeof e == "object" && !!e && "error" in e && "message" in e && "code" in e;
|
|
3
|
+
}
|
|
4
|
+
function t(e) {
|
|
5
|
+
return e instanceof Error ? e.message : String(e);
|
|
6
|
+
}
|
|
7
|
+
function n(n) {
|
|
8
|
+
return e(n) ? n : {
|
|
9
|
+
error: "init_failed",
|
|
10
|
+
message: t(n),
|
|
11
|
+
code: 500
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function r(e) {
|
|
15
|
+
return {
|
|
16
|
+
error: "mount_failed",
|
|
17
|
+
message: "Failed to mount CommentKit UI",
|
|
18
|
+
code: 500,
|
|
19
|
+
details: { cause: e instanceof Error ? e.message : String(e) }
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export { r as n, n as t };
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
let i = e.forwardRef(function({ size: n = 24, stroke: i = 2, strokeWidth: a = i, children: o, ...s }, c) {
|
|
5
|
+
return /* @__PURE__ */ t("svg", {
|
|
6
|
+
ref: c,
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: n,
|
|
9
|
+
height: n,
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
color: "currentColor",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: a,
|
|
15
|
+
...s,
|
|
16
|
+
children: [r.map(([t, n]) => e.createElement(t, {
|
|
17
|
+
...n,
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: a
|
|
20
|
+
})), o]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
return i.displayName = n, i;
|
|
24
|
+
}
|
|
25
|
+
var r = n("Tick02Icon", [["path", {
|
|
26
|
+
d: "M5 14L8.5 17.5L19 6.5",
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
strokeWidth: "1.5",
|
|
31
|
+
key: "0"
|
|
32
|
+
}]]), i = n("MinusSignIcon", [["path", {
|
|
33
|
+
d: "M20 12L4 12",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeLinejoin: "round",
|
|
37
|
+
strokeWidth: "1.5",
|
|
38
|
+
key: "0"
|
|
39
|
+
}]]), a = n("ArrowRight01Icon", [["path", {
|
|
40
|
+
d: "M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
strokeWidth: "1.5",
|
|
45
|
+
key: "0"
|
|
46
|
+
}]]), o = n("MoreHorizontalCircle01Icon", [
|
|
47
|
+
["path", {
|
|
48
|
+
d: "M21 12C21 11.1716 20.3284 10.5 19.5 10.5C18.6716 10.5 18 11.1716 18 12C18 12.8284 18.6716 13.5 19.5 13.5C20.3284 13.5 21 12.8284 21 12Z",
|
|
49
|
+
stroke: "currentColor",
|
|
50
|
+
strokeWidth: "1.5",
|
|
51
|
+
key: "0"
|
|
52
|
+
}],
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5C12.8284 13.5 13.5 12.8284 13.5 12Z",
|
|
55
|
+
stroke: "currentColor",
|
|
56
|
+
strokeWidth: "1.5",
|
|
57
|
+
key: "1"
|
|
58
|
+
}],
|
|
59
|
+
["path", {
|
|
60
|
+
d: "M6 12C6 11.1716 5.32843 10.5 4.5 10.5C3.67157 10.5 3 11.1716 3 12C3 12.8284 3.67157 13.5 4.5 13.5C5.32843 13.5 6 12.8284 6 12Z",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
strokeWidth: "1.5",
|
|
63
|
+
key: "2"
|
|
64
|
+
}]
|
|
65
|
+
]), s = n("UnfoldMoreIcon", [["path", {
|
|
66
|
+
d: "M18 14C18 14 13.5811 19 12 19C10.4188 19 6 14 6 14",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
strokeLinecap: "round",
|
|
69
|
+
strokeLinejoin: "round",
|
|
70
|
+
strokeWidth: "1.5",
|
|
71
|
+
key: "0"
|
|
72
|
+
}], ["path", {
|
|
73
|
+
d: "M18 9.99996C18 9.99996 13.5811 5.00001 12 5C10.4188 4.99999 6 10 6 10",
|
|
74
|
+
stroke: "currentColor",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round",
|
|
77
|
+
strokeWidth: "1.5",
|
|
78
|
+
key: "1"
|
|
79
|
+
}]]), c = n("ArrowUp01Icon", [["path", {
|
|
80
|
+
d: "M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",
|
|
81
|
+
stroke: "currentColor",
|
|
82
|
+
strokeLinecap: "round",
|
|
83
|
+
strokeLinejoin: "round",
|
|
84
|
+
strokeWidth: "1.5",
|
|
85
|
+
key: "0"
|
|
86
|
+
}]]), l = n("ArrowDown01Icon", [["path", {
|
|
87
|
+
d: "M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",
|
|
88
|
+
stroke: "currentColor",
|
|
89
|
+
strokeLinecap: "round",
|
|
90
|
+
strokeLinejoin: "round",
|
|
91
|
+
strokeWidth: "1.5",
|
|
92
|
+
key: "0"
|
|
93
|
+
}]]), u = n("Cancel01Icon", [["path", {
|
|
94
|
+
d: "M18 6L6.00081 17.9992M17.9992 18L6 6.00085",
|
|
95
|
+
stroke: "currentColor",
|
|
96
|
+
strokeLinecap: "round",
|
|
97
|
+
strokeLinejoin: "round",
|
|
98
|
+
strokeWidth: "1.5",
|
|
99
|
+
key: "0"
|
|
100
|
+
}]]), d = n("CheckmarkCircle02Icon", [["path", {
|
|
101
|
+
d: "M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",
|
|
102
|
+
stroke: "currentColor",
|
|
103
|
+
strokeWidth: "1.5",
|
|
104
|
+
key: "0"
|
|
105
|
+
}], ["path", {
|
|
106
|
+
d: "M8 12.5L10.5 15L16 9",
|
|
107
|
+
stroke: "currentColor",
|
|
108
|
+
strokeLinecap: "round",
|
|
109
|
+
strokeLinejoin: "round",
|
|
110
|
+
strokeWidth: "1.5",
|
|
111
|
+
key: "1"
|
|
112
|
+
}]]), f = n("InformationCircleIcon", [
|
|
113
|
+
["circle", {
|
|
114
|
+
cx: "12",
|
|
115
|
+
cy: "12",
|
|
116
|
+
r: "10",
|
|
117
|
+
stroke: "currentColor",
|
|
118
|
+
strokeLinecap: "round",
|
|
119
|
+
strokeLinejoin: "round",
|
|
120
|
+
strokeWidth: "1.5",
|
|
121
|
+
key: "0"
|
|
122
|
+
}],
|
|
123
|
+
["path", {
|
|
124
|
+
d: "M12 16V12",
|
|
125
|
+
stroke: "currentColor",
|
|
126
|
+
strokeLinecap: "round",
|
|
127
|
+
strokeLinejoin: "round",
|
|
128
|
+
strokeWidth: "1.5",
|
|
129
|
+
key: "1"
|
|
130
|
+
}],
|
|
131
|
+
["path", {
|
|
132
|
+
d: "M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z",
|
|
133
|
+
stroke: "currentColor",
|
|
134
|
+
strokeLinecap: "round",
|
|
135
|
+
strokeLinejoin: "round",
|
|
136
|
+
strokeWidth: "1.5",
|
|
137
|
+
key: "2"
|
|
138
|
+
}]
|
|
139
|
+
]), p = n("Alert02Icon", [
|
|
140
|
+
["path", {
|
|
141
|
+
d: "M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",
|
|
142
|
+
stroke: "currentColor",
|
|
143
|
+
strokeLinecap: "round",
|
|
144
|
+
strokeLinejoin: "round",
|
|
145
|
+
strokeWidth: "1.5",
|
|
146
|
+
key: "0"
|
|
147
|
+
}],
|
|
148
|
+
["path", {
|
|
149
|
+
d: "M12 9V13",
|
|
150
|
+
stroke: "currentColor",
|
|
151
|
+
strokeLinecap: "round",
|
|
152
|
+
strokeLinejoin: "round",
|
|
153
|
+
strokeWidth: "1.5",
|
|
154
|
+
key: "1"
|
|
155
|
+
}],
|
|
156
|
+
["path", {
|
|
157
|
+
d: "M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z",
|
|
158
|
+
stroke: "currentColor",
|
|
159
|
+
strokeLinecap: "round",
|
|
160
|
+
strokeLinejoin: "round",
|
|
161
|
+
strokeWidth: "1.5",
|
|
162
|
+
key: "2"
|
|
163
|
+
}]
|
|
164
|
+
]);
|
|
165
|
+
n("MultiplicationSignCircleIcon", [["path", {
|
|
166
|
+
d: "M15.5 8.5L12 12M12 12L8.5 15.5M12 12L15.5 15.5M12 12L8.5 8.5",
|
|
167
|
+
stroke: "currentColor",
|
|
168
|
+
strokeLinecap: "round",
|
|
169
|
+
strokeLinejoin: "round",
|
|
170
|
+
strokeWidth: "1.5",
|
|
171
|
+
key: "0"
|
|
172
|
+
}], ["circle", {
|
|
173
|
+
cx: "12",
|
|
174
|
+
cy: "12",
|
|
175
|
+
r: "10",
|
|
176
|
+
stroke: "currentColor",
|
|
177
|
+
strokeWidth: "1.5",
|
|
178
|
+
key: "1"
|
|
179
|
+
}]]);
|
|
180
|
+
var m = n("MultiplicationSignCircleIcon", [["path", {
|
|
181
|
+
d: "M15.5 8.5L12 12M12 12L8.5 15.5M12 12L15.5 15.5M12 12L8.5 8.5",
|
|
182
|
+
stroke: "currentColor",
|
|
183
|
+
strokeLinecap: "round",
|
|
184
|
+
strokeLinejoin: "round",
|
|
185
|
+
strokeWidth: "1.5",
|
|
186
|
+
key: "0"
|
|
187
|
+
}], ["circle", {
|
|
188
|
+
cx: "12",
|
|
189
|
+
cy: "12",
|
|
190
|
+
r: "10",
|
|
191
|
+
stroke: "currentColor",
|
|
192
|
+
strokeWidth: "1.5",
|
|
193
|
+
key: "1"
|
|
194
|
+
}]]), h = n("Loading03Icon", [
|
|
195
|
+
["path", {
|
|
196
|
+
d: "M12 3V6",
|
|
197
|
+
stroke: "currentColor",
|
|
198
|
+
strokeLinecap: "round",
|
|
199
|
+
strokeWidth: "1.5",
|
|
200
|
+
key: "0"
|
|
201
|
+
}],
|
|
202
|
+
["path", {
|
|
203
|
+
d: "M12 18V21",
|
|
204
|
+
stroke: "currentColor",
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeWidth: "1.5",
|
|
207
|
+
key: "1"
|
|
208
|
+
}],
|
|
209
|
+
["path", {
|
|
210
|
+
d: "M21 12L18 12",
|
|
211
|
+
stroke: "currentColor",
|
|
212
|
+
strokeLinecap: "round",
|
|
213
|
+
strokeWidth: "1.5",
|
|
214
|
+
key: "2"
|
|
215
|
+
}],
|
|
216
|
+
["path", {
|
|
217
|
+
d: "M6 12L3 12",
|
|
218
|
+
stroke: "currentColor",
|
|
219
|
+
strokeLinecap: "round",
|
|
220
|
+
strokeWidth: "1.5",
|
|
221
|
+
key: "3"
|
|
222
|
+
}],
|
|
223
|
+
["path", {
|
|
224
|
+
d: "M18.3635 5.63672L16.2422 7.75804",
|
|
225
|
+
stroke: "currentColor",
|
|
226
|
+
strokeLinecap: "round",
|
|
227
|
+
strokeWidth: "1.5",
|
|
228
|
+
key: "4"
|
|
229
|
+
}],
|
|
230
|
+
["path", {
|
|
231
|
+
d: "M7.75804 16.2422L5.63672 18.3635",
|
|
232
|
+
stroke: "currentColor",
|
|
233
|
+
strokeLinecap: "round",
|
|
234
|
+
strokeWidth: "1.5",
|
|
235
|
+
key: "5"
|
|
236
|
+
}],
|
|
237
|
+
["path", {
|
|
238
|
+
d: "M18.3635 18.3635L16.2422 16.2422",
|
|
239
|
+
stroke: "currentColor",
|
|
240
|
+
strokeLinecap: "round",
|
|
241
|
+
strokeWidth: "1.5",
|
|
242
|
+
key: "6"
|
|
243
|
+
}],
|
|
244
|
+
["path", {
|
|
245
|
+
d: "M7.75804 7.75804L5.63672 5.63672",
|
|
246
|
+
stroke: "currentColor",
|
|
247
|
+
strokeLinecap: "round",
|
|
248
|
+
strokeWidth: "1.5",
|
|
249
|
+
key: "7"
|
|
250
|
+
}]
|
|
251
|
+
]);
|
|
252
|
+
n("ArrowDown02Icon", [["path", {
|
|
253
|
+
d: "M12 18.502V5.00195",
|
|
254
|
+
stroke: "currentColor",
|
|
255
|
+
strokeLinecap: "round",
|
|
256
|
+
strokeLinejoin: "round",
|
|
257
|
+
strokeWidth: "1.5",
|
|
258
|
+
key: "0"
|
|
259
|
+
}], ["path", {
|
|
260
|
+
d: "M18 13.002C18 13.002 13.5811 19.0019 12 19.002C10.4188 19.002 6 13.002 6 13.002",
|
|
261
|
+
stroke: "currentColor",
|
|
262
|
+
strokeLinecap: "round",
|
|
263
|
+
strokeLinejoin: "round",
|
|
264
|
+
strokeWidth: "1.5",
|
|
265
|
+
key: "1"
|
|
266
|
+
}]]);
|
|
267
|
+
export { a, o as c, i as d, s as f, l as i, f as l, p as n, c as o, u as p, r, d as s, m as t, h as u };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { r as e } from "./websocket-manager-BTRqNTB7.js";
|
|
2
|
+
import { n as t } from "./errors-Bu5ajEmB.js";
|
|
3
|
+
var n = null, r = /* @__PURE__ */ new Set();
|
|
4
|
+
function i() {
|
|
5
|
+
return n;
|
|
6
|
+
}
|
|
7
|
+
function a(e) {
|
|
8
|
+
n = e;
|
|
9
|
+
for (let e of r) e();
|
|
10
|
+
}
|
|
11
|
+
function o(e) {
|
|
12
|
+
return r.add(e), () => {
|
|
13
|
+
r.delete(e);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function s() {
|
|
17
|
+
n = null;
|
|
18
|
+
for (let e of r) e();
|
|
19
|
+
}
|
|
20
|
+
function c(e) {
|
|
21
|
+
return typeof e.requiresShortcut != "function" || !e.requiresShortcut();
|
|
22
|
+
}
|
|
23
|
+
function l(e, t) {
|
|
24
|
+
return !!(t.isLoginModalVisible || t.isShortcutsOverlayVisible || t.isSidebarVisible || t.activeTool || t.selectedComment || t.activeComment || t.activeDrawing || t.activeScreenshot || t.error || t.isAuthenticated && (c(e) || t.isOverlayVisible));
|
|
25
|
+
}
|
|
26
|
+
function u(e, t) {
|
|
27
|
+
return !!(!e.isOverlayVisible && t.isOverlayVisible || !e.isSidebarVisible && t.isSidebarVisible || !e.isLoginModalVisible && t.isLoginModalVisible || !e.isShortcutsOverlayVisible && t.isShortcutsOverlayVisible || !e.isAuthenticated && t.isAuthenticated || t.activeTool && t.activeTool !== e.activeTool || t.selectedComment && t.selectedComment.id !== e.selectedComment?.id || !e.activeComment && t.activeComment || !e.activeDrawing && t.activeDrawing || !e.activeScreenshot && t.activeScreenshot);
|
|
28
|
+
}
|
|
29
|
+
var d = "\n:host{all:initial;position:fixed;z-index:2147483647;font-family:var(--font-brand-sans,system-ui,sans-serif);color-scheme:light dark;--ck-bg:#f7f6f2;--ck-fg:#121316;--ck-border:#d9d6cf;--ck-primary:#ff5733;--ck-on-primary:#121316}\n:host([hidden]){display:none}\n:host([data-theme=dark]){--ck-bg:#121316;--ck-fg:#f7f6f2;--ck-border:#424348}\n@media(prefers-color-scheme:dark){:host(:not([data-theme=light])){--ck-bg:#121316;--ck-fg:#f7f6f2;--ck-border:#424348}}\n*{box-sizing:border-box} .launcher{display:flex;align-items:center;gap:8px;max-width:min(360px,calc(100vw - 32px));padding:8px;border:1px solid var(--ck-border);border-radius:16px;background:var(--ck-bg);color:var(--ck-fg);box-shadow:0 4px 18px #0002;font:14px/1.4 var(--font-brand-sans,system-ui,sans-serif)}\nbutton{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;cursor:pointer}button:focus-visible{outline:2px solid var(--ck-primary);outline-offset:2px}button:disabled{cursor:wait;opacity:.7}button[data-primary]{background:var(--ck-primary);color:var(--ck-on-primary)}svg{width:24px;height:24px;flex:none}.message{margin:0;max-width:200px} [role=alert]{font-size:13px}\n";
|
|
30
|
+
function f(e, t) {
|
|
31
|
+
let n = document.createElement("div");
|
|
32
|
+
n.setAttribute("data-commentkit-launcher", ""), n.setAttribute("data-commentkit-ui", "");
|
|
33
|
+
let r = t.config?.ui?.position ?? "bottom-right";
|
|
34
|
+
n.style.setProperty(r.startsWith("top") ? "top" : "bottom", "16px"), n.style.setProperty(r.endsWith("left") ? "left" : "right", "16px");
|
|
35
|
+
let a = n.attachShadow({ mode: "open" }), s = document.createElement("style");
|
|
36
|
+
s.textContent = d;
|
|
37
|
+
let c = document.createElement("div");
|
|
38
|
+
c.className = "launcher", a.append(s, c), e.append(n);
|
|
39
|
+
let l = document.documentElement, u = window.matchMedia("(prefers-color-scheme: dark)"), f = () => {
|
|
40
|
+
let e = t.config?.ui?.theme, r = e === "dark" || e === "light" ? e : null, a = l.style.colorScheme;
|
|
41
|
+
n.dataset.theme = i() ?? r ?? (l.classList.contains("dark") ? "dark" : l.classList.contains("light") ? "light" : a === "light" || a === "dark" ? a : u.matches ? "dark" : "light");
|
|
42
|
+
};
|
|
43
|
+
f();
|
|
44
|
+
let p = new MutationObserver(f);
|
|
45
|
+
p.observe(l, {
|
|
46
|
+
attributes: !0,
|
|
47
|
+
attributeFilter: ["class", "style"]
|
|
48
|
+
}), u.addEventListener("change", f);
|
|
49
|
+
let m = o(f), h = (e, t) => {
|
|
50
|
+
let n = document.createElement("button");
|
|
51
|
+
return n.type = "button", n.textContent = e, n.addEventListener("click", t), n;
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
render(e, r = !0) {
|
|
55
|
+
if (n.hidden = !r, c.replaceChildren(), r) {
|
|
56
|
+
if (e === "idle") {
|
|
57
|
+
let e = h("Comments", t.onActivate);
|
|
58
|
+
e.setAttribute("aria-label", "Open CommentKit"), e.setAttribute("data-primary", "");
|
|
59
|
+
let n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
60
|
+
n.setAttribute("viewBox", "0 0 64 64"), n.setAttribute("aria-hidden", "true");
|
|
61
|
+
let r = document.createElementNS(n.namespaceURI, "path");
|
|
62
|
+
r.setAttribute("d", "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9C38.2 57.4 48.5 48.7 53.6 40.2c3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8ZM23.1 20h16.7c3.4 0 4.7 1.7 4.7 4.8v7c0 3.2-1.6 4.6-4.7 4.6h-9.2l-5.4 5c-1 .9-1.9.4-1.6-1l.7-4h-1.2c-3.3 0-4.6-1.6-4.6-4.6v-7c0-3.1 1.3-4.8 4.6-4.8Z"), r.setAttribute("fill", "currentColor"), r.setAttribute("fill-rule", "evenodd"), n.append(r), e.prepend(n), c.append(e);
|
|
63
|
+
} else {
|
|
64
|
+
let n = document.createElement("p");
|
|
65
|
+
n.className = "message", n.setAttribute("role", e === "error" ? "alert" : "status"), n.textContent = e === "error" ? "Could not load CommentKit. Check your connection and try again." : "Loading CommentKit…", c.append(n), e === "error" && c.append(h("Retry", t.onActivate)), c.append(h("Cancel", t.onCancel));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
remove() {
|
|
70
|
+
p.disconnect(), u.removeEventListener("change", f), m(), n.remove();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
var p = /* @__PURE__ */ e({ mountCommentKitUI: () => y });
|
|
75
|
+
function m(e, t) {
|
|
76
|
+
try {
|
|
77
|
+
return e[t];
|
|
78
|
+
} catch {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function h(e, t) {
|
|
83
|
+
let n = m(e, t);
|
|
84
|
+
if (typeof n == "function") return n;
|
|
85
|
+
let r = m(e, "default");
|
|
86
|
+
if (r && typeof r == "object") {
|
|
87
|
+
let e = r[t];
|
|
88
|
+
if (typeof e == "function") return e;
|
|
89
|
+
}
|
|
90
|
+
throw TypeError(`React module did not provide ${t}`);
|
|
91
|
+
}
|
|
92
|
+
function g(e) {
|
|
93
|
+
let t = e;
|
|
94
|
+
if (!t || typeof t.getState != "function" || typeof t.on != "function") throw TypeError("CommentKit UI requires a valid CommentKitCore instance");
|
|
95
|
+
}
|
|
96
|
+
function _() {
|
|
97
|
+
if (typeof document > "u" || !document.body) throw Error("CommentKit UI requires a browser document body");
|
|
98
|
+
return document.body;
|
|
99
|
+
}
|
|
100
|
+
function v(e) {
|
|
101
|
+
return typeof e == "function";
|
|
102
|
+
}
|
|
103
|
+
async function y(e, n = {}) {
|
|
104
|
+
g(e);
|
|
105
|
+
let r = _(), i = typeof e.getConfig == "function" ? e.getConfig() : void 0;
|
|
106
|
+
if (n.signal?.aborted || i?.enabled === !1) return { unmount() {} };
|
|
107
|
+
if (r.querySelector("[data-commentkit], [data-commentkit-host]")) return console.warn("[CommentKit] UI is already mounted on this page — skipping duplicate mount. Destroy the existing instance first if you need to remount."), { unmount() {} };
|
|
108
|
+
let a = e.getState(), o = document.createElement("div");
|
|
109
|
+
o.setAttribute("data-commentkit", ""), r.appendChild(o);
|
|
110
|
+
let s = !0, d = null, p = null, m = null, y = null, b = 0, x = !1, S = !1, C = !1, w = a, T = l(e, a), E = null, D = () => {
|
|
111
|
+
if (!s) return;
|
|
112
|
+
s = !1, b++, n.signal?.removeEventListener("abort", D);
|
|
113
|
+
try {
|
|
114
|
+
p?.();
|
|
115
|
+
} catch {}
|
|
116
|
+
p = null;
|
|
117
|
+
let e = d;
|
|
118
|
+
d = null;
|
|
119
|
+
let t = () => {
|
|
120
|
+
try {
|
|
121
|
+
e?.unmount();
|
|
122
|
+
} catch {}
|
|
123
|
+
};
|
|
124
|
+
e && n.deferUnmount ? queueMicrotask(t) : t(), E?.remove(), E = null, o.remove();
|
|
125
|
+
}, O = () => {
|
|
126
|
+
C = !0, S = !0, x = !1, b++, y = null, a.activeTool && e.setTool(null), a.isLoginModalVisible && e.toggleLoginModal(), a.isShortcutsOverlayVisible && e.toggleShortcutsOverlay(), a.isSidebarVisible && e.toggleSidebar(), !c(e) && e.getState().isOverlayVisible && e.toggleOverlay(), w = e.getState(), T = l(e, w), C = !1, E?.render("idle", c(e));
|
|
127
|
+
}, k = () => {
|
|
128
|
+
if (!s || d) return Promise.resolve();
|
|
129
|
+
if (y) return y;
|
|
130
|
+
x = !1, S = !1;
|
|
131
|
+
let n = ++b;
|
|
132
|
+
return E?.render("loading"), y = (async () => {
|
|
133
|
+
try {
|
|
134
|
+
let [t, r, c, l, u, f] = await Promise.all([
|
|
135
|
+
import("react"),
|
|
136
|
+
import("react-dom/client"),
|
|
137
|
+
import("./styles-D_FEJZ9G.js"),
|
|
138
|
+
import("./shadow-root-CmYXiSRR.js"),
|
|
139
|
+
import("./error-boundary-D3PD74vI.js"),
|
|
140
|
+
import("./comment-kit-ui-D2j2gvnm.js").then((e) => e.t)
|
|
141
|
+
]);
|
|
142
|
+
if (!s || n !== b) return;
|
|
143
|
+
let p = h(t, "createElement"), g = h(r, "createRoot"), _ = l.ShadowContainer, v = u.ErrorBoundary;
|
|
144
|
+
E?.remove(), E = null, d = g(o), m = (t) => {
|
|
145
|
+
s && d && d.render(p(v, null, p(_, {
|
|
146
|
+
styles: c.default,
|
|
147
|
+
config: i
|
|
148
|
+
}, p(f.CommentKitUI, {
|
|
149
|
+
core: e,
|
|
150
|
+
state: t
|
|
151
|
+
}))));
|
|
152
|
+
}, m(a);
|
|
153
|
+
} catch (r) {
|
|
154
|
+
if (!s || n !== b) return;
|
|
155
|
+
try {
|
|
156
|
+
d?.unmount();
|
|
157
|
+
} catch {}
|
|
158
|
+
d = null, m = null, x = !0, E ||= A(), E.render("error");
|
|
159
|
+
try {
|
|
160
|
+
e.emit("error", t(r));
|
|
161
|
+
} catch {}
|
|
162
|
+
} finally {
|
|
163
|
+
n === b && (y = null);
|
|
164
|
+
}
|
|
165
|
+
})(), y;
|
|
166
|
+
}, A = () => f(o, {
|
|
167
|
+
config: i,
|
|
168
|
+
onActivate: () => {
|
|
169
|
+
!x && c(e) && !e.getState().isSidebarVisible && e.toggleSidebar(), k();
|
|
170
|
+
},
|
|
171
|
+
onCancel: O
|
|
172
|
+
}), j = (t) => {
|
|
173
|
+
if (!s || (a = t, C)) return;
|
|
174
|
+
if (d && m) {
|
|
175
|
+
m(t);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
let n = l(e, t);
|
|
179
|
+
(!n || S && u(w, t)) && (S = !1), T && !n && y && (b++, y = null, E?.render("idle", c(e)));
|
|
180
|
+
let r = n && !T;
|
|
181
|
+
T = n, n && (!x || r) && !S ? k() : !y && !x && E?.render("idle", c(e));
|
|
182
|
+
};
|
|
183
|
+
try {
|
|
184
|
+
E = A(), E.render("idle", c(e));
|
|
185
|
+
let t = e.on("state:changed", j);
|
|
186
|
+
if (!v(t)) throw TypeError("CommentKit core subscription did not return an unsubscribe function");
|
|
187
|
+
p = t, n.signal?.addEventListener("abort", D, { once: !0 }), n.signal?.aborted ? D() : T && k();
|
|
188
|
+
} catch (e) {
|
|
189
|
+
throw D(), e;
|
|
190
|
+
}
|
|
191
|
+
return { unmount: D };
|
|
192
|
+
}
|
|
193
|
+
export { a, s as i, p as n, o, i as r, y as t };
|