@midscene/visualizer 0.28.9-beta-20250917052636.0 → 0.28.9

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.
@@ -0,0 +1,4 @@
1
+ .github-star {
2
+ height: 22px;
3
+ }
4
+
@@ -0,0 +1,20 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "./index.css";
3
+ const GithubStar = ()=>/*#__PURE__*/ jsx("a", {
4
+ href: "https://github.com/web-infra-dev/midscene",
5
+ target: "_blank",
6
+ rel: "noreferrer",
7
+ style: {
8
+ display: 'flex',
9
+ alignItems: 'center'
10
+ },
11
+ children: /*#__PURE__*/ jsx("img", {
12
+ className: "github-star",
13
+ src: "https://img.shields.io/github/stars/web-infra-dev/midscene?style=social",
14
+ alt: "Github star",
15
+ style: {
16
+ display: 'block'
17
+ }
18
+ })
19
+ });
20
+ export { GithubStar };
@@ -44,34 +44,21 @@
44
44
  }
45
45
 
46
46
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group {
47
- scrollbar-width: thin;
47
+ scrollbar-width: none;
48
+ -ms-overflow-style: none;
48
49
  flex: 1;
49
50
  align-items: center;
50
51
  gap: 8px;
51
52
  min-width: 0;
52
53
  height: 100%;
53
- margin-right: 60px;
54
+ margin-right: 80px;
54
55
  display: flex;
55
56
  overflow-x: auto;
56
57
  overflow-y: hidden;
57
58
  }
58
59
 
59
60
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar {
60
- height: 6px;
61
- }
62
-
63
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-track {
64
- background: #f1f1f1;
65
- border-radius: 3px;
66
- }
67
-
68
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb {
69
- background: #c1c1c1;
70
- border-radius: 3px;
71
- }
72
-
73
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb:hover {
74
- background: #a8a8a8;
61
+ display: none;
75
62
  }
76
63
 
77
64
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-form-item {
@@ -159,11 +146,10 @@
159
146
 
160
147
  .prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
161
148
  z-index: 10;
162
- background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, .5) 20%, rgba(255, 255, 255, .8) 40%, rgba(255, 255, 255, .95) 60%, #fff 70%);
149
+ background: #fff;
163
150
  flex-shrink: 0;
164
151
  align-items: center;
165
- width: 80px;
166
- padding-left: 20px;
152
+ padding-left: 8px;
167
153
  display: flex;
168
154
  position: absolute;
169
155
  top: 50%;
@@ -10,34 +10,21 @@
10
10
  }
11
11
 
12
12
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group {
13
- scrollbar-width: thin;
13
+ scrollbar-width: none;
14
+ -ms-overflow-style: none;
14
15
  flex: 1;
15
16
  align-items: center;
16
17
  gap: 8px;
17
18
  min-width: 0;
18
19
  height: 100%;
19
- margin-right: 60px;
20
+ margin-right: 80px;
20
21
  display: flex;
21
22
  overflow-x: auto;
22
23
  overflow-y: hidden;
23
24
  }
24
25
 
25
26
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar {
26
- height: 6px;
27
- }
28
-
29
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-track {
30
- background: #f1f1f1;
31
- border-radius: 3px;
32
- }
33
-
34
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb {
35
- background: #c1c1c1;
36
- border-radius: 3px;
37
- }
38
-
39
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb:hover {
40
- background: #a8a8a8;
27
+ display: none;
41
28
  }
42
29
 
43
30
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-form-item {
@@ -125,11 +112,10 @@
125
112
 
126
113
  .prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
127
114
  z-index: 10;
128
- background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, .5) 20%, rgba(255, 255, 255, .8) 40%, rgba(255, 255, 255, .95) 60%, #fff 70%);
115
+ background: #fff;
129
116
  flex-shrink: 0;
130
117
  align-items: center;
