@midscene/visualizer 0.28.2-beta-20250910024129.0 → 0.28.2-beta-20250910035416.0
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/es/component/{blackboard.mjs → blackboard/index.mjs} +3 -3
- package/dist/es/component/{playground/ConfigSelector.mjs → config-selector/index.mjs} +2 -3
- package/dist/es/component/{playground/ContextPreview.mjs → context-preview/index.mjs} +3 -4
- package/dist/es/component/{env-config.mjs → env-config/index.mjs} +1 -1
- package/dist/es/component/{github-star.mjs → github-star/index.mjs} +1 -1
- package/dist/es/component/history-selector/index.css +132 -0
- package/dist/es/component/{playground/HistorySelector.mjs → history-selector/index.mjs} +1 -1
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/{logo.mjs → logo/index.mjs} +1 -1
- package/dist/es/component/{misc.mjs → misc/index.mjs} +42 -2
- package/dist/es/component/{player.mjs → player/index.mjs} +8 -8
- package/dist/es/component/playground/index.css +29 -161
- package/dist/es/component/playground/index.mjs +8 -0
- package/dist/es/component/playground-result/index.css +29 -0
- package/dist/es/component/{playground/PlaygroundResult.mjs → playground-result/index.mjs} +3 -4
- package/dist/es/component/prompt-input/index.css +330 -0
- package/dist/es/component/{playground/PromptInput.mjs → prompt-input/index.mjs} +9 -9
- package/dist/es/component/{playground/ServiceModeControl.mjs → service-mode-control/index.mjs} +4 -5
- package/dist/es/component/{shiny-text.mjs → shiny-text/index.mjs} +1 -1
- package/dist/es/component/universal-playground/index.css +341 -0
- package/dist/es/component/universal-playground/index.mjs +273 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +107 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +168 -0
- package/dist/es/hooks/usePlaygroundState.mjs +176 -0
- package/dist/es/icons/avatar.mjs +28 -0
- package/dist/es/index.mjs +22 -18
- package/dist/es/{component/playground/playground-constants.mjs → utils/constants.mjs} +23 -43
- package/dist/es/{component/playground → utils}/playground-utils.mjs +1 -1
- package/dist/es/{component → utils}/replay-scripts.mjs +1 -2
- package/dist/lib/component/{blackboard.js → blackboard/index.js} +5 -5
- package/dist/lib/component/{playground/ConfigSelector.js → config-selector/index.js} +6 -7
- package/dist/lib/component/{playground/ContextPreview.js → context-preview/index.js} +8 -9
- package/dist/lib/component/{env-config.js → env-config/index.js} +1 -1
- package/dist/lib/component/{github-star.js → github-star/index.js} +1 -1
- package/dist/lib/component/history-selector/index.css +132 -0
- package/dist/lib/component/{playground/HistorySelector.js → history-selector/index.js} +1 -1
- package/dist/lib/component/index.js +60 -0
- package/dist/lib/component/{logo.js → logo/index.js} +1 -1
- package/dist/lib/component/{misc.js → misc/index.js} +60 -1
- package/dist/lib/component/{player.js → player/index.js} +23 -23
- package/dist/lib/component/playground/index.css +29 -161
- package/dist/lib/component/playground/index.js +113 -0
- package/dist/lib/component/playground-result/index.css +29 -0
- package/dist/lib/component/{playground/PlaygroundResult.js → playground-result/index.js} +8 -9
- package/dist/lib/component/prompt-input/index.css +330 -0
- package/dist/lib/component/{playground/PromptInput.js → prompt-input/index.js} +37 -37
- package/dist/lib/component/{playground/ServiceModeControl.js → service-mode-control/index.js} +8 -9
- package/dist/lib/component/{shiny-text.js → shiny-text/index.js} +1 -1
- package/dist/lib/component/universal-playground/index.css +341 -0
- package/dist/lib/component/universal-playground/index.js +321 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +147 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +202 -0
- package/dist/lib/hooks/usePlaygroundState.js +210 -0
- package/dist/lib/icons/avatar.js +62 -0
- package/dist/lib/index.js +66 -34
- package/dist/lib/{component/playground/playground-constants.js → utils/constants.js} +31 -64
- package/dist/lib/{component/playground → utils}/playground-utils.js +1 -1
- package/dist/lib/{component → utils}/replay-scripts.js +3 -4
- package/dist/types/component/{blackboard.d.ts → blackboard/index.d.ts} +2 -2
- package/dist/types/component/{playground/ConfigSelector.d.ts → config-selector/index.d.ts} +0 -1
- package/dist/types/component/{playground/ContextPreview.d.ts → context-preview/index.d.ts} +0 -1
- package/dist/types/component/{github-star.d.ts → github-star/index.d.ts} +1 -1
- package/dist/types/component/{playground/HistorySelector.d.ts → history-selector/index.d.ts} +1 -1
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/{logo.d.ts → logo/index.d.ts} +1 -1
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/{player.d.ts → player/index.d.ts} +2 -2
- package/dist/types/component/playground/index.d.ts +7 -0
- package/dist/types/component/{playground/PlaygroundResult.d.ts → playground-result/index.d.ts} +3 -4
- package/dist/types/component/{playground/PromptInput.d.ts → prompt-input/index.d.ts} +3 -2
- package/dist/types/component/{playground/ServiceModeControl.d.ts → service-mode-control/index.d.ts} +0 -1
- package/dist/types/component/{shiny-text.d.ts → shiny-text/index.d.ts} +1 -1
- package/dist/types/component/universal-playground/index.d.ts +4 -0
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +33 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/index.d.ts +15 -10
- package/dist/types/types.d.ts +164 -0
- package/dist/types/{component/playground/playground-constants.d.ts → utils/constants.d.ts} +3 -5
- package/dist/types/{component → utils}/replay-scripts.d.ts +0 -1
- package/package.json +5 -5
- package/dist/es/blank_polyfill.mjs +0 -2
- package/dist/es/component/describer.css +0 -25
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/init.mjs +0 -10
- package/dist/lib/blank_polyfill.js +0 -36
- package/dist/lib/component/describer.css +0 -25
- package/dist/lib/component/playground/playground-types.js +0 -18
- package/dist/lib/init.js +0 -44
- package/dist/types/blank_polyfill.d.ts +0 -2
- package/dist/types/component/misc.d.ts +0 -2
- package/dist/types/component/playground/playground-types.d.ts +0 -19
- package/dist/types/component/playground/types.d.ts +0 -72
- package/dist/types/init.d.ts +0 -1
- /package/dist/es/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/es/component/{playground/FormField.mjs → form-field/index.mjs} +0 -0
- /package/dist/es/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/es/component/{logo.css → logo/index.css} +0 -0
- /package/dist/es/component/{player.css → player/index.css} +0 -0
- /package/dist/es/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/es/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/es/{component/playground → hooks}/useServerValid.mjs +0 -0
- /package/dist/es/{component/store → store}/history.mjs +0 -0
- /package/dist/es/{component/store → store}/store.mjs +0 -0
- /package/dist/es/{component/playground/types.mjs → types.mjs} +0 -0
- /package/dist/es/{component → utils}/color.mjs +0 -0
- /package/dist/es/{utils.mjs → utils/index.mjs} +0 -0
- /package/dist/es/{component → utils}/pixi-loader.mjs +0 -0
- /package/dist/lib/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/lib/component/{playground/FormField.js → form-field/index.js} +0 -0
- /package/dist/lib/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/lib/component/{logo.css → logo/index.css} +0 -0
- /package/dist/lib/component/{player.css → player/index.css} +0 -0
- /package/dist/lib/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/lib/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/lib/{component/playground → hooks}/useServerValid.js +0 -0
- /package/dist/lib/{component/store → store}/history.js +0 -0
- /package/dist/lib/{component/store → store}/store.js +0 -0
- /package/dist/lib/{component/playground/types.js → types.js} +0 -0
- /package/dist/lib/{component → utils}/color.js +0 -0
- /package/dist/lib/{utils.js → utils/index.js} +0 -0
- /package/dist/lib/{component → utils}/pixi-loader.js +0 -0
- /package/dist/types/component/{env-config.d.ts → env-config/index.d.ts} +0 -0
- /package/dist/types/component/{playground/FormField.d.ts → form-field/index.d.ts} +0 -0
- /package/dist/types/{component/playground → hooks}/useServerValid.d.ts +0 -0
- /package/dist/types/{component/store → store}/history.d.ts +0 -0
- /package/dist/types/{component/store → store}/store.d.ts +0 -0
- /package/dist/types/{component → utils}/color.d.ts +0 -0
- /package/dist/types/{utils.d.ts → utils/index.d.ts} +0 -0
- /package/dist/types/{component → utils}/pixi-loader.d.ts +0 -0
- /package/dist/types/{component/playground → utils}/playground-utils.d.ts +0 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
.prompt-input-wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.prompt-input-wrapper .mode-radio-group-wrapper {
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group {
|
|
12
|
+
align-items: center;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper {
|
|
18
|
+
height: 24px;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
background-color: #f7f7f7;
|
|
21
|
+
border: none;
|
|
22
|
+
border-radius: 11px;
|
|
23
|
+
margin-right: 8px;
|
|
24
|
+
padding: 0 8px;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
line-height: 24px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper:before {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper:focus-within {
|
|
34
|
+
outline: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked {
|
|
38
|
+
color: #fff;
|
|
39
|
+
background-color: #2b83ff;
|
|
40
|
+
border-color: #2b83ff;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked:hover {
|
|
44
|
+
color: #fff;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button {
|
|
48
|
+
height: 24px;
|
|
49
|
+
box-shadow: none;
|
|
50
|
+
background-color: #f7f7f7;
|
|
51
|
+
border: none;
|
|
52
|
+
border-radius: 11px;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 2px;
|
|
55
|
+
max-width: 160px;
|
|
56
|
+
padding: 0 8px;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button .ant-btn-content {
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button:hover {
|
|
68
|
+
background-color: #e6e6e6;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button.selected-from-dropdown {
|
|
72
|
+
color: #fff;
|
|
73
|
+
background-color: #2b83ff;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button.selected-from-dropdown:hover {
|
|
78
|
+
background-color: #2b83ff;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
|
|
82
|
+
align-items: center;
|
|
83
|
+
display: flex;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.prompt-input-wrapper .main-side-console-input {
|
|
87
|
+
margin-top: 10px;
|
|
88
|
+
position: relative;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea {
|
|
92
|
+
white-space: pre-wrap;
|
|
93
|
+
scrollbar-width: thin;
|
|
94
|
+
background: #fff;
|
|
95
|
+
border: 1px solid #f2f4f7;
|
|
96
|
+
border-radius: 12px;
|
|
97
|
+
padding: 12px 16px;
|
|
98
|
+
line-height: 21px;
|
|
99
|
+
transition: background-color .2s;
|
|
100
|
+
overflow-y: auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes hue-shift {
|
|
104
|
+
0% {
|
|
105
|
+
filter: hue-rotate();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
100% {
|
|
109
|
+
filter: hue-rotate(360deg);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea:focus-within {
|
|
114
|
+
background: linear-gradient(#fff, #fff) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box;
|
|
115
|
+
border: 1px solid rgba(0, 0, 0, 0);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea::-webkit-scrollbar {
|
|
119
|
+
width: 6px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea::-webkit-scrollbar-thumb {
|
|
123
|
+
background-color: rgba(0, 0, 0, .2);
|
|
124
|
+
border-radius: 3px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.prompt-input-wrapper .main-side-console-input.loading .main-side-console-input-textarea {
|
|
128
|
+
background: linear-gradient(#fff, #fff) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box;
|
|
129
|
+
border: 1px solid rgba(0, 0, 0, 0);
|
|
130
|
+
animation: 5s linear infinite hue-shift;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.prompt-input-wrapper .main-side-console-input .ant-form-item-control-input-content {
|
|
134
|
+
z-index: 999;
|
|
135
|
+
border: 3px solid rgba(0, 0, 0, 0);
|
|
136
|
+
border-radius: 14px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.prompt-input-wrapper .main-side-console-input:focus-within .ant-form-item-control-input-content {
|
|
140
|
+
border-color: rgba(43, 131, 255, .16);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.prompt-input-wrapper .main-side-console-input.disabled .form-controller-wrapper {
|
|
144
|
+
background-color: rgba(0, 0, 0, 0);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.prompt-input-wrapper .ant-form-item-with-help + .form-controller-wrapper {
|
|
148
|
+
bottom: 22px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.prompt-input-wrapper .ant-input {
|
|
152
|
+
padding-bottom: 40px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.prompt-input-wrapper .form-controller-wrapper {
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
background-color: #fff;
|
|
158
|
+
flex-direction: row;
|
|
159
|
+
justify-content: flex-end;
|
|
160
|
+
align-items: flex-end;
|
|
161
|
+
gap: 8px;
|
|
162
|
+
width: calc(100% - 32px);
|
|
163
|
+
padding: 12px 0;
|
|
164
|
+
line-height: 32px;
|
|
165
|
+
transition: background-color .2s;
|
|
166
|
+
display: flex;
|
|
167
|
+
position: absolute;
|
|
168
|
+
bottom: 1px;
|
|
169
|
+
left: 16px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.prompt-input-wrapper .settings-wrapper {
|
|
173
|
+
color: #777;
|
|
174
|
+
flex-flow: wrap;
|
|
175
|
+
gap: 2px;
|
|
176
|
+
display: flex;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.prompt-input-wrapper .settings-wrapper.settings-wrapper-hover {
|
|
180
|
+
color: #3b3b3b;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.prompt-input-wrapper .structured-params-container {
|
|
184
|
+
background: linear-gradient(#fff, #fff) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box;
|
|
185
|
+
border: 1px solid rgba(0, 0, 0, 0);
|
|
186
|
+
border-radius: 12px;
|
|
187
|
+
padding: 16px 16px 56px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item {
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
display: flex;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label {
|
|
196
|
+
text-align: left;
|
|
197
|
+
flex-basis: auto;
|
|
198
|
+
padding-bottom: 4px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label {
|
|
202
|
+
color: rgba(0, 0, 0, .85);
|
|
203
|
+
height: auto;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
font-weight: 500;
|
|
206
|
+
line-height: 1.5;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label:after {
|
|
210
|
+
color: #ff4d4f;
|
|
211
|
+
font-family: SimSun, sans-serif;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
line-height: 1;
|
|
214
|
+
display: inline-block;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label: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))):after {
|
|
218
|
+
margin-left: 4px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label: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))):after {
|
|
222
|
+
margin-left: 4px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label: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))):after {
|
|
226
|
+
margin-left: 4px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label:-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)):after {
|
|
230
|
+
margin-right: 4px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label:-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)):after {
|
|
234
|
+
margin-right: 4px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-label > label: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)):after {
|
|
238
|
+
margin-right: 4px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-control {
|
|
242
|
+
flex: 1;
|
|
243
|
+
margin-top: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-row {
|
|
247
|
+
flex-direction: column;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-form-item .ant-form-item-control-input {
|
|
251
|
+
min-height: auto;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-input, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number, .prompt-input-wrapper .structured-params-container .structured-params .ant-select {
|
|
255
|
+
border: 1px solid #e1e5e9;
|
|
256
|
+
border-radius: 6px;
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-input:hover, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:hover, .prompt-input-wrapper .structured-params-container .structured-params .ant-select:hover {
|
|
261
|
+
border-color: #40a9ff;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-input:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-select:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-input:focus-within, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:focus-within, .prompt-input-wrapper .structured-params-container .structured-params .ant-select:focus-within {
|
|
265
|
+
border-color: #40a9ff;
|
|
266
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, .2);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.prompt-input-wrapper .structured-params-container .structured-params textarea.ant-input {
|
|
270
|
+
padding-bottom: 5px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-input-number .ant-input-number-input {
|
|
274
|
+
box-shadow: none;
|
|
275
|
+
border: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:hover .ant-input-number-input {
|
|
279
|
+
box-shadow: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-select {
|
|
283
|
+
min-width: 120px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-select .ant-select-selector {
|
|
287
|
+
box-shadow: none;
|
|
288
|
+
border: none;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-select:hover .ant-select-selector, .prompt-input-wrapper .structured-params-container .structured-params .ant-select.ant-select-focused .ant-select-selector {
|
|
292
|
+
box-shadow: none;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-radio-group {
|
|
296
|
+
width: 100%;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-radio-group .ant-radio-button-wrapper {
|
|
300
|
+
border: 1px solid #e1e5e9;
|
|
301
|
+
border-radius: 6px;
|
|
302
|
+
height: 32px;
|
|
303
|
+
margin-right: 4px;
|
|
304
|
+
font-size: 12px;
|
|
305
|
+
line-height: 30px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.prompt-input-wrapper .structured-params-container .structured-params .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked {
|
|
309
|
+
color: #fff;
|
|
310
|
+
background-color: #2b83ff;
|
|
311
|
+
border-color: #2b83ff;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.selector-trigger {
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
width: 24px;
|
|
317
|
+
height: 24px;
|
|
318
|
+
transition: all .2s;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.selector-trigger .action-icon {
|
|
322
|
+
color: rgba(0, 0, 0, .85);
|
|
323
|
+
font-size: 14px;
|
|
324
|
+
transition: all .2s;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.selector-trigger .action-icon:hover {
|
|
328
|
+
color: #2b83ff;
|
|
329
|
+
}
|
|
330
|
+
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BorderOutlined, DownOutlined, SendOutlined } from "@ant-design/icons";
|
|
3
|
+
import "./index.css";
|
|
3
4
|
import { Button, Dropdown, Form, Input, Radio, Space, Tooltip } from "antd";
|
|
4
5
|
import react, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
-
import { useHistoryStore } from "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import "./index.css";
|
|
6
|
+
import { useHistoryStore } from "../../store/history.mjs";
|
|
7
|
+
import { extractDefaultValue, isLocateField, isZodObjectSchema, unwrapZodType } from "../../types.mjs";
|
|
8
|
+
import { apiMetadata, defaultMainButtons } from "../../utils/constants.mjs";
|
|
9
|
+
import { actionNameForType, getPlaceholderForType, isRunButtonEnabled as playground_utils_mjs_isRunButtonEnabled } from "../../utils/playground-utils.mjs";
|
|
10
|
+
import { ConfigSelector } from "../config-selector/index.mjs";
|
|
11
|
+
import { BooleanField, EnumField, LocateField, NumberField, TextField } from "../form-field/index.mjs";
|
|
12
|
+
import { HistorySelector } from "../history-selector/index.mjs";
|
|
13
13
|
const { TextArea } = Input;
|
|
14
14
|
const PromptInput = (param)=>{
|
|
15
15
|
let { runButtonEnabled, form, serviceMode, selectedType, dryMode, stoppable, loading, onRun, onStop, clearPromptAfterRun = true, actionSpace, hideDomAndScreenshotOptions = false } = param;
|
|
@@ -221,7 +221,7 @@ const PromptInput = (param)=>{
|
|
|
221
221
|
needsStructuredParams,
|
|
222
222
|
actionSpace
|
|
223
223
|
]);
|
|
224
|
-
const isRunButtonEnabled = useMemo(()=>
|
|
224
|
+
const isRunButtonEnabled = useMemo(()=>playground_utils_mjs_isRunButtonEnabled(runButtonEnabled, !!needsStructuredParams, params, actionSpace, selectedType, promptValue), [
|
|
225
225
|
runButtonEnabled,
|
|
226
226
|
needsStructuredParams,
|
|
227
227
|
selectedType,
|
package/dist/es/component/{playground/ServiceModeControl.mjs → service-mode-control/index.mjs}
RENAMED
|
@@ -3,11 +3,10 @@ import { PlaygroundSDK } from "@midscene/playground";
|
|
|
3
3
|
import { overrideAIConfig } from "@midscene/shared/env";
|
|
4
4
|
import { Button, Tooltip } from "antd";
|
|
5
5
|
import { useEffect } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "./index.css";
|
|
6
|
+
import { useServerValid } from "../../hooks/useServerValid.mjs";
|
|
7
|
+
import { useEnvConfig } from "../../store/store.mjs";
|
|
8
|
+
import { EnvConfig } from "../env-config/index.mjs";
|
|
9
|
+
import { iconForStatus } from "../misc/index.mjs";
|
|
11
10
|
const TITLE_TEXT = {
|
|
12
11
|
Server: 'Server Status',
|
|
13
12
|
'In-Browser': 'In-Browser'
|