@midscene/visualizer 0.28.2-beta-20250909133629.0 → 0.28.2-beta-20250910021445.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/index.mjs → blackboard.mjs} +3 -3
- package/dist/es/component/describer.css +25 -0
- package/dist/es/component/{env-config/index.mjs → env-config.mjs} +1 -1
- package/dist/es/component/{github-star/index.mjs → github-star.mjs} +1 -1
- package/dist/es/component/{logo/index.mjs → logo.mjs} +1 -1
- package/dist/es/component/{misc/index.mjs → misc.mjs} +2 -42
- package/dist/es/component/{player/index.mjs → player.mjs} +8 -8
- package/dist/es/component/{config-selector/index.mjs → playground/ConfigSelector.mjs} +3 -2
- package/dist/es/component/{context-preview/index.mjs → playground/ContextPreview.mjs} +4 -3
- package/dist/es/component/{history-selector/index.mjs → playground/HistorySelector.mjs} +1 -1
- package/dist/es/component/{playground-result/index.mjs → playground/PlaygroundResult.mjs} +4 -3
- package/dist/es/component/{prompt-input/index.mjs → playground/PromptInput.mjs} +9 -9
- package/dist/es/component/{service-mode-control/index.mjs → playground/ServiceModeControl.mjs} +5 -4
- package/dist/es/component/playground/index.css +161 -29
- package/dist/es/{utils/constants.mjs → component/playground/playground-constants.mjs} +2 -1
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/{utils → component/playground}/playground-utils.mjs +1 -1
- package/dist/es/{types.mjs → component/playground/types.mjs} +1 -23
- package/dist/es/{utils → component}/replay-scripts.mjs +2 -1
- package/dist/es/component/{shiny-text/index.mjs → shiny-text.mjs} +1 -1
- package/dist/es/index.mjs +18 -22
- package/dist/es/init.mjs +10 -0
- package/dist/lib/component/{blackboard/index.js → blackboard.js} +5 -5
- package/dist/lib/component/describer.css +25 -0
- package/dist/lib/component/{env-config/index.js → env-config.js} +1 -1
- package/dist/lib/component/{github-star/index.js → github-star.js} +1 -1
- package/dist/lib/component/{logo/index.js → logo.js} +1 -1
- package/dist/lib/component/{misc/index.js → misc.js} +1 -60
- package/dist/lib/component/{player/index.js → player.js} +23 -23
- package/dist/lib/component/{config-selector/index.js → playground/ConfigSelector.js} +7 -6
- package/dist/lib/component/{context-preview/index.js → playground/ContextPreview.js} +9 -8
- package/dist/lib/component/{history-selector/index.js → playground/HistorySelector.js} +1 -1
- package/dist/lib/component/{playground-result/index.js → playground/PlaygroundResult.js} +9 -8
- package/dist/lib/component/{prompt-input/index.js → playground/PromptInput.js} +37 -37
- package/dist/lib/component/{service-mode-control/index.js → playground/ServiceModeControl.js} +9 -8
- package/dist/lib/component/playground/index.css +161 -29
- package/dist/lib/{utils/constants.js → component/playground/playground-constants.js} +4 -3
- package/dist/lib/component/playground/playground-types.js +18 -0
- package/dist/lib/{utils → component/playground}/playground-utils.js +1 -1
- package/dist/lib/{types.js → component/playground/types.js} +0 -28
- package/dist/lib/{utils → component}/replay-scripts.js +4 -3
- package/dist/lib/component/{shiny-text/index.js → shiny-text.js} +1 -1
- package/dist/lib/index.js +34 -66
- package/dist/lib/{icons/avatar.js → init.js} +12 -16
- package/dist/types/component/{blackboard/index.d.ts → blackboard.d.ts} +2 -2
- package/dist/types/component/{github-star/index.d.ts → github-star.d.ts} +1 -1
- package/dist/types/component/{logo/index.d.ts → logo.d.ts} +1 -1
- package/dist/types/component/misc.d.ts +2 -0
- package/dist/types/component/{player/index.d.ts → player.d.ts} +2 -2
- package/dist/types/component/{config-selector/index.d.ts → playground/ConfigSelector.d.ts} +1 -0
- package/dist/types/component/{context-preview/index.d.ts → playground/ContextPreview.d.ts} +1 -0
- package/dist/types/component/{history-selector/index.d.ts → playground/HistorySelector.d.ts} +1 -1
- package/dist/types/component/{playground-result/index.d.ts → playground/PlaygroundResult.d.ts} +4 -3
- package/dist/types/component/{prompt-input/index.d.ts → playground/PromptInput.d.ts} +2 -3
- package/dist/types/component/{service-mode-control/index.d.ts → playground/ServiceModeControl.d.ts} +1 -0
- package/dist/types/{utils/constants.d.ts → component/playground/playground-constants.d.ts} +1 -0
- package/dist/types/component/playground/playground-types.d.ts +19 -0
- package/dist/types/component/playground/types.d.ts +72 -0
- package/dist/types/{utils → component}/replay-scripts.d.ts +1 -0
- package/dist/types/component/{shiny-text/index.d.ts → shiny-text.d.ts} +1 -1
- package/dist/types/index.d.ts +10 -15
- package/dist/types/init.d.ts +1 -0
- package/package.json +5 -10
- package/dist/es/browser.mjs +0 -18
- package/dist/es/component/history-selector/index.css +0 -132
- package/dist/es/component/index.mjs +0 -1
- package/dist/es/component/playground/index.mjs +0 -8
- package/dist/es/component/playground-result/index.css +0 -29
- package/dist/es/component/prompt-input/index.css +0 -330
- package/dist/es/component/universal-playground/index.css +0 -341
- package/dist/es/component/universal-playground/index.mjs +0 -273
- package/dist/es/component/universal-playground/providers/context-provider.mjs +0 -52
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +0 -107
- package/dist/es/hooks/usePlaygroundExecution.mjs +0 -170
- package/dist/es/hooks/usePlaygroundState.mjs +0 -173
- package/dist/es/icons/avatar.mjs +0 -14
- package/dist/lib/browser.js +0 -132
- package/dist/lib/component/history-selector/index.css +0 -132
- package/dist/lib/component/index.js +0 -60
- package/dist/lib/component/playground/index.js +0 -113
- package/dist/lib/component/playground-result/index.css +0 -29
- package/dist/lib/component/prompt-input/index.css +0 -330
- package/dist/lib/component/universal-playground/index.css +0 -341
- package/dist/lib/component/universal-playground/index.js +0 -321
- package/dist/lib/component/universal-playground/providers/context-provider.js +0 -95
- package/dist/lib/component/universal-playground/providers/storage-provider.js +0 -147
- package/dist/lib/hooks/usePlaygroundExecution.js +0 -204
- package/dist/lib/hooks/usePlaygroundState.js +0 -207
- package/dist/types/browser.d.ts +0 -19
- package/dist/types/component/index.d.ts +0 -1
- package/dist/types/component/misc/index.d.ts +0 -6
- package/dist/types/component/playground/index.d.ts +0 -7
- package/dist/types/component/universal-playground/index.d.ts +0 -4
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +0 -37
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +0 -33
- package/dist/types/hooks/usePlaygroundExecution.d.ts +0 -10
- package/dist/types/hooks/usePlaygroundState.d.ts +0 -26
- package/dist/types/types.d.ts +0 -166
- /package/dist/es/component/{blackboard/index.css → blackboard.css} +0 -0
- /package/dist/es/{utils → component}/color.mjs +0 -0
- /package/dist/es/component/{github-star/index.css → github-star.css} +0 -0
- /package/dist/es/component/{logo/index.css → logo.css} +0 -0
- /package/dist/es/{utils → component}/pixi-loader.mjs +0 -0
- /package/dist/es/component/{player/index.css → player.css} +0 -0
- /package/dist/es/component/{form-field/index.mjs → playground/FormField.mjs} +0 -0
- /package/dist/es/{hooks → component/playground}/useServerValid.mjs +0 -0
- /package/dist/es/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
- /package/dist/es/component/{shiny-text/index.css → shiny-text.css} +0 -0
- /package/dist/es/{store → component/store}/history.mjs +0 -0
- /package/dist/es/{store → component/store}/store.mjs +0 -0
- /package/dist/es/{utils/index.mjs → utils.mjs} +0 -0
- /package/dist/lib/component/{blackboard/index.css → blackboard.css} +0 -0
- /package/dist/lib/{utils → component}/color.js +0 -0
- /package/dist/lib/component/{github-star/index.css → github-star.css} +0 -0
- /package/dist/lib/component/{logo/index.css → logo.css} +0 -0
- /package/dist/lib/{utils → component}/pixi-loader.js +0 -0
- /package/dist/lib/component/{player/index.css → player.css} +0 -0
- /package/dist/lib/component/{form-field/index.js → playground/FormField.js} +0 -0
- /package/dist/lib/{hooks → component/playground}/useServerValid.js +0 -0
- /package/dist/lib/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
- /package/dist/lib/component/{shiny-text/index.css → shiny-text.css} +0 -0
- /package/dist/lib/{store → component/store}/history.js +0 -0
- /package/dist/lib/{store → component/store}/store.js +0 -0
- /package/dist/lib/{utils/index.js → utils.js} +0 -0
- /package/dist/types/{utils → component}/color.d.ts +0 -0
- /package/dist/types/component/{env-config/index.d.ts → env-config.d.ts} +0 -0
- /package/dist/types/{utils → component}/pixi-loader.d.ts +0 -0
- /package/dist/types/component/{form-field/index.d.ts → playground/FormField.d.ts} +0 -0
- /package/dist/types/{utils → component/playground}/playground-utils.d.ts +0 -0
- /package/dist/types/{hooks → component/playground}/useServerValid.d.ts +0 -0
- /package/dist/types/{store → component/store}/history.d.ts +0 -0
- /package/dist/types/{store → component/store}/store.d.ts +0 -0
- /package/dist/types/{utils/index.d.ts → utils.d.ts} +0 -0
|
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
GithubStar: ()=>GithubStar
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
require("./
|
|
30
|
+
require("./github-star.css");
|
|
31
31
|
const GithubStar = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
|
|
32
32
|
href: "https://github.com/web-infra-dev/midscene",
|
|
33
33
|
target: "_blank",
|
|
@@ -28,7 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
LogoUrl: ()=>LogoUrl
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
require("./
|
|
31
|
+
require("./logo.css");
|
|
32
32
|
const LogoUrl = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/vhaeh7vhabf/Midscene.png';
|
|
33
33
|
const Logo = (param)=>{
|
|
34
34
|
let { hideLogo = false } = param;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
(()=>{
|
|
13
4
|
__webpack_require__.d = (exports1, definition)=>{
|
|
14
5
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -33,17 +24,11 @@ var __webpack_require__ = {};
|
|
|
33
24
|
var __webpack_exports__ = {};
|
|
34
25
|
__webpack_require__.r(__webpack_exports__);
|
|
35
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
-
serverLaunchTip: ()=>serverLaunchTip,
|
|
37
|
-
errorMessageServerNotReady: ()=>errorMessageServerNotReady,
|
|
38
|
-
timeCostStrElement: ()=>timeCostStrElement,
|
|
39
27
|
iconForStatus: ()=>iconForStatus,
|
|
40
|
-
|
|
28
|
+
timeCostStrElement: ()=>timeCostStrElement
|
|
41
29
|
});
|
|
42
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
43
31
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
44
|
-
const external_antd_namespaceObject = require("antd");
|
|
45
|
-
const index_js_namespaceObject = require("../shiny-text/index.js");
|
|
46
|
-
var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
|
|
47
32
|
function timeCostStrElement(timeCost) {
|
|
48
33
|
let str;
|
|
49
34
|
str = 'number' != typeof timeCost ? '-' : `${(timeCost / 1000).toFixed(2)}s`;
|
|
@@ -95,54 +80,10 @@ const iconForStatus = (status)=>{
|
|
|
95
80
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.MinusOutlined, {});
|
|
96
81
|
}
|
|
97
82
|
};
|
|
98
|
-
const errorMessageServerNotReady = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
99
|
-
children: [
|
|
100
|
-
"Don't worry, just one more step to launch the playground server.",
|
|
101
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
102
|
-
"Please run one of the commands under the midscene project directory:",
|
|
103
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
104
|
-
"a. ",
|
|
105
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("strong", {
|
|
106
|
-
children: "npx midscene-playground"
|
|
107
|
-
}),
|
|
108
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
109
|
-
"b. ",
|
|
110
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("strong", {
|
|
111
|
-
children: "npx --yes @midscene/web"
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
});
|
|
115
|
-
const serverLaunchTip = function() {
|
|
116
|
-
let notReadyMessage = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : errorMessageServerNotReady;
|
|
117
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
118
|
-
className: "server-tip",
|
|
119
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
120
|
-
message: "Playground Server Not Ready",
|
|
121
|
-
description: notReadyMessage,
|
|
122
|
-
type: "warning"
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
const emptyResultTip = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
127
|
-
className: "result-empty-tip",
|
|
128
|
-
style: {
|
|
129
|
-
textAlign: 'center'
|
|
130
|
-
},
|
|
131
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_default(), {
|
|
132
|
-
disabled: true,
|
|
133
|
-
text: "The result will be shown here"
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
exports.emptyResultTip = __webpack_exports__.emptyResultTip;
|
|
137
|
-
exports.errorMessageServerNotReady = __webpack_exports__.errorMessageServerNotReady;
|
|
138
83
|
exports.iconForStatus = __webpack_exports__.iconForStatus;
|
|
139
|
-
exports.serverLaunchTip = __webpack_exports__.serverLaunchTip;
|
|
140
84
|
exports.timeCostStrElement = __webpack_exports__.timeCostStrElement;
|
|
141
85
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
142
|
-
"emptyResultTip",
|
|
143
|
-
"errorMessageServerNotReady",
|
|
144
86
|
"iconForStatus",
|
|
145
|
-
"serverLaunchTip",
|
|
146
87
|
"timeCostStrElement"
|
|
147
88
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
148
89
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -40,20 +40,20 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
40
40
|
require("pixi.js/unsafe-eval");
|
|
41
41
|
const external_pixi_js_namespaceObject = require("pixi.js");
|
|
42
42
|
const external_react_namespaceObject = require("react");
|
|
43
|
-
require("./
|
|
44
|
-
const
|
|
43
|
+
require("./player.css");
|
|
44
|
+
const external_utils_js_namespaceObject = require("../utils.js");
|
|
45
45
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
46
46
|
const extractor_namespaceObject = require("@midscene/shared/extractor");
|
|
47
47
|
const external_antd_namespaceObject = require("antd");
|
|
48
|
-
const global_perspective_js_namespaceObject = require("
|
|
48
|
+
const global_perspective_js_namespaceObject = require("../icons/global-perspective.js");
|
|
49
49
|
var global_perspective_js_default = /*#__PURE__*/ __webpack_require__.n(global_perspective_js_namespaceObject);
|
|
50
|
-
const player_setting_js_namespaceObject = require("
|
|
50
|
+
const player_setting_js_namespaceObject = require("../icons/player-setting.js");
|
|
51
51
|
var player_setting_js_default = /*#__PURE__*/ __webpack_require__.n(player_setting_js_namespaceObject);
|
|
52
|
-
const show_marker_js_namespaceObject = require("
|
|
52
|
+
const show_marker_js_namespaceObject = require("../icons/show-marker.js");
|
|
53
53
|
var show_marker_js_default = /*#__PURE__*/ __webpack_require__.n(show_marker_js_namespaceObject);
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
54
|
+
const external_blackboard_js_namespaceObject = require("./blackboard.js");
|
|
55
|
+
const external_pixi_loader_js_namespaceObject = require("./pixi-loader.js");
|
|
56
|
+
const store_js_namespaceObject = require("./store/store.js");
|
|
57
57
|
function _define_property(obj, key, value) {
|
|
58
58
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
59
59
|
value: value,
|
|
@@ -215,11 +215,11 @@ function Player(props) {
|
|
|
215
215
|
const repaintImage = async ()=>{
|
|
216
216
|
const imgToUpdate = currentImg.current;
|
|
217
217
|
if (!imgToUpdate) return void console.warn('no image to update');
|
|
218
|
-
if (!(0,
|
|
218
|
+
if (!(0, external_pixi_loader_js_namespaceObject.getTextureFromCache)(imgToUpdate)) {
|
|
219
219
|
console.warn('image not loaded', imgToUpdate);
|
|
220
|
-
await (0,
|
|
220
|
+
await (0, external_pixi_loader_js_namespaceObject.loadTexture)(imgToUpdate);
|
|
221
221
|
}
|
|
222
|
-
const texture = (0,
|
|
222
|
+
const texture = (0, external_pixi_loader_js_namespaceObject.getTextureFromCache)(imgToUpdate);
|
|
223
223
|
if (!texture) throw new Error('texture not found');
|
|
224
224
|
const sprite = external_pixi_js_namespaceObject.Sprite.from(texture);
|
|
225
225
|
if (!sprite) throw new Error('sprite not found');
|
|
@@ -235,7 +235,7 @@ function Player(props) {
|
|
|
235
235
|
const spinningPointer = (frame)=>{
|
|
236
236
|
var _pointerSprite_current, _pointerSprite_current1;
|
|
237
237
|
if (!spinningPointerSprite.current) {
|
|
238
|
-
spinningPointerSprite.current = external_pixi_js_namespaceObject.Sprite.from(
|
|
238
|
+
spinningPointerSprite.current = external_pixi_js_namespaceObject.Sprite.from(external_utils_js_namespaceObject.mouseLoading);
|
|
239
239
|
spinningPointerSprite.current.zIndex = LAYER_ORDER_SPINNING_POINTER;
|
|
240
240
|
spinningPointerSprite.current.anchor.set(0.5, 0.5);
|
|
241
241
|
spinningPointerSprite.current.scale.set(0.5);
|
|
@@ -264,11 +264,11 @@ function Player(props) {
|
|
|
264
264
|
};
|
|
265
265
|
const updatePointer = async (img, x, y)=>{
|
|
266
266
|
var _pointerSprite_current, _pointerSprite_current1;
|
|
267
|
-
if (!(0,
|
|
267
|
+
if (!(0, external_pixi_loader_js_namespaceObject.getTextureFromCache)(img)) {
|
|
268
268
|
console.warn('image not loaded', img);
|
|
269
|
-
await (0,
|
|
269
|
+
await (0, external_pixi_loader_js_namespaceObject.loadTexture)(img);
|
|
270
270
|
}
|
|
271
|
-
const texture = (0,
|
|
271
|
+
const texture = (0, external_pixi_loader_js_namespaceObject.getTextureFromCache)(img);
|
|
272
272
|
if (!texture) throw new Error('texture not found');
|
|
273
273
|
const sprite = external_pixi_js_namespaceObject.Sprite.from(texture);
|
|
274
274
|
let targetX = null == (_pointerSprite_current = pointerSprite.current) ? void 0 : _pointerSprite_current.x;
|
|
@@ -413,7 +413,7 @@ function Player(props) {
|
|
|
413
413
|
const randomIndex = Math.floor(Math.random() * elementsToAdd.length);
|
|
414
414
|
const element = elementsToAdd.splice(randomIndex, 1)[0];
|
|
415
415
|
if (element) {
|
|
416
|
-
const [insightMarkGraphic] = (0,
|
|
416
|
+
const [insightMarkGraphic] = (0, external_blackboard_js_namespaceObject.rectMarkForItem)(element.rect, element.content, 'element');
|
|
417
417
|
insightMarkGraphic.alpha = 0;
|
|
418
418
|
insightMarkContainer.addChild(insightMarkGraphic);
|
|
419
419
|
childrenCount++;
|
|
@@ -425,17 +425,17 @@ function Player(props) {
|
|
|
425
425
|
while(elementsToAdd.length > 0){
|
|
426
426
|
const randomIndex = Math.floor(Math.random() * elementsToAdd.length);
|
|
427
427
|
const element = elementsToAdd.splice(randomIndex, 1)[0];
|
|
428
|
-
const [insightMarkGraphic] = (0,
|
|
428
|
+
const [insightMarkGraphic] = (0, external_blackboard_js_namespaceObject.rectMarkForItem)(element.rect, element.content, 'element');
|
|
429
429
|
insightMarkGraphic.alpha = 1;
|
|
430
430
|
insightMarkContainer.addChild(insightMarkGraphic);
|
|
431
431
|
}
|
|
432
432
|
if (searchArea) {
|
|
433
|
-
const [searchAreaGraphic] = (0,
|
|
433
|
+
const [searchAreaGraphic] = (0, external_blackboard_js_namespaceObject.rectMarkForItem)(searchArea, 'Search Area', 'searchArea');
|
|
434
434
|
searchAreaGraphic.alpha = 1;
|
|
435
435
|
insightMarkContainer.addChild(searchAreaGraphic);
|
|
436
436
|
}
|
|
437
437
|
highlightElements.map((element)=>{
|
|
438
|
-
const [insightMarkGraphic] = (0,
|
|
438
|
+
const [insightMarkGraphic] = (0, external_blackboard_js_namespaceObject.rectMarkForItem)(element.rect, element.content || '', 'highlight');
|
|
439
439
|
insightMarkGraphic.alpha = 1;
|
|
440
440
|
insightMarkContainer.addChild(insightMarkGraphic);
|
|
441
441
|
});
|
|
@@ -482,11 +482,11 @@ function Player(props) {
|
|
|
482
482
|
const allImages = scripts.filter((item)=>!!item.img).map((item)=>item.img);
|
|
483
483
|
await Promise.all([
|
|
484
484
|
...allImages,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
].map(
|
|
485
|
+
external_utils_js_namespaceObject.mouseLoading,
|
|
486
|
+
external_utils_js_namespaceObject.mousePointer
|
|
487
|
+
].map(external_pixi_loader_js_namespaceObject.loadTexture));
|
|
488
488
|
insightMarkContainer.removeChildren();
|
|
489
|
-
await updatePointer(
|
|
489
|
+
await updatePointer(external_utils_js_namespaceObject.mousePointer, imageWidth / 2, imageHeight / 2);
|
|
490
490
|
await repaintImage();
|
|
491
491
|
await updateCamera({
|
|
492
492
|
...basicCameraState
|
|
@@ -39,8 +39,9 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
39
39
|
const external_antd_namespaceObject = require("antd");
|
|
40
40
|
const setting_js_namespaceObject = require("../../icons/setting.js");
|
|
41
41
|
var setting_js_default = /*#__PURE__*/ __webpack_require__.n(setting_js_namespaceObject);
|
|
42
|
-
const store_js_namespaceObject = require("
|
|
43
|
-
const
|
|
42
|
+
const store_js_namespaceObject = require("../store/store.js");
|
|
43
|
+
const external_playground_constants_js_namespaceObject = require("./playground-constants.js");
|
|
44
|
+
require("./index.css");
|
|
44
45
|
const ConfigSelector = (param)=>{
|
|
45
46
|
let { showDeepThinkOption = false, enableTracking = false, showDataExtractionOptions = false, hideDomAndScreenshotOptions = false } = param;
|
|
46
47
|
const forceSameTabNavigation = (0, store_js_namespaceObject.useEnvConfig)((state)=>state.forceSameTabNavigation);
|
|
@@ -74,7 +75,7 @@ const ConfigSelector = (param)=>{
|
|
|
74
75
|
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Checkbox, {
|
|
75
76
|
onChange: (e)=>setForceSameTabNavigation(e.target.checked),
|
|
76
77
|
checked: forceSameTabNavigation,
|
|
77
|
-
children:
|
|
78
|
+
children: external_playground_constants_js_namespaceObject.trackingTip
|
|
78
79
|
}),
|
|
79
80
|
key: 'track-config'
|
|
80
81
|
});
|
|
@@ -84,7 +85,7 @@ const ConfigSelector = (param)=>{
|
|
|
84
85
|
setDeepThink(e.target.checked);
|
|
85
86
|
},
|
|
86
87
|
checked: deepThink,
|
|
87
|
-
children:
|
|
88
|
+
children: external_playground_constants_js_namespaceObject.deepThinkTip
|
|
88
89
|
}),
|
|
89
90
|
key: 'deep-think-config'
|
|
90
91
|
});
|
|
@@ -95,7 +96,7 @@ const ConfigSelector = (param)=>{
|
|
|
95
96
|
setScreenshotIncluded(e.target.checked);
|
|
96
97
|
},
|
|
97
98
|
checked: screenshotIncluded,
|
|
98
|
-
children:
|
|
99
|
+
children: external_playground_constants_js_namespaceObject.screenshotIncludedTip
|
|
99
100
|
}),
|
|
100
101
|
key: 'screenshot-included-config'
|
|
101
102
|
});
|
|
@@ -110,7 +111,7 @@ const ConfigSelector = (param)=>{
|
|
|
110
111
|
marginBottom: '4px',
|
|
111
112
|
fontSize: '14px'
|
|
112
113
|
},
|
|
113
|
-
children:
|
|
114
|
+
children: external_playground_constants_js_namespaceObject.domIncludedTip
|
|
114
115
|
}),
|
|
115
116
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Radio.Group, {
|
|
116
117
|
size: "small",
|
|
@@ -37,11 +37,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const external_antd_namespaceObject = require("antd");
|
|
40
|
-
const
|
|
41
|
-
var
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
var
|
|
40
|
+
const external_blackboard_js_namespaceObject = require("../blackboard.js");
|
|
41
|
+
var external_blackboard_js_default = /*#__PURE__*/ __webpack_require__.n(external_blackboard_js_namespaceObject);
|
|
42
|
+
const external_misc_js_namespaceObject = require("../misc.js");
|
|
43
|
+
const external_playground_demo_ui_context_json_namespaceObject = require("../playground-demo-ui-context.json");
|
|
44
|
+
var external_playground_demo_ui_context_json_default = /*#__PURE__*/ __webpack_require__.n(external_playground_demo_ui_context_json_namespaceObject);
|
|
45
|
+
require("./index.css");
|
|
45
46
|
const ContextPreview = (param)=>{
|
|
46
47
|
let { uiContextPreview, setUiContextPreview, showContextPreview } = param;
|
|
47
48
|
if (!showContextPreview) return null;
|
|
@@ -51,18 +52,18 @@ const ContextPreview = (param)=>{
|
|
|
51
52
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
52
53
|
children: "UI Context"
|
|
53
54
|
}),
|
|
54
|
-
uiContextPreview ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
55
|
+
uiContextPreview ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_blackboard_js_default(), {
|
|
55
56
|
uiContext: uiContextPreview,
|
|
56
57
|
hideController: true
|
|
57
58
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
58
59
|
children: [
|
|
59
|
-
(0,
|
|
60
|
+
(0, external_misc_js_namespaceObject.iconForStatus)('failed'),
|
|
60
61
|
" No UI context",
|
|
61
62
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
62
63
|
type: "link",
|
|
63
64
|
onClick: (e)=>{
|
|
64
65
|
e.preventDefault();
|
|
65
|
-
setUiContextPreview(
|
|
66
|
+
setUiContextPreview(external_playground_demo_ui_context_json_default());
|
|
66
67
|
},
|
|
67
68
|
children: "Load Demo"
|
|
68
69
|
}),
|
|
@@ -44,7 +44,7 @@ const history_js_namespaceObject = require("../../icons/history.js");
|
|
|
44
44
|
var history_js_default = /*#__PURE__*/ __webpack_require__.n(history_js_namespaceObject);
|
|
45
45
|
const magnifying_glass_js_namespaceObject = require("../../icons/magnifying-glass.js");
|
|
46
46
|
var magnifying_glass_js_default = /*#__PURE__*/ __webpack_require__.n(magnifying_glass_js_namespaceObject);
|
|
47
|
-
const external_store_history_js_namespaceObject = require("
|
|
47
|
+
const external_store_history_js_namespaceObject = require("../store/history.js");
|
|
48
48
|
require("./index.css");
|
|
49
49
|
const { Text } = external_antd_namespaceObject.Typography;
|
|
50
50
|
const HistorySelector = (param)=>{
|
|
@@ -38,16 +38,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
40
40
|
const external_antd_namespaceObject = require("antd");
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const external_player_js_namespaceObject = require("../player.js");
|
|
42
|
+
const external_shiny_text_js_namespaceObject = require("../shiny-text.js");
|
|
43
|
+
var external_shiny_text_js_default = /*#__PURE__*/ __webpack_require__.n(external_shiny_text_js_namespaceObject);
|
|
44
|
+
const external_playground_constants_js_namespaceObject = require("./playground-constants.js");
|
|
45
|
+
require("./index.css");
|
|
45
46
|
const PlaygroundResultView = (param)=>{
|
|
46
47
|
let { result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode, autoZoom } = param;
|
|
47
48
|
let resultWrapperClassName = 'result-wrapper';
|
|
48
49
|
if (verticalMode) resultWrapperClassName += ' vertical-mode-result';
|
|
49
50
|
if (replayScriptsInfo && verticalMode) resultWrapperClassName += ' result-wrapper-compact';
|
|
50
|
-
let resultDataToShow =
|
|
51
|
+
let resultDataToShow = external_playground_constants_js_namespaceObject.emptyResultTip;
|
|
51
52
|
if (serverValid || 'Server' !== serviceMode) {
|
|
52
53
|
if (loading) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
53
54
|
className: "loading-container",
|
|
@@ -60,14 +61,14 @@ const PlaygroundResultView = (param)=>{
|
|
|
60
61
|
}),
|
|
61
62
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
62
63
|
className: "loading-progress-text loading-progress-text-progress",
|
|
63
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
64
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_js_default(), {
|
|
64
65
|
text: loadingProgressText,
|
|
65
66
|
speed: 3
|
|
66
67
|
})
|
|
67
68
|
})
|
|
68
69
|
]
|
|
69
70
|
});
|
|
70
|
-
else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
71
|
+
else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_player_js_namespaceObject.Player, {
|
|
71
72
|
replayScripts: replayScriptsInfo.scripts,
|
|
72
73
|
imageWidth: replayScriptsInfo.width,
|
|
73
74
|
imageHeight: replayScriptsInfo.height,
|
|
@@ -83,7 +84,7 @@ const PlaygroundResultView = (param)=>{
|
|
|
83
84
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
|
|
84
85
|
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
85
86
|
});
|
|
86
|
-
} else resultDataToShow = (0,
|
|
87
|
+
} else resultDataToShow = (0, external_playground_constants_js_namespaceObject.serverLaunchTip)(notReadyMessage);
|
|
87
88
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
88
89
|
className: resultWrapperClassName,
|
|
89
90
|
style: {
|
|
@@ -37,23 +37,23 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
40
|
-
require("./index.css");
|
|
41
40
|
const external_antd_namespaceObject = require("antd");
|
|
42
41
|
const external_react_namespaceObject = require("react");
|
|
43
42
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
44
|
-
const history_js_namespaceObject = require("
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
43
|
+
const history_js_namespaceObject = require("../store/history.js");
|
|
44
|
+
const external_ConfigSelector_js_namespaceObject = require("./ConfigSelector.js");
|
|
45
|
+
const external_FormField_js_namespaceObject = require("./FormField.js");
|
|
46
|
+
const external_HistorySelector_js_namespaceObject = require("./HistorySelector.js");
|
|
47
|
+
const external_playground_constants_js_namespaceObject = require("./playground-constants.js");
|
|
48
|
+
const external_playground_utils_js_namespaceObject = require("./playground-utils.js");
|
|
49
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
50
|
+
require("./index.css");
|
|
51
51
|
const { TextArea } = external_antd_namespaceObject.Input;
|
|
52
52
|
const PromptInput = (param)=>{
|
|
53
53
|
let { runButtonEnabled, form, serviceMode, selectedType, dryMode, stoppable, loading, onRun, onStop, clearPromptAfterRun = true, actionSpace, hideDomAndScreenshotOptions = false } = param;
|
|
54
54
|
const [hoveringSettings, setHoveringSettings] = (0, external_react_namespaceObject.useState)(false);
|
|
55
55
|
const [promptValue, setPromptValue] = (0, external_react_namespaceObject.useState)('');
|
|
56
|
-
const placeholder = (0,
|
|
56
|
+
const placeholder = (0, external_playground_utils_js_namespaceObject.getPlaceholderForType)(selectedType);
|
|
57
57
|
const textAreaRef = (0, external_react_namespaceObject.useRef)(null);
|
|
58
58
|
const params = external_antd_namespaceObject.Form.useWatch('params', form);
|
|
59
59
|
const lastHistoryRef = (0, external_react_namespaceObject.useRef)(null);
|
|
@@ -149,12 +149,12 @@ const PromptInput = (param)=>{
|
|
|
149
149
|
hideDomAndScreenshotOptions
|
|
150
150
|
]);
|
|
151
151
|
const availableDropdownMethods = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
152
|
-
const metadataMethods = Object.keys(
|
|
152
|
+
const metadataMethods = Object.keys(external_playground_constants_js_namespaceObject.apiMetadata);
|
|
153
153
|
if (!actionSpace || 0 === actionSpace.length) return metadataMethods;
|
|
154
154
|
const availableMethods = actionSpace.map((action)=>action.interfaceAlias || action.name);
|
|
155
155
|
const finalMethods = new Set();
|
|
156
156
|
metadataMethods.forEach((method)=>{
|
|
157
|
-
const methodInfo =
|
|
157
|
+
const methodInfo = external_playground_constants_js_namespaceObject.apiMetadata[method];
|
|
158
158
|
if ((null == methodInfo ? void 0 : methodInfo.group) === 'extraction' || (null == methodInfo ? void 0 : methodInfo.group) === 'validation') finalMethods.add(method);
|
|
159
159
|
else if (availableMethods.includes(method)) finalMethods.add(method);
|
|
160
160
|
});
|
|
@@ -259,7 +259,7 @@ const PromptInput = (param)=>{
|
|
|
259
259
|
needsStructuredParams,
|
|
260
260
|
actionSpace
|
|
261
261
|
]);
|
|
262
|
-
const isRunButtonEnabled = (0, external_react_namespaceObject.useMemo)(()=>(0,
|
|
262
|
+
const isRunButtonEnabled = (0, external_react_namespaceObject.useMemo)(()=>(0, external_playground_utils_js_namespaceObject.isRunButtonEnabled)(runButtonEnabled, !!needsStructuredParams, params, actionSpace, selectedType, promptValue), [
|
|
263
263
|
runButtonEnabled,
|
|
264
264
|
needsStructuredParams,
|
|
265
265
|
selectedType,
|
|
@@ -443,19 +443,19 @@ const PromptInput = (param)=>{
|
|
|
443
443
|
marginBottom,
|
|
444
444
|
placeholder
|
|
445
445
|
};
|
|
446
|
-
if (isLocateFieldFlag) fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
446
|
+
if (isLocateFieldFlag) fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormField_js_namespaceObject.LocateField, {
|
|
447
447
|
...fieldProps
|
|
448
448
|
}, key));
|
|
449
|
-
else if ((null == (_actualField__def = actualField._def) ? void 0 : _actualField__def.typeName) === 'ZodEnum') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
449
|
+
else if ((null == (_actualField__def = actualField._def) ? void 0 : _actualField__def.typeName) === 'ZodEnum') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormField_js_namespaceObject.EnumField, {
|
|
450
450
|
...fieldProps
|
|
451
451
|
}, key));
|
|
452
|
-
else if ((null == (_actualField__def1 = actualField._def) ? void 0 : _actualField__def1.typeName) === 'ZodNumber') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
452
|
+
else if ((null == (_actualField__def1 = actualField._def) ? void 0 : _actualField__def1.typeName) === 'ZodNumber') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormField_js_namespaceObject.NumberField, {
|
|
453
453
|
...fieldProps
|
|
454
454
|
}, key));
|
|
455
|
-
else if ((null == (_actualField__def2 = actualField._def) ? void 0 : _actualField__def2.typeName) === 'ZodBoolean') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
455
|
+
else if ((null == (_actualField__def2 = actualField._def) ? void 0 : _actualField__def2.typeName) === 'ZodBoolean') fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormField_js_namespaceObject.BooleanField, {
|
|
456
456
|
...fieldProps
|
|
457
457
|
}, key));
|
|
458
|
-
else fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
458
|
+
else fields.push(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormField_js_namespaceObject.TextField, {
|
|
459
459
|
...fieldProps
|
|
460
460
|
}, key));
|
|
461
461
|
});
|
|
@@ -553,13 +553,13 @@ const PromptInput = (param)=>{
|
|
|
553
553
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Radio.Group, {
|
|
554
554
|
buttonStyle: "solid",
|
|
555
555
|
disabled: !runButtonEnabled,
|
|
556
|
-
children:
|
|
556
|
+
children: external_playground_constants_js_namespaceObject.defaultMainButtons.map((apiType)=>{
|
|
557
557
|
var _apiMetadata_apiType;
|
|
558
558
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
559
|
-
title: (null == (_apiMetadata_apiType =
|
|
559
|
+
title: (null == (_apiMetadata_apiType = external_playground_constants_js_namespaceObject.apiMetadata[apiType]) ? void 0 : _apiMetadata_apiType.title) || '',
|
|
560
560
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Radio.Button, {
|
|
561
561
|
value: apiType,
|
|
562
|
-
children: (0,
|
|
562
|
+
children: (0, external_playground_utils_js_namespaceObject.actionNameForType)(apiType)
|
|
563
563
|
})
|
|
564
564
|
}, apiType);
|
|
565
565
|
})
|
|
@@ -567,11 +567,11 @@ const PromptInput = (param)=>{
|
|
|
567
567
|
}),
|
|
568
568
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Dropdown, {
|
|
569
569
|
menu: (()=>{
|
|
570
|
-
const hiddenAPIs = availableDropdownMethods.filter((api)=>!
|
|
570
|
+
const hiddenAPIs = availableDropdownMethods.filter((api)=>!external_playground_constants_js_namespaceObject.defaultMainButtons.includes(api));
|
|
571
571
|
const groupedItems = [];
|
|
572
572
|
const interactionAPIs = hiddenAPIs.filter((api)=>{
|
|
573
573
|
var _apiMetadata_api;
|
|
574
|
-
return (null == (_apiMetadata_api =
|
|
574
|
+
return (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.group) === 'interaction';
|
|
575
575
|
});
|
|
576
576
|
if (interactionAPIs.length > 0) groupedItems.push({
|
|
577
577
|
key: 'interaction-group',
|
|
@@ -581,8 +581,8 @@ const PromptInput = (param)=>{
|
|
|
581
581
|
var _apiMetadata_api;
|
|
582
582
|
return {
|
|
583
583
|
key: api,
|
|
584
|
-
label: (0,
|
|
585
|
-
title: (null == (_apiMetadata_api =
|
|
584
|
+
label: (0, external_playground_utils_js_namespaceObject.actionNameForType)(api),
|
|
585
|
+
title: (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.title) || '',
|
|
586
586
|
onClick: ()=>{
|
|
587
587
|
form.setFieldValue('type', api);
|
|
588
588
|
}
|
|
@@ -591,7 +591,7 @@ const PromptInput = (param)=>{
|
|
|
591
591
|
});
|
|
592
592
|
const extractionAPIs = hiddenAPIs.filter((api)=>{
|
|
593
593
|
var _apiMetadata_api;
|
|
594
|
-
return (null == (_apiMetadata_api =
|
|
594
|
+
return (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.group) === 'extraction';
|
|
595
595
|
});
|
|
596
596
|
if (extractionAPIs.length > 0) groupedItems.push({
|
|
597
597
|
key: 'extraction-group',
|
|
@@ -601,8 +601,8 @@ const PromptInput = (param)=>{
|
|
|
601
601
|
var _apiMetadata_api;
|
|
602
602
|
return {
|
|
603
603
|
key: api,
|
|
604
|
-
label: (0,
|
|
605
|
-
title: (null == (_apiMetadata_api =
|
|
604
|
+
label: (0, external_playground_utils_js_namespaceObject.actionNameForType)(api),
|
|
605
|
+
title: (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.title) || '',
|
|
606
606
|
onClick: ()=>{
|
|
607
607
|
form.setFieldValue('type', api);
|
|
608
608
|
}
|
|
@@ -611,7 +611,7 @@ const PromptInput = (param)=>{
|
|
|
611
611
|
});
|
|
612
612
|
const validationAPIs = hiddenAPIs.filter((api)=>{
|
|
613
613
|
var _apiMetadata_api;
|
|
614
|
-
return (null == (_apiMetadata_api =
|
|
614
|
+
return (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.group) === 'validation';
|
|
615
615
|
});
|
|
616
616
|
if (validationAPIs.length > 0) groupedItems.push({
|
|
617
617
|
key: 'validation-group',
|
|
@@ -621,22 +621,22 @@ const PromptInput = (param)=>{
|
|
|
621
621
|
var _apiMetadata_api;
|
|
622
622
|
return {
|
|
623
623
|
key: api,
|
|
624
|
-
label: (0,
|
|
625
|
-
title: (null == (_apiMetadata_api =
|
|
624
|
+
label: (0, external_playground_utils_js_namespaceObject.actionNameForType)(api),
|
|
625
|
+
title: (null == (_apiMetadata_api = external_playground_constants_js_namespaceObject.apiMetadata[api]) ? void 0 : _apiMetadata_api.title) || '',
|
|
626
626
|
onClick: ()=>{
|
|
627
627
|
form.setFieldValue('type', api);
|
|
628
628
|
}
|
|
629
629
|
};
|
|
630
630
|
})
|
|
631
631
|
});
|
|
632
|
-
const deviceSpecificAPIs = hiddenAPIs.filter((api)=>!
|
|
632
|
+
const deviceSpecificAPIs = hiddenAPIs.filter((api)=>!external_playground_constants_js_namespaceObject.apiMetadata[api]);
|
|
633
633
|
if (deviceSpecificAPIs.length > 0) groupedItems.push({
|
|
634
634
|
key: 'device-specific-group',
|
|
635
635
|
type: 'group',
|
|
636
636
|
label: 'Device-Specific APIs',
|
|
637
637
|
children: deviceSpecificAPIs.map((api)=>({
|
|
638
638
|
key: api,
|
|
639
|
-
label: (0,
|
|
639
|
+
label: (0, external_playground_utils_js_namespaceObject.actionNameForType)(api),
|
|
640
640
|
title: '',
|
|
641
641
|
onClick: ()=>{
|
|
642
642
|
form.setFieldValue('type', api);
|
|
@@ -653,9 +653,9 @@ const PromptInput = (param)=>{
|
|
|
653
653
|
],
|
|
654
654
|
disabled: !runButtonEnabled,
|
|
655
655
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Button, {
|
|
656
|
-
className: `more-apis-button ${!
|
|
656
|
+
className: `more-apis-button ${!external_playground_constants_js_namespaceObject.defaultMainButtons.includes(selectedType) ? 'selected-from-dropdown' : ''}`,
|
|
657
657
|
children: [
|
|
658
|
-
selectedType && !
|
|
658
|
+
selectedType && !external_playground_constants_js_namespaceObject.defaultMainButtons.includes(selectedType) ? (0, external_playground_utils_js_namespaceObject.actionNameForType)(selectedType) : 'more',
|
|
659
659
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DownOutlined, {
|
|
660
660
|
style: {
|
|
661
661
|
fontSize: '10px',
|
|
@@ -670,7 +670,7 @@ const PromptInput = (param)=>{
|
|
|
670
670
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
671
671
|
className: "action-icons",
|
|
672
672
|
children: [
|
|
673
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
673
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_HistorySelector_js_namespaceObject.HistorySelector, {
|
|
674
674
|
onSelect: handleSelectHistory,
|
|
675
675
|
history: historyForSelectedType,
|
|
676
676
|
currentType: selectedType
|
|
@@ -679,7 +679,7 @@ const PromptInput = (param)=>{
|
|
|
679
679
|
className: hoveringSettings ? 'settings-wrapper settings-wrapper-hover' : 'settings-wrapper',
|
|
680
680
|
onMouseEnter: handleMouseEnter,
|
|
681
681
|
onMouseLeave: handleMouseLeave,
|
|
682
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
682
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ConfigSelector_js_namespaceObject.ConfigSelector, {
|
|
683
683
|
enableTracking: 'In-Browser-Extension' === serviceMode,
|
|
684
684
|
showDeepThinkOption: showDeepThinkOption,
|
|
685
685
|
showDataExtractionOptions: showDataExtractionOptions,
|
|
@@ -721,7 +721,7 @@ const PromptInput = (param)=>{
|
|
|
721
721
|
},
|
|
722
722
|
children: [
|
|
723
723
|
'Click "Run" to execute ',
|
|
724
|
-
(0,
|
|
724
|
+
(0, external_playground_utils_js_namespaceObject.actionNameForType)(selectedType)
|
|
725
725
|
]
|
|
726
726
|
}),
|
|
727
727
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|