@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.
Files changed (134) hide show
  1. package/dist/es/blank_polyfill.mjs +2 -0
  2. package/dist/es/component/{blackboard/index.mjs → blackboard.mjs} +3 -3
  3. package/dist/es/component/describer.css +25 -0
  4. package/dist/es/component/{env-config/index.mjs → env-config.mjs} +1 -1
  5. package/dist/es/component/{github-star/index.mjs → github-star.mjs} +1 -1
  6. package/dist/es/component/{logo/index.mjs → logo.mjs} +1 -1
  7. package/dist/es/component/{misc/index.mjs → misc.mjs} +2 -42
  8. package/dist/es/component/{player/index.mjs → player.mjs} +8 -8
  9. package/dist/es/component/{config-selector/index.mjs → playground/ConfigSelector.mjs} +3 -2
  10. package/dist/es/component/{context-preview/index.mjs → playground/ContextPreview.mjs} +4 -3
  11. package/dist/es/component/{history-selector/index.mjs → playground/HistorySelector.mjs} +1 -1
  12. package/dist/es/component/{playground-result/index.mjs → playground/PlaygroundResult.mjs} +4 -3
  13. package/dist/es/component/{prompt-input/index.mjs → playground/PromptInput.mjs} +9 -9
  14. package/dist/es/component/{service-mode-control/index.mjs → playground/ServiceModeControl.mjs} +5 -4
  15. package/dist/es/component/playground/index.css +161 -29
  16. package/dist/es/{utils/constants.mjs → component/playground/playground-constants.mjs} +43 -23
  17. package/dist/es/component/playground/playground-types.mjs +0 -0
  18. package/dist/es/{utils → component/playground}/playground-utils.mjs +1 -1
  19. package/dist/es/{utils → component}/replay-scripts.mjs +2 -1
  20. package/dist/es/component/{shiny-text/index.mjs → shiny-text.mjs} +1 -1
  21. package/dist/es/index.mjs +18 -22
  22. package/dist/es/init.mjs +10 -0
  23. package/dist/lib/blank_polyfill.js +36 -0
  24. package/dist/lib/component/{blackboard/index.js → blackboard.js} +5 -5
  25. package/dist/lib/component/describer.css +25 -0
  26. package/dist/lib/component/{env-config/index.js → env-config.js} +1 -1
  27. package/dist/lib/component/{github-star/index.js → github-star.js} +1 -1
  28. package/dist/lib/component/{logo/index.js → logo.js} +1 -1
  29. package/dist/lib/component/{misc/index.js → misc.js} +1 -60
  30. package/dist/lib/component/{player/index.js → player.js} +23 -23
  31. package/dist/lib/component/{config-selector/index.js → playground/ConfigSelector.js} +7 -6
  32. package/dist/lib/component/{context-preview/index.js → playground/ContextPreview.js} +9 -8
  33. package/dist/lib/component/{history-selector/index.js → playground/HistorySelector.js} +1 -1
  34. package/dist/lib/component/{playground-result/index.js → playground/PlaygroundResult.js} +9 -8
  35. package/dist/lib/component/{prompt-input/index.js → playground/PromptInput.js} +37 -37
  36. package/dist/lib/component/{service-mode-control/index.js → playground/ServiceModeControl.js} +9 -8
  37. package/dist/lib/component/playground/index.css +161 -29
  38. package/dist/lib/{utils/constants.js → component/playground/playground-constants.js} +64 -31
  39. package/dist/lib/component/playground/playground-types.js +18 -0
  40. package/dist/lib/{utils → component/playground}/playground-utils.js +1 -1
  41. package/dist/lib/{utils → component}/replay-scripts.js +4 -3
  42. package/dist/lib/component/{shiny-text/index.js → shiny-text.js} +1 -1
  43. package/dist/lib/index.js +34 -66
  44. package/dist/lib/init.js +44 -0
  45. package/dist/types/blank_polyfill.d.ts +2 -0
  46. package/dist/types/component/{blackboard/index.d.ts → blackboard.d.ts} +2 -2
  47. package/dist/types/component/{github-star/index.d.ts → github-star.d.ts} +1 -1
  48. package/dist/types/component/{logo/index.d.ts → logo.d.ts} +1 -1
  49. package/dist/types/component/misc.d.ts +2 -0
  50. package/dist/types/component/{player/index.d.ts → player.d.ts} +2 -2
  51. package/dist/types/component/{config-selector/index.d.ts → playground/ConfigSelector.d.ts} +1 -0
  52. package/dist/types/component/{context-preview/index.d.ts → playground/ContextPreview.d.ts} +1 -0
  53. package/dist/types/component/{history-selector/index.d.ts → playground/HistorySelector.d.ts} +1 -1
  54. package/dist/types/component/{playground-result/index.d.ts → playground/PlaygroundResult.d.ts} +4 -3
  55. package/dist/types/component/{prompt-input/index.d.ts → playground/PromptInput.d.ts} +2 -3
  56. package/dist/types/component/{service-mode-control/index.d.ts → playground/ServiceModeControl.d.ts} +1 -0
  57. package/dist/types/{utils/constants.d.ts → component/playground/playground-constants.d.ts} +5 -3
  58. package/dist/types/component/playground/playground-types.d.ts +19 -0
  59. package/dist/types/component/playground/types.d.ts +72 -0
  60. package/dist/types/{utils → component}/replay-scripts.d.ts +1 -0
  61. package/dist/types/component/{shiny-text/index.d.ts → shiny-text.d.ts} +1 -1
  62. package/dist/types/index.d.ts +10 -15
  63. package/dist/types/init.d.ts +1 -0
  64. package/package.json +5 -5
  65. package/dist/es/component/history-selector/index.css +0 -132
  66. package/dist/es/component/index.mjs +0 -1
  67. package/dist/es/component/playground/index.mjs +0 -8
  68. package/dist/es/component/playground-result/index.css +0 -29
  69. package/dist/es/component/prompt-input/index.css +0 -330
  70. package/dist/es/component/universal-playground/index.css +0 -341
  71. package/dist/es/component/universal-playground/index.mjs +0 -273
  72. package/dist/es/component/universal-playground/providers/context-provider.mjs +0 -52
  73. package/dist/es/component/universal-playground/providers/storage-provider.mjs +0 -107
  74. package/dist/es/hooks/usePlaygroundExecution.mjs +0 -168
  75. package/dist/es/hooks/usePlaygroundState.mjs +0 -176
  76. package/dist/es/icons/avatar.mjs +0 -28
  77. package/dist/lib/component/history-selector/index.css +0 -132
  78. package/dist/lib/component/index.js +0 -60
  79. package/dist/lib/component/playground/index.js +0 -113
  80. package/dist/lib/component/playground-result/index.css +0 -29
  81. package/dist/lib/component/prompt-input/index.css +0 -330
  82. package/dist/lib/component/universal-playground/index.css +0 -341
  83. package/dist/lib/component/universal-playground/index.js +0 -321
  84. package/dist/lib/component/universal-playground/providers/context-provider.js +0 -95
  85. package/dist/lib/component/universal-playground/providers/storage-provider.js +0 -147
  86. package/dist/lib/hooks/usePlaygroundExecution.js +0 -202
  87. package/dist/lib/hooks/usePlaygroundState.js +0 -210
  88. package/dist/lib/icons/avatar.js +0 -62
  89. package/dist/types/component/index.d.ts +0 -1
  90. package/dist/types/component/misc/index.d.ts +0 -6
  91. package/dist/types/component/playground/index.d.ts +0 -7
  92. package/dist/types/component/universal-playground/index.d.ts +0 -4
  93. package/dist/types/component/universal-playground/providers/context-provider.d.ts +0 -37
  94. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +0 -33
  95. package/dist/types/hooks/usePlaygroundExecution.d.ts +0 -10
  96. package/dist/types/hooks/usePlaygroundState.d.ts +0 -26
  97. package/dist/types/types.d.ts +0 -164
  98. /package/dist/es/component/{blackboard/index.css → blackboard.css} +0 -0
  99. /package/dist/es/{utils → component}/color.mjs +0 -0
  100. /package/dist/es/component/{github-star/index.css → github-star.css} +0 -0
  101. /package/dist/es/component/{logo/index.css → logo.css} +0 -0
  102. /package/dist/es/{utils → component}/pixi-loader.mjs +0 -0
  103. /package/dist/es/component/{player/index.css → player.css} +0 -0
  104. /package/dist/es/component/{form-field/index.mjs → playground/FormField.mjs} +0 -0
  105. /package/dist/es/{types.mjs → component/playground/types.mjs} +0 -0
  106. /package/dist/es/{hooks → component/playground}/useServerValid.mjs +0 -0
  107. /package/dist/es/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
  108. /package/dist/es/component/{shiny-text/index.css → shiny-text.css} +0 -0
  109. /package/dist/es/{store → component/store}/history.mjs +0 -0
  110. /package/dist/es/{store → component/store}/store.mjs +0 -0
  111. /package/dist/es/{utils/index.mjs → utils.mjs} +0 -0
  112. /package/dist/lib/component/{blackboard/index.css → blackboard.css} +0 -0
  113. /package/dist/lib/{utils → component}/color.js +0 -0
  114. /package/dist/lib/component/{github-star/index.css → github-star.css} +0 -0
  115. /package/dist/lib/component/{logo/index.css → logo.css} +0 -0
  116. /package/dist/lib/{utils → component}/pixi-loader.js +0 -0
  117. /package/dist/lib/component/{player/index.css → player.css} +0 -0
  118. /package/dist/lib/component/{form-field/index.js → playground/FormField.js} +0 -0
  119. /package/dist/lib/{types.js → component/playground/types.js} +0 -0
  120. /package/dist/lib/{hooks → component/playground}/useServerValid.js +0 -0
  121. /package/dist/lib/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
  122. /package/dist/lib/component/{shiny-text/index.css → shiny-text.css} +0 -0
  123. /package/dist/lib/{store → component/store}/history.js +0 -0
  124. /package/dist/lib/{store → component/store}/store.js +0 -0
  125. /package/dist/lib/{utils/index.js → utils.js} +0 -0
  126. /package/dist/types/{utils → component}/color.d.ts +0 -0
  127. /package/dist/types/component/{env-config/index.d.ts → env-config.d.ts} +0 -0
  128. /package/dist/types/{utils → component}/pixi-loader.d.ts +0 -0
  129. /package/dist/types/component/{form-field/index.d.ts → playground/FormField.d.ts} +0 -0
  130. /package/dist/types/{utils → component/playground}/playground-utils.d.ts +0 -0
  131. /package/dist/types/{hooks → component/playground}/useServerValid.d.ts +0 -0
  132. /package/dist/types/{store → component/store}/history.d.ts +0 -0
  133. /package/dist/types/{store → component/store}/store.d.ts +0 -0
  134. /package/dist/types/{utils/index.d.ts → utils.d.ts} +0 -0
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  default: ()=>shiny_text
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- require("./index.css");
30
+ require("./shiny-text.css");
31
31
  const ShinyText = (param)=>{
32
32
  let { text, disabled = false, speed = 5, className = '' } = param;
33
33
  const style = {
package/dist/lib/index.js CHANGED
@@ -33,83 +33,60 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- timeCostStrElement: ()=>misc_index_js_namespaceObject.timeCostStrElement,
36
+ timeCostStrElement: ()=>misc_js_namespaceObject.timeCostStrElement,
37
37
  actionNameForType: ()=>playground_utils_js_namespaceObject.actionNameForType,
38
- PlaygroundResultView: ()=>playground_result_index_js_namespaceObject.PlaygroundResultView,
39
- timeStr: ()=>external_utils_index_js_namespaceObject.timeStr,
40
- EnvConfig: ()=>index_js_namespaceObject.EnvConfig,
38
+ PlaygroundResultView: ()=>PlaygroundResult_js_namespaceObject.PlaygroundResultView,
39
+ timeStr: ()=>external_utils_js_namespaceObject.timeStr,
40
+ EnvConfig: ()=>env_config_js_namespaceObject.EnvConfig,
41
41
  allScriptsFromDump: ()=>replay_scripts_js_namespaceObject.allScriptsFromDump,
42
- LocalStorageProvider: ()=>storage_provider_js_namespaceObject.LocalStorageProvider,
43
- UniversalPlaygroundDefault: ()=>universal_playground_index_js_default(),
42
+ PromptInput: ()=>PromptInput_js_namespaceObject.PromptInput,
43
+ ContextPreview: ()=>ContextPreview_js_namespaceObject.ContextPreview,
44
44
  generateAnimationScripts: ()=>replay_scripts_js_namespaceObject.generateAnimationScripts,
45
- ShinyText: ()=>shiny_text_index_js_default(),
45
+ ShinyText: ()=>shiny_text_js_default(),
46
+ Blackboard: ()=>blackboard_js_namespaceObject.Blackboard,
46
47
  getPlaceholderForType: ()=>playground_utils_js_namespaceObject.getPlaceholderForType,
47
48
  staticAgentFromContext: ()=>playground_utils_js_namespaceObject.staticAgentFromContext,
49
+ useEnvConfig: ()=>store_js_namespaceObject.useEnvConfig,
48
50
  useServerValid: ()=>useServerValid_js_namespaceObject.useServerValid,
49
- ServiceModeControl: ()=>service_mode_control_index_js_namespaceObject.ServiceModeControl,
50
- BaseContextProvider: ()=>context_provider_js_namespaceObject.BaseContextProvider,
51
+ Player: ()=>player_js_namespaceObject.Player,
52
+ ServiceModeControl: ()=>ServiceModeControl_js_namespaceObject.ServiceModeControl,
53
+ filterBase64Value: ()=>external_utils_js_namespaceObject.filterBase64Value,
51
54
  colorForName: ()=>color_js_namespaceObject.colorForName,
52
- GithubStar: ()=>github_star_index_js_namespaceObject.GithubStar,
53
- Logo: ()=>logo_index_js_namespaceObject.Logo,
54
- UniversalPlayground: ()=>universal_playground_index_js_namespaceObject.UniversalPlayground,
55
- useEnvConfig: ()=>store_js_namespaceObject.useEnvConfig,
56
- PromptInput: ()=>prompt_input_index_js_namespaceObject.PromptInput,
57
- ContextPreview: ()=>context_preview_index_js_namespaceObject.ContextPreview,
58
- NoOpStorageProvider: ()=>storage_provider_js_namespaceObject.NoOpStorageProvider,
59
- StaticContextProvider: ()=>context_provider_js_namespaceObject.StaticContextProvider,
60
- Blackboard: ()=>blackboard_index_js_namespaceObject.Blackboard,
61
- Player: ()=>player_index_js_namespaceObject.Player,
62
- AgentContextProvider: ()=>context_provider_js_namespaceObject.AgentContextProvider,
63
- filterBase64Value: ()=>external_utils_index_js_namespaceObject.filterBase64Value,
64
- NoOpContextProvider: ()=>context_provider_js_namespaceObject.NoOpContextProvider,
65
- highlightColorForType: ()=>color_js_namespaceObject.highlightColorForType,
66
- iconForStatus: ()=>misc_index_js_namespaceObject.iconForStatus,
55
+ GithubStar: ()=>github_star_js_namespaceObject.GithubStar,
56
+ Logo: ()=>logo_js_namespaceObject.Logo,
67
57
  globalThemeConfig: ()=>color_js_namespaceObject.globalThemeConfig,
68
- MemoryStorageProvider: ()=>storage_provider_js_namespaceObject.MemoryStorageProvider
58
+ highlightColorForType: ()=>color_js_namespaceObject.highlightColorForType,
59
+ iconForStatus: ()=>misc_js_namespaceObject.iconForStatus
69
60
  });
