react-smart-copy 1.30.0 → 1.31.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.
Files changed (44) hide show
  1. package/README.md +4 -1
  2. package/dist/chunks/copy-machine-B6apNst5.d.ts +132 -0
  3. package/dist/chunks/copy-machine-CmqX9J4V.d.cts +132 -0
  4. package/dist/chunks/copy-machine-DwdB-qva.js +292 -0
  5. package/dist/chunks/copy-machine-DwdB-qva.js.map +1 -0
  6. package/dist/chunks/copy-machine-oNmnrjMc.cjs +345 -0
  7. package/dist/chunks/copy-machine-oNmnrjMc.cjs.map +1 -0
  8. package/dist/chunks/{core-B8_wVOSU.js → core-CNSd-EgZ.js} +4 -290
  9. package/dist/chunks/core-CNSd-EgZ.js.map +1 -0
  10. package/dist/chunks/{core-BR8Jgea1.cjs → core-DsMKPNx_.cjs} +20 -348
  11. package/dist/chunks/core-DsMKPNx_.cjs.map +1 -0
  12. package/dist/chunks/{index-DjqQGsNs.d.ts → index-B4SEFtkx.d.ts} +3 -131
  13. package/dist/chunks/{index-uHZHddq0.d.cts → index-BDxj1EqC.d.cts} +3 -131
  14. package/dist/chunks/text-C2OYT-3o.cjs +478 -0
  15. package/dist/chunks/text-C2OYT-3o.cjs.map +1 -0
  16. package/dist/chunks/text-nc1LhgIh.js +413 -0
  17. package/dist/chunks/text-nc1LhgIh.js.map +1 -0
  18. package/dist/chunks/utils-C7_VlH79.cjs +53 -0
  19. package/dist/chunks/utils-C7_VlH79.cjs.map +1 -0
  20. package/dist/chunks/utils-CBBX2HN6.js +30 -0
  21. package/dist/chunks/utils-CBBX2HN6.js.map +1 -0
  22. package/dist/compat.cjs +94 -0
  23. package/dist/compat.cjs.map +1 -0
  24. package/dist/compat.d.cts +57 -0
  25. package/dist/compat.d.ts +57 -0
  26. package/dist/compat.js +88 -0
  27. package/dist/compat.js.map +1 -0
  28. package/dist/core.cjs +8 -7
  29. package/dist/core.d.cts +2 -1
  30. package/dist/core.d.ts +2 -1
  31. package/dist/core.js +2 -1
  32. package/dist/index.cjs +45 -68
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +2 -1
  35. package/dist/index.d.ts +2 -1
  36. package/dist/index.js +4 -27
  37. package/dist/index.js.map +1 -1
  38. package/dist/rich.cjs +14 -422
  39. package/dist/rich.cjs.map +1 -1
  40. package/dist/rich.js +1 -409
  41. package/dist/rich.js.map +1 -1
  42. package/package.json +20 -1
  43. package/dist/chunks/core-B8_wVOSU.js.map +0 -1
  44. package/dist/chunks/core-BR8Jgea1.cjs.map +0 -1
