@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,299 @@
|
|
|
1
|
+
.session-setup-panel {
|
|
2
|
+
overscroll-behavior: contain;
|
|
3
|
+
scrollbar-gutter: stable;
|
|
4
|
+
background: var(--midscene-surface, #fff);
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
flex: 1;
|
|
7
|
+
justify-content: flex-start;
|
|
8
|
+
align-items: center;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
padding: 0 56px 32px;
|
|
11
|
+
display: flex;
|
|
12
|
+
overflow-x: hidden;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.session-setup-card {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
align-items: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
max-width: 288px;
|
|
22
|
+
margin-top: max(32px, min(10vh, 96px));
|
|
23
|
+
padding-bottom: 32px;
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.session-setup-logo {
|
|
28
|
+
object-fit: contain;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
width: 51px;
|
|
31
|
+
height: 48px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.session-setup-title {
|
|
35
|
+
width: 240px;
|
|
36
|
+
color: var(--midscene-text-primary, #000);
|
|
37
|
+
text-align: center;
|
|
38
|
+
white-space: pre-line;
|
|
39
|
+
margin: 16px 0 0;
|
|
40
|
+
font-family: Roboto, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
41
|
+
font-size: 18px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
line-height: 22px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.session-setup-description {
|
|
47
|
+
width: 276px;
|
|
48
|
+
color: var(--midscene-text-secondary, rgba(0, 0, 0, .7));
|
|
49
|
+
text-align: center;
|
|
50
|
+
margin: 14.7px 0 0;
|
|
51
|
+
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
line-height: 20px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.session-setup-alert.ant-alert {
|
|
58
|
+
width: 100%;
|
|
59
|
+
margin-top: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.session-setup-form {
|
|
63
|
+
width: 100%;
|
|
64
|
+
margin-top: 24px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.session-setup-form .ant-form-item {
|
|
68
|
+
margin-bottom: 16px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.session-setup-form .ant-form-item-label {
|
|
72
|
+
padding-bottom: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.session-setup-form .ant-form-item-label > label {
|
|
76
|
+
height: 15px;
|
|
77
|
+
color: var(--midscene-text-tertiary, rgba(0, 0, 0, .5));
|
|
78
|
+
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
line-height: 14.5px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:before {
|
|
85
|
+
color: var(--midscene-text-tertiary, rgba(0, 0, 0, .5));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:not(:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):before {
|
|
89
|
+
margin-right: 2px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:not(:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):before {
|
|
93
|
+
margin-right: 2px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):before {
|
|
97
|
+
margin-right: 2px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)):before {
|
|
101
|
+
margin-left: 2px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)):before {
|
|
105
|
+
margin-left: 2px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.session-setup-form .ant-form-item-label > label.ant-form-item-required:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)):before {
|
|
109
|
+
margin-left: 2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.session-setup-form .ant-select-single .ant-select-selector {
|
|
113
|
+
background: var(--midscene-surface-muted, #f2f4f7);
|
|
114
|
+
height: 36px;
|
|
115
|
+
box-shadow: none;
|
|
116
|
+
border: none;
|
|
117
|
+
border-radius: 8px;
|
|
118
|
+
align-items: center;
|
|
119
|
+
padding: 0 12px;
|
|
120
|
+
display: flex;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.session-setup-form .ant-select-single .ant-select-selector .ant-select-selection-item, .session-setup-form .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
|
|
124
|
+
color: var(--midscene-text-primary, #000);
|
|
125
|
+
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
126
|
+
font-size: 14px;
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
line-height: 36px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.session-setup-form .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
|
|
132
|
+
color: var(--midscene-text-placeholder, rgba(0, 0, 0, .4));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.session-setup-form .ant-select-arrow:not(:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
136
|
+
right: 12px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.session-setup-form .ant-select-arrow:not(:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
140
|
+
right: 12px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.session-setup-form .ant-select-arrow:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
144
|
+
right: 12px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.session-setup-form .ant-select-arrow:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
148
|
+
left: 12px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.session-setup-form .ant-select-arrow:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
152
|
+
left: 12px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.session-setup-form .ant-select-arrow:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
156
|
+
left: 12px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.session-setup-form .ant-input, .session-setup-form .ant-input-number {
|
|
160
|
+
background: var(--midscene-surface-muted, #f2f4f7);
|
|
161
|
+
height: 36px;
|
|
162
|
+
box-shadow: none;
|
|
163
|
+
color: var(--midscene-text-primary, #000);
|
|
164
|
+
border: none;
|
|
165
|
+
border-radius: 8px;
|
|
166
|
+
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.session-setup-form .ant-input-number-input {
|
|
171
|
+
height: 36px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.session-setup-select-icon {
|
|
175
|
+
object-fit: contain;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
width: 16px;
|
|
178
|
+
height: 16px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.session-setup-submit {
|
|
182
|
+
background: var(--midscene-brand, #1979ff);
|
|
183
|
+
color: #f2f4f7;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
border: 0;
|
|
186
|
+
border-radius: 8px;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 32px;
|
|
189
|
+
margin-top: 7px;
|
|
190
|
+
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
font-weight: 500;
|
|
193
|
+
line-height: 22px;
|
|
194
|
+
transition: opacity .2s;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.session-setup-submit:hover:not(:disabled) {
|
|
198
|
+
opacity: .9;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.session-setup-submit:disabled {
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
opacity: .6;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.platform-selector-group {
|
|
207
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
208
|
+
gap: 12px;
|
|
209
|
+
width: 100%;
|
|
210
|
+
display: grid;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.platform-selector-group .ant-radio-button-wrapper {
|
|
214
|
+
white-space: normal;
|
|
215
|
+
background: #fff;
|
|
216
|
+
border-radius: 14px;
|
|
217
|
+
justify-content: flex-start;
|
|
218
|
+
align-items: flex-start;
|
|
219
|
+
height: auto;
|
|
220
|
+
min-height: 92px;
|
|
221
|
+
padding: 14px 16px;
|
|
222
|
+
transition: border-color .2s, box-shadow .2s, transform .2s;
|
|
223
|
+
display: flex;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.platform-selector-group .ant-radio-button-wrapper:not(:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
227
|
+
border-left-width: 1px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.platform-selector-group .ant-radio-button-wrapper:not(:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
231
|
+
border-left-width: 1px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.platform-selector-group .ant-radio-button-wrapper:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
|
235
|
+
border-left-width: 1px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.platform-selector-group .ant-radio-button-wrapper:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
239
|
+
border-right-width: 1px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.platform-selector-group .ant-radio-button-wrapper:-moz-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
243
|
+
border-right-width: 1px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.platform-selector-group .ant-radio-button-wrapper:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
|
247
|
+
border-right-width: 1px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.platform-selector-group .ant-radio-button-wrapper:before {
|
|
251
|
+
display: none;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.platform-selector-group .ant-radio-button-wrapper:hover {
|
|
255
|
+
border-color: #1677ff;
|
|
256
|
+
transform: translateY(-1px);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.platform-selector-group .ant-radio-button-wrapper-checked {
|
|
260
|
+
border-color: #1677ff;
|
|
261
|
+
box-shadow: 0 10px 24px rgba(22, 119, 255, .12);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.platform-selector-card .platform-selector-title {
|
|
265
|
+
color: rgba(0, 0, 0, .88);
|
|
266
|
+
font-size: 15px;
|
|
267
|
+
font-weight: 600;
|
|
268
|
+
line-height: 1.4;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.platform-selector-card .platform-selector-description {
|
|
272
|
+
color: rgba(0, 0, 0, .5);
|
|
273
|
+
margin-top: 6px;
|
|
274
|
+
font-size: 12px;
|
|
275
|
+
line-height: 1.5;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.session-select-option {
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
gap: 2px;
|
|
281
|
+
line-height: 1.4;
|
|
282
|
+
display: flex;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.session-select-option-label {
|
|
286
|
+
color: rgba(0, 0, 0, .88);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.session-select-option-description {
|
|
290
|
+
color: rgba(0, 0, 0, .45);
|
|
291
|
+
font-size: 12px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@media (max-width: 640px) {
|
|
295
|
+
.platform-selector-group {
|
|
296
|
+
grid-template-columns: 1fr;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
SessionSetupPanel: ()=>SessionSetupPanel,
|
|
37
|
+
getPlatformSelectorOptions: ()=>getPlatformSelectorOptions
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const external_antd_namespaceObject = require("antd");
|
|
41
|
+
const dropdown_chevron_js_namespaceObject = require("./icons/dropdown-chevron.js");
|
|
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
|
+
require("./SessionSetupPanel.css");
|
|
46
|
+
function getPlatformSelectorFieldKey(setup) {
|
|
47
|
+
var _setup_platformSelector;
|
|
48
|
+
return null == setup ? void 0 : null == (_setup_platformSelector = setup.platformSelector) ? void 0 : _setup_platformSelector.fieldKey;
|
|
49
|
+
}
|
|
50
|
+
function getPlatformSelectorOptions(field, setup) {
|
|
51
|
+
var _setup_platformRegistry;
|
|
52
|
+
if (getPlatformSelectorFieldKey(setup) !== field.key || !(null == setup ? void 0 : null == (_setup_platformRegistry = setup.platformRegistry) ? void 0 : _setup_platformRegistry.length)) return field.options;
|
|
53
|
+
const registryOptions = setup.platformRegistry.map((platform)=>({
|
|
54
|
+
label: platform.label,
|
|
55
|
+
value: platform.id,
|
|
56
|
+
description: [
|
|
57
|
+
platform.description,
|
|
58
|
+
platform.unavailableReason
|
|
59
|
+
].filter(Boolean).join(' · ') || void 0
|
|
60
|
+
}));
|
|
61
|
+
return registryOptions.length > 0 ? registryOptions : field.options;
|
|
62
|
+
}
|
|
63
|
+
function DropdownSuffix() {
|
|
64
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dropdown_chevron_js_default(), {
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: "session-setup-select-icon"
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function renderSessionField(field, sessionSetup) {
|
|
70
|
+
if ('number' === field.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.InputNumber, {
|
|
71
|
+
style: {
|
|
72
|
+
width: '100%'
|
|
73
|
+
},
|
|
74
|
+
placeholder: field.placeholder
|
|
75
|
+
});
|
|
76
|
+
if ('select' === field.type) {
|
|
77
|
+
var _ref;
|
|
78
|
+
var _sessionSetup_platformSelector;
|
|
79
|
+
const platformSelectorFieldKey = getPlatformSelectorFieldKey(sessionSetup);
|
|
80
|
+
const platformOptions = getPlatformSelectorOptions(field, sessionSetup);
|
|
81
|
+
const shouldRenderPlatformSelector = platformSelectorFieldKey === field.key && (null == sessionSetup ? void 0 : null == (_sessionSetup_platformSelector = sessionSetup.platformSelector) ? void 0 : _sessionSetup_platformSelector.variant) === 'cards';
|
|
82
|
+
if (shouldRenderPlatformSelector) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Radio.Group, {
|
|
83
|
+
className: "platform-selector-group",
|
|
84
|
+
children: (platformOptions || []).map((option)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Radio.Button, {
|
|
85
|
+
value: option.value,
|
|
86
|
+
className: "platform-selector-card",
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
89
|
+
className: "platform-selector-title",
|
|
90
|
+
children: option.label
|
|
91
|
+
}),
|
|
92
|
+
option.description ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
93
|
+
className: "platform-selector-description",
|
|
94
|
+
children: option.description
|
|
95
|
+
}) : null
|
|
96
|
+
]
|
|
97
|
+
}, String(option.value)))
|
|
98
|
+
});
|
|
99
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Select, {
|
|
100
|
+
placeholder: field.placeholder,
|
|
101
|
+
suffixIcon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DropdownSuffix, {}),
|
|
102
|
+
options: (null != (_ref = null != platformOptions ? platformOptions : field.options) ? _ref : []).map((option)=>({
|
|
103
|
+
label: option.label,
|
|
104
|
+
value: option.value,
|
|
105
|
+
description: option.description
|
|
106
|
+
})),
|
|
107
|
+
optionRender: (option)=>{
|
|
108
|
+
const description = option.data.description;
|
|
109
|
+
if (!description) return option.data.label;
|
|
110
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
111
|
+
className: "session-select-option",
|
|
112
|
+
children: [
|
|
113
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
114
|
+
className: "session-select-option-label",
|
|
115
|
+
children: option.data.label
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
118
|
+
className: "session-select-option-description",
|
|
119
|
+
children: description
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Input, {
|
|
127
|
+
placeholder: field.placeholder
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const DEFAULT_TITLE = 'Create Agent';
|
|
131
|
+
const DEFAULT_DESCRIPTION = 'Create a platform session before running actions.';
|
|
132
|
+
function SessionSetupPanel({ form, sessionSetup, sessionSetupError, sessionViewState, sessionLoading, sessionMutating, onCreateSession }) {
|
|
133
|
+
var _ref, _ref1, _ref2, _ref3;
|
|
134
|
+
const submitDisabled = sessionMutating || sessionLoading || 'blocked' === sessionViewState.setupState;
|
|
135
|
+
const primaryLabel = null != (_ref = null == sessionSetup ? void 0 : sessionSetup.primaryActionLabel) ? _ref : DEFAULT_TITLE;
|
|
136
|
+
const title = null != (_ref1 = null == sessionSetup ? void 0 : sessionSetup.title) ? _ref1 : DEFAULT_TITLE;
|
|
137
|
+
const description = null != (_ref2 = null == sessionSetup ? void 0 : sessionSetup.description) ? _ref2 : DEFAULT_DESCRIPTION;
|
|
138
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
139
|
+
className: "session-setup-panel",
|
|
140
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
141
|
+
className: "session-setup-card",
|
|
142
|
+
children: [
|
|
143
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(midscene_logo_js_default(), {
|
|
144
|
+
"aria-hidden": "true",
|
|
145
|
+
className: "session-setup-logo"
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
148
|
+
className: "session-setup-title",
|
|
149
|
+
children: title
|
|
150
|
+
}),
|
|
151
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
152
|
+
className: "session-setup-description",
|
|
153
|
+
children: description
|
|
154
|
+
}),
|
|
155
|
+
'blocked' === sessionViewState.setupState && sessionViewState.setupBlockingReason && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
156
|
+
type: "error",
|
|
157
|
+
showIcon: true,
|
|
158
|
+
message: "Setup blocked",
|
|
159
|
+
description: sessionViewState.setupBlockingReason,
|
|
160
|
+
className: "session-setup-alert"
|
|
161
|
+
}),
|
|
162
|
+
sessionSetupError ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
163
|
+
type: "error",
|
|
164
|
+
showIcon: true,
|
|
165
|
+
message: "Failed to load setup",
|
|
166
|
+
description: sessionSetupError,
|
|
167
|
+
className: "session-setup-alert"
|
|
168
|
+
}) : null,
|
|
169
|
+
(null == sessionSetup ? void 0 : sessionSetup.notice) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
170
|
+
type: sessionSetup.notice.type,
|
|
171
|
+
showIcon: true,
|
|
172
|
+
message: sessionSetup.notice.message,
|
|
173
|
+
description: sessionSetup.notice.description,
|
|
174
|
+
className: "session-setup-alert"
|
|
175
|
+
}) : null,
|
|
176
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Form, {
|
|
177
|
+
form: form,
|
|
178
|
+
layout: "vertical",
|
|
179
|
+
className: "session-setup-form",
|
|
180
|
+
onFinish: ()=>{
|
|
181
|
+
if (submitDisabled) return;
|
|
182
|
+
onCreateSession();
|
|
183
|
+
},
|
|
184
|
+
children: [
|
|
185
|
+
(null != (_ref3 = null == sessionSetup ? void 0 : sessionSetup.fields) ? _ref3 : []).map((field)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Form.Item, {
|
|
186
|
+
label: field.label,
|
|
187
|
+
name: field.key,
|
|
188
|
+
tooltip: field.description,
|
|
189
|
+
rules: field.required ? [
|
|
190
|
+
{
|
|
191
|
+
required: true,
|
|
192
|
+
message: `${field.label} is required`
|
|
193
|
+
}
|
|
194
|
+
] : void 0,
|
|
195
|
+
children: renderSessionField(field, sessionSetup)
|
|
196
|
+
}, field.key)),
|
|
197
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
198
|
+
type: "submit",
|
|
199
|
+
className: "session-setup-submit",
|
|
200
|
+
disabled: submitDisabled,
|
|
201
|
+
children: sessionMutating ? 'Creating...' : primaryLabel
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
exports.SessionSetupPanel = __webpack_exports__.SessionSetupPanel;
|
|
210
|
+
exports.getPlatformSelectorOptions = __webpack_exports__.getPlatformSelectorOptions;
|
|
211
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
212
|
+
"SessionSetupPanel",
|
|
213
|
+
"getPlatformSelectorOptions"
|
|
214
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
215
|
+
Object.defineProperty(exports, '__esModule', {
|
|
216
|
+
value: true
|
|
217
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.app-region-drag {
|
|
2
|
+
-webkit-user-select: none;
|
|
3
|
+
-moz-user-select: none;
|
|
4
|
+
user-select: none;
|
|
5
|
+
app-region: drag;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.app-region-no-drag {
|
|
9
|
+
app-region: no-drag;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.header {
|
|
13
|
+
border-bottom: 1px solid #ccc;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
padding: 8px 12px;
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
Header: ()=>Header
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
require("react");
|
|
40
|
+
const index_js_namespaceObject = require("../WinControlTool/index.js");
|
|
41
|
+
var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
|
|
42
|
+
require("./index.css");
|
|
43
|
+
function _define_property(obj, key, value) {
|
|
44
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
45
|
+
value: value,
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true
|
|
49
|
+
});
|
|
50
|
+
else obj[key] = value;
|
|
51
|
+
return obj;
|
|
52
|
+
}
|
|
53
|
+
function _object_spread(target) {
|
|
54
|
+
for(var i = 1; i < arguments.length; i++){
|
|
55
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
56
|
+
var ownKeys = Object.keys(source);
|
|
57
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
58
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
59
|
+
}));
|
|
60
|
+
ownKeys.forEach(function(key) {
|
|
61
|
+
_define_property(target, key, source[key]);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return target;
|
|
65
|
+
}
|
|
66
|
+
function Header(props) {
|
|
67
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
68
|
+
className: "header app-region-drag",
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {}),
|
|
71
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_default(), _object_spread({}, props))
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
exports.Header = __webpack_exports__.Header;
|
|
76
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
77
|
+
"Header"
|
|
78
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
79
|
+
Object.defineProperty(exports, '__esModule', {
|
|
80
|
+
value: true
|
|
81
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.assistant-form {
|
|
2
|
+
gap: 16px;
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: 8px !important;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.assistant-form .form-item-url {
|
|
8
|
+
flex: 1 !important;
|
|
9
|
+
margin-right: 0 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.assistant-form .form-item-url .ant-input {
|
|
13
|
+
border-radius: 15px;
|
|
14
|
+
}
|
|
15
|
+
|