@midscene/visualizer 0.26.2 → 0.26.3-beta-20250813021342.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 (124) hide show
  1. package/dist/es/blank_polyfill.mjs +2 -0
  2. package/dist/es/component/blackboard.css +12 -5
  3. package/dist/es/component/blackboard.mjs +266 -0
  4. package/dist/es/component/color.mjs +35 -0
  5. package/dist/es/component/describer.css +9 -5
  6. package/dist/es/component/describer.mjs +128 -0
  7. package/dist/es/component/env-config.mjs +112 -0
  8. package/dist/es/component/github-star.css +1 -0
  9. package/dist/es/component/github-star.mjs +20 -0
  10. package/dist/es/component/logo.css +5 -3
  11. package/dist/es/component/logo.mjs +20 -0
  12. package/dist/es/component/misc.mjs +54 -0
  13. package/dist/es/component/pixi-loader.mjs +16 -0
  14. package/dist/es/component/player.css +88 -70
  15. package/dist/es/component/player.mjs +628 -0
  16. package/dist/es/component/playground/ConfigSelector.mjs +53 -0
  17. package/dist/es/component/playground/ContextPreview.mjs +39 -0
  18. package/dist/es/component/playground/HistorySelector.mjs +193 -0
  19. package/dist/es/component/playground/PlaygroundResult.mjs +60 -0
  20. package/dist/es/component/playground/PromptInput.mjs +225 -0
  21. package/dist/es/component/playground/ServiceModeControl.mjs +100 -0
  22. package/dist/es/component/playground/index.css +140 -98
  23. package/dist/es/component/playground/playground-constants.mjs +45 -0
  24. package/dist/es/component/playground/playground-utils.mjs +89 -0
  25. package/dist/es/component/playground/useServerValid.mjs +27 -0
  26. package/dist/es/component/playground/useStaticPageAgent.mjs +12 -0
  27. package/dist/es/component/replay-scripts.mjs +271 -0
  28. package/dist/es/component/shiny-text.css +33 -22
  29. package/dist/es/component/shiny-text.mjs +15 -0
  30. package/dist/es/component/store/history.mjs +55 -0
  31. package/dist/es/component/store/store.mjs +128 -0
  32. package/dist/es/icons/close.mjs +19 -0
  33. package/dist/es/icons/history.mjs +30 -0
  34. package/dist/es/icons/magnifying-glass.mjs +39 -0
  35. package/dist/es/icons/setting.mjs +20 -0
  36. package/dist/es/index.mjs +21 -0
  37. package/dist/es/init.mjs +10 -0
  38. package/dist/es/{utils.js → utils.mjs} +51 -75
  39. package/dist/lib/blank_polyfill.js +34 -38
  40. package/dist/lib/component/blackboard.css +12 -5
  41. package/dist/lib/component/blackboard.js +293 -306
  42. package/dist/lib/component/color.js +64 -74
  43. package/dist/lib/component/describer.css +9 -5
  44. package/dist/lib/component/describer.js +158 -198
  45. package/dist/lib/component/env-config.js +142 -147
  46. package/dist/lib/component/github-star.css +1 -0
  47. package/dist/lib/component/github-star.js +51 -62
  48. package/dist/lib/component/logo.css +5 -3
  49. package/dist/lib/component/logo.js +53 -56
  50. package/dist/lib/component/misc.js +85 -84
  51. package/dist/lib/component/pixi-loader.js +49 -80
  52. package/dist/lib/component/player.css +88 -70
  53. package/dist/lib/component/player.js +627 -738
  54. package/dist/lib/component/playground/ConfigSelector.js +91 -92
  55. package/dist/lib/component/playground/ContextPreview.js +80 -72
  56. package/dist/lib/component/playground/HistorySelector.js +234 -197
  57. package/dist/lib/component/playground/PlaygroundResult.js +100 -103
  58. package/dist/lib/component/playground/PromptInput.js +250 -237
  59. package/dist/lib/component/playground/ServiceModeControl.js +124 -124
  60. package/dist/lib/component/playground/index.css +140 -98
  61. package/dist/lib/component/playground/playground-constants.js +97 -73
  62. package/dist/lib/component/playground/playground-types.js +17 -31
  63. package/dist/lib/component/playground/playground-utils.js +140 -168
  64. package/dist/lib/component/playground/useServerValid.js +55 -86
  65. package/dist/lib/component/playground/useStaticPageAgent.js +45 -51
  66. package/dist/lib/component/replay-scripts.js +291 -373
  67. package/dist/lib/component/shiny-text.css +33 -22
  68. package/dist/lib/component/shiny-text.js +46 -57
  69. package/dist/lib/component/store/history.js +58 -64
  70. package/dist/lib/component/store/store.js +132 -128
  71. package/dist/lib/icons/close.js +53 -0
  72. package/dist/lib/icons/history.js +64 -0
  73. package/dist/lib/icons/magnifying-glass.js +73 -0
  74. package/dist/lib/icons/setting.js +54 -0
  75. package/dist/lib/index.js +158 -124
  76. package/dist/lib/init.js +39 -46
  77. package/dist/lib/utils.js +105 -109
  78. package/dist/types/blank_polyfill.d.ts +2 -2
  79. package/dist/types/component/playground/ConfigSelector.d.ts +1 -0
  80. package/dist/types/component/playground/ContextPreview.d.ts +1 -0
  81. package/dist/types/component/playground/HistorySelector.d.ts +1 -0
  82. package/dist/types/component/playground/PlaygroundResult.d.ts +1 -0
  83. package/dist/types/component/playground/PromptInput.d.ts +1 -0
  84. package/dist/types/component/playground/ServiceModeControl.d.ts +1 -0
  85. package/package.json +16 -18
  86. package/dist/es/assets/close.909351c0.svg +0 -4
  87. package/dist/es/assets/history.164a4eab.svg +0 -4
  88. package/dist/es/assets/magnifying-glass.9498e70e.svg +0 -12
  89. package/dist/es/assets/setting.80ab7285.svg +0 -11
  90. package/dist/es/blank_polyfill.js +0 -10
  91. package/dist/es/component/blackboard.js +0 -286
  92. package/dist/es/component/color.js +0 -49
  93. package/dist/es/component/describer.js +0 -173
  94. package/dist/es/component/env-config.js +0 -117
  95. package/dist/es/component/github-star.js +0 -31
  96. package/dist/es/component/logo.js +0 -25
  97. package/dist/es/component/misc.js +0 -63
  98. package/dist/es/component/pixi-loader.js +0 -51
  99. package/dist/es/component/player.js +0 -746
  100. package/dist/es/component/playground/ConfigSelector.js +0 -64
  101. package/dist/es/component/playground/ContextPreview.js +0 -42
  102. package/dist/es/component/playground/HistorySelector.js +0 -168
  103. package/dist/es/component/playground/PlaygroundResult.js +0 -73
  104. package/dist/es/component/playground/PromptInput.js +0 -212
  105. package/dist/es/component/playground/ServiceModeControl.js +0 -100
  106. package/dist/es/component/playground/playground-constants.js +0 -39
  107. package/dist/es/component/playground/playground-types.js +0 -6
  108. package/dist/es/component/playground/playground-utils.js +0 -141
  109. package/dist/es/component/playground/useServerValid.js +0 -58
  110. package/dist/es/component/playground/useStaticPageAgent.js +0 -20
  111. package/dist/es/component/replay-scripts.js +0 -361
  112. package/dist/es/component/shiny-text.js +0 -30
  113. package/dist/es/component/store/history.js +0 -34
  114. package/dist/es/component/store/store.js +0 -99
  115. package/dist/es/index.js +0 -79
  116. package/dist/es/init.js +0 -17
  117. package/dist/index.css +0 -595
  118. package/dist/index.js +0 -1
  119. package/dist/lib/assets/close.909351c0.svg +0 -4
  120. package/dist/lib/assets/history.164a4eab.svg +0 -4
  121. package/dist/lib/assets/magnifying-glass.9498e70e.svg +0 -12
  122. package/dist/lib/assets/setting.80ab7285.svg +0 -11
  123. package/dist/lib/component/common.css +0 -0
  124. /package/dist/es/component/{common.css → playground/playground-types.mjs} +0 -0
