@midscene/visualizer 0.28.2-beta-20250910043028.0 → 0.28.2-beta-20250910065550.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/blank_polyfill.mjs +2 -0
- 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} +43 -23
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/{utils → component/playground}/playground-utils.mjs +1 -1
- 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/blank_polyfill.js +36 -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} +64 -31
- package/dist/lib/component/playground/playground-types.js +18 -0
- package/dist/lib/{utils → component/playground}/playground-utils.js +1 -1
- 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/init.js +44 -0
- package/dist/types/blank_polyfill.d.ts +2 -0
- 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} +5 -3
- 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 -5
- 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 -168
- package/dist/es/hooks/usePlaygroundState.mjs +0 -176
- package/dist/es/icons/avatar.mjs +0 -28
- 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 -202
- package/dist/lib/hooks/usePlaygroundState.js +0 -210
- package/dist/lib/icons/avatar.js +0 -62
- 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 -164
- /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/{types.mjs → component/playground/types.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/{types.js → component/playground/types.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
|
@@ -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", {
|
package/dist/lib/component/{service-mode-control/index.js → playground/ServiceModeControl.js}
RENAMED
|
@@ -31,10 +31,11 @@ const playground_namespaceObject = require("@midscene/playground");
|
|
|
31
31
|
const env_namespaceObject = require("@midscene/shared/env");
|
|
32
32
|
const external_antd_namespaceObject = require("antd");
|
|
33
33
|
const external_react_namespaceObject = require("react");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
34
|
+
const external_env_config_js_namespaceObject = require("../env-config.js");
|
|
35
|
+
const external_misc_js_namespaceObject = require("../misc.js");
|
|
36
|
+
const store_js_namespaceObject = require("../store/store.js");
|
|
37
|
+
const external_useServerValid_js_namespaceObject = require("./useServerValid.js");
|
|
38
|
+
require("./index.css");
|
|
38
39
|
const TITLE_TEXT = {
|
|
39
40
|
Server: 'Server Status',
|
|
40
41
|
'In-Browser': 'In-Browser'
|
|
@@ -46,20 +47,20 @@ const SWITCH_BUTTON_TEXT = {
|
|
|
46
47
|
const ServiceModeControl = (param)=>{
|
|
47
48
|
let { serviceMode } = param;
|
|
48
49
|
const { setServiceMode, config } = (0, store_js_namespaceObject.useEnvConfig)();
|
|
49
|
-
const serverValid = (0,
|
|
50
|
+
const serverValid = (0, external_useServerValid_js_namespaceObject.useServerValid)('Server' === serviceMode);
|
|
50
51
|
const renderServerTip = ()=>{
|
|
51
52
|
if (serverValid) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
52
53
|
title: "Connected",
|
|
53
54
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
54
55
|
className: "server-tip",
|
|
55
|
-
children: (0,
|
|
56
|
+
children: (0, external_misc_js_namespaceObject.iconForStatus)('connected')
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
59
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
59
60
|
title: "Connection failed",
|
|
60
61
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
61
62
|
className: "server-tip",
|
|
62
|
-
children: (0,
|
|
63
|
+
children: (0, external_misc_js_namespaceObject.iconForStatus)('failed')
|
|
63
64
|
})
|
|
64
65
|
});
|
|
65
66
|
};
|
|
@@ -118,7 +119,7 @@ const ServiceModeControl = (param)=>{
|
|
|
118
119
|
children: title
|
|
119
120
|
}),
|
|
120
121
|
statusContent,
|
|
121
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
122
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_env_config_js_namespaceObject.EnvConfig, {
|
|
122
123
|
showTooltipWhenEmpty: 'Server' !== serviceMode
|
|
123
124
|
})
|
|
124
125
|
]
|
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
justify-content: center;
|
|
3
|
-
height: 100%;
|
|
4
|
-
margin: 4px 0;
|
|
5
|
-
display: flex;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.result-wrapper .loading-container {
|
|
9
|
-
text-align: center;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.result-wrapper .loading-container .loading-progress-text {
|
|
13
|
-
color: #888;
|
|
14
|
-
margin-top: 8px;
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.result-wrapper pre {
|
|
19
|
-
white-space: pre-wrap;
|
|
20
|
-
text-wrap: unset;
|
|
21
|
-
word-wrap: break-word;
|
|
22
|
-
overflow-wrap: break-word;
|
|
23
|
-
background: #f2f4f7;
|
|
24
|
-
border-radius: 8px;
|
|
1
|
+
body {
|
|
25
2
|
margin: 0;
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
|
|
4
|
+
font-size: 14px;
|
|
28
5
|
}
|
|
29
6
|
|
|
30
7
|
.prompt-input-wrapper {
|
|
@@ -357,9 +334,164 @@
|
|
|
357
334
|
color: #2b83ff;
|
|
358
335
|
}
|
|
359
336
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
337
|
+
.history-modal-container {
|
|
338
|
+
border-radius: 12px 12px 0 0;
|
|
339
|
+
flex-direction: column;
|
|
340
|
+
height: 70vh;
|
|
341
|
+
display: flex;
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.history-modal-container .history-modal-header {
|
|
346
|
+
justify-content: space-between;
|
|
347
|
+
align-items: center;
|
|
348
|
+
height: 48px;
|
|
349
|
+
padding: 0 25px;
|
|
350
|
+
line-height: 48px;
|
|
351
|
+
display: flex;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.history-modal-container .history-modal-header .close-button {
|
|
355
|
+
justify-content: center;
|
|
356
|
+
align-items: center;
|
|
357
|
+
margin-right: -4px;
|
|
358
|
+
padding: 4px;
|
|
359
|
+
display: flex;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.history-modal-container .history-modal-header .close-button .anticon {
|
|
363
|
+
color: #999;
|
|
364
|
+
font-size: 18px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.history-modal-container .history-modal-header .close-button:hover .anticon {
|
|
368
|
+
color: #666;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.history-modal-container .history-search-section {
|
|
372
|
+
background: #fff;
|
|
373
|
+
padding: 16px 20px;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.history-modal-container .history-search-section .search-input-wrapper {
|
|
377
|
+
color: rgba(0, 0, 0, .25);
|
|
378
|
+
align-items: center;
|
|
379
|
+
gap: 12px;
|
|
380
|
+
display: flex;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.history-modal-container .history-search-section .search-input-wrapper .search-input {
|
|
384
|
+
background: #f1f2f3;
|
|
385
|
+
border: none;
|
|
386
|
+
border-radius: 16px;
|
|
387
|
+
flex: 1;
|
|
388
|
+
height: 36px;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.history-modal-container .history-search-section .search-input-wrapper .search-input .ant-input {
|
|
392
|
+
box-shadow: none;
|
|
393
|
+
background: none;
|
|
394
|
+
border: none;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.history-modal-container .history-search-section .search-input-wrapper .search-input:hover, .history-modal-container .history-search-section .search-input-wrapper .search-input:focus-within {
|
|
398
|
+
background: #fff;
|
|
399
|
+
border-color: #d9d9d9;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.history-modal-container .history-search-section .search-input-wrapper .clear-button {
|
|
403
|
+
color: #1890ff;
|
|
404
|
+
height: auto;
|
|
405
|
+
padding: 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.history-modal-container .history-search-section .search-input-wrapper .clear-button:hover {
|
|
409
|
+
color: #40a9ff;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.history-modal-container .history-content {
|
|
413
|
+
flex: 1;
|
|
414
|
+
padding: 0 25px 25px;
|
|
415
|
+
overflow-y: auto;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.history-modal-container .history-content .history-group {
|
|
419
|
+
margin-bottom: 10px;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.history-modal-container .history-content .history-group .history-group-title {
|
|
423
|
+
color: rgba(0, 0, 0, .45);
|
|
424
|
+
height: 40px;
|
|
425
|
+
font-size: 12px;
|
|
426
|
+
font-weight: 400;
|
|
427
|
+
line-height: 40px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.history-modal-container .history-content .history-group .history-item {
|
|
431
|
+
cursor: pointer;
|
|
432
|
+
color: rgba(0, 0, 0, .85);
|
|
433
|
+
white-space: nowrap;
|
|
434
|
+
text-overflow: ellipsis;
|
|
435
|
+
height: 40px;
|
|
363
436
|
font-size: 14px;
|
|
437
|
+
line-height: 40px;
|
|
438
|
+
overflow: hidden;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.history-modal-container .history-content .history-group .history-item:hover {
|
|
442
|
+
background: #f2f4f7;
|
|
443
|
+
margin: 0 -8px;
|
|
444
|
+
padding: 0 8px;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.history-modal-container .history-content .no-results {
|
|
448
|
+
text-align: center;
|
|
449
|
+
color: #999;
|
|
450
|
+
padding: 40px 20px;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ant-modal-wrap .ant-modal-content {
|
|
454
|
+
animation: .3s cubic-bezier(.4, 0, .2, 1) forwards slideUpFromBottom !important;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@keyframes slideUpFromBottom {
|
|
458
|
+
0% {
|
|
459
|
+
opacity: 0;
|
|
460
|
+
transform: translateY(100%);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
100% {
|
|
464
|
+
opacity: 1;
|
|
465
|
+
transform: translateY(0);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.result-wrapper {
|
|
470
|
+
justify-content: center;
|
|
471
|
+
height: 100%;
|
|
472
|
+
margin: 4px 0;
|
|
473
|
+
display: flex;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.result-wrapper .loading-container {
|
|
477
|
+
text-align: center;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.result-wrapper .loading-container .loading-progress-text {
|
|
481
|
+
color: #888;
|
|
482
|
+
margin-top: 8px;
|
|
483
|
+
font-size: 12px;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.result-wrapper pre {
|
|
487
|
+
white-space: pre-wrap;
|
|
488
|
+
text-wrap: unset;
|
|
489
|
+
word-wrap: break-word;
|
|
490
|
+
overflow-wrap: break-word;
|
|
491
|
+
background: #f2f4f7;
|
|
492
|
+
border-radius: 8px;
|
|
493
|
+
margin: 0;
|
|
494
|
+
padding: 14px;
|
|
495
|
+
overflow: scroll;
|
|
364
496
|
}
|
|
365
497
|
|
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
})();
|
|
3
12
|
(()=>{
|
|
4
13
|
__webpack_require__.d = (exports1, definition)=>{
|
|
5
14
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -24,14 +33,58 @@ var __webpack_require__ = {};
|
|
|
24
33
|
var __webpack_exports__ = {};
|
|
25
34
|
__webpack_require__.r(__webpack_exports__);
|
|
26
35
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
screenshotIncludedTip: ()=>screenshotIncludedTip,
|
|
37
|
+
errorMessageServerNotReady: ()=>errorMessageServerNotReady,
|
|
38
|
+
serverLaunchTip: ()=>serverLaunchTip,
|
|
39
|
+
defaultMainButtons: ()=>defaultMainButtons,
|
|
29
40
|
apiMetadata: ()=>apiMetadata,
|
|
41
|
+
trackingTip: ()=>trackingTip,
|
|
30
42
|
deepThinkTip: ()=>deepThinkTip,
|
|
31
|
-
defaultMainButtons: ()=>defaultMainButtons,
|
|
32
43
|
domIncludedTip: ()=>domIncludedTip,
|
|
33
|
-
|
|
34
|
-
|
|
44
|
+
emptyResultTip: ()=>emptyResultTip
|
|
45
|
+
});
|
|
46
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
47
|
+
const external_antd_namespaceObject = require("antd");
|
|
48
|
+
const external_shiny_text_js_namespaceObject = require("../shiny-text.js");
|
|
49
|
+
var external_shiny_text_js_default = /*#__PURE__*/ __webpack_require__.n(external_shiny_text_js_namespaceObject);
|
|
50
|
+
require("./index.css");
|
|
51
|
+
const errorMessageServerNotReady = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
52
|
+
children: [
|
|
53
|
+
"Don't worry, just one more step to launch the playground server.",
|
|
54
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
55
|
+
"Please run one of the commands under the midscene project directory:",
|
|
56
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
57
|
+
"a. ",
|
|
58
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("strong", {
|
|
59
|
+
children: "npx midscene-playground"
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("br", {}),
|
|
62
|
+
"b. ",
|
|
63
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("strong", {
|
|
64
|
+
children: "npx --yes @midscene/web"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
const serverLaunchTip = function() {
|
|
69
|
+
let notReadyMessage = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : errorMessageServerNotReady;
|
|
70
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
71
|
+
className: "server-tip",
|
|
72
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
|
|
73
|
+
message: "Playground Server Not Ready",
|
|
74
|
+
description: notReadyMessage,
|
|
75
|
+
type: "warning"
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const emptyResultTip = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
80
|
+
className: "result-empty-tip",
|
|
81
|
+
style: {
|
|
82
|
+
textAlign: 'center'
|
|
83
|
+
},
|
|
84
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_js_default(), {
|
|
85
|
+
disabled: true,
|
|
86
|
+
text: "The result will be shown here"
|
|
87
|
+
})
|
|
35
88
|
});
|
|
36
89
|
const trackingTip = 'limit popup to current tab';
|
|
37
90
|
const deepThinkTip = 'deep think';
|
|
@@ -109,44 +162,24 @@ const defaultMainButtons = [
|
|
|
109
162
|
'aiQuery',
|
|
110
163
|
'aiAssert'
|
|
111
164
|
];
|
|
112
|
-
const WELCOME_MESSAGE_TEMPLATE = {
|
|
113
|
-
type: 'system',
|
|
114
|
-
content: `
|
|
115
|
-
Welcome to Midscene.js Playground!
|
|
116
|
-
|
|
117
|
-
This is a panel for experimenting and testing Midscene.js features. You can use natural language instructions to operate the web page, such as clicking buttons, filling in forms, querying information, etc.
|
|
118
|
-
|
|
119
|
-
Please enter your instructions in the input box below to start experiencing.
|
|
120
|
-
`,
|
|
121
|
-
loading: false,
|
|
122
|
-
result: void 0,
|
|
123
|
-
replayScriptsInfo: null,
|
|
124
|
-
replayCounter: 0,
|
|
125
|
-
loadingProgressText: '',
|
|
126
|
-
verticalMode: false
|
|
127
|
-
};
|
|
128
|
-
const BLANK_RESULT = {
|
|
129
|
-
result: void 0,
|
|
130
|
-
dump: null,
|
|
131
|
-
reportHTML: null,
|
|
132
|
-
error: null
|
|
133
|
-
};
|
|
134
|
-
exports.BLANK_RESULT = __webpack_exports__.BLANK_RESULT;
|
|
135
|
-
exports.WELCOME_MESSAGE_TEMPLATE = __webpack_exports__.WELCOME_MESSAGE_TEMPLATE;
|
|
136
165
|
exports.apiMetadata = __webpack_exports__.apiMetadata;
|
|
137
166
|
exports.deepThinkTip = __webpack_exports__.deepThinkTip;
|
|
138
167
|
exports.defaultMainButtons = __webpack_exports__.defaultMainButtons;
|
|
139
168
|
exports.domIncludedTip = __webpack_exports__.domIncludedTip;
|
|
169
|
+
exports.emptyResultTip = __webpack_exports__.emptyResultTip;
|
|
170
|
+
exports.errorMessageServerNotReady = __webpack_exports__.errorMessageServerNotReady;
|
|
140
171
|
exports.screenshotIncludedTip = __webpack_exports__.screenshotIncludedTip;
|
|
172
|
+
exports.serverLaunchTip = __webpack_exports__.serverLaunchTip;
|
|
141
173
|
exports.trackingTip = __webpack_exports__.trackingTip;
|
|
142
174
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
143
|
-
"BLANK_RESULT",
|
|
144
|
-
"WELCOME_MESSAGE_TEMPLATE",
|
|
145
175
|
"apiMetadata",
|
|
146
176
|
"deepThinkTip",
|
|
147
177
|
"defaultMainButtons",
|
|
148
178
|
"domIncludedTip",
|
|
179
|
+
"emptyResultTip",
|
|
180
|
+
"errorMessageServerNotReady",
|
|
149
181
|
"screenshotIncludedTip",
|
|
182
|
+
"serverLaunchTip",
|
|
150
183
|
"trackingTip"
|
|
151
184
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
152
185
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
@@ -30,7 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
getPlaceholderForType: ()=>getPlaceholderForType
|
|
31
31
|
});
|
|
32
32
|
const static_namespaceObject = require("@midscene/web/static");
|
|
33
|
-
const external_types_js_namespaceObject = require("
|
|
33
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
34
34
|
const actionNameForType = (type)=>{
|
|
35
35
|
const typeWithoutAi = type.startsWith('ai') ? type.slice(2) : type;
|
|
36
36
|
const fullName = typeWithoutAi.replace(/([A-Z])/g, ' $1').trim();
|
|
@@ -30,7 +30,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
generateAnimationScripts: ()=>generateAnimationScripts,
|
|
31
31
|
allScriptsFromDump: ()=>allScriptsFromDump
|
|
32
32
|
});
|
|
33
|
-
|
|
33
|
+
require("./player.css");
|
|
34
|
+
const external_utils_js_namespaceObject = require("../utils.js");
|
|
34
35
|
const agent_namespaceObject = require("@midscene/core/agent");
|
|
35
36
|
const extractor_namespaceObject = require("@midscene/shared/extractor");
|
|
36
37
|
const stillDuration = 900;
|
|
@@ -233,7 +234,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
|
|
|
233
234
|
var _task_recorder_, _task_recorder, _task_recorder_1, _task_recorder1;
|
|
234
235
|
const title = (0, agent_namespaceObject.typeStr)(task);
|
|
235
236
|
const subTitle = (0, agent_namespaceObject.paramStr)(task);
|
|
236
|
-
scripts.push(pointerScript(
|
|
237
|
+
scripts.push(pointerScript(external_utils_js_namespaceObject.mousePointer, title, subTitle));
|
|
237
238
|
currentCameraState = null != insightCameraState ? insightCameraState : fullPageCameraState;
|
|
238
239
|
scripts.push({
|
|
239
240
|
type: 'img',
|
|
@@ -261,7 +262,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
|
|
|
261
262
|
title,
|
|
262
263
|
subTitle
|
|
263
264
|
});
|
|
264
|
-
scripts.push(pointerScript(
|
|
265
|
+
scripts.push(pointerScript(external_utils_js_namespaceObject.mousePointer, title, subTitle));
|
|
265
266
|
scripts.push({
|
|
266
267
|
type: 'img',
|
|
267
268
|
img: null == (_task_recorder2 = task.recorder) ? void 0 : null == (_task_recorder_2 = _task_recorder2[1]) ? void 0 : _task_recorder_2.screenshot,
|