@midscene/visualizer 0.28.1-beta-20250909063633.0 → 0.28.2-beta-20250909133629.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/browser.mjs +18 -0
- 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 +170 -0
- package/dist/es/hooks/usePlaygroundState.mjs +173 -0
- package/dist/es/icons/avatar.mjs +14 -0
- package/dist/es/index.mjs +22 -18
- package/dist/es/{component/playground/types.mjs → types.mjs} +23 -1
- package/dist/es/{component/playground/playground-constants.mjs → utils/constants.mjs} +1 -2
- package/dist/es/{component/playground → utils}/playground-utils.mjs +1 -1
- package/dist/es/{component → utils}/replay-scripts.mjs +1 -2
- package/dist/lib/browser.js +132 -0
- 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 +204 -0
- package/dist/lib/hooks/usePlaygroundState.js +207 -0
- package/dist/lib/{init.js → icons/avatar.js} +16 -12
- package/dist/lib/index.js +66 -34
- package/dist/lib/{component/playground/types.js → types.js} +28 -0
- package/dist/lib/{component/playground/playground-constants.js → utils/constants.js} +3 -4
- package/dist/lib/{component/playground → utils}/playground-utils.js +1 -1
- package/dist/lib/{component → utils}/replay-scripts.js +3 -4
- package/dist/types/browser.d.ts +19 -0
- 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 +166 -0
- package/dist/types/{component/playground/playground-constants.d.ts → utils/constants.d.ts} +0 -1
- package/dist/types/{component → utils}/replay-scripts.d.ts +0 -1
- package/package.json +10 -5
- 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/component/describer.css +0 -25
- package/dist/lib/component/playground/playground-types.js +0 -18
- 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 → 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 → 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,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
iconForStatus: ()=>misc_index_js_namespaceObject.iconForStatus,
|
|
37
|
+
timeCostStrElement: ()=>misc_index_js_namespaceObject.timeCostStrElement,
|
|
38
|
+
timeStr: ()=>external_utils_index_js_namespaceObject.timeStr,
|
|
39
|
+
PlaygroundResultView: ()=>playground_result_index_js_namespaceObject.PlaygroundResultView,
|
|
40
|
+
useEnvConfig: ()=>store_js_namespaceObject.useEnvConfig,
|
|
41
|
+
EnvConfig: ()=>index_js_namespaceObject.EnvConfig,
|
|
42
|
+
LocalStorageProvider: ()=>storage_provider_js_namespaceObject.LocalStorageProvider,
|
|
43
|
+
ContextPreview: ()=>context_preview_index_js_namespaceObject.ContextPreview,
|
|
44
|
+
NoOpStorageProvider: ()=>storage_provider_js_namespaceObject.NoOpStorageProvider,
|
|
45
|
+
ShinyText: ()=>shiny_text_index_js_default(),
|
|
46
|
+
StaticContextProvider: ()=>context_provider_js_namespaceObject.StaticContextProvider,
|
|
47
|
+
Blackboard: ()=>blackboard_index_js_namespaceObject.Blackboard,
|
|
48
|
+
UniversalPlaygroundDefault: ()=>universal_playground_index_js_default(),
|
|
49
|
+
Player: ()=>player_index_js_namespaceObject.Player,
|
|
50
|
+
filterBase64Value: ()=>external_utils_index_js_namespaceObject.filterBase64Value,
|
|
51
|
+
BaseContextProvider: ()=>context_provider_js_namespaceObject.BaseContextProvider,
|
|
52
|
+
NoOpContextProvider: ()=>context_provider_js_namespaceObject.NoOpContextProvider,
|
|
53
|
+
colorForName: ()=>color_js_namespaceObject.colorForName,
|
|
54
|
+
GithubStar: ()=>github_star_index_js_namespaceObject.GithubStar,
|
|
55
|
+
Logo: ()=>logo_index_js_namespaceObject.Logo,
|
|
56
|
+
globalThemeConfig: ()=>color_js_namespaceObject.globalThemeConfig,
|
|
57
|
+
highlightColorForType: ()=>color_js_namespaceObject.highlightColorForType,
|
|
58
|
+
MemoryStorageProvider: ()=>storage_provider_js_namespaceObject.MemoryStorageProvider,
|
|
59
|
+
UniversalPlayground: ()=>universal_playground_index_js_namespaceObject.UniversalPlayground
|
|
60
|
+
});
|
|
61
|
+
require("./component/index.css");
|
|
62
|
+
require("./component/universal-playground/index.css");
|
|
63
|
+
const store_js_namespaceObject = require("./store/store.js");
|
|
64
|
+
const color_js_namespaceObject = require("./utils/color.js");
|
|
65
|
+
const index_js_namespaceObject = require("./component/env-config/index.js");
|
|
66
|
+
const logo_index_js_namespaceObject = require("./component/logo/index.js");
|
|
67
|
+
const misc_index_js_namespaceObject = require("./component/misc/index.js");
|
|
68
|
+
const playground_result_index_js_namespaceObject = require("./component/playground-result/index.js");
|
|
69
|
+
const context_preview_index_js_namespaceObject = require("./component/context-preview/index.js");
|
|
70
|
+
const player_index_js_namespaceObject = require("./component/player/index.js");
|
|
71
|
+
const blackboard_index_js_namespaceObject = require("./component/blackboard/index.js");
|
|
72
|
+
const github_star_index_js_namespaceObject = require("./component/github-star/index.js");
|
|
73
|
+
const external_utils_index_js_namespaceObject = require("./utils/index.js");
|
|
74
|
+
const shiny_text_index_js_namespaceObject = require("./component/shiny-text/index.js");
|
|
75
|
+
var shiny_text_index_js_default = /*#__PURE__*/ __webpack_require__.n(shiny_text_index_js_namespaceObject);
|
|
76
|
+
const universal_playground_index_js_namespaceObject = require("./component/universal-playground/index.js");
|
|
77
|
+
var universal_playground_index_js_default = /*#__PURE__*/ __webpack_require__.n(universal_playground_index_js_namespaceObject);
|
|
78
|
+
const storage_provider_js_namespaceObject = require("./component/universal-playground/providers/storage-provider.js");
|
|
79
|
+
const context_provider_js_namespaceObject = require("./component/universal-playground/providers/context-provider.js");
|
|
80
|
+
exports.BaseContextProvider = __webpack_exports__.BaseContextProvider;
|
|
81
|
+
exports.Blackboard = __webpack_exports__.Blackboard;
|
|
82
|
+
exports.ContextPreview = __webpack_exports__.ContextPreview;
|
|
83
|
+
exports.EnvConfig = __webpack_exports__.EnvConfig;
|
|
84
|
+
exports.GithubStar = __webpack_exports__.GithubStar;
|
|
85
|
+
exports.LocalStorageProvider = __webpack_exports__.LocalStorageProvider;
|
|
86
|
+
exports.Logo = __webpack_exports__.Logo;
|
|
87
|
+
exports.MemoryStorageProvider = __webpack_exports__.MemoryStorageProvider;
|
|
88
|
+
exports.NoOpContextProvider = __webpack_exports__.NoOpContextProvider;
|
|
89
|
+
exports.NoOpStorageProvider = __webpack_exports__.NoOpStorageProvider;
|
|
90
|
+
exports.Player = __webpack_exports__.Player;
|
|
91
|
+
exports.PlaygroundResultView = __webpack_exports__.PlaygroundResultView;
|
|
92
|
+
exports.ShinyText = __webpack_exports__.ShinyText;
|
|
93
|
+
exports.StaticContextProvider = __webpack_exports__.StaticContextProvider;
|
|
94
|
+
exports.UniversalPlayground = __webpack_exports__.UniversalPlayground;
|
|
95
|
+
exports.UniversalPlaygroundDefault = __webpack_exports__.UniversalPlaygroundDefault;
|
|
96
|
+
exports.colorForName = __webpack_exports__.colorForName;
|
|
97
|
+
exports.filterBase64Value = __webpack_exports__.filterBase64Value;
|
|
98
|
+
exports.globalThemeConfig = __webpack_exports__.globalThemeConfig;
|
|
99
|
+
exports.highlightColorForType = __webpack_exports__.highlightColorForType;
|
|
100
|
+
exports.iconForStatus = __webpack_exports__.iconForStatus;
|
|
101
|
+
exports.timeCostStrElement = __webpack_exports__.timeCostStrElement;
|
|
102
|
+
exports.timeStr = __webpack_exports__.timeStr;
|
|
103
|
+
exports.useEnvConfig = __webpack_exports__.useEnvConfig;
|
|
104
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
105
|
+
"BaseContextProvider",
|
|
106
|
+
"Blackboard",
|
|
107
|
+
"ContextPreview",
|
|
108
|
+
"EnvConfig",
|
|
109
|
+
"GithubStar",
|
|
110
|
+
"LocalStorageProvider",
|
|
111
|
+
"Logo",
|
|
112
|
+
"MemoryStorageProvider",
|
|
113
|
+
"NoOpContextProvider",
|
|
114
|
+
"NoOpStorageProvider",
|
|
115
|
+
"Player",
|
|
116
|
+
"PlaygroundResultView",
|
|
117
|
+
"ShinyText",
|
|
118
|
+
"StaticContextProvider",
|
|
119
|
+
"UniversalPlayground",
|
|
120
|
+
"UniversalPlaygroundDefault",
|
|
121
|
+
"colorForName",
|
|
122
|
+
"filterBase64Value",
|
|
123
|
+
"globalThemeConfig",
|
|
124
|
+
"highlightColorForType",
|
|
125
|
+
"iconForStatus",
|
|
126
|
+
"timeCostStrElement",
|
|
127
|
+
"timeStr",
|
|
128
|
+
"useEnvConfig"
|
|
129
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
130
|
+
Object.defineProperty(exports, '__esModule', {
|
|
131
|
+
value: true
|
|
132
|
+
});
|
|
@@ -35,17 +35,17 @@ require("pixi.js/unsafe-eval");
|
|
|
35
35
|
const external_antd_namespaceObject = require("antd");
|
|
36
36
|
const external_pixi_js_namespaceObject = require("pixi.js");
|
|
37
37
|
const external_react_namespaceObject = require("react");
|
|
38
|
-
const
|
|
39
|
-
require("./
|
|
38
|
+
const color_js_namespaceObject = require("../../utils/color.js");
|
|
39
|
+
require("./index.css");
|
|
40
40
|
const extractor_namespaceObject = require("@midscene/shared/extractor");
|
|
41
41
|
const external_pixi_filters_namespaceObject = require("pixi-filters");
|
|
42
|
-
const store_js_namespaceObject = require("
|
|
42
|
+
const store_js_namespaceObject = require("../../store/store.js");
|
|
43
43
|
const itemFillAlpha = 0.4;
|
|
44
44
|
const highlightAlpha = 0.4;
|
|
45
45
|
const pointRadius = 10;
|
|
46
46
|
const pointMarkForItem = (point, type)=>{
|
|
47
47
|
const [x, y] = point;
|
|
48
|
-
const themeColor = (0,
|
|
48
|
+
const themeColor = (0, color_js_namespaceObject.highlightColorForType)('element');
|
|
49
49
|
const graphics = new external_pixi_js_namespaceObject.Graphics();
|
|
50
50
|
graphics.beginFill(themeColor, itemFillAlpha);
|
|
51
51
|
graphics.drawCircle(x, y, pointRadius);
|
|
@@ -55,7 +55,7 @@ const pointMarkForItem = (point, type)=>{
|
|
|
55
55
|
const rectMarkForItem = (rect, name, type)=>{
|
|
56
56
|
const { left, top, width, height } = rect;
|
|
57
57
|
let themeColor;
|
|
58
|
-
themeColor = 'element' === type ? (0,
|
|
58
|
+
themeColor = 'element' === type ? (0, color_js_namespaceObject.colorForName)(name) : 'searchArea' === type ? (0, color_js_namespaceObject.highlightColorForType)('searchArea') : (0, color_js_namespaceObject.highlightColorForType)('element');
|
|
59
59
|
const alpha = 'highlight' === type ? highlightAlpha : itemFillAlpha;
|
|
60
60
|
const graphics = new external_pixi_js_namespaceObject.Graphics();
|
|
61
61
|
graphics.beginFill(themeColor, alpha);
|
|
@@ -39,9 +39,8 @@ 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
|
|
44
|
-
require("./index.css");
|
|
42
|
+
const store_js_namespaceObject = require("../../store/store.js");
|
|
43
|
+
const constants_js_namespaceObject = require("../../utils/constants.js");
|
|
45
44
|
const ConfigSelector = (param)=>{
|
|
46
45
|
let { showDeepThinkOption = false, enableTracking = false, showDataExtractionOptions = false, hideDomAndScreenshotOptions = false } = param;
|
|
47
46
|
const forceSameTabNavigation = (0, store_js_namespaceObject.useEnvConfig)((state)=>state.forceSameTabNavigation);
|
|
@@ -75,7 +74,7 @@ const ConfigSelector = (param)=>{
|
|
|
75
74
|
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Checkbox, {
|
|
76
75
|
onChange: (e)=>setForceSameTabNavigation(e.target.checked),
|
|
77
76
|
checked: forceSameTabNavigation,
|
|
78
|
-
children:
|
|
77
|
+
children: constants_js_namespaceObject.trackingTip
|
|
79
78
|
}),
|
|
80
79
|
key: 'track-config'
|
|
81
80
|
});
|
|
@@ -85,7 +84,7 @@ const ConfigSelector = (param)=>{
|
|
|
85
84
|
setDeepThink(e.target.checked);
|
|
86
85
|
},
|
|
87
86
|
checked: deepThink,
|
|
88
|
-
children:
|
|
87
|
+
children: constants_js_namespaceObject.deepThinkTip
|
|
89
88
|
}),
|
|
90
89
|
key: 'deep-think-config'
|
|
91
90
|
});
|
|
@@ -96,7 +95,7 @@ const ConfigSelector = (param)=>{
|
|
|
96
95
|
setScreenshotIncluded(e.target.checked);
|
|
97
96
|
},
|
|
98
97
|
checked: screenshotIncluded,
|
|
99
|
-
children:
|
|
98
|
+
children: constants_js_namespaceObject.screenshotIncludedTip
|
|
100
99
|
}),
|
|
101
100
|
key: 'screenshot-included-config'
|
|
102
101
|
});
|
|
@@ -111,7 +110,7 @@ const ConfigSelector = (param)=>{
|
|
|
111
110
|
marginBottom: '4px',
|
|
112
111
|
fontSize: '14px'
|
|
113
112
|
},
|
|
114
|
-
children:
|
|
113
|
+
children: constants_js_namespaceObject.domIncludedTip
|
|
115
114
|
}),
|
|
116
115
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Radio.Group, {
|
|
117
116
|
size: "small",
|
|
@@ -37,12 +37,11 @@ __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
|
|
45
|
-
require("./index.css");
|
|
40
|
+
const index_js_namespaceObject = require("../blackboard/index.js");
|
|
41
|
+
var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
|
|
42
|
+
const external_misc_index_js_namespaceObject = require("../misc/index.js");
|
|
43
|
+
const playground_demo_ui_context_json_namespaceObject = require("../playground/playground-demo-ui-context.json");
|
|
44
|
+
var playground_demo_ui_context_json_default = /*#__PURE__*/ __webpack_require__.n(playground_demo_ui_context_json_namespaceObject);
|
|
46
45
|
const ContextPreview = (param)=>{
|
|
47
46
|
let { uiContextPreview, setUiContextPreview, showContextPreview } = param;
|
|
48
47
|
if (!showContextPreview) return null;
|
|
@@ -52,18 +51,18 @@ const ContextPreview = (param)=>{
|
|
|
52
51
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
53
52
|
children: "UI Context"
|
|
54
53
|
}),
|
|
55
|
-
uiContextPreview ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
54
|
+
uiContextPreview ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_default(), {
|
|
56
55
|
uiContext: uiContextPreview,
|
|
57
56
|
hideController: true
|
|
58
57
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
59
58
|
children: [
|
|
60
|
-
(0,
|
|
59
|
+
(0, external_misc_index_js_namespaceObject.iconForStatus)('failed'),
|
|
61
60
|
" No UI context",
|
|
62
61
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
63
62
|
type: "link",
|
|
64
63
|
onClick: (e)=>{
|
|
65
64
|
e.preventDefault();
|
|
66
|
-
setUiContextPreview(
|
|
65
|
+
setUiContextPreview(playground_demo_ui_context_json_default());
|
|
67
66
|
},
|
|
68
67
|
children: "Load Demo"
|
|
69
68
|
}),
|
|
@@ -30,7 +30,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
31
31
|
const external_antd_namespaceObject = require("antd");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
-
const store_js_namespaceObject = require("
|
|
33
|
+
const store_js_namespaceObject = require("../../store/store.js");
|
|
34
34
|
function EnvConfig(param) {
|
|
35
35
|
let { showTooltipWhenEmpty = true, showModelName = true, tooltipPlacement = 'bottom', mode = 'icon' } = param;
|
|
36
36
|
const { config, configString, loadConfig, syncFromStorage } = (0, store_js_namespaceObject.useEnvConfig)();
|
|
@@ -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("./index.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",
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
.history-modal-container {
|
|
2
|
+
border-radius: 12px 12px 0 0;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 70vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.history-modal-container .history-modal-header {
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
height: 48px;
|
|
13
|
+
padding: 0 25px;
|
|
14
|
+
line-height: 48px;
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.history-modal-container .history-modal-header .close-button {
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
margin-right: -4px;
|
|
22
|
+
padding: 4px;
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.history-modal-container .history-modal-header .close-button .anticon {
|
|
27
|
+
color: #999;
|
|
28
|
+
font-size: 18px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.history-modal-container .history-modal-header .close-button:hover .anticon {
|
|
32
|
+
color: #666;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.history-modal-container .history-search-section {
|
|
36
|
+
background: #fff;
|
|
37
|
+
padding: 16px 20px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.history-modal-container .history-search-section .search-input-wrapper {
|
|
41
|
+
color: rgba(0, 0, 0, .25);
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 12px;
|
|
44
|
+
display: flex;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.history-modal-container .history-search-section .search-input-wrapper .search-input {
|
|
48
|
+
background: #f1f2f3;
|
|
49
|
+
border: none;
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
flex: 1;
|
|
52
|
+
height: 36px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.history-modal-container .history-search-section .search-input-wrapper .search-input .ant-input {
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
background: none;
|
|
58
|
+
border: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.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 {
|
|
62
|
+
background: #fff;
|
|
63
|
+
border-color: #d9d9d9;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.history-modal-container .history-search-section .search-input-wrapper .clear-button {
|
|
67
|
+
color: #1890ff;
|
|
68
|
+
height: auto;
|
|
69
|
+
padding: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.history-modal-container .history-search-section .search-input-wrapper .clear-button:hover {
|
|
73
|
+
color: #40a9ff;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.history-modal-container .history-content {
|
|
77
|
+
flex: 1;
|
|
78
|
+
padding: 0 25px 25px;
|
|
79
|
+
overflow-y: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.history-modal-container .history-content .history-group {
|
|
83
|
+
margin-bottom: 10px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.history-modal-container .history-content .history-group .history-group-title {
|
|
87
|
+
color: rgba(0, 0, 0, .45);
|
|
88
|
+
height: 40px;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
font-weight: 400;
|
|
91
|
+
line-height: 40px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.history-modal-container .history-content .history-group .history-item {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
color: rgba(0, 0, 0, .85);
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
height: 40px;
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
line-height: 40px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.history-modal-container .history-content .history-group .history-item:hover {
|
|
106
|
+
background: #f2f4f7;
|
|
107
|
+
margin: 0 -8px;
|
|
108
|
+
padding: 0 8px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.history-modal-container .history-content .no-results {
|
|
112
|
+
text-align: center;
|
|
113
|
+
color: #999;
|
|
114
|
+
padding: 40px 20px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ant-modal-wrap .ant-modal-content {
|
|
118
|
+
animation: .3s cubic-bezier(.4, 0, .2, 1) forwards slideUpFromBottom !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@keyframes slideUpFromBottom {
|
|
122
|
+
0% {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
transform: translateY(100%);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
100% {
|
|
128
|
+
opacity: 1;
|
|
129
|
+
transform: translateY(0);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -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)=>{
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"../types": function(module) {
|
|
4
|
+
module.exports = require("../types.js");
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
var __webpack_module_cache__ = {};
|
|
8
|
+
function __webpack_require__(moduleId) {
|
|
9
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
10
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
11
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
12
|
+
exports: {}
|
|
13
|
+
};
|
|
14
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
15
|
+
return module.exports;
|
|
16
|
+
}
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.n = (module)=>{
|
|
19
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
20
|
+
__webpack_require__.d(getter, {
|
|
21
|
+
a: getter
|
|
22
|
+
});
|
|
23
|
+
return getter;
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
(()=>{
|
|
27
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
28
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: definition[key]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
34
|
+
(()=>{
|
|
35
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
36
|
+
})();
|
|
37
|
+
(()=>{
|
|
38
|
+
__webpack_require__.r = (exports1)=>{
|
|
39
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
40
|
+
value: 'Module'
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
var __webpack_exports__ = {};
|
|
48
|
+
(()=>{
|
|
49
|
+
__webpack_require__.r(__webpack_exports__);
|
|
50
|
+
var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../types");
|
|
51
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
52
|
+
for(var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
53
|
+
return _types__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
54
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
55
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
56
|
+
})();
|
|
57
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
58
|
+
Object.defineProperty(exports, '__esModule', {
|
|
59
|
+
value: true
|
|
60
|
+
});
|
|
@@ -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("./index.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,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,11 +33,17 @@ var __webpack_require__ = {};
|
|
|
24
33
|
var __webpack_exports__ = {};
|
|
25
34
|
__webpack_require__.r(__webpack_exports__);
|
|
26
35
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
serverLaunchTip: ()=>serverLaunchTip,
|
|
37
|
+
errorMessageServerNotReady: ()=>errorMessageServerNotReady,
|
|
38
|
+
timeCostStrElement: ()=>timeCostStrElement,
|
|
27
39
|
iconForStatus: ()=>iconForStatus,
|
|
28
|
-
|
|
40
|
+
emptyResultTip: ()=>emptyResultTip
|
|
29
41
|
});
|
|
30
42
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
43
|
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);
|
|
32
47
|
function timeCostStrElement(timeCost) {
|
|
33
48
|
let str;
|
|
34
49
|
str = 'number' != typeof timeCost ? '-' : `${(timeCost / 1000).toFixed(2)}s`;
|
|
@@ -80,10 +95,54 @@ const iconForStatus = (status)=>{
|
|
|
80
95
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.MinusOutlined, {});
|
|
81
96
|
}
|
|
82
97
|
};
|
|
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;
|
|
83
138
|
exports.iconForStatus = __webpack_exports__.iconForStatus;
|
|
139
|
+
exports.serverLaunchTip = __webpack_exports__.serverLaunchTip;
|
|
84
140
|
exports.timeCostStrElement = __webpack_exports__.timeCostStrElement;
|
|
85
141
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
142
|
+
"emptyResultTip",
|
|
143
|
+
"errorMessageServerNotReady",
|
|
86
144
|
"iconForStatus",
|
|
145
|
+
"serverLaunchTip",
|
|
87
146
|
"timeCostStrElement"
|
|
88
147
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
89
148
|
Object.defineProperty(exports, '__esModule', {
|