70
61
  require("./component/playground/index.css");
71
- require("./component/universal-playground/index.css");
72
- const replay_scripts_js_namespaceObject = require("./utils/replay-scripts.js");
73
- const store_js_namespaceObject = require("./store/store.js");
74
- const color_js_namespaceObject = require("./utils/color.js");
75
- const index_js_namespaceObject = require("./component/env-config/index.js");
76
- const logo_index_js_namespaceObject = require("./component/logo/index.js");
77
- const misc_index_js_namespaceObject = require("./component/misc/index.js");
78
- const useServerValid_js_namespaceObject = require("./hooks/useServerValid.js");
79
- const playground_result_index_js_namespaceObject = require("./component/playground-result/index.js");
80
- const service_mode_control_index_js_namespaceObject = require("./component/service-mode-control/index.js");
81
- const context_preview_index_js_namespaceObject = require("./component/context-preview/index.js");
82
- const prompt_input_index_js_namespaceObject = require("./component/prompt-input/index.js");
83
- const player_index_js_namespaceObject = require("./component/player/index.js");
84
- const blackboard_index_js_namespaceObject = require("./component/blackboard/index.js");
85
- const github_star_index_js_namespaceObject = require("./component/github-star/index.js");
86
- const playground_utils_js_namespaceObject = require("./utils/playground-utils.js");
87
- const external_utils_index_js_namespaceObject = require("./utils/index.js");
88
- const shiny_text_index_js_namespaceObject = require("./component/shiny-text/index.js");
89
- var shiny_text_index_js_default = /*#__PURE__*/ __webpack_require__.n(shiny_text_index_js_namespaceObject);
90
- const universal_playground_index_js_namespaceObject = require("./component/universal-playground/index.js");
91
- var universal_playground_index_js_default = /*#__PURE__*/ __webpack_require__.n(universal_playground_index_js_namespaceObject);
92
- const storage_provider_js_namespaceObject = require("./component/universal-playground/providers/storage-provider.js");
93
- const context_provider_js_namespaceObject = require("./component/universal-playground/providers/context-provider.js");
94
- exports.AgentContextProvider = __webpack_exports__.AgentContextProvider;
95
- exports.BaseContextProvider = __webpack_exports__.BaseContextProvider;
62
+ const replay_scripts_js_namespaceObject = require("./component/replay-scripts.js");
63
+ const store_js_namespaceObject = require("./component/store/store.js");
64
+ const color_js_namespaceObject = require("./component/color.js");
65
+ const env_config_js_namespaceObject = require("./component/env-config.js");
66
+ const logo_js_namespaceObject = require("./component/logo.js");
67
+ const misc_js_namespaceObject = require("./component/misc.js");
68
+ const useServerValid_js_namespaceObject = require("./component/playground/useServerValid.js");
69
+ const PlaygroundResult_js_namespaceObject = require("./component/playground/PlaygroundResult.js");
70
+ const ServiceModeControl_js_namespaceObject = require("./component/playground/ServiceModeControl.js");
71
+ const ContextPreview_js_namespaceObject = require("./component/playground/ContextPreview.js");
72
+ const PromptInput_js_namespaceObject = require("./component/playground/PromptInput.js");
73
+ const player_js_namespaceObject = require("./component/player.js");
74
+ const blackboard_js_namespaceObject = require("./component/blackboard.js");
75
+ const github_star_js_namespaceObject = require("./component/github-star.js");
76
+ const playground_utils_js_namespaceObject = require("./component/playground/playground-utils.js");
77
+ const external_utils_js_namespaceObject = require("./utils.js");
78
+ const shiny_text_js_namespaceObject = require("./component/shiny-text.js");
79
+ var shiny_text_js_default = /*#__PURE__*/ __webpack_require__.n(shiny_text_js_namespaceObject);
96
80
  exports.Blackboard = __webpack_exports__.Blackboard;
