|
33 | 33 | var __toESM = (mod, isNodeMode, target) => ( |
34 | 34 | (target = mod != null ? __create(__getProtoOf(mod)) : {}), |
35 | 35 | __copyProps( |
| 36 | + // If the importer is in node compatibility mode or this is not an ESM |
| 37 | + // file that has been converted to a CommonJS file using a Babel- |
| 38 | + // compatible transform (i.e. "__esModule" has not been set), then set |
| 39 | + // "default" to the CommonJS "module.exports" for node compatibility. |
36 | 40 | isNodeMode || !mod || !mod.__esModule |
37 | 41 | ? __defProp(target, 'default', { value: mod, enumerable: true }) |
38 | 42 | : target, |
|
10309 | 10313 | render(data2, 'ClipboardItems'); |
10310 | 10314 | }); |
10311 | 10315 | }, []); |
| 10316 | + const autoselect = (0, import_react.useCallback)(e => { |
| 10317 | + const range = document.createRange(); |
| 10318 | + range.selectNodeContents(e.target); |
| 10319 | + const selection = window.getSelection(); |
| 10320 | + selection.removeAllRanges(); |
| 10321 | + selection.addRange(range); |
| 10322 | + }, []); |
10312 | 10323 | function render_file(file) { |
10313 | 10324 | return file |
10314 | 10325 | ? /* @__PURE__ */ import_react.default.createElement( |
@@ -10446,23 +10457,20 @@ |
10446 | 10457 | '\u2318V' |
10447 | 10458 | ), |
10448 | 10459 | ' ', |
10449 | | - 'keyboard shortcut' |
| 10460 | + 'keyboard shortcut or', |
| 10461 | + ' ', |
| 10462 | + /* @__PURE__ */ import_react.default.createElement( |
| 10463 | + 'span', |
| 10464 | + { contentEditable: true, onFocus: autoselect }, |
| 10465 | + 'paste in here' |
| 10466 | + ), |
| 10467 | + ' ', |
| 10468 | + "if you don't have a keyboard" |
10450 | 10469 | ), |
10451 | 10470 | /* @__PURE__ */ import_react.default.createElement( |
10452 | 10471 | 'li', |
10453 | 10472 | null, |
10454 | 10473 | 'Drop something on the page' |
10455 | | - ), |
10456 | | - /* @__PURE__ */ import_react.default.createElement( |
10457 | | - 'li', |
10458 | | - null, |
10459 | | - /* @__PURE__ */ import_react.default.createElement( |
10460 | | - 'span', |
10461 | | - { contentEditable: true, class: 'editable' }, |
10462 | | - 'Paste using context menu' |
10463 | | - ), |
10464 | | - ' ', |
10465 | | - 'if you are on mobile.' |
10466 | 10474 | ) |
10467 | 10475 | ) |
10468 | 10476 | ); |
|
0 commit comments