@flipdish/ui-library 0.72.0 → 0.72.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.
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Copies text with `document.execCommand` when the async Clipboard API is missing or rejects, and removes the helper textarea even if the command throws.
5
+ *
6
+ * @param text The text to place on the clipboard.
7
+ * @returns Whether the browser accepted the command, or the error when it refused or threw.
8
+ */
9
+ const copyWithExecCommand = (text) => {
10
+ const textArea = document.createElement('textarea');
11
+ textArea.value = text;
12
+ // Off-screen so the selection the command needs never flashes on the page.
13
+ textArea.style.position = 'absolute';
14
+ textArea.style.left = '-99999px';
15
+ document.body.appendChild(textArea);
16
+ try {
17
+ textArea.select();
18
+ const success = document.execCommand('copy');
19
+ return success ? { success: true } : { success: false, error: new Error('execCommand returned false') };
20
+ }
21
+ catch (err) {
22
+ return {
23
+ success: false,
24
+ error: err instanceof Error ? err : new Error('Fallback copy failed'),
25
+ };
26
+ }
27
+ finally {
28
+ textArea.remove();
29
+ }
30
+ };
31
+
32
+ exports.copyWithExecCommand = copyWithExecCommand;
33
+ //# sourceMappingURL=clipboard.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.utils.cjs","sources":["../../../src/hooks/useClipboard/clipboard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAQA;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAY,KAA0B;IACxE,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;AACnD,IAAA,QAAQ,CAAC,KAAK,GAAG,IAAI;;AAErB,IAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;AACpC,IAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,UAAU;AAChC,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;AAEnC,IAAA,IAAI;QACF,QAAQ,CAAC,MAAM,EAAE;QACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC;QAC5C,OAAO,OAAO,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,4BAA4B,CAAC,EAAE;IACzG;IAAE,OAAO,GAAG,EAAE;QACZ,OAAO;AACL,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,KAAK,EAAE,GAAG,YAAY,KAAK,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,sBAAsB,CAAC;SACtE;IACH;YAAU;QACR,QAAQ,CAAC,MAAM,EAAE;IACnB;AACF;;"}
@@ -0,0 +1,15 @@
1
+ /** Outcome of one `document.execCommand('copy')` attempt. */
2
+ export interface ClipboardWriteResult {
3
+ /** Whether the browser reported that the text reached the clipboard. */
4
+ success: boolean;
5
+ /** Why the command was refused or threw; absent when `success` is true. */
6
+ error?: Error;
7
+ }
8
+ /**
9
+ * Copies text with `document.execCommand` when the async Clipboard API is missing or rejects, and removes the helper textarea even if the command throws.
10
+ *
11
+ * @param text The text to place on the clipboard.
12
+ * @returns Whether the browser accepted the command, or the error when it refused or threw.
13
+ */
14
+ export declare const copyWithExecCommand: (text: string) => ClipboardWriteResult;
15
+ //# sourceMappingURL=clipboard.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.utils.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClipboard/clipboard.utils.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,oBAoBlD,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copies text with `document.execCommand` when the async Clipboard API is missing or rejects, and removes the helper textarea even if the command throws.
3
+ *
4
+ * @param text The text to place on the clipboard.
5
+ * @returns Whether the browser accepted the command, or the error when it refused or threw.
6
+ */
7
+ const copyWithExecCommand = (text) => {
8
+ const textArea = document.createElement('textarea');
9
+ textArea.value = text;
10
+ // Off-screen so the selection the command needs never flashes on the page.
11
+ textArea.style.position = 'absolute';
12
+ textArea.style.left = '-99999px';
13
+ document.body.appendChild(textArea);
14
+ try {
15
+ textArea.select();
16
+ const success = document.execCommand('copy');
17
+ return success ? { success: true } : { success: false, error: new Error('execCommand returned false') };
18
+ }
19
+ catch (err) {
20
+ return {
21
+ success: false,
22
+ error: err instanceof Error ? err : new Error('Fallback copy failed'),
23
+ };
24
+ }
25
+ finally {
26
+ textArea.remove();
27
+ }
28
+ };
29
+
30
+ export { copyWithExecCommand };
31
+ //# sourceMappingURL=clipboard.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.utils.js","sources":["../../../src/hooks/useClipboard/clipboard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAQA;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAY,KAA0B;IACxE,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;AACnD,IAAA,QAAQ,CAAC,KAAK,GAAG,IAAI;;AAErB,IAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;AACpC,IAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,UAAU;AAChC,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;AAEnC,IAAA,IAAI;QACF,QAAQ,CAAC,MAAM,EAAE;QACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC;QAC5C,OAAO,OAAO,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,4BAA4B,CAAC,EAAE;IACzG;IAAE,OAAO,GAAG,EAAE;QACZ,OAAO;AACL,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,KAAK,EAAE,GAAG,YAAY,KAAK,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,sBAAsB,CAAC;SACtE;IACH;YAAU;QACR,QAAQ,CAAC,MAAM,EAAE;IACnB;AACF;;"}
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var clipboard_utils = require('./clipboard.utils.cjs');
4
5
 
