@midscene/visualizer 1.0.1-beta-20251024063839.0 → 1.0.1-beta-20251027033034.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.
@@ -6,7 +6,6 @@ import { Application, Container, Graphics, Rectangle, Sprite, Text, Texture } fr
6
6
  import { useEffect, useMemo, useRef, useState } from "react";
7
7
  import { colorForName, highlightColorForType } from "../../utils/color.mjs";
8
8
  import "./index.css";
9
- import { treeToList } from "@midscene/shared/extractor";
10
9
  import { DropShadowFilter } from "pixi-filters";
11
10
  import { useBlackboardPreference } from "../../store/store.mjs";
12
11
  const itemFillAlpha = 0.4;
@@ -61,7 +60,7 @@ const rectMarkForItem = (rect, name, type)=>{
61
60
  };
62
61
  const Blackboard = (props)=>{
63
62
  const highlightElements = props.highlightElements || [];
64
- const highlightIds = highlightElements.map((e)=>e.id);
63
+ highlightElements.map((e)=>e.id);
65
64
  const highlightRect = props.highlightRect;
66
65
  const highlightPoints = props.highlightPoints;
67
66
  const context = props.uiContext;
@@ -183,14 +182,6 @@ const Blackboard = (props)=>{
183
182
  const graphics = pointMarkForItem(point, 'highlightPoint');
184
183
  highlightContainer.addChild(graphics);
185
184
  });
186
- const elements = treeToList(context.tree);
187
- elements.forEach((element)=>{
188
- const { rect, content, id } = element;
189
- const ifHighlight = highlightIds.includes(id) || (null == hoverElement ? void 0 : hoverElement.id) === id;
190
- if (ifHighlight) return;
191
- const [graphics] = rectMarkForItem(rect, content, 'element');
192
- elementMarkContainer.addChild(graphics);
193
- });
194
185
  elementMarkContainer.visible = elementsVisible;