97
81
  exports.ContextPreview = __webpack_exports__.ContextPreview;
98
82
  exports.EnvConfig = __webpack_exports__.EnvConfig;
99
83
  exports.GithubStar = __webpack_exports__.GithubStar;
100
- exports.LocalStorageProvider = __webpack_exports__.LocalStorageProvider;
101
84
  exports.Logo = __webpack_exports__.Logo;
102
- exports.MemoryStorageProvider = __webpack_exports__.MemoryStorageProvider;
103
- exports.NoOpContextProvider = __webpack_exports__.NoOpContextProvider;
104
- exports.NoOpStorageProvider = __webpack_exports__.NoOpStorageProvider;
105
85
  exports.Player = __webpack_exports__.Player;
106
86
  exports.PlaygroundResultView = __webpack_exports__.PlaygroundResultView;
107
87
  exports.PromptInput = __webpack_exports__.PromptInput;
108
88
  exports.ServiceModeControl = __webpack_exports__.ServiceModeControl;
109
89
  exports.ShinyText = __webpack_exports__.ShinyText;
110
- exports.StaticContextProvider = __webpack_exports__.StaticContextProvider;
111
- exports.UniversalPlayground = __webpack_exports__.UniversalPlayground;
112
- exports.UniversalPlaygroundDefault = __webpack_exports__.UniversalPlaygroundDefault;
113
90
  exports.actionNameForType = __webpack_exports__.actionNameForType;
