@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
|
@@ -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 external_color_js_namespaceObject = require("./color.js");
|
|
39
|
+
require("./blackboard.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, external_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, external_color_js_namespaceObject.colorForName)(name) : 'searchArea' === type ? (0, external_color_js_namespaceObject.highlightColorForType)('searchArea') : (0, external_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);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.image-describer {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.image-describer .describe-text {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
color: #fff;
|
|
8
|
+
background: #000;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 30px;
|
|
11
|
+
padding: 10px;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
position: absolute;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.image-describer .describe-text.success {
|
|
19
|
+
background: #047704;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.image-describer .describe-text.error {
|
|
23
|
+
background: #870707;
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -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("./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: {
|