195
186
  return {
196
187
  highlightElementRects
@@ -199,7 +190,6 @@ const Blackboard = (props)=>{
199
190
  app,
200
191
  appInitialed,
201
192
  highlightElements,
202
- context.tree,
203
193
  hoverElement,
204
194
  highlightRect,
205
195
  highlightPoints
@@ -6,7 +6,6 @@ import { useEffect, useMemo, useRef, useState } from "react";
6
6
  import "./index.css";
7
7
  import { mouseLoading, mousePointer } from "../../utils/index.mjs";
8
8
  import { CaretRightOutlined, DownloadOutlined, ExportOutlined, LoadingOutlined } from "@ant-design/icons";
9
- import { treeToList } from "@midscene/shared/extractor";
10
9
  import { Dropdown, Spin, Switch, Tooltip } from "antd";
11
10
  import global_perspective from "../../icons/global-perspective.mjs";
12
11
  import player_setting from "../../icons/player-setting.mjs";
@@ -497,15 +496,13 @@ function Player(props) {
497
496
  setSubTitleText(item.subTitle || '');
498
497
  if ('sleep' === item.type) await sleep(item.duration);
499
498
  else if ('insight' === item.type) {
500
- var _item_context;
501
499
  if (!item.img) throw new Error('img is required');
502
500
  currentImg.current = item.img;
503
501
  await repaintImage(item.imageWidth, item.imageHeight);
504
- const elements = (null == (_item_context = item.context) ? void 0 : _item_context.tree) ? treeToList(item.context.tree) : [];
505
502
  const highlightElements = item.highlightElement ? [
506
503
  item.highlightElement
507
504
  ] : [];
508
- await insightElementsAnimation(elements, highlightElements, item.searchArea, item.duration, frame);
505
+ await insightElementsAnimation([], highlightElements, item.searchArea, item.duration, frame);
509
506
  if (item.camera) {
510
507
  if (!item.insightCameraDuration) throw new Error('insightCameraDuration is required');
511
508
  await cameraAnimation(item.camera, item.insightCameraDuration, frame);
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
  import { mousePointer } from "./index.mjs";
3
3
  import { paramStr, typeStr } from "@midscene/core/agent";
4
- import { treeToList } from "@midscene/shared/extractor";
5
4
  const stillDuration = 900;
6
5
  const actionSpinningPointerDuration = 300;
7
6
  const stillAfterInsightDuration = 300;
@@ -175,7 +174,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
175
174
  if (null == context ? void 0 : context.screenshotBase64) {
176
175
  var _insightTask_output1, _insightDump_taskInfo, _context_size, _context_size1;
177
176
  const insightDump = insightTask.log;
178
- const insightContentLength = context.tree ? treeToList(context.tree).length : 0;
177
+ const insightContentLength = 0;
179
178
  if (context.screenshotBase64) {
180
179
  var _context_size2, _context_size3;
181
180
  scripts.push({
@@ -37,7 +37,6 @@ const external_pixi_js_namespaceObject = require("pixi.js");
37
37
  const external_react_namespaceObject = require("react");
38
38
  const color_js_namespaceObject = require("../../utils/color.js");
39
39
  require("./index.css");
40
- const extractor_namespaceObject = require("@midscene/shared/extractor");
41
40
  const external_pixi_filters_namespaceObject = require("pixi-filters");
42
41
  const store_js_namespaceObject = require("../../store/store.js");
43
42
  const itemFillAlpha = 0.4;
@@ -92,7 +91,7 @@ const rectMarkForItem = (rect, name, type)=>{
92
91
  };
93
92
  const Blackboard = (props)=>{
94
93
  const highlightElements = props.highlightElements || [];
95
- const highlightIds = highlightElements.map((e)=>e.id);
94
+ highlightElements.map((e)=>e.id);
96
95
  const highlightRect = props.highlightRect;
97
96
  const highlightPoints = props.highlightPoints;
98
97
  const context = props.uiContext;
@@ -214,14 +213,6 @@ const Blackboard = (props)=>{
214
213
  const graphics = pointMarkForItem(point, 'highlightPoint');
215
214
  highlightContainer.addChild(graphics);
216
215
  });
217
- const elements = (0, extractor_namespaceObject.treeToList)(context.tree);
218
- elements.forEach((element)=>{
219
- const { rect, content, id } = element;
220
- const ifHighlight = highlightIds.includes(id) || (null == hoverElement ? void 0 : hoverElement.id) === id;
221
- if (ifHighlight) return;
222
- const [graphics] = rectMarkForItem(rect, content, 'element');
223
- elementMarkContainer.addChild(graphics);
224
- });
225
216
  elementMarkContainer.visible = elementsVisible;
226
217
  return {
227
218
  highlightElementRects
@@ -230,7 +221,6 @@ const Blackboard = (props)=>{
230
221
  app,
231
222
  appInitialed,
232
223
  highlightElements,
233
- context.tree,
234
224
  hoverElement,
235
225
  highlightRect,
236
226
  highlightPoints
@@ -43,7 +43,6 @@ const external_react_namespaceObject = require("react");
43
43
  require("./index.css");
44
44
  const index_js_namespaceObject = require("../../utils/index.js");
45
45
  const icons_namespaceObject = require("@ant-design/icons");
46
- const extractor_namespaceObject = require("@midscene/shared/extractor");
47
46
  const external_antd_namespaceObject = require("antd");
48
47
  const global_perspective_js_namespaceObject = require("../../icons/global-perspective.js");
49
48
  var global_perspective_js_default = /*#__PURE__*/ __webpack_require__.n(global_perspective_js_namespaceObject);
@@ -537,15 +536,13 @@ function Player(props) {
537
536
  setSubTitleText(item.subTitle || '');
538
537
  if ('sleep' === item.type) await sleep(item.duration);
539
538
  else if ('insight' === item.type) {
540
- var _item_context;
541
539
  if (!item.img) throw new Error('img is required');
542
540
  currentImg.current = item.img;
543
541
  await repaintImage(item.imageWidth, item.imageHeight);
544
- const elements = (null == (_item_context = item.context) ? void 0 : _item_context.tree) ? (0, extractor_namespaceObject.treeToList)(item.context.tree) : [];
545
542
  const highlightElements = item.highlightElement ? [
546
543
  item.highlightElement
547
544
  ] : [];
548
- await insightElementsAnimation(elements, highlightElements, item.searchArea, item.duration, frame);
545
+ await insightElementsAnimation([], highlightElements, item.searchArea, item.duration, frame);
549
546
  if (item.camera) {
550
547
  if (!item.insightCameraDuration) throw new Error('insightCameraDuration is required');
551
548
  await cameraAnimation(item.camera, item.insightCameraDuration, frame);
@@ -32,7 +32,6 @@ __webpack_require__.d(__webpack_exports__, {
32
32
  });
33
33
  const external_index_js_namespaceObject = require("./index.js");
34
34
  const agent_namespaceObject = require("@midscene/core/agent");
35
- const extractor_namespaceObject = require("@midscene/shared/extractor");
36
35
  const stillDuration = 900;
37
36
  const actionSpinningPointerDuration = 300;
38
37
  const stillAfterInsightDuration = 300;
@@ -206,7 +205,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
206
205
  if (null == context ? void 0 : context.screenshotBase64) {
207
206
  var _insightTask_output1, _insightDump_taskInfo, _context_size, _context_size1;
208
207
  const insightDump = insightTask.log;
209
- const insightContentLength = context.tree ? (0, extractor_namespaceObject.treeToList)(context.tree).length : 0;
208
+ const insightContentLength = 0;
210
209
  if (context.screenshotBase64) {
211
210
  var _context_size2, _context_size3;
212
211
  scripts.push({
@@ -10,8 +10,8 @@ export declare function usePlaygroundState(playgroundSDK: PlaygroundSDKLike | nu
10
10
  setInfoList: import("react").Dispatch<import("react").SetStateAction<InfoListItem[]>>;
11
11
  actionSpace: DeviceAction<unknown>[];
12
12
  actionSpaceLoading: boolean;
13
- uiContextPreview: UIContext<import("@midscene/core").BaseElement> | undefined;
14
- setUiContextPreview: import("react").Dispatch<import("react").SetStateAction<UIContext<import("@midscene/core").BaseElement> | undefined>>;
13
+ uiContextPreview: UIContext | undefined;
14
+ setUiContextPreview: import("react").Dispatch<import("react").SetStateAction<UIContext | undefined>>;
15
15
  showScrollToBottomButton: boolean;
16
16
  verticalMode: boolean;
17
17
  replayCounter: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/visualizer",
3
- "version": "1.0.1-beta-20251024063839.0",
3
+ "version": "1.0.1-beta-20251027033034.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",
@@ -60,10 +60,10 @@
60
60
  "antd": "^5.21.6",
61
61
  "buffer": "6.0.3",
62
62
  "dayjs": "^1.11.11",
63
- "@midscene/playground": "1.0.1-beta-20251024063839.0",
64
- "@midscene/core": "1.0.1-beta-20251024063839.0",
65
- "@midscene/shared": "1.0.1-beta-20251024063839.0",
66
- "@midscene/web": "1.0.1-beta-20251024063839.0"
63
+ "@midscene/core": "1.0.1-beta-20251027033034.0",
64
+ "@midscene/playground": "1.0.1-beta-20251027033034.0",
65
+ "@midscene/shared": "1.0.1-beta-20251027033034.0",
66
+ "@midscene/web": "1.0.1-beta-20251027033034.0"
67
67
  },
68
68
  "license": "MIT",
69
69
  "scripts": {