114
91
  exports.allScriptsFromDump = __webpack_exports__.allScriptsFromDump;
115
92
  exports.colorForName = __webpack_exports__.colorForName;
@@ -125,25 +102,16 @@ exports.timeStr = __webpack_exports__.timeStr;
125
102
  exports.useEnvConfig = __webpack_exports__.useEnvConfig;
126
103
  exports.useServerValid = __webpack_exports__.useServerValid;
127
104
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
128
- "AgentContextProvider",
129
- "BaseContextProvider",
130
105
  "Blackboard",
131
106
  "ContextPreview",
132
107
  "EnvConfig",
133
108
  "GithubStar",
134
- "LocalStorageProvider",
135
109
  "Logo",
136
- "MemoryStorageProvider",
137
- "NoOpContextProvider",
138
- "NoOpStorageProvider",
139
110
  "Player",
140
111
  "PlaygroundResultView",
141
112
  "PromptInput",
142
113
  "ServiceModeControl",
143
114
  "ShinyText",
144
- "StaticContextProvider",
145
- "UniversalPlayground",
146
- "UniversalPlaygroundDefault",
147
115
  "actionNameForType",
148
116
  "allScriptsFromDump",
149
117
  "colorForName",
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ setSideEffect: ()=>setSideEffect
28
+ });
29
+ const external_buffer_namespaceObject = require("buffer");
30
+ var _window;
31
+ (_window = window).global || (_window.global = window);
32
+ window.Buffer = external_buffer_namespaceObject.Buffer;
33
+ let sideEffect = 0;
34
+ const setSideEffect = ()=>{
35
+ sideEffect++;
36
+ return sideEffect;
37
+ };
38
+ exports.setSideEffect = __webpack_exports__.setSideEffect;
39
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
40
+ "setSideEffect"
41
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
42
+ Object.defineProperty(exports, '__esModule', {
43
+ value: true
44
+ });
@@ -0,0 +1,2 @@
1
+ declare const AsyncLocalStorage: {};
2
+ export { AsyncLocalStorage };
@@ -1,7 +1,7 @@
1
1
  import 'pixi.js/unsafe-eval';
