@midscene/visualizer 0.26.2 → 0.26.3-beta-20250813075706.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.
Files changed (124) hide show
  1. package/dist/es/blank_polyfill.mjs +2 -0
  2. package/dist/es/component/blackboard.css +12 -5
  3. package/dist/es/component/blackboard.mjs +266 -0
  4. package/dist/es/component/color.mjs +35 -0
  5. package/dist/es/component/describer.css +9 -5
  6. package/dist/es/component/describer.mjs +128 -0
  7. package/dist/es/component/env-config.mjs +112 -0
  8. package/dist/es/component/github-star.css +1 -0
  9. package/dist/es/component/github-star.mjs +20 -0
  10. package/dist/es/component/logo.css +5 -3
  11. package/dist/es/component/logo.mjs +20 -0
  12. package/dist/es/component/misc.mjs +54 -0
  13. package/dist/es/component/pixi-loader.mjs +16 -0
  14. package/dist/es/component/player.css +88 -70
  15. package/dist/es/component/player.mjs +628 -0
  16. package/dist/es/component/playground/ConfigSelector.mjs +53 -0
  17. package/dist/es/component/playground/ContextPreview.mjs +39 -0
  18. package/dist/es/component/playground/HistorySelector.mjs +193 -0
  19. package/dist/es/component/playground/PlaygroundResult.mjs +60 -0
  20. package/dist/es/component/playground/PromptInput.mjs +225 -0
  21. package/dist/es/component/playground/ServiceModeControl.mjs +100 -0
  22. package/dist/es/component/playground/index.css +140 -98
  23. package/dist/es/component/playground/playground-constants.mjs +45 -0
  24. package/dist/es/component/playground/playground-utils.mjs +89 -0
  25. package/dist/es/component/playground/useServerValid.mjs +27 -0
  26. package/dist/es/component/playground/useStaticPageAgent.mjs +12 -0
  27. package/dist/es/component/replay-scripts.mjs +271 -0
  28. package/dist/es/component/shiny-text.css +33 -22
  29. package/dist/es/component/shiny-text.mjs +15 -0
  30. package/dist/es/component/store/history.mjs +55 -0
  31. package/dist/es/component/store/store.mjs +128 -0
  32. package/dist/es/icons/close.mjs +19 -0
  33. package/dist/es/icons/history.mjs +30 -0
  34. package/dist/es/icons/magnifying-glass.mjs +39 -0
  35. package/dist/es/icons/setting.mjs +20 -0
  36. package/dist/es/index.mjs +21 -0
  37. package/dist/es/init.mjs +10 -0
  38. package/dist/es/{utils.js → utils.mjs} +51 -75
  39. package/dist/lib/blank_polyfill.js +34 -38
  40. package/dist/lib/component/blackboard.css +12 -5
  41. package/dist/lib/component/blackboard.js +293 -306
  42. package/dist/lib/component/color.js +64 -74
  43. package/dist/lib/component/describer.css +9 -5
  44. package/dist/lib/component/describer.js +158 -198
  45. package/dist/lib/component/env-config.js +142 -147
  46. package/dist/lib/component/github-star.css +1 -0
  47. package/dist/lib/component/github-star.js +51 -62
  48. package/dist/lib/component/logo.css +5 -3
  49. package/dist/lib/component/logo.js +53 -56
  50. package/dist/lib/component/misc.js +85 -84
  51. package/dist/lib/component/pixi-loader.js +49 -80
  52. package/dist/lib/component/player.css +88 -70
  53. package/dist/lib/component/player.js +627 -738
  54. package/dist/lib/component/playground/ConfigSelector.js +91 -92
  55. package/dist/lib/component/playground/ContextPreview.js +80 -72
  56. package/dist/lib/component/playground/HistorySelector.js +234 -197
  57. package/dist/lib/component/playground/PlaygroundResult.js +100 -103
  58. package/dist/lib/component/playground/PromptInput.js +250 -237
  59. package/dist/lib/component/playground/ServiceModeControl.js +124 -124
  60. package/dist/lib/component/playground/index.css +140 -98
  61. package/dist/lib/component/playground/playground-constants.js +97 -73
  62. package/dist/lib/component/playground/playground-types.js +17 -31
  63. package/dist/lib/component/playground/playground-utils.js +140 -168
  64. package/dist/lib/component/playground/useServerValid.js +55 -86
  65. package/dist/lib/component/playground/useStaticPageAgent.js +45 -51
  66. package/dist/lib/component/replay-scripts.js +291 -373
  67. package/dist/lib/component/shiny-text.css +33 -22
  68. package/dist/lib/component/shiny-text.js +46 -57
  69. package/dist/lib/component/store/history.js +58 -64
  70. package/dist/lib/component/store/store.js +132 -128
  71. package/dist/lib/icons/close.js +53 -0
  72. package/dist/lib/icons/history.js +64 -0
  73. package/dist/lib/icons/magnifying-glass.js +73 -0
  74. package/dist/lib/icons/setting.js +54 -0
  75. package/dist/lib/index.js +158 -124
  76. package/dist/lib/init.js +39 -46
  77. package/dist/lib/utils.js +105 -109
  78. package/dist/types/blank_polyfill.d.ts +2 -2
  79. package/dist/types/component/playground/ConfigSelector.d.ts +1 -0
  80. package/dist/types/component/playground/ContextPreview.d.ts +1 -0
  81. package/dist/types/component/playground/HistorySelector.d.ts +1 -0
  82. package/dist/types/component/playground/PlaygroundResult.d.ts +1 -0
  83. package/dist/types/component/playground/PromptInput.d.ts +1 -0
  84. package/dist/types/component/playground/ServiceModeControl.d.ts +1 -0
  85. package/package.json +16 -19
  86. package/dist/es/assets/close.909351c0.svg +0 -4
  87. package/dist/es/assets/history.164a4eab.svg +0 -4
  88. package/dist/es/assets/magnifying-glass.9498e70e.svg +0 -12
  89. package/dist/es/assets/setting.80ab7285.svg +0 -11
  90. package/dist/es/blank_polyfill.js +0 -10
  91. package/dist/es/component/blackboard.js +0 -286
  92. package/dist/es/component/color.js +0 -49
  93. package/dist/es/component/describer.js +0 -173
  94. package/dist/es/component/env-config.js +0 -117
  95. package/dist/es/component/github-star.js +0 -31
  96. package/dist/es/component/logo.js +0 -25
  97. package/dist/es/component/misc.js +0 -63
  98. package/dist/es/component/pixi-loader.js +0 -51
  99. package/dist/es/component/player.js +0 -746
  100. package/dist/es/component/playground/ConfigSelector.js +0 -64
  101. package/dist/es/component/playground/ContextPreview.js +0 -42
  102. package/dist/es/component/playground/HistorySelector.js +0 -168
  103. package/dist/es/component/playground/PlaygroundResult.js +0 -73
  104. package/dist/es/component/playground/PromptInput.js +0 -212
  105. package/dist/es/component/playground/ServiceModeControl.js +0 -100
  106. package/dist/es/component/playground/playground-constants.js +0 -39
  107. package/dist/es/component/playground/playground-types.js +0 -6
  108. package/dist/es/component/playground/playground-utils.js +0 -141
  109. package/dist/es/component/playground/useServerValid.js +0 -58
  110. package/dist/es/component/playground/useStaticPageAgent.js +0 -20
  111. package/dist/es/component/replay-scripts.js +0 -361
  112. package/dist/es/component/shiny-text.js +0 -30
  113. package/dist/es/component/store/history.js +0 -34
  114. package/dist/es/component/store/store.js +0 -99
  115. package/dist/es/index.js +0 -79
  116. package/dist/es/init.js +0 -17
  117. package/dist/index.css +0 -595
  118. package/dist/index.js +0 -1
  119. package/dist/lib/assets/close.909351c0.svg +0 -4
  120. package/dist/lib/assets/history.164a4eab.svg +0 -4
  121. package/dist/lib/assets/magnifying-glass.9498e70e.svg +0 -12
  122. package/dist/lib/assets/setting.80ab7285.svg +0 -11
  123. package/dist/lib/component/common.css +0 -0
  124. /package/dist/es/component/{common.css → playground/playground-types.mjs} +0 -0