131
- width: 80px;
132
- padding-left: 20px;
118
+ padding-left: 8px;
133
119
  display: flex;
134
120
  position: absolute;
135
121
  top: 50%;
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { BorderOutlined, DownOutlined, SendOutlined } from "@ant-design/icons";
3
3
  import "./index.css";
4
- import { Button, Dropdown, Form, Input, Radio, Tooltip } from "antd";
4
+ import { Button, Dropdown, Form, Input, Radio, Space, Tooltip } from "antd";
5
5
  import react, { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
6
  import { useHistoryStore } from "../../store/history.mjs";
7
7
  import { extractDefaultValue, isLocateField, isZodObjectSchema, unwrapZodType } from "../../types.mjs";
@@ -17,7 +17,6 @@ const PromptInput = (param)=>{
17
17
  const [promptValue, setPromptValue] = useState('');
18
18
  const placeholder = getPlaceholderForType(selectedType);
19
19
  const textAreaRef = useRef(null);
20
- const modeRadioGroupRef = useRef(null);
21
20
  const params = Form.useWatch('params', form);
22
21
  const lastHistoryRef = useRef(null);
23
22
  const history = useHistoryStore((state)=>state.history);
@@ -161,27 +160,6 @@ const PromptInput = (param)=>{
161
160
  lastSelectedType,
162
161
  setLastSelectedType
163
162
  ]);
164
- const scrollToSelectedItem = useCallback(()=>{
165
- const container = modeRadioGroupRef.current;
166
- if (!container) return;
167
- let targetElement = null;
168
- const selectedRadioButton = container.querySelector('.ant-radio-button-wrapper-checked');
169
- const dropdownButton = container.querySelector('.more-apis-button.selected-from-dropdown');
170
- if (selectedRadioButton) targetElement = selectedRadioButton;
171
- else if (dropdownButton) targetElement = dropdownButton;
172
- if (targetElement) {
173
- const containerRect = container.getBoundingClientRect();
174
- const targetRect = targetElement.getBoundingClientRect();
175
- const targetLeft = targetRect.left - containerRect.left + container.scrollLeft;
176
- const targetWidth = targetRect.width;
177
- const containerWidth = containerRect.width;
178
- const optimalScrollLeft = targetLeft - (containerWidth - targetWidth) / 2;
179
- container.scrollTo({
180
- left: Math.max(0, optimalScrollLeft),
181
- behavior: 'smooth'
182
- });
183
- }
184
- }, []);
185
163
  useEffect(()=>{
186
164
  const lastHistory = historyForSelectedType[0];
187
165
  if (lastHistory && lastHistoryRef.current && lastHistory.timestamp === lastHistoryRef.current.timestamp) return;
@@ -208,15 +186,6 @@ const PromptInput = (param)=>{
208
186
  form,
209
187
  getDefaultParams
210
188
  ]);
211
- useEffect(()=>{
212
- const timeoutId = setTimeout(()=>{
213
- scrollToSelectedItem();
214
- }, 100);
215
- return ()=>clearTimeout(timeoutId);
216
- }, [
217
- selectedType,
218
- scrollToSelectedItem
219
- ]);
220
189
  const formPromptValue = Form.useWatch('prompt', form);
221
190
  useEffect(()=>{
222
191
  if (formPromptValue !== promptValue) setPromptValue(formPromptValue || '');
@@ -532,12 +501,11 @@ const PromptInput = (param)=>{
532
501
  return /*#__PURE__*/ jsxs("div", {
533
502
  className: "prompt-input-wrapper",
534
503
  children: [
535
- /*#__PURE__*/ jsxs("div", {
504
+ /*#__PURE__*/ jsxs(Space, {
536
505
  className: "mode-radio-group-wrapper",
537
506
  children: [
538
507
  /*#__PURE__*/ jsxs("div", {
539
508
  className: "mode-radio-group",
540
- ref: modeRadioGroupRef,
541
509
  children: [
542
510
  /*#__PURE__*/ jsx(Form.Item, {
543
511
  name: "type",
package/dist/es/index.mjs CHANGED
@@ -5,7 +5,6 @@ import { useEnvConfig } from "./store/store.mjs";
5
5
  import { colorForName, globalThemeConfig, highlightColorForType } from "./utils/color.mjs";
6
6
  import { EnvConfig } from "./component/env-config/index.mjs";
7
7
  import { EnvConfigReminder } from "./component/env-config-reminder/index.mjs";
8
- import { NavActions } from "./component/nav-actions/index.mjs";
9
8
  import { Logo } from "./component/logo/index.mjs";
10
9
  import { iconForStatus, timeCostStrElement } from "./component/misc/index.mjs";
11
10
  import { useServerValid } from "./hooks/useServerValid.mjs";
@@ -16,10 +15,11 @@ import { ContextPreview } from "./component/context-preview/index.mjs";
16
15
  import { PromptInput } from "./component/prompt-input/index.mjs";
17
16
  import { Player } from "./component/player/index.mjs";
18
17
  import { Blackboard } from "./component/blackboard/index.mjs";
18
+ import { GithubStar } from "./component/github-star/index.mjs";
19
19
  import { actionNameForType, getPlaceholderForType, staticAgentFromContext } from "./utils/playground-utils.mjs";
20
20
  import { filterBase64Value, timeStr } from "./utils/index.mjs";
21
21
  import shiny_text from "./component/shiny-text/index.mjs";
22
22
  import universal_playground, { UniversalPlayground } from "./component/universal-playground/index.mjs";
23
23
  import { LocalStorageProvider, MemoryStorageProvider, NoOpStorageProvider } from "./component/universal-playground/providers/storage-provider.mjs";
24
24
  import { AgentContextProvider, BaseContextProvider, NoOpContextProvider, StaticContextProvider } from "./component/universal-playground/providers/context-provider.mjs";
25
- export { AgentContextProvider, BaseContextProvider, Blackboard, ContextPreview, EnvConfig, EnvConfigReminder, LocalStorageProvider, Logo, MemoryStorageProvider, NavActions, NoOpContextProvider, NoOpStorageProvider, Player, PlaygroundResultView, PromptInput, ServiceModeControl, shiny_text as ShinyText, StaticContextProvider, UniversalPlayground, universal_playground as UniversalPlaygroundDefault, actionNameForType, allScriptsFromDump, colorForName, filterBase64Value, generateAnimationScripts, getPlaceholderForType, globalThemeConfig, highlightColorForType, iconForStatus, safeOverrideAIConfig, staticAgentFromContext, timeCostStrElement, timeStr, useEnvConfig, useSafeOverrideAIConfig, useServerValid };
25
+ export { AgentContextProvider, BaseContextProvider, Blackboard, ContextPreview, EnvConfig, EnvConfigReminder, GithubStar, LocalStorageProvider, Logo, MemoryStorageProvider, NoOpContextProvider, NoOpStorageProvider, Player, PlaygroundResultView, PromptInput, ServiceModeControl, shiny_text as ShinyText, StaticContextProvider, UniversalPlayground, universal_playground as UniversalPlaygroundDefault, actionNameForType, allScriptsFromDump, colorForName, filterBase64Value, generateAnimationScripts, getPlaceholderForType, globalThemeConfig, highlightColorForType, iconForStatus, safeOverrideAIConfig, staticAgentFromContext, timeCostStrElement, timeStr, useEnvConfig, useSafeOverrideAIConfig, useServerValid };
@@ -0,0 +1,4 @@
1
+ .github-star {
2
+ height: 22px;
3
+ }
4
+
@@ -0,0 +1,54 @@
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
+ GithubStar: ()=>GithubStar
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ require("./index.css");
31
+ const GithubStar = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
32
+ href: "https://github.com/web-infra-dev/midscene",
33
+ target: "_blank",
34
+ rel: "noreferrer",
35
+ style: {
36
+ display: 'flex',
37
+ alignItems: 'center'
38
+ },
39
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
40
+ className: "github-star",
41
+ src: "https://img.shields.io/github/stars/web-infra-dev/midscene?style=social",
42
+ alt: "Github star",
43
+ style: {
44
+ display: 'block'
45
+ }
46
+ })
47
+ });
48
+ exports.GithubStar = __webpack_exports__.GithubStar;
49
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
50
+ "GithubStar"
51
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
52
+ Object.defineProperty(exports, '__esModule', {
53
+ value: true
54
+ });
@@ -44,34 +44,21 @@
44
44
  }
45
45
 
46
46
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group {
47
- scrollbar-width: thin;
47
+ scrollbar-width: none;
48
+ -ms-overflow-style: none;
48
49
  flex: 1;
49
50
  align-items: center;
50
51
  gap: 8px;
51
52
  min-width: 0;
52
53
  height: 100%;
53
- margin-right: 60px;
54
+ margin-right: 80px;
54
55
  display: flex;
55
56
  overflow-x: auto;
56
57
  overflow-y: hidden;
57
58
  }
58
59
 
59
60
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar {
60
- height: 6px;
61
- }
62
-
63
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-track {
64
- background: #f1f1f1;
65
- border-radius: 3px;
66
- }
67
-
68
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb {
69
- background: #c1c1c1;
70
- border-radius: 3px;
71
- }
72
-
73
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb:hover {
74
- background: #a8a8a8;
61
+ display: none;
75
62
  }
76
63
 
77
64
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-form-item {
@@ -159,11 +146,10 @@
159
146
 
160
147
  .prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
161
148
  z-index: 10;
162
- background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, .5) 20%, rgba(255, 255, 255, .8) 40%, rgba(255, 255, 255, .95) 60%, #fff 70%);
149
+ background: #fff;
163
150
  flex-shrink: 0;
164
151
  align-items: center;
165
- width: 80px;
166
- padding-left: 20px;
152
+ padding-left: 8px;
167
153
  display: flex;
168
154
  position: absolute;
169
155
  top: 50%;
@@ -10,34 +10,21 @@
10
10
  }
11
11
 
12
12
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group {
13
- scrollbar-width: thin;
13
+ scrollbar-width: none;
14
+ -ms-overflow-style: none;
14
15
  flex: 1;
15
16
  align-items: center;
16
17
  gap: 8px;
17
18
  min-width: 0;
18
19
  height: 100%;
19
- margin-right: 60px;
20
+ margin-right: 80px;
20
21
  display: flex;
21
22
  overflow-x: auto;
22
23
  overflow-y: hidden;
23
24
  }
24
25
 
25
26
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar {
26
- height: 6px;
27
- }
28
-
29
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-track {
30
- background: #f1f1f1;
31
- border-radius: 3px;
32
- }
33
-
34
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb {
35
- background: #c1c1c1;
36
- border-radius: 3px;
37
- }
38
-
39
- .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group::-webkit-scrollbar-thumb:hover {
40
- background: #a8a8a8;
27
+ display: none;
41
28
  }
42
29
 
43
30
  .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-form-item {
@@ -125,11 +112,10 @@
125
112
 
126
113
  .prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
127
114
  z-index: 10;
128
- background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, .5) 20%, rgba(255, 255, 255, .8) 40%, rgba(255, 255, 255, .95) 60%, #fff 70%);
115
+ background: #fff;
129
116
  flex-shrink: 0;
130
117
  align-items: center;
131
- width: 80px;
132
- padding-left: 20px;
118
+ padding-left: 8px;
133
119
  display: flex;
134
120
  position: absolute;
135
121
  top: 50%;
@@ -55,7 +55,6 @@ const PromptInput = (param)=>{
55
55
  const [promptValue, setPromptValue] = (0, external_react_namespaceObject.useState)('');
56
56
  const placeholder = (0, playground_utils_js_namespaceObject.getPlaceholderForType)(selectedType);
57
57
  const textAreaRef = (0, external_react_namespaceObject.useRef)(null);
58
- const modeRadioGroupRef = (0, external_react_namespaceObject.useRef)(null);
59
58
  const params = external_antd_namespaceObject.Form.useWatch('params', form);
60
59
  const lastHistoryRef = (0, external_react_namespaceObject.useRef)(null);
61
60
  const history = (0, history_js_namespaceObject.useHistoryStore)((state)=>state.history);
@@ -199,27 +198,6 @@ const PromptInput = (param)=>{
199
198
  lastSelectedType,
200
199
  setLastSelectedType
201
200
  ]);
202
- const scrollToSelectedItem = (0, external_react_namespaceObject.useCallback)(()=>{
203
- const container = modeRadioGroupRef.current;
204
- if (!container) return;
205
- let targetElement = null;
206
- const selectedRadioButton = container.querySelector('.ant-radio-button-wrapper-checked');
207
- const dropdownButton = container.querySelector('.more-apis-button.selected-from-dropdown');
208
- if (selectedRadioButton) targetElement = selectedRadioButton;
209
- else if (dropdownButton) targetElement = dropdownButton;
210
- if (targetElement) {
211
- const containerRect = container.getBoundingClientRect();
212
- const targetRect = targetElement.getBoundingClientRect();
213
- const targetLeft = targetRect.left - containerRect.left + container.scrollLeft;
214
- const targetWidth = targetRect.width;
215
- const containerWidth = containerRect.width;
216
- const optimalScrollLeft = targetLeft - (containerWidth - targetWidth) / 2;
217
- container.scrollTo({
218
- left: Math.max(0, optimalScrollLeft),
219
- behavior: 'smooth'
220
- });
221
- }
222
- }, []);
223
201
  (0, external_react_namespaceObject.useEffect)(()=>{
224
202
  const lastHistory = historyForSelectedType[0];
225
203
  if (lastHistory && lastHistoryRef.current && lastHistory.timestamp === lastHistoryRef.current.timestamp) return;
@@ -246,15 +224,6 @@ const PromptInput = (param)=>{
246
224
  form,
247
225
  getDefaultParams
248
226
  ]);
249
- (0, external_react_namespaceObject.useEffect)(()=>{
250
- const timeoutId = setTimeout(()=>{
251
- scrollToSelectedItem();
252
- }, 100);
253
- return ()=>clearTimeout(timeoutId);
254
- }, [
255
- selectedType,
256
- scrollToSelectedItem
257
- ]);
258
227
  const formPromptValue = external_antd_namespaceObject.Form.useWatch('prompt', form);
259
228
  (0, external_react_namespaceObject.useEffect)(()=>{
260
229
  if (formPromptValue !== promptValue) setPromptValue(formPromptValue || '');
@@ -570,12 +539,11 @@ const PromptInput = (param)=>{
570
539
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
571
540
  className: "prompt-input-wrapper",
572
541
  children: [
573
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
542
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
574
543
  className: "mode-radio-group-wrapper",
575
544
  children: [
576
545
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
577
546
  className: "mode-radio-group",
578
- ref: modeRadioGroupRef,
579
547
  children: [
580
548
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Form.Item, {
581
549
  name: "type",
package/dist/lib/index.js CHANGED
@@ -51,9 +51,9 @@ __webpack_require__.d(__webpack_exports__, {
51
51
  BaseContextProvider: ()=>context_provider_js_namespaceObject.BaseContextProvider,
52
52
  colorForName: ()=>color_js_namespaceObject.colorForName,
53
53
  safeOverrideAIConfig: ()=>useSafeOverrideAIConfig_js_namespaceObject.safeOverrideAIConfig,
54
+ GithubStar: ()=>github_star_index_js_namespaceObject.GithubStar,
54
55
  Logo: ()=>logo_index_js_namespaceObject.Logo,
55
56
  UniversalPlayground: ()=>universal_playground_index_js_namespaceObject.UniversalPlayground,
56
- NavActions: ()=>nav_actions_index_js_namespaceObject.NavActions,
57
57
  useEnvConfig: ()=>store_js_namespaceObject.useEnvConfig,
58
58
  NoOpStorageProvider: ()=>storage_provider_js_namespaceObject.NoOpStorageProvider,
59
59
  ContextPreview: ()=>context_preview_index_js_namespaceObject.ContextPreview,
@@ -77,7 +77,6 @@ const store_js_namespaceObject = require("./store/store.js");
77
77
  const color_js_namespaceObject = require("./utils/color.js");
78
78
  const index_js_namespaceObject = require("./component/env-config/index.js");
79
79
  const env_config_reminder_index_js_namespaceObject = require("./component/env-config-reminder/index.js");
80
- const nav_actions_index_js_namespaceObject = require("./component/nav-actions/index.js");
81
80
  const logo_index_js_namespaceObject = require("./component/logo/index.js");
82
81
  const misc_index_js_namespaceObject = require("./component/misc/index.js");
83
82
  const useServerValid_js_namespaceObject = require("./hooks/useServerValid.js");
@@ -88,6 +87,7 @@ const context_preview_index_js_namespaceObject = require("./component/context-pr
88
87
  const prompt_input_index_js_namespaceObject = require("./component/prompt-input/index.js");
89
88
  const player_index_js_namespaceObject = require("./component/player/index.js");
90
89
  const blackboard_index_js_namespaceObject = require("./component/blackboard/index.js");
90
+ const github_star_index_js_namespaceObject = require("./component/github-star/index.js");
91
91
  const playground_utils_js_namespaceObject = require("./utils/playground-utils.js");
92
92
  const external_utils_index_js_namespaceObject = require("./utils/index.js");
93
93
  const shiny_text_index_js_namespaceObject = require("./component/shiny-text/index.js");
@@ -102,10 +102,10 @@ exports.Blackboard = __webpack_exports__.Blackboard;
102
102
  exports.ContextPreview = __webpack_exports__.ContextPreview;
103
103
  exports.EnvConfig = __webpack_exports__.EnvConfig;
104
104
  exports.EnvConfigReminder = __webpack_exports__.EnvConfigReminder;
105
+ exports.GithubStar = __webpack_exports__.GithubStar;
105
106
  exports.LocalStorageProvider = __webpack_exports__.LocalStorageProvider;
106
107
  exports.Logo = __webpack_exports__.Logo;
107
108
  exports.MemoryStorageProvider = __webpack_exports__.MemoryStorageProvider;
108
- exports.NavActions = __webpack_exports__.NavActions;
109
109
  exports.NoOpContextProvider = __webpack_exports__.NoOpContextProvider;
110
110
  exports.NoOpStorageProvider = __webpack_exports__.NoOpStorageProvider;
111
111
  exports.Player = __webpack_exports__.Player;
@@ -139,10 +139,10 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
139
139
  "ContextPreview",
140
140
  "EnvConfig",
141
141
  "EnvConfigReminder",
142
+ "GithubStar",
142
143
  "LocalStorageProvider",
143
144
  "Logo",
144
145
  "MemoryStorageProvider",
145
- "NavActions",
146
146
  "NoOpContextProvider",
147
147
  "NoOpStorageProvider",
148
148
  "Player",
@@ -0,0 +1,2 @@
1
+ import './index.less';
2
+ export declare const GithubStar: () => import("react").JSX.Element;
@@ -5,8 +5,6 @@ export { useEnvConfig } from './store/store';
5
5
  export { colorForName, highlightColorForType, globalThemeConfig, } from './utils/color';
6
6
  export { EnvConfig } from './component/env-config';
7
7
  export { EnvConfigReminder } from './component/env-config-reminder';
8
- export { NavActions } from './component/nav-actions';
9
- export type { NavActionsProps } from './component/nav-actions';
10
8
  export { Logo } from './component/logo';
11
9
  export { iconForStatus, timeCostStrElement } from './component/misc';
12
10
  export { useServerValid } from './hooks/useServerValid';
@@ -18,6 +16,7 @@ export { ContextPreview } from './component/context-preview';
18
16
  export { PromptInput } from './component/prompt-input';
19
17
  export { Player } from './component/player';
20
18
  export { Blackboard } from './component/blackboard';
19
+ export { GithubStar } from './component/github-star';
21
20
  export { actionNameForType, staticAgentFromContext, getPlaceholderForType, } from './utils/playground-utils';
22
21
  export { timeStr, filterBase64Value } from './utils';
23
22
  export { default as ShinyText } from './component/shiny-text';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/visualizer",
3
- "version": "0.28.9-beta-20250917052636.0",
3
+ "version": "0.28.9",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "react-dom": "18.3.1",
53
53
  "react-resizable-panels": "2.0.22",
54
54
  "rimraf": "~3.0.2",
55
- "tsx": "^4.19.2",
55
+ "tsx": "4.19.2",
56
56
  "typescript": "^5.8.3",
57
57
  "zustand": "4.5.2"
58
58
  },
@@ -70,10 +70,10 @@
70
70
  "antd": "^5.21.6",
71
71
  "buffer": "6.0.3",
72
72
  "dayjs": "^1.11.11",
73
- "@midscene/playground": "0.28.9-beta-20250917052636.0",
74
- "@midscene/web": "0.28.9-beta-20250917052636.0",
75
- "@midscene/core": "0.28.9-beta-20250917052636.0",
76
- "@midscene/shared": "0.28.9-beta-20250917052636.0"
73
+ "@midscene/core": "0.28.9",
74
+ "@midscene/shared": "0.28.9",
75
+ "@midscene/playground": "0.28.9",
76
+ "@midscene/web": "0.28.9"
77
77
  },
78
78
  "license": "MIT",
79
79
  "scripts": {
@@ -1,32 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { GithubOutlined, QuestionCircleOutlined } from "@ant-design/icons";
3
- import { Typography } from "antd";
4
- import { EnvConfig } from "../env-config/index.mjs";
5
- import "./style.css";
6
- function NavActions(param) {
7
- let { showEnvConfig = true, showTooltipWhenEmpty = false, showModelName = false, githubUrl = 'https://github.com/web-infra-dev/midscene', helpUrl = 'https://midscenejs.com/quick-experience.html', className = '' } = param;
8
- return /*#__PURE__*/ jsxs("div", {
9
- className: `nav-actions ${className}`,
10
- children: [
11
- /*#__PURE__*/ jsx(Typography.Link, {
12
- href: githubUrl,
13
- target: "_blank",
14
- children: /*#__PURE__*/ jsx(GithubOutlined, {
15
- className: "nav-icon"
16
- })
17
- }),
18
- /*#__PURE__*/ jsx(Typography.Link, {
19
- href: helpUrl,
20
- target: "_blank",
21
- children: /*#__PURE__*/ jsx(QuestionCircleOutlined, {
22
- className: "nav-icon"
23
- })
24
- }),
25
- showEnvConfig && /*#__PURE__*/ jsx(EnvConfig, {
26
- showTooltipWhenEmpty: showTooltipWhenEmpty,
27
- showModelName: showModelName
28
- })
29
- ]
30
- });
31
- }
32
- export { NavActions };
@@ -1,35 +0,0 @@
1
- .nav-actions {
2
- align-items: center;
3
- gap: 8px;
4
- display: flex;
5
- }
6
-
7
- .nav-actions .nav-icon {
8
- color: rgba(0, 0, 0, .65);
9
- cursor: pointer;
10
- font-size: 16px;
11
- transition: color .3s;
12
- }
13
-
14
- .nav-actions .nav-icon:hover {
15
- color: #2b83ff;
16
- }
17
-
18
- .nav-actions a {
19
- align-items: center;
20
- text-decoration: none;
21
- display: flex;
22
- }
23
-
24
- .nav-actions a:hover .nav-icon {
25
- color: #2b83ff;
26
- }
27
-
28
- [data-theme="dark"] .nav-actions .nav-icon {
29
- color: rgba(255, 255, 255, .65);
30
- }
31
-
32
- [data-theme="dark"] .nav-actions .nav-icon:hover {
33
- color: #2b83ff;
34
- }
35
-
@@ -1,66 +0,0 @@
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
- NavActions: ()=>NavActions
28
- });
29
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const icons_namespaceObject = require("@ant-design/icons");
31
- const external_antd_namespaceObject = require("antd");
32
- const index_js_namespaceObject = require("../env-config/index.js");
33
- require("./style.css");
34
- function NavActions(param) {
35
- let { showEnvConfig = true, showTooltipWhenEmpty = false, showModelName = false, githubUrl = 'https://github.com/web-infra-dev/midscene', helpUrl = 'https://midscenejs.com/quick-experience.html', className = '' } = param;
36
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
37
- className: `nav-actions ${className}`,
38
- children: [
39
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Typography.Link, {
40
- href: githubUrl,
41
- target: "_blank",
42
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.GithubOutlined, {
43
- className: "nav-icon"
44
- })
45
- }),
46
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Typography.Link, {
47
- href: helpUrl,
48
- target: "_blank",
49
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.QuestionCircleOutlined, {
50
- className: "nav-icon"
51
- })
52
- }),
53
- showEnvConfig && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.EnvConfig, {
54
- showTooltipWhenEmpty: showTooltipWhenEmpty,
55
- showModelName: showModelName
56
- })
57
- ]
58
- });
59
- }
60
- exports.NavActions = __webpack_exports__.NavActions;
61
- for(var __webpack_i__ in __webpack_exports__)if (-1 === [
62
- "NavActions"
63
- ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
64
- Object.defineProperty(exports, '__esModule', {
65
- value: true
66
- });
@@ -1,35 +0,0 @@
1
- .nav-actions {
2
- align-items: center;
3
- gap: 8px;
4
- display: flex;
5
- }
6
-
7
- .nav-actions .nav-icon {
8
- color: rgba(0, 0, 0, .65);
9
- cursor: pointer;
10
- font-size: 16px;
11
- transition: color .3s;
12
- }
13
-
14
- .nav-actions .nav-icon:hover {
15
- color: #2b83ff;
16
- }
17
-
18
- .nav-actions a {
19
- align-items: center;
20
- text-decoration: none;
21
- display: flex;
22
- }
23
-
24
- .nav-actions a:hover .nav-icon {
25
- color: #2b83ff;
26
- }
27
-
28
- [data-theme="dark"] .nav-actions .nav-icon {
29
- color: rgba(255, 255, 255, .65);
30
- }
31
-
32
- [data-theme="dark"] .nav-actions .nav-icon:hover {
33
- color: #2b83ff;
34
- }
35
-
@@ -1,10 +0,0 @@
1
- import './style.less';
2
- export interface NavActionsProps {
3
- showEnvConfig?: boolean;
4
- showTooltipWhenEmpty?: boolean;
5
- showModelName?: boolean;
6
- githubUrl?: string;
7
- helpUrl?: string;
8
- className?: string;
9
- }
10
- export declare function NavActions({ showEnvConfig, showTooltipWhenEmpty, showModelName, githubUrl, helpUrl, className, }: NavActionsProps): import("react").JSX.Element;