@godscene/playground-electron 1.7.11
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/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/es/DeviceInteractionLayer.mjs +383 -0
- package/dist/es/PlaygroundApp.css +207 -0
- package/dist/es/PlaygroundApp.mjs +776 -0
- package/dist/es/PlaygroundPreview.mjs +29 -0
- package/dist/es/PlaygroundThemeProvider.mjs +10 -0
- package/dist/es/PreviewRenderer.mjs +270 -0
- package/dist/es/ScrcpyPanel.mjs +390 -0
- package/dist/es/SessionSetupPanel.css +299 -0
- package/dist/es/SessionSetupPanel.mjs +169 -0
- package/dist/es/components/Header/index.css +19 -0
- package/dist/es/components/Header/index.mjs +37 -0
- package/dist/es/components/Nav/index.css +15 -0
- package/dist/es/components/Nav/index.mjs +93 -0
- package/dist/es/components/WinControlTool/index.css +5 -0
- package/dist/es/components/WinControlTool/index.mjs +76 -0
- package/dist/es/controller/ai-config.mjs +40 -0
- package/dist/es/controller/auto-create.mjs +19 -0
- package/dist/es/controller/selectors.mjs +78 -0
- package/dist/es/controller/single-flight.mjs +13 -0
- package/dist/es/controller/types.mjs +0 -0
- package/dist/es/controller/usePlaygroundController.mjs +400 -0
- package/dist/es/icons/dropdown-chevron.mjs +61 -0
- package/dist/es/icons/midscene-logo.mjs +247 -0
- package/dist/es/icons/server-offline-background.mjs +102 -0
- package/dist/es/icons/server-offline-foreground.mjs +200 -0
- package/dist/es/index.mjs +7 -0
- package/dist/es/manual-interaction.mjs +56 -0
- package/dist/es/panels/PlaygroundConversationPanel.css +20 -0
- package/dist/es/panels/PlaygroundConversationPanel.mjs +140 -0
- package/dist/es/runtime-info.mjs +128 -0
- package/dist/es/scrcpy-preview.mjs +30 -0
- package/dist/es/scrcpy-stream.mjs +53 -0
- package/dist/es/session-setup.mjs +13 -0
- package/dist/es/session-state.mjs +32 -0
- package/dist/es/useServerStatus.mjs +120 -0
- package/dist/lib/DeviceInteractionLayer.js +434 -0
- package/dist/lib/PlaygroundApp.css +207 -0
- package/dist/lib/PlaygroundApp.js +821 -0
- package/dist/lib/PlaygroundPreview.js +63 -0
- package/dist/lib/PlaygroundThemeProvider.js +44 -0
- package/dist/lib/PreviewRenderer.js +304 -0
- package/dist/lib/ScrcpyPanel.js +424 -0
- package/dist/lib/SessionSetupPanel.css +299 -0
- package/dist/lib/SessionSetupPanel.js +217 -0
- package/dist/lib/components/Header/index.css +19 -0
- package/dist/lib/components/Header/index.js +81 -0
- package/dist/lib/components/Nav/index.css +15 -0
- package/dist/lib/components/Nav/index.js +127 -0
- package/dist/lib/components/WinControlTool/index.css +5 -0
- package/dist/lib/components/WinControlTool/index.js +110 -0
- package/dist/lib/controller/ai-config.js +80 -0
- package/dist/lib/controller/auto-create.js +59 -0
- package/dist/lib/controller/selectors.js +115 -0
- package/dist/lib/controller/single-flight.js +47 -0
- package/dist/lib/controller/types.js +18 -0
- package/dist/lib/controller/usePlaygroundController.js +434 -0
- package/dist/lib/icons/dropdown-chevron.js +95 -0
- package/dist/lib/icons/midscene-logo.js +281 -0
- package/dist/lib/icons/server-offline-background.js +136 -0
- package/dist/lib/icons/server-offline-foreground.js +234 -0
- package/dist/lib/index.js +56 -0
- package/dist/lib/manual-interaction.js +90 -0
- package/dist/lib/panels/PlaygroundConversationPanel.css +20 -0
- package/dist/lib/panels/PlaygroundConversationPanel.js +174 -0
- package/dist/lib/runtime-info.js +174 -0
- package/dist/lib/scrcpy-preview.js +79 -0
- package/dist/lib/scrcpy-stream.js +87 -0
- package/dist/lib/session-setup.js +47 -0
- package/dist/lib/session-state.js +69 -0
- package/dist/lib/useServerStatus.js +154 -0
- package/dist/types/DeviceInteractionLayer.d.ts +50 -0
- package/dist/types/PlaygroundApp.d.ts +14 -0
- package/dist/types/PlaygroundPreview.d.ts +22 -0
- package/dist/types/PlaygroundThemeProvider.d.ts +2 -0
- package/dist/types/PreviewRenderer.d.ts +27 -0
- package/dist/types/ScrcpyPanel.d.ts +21 -0
- package/dist/types/SessionSetupPanel.d.ts +16 -0
- package/dist/types/components/Header/index.d.ts +3 -0
- package/dist/types/components/Nav/index.d.ts +3 -0
- package/dist/types/components/WinControlTool/index.d.ts +3 -0
- package/dist/types/controller/ai-config.d.ts +5 -0
- package/dist/types/controller/auto-create.d.ts +15 -0
- package/dist/types/controller/selectors.d.ts +5 -0
- package/dist/types/controller/single-flight.d.ts +3 -0
- package/dist/types/controller/types.d.ts +36 -0
- package/dist/types/controller/usePlaygroundController.d.ts +16 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/manual-interaction.d.ts +21 -0
- package/dist/types/panels/PlaygroundConversationPanel.d.ts +25 -0
- package/dist/types/runtime-info.d.ts +22 -0
- package/dist/types/scrcpy-preview.d.ts +11 -0
- package/dist/types/scrcpy-stream.d.ts +16 -0
- package/dist/types/session-setup.d.ts +2 -0
- package/dist/types/session-state.d.ts +9 -0
- package/dist/types/useServerStatus.d.ts +12 -0
- package/package.json +69 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>server_offline_foreground
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
function _define_property(obj, key, value) {
|
|
32
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
else obj[key] = value;
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
function _object_spread(target) {
|
|
42
|
+
for(var i = 1; i < arguments.length; i++){
|
|
43
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
44
|
+
var ownKeys = Object.keys(source);
|
|
45
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
+
}));
|
|
48
|
+
ownKeys.forEach(function(key) {
|
|
49
|
+
_define_property(target, key, source[key]);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return target;
|
|
53
|
+
}
|
|
54
|
+
function server_offline_foreground_ownKeys(object, enumerableOnly) {
|
|
55
|
+
var keys = Object.keys(object);
|
|
56
|
+
if (Object.getOwnPropertySymbols) {
|
|
57
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
58
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
60
|
+
});
|
|
61
|
+
keys.push.apply(keys, symbols);
|
|
62
|
+
}
|
|
63
|
+
return keys;
|
|
64
|
+
}
|
|
65
|
+
function _object_spread_props(target, source) {
|
|
66
|
+
source = null != source ? source : {};
|
|
67
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
68
|
+
else server_offline_foreground_ownKeys(Object(source)).forEach(function(key) {
|
|
69
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
70
|
+
});
|
|
71
|
+
return target;
|
|
72
|
+
}
|
|
73
|
+
const SvgServerOfflineForeground = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", _object_spread_props(_object_spread({
|
|
74
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75
|
+
width: 178,
|
|
76
|
+
height: 135,
|
|
77
|
+
fill: "none",
|
|
78
|
+
viewBox: "0 0 178 135"
|
|
79
|
+
}, props), {
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("g", {
|
|
82
|
+
filter: "url(#server-offline-foreground_svg__a)",
|
|
83
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
84
|
+
width: 74,
|
|
85
|
+
height: 97.5,
|
|
86
|
+
fill: "url(#server-offline-foreground_svg__b)",
|
|
87
|
+
rx: 12,
|
|
88
|
+
transform: "matrix(.86603 .5 -.86603 .5 99.136 28.5)"
|
|
89
|
+
})
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
92
|
+
width: 78,
|
|
93
|
+
height: 101.5,
|
|
94
|
+
y: -2,
|
|
95
|
+
fill: "url(#server-offline-foreground_svg__c)",
|
|
96
|
+
stroke: "url(#server-offline-foreground_svg__d)",
|
|
97
|
+
strokeWidth: 4,
|
|
98
|
+
rx: 14,
|
|
99
|
+
transform: "matrix(.86603 .5 -.86603 .5 97.404 4)"
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
102
|
+
fill: "url(#server-offline-foreground_svg__e)",
|
|
103
|
+
d: "M78.147 31.404a.9.9 0 0 1 .156-.559c.117-.178.295-.34.524-.478.228-.138.503-.248.806-.322a4 4 0 0 1 .961-.114c.33 0 .657.038.961.113s.578.184.807.322c.23.137.407.3.525.478.117.178.17.368.157.559v3c.014.19-.04.38-.156.559a1.6 1.6 0 0 1-.524.478 3 3 0 0 1-.806.322c-.304.075-.631.114-.961.114s-.657-.038-.961-.113a3 3 0 0 1-.807-.321 1.6 1.6 0 0 1-.525-.479.9.9 0 0 1-.157-.559zm-9.678 8.414c-.632-.015-1.23-.17-1.668-.434s-.682-.615-.682-.98c0-.366.246-.717.684-.98.438-.264 1.036-.42 1.669-.434h5.196c.33-.007.659.024.968.091.308.068.59.17.828.303s.428.29.557.466a.93.93 0 0 1 .196.555.93.93 0 0 1-.197.554c-.13.176-.32.334-.558.466s-.52.235-.829.303a4 4 0 0 1-.968.09zm38.106 11a4 4 0 0 1-.956-.098 3 3 0 0 1-.815-.305 1.7 1.7 0 0 1-.547-.463.93.93 0 0 1-.193-.55c0-.188.066-.375.193-.549s.313-.331.547-.463c.233-.132.511-.235.815-.304.304-.07.629-.102.956-.098h5.196c.327-.004.652.029.956.098s.582.172.815.304c.234.132.42.29.547.463s.193.361.193.55a.93.93 0 0 1-.193.55 1.7 1.7 0 0 1-.547.462 3 3 0 0 1-.815.305 4 4 0 0 1-.956.097zm-9.38 2.585c.017-.369.281-.72.74-.978.457-.258 1.071-.402 1.71-.402.64 0 1.255.144 1.713.402.457.258.722.61.738.978v3a.9.9 0 0 1-.169.552c-.12.176-.299.336-.527.471a3 3 0 0 1-.803.316 4 4 0 0 1-.951.11c-.327 0-.65-.037-.952-.11a3 3 0 0 1-.802-.316 1.6 1.6 0 0 1-.527-.47.9.9 0 0 1-.17-.553zm8.515-18.5c-1.838-1.06-4.33-1.656-6.93-1.656-2.598 0-5.09.596-6.928 1.657l-5.196 3c-.225.14-.495.252-.796.33s-.626.12-.956.123a4 4 0 0 1-.963-.102 3 3 0 0 1-.817-.312 1.7 1.7 0 0 1-.54-.471.9.9 0 0 1-.178-.557.95.95 0 0 1 .215-.551c.135-.174.33-.33.571-.46l5.196-3c2.757-1.591 6.495-2.485 10.393-2.485s7.636.894 10.392 2.485c2.756 1.592 4.305 3.75 4.305 6s-1.549 4.409-4.305 6l-5.196 3a2.9 2.9 0 0 1-.796.33 4.087 4.087 0 0 1-1.919.021 3 3 0 0 1-.817-.311 1.7 1.7 0 0 1-.54-.472.9.9 0 0 1-.177-.556.95.95 0 0 1 .214-.552c.135-.174.33-.33.572-.46l5.196-3c1.837-1.06 2.87-2.5 2.87-4s-1.033-2.94-2.87-4m-29.444 5c.224-.14.494-.252.795-.33s.626-.12.956-.123.657.03.963.102c.306.071.584.177.817.312.234.135.417.295.54.472a.9.9 0 0 1 .178.556.95.95 0 0 1-.215.551c-.135.174-.329.33-.571.46l-5.196 3c-1.838 1.06-2.87 2.5-2.87 4s1.032 2.94 2.87 4c1.838 1.062 4.33 1.658 6.929 1.658s5.091-.596 6.929-1.657l5.196-3c.465-.249 1.079-.384 1.712-.376.633.007 1.238.155 1.686.414.448.258.705.607.717.973s-.221.72-.652.988l-5.196 3c-2.756 1.592-6.494 2.486-10.392 2.486s-7.636-.894-10.392-2.486c-2.757-1.591-4.305-3.75-4.305-6s1.548-4.408 4.305-6z"
|
|
104
|
+
}),
|
|
105
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
106
|
+
fill: "#000",
|
|
107
|
+
d: "m108.005 6.698 3.211-1.854c.954-.55 2.247-.86 3.596-.86s2.642.31 3.596.86c.953.55 1.489 1.297 1.489 2.076 0 .778-.536 1.525-1.489 2.076l-9.589 5.535c-.317.184-.749.287-1.198.287-.45 0-.881-.103-1.199-.287-.317-.183-.496-.432-.496-.692s.179-.508.496-.692l9.589-5.535-2.398-1.384-9.588 5.535c-.953.551-1.489 1.298-1.489 2.076 0 .779.536 1.526 1.489 2.076s2.247.86 3.596.86c1.348 0 2.642-.31 3.595-.86l9.589-5.535c1.589-.918 2.482-2.163 2.482-3.46s-.893-2.543-2.482-3.46c-1.59-.918-3.745-1.433-5.993-1.433s-4.403.515-5.993 1.433l-4.394 2.537z"
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("defs", {
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
|
|
112
|
+
id: "server-offline-foreground_svg__b",
|
|
113
|
+
x1: 37,
|
|
114
|
+
x2: 37,
|
|
115
|
+
y1: 0,
|
|
116
|
+
y2: 97.5,
|
|
117
|
+
gradientUnits: "userSpaceOnUse",
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
120
|
+
stopColor: "#D9D9D9"
|
|
121
|
+
}),
|
|
122
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
123
|
+
offset: 1,
|
|
124
|
+
stopColor: "#E9E9EB"
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
}),
|
|
128
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
|
|
129
|
+
id: "server-offline-foreground_svg__c",
|
|
130
|
+
x1: 37,
|
|
131
|
+
x2: 37,
|
|
132
|
+
y1: 0,
|
|
133
|
+
y2: 97.5,
|
|
134
|
+
gradientUnits: "userSpaceOnUse",
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
137
|
+
stopColor: "#7D7E80"
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
140
|
+
offset: 1,
|
|
141
|
+
stopColor: "#C7C9CC"
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
|
|
146
|
+
id: "server-offline-foreground_svg__d",
|
|
147
|
+
x1: 37,
|
|
148
|
+
x2: 37,
|
|
149
|
+
y1: 0,
|
|
150
|
+
y2: 97.5,
|
|
151
|
+
gradientUnits: "userSpaceOnUse",
|
|
152
|
+
children: [
|
|
153
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
154
|
+
stopColor: "#fff"
|
|
155
|
+
}),
|
|
156
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
157
|
+
offset: 1,
|
|
158
|
+
stopColor: "#fff",
|
|
159
|
+
stopOpacity: 0.2
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
}),
|
|
163
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
|
|
164
|
+
id: "server-offline-foreground_svg__e",
|
|
165
|
+
x1: 72.75,
|
|
166
|
+
x2: 90.111,
|
|
167
|
+
y1: 33.874,
|
|
168
|
+
y2: 63.944,
|
|
169
|
+
gradientUnits: "userSpaceOnUse",
|
|
170
|
+
children: [
|
|
171
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
172
|
+
stopColor: "#fff"
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
|
|
175
|
+
offset: 1,
|
|
176
|
+
stopColor: "#fff",
|
|
177
|
+
stopOpacity: 0.5
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
}),
|
|
181
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("filter", {
|
|
182
|
+
id: "server-offline-foreground_svg__a",
|
|
183
|
+
width: 176.348,
|
|
184
|
+
height: 118.721,
|
|
185
|
+
x: 0.786,
|
|
186
|
+
y: 16.015,
|
|
187
|
+
colorInterpolationFilters: "sRGB",
|
|
188
|
+
filterUnits: "userSpaceOnUse",
|
|
189
|
+
children: [
|
|
190
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feFlood", {
|
|
191
|
+
floodOpacity: 0,
|
|
192
|
+
result: "BackgroundImageFix"
|
|
193
|
+
}),
|
|
194
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feColorMatrix", {
|
|
195
|
+
in: "SourceAlpha",
|
|
196
|
+
result: "hardAlpha",
|
|
197
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
198
|
+
}),
|
|
199
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feOffset", {
|
|
200
|
+
dy: 4
|
|
201
|
+
}),
|
|
202
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feGaussianBlur", {
|
|
203
|
+
stdDeviation: 10
|
|
204
|
+
}),
|
|
205
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feComposite", {
|
|
206
|
+
in2: "hardAlpha",
|
|
207
|
+
operator: "out"
|
|
208
|
+
}),
|
|
209
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feColorMatrix", {
|
|
210
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"
|
|
211
|
+
}),
|
|
212
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feBlend", {
|
|
213
|
+
in2: "BackgroundImageFix",
|
|
214
|
+
result: "effect1_dropShadow_4624_2901"
|
|
215
|
+
}),
|
|
216
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("feBlend", {
|
|
217
|
+
in: "SourceGraphic",
|
|
218
|
+
in2: "effect1_dropShadow_4624_2901",
|
|
219
|
+
result: "shape"
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
})
|
|
225
|
+
]
|
|
226
|
+
}));
|
|
227
|
+
const server_offline_foreground = SvgServerOfflineForeground;
|
|
228
|
+
exports["default"] = __webpack_exports__["default"];
|
|
229
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
230
|
+
"default"
|
|
231
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
232
|
+
Object.defineProperty(exports, '__esModule', {
|
|
233
|
+
value: true
|
|
234
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
usePlaygroundController: ()=>usePlaygroundController_js_namespaceObject.usePlaygroundController,
|
|
28
|
+
DeviceInteractionLayer: ()=>external_DeviceInteractionLayer_js_namespaceObject.DeviceInteractionLayer,
|
|
29
|
+
PlaygroundApp: ()=>external_PlaygroundApp_js_namespaceObject.PlaygroundApp,
|
|
30
|
+
PlaygroundConversationPanel: ()=>PlaygroundConversationPanel_js_namespaceObject.PlaygroundConversationPanel,
|
|
31
|
+
PlaygroundPreview: ()=>external_PlaygroundPreview_js_namespaceObject.PlaygroundPreview,
|
|
32
|
+
PlaygroundThemeProvider: ()=>external_PlaygroundThemeProvider_js_namespaceObject.PlaygroundThemeProvider
|
|
33
|
+
});
|
|
34
|
+
const external_PlaygroundApp_js_namespaceObject = require("./PlaygroundApp.js");
|
|
35
|
+
const external_PlaygroundPreview_js_namespaceObject = require("./PlaygroundPreview.js");
|
|
36
|
+
const external_PlaygroundThemeProvider_js_namespaceObject = require("./PlaygroundThemeProvider.js");
|
|
37
|
+
const external_DeviceInteractionLayer_js_namespaceObject = require("./DeviceInteractionLayer.js");
|
|
38
|
+
const PlaygroundConversationPanel_js_namespaceObject = require("./panels/PlaygroundConversationPanel.js");
|
|
39
|
+
const usePlaygroundController_js_namespaceObject = require("./controller/usePlaygroundController.js");
|
|
40
|
+
exports.DeviceInteractionLayer = __webpack_exports__.DeviceInteractionLayer;
|
|
41
|
+
exports.PlaygroundApp = __webpack_exports__.PlaygroundApp;
|
|
42
|
+
exports.PlaygroundConversationPanel = __webpack_exports__.PlaygroundConversationPanel;
|
|
43
|
+
exports.PlaygroundPreview = __webpack_exports__.PlaygroundPreview;
|
|
44
|
+
exports.PlaygroundThemeProvider = __webpack_exports__.PlaygroundThemeProvider;
|
|
45
|
+
exports.usePlaygroundController = __webpack_exports__.usePlaygroundController;
|
|
46
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
47
|
+
"DeviceInteractionLayer",
|
|
48
|
+
"PlaygroundApp",
|
|
49
|
+
"PlaygroundConversationPanel",
|
|
50
|
+
"PlaygroundPreview",
|
|
51
|
+
"PlaygroundThemeProvider",
|
|
52
|
+
"usePlaygroundController"
|
|
53
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
54
|
+
Object.defineProperty(exports, '__esModule', {
|
|
55
|
+
value: true
|
|
56
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
buildManualDragInteractPayload: ()=>buildManualDragInteractPayload
|
|
28
|
+
});
|
|
29
|
+
function _define_property(obj, key, value) {
|
|
30
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
31
|
+
value: value,
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true
|
|
35
|
+
});
|
|
36
|
+
else obj[key] = value;
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
function _object_spread(target) {
|
|
40
|
+
for(var i = 1; i < arguments.length; i++){
|
|
41
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
42
|
+
var ownKeys = Object.keys(source);
|
|
43
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
45
|
+
}));
|
|
46
|
+
ownKeys.forEach(function(key) {
|
|
47
|
+
_define_property(target, key, source[key]);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
52
|
+
function ownKeys(object, enumerableOnly) {
|
|
53
|
+
var keys = Object.keys(object);
|
|
54
|
+
if (Object.getOwnPropertySymbols) {
|
|
55
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
56
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
58
|
+
});
|
|
59
|
+
keys.push.apply(keys, symbols);
|
|
60
|
+
}
|
|
61
|
+
return keys;
|
|
62
|
+
}
|
|
63
|
+
function _object_spread_props(target, source) {
|
|
64
|
+
source = null != source ? source : {};
|
|
65
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
66
|
+
else ownKeys(Object(source)).forEach(function(key) {
|
|
67
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
68
|
+
});
|
|
69
|
+
return target;
|
|
70
|
+
}
|
|
71
|
+
function buildManualDragInteractPayload(actionType, start, end, duration) {
|
|
72
|
+
const basePayload = {
|
|
73
|
+
actionType,
|
|
74
|
+
x: start.x,
|
|
75
|
+
y: start.y,
|
|
76
|
+
endX: end.x,
|
|
77
|
+
endY: end.y
|
|
78
|
+
};
|
|
79
|
+
if ('DragAndDrop' === actionType) return basePayload;
|
|
80
|
+
return _object_spread_props(_object_spread({}, basePayload), {
|
|
81
|
+
duration
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
exports.buildManualDragInteractPayload = __webpack_exports__.buildManualDragInteractPayload;
|
|
85
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
86
|
+
"buildManualDragInteractPayload"
|
|
87
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
88
|
+
Object.defineProperty(exports, '__esModule', {
|
|
89
|
+
value: true
|
|
90
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.playground-conversation-panel, .playground-conversation-body {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
flex: 1;
|
|
4
|
+
min-height: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.playground-conversation-body > .playground-container {
|
|
9
|
+
flex: 1;
|
|
10
|
+
min-height: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.playground-conversation-offline {
|
|
14
|
+
flex: 1;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: 24px;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
PlaygroundConversationPanel: ()=>PlaygroundConversationPanel
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const visualizer_namespaceObject = require("@godscene/visualizer");
|
|
31
|
+
const external_antd_namespaceObject = require("antd");
|
|
32
|
+
const external_SessionSetupPanel_js_namespaceObject = require("../SessionSetupPanel.js");
|
|
33
|
+
const selectors_js_namespaceObject = require("../controller/selectors.js");
|
|
34
|
+
require("./PlaygroundConversationPanel.css");
|
|
35
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
36
|
+
try {
|
|
37
|
+
var info = gen[key](arg);
|
|
38
|
+
var value = info.value;
|
|
39
|
+
} catch (error) {
|
|
40
|
+
reject(error);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (info.done) resolve(value);
|
|
44
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
45
|
+
}
|
|
46
|
+
function _async_to_generator(fn) {
|
|
47
|
+
return function() {
|
|
48
|
+
var self = this, args = arguments;
|
|
49
|
+
return new Promise(function(resolve, reject) {
|
|
50
|
+
var gen = fn.apply(self, args);
|
|
51
|
+
function _next(value) {
|
|
52
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
53
|
+
}
|
|
54
|
+
function _throw(err) {
|
|
55
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
56
|
+
}
|
|
57
|
+
_next(void 0);
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const PLAYGROUND_CONVERSATION_SKIN_CLASS = 'playground-conversation-skin';
|
|
62
|
+
function PlaygroundConversationPanel({ controller, appVersion, title = 'Playground', branding, playgroundConfig, header, className, playgroundClassName, notConnectedFallback, onHumanUse }) {
|
|
63
|
+
const { state, actions } = controller;
|
|
64
|
+
const mergedConfig = (0, selectors_js_namespaceObject.buildConversationConfig)(state, playgroundConfig);
|
|
65
|
+
const mergedBranding = (0, selectors_js_namespaceObject.buildConversationBranding)(state.runtimeInfo, title, appVersion, state.deviceType, branding);
|
|
66
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
67
|
+
className: [
|
|
68
|
+
'playground-conversation-panel',
|
|
69
|
+
className
|
|
70
|
+
].filter(Boolean).join(' '),
|
|
71
|
+
children: [
|
|
72
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Modal, {
|
|
73
|
+
open: null !== state.countdown,
|
|
74
|
+
footer: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
75
|
+
onClick: actions.finishCountdown,
|
|
76
|
+
type: "default",
|
|
77
|
+
children: "Skip countdown"
|
|
78
|
+
}),
|
|
79
|
+
closable: true,
|
|
80
|
+
maskClosable: true,
|
|
81
|
+
onCancel: actions.finishCountdown,
|
|
82
|
+
centered: true,
|
|
83
|
+
width: 400,
|
|
84
|
+
style: {
|
|
85
|
+
top: '30%'
|
|
86
|
+
},
|
|
87
|
+
styles: {
|
|
88
|
+
mask: {
|
|
89
|
+
backgroundColor: 'rgba(0, 0, 0, 0.75)'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
93
|
+
style: {
|
|
94
|
+
textAlign: 'center',
|
|
95
|
+
padding: '40px 20px'
|
|
96
|
+
},
|
|
97
|
+
children: [
|
|
98
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
99
|
+
style: {
|
|
100
|
+
fontSize: '72px',
|
|
101
|
+
fontWeight: 'bold',
|
|
102
|
+
color: 'GO!' === state.countdown ? '#52c41a' : '#1890ff',
|
|
103
|
+
marginBottom: '24px',
|
|
104
|
+
lineHeight: 1
|
|
105
|
+
},
|
|
106
|
+
children: state.countdown
|
|
107
|
+
}),
|
|
108
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
109
|
+
style: {
|
|
110
|
+
fontSize: '18px',
|
|
111
|
+
fontWeight: 500,
|
|
112
|
+
marginBottom: '12px'
|
|
113
|
+
},
|
|
114
|
+
children: "Automation Starting Soon"
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
117
|
+
style: {
|
|
118
|
+
fontSize: '14px',
|
|
119
|
+
color: 'rgba(0, 0, 0, 0.65)'
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
"The selected session requested a countdown before execution.",
|
|
123
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
124
|
+
"Please wait until the run starts."
|
|
125
|
+
]
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
header,
|
|
131
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
132
|
+
className: "playground-conversation-body",
|
|
133
|
+
children: state.serverOnline ? state.sessionViewState.connected ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(visualizer_namespaceObject.UniversalPlayground, {
|
|
134
|
+
onHumanUse: onHumanUse,
|
|
135
|
+
playgroundSDK: state.playgroundSDK,
|
|
136
|
+
config: mergedConfig,
|
|
137
|
+
branding: mergedBranding,
|
|
138
|
+
className: [
|
|
139
|
+
'playground-container',
|
|
140
|
+
PLAYGROUND_CONVERSATION_SKIN_CLASS,
|
|
141
|
+
playgroundClassName
|
|
142
|
+
].filter(Boolean).join(' ')
|
|
143
|
+
}) : void 0 !== notConnectedFallback ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
144
|
+
children: notConnectedFallback
|
|
145
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_SessionSetupPanel_js_namespaceObject.SessionSetupPanel, {
|
|
146
|
+
form: state.form,
|
|
147
|
+
sessionSetup: state.sessionSetup,
|
|
148
|
+
sessionSetupError: state.sessionSetupError,
|
|
149
|
+
sessionViewState: state.sessionViewState,
|
|
150
|
+
sessionLoading: state.sessionLoading,
|
|
151
|
+
sessionMutating: state.sessionMutating,
|
|
152
|
+
onCreateSession: ()=>_async_to_generator(function*() {
|
|
153
|
+
yield actions.createSession();
|
|
154
|
+
})()
|
|
155
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
156
|
+
className: "playground-conversation-offline",
|
|
157
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
158
|
+
type: "warning",
|
|
159
|
+
showIcon: true,
|
|
160
|
+
message: "Playground server offline",
|
|
161
|
+
description: "Reconnect the runtime to continue using the Android playground."
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
exports.PlaygroundConversationPanel = __webpack_exports__.PlaygroundConversationPanel;
|
|
169
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
170
|
+
"PlaygroundConversationPanel"
|
|
171
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
172
|
+
Object.defineProperty(exports, '__esModule', {
|
|
173
|
+
value: true
|
|
174
|
+
});
|