@midscene/visualizer 1.4.5 → 1.4.7

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.
@@ -88,7 +88,7 @@ const Blackboard = (props)=>{
88
88
  highlightElements.map((e)=>e.id);
89
89
  const highlightRect = props.highlightRect;
90
90
  const highlightPoints = props.highlightPoints;
91
- if (!(null == (_props_uiContext = props.uiContext) ? void 0 : _props_uiContext.size)) return /*#__PURE__*/ jsx("div", {
91
+ if (!(null == (_props_uiContext = props.uiContext) ? void 0 : _props_uiContext.shotSize)) return /*#__PURE__*/ jsx("div", {
92
92
  className: "blackboard",
93
93
  children: /*#__PURE__*/ jsx("div", {
94
94
  className: "blackboard-main-content",
@@ -99,7 +99,7 @@ const Blackboard = (props)=>{
99
99
  })
100
100
  });
101
101
  const context = props.uiContext;
102
- const { size, screenshot } = context;
102
+ const { shotSize, screenshot } = context;
103
103
  const screenshotBase64 = useMemo(()=>{
104
104
  if (!screenshot) return '';
105
105
  if ('object' == typeof screenshot && 'base64' in screenshot) return screenshot.base64;
@@ -108,8 +108,8 @@ const Blackboard = (props)=>{
108
108
  }, [
109
109
  screenshot
110
110
  ]);
111
- const screenWidth = size.width;
112
- const screenHeight = size.height;
111
+ const screenWidth = shotSize.width;
112
+ const screenHeight = shotSize.height;
113
113
  const domRef = useRef(null);
114
114
  const app = useMemo(()=>new Application(), []);
115
115
  const [appInitialed, setAppInitialed] = useState(false);
@@ -103,10 +103,10 @@ const allScriptsFromDump = (dump)=>{
103
103
  const modelBriefsSet = new Set();
104
104
  null == (_normalizedDump_executions = normalizedDump.executions) || _normalizedDump_executions.filter(Boolean).forEach((execution)=>{
105
105
  execution.tasks.forEach((task)=>{
106
- var _task_uiContext_size, _task_uiContext;
107
- if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) {
108
- const w = task.uiContext.size.width;
109
- const h = task.uiContext.size.height;
106
+ var _task_uiContext_shotSize, _task_uiContext;
107
+ if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize = _task_uiContext.shotSize) ? void 0 : _task_uiContext_shotSize.width) {
108
+ const w = task.uiContext.shotSize.width;
109
+ const h = task.uiContext.shotSize.height;
110
110
  if (!firstWidth) {
111
111
  firstWidth = w;
112
112
  firstHeight = h;
@@ -237,9 +237,9 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
237
237
  const subTitle = paramStr(task);
238
238
  const context = task.uiContext;
239
239
  if (null == context ? void 0 : context.screenshot) {
240
- var _context_size, _context_size1;
241
- const width = (null == (_context_size = context.size) ? void 0 : _context_size.width) || imageWidth;
242
- const height = (null == (_context_size1 = context.size) ? void 0 : _context_size1.height) || imageHeight;
240
+ var _context_shotSize, _context_shotSize1;
241
+ const width = (null == (_context_shotSize = context.shotSize) ? void 0 : _context_shotSize.width) || imageWidth;
242
+ const height = (null == (_context_shotSize1 = context.shotSize) ? void 0 : _context_shotSize1.height) || imageHeight;
243
243
  const screenshotData = context.screenshot.base64;
244
244
  scripts.push({
245
245
  type: 'img',
@@ -252,7 +252,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
252
252
  taskId: currentTaskId
253
253
  });
254
254
  locateElements.forEach((element)=>{
255
- var _task_log_taskInfo, _task_log, _context_size, _context_size1;
255
+ var _task_log_taskInfo, _task_log, _context_shotSize, _context_shotSize1;
256
256
  insightCameraState = _object_spread_props(_object_spread({}, cameraStateForRect(element.rect, width, height)), {
257
257
  pointerLeft: element.center[0],
258
258
  pointerTop: element.center[1]
@@ -269,8 +269,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
269
269
  insightCameraDuration: locateDuration,
270
270
  title,
271
271
  subTitle: element.description || subTitle,
272
- imageWidth: (null == (_context_size = context.size) ? void 0 : _context_size.width) || imageWidth,
273
- imageHeight: (null == (_context_size1 = context.size) ? void 0 : _context_size1.height) || imageHeight,
272
+ imageWidth: (null == (_context_shotSize = context.shotSize) ? void 0 : _context_shotSize.width) || imageWidth,
273
+ imageHeight: (null == (_context_shotSize1 = context.shotSize) ? void 0 : _context_shotSize1.height) || imageHeight,
274
274
  taskId: currentTaskId
275
275
  });
276
276
  insightOnTop = true;
@@ -278,7 +278,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
278
278
  }
279
279
  const planningTask = task;
280
280
  if (planningTask.recorder && planningTask.recorder.length > 0) {
281
- var _planningTask_recorder_, _task_uiContext_size, _task_uiContext, _task_uiContext_size1, _task_uiContext1;
281
+ var _planningTask_recorder_, _task_uiContext_shotSize, _task_uiContext, _task_uiContext_shotSize1, _task_uiContext1;
282
282
  const screenshot = null == (_planningTask_recorder_ = planningTask.recorder[0]) ? void 0 : _planningTask_recorder_.screenshot;
283
283
  const screenshotData = (null == screenshot ? void 0 : screenshot.base64) || '';
284
284
  scripts.push({
@@ -287,13 +287,13 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
287
287
  duration: stillDuration,
288
288
  title: typeStr(task),
289
289
  subTitle: paramStr(task),
290
- imageWidth: (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) || imageWidth,
291
- imageHeight: (null == (_task_uiContext1 = task.uiContext) ? void 0 : null == (_task_uiContext_size1 = _task_uiContext1.size) ? void 0 : _task_uiContext_size1.height) || imageHeight,
290
+ imageWidth: (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize = _task_uiContext.shotSize) ? void 0 : _task_uiContext_shotSize.width) || imageWidth,
291
+ imageHeight: (null == (_task_uiContext1 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize1 = _task_uiContext1.shotSize) ? void 0 : _task_uiContext_shotSize1.height) || imageHeight,
292
292
  taskId: currentTaskId
293
293
  });
294
294
  }
295
295
  } else if ('Action Space' === task.type) {
296
- var _task_recorder_, _task_recorder, _task_uiContext_size2, _task_uiContext2, _task_uiContext_size3, _task_uiContext3;
296
+ var _task_recorder_, _task_recorder, _task_uiContext_shotSize2, _task_uiContext2, _task_uiContext_shotSize3, _task_uiContext3;
297
297
  const title = typeStr(task);
298
298
  const subTitle = paramStr(task);
299
299
  scripts.push({
@@ -323,8 +323,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
323
323
  camera: 'Sleep' === task.subType ? fullPageCameraState : void 0,
324
324
  title,
325
325
  subTitle,
326
- imageWidth: (null == (_task_uiContext2 = task.uiContext) ? void 0 : null == (_task_uiContext_size2 = _task_uiContext2.size) ? void 0 : _task_uiContext_size2.width) || imageWidth,
327
- imageHeight: (null == (_task_uiContext3 = task.uiContext) ? void 0 : null == (_task_uiContext_size3 = _task_uiContext3.size) ? void 0 : _task_uiContext_size3.height) || imageHeight,
326
+ imageWidth: (null == (_task_uiContext2 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize2 = _task_uiContext2.shotSize) ? void 0 : _task_uiContext_shotSize2.width) || imageWidth,
327
+ imageHeight: (null == (_task_uiContext3 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize3 = _task_uiContext3.shotSize) ? void 0 : _task_uiContext_shotSize3.height) || imageHeight,
328
328
  taskId: currentTaskId
329
329
  });
330
330
  } else {
@@ -333,7 +333,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
333
333
  const subTitle = paramStr(task);
334
334
  const screenshot = null == (_task_recorder1 = task.recorder) ? void 0 : null == (_task_recorder_1 = _task_recorder1[task.recorder.length - 1]) ? void 0 : _task_recorder_1.screenshot;
335
335
  if (screenshot) {
336
- var _task_uiContext_size4, _task_uiContext4, _task_uiContext_size5, _task_uiContext5;
336
+ var _task_uiContext_shotSize4, _task_uiContext4, _task_uiContext_shotSize5, _task_uiContext5;
337
337
  const screenshotData = screenshot.base64;
338
338
  scripts.push({
339
339
  type: 'img',
@@ -342,14 +342,14 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
342
342
  camera: fullPageCameraState,
343
343
  title,
344
344
  subTitle,
345
- imageWidth: (null == (_task_uiContext4 = task.uiContext) ? void 0 : null == (_task_uiContext_size4 = _task_uiContext4.size) ? void 0 : _task_uiContext_size4.width) || imageWidth,
346
- imageHeight: (null == (_task_uiContext5 = task.uiContext) ? void 0 : null == (_task_uiContext_size5 = _task_uiContext5.size) ? void 0 : _task_uiContext_size5.height) || imageHeight,
345
+ imageWidth: (null == (_task_uiContext4 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize4 = _task_uiContext4.shotSize) ? void 0 : _task_uiContext_shotSize4.width) || imageWidth,
346
+ imageHeight: (null == (_task_uiContext5 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize5 = _task_uiContext5.shotSize) ? void 0 : _task_uiContext_shotSize5.height) || imageHeight,
347
347
  taskId: currentTaskId
348
348
  });
349
349
  }
350
350
  }
351
351
  if ('finished' !== task.status) {
352
- var _task_recorder_2, _task_recorder2, _task_uiContext_size6, _task_uiContext6, _task_uiContext_size7, _task_uiContext7;
352
+ var _task_recorder_2, _task_recorder2, _task_uiContext_shotSize6, _task_uiContext6, _task_uiContext_shotSize7, _task_uiContext7;
353
353
  const errorTitle = typeStr(task);
354
354
  const errorMsg = task.errorMessage || 'unknown error';
355
355
  const errorSubTitle = errorMsg.indexOf('NOT_IMPLEMENTED_AS_DESIGNED') > 0 ? 'Further actions cannot be performed in the current environment' : errorMsg;
@@ -362,8 +362,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
362
362
  duration: stillDuration,
363
363
  title: errorTitle,
364
364
  subTitle: errorSubTitle,
365
- imageWidth: (null == (_task_uiContext6 = task.uiContext) ? void 0 : null == (_task_uiContext_size6 = _task_uiContext6.size) ? void 0 : _task_uiContext_size6.width) || imageWidth,
366
- imageHeight: (null == (_task_uiContext7 = task.uiContext) ? void 0 : null == (_task_uiContext_size7 = _task_uiContext7.size) ? void 0 : _task_uiContext_size7.height) || imageHeight,
365
+ imageWidth: (null == (_task_uiContext6 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize6 = _task_uiContext6.shotSize) ? void 0 : _task_uiContext_shotSize6.width) || imageWidth,
366
+ imageHeight: (null == (_task_uiContext7 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize7 = _task_uiContext7.shotSize) ? void 0 : _task_uiContext_shotSize7.height) || imageHeight,
367
367
  taskId: currentTaskId
368
368
  });
369
369
  }
@@ -119,7 +119,7 @@ const Blackboard = (props)=>{
119
119
  highlightElements.map((e)=>e.id);
120
120
  const highlightRect = props.highlightRect;
121
121
  const highlightPoints = props.highlightPoints;
122
- if (!(null == (_props_uiContext = props.uiContext) ? void 0 : _props_uiContext.size)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
122
+ if (!(null == (_props_uiContext = props.uiContext) ? void 0 : _props_uiContext.shotSize)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
123
123
  className: "blackboard",
124
124
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
125
125
  className: "blackboard-main-content",
@@ -130,7 +130,7 @@ const Blackboard = (props)=>{
130
130
  })
131
131
  });
132
132
  const context = props.uiContext;
133
- const { size, screenshot } = context;
133
+ const { shotSize, screenshot } = context;
134
134
  const screenshotBase64 = (0, external_react_namespaceObject.useMemo)(()=>{
135
135
  if (!screenshot) return '';
136
136
  if ('object' == typeof screenshot && 'base64' in screenshot) return screenshot.base64;
@@ -139,8 +139,8 @@ const Blackboard = (props)=>{
139
139
  }, [
140
140
  screenshot
141
141
  ]);
142
- const screenWidth = size.width;
143
- const screenHeight = size.height;
142
+ const screenWidth = shotSize.width;
143
+ const screenHeight = shotSize.height;
144
144
  const domRef = (0, external_react_namespaceObject.useRef)(null);
145
145
  const app = (0, external_react_namespaceObject.useMemo)(()=>new external_pixi_js_namespaceObject.Application(), []);
146
146
  const [appInitialed, setAppInitialed] = (0, external_react_namespaceObject.useState)(false);
@@ -134,10 +134,10 @@ const allScriptsFromDump = (dump)=>{
134
134
  const modelBriefsSet = new Set();
135
135
  null == (_normalizedDump_executions = normalizedDump.executions) || _normalizedDump_executions.filter(Boolean).forEach((execution)=>{
136
136
  execution.tasks.forEach((task)=>{
137
- var _task_uiContext_size, _task_uiContext;
138
- if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) {
139
- const w = task.uiContext.size.width;
140
- const h = task.uiContext.size.height;
137
+ var _task_uiContext_shotSize, _task_uiContext;
138
+ if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize = _task_uiContext.shotSize) ? void 0 : _task_uiContext_shotSize.width) {
139
+ const w = task.uiContext.shotSize.width;
140
+ const h = task.uiContext.shotSize.height;
141
141
  if (!firstWidth) {
142
142
  firstWidth = w;
143
143
  firstHeight = h;
@@ -268,9 +268,9 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
268
268
  const subTitle = (0, agent_namespaceObject.paramStr)(task);
269
269
  const context = task.uiContext;
270
270
  if (null == context ? void 0 : context.screenshot) {
271
- var _context_size, _context_size1;
272
- const width = (null == (_context_size = context.size) ? void 0 : _context_size.width) || imageWidth;
273
- const height = (null == (_context_size1 = context.size) ? void 0 : _context_size1.height) || imageHeight;
271
+ var _context_shotSize, _context_shotSize1;
272
+ const width = (null == (_context_shotSize = context.shotSize) ? void 0 : _context_shotSize.width) || imageWidth;
273
+ const height = (null == (_context_shotSize1 = context.shotSize) ? void 0 : _context_shotSize1.height) || imageHeight;
274
274
  const screenshotData = context.screenshot.base64;
275
275
  scripts.push({
276
276
  type: 'img',
@@ -283,7 +283,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
283
283
  taskId: currentTaskId
284
284
  });
285
285
  locateElements.forEach((element)=>{
286
- var _task_log_taskInfo, _task_log, _context_size, _context_size1;
286
+ var _task_log_taskInfo, _task_log, _context_shotSize, _context_shotSize1;
287
287
  insightCameraState = _object_spread_props(_object_spread({}, cameraStateForRect(element.rect, width, height)), {
288
288
  pointerLeft: element.center[0],
289
289
  pointerTop: element.center[1]
@@ -300,8 +300,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
300
300
  insightCameraDuration: locateDuration,
301
301
  title,
302
302
  subTitle: element.description || subTitle,
303
- imageWidth: (null == (_context_size = context.size) ? void 0 : _context_size.width) || imageWidth,
304
- imageHeight: (null == (_context_size1 = context.size) ? void 0 : _context_size1.height) || imageHeight,
303
+ imageWidth: (null == (_context_shotSize = context.shotSize) ? void 0 : _context_shotSize.width) || imageWidth,
304
+ imageHeight: (null == (_context_shotSize1 = context.shotSize) ? void 0 : _context_shotSize1.height) || imageHeight,
305
305
  taskId: currentTaskId
306
306
  });
307
307
  insightOnTop = true;
@@ -309,7 +309,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
309
309
  }
310
310
  const planningTask = task;
311
311
  if (planningTask.recorder && planningTask.recorder.length > 0) {
312
- var _planningTask_recorder_, _task_uiContext_size, _task_uiContext, _task_uiContext_size1, _task_uiContext1;
312
+ var _planningTask_recorder_, _task_uiContext_shotSize, _task_uiContext, _task_uiContext_shotSize1, _task_uiContext1;
313
313
  const screenshot = null == (_planningTask_recorder_ = planningTask.recorder[0]) ? void 0 : _planningTask_recorder_.screenshot;
314
314
  const screenshotData = (null == screenshot ? void 0 : screenshot.base64) || '';
315
315
  scripts.push({
@@ -318,13 +318,13 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
318
318
  duration: stillDuration,
319
319
  title: (0, agent_namespaceObject.typeStr)(task),
320
320
  subTitle: (0, agent_namespaceObject.paramStr)(task),
321
- imageWidth: (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) || imageWidth,
322
- imageHeight: (null == (_task_uiContext1 = task.uiContext) ? void 0 : null == (_task_uiContext_size1 = _task_uiContext1.size) ? void 0 : _task_uiContext_size1.height) || imageHeight,
321
+ imageWidth: (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize = _task_uiContext.shotSize) ? void 0 : _task_uiContext_shotSize.width) || imageWidth,
322
+ imageHeight: (null == (_task_uiContext1 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize1 = _task_uiContext1.shotSize) ? void 0 : _task_uiContext_shotSize1.height) || imageHeight,
323
323
  taskId: currentTaskId
324
324
  });
325
325
  }
326
326
  } else if ('Action Space' === task.type) {
327
- var _task_recorder_, _task_recorder, _task_uiContext_size2, _task_uiContext2, _task_uiContext_size3, _task_uiContext3;
327
+ var _task_recorder_, _task_recorder, _task_uiContext_shotSize2, _task_uiContext2, _task_uiContext_shotSize3, _task_uiContext3;
328
328
  const title = (0, agent_namespaceObject.typeStr)(task);
329
329
  const subTitle = (0, agent_namespaceObject.paramStr)(task);
330
330
  scripts.push({
@@ -354,8 +354,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
354
354
  camera: 'Sleep' === task.subType ? fullPageCameraState : void 0,
355
355
  title,
356
356
  subTitle,
357
- imageWidth: (null == (_task_uiContext2 = task.uiContext) ? void 0 : null == (_task_uiContext_size2 = _task_uiContext2.size) ? void 0 : _task_uiContext_size2.width) || imageWidth,
358
- imageHeight: (null == (_task_uiContext3 = task.uiContext) ? void 0 : null == (_task_uiContext_size3 = _task_uiContext3.size) ? void 0 : _task_uiContext_size3.height) || imageHeight,
357
+ imageWidth: (null == (_task_uiContext2 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize2 = _task_uiContext2.shotSize) ? void 0 : _task_uiContext_shotSize2.width) || imageWidth,
358
+ imageHeight: (null == (_task_uiContext3 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize3 = _task_uiContext3.shotSize) ? void 0 : _task_uiContext_shotSize3.height) || imageHeight,
359
359
  taskId: currentTaskId
360
360
  });
361
361
  } else {
@@ -364,7 +364,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
364
364
  const subTitle = (0, agent_namespaceObject.paramStr)(task);
365
365
  const screenshot = null == (_task_recorder1 = task.recorder) ? void 0 : null == (_task_recorder_1 = _task_recorder1[task.recorder.length - 1]) ? void 0 : _task_recorder_1.screenshot;
366
366
  if (screenshot) {
367
- var _task_uiContext_size4, _task_uiContext4, _task_uiContext_size5, _task_uiContext5;
367
+ var _task_uiContext_shotSize4, _task_uiContext4, _task_uiContext_shotSize5, _task_uiContext5;
368
368
  const screenshotData = screenshot.base64;
369
369
  scripts.push({
370
370
  type: 'img',
@@ -373,14 +373,14 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
373
373
  camera: fullPageCameraState,
374
374
  title,
375
375
  subTitle,
376
- imageWidth: (null == (_task_uiContext4 = task.uiContext) ? void 0 : null == (_task_uiContext_size4 = _task_uiContext4.size) ? void 0 : _task_uiContext_size4.width) || imageWidth,
377
- imageHeight: (null == (_task_uiContext5 = task.uiContext) ? void 0 : null == (_task_uiContext_size5 = _task_uiContext5.size) ? void 0 : _task_uiContext_size5.height) || imageHeight,
376
+ imageWidth: (null == (_task_uiContext4 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize4 = _task_uiContext4.shotSize) ? void 0 : _task_uiContext_shotSize4.width) || imageWidth,
377
+ imageHeight: (null == (_task_uiContext5 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize5 = _task_uiContext5.shotSize) ? void 0 : _task_uiContext_shotSize5.height) || imageHeight,
378
378
  taskId: currentTaskId
379
379
  });
380
380
  }
381
381
  }
382
382
  if ('finished' !== task.status) {
383
- var _task_recorder_2, _task_recorder2, _task_uiContext_size6, _task_uiContext6, _task_uiContext_size7, _task_uiContext7;
383
+ var _task_recorder_2, _task_recorder2, _task_uiContext_shotSize6, _task_uiContext6, _task_uiContext_shotSize7, _task_uiContext7;
384
384
  const errorTitle = (0, agent_namespaceObject.typeStr)(task);
385
385
  const errorMsg = task.errorMessage || 'unknown error';
386
386
  const errorSubTitle = errorMsg.indexOf('NOT_IMPLEMENTED_AS_DESIGNED') > 0 ? 'Further actions cannot be performed in the current environment' : errorMsg;
@@ -393,8 +393,8 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight, exec
393
393
  duration: stillDuration,
394
394
  title: errorTitle,
395
395
  subTitle: errorSubTitle,
396
- imageWidth: (null == (_task_uiContext6 = task.uiContext) ? void 0 : null == (_task_uiContext_size6 = _task_uiContext6.size) ? void 0 : _task_uiContext_size6.width) || imageWidth,
397
- imageHeight: (null == (_task_uiContext7 = task.uiContext) ? void 0 : null == (_task_uiContext_size7 = _task_uiContext7.size) ? void 0 : _task_uiContext_size7.height) || imageHeight,
396
+ imageWidth: (null == (_task_uiContext6 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize6 = _task_uiContext6.shotSize) ? void 0 : _task_uiContext_shotSize6.width) || imageWidth,
397
+ imageHeight: (null == (_task_uiContext7 = task.uiContext) ? void 0 : null == (_task_uiContext_shotSize7 = _task_uiContext7.shotSize) ? void 0 : _task_uiContext_shotSize7.height) || imageHeight,
398
398
  taskId: currentTaskId
399
399
  });
400
400
  }
@@ -71,7 +71,7 @@ export declare const unwrapZodType: (field: ZodType) => {
71
71
  hasDefault: boolean;
72
72
  };
73
73
  export declare const extractDefaultValue: (field: ZodType) => unknown;
74
- import type { ExecutionDump, IExecutionDump, WebUIContext } from '@midscene/core';
74
+ import type { ExecutionDump, IExecutionDump } from '@midscene/core';
75
75
  import type { ExecutionOptions, PlaygroundAgent } from '@midscene/playground';
76
76
  export interface PlaygroundResult {
77
77
  result: any;
@@ -86,7 +86,7 @@ export interface PlaygroundProps {
86
86
  dryMode?: boolean;
87
87
  }
88
88
  export interface StaticPlaygroundProps {
89
- context: WebUIContext | null;
89
+ context: UIContext | null;
90
90
  }
91
91
  export type ServiceModeType = 'Server' | 'In-Browser' | 'In-Browser-Extension';
92
92
  export type DeviceType = 'web' | 'android' | 'ios';
@@ -1,6 +1,6 @@
1
- import type { WebUIContext } from '@midscene/core';
1
+ import type { UIContext } from '@midscene/core';
2
2
  import { StaticPageAgent } from '@midscene/web/static';
3
3
  export declare const actionNameForType: (type: string) => string;
4
- export declare const staticAgentFromContext: (context: WebUIContext) => StaticPageAgent;
4
+ export declare const staticAgentFromContext: (context: UIContext) => StaticPageAgent;
5
5
  export declare const getPlaceholderForType: (type: string) => string;
6
6
  export declare const isRunButtonEnabled: (runButtonEnabled: boolean, needsStructuredParams: boolean, params: any, actionSpace: any[] | undefined, selectedType: string, promptValue: string) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/visualizer",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
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/core": "1.4.5",
64
- "@midscene/playground": "1.4.5",
65
- "@midscene/web": "1.4.5",
66
- "@midscene/shared": "1.4.5"
63
+ "@midscene/web": "1.4.7",
64
+ "@midscene/playground": "1.4.7",
65
+ "@midscene/core": "1.4.7",
66
+ "@midscene/shared": "1.4.7"
67
67
  },
68
68
  "license": "MIT",
69
69
  "scripts": {