@@ -0,0 +1,57 @@
1
+
2
+ import { i as CopyPayload } from "./chunks/payload-BKDabKYy.cjs";
3
+ import { s as CopyOutcome } from "./chunks/copy-machine-CmqX9J4V.cjs";
4
+ import { MemoExoticComponent, ReactElement, ReactNode } from "react";
5
+ //#region src/compat/CopyToClipboard.d.ts
6
+ /** `react-copy-to-clipboard`'s `options`, as it typed them. */
7
+ interface CopyToClipboardOptions {
8
+ /** @deprecated Ignored. Failures reach `onCopy` with the reason; nothing is logged. */
9
+ readonly debug?: boolean | undefined;
10
+ /** @deprecated Ignored. No prompt is ever shown: a failed copy reports `false` to `onCopy`. */
11
+ readonly message?: string | undefined;
12
+ /**
13
+ * `"text/html"` writes `text` as HTML, with its plain text alongside for targets that read only
14
+ * text. Any other value, or none, writes `text` as plain text.
15
+ */
16
+ readonly format?: string | undefined;
17
+ }
18
+ interface CopyToClipboardProps {
19
+ /** What to copy. */
20
+ readonly text: string;
21
+ /**
22
+ * One element; its click copies. It receives the other props you pass, as before, and its own
23
+ * `onClick` still runs, in the same click.
24
+ */
25
+ readonly children?: ReactNode;
26
+ /**
27
+ * Called once the copy is written (`result` true) or has failed (`false`): after the click, not
28
+ * during it, because the clipboard is written asynchronously. Still called if this component
29
+ * has unmounted since (a menu that closes on click). `outcome` says why it failed
30
+ * (`outcome.error.type`, and `describeCopyError(outcome.error)` for a message).
31
+ */
32
+ readonly onCopy?: ((text: string, result: boolean, outcome: CopyFinishedOutcome) => void) | undefined;
33
+ readonly options?: CopyToClipboardOptions | undefined;
34
+ }
35
+ /** The outcome `onCopy` receives: written, or failed with a typed error. */
36
+ type CopyFinishedOutcome = Extract<CopyOutcome, {
37
+ status: 'copied' | 'error';
38
+ }>;
39
+ /** What `react-copy-to-clipboard` would have copied, as a payload this library writes. */
40
+ export declare function compatPayload(text: unknown, options: CopyToClipboardOptions | undefined): CopyPayload;
41
+ /**
42
+ * A drop-in replacement for `react-copy-to-clipboard`'s `CopyToClipboard`: change the import, keep
43
+ * the props. It copies through this library (the Clipboard API, with a fallback on plain HTTP and
44
+ * in embedded apps), never shows a prompt, and tells `onCopy` why a copy failed.
45
+ *
46
+ * ```tsx
47
+ * import { CopyToClipboard } from "react-smart-copy/compat";
48
+ *
49
+ * <CopyToClipboard text={invoiceId} onCopy={(text, ok) => setCopied(ok)}>
50
+ * <button type="button">Copy</button>
51
+ * </CopyToClipboard>
52
+ * ```
53
+ */
54
+ export declare const CopyToClipboard: MemoExoticComponent<(props: CopyToClipboardProps) => ReactElement>;
55
+ //#endregion
56
+ export { type CopyFinishedOutcome, CopyToClipboard as default, type CopyToClipboardOptions, type CopyToClipboardProps };
57
+ //# sourceMappingURL=compat.d.cts.map
@@ -0,0 +1,57 @@
1
+
2
+ import { i as CopyPayload } from "./chunks/payload-D7CJ6e2W.js";
3
+ import { s as CopyOutcome } from "./chunks/copy-machine-B6apNst5.js";
4
+ import { MemoExoticComponent, ReactElement, ReactNode } from "react";
5
+ //#region src/compat/CopyToClipboard.d.ts
6
+ /** `react-copy-to-clipboard`'s `options`, as it typed them. */
7
+ interface CopyToClipboardOptions {
8
+ /** @deprecated Ignored. Failures reach `onCopy` with the reason; nothing is logged. */
9
+ readonly debug?: boolean | undefined;
10
+ /** @deprecated Ignored. No prompt is ever shown: a failed copy reports `false` to `onCopy`. */
11
+ readonly message?: string | undefined;
12
+ /**
13
+ * `"text/html"` writes `text` as HTML, with its plain text alongside for targets that read only
14
+ * text. Any other value, or none, writes `text` as plain text.
15
+ */
16
+ readonly format?: string | undefined;
17
+ }
18
+ interface CopyToClipboardProps {
19
+ /** What to copy. */
20
+ readonly text: string;
21
+ /**
22
+ * One element; its click copies. It receives the other props you pass, as before, and its own
23
+ * `onClick` still runs, in the same click.
24
+ */
25
+ readonly children?: ReactNode;
26
+ /**
27
+ * Called once the copy is written (`result` true) or has failed (`false`): after the click, not
28
+ * during it, because the clipboard is written asynchronously. Still called if this component
29
+ * has unmounted since (a menu that closes on click). `outcome` says why it failed
30
+ * (`outcome.error.type`, and `describeCopyError(outcome.error)` for a message).
31
+ */
32
+ readonly onCopy?: ((text: string, result: boolean, outcome: CopyFinishedOutcome) => void) | undefined;
33
+ readonly options?: CopyToClipboardOptions | undefined;
34
+ }
35
+ /** The outcome `onCopy` receives: written, or failed with a typed error. */
36
+ type CopyFinishedOutcome = Extract<CopyOutcome, {
37
+ status: 'copied' | 'error';
38
+ }>;
39
+ /** What `react-copy-to-clipboard` would have copied, as a payload this library writes. */
40
+ export declare function compatPayload(text: unknown, options: CopyToClipboardOptions | undefined): CopyPayload;
41
+ /**
42
+ * A drop-in replacement for `react-copy-to-clipboard`'s `CopyToClipboard`: change the import, keep
43
+ * the props. It copies through this library (the Clipboard API, with a fallback on plain HTTP and
44
+ * in embedded apps), never shows a prompt, and tells `onCopy` why a copy failed.
45
+ *
46
+ * ```tsx
47
+ * import { CopyToClipboard } from "react-smart-copy/compat";
48
+ *
49
+ * <CopyToClipboard text={invoiceId} onCopy={(text, ok) => setCopied(ok)}>
50
+ * <button type="button">Copy</button>
51
+ * </CopyToClipboard>
52
+ * ```
53
+ */
54
+ export declare const CopyToClipboard: MemoExoticComponent<(props: CopyToClipboardProps) => ReactElement>;
55
+ //#endregion
56
+ export { type CopyFinishedOutcome, CopyToClipboard as default, type CopyToClipboardOptions, type CopyToClipboardProps };
57
+ //# sourceMappingURL=compat.d.ts.map
package/dist/compat.js ADDED
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import { t as createBrowserClipboardAdapter } from "./chunks/clipboard-adapter-XS23N-Gg.js";
3
+ import { i as createCopyMachine } from "./chunks/copy-machine-DwdB-qva.js";
4
+ import { i as windowOf, r as useIsomorphicLayoutEffect } from "./chunks/utils-CBBX2HN6.js";
5
+ import { n as parseInertHtml } from "./chunks/inert-html-BxuTrb6R.js";
6
+ import { t as plainText } from "./chunks/text-nc1LhgIh.js";
7
+ import { Children, cloneElement, memo, useCallback, useRef, useState } from "react";
8
+ //#region src/compat/CopyToClipboard.tsx
9
+ /** Props of this component, not passed on to the child. */
10
+ const OWN = /* @__PURE__ */ new Set([
11
+ "text",
12
+ "onCopy",
13
+ "options",
14
+ "children"
15
+ ]);
16
+ /** Elements whose content a page never shows as text. */
17
+ const UNSHOWN = "script, style, template, noscript, iframe, object, embed, [hidden]";
18
+ /** What `react-copy-to-clipboard` would have copied, as a payload this library writes. */
19
+ function compatPayload(text, options) {
20
+ const value = typeof text === "string" ? text : typeof text === "number" || typeof text === "bigint" || typeof text === "boolean" ? String(text) : "";
21
+ if (options?.format?.toLowerCase() !== "text/html" || value === "") return {
22
+ kind: "text",
23
+ value
24
+ };
25
+ const body = parseInertHtml(value).body;
26
+ for (const hidden of Array.from(body.querySelectorAll(UNSHOWN))) hidden.remove();
27
+ const fallback = plainText(body);
28
+ return {
29
+ kind: "html",
30
+ html: value,
31
+ text: fallback === "" ? value : fallback
32
+ };
33
+ }
34
+ function CopyToClipboardBase(props) {
35
+ const child = Children.only(props.children);
36
+ const rest = {};
37
+ for (const [key, value] of Object.entries(props)) if (!OWN.has(key)) rest[key] = value;
38
+ const latest = useRef(props);
39
+ useIsomorphicLayoutEffect(() => {
40
+ latest.current = props;
41
+ });
42
+ const target = useRef(null);
43
+ const [machine] = useState(() => createCopyMachine({
44
+ adapter: createBrowserClipboardAdapter({ getEnvironment: () => windowOf(target.current) }),
45
+ resetAfterMs: false
46
+ }));
47
+ const onClick = useCallback((event) => {
48
+ const { text, onCopy, options } = latest.current;
49
+ target.current = event.currentTarget;
50
+ const pending = machine.copy(compatPayload(text, options));
51
+ const own = Children.only(latest.current.children).props.onClick;
52
+ if (typeof own === "function") own(event);
53
+ pending.then((outcome) => {
54
+ if (outcome.status === "ignored" || onCopy === void 0) return;
55
+ onCopy(text, outcome.status === "copied", outcome);
56
+ });
57
+ }, [machine]);
58
+ return cloneElement(child, {
59
+ ...rest,
60
+ onClick
61
+ });
62
+ }
63
+ /**
64
+ * A drop-in replacement for `react-copy-to-clipboard`'s `CopyToClipboard`: change the import, keep
65
+ * the props. It copies through this library (the Clipboard API, with a fallback on plain HTTP and
66
+ * in embedded apps), never shows a prompt, and tells `onCopy` why a copy failed.
67
+ *
68
+ * ```tsx
69
+ * import { CopyToClipboard } from "react-smart-copy/compat";
70
+ *
71
+ * <CopyToClipboard text={invoiceId} onCopy={(text, ok) => setCopied(ok)}>
72
+ * <button type="button">Copy</button>
73
+ * </CopyToClipboard>
74
+ * ```
75
+ */
76
+ const CopyToClipboard = memo(CopyToClipboardBase);
77
+ //#endregion
78
+ //#region src/compat/index.ts
79
+ /**
80
+ * Drop-in replacements for other clipboard libraries' APIs, so moving to this one is a change of
81
+ * import. Each keeps the API it replaces; where behaviour differs, the docs say how and why.
82
+ */
83
+ /** `import CopyToClipboard from "react-copy-to-clipboard"` keeps working with this import too. */
84
+ var compat_default = CopyToClipboard;
85
+ //#endregion
86
+ export { CopyToClipboard, compatPayload, compat_default as default };
87
+
88
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","names":[],"sources":["../src/compat/CopyToClipboard.tsx","../src/compat/index.ts"],"sourcesContent":["import { Children, cloneElement, memo, useCallback, useRef, useState, type MemoExoticComponent, type MouseEvent, type ReactElement, type ReactNode } from 'react';\nimport { createBrowserClipboardAdapter } from '../core/clipboard-adapter';\nimport { createCopyMachine, type CopyOutcome } from '../core/copy-machine';\nimport { parseInertHtml } from '../core/inert-html';\nimport type { CopyPayload } from '../core/payload';\nimport { plainText } from '../rich/text';\nimport { useIsomorphicLayoutEffect, windowOf } from '../react/utils';\n\n/** `react-copy-to-clipboard`'s `options`, as it typed them. */\nexport interface CopyToClipboardOptions {\n /** @deprecated Ignored. Failures reach `onCopy` with the reason; nothing is logged. */\n readonly debug?: boolean | undefined;\n /** @deprecated Ignored. No prompt is ever shown: a failed copy reports `false` to `onCopy`. */\n readonly message?: string | undefined;\n /**\n * `\"text/html\"` writes `text` as HTML, with its plain text alongside for targets that read only\n * text. Any other value, or none, writes `text` as plain text.\n */\n readonly format?: string | undefined;\n}\n\nexport interface CopyToClipboardProps {\n /** What to copy. */\n readonly text: string;\n /**\n * One element; its click copies. It receives the other props you pass, as before, and its own\n * `onClick` still runs, in the same click.\n */\n readonly children?: ReactNode;\n /**\n * Called once the copy is written (`result` true) or has failed (`false`): after the click, not\n * during it, because the clipboard is written asynchronously. Still called if this component\n * has unmounted since (a menu that closes on click). `outcome` says why it failed\n * (`outcome.error.type`, and `describeCopyError(outcome.error)` for a message).\n */\n readonly onCopy?: ((text: string, result: boolean, outcome: CopyFinishedOutcome) => void) | undefined;\n readonly options?: CopyToClipboardOptions | undefined;\n}\n\n/** The outcome `onCopy` receives: written, or failed with a typed error. */\nexport type CopyFinishedOutcome = Extract<CopyOutcome, { status: 'copied' | 'error' }>;\n\ntype Clickable = ReactElement<{ onClick?: (event: MouseEvent) => void }>;\n\n/** Props of this component, not passed on to the child. */\nconst OWN = new Set(['text', 'onCopy', 'options', 'children']);\n\n/** Elements whose content a page never shows as text. */\nconst UNSHOWN = 'script, style, template, noscript, iframe, object, embed, [hidden]';\n\n/** What `react-copy-to-clipboard` would have copied, as a payload this library writes. */\nexport function compatPayload(text: unknown, options: CopyToClipboardOptions | undefined): CopyPayload {\n // Typed as a string, but JavaScript callers pass numbers, as the original allowed. Anything else\n // (an object would have copied \"[object Object]\") copies nothing, and `onCopy` gets `false`.\n const value = typeof text === 'string' ? text : typeof text === 'number' || typeof text === 'bigint' || typeof text === 'boolean' ? String(text) : '';\n if (options?.format?.toLowerCase() !== 'text/html' || value === '') return { kind: 'text', value };\n // The original wrote only `text/html`, so plain-text targets (a terminal, an input) got nothing.\n const body = parseInertHtml(value).body;\n // What a page never shows is not text: a script's source or a style sheet would otherwise be.\n for (const hidden of Array.from(body.querySelectorAll(UNSHOWN))) hidden.remove();\n const fallback = plainText(body);\n return { kind: 'html', html: value, text: fallback === '' ? value : fallback };\n}\n\nfunction CopyToClipboardBase(props: CopyToClipboardProps): ReactElement {\n // As before: exactly one element, or React's own error, and every other prop goes to it.\n const child = Children.only(props.children) as Clickable;\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) if (!OWN.has(key)) rest[key] = value;\n\n const latest = useRef(props);\n useIsomorphicLayoutEffect(() => {\n latest.current = props;\n });\n // The window the click happened in, so a button in a pop-out window uses that window's clipboard.\n const target = useRef<Element | null>(null);\n const [machine] = useState(() =>\n createCopyMachine({\n adapter: createBrowserClipboardAdapter({ getEnvironment: () => windowOf(target.current) }),\n resetAfterMs: false,\n }),\n );\n // Not connected, on purpose: unmounting does not cancel a copy. A menu item that closes its menu\n // on click unmounts at once, and its `onCopy` must still say the text was copied, as it did.\n\n const onClick = useCallback(\n (event: MouseEvent) => {\n const { text, onCopy, options } = latest.current;\n target.current = event.currentTarget;\n // Started inside the click, so Safari counts the write as the user's action.\n const pending = machine.copy(compatPayload(text, options));\n // The child's own handler runs in the same click, so `preventDefault()` there still works.\n const own = (Children.only(latest.current.children) as Clickable).props.onClick;\n if (typeof own === 'function') own(event);\n void pending.then((outcome) => {\n // A click while the last copy is still being written writes nothing: that copy reports, once.\n if (outcome.status === 'ignored' || onCopy === undefined) return;\n onCopy(text, outcome.status === 'copied', outcome);\n });\n },\n [machine],\n );\n\n return cloneElement(child, { ...rest, onClick });\n}\n\n/**\n * A drop-in replacement for `react-copy-to-clipboard`'s `CopyToClipboard`: change the import, keep\n * the props. It copies through this library (the Clipboard API, with a fallback on plain HTTP and\n * in embedded apps), never shows a prompt, and tells `onCopy` why a copy failed.\n *\n * ```tsx\n * import { CopyToClipboard } from \"react-smart-copy/compat\";\n *\n * <CopyToClipboard text={invoiceId} onCopy={(text, ok) => setCopied(ok)}>\n * <button type=\"button\">Copy</button>\n * </CopyToClipboard>\n * ```\n */\nexport const CopyToClipboard: MemoExoticComponent<(props: CopyToClipboardProps) => ReactElement> = memo(CopyToClipboardBase);\n","/**\n * Drop-in replacements for other clipboard libraries' APIs, so moving to this one is a change of\n * import. Each keeps the API it replaces; where behaviour differs, the docs say how and why.\n */\nimport { CopyToClipboard } from './CopyToClipboard';\n\nexport { CopyToClipboard, compatPayload } from './CopyToClipboard';\nexport type { CopyFinishedOutcome, CopyToClipboardOptions, CopyToClipboardProps } from './CopyToClipboard';\n/** `import CopyToClipboard from \"react-copy-to-clipboard\"` keeps working with this import too. */\nexport default CopyToClipboard;\n"],"mappings":";;;;;;;;;AA6CA,MAAM,sBAAM,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAW;AAAU,CAAC;;AAG7D,MAAM,UAAU;;AAGhB,SAAgB,cAAc,MAAe,SAA0D;CAGrG,MAAM,QAAQ,OAAO,SAAS,WAAW,OAAO,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY,OAAO,IAAI,IAAI;CACnJ,IAAI,SAAS,QAAQ,YAAY,MAAM,eAAe,UAAU,IAAI,OAAO;EAAE,MAAM;EAAQ;CAAM;CAEjG,MAAM,OAAO,eAAe,KAAK,CAAC,CAAC;CAEnC,KAAK,MAAM,UAAU,MAAM,KAAK,KAAK,iBAAiB,OAAO,CAAC,GAAG,OAAO,OAAO;CAC/E,MAAM,WAAW,UAAU,IAAI;CAC/B,OAAO;EAAE,MAAM;EAAQ,MAAM;EAAO,MAAM,aAAa,KAAK,QAAQ;CAAS;AAC/E;AAEA,SAAS,oBAAoB,OAA2C;CAEtE,MAAM,QAAQ,SAAS,KAAK,MAAM,QAAQ;CAC1C,MAAM,OAAgC,CAAC;CACvC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG,KAAK,OAAO;CAEjF,MAAM,SAAS,OAAO,KAAK;CAC3B,gCAAgC;EAC9B,OAAO,UAAU;CACnB,CAAC;CAED,MAAM,SAAS,OAAuB,IAAI;CAC1C,MAAM,CAAC,WAAW,eAChB,kBAAkB;EAChB,SAAS,8BAA8B,EAAE,sBAAsB,SAAS,OAAO,OAAO,EAAE,CAAC;EACzF,cAAc;CAChB,CAAC,CACH;CAIA,MAAM,UAAU,aACb,UAAsB;EACrB,MAAM,EAAE,MAAM,QAAQ,YAAY,OAAO;EACzC,OAAO,UAAU,MAAM;EAEvB,MAAM,UAAU,QAAQ,KAAK,cAAc,MAAM,OAAO,CAAC;EAEzD,MAAM,MAAO,SAAS,KAAK,OAAO,QAAQ,QAAQ,CAAC,CAAe,MAAM;EACxE,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK;EACxC,QAAa,MAAM,YAAY;GAE7B,IAAI,QAAQ,WAAW,aAAa,WAAW,KAAA,GAAW;GAC1D,OAAO,MAAM,QAAQ,WAAW,UAAU,OAAO;EACnD,CAAC;CACH,GACA,CAAC,OAAO,CACV;CAEA,OAAO,aAAa,OAAO;EAAE,GAAG;EAAM;CAAQ,CAAC;AACjD;;;;;;;;;;;;;;AAeA,MAAa,kBAAsF,KAAK,mBAAmB;;;;;;;;AC9G3H,IAAA,iBAAe"}
package/dist/core.cjs CHANGED
@@ -4,16 +4,17 @@ const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
4
4
  const require_payload = require("./chunks/payload-DjSSLonm.cjs");
5
5
  const require_mime = require("./chunks/mime--LB7kdqG.cjs");
6
6
  const require_clipboard_adapter = require("./chunks/clipboard-adapter-DYo79Fdq.cjs");
7
- const require_core = require("./chunks/core-BR8Jgea1.cjs");
7
+ const require_core = require("./chunks/core-DsMKPNx_.cjs");
8
+ const require_copy_machine = require("./chunks/copy-machine-oNmnrjMc.cjs");
8
9
  const require_paste_reader = require("./chunks/paste-reader-BL51Jt1y.cjs");
9
10
  exports.CopyFailure = require_errors.CopyFailure;
10
11
  exports.DEFAULT_INTERCEPTED_EVENTS = require_core.DEFAULT_INTERCEPTED_EVENTS;
11
- exports.DEFAULT_MAX_RETRIES = require_core.DEFAULT_MAX_RETRIES;
12
+ exports.DEFAULT_MAX_RETRIES = require_copy_machine.DEFAULT_MAX_RETRIES;
12
13
  exports.DEFAULT_PASTE_ACCEPT = require_paste_reader.DEFAULT_PASTE_ACCEPT;
13
14
  exports.DEFAULT_PASTE_MAX_BYTES = require_paste_reader.DEFAULT_PASTE_MAX_BYTES;
14
15
  exports.DEFAULT_PASTE_MAX_ITEMS = require_paste_reader.DEFAULT_PASTE_MAX_ITEMS;
15
- exports.DEFAULT_RESET_AFTER_MS = require_core.DEFAULT_RESET_AFTER_MS;
16
- exports.IDLE_STATE = require_core.IDLE_STATE;
16
+ exports.DEFAULT_RESET_AFTER_MS = require_copy_machine.DEFAULT_RESET_AFTER_MS;
17
+ exports.IDLE_STATE = require_copy_machine.IDLE_STATE;
17
18
  exports.IMAGE_MIME_TYPE = require_payload.IMAGE_MIME_TYPE;
18
19
  exports.PASTE_IDLE_STATE = require_core.PASTE_IDLE_STATE;
19
20
  exports.SVG_MIME_TYPE = require_mime.SVG_MIME_TYPE;
@@ -21,13 +22,13 @@ exports.WEB_CUSTOM_FORMAT_PREFIX = require_mime.WEB_CUSTOM_FORMAT_PREFIX;
21
22
  exports.applyDragCopy = require_core.applyDragCopy;
22
23
  exports.canAcceptDrag = require_paste_reader.canAcceptDrag;
23
24
  exports.canRetryPasteState = require_core.canRetryPasteState;
24
- exports.canRetryState = require_core.canRetryState;
25
+ exports.canRetryState = require_copy_machine.canRetryState;
25
26
  exports.copyFailure = require_errors.copyFailure;
26
27
  exports.createBrowserClipboardAdapter = require_clipboard_adapter.createBrowserClipboardAdapter;
27
28
  exports.createBrowserPasteAdapter = require_core.createBrowserPasteAdapter;
28
29
  exports.createCopyCoordinator = require_core.createCopyCoordinator;
29
30
  exports.createCopyError = require_errors.createCopyError;
30
- exports.createCopyMachine = require_core.createCopyMachine;
31
+ exports.createCopyMachine = require_copy_machine.createCopyMachine;
31
32
  exports.createPasteMachine = require_core.createPasteMachine;
32
33
  exports.describeCopyError = require_errors.describeCopyError;
33
34
  exports.describePasteError = require_errors.describePasteError;
@@ -45,7 +46,7 @@ exports.readClipboardPermission = require_core.readClipboardPermission;
45
46
  exports.readCopySelection = require_core.readCopySelection;
46
47
  exports.registerCopyInterceptor = require_core.registerCopyInterceptor;
47
48
  exports.registerDragCopy = require_core.registerDragCopy;
48
- exports.resolveMaxRetries = require_core.resolveMaxRetries;
49
+ exports.resolveMaxRetries = require_copy_machine.resolveMaxRetries;
49
50
  exports.resolvePasteReadOptions = require_paste_reader.resolvePasteReadOptions;
50
51
  exports.serializeJson = require_payload.serializeJson;
51
52
  exports.sniffImageBytes = require_mime.sniffImageBytes;
package/dist/core.d.cts CHANGED
@@ -1,8 +1,9 @@
1
1
 
2
2
  import { A as DEFAULT_MAX_RETRIES, C as copyFailure, D as isCopyFailure, E as describePasteError, M as resolveMaxRetries, O as isRetryableError, S as CopyFailure, T as describeCopyError, _ as serializeJson, a as CopyPayloadKind, b as CopyError, c as HtmlPayload, d as JsonPayload, f as MultiPayload, g as normalizePayload, h as isBlob, i as CopyPayload, j as OperationContext, k as toCopyError, l as IMAGE_MIME_TYPE, m as TextPayload, n as BlobSource, o as CopySource, p as MultiPayloadItem, r as CopyInput, s as CopySourceContext, t as AsyncCopyInput, u as ImagePayload, v as validatePayload, w as createCopyError, x as CopyErrorType, y as ClipboardOperation } from "./chunks/payload-BKDabKYy.cjs";
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.cjs";
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-uHZHddq0.cjs";
5
4
  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-C1_Mvpcc.cjs";
5
+ import { _ as CopyCoordinator, a as CopyMachineOptions, c as CopyState, d as DEFAULT_RESET_AFTER_MS, f as ErrorState, g as createCopyMachine, h as canRetryState, i as CopyMachine, l as CopyStatus, m as IdleState, n as CopyCancelReason, o as CopyMachineOptionsSource, p as IDLE_STATE, r as CopyIgnoredReason, s as CopyOutcome, t as CopiedState, u as CopyingState, v as CopyCoordinatorMember, y as createCopyCoordinator } from "./chunks/copy-machine-CmqX9J4V.cjs";
6
+ import { A as DragCopyStatus, B as isTextualMimeType, C as DragCopyItem, D as DragCopyPayload, E as DragCopyPassReason, F as applyDragCopy, G as sniffImageBytes, H as matchesMimePattern, I as registerDragCopy, K as sniffImageType, L as RasterImageMimeType, M as DragMultiPayload, N as DragStartEventLike, O as DragCopySource, P as RegisterDragCopyResult, R as SVG_MIME_TYPE, S as DragCopyDecision, T as DragCopyOutcome, U as normalizeClipboardType, V as isWebCustomFormat, W as normalizeMimeType, _ as createPasteMachine, a as PasteEventLike, b as readClipboardPermission, c as PasteMachine, d as PasteOutcome, f as PasteReadState, g as canRetryPasteState, h as PasteStatus, i as PasteErrorState, j as DragEffectAllowed, k as DragCopyState, l as PasteMachineOptions, m as PasteState, n as PasteCancelReason, o as PasteIdleState, p as PasteReadingState, r as PasteDropEventLike, s as PasteIgnoredReason, t as PASTE_IDLE_STATE, u as PasteMachineOptionsSource, v as ClipboardPermissionName, w as DragCopyOptions, x as watchClipboardPermission, y as ClipboardPermissionState, z as WEB_CUSTOM_FORMAT_PREFIX } from "./chunks/index-BDxj1EqC.cjs";
6
7
  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-C0AD6C4O.cjs";
7
8
  import { a as createBrowserPasteAdapter, i as PasteEnvironment, n as PasteAdapter, r as PasteClipboardLike, t as BrowserPasteAdapterOptions } from "./chunks/paste-adapter-DlwtI3qZ.cjs";
8
9
  export { AsyncCopyInput, BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, ClipboardPermissionName, ClipboardPermissionState, CopiedState, CopyCancelReason, CopyCoordinator, CopyCoordinatorMember, CopyError, CopyErrorType, CopyEventLike, CopyFailure, CopyIgnoredReason, CopyInput, CopyInterceptDecision, CopyInterceptFailureMode, CopyInterceptOptions, CopyInterceptOutcome, CopyInterceptPassReason, CopyInterceptTransform, CopyInterceptorOptions, CopyMachine, CopyMachineOptions, CopyMachineOptionsSource, CopyOutcome, CopyPayload, CopyPayloadKind, CopySelection, CopySource, CopySourceContext, 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, MultiPayload, MultiPayloadItem, type OperationContext, PASTE_IDLE_STATE, type PasteAccept, type PasteAcceptShorthand, type PasteAdapter, PasteCancelReason, type PasteClipboardLike, PasteDropEventLike, type PasteEnvironment, PasteErrorState, PasteEventLike, PasteIdleState, PasteIgnoredReason, type PasteItem, type PasteLimits, PasteMachine, PasteMachineOptions, PasteMachineOptionsSource, PasteOutcome, type PasteReadOptions, type PasteReadResult, PasteReadState, PasteReadingState, type PasteResult, type PasteSource, PasteState, PasteStatus, RasterImageMimeType, RegisterDragCopyResult, type ResolvedPasteReadOptions, SVG_MIME_TYPE, SyncCopyPayload, SyncMultiPayload, TextPayload, 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 };
package/dist/core.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
 
2
2
  import { A as DEFAULT_MAX_RETRIES, C as copyFailure, D as isCopyFailure, E as describePasteError, M as resolveMaxRetries, O as isRetryableError, S as CopyFailure, T as describeCopyError, _ as serializeJson, a as CopyPayloadKind, b as CopyError, c as HtmlPayload, d as JsonPayload, f as MultiPayload, g as normalizePayload, h as isBlob, i as CopyPayload, j as OperationContext, k as toCopyError, l as IMAGE_MIME_TYPE, m as TextPayload, n as BlobSource, o as CopySource, p as MultiPayloadItem, r as CopyInput, s as CopySourceContext, t as AsyncCopyInput, u as ImagePayload, v as validatePayload, w as createCopyError, x as CopyErrorType, y as ClipboardOperation } from "./chunks/payload-D7CJ6e2W.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 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-DjqQGsNs.js";
5
4
  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-B55TgPYd.js";
5
+ import { _ as CopyCoordinator, a as CopyMachineOptions, c as CopyState, d as DEFAULT_RESET_AFTER_MS, f as ErrorState, g as createCopyMachine, h as canRetryState, i as CopyMachine, l as CopyStatus, m as IdleState, n as CopyCancelReason, o as CopyMachineOptionsSource, p as IDLE_STATE, r as CopyIgnoredReason, s as CopyOutcome, t as CopiedState, u as CopyingState, v as CopyCoordinatorMember, y as createCopyCoordinator } from "./chunks/copy-machine-B6apNst5.js";
6
+ import { A as DragCopyStatus, B as isTextualMimeType, C as DragCopyItem, D as DragCopyPayload, E as DragCopyPassReason, F as applyDragCopy, G as sniffImageBytes, H as matchesMimePattern, I as registerDragCopy, K as sniffImageType, L as RasterImageMimeType, M as DragMultiPayload, N as DragStartEventLike, O as DragCopySource, P as RegisterDragCopyResult, R as SVG_MIME_TYPE, S as DragCopyDecision, T as DragCopyOutcome, U as normalizeClipboardType, V as isWebCustomFormat, W as normalizeMimeType, _ as createPasteMachine, a as PasteEventLike, b as readClipboardPermission, c as PasteMachine, d as PasteOutcome, f as PasteReadState, g as canRetryPasteState, h as PasteStatus, i as PasteErrorState, j as DragEffectAllowed, k as DragCopyState, l as PasteMachineOptions, m as PasteState, n as PasteCancelReason, o as PasteIdleState, p as PasteReadingState, r as PasteDropEventLike, s as PasteIgnoredReason, t as PASTE_IDLE_STATE, u as PasteMachineOptionsSource, v as ClipboardPermissionName, w as DragCopyOptions, x as watchClipboardPermission, y as ClipboardPermissionState, z as WEB_CUSTOM_FORMAT_PREFIX } from "./chunks/index-B4SEFtkx.js";
6
7
  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-Bet296gH.js";
7
8
  import { a as createBrowserPasteAdapter, i as PasteEnvironment, n as PasteAdapter, r as PasteClipboardLike, t as BrowserPasteAdapterOptions } from "./chunks/paste-adapter-D6OGeYxr.js";
8
9
  export { AsyncCopyInput, BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, ClipboardPermissionName, ClipboardPermissionState, CopiedState, CopyCancelReason, CopyCoordinator, CopyCoordinatorMember, CopyError, CopyErrorType, CopyEventLike, CopyFailure, CopyIgnoredReason, CopyInput, CopyInterceptDecision, CopyInterceptFailureMode, CopyInterceptOptions, CopyInterceptOutcome, CopyInterceptPassReason, CopyInterceptTransform, CopyInterceptorOptions, CopyMachine, CopyMachineOptions, CopyMachineOptionsSource, CopyOutcome, CopyPayload, CopyPayloadKind, CopySelection, CopySource, CopySourceContext, 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, MultiPayload, MultiPayloadItem, type OperationContext, PASTE_IDLE_STATE, type PasteAccept, type PasteAcceptShorthand, type PasteAdapter, PasteCancelReason, type PasteClipboardLike, PasteDropEventLike, type PasteEnvironment, PasteErrorState, PasteEventLike, PasteIdleState, PasteIgnoredReason, type PasteItem, type PasteLimits, PasteMachine, PasteMachineOptions, PasteMachineOptionsSource, PasteOutcome, type PasteReadOptions, type PasteReadResult, PasteReadState, PasteReadingState, type PasteResult, type PasteSource, PasteState, PasteStatus, RasterImageMimeType, RegisterDragCopyResult, type ResolvedPasteReadOptions, SVG_MIME_TYPE, SyncCopyPayload, SyncMultiPayload, TextPayload, 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 };
package/dist/core.js CHANGED
@@ -3,6 +3,7 @@ import { a as describePasteError, c as toCopyError, i as describeCopyError, n as
3
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
5
  import { t as createBrowserClipboardAdapter } from "./chunks/clipboard-adapter-XS23N-Gg.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, y as resolveMaxRetries } from "./chunks/core-B8_wVOSU.js";
6
+ import { a as readClipboardPermission, c as registerDragCopy, d as readCopySelection, f as registerCopyInterceptor, i as createBrowserPasteAdapter, l as DEFAULT_INTERCEPTED_EVENTS, n as canRetryPasteState, o as watchClipboardPermission, p as createCopyCoordinator, r as createPasteMachine, s as applyDragCopy, t as PASTE_IDLE_STATE, u as interceptCopyEvent } from "./chunks/core-CNSd-EgZ.js";
7
+ import { i as createCopyMachine, l as resolveMaxRetries, n as IDLE_STATE, o as DEFAULT_MAX_RETRIES, r as canRetryState, t as DEFAULT_RESET_AFTER_MS } from "./chunks/copy-machine-DwdB-qva.js";
7
8
  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
9
  export { CopyFailure, DEFAULT_INTERCEPTED_EVENTS, DEFAULT_MAX_RETRIES, DEFAULT_PASTE_ACCEPT, DEFAULT_PASTE_MAX_BYTES, DEFAULT_PASTE_MAX_ITEMS, DEFAULT_RESET_AFTER_MS, IDLE_STATE, IMAGE_MIME_TYPE, PASTE_IDLE_STATE, SVG_MIME_TYPE, 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 };