@protonradio/proton-ui 0.11.18-beta.2 → 0.11.18-beta.4

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=async(l,c)=>{let e=!1;const t=o=>{const a=o instanceof Error?o.message:"Failed to copy to clipboard";console.error(a),c==null||c(new Error(a))};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"){console.log("clipboard API IS available, using clipboard API",{navigator});try{await navigator.clipboard.writeText(l),e=!0}catch(o){console.log("clipboard API failed, trying fallback",{error:o});try{e=n(l),e||(console.log("fallback unsuccessful, calling onErrorCallback",{error:o}),t(o))}catch(a){console.log("fallback errored, calling onErrorCallback",{fallbackError:a}),t(a)}}}else{console.log("clipboard API NOT available, using fallback");try{e=n(l),e||(console.log("fallback unsuccessful, calling onErrorCallback",{copySuccess:e}),t(new Error("Failed to copy to clipboard: Clipboard API not available and fallback method failed")))}catch(o){console.log("fallback errored, calling onErrorCallback",{error:o}),t(o)}}return e},n=(l,{target:c=document.body}={})=>{if(typeof l!="string")throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof l}\`.`);const e=document.createElement("textarea"),t=document.activeElement;e.value=l,e.setAttribute("readonly",""),e.style.contain="strict",e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="12pt";const r=document.getSelection(),o=r.rangeCount>0&&r.getRangeAt(0);c.append(e),e.select(),e.selectionStart=0,e.selectionEnd=l.length;let a=!1;try{a=document.execCommand("copy")}catch{}return e.remove(),o&&(r.removeAllRanges(),r.addRange(o)),t instanceof HTMLElement&&t.focus(),a};exports.copyTextToClipboard=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=async(o,c)=>{let e=!1;const a=l=>{const n=l instanceof Error?l.message:"Failed to copy to clipboard";console.error(n),c==null||c(new Error(n))};if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"){console.log("clipboard API IS available, using clipboard API",{navigator});try{await navigator.clipboard.writeText(o),e=!0}catch(l){console.log("clipboard API failed, trying fallback",{error:l});try{e=d(o),e||(console.log("fallback unsuccessful, calling onErrorCallback",{error:l}),a(l))}catch(n){console.log("fallback errored, calling onErrorCallback",{fallbackError:n}),a(n)}}}else{console.log("clipboard API NOT available, using fallback");try{e=d(o),console.log("fallback result",{copySuccess:e,text:o}),e?console.log("fallback successful - copy should have worked"):(console.log("fallback unsuccessful, calling onErrorCallback",{copySuccess:e}),a(new Error("Failed to copy to clipboard: Clipboard API not available and fallback method failed")))}catch(l){console.log("fallback errored, calling onErrorCallback",{error:l}),a(l)}}return console.log("copyTextToClipboard final result",{copySuccess:e}),e},d=(o,{target:c=document.body}={})=>{if(typeof o!="string")throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof o}\`.`);if(!document.execCommand)return console.error("document.execCommand is not available"),!1;const e=document.createElement("textarea"),a=document.activeElement;e.value=o;const i=document.body;e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="2px",e.style.height="2px",e.style.padding="0",e.style.border="none",e.style.margin="0",e.style.outline="none",e.style.boxShadow="none",e.style.background="transparent",e.style.opacity="0",e.style.zIndex="-1",e.style.fontSize="12pt",e.setAttribute("readonly",""),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true");const l=document.getSelection(),n=l.rangeCount>0&&l.getRangeAt(0);i.appendChild(e),e.focus(),e.select();try{e.setSelectionRange&&e.setSelectionRange(0,o.length)}catch(t){console.log("setSelectionRange failed (non-critical)",t)}let r=!1,s=null;try{const t=e.selectionStart===0&&e.selectionEnd===o.length;console.log("element selection state before execCommand",{isSelected:t,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd,textLength:o.length,isConnected:e.isConnected,ownerDocument:e.ownerDocument===document}),!t&&o.length>0&&(e.focus(),e.select(),e.setSelectionRange&&e.setSelectionRange(0,o.length)),r=document.execCommand("copy"),console.log("document.execCommand('copy') result",{isSuccess:r,textLength:o.length}),r||console.warn("execCommand returned false - copy failed")}catch(t){s=t,console.error("document.execCommand('copy') threw an error",t)}return e.remove(),n&&(l.removeAllRanges(),l.addRange(n)),a instanceof HTMLElement&&setTimeout(()=>{try{a.focus()}catch(t){console.log("Could not restore focus (non-critical)",t)}},0),s?(console.error("execCommand error",s),!1):r};exports.copyTextToClipboard=g;
2
2
  //# sourceMappingURL=copy.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.cjs.js","sources":["../../src/utils/copy.ts"],"sourcesContent":["export const copyTextToClipboard = async (\n text: string,\n onError?: (error: Error) => void\n): Promise<boolean> => {\n let copySuccess = false;\n\n const onErrorCallback = (error: Error) => {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to copy to clipboard\";\n\n console.error(errorMessage);\n onError?.(new Error(errorMessage));\n };\n\n // Check if clipboard API is available\n // Note: navigator.clipboard may be undefined in non-secure contexts (non-HTTPS)\n const isClipboardAvailable =\n typeof navigator !== \"undefined\" &&\n navigator.clipboard &&\n typeof navigator.clipboard.writeText === \"function\";\n\n if (isClipboardAvailable) {\n console.log(\"clipboard API IS available, using clipboard API\", {\n navigator,\n });\n try {\n await navigator.clipboard.writeText(text);\n copySuccess = true;\n } catch (error) {\n // If clipboard API fails, try fallback\n\n console.log(\"clipboard API failed, trying fallback\", { error });\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n error,\n });\n onErrorCallback(error);\n }\n } catch (fallbackError) {\n console.log(\"fallback errored, calling onErrorCallback\", {\n fallbackError,\n });\n onErrorCallback(fallbackError);\n }\n }\n } else {\n // Use fallback method when clipboard API is not available\n\n console.log(\"clipboard API NOT available, using fallback\");\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n copySuccess,\n });\n onErrorCallback(\n new Error(\n \"Failed to copy to clipboard: Clipboard API not available and fallback method failed\"\n )\n );\n }\n } catch (error) {\n console.log(\"fallback errored, calling onErrorCallback\", { error });\n onErrorCallback(error);\n }\n }\n\n return copySuccess;\n};\n\n/**\n * Fallback legacy function to copy text to clipboard for browsers that don't support navigator.clipboard.writeText\n * @reference https://github.com/sindresorhus/copy-text-to-clipboard/blob/main/index.js\n * @deprecated Use navigator.clipboard.writeText instead\n */\nconst DEPRECATED_copyTextToClipboard = (\n text,\n { target = document.body } = {}\n) => {\n if (typeof text !== \"string\") {\n throw new TypeError(\n `Expected parameter \\`text\\` to be a \\`string\\`, got \\`${typeof text}\\`.`\n );\n }\n\n const element = document.createElement(\"textarea\");\n const previouslyFocusedElement = document.activeElement;\n\n element.value = text;\n\n // Prevent keyboard from showing on mobile\n element.setAttribute(\"readonly\", \"\");\n\n element.style.contain = \"strict\";\n element.style.position = \"absolute\";\n element.style.left = \"-9999px\";\n element.style.fontSize = \"12pt\"; // Prevent zooming on iOS\n\n const selection = document.getSelection();\n const originalRange = selection.rangeCount > 0 && selection.getRangeAt(0);\n\n target.append(element);\n element.select();\n\n // Explicit selection workaround for iOS\n element.selectionStart = 0;\n element.selectionEnd = text.length;\n\n let isSuccess = false;\n try {\n isSuccess = document.execCommand(\"copy\");\n } catch {}\n\n element.remove();\n\n if (originalRange) {\n selection.removeAllRanges();\n selection.addRange(originalRange);\n }\n\n // Get the focus back on the previously focused element, if any\n if (previouslyFocusedElement instanceof HTMLElement) {\n previouslyFocusedElement.focus();\n }\n\n return isSuccess;\n};\n"],"names":["copyTextToClipboard","text","onError","copySuccess","onErrorCallback","error","errorMessage","DEPRECATED_copyTextToClipboard","fallbackError","target","element","previouslyFocusedElement","selection","originalRange","isSuccess"],"mappings":"gFAAa,MAAAA,EAAsB,MACjCC,EACAC,IACqB,CACrB,IAAIC,EAAc,GAEZ,MAAAC,EAAmBC,GAAiB,CACxC,MAAMC,EACJD,aAAiB,MAAQA,EAA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SAAS,eACrBC,EAAgBD,EAAU,WAAa,GAAKA,EAAU,WAAW,CAAC,EAExEH,EAAO,OAAOC,CAAO,EACrBA,EAAQ,OAAO,EAGfA,EAAQ,eAAiB,EACzBA,EAAQ,aAAeT,EAAK,OAE5B,IAAIa,EAAY,GACZ,GAAA,CACUA,EAAA,SAAS,YAAY,MAAM,CAAA,MACjC,CAAC,CAET,OAAAJ,EAAQ,OAAO,EAEXG,IACFD,EAAU,gBAAgB,EAC1BA,EAAU,SAASC,CAAa,GAI9BF,aAAoC,aACtCA,EAAyB,MAAM,EAG1BG,CACT"}
