react-smart-copy 1.25.1 → 1.26.1
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/README.md +2 -2
- package/dist/capture.cjs +4 -4
- package/dist/capture.cjs.map +1 -1
- package/dist/capture.js +4 -4
- package/dist/capture.js.map +1 -1
- package/dist/chunks/{clipboard-adapter-UIFc_Qso.cjs → clipboard-adapter-Bpuf5GmB.cjs} +3 -3
- package/dist/chunks/{clipboard-adapter-UIFc_Qso.cjs.map → clipboard-adapter-Bpuf5GmB.cjs.map} +1 -1
- package/dist/chunks/{clipboard-adapter-CmKDTFdO.js → clipboard-adapter-DyCmyZV9.js} +3 -3
- package/dist/chunks/{clipboard-adapter-CmKDTFdO.js.map → clipboard-adapter-DyCmyZV9.js.map} +1 -1
- package/dist/chunks/{contrast-C9d8QuaF.cjs → contrast-BatHkv8j.cjs} +2 -2
- package/dist/chunks/{contrast-C9d8QuaF.cjs.map → contrast-BatHkv8j.cjs.map} +1 -1
- package/dist/chunks/{contrast-DUaZq5SA.js → contrast-DnCunIr1.js} +2 -2
- package/dist/chunks/{contrast-DUaZq5SA.js.map → contrast-DnCunIr1.js.map} +1 -1
- package/dist/chunks/{core-BcEpjsB_.js → core-88XdCKaH.js} +70 -6
- package/dist/chunks/core-88XdCKaH.js.map +1 -0
- package/dist/chunks/{core-C1IV8E15.cjs → core-DF6jiigD.cjs} +81 -5
- package/dist/chunks/core-DF6jiigD.cjs.map +1 -0
- package/dist/chunks/{deadline-j2hD7JKz.cjs → deadline-Cz6l-PDR.cjs} +14 -2
- package/dist/chunks/deadline-Cz6l-PDR.cjs.map +1 -0
- package/dist/chunks/{deadline-CbwnZ3Oq.js → deadline-DTAkra5B.js} +9 -3
- package/dist/chunks/deadline-DTAkra5B.js.map +1 -0
- package/dist/chunks/{errors-DFmEAC4E.cjs → errors-CF2EQNbc.cjs} +14 -2
- package/dist/chunks/errors-CF2EQNbc.cjs.map +1 -0
- package/dist/chunks/{errors-CT-FfUtU.js → errors-CGcMvbhJ.js} +9 -3
- package/dist/chunks/errors-CGcMvbhJ.js.map +1 -0
- package/dist/chunks/{field-B6SRWRbI.cjs → field-C8A5Yxln.cjs} +3 -3
- package/dist/chunks/{field-B6SRWRbI.cjs.map → field-C8A5Yxln.cjs.map} +1 -1
- package/dist/chunks/{field-DsRKkbav.js → field-CDCN9x0L.js} +3 -3
- package/dist/chunks/{field-DsRKkbav.js.map → field-CDCN9x0L.js.map} +1 -1
- package/dist/chunks/{index-Q_QeSwGr.d.ts → index-BidyqUMa.d.ts} +34 -2
- package/dist/chunks/{index-CqYzvxSN.d.cts → index-CZ6HpdKm.d.cts} +34 -2
- package/dist/chunks/{limits-BP9R5wnr.js → limits-DvJZJn0V.js} +2 -2
- package/dist/chunks/{limits-BP9R5wnr.js.map → limits-DvJZJn0V.js.map} +1 -1
- package/dist/chunks/{limits-9wi1f6xT.cjs → limits-Vy-Xv26D.cjs} +2 -2
- package/dist/chunks/{limits-9wi1f6xT.cjs.map → limits-Vy-Xv26D.cjs.map} +1 -1
- package/dist/chunks/{paste-reader-BWQaYNaV.cjs → paste-reader-BL51Jt1y.cjs} +2 -2
- package/dist/chunks/{paste-reader-BWQaYNaV.cjs.map → paste-reader-BL51Jt1y.cjs.map} +1 -1
- package/dist/chunks/{paste-reader-D6uOTDBM.js → paste-reader-BpXOH_Px.js} +2 -2
- package/dist/chunks/{paste-reader-D6uOTDBM.js.map → paste-reader-BpXOH_Px.js.map} +1 -1
- package/dist/chunks/{payload-BrQWGwyx.js → payload-5uJedhwz.js} +2 -2
- package/dist/chunks/{payload-BrQWGwyx.js.map → payload-5uJedhwz.js.map} +1 -1
- package/dist/chunks/{payload-BWQ6sPtS.js → payload-DZnXoBmF.js} +3 -3
- package/dist/chunks/{payload-BWQ6sPtS.js.map → payload-DZnXoBmF.js.map} +1 -1
- package/dist/chunks/{payload-sBxkG7jH.cjs → payload-DjSSLonm.cjs} +2 -2
- package/dist/chunks/{payload-sBxkG7jH.cjs.map → payload-DjSSLonm.cjs.map} +1 -1
- package/dist/chunks/{payload-tTK6REua.cjs → payload-DzHhs6Ey.cjs} +3 -3
- package/dist/chunks/{payload-tTK6REua.cjs.map → payload-DzHhs6Ey.cjs.map} +1 -1
- package/dist/chunks/{share-nx7M4Z0t.cjs → share-Bk6MPmJg.cjs} +6 -6
- package/dist/chunks/{share-nx7M4Z0t.cjs.map → share-Bk6MPmJg.cjs.map} +1 -1
- package/dist/chunks/{share-CU91L4EK.js → share-tdlNQeje.js} +6 -6
- package/dist/chunks/{share-CU91L4EK.js.map → share-tdlNQeje.js.map} +1 -1
- package/dist/chunks/{url-BrhVUwn7.cjs → url-CL4YTCvM.cjs} +2 -2
- package/dist/chunks/{url-BrhVUwn7.cjs.map → url-CL4YTCvM.cjs.map} +1 -1
- package/dist/chunks/{url-COID0BLY.js → url-zB_krkuF.js} +2 -2
- package/dist/chunks/{url-COID0BLY.js.map → url-zB_krkuF.js.map} +1 -1
- package/dist/code.cjs +2 -2
- package/dist/code.js +2 -2
- package/dist/color.cjs +2 -2
- package/dist/color.js +2 -2
- package/dist/core.cjs +7 -5
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +6 -6
- package/dist/email.cjs +2 -2
- package/dist/email.js +2 -2
- package/dist/files.cjs +1 -1
- package/dist/files.js +1 -1
- package/dist/image.cjs +3 -3
- package/dist/image.cjs.map +1 -1
- package/dist/image.js +3 -3
- package/dist/image.js.map +1 -1
- package/dist/index.cjs +31 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +29 -8
- package/dist/index.js.map +1 -1
- package/dist/link.cjs +3 -3
- package/dist/link.js +3 -3
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.js +1 -1
- package/dist/number.cjs +2 -2
- package/dist/number.js +2 -2
- package/dist/otp.cjs +1 -1
- package/dist/otp.js +1 -1
- package/dist/rich.cjs +3 -3
- package/dist/rich.js +3 -3
- package/dist/secrets.cjs +1 -1
- package/dist/secrets.js +1 -1
- package/dist/share.cjs +1 -1
- package/dist/share.js +1 -1
- package/dist/structured.cjs +2 -2
- package/dist/structured.js +2 -2
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/testing.cjs +2 -2
- package/dist/testing.js +2 -2
- package/package.json +8 -2
- package/dist/chunks/core-BcEpjsB_.js.map +0 -1
- package/dist/chunks/core-C1IV8E15.cjs.map +0 -1
- package/dist/chunks/deadline-CbwnZ3Oq.js.map +0 -1
- package/dist/chunks/deadline-j2hD7JKz.cjs.map +0 -1
- package/dist/chunks/errors-CT-FfUtU.js.map +0 -1
- package/dist/chunks/errors-DFmEAC4E.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { A as resolveMaxRetries, C as describeCopyError, D as toCopyError, E as isRetryableError, O as DEFAULT_MAX_RETRIES, S as createCopyError, T as isCopyFailure, _ as ClipboardOperation, a as CopySource, b as CopyFailure, c as ImagePayload, d as MultiPayloadItem, f as TextPayload, g as validatePayload, h as serializeJson, i as CopyPayloadKind, k as OperationContext, l as JsonPayload, m as normalizePayload, n as CopyInput, o as HtmlPayload, p as isBlob, r as CopyPayload, s as IMAGE_MIME_TYPE, t as BlobSource, u as MultiPayload, v as CopyError, w as describePasteError, x as copyFailure, y as CopyErrorType } from "./chunks/payload-CcvSx_Hq.js";
|
|
3
3
|
import { _ as resolvePasteReadOptions, a as DataTransferItemLike, c as PasteAcceptShorthand, d as PasteReadOptions, f as PasteReadResult, g as canAcceptDrag, h as ResolvedPasteReadOptions, i as DEFAULT_PASTE_MAX_ITEMS, l as PasteItem, m as PasteSource, n as DEFAULT_PASTE_ACCEPT, o as DataTransferLike, p as PasteResult, r as DEFAULT_PASTE_MAX_BYTES, s as PasteAccept, t as ClipboardItemLike, u as PasteLimits } from "./chunks/paste-reader-DcXnRWQr.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as CopyCoordinator, A as DragCopyStatus, B as CopyMachine, C as DragCopyItem, D as DragCopyPayload, E as DragCopyPassReason, F as applyDragCopy, G as CopyStatus, H as CopyMachineOptionsSource, I as registerDragCopy, J as ErrorState, K as CopyingState, L as CopiedState, M as DragMultiPayload, N as DragStartEventLike, O as DragCopySource, P as RegisterDragCopyResult, Q as createCopyMachine, R as CopyCancelReason, S as DragCopyDecision, T as DragCopyOutcome, U as CopyOutcome, V as CopyMachineOptions, W as CopyState, X as IdleState, Y as IDLE_STATE, Z as canRetryState, _ as createPasteMachine, a as PasteEventLike, at as isTextualMimeType, b as readClipboardPermission, c as PasteMachine, ct as normalizeClipboardType, d as PasteOutcome, dt as sniffImageType, et as CopyCoordinatorMember, f as PasteReadState, g as canRetryPasteState, h as PasteStatus, i as PasteErrorState, it as WEB_CUSTOM_FORMAT_PREFIX, j as DragEffectAllowed, k as DragCopyState, l as PasteMachineOptions, lt as normalizeMimeType, m as PasteState, n as PasteCancelReason, nt as RasterImageMimeType, o as PasteIdleState, ot as isWebCustomFormat, p as PasteReadingState, q as DEFAULT_RESET_AFTER_MS, r as PasteDropEventLike, rt as SVG_MIME_TYPE, s as PasteIgnoredReason, st as matchesMimePattern, t as PASTE_IDLE_STATE, tt as createCopyCoordinator, u as PasteMachineOptionsSource, ut as sniffImageBytes, v as ClipboardPermissionName, w as DragCopyOptions, x as watchClipboardPermission, y as ClipboardPermissionState, z as CopyIgnoredReason } from "./chunks/index-BidyqUMa.js";
|
|
5
5
|
import { a as ClipboardItemData, i as ClipboardItemConstructorLike, n as ClipboardAdapter, o as ClipboardLike, r as ClipboardEnvironment, s as createBrowserClipboardAdapter, t as BrowserClipboardAdapterOptions } from "./chunks/clipboard-adapter-Chm6zq60.js";
|
|
6
6
|
import { _ as registerCopyInterceptor, a as CopyInterceptOptions, c as CopyInterceptTransform, d as DEFAULT_INTERCEPTED_EVENTS, f as InterceptedCopyKind, g as readCopySelection, h as interceptCopyEvent, i as CopyInterceptFailureMode, l as CopyInterceptorOptions, m as SyncMultiPayload, n as CopyEventLike, o as CopyInterceptOutcome, p as SyncCopyPayload, r as CopyInterceptDecision, s as CopyInterceptPassReason, t as ClipboardDataLike, u as CopySelection } from "./chunks/copy-interceptor-D8c9EDnO.js";
|
|
7
7
|
import { a as createBrowserPasteAdapter, i as PasteEnvironment, n as PasteAdapter, r as PasteClipboardLike, t as BrowserPasteAdapterOptions } from "./chunks/paste-adapter-CfIDT3mp.js";
|
|
@@ -55,6 +55,27 @@ interface UseCopyInterceptorResult<T extends Element> {
|
|
|
55
55
|
*/
|
|
56
56
|
export declare function useCopyInterceptor<T extends Element = HTMLElement>(options: UseCopyInterceptorOptions): UseCopyInterceptorResult<T>;
|
|
57
57
|
//#endregion
|
|
58
|
+
//#region src/react/useClipboardPermission.d.ts
|
|
59
|
+
interface UseClipboardPermissionResult {
|
|
60
|
+
/**
|
|
61
|
+
* The permission, or `'checking'` until the browser answers. It is `'checking'` on the
|
|
62
|
+
* server and on the first client render too, so hydration always matches.
|
|
63
|
+
*/
|
|
64
|
+
readonly state: ClipboardPermissionState | 'checking';
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Follows a clipboard permission, so a paste button can say what to do instead of failing:
|
|
68
|
+
*
|
|
69
|
+
* ```tsx
|
|
70
|
+
* const { state } = useClipboardPermission('read');
|
|
71
|
+
* if (state === 'denied') return <p>Allow clipboard access in the address bar, then try again.</p>;
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* It never reads the clipboard and never shows a prompt. See `ClipboardPermissionState` for
|
|
75
|
+
* what `'unsupported'` means. SSR-safe.
|
|
76
|
+
*/
|
|
77
|
+
export declare function useClipboardPermission(name?: ClipboardPermissionName): UseClipboardPermissionResult;
|
|
78
|
+
//#endregion
|
|
58
79
|
//#region src/react/useRevealOnInteraction.d.ts
|
|
59
80
|
/** Why the target is currently revealed, in priority order. */
|
|
60
81
|
type RevealReason = 'forced' | 'focus' | 'hover' | 'touch' | 'no-hover-device';
|
|
@@ -573,5 +594,5 @@ interface UseOtpFieldResult extends OtpSnapshot {
|
|
|
573
594
|
*/
|
|
574
595
|
export declare function useOtpField(options?: UseOtpFieldOptions): UseOtpFieldResult;
|
|
575
596
|
//#endregion
|
|
576
|
-
export { BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, CopiedState, CopyCancelReason, CopyCoordinator, CopyCoordinatorMember, CopyError, CopyErrorType, CopyEventLike, CopyFailure, type CopyFieldContextValue, type CopyFieldLabelProps, type CopyFieldMessages, type CopyFieldRootProps, type CopyFieldTriggerProps, type CopyFieldTriggerRenderProps, type CopyFieldValueProps, type CopyGroupProps, CopyIgnoredReason, CopyInput, CopyInterceptDecision, CopyInterceptFailureMode, CopyInterceptOptions, CopyInterceptOutcome, CopyInterceptPassReason, CopyInterceptTransform, CopyInterceptorOptions, CopyMachine, CopyMachineOptions, CopyMachineOptionsSource, CopyOutcome, CopyPayload, CopyPayloadKind, type CopyReason, CopySelection, CopySource, CopyState, CopyStatus, CopyingState, DEFAULT_INTERCEPTED_EVENTS, DEFAULT_MAX_RETRIES, DEFAULT_PASTE_ACCEPT, DEFAULT_PASTE_MAX_BYTES, DEFAULT_PASTE_MAX_ITEMS, DEFAULT_RESET_AFTER_MS, type DataTransferItemLike, DataTransferLike, DragCopyDecision, DragCopyItem, DragCopyOptions, DragCopyOutcome, DragCopyPassReason, DragCopyPayload, DragCopySource, DragCopyState, DragCopyStatus, DragEffectAllowed, DragMultiPayload, DragStartEventLike, ErrorState, HtmlPayload, IDLE_STATE, IMAGE_MIME_TYPE, IdleState, ImagePayload, InterceptedCopyKind, JsonPayload, type LiveRegionProps, MultiPayload, MultiPayloadItem, type OperationContext, type OtpInputProps, PASTE_IDLE_STATE, type PasteAccept, type PasteAcceptShorthand, type PasteAdapter, PasteCancelReason, type PasteClipboardLike, PasteDropEventLike, type PasteDropTargetProps, type PasteEnvironment, PasteErrorState, PasteEventLike, type PasteFieldContextValue, type PasteFieldLabelProps, type PasteFieldMessages, type PasteFieldPreviewProps, type PasteFieldPreviewRenderProps, type PasteFieldRootProps, type PasteFieldStatusProps, type PasteFieldTriggerProps, type PasteFieldTriggerRenderProps, type PasteFieldZoneProps, PasteIdleState, PasteIgnoredReason, type PasteItem, type PasteLimits, PasteMachine, PasteMachineOptions, PasteMachineOptionsSource, PasteOutcome, type PasteReadOptions, type PasteReadResult, PasteReadState, PasteReadingState, type PasteResult, type PasteSource, PasteState, PasteStatus, type PasteTargetProps, RasterImageMimeType, RegisterDragCopyResult, type ResolvedPasteReadOptions, type ResolvedShare, type RevealReason, type RevealTargetProps, SVG_MIME_TYPE, type ShareContent, type ShareEnvironment, type ShareMethod, type ShareMode, type ShareOptions, type ShareOutcome, type ShareStatus, SyncCopyPayload, SyncMultiPayload, TextPayload, type UseCopyInterceptorOptions, type UseCopyInterceptorResult, type UseCopyOptions, type UseCopyResult, type UseDisplayStatusOptions, type UseDragCopyOptions, type UseDragCopyResult, type UseOtpFieldOptions, type UseOtpFieldResult, type UsePasteDisplayStatusOptions, type UsePasteOptions, type UsePasteResult, type UseRevealOnInteractionOptions, type UseRevealOnInteractionResult, type UseShareOptions, type UseShareOutcome, type UseShareResult, WEB_CUSTOM_FORMAT_PREFIX, applyDragCopy, canAcceptDrag, canRetryPasteState, canRetryState, copyFailure, createBrowserClipboardAdapter, createBrowserPasteAdapter, createCopyCoordinator, createCopyError, createCopyMachine, createPasteMachine, describeCopyError, describePasteError, interceptCopyEvent, isBlob, isCopyFailure, isRetryableError, isTextualMimeType, isWebCustomFormat, matchesMimePattern, normalizeClipboardType, normalizeMimeType, normalizePayload, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, validatePayload };
|
|
597
|
+
export { BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, ClipboardPermissionName, ClipboardPermissionState, CopiedState, CopyCancelReason, CopyCoordinator, CopyCoordinatorMember, CopyError, CopyErrorType, CopyEventLike, CopyFailure, type CopyFieldContextValue, type CopyFieldLabelProps, type CopyFieldMessages, type CopyFieldRootProps, type CopyFieldTriggerProps, type CopyFieldTriggerRenderProps, type CopyFieldValueProps, type CopyGroupProps, CopyIgnoredReason, CopyInput, CopyInterceptDecision, CopyInterceptFailureMode, CopyInterceptOptions, CopyInterceptOutcome, CopyInterceptPassReason, CopyInterceptTransform, CopyInterceptorOptions, CopyMachine, CopyMachineOptions, CopyMachineOptionsSource, CopyOutcome, CopyPayload, CopyPayloadKind, type CopyReason, CopySelection, CopySource, CopyState, CopyStatus, CopyingState, DEFAULT_INTERCEPTED_EVENTS, DEFAULT_MAX_RETRIES, DEFAULT_PASTE_ACCEPT, DEFAULT_PASTE_MAX_BYTES, DEFAULT_PASTE_MAX_ITEMS, DEFAULT_RESET_AFTER_MS, type DataTransferItemLike, DataTransferLike, DragCopyDecision, DragCopyItem, DragCopyOptions, DragCopyOutcome, DragCopyPassReason, DragCopyPayload, DragCopySource, DragCopyState, DragCopyStatus, DragEffectAllowed, DragMultiPayload, DragStartEventLike, ErrorState, HtmlPayload, IDLE_STATE, IMAGE_MIME_TYPE, IdleState, ImagePayload, InterceptedCopyKind, JsonPayload, type LiveRegionProps, MultiPayload, MultiPayloadItem, type OperationContext, type OtpInputProps, PASTE_IDLE_STATE, type PasteAccept, type PasteAcceptShorthand, type PasteAdapter, PasteCancelReason, type PasteClipboardLike, PasteDropEventLike, type PasteDropTargetProps, type PasteEnvironment, PasteErrorState, PasteEventLike, type PasteFieldContextValue, type PasteFieldLabelProps, type PasteFieldMessages, type PasteFieldPreviewProps, type PasteFieldPreviewRenderProps, type PasteFieldRootProps, type PasteFieldStatusProps, type PasteFieldTriggerProps, type PasteFieldTriggerRenderProps, type PasteFieldZoneProps, PasteIdleState, PasteIgnoredReason, type PasteItem, type PasteLimits, PasteMachine, PasteMachineOptions, PasteMachineOptionsSource, PasteOutcome, type PasteReadOptions, type PasteReadResult, PasteReadState, PasteReadingState, type PasteResult, type PasteSource, PasteState, PasteStatus, type PasteTargetProps, RasterImageMimeType, RegisterDragCopyResult, type ResolvedPasteReadOptions, type ResolvedShare, type RevealReason, type RevealTargetProps, SVG_MIME_TYPE, type ShareContent, type ShareEnvironment, type ShareMethod, type ShareMode, type ShareOptions, type ShareOutcome, type ShareStatus, SyncCopyPayload, SyncMultiPayload, TextPayload, type UseClipboardPermissionResult, type UseCopyInterceptorOptions, type UseCopyInterceptorResult, type UseCopyOptions, type UseCopyResult, type UseDisplayStatusOptions, type UseDragCopyOptions, type UseDragCopyResult, type UseOtpFieldOptions, type UseOtpFieldResult, type UsePasteDisplayStatusOptions, type UsePasteOptions, type UsePasteResult, type UseRevealOnInteractionOptions, type UseRevealOnInteractionResult, type UseShareOptions, type UseShareOutcome, type UseShareResult, WEB_CUSTOM_FORMAT_PREFIX, applyDragCopy, canAcceptDrag, canRetryPasteState, canRetryState, copyFailure, createBrowserClipboardAdapter, createBrowserPasteAdapter, createCopyCoordinator, createCopyError, createCopyMachine, createPasteMachine, describeCopyError, describePasteError, interceptCopyEvent, isBlob, isCopyFailure, isRetryableError, isTextualMimeType, isWebCustomFormat, matchesMimePattern, normalizeClipboardType, normalizeMimeType, normalizePayload, readClipboardPermission, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, validatePayload, watchClipboardPermission };
|
|
577
598
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as describePasteError, c as toCopyError, i as describeCopyError, n as copyFailure, o as isCopyFailure, r as createCopyError, s as isRetryableError, t as CopyFailure } from "./chunks/errors-
|
|
3
|
-
import { a as validatePayload, i as serializeJson, n as isBlob, r as normalizePayload, t as IMAGE_MIME_TYPE } from "./chunks/payload-
|
|
2
|
+
import { a as describePasteError, c as toCopyError, i as describeCopyError, n as copyFailure, o as isCopyFailure, r as createCopyError, s as isRetryableError, t as CopyFailure } from "./chunks/errors-CGcMvbhJ.js";
|
|
3
|
+
import { a as validatePayload, i as serializeJson, n as isBlob, r as normalizePayload, t as IMAGE_MIME_TYPE } from "./chunks/payload-5uJedhwz.js";
|
|
4
4
|
import { a as matchesMimePattern, c as sniffImageBytes, i as isWebCustomFormat, l as sniffImageType, n as WEB_CUSTOM_FORMAT_PREFIX, o as normalizeClipboardType, r as isTextualMimeType, s as normalizeMimeType, t as SVG_MIME_TYPE } from "./chunks/mime-aa-HA2dm.js";
|
|
5
|
-
import { t as createBrowserClipboardAdapter } from "./chunks/clipboard-adapter-
|
|
6
|
-
import { _ as
|
|
7
|
-
import { i as canAcceptDrag, l as resolvePasteReadOptions, n as DEFAULT_PASTE_MAX_BYTES, r as DEFAULT_PASTE_MAX_ITEMS, t as DEFAULT_PASTE_ACCEPT } from "./chunks/paste-reader-
|
|
8
|
-
import { i as shareOrCopy, r as shareMethod, t as TOUCH_FIRST } from "./chunks/share-
|
|
9
|
-
import { t as createOtpField } from "./chunks/field-
|
|
5
|
+
import { t as createBrowserClipboardAdapter } from "./chunks/clipboard-adapter-DyCmyZV9.js";
|
|
6
|
+
import { _ as DEFAULT_MAX_RETRIES, a as readClipboardPermission, b as createCopyCoordinator, c as registerDragCopy, d as readCopySelection, f as registerCopyInterceptor, g as createCopyMachine, h as canRetryState, i as createBrowserPasteAdapter, l as DEFAULT_INTERCEPTED_EVENTS, m as IDLE_STATE, n as canRetryPasteState, o as watchClipboardPermission, p as DEFAULT_RESET_AFTER_MS, r as createPasteMachine, s as applyDragCopy, t as PASTE_IDLE_STATE, u as interceptCopyEvent, v as invoke, y as resolveMaxRetries } from "./chunks/core-88XdCKaH.js";
|
|
7
|
+
import { i as canAcceptDrag, l as resolvePasteReadOptions, n as DEFAULT_PASTE_MAX_BYTES, r as DEFAULT_PASTE_MAX_ITEMS, t as DEFAULT_PASTE_ACCEPT } from "./chunks/paste-reader-BpXOH_Px.js";
|
|
8
|
+
import { i as shareOrCopy, r as shareMethod, t as TOUCH_FIRST } from "./chunks/share-tdlNQeje.js";
|
|
9
|
+
import { t as createOtpField } from "./chunks/field-CDCN9x0L.js";
|
|
10
10
|
import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/react/CopyGroup.tsx
|
|
@@ -112,6 +112,27 @@ function useCopyInterceptor(options) {
|
|
|
112
112
|
return { ref: setNode };
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
|
+
//#region src/react/useClipboardPermission.ts
|
|
116
|
+
/**
|
|
117
|
+
* Follows a clipboard permission, so a paste button can say what to do instead of failing:
|
|
118
|
+
*
|
|
119
|
+
* ```tsx
|
|
120
|
+
* const { state } = useClipboardPermission('read');
|
|
121
|
+
* if (state === 'denied') return <p>Allow clipboard access in the address bar, then try again.</p>;
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* It never reads the clipboard and never shows a prompt. See `ClipboardPermissionState` for
|
|
125
|
+
* what `'unsupported'` means. SSR-safe.
|
|
126
|
+
*/
|
|
127
|
+
function useClipboardPermission(name = "read") {
|
|
128
|
+
const [state, setState] = useState("checking");
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
setState("checking");
|
|
131
|
+
return watchClipboardPermission(name, setState);
|
|
132
|
+
}, [name]);
|
|
133
|
+
return { state };
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
115
136
|
//#region src/react/useMediaQuery.ts
|
|
116
137
|
const getServerSnapshot$1 = () => false;
|
|
117
138
|
/** SSR-safe media query subscription. Server and hydration render `false`. */
|
|
@@ -1200,6 +1221,6 @@ function useOtpField(options = {}) {
|
|
|
1200
1221
|
};
|
|
1201
1222
|
}
|
|
1202
1223
|
//#endregion
|
|
1203
|
-
export { CopyFailure, CopyField, CopyGroup, DEFAULT_INTERCEPTED_EVENTS, DEFAULT_MAX_RETRIES, DEFAULT_MIN_PENDING_MS, DEFAULT_PASTE_ACCEPT, DEFAULT_PASTE_MAX_BYTES, DEFAULT_PASTE_MAX_ITEMS, DEFAULT_PASTE_MIN_PENDING_MS, DEFAULT_PASTE_PENDING_DELAY_MS, DEFAULT_PENDING_DELAY_MS, DEFAULT_RESET_AFTER_MS, IDLE_STATE, IMAGE_MIME_TYPE, LiveRegion, PASTE_IDLE_STATE, PasteField, SVG_MIME_TYPE, WEB_CUSTOM_FORMAT_PREFIX, applyDragCopy, canAcceptDrag, canRetryPasteState, canRetryState, copyFailure, createBrowserClipboardAdapter, createBrowserPasteAdapter, createCopyCoordinator, createCopyError, createCopyMachine, createPasteMachine, defaultCopyFieldMessages, defaultPasteFieldMessages, describeCopyError, describePasteError, interceptCopyEvent, isBlob, isCopyFailure, isRetryableError, isTextualMimeType, isWebCustomFormat, matchesMimePattern, normalizeClipboardType, normalizeMimeType, normalizePayload, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, useCopy, useCopyField, useCopyGroup, useCopyInterceptor, useDisplayStatus, useDragCopy, useOtpField, usePaste, usePasteDisplayStatus, usePasteField, useRevealOnInteraction, useShare, validatePayload, visuallyHiddenStyle };
|
|
1224
|
+
export { CopyFailure, CopyField, CopyGroup, DEFAULT_INTERCEPTED_EVENTS, DEFAULT_MAX_RETRIES, DEFAULT_MIN_PENDING_MS, DEFAULT_PASTE_ACCEPT, DEFAULT_PASTE_MAX_BYTES, DEFAULT_PASTE_MAX_ITEMS, DEFAULT_PASTE_MIN_PENDING_MS, DEFAULT_PASTE_PENDING_DELAY_MS, DEFAULT_PENDING_DELAY_MS, DEFAULT_RESET_AFTER_MS, IDLE_STATE, IMAGE_MIME_TYPE, LiveRegion, PASTE_IDLE_STATE, PasteField, SVG_MIME_TYPE, WEB_CUSTOM_FORMAT_PREFIX, applyDragCopy, canAcceptDrag, canRetryPasteState, canRetryState, copyFailure, createBrowserClipboardAdapter, createBrowserPasteAdapter, createCopyCoordinator, createCopyError, createCopyMachine, createPasteMachine, defaultCopyFieldMessages, defaultPasteFieldMessages, describeCopyError, describePasteError, interceptCopyEvent, isBlob, isCopyFailure, isRetryableError, isTextualMimeType, isWebCustomFormat, matchesMimePattern, normalizeClipboardType, normalizeMimeType, normalizePayload, readClipboardPermission, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, useClipboardPermission, useCopy, useCopyField, useCopyGroup, useCopyInterceptor, useDisplayStatus, useDragCopy, useOtpField, usePaste, usePasteDisplayStatus, usePasteField, useRevealOnInteraction, useShare, validatePayload, visuallyHiddenStyle, watchClipboardPermission };
|
|
1204
1225
|
|
|
1205
1226
|
//# sourceMappingURL=index.js.map
|