@@ -1,90 +1,91 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var misc_exports = {};
30
- __export(misc_exports, {
31
- iconForStatus: () => iconForStatus,
32
- timeCostStrElement: () => timeCostStrElement
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
+ iconForStatus: ()=>iconForStatus,
28
+ timeCostStrElement: ()=>timeCostStrElement
33
29
  });
34
- module.exports = __toCommonJS(misc_exports);
35
- var import_buffer = __toESM(require("buffer"));
36
- var import_browser = __toESM(require("process/browser"));
37
- var import_console_browserify = __toESM(require("console-browserify"));
38
- var buffer = {
39
- Buffer: import_buffer.default
40
- };
41
- var import_jsx_runtime = require("react/jsx-runtime");
42
- var import_icons = require("@ant-design/icons");
30
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const icons_namespaceObject = require("@ant-design/icons");
43
32
  function timeCostStrElement(timeCost) {
44
- let str;
45
- if (typeof timeCost !== "number") {
46
- str = "-";
47
- } else {
48
- str = `${(timeCost / 1e3).toFixed(2)}s`;
49
- }
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
- "span",
52
- {
53
- style: {
54
- fontVariantNumeric: "tabular-nums",
55
- fontFeatureSettings: "tnum"
56
- },
57
- children: str
58
- }
59
- );
33
+ let str;
34
+ str = 'number' != typeof timeCost ? '-' : `${(timeCost / 1000).toFixed(2)}s`;
35
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
36
+ style: {
37
+ fontVariantNumeric: 'tabular-nums',
38
+ fontFeatureSettings: 'tnum'
39
+ },
40
+ children: str
41
+ });
60
42
  }
61
- const iconForStatus = (status) => {
62
- switch (status) {
63
- case "finished":
64
- case "passed":
65
- case "success":
66
- case "connected":
67
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#00AD4B" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckOutlined, {}) });
68
- case "finishedWithWarning":
69
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#f7bb05" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.WarningOutlined, {}) });
70
- case "failed":
71
- case "closed":
72
- case "timedOut":
73
- case "interrupted":
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#FF0A0A" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, {}) });
75
- case "pending":
76
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ClockCircleOutlined, {});
77
- case "cancelled":
78
- case "skipped":
79
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LogoutOutlined, {});
80
- case "running":
81
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ArrowRightOutlined, {});
82
- default:
83
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.MinusOutlined, {});
84
- }
43
+ const iconForStatus = (status)=>{
44
+ switch(status){
45
+ case 'finished':
46
+ case 'passed':
47
+ case 'success':
48
+ case 'connected':
49
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
50
+ style: {
51
+ color: '#00AD4B'
52
+ },
53
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CheckOutlined, {})
54
+ });
55
+ case 'finishedWithWarning':
56
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
57
+ style: {
58
+ color: '#f7bb05'
59
+ },
60
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.WarningOutlined, {})
61
+ });
62
+ case 'failed':
63
+ case 'closed':
64
+ case 'timedOut':
65
+ case 'interrupted':
66
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
67
+ style: {
68
+ color: '#FF0A0A'
69
+ },
70
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseOutlined, {})
71
+ });
72
+ case 'pending':
73
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ClockCircleOutlined, {});
74
+ case 'cancelled':
75
+ case 'skipped':
76
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.LogoutOutlined, {});
77
+ case 'running':
78
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ArrowRightOutlined, {});
79
+ default:
80
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.MinusOutlined, {});
81
+ }
85
82
  };
86
- // Annotate the CommonJS export names for ESM import in node:
87
- 0 && (module.exports = {
88
- iconForStatus,
89
- timeCostStrElement
83
+ exports.iconForStatus = __webpack_exports__.iconForStatus;
84
+ exports.timeCostStrElement = __webpack_exports__.timeCostStrElement;
85
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
86
+ "iconForStatus",
87
+ "timeCostStrElement"
88
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
89
+ Object.defineProperty(exports, '__esModule', {
90
+ value: true
90
91
  });
@@ -1,87 +1,56 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var __async = (__this, __arguments, generator) => {
30
- return new Promise((resolve, reject) => {
31
- var fulfilled = (value) => {
32
- try {
33
- step(generator.next(value));
34
- } catch (e) {
35
- reject(e);
36
- }
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
+ });
37
9
  };
38
- var rejected = (value) => {
39
- try {
40
- step(generator.throw(value));
41
- } catch (e) {
42
- reject(e);
43
- }
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
+ });
44
22
  };
45
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
46
- step((generator = generator.apply(__this, __arguments)).next());
47
- });
48
- };
49
- var pixi_loader_exports = {};
50
- __export(pixi_loader_exports, {
51
- getTexture: () => getTexture,
52
- getTextureFromCache: () => getTextureFromCache,
53
- loadTexture: () => loadTexture
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ getTexture: ()=>getTexture,
28
+ getTextureFromCache: ()=>getTextureFromCache,
29
+ loadTexture: ()=>loadTexture
54
30
  });
55
- module.exports = __toCommonJS(pixi_loader_exports);
56
- var import_buffer = __toESM(require("buffer"));
57
- var import_browser = __toESM(require("process/browser"));
58
- var import_console_browserify = __toESM(require("console-browserify"));
59
- var buffer = {
60
- Buffer: import_buffer.default
31
+ require("pixi.js/unsafe-eval");
32
+ const external_pixi_js_namespaceObject = require("pixi.js");
33
+ const globalTextureMap = new Map();
34
+ const loadTexture = async (img)=>{
35
+ if (globalTextureMap.has(img)) return;
36
+ return external_pixi_js_namespaceObject.Assets.load(img).then((texture)=>{
37
+ globalTextureMap.set(img, texture);
38
+ });
61
39
  };
62
- var import_unsafe_eval = require("pixi.js/unsafe-eval");
63
- var PIXI = __toESM(require("pixi.js"));
64
- const globalTextureMap = /* @__PURE__ */ new Map();
65
- const loadTexture = (img) => __async(void 0, null, function* () {
66
- if (globalTextureMap.has(img))
67
- return;
68
- return PIXI.Assets.load(img).then((texture) => {
69
- globalTextureMap.set(img, texture);
70
- });
71
- });
72
- const getTextureFromCache = (name) => {
73
- return globalTextureMap.get(name);
74
- };
75
- const getTexture = (name) => __async(void 0, null, function* () {
76
- if (globalTextureMap.has(name)) {
40
+ const getTextureFromCache = (name)=>globalTextureMap.get(name);
41
+ const getTexture = async (name)=>{
42
+ if (globalTextureMap.has(name)) return globalTextureMap.get(name);
43
+ await loadTexture(name);
77
44
  return globalTextureMap.get(name);
78
- }
79
- yield loadTexture(name);
80
- return globalTextureMap.get(name);
81
- });
82
- // Annotate the CommonJS export names for ESM import in node:
83
- 0 && (module.exports = {
84
- getTexture,
85
- getTextureFromCache,
86
- loadTexture
45
+ };
46
+ exports.getTexture = __webpack_exports__.getTexture;
47
+ exports.getTextureFromCache = __webpack_exports__.getTextureFromCache;
48
+ exports.loadTexture = __webpack_exports__.loadTexture;
49
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
50
+ "getTexture",
51
+ "getTextureFromCache",
52
+ "loadTexture"
53
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
54
+ Object.defineProperty(exports, '__esModule', {
55
+ value: true
87
56
  });
@@ -1,167 +1,185 @@
1
1
  .player-container {
2
+ box-sizing: border-box;
3
+ background: #f2f4f7;
4
+ border: 1px solid #f2f4f7;
5
+ border-radius: 8px;
6
+ flex-direction: column;
2
7
  width: 100%;
3
- height: 100%;
4
8
  max-width: 100%;
9
+ height: 100%;
10
+ min-height: 300px;
5
11
  max-height: 100%;
12
+ margin: 0 auto;
6
13
  padding: 12px;
7
- background: #F2F4F7;
8
- box-sizing: border-box;
9
- border: 1px solid #F2F4F7;
10
- border-radius: 8px;
11
14
  line-height: 100%;
12
- margin: 0 auto;
13
15
  display: flex;
14
- flex-direction: column;
15
- overflow: visible;
16
- min-height: 300px;
17
16
  position: relative;
17
+ overflow: visible;
18
18
  }
19
- .player-container[data-fit-mode=height] {
19
+
20
+ .player-container[data-fit-mode="height"] {
20
21
  background: #fff;
21
22
  }
22
- .player-container[data-fit-mode=height] .canvas-container {
23
- background-color: #F2F4F7;
23
+
24
+ .player-container[data-fit-mode="height"] .canvas-container {
25
+ background-color: #f2f4f7;
24
26
  }
27
+
25
28
  .player-container .canvas-container {
26
- flex: 0 0 auto;
27
- min-height: 200px;
28
29
  width: 100%;
29
- display: flex;
30
+ min-height: 200px;
31
+ aspect-ratio: var(--canvas-aspect-ratio, 16 / 9);
32
+ background-color: #fff;
33
+ border-top-left-radius: 16px;
34
+ border-top-right-radius: 16px;
35
+ flex: none;
30
36
  justify-content: center;
31
37
  align-items: center;
32
- overflow: hidden;
38
+ display: flex;
33
39
  position: relative;
34
- background-color: #fff;
35
- border-top-right-radius: 16px;
36
- border-top-left-radius: 16px;
37
- aspect-ratio: var(--canvas-aspect-ratio, 16/9);
40
+ overflow: hidden;
38
41
  }
42
+
39
43
  .player-container .canvas-container canvas {
44
+ box-sizing: border-box;
45
+ object-fit: contain;
46
+ border: none;
40
47
  width: 100%;
41
- height: auto;
42
48
  max-width: 100%;
49
+ height: auto;
43
50
  max-height: 100%;
44
- box-sizing: border-box;
45
- display: block;
46
51
  margin: 0 auto;
47
- object-fit: contain;
48
- border: none;
52
+ display: block;
49
53
  }
50
- .player-container .canvas-container[data-fit-mode=height] {
51
- flex: 1 1 auto;
54
+
55
+ .player-container .canvas-container[data-fit-mode="height"] {
52
56
  aspect-ratio: unset;
53
- min-height: 0;
57
+ flex: auto;
54
58
  height: auto;
59
+ min-height: 0;
55
60
  }
56
- .player-container .canvas-container[data-fit-mode=height] canvas {
57
- height: 100%;
61
+
62
+ .player-container .canvas-container[data-fit-mode="height"] canvas {
58
63
  width: auto;
59
64
  max-width: 100%;
65
+ height: 100%;
60
66
  max-height: 100%;
61
67
  }
62
- .player-container .canvas-container[data-fit-mode=width] {
63
- aspect-ratio: var(--canvas-aspect-ratio, 16/9);
68
+
69
+ .player-container .canvas-container[data-fit-mode="width"] {
70
+ aspect-ratio: var(--canvas-aspect-ratio, 16 / 9);
64
71
  }
65
- .player-container .canvas-container[data-fit-mode=width] canvas {
72
+
73
+ .player-container .canvas-container[data-fit-mode="width"] canvas {
66
74
  width: 100%;
67
75
  height: auto;
68
76
  }
77
+
69
78
  .player-container .player-timeline-wrapper {
79
+ flex: none;
70
80
  width: 100%;
71
81
  height: 4px;
72
- flex: none;
73
82
  margin-bottom: 2px;
74
83
  position: relative;
75
84
  }
85
+
76
86
  .player-container .player-timeline {
87
+ background: #666;
88
+ flex-shrink: 0;
77
89
  width: 100%;
78
90
  height: 4px;
79
- background: #666;
80
91
  position: relative;
81
- flex-shrink: 0;
82
92
  }
93
+
83
94
  .player-container .player-timeline .player-timeline-progress {
95
+ background: #2b83ff;
96
+ height: 4px;
84
97
  transition-timing-function: linear;
85
98
  position: absolute;
86
99
  top: 0;
87
100
  left: 0;
88
- height: 4px;
89
- background: #2B83FF;
90
101
  }
102
+
91
103
  .player-container .player-tools-wrapper {
104
+ box-sizing: border-box;
105
+ flex: none;
92
106
  width: 100%;
93
107
  height: 72px;
94
- flex: none;
108
+ padding: 15px 16px;
95
109
  position: relative;
96
- padding-top: 15px;
97
- padding-bottom: 15px;
98
- padding-left: 16px;
99
- padding-right: 16px;
100
- box-sizing: border-box;
101
110
  }
111
+
102
112
  .player-container .player-tools {
103
- width: 100%;
104
- height: 42px;
105
- max-width: 100%;
106
- overflow: hidden;
107
113
  color: #000;
108
- font-size: 14px;
109
114
  box-sizing: border-box;
110
- display: flex;
111
115
  flex-direction: row;
112
- justify-content: space-between;
113
116
  flex-shrink: 0;
117
+ justify-content: space-between;
118
+ width: 100%;
119
+ max-width: 100%;
120
+ height: 42px;
121
+ font-size: 14px;
122
+ display: flex;
123
+ overflow: hidden;
114
124
  }
125
+
115
126
  .player-container .player-tools .ant-spin {
116
127
  color: #333;
117
128
  }
129
+
118
130
  .player-container .player-tools .player-control {
119
- flex-grow: 1;
120
- display: flex;
121
131
  flex-direction: row;
132
+ flex-grow: 1;
122
133
  align-items: center;
134
+ display: flex;
123
135
  overflow: hidden;
124
136
  }
137
+
125
138
  .player-container .player-tools .status-icon {
126
- transition: 0.2s;
127
- width: 32px;
128
- height: 32px;
129
139
  border-radius: 8px;
130
- display: flex;
131
- align-items: center;
132
- justify-content: center;
133
140
  flex-shrink: 0;
141
+ justify-content: center;
142
+ align-items: center;
143
+ width: 32px;
144
+ height: 32px;
134
145
  margin-left: 10px;
146
+ transition: all .2s;
147
+ display: flex;
135
148
  }
149
+
136
150
  .player-container .player-tools .status-icon:hover {
137
151
  cursor: pointer;
138
- background: #F0f0f0;
152
+ background: #f0f0f0;
139
153
  }
154
+
140
155
  .player-container .player-tools .status-text {
156
+ flex-direction: column;
141
157
  flex-grow: 1;
142
158
  flex-shrink: 1;
159
+ justify-content: space-between;
160
+ width: 0;
143
161
  min-width: 0;
144
- overflow: hidden;
145
- position: relative;
146
162
  height: 100%;
147
163
  display: flex;
148
- flex-direction: column;
149
- justify-content: space-between;
150
- width: 0;
164
+ position: relative;
165
+ overflow: hidden;
151
166
  }
167
+
152
168
  .player-container .player-tools .title {
153
169
  font-weight: 600;
154
170
  }
155
- .player-container .player-tools .title,
156
- .player-container .player-tools .subtitle {
171
+
172
+ .player-container .player-tools .title, .player-container .player-tools .subtitle {
157
173
  text-overflow: ellipsis;
158
- overflow: hidden;
159
174
  white-space: nowrap;
160
175
  width: 100%;
176
+ overflow: hidden;
161
177
  }
178
+
162
179
  .player-container .player-tools .player-tools-item {
163
- height: 100%;
164
- display: flex;
165
180
  flex-direction: column;
166
181
  justify-content: center;
182
+ height: 100%;
183
+ display: flex;
167
184
  }
185
+