@@ -1,107 +1,104 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var PlaygroundResult_exports = {};
30
- __export(PlaygroundResult_exports, {
31
- PlaygroundResultView: () => PlaygroundResultView
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
+ PlaygroundResultView: ()=>PlaygroundResultView
32
37
  });
33
- module.exports = __toCommonJS(PlaygroundResult_exports);
34
- var import_buffer = __toESM(require("buffer"));
35
- var import_browser = __toESM(require("process/browser"));
36
- var import_console_browserify = __toESM(require("console-browserify"));
37
- var buffer = {
38
- Buffer: import_buffer.default
39
- };
40
- var import_jsx_runtime = require("react/jsx-runtime");
41
- var import_icons = require("@ant-design/icons");
42
- var import_antd = require("antd");
43
- var import_player = require("../player");
44
- var import_shiny_text = __toESM(require("../shiny-text"));
45
- var import_playground_constants = require("./playground-constants");
46
- const PlaygroundResultView = ({
47
- result,
48
- loading,
49
- serverValid,
50
- serviceMode,
51
- replayScriptsInfo,
52
- replayCounter,
53
- loadingProgressText,
54
- verticalMode = false,
55
- notReadyMessage,
56
- fitMode
57
- }) => {
58
- let resultWrapperClassName = "result-wrapper";
59
- if (verticalMode) {
60
- resultWrapperClassName += " vertical-mode-result";
61
- }
62
- if (replayScriptsInfo && verticalMode) {
63
- resultWrapperClassName += " result-wrapper-compact";
64
- }
65
- let resultDataToShow = import_playground_constants.emptyResultTip;
66
- if (!serverValid && serviceMode === "Server") {
67
- resultDataToShow = (0, import_playground_constants.serverLaunchTip)(notReadyMessage);
68
- } else if (loading) {
69
- resultDataToShow = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "loading-container", children: [
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Spin, { spinning: loading, indicator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, { spin: true }) }),
71
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "loading-progress-text loading-progress-text-progress", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shiny_text.default, { text: loadingProgressText, speed: 3 }) })
72
- ] });
73
- } else if (replayScriptsInfo) {
74
- resultDataToShow = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
- import_player.Player,
76
- {
77
- replayScripts: replayScriptsInfo.scripts,
78
- imageWidth: replayScriptsInfo.width,
79
- imageHeight: replayScriptsInfo.height,
80
- reportFileContent: (serviceMode === "In-Browser-Extension" || serviceMode === "Server") && (result == null ? void 0 : result.reportHTML) ? result == null ? void 0 : result.reportHTML : null,
81
- fitMode
82
- },
83
- replayCounter
84
- );
85
- } else if (result == null ? void 0 : result.error) {
86
- resultDataToShow = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { children: result == null ? void 0 : result.error });
87
- } else if ((result == null ? void 0 : result.result) !== void 0) {
88
- resultDataToShow = typeof (result == null ? void 0 : result.result) === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { children: result == null ? void 0 : result.result }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { children: JSON.stringify(result == null ? void 0 : result.result, null, 2) });
89
- }
90
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
- "div",
92
- {
93
- className: resultWrapperClassName,
94
- style: {
95
- height: "100%",
96
- display: "flex",
97
- flexDirection: "column",
98
- flex: "1 1 auto"
99
- },
100
- children: resultDataToShow
101
- }
102
- );
38
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
39
+ const icons_namespaceObject = require("@ant-design/icons");
40
+ const external_antd_namespaceObject = require("antd");
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");
46
+ const PlaygroundResultView = (param)=>{
47
+ let { result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode } = param;
48
+ let resultWrapperClassName = 'result-wrapper';
49
+ if (verticalMode) resultWrapperClassName += ' vertical-mode-result';
50
+ if (replayScriptsInfo && verticalMode) resultWrapperClassName += ' result-wrapper-compact';
51
+ let resultDataToShow = external_playground_constants_js_namespaceObject.emptyResultTip;
52
+ if (serverValid || 'Server' !== serviceMode) {
53
+ if (loading) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
54
+ className: "loading-container",
55
+ children: [
56
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {
57
+ spinning: loading,
58
+ indicator: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.LoadingOutlined, {
59
+ spin: true
60
+ })
61
+ }),
62
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
63
+ className: "loading-progress-text loading-progress-text-progress",
64
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_js_default(), {
65
+ text: loadingProgressText,
66
+ speed: 3
67
+ })
68
+ })
69
+ ]
70
+ });
71
+ else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_player_js_namespaceObject.Player, {
72
+ replayScripts: replayScriptsInfo.scripts,
73
+ imageWidth: replayScriptsInfo.width,
74
+ imageHeight: replayScriptsInfo.height,
75
+ reportFileContent: ('In-Browser-Extension' === serviceMode || 'Server' === serviceMode) && (null == result ? void 0 : result.reportHTML) ? null == result ? void 0 : result.reportHTML : null,
76
+ fitMode: fitMode
77
+ }, replayCounter);
78
+ else if (null == result ? void 0 : result.error) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
79
+ children: null == result ? void 0 : result.error
80
+ });
81
+ else if ((null == result ? void 0 : result.result) !== void 0) resultDataToShow = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
82
+ children: null == result ? void 0 : result.result
83
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
84
+ children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
85
+ });
86
+ } else resultDataToShow = (0, external_playground_constants_js_namespaceObject.serverLaunchTip)(notReadyMessage);
87
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
88
+ className: resultWrapperClassName,
89
+ style: {
90
+ height: '100%',
91
+ display: 'flex',
92
+ flexDirection: 'column',
93
+ flex: '1 1 auto'
94
+ },
95
+ children: resultDataToShow
96
+ });
103
97
  };
104
- // Annotate the CommonJS export names for ESM import in node:
105
- 0 && (module.exports = {
106
- PlaygroundResultView
98
+ exports.PlaygroundResultView = __webpack_exports__.PlaygroundResultView;
99
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
100
+ "PlaygroundResultView"
101
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
102
+ Object.defineProperty(exports, '__esModule', {
103
+ value: true
107
104
  });