@dovetail-v2/refine 0.4.2-alpha.0 → 0.4.2-beta.0
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/PodShell-43c7028e.cjs +216 -0
- package/dist/PodShell-76331418.js +216 -0
- package/dist/{common-84e75a63.cjs → common-1eb43414.cjs} +9 -42
- package/dist/{common-b35e289c.js → common-241b21f8.js} +17 -50
- package/dist/{index-9c194830.cjs → index-31874f77.cjs} +3 -124
- package/dist/{index-33963e6a.js → index-ab97826a.js} +5 -126
- package/dist/refine.cjs +9986 -20021
- package/dist/refine.js +9834 -19869
- package/dist/shell.cjs +3 -2
- package/dist/shell.js +3 -2
- package/package.json +33 -58
- package/dist/PodShell-1ab70e6b.js +0 -2084
- package/dist/PodShell-fdd7ac78.cjs +0 -2084
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
3
|
-
function getDefaultExportFromCjs(x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
-
}
|
|
6
|
-
function getAugmentedNamespace(n) {
|
|
7
|
-
if (n.__esModule)
|
|
8
|
-
return n;
|
|
9
|
-
var f = n.default;
|
|
10
|
-
if (typeof f == "function") {
|
|
11
|
-
var a = function a2() {
|
|
12
|
-
if (this instanceof a2) {
|
|
13
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
14
|
-
}
|
|
15
|
-
return f.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
a.prototype = f.prototype;
|
|
18
|
-
} else
|
|
19
|
-
a = {};
|
|
20
|
-
Object.defineProperty(a, "__esModule", { value: true });
|
|
21
|
-
Object.keys(n).forEach(function(k) {
|
|
22
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
23
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function() {
|
|
26
|
-
return n[k];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
return a;
|
|
31
|
-
}
|
|
1
|
+
import React, { createContext, useContext, useState, useRef, useEffect } from "react";
|
|
32
2
|
function warn() {
|
|
33
3
|
if (console && console.warn) {
|
|
34
4
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -316,7 +286,7 @@ function requireReactJsxRuntime_production_min() {
|
|
|
316
286
|
if (hasRequiredReactJsxRuntime_production_min)
|
|
317
287
|
return reactJsxRuntime_production_min;
|
|
318
288
|
hasRequiredReactJsxRuntime_production_min = 1;
|
|
319
|
-
var f =
|
|
289
|
+
var f = React, g = 60103;
|
|
320
290
|
reactJsxRuntime_production_min.Fragment = 60107;
|
|
321
291
|
if ("function" === typeof Symbol && Symbol.for) {
|
|
322
292
|
var h = Symbol.for;
|
|
@@ -357,7 +327,7 @@ function requireReactJsxRuntime_development() {
|
|
|
357
327
|
(function(exports) {
|
|
358
328
|
if (process.env.NODE_ENV !== "production") {
|
|
359
329
|
(function() {
|
|
360
|
-
var React =
|
|
330
|
+
var React$1 = React;
|
|
361
331
|
var REACT_ELEMENT_TYPE = 60103;
|
|
362
332
|
var REACT_PORTAL_TYPE = 60106;
|
|
363
333
|
exports.Fragment = 60107;
|
|
@@ -410,7 +380,7 @@ function requireReactJsxRuntime_development() {
|
|
|
410
380
|
}
|
|
411
381
|
return null;
|
|
412
382
|
}
|
|
413
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
383
|
+
var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
414
384
|
function error(format) {
|
|
415
385
|
{
|
|
416
386
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -615,9 +585,9 @@ function requireReactJsxRuntime_development() {
|
|
|
615
585
|
}
|
|
616
586
|
return config.key !== void 0;
|
|
617
587
|
}
|
|
618
|
-
function warnIfStringRefCannotBeAutoConverted(config,
|
|
588
|
+
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
619
589
|
{
|
|
620
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current &&
|
|
590
|
+
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
621
591
|
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
|
622
592
|
if (!didWarnAboutStringRefs[componentName]) {
|
|
623
593
|
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
|
@@ -656,7 +626,7 @@ function requireReactJsxRuntime_development() {
|
|
|
656
626
|
});
|
|
657
627
|
}
|
|
658
628
|
}
|
|
659
|
-
var ReactElement = function(type, key, ref,
|
|
629
|
+
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
660
630
|
var element = {
|
|
661
631
|
// This tag allows us to uniquely identify this as a React Element
|
|
662
632
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
@@ -680,7 +650,7 @@ function requireReactJsxRuntime_development() {
|
|
|
680
650
|
configurable: false,
|
|
681
651
|
enumerable: false,
|
|
682
652
|
writable: false,
|
|
683
|
-
value:
|
|
653
|
+
value: self
|
|
684
654
|
});
|
|
685
655
|
Object.defineProperty(element, "_source", {
|
|
686
656
|
configurable: false,
|
|
@@ -695,7 +665,7 @@ function requireReactJsxRuntime_development() {
|
|
|
695
665
|
}
|
|
696
666
|
return element;
|
|
697
667
|
};
|
|
698
|
-
function jsxDEV(type, config, maybeKey, source,
|
|
668
|
+
function jsxDEV(type, config, maybeKey, source, self) {
|
|
699
669
|
{
|
|
700
670
|
var propName;
|
|
701
671
|
var props = {};
|
|
@@ -709,7 +679,7 @@ function requireReactJsxRuntime_development() {
|
|
|
709
679
|
}
|
|
710
680
|
if (hasValidRef(config)) {
|
|
711
681
|
ref = config.ref;
|
|
712
|
-
warnIfStringRefCannotBeAutoConverted(config,
|
|
682
|
+
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
713
683
|
}
|
|
714
684
|
for (propName in config) {
|
|
715
685
|
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
@@ -733,7 +703,7 @@ function requireReactJsxRuntime_development() {
|
|
|
733
703
|
defineRefPropWarningGetter(props, displayName);
|
|
734
704
|
}
|
|
735
705
|
}
|
|
736
|
-
return ReactElement(type, key, ref,
|
|
706
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
737
707
|
}
|
|
738
708
|
}
|
|
739
709
|
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
@@ -884,7 +854,7 @@ function requireReactJsxRuntime_development() {
|
|
|
884
854
|
}
|
|
885
855
|
}
|
|
886
856
|
}
|
|
887
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source,
|
|
857
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
888
858
|
{
|
|
889
859
|
var validType = isValidElementType(type);
|
|
890
860
|
if (!validType) {
|
|
@@ -911,7 +881,7 @@ function requireReactJsxRuntime_development() {
|
|
|
911
881
|
}
|
|
912
882
|
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
913
883
|
}
|
|
914
|
-
var element = jsxDEV(type, props, key, source,
|
|
884
|
+
var element = jsxDEV(type, props, key, source, self);
|
|
915
885
|
if (element == null) {
|
|
916
886
|
return element;
|
|
917
887
|
}
|
|
@@ -1001,14 +971,11 @@ var SocketStatus = /* @__PURE__ */ ((SocketStatus2) => {
|
|
|
1001
971
|
export {
|
|
1002
972
|
I18nContext as I,
|
|
1003
973
|
SocketStatus as S,
|
|
1004
|
-
|
|
1005
|
-
|
|
974
|
+
warn as a,
|
|
975
|
+
getI18n as b,
|
|
1006
976
|
cx_default as c,
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
setI18n as f,
|
|
1010
|
-
getDefaultExportFromCjs as g,
|
|
1011
|
-
getAugmentedNamespace as h,
|
|
977
|
+
setI18n as d,
|
|
978
|
+
getDefaults as g,
|
|
1012
979
|
jsxRuntimeExports as j,
|
|
1013
980
|
setDefaults as s,
|
|
1014
981
|
useTranslation as u,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const common = require("./common-
|
|
2
|
+
const common = require("./common-1eb43414.cjs");
|
|
3
3
|
const eagle = require("@cloudtower/eagle");
|
|
4
4
|
const addonCanvas = require("@xterm/addon-canvas");
|
|
5
5
|
const addonFit = require("@xterm/addon-fit");
|
|
@@ -7,131 +7,10 @@ const addonSearch = require("@xterm/addon-search");
|
|
|
7
7
|
const addonWebLinks = require("@xterm/addon-web-links");
|
|
8
8
|
const addonWebgl = require("@xterm/addon-webgl");
|
|
9
9
|
const xterm$1 = require("@xterm/xterm");
|
|
10
|
+
const copyToClipboard = require("copy-to-clipboard");
|
|
10
11
|
const lodashEs = require("lodash-es");
|
|
11
12
|
const React = require("react");
|
|
12
13
|
const iconsReact = require("@cloudtower/icons-react");
|
|
13
|
-
var toggleSelection = function() {
|
|
14
|
-
var selection = document.getSelection();
|
|
15
|
-
if (!selection.rangeCount) {
|
|
16
|
-
return function() {
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
var active = document.activeElement;
|
|
20
|
-
var ranges = [];
|
|
21
|
-
for (var i = 0; i < selection.rangeCount; i++) {
|
|
22
|
-
ranges.push(selection.getRangeAt(i));
|
|
23
|
-
}
|
|
24
|
-
switch (active.tagName.toUpperCase()) {
|
|
25
|
-
case "INPUT":
|
|
26
|
-
case "TEXTAREA":
|
|
27
|
-
active.blur();
|
|
28
|
-
break;
|
|
29
|
-
default:
|
|
30
|
-
active = null;
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
selection.removeAllRanges();
|
|
34
|
-
return function() {
|
|
35
|
-
selection.type === "Caret" && selection.removeAllRanges();
|
|
36
|
-
if (!selection.rangeCount) {
|
|
37
|
-
ranges.forEach(function(range) {
|
|
38
|
-
selection.addRange(range);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
active && active.focus();
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
var deselectCurrent = toggleSelection;
|
|
45
|
-
var clipboardToIE11Formatting = {
|
|
46
|
-
"text/plain": "Text",
|
|
47
|
-
"text/html": "Url",
|
|
48
|
-
"default": "Text"
|
|
49
|
-
};
|
|
50
|
-
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
51
|
-
function format(message) {
|
|
52
|
-
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
53
|
-
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
54
|
-
}
|
|
55
|
-
function copy(text, options) {
|
|
56
|
-
var debug, message, reselectPrevious, range, selection, mark, success = false;
|
|
57
|
-
if (!options) {
|
|
58
|
-
options = {};
|
|
59
|
-
}
|
|
60
|
-
debug = options.debug || false;
|
|
61
|
-
try {
|
|
62
|
-
reselectPrevious = deselectCurrent();
|
|
63
|
-
range = document.createRange();
|
|
64
|
-
selection = document.getSelection();
|
|
65
|
-
mark = document.createElement("span");
|
|
66
|
-
mark.textContent = text;
|
|
67
|
-
mark.ariaHidden = "true";
|
|
68
|
-
mark.style.all = "unset";
|
|
69
|
-
mark.style.position = "fixed";
|
|
70
|
-
mark.style.top = 0;
|
|
71
|
-
mark.style.clip = "rect(0, 0, 0, 0)";
|
|
72
|
-
mark.style.whiteSpace = "pre";
|
|
73
|
-
mark.style.webkitUserSelect = "text";
|
|
74
|
-
mark.style.MozUserSelect = "text";
|
|
75
|
-
mark.style.msUserSelect = "text";
|
|
76
|
-
mark.style.userSelect = "text";
|
|
77
|
-
mark.addEventListener("copy", function(e) {
|
|
78
|
-
e.stopPropagation();
|
|
79
|
-
if (options.format) {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
if (typeof e.clipboardData === "undefined") {
|
|
82
|
-
debug && console.warn("unable to use e.clipboardData");
|
|
83
|
-
debug && console.warn("trying IE specific stuff");
|
|
84
|
-
window.clipboardData.clearData();
|
|
85
|
-
var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
|
|
86
|
-
window.clipboardData.setData(format2, text);
|
|
87
|
-
} else {
|
|
88
|
-
e.clipboardData.clearData();
|
|
89
|
-
e.clipboardData.setData(options.format, text);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (options.onCopy) {
|
|
93
|
-
e.preventDefault();
|
|
94
|
-
options.onCopy(e.clipboardData);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
document.body.appendChild(mark);
|
|
98
|
-
range.selectNodeContents(mark);
|
|
99
|
-
selection.addRange(range);
|
|
100
|
-
var successful = document.execCommand("copy");
|
|
101
|
-
if (!successful) {
|
|
102
|
-
throw new Error("copy command was unsuccessful");
|
|
103
|
-
}
|
|
104
|
-
success = true;
|
|
105
|
-
} catch (err) {
|
|
106
|
-
debug && console.error("unable to copy using execCommand: ", err);
|
|
107
|
-
debug && console.warn("trying IE specific stuff");
|
|
108
|
-
try {
|
|
109
|
-
window.clipboardData.setData(options.format || "text", text);
|
|
110
|
-
options.onCopy && options.onCopy(window.clipboardData);
|
|
111
|
-
success = true;
|
|
112
|
-
} catch (err2) {
|
|
113
|
-
debug && console.error("unable to copy using clipboardData: ", err2);
|
|
114
|
-
debug && console.error("falling back to prompt");
|
|
115
|
-
message = format("message" in options ? options.message : defaultMessage);
|
|
116
|
-
window.prompt(message, text);
|
|
117
|
-
}
|
|
118
|
-
} finally {
|
|
119
|
-
if (selection) {
|
|
120
|
-
if (typeof selection.removeRange == "function") {
|
|
121
|
-
selection.removeRange(range);
|
|
122
|
-
} else {
|
|
123
|
-
selection.removeAllRanges();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (mark) {
|
|
127
|
-
document.body.removeChild(mark);
|
|
128
|
-
}
|
|
129
|
-
reselectPrevious();
|
|
130
|
-
}
|
|
131
|
-
return success;
|
|
132
|
-
}
|
|
133
|
-
var copyToClipboard = copy;
|
|
134
|
-
const copyToClipboard$1 = /* @__PURE__ */ common.getDefaultExportFromCjs(copyToClipboard);
|
|
135
14
|
const Connecting_r8rfff = "";
|
|
136
15
|
const LoadingStyle = "l1ur2ktd";
|
|
137
16
|
const Connecting = () => {
|
|
@@ -412,7 +291,7 @@ const Shell = React.forwardRef(function Shell2(props, ref) {
|
|
|
412
291
|
let onKeyDown = function(event) {
|
|
413
292
|
if (event.ctrlKey && event.shiftKey && event.key === "C") {
|
|
414
293
|
event.preventDefault();
|
|
415
|
-
copyToClipboard
|
|
294
|
+
copyToClipboard(term.getSelection());
|
|
416
295
|
}
|
|
417
296
|
}, onResize = function() {
|
|
418
297
|
fit();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as useTranslation, j as jsxRuntimeExports, c as cx_default, S as SocketStatus } from "./common-241b21f8.js";
|
|
2
2
|
import { Icon, Typo, DropdownMenu, Tooltip, SearchInput, Alert, Link } from "@cloudtower/eagle";
|
|
3
3
|
import { CanvasAddon } from "@xterm/addon-canvas";
|
|
4
4
|
import { FitAddon } from "@xterm/addon-fit";
|
|
@@ -6,131 +6,10 @@ import { SearchAddon } from "@xterm/addon-search";
|
|
|
6
6
|
import { WebLinksAddon } from "@xterm/addon-web-links";
|
|
7
7
|
import { WebglAddon } from "@xterm/addon-webgl";
|
|
8
8
|
import { Terminal } from "@xterm/xterm";
|
|
9
|
+
import copyToClipboard from "copy-to-clipboard";
|
|
9
10
|
import { debounce } from "lodash-es";
|
|
10
|
-
import
|
|
11
|
+
import React, { useRef, useState, useMemo, useCallback, useEffect, useImperativeHandle } from "react";
|
|
11
12
|
import { Loading24GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon } from "@cloudtower/icons-react";
|
|
12
|
-
var toggleSelection = function() {
|
|
13
|
-
var selection = document.getSelection();
|
|
14
|
-
if (!selection.rangeCount) {
|
|
15
|
-
return function() {
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
var active = document.activeElement;
|
|
19
|
-
var ranges = [];
|
|
20
|
-
for (var i = 0; i < selection.rangeCount; i++) {
|
|
21
|
-
ranges.push(selection.getRangeAt(i));
|
|
22
|
-
}
|
|
23
|
-
switch (active.tagName.toUpperCase()) {
|
|
24
|
-
case "INPUT":
|
|
25
|
-
case "TEXTAREA":
|
|
26
|
-
active.blur();
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
active = null;
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
selection.removeAllRanges();
|
|
33
|
-
return function() {
|
|
34
|
-
selection.type === "Caret" && selection.removeAllRanges();
|
|
35
|
-
if (!selection.rangeCount) {
|
|
36
|
-
ranges.forEach(function(range) {
|
|
37
|
-
selection.addRange(range);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
active && active.focus();
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
var deselectCurrent = toggleSelection;
|
|
44
|
-
var clipboardToIE11Formatting = {
|
|
45
|
-
"text/plain": "Text",
|
|
46
|
-
"text/html": "Url",
|
|
47
|
-
"default": "Text"
|
|
48
|
-
};
|
|
49
|
-
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
50
|
-
function format(message) {
|
|
51
|
-
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
52
|
-
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
53
|
-
}
|
|
54
|
-
function copy(text, options) {
|
|
55
|
-
var debug, message, reselectPrevious, range, selection, mark, success = false;
|
|
56
|
-
if (!options) {
|
|
57
|
-
options = {};
|
|
58
|
-
}
|
|
59
|
-
debug = options.debug || false;
|
|
60
|
-
try {
|
|
61
|
-
reselectPrevious = deselectCurrent();
|
|
62
|
-
range = document.createRange();
|
|
63
|
-
selection = document.getSelection();
|
|
64
|
-
mark = document.createElement("span");
|
|
65
|
-
mark.textContent = text;
|
|
66
|
-
mark.ariaHidden = "true";
|
|
67
|
-
mark.style.all = "unset";
|
|
68
|
-
mark.style.position = "fixed";
|
|
69
|
-
mark.style.top = 0;
|
|
70
|
-
mark.style.clip = "rect(0, 0, 0, 0)";
|
|
71
|
-
mark.style.whiteSpace = "pre";
|
|
72
|
-
mark.style.webkitUserSelect = "text";
|
|
73
|
-
mark.style.MozUserSelect = "text";
|
|
74
|
-
mark.style.msUserSelect = "text";
|
|
75
|
-
mark.style.userSelect = "text";
|
|
76
|
-
mark.addEventListener("copy", function(e) {
|
|
77
|
-
e.stopPropagation();
|
|
78
|
-
if (options.format) {
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
if (typeof e.clipboardData === "undefined") {
|
|
81
|
-
debug && console.warn("unable to use e.clipboardData");
|
|
82
|
-
debug && console.warn("trying IE specific stuff");
|
|
83
|
-
window.clipboardData.clearData();
|
|
84
|
-
var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
|
|
85
|
-
window.clipboardData.setData(format2, text);
|
|
86
|
-
} else {
|
|
87
|
-
e.clipboardData.clearData();
|
|
88
|
-
e.clipboardData.setData(options.format, text);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (options.onCopy) {
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
options.onCopy(e.clipboardData);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
document.body.appendChild(mark);
|
|
97
|
-
range.selectNodeContents(mark);
|
|
98
|
-
selection.addRange(range);
|
|
99
|
-
var successful = document.execCommand("copy");
|
|
100
|
-
if (!successful) {
|
|
101
|
-
throw new Error("copy command was unsuccessful");
|
|
102
|
-
}
|
|
103
|
-
success = true;
|
|
104
|
-
} catch (err) {
|
|
105
|
-
debug && console.error("unable to copy using execCommand: ", err);
|
|
106
|
-
debug && console.warn("trying IE specific stuff");
|
|
107
|
-
try {
|
|
108
|
-
window.clipboardData.setData(options.format || "text", text);
|
|
109
|
-
options.onCopy && options.onCopy(window.clipboardData);
|
|
110
|
-
success = true;
|
|
111
|
-
} catch (err2) {
|
|
112
|
-
debug && console.error("unable to copy using clipboardData: ", err2);
|
|
113
|
-
debug && console.error("falling back to prompt");
|
|
114
|
-
message = format("message" in options ? options.message : defaultMessage);
|
|
115
|
-
window.prompt(message, text);
|
|
116
|
-
}
|
|
117
|
-
} finally {
|
|
118
|
-
if (selection) {
|
|
119
|
-
if (typeof selection.removeRange == "function") {
|
|
120
|
-
selection.removeRange(range);
|
|
121
|
-
} else {
|
|
122
|
-
selection.removeAllRanges();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (mark) {
|
|
126
|
-
document.body.removeChild(mark);
|
|
127
|
-
}
|
|
128
|
-
reselectPrevious();
|
|
129
|
-
}
|
|
130
|
-
return success;
|
|
131
|
-
}
|
|
132
|
-
var copyToClipboard = copy;
|
|
133
|
-
const copyToClipboard$1 = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboard);
|
|
134
13
|
const Connecting_r8rfff = "";
|
|
135
14
|
const LoadingStyle = "l1ur2ktd";
|
|
136
15
|
const Connecting = () => {
|
|
@@ -264,7 +143,7 @@ const ContainerStyle = "c1q5a2qi";
|
|
|
264
143
|
const ShellStyle = "sdz5fm1";
|
|
265
144
|
const ErrorAlertStyle = "ebp0h2e";
|
|
266
145
|
const ToolbarStyle = "tioilqy";
|
|
267
|
-
const Shell =
|
|
146
|
+
const Shell = React.forwardRef(function Shell2(props, ref) {
|
|
268
147
|
const {
|
|
269
148
|
className,
|
|
270
149
|
url,
|
|
@@ -411,7 +290,7 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
|
|
|
411
290
|
let onKeyDown = function(event) {
|
|
412
291
|
if (event.ctrlKey && event.shiftKey && event.key === "C") {
|
|
413
292
|
event.preventDefault();
|
|
414
|
-
copyToClipboard
|
|
293
|
+
copyToClipboard(term.getSelection());
|
|
415
294
|
}
|
|
416
295
|
}, onResize = function() {
|
|
417
296
|
fit();
|