5
6
  const DEFAULT_TIMEOUT = 2000;
6
7
  /**
@@ -17,11 +18,6 @@ const useClipboard = () => {
17
18
  // `copy` awaits the async clipboard API; guard its post-await setState so a copy
18
19
  // resolving after unmount doesn't set state on an unmounted component.
19
20
  const isMountedRef = React.useRef(true);
20
- const scheduleReset = () => {
21
- if (resetTimerRef.current)
22
- clearTimeout(resetTimerRef.current);
23
- resetTimerRef.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT);
24
- };
25
21
  React.useEffect(() => {
26
22
  isMountedRef.current = true;
27
23
  return () => {
@@ -30,51 +26,30 @@ const useClipboard = () => {
30
26
  clearTimeout(resetTimerRef.current);
31
27
  };
32
28
  }, []);
33
- // Fallback function for older browsers
34
- const fallback = (text, id) => {
35
- // Textarea to copy the text to the clipboard
36
- const textArea = document.createElement('textarea');
37
- textArea.value = text;
38
- textArea.style.position = 'absolute';
39
- textArea.style.left = '-99999px';
40
- document.body.appendChild(textArea);
41
- try {
42
- textArea.select();
43
- const success = document.execCommand('copy');
44
- if (success && isMountedRef.current) {
45
- setCopied(id || true);
46
- scheduleReset();
47
- }
48
- return success ? { success: true } : { success: false, error: new Error('execCommand returned false') };
49
- }
50
- catch (err) {
51
- return {
52
- success: false,
53
- error: err instanceof Error ? err : new Error('Fallback copy failed'),
54
- };
55
- }
56
- finally {
57
- // Always remove the textarea, even when execCommand throws, so a failed copy doesn't leak it into the DOM.
58
- textArea.remove();
59
- }
60
- };
61
- // biome-ignore lint/correctness/useExhaustiveDependencies: We need to return the copied state and the copy function
62
29
  const copy = React.useCallback(async (text, id) => {
30
+ // A second copy restarts the window, so the first one cannot clear the newer copied state.
31
+ const noteCopied = () => {
32
+ if (!isMountedRef.current)
33
+ return;
34
+ setCopied(id || true);
35
+ if (resetTimerRef.current)
36
+ clearTimeout(resetTimerRef.current);
37
+ resetTimerRef.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT);
38
+ };
63
39
  if (navigator.clipboard && window.isSecureContext) {
64
40
  try {
65
41
  await navigator.clipboard.writeText(text);
66
- if (isMountedRef.current) {
67
- setCopied(id || true);
68
- scheduleReset();
69
- }
42
+ noteCopied();
70
43
  return { success: true };
71
44
  }
72
- catch (_err) {
73
- // If modern method fails, try fallback
74
- return fallback(text, id);
45
+ catch {
46
+ // A secure context can still refuse the async API; the textarea command is the fallback.
75
47
  }
76
48
  }
77
- return fallback(text, id);
49
+ const result = clipboard_utils.copyWithExecCommand(text);
50
+ if (result.success)
51
+ noteCopied();
52
+ return result;
78
53
  }, []);
79
54
  return { copied, copy };
80
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useClipboard/index.ts"],"sourcesContent":[null],"names":["useState","useRef","useEffect","useCallback"],"mappings":";;;;AAIA,MAAM,eAAe,GAAG,IAAI;AAqB5B;;;;;;;AAOG;AACI,MAAM,YAAY,GAAG,MAA6B;IACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGA,cAAQ,CAAmB,KAAK,CAAC;AAC7D,IAAA,MAAM,aAAa,GAAGC,YAAM,CAAuC,IAAI,CAAC;;;AAGxE,IAAA,MAAM,YAAY,GAAGA,YAAM,CAAC,IAAI,CAAC;IAEjC,MAAM,aAAa,GAAG,MAAK;QACzB,IAAI,aAAa,CAAC,OAAO;AAAE,YAAA,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC;AAC9D,QAAA,a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AI,KAAK,CAAC,sBAAsB,CAAC;aACtE;QACH;gBAAU;;YAER,QAAQ,CAAC,MAAM,EAAE;QACnB;AACF,IAAA,CAAC;;IAGD,MAAM,IAAI,GAAGC,iBAAW,CAAC,OAAO,IAAY,EAAE,EAAW,KAAI;QAC3D,IAAI,SAAS,CAAC,SAAS,IAAI,MAAM,CAAC,eAAe,EAAE;AACjD,YAAA,IAAI;gBACF,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC;AAEzC,gBAAA,IAAI,YAAY,CAAC,OAAO,EAAE;AACxB,oBAAA,SAAS,CAAC,EAAE,IAAI,IAAI,CAAC;AACrB,oBAAA,aAAa,EAAE;gBACjB;AAEA,gBAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;YAC1B;YAAE,OAAO,IAAI,EAAE;;AAEb,gBAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YAC3B;QACF;AACA,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;AACzB;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/hooks/useClipboard/index.ts"],"sourcesContent":[null],"names":["useState","useRef","useEffect","useCallback","copyWithExecCommand"],"mappings":";;;;;AAKA,MAAM,eAAe,GAAG,IAAI;AAqB5B;;;;;;;AAOG;AACI,MAAM,YAAY,GAAG,MAA6B;IACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGA,cAAQ,CAAmB,KAAK,CAAC;AAC7D,IAAA,MAAM,aAAa,GAAGC,YAAM,CAAuC,IAAI,CAAC;;;AAGxE,IAAA,MAAM,YAAY,GAAGA,YAAM,CAAC,IAAI,CAAC;IAEjCC,eAAS,CAAC,MAAK;AACb,QAAA,YAAY,CAAC,OAAO,GAAG,IAAI;AAC3B,QAAA,OAAO,MAAK;AACV,YAAA,YAA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C,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CACnF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,QAAO,sBAyE/B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClipboard/index.ts"],"names":[],"mappings":"AAOA,KAAK,sBAAsB,GAAG;IAC5B;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB;;;;;;;;;OASG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CACnF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,QAAO,sBAwC/B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { useState, useRef, useEffect, useCallback } from 'react';
2
+ import { copyWithExecCommand } from './clipboard.utils.js';
2
3
 
3
4
  const DEFAULT_TIMEOUT = 2000;
4
5
  /**
@@ -15,11 +16,6 @@ const useClipboard = () => {
15
16
  // `copy` awaits the async clipboard API; guard its post-await setState so a copy
16
17
  // resolving after unmount doesn't set state on an unmounted component.
17
18
  const isMountedRef = useRef(true);
18
- const scheduleReset = () => {
19
- if (resetTimerRef.current)
20
- clearTimeout(resetTimerRef.current);
21
- resetTimerRef.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT);
22
- };
23
19
  useEffect(() => {
24
20
  isMountedRef.current = true;
25
21
  return () => {
@@ -28,51 +24,30 @@ const useClipboard = () => {
28
24
  clearTimeout(resetTimerRef.current);
29
25
  };
30
26
  }, []);
31
- // Fallback function for older browsers
32
- const fallback = (text, id) => {
33
- // Textarea to copy the text to the clipboard
34
- const textArea = document.createElement('textarea');
35
- textArea.value = text;
36
- textArea.style.position = 'absolute';
37
- textArea.style.left = '-99999px';
38
- document.body.appendChild(textArea);
39
- try {
40
- textArea.select();
41
- const success = document.execCommand('copy');
42
- if (success && isMountedRef.current) {
43
- setCopied(id || true);
44
- scheduleReset();
45
- }
46
- return success ? { success: true } : { success: false, error: new Error('execCommand returned false') };
47
- }
48
- catch (err) {
49
- return {
50
- success: false,
51
- error: err instanceof Error ? err : new Error('Fallback copy failed'),
52
- };
53
- }
54
- finally {
55
- // Always remove the textarea, even when execCommand throws, so a failed copy doesn't leak it into the DOM.
56
- textArea.remove();
57
- }
58
- };
59
- // biome-ignore lint/correctness/useExhaustiveDependencies: We need to return the copied state and the copy function
60
27
  const copy = useCallback(async (text, id) => {
28
+ // A second copy restarts the window, so the first one cannot clear the newer copied state.
29
+ const noteCopied = () => {
30
+ if (!isMountedRef.current)
31
+ return;
32
+ setCopied(id || true);
33
+ if (resetTimerRef.current)
34
+ clearTimeout(resetTimerRef.current);
35
+ resetTimerRef.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT);
36
+ };
61
37
  if (navigator.clipboard && window.isSecureContext) {
62
38
  try {
63
39
  await navigator.clipboard.writeText(text);
64
- if (isMountedRef.current) {
65
- setCopied(id || true);
66
- scheduleReset();
67
- }
40
+ noteCopied();
68
41
  return { success: true };
69
42
  }
70
- catch (_err) {
71
- // If modern method fails, try fallback
72
- return fallback(text, id);
43
+ catch {
44
+ // A secure context can still refuse the async API; the textarea command is the fallback.
73
45
  }
74
46
  }
75
- return fallback(text, id);
47
+ const result = copyWithExecCommand(text);
48
+ if (result.success)
49
+ noteCopied();
50
+ return result;
76
51
  }, []);
77
52
  return { copied, copy };
78
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useClipboard/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA,MAAM,eAAe,GAAG,IAAI;AAqB5B;;;;;;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CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;AACzB;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/ui-library",
3
- "version": "0.72.0",
3
+ "version": "0.72.1",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
6
  "imports": {