@ai-matrx/media 0.9.2 → 0.10.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/dist/react.js CHANGED
@@ -473,6 +473,7 @@ function FileIcon2({
473
473
  }
474
474
 
475
475
  // src/react/inline-media-ref.tsx
476
+ import { copyText } from "@ai-matrx/kit/clipboard";
476
477
  import {
477
478
  useCallback as useCallback3,
478
479
  useEffect as useEffect5,
@@ -1095,10 +1096,10 @@ function InformativeErrorPanel({
1095
1096
  (event) => {
1096
1097
  event.stopPropagation();
1097
1098
  event.preventDefault();
1098
- navigator.clipboard?.writeText(url).then(() => {
1099
+ void copyText(url).then((landed) => {
1100
+ if (!landed) return;
1099
1101
  setCopied(true);
1100
1102
  setTimeout(() => setCopied(false), 1500);
1101
- }).catch(() => {
1102
1103
  });
1103
1104
  },
1104
1105
  [url]