@refinedev/devtools 1.1.34 → 1.1.36
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/components/devtools-pin.d.cts +9 -0
- package/dist/components/devtools-pin.d.cts.map +1 -0
- package/dist/components/devtools-pin.d.mts +9 -0
- package/dist/components/devtools-pin.d.mts.map +1 -0
- package/dist/components/devtools-pin.d.ts +1 -1
- package/dist/components/devtools-pin.d.ts.map +1 -1
- package/dist/components/devtools-selector.d.cts +10 -0
- package/dist/components/devtools-selector.d.cts.map +1 -0
- package/dist/components/devtools-selector.d.mts +10 -0
- package/dist/components/devtools-selector.d.mts.map +1 -0
- package/dist/components/devtools-selector.d.ts +1 -1
- package/dist/components/devtools-selector.d.ts.map +1 -1
- package/dist/components/icons/arrow-union-icon.d.cts +3 -0
- package/dist/components/icons/arrow-union-icon.d.cts.map +1 -0
- package/dist/components/icons/arrow-union-icon.d.mts +3 -0
- package/dist/components/icons/arrow-union-icon.d.mts.map +1 -0
- package/dist/components/icons/devtools-icon.d.cts +3 -0
- package/dist/components/icons/devtools-icon.d.cts.map +1 -0
- package/dist/components/icons/devtools-icon.d.mts +3 -0
- package/dist/components/icons/devtools-icon.d.mts.map +1 -0
- package/dist/components/icons/resize-handle-icon.d.cts +3 -0
- package/dist/components/icons/resize-handle-icon.d.cts.map +1 -0
- package/dist/components/icons/resize-handle-icon.d.mts +3 -0
- package/dist/components/icons/resize-handle-icon.d.mts.map +1 -0
- package/dist/components/icons/selector-button.d.cts +3 -0
- package/dist/components/icons/selector-button.d.cts.map +1 -0
- package/dist/components/icons/selector-button.d.mts +3 -0
- package/dist/components/icons/selector-button.d.mts.map +1 -0
- package/dist/components/resizable-pane.d.cts +19 -0
- package/dist/components/resizable-pane.d.cts.map +1 -0
- package/dist/components/resizable-pane.d.mts +19 -0
- package/dist/components/resizable-pane.d.mts.map +1 -0
- package/dist/components/resizable-pane.d.ts +1 -1
- package/dist/components/resizable-pane.d.ts.map +1 -1
- package/dist/components/selector-box.d.cts +8 -0
- package/dist/components/selector-box.d.cts.map +1 -0
- package/dist/components/selector-box.d.mts +8 -0
- package/dist/components/selector-box.d.mts.map +1 -0
- package/dist/components/selector-box.d.ts.map +1 -1
- package/dist/components/selector-hint.d.cts +4 -0
- package/dist/components/selector-hint.d.cts.map +1 -0
- package/dist/components/selector-hint.d.mts +4 -0
- package/dist/components/selector-hint.d.mts.map +1 -0
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces/placement.d.cts +2 -0
- package/dist/interfaces/placement.d.cts.map +1 -0
- package/dist/interfaces/placement.d.mts +2 -0
- package/dist/interfaces/placement.d.mts.map +1 -0
- package/dist/interfaces/placement.d.ts +1 -1
- package/dist/interfaces/placement.d.ts.map +1 -1
- package/dist/panel.d.cts +2 -0
- package/dist/panel.d.cts.map +1 -0
- package/dist/panel.d.mts +2 -0
- package/dist/panel.d.mts.map +1 -0
- package/dist/panel.d.ts.map +1 -1
- package/dist/provider.d.cts +3 -0
- package/dist/provider.d.cts.map +1 -0
- package/dist/provider.d.mts +3 -0
- package/dist/provider.d.mts.map +1 -0
- package/dist/provider.d.ts.map +1 -1
- package/dist/utilities/index.d.cts +37 -0
- package/dist/utilities/index.d.cts.map +1 -0
- package/dist/utilities/index.d.mts +37 -0
- package/dist/utilities/index.d.mts.map +1 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/use-selector.d.cts +10 -0
- package/dist/utilities/use-selector.d.cts.map +1 -0
- package/dist/utilities/use-selector.d.mts +10 -0
- package/dist/utilities/use-selector.d.mts.map +1 -0
- package/dist/utilities/use-selector.d.ts.map +1 -1
- package/package.json +25 -11
- package/src/components/devtools-pin.tsx +51 -51
- package/src/components/devtools-selector.tsx +85 -88
- package/src/components/icons/arrow-union-icon.tsx +28 -28
- package/src/components/icons/devtools-icon.tsx +30 -30
- package/src/components/icons/resize-handle-icon.tsx +23 -23
- package/src/components/icons/selector-button.tsx +15 -15
- package/src/components/resizable-pane.tsx +245 -245
- package/src/components/selector-box.tsx +94 -94
- package/src/components/selector-hint.tsx +53 -53
- package/src/panel.tsx +86 -90
- package/src/provider.tsx +5 -7
- package/src/utilities/index.ts +88 -89
- package/src/utilities/use-selector.tsx +218 -228
- package/dist/esm/index.js +0 -9
- package/dist/esm/index.js.map +0 -1
- package/dist/iife/index.js +0 -9
- package/dist/iife/index.js.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
|
@@ -5,103 +5,103 @@ const Y_OFFSET = 38;
|
|
|
5
5
|
const X_OFFSET = 7;
|
|
6
6
|
|
|
7
7
|
export const SelectorBox = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
width,
|
|
9
|
+
height,
|
|
10
|
+
x,
|
|
11
|
+
y,
|
|
12
|
+
name,
|
|
13
13
|
}: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
name: string;
|
|
19
19
|
}) => {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const namePosition =
|
|
21
|
+
y > Y_OFFSET ? "top" : height > 3 * Y_OFFSET ? "inset" : "bottom";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
const outlinePosition = x > X_OFFSET && y > X_OFFSET ? "outside" : "inside";
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
id="selector-box"
|
|
28
|
+
style={{
|
|
29
|
+
pointerEvents: "none",
|
|
30
|
+
position: "fixed",
|
|
31
|
+
opacity: name ? 1 : 0,
|
|
32
|
+
transitionProperty: "width, height, transform, opacity",
|
|
33
|
+
transitionDuration: "0.15s",
|
|
34
|
+
transitionTimingFunction: "ease-out",
|
|
35
|
+
border: "1.5px solid #47EBEB",
|
|
36
|
+
borderRadius: "4px",
|
|
37
|
+
background: "rgba(37,160,160, 0.25)",
|
|
38
|
+
backdropFilter: "sepia(30%) hue-rotate(180deg)",
|
|
39
|
+
zIndex: 99998,
|
|
40
|
+
...(outlinePosition === "outside"
|
|
41
|
+
? {
|
|
42
|
+
left: -6,
|
|
43
|
+
top: -6,
|
|
44
|
+
width: width + 10,
|
|
45
|
+
height: height + 10,
|
|
46
|
+
transform: `translate(${x}px, ${y}px)`,
|
|
47
|
+
}
|
|
48
|
+
: {
|
|
49
|
+
left: 0,
|
|
50
|
+
top: 0,
|
|
51
|
+
width: width - 10,
|
|
52
|
+
height: height - 20,
|
|
53
|
+
transform: `translate(${x + 4}px, ${y + 4}px)`,
|
|
54
|
+
}),
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
style={{
|
|
59
|
+
position: "absolute",
|
|
60
|
+
left: "-1.5px",
|
|
61
|
+
background: "#303450",
|
|
62
|
+
border: "1px solid #474E6B",
|
|
63
|
+
borderRadius: "4px",
|
|
64
|
+
padding: "8px 12px",
|
|
65
|
+
fontSize: "12px",
|
|
66
|
+
lineHeight: "16px",
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
color: "#ffffff",
|
|
69
|
+
display: name ? "block" : "none",
|
|
70
|
+
...(namePosition === "top" && {
|
|
71
|
+
top: "-38px",
|
|
72
|
+
}),
|
|
73
|
+
...(namePosition === "bottom" && {
|
|
74
|
+
bottom: "-38px",
|
|
75
|
+
}),
|
|
76
|
+
...(namePosition === "inset" && {
|
|
77
|
+
top: "4px",
|
|
78
|
+
left: "8px",
|
|
79
|
+
}),
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
{name}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
84
|
+
<ArrowUnionIcon
|
|
85
|
+
style={{
|
|
86
|
+
position: "absolute",
|
|
87
|
+
left: "30%",
|
|
88
|
+
...(namePosition === "top" && {
|
|
89
|
+
transform: "translateX(-50%) rotate(180deg)",
|
|
90
|
+
bottom: "-9px",
|
|
91
|
+
}),
|
|
92
|
+
...(namePosition === "bottom" && {
|
|
93
|
+
transform: "translateX(-50%) ",
|
|
94
|
+
top: "-9px",
|
|
95
|
+
}),
|
|
96
|
+
...(namePosition === "inset" && {
|
|
97
|
+
transform: "translateX(-50%) rotate(-90deg)",
|
|
98
|
+
top: "8px",
|
|
99
|
+
left: "-1px",
|
|
100
|
+
}),
|
|
101
|
+
display: name ? "block" : "none",
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
107
|
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
export const SelectorHint = ({ active }: { active: boolean }) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
style={{
|
|
7
|
+
color: "white",
|
|
8
|
+
pointerEvents: "none",
|
|
9
|
+
position: "absolute",
|
|
10
|
+
left: "calc(-50% - 144px - 14px)",
|
|
11
|
+
top: "-36px",
|
|
12
|
+
width: "max-content",
|
|
13
|
+
borderRadius: "8px",
|
|
14
|
+
backgroundColor: "#40414A",
|
|
15
|
+
opacity: active ? 1 : 0,
|
|
16
|
+
transitionDuration: "0.2s",
|
|
17
|
+
transitionProperty: "transform,opacity",
|
|
18
|
+
transitionTimingFunction: "ease-in-out",
|
|
19
|
+
padding: "8px",
|
|
20
|
+
fontSize: "12px",
|
|
21
|
+
lineHeight: "12px",
|
|
22
|
+
fontWeight: 400,
|
|
23
|
+
textShadow:
|
|
24
|
+
"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30",
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
<kbd
|
|
28
|
+
style={{
|
|
29
|
+
marginLeft: "4px",
|
|
30
|
+
padding: "2px 4px",
|
|
31
|
+
borderRadius: "2px",
|
|
32
|
+
background: "#1D1E30",
|
|
33
|
+
color: "#CFD7E2",
|
|
34
|
+
border: "none",
|
|
35
|
+
textShadow: "none",
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
shift
|
|
39
|
+
</kbd>{" "}
|
|
40
|
+
to move to parent.
|
|
41
|
+
<kbd
|
|
42
|
+
style={{
|
|
43
|
+
marginLeft: "4px",
|
|
44
|
+
padding: "2px 4px",
|
|
45
|
+
borderRadius: "2px",
|
|
46
|
+
background: "#1D1E30",
|
|
47
|
+
color: "#CFD7E2",
|
|
48
|
+
border: "none",
|
|
49
|
+
textShadow: "none",
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
space
|
|
53
|
+
</kbd>{" "}
|
|
54
|
+
to highlight in monitor.
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
57
|
};
|
package/src/panel.tsx
CHANGED
|
@@ -3,114 +3,110 @@ import { DevtoolsPin } from "./components/devtools-pin";
|
|
|
3
3
|
import { ResizablePane } from "./components/resizable-pane";
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
DevToolsContext,
|
|
7
|
+
DevtoolsEvent,
|
|
8
|
+
send,
|
|
9
9
|
} from "@refinedev/devtools-shared";
|
|
10
10
|
|
|
11
11
|
import { Placement } from "./interfaces/placement";
|
|
12
12
|
|
|
13
13
|
export const DevtoolsPanel =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
__DEV_CONDITION__ !== "development"
|
|
15
|
+
? () => null
|
|
16
|
+
: () => {
|
|
17
|
+
const [browser, setBrowser] = React.useState<boolean>(false);
|
|
18
|
+
const [visible, setVisible] = React.useState(false);
|
|
19
|
+
const [placement] = React.useState<Placement>("bottom");
|
|
20
|
+
const { devtoolsUrl, ws } = React.useContext(DevToolsContext);
|
|
21
|
+
const [width, setWidth] = React.useState<number>(0);
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setVisible(true);
|
|
35
|
-
},
|
|
36
|
-
[ws],
|
|
37
|
-
);
|
|
23
|
+
const onSelectorHighlight = React.useCallback(
|
|
24
|
+
(name: string) => {
|
|
25
|
+
if (ws) {
|
|
26
|
+
send(ws, DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR, {
|
|
27
|
+
name,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
setVisible(true);
|
|
31
|
+
},
|
|
32
|
+
[ws],
|
|
33
|
+
);
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
const onSelectorOpen = React.useCallback(() => {
|
|
36
|
+
setVisible(false);
|
|
37
|
+
}, []);
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
if (typeof window !== "undefined") {
|
|
41
|
+
setBrowser(true);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (browser) {
|
|
47
|
+
// set width by window size dynamically
|
|
48
|
+
setWidth(window.innerWidth);
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
const onResize = () => {
|
|
51
|
+
setWidth(window.innerWidth);
|
|
52
|
+
};
|
|
57
53
|
|
|
58
|
-
|
|
54
|
+
window.addEventListener("resize", onResize);
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
return () => {
|
|
57
|
+
window.removeEventListener("resize", onResize);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
return () => undefined;
|
|
62
|
+
}, [browser]);
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
if (!browser) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
style={{
|
|
71
|
+
position: "fixed",
|
|
72
|
+
left: `${Math.round(width / 2)}px`,
|
|
73
|
+
transform: "translateX(-50%)",
|
|
74
|
+
bottom: 0,
|
|
75
|
+
zIndex: 99999,
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<DevtoolsPin
|
|
79
|
+
onClick={() => setVisible((v) => !v)}
|
|
80
|
+
onSelectorHighlight={onSelectorHighlight}
|
|
81
|
+
onSelectorOpen={onSelectorOpen}
|
|
82
|
+
/>
|
|
83
|
+
<ResizablePane visible={visible} placement={placement}>
|
|
84
|
+
{({ resizing }) => (
|
|
85
|
+
<iframe
|
|
86
|
+
allow="clipboard-write;"
|
|
87
|
+
src={devtoolsUrl}
|
|
88
|
+
srcDoc={
|
|
89
|
+
devtoolsUrl
|
|
90
|
+
? undefined
|
|
91
|
+
: `
|
|
96
92
|
<html style="height:100%;padding:0;margin:0;">
|
|
97
93
|
<body style="display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;">
|
|
98
94
|
<h1 style="font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;">Could not connect to the devtools server</h1>
|
|
99
95
|
</body>
|
|
100
96
|
</html>
|
|
101
97
|
`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
98
|
+
}
|
|
99
|
+
style={{
|
|
100
|
+
width: "100%",
|
|
101
|
+
height: "100%",
|
|
102
|
+
border: "none",
|
|
103
|
+
borderRadius: "7px",
|
|
104
|
+
pointerEvents: resizing ? "none" : "auto",
|
|
105
|
+
background: "#14141F",
|
|
106
|
+
}}
|
|
107
|
+
/>
|
|
108
|
+
)}
|
|
109
|
+
</ResizablePane>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
};
|
package/src/provider.tsx
CHANGED
|
@@ -2,10 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { DevToolsContextProvider } from "@refinedev/devtools-shared";
|
|
3
3
|
|
|
4
4
|
export const DevtoolsProvider =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
);
|
|
11
|
-
};
|
|
5
|
+
__DEV_CONDITION__ !== "development"
|
|
6
|
+
? ({ children }: React.PropsWithChildren) => children as any
|
|
7
|
+
: ({ children }: React.PropsWithChildren) => {
|
|
8
|
+
return <DevToolsContextProvider>{children}</DevToolsContextProvider>;
|
|
9
|
+
};
|