@commentkit/comment-kit 0.6.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -2
- package/LICENSE +18 -2
- package/README.md +198 -125
- package/SECURITY.md +48 -0
- package/dist/THIRD_PARTY_NOTICES.txt +284 -0
- package/dist/angular.es.js +68 -3419
- package/dist/comment-kit.es.js +33 -3192
- package/dist/demo.es.js +472 -0
- package/dist/headless.es.js +4 -0
- package/dist/preact.es.js +79 -3443
- package/dist/qwik.es.js +1 -3474
- package/dist/qwik.qwik.mjs +114 -0
- package/dist/react.es.js +80 -28447
- package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
- package/dist/shared/annotation-icons-Dh-bmNYK.js +172 -0
- package/dist/shared/annotation-toolbar-B9SxYqoF.js +1093 -0
- package/dist/shared/bridge-CJoGYngu.js +177 -0
- package/dist/shared/button-By0hGrJK.js +505 -0
- package/dist/shared/button-group-Cl9CrvvU.js +93 -0
- package/dist/shared/comment-drawing-canvas-Dzb5YoFw.js +124 -0
- package/dist/shared/comment-image-lightbox-BPYJT1sB.js +183 -0
- package/dist/shared/comment-kit-core-BaSuMzp9.js +3381 -0
- package/dist/shared/comment-kit-ui-CzfdAZs2.js +20181 -0
- package/dist/shared/comment-screenshot-annotator-C7X-_bm6.js +151 -0
- package/dist/shared/comment-screenshot-overlay-wIrZrcRy.js +206 -0
- package/dist/shared/comment-utils-BycYTSxA.js +602 -0
- package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
- package/dist/shared/dev-export-panel-FwFVdady.js +208 -0
- package/dist/shared/dev-grab-DDqg0LQf.js +203 -0
- package/dist/shared/dist-De294MVF.js +623 -0
- package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
- package/dist/shared/element-selector-BhJm-NSs.js +858 -0
- package/dist/shared/errors-Bu5ajEmB.js +22 -0
- package/dist/shared/icons-nzMOLzrm.js +266 -0
- package/dist/shared/mount-ui--ijs8pWT.js +193 -0
- package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-ipHMJnO_.js} +93 -127
- package/dist/shared/realtime-Dk41VwKg.js +302 -0
- package/dist/shared/separator-XDBsaWyw.js +4021 -0
- package/dist/shared/shadow-root-C5v-T8lQ.js +135 -0
- package/dist/shared/styles-D3yMtaec.js +2 -0
- package/dist/shared/useValueChanged-CrzfD8l-.js +92 -0
- package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
- package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-DhLWh3Jr.js} +90 -148
- package/dist/solid.es.js +63 -3427
- package/dist/svelte.es.js +78 -3442
- package/dist/types/adapters/bridge.d.ts +10 -13
- package/dist/types/angular/index.d.ts +17 -7
- package/dist/types/core/api-client.d.ts +16 -17
- package/dist/types/core/comment-kit-core.d.ts +29 -12
- package/dist/types/core/local-demo.d.ts +60 -0
- package/dist/types/core/types.d.ts +68 -0
- package/dist/types/demo.d.ts +17 -0
- package/dist/types/headless.d.ts +8 -0
- package/dist/types/index.d.ts +22 -20
- package/dist/types/qwik/index.d.ts +4 -1
- package/dist/vue.es.js +80 -3443
- package/docs/api-reference.md +372 -0
- package/docs/local-demo.md +60 -0
- package/package.json +69 -41
- package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
- package/dist/angular/comment-kit-ui-D-LUFD6n.js +0 -24898
- package/dist/angular/dom-Cx1nMbdI.js +0 -104
- package/dist/angular/mount-ui-C9PJ5aK_.js +0 -72
- package/dist/angular/realtime-VrKV0lPI.js +0 -567
- package/dist/angular/shadow-root-yMOaW9pk.js +0 -93
- package/dist/angular/styles-CMz7-p8x.js +0 -2
- package/dist/angular/widget-theme-CYPYAwhR.js +0 -24
- package/dist/comment-kit.css +0 -2
- package/dist/core/chunk-t7YoJN_i.js +0 -11
- package/dist/core/comment-kit-ui-Ct4E18do.js +0 -24898
- package/dist/core/error-boundary-CN_BGsYl.js +0 -21
- package/dist/core/mount-ui-Bfnuuesk.js +0 -72
- package/dist/core/pusher-CizoY5NA.js +0 -2504
- package/dist/core/realtime-C3_O7gi2.js +0 -278
- package/dist/core/shadow-root-DAtdjHG2.js +0 -93
- package/dist/core/styles-ClRoB6ro.js +0 -2
- package/dist/core/widget-theme-BWDYr7VR.js +0 -24
- package/dist/preact/chunk-CZ0PdaaN.js +0 -11
- package/dist/preact/comment-kit-ui-DEzn7J_P.js +0 -24898
- package/dist/preact/dom-_ULpq7rg.js +0 -104
- package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
- package/dist/preact/limits-C3ZEKcL_.js +0 -71
- package/dist/preact/mount-ui-Dx8en--W.js +0 -72
- package/dist/preact/pusher-BP4kCufH.js +0 -2504
- package/dist/preact/realtime-COin_nJF.js +0 -567
- package/dist/preact/shadow-root-D-NcwruG.js +0 -93
- package/dist/preact/styles-D6i7be5-.js +0 -2
- package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
- package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
- package/dist/qwik/comment-kit-ui-Dvwee2tw.js +0 -24898
- package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
- package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
- package/dist/qwik/limits-DK35yjGY.js +0 -71
- package/dist/qwik/mount-ui-DSAwNk_d.js +0 -72
- package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
- package/dist/qwik/realtime-DhfcBrwF.js +0 -567
- package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
- package/dist/qwik/styles-DmEmq5Lh.js +0 -2
- package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
- package/dist/react/chunk--MHYZ-zp.js +0 -12
- package/dist/react/limits-CpprSem3.js +0 -175
- package/dist/react/pusher-3dki8s2l.js +0 -2505
- package/dist/react/realtime-DGqScuox.js +0 -567
- package/dist/solid/chunk-B2NCWFvW.js +0 -11
- package/dist/solid/comment-kit-ui-ACW8BpEm.js +0 -24898
- package/dist/solid/dom-DqDH-Gml.js +0 -104
- package/dist/solid/error-boundary-9mimpbZA.js +0 -21
- package/dist/solid/limits-B_69IbLl.js +0 -71
- package/dist/solid/mount-ui-Dq1wj_tx.js +0 -72
- package/dist/solid/pusher-_RVNpj1f.js +0 -2504
- package/dist/solid/realtime-DbUJK4gU.js +0 -567
- package/dist/solid/shadow-root-CssU3bQb.js +0 -93
- package/dist/solid/styles-DbueS9xx.js +0 -2
- package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
- package/dist/svelte/chunk-Pi70BKld.js +0 -11
- package/dist/svelte/comment-kit-ui-Cx4u1g77.js +0 -24898
- package/dist/svelte/dom-MyTrWzy_.js +0 -104
- package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
- package/dist/svelte/limits-CURF22v3.js +0 -71
- package/dist/svelte/mount-ui-CBoNGLNS.js +0 -72
- package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
- package/dist/svelte/realtime-M1CJbCBA.js +0 -567
- package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
- package/dist/svelte/styles-BK_MaUpD.js +0 -2
- package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
- package/dist/types/adapters/errors.d.ts +0 -3
- package/dist/types/core/auth.d.ts +0 -18
- package/dist/types/core/comments.d.ts +0 -43
- package/dist/types/core/dev-grab.d.ts +0 -14
- package/dist/types/core/keyboard.d.ts +0 -12
- package/dist/types/core/limits.d.ts +0 -52
- package/dist/types/core/offline-queue.d.ts +0 -23
- package/dist/types/core/realtime.d.ts +0 -9
- package/dist/types/core/screenshot.d.ts +0 -12
- package/dist/types/core/session.d.ts +0 -9
- package/dist/types/core/source-resolver.d.ts +0 -19
- package/dist/types/core/state.d.ts +0 -24
- package/dist/types/react/comment-kit-ui.d.ts +0 -9
- package/dist/types/react/comments/comment-flow.d.ts +0 -8
- package/dist/types/react/comments/outcomes.d.ts +0 -28
- package/dist/types/react/comments/pin-geometry.d.ts +0 -12
- package/dist/types/react/comments/view-model.d.ts +0 -66
- package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
- package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
- package/dist/types/react/components/comment-actions.d.ts +0 -19
- package/dist/types/react/components/comment-body.d.ts +0 -8
- package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
- package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
- package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
- package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
- package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
- package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
- package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
- package/dist/types/react/components/comment-composer-media.d.ts +0 -17
- package/dist/types/react/components/comment-composer.d.ts +0 -4
- package/dist/types/react/components/comment-composer.types.d.ts +0 -41
- package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
- package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
- package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
- package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
- package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
- package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
- package/dist/types/react/components/comment-error-banner.d.ts +0 -8
- package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
- package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
- package/dist/types/react/components/comment-fab.d.ts +0 -34
- package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
- package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
- package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
- package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
- package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
- package/dist/types/react/components/comment-header.d.ts +0 -34
- package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
- package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
- package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
- package/dist/types/react/components/comment-images.d.ts +0 -7
- package/dist/types/react/components/comment-item.d.ts +0 -26
- package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
- package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
- package/dist/types/react/components/comment-kit.d.ts +0 -12
- package/dist/types/react/components/comment-list-filters.d.ts +0 -14
- package/dist/types/react/components/comment-login-modal.d.ts +0 -20
- package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
- package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
- package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
- package/dist/types/react/components/comment-marker.d.ts +0 -15
- package/dist/types/react/components/comment-member-list.d.ts +0 -10
- package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
- package/dist/types/react/components/comment-online-users.d.ts +0 -8
- package/dist/types/react/components/comment-page-ref.d.ts +0 -9
- package/dist/types/react/components/comment-panel-header.d.ts +0 -22
- package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
- package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
- package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
- package/dist/types/react/components/comment-panel.d.ts +0 -37
- package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
- package/dist/types/react/components/comment-reactions.d.ts +0 -11
- package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
- package/dist/types/react/components/comment-search-bar.d.ts +0 -7
- package/dist/types/react/components/comment-settings-view.d.ts +0 -20
- package/dist/types/react/components/comment-skeletons.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
- package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
- package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
- package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
- package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
- package/dist/types/react/components/comment-thread-list.d.ts +0 -16
- package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
- package/dist/types/react/components/comment-users-context.d.ts +0 -15
- package/dist/types/react/components/comment-utils.d.ts +0 -20
- package/dist/types/react/components/comment.d.ts +0 -26
- package/dist/types/react/components/constants.d.ts +0 -50
- package/dist/types/react/components/dev-export-panel.d.ts +0 -10
- package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
- package/dist/types/react/components/element-selector.d.ts +0 -11
- package/dist/types/react/components/live-region.d.ts +0 -16
- package/dist/types/react/components/screenshot-capture.d.ts +0 -17
- package/dist/types/react/components/status-indicator.d.ts +0 -43
- package/dist/types/react/components/ui.d.ts +0 -44
- package/dist/types/react/components/use-comment-composer.d.ts +0 -28
- package/dist/types/react/error-boundary.d.ts +0 -25
- package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
- package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
- package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
- package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
- package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
- package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
- package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
- package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
- package/dist/types/react/hooks/use-drawing.d.ts +0 -32
- package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
- package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
- package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
- package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
- package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
- package/dist/types/react/hooks/use-websocket.d.ts +0 -9
- package/dist/types/react/is-local-host.d.ts +0 -2
- package/dist/types/react/mount-ui.d.ts +0 -19
- package/dist/types/react/shadow-root.d.ts +0 -23
- package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
- package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
- package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
- package/dist/types/react/ui/lib/cn.d.ts +0 -12
- package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
- package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
- package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
- package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
- package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
- package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
- package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
- package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
- package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
- package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
- package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
- package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
- package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
- package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
- package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
- package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
- package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
- package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
- package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
- package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
- package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
- package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
- package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
- package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
- package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
- package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
- package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
- package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
- package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
- package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
- package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
- package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
- package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
- package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
- package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
- package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
- package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
- package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
- package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
- package/dist/types/utils/freeze-animations.d.ts +0 -8
- package/dist/types/utils/text.d.ts +0 -9
- package/dist/types/utils/validation.d.ts +0 -10
- package/dist/vue/chunk-DHrubWSL.js +0 -11
- package/dist/vue/comment-kit-ui-C3zijClM.js +0 -24898
- package/dist/vue/dom-C7krZAR8.js +0 -104
- package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
- package/dist/vue/limits-B6csdQeI.js +0 -71
- package/dist/vue/mount-ui-18BnLwCO.js +0 -72
- package/dist/vue/pusher-cmjNbW6a.js +0 -2504
- package/dist/vue/realtime-B0B5cE-E.js +0 -567
- package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
- package/dist/vue/styles-B0NAkbKu.js +0 -2
- package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
- /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { O as e, c as t, d as n, s as r, u as i } from "./button-By0hGrJK.js";
|
|
2
|
+
import { t as a } from "./separator-XDBsaWyw.js";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
+
var c = "ArrowUp", l = "ArrowDown", u = "ArrowLeft", d = "ArrowRight", f = "Home", p = "PageUp", m = "PageDown", h = /* @__PURE__ */ new Set([
|
|
6
|
+
c,
|
|
7
|
+
l,
|
|
8
|
+
u,
|
|
9
|
+
d,
|
|
10
|
+
f,
|
|
11
|
+
"End"
|
|
12
|
+
]), g = [
|
|
13
|
+
"Shift",
|
|
14
|
+
"Control",
|
|
15
|
+
"Alt",
|
|
16
|
+
"Meta"
|
|
17
|
+
];
|
|
18
|
+
function _(t) {
|
|
19
|
+
return e(t) && t.tagName === "INPUT";
|
|
20
|
+
}
|
|
21
|
+
function v(t) {
|
|
22
|
+
return !!(_(t) && t.selectionStart != null || e(t) && t.tagName === "TEXTAREA");
|
|
23
|
+
}
|
|
24
|
+
function y(e, t, n, r) {
|
|
25
|
+
if (!e || !t || !t.scrollTo) return;
|
|
26
|
+
let i = e.scrollLeft, a = e.scrollTop, o = e.clientWidth < e.scrollWidth, s = e.clientHeight < e.scrollHeight;
|
|
27
|
+
if (o && r !== "vertical") {
|
|
28
|
+
let r = b(e, t, "left"), a = x(e), o = x(t);
|
|
29
|
+
n === "ltr" && (r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight ? i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight : r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft && (i = r - o.scrollMarginLeft - a.scrollPaddingLeft)), n === "rtl" && (r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft ? i = r - o.scrollMarginLeft - a.scrollPaddingLeft : r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight && (i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight));
|
|
30
|
+
}
|
|
31
|
+
if (s && r !== "horizontal") {
|
|
32
|
+
let n = b(e, t, "top"), r = x(e), i = x(t);
|
|
33
|
+
n - i.scrollMarginTop < e.scrollTop + r.scrollPaddingTop ? a = n - i.scrollMarginTop - r.scrollPaddingTop : n + t.offsetHeight + i.scrollMarginBottom > e.scrollTop + e.clientHeight - r.scrollPaddingBottom && (a = n + t.offsetHeight + i.scrollMarginBottom - e.clientHeight + r.scrollPaddingBottom);
|
|
34
|
+
}
|
|
35
|
+
e.scrollTo({
|
|
36
|
+
left: i,
|
|
37
|
+
top: a,
|
|
38
|
+
behavior: "auto"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function b(e, t, n) {
|
|
42
|
+
let r = n === "left" ? "offsetLeft" : "offsetTop", i = 0;
|
|
43
|
+
for (; t.offsetParent && (i += t[r], t.offsetParent !== e);) t = t.offsetParent;
|
|
44
|
+
return i;
|
|
45
|
+
}
|
|
46
|
+
function x(e) {
|
|
47
|
+
let t = getComputedStyle(e);
|
|
48
|
+
return {
|
|
49
|
+
scrollMarginTop: parseFloat(t.scrollMarginTop) || 0,
|
|
50
|
+
scrollMarginRight: parseFloat(t.scrollMarginRight) || 0,
|
|
51
|
+
scrollMarginBottom: parseFloat(t.scrollMarginBottom) || 0,
|
|
52
|
+
scrollMarginLeft: parseFloat(t.scrollMarginLeft) || 0,
|
|
53
|
+
scrollPaddingTop: parseFloat(t.scrollPaddingTop) || 0,
|
|
54
|
+
scrollPaddingRight: parseFloat(t.scrollPaddingRight) || 0,
|
|
55
|
+
scrollPaddingBottom: parseFloat(t.scrollPaddingBottom) || 0,
|
|
56
|
+
scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function S(e) {
|
|
60
|
+
return i(e.defaultTagName ?? "div", e, e);
|
|
61
|
+
}
|
|
62
|
+
var C = o.forwardRef(function({ className: e, orientation: t = "horizontal", ...n }, i) {
|
|
63
|
+
return /* @__PURE__ */ s("div", {
|
|
64
|
+
ref: i,
|
|
65
|
+
role: "group",
|
|
66
|
+
"data-slot": "button-group",
|
|
67
|
+
"data-orientation": t,
|
|
68
|
+
className: r("ck-button-group", e),
|
|
69
|
+
...n
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
C.displayName = "ButtonGroup";
|
|
73
|
+
var w = o.forwardRef(function({ className: e, render: t, ...i }, a) {
|
|
74
|
+
return S({
|
|
75
|
+
defaultTagName: "div",
|
|
76
|
+
ref: a,
|
|
77
|
+
props: n({ className: r("ck-button-group-text", e) }, i),
|
|
78
|
+
render: t,
|
|
79
|
+
state: { slot: "button-group-text" }
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
w.displayName = "ButtonGroupText";
|
|
83
|
+
var T = o.forwardRef(function({ className: e, orientation: n = "vertical", ...r }, i) {
|
|
84
|
+
return /* @__PURE__ */ s(a, {
|
|
85
|
+
ref: i,
|
|
86
|
+
"data-slot": "button-group-separator",
|
|
87
|
+
orientation: n,
|
|
88
|
+
className: t("ck-button-group-separator", e),
|
|
89
|
+
...r
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
T.displayName = "ButtonGroupSeparator";
|
|
93
|
+
export { d as a, f as c, p as d, v as f, u as i, g as l, S as n, c as o, y as p, l as r, h as s, C as t, m as u };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./annotation-toolbar-B9SxYqoF.js";
|
|
2
|
+
import { A as r, i, p as a, r as o } from "./comment-kit-ui-CzfdAZs2.js";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
var d = ".ck-annotation-toolbar{background-color:var(--background);width:100%;max-width:100%;box-shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a, 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:2rem;flex-wrap:wrap;justify-content:center;align-items:center;gap:.375rem .5rem;margin-inline:auto;padding:.375rem;display:flex}@media (width>=1024px){.ck-annotation-toolbar{width:fit-content}}.ck-annotation-separator.ck-separator[data-orientation=vertical]{height:1rem;display:none}@media (width>=1024px){.ck-annotation-separator.ck-separator[data-orientation=vertical]{display:block}}.ck-annotation-stroke{align-items:center;gap:.5rem;width:7rem;padding-inline:.25rem;display:flex}@media (width>=1024px){.ck-annotation-stroke{width:12rem}}.ck-annotation-slider{flex:auto;min-width:0}.ck-annotation-stroke-label{color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:.75rem;line-height:1rem}.ck-annotation-swatch{background-color:var(--ck-bg);width:.875rem;height:.875rem;box-shadow:0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:999px}.ck-annotation-tooltip{align-items:center;gap:.375rem;display:inline-flex}.ck-annotation-save--disabled{opacity:.5}.ck-drawing-canvas{z-index:var(--z-ck-marker-layer);cursor:none;pointer-events:auto;flex-direction:column;padding-top:1rem;display:flex;position:fixed;inset:0}.ck-drawing-canvas-scrim{pointer-events:none;background-color:#0000004d;position:absolute;inset:0}@supports ((-webkit-backdrop-filter:blur(4px)) or (backdrop-filter:blur(4px))){.ck-drawing-canvas-scrim{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.ck-drawing-canvas-toolbar{z-index:1;cursor:auto;width:100%;min-width:0;margin-inline:auto;padding-inline:.75rem;position:relative}.ck-drawing-canvas-surface{z-index:0;touch-action:none;flex:auto;min-height:0;position:relative}.ck-drawing-canvas-error{border-radius:var(--radius-md);background:var(--background);width:max-content;max-width:calc(100vw - 1.5rem);color:var(--destructive);margin:.75rem auto;padding:.75rem;font-size:.875rem}";
|
|
6
|
+
function f(e) {
|
|
7
|
+
let t = e.currentTarget;
|
|
8
|
+
typeof t.hasPointerCapture == "function" && t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId);
|
|
9
|
+
}
|
|
10
|
+
var p = s.memo(function({ onSave: c, onCancel: d, remoteStrokes: p }) {
|
|
11
|
+
let m = t(), h = s.useRef(null), g = s.useRef(null), [_, v] = s.useState(!1), [y, b] = s.useState(null), x = s.useRef(!1), S = s.useCallback((e) => {
|
|
12
|
+
let t = h.current;
|
|
13
|
+
if (!t) return {
|
|
14
|
+
x: 0,
|
|
15
|
+
y: 0
|
|
16
|
+
};
|
|
17
|
+
let n = t.getBoundingClientRect();
|
|
18
|
+
if ("touches" in e && e.touches) {
|
|
19
|
+
let t = e.touches[0];
|
|
20
|
+
return t ? {
|
|
21
|
+
x: t.clientX - n.left,
|
|
22
|
+
y: t.clientY - n.top
|
|
23
|
+
} : {
|
|
24
|
+
x: 0,
|
|
25
|
+
y: 0
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
let r = e;
|
|
29
|
+
return {
|
|
30
|
+
x: r.clientX - n.left,
|
|
31
|
+
y: r.clientY - n.top
|
|
32
|
+
};
|
|
33
|
+
}, []), C = s.useCallback((e) => {
|
|
34
|
+
if (e.button !== 0 || g.current !== null || x.current) return;
|
|
35
|
+
g.current = e.pointerId;
|
|
36
|
+
try {
|
|
37
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
38
|
+
} catch {}
|
|
39
|
+
let t = S(e);
|
|
40
|
+
m.startPath(t.x, t.y);
|
|
41
|
+
}, [S, m]), w = s.useCallback((e) => {
|
|
42
|
+
if (!m.activePath || g.current !== e.pointerId) return;
|
|
43
|
+
let t = S(e);
|
|
44
|
+
m.addPoint(t.x, t.y);
|
|
45
|
+
}, [S, m]), T = s.useCallback((e) => {
|
|
46
|
+
g.current === e.pointerId && (g.current = null, f(e), m.endPath());
|
|
47
|
+
}, [m]), E = s.useCallback(() => {
|
|
48
|
+
if (m.paths.length === 0 || x.current) return;
|
|
49
|
+
let e = h.current, t = m.paths.flatMap((e) => {
|
|
50
|
+
let t = i(e);
|
|
51
|
+
return t ? [t] : [];
|
|
52
|
+
});
|
|
53
|
+
t.length !== 0 && (x.current = !0, v(!0), b(null), Promise.resolve().then(() => c({
|
|
54
|
+
type: "svg",
|
|
55
|
+
paths: t,
|
|
56
|
+
viewport: {
|
|
57
|
+
width: e?.clientWidth || window.innerWidth,
|
|
58
|
+
height: e?.clientHeight || window.innerHeight
|
|
59
|
+
}
|
|
60
|
+
})).catch(() => {
|
|
61
|
+
b("Could not save drawing. Your strokes are still here. Try again.");
|
|
62
|
+
}).finally(() => {
|
|
63
|
+
x.current = !1, v(!1);
|
|
64
|
+
}));
|
|
65
|
+
}, [m.paths, c]);
|
|
66
|
+
e(m.undo, m.redo, d);
|
|
67
|
+
let D = m.paths.flatMap((e) => {
|
|
68
|
+
let t = i(e);
|
|
69
|
+
return t ? [t] : [];
|
|
70
|
+
}), O = m.activePath ? i(m.activePath) : null, k = !!(p && p.length > 0);
|
|
71
|
+
return /* @__PURE__ */ u("div", {
|
|
72
|
+
"data-commentkit-ui": !0,
|
|
73
|
+
"data-slot": "comment-drawing-canvas",
|
|
74
|
+
className: "ck-drawing-canvas",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ l("div", {
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
className: "ck-drawing-canvas-scrim"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ u("div", {
|
|
81
|
+
className: "ck-drawing-canvas-toolbar",
|
|
82
|
+
children: [/* @__PURE__ */ l(n, {
|
|
83
|
+
colors: r,
|
|
84
|
+
drawing: m,
|
|
85
|
+
onSave: E,
|
|
86
|
+
saveDisabled: m.paths.length === 0 || _,
|
|
87
|
+
onCancel: d
|
|
88
|
+
}), y ? /* @__PURE__ */ l("p", {
|
|
89
|
+
role: "alert",
|
|
90
|
+
className: "ck-drawing-canvas-error",
|
|
91
|
+
children: y
|
|
92
|
+
}) : null]
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ u("svg", {
|
|
95
|
+
ref: h,
|
|
96
|
+
role: "application",
|
|
97
|
+
"aria-label": "Drawing canvas",
|
|
98
|
+
className: "ck-drawing-canvas-surface",
|
|
99
|
+
onPointerDown: C,
|
|
100
|
+
onPointerMove: w,
|
|
101
|
+
onPointerUp: T,
|
|
102
|
+
onPointerCancel: (e) => {
|
|
103
|
+
g.current === e.pointerId && (g.current = null, f(e), m.cancelPath());
|
|
104
|
+
},
|
|
105
|
+
children: [
|
|
106
|
+
k && p ? p.map((e, t) => /* @__PURE__ */ l("g", {
|
|
107
|
+
opacity: .5,
|
|
108
|
+
children: /* @__PURE__ */ l(o, { path: e })
|
|
109
|
+
}, `remote-${String(t)}`)) : null,
|
|
110
|
+
D.map((e, t) => /* @__PURE__ */ l(o, { path: e }, `local-${String(t)}`)),
|
|
111
|
+
O ? /* @__PURE__ */ l(o, { path: O }) : null
|
|
112
|
+
]
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ l(a, { mode: "draw" })
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
function m(e) {
|
|
119
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("style", {
|
|
120
|
+
"data-ck-tool-styles": "drawing",
|
|
121
|
+
children: d
|
|
122
|
+
}), /* @__PURE__ */ l(p, { ...e })] });
|
|
123
|
+
}
|
|
124
|
+
export { m as CommentDrawingCanvas };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { n as e } from "./dist-De294MVF.js";
|
|
2
|
+
import { s as t, t as n } from "./button-By0hGrJK.js";
|
|
3
|
+
import { i as r, o as i, r as a } from "./separator-XDBsaWyw.js";
|
|
4
|
+
import { r as o } from "./comment-utils-BycYTSxA.js";
|
|
5
|
+
import { t as s } from "./button-group-Cl9CrvvU.js";
|
|
6
|
+
import { d as c, f as l, u } from "./comment-kit-ui-CzfdAZs2.js";
|
|
7
|
+
import * as d from "react";
|
|
8
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
var h = ".ck-dialog-content.ck-image-lightbox{width:100vw;max-width:none;height:100dvh;max-height:none;box-shadow:none;background-color:#0000;border:0;border-radius:0;justify-content:center;align-items:center;gap:0;padding:0;display:flex;inset:0;translate:none}@media (width>=640px){.ck-dialog-content.ck-image-lightbox{max-width:none}}.ck-root[data-theme=dark] .ck-dialog-content.ck-image-lightbox{box-shadow:none}.ck-image-lightbox-prev,.ck-image-lightbox-next{position:absolute}.ck-image-lightbox-prev{inset-inline-start:1rem}.ck-image-lightbox-next{inset-inline-end:1rem}.ck-image-lightbox-photo{object-fit:contain;width:auto;max-width:90vw;height:auto;max-height:90vh}.ck-image-lightbox-meta{border-radius:var(--radius-xl);background-color:var(--muted);text-align:center;max-width:90vw;color:var(--muted-foreground);padding:.25rem .625rem;font-size:.75rem;line-height:1rem;position:absolute;bottom:3.5rem;left:50%;transform:translate(-50%)}.ck-image-lightbox-actions{top:1rem;position:absolute;inset-inline-end:1rem}.ck-image-lightbox-dots{gap:.5rem;display:flex;position:absolute;bottom:1.5rem}.ck-image-lightbox-dot{cursor:pointer;background-color:color-mix(in oklch, var(--foreground) 40%, transparent);border:0;border-radius:999px;width:.625rem;height:.625rem;padding:0;transition:background-color .15s cubic-bezier(.4,0,.2,1)}.ck-image-lightbox-dot:hover{background-color:color-mix(in oklch, var(--foreground) 60%, transparent)}.ck-image-lightbox-dot--active,.ck-image-lightbox-dot--active:hover{background-color:var(--foreground)}";
|
|
10
|
+
function g({ className: e, children: t, ...n }) {
|
|
11
|
+
return /* @__PURE__ */ p("svg", {
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: 1.5,
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
...n,
|
|
20
|
+
className: e,
|
|
21
|
+
children: t
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function _() {
|
|
25
|
+
return /* @__PURE__ */ p(g, { children: /* @__PURE__ */ p("path", { d: "M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18" }) });
|
|
26
|
+
}
|
|
27
|
+
function v() {
|
|
28
|
+
return /* @__PURE__ */ p(g, { children: /* @__PURE__ */ p("path", { d: "M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18" }) });
|
|
29
|
+
}
|
|
30
|
+
function y() {
|
|
31
|
+
return /* @__PURE__ */ m(g, { children: [/* @__PURE__ */ p("path", { d: "M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z" }), /* @__PURE__ */ p("path", { d: "M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5" })] });
|
|
32
|
+
}
|
|
33
|
+
function b() {
|
|
34
|
+
return /* @__PURE__ */ m(g, { children: [/* @__PURE__ */ p("path", { d: "M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002" }), /* @__PURE__ */ p("path", { d: "M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016" })] });
|
|
35
|
+
}
|
|
36
|
+
function x() {
|
|
37
|
+
return /* @__PURE__ */ p(g, { children: /* @__PURE__ */ p("path", { d: "M18 6L6.00081 17.9992M17.9992 18L6 6.00085" }) });
|
|
38
|
+
}
|
|
39
|
+
var S = d.memo(function({ images: h, initialIndex: g, open: S, onClose: C, returnFocusRef: w }) {
|
|
40
|
+
let [T, E] = d.useState(g);
|
|
41
|
+
d.useEffect(() => {
|
|
42
|
+
S && E(Math.max(0, Math.min(g, h.length - 1)));
|
|
43
|
+
}, [
|
|
44
|
+
g,
|
|
45
|
+
S,
|
|
46
|
+
h.length
|
|
47
|
+
]);
|
|
48
|
+
let D = h[T], O = !!(D && (D.type ?? D.filename ?? D.size != null)), k = async (t) => {
|
|
49
|
+
if (t.stopPropagation(), D) try {
|
|
50
|
+
let t = new URL(D.url, window.location.href);
|
|
51
|
+
if (t.protocol !== "http:" && t.protocol !== "https:" && t.protocol !== "data:" && t.protocol !== "blob:") throw Error("Invalid image URL protocol");
|
|
52
|
+
let n = await fetch(t.href);
|
|
53
|
+
if (!n.ok) throw Error(`Failed to fetch image (${String(n.status)})`);
|
|
54
|
+
let r = await n.blob();
|
|
55
|
+
await navigator.clipboard.write([new ClipboardItem({ [r.type]: r })]), e.success("Image copied");
|
|
56
|
+
} catch {
|
|
57
|
+
e.error("Failed to copy image");
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ p(u, {
|
|
61
|
+
open: S && h.length > 0,
|
|
62
|
+
onOpenChange: (e) => {
|
|
63
|
+
e || C();
|
|
64
|
+
},
|
|
65
|
+
children: /* @__PURE__ */ m(c, {
|
|
66
|
+
showCloseButton: !1,
|
|
67
|
+
finalFocus: w,
|
|
68
|
+
"aria-describedby": void 0,
|
|
69
|
+
className: "ck-image-lightbox",
|
|
70
|
+
onClick: C,
|
|
71
|
+
onKeyDownCapture: (e) => {
|
|
72
|
+
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
73
|
+
e.preventDefault(), e.stopPropagation();
|
|
74
|
+
let t = e.key === "ArrowLeft" ? -1 : 1;
|
|
75
|
+
E((e) => Math.max(0, Math.min(h.length - 1, e + t)));
|
|
76
|
+
},
|
|
77
|
+
children: [/* @__PURE__ */ p(l, {
|
|
78
|
+
className: "ck-sr-only",
|
|
79
|
+
children: "Image lightbox"
|
|
80
|
+
}), D ? /* @__PURE__ */ m(f, { children: [
|
|
81
|
+
h.length > 1 && T > 0 ? /* @__PURE__ */ p(n, {
|
|
82
|
+
variant: "outline",
|
|
83
|
+
size: "icon",
|
|
84
|
+
"aria-label": "Previous image",
|
|
85
|
+
className: "ck-image-lightbox-prev",
|
|
86
|
+
onClick: (e) => {
|
|
87
|
+
e.stopPropagation(), E((e) => e - 1);
|
|
88
|
+
},
|
|
89
|
+
children: /* @__PURE__ */ p(_, {})
|
|
90
|
+
}) : null,
|
|
91
|
+
h.length > 1 && T < h.length - 1 ? /* @__PURE__ */ p(n, {
|
|
92
|
+
variant: "outline",
|
|
93
|
+
size: "icon",
|
|
94
|
+
"aria-label": "Next image",
|
|
95
|
+
className: "ck-image-lightbox-next",
|
|
96
|
+
onClick: (e) => {
|
|
97
|
+
e.stopPropagation(), E((e) => e + 1);
|
|
98
|
+
},
|
|
99
|
+
children: /* @__PURE__ */ p(v, {})
|
|
100
|
+
}) : null,
|
|
101
|
+
/* @__PURE__ */ p("img", {
|
|
102
|
+
src: D.url,
|
|
103
|
+
alt: D.alt ?? D.filename ?? `Image ${String(T + 1)}`,
|
|
104
|
+
className: "ck-image-lightbox-photo",
|
|
105
|
+
onClick: (e) => {
|
|
106
|
+
e.stopPropagation();
|
|
107
|
+
}
|
|
108
|
+
}),
|
|
109
|
+
O ? /* @__PURE__ */ p("div", {
|
|
110
|
+
className: "ck-image-lightbox-meta",
|
|
111
|
+
onClick: (e) => {
|
|
112
|
+
e.stopPropagation();
|
|
113
|
+
},
|
|
114
|
+
children: [
|
|
115
|
+
D.type,
|
|
116
|
+
D.filename,
|
|
117
|
+
o(D.size)
|
|
118
|
+
].filter(Boolean).join(" • ")
|
|
119
|
+
}) : null,
|
|
120
|
+
/* @__PURE__ */ m(s, {
|
|
121
|
+
className: "ck-image-lightbox-actions",
|
|
122
|
+
onClick: (e) => {
|
|
123
|
+
e.stopPropagation();
|
|
124
|
+
},
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ m(a, { children: [/* @__PURE__ */ p(i, {
|
|
127
|
+
render: /* @__PURE__ */ p(n, {
|
|
128
|
+
variant: "outline",
|
|
129
|
+
size: "icon",
|
|
130
|
+
"aria-label": "Copy image",
|
|
131
|
+
onClick: (e) => {
|
|
132
|
+
k(e);
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
children: /* @__PURE__ */ p(y, {})
|
|
136
|
+
}), /* @__PURE__ */ p(r, { children: "Copy image" })] }),
|
|
137
|
+
/* @__PURE__ */ m(a, { children: [/* @__PURE__ */ p(i, {
|
|
138
|
+
render: /* @__PURE__ */ p(n, {
|
|
139
|
+
variant: "outline",
|
|
140
|
+
size: "icon",
|
|
141
|
+
"aria-label": "Download",
|
|
142
|
+
onClick: (e) => {
|
|
143
|
+
if (e.stopPropagation(), !D) return;
|
|
144
|
+
let t = document.createElement("a");
|
|
145
|
+
t.href = D.url, t.download = D.alt ?? `image-${String(T + 1)}`, t.target = "_blank", t.click();
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
children: /* @__PURE__ */ p(b, {})
|
|
149
|
+
}), /* @__PURE__ */ p(r, { children: "Download" })] }),
|
|
150
|
+
/* @__PURE__ */ m(a, { children: [/* @__PURE__ */ p(i, {
|
|
151
|
+
render: /* @__PURE__ */ p(n, {
|
|
152
|
+
variant: "outline",
|
|
153
|
+
size: "icon",
|
|
154
|
+
"aria-label": "Close",
|
|
155
|
+
onClick: C
|
|
156
|
+
}),
|
|
157
|
+
children: /* @__PURE__ */ p(x, {})
|
|
158
|
+
}), /* @__PURE__ */ p(r, { children: "Close" })] })
|
|
159
|
+
]
|
|
160
|
+
}),
|
|
161
|
+
h.length > 1 ? /* @__PURE__ */ p("div", {
|
|
162
|
+
className: "ck-image-lightbox-dots",
|
|
163
|
+
children: h.map((e, n) => /* @__PURE__ */ p("button", {
|
|
164
|
+
type: "button",
|
|
165
|
+
"aria-label": `Go to image ${String(n + 1)}`,
|
|
166
|
+
"aria-current": n === T ? "true" : void 0,
|
|
167
|
+
className: t("ck-image-lightbox-dot", n === T && "ck-image-lightbox-dot--active"),
|
|
168
|
+
onClick: (e) => {
|
|
169
|
+
e.stopPropagation(), E(n);
|
|
170
|
+
}
|
|
171
|
+
}, e.id))
|
|
172
|
+
}) : null
|
|
173
|
+
] }) : null]
|
|
174
|
+
})
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
function C(e) {
|
|
178
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("style", {
|
|
179
|
+
"data-ck-tool-styles": "lightbox",
|
|
180
|
+
children: h
|
|
181
|
+
}), /* @__PURE__ */ p(S, { ...e })] });
|
|
182
|
+
}
|
|
183
|
+
export { C as CommentImageLightbox };
|