@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,203 @@
|
|
|
1
|
+
import { d as e, o as t, r as n, s as r, u as i } from "./comment-kit-core-D0kY00St.js";
|
|
2
|
+
import { a, i as o, o as s } from "./dom-Bhf4WFtY.js";
|
|
3
|
+
var c = 4e3, l = 500, u = 2e3, d = 1e3, f = 5, p = 25, m = 3145728;
|
|
4
|
+
function h(t) {
|
|
5
|
+
let n = e(t?.comment, u);
|
|
6
|
+
return n.length > 0 ? n : null;
|
|
7
|
+
}
|
|
8
|
+
function g(t) {
|
|
9
|
+
return (t?.attachments ?? []).slice(0, f).flatMap((t) => {
|
|
10
|
+
let n = e(t.name, d), r = e(t.path, d);
|
|
11
|
+
return !n || !r ? [] : [{
|
|
12
|
+
name: n,
|
|
13
|
+
path: r,
|
|
14
|
+
...t.pathSource ? { pathSource: t.pathSource } : {},
|
|
15
|
+
...t.type ? { type: e(t.type, d) } : {},
|
|
16
|
+
...typeof t.size == "number" ? { size: t.size } : {},
|
|
17
|
+
...typeof t.lastModified == "number" ? { lastModified: t.lastModified } : {}
|
|
18
|
+
}];
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function _(e) {
|
|
22
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
23
|
+
}
|
|
24
|
+
function v(t, n, r, i) {
|
|
25
|
+
let s = t.getBoundingClientRect(), u = o(t), d = a(t), f = t.getAttribute("class"), p = t.getAttribute("role"), m = t.getAttribute("aria-label"), h = e(t.textContent, l), g = e(t.outerHTML, c);
|
|
26
|
+
return {
|
|
27
|
+
found: !0,
|
|
28
|
+
tagName: t.tagName.toLowerCase(),
|
|
29
|
+
...t.id ? { id: t.id } : {},
|
|
30
|
+
...f ? { className: f } : {},
|
|
31
|
+
...p ? { role: p } : {},
|
|
32
|
+
...m ? { ariaLabel: m } : {},
|
|
33
|
+
...h ? { text: h } : {},
|
|
34
|
+
rect: {
|
|
35
|
+
top: s.top,
|
|
36
|
+
left: s.left,
|
|
37
|
+
width: s.width,
|
|
38
|
+
height: s.height
|
|
39
|
+
},
|
|
40
|
+
...g ? { htmlPreview: g } : {},
|
|
41
|
+
...u ? { selector: u } : {},
|
|
42
|
+
...d ? { xpath: d } : {},
|
|
43
|
+
...n ? {
|
|
44
|
+
source: y(n),
|
|
45
|
+
stack: r.map(y)
|
|
46
|
+
} : {},
|
|
47
|
+
...i ? { componentName: i } : {}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function y(e) {
|
|
51
|
+
return {
|
|
52
|
+
filePath: e.filePath,
|
|
53
|
+
lineNumber: e.lineNumber,
|
|
54
|
+
columnNumber: e.columnNumber,
|
|
55
|
+
componentName: e.componentName
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function b(e) {
|
|
59
|
+
let t = `${e.filePath}${e.lineNumber === null ? "" : `:${e.lineNumber}`}${e.columnNumber === null ? "" : `:${e.columnNumber}`}`;
|
|
60
|
+
return e.componentName ? `${e.componentName} (${t})` : t;
|
|
61
|
+
}
|
|
62
|
+
function x(e, t, n, r, i, a) {
|
|
63
|
+
let o = ["# CommentKit Element Grab", ""], s = t.tagName ?? "element", c = t.id ? `#${t.id}` : "";
|
|
64
|
+
if (o.push(`**Tag:** \`${s}${c}\``), i && o.push(`**Comment:** ${i}`), a.length > 0) {
|
|
65
|
+
o.push("", "**Attachments:**");
|
|
66
|
+
for (let e of a) {
|
|
67
|
+
let t = [
|
|
68
|
+
e.type ? `type: \`${e.type}\`` : null,
|
|
69
|
+
typeof e.size == "number" ? `size: ${e.size} bytes` : null,
|
|
70
|
+
e.pathSource ? `path source: ${e.pathSource}` : null
|
|
71
|
+
].filter(Boolean).join(", ");
|
|
72
|
+
o.push(`- \`${e.name}\` - path: \`${e.path}\`${t ? ` (${t})` : ""}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (t.componentName && o.push(`**Component:** \`${t.componentName}\``), t.source && o.push(`**Source:** ${b(t.source)}`), t.stack && t.stack.length > 1) {
|
|
76
|
+
o.push("", "**Stack:**");
|
|
77
|
+
for (let e of t.stack) o.push(`- ${b(e)}`);
|
|
78
|
+
}
|
|
79
|
+
return t.source || (t.selector && o.push(`**Selector:** \`${t.selector}\``), t.xpath && o.push(`**XPath:** \`${t.xpath}\``)), o.push(`**Page:** ${e.title || "Untitled"} — ${e.url || e.path}`), o.push(""), o.push("**HTML:**", "```html", n, "```", ""), r && o.push("**Screenshot:** attached to clipboard as an image (paste below this text).", ""), o.join("\n");
|
|
80
|
+
}
|
|
81
|
+
function S(e) {
|
|
82
|
+
let t = e.element;
|
|
83
|
+
return {
|
|
84
|
+
tagName: t.tagName,
|
|
85
|
+
id: t.id,
|
|
86
|
+
className: t.className,
|
|
87
|
+
textContent: t.text,
|
|
88
|
+
componentName: t.componentName,
|
|
89
|
+
filePath: t.source?.filePath,
|
|
90
|
+
lineNumber: t.source?.lineNumber ?? void 0,
|
|
91
|
+
columnNumber: t.source?.columnNumber ?? void 0,
|
|
92
|
+
comment: e.comment ?? void 0,
|
|
93
|
+
attachments: e.attachments,
|
|
94
|
+
selector: t.selector,
|
|
95
|
+
xpath: t.xpath
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function C(e) {
|
|
99
|
+
if (typeof window > "u" || typeof window.dispatchEvent != "function") return;
|
|
100
|
+
let t = e[0];
|
|
101
|
+
t && window.dispatchEvent(new CustomEvent("commentkit:element-selected", { detail: {
|
|
102
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
103
|
+
page: t.page,
|
|
104
|
+
elements: e.map(S)
|
|
105
|
+
} }));
|
|
106
|
+
}
|
|
107
|
+
async function w(a, o, l, u) {
|
|
108
|
+
if (!a || typeof Element > "u" || !(a instanceof Element) || typeof a.getBoundingClientRect != "function") return null;
|
|
109
|
+
let d = (_(a), a), f = await i(a), p = f?.source ?? null, m = f?.stack ?? [], y = f?.componentName ?? null, b = await n(o, l, d, { reportErrors: !1 }), S = b?.dataUrl ?? null, w = b?.blob ?? null, T = v(a, p, m, y), E = T.htmlPreview ?? e(a.outerHTML, c), D = s(), O = h(u), k = g(u), A = x({
|
|
110
|
+
url: D.url,
|
|
111
|
+
path: D.path,
|
|
112
|
+
title: D.title
|
|
113
|
+
}, T, E, S, O, k);
|
|
114
|
+
try {
|
|
115
|
+
w ? await t(A, w) : await r(A);
|
|
116
|
+
} catch {}
|
|
117
|
+
let j = {
|
|
118
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
119
|
+
page: {
|
|
120
|
+
url: D.url,
|
|
121
|
+
path: D.path,
|
|
122
|
+
title: D.title
|
|
123
|
+
},
|
|
124
|
+
element: T,
|
|
125
|
+
comment: O,
|
|
126
|
+
attachments: k,
|
|
127
|
+
html: E,
|
|
128
|
+
screenshotDataUrl: S,
|
|
129
|
+
markdown: A
|
|
130
|
+
};
|
|
131
|
+
return C([j]), j;
|
|
132
|
+
}
|
|
133
|
+
function T(e, t, n, r) {
|
|
134
|
+
let i = [
|
|
135
|
+
"# CommentKit Element Grab",
|
|
136
|
+
"",
|
|
137
|
+
`**Elements:** ${t.length}`,
|
|
138
|
+
`**Page:** ${e.title || "Untitled"} — ${e.url || e.path}`
|
|
139
|
+
];
|
|
140
|
+
if (n && i.push(`**Comment:** ${n}`), r.length > 0) {
|
|
141
|
+
i.push("", "**Attachments:**");
|
|
142
|
+
for (let e of r) i.push(`- \`${e.name}\` - path: \`${e.path}\`${e.pathSource ? ` (path source: ${e.pathSource})` : ""}`);
|
|
143
|
+
}
|
|
144
|
+
return i.push(""), t.forEach((e, t) => {
|
|
145
|
+
let { element: n } = e, r = n.tagName ?? "element", a = n.id ? `#${n.id}` : "";
|
|
146
|
+
i.push(`## [${t + 1}] \`${r}${a}\``), n.componentName && i.push(`- Component: \`${n.componentName}\``), n.source && i.push(`- Source: ${b(n.source)}`), n.stack && n.stack.length > 1 && i.push(`- Stack: ${n.stack.map((e) => e.componentName ?? e.filePath).join(" → ")}`), n.source || (n.selector && i.push(`- Selector: \`${n.selector}\``), n.xpath && i.push(`- XPath: \`${n.xpath}\``)), i.push("", "```html", e.html, "```", ""), e.screenshotDataUrl && i.push(``, "");
|
|
147
|
+
}), i.join("\n");
|
|
148
|
+
}
|
|
149
|
+
async function E(t, a, o, l) {
|
|
150
|
+
let u = t.filter((e) => !!e && typeof Element < "u" && e instanceof Element && typeof e.getBoundingClientRect == "function");
|
|
151
|
+
if (u.length === 0) return null;
|
|
152
|
+
let d = u.slice(0, p);
|
|
153
|
+
u.length > p && typeof console < "u" && console.warn(`[CommentKit] grabElements was called with ${u.length} elements — capped to ${p} for clipboard size. Pass fewer elements to avoid truncation.`);
|
|
154
|
+
let f = [], y = 0, b = 0, S = h(l), w = g(l);
|
|
155
|
+
for (let t of d) {
|
|
156
|
+
let r = (_(t), t), l = await i(t), u = l?.source ?? null, d = l?.stack ?? [], p = l?.componentName ?? null, h = null;
|
|
157
|
+
if (y < m) {
|
|
158
|
+
let e = (await n(a, o, r, { reportErrors: !1 }))?.dataUrl ?? null;
|
|
159
|
+
e && y + e.length <= m ? (h = e, y += e.length) : e && b++;
|
|
160
|
+
} else b++;
|
|
161
|
+
let g = v(t, u, d, p), C = g.htmlPreview ?? e(t.outerHTML, c), T = s(), E = x({
|
|
162
|
+
url: T.url,
|
|
163
|
+
path: T.path,
|
|
164
|
+
title: T.title
|
|
165
|
+
}, g, C, h, S, w);
|
|
166
|
+
f.push({
|
|
167
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
168
|
+
page: {
|
|
169
|
+
url: T.url,
|
|
170
|
+
path: T.path,
|
|
171
|
+
title: T.title
|
|
172
|
+
},
|
|
173
|
+
element: g,
|
|
174
|
+
comment: S,
|
|
175
|
+
attachments: w,
|
|
176
|
+
html: C,
|
|
177
|
+
screenshotDataUrl: h,
|
|
178
|
+
markdown: E
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
b > 0 && typeof console < "u" && console.warn(`[CommentKit] grabElements dropped ${b} screenshot${b === 1 ? "" : "s"} to stay under the ${Math.round(m / 1024 / 1024)}MB clipboard budget.`);
|
|
182
|
+
let E = s(), D = T({
|
|
183
|
+
url: E.url,
|
|
184
|
+
path: E.path,
|
|
185
|
+
title: E.title
|
|
186
|
+
}, f, S, w);
|
|
187
|
+
try {
|
|
188
|
+
await r(D);
|
|
189
|
+
} catch {}
|
|
190
|
+
let O = {
|
|
191
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
192
|
+
page: {
|
|
193
|
+
url: E.url,
|
|
194
|
+
path: E.path,
|
|
195
|
+
title: E.title
|
|
196
|
+
},
|
|
197
|
+
results: f,
|
|
198
|
+
attachments: w,
|
|
199
|
+
markdown: D
|
|
200
|
+
};
|
|
201
|
+
return C(f), O;
|
|
202
|
+
}
|
|
203
|
+
export { w as grabElement, E as grabElements };
|
|
@@ -29,7 +29,7 @@ function l() {
|
|
|
29
29
|
let e = globalThis.crypto;
|
|
30
30
|
if (typeof e?.randomUUID == "function") return e.randomUUID().replace(/-/g, "").slice(0, 12);
|
|
31
31
|
if (typeof e?.getRandomValues == "function") {
|
|
32
|
-
let t = new Uint8Array(8);
|
|
32
|
+
let t = /* @__PURE__ */ new Uint8Array(8);
|
|
33
33
|
return e.getRandomValues(t), Array.from(t, (e) => e.toString(36).padStart(2, "0")).join("").slice(0, 12);
|
|
34
34
|
}
|
|
35
35
|
return Math.random().toString(36).slice(2, 14);
|
|
@@ -160,7 +160,7 @@ function S(e, t) {
|
|
|
160
160
|
i &&= (clearTimeout(i), null), n = !1, r = null;
|
|
161
161
|
}, s;
|
|
162
162
|
}
|
|
163
|
-
var C = new Set([
|
|
163
|
+
var C = /* @__PURE__ */ new Set([
|
|
164
164
|
"button",
|
|
165
165
|
"link",
|
|
166
166
|
"textbox",
|