1
+ {"version":3,"file":"copy.cjs.js","sources":["../../src/utils/copy.ts"],"sourcesContent":["export const copyTextToClipboard = async (\n text: string,\n onError?: (error: Error) => void\n): Promise<boolean> => {\n let copySuccess = false;\n\n const onErrorCallback = (error: Error) => {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to copy to clipboard\";\n\n console.error(errorMessage);\n onError?.(new Error(errorMessage));\n };\n\n // Check if clipboard API is available\n // Note: navigator.clipboard may be undefined in non-secure contexts (non-HTTPS)\n const isClipboardAvailable =\n typeof navigator !== \"undefined\" &&\n navigator.clipboard &&\n typeof navigator.clipboard.writeText === \"function\";\n\n if (isClipboardAvailable) {\n console.log(\"clipboard API IS available, using clipboard API\", {\n navigator,\n });\n try {\n await navigator.clipboard.writeText(text);\n copySuccess = true;\n } catch (error) {\n // If clipboard API fails, try fallback\n\n console.log(\"clipboard API failed, trying fallback\", { error });\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n error,\n });\n onErrorCallback(error);\n }\n } catch (fallbackError) {\n console.log(\"fallback errored, calling onErrorCallback\", {\n fallbackError,\n });\n onErrorCallback(fallbackError);\n }\n }\n } else {\n // Use fallback method when clipboard API is not available\n\n console.log(\"clipboard API NOT available, using fallback\");\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n console.log(\"fallback result\", { copySuccess, text });\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n copySuccess,\n });\n onErrorCallback(\n new Error(\n \"Failed to copy to clipboard: Clipboard API not available and fallback method failed\"\n )\n );\n } else {\n console.log(\"fallback successful - copy should have worked\");\n // Note: In some contexts (iframes, cross-origin), execCommand may return true\n // but the copy may still be blocked by the browser. There's no reliable way to verify.\n }\n } catch (error) {\n console.log(\"fallback errored, calling onErrorCallback\", { error });\n onErrorCallback(error);\n }\n }\n\n console.log(\"copyTextToClipboard final result\", { copySuccess });\n return copySuccess;\n};\n\n/**\n * Fallback legacy function to copy text to clipboard for browsers that don't support navigator.clipboard.writeText\n * @reference https://github.com/sindresorhus/copy-text-to-clipboard/blob/main/index.js\n * @deprecated Use navigator.clipboard.writeText instead\n */\nconst DEPRECATED_copyTextToClipboard = (\n text,\n { target = document.body } = {}\n) => {\n if (typeof text !== \"string\") {\n throw new TypeError(\n `Expected parameter \\`text\\` to be a \\`string\\`, got \\`${typeof text}\\`.`\n );\n }\n\n // Check if execCommand is available\n if (!document.execCommand) {\n console.error(\"document.execCommand is not available\");\n return false;\n }\n\n const element = document.createElement(\"textarea\");\n const previouslyFocusedElement = document.activeElement;\n\n element.value = text;\n\n // IMPORTANT: Always append to document.body, not the target\n // This ensures the element is in the active document, which is required\n // for execCommand to work, especially when inside portals/modals\n const container = document.body;\n\n // Style the element to be invisible but still \"visible\" to the browser\n // Some browsers require the element to be in the render tree and \"visible\"\n element.style.position = \"fixed\";\n element.style.top = \"0\";\n element.style.left = \"0\";\n element.style.width = \"2px\";\n element.style.height = \"2px\";\n element.style.padding = \"0\";\n element.style.border = \"none\";\n element.style.margin = \"0\";\n element.style.outline = \"none\";\n element.style.boxShadow = \"none\";\n element.style.background = \"transparent\";\n element.style.opacity = \"0\";\n element.style.zIndex = \"-1\";\n element.style.fontSize = \"12pt\"; // Prevent zooming on iOS\n element.setAttribute(\"readonly\", \"\");\n element.setAttribute(\"tabindex\", \"-1\");\n element.setAttribute(\"aria-hidden\", \"true\");\n\n const selection = document.getSelection();\n const originalRange = selection.rangeCount > 0 && selection.getRangeAt(0);\n\n // Append to document.body (critical for Modal/Portal contexts)\n container.appendChild(element);\n\n // Focus and select - must happen synchronously within user activation\n element.focus();\n element.select();\n\n // Explicit selection workaround for iOS\n try {\n if (element.setSelectionRange) {\n element.setSelectionRange(0, text.length);\n }\n } catch (e) {\n // setSelectionRange may fail, but that's okay\n console.log(\"setSelectionRange failed (non-critical)\", e);\n }\n\n let isSuccess = false;\n let execCommandError = null;\n\n try {\n // Verify selection before attempting copy\n const isSelected =\n element.selectionStart === 0 && element.selectionEnd === text.length;\n\n console.log(\"element selection state before execCommand\", {\n isSelected,\n selectionStart: element.selectionStart,\n selectionEnd: element.selectionEnd,\n textLength: text.length,\n isConnected: element.isConnected,\n ownerDocument: element.ownerDocument === document,\n });\n\n // If not properly selected, try one more time\n if (!isSelected && text.length > 0) {\n element.focus();\n element.select();\n if (element.setSelectionRange) {\n element.setSelectionRange(0, text.length);\n }\n }\n\n // Execute copy command\n isSuccess = document.execCommand(\"copy\");\n\n console.log(\"document.execCommand('copy') result\", {\n isSuccess,\n textLength: text.length,\n });\n\n if (!isSuccess) {\n console.warn(\"execCommand returned false - copy failed\");\n }\n } catch (error) {\n execCommandError = error;\n console.error(\"document.execCommand('copy') threw an error\", error);\n }\n\n // Clean up immediately\n element.remove();\n\n // Restore original selection\n if (originalRange) {\n selection.removeAllRanges();\n selection.addRange(originalRange);\n }\n\n // Restore focus to previously focused element\n // Use setTimeout to avoid focus conflicts with Modal's FocusScope\n if (previouslyFocusedElement instanceof HTMLElement) {\n // Small delay to let the Modal's focus management settle\n setTimeout(() => {\n try {\n previouslyFocusedElement.focus();\n } catch (e) {\n // Focus might fail if element is no longer in DOM, that's okay\n console.log(\"Could not restore focus (non-critical)\", e);\n }\n }, 0);\n }\n\n if (execCommandError) {\n console.error(\"execCommand error\", execCommandError);\n return false;\n }\n\n return isSuccess;\n};\n"],"names":["copyTextToClipboard","text","onError","copySuccess","onErrorCallback","error","errorMessage","DEPRECATED_copyTextToClipboard","fallbackError","target","element","previouslyFocusedElement","container","selection","originalRange","e","isSuccess","execCommandError","isSelected"],"mappings":"gFAAa,MAAAA,EAAsB,MACjCC,EACAC,IACqB,CACrB,IAAIC,EAAc,GAEZ,MAAAC,EAAmBC,GAAiB,CACxC,MAAMC,EACJD,aAAiB,MAAQA,EAAM,QAAU,8BAE3C,QAAQ,MAAMC,CAAY,EAChBJ,GAAA,MAAAA,EAAA,IAAI,MAAMI,CAAY,EAAC,EAUnC,GAJE,OAAO,UAAc,KACrB,UAAU,WACV,OAAO,UAAU,UAAU,WAAc,WAEjB,CACxB,QAAQ,IAAI,kDAAmD,CAC7D,SAAA,CACD,EACG,GAAA,CACI,MAAA,UAAU,UAAU,UAAUL,CAAI,EAC1BE,EAAA,SACPE,EAAO,CAGd,QAAQ,IAAI,wCAAyC,CAAE,MAAAA,CAAO,CAAA,EAC1D,GAAA,CACFF,EAAcI,EAA+BN,CAAI,EAE5CE,IACH,QAAQ,IAAI,iDAAkD,CAC5D,MAAAE,CAAA,CACD,EACDD,EAAgBC,CAAK,SAEhBG,EAAe,CACtB,QAAQ,IAAI,4CAA6C,CACvD,cAAAA,CAAA,CACD,EACDJ,EAAgBI,CAAa,CAC/B,CACF,CAAA,KACK,CAGL,QAAQ,IAAI,8CAA8C,EACtD,GAAA,CACFL,EAAcI,EAA+BN,CAAI,EACjD,QAAQ,IAAI,kBAAmB,CAAE,YAAAE,EAAa,KAAAF,CAAM,CAAA,EAC/CE,EAUH,QAAQ,IAAI,+CAA+C,GAT3D,QAAQ,IAAI,iDAAkD,CAC5D,YAAAA,CAAA,CACD,EACDC,EACE,IAAI,MACF,qFACF,CAAA,SAOGC,EAAO,CACd,QAAQ,IAAI,4CAA6C,CAAE,MAAAA,CAAO,CAAA,EAClED,EAAgBC,CAAK,CACvB,CACF,CAEA,eAAQ,IAAI,mCAAoC,CAAE,YAAA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B,EACA,eAAgBR,EAAQ,eACxB,aAAcA,EAAQ,aACtB,WAAYT,EAAK,OACjB,YAAaS,EAAQ,YACrB,cAAeA,EAAQ,gBAAkB,QAAA,CAC1C,EAGG,CAACQ,GAAcjB,EAAK,OAAS,IAC/BS,EAAQ,MAAM,EACdA,EAAQ,OAAO,EACXA,EAAQ,mBACFA,EAAA,kBAAkB,EAAGT,EAAK,MAAM,GAKhCe,EAAA,SAAS,YAAY,MAAM,EAEvC,QAAQ,IAAI,sCAAuC,CACjD,UAAAA,EACA,WAAYf,EAAK,MAAA,CAClB,EAEIe,GACH,QAAQ,KAAK,0CAA0C,QAElDX,EAAO,CACKY,EAAAZ,EACX,QAAA,MAAM,8CAA+CA,CAAK,CACpE,CAyBA,OAtBAK,EAAQ,OAAO,EAGXI,IACFD,EAAU,gBAAgB,EAC1BA,EAAU,SAASC,CAAa,GAK9BH,aAAoC,aAEtC,WAAW,IAAM,CACX,GAAA,CACFA,EAAyB,MAAM,QACxBI,EAAG,CAEF,QAAA,IAAI,yCAA0CA,CAAC,CACzD,GACC,CAAC,EAGFE,GACM,QAAA,MAAM,oBAAqBA,CAAgB,EAC5C,IAGFD,CACT"}
@@ -1,59 +1,86 @@
1
- const i = async (l, c) => {
1
+ const g = async (o, c) => {
2
2
  let e = !1;
3
- const t = (o) => {
4
- const a = o instanceof Error ? o.message : "Failed to copy to clipboard";
5
- console.error(a), c == null || c(new Error(a));
3
+ const a = (l) => {
4
+ const n = l instanceof Error ? l.message : "Failed to copy to clipboard";
5
+ console.error(n), c == null || c(new Error(n));
6
6
  };
7
7
  if (typeof navigator < "u" && navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
8
8
  console.log("clipboard API IS available, using clipboard API", {
9
9
  navigator
10
10
  });
11
11
  try {
12
- await navigator.clipboard.writeText(l), e = !0;
13
- } catch (o) {
14
- console.log("clipboard API failed, trying fallback", { error: o });
12
+ await navigator.clipboard.writeText(o), e = !0;
13
+ } catch (l) {
14
+ console.log("clipboard API failed, trying fallback", { error: l });
15
15
  try {
16
- e = n(l), e || (console.log("fallback unsuccessful, calling onErrorCallback", {
17
- error: o
18
- }), t(o));
19
- } catch (a) {
16
+ e = d(o), e || (console.log("fallback unsuccessful, calling onErrorCallback", {
17
+ error: l
18
+ }), a(l));
19
+ } catch (n) {
20
20
  console.log("fallback errored, calling onErrorCallback", {
21
- fallbackError: a
22
- }), t(a);
21
+ fallbackError: n
22
+ }), a(n);
23
23
  }
24
24
  }
25
25
  } else {
26
26
  console.log("clipboard API NOT available, using fallback");
27
27
  try {
28
- e = n(l), e || (console.log("fallback unsuccessful, calling onErrorCallback", {
28
+ e = d(o), console.log("fallback result", { copySuccess: e, text: o }), e ? console.log("fallback successful - copy should have worked") : (console.log("fallback unsuccessful, calling onErrorCallback", {
29
29
  copySuccess: e
30
- }), t(
30
+ }), a(
31
31
  new Error(
32
32
  "Failed to copy to clipboard: Clipboard API not available and fallback method failed"
33
33
  )
34
34
  ));
35
- } catch (o) {
36
- console.log("fallback errored, calling onErrorCallback", { error: o }), t(o);
35
+ } catch (l) {
36
+ console.log("fallback errored, calling onErrorCallback", { error: l }), a(l);
37
37
  }
38
38
  }
39
- return e;
40
- }, n = (l, { target: c = document.body } = {}) => {
41
- if (typeof l != "string")
39
+ return console.log("copyTextToClipboard final result", { copySuccess: e }), e;
40
+ }, d = (o, { target: c = document.body } = {}) => {
41
+ if (typeof o != "string")
42
42
  throw new TypeError(
43
- `Expected parameter \`text\` to be a \`string\`, got \`${typeof l}\`.`
43
+ `Expected parameter \`text\` to be a \`string\`, got \`${typeof o}\`.`
44
44
  );
45
- const e = document.createElement("textarea"), t = document.activeElement;
46
- e.value = l, e.setAttribute("readonly", ""), e.style.contain = "strict", e.style.position = "absolute", e.style.left = "-9999px", e.style.fontSize = "12pt";
47
- const r = document.getSelection(), o = r.rangeCount > 0 && r.getRangeAt(0);
48
- c.append(e), e.select(), e.selectionStart = 0, e.selectionEnd = l.length;
49
- let a = !1;
45
+ if (!document.execCommand)
46
+ return console.error("document.execCommand is not available"), !1;
47
+ const e = document.createElement("textarea"), a = document.activeElement;
48
+ e.value = o;
49
+ const i = document.body;
50
+ e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.width = "2px", e.style.height = "2px", e.style.padding = "0", e.style.border = "none", e.style.margin = "0", e.style.outline = "none", e.style.boxShadow = "none", e.style.background = "transparent", e.style.opacity = "0", e.style.zIndex = "-1", e.style.fontSize = "12pt", e.setAttribute("readonly", ""), e.setAttribute("tabindex", "-1"), e.setAttribute("aria-hidden", "true");
51
+ const l = document.getSelection(), n = l.rangeCount > 0 && l.getRangeAt(0);
52
+ i.appendChild(e), e.focus(), e.select();
50
53
  try {
51
- a = document.execCommand("copy");
52
- } catch {
54
+ e.setSelectionRange && e.setSelectionRange(0, o.length);
55
+ } catch (t) {
56
+ console.log("setSelectionRange failed (non-critical)", t);
53
57
  }
54
- return e.remove(), o && (r.removeAllRanges(), r.addRange(o)), t instanceof HTMLElement && t.focus(), a;
58
+ let r = !1, s = null;
59
+ try {
60
+ const t = e.selectionStart === 0 && e.selectionEnd === o.length;
61
+ console.log("element selection state before execCommand", {
62
+ isSelected: t,
63
+ selectionStart: e.selectionStart,
64
+ selectionEnd: e.selectionEnd,
65
+ textLength: o.length,
66
+ isConnected: e.isConnected,
67
+ ownerDocument: e.ownerDocument === document
68
+ }), !t && o.length > 0 && (e.focus(), e.select(), e.setSelectionRange && e.setSelectionRange(0, o.length)), r = document.execCommand("copy"), console.log("document.execCommand('copy') result", {
69
+ isSuccess: r,
70
+ textLength: o.length
71
+ }), r || console.warn("execCommand returned false - copy failed");
72
+ } catch (t) {
73
+ s = t, console.error("document.execCommand('copy') threw an error", t);
74
+ }
75
+ return e.remove(), n && (l.removeAllRanges(), l.addRange(n)), a instanceof HTMLElement && setTimeout(() => {
76
+ try {
77
+ a.focus();
78
+ } catch (t) {
79
+ console.log("Could not restore focus (non-critical)", t);
80
+ }
81
+ }, 0), s ? (console.error("execCommand error", s), !1) : r;
55
82
  };
56
83
  export {
57
- i as copyTextToClipboard
84
+ g as copyTextToClipboard
58
85
  };
59
86
  //# sourceMappingURL=copy.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.es.js","sources":["../../src/utils/copy.ts"],"sourcesContent":["export const copyTextToClipboard = async (\n text: string,\n onError?: (error: Error) => void\n): Promise<boolean> => {\n let copySuccess = false;\n\n const onErrorCallback = (error: Error) => {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to copy to clipboard\";\n\n console.error(errorMessage);\n onError?.(new Error(errorMessage));\n };\n\n // Check if clipboard API is available\n // Note: navigator.clipboard may be undefined in non-secure contexts (non-HTTPS)\n const isClipboardAvailable =\n typeof navigator !== \"undefined\" &&\n navigator.clipboard &&\n typeof navigator.clipboard.writeText === \"function\";\n\n if (isClipboardAvailable) {\n console.log(\"clipboard API IS available, using clipboard API\", {\n navigator,\n });\n try {\n await navigator.clipboard.writeText(text);\n copySuccess = true;\n } catch (error) {\n // If clipboard API fails, try fallback\n\n console.log(\"clipboard API failed, trying fallback\", { error });\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n error,\n });\n onErrorCallback(error);\n }\n } catch (fallbackError) {\n console.log(\"fallback errored, calling onErrorCallback\", {\n fallbackError,\n });\n onErrorCallback(fallbackError);\n }\n }\n } else {\n // Use fallback method when clipboard API is not available\n\n console.log(\"clipboard API NOT available, using fallback\");\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n copySuccess,\n });\n onErrorCallback(\n new Error(\n \"Failed to copy to clipboard: Clipboard API not available and fallback method failed\"\n )\n );\n }\n } catch (error) {\n console.log(\"fallback errored, calling onErrorCallback\", { error });\n onErrorCallback(error);\n }\n }\n\n return copySuccess;\n};\n\n/**\n * Fallback legacy function to copy text to clipboard for browsers that don't support navigator.clipboard.writeText\n * @reference https://github.com/sindresorhus/copy-text-to-clipboard/blob/main/index.js\n * @deprecated Use navigator.clipboard.writeText instead\n */\nconst DEPRECATED_copyTextToClipboard = (\n text,\n { target = document.body } = {}\n) => {\n if (typeof text !== \"string\") {\n throw new TypeError(\n `Expected parameter \\`text\\` to be a \\`string\\`, got \\`${typeof text}\\`.`\n );\n }\n\n const element = document.createElement(\"textarea\");\n const previouslyFocusedElement = document.activeElement;\n\n element.value = text;\n\n // Prevent keyboard from showing on mobile\n element.setAttribute(\"readonly\", \"\");\n\n element.style.contain = \"strict\";\n element.style.position = \"absolute\";\n element.style.left = \"-9999px\";\n element.style.fontSize = \"12pt\"; // Prevent zooming on iOS\n\n const selection = document.getSelection();\n const originalRange = selection.rangeCount > 0 && selection.getRangeAt(0);\n\n target.append(element);\n element.select();\n\n // Explicit selection workaround for iOS\n element.selectionStart = 0;\n element.selectionEnd = text.length;\n\n let isSuccess = false;\n try {\n isSuccess = document.execCommand(\"copy\");\n } catch {}\n\n element.remove();\n\n if (originalRange) {\n selection.removeAllRanges();\n selection.addRange(originalRange);\n }\n\n // Get the focus back on the previously focused element, if any\n if (previouslyFocusedElement instanceof HTMLElement) {\n previouslyFocusedElement.focus();\n }\n\n return isSuccess;\n};\n"],"names":["copyTextToClipboard","text","onError","copySuccess","onErrorCallback","error","errorMessage","DEPRECATED_copyTextToClipboard","fallbackError","target","element","previouslyFocusedElement","selection","originalRange","isSuccess"],"mappings":"AAAa,MAAAA,IAAsB,OACjCC,GACAC,MACqB;AACrB,MAAIC,IAAc;AAEZ,QAAAC,IAAkB,CAACC,MAAiB;AACxC,UAAMC,IACJD,aAAiB,QAAQA,EAAM,UAAU;AAE3C,YAAQ,MAAMC,CAAY,GAChBJ,KAAA,QAAAA,EAAA,IAAI,MAAMI,CAAY;AAAA,EAAC;AAUnC,MAJE,OAAO,YAAc,OACrB,UAAU,aACV,OAAO,UAAU,UAAU,aAAc,YAEjB;AACxB,YAAQ,IAAI,mDAAmD;AAAA,MA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AAW,CAAC;AAExE,EAAAH,EAAO,OAAOC,CAAO,GACrBA,EAAQ,OAAO,GAGfA,EAAQ,iBAAiB,GACzBA,EAAQ,eAAeT,EAAK;AAE5B,MAAIa,IAAY;AACZ,MAAA;AACU,IAAAA,IAAA,SAAS,YAAY,MAAM;AAAA,EAAA,QACjC;AAAA,EAAC;AAET,SAAAJ,EAAQ,OAAO,GAEXG,MACFD,EAAU,gBAAgB,GAC1BA,EAAU,SAASC,CAAa,IAI9BF,aAAoC,eACtCA,EAAyB,MAAM,GAG1BG;AACT;"}
1
+ {"version":3,"file":"copy.es.js","sources":["../../src/utils/copy.ts"],"sourcesContent":["export const copyTextToClipboard = async (\n text: string,\n onError?: (error: Error) => void\n): Promise<boolean> => {\n let copySuccess = false;\n\n const onErrorCallback = (error: Error) => {\n const errorMessage =\n error instanceof Error ? error.message : \"Failed to copy to clipboard\";\n\n console.error(errorMessage);\n onError?.(new Error(errorMessage));\n };\n\n // Check if clipboard API is available\n // Note: navigator.clipboard may be undefined in non-secure contexts (non-HTTPS)\n const isClipboardAvailable =\n typeof navigator !== \"undefined\" &&\n navigator.clipboard &&\n typeof navigator.clipboard.writeText === \"function\";\n\n if (isClipboardAvailable) {\n console.log(\"clipboard API IS available, using clipboard API\", {\n navigator,\n });\n try {\n await navigator.clipboard.writeText(text);\n copySuccess = true;\n } catch (error) {\n // If clipboard API fails, try fallback\n\n console.log(\"clipboard API failed, trying fallback\", { error });\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n error,\n });\n onErrorCallback(error);\n }\n } catch (fallbackError) {\n console.log(\"fallback errored, calling onErrorCallback\", {\n fallbackError,\n });\n onErrorCallback(fallbackError);\n }\n }\n } else {\n // Use fallback method when clipboard API is not available\n\n console.log(\"clipboard API NOT available, using fallback\");\n try {\n copySuccess = DEPRECATED_copyTextToClipboard(text);\n console.log(\"fallback result\", { copySuccess, text });\n if (!copySuccess) {\n console.log(\"fallback unsuccessful, calling onErrorCallback\", {\n copySuccess,\n });\n onErrorCallback(\n new Error(\n \"Failed to copy to clipboard: Clipboard API not available and fallback method failed\"\n )\n );\n } else {\n console.log(\"fallback successful - copy should have worked\");\n // Note: In some contexts (iframes, cross-origin), execCommand may return true\n // but the copy may still be blocked by the browser. There's no reliable way to verify.\n }\n } catch (error) {\n console.log(\"fallback errored, calling onErrorCallback\", { error });\n onErrorCallback(error);\n }\n }\n\n console.log(\"copyTextToClipboard final result\", { copySuccess });\n return copySuccess;\n};\n\n/**\n * Fallback legacy function to copy text to clipboard for browsers that don't support navigator.clipboard.writeText\n * @reference https://github.com/sindresorhus/copy-text-to-clipboard/blob/main/index.js\n * @deprecated Use navigator.clipboard.writeText instead\n */\nconst DEPRECATED_copyTextToClipboard = (\n text,\n { target = document.body } = {}\n) => {\n if (typeof text !== \"string\") {\n throw new TypeError(\n `Expected parameter \\`text\\` to be a \\`string\\`, got \\`${typeof text}\\`.`\n );\n }\n\n // Check if execCommand is available\n if (!document.execCommand) {\n console.error(\"document.execCommand is not available\");\n return false;\n }\n\n const element = document.createElement(\"textarea\");\n const previouslyFocusedElement = document.activeElement;\n\n element.value = text;\n\n // IMPORTANT: Always append to document.body, not the target\n // This ensures the element is in the active document, which is required\n // for execCommand to work, especially when inside portals/modals\n const container = document.body;\n\n // Style the element to be invisible but still \"visible\" to the browser\n // Some browsers require the element to be in the render tree and \"visible\"\n element.style.position = \"fixed\";\n element.style.top = \"0\";\n element.style.left = \"0\";\n element.style.width = \"2px\";\n element.style.height = \"2px\";\n element.style.padding = \"0\";\n element.style.border = \"none\";\n element.style.margin = \"0\";\n element.style.outline = \"none\";\n element.style.boxShadow = \"none\";\n element.style.background = \"transparent\";\n element.style.opacity = \"0\";\n element.style.zIndex = \"-1\";\n element.style.fontSize = \"12pt\"; // Prevent zooming on iOS\n element.setAttribute(\"readonly\", \"\");\n element.setAttribute(\"tabindex\", \"-1\");\n element.setAttribute(\"aria-hidden\", \"true\");\n\n const selection = document.getSelection();\n const originalRange = selection.rangeCount > 0 && selection.getRangeAt(0);\n\n // Append to document.body (critical for Modal/Portal contexts)\n container.appendChild(element);\n\n // Focus and select - must happen synchronously within user activation\n element.focus();\n element.select();\n\n // Explicit selection workaround for iOS\n try {\n if (element.setSelectionRange) {\n element.setSelectionRange(0, text.length);\n }\n } catch (e) {\n // setSelectionRange may fail, but that's okay\n console.log(\"setSelectionRange failed (non-critical)\", e);\n }\n\n let isSuccess = false;\n let execCommandError = null;\n\n try {\n // Verify selection before attempting copy\n const isSelected =\n element.selectionStart === 0 && element.selectionEnd === text.length;\n\n console.log(\"element selection state before execCommand\", {\n isSelected,\n selectionStart: element.selectionStart,\n selectionEnd: element.selectionEnd,\n textLength: text.length,\n isConnected: element.isConnected,\n ownerDocument: element.ownerDocument === document,\n });\n\n // If not properly selected, try one more time\n if (!isSelected && text.length > 0) {\n element.focus();\n element.select();\n if (element.setSelectionRange) {\n element.setSelectionRange(0, text.length);\n }\n }\n\n // Execute copy command\n isSuccess = document.execCommand(\"copy\");\n\n console.log(\"document.execCommand('copy') result\", {\n isSuccess,\n textLength: text.length,\n });\n\n if (!isSuccess) {\n console.warn(\"execCommand returned false - copy failed\");\n }\n } catch (error) {\n execCommandError = error;\n console.error(\"document.execCommand('copy') threw an error\", error);\n }\n\n // Clean up immediately\n element.remove();\n\n // Restore original selection\n if (originalRange) {\n selection.removeAllRanges();\n selection.addRange(originalRange);\n }\n\n // Restore focus to previously focused element\n // Use setTimeout to avoid focus conflicts with Modal's FocusScope\n if (previouslyFocusedElement instanceof HTMLElement) {\n // Small delay to let the Modal's focus management settle\n setTimeout(() => {\n try {\n previouslyFocusedElement.focus();\n } catch (e) {\n // Focus might fail if element is no longer in DOM, that's okay\n console.log(\"Could not restore focus (non-critical)\", e);\n }\n }, 0);\n }\n\n if (execCommandError) {\n console.error(\"execCommand error\", execCommandError);\n return false;\n }\n\n return isSuccess;\n};\n"],"names":["copyTextToClipboard","text","onError","copySuccess","onErrorCallback","error","errorMessage","DEPRECATED_copyTextToClipboard","fallbackError","target","element","previouslyFocusedElement","container","selection","originalRange","e","isSuccess","execCommandError","isSelected"],"mappings":"AAAa,MAAAA,IAAsB,OACjCC,GACAC,MACqB;AACrB,MAAIC,IAAc;AAEZ,QAAAC,IAAkB,CAACC,MAAiB;AACxC,UAAMC,IACJD,aAAiB,QAAQA,EAAM,UAAU;AAE3C,YAAQ,MAAMC,CAAY,GAChBJ,KAAA,QAAAA,EAAA,IAAI,MAAMI,CAAY;AAAA,EAAC;AAUnC,MAJE,OAAO,YAAc,OACrB,UAAU,aACV,OAAO,UAAU,UAAU,aAAc,YAEjB;AACxB,YAAQ,IAAI,mDAAmD;AAAA,MAC7D;AAAA,IAAA,CACD;AACG,QAAA;AACI,YAAA,UAAU,UAAU,UAAUL,CAAI,GAC1BE,IAAA;AAAA,aACPE,GAAO;AAGd,cAAQ,IAAI,yCAAyC,EAAE,OAAAA,EAAO,CAAA;AAC1D,UAAA;AACF,QAAAF,IAAcI,EAA+BN,CAAI,GAE5CE,MACH,QAAQ,IAAI,kDAAkD;AAAA,UAC5D,OAAAE;AAAA,QAAA,CACD,GACDD,EAAgBC,CAAK;AAAA,eAEhBG,GAAe;AACtB,gBAAQ,IAAI,6CAA6C;AAAA,UACvD,eAAAA;AAAA,QAAA,CACD,GACDJ,EAAgBI,CAAa;AAAA,MAC/B;AAAA,IACF;AAAA,EAAA,OACK;AAGL,YAAQ,IAAI,8CAA8C;AACtD,QAAA;AACF,MAAAL,IAAcI,EAA+BN,CAAI,GACjD,QAAQ,IAAI,mBAAmB,EAAE,aAAAE,GAAa,MAAAF,EAAM,CAAA,GAC/CE,IAUH,QAAQ,IAAI,+CAA+C,KAT3D,QAAQ,IAAI,kDAAkD;AAAA,QAC5D,aAAAA;AAAA,MAAA,CACD,GACDC;AAAA,QACE,IAAI;AAAA,UACF;AAAA,QACF;AAAA,MAAA;AAAA,aAOGC,GAAO;AACd,cAAQ,IAAI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CAAC;AAAA,EAC1D;AAEA,MAAIC,IAAY,IACZC,IAAmB;AAEnB,MAAA;AAEF,UAAMC,IACJR,EAAQ,mBAAmB,KAAKA,EAAQ,iBAAiBT,EAAK;AAEhE,YAAQ,IAAI,8CAA8C;AAAA,MACxD,YAAAiB;AAAA,MACA,gBAAgBR,EAAQ;AAAA,MACxB,cAAcA,EAAQ;AAAA,MACtB,YAAYT,EAAK;AAAA,MACjB,aAAaS,EAAQ;AAAA,MACrB,eAAeA,EAAQ,kBAAkB;AAAA,IAAA,CAC1C,GAGG,CAACQ,KAAcjB,EAAK,SAAS,MAC/BS,EAAQ,MAAM,GACdA,EAAQ,OAAO,GACXA,EAAQ,qBACFA,EAAA,kBAAkB,GAAGT,EAAK,MAAM,IAKhCe,IAAA,SAAS,YAAY,MAAM,GAEvC,QAAQ,IAAI,uCAAuC;AAAA,MACjD,WAAAA;AAAA,MACA,YAAYf,EAAK;AAAA,IAAA,CAClB,GAEIe,KACH,QAAQ,KAAK,0CAA0C;AAAA,WAElDX,GAAO;AACK,IAAAY,IAAAZ,GACX,QAAA,MAAM,+CAA+CA,CAAK;AAAA,EACpE;AAyBA,SAtBAK,EAAQ,OAAO,GAGXI,MACFD,EAAU,gBAAgB,GAC1BA,EAAU,SAASC,CAAa,IAK9BH,aAAoC,eAEtC,WAAW,MAAM;AACX,QAAA;AACF,MAAAA,EAAyB,MAAM;AAAA,aACxBI,GAAG;AAEF,cAAA,IAAI,0CAA0CA,CAAC;AAAA,IACzD;AAAA,KACC,CAAC,GAGFE,KACM,QAAA,MAAM,qBAAqBA,CAAgB,GAC5C,MAGFD;AACT;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protonradio/proton-ui",
3
- "version": "0.11.18-beta.2",
3
+ "version": "0.11.18-beta.4",
4
4
  "description": "",
5
5
  "main": "./dist/proton-ui.umd.js",
6
6
  "module": "./dist/proton-ui.es.js",