refactor[devtools]: copy to clipboard only on frontend side (#26604)

Fixes https://github.com/facebook/react/issues/26500

## Summary
- No more using `clipboard-js` from the backend side, now emitting
custom `saveToClipboard` event, also adding corresponding listener in
`store.js`
- Not migrating to `navigator.clipboard` api yet, there were some issues
with using it on Chrome, will add more details to
https://github.com/facebook/react/pull/26539

## How did you test this change?
- Tested on Chrome, Firefox, Edge
- Tested on standalone electron app: seems like context menu is not
expected to work there (cannot right-click on value, the menu is not
appearing), other logic (pressing on copy icon) was not changed

DiffTrain build for commit https://github.com/facebook/react/commit/21021fb0f06f5b8ccdad0774d53ff5f865faeb6d.
This commit is contained in:
hoxyq
2023-04-12 15:16:42 +00:00
parent e200362bbd
commit 698470fdd6
13 changed files with 19 additions and 19 deletions
@@ -23752,7 +23752,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
var ReactVersion = "18.3.0-next-21021fb0f-20230412";
// Might add PROFILE later.
@@ -8610,7 +8610,7 @@ var devToolsConfig$jscomp$inline_1021 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1204 = {
@@ -8641,7 +8641,7 @@ var internals$jscomp$inline_1204 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1205 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9036,7 +9036,7 @@ var devToolsConfig$jscomp$inline_1063 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1245 = {
@@ -9067,7 +9067,7 @@ var internals$jscomp$inline_1245 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1246 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
var ReactVersion = "18.3.0-next-21021fb0f-20230412";
// ATTENTION
// When adding new symbols to this file,
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-5426af3d5-20230411";
exports.version = "18.3.0-next-21021fb0f-20230412";
@@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-5426af3d5-20230411";
exports.version = "18.3.0-next-21021fb0f-20230412";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -1 +1 @@
5426af3d50ff706f3ebeb4764f838e0a3812bf9a
21021fb0f06f5b8ccdad0774d53ff5f865faeb6d
@@ -27059,7 +27059,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
var ReactVersion = "18.3.0-next-21021fb0f-20230412";
function createPortal$1(
children,
@@ -9479,7 +9479,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1045 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9521,7 +9521,7 @@ var internals$jscomp$inline_1274 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1275 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10188,7 +10188,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1123 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10243,7 +10243,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
@@ -27572,7 +27572,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-5426af3d5-20230411";
var ReactVersion = "18.3.0-next-21021fb0f-20230412";
function createPortal$1(
children,
@@ -9738,7 +9738,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1100 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9780,7 +9780,7 @@ var internals$jscomp$inline_1343 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1344 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10447,7 +10447,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1178 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-5426af3d5-20230411",
version: "18.3.0-next-21021fb0f-20230412",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10502,7 +10502,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-5426af3d5-20230411"
reconcilerVersion: "18.3.0-next-21021fb0f-20230412"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {