@midscene/visualizer 0.28.2-beta-20250909133629.0 → 0.28.2-beta-20250910021445.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 (133) hide show
  1. package/dist/es/component/{blackboard/index.mjs → blackboard.mjs} +3 -3
  2. package/dist/es/component/describer.css +25 -0
  3. package/dist/es/component/{env-config/index.mjs → env-config.mjs} +1 -1
  4. package/dist/es/component/{github-star/index.mjs → github-star.mjs} +1 -1
  5. package/dist/es/component/{logo/index.mjs → logo.mjs} +1 -1
  6. package/dist/es/component/{misc/index.mjs → misc.mjs} +2 -42
  7. package/dist/es/component/{player/index.mjs → player.mjs} +8 -8
  8. package/dist/es/component/{config-selector/index.mjs → playground/ConfigSelector.mjs} +3 -2
  9. package/dist/es/component/{context-preview/index.mjs → playground/ContextPreview.mjs} +4 -3
  10. package/dist/es/component/{history-selector/index.mjs → playground/HistorySelector.mjs} +1 -1
  11. package/dist/es/component/{playground-result/index.mjs → playground/PlaygroundResult.mjs} +4 -3
  12. package/dist/es/component/{prompt-input/index.mjs → playground/PromptInput.mjs} +9 -9
  13. package/dist/es/component/{service-mode-control/index.mjs → playground/ServiceModeControl.mjs} +5 -4
  14. package/dist/es/component/playground/index.css +161 -29
  15. package/dist/es/{utils/constants.mjs → component/playground/playground-constants.mjs} +2 -1
  16. package/dist/es/component/playground/playground-types.mjs +0 -0
  17. package/dist/es/{utils → component/playground}/playground-utils.mjs +1 -1
  18. package/dist/es/{types.mjs → component/playground/types.mjs} +1 -23
  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/component/{blackboard/index.js → blackboard.js} +5 -5
  24. package/dist/lib/component/describer.css +25 -0
  25. package/dist/lib/component/{env-config/index.js → env-config.js} +1 -1
  26. package/dist/lib/component/{github-star/index.js → github-star.js} +1 -1
  27. package/dist/lib/component/{logo/index.js → logo.js} +1 -1
  28. package/dist/lib/component/{misc/index.js → misc.js} +1 -60
  29. package/dist/lib/component/{player/index.js → player.js} +23 -23
  30. package/dist/lib/component/{config-selector/index.js → playground/ConfigSelector.js} +7 -6
  31. package/dist/lib/component/{context-preview/index.js → playground/ContextPreview.js} +9 -8
  32. package/dist/lib/component/{history-selector/index.js → playground/HistorySelector.js} +1 -1
  33. package/dist/lib/component/{playground-result/index.js → playground/PlaygroundResult.js} +9 -8
  34. package/dist/lib/component/{prompt-input/index.js → playground/PromptInput.js} +37 -37
  35. package/dist/lib/component/{service-mode-control/index.js → playground/ServiceModeControl.js} +9 -8
  36. package/dist/lib/component/playground/index.css +161 -29
  37. package/dist/lib/{utils/constants.js → component/playground/playground-constants.js} +4 -3
  38. package/dist/lib/component/playground/playground-types.js +18 -0
  39. package/dist/lib/{utils → component/playground}/playground-utils.js +1 -1
  40. package/dist/lib/{types.js → component/playground/types.js} +0 -28
  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/{icons/avatar.js → init.js} +12 -16
  45. package/dist/types/component/{blackboard/index.d.ts → blackboard.d.ts} +2 -2
  46. package/dist/types/component/{github-star/index.d.ts → github-star.d.ts} +1 -1
  47. package/dist/types/component/{logo/index.d.ts → logo.d.ts} +1 -1
  48. package/dist/types/component/misc.d.ts +2 -0
  49. package/dist/types/component/{player/index.d.ts → player.d.ts} +2 -2
  50. package/dist/types/component/{config-selector/index.d.ts → playground/ConfigSelector.d.ts} +1 -0
  51. package/dist/types/component/{context-preview/index.d.ts → playground/ContextPreview.d.ts} +1 -0
  52. package/dist/types/component/{history-selector/index.d.ts → playground/HistorySelector.d.ts} +1 -1
  53. package/dist/types/component/{playground-result/index.d.ts → playground/PlaygroundResult.d.ts} +4 -3
  54. package/dist/types/component/{prompt-input/index.d.ts → playground/PromptInput.d.ts} +2 -3
  55. package/dist/types/component/{service-mode-control/index.d.ts → playground/ServiceModeControl.d.ts} +1 -0
  56. package/dist/types/{utils/constants.d.ts → component/playground/playground-constants.d.ts} +1 -0
  57. package/dist/types/component/playground/playground-types.d.ts +19 -0
  58. package/dist/types/component/playground/types.d.ts +72 -0
  59. package/dist/types/{utils → component}/replay-scripts.d.ts +1 -0
  60. package/dist/types/component/{shiny-text/index.d.ts → shiny-text.d.ts} +1 -1
  61. package/dist/types/index.d.ts +10 -15
  62. package/dist/types/init.d.ts +1 -0
  63. package/package.json +5 -10
  64. package/dist/es/browser.mjs +0 -18
  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 -170
  75. package/dist/es/hooks/usePlaygroundState.mjs +0 -173
  76. package/dist/es/icons/avatar.mjs +0 -14
  77. package/dist/lib/browser.js +0 -132
  78. package/dist/lib/component/history-selector/index.css +0 -132
  79. package/dist/lib/component/index.js +0 -60
  80. package/dist/lib/component/playground/index.js +0 -113
  81. package/dist/lib/component/playground-result/index.css +0 -29
  82. package/dist/lib/component/prompt-input/index.css +0 -330
  83. package/dist/lib/component/universal-playground/index.css +0 -341
  84. package/dist/lib/component/universal-playground/index.js +0 -321
  85. package/dist/lib/component/universal-playground/providers/context-provider.js +0 -95
  86. package/dist/lib/component/universal-playground/providers/storage-provider.js +0 -147
  87. package/dist/lib/hooks/usePlaygroundExecution.js +0 -204
  88. package/dist/lib/hooks/usePlaygroundState.js +0 -207
  89. package/dist/types/browser.d.ts +0 -19
  90. package/dist/types/component/index.d.ts +0 -1
  91. package/dist/types/component/misc/index.d.ts +0 -6
  92. package/dist/types/component/playground/index.d.ts +0 -7
  93. package/dist/types/component/universal-playground/index.d.ts +0 -4
  94. package/dist/types/component/universal-playground/providers/context-provider.d.ts +0 -37
  95. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +0 -33
  96. package/dist/types/hooks/usePlaygroundExecution.d.ts +0 -10
  97. package/dist/types/hooks/usePlaygroundState.d.ts +0 -26
  98. package/dist/types/types.d.ts +0 -166
  99. /package/dist/es/component/{blackboard/index.css → blackboard.css} +0 -0
  100. /package/dist/es/{utils → component}/color.mjs +0 -0
  101. /package/dist/es/component/{github-star/index.css → github-star.css} +0 -0
  102. /package/dist/es/component/{logo/index.css → logo.css} +0 -0
  103. /package/dist/es/{utils → component}/pixi-loader.mjs +0 -0
  104. /package/dist/es/component/{player/index.css → player.css} +0 -0
  105. /package/dist/es/component/{form-field/index.mjs → playground/FormField.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/{hooks → component/playground}/useServerValid.js +0 -0
  120. /package/dist/lib/component/{playground/playground-demo-ui-context.json → playground-demo-ui-context.json} +0 -0
  121. /package/dist/lib/component/{shiny-text/index.css → shiny-text.css} +0 -0
  122. /package/dist/lib/{store → component/store}/history.js +0 -0
  123. /package/dist/lib/{store → component/store}/store.js +0 -0
  124. /package/dist/lib/{utils/index.js → utils.js} +0 -0
  125. /package/dist/types/{utils → component}/color.d.ts +0 -0
  126. /package/dist/types/component/{env-config/index.d.ts → env-config.d.ts} +0 -0
  127. /package/dist/types/{utils → component}/pixi-loader.d.ts +0 -0
  128. /package/dist/types/component/{form-field/index.d.ts → playground/FormField.d.ts} +0 -0
  129. /package/dist/types/{utils → component/playground}/playground-utils.d.ts +0 -0
  130. /package/dist/types/{hooks → component/playground}/useServerValid.d.ts +0 -0
  131. /package/dist/types/{store → component/store}/history.d.ts +0 -0
  132. /package/dist/types/{store → component/store}/store.d.ts +0 -0
  133. /package/dist/types/{utils/index.d.ts → utils.d.ts} +0 -0
@@ -31,10 +31,11 @@ const playground_namespaceObject = require("@midscene/playground");
31
31
  const env_namespaceObject = require("@midscene/shared/env");
32
32
  const external_antd_namespaceObject = require("antd");
33
33
  const external_react_namespaceObject = require("react");
34
- const useServerValid_js_namespaceObject = require("../../hooks/useServerValid.js");
35
- const store_js_namespaceObject = require("../../store/store.js");
36
- const index_js_namespaceObject = require("../env-config/index.js");
37
- const external_misc_index_js_namespaceObject = require("../misc/index.js");
34
+ const external_env_config_js_namespaceObject = require("../env-config.js");
35
+ const external_misc_js_namespaceObject = require("../misc.js");
36
+ const store_js_namespaceObject = require("../store/store.js");
37
+ const external_useServerValid_js_namespaceObject = require("./useServerValid.js");
38
+ require("./index.css");
38
39
  const TITLE_TEXT = {
39
40
  Server: 'Server Status',
40
41
  'In-Browser': 'In-Browser'
@@ -46,20 +47,20 @@ const SWITCH_BUTTON_TEXT = {
46
47
  const ServiceModeControl = (param)=>{
47
48
  let { serviceMode } = param;
48
49
  const { setServiceMode, config } = (0, store_js_namespaceObject.useEnvConfig)();
49
- const serverValid = (0, useServerValid_js_namespaceObject.useServerValid)('Server' === serviceMode);
50
+ const serverValid = (0, external_useServerValid_js_namespaceObject.useServerValid)('Server' === serviceMode);
50
51
  const renderServerTip = ()=>{
51
52
  if (serverValid) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
52
53
  title: "Connected",
53
54
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
54
55
  className: "server-tip",
55
- children: (0, external_misc_index_js_namespaceObject.iconForStatus)('connected')
56
+ children: (0, external_misc_js_namespaceObject.iconForStatus)('connected')
56
57
  })
57
58
  });
58
59
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
59
60
  title: "Connection failed",
60
61
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
61
62
  className: "server-tip",
62
- children: (0, external_misc_index_js_namespaceObject.iconForStatus)('failed')
63
+ children: (0, external_misc_js_namespaceObject.iconForStatus)('failed')
63
64
  })
64
65
  });
65
66
  };
@@ -118,7 +119,7 @@ const ServiceModeControl = (param)=>{
118
119
  children: title
119
120
  }),
120
121
  statusContent,
121
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.EnvConfig, {
122
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_env_config_js_namespaceObject.EnvConfig, {
122
123
  showTooltipWhenEmpty: 'Server' !== serviceMode
123
124
  })
124
125
  ]
@@ -1,30 +1,7 @@
1
- .result-wrapper {
2
- justify-content: center;
3
- height: 100%;
4
- margin: 4px 0;
5
- display: flex;
6
- }
7
-
8
- .result-wrapper .loading-container {
9
- text-align: center;
10
- }
11
-
12
- .result-wrapper .loading-container .loading-progress-text {
13
- color: #888;
14
- margin-top: 8px;
15
- font-size: 12px;
16
- }
17
-
18
- .result-wrapper pre {
19
- white-space: pre-wrap;
20
- text-wrap: unset;
21
- word-wrap: break-word;
22
- overflow-wrap: break-word;
23
- background: #f2f4f7;
24
- border-radius: 8px;
1
+ body {
25
2
  margin: 0;
26
- padding: 14px;
27
- overflow: scroll;
3
+ font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
4
+ font-size: 14px;
28
5
  }
29
6
 
30
7
  .prompt-input-wrapper {
@@ -357,9 +334,164 @@
357
334
  color: #2b83ff;
358
335
  }
359
336
 
360
- body {
361
- margin: 0;
362
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
337
+ .history-modal-container {
338
+ border-radius: 12px 12px 0 0;
339
+ flex-direction: column;
340
+ height: 70vh;
341
+ display: flex;
342
+ overflow: hidden;
343
+ }
344
+
345
+ .history-modal-container .history-modal-header {
346
+ justify-content: space-between;
347
+ align-items: center;
348
+ height: 48px;
349
+ padding: 0 25px;
350
+ line-height: 48px;
351
+ display: flex;
352
+ }
353
+
354
+ .history-modal-container .history-modal-header .close-button {
355
+ justify-content: center;
356
+ align-items: center;
357
+ margin-right: -4px;
358
+ padding: 4px;
359
+ display: flex;
360
+ }
361
+
362
+ .history-modal-container .history-modal-header .close-button .anticon {
363
+ color: #999;
364
+ font-size: 18px;
365
+ }
366
+
367
+ .history-modal-container .history-modal-header .close-button:hover .anticon {
368
+ color: #666;
369
+ }
370
+
371
+ .history-modal-container .history-search-section {
372
+ background: #fff;
373
+ padding: 16px 20px;
374
+ }
375
+
376
+ .history-modal-container .history-search-section .search-input-wrapper {
377
+ color: rgba(0, 0, 0, .25);
378
+ align-items: center;
379
+ gap: 12px;
380
+ display: flex;
381
+ }
382
+
383
+ .history-modal-container .history-search-section .search-input-wrapper .search-input {
384
+ background: #f1f2f3;
385
+ border: none;
386
+ border-radius: 16px;
387
+ flex: 1;
388
+ height: 36px;
389
+ }
390
+
391
+ .history-modal-container .history-search-section .search-input-wrapper .search-input .ant-input {
392
+ box-shadow: none;
393
+ background: none;
394
+ border: none;
395
+ }
396
+
397
+ .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 {
398
+ background: #fff;
399
+ border-color: #d9d9d9;
400
+ }
401
+
402
+ .history-modal-container .history-search-section .search-input-wrapper .clear-button {
403
+ color: #1890ff;
404
+ height: auto;
405
+ padding: 0;
406
+ }
407
+
408
+ .history-modal-container .history-search-section .search-input-wrapper .clear-button:hover {
409
+ color: #40a9ff;
410
+ }
411
+
412
+ .history-modal-container .history-content {
413
+ flex: 1;
414
+ padding: 0 25px 25px;
415
+ overflow-y: auto;
416
+ }
417
+
418
+ .history-modal-container .history-content .history-group {
419
+ margin-bottom: 10px;
420
+ }
421
+
422
+ .history-modal-container .history-content .history-group .history-group-title {
423
+ color: rgba(0, 0, 0, .45);
424
+ height: 40px;
425
+ font-size: 12px;
426
+ font-weight: 400;
427
+ line-height: 40px;
428
+ }
429
+
430
+ .history-modal-container .history-content .history-group .history-item {
431
+ cursor: pointer;
432
+ color: rgba(0, 0, 0, .85);
433
+ white-space: nowrap;
434
+ text-overflow: ellipsis;
435
+ height: 40px;
363
436
  font-size: 14px;
437
+ line-height: 40px;
438
+ overflow: hidden;
439
+ }
440
+
441
+ .history-modal-container .history-content .history-group .history-item:hover {
442
+ background: #f2f4f7;
443
+ margin: 0 -8px;
444
+ padding: 0 8px;
445
+ }
446
+
447
+ .history-modal-container .history-content .no-results {
448
+ text-align: center;
449
+ color: #999;
450
+ padding: 40px 20px;
451
+ }
452
+
453
+ .ant-modal-wrap .ant-modal-content {
454
+ animation: .3s cubic-bezier(.4, 0, .2, 1) forwards slideUpFromBottom !important;
455
+ }
456
+
457
+ @keyframes slideUpFromBottom {
458
+ 0% {
459
+ opacity: 0;
460
+ transform: translateY(100%);
461
+ }
462
+
463
+ 100% {
464
+ opacity: 1;
465
+ transform: translateY(0);
466
+ }
467
+ }
468
+
469
+ .result-wrapper {
470
+ justify-content: center;
471
+ height: 100%;
472
+ margin: 4px 0;
473
+ display: flex;
474
+ }
475
+
476
+ .result-wrapper .loading-container {
477
+ text-align: center;
478
+ }
479
+
480
+ .result-wrapper .loading-container .loading-progress-text {
481
+ color: #888;
482
+ margin-top: 8px;
483
+ font-size: 12px;
484
+ }
485
+
486
+ .result-wrapper pre {
487
+ white-space: pre-wrap;
488
+ text-wrap: unset;
489
+ word-wrap: break-word;
490
+ overflow-wrap: break-word;
491
+ background: #f2f4f7;
492
+ border-radius: 8px;
493
+ margin: 0;
494
+ padding: 14px;
495
+ overflow: scroll;
364
496
  }
365
497
 
@@ -45,8 +45,9 @@ __webpack_require__.d(__webpack_exports__, {
45
45
  });
46
46
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
47
47
  const external_antd_namespaceObject = require("antd");
48
- const index_js_namespaceObject = require("../component/shiny-text/index.js");
49
- var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
48
+ const external_shiny_text_js_namespaceObject = require("../shiny-text.js");
49
+ var external_shiny_text_js_default = /*#__PURE__*/ __webpack_require__.n(external_shiny_text_js_namespaceObject);
50
+ require("./index.css");
50
51
  const errorMessageServerNotReady = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
51
52
  children: [
52
53
  "Don't worry, just one more step to launch the playground server.",
@@ -80,7 +81,7 @@ const emptyResultTip = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div",
80
81
  style: {
81
82
  textAlign: 'center'
82
83
  },
83
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_default(), {
84
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_js_default(), {
84
85
  disabled: true,
85
86
  text: "The result will be shown here"
86
87
  })
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.r = (exports1)=>{
5
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
6
+ value: 'Module'
7
+ });
8
+ Object.defineProperty(exports1, '__esModule', {
9
+ value: true
10
+ });
11
+ };
12
+ })();
13
+ var __webpack_exports__ = {};
14
+ __webpack_require__.r(__webpack_exports__);
15
+ for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
16
+ Object.defineProperty(exports, '__esModule', {
17
+ value: true
18
+ });
@@ -30,7 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
30
30
  getPlaceholderForType: ()=>getPlaceholderForType
31
31
  });
32
32
  const static_namespaceObject = require("@midscene/web/static");
33
- const external_types_js_namespaceObject = require("../types.js");
33
+ const external_types_js_namespaceObject = require("./types.js");
34
34
  const actionNameForType = (type)=>{
35
35
  const typeWithoutAi = type.startsWith('ai') ? type.slice(2) : type;
36
36
  const fullName = typeWithoutAi.replace(/([A-Z])/g, ' $1').trim();
@@ -24,9 +24,7 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- BLANK_RESULT: ()=>BLANK_RESULT,
28
27
  VALIDATION_CONSTANTS: ()=>VALIDATION_CONSTANTS,
29
- WELCOME_MESSAGE_TEMPLATE: ()=>WELCOME_MESSAGE_TEMPLATE,
30
28
  extractDefaultValue: ()=>extractDefaultValue,
31
29
  isLocateField: ()=>isLocateField,
32
30
  isZodObjectSchema: ()=>isZodObjectSchema,
@@ -101,39 +99,13 @@ const extractDefaultValue = (field)=>{
101
99
  currentField = currentField._def.innerType;
102
100
  }
103
101
  };
104
- const WELCOME_MESSAGE_TEMPLATE = {
105
- type: 'system',
106
- content: `
107
- Welcome to Midscene.js Playground!
108
-
109
- This is a panel for experimenting and testing Midscene.js features. You can use natural language instructions to operate the web page, such as clicking buttons, filling in forms, querying information, etc.
110
-
111
- Please enter your instructions in the input box below to start experiencing.
112
- `,
113
- loading: false,
114
- result: void 0,
115
- replayScriptsInfo: null,
116
- replayCounter: 0,
117
- loadingProgressText: '',
118
- verticalMode: false
119
- };
120
- const BLANK_RESULT = {
121
- result: void 0,
122
- dump: null,
123
- reportHTML: null,
124
- error: null
125
- };
126
- exports.BLANK_RESULT = __webpack_exports__.BLANK_RESULT;
127
102
  exports.VALIDATION_CONSTANTS = __webpack_exports__.VALIDATION_CONSTANTS;
128
- exports.WELCOME_MESSAGE_TEMPLATE = __webpack_exports__.WELCOME_MESSAGE_TEMPLATE;
129
103
  exports.extractDefaultValue = __webpack_exports__.extractDefaultValue;
130
104
  exports.isLocateField = __webpack_exports__.isLocateField;
131
105
  exports.isZodObjectSchema = __webpack_exports__.isZodObjectSchema;
132
106
  exports.unwrapZodType = __webpack_exports__.unwrapZodType;
133
107
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
134
- "BLANK_RESULT",
135
108
  "VALIDATION_CONSTANTS",
136
- "WELCOME_MESSAGE_TEMPLATE",
137
109
  "extractDefaultValue",
138
110
  "isLocateField",
139
111
  "isZodObjectSchema",
@@ -30,7 +30,8 @@ __webpack_require__.d(__webpack_exports__, {
30
30
  generateAnimationScripts: ()=>generateAnimationScripts,
31
31
  allScriptsFromDump: ()=>allScriptsFromDump
32
32
  });
33
- const external_index_js_namespaceObject = require("./index.js");
33
+ require("./player.css");
34
+ const external_utils_js_namespaceObject = require("../utils.js");
34
35
  const agent_namespaceObject = require("@midscene/core/agent");
35
36
  const extractor_namespaceObject = require("@midscene/shared/extractor");
36
37
  const stillDuration = 900;
@@ -233,7 +234,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
233
234
  var _task_recorder_, _task_recorder, _task_recorder_1, _task_recorder1;
234
235
  const title = (0, agent_namespaceObject.typeStr)(task);
235
236
  const subTitle = (0, agent_namespaceObject.paramStr)(task);
236
- scripts.push(pointerScript(external_index_js_namespaceObject.mousePointer, title, subTitle));
237
+ scripts.push(pointerScript(external_utils_js_namespaceObject.mousePointer, title, subTitle));
237
238
  currentCameraState = null != insightCameraState ? insightCameraState : fullPageCameraState;
238
239
  scripts.push({
239
240
  type: 'img',
@@ -261,7 +262,7 @@ const generateAnimationScripts = (execution, task, imageWidth, imageHeight)=>{
261
262
  title,
262
263
  subTitle
263
264
  });
264
- scripts.push(pointerScript(external_index_js_namespaceObject.mousePointer, title, subTitle));
265
+ scripts.push(pointerScript(external_utils_js_namespaceObject.mousePointer, title, subTitle));
265
266
  scripts.push({
266
267
  type: 'img',
267
268
  img: null == (_task_recorder2 = task.recorder) ? void 0 : null == (_task_recorder_2 = _task_recorder2[1]) ? void 0 : _task_recorder_2.screenshot,
@@ -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",
@@ -24,24 +24,20 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- default: ()=>avatar
27
+ setSideEffect: ()=>setSideEffect
28
28
  });
29
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- require("react");
31
- const SvgAvatar = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg", {
32
- width: 20,
33
- height: 20,
34
- fill: "currentColor",
35
- viewBox: "0 0 24 24",
36
- ...props,
37
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
38
- d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
39
- })
40
- });
41
- const avatar = SvgAvatar;
42
- exports["default"] = __webpack_exports__["default"];
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;
43
39
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
44
- "default"
40
+ "setSideEffect"
45
41
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
46
42
  Object.defineProperty(exports, '__esModule', {
47
43
  value: true
@@ -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;