2
- import type { BaseElement, Rect, UIContext } from '@midscene/core';
3
2
  import * as PIXI from 'pixi.js';
4
- import './index.less';
3
+ import type { BaseElement, Rect, UIContext } from '../../../core';
4
+ import './blackboard.less';
5
5
  export declare const pointMarkForItem: (point: [number, number], type: "highlightPoint") => PIXI.Graphics;
6
6
  export declare const rectMarkForItem: (rect: Rect, name: string, type: "element" | "searchArea" | "highlight") => (PIXI.Graphics | PIXI.Text)[];
7
7
  export declare const Blackboard: (props: {
@@ -1,2 +1,2 @@
1
- import './index.less';
1
+ import './github-star.less';
2
2
  export declare const GithubStar: () => import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import './index.less';
1
+ import './logo.less';
2
2
  export declare const LogoUrl = "https://lf3-static.bytednsdoc.com/obj/eden-cn/vhaeh7vhabf/Midscene.png";
3
3
  export declare const Logo: ({ hideLogo }: {
4
4
  hideLogo?: boolean;
@@ -0,0 +1,2 @@
1
+ export declare function timeCostStrElement(timeCost?: number): import("react").JSX.Element;
2
+ export declare const iconForStatus: (status: string) => import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import 'pixi.js/unsafe-eval';
2
- import './index.less';
3
- import type { AnimationScript } from '../../utils/replay-scripts';
2
+ import './player.less';
3
+ import type { AnimationScript } from './replay-scripts';
4
4
  export declare function Player(props?: {
5
5
  replayScripts?: AnimationScript[];
6
6
  imageWidth?: number;
@@ -1,4 +1,5 @@
1
1
  import type React from 'react';
2
+ import './index.less';
2
3
  interface ConfigSelectorProps {
3
4
  showDeepThinkOption: boolean;
4
5
  enableTracking: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { UIContext } from '@midscene/core';
2
2
  import type React from 'react';
3
+ import './index.less';
3
4
  interface ContextPreviewProps {
4
5
  uiContextPreview: UIContext | undefined;
5
6
  setUiContextPreview: (context: UIContext) => void;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import type { HistoryItem } from '../../store/history';
2
+ import type { HistoryItem } from '../store/history';
3
3
  import './index.less';
4
4
  interface HistorySelectorProps {
5
5
  onSelect: (history: HistoryItem) => void;
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
- import type { PlaygroundResult as PlaygroundResultType } from '../../types';
3
- import type { ServiceModeType } from '../../types';
4
- import type { ReplayScriptsInfo } from '../../utils/replay-scripts';
2
+ import type { ReplayScriptsInfo } from '../replay-scripts';
3
+ import type { PlaygroundResult as PlaygroundResultType } from './playground-types';
4
+ import type { ServiceModeType } from './playground-types';
5
+ import './index.less';
5
6
  interface PlaygroundResultProps {
6
7
  result: PlaygroundResultType | null;
7
8
  loading: boolean;
@@ -1,7 +1,6 @@
1
- import './index.less';
2
1
  import React from 'react';
3
- import type { RunType } from '../../types';
4
- import type { ServiceModeType } from '../../types';
2
+ import type { RunType } from './playground-types';
3
+ import type { ServiceModeType } from './playground-types';
5
4
  import './index.less';
6
5
  import type { DeviceAction } from '@midscene/core';
7
6
  interface PromptInputProps {
@@ -1,4 +1,5 @@
1
1
  import type React from 'react';
2
+ import './index.less';
2
3
  interface ServiceModeControlProps {
3
4
  serviceMode: 'Server' | 'In-Browser';
4
5
  }
@@ -1,4 +1,8 @@
1
- import type { InfoListItem, PlaygroundResult } from '../types';
1
+ import type React from 'react';
2
+ import './index.less';
3
+ export declare const errorMessageServerNotReady: React.JSX.Element;
4
+ export declare const serverLaunchTip: (notReadyMessage?: React.ReactNode | string) => React.JSX.Element;
5
+ export declare const emptyResultTip: React.JSX.Element;
2
6
  export declare const trackingTip = "limit popup to current tab";
3
7
  export declare const deepThinkTip = "deep think";
4
8
  export declare const screenshotIncludedTip = "include screenshot in request";
@@ -70,5 +74,3 @@ export declare const apiMetadata: {
70
74
  };
71
75
  };
72
76
  export declare const defaultMainButtons: string[];
73
- export declare const WELCOME_MESSAGE_TEMPLATE: Omit<InfoListItem, 'id' | 'timestamp'>;
74
- export declare const BLANK_RESULT: PlaygroundResult;
@@ -0,0 +1,19 @@
1
+ import type { GroupedActionDump, WebUIContext } from '@midscene/core';
2
+ import type { PlaygroundAgent } from '@midscene/playground';
3
+ export interface PlaygroundResult {
4
+ result: any;
5
+ dump?: GroupedActionDump | null;
6
+ reportHTML?: string | null;
7
+ error: string | null;
8
+ }
9
+ export interface PlaygroundProps {
10
+ getAgent: (forceSameTabNavigation?: boolean) => PlaygroundAgent | null;
11
+ hideLogo?: boolean;
12
+ showContextPreview?: boolean;
13
+ dryMode?: boolean;
14
+ }
15
+ export interface StaticPlaygroundProps {
16
+ context: WebUIContext | null;
17
+ }
18
+ export type ServiceModeType = 'Server' | 'In-Browser' | 'In-Browser-Extension';
19
+ export type RunType = 'aiAction' | 'aiQuery' | 'aiAssert' | 'aiTap' | 'aiDoubleClick' | 'aiHover' | 'aiInput' | 'aiRightClick' | 'aiKeyboardPress' | 'aiScroll' | 'aiLocate' | 'aiBoolean' | 'aiNumber' | 'aiString' | 'aiAsk' | 'aiWaitFor';
@@ -0,0 +1,72 @@
1
+ import type { DeviceAction } from '@midscene/core';
2
+ export interface ZodType {
3
+ _def?: {
4
+ typeName: 'ZodOptional' | 'ZodDefault' | 'ZodNullable' | 'ZodObject' | 'ZodEnum' | 'ZodNumber' | 'ZodString' | 'ZodBoolean';
5
+ innerType?: ZodType;
6
+ defaultValue?: () => unknown;
7
+ shape?: () => Record<string, ZodType>;
8
+ values?: string[];
9
+ description?: string;
10
+ };
11
+ description?: string;
12
+ }
13
+ export interface ZodObjectSchema extends ZodType {
14
+ shape: Record<string, ZodType>;
15
+ parse: (data: unknown) => unknown;
16
+ }
17
+ export interface ZodEnumSchema extends ZodType {
18
+ _def: {
19
+ typeName: 'ZodEnum';
20
+ values: string[];
21
+ };
22
+ }
23
+ export interface ZodNumberSchema extends ZodType {
24
+ _def: {
25
+ typeName: 'ZodNumber';
26
+ };
27
+ }
28
+ export interface ZodBooleanSchema extends ZodType {
29
+ _def: {
30
+ typeName: 'ZodBoolean';
31
+ };
32
+ }
33
+ export interface ZodRuntimeAccess extends ZodType {
34
+ shape?: Record<string, ZodType>;
35
+ description?: string;
36
+ typeName?: string;
37
+ type?: string;
38
+ }
39
+ export interface ActionSpaceItem extends Omit<DeviceAction<any>, 'paramSchema'> {
40
+ paramSchema?: ZodObjectSchema;
41
+ }
42
+ export interface FormParams {
43
+ [key: string]: string | number | boolean | null | undefined;
44
+ }
45
+ export declare const VALIDATION_CONSTANTS: {
46
+ readonly ZOD_TYPES: {
47
+ readonly OPTIONAL: "ZodOptional";
48
+ readonly DEFAULT: "ZodDefault";
49
+ readonly NULLABLE: "ZodNullable";
50
+ readonly OBJECT: "ZodObject";
51
+ readonly ENUM: "ZodEnum";
52
+ readonly NUMBER: "ZodNumber";
53
+ readonly STRING: "ZodString";
54
+ readonly BOOLEAN: "ZodBoolean";
55
+ };
56
+ readonly FIELD_FLAGS: {
57
+ readonly LOCATION: "midscene_location_field_flag";
58
+ };
59
+ readonly DEFAULT_VALUES: {
60
+ readonly ACTION_TYPE: "aiAction";
61
+ readonly TIMEOUT_MS: 15000;
62
+ readonly CHECK_INTERVAL_MS: 3000;
63
+ };
64
+ };
65
+ export declare const isZodObjectSchema: (schema: unknown) => schema is ZodObjectSchema;
66
+ export declare const isLocateField: (field: ZodType) => boolean;
67
+ export declare const unwrapZodType: (field: ZodType) => {
68
+ actualField: ZodType;
69
+ isOptional: boolean;
70
+ hasDefault: boolean;
71
+ };
72
+ export declare const extractDefaultValue: (field: ZodType) => unknown;
@@ -1,3 +1,4 @@
1
+ import './player.less';
1
2
  import type { ExecutionDump, ExecutionTask, GroupedActionDump, LocateResultElement, Rect, UIContext } from '@midscene/core';
2
3
  export interface CameraState {
3
4
  left: number;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import './index.less';
2
+ import './shiny-text.less';
3
3
  type ColorTheme = 'blue' | 'purple' | 'green' | 'rainbow';
4
4
  interface ShinyTextProps {
5
5
  text: string;
@@ -1,24 +1,19 @@
1
1
  import './component/playground/index.less';
2
- import './component/universal-playground/index.less';
3
- export { type AnimationScript, type ReplayScriptsInfo, allScriptsFromDump, generateAnimationScripts, } from './utils/replay-scripts';
4
- export { useEnvConfig } from './store/store';
5
- export { colorForName, highlightColorForType, globalThemeConfig, } from './utils/color';
2
+ export { type AnimationScript, type ReplayScriptsInfo, allScriptsFromDump, generateAnimationScripts, } from './component/replay-scripts';
3
+ export { useEnvConfig } from './component/store/store';
4
+ export { colorForName, highlightColorForType, globalThemeConfig, } from './component/color';
6
5
  export { EnvConfig } from './component/env-config';
7
6
  export { Logo } from './component/logo';
8
7
  export { iconForStatus, timeCostStrElement } from './component/misc';
9
- export { useServerValid } from './hooks/useServerValid';
10
- export { PlaygroundResultView } from './component/playground-result';
11
- export type { PlaygroundResult } from './types';
12
- export { ServiceModeControl } from './component/service-mode-control';
13
- export { ContextPreview } from './component/context-preview';
14
- export { PromptInput } from './component/prompt-input';
8
+ export { useServerValid } from './component/playground/useServerValid';
9
+ export { PlaygroundResultView } from './component/playground/PlaygroundResult';
10
+ export type { PlaygroundResult } from './component/playground/playground-types';
11
+ export { ServiceModeControl } from './component/playground/ServiceModeControl';
12
+ export { ContextPreview } from './component/playground/ContextPreview';
13
+ export { PromptInput } from './component/playground/PromptInput';
15
14
  export { Player } from './component/player';
16
15
  export { Blackboard } from './component/blackboard';
17
16
  export { GithubStar } from './component/github-star';
18
- export { actionNameForType, staticAgentFromContext, getPlaceholderForType, } from './utils/playground-utils';
17
+ export { actionNameForType, staticAgentFromContext, getPlaceholderForType, } from './component/playground/playground-utils';
19
18
  export { timeStr, filterBase64Value } from './utils';
20
19
  export { default as ShinyText } from './component/shiny-text';
21
- export { UniversalPlayground, default as UniversalPlaygroundDefault, } from './component/universal-playground';
22
- export type { UniversalPlaygroundProps, PlaygroundSDKLike, StorageProvider, ContextProvider, UniversalPlaygroundConfig, PlaygroundBranding, InfoListItem, FormValue, ExecutionOptions, ProgressCallback, } from './types';
23
- export { LocalStorageProvider, MemoryStorageProvider, NoOpStorageProvider, } from './component/universal-playground/providers/storage-provider';
24
- export { BaseContextProvider, AgentContextProvider, StaticContextProvider, NoOpContextProvider, } from './component/universal-playground/providers/context-provider';
@@ -0,0 +1 @@
1
+ export declare const setSideEffect: () => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/visualizer",
3
- "version": "0.28.2-beta-20250910043028.0",
3
+ "version": "0.28.2-beta-20250910065550.0",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
@@ -70,10 +70,10 @@
70
70
  "antd": "^5.21.6",
71
71
  "buffer": "6.0.3",
72
72
  "dayjs": "^1.11.11",
73
- "@midscene/core": "0.28.2-beta-20250910043028.0",
74
- "@midscene/shared": "0.28.2-beta-20250910043028.0",
75
- "@midscene/web": "0.28.2-beta-20250910043028.0",
76
- "@midscene/playground": "0.28.2-beta-20250910043028.0"
73
+ "@midscene/core": "0.28.2-beta-20250910065550.0",
74
+ "@midscene/shared": "0.28.2-beta-20250910065550.0",
75
+ "@midscene/playground": "0.28.2-beta-20250910065550.0",
76
+ "@midscene/web": "0.28.2-beta-20250910065550.0"
77
77
  },
78
78
  "license": "MIT",
79
79
  "scripts": {
@@ -1,132 +0,0 @@
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
-
@@ -1 +0,0 @@
1
- export * from "../types.mjs";
@@ -1,8 +0,0 @@
1
- import { ContextPreview } from "../context-preview/index.mjs";
2
- import { PlaygroundResultView } from "../playground-result/index.mjs";
3
- import { PromptInput } from "../prompt-input/index.mjs";
4
- import { useServerValid } from "../../hooks/useServerValid.mjs";
5
- import { ServiceModeControl } from "../service-mode-control/index.mjs";
6
- import { useEnvConfig } from "../../store/store.mjs";
7
- export * from "../../types.mjs";
8
- export { ContextPreview, PlaygroundResultView, PromptInput, ServiceModeControl, useEnvConfig, useServerValid };