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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-
|
|
1
|
+
{"version":3,"file":"url-zB_krkuF.js","names":[],"sources":["../../src/link/url.ts"],"sourcesContent":["import { copyFailure } from '../core/errors';\n\n/** Schemes a copied or pasted link may use by default. Never `javascript:`, `data:`, `vbscript:` or `file:`. */\nexport const DEFAULT_LINK_PROTOCOLS: readonly string[] = /* @__PURE__ */ Object.freeze(['https:', 'http:', 'mailto:', 'tel:']);\n\n/**\n * Query parameters that only track where a click came from: the defaults of\n * {@link cleanLinkUrl}. `utm_` matches every parameter starting with it.\n */\nexport const TRACKING_PARAMETERS: readonly string[] = /* @__PURE__ */ Object.freeze([\n 'utm_',\n 'fbclid',\n 'gclid',\n 'gclsrc',\n 'dclid',\n 'gbraid',\n 'wbraid',\n 'msclkid',\n 'yclid',\n 'twclid',\n 'ttclid',\n 'li_fat_id',\n 'igshid',\n 'igsh',\n 'mc_cid',\n 'mc_eid',\n '_hsenc',\n '_hsmi',\n 'mkt_tok',\n 'oly_anon_id',\n 'oly_enc_id',\n 'vero_id',\n 'wickedid',\n '_gl',\n]);\n\nexport interface CleanLinkOptions {\n /**\n * Parameters to remove: exact names, names ending in `_` (a prefix, like\n * `utm_`), or regular expressions tested against the name. Default {@link TRACKING_PARAMETERS}.\n */\n readonly params?: readonly (string | RegExp)[];\n /** Parameters never removed, even when `params` matches them. */\n readonly keep?: readonly string[];\n}\n\nexport interface LinkUrlOptions {\n /** Resolves relative links. Default: the page's address in a browser; required elsewhere for relative links. */\n readonly base?: string | URL;\n /** Allowed schemes, with the colon. Default {@link DEFAULT_LINK_PROTOCOLS}. */\n readonly protocols?: readonly string[];\n /** Remove tracking parameters: `true` for {@link TRACKING_PARAMETERS}, or your own list. Default `false`. */\n readonly clean?: boolean | CleanLinkOptions;\n}\n\nconst invalid = (message: string) => copyFailure('invalid-payload', message);\n\nfunction baseUrl(base: LinkUrlOptions['base']): string | undefined {\n if (base !== undefined) {\n if (typeof base === 'string' || base instanceof URL) return String(base);\n throw invalid('`base` must be a string or a URL.');\n }\n return typeof location === 'undefined' ? undefined : location.href;\n}\n\nfunction protocolSet(protocols: LinkUrlOptions['protocols']): ReadonlySet<string> {\n const list: unknown = protocols ?? DEFAULT_LINK_PROTOCOLS;\n const valid = (protocol: unknown): protocol is string => typeof protocol === 'string' && /^[a-z][a-z\\d+.-]*:$/i.test(protocol);\n if (!Array.isArray(list) || list.length === 0 || !(list as readonly unknown[]).every(valid)) {\n throw invalid('`protocols` must be a non-empty list of schemes with their colon, like \"https:\".');\n }\n return new Set((list as readonly string[]).map((protocol) => protocol.toLowerCase()));\n}\n\nfunction matcher(params: CleanLinkOptions['params']): (name: string) => boolean {\n const list = params ?? TRACKING_PARAMETERS;\n if (!Array.isArray(list) || !list.every((param) => typeof param === 'string' || param instanceof RegExp)) {\n throw invalid('`clean.params` must be a list of strings and regular expressions.');\n }\n return (name) => {\n const lower = name.toLowerCase();\n return list.some((param) => {\n if (typeof param !== 'string') return new RegExp(param.source, param.flags.replace(/[gy]/g, '')).test(name);\n const wanted = param.toLowerCase();\n return wanted.endsWith('_') ? lower.startsWith(wanted) : lower === wanted;\n });\n };\n}\n\n/** The cleaning step `clean` asks for, or `null`. Throws for an invalid option. */\nfunction cleaner(option: LinkUrlOptions['clean']): ((url: URL) => void) | null {\n const cleaning: unknown = option ?? false; // Plain-JS callers can pass anything.\n if (cleaning === false) return null;\n if (cleaning !== true && (typeof cleaning !== 'object' || cleaning === null)) throw invalid('`clean` must be a boolean or an options object.');\n const settings: CleanLinkOptions = cleaning === true ? {} : cleaning;\n const tracking = matcher(settings.params);\n const keep = settings.keep ?? [];\n if (!Array.isArray(keep) || !keep.every((name: unknown) => typeof name === 'string')) throw invalid('`clean.keep` must be a list of strings.');\n const kept = new Set(keep.map((name) => name.toLowerCase()));\n return (url) => {\n for (const name of [...new Set(url.searchParams.keys())]) {\n if (tracking(name) && !kept.has(name.toLowerCase())) url.searchParams.delete(name);\n }\n };\n}\n\n/**\n * Validates `options` once (throwing a typed `invalid-payload` error for invalid\n * ones) and returns a resolver that throws only for invalid links.\n * @internal\n */\nexport function linkUrlResolver(options: LinkUrlOptions = {}): (input: string | URL) => string {\n const protocols = protocolSet(options.protocols);\n const base = baseUrl(options.base);\n const clean = cleaner(options.clean);\n return (input) => {\n if (typeof input !== 'string' && !(input instanceof URL)) throw invalid('A link must be a string or a URL.');\n const raw = String(input).trim();\n if (raw === '') throw invalid('A link must not be empty.');\n let url: URL;\n try {\n url = new URL(raw, base);\n } catch (cause) {\n throw copyFailure('invalid-payload', `Not a valid link: ${JSON.stringify(raw.slice(0, 200))}.`, cause);\n }\n if (!protocols.has(url.protocol)) {\n throw invalid(`Links with the scheme \"${url.protocol}\" are not allowed (allowed: ${[...protocols].join(', ')}).`);\n }\n // Never copy or paste credentials embedded in a link.\n url.username = '';\n url.password = '';\n clean?.(url);\n return url.href;\n };\n}\n\n/**\n * The link as an absolute, safe URL string, or a typed `invalid-payload` error:\n * relative links are resolved, the scheme must be allowed, user names and\n * passwords are always removed, and tracking parameters optionally.\n */\nexport function resolveLinkUrl(input: string | URL, options: LinkUrlOptions = {}): string {\n return linkUrlResolver(options)(input);\n}\n\n/**\n * Removes tracking parameters (`utm_*`, `fbclid`, `gclid`, ...) from a link, keeping\n * everything else, including the fragment. Also validates it like every link here.\n *\n * @example\n * cleanLinkUrl('https://shop.example/p/42?utm_source=news&color=red'); // 'https://shop.example/p/42?color=red'\n */\nexport function cleanLinkUrl(url: string | URL, options: CleanLinkOptions & Omit<LinkUrlOptions, 'clean'> = {}): string {\n const { params, keep, ...rest } = options;\n return resolveLinkUrl(url, { ...rest, clean: { ...(params === undefined ? {} : { params }), ...(keep === undefined ? {} : { keep }) } });\n}\n"],"mappings":"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"}
|
package/dist/code.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
4
|
-
const require_limits = require("./chunks/limits-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
|
+
const require_limits = require("./chunks/limits-Vy-Xv26D.cjs");
|
|
5
5
|
const require_inert_html = require("./chunks/inert-html-DyxjWDok.cjs");
|
|
6
6
|
const require_text_field = require("./chunks/text-field-BEzUVOag.cjs");
|
|
7
7
|
//#region src/code/inspect.ts
|
package/dist/code.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as copyFailure, o as isCopyFailure } from "./chunks/errors-
|
|
3
|
-
import { t as positiveLimit } from "./chunks/limits-
|
|
2
|
+
import { n as copyFailure, o as isCopyFailure } from "./chunks/errors-CGcMvbhJ.js";
|
|
3
|
+
import { t as positiveLimit } from "./chunks/limits-DvJZJn0V.js";
|
|
4
4
|
import { t as parseInertHtml } from "./chunks/inert-html-D75NyVvT.js";
|
|
5
5
|
import { n as insertText, t as asTextField } from "./chunks/text-field-D7PF2WlX.js";
|
|
6
6
|
//#region src/code/inspect.ts
|
package/dist/color.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
4
|
const require_text_field = require("./chunks/text-field-BEzUVOag.cjs");
|
|
5
|
-
const require_contrast = require("./chunks/contrast-
|
|
5
|
+
const require_contrast = require("./chunks/contrast-BatHkv8j.cjs");
|
|
6
6
|
//#region src/color/payload.ts
|
|
7
7
|
/** The sRGB hex of a colour for the swatch's inline style: always generated here, never user text. */
|
|
8
8
|
const swatchColor = (c) => require_contrast.formatColor(require_contrast.toGamut(c), "hex");
|
package/dist/color.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as copyFailure } from "./chunks/errors-
|
|
2
|
+
import { n as copyFailure } from "./chunks/errors-CGcMvbhJ.js";
|
|
3
3
|
import { n as insertText, t as asTextField } from "./chunks/text-field-D7PF2WlX.js";
|
|
4
|
-
import { a as toColor, c as inGamut, i as formatColor, l as toGamut, n as contrastRatio, o as parseColor, r as COLOR_FORMATS, t as contrastLevel } from "./chunks/contrast-
|
|
4
|
+
import { a as toColor, c as inGamut, i as formatColor, l as toGamut, n as contrastRatio, o as parseColor, r as COLOR_FORMATS, t as contrastLevel } from "./chunks/contrast-DnCunIr1.js";
|
|
5
5
|
//#region src/color/payload.ts
|
|
6
6
|
/** The sRGB hex of a colour for the swatch's inline style: always generated here, never user text. */
|
|
7
7
|
const swatchColor = (c) => formatColor(toGamut(c), "hex");
|
package/dist/core.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
4
|
-
const require_payload = require("./chunks/payload-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
|
+
const require_payload = require("./chunks/payload-DjSSLonm.cjs");
|
|
5
5
|
const require_mime = require("./chunks/mime--LB7kdqG.cjs");
|
|
6
|
-
const require_clipboard_adapter = require("./chunks/clipboard-adapter-
|
|
7
|
-
const require_core = require("./chunks/core-
|
|
8
|
-
const require_paste_reader = require("./chunks/paste-reader-
|
|
6
|
+
const require_clipboard_adapter = require("./chunks/clipboard-adapter-Bpuf5GmB.cjs");
|
|
7
|
+
const require_core = require("./chunks/core-DF6jiigD.cjs");
|
|
8
|
+
const require_paste_reader = require("./chunks/paste-reader-BL51Jt1y.cjs");
|
|
9
9
|
exports.CopyFailure = require_errors.CopyFailure;
|
|
10
10
|
exports.DEFAULT_INTERCEPTED_EVENTS = require_core.DEFAULT_INTERCEPTED_EVENTS;
|
|
11
11
|
exports.DEFAULT_MAX_RETRIES = require_core.DEFAULT_MAX_RETRIES;
|
|
@@ -41,6 +41,7 @@ exports.matchesMimePattern = require_mime.matchesMimePattern;
|
|
|
41
41
|
exports.normalizeClipboardType = require_mime.normalizeClipboardType;
|
|
42
42
|
exports.normalizeMimeType = require_mime.normalizeMimeType;
|
|
43
43
|
exports.normalizePayload = require_payload.normalizePayload;
|
|
44
|
+
exports.readClipboardPermission = require_core.readClipboardPermission;
|
|
44
45
|
exports.readCopySelection = require_core.readCopySelection;
|
|
45
46
|
exports.registerCopyInterceptor = require_core.registerCopyInterceptor;
|
|
46
47
|
exports.registerDragCopy = require_core.registerDragCopy;
|
|
@@ -51,3 +52,4 @@ exports.sniffImageBytes = require_mime.sniffImageBytes;
|
|
|
51
52
|
exports.sniffImageType = require_mime.sniffImageType;
|
|
52
53
|
exports.toCopyError = require_errors.toCopyError;
|
|
53
54
|
exports.validatePayload = require_payload.validatePayload;
|
|
55
|
+
exports.watchClipboardPermission = require_core.watchClipboardPermission;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-qkAWVXWA.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
|
|
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-CZ6HpdKm.cjs";
|
|
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-CfaIbZpv.cjs";
|
|
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-BClcHS_P.cjs";
|
|
7
7
|
import { a as createBrowserPasteAdapter, i as PasteEnvironment, n as PasteAdapter, r as PasteClipboardLike, t as BrowserPasteAdapterOptions } from "./chunks/paste-adapter-B6eucH3E.cjs";
|
|
8
|
-
export { BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, 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, 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, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, validatePayload };
|
|
8
|
+
export { 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, 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,8 @@
|
|
|
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";
|
|
8
|
-
export { BlobSource, BrowserClipboardAdapterOptions, type BrowserPasteAdapterOptions, ClipboardAdapter, ClipboardDataLike, ClipboardEnvironment, ClipboardItemConstructorLike, ClipboardItemData, type ClipboardItemLike, ClipboardLike, ClipboardOperation, 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, 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, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, validatePayload };
|
|
8
|
+
export { 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, 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
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
|
-
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, readCopySelection, registerCopyInterceptor, registerDragCopy, resolveMaxRetries, resolvePasteReadOptions, serializeJson, sniffImageBytes, sniffImageType, toCopyError, validatePayload };
|
|
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, 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
|
+
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 };
|
package/dist/email.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
4
|
-
const require_limits = require("./chunks/limits-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
|
+
const require_limits = require("./chunks/limits-Vy-Xv26D.cjs");
|
|
5
5
|
const require_text_field = require("./chunks/text-field-BEzUVOag.cjs");
|
|
6
6
|
//#region src/email/address.ts
|
|
7
7
|
/** Invisible and direction-changing characters, soft hyphens and variation selectors. */
|
package/dist/email.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as copyFailure } from "./chunks/errors-
|
|
3
|
-
import { t as positiveLimit } from "./chunks/limits-
|
|
2
|
+
import { n as copyFailure } from "./chunks/errors-CGcMvbhJ.js";
|
|
3
|
+
import { t as positiveLimit } from "./chunks/limits-DvJZJn0V.js";
|
|
4
4
|
import { n as insertText, t as asTextField } from "./chunks/text-field-D7PF2WlX.js";
|
|
5
5
|
//#region src/email/address.ts
|
|
6
6
|
/** Invisible and direction-changing characters, soft hyphens and variation selectors. */
|
package/dist/files.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
4
|
//#region src/files/detect.ts
|
|
5
5
|
/** How many leading bytes {@link detectFileType} reads: enough for every signature and a text sniff. */
|
|
6
6
|
const FILE_SNIFF_BYTES = 8192;
|
package/dist/files.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as copyFailure } from "./chunks/errors-
|
|
2
|
+
import { n as copyFailure } from "./chunks/errors-CGcMvbhJ.js";
|
|
3
3
|
//#region src/files/detect.ts
|
|
4
4
|
/** How many leading bytes {@link detectFileType} reads: enough for every signature and a text sniff. */
|
|
5
5
|
const FILE_SNIFF_BYTES = 8192;
|
package/dist/image.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_errors = require("./chunks/errors-
|
|
4
|
-
const require_deadline = require("./chunks/deadline-
|
|
3
|
+
const require_errors = require("./chunks/errors-CF2EQNbc.cjs");
|
|
4
|
+
const require_deadline = require("./chunks/deadline-Cz6l-PDR.cjs");
|
|
5
5
|
//#region src/image/bytes.ts
|
|
6
6
|
/** Bounds-checked reads over a byte array: out-of-range reads return `null`, never garbage. */
|
|
7
7
|
var Bytes = class Bytes {
|
|
@@ -1132,7 +1132,7 @@ async function encodeWithin(environment, image, settings) {
|
|
|
1132
1132
|
background: type === "image/jpeg" ? settings.background : null
|
|
1133
1133
|
}, signal);
|
|
1134
1134
|
} catch (cause) {
|
|
1135
|
-
throw require_errors.isCopyFailure(cause) ? cause :
|
|
1135
|
+
throw require_errors.isCopyFailure(cause) ? cause : require_deadline.blobFailure(`Encoding ${type}`, cause);
|
|
1136
1136
|
}
|
|
1137
1137
|
if (blob.type !== type) {
|
|
1138
1138
|
if (requested !== "auto") throw require_errors.copyFailure("unsupported-format", `This browser can't encode ${type}.`);
|