@godscene/playground-electron 1.7.12 → 1.7.14
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.
|
@@ -45,7 +45,6 @@ h3 {
|
|
|
45
45
|
.app-panel.right-panel {
|
|
46
46
|
border-radius: 0;
|
|
47
47
|
flex: 1;
|
|
48
|
-
padding-top: 16px;
|
|
49
48
|
overflow: hidden;
|
|
50
49
|
box-shadow: -4px 0 20px rgba(0, 0, 0, .04);
|
|
51
50
|
}
|
|
@@ -101,7 +100,6 @@ h3 {
|
|
|
101
100
|
.panel-content.right-panel-content {
|
|
102
101
|
border-radius: 0;
|
|
103
102
|
flex-direction: column;
|
|
104
|
-
padding: 0 24px 24px;
|
|
105
103
|
display: flex;
|
|
106
104
|
overflow: hidden;
|
|
107
105
|
}
|
|
@@ -81,7 +81,7 @@ function _object_spread_props(target, source) {
|
|
|
81
81
|
return target;
|
|
82
82
|
}
|
|
83
83
|
const { Content } = Layout;
|
|
84
|
-
function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDeviceType = 'web', branding, playgroundConfig, offlineTitle = '
|
|
84
|
+
function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDeviceType = 'web', branding, playgroundConfig, offlineTitle = '', offlineStatusText = 'Server offline...', pollIntervalMs = 5000 }) {
|
|
85
85
|
var _playgroundConfig_executionUx;
|
|
86
86
|
const [isNarrowScreen, setIsNarrowScreen] = useState(false);
|
|
87
87
|
const controller = usePlaygroundController({
|
|
@@ -153,17 +153,14 @@ function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDev
|
|
|
153
153
|
};
|
|
154
154
|
}, []);
|
|
155
155
|
useEffect(()=>{
|
|
156
|
-
console.log(!!viewRef.current, 'viewRef.current');
|
|
157
156
|
const resizeObserver = new ResizeObserver((entries)=>{
|
|
158
157
|
for (let entry of entries){
|
|
159
158
|
var _window_electron;
|
|
160
|
-
console.log(entry.contentRect.width, entry.contentRect.height, 'entry.contentRect.width, entry.contentRect.height');
|
|
161
159
|
null == (_window_electron = window.electron) || _window_electron.ipcRenderer.send('playgroundViewer:resize', entry.contentRect.width, entry.contentRect.height);
|
|
162
160
|
}
|
|
163
161
|
});
|
|
164
162
|
if (viewRef.current) {
|
|
165
163
|
var _window_electron;
|
|
166
|
-
console.log(viewRef.current.clientWidth, viewRef.current.clientHeight, 'viewRef.current.clientWidth, viewRef.current.clientHeight');
|
|
167
164
|
null == (_window_electron = window.electron) || _window_electron.ipcRenderer.send('playgroundViewer:resize', viewRef.current.clientWidth, viewRef.current.clientHeight);
|
|
168
165
|
resizeObserver.observe(viewRef.current);
|
|
169
166
|
}
|
|
@@ -708,10 +705,7 @@ function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDev
|
|
|
708
705
|
className: "screenshot-viewer offline",
|
|
709
706
|
ref: viewRef,
|
|
710
707
|
children: /*#__PURE__*/ jsx("div", {
|
|
711
|
-
className: "screenshot-placeholder"
|
|
712
|
-
children: /*#__PURE__*/ jsx("h3", {
|
|
713
|
-
children: "Screen Preview"
|
|
714
|
-
})
|
|
708
|
+
className: "screenshot-placeholder"
|
|
715
709
|
})
|
|
716
710
|
})
|
|
717
711
|
]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Alert, Form, Input, InputNumber, Radio, Select } from "antd";
|
|
3
3
|
import dropdown_chevron from "./icons/dropdown-chevron.mjs";
|
|
4
|
-
import midscene_logo from "./icons/midscene-logo.mjs";
|
|
5
4
|
import "./SessionSetupPanel.css";
|
|
6
5
|
function getPlatformSelectorFieldKey(setup) {
|
|
7
6
|
var _setup_platformSelector;
|
|
@@ -100,10 +99,6 @@ function SessionSetupPanel({ form, sessionSetup, sessionSetupError, sessionViewS
|
|
|
100
99
|
children: /*#__PURE__*/ jsxs("div", {
|
|
101
100
|
className: "session-setup-card",
|
|
102
101
|
children: [
|
|
103
|
-
/*#__PURE__*/ jsx(midscene_logo, {
|
|
104
|
-
"aria-hidden": "true",
|
|
105
|
-
className: "session-setup-logo"
|
|
106
|
-
}),
|
|
107
102
|
/*#__PURE__*/ jsx("h1", {
|
|
108
103
|
className: "session-setup-title",
|
|
109
104
|
children: title
|
|
@@ -45,7 +45,6 @@ h3 {
|
|
|
45
45
|
.app-panel.right-panel {
|
|
46
46
|
border-radius: 0;
|
|
47
47
|
flex: 1;
|
|
48
|
-
padding-top: 16px;
|
|
49
48
|
overflow: hidden;
|
|
50
49
|
box-shadow: -4px 0 20px rgba(0, 0, 0, .04);
|
|
51
50
|
}
|
|
@@ -101,7 +100,6 @@ h3 {
|
|
|
101
100
|
.panel-content.right-panel-content {
|
|
102
101
|
border-radius: 0;
|
|
103
102
|
flex-direction: column;
|
|
104
|
-
padding: 0 24px 24px;
|
|
105
103
|
display: flex;
|
|
106
104
|
overflow: hidden;
|
|
107
105
|
}
|
|
@@ -120,7 +120,7 @@ function _object_spread_props(target, source) {
|
|
|
120
120
|
return target;
|
|
121
121
|
}
|
|
122
122
|
const { Content } = external_antd_namespaceObject.Layout;
|
|
123
|
-
function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDeviceType = 'web', branding, playgroundConfig, offlineTitle = '
|
|
123
|
+
function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDeviceType = 'web', branding, playgroundConfig, offlineTitle = '', offlineStatusText = 'Server offline...', pollIntervalMs = 5000 }) {
|
|
124
124
|
var _playgroundConfig_executionUx;
|
|
125
125
|
const [isNarrowScreen, setIsNarrowScreen] = (0, external_react_namespaceObject.useState)(false);
|
|
126
126
|
const controller = (0, usePlaygroundController_js_namespaceObject.usePlaygroundController)({
|
|
@@ -192,17 +192,14 @@ function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDev
|
|
|
192
192
|
};
|
|
193
193
|
}, []);
|
|
194
194
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
195
|
-
console.log(!!viewRef.current, 'viewRef.current');
|
|
196
195
|
const resizeObserver = new ResizeObserver((entries)=>{
|
|
197
196
|
for (let entry of entries){
|
|
198
197
|
var _window_electron;
|
|
199
|
-
console.log(entry.contentRect.width, entry.contentRect.height, 'entry.contentRect.width, entry.contentRect.height');
|
|
200
198
|
null == (_window_electron = window.electron) || _window_electron.ipcRenderer.send('playgroundViewer:resize', entry.contentRect.width, entry.contentRect.height);
|
|
201
199
|
}
|
|
202
200
|
});
|
|
203
201
|
if (viewRef.current) {
|
|
204
202
|
var _window_electron;
|
|
205
|
-
console.log(viewRef.current.clientWidth, viewRef.current.clientHeight, 'viewRef.current.clientWidth, viewRef.current.clientHeight');
|
|
206
203
|
null == (_window_electron = window.electron) || _window_electron.ipcRenderer.send('playgroundViewer:resize', viewRef.current.clientWidth, viewRef.current.clientHeight);
|
|
207
204
|
resizeObserver.observe(viewRef.current);
|
|
208
205
|
}
|
|
@@ -747,10 +744,7 @@ function PlaygroundApp({ serverUrl, appVersion, title = 'Playground', defaultDev
|
|
|
747
744
|
className: "screenshot-viewer offline",
|
|
748
745
|
ref: viewRef,
|
|
749
746
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
750
|
-
className: "screenshot-placeholder"
|
|
751
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
752
|
-
children: "Screen Preview"
|
|
753
|
-
})
|
|
747
|
+
className: "screenshot-placeholder"
|
|
754
748
|
})
|
|
755
749
|
})
|
|
756
750
|
]
|
|
@@ -40,8 +40,6 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
40
40
|
const external_antd_namespaceObject = require("antd");
|
|
41
41
|
const dropdown_chevron_js_namespaceObject = require("./icons/dropdown-chevron.js");
|
|
42
42
|
var dropdown_chevron_js_default = /*#__PURE__*/ __webpack_require__.n(dropdown_chevron_js_namespaceObject);
|
|
43
|
-
const midscene_logo_js_namespaceObject = require("./icons/midscene-logo.js");
|
|
44
|
-
var midscene_logo_js_default = /*#__PURE__*/ __webpack_require__.n(midscene_logo_js_namespaceObject);
|
|
45
43
|
require("./SessionSetupPanel.css");
|
|
46
44
|
function getPlatformSelectorFieldKey(setup) {
|
|
47
45
|
var _setup_platformSelector;
|
|
@@ -140,10 +138,6 @@ function SessionSetupPanel({ form, sessionSetup, sessionSetupError, sessionViewS
|
|
|
140
138
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
141
139
|
className: "session-setup-card",
|
|
142
140
|
children: [
|
|
143
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(midscene_logo_js_default(), {
|
|
144
|
-
"aria-hidden": "true",
|
|
145
|
-
className: "session-setup-logo"
|
|
146
|
-
}),
|
|
147
141
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
148
142
|
className: "session-setup-title",
|
|
149
143
|
children: title
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godscene/playground-electron",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.14",
|
|
4
4
|
"description": "Reusable React shell for Midscene playground applications",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"antd": "^5.21.6",
|
|
30
30
|
"react-resizable-panels": "2.0.22",
|
|
31
31
|
"socket.io-client": "4.8.1",
|
|
32
|
-
"@godscene/playground": "1.7.
|
|
33
|
-
"@godscene/
|
|
34
|
-
"@godscene/
|
|
32
|
+
"@godscene/playground": "1.7.14",
|
|
33
|
+
"@godscene/shared": "1.7.14",
|
|
34
|
+
"@godscene/visualizer": "1.7.14"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rsbuild/plugin-less": "^1.5.0",
|