decord/source/5758_setString.js

37 lines
868 B
JavaScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 5758
// Function ID: 5759
2026-07-20 16:05:17 +00:00
// Name: setString
2026-08-08 06:10:11 +00:00
// Dependencies: [19, 5759]
2026-07-20 16:05:17 +00:00
// Exports: useClipboard
2026-08-08 06:10:11 +00:00
// Module 5758 (setString)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function setString(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-08-08 06:10:11 +00:00
const Clipboard = _require(5759).Clipboard;
2026-07-20 16:05:17 +00:00
Clipboard.setString(arg0);
2026-07-23 10:11:24 +00:00
const item = set.forEach((arg0) => arg0(closure_0));
2026-07-20 16:05:17 +00:00
}
const set = new Set();
2026-07-29 08:29:29 +00:00
export const useClipboard = () => {
2026-07-23 10:11:24 +00:00
let require;
2026-07-20 16:05:17 +00:00
let tmp2;
2026-07-29 08:29:29 +00:00
const state = noop.useState("");
2026-07-23 10:11:24 +00:00
[tmp2, require] = state;
2026-07-29 08:29:29 +00:00
const effect = noop.useEffect(() => {
2026-07-23 10:11:24 +00:00
const Clipboard = outer1_0(outer1_1[1]).Clipboard;
2026-07-20 16:05:17 +00:00
const string = Clipboard.getString();
2026-07-23 10:11:24 +00:00
string.then(closure_0);
2026-07-20 16:05:17 +00:00
}, []);
2026-07-29 08:29:29 +00:00
const effect1 = noop.useEffect(() => {
2026-07-23 10:11:24 +00:00
outer1_3.add(closure_0);
2026-07-20 16:05:17 +00:00
return () => {
2026-07-29 08:29:29 +00:00
outer1_3.delete(closure_0);
2026-07-20 16:05:17 +00:00
};
}, []);
const items = [tmp2, setString];
return items;
};