@midscene/visualizer 0.0.1 → 0.1.1
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.
- package/dist/es/component/assets/logo-plain.js +128 -0
- package/dist/es/component/assets/logo-plain2.js +128 -0
- package/dist/es/component/blackboard.js +5 -1
- package/dist/es/component/detail-panel.js +2 -2
- package/dist/es/component/detail-side.css +3 -2
- package/dist/es/component/detail-side.js +14 -5
- package/dist/es/component/global-hover-preview.css +1 -1
- package/dist/es/component/global-hover-preview.js +6 -1
- package/dist/es/component/sidebar.css +2 -1
- package/dist/es/component/sidebar.js +19 -12
- package/dist/es/component/store.js +7 -6
- package/dist/es/component/timeline.js +2 -2
- package/dist/es/index.css +14 -9
- package/dist/es/index.js +33 -7
- package/dist/lib/component/assets/logo-plain.js +156 -0
- package/dist/lib/component/assets/logo-plain2.js +156 -0
- package/dist/lib/component/blackboard.js +5 -1
- package/dist/lib/component/detail-panel.js +2 -2
- package/dist/lib/component/detail-side.css +3 -2
- package/dist/lib/component/detail-side.js +14 -5
- package/dist/lib/component/global-hover-preview.css +1 -1
- package/dist/lib/component/global-hover-preview.js +6 -1
- package/dist/lib/component/sidebar.css +2 -1
- package/dist/lib/component/sidebar.js +19 -12
- package/dist/lib/component/store.js +7 -6
- package/dist/lib/component/timeline.js +2 -2
- package/dist/lib/index.css +14 -9
- package/dist/lib/index.js +37 -7
- package/dist/types/component/sidebar.d.ts +4 -1
- package/dist/types/component/store.d.ts +2 -1
- package/dist/types/index.d.ts +7 -2
- package/package.json +9 -4
- package/.eslintrc.js +0 -9
- package/dist/es/assets/logo-plain.16842bbc.svg +0 -70
- package/dist/es/assets/logo-plain2.16842bbc.svg +0 -70
- package/dist/lib/assets/logo-plain.16842bbc.svg +0 -70
- package/dist/lib/assets/logo-plain2.16842bbc.svg +0 -70
- package/docs/index.tsx +0 -6
- package/modern.config.ts +0 -15
- package/src/component/assets/logo-plain.svg +0 -70
- package/src/component/assets/logo-plain2.svg +0 -70
- package/src/component/blackboard.less +0 -37
- package/src/component/blackboard.tsx +0 -293
- package/src/component/color.tsx +0 -34
- package/src/component/common.less +0 -21
- package/src/component/detail-panel.less +0 -47
- package/src/component/detail-panel.tsx +0 -124
- package/src/component/detail-side.less +0 -131
- package/src/component/detail-side.tsx +0 -361
- package/src/component/global-hover-preview.less +0 -23
- package/src/component/global-hover-preview.tsx +0 -50
- package/src/component/misc.tsx +0 -20
- package/src/component/panel-title.less +0 -11
- package/src/component/panel-title.tsx +0 -11
- package/src/component/side-item.tsx +0 -0
- package/src/component/sidebar.less +0 -122
- package/src/component/sidebar.tsx +0 -205
- package/src/component/store.tsx +0 -151
- package/src/component/timeline.less +0 -25
- package/src/component/timeline.tsx +0 -486
- package/src/global.d.ts +0 -11
- package/src/index.less +0 -113
- package/src/index.tsx +0 -210
- package/src/utils.ts +0 -58
- package/tsconfig.json +0 -24
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
<!-- Creator: CorelDRAW 2019 (64-Bit) -->
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="141.563mm" height="53.8692mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
|
5
|
-
viewBox="0 0 16897.65 6430.11"
|
|
6
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
7
|
-
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
|
8
|
-
<defs>
|
|
9
|
-
<style type="text/css">
|
|
10
|
-
<![CDATA[
|
|
11
|
-
.str0 {stroke:#E62129;stroke-width:23.87;stroke-miterlimit:22.9256}
|
|
12
|
-
.str1 {stroke:#06B1AB;stroke-width:9.1;stroke-miterlimit:22.9256}
|
|
13
|
-
.fil0 {fill:none}
|
|
14
|
-
.fil8 {fill:#FEFEFE}
|
|
15
|
-
.fil1 {fill:#332C2B}
|
|
16
|
-
.fil12 {fill:#F7B873}
|
|
17
|
-
.fil5 {fill:#F3A04E}
|
|
18
|
-
.fil9 {fill:#52C2F1}
|
|
19
|
-
.fil13 {fill:#06B1AB}
|
|
20
|
-
.fil2 {fill:#F63D55}
|
|
21
|
-
.fil11 {fill:#F9483E}
|
|
22
|
-
.fil6 {fill:url(#id0)}
|
|
23
|
-
.fil4 {fill:url(#id1)}
|
|
24
|
-
.fil10 {fill:url(#id2)}
|
|
25
|
-
.fil3 {fill:url(#id3)}
|
|
26
|
-
.fil7 {fill:url(#id4)}
|
|
27
|
-
]]>
|
|
28
|
-
</style>
|
|
29
|
-
<linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="11103.21" y1="5027.34" x2="10930.41" y2="1211.98">
|
|
30
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#0A77D4"/>
|
|
31
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#00B1E0"/>
|
|
32
|
-
</linearGradient>
|
|
33
|
-
<linearGradient id="id1" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="11407.32" y1="5023.83" x2="11286.4" y2="1215.5">
|
|
34
|
-
</linearGradient>
|
|
35
|
-
<linearGradient id="id2" gradientUnits="userSpaceOnUse" x1="6311.87" y1="4699.25" x2="3547.5" y2="1677.39">
|
|
36
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#F65926"/>
|
|
37
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#F0AB1F"/>
|
|
38
|
-
</linearGradient>
|
|
39
|
-
<linearGradient id="id3" gradientUnits="userSpaceOnUse" x1="3105.35" y1="5075.61" x2="2612.67" y2="1311.04">
|
|
40
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#E52652"/>
|
|
41
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#FF4956"/>
|
|
42
|
-
</linearGradient>
|
|
43
|
-
<linearGradient id="id4" gradientUnits="userSpaceOnUse" x1="14599.77" y1="4808.34" x2="12000" y2="1573.25">
|
|
44
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#02C0A7"/>
|
|
45
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#02E097"/>
|
|
46
|
-
</linearGradient>
|
|
47
|
-
</defs>
|
|
48
|
-
<g id="图层_x0020_1">
|
|
49
|
-
<metadata id="CorelCorpID_0Corel-Layer"/>
|
|
50
|
-
<g id="_1978240863120">
|
|
51
|
-
<path class="fil0 str0" d="M2921.92 814.37l2943.46 0c660.05,0 1200.11,540.04 1200.11,1200.11l0 669.56c-180.23,1562.84 -842.69,2686.31 -2539.2,2867.65l-656.9 0c-1403.42,-112.59 -2125.37,-923.3 -2147.58,-2450.77l0 -1086.44c0,-660.07 540.04,-1200.11 1200.11,-1200.11z"/>
|
|
52
|
-
<path class="fil1" d="M908.05 649.1c172.38,0 312.1,139.73 312.1,312.1 0,172.38 -139.73,312.1 -312.1,312.1 -172.38,0 -312.1,-139.73 -312.1,-312.1 0,-172.38 139.73,-312.1 312.1,-312.1zm15081.56 0c-172.38,0 -312.1,139.73 -312.1,312.1 0,172.38 139.73,312.1 312.1,312.1 172.38,0 312.1,-139.73 312.1,-312.1 0,-172.38 -139.73,-312.1 -312.1,-312.1zm315.15 -649.07l-4739.56 0c-332.34,-0.73 -635.61,30.83 -892.17,114.33 -1164.61,314.95 -1684.86,539.69 -2204.5,542.55 -529.24,2.92 -1057.71,-221.77 -2243.89,-542.55 -256.56,-83.5 -559.83,-115.06 -892.17,-114.33l-4739.56 0c-326.11,0 -592.9,266.79 -592.9,592.9l0 727.65c0,326.11 262.25,574.15 588.16,562.9 244.44,-8.44 379.43,161.6 368.56,407.41l0 1401.3c844.04,3884.05 6459.63,3705.54 6872.25,-983.68 37.55,-479.97 225.37,-745.7 619.85,-795.03 394.48,49.33 582.3,315.06 619.85,795.03 221.1,2512.67 1570.99,3564.6 3624.76,3705.62 1575.25,-121.99 2822.57,-766.6 3247.49,-2721.94l0 -1401.3c-10.86,-245.81 124.13,-415.84 368.56,-407.41 325.91,11.24 588.16,-236.8 588.16,-562.9l0 -727.65c0,-326.11 -266.79,-592.9 -592.9,-592.9z"/>
|
|
53
|
-
<path class="fil2" d="M4404.53 5551.69l138.96 0c1696.5,-181.34 2358.97,-1304.82 2539.2,-2867.65l0 -669.56c0,-660.07 -540.06,-1200.11 -1200.11,-1200.11l-2261.28 0 -682.18 0c-660.07,0 -1200.11,540.04 -1200.11,1200.11l0 1086.44c22.21,1527.47 744.16,2338.19 2147.58,2450.77l517.94 0z"/>
|
|
54
|
-
<path class="fil3" d="M2884.03 3833.6c-562.03,-552.91 337.59,-1229.84 756.52,-784.77l-668.1 -718.53c-248.45,-631.92 -96.85,-1153.5 631.64,-1515.94l-682.18 0c-660.07,0 -1200.11,540.04 -1200.11,1200.11l0 1086.44c22.21,1527.47 744.16,2338.19 2147.58,2450.77l517.94 0c447.09,-261.52 828.85,-610.16 1124.32,-1073.8 -192.91,108.48 -371.35,123.1 -530.58,12.63 -269.77,225.61 -533.22,868.1 -809.3,676.82l-1287.75 -1333.74z"/>
|
|
55
|
-
<path class="fil4" d="M12967.79 5585.01c1654.02,-184.97 2231.4,-1330.91 2306.7,-2925.01l-43.57 -682.94c-42.95,-673.27 -608.37,-1224.11 -1256.49,-1224.11l-2220.38 0 -669.84 0c-648.13,0 -1143.27,550.85 -1100.32,1224.11l70.69 1108.16c121.19,1558.01 882.83,2384.94 2268.19,2499.78l645.03 0z"/>
|
|
56
|
-
<circle class="fil5" cx="3266.42" cy="4767.17" r="119.53"/>
|
|
57
|
-
<path class="fil6 str1" d="M11243.45 3832.57c-587.85,-563.96 251.45,-1254.43 691.78,-800.45l-702.77 -732.9c-285.07,-644.56 -170.14,-1176.57 521.59,-1546.26l-669.84 0c-648.13,0 -1143.27,550.85 -1100.32,1224.11l70.69 1108.16c121.19,1558.01 882.83,2384.94 2268.19,2499.78l508.57 0c422,-266.75 774.17,-622.36 1034.13,-1095.27 -182.37,110.65 -356.62,125.56 -520.16,12.88 -250.21,230.12 -467.1,885.46 -750.63,690.36l-1351.23 -1360.42z"/>
|
|
58
|
-
<path class="fil7" d="M11754.05 752.96c-691.73,369.69 -806.66,901.7 -521.59,1546.26l702.77 732.9c-440.33,-453.98 -1279.63,236.49 -691.78,800.45 1571.66,1582.35 780.78,887.85 1587.88,1752.45l136.46 0c1654.02,-184.97 2231.4,-1330.91 2306.7,-2925.01l-43.57 -682.94c-42.95,-673.27 -608.37,-1224.11 -1256.49,-1224.11l-2220.38 0z"/>
|
|
59
|
-
<circle class="fil8" cx="13725.89" cy="2247.09" r="867.65"/>
|
|
60
|
-
<circle class="fil9" cx="11745.99" cy="4944.33" r="119.53"/>
|
|
61
|
-
<path class="fil10" d="M3604.1 814.37c-728.5,362.44 -880.09,884.02 -631.64,1515.94l668.1 718.53c-418.94,-445.08 -1318.56,231.85 -756.52,784.77l1503.3 1718.08 138.96 0c1696.5,-181.34 2358.97,-1304.82 2539.2,-2867.65l0 -669.56c0,-660.07 -540.06,-1200.11 -1200.11,-1200.11l-2261.28 0z"/>
|
|
62
|
-
<path class="fil11" d="M3602.42 3012.57l-2.01 -1.79 -1.22 -1c-433.3,-363.07 -1259.33,288.49 -715.16,823.82l1503.3 1718.08 138.96 0c366.16,-39.14 684.05,-122.25 959.42,-244.11l-1883.3 -2295z"/>
|
|
63
|
-
<circle class="fil8" cx="5652.09" cy="2247.09" r="867.65"/>
|
|
64
|
-
<circle class="fil12" cx="5669.32" cy="4261.82" r="86.65"/>
|
|
65
|
-
<circle class="fil8" cx="3775.08" cy="4120.55" r="174.77"/>
|
|
66
|
-
<path class="fil13" d="M11770.33 2919.17l123.64 74.69c7.2,5.99 14.32,12.27 21.35,18.8l1988.29 2318.88c-264.55,126.79 -574.49,213.07 -935.82,253.47l-136.46 0c-807.1,-864.6 -16.22,-170.1 -1587.88,-1752.45 -520.29,-499.15 77.34,-1097.23 526.88,-913.39z"/>
|
|
67
|
-
<circle class="fil8" cx="12254.65" cy="4297.71" r="174.77"/>
|
|
68
|
-
</g>
|
|
69
|
-
</g>
|
|
70
|
-
</svg>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
<!-- Creator: CorelDRAW 2019 (64-Bit) -->
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="141.563mm" height="53.8692mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
|
5
|
-
viewBox="0 0 16897.65 6430.11"
|
|
6
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
7
|
-
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
|
8
|
-
<defs>
|
|
9
|
-
<style type="text/css">
|
|
10
|
-
<![CDATA[
|
|
11
|
-
.str0 {stroke:#E62129;stroke-width:23.87;stroke-miterlimit:22.9256}
|
|
12
|
-
.str1 {stroke:#06B1AB;stroke-width:9.1;stroke-miterlimit:22.9256}
|
|
13
|
-
.fil0 {fill:none}
|
|
14
|
-
.fil8 {fill:#FEFEFE}
|
|
15
|
-
.fil1 {fill:#332C2B}
|
|
16
|
-
.fil12 {fill:#F7B873}
|
|
17
|
-
.fil5 {fill:#F3A04E}
|
|
18
|
-
.fil9 {fill:#52C2F1}
|
|
19
|
-
.fil13 {fill:#06B1AB}
|
|
20
|
-
.fil2 {fill:#F63D55}
|
|
21
|
-
.fil11 {fill:#F9483E}
|
|
22
|
-
.fil6 {fill:url(#id0)}
|
|
23
|
-
.fil4 {fill:url(#id1)}
|
|
24
|
-
.fil10 {fill:url(#id2)}
|
|
25
|
-
.fil3 {fill:url(#id3)}
|
|
26
|
-
.fil7 {fill:url(#id4)}
|
|
27
|
-
]]>
|
|
28
|
-
</style>
|
|
29
|
-
<linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="11103.21" y1="5027.34" x2="10930.41" y2="1211.98">
|
|
30
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#0A77D4"/>
|
|
31
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#00B1E0"/>
|
|
32
|
-
</linearGradient>
|
|
33
|
-
<linearGradient id="id1" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="11407.32" y1="5023.83" x2="11286.4" y2="1215.5">
|
|
34
|
-
</linearGradient>
|
|
35
|
-
<linearGradient id="id2" gradientUnits="userSpaceOnUse" x1="6311.87" y1="4699.25" x2="3547.5" y2="1677.39">
|
|
36
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#F65926"/>
|
|
37
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#F0AB1F"/>
|
|
38
|
-
</linearGradient>
|
|
39
|
-
<linearGradient id="id3" gradientUnits="userSpaceOnUse" x1="3105.35" y1="5075.61" x2="2612.67" y2="1311.04">
|
|
40
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#E52652"/>
|
|
41
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#FF4956"/>
|
|
42
|
-
</linearGradient>
|
|
43
|
-
<linearGradient id="id4" gradientUnits="userSpaceOnUse" x1="14599.77" y1="4808.34" x2="12000" y2="1573.25">
|
|
44
|
-
<stop offset="0" style="stop-opacity:1; stop-color:#02C0A7"/>
|
|
45
|
-
<stop offset="1" style="stop-opacity:1; stop-color:#02E097"/>
|
|
46
|
-
</linearGradient>
|
|
47
|
-
</defs>
|
|
48
|
-
<g id="图层_x0020_1">
|
|
49
|
-
<metadata id="CorelCorpID_0Corel-Layer"/>
|
|
50
|
-
<g id="_1978240863120">
|
|
51
|
-
<path class="fil0 str0" d="M2921.92 814.37l2943.46 0c660.05,0 1200.11,540.04 1200.11,1200.11l0 669.56c-180.23,1562.84 -842.69,2686.31 -2539.2,2867.65l-656.9 0c-1403.42,-112.59 -2125.37,-923.3 -2147.58,-2450.77l0 -1086.44c0,-660.07 540.04,-1200.11 1200.11,-1200.11z"/>
|
|
52
|
-
<path class="fil1" d="M908.05 649.1c172.38,0 312.1,139.73 312.1,312.1 0,172.38 -139.73,312.1 -312.1,312.1 -172.38,0 -312.1,-139.73 -312.1,-312.1 0,-172.38 139.73,-312.1 312.1,-312.1zm15081.56 0c-172.38,0 -312.1,139.73 -312.1,312.1 0,172.38 139.73,312.1 312.1,312.1 172.38,0 312.1,-139.73 312.1,-312.1 0,-172.38 -139.73,-312.1 -312.1,-312.1zm315.15 -649.07l-4739.56 0c-332.34,-0.73 -635.61,30.83 -892.17,114.33 -1164.61,314.95 -1684.86,539.69 -2204.5,542.55 -529.24,2.92 -1057.71,-221.77 -2243.89,-542.55 -256.56,-83.5 -559.83,-115.06 -892.17,-114.33l-4739.56 0c-326.11,0 -592.9,266.79 -592.9,592.9l0 727.65c0,326.11 262.25,574.15 588.16,562.9 244.44,-8.44 379.43,161.6 368.56,407.41l0 1401.3c844.04,3884.05 6459.63,3705.54 6872.25,-983.68 37.55,-479.97 225.37,-745.7 619.85,-795.03 394.48,49.33 582.3,315.06 619.85,795.03 221.1,2512.67 1570.99,3564.6 3624.76,3705.62 1575.25,-121.99 2822.57,-766.6 3247.49,-2721.94l0 -1401.3c-10.86,-245.81 124.13,-415.84 368.56,-407.41 325.91,11.24 588.16,-236.8 588.16,-562.9l0 -727.65c0,-326.11 -266.79,-592.9 -592.9,-592.9z"/>
|
|
53
|
-
<path class="fil2" d="M4404.53 5551.69l138.96 0c1696.5,-181.34 2358.97,-1304.82 2539.2,-2867.65l0 -669.56c0,-660.07 -540.06,-1200.11 -1200.11,-1200.11l-2261.28 0 -682.18 0c-660.07,0 -1200.11,540.04 -1200.11,1200.11l0 1086.44c22.21,1527.47 744.16,2338.19 2147.58,2450.77l517.94 0z"/>
|
|
54
|
-
<path class="fil3" d="M2884.03 3833.6c-562.03,-552.91 337.59,-1229.84 756.52,-784.77l-668.1 -718.53c-248.45,-631.92 -96.85,-1153.5 631.64,-1515.94l-682.18 0c-660.07,0 -1200.11,540.04 -1200.11,1200.11l0 1086.44c22.21,1527.47 744.16,2338.19 2147.58,2450.77l517.94 0c447.09,-261.52 828.85,-610.16 1124.32,-1073.8 -192.91,108.48 -371.35,123.1 -530.58,12.63 -269.77,225.61 -533.22,868.1 -809.3,676.82l-1287.75 -1333.74z"/>
|
|
55
|
-
<path class="fil4" d="M12967.79 5585.01c1654.02,-184.97 2231.4,-1330.91 2306.7,-2925.01l-43.57 -682.94c-42.95,-673.27 -608.37,-1224.11 -1256.49,-1224.11l-2220.38 0 -669.84 0c-648.13,0 -1143.27,550.85 -1100.32,1224.11l70.69 1108.16c121.19,1558.01 882.83,2384.94 2268.19,2499.78l645.03 0z"/>
|
|
56
|
-
<circle class="fil5" cx="3266.42" cy="4767.17" r="119.53"/>
|
|
57
|
-
<path class="fil6 str1" d="M11243.45 3832.57c-587.85,-563.96 251.45,-1254.43 691.78,-800.45l-702.77 -732.9c-285.07,-644.56 -170.14,-1176.57 521.59,-1546.26l-669.84 0c-648.13,0 -1143.27,550.85 -1100.32,1224.11l70.69 1108.16c121.19,1558.01 882.83,2384.94 2268.19,2499.78l508.57 0c422,-266.75 774.17,-622.36 1034.13,-1095.27 -182.37,110.65 -356.62,125.56 -520.16,12.88 -250.21,230.12 -467.1,885.46 -750.63,690.36l-1351.23 -1360.42z"/>
|
|
58
|
-
<path class="fil7" d="M11754.05 752.96c-691.73,369.69 -806.66,901.7 -521.59,1546.26l702.77 732.9c-440.33,-453.98 -1279.63,236.49 -691.78,800.45 1571.66,1582.35 780.78,887.85 1587.88,1752.45l136.46 0c1654.02,-184.97 2231.4,-1330.91 2306.7,-2925.01l-43.57 -682.94c-42.95,-673.27 -608.37,-1224.11 -1256.49,-1224.11l-2220.38 0z"/>
|
|
59
|
-
<circle class="fil8" cx="13725.89" cy="2247.09" r="867.65"/>
|
|
60
|
-
<circle class="fil9" cx="11745.99" cy="4944.33" r="119.53"/>
|
|
61
|
-
<path class="fil10" d="M3604.1 814.37c-728.5,362.44 -880.09,884.02 -631.64,1515.94l668.1 718.53c-418.94,-445.08 -1318.56,231.85 -756.52,784.77l1503.3 1718.08 138.96 0c1696.5,-181.34 2358.97,-1304.82 2539.2,-2867.65l0 -669.56c0,-660.07 -540.06,-1200.11 -1200.11,-1200.11l-2261.28 0z"/>
|
|
62
|
-
<path class="fil11" d="M3602.42 3012.57l-2.01 -1.79 -1.22 -1c-433.3,-363.07 -1259.33,288.49 -715.16,823.82l1503.3 1718.08 138.96 0c366.16,-39.14 684.05,-122.25 959.42,-244.11l-1883.3 -2295z"/>
|
|
63
|
-
<circle class="fil8" cx="5652.09" cy="2247.09" r="867.65"/>
|
|
64
|
-
<circle class="fil12" cx="5669.32" cy="4261.82" r="86.65"/>
|
|
65
|
-
<circle class="fil8" cx="3775.08" cy="4120.55" r="174.77"/>
|
|
66
|
-
<path class="fil13" d="M11770.33 2919.17l123.64 74.69c7.2,5.99 14.32,12.27 21.35,18.8l1988.29 2318.88c-264.55,126.79 -574.49,213.07 -935.82,253.47l-136.46 0c-807.1,-864.6 -16.22,-170.1 -1587.88,-1752.45 -520.29,-499.15 77.34,-1097.23 526.88,-913.39z"/>
|
|
67
|
-
<circle class="fil8" cx="12254.65" cy="4297.71" r="174.77"/>
|
|
68
|
-
</g>
|
|
69
|
-
</g>
|
|
70
|
-
</svg>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@import './common.less';
|
|
2
|
-
|
|
3
|
-
.blackboard {
|
|
4
|
-
.footer {
|
|
5
|
-
color: #aaa;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
ul {
|
|
9
|
-
padding-left: 0px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
li {
|
|
13
|
-
list-style: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.bottom-tip {
|
|
17
|
-
height: 30px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.bottom-tip-item {
|
|
21
|
-
max-width: 500px;
|
|
22
|
-
color: #AAA;
|
|
23
|
-
text-overflow: ellipsis;
|
|
24
|
-
word-wrap: break-word;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.blackboard-filter {
|
|
29
|
-
margin: 10px 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.blackboard-main-content {
|
|
33
|
-
canvas {
|
|
34
|
-
width: 100%;
|
|
35
|
-
border: 1px solid @heavy-border-color;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as PIXI from 'pixi.js';
|
|
3
|
-
import { ReactElement, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { Checkbox } from 'antd';
|
|
5
|
-
import type { CheckboxProps } from 'antd';
|
|
6
|
-
import { Rect } from '../../../midscene/dist/types';
|
|
7
|
-
import { highlightColorForType, colorForName } from './color';
|
|
8
|
-
import './blackboard.less';
|
|
9
|
-
import { useBlackboardPreference, useInsightDump } from './store';
|
|
10
|
-
|
|
11
|
-
const itemFillAlpha = 0.3;
|
|
12
|
-
const bgOnAlpha = 0.8;
|
|
13
|
-
const bgOffAlpha = 0.3;
|
|
14
|
-
const noop = () => {
|
|
15
|
-
// noop
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const BlackBoard = (): JSX.Element => {
|
|
19
|
-
const dump = useInsightDump((store) => store.data);
|
|
20
|
-
const setHighlightSectionNames = useInsightDump((store) => store.setHighlightSectionNames);
|
|
21
|
-
const setHighlightElements = useInsightDump((store) => store.setHighlightElements);
|
|
22
|
-
const highlightSectionNames = useInsightDump((store) => store.highlightSectionNames);
|
|
23
|
-
const highlightElements = useInsightDump((store) => store.highlightElements);
|
|
24
|
-
|
|
25
|
-
const { context, matchedSection: sections, matchedElement: elements } = dump!;
|
|
26
|
-
const { size, screenshotBase64 } = context;
|
|
27
|
-
|
|
28
|
-
const screenWidth = size.width;
|
|
29
|
-
const screenHeight = size.height;
|
|
30
|
-
|
|
31
|
-
const domRef = useRef<HTMLDivElement>(null); // Should be HTMLDivElement not HTMLInputElement
|
|
32
|
-
const app = useMemo<PIXI.Application>(() => new PIXI.Application(), []);
|
|
33
|
-
const [appInitialed, setAppInitialed] = useState(false);
|
|
34
|
-
|
|
35
|
-
const itemMarkContainer = useMemo(() => new PIXI.Container(), []);
|
|
36
|
-
const textContainer = useMemo(() => new PIXI.Container(), []);
|
|
37
|
-
|
|
38
|
-
// key overlays
|
|
39
|
-
const pixiBgRef = useRef<PIXI.Sprite>();
|
|
40
|
-
const { bgVisible, setBgVisible, textsVisible, setTextsVisible } = useBlackboardPreference();
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
Promise.resolve(
|
|
44
|
-
(async () => {
|
|
45
|
-
if (!domRef.current || !screenWidth) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
await app.init({ width: screenWidth, height: screenHeight, background: 0xffffff });
|
|
49
|
-
const canvasEl = domRef.current;
|
|
50
|
-
domRef.current.appendChild(app.canvas); // Ensure app.view is appended
|
|
51
|
-
const { clientWidth } = domRef.current.parentElement!;
|
|
52
|
-
const targetHeight = window.innerHeight * 0.7;
|
|
53
|
-
const viewportRatio = clientWidth / targetHeight;
|
|
54
|
-
if (screenWidth / screenHeight <= viewportRatio) {
|
|
55
|
-
const ratio = targetHeight / screenHeight;
|
|
56
|
-
canvasEl.style.width = `${Math.floor(screenWidth * ratio)}px`;
|
|
57
|
-
canvasEl.style.height = `${Math.floor(screenHeight * ratio)}px`;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
app.stage.addChild(itemMarkContainer);
|
|
61
|
-
app.stage.addChild(textContainer);
|
|
62
|
-
|
|
63
|
-
setAppInitialed(true);
|
|
64
|
-
})(),
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
// Clean up the PIXI application when the component unmounts
|
|
68
|
-
return () => {
|
|
69
|
-
console.log('will destroy');
|
|
70
|
-
app?.destroy(true, { children: true, texture: true });
|
|
71
|
-
};
|
|
72
|
-
}, [app, screenWidth, screenHeight]);
|
|
73
|
-
|
|
74
|
-
// draw all texts on PIXI app
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (!appInitialed) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// draw the screenshot base64
|
|
81
|
-
const img = new Image();
|
|
82
|
-
img.src = screenshotBase64;
|
|
83
|
-
img.onload = () => {
|
|
84
|
-
const screenshotTexture = PIXI.Texture.from(img);
|
|
85
|
-
const screenshotSprite = new PIXI.Sprite(screenshotTexture);
|
|
86
|
-
screenshotSprite.x = 0;
|
|
87
|
-
screenshotSprite.y = 0;
|
|
88
|
-
screenshotSprite.width = screenWidth;
|
|
89
|
-
screenshotSprite.height = screenHeight;
|
|
90
|
-
app.stage.addChildAt(screenshotSprite, 0);
|
|
91
|
-
pixiBgRef.current = screenshotSprite;
|
|
92
|
-
screenshotSprite.alpha = bgVisible ? bgOnAlpha : bgOffAlpha;
|
|
93
|
-
};
|
|
94
|
-
}, [app.stage, appInitialed]);
|
|
95
|
-
|
|
96
|
-
const rectMarkForItem = (
|
|
97
|
-
rect: Rect,
|
|
98
|
-
name: string,
|
|
99
|
-
themeColor: string,
|
|
100
|
-
alpha: number,
|
|
101
|
-
onPointOver: () => void,
|
|
102
|
-
onPointerOut: () => void,
|
|
103
|
-
) => {
|
|
104
|
-
const { left, top, width, height } = rect;
|
|
105
|
-
const graphics = new PIXI.Graphics();
|
|
106
|
-
graphics.beginFill(themeColor, alpha);
|
|
107
|
-
graphics.lineStyle(1, themeColor, 1);
|
|
108
|
-
graphics.drawRect(left, top, width, height);
|
|
109
|
-
graphics.endFill();
|
|
110
|
-
graphics.interactive = true;
|
|
111
|
-
graphics.on('pointerover', onPointOver);
|
|
112
|
-
graphics.on('pointerout', onPointerOut);
|
|
113
|
-
|
|
114
|
-
const nameFontSize = 18;
|
|
115
|
-
const texts = new PIXI.Text(name, {
|
|
116
|
-
fontSize: nameFontSize,
|
|
117
|
-
fill: 0x0,
|
|
118
|
-
});
|
|
119
|
-
texts.x = left;
|
|
120
|
-
texts.y = Math.max(top - (nameFontSize + 4), 0);
|
|
121
|
-
return [graphics, texts];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
const { highlightSectionRects, highlightElementRects } = useMemo(() => {
|
|
125
|
-
const highlightSectionRects: Rect[] = [];
|
|
126
|
-
const highlightElementRects: Rect[] = [];
|
|
127
|
-
|
|
128
|
-
itemMarkContainer.removeChildren();
|
|
129
|
-
textContainer.removeChildren();
|
|
130
|
-
|
|
131
|
-
sections.forEach((section) => {
|
|
132
|
-
// draw a section overlay
|
|
133
|
-
const ifHighlight = highlightSectionNames.includes(section.name);
|
|
134
|
-
if (ifHighlight) {
|
|
135
|
-
highlightSectionRects.push(section.rect);
|
|
136
|
-
}
|
|
137
|
-
const [graphics, texts] = rectMarkForItem(
|
|
138
|
-
section.rect,
|
|
139
|
-
section.name,
|
|
140
|
-
ifHighlight ? highlightColorForType('section') : colorForName('section', section.name),
|
|
141
|
-
ifHighlight ? 1 : itemFillAlpha,
|
|
142
|
-
() => {
|
|
143
|
-
setHighlightSectionNames([section.name]);
|
|
144
|
-
},
|
|
145
|
-
() => {
|
|
146
|
-
setHighlightSectionNames([]);
|
|
147
|
-
},
|
|
148
|
-
);
|
|
149
|
-
itemMarkContainer.addChild(graphics);
|
|
150
|
-
textContainer.addChild(texts);
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// some are tmp highlights, draw them separately
|
|
154
|
-
highlightElements.forEach((element) => {
|
|
155
|
-
const { rect } = element;
|
|
156
|
-
highlightElementRects.push(rect);
|
|
157
|
-
if (elements.includes(element)) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
const [graphics, texts] = rectMarkForItem(rect, '', highlightColorForType('element'), 1, noop, noop);
|
|
161
|
-
itemMarkContainer.addChild(graphics);
|
|
162
|
-
textContainer.addChild(texts);
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// element mark
|
|
166
|
-
elements.forEach((element) => {
|
|
167
|
-
const { rect, content } = element;
|
|
168
|
-
const ifHighlight = highlightElements.includes(element);
|
|
169
|
-
const [graphics, texts] = rectMarkForItem(
|
|
170
|
-
rect,
|
|
171
|
-
content,
|
|
172
|
-
ifHighlight ? highlightColorForType('element') : colorForName('element', content),
|
|
173
|
-
ifHighlight ? 1 : itemFillAlpha,
|
|
174
|
-
() => {
|
|
175
|
-
setHighlightElements([element]);
|
|
176
|
-
},
|
|
177
|
-
() => {
|
|
178
|
-
setHighlightElements([]);
|
|
179
|
-
},
|
|
180
|
-
);
|
|
181
|
-
itemMarkContainer.addChild(graphics);
|
|
182
|
-
textContainer.addChild(texts);
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
sections.forEach((section) => {
|
|
186
|
-
const { content } = section;
|
|
187
|
-
const ifHighlight = highlightSectionNames.includes(section.name);
|
|
188
|
-
|
|
189
|
-
const sectionTheme = ifHighlight ? '#FFFFFF' : colorForName('section', section.name);
|
|
190
|
-
|
|
191
|
-
content.forEach((text) => {
|
|
192
|
-
const { content, rect } = text;
|
|
193
|
-
const { left, top } = rect;
|
|
194
|
-
const style = new PIXI.TextStyle({
|
|
195
|
-
wordWrap: true,
|
|
196
|
-
wordWrapWidth: rect.width,
|
|
197
|
-
fontSize: 18,
|
|
198
|
-
fill: sectionTheme,
|
|
199
|
-
});
|
|
200
|
-
const textElement = new PIXI.Text(content, style);
|
|
201
|
-
textElement.x = left;
|
|
202
|
-
textElement.y = top;
|
|
203
|
-
textContainer.addChild(textElement);
|
|
204
|
-
|
|
205
|
-
const textBorder = new PIXI.Graphics();
|
|
206
|
-
textBorder.beginFill(0xaaaaaa, 0.2);
|
|
207
|
-
textBorder.lineStyle(1, 0x0, 1);
|
|
208
|
-
textBorder.drawRect(left, top, rect.width, rect.height);
|
|
209
|
-
textBorder.endFill();
|
|
210
|
-
textContainer.addChild(textBorder);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
textContainer.visible = textsVisible;
|
|
214
|
-
return {
|
|
215
|
-
highlightSectionRects,
|
|
216
|
-
highlightElementRects,
|
|
217
|
-
};
|
|
218
|
-
}, [
|
|
219
|
-
app,
|
|
220
|
-
appInitialed,
|
|
221
|
-
sections,
|
|
222
|
-
highlightSectionNames,
|
|
223
|
-
highlightElements,
|
|
224
|
-
// bgVisible,
|
|
225
|
-
// textsVisible,
|
|
226
|
-
]);
|
|
227
|
-
|
|
228
|
-
const onSetBg: CheckboxProps['onChange'] = (e) => {
|
|
229
|
-
setBgVisible(e.target.checked);
|
|
230
|
-
if (pixiBgRef.current) {
|
|
231
|
-
pixiBgRef.current.alpha = e.target.checked ? bgOnAlpha : bgOffAlpha;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
const onSetTextsVisible: CheckboxProps['onChange'] = (e) => {
|
|
236
|
-
setTextsVisible(e.target.checked);
|
|
237
|
-
textContainer.visible = e.target.checked;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
let bottomTipA: ReactElement | null = null;
|
|
241
|
-
if (highlightElementRects.length === 1) {
|
|
242
|
-
bottomTipA = (
|
|
243
|
-
<div className="bottom-tip">
|
|
244
|
-
<div className="bottom-tip-item">Element: {JSON.stringify(highlightElementRects[0])}</div>
|
|
245
|
-
</div>
|
|
246
|
-
);
|
|
247
|
-
} else if (highlightElementRects.length > 1) {
|
|
248
|
-
bottomTipA = (
|
|
249
|
-
<div className="bottom-tip">
|
|
250
|
-
<div className="bottom-tip-item">Element: {JSON.stringify(highlightElementRects)}</div>
|
|
251
|
-
</div>
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
let bottomTipB: ReactElement | null = null;
|
|
256
|
-
if (highlightSectionRects.length === 1) {
|
|
257
|
-
bottomTipB = (
|
|
258
|
-
<div className="bottom-tip">
|
|
259
|
-
<div className="bottom-tip-item">Section: {JSON.stringify(highlightSectionRects[0])}</div>
|
|
260
|
-
</div>
|
|
261
|
-
);
|
|
262
|
-
} else if (highlightSectionRects.length > 1) {
|
|
263
|
-
bottomTipB = (
|
|
264
|
-
<div className="bottom-tip">
|
|
265
|
-
<div className="bottom-tip-item">Sections: {JSON.stringify(highlightSectionRects)}</div>
|
|
266
|
-
</div>
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return (
|
|
271
|
-
<div className="blackboard">
|
|
272
|
-
<div className="blackboard-main-content" style={{ width: '100%' }} ref={domRef} />
|
|
273
|
-
<div className="blackboard-filter">
|
|
274
|
-
<div className="overlay-control">
|
|
275
|
-
<Checkbox checked={bgVisible} onChange={onSetBg}>
|
|
276
|
-
Screenshot
|
|
277
|
-
</Checkbox>
|
|
278
|
-
<Checkbox checked={textsVisible} onChange={onSetTextsVisible}>
|
|
279
|
-
Text Mark
|
|
280
|
-
</Checkbox>
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
<div className="bottom-tip">
|
|
284
|
-
{bottomTipA}
|
|
285
|
-
{bottomTipB}
|
|
286
|
-
</div>
|
|
287
|
-
|
|
288
|
-
{/* {footer} */}
|
|
289
|
-
</div>
|
|
290
|
-
);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
export default BlackBoard;
|
package/src/component/color.tsx
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// https://coolors.co/palettes/popular/#01204e
|
|
2
|
-
const sectionColor = ['#028391'];
|
|
3
|
-
const elementColor = ['#fb6107'];
|
|
4
|
-
const highlightColorForSection = '#01204E';
|
|
5
|
-
const highlightColorForElement = '#F56824'; // @main-orange
|
|
6
|
-
|
|
7
|
-
function djb2Hash(str?: string): number {
|
|
8
|
-
if (!str) {
|
|
9
|
-
console.warn('djb2Hash: empty string');
|
|
10
|
-
str = 'unnamed';
|
|
11
|
-
}
|
|
12
|
-
let hash = 5381;
|
|
13
|
-
for (let i = 0; i < str.length; i++) {
|
|
14
|
-
hash = (hash << 5) + hash + str.charCodeAt(i); // hash * 33 + c
|
|
15
|
-
}
|
|
16
|
-
return hash >>> 0; // Convert to unsigned 32
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function colorForName(type: 'section' | 'element', name: string): string {
|
|
20
|
-
const hashNumber = djb2Hash(name);
|
|
21
|
-
if (type === 'section') {
|
|
22
|
-
return sectionColor[hashNumber % sectionColor.length];
|
|
23
|
-
} else {
|
|
24
|
-
return elementColor[hashNumber % elementColor.length];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function highlightColorForType(type: 'section' | 'element'): string {
|
|
29
|
-
if (type === 'section') {
|
|
30
|
-
return highlightColorForSection;
|
|
31
|
-
} else {
|
|
32
|
-
return highlightColorForElement;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@main-blue: #06B1AB;
|
|
2
|
-
@sub-blue: #A3D6D2;
|
|
3
|
-
|
|
4
|
-
@main-orange: #F9483E;
|
|
5
|
-
|
|
6
|
-
@side-bg: #ECECEC;
|
|
7
|
-
@title-bg: #DDDDDD;
|
|
8
|
-
@border-color: #CCCCCC;
|
|
9
|
-
@heavy-border-color: #888;
|
|
10
|
-
|
|
11
|
-
@selected-bg: @main-blue;
|
|
12
|
-
@selected-text: #ffffff;
|
|
13
|
-
@hover-bg: @sub-blue;
|
|
14
|
-
@hover-text: #333;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@weak-text: #777;
|
|
18
|
-
@weak-bg: #F3F3F3;
|
|
19
|
-
|
|
20
|
-
@side-horizontal-padding: 10px;
|
|
21
|
-
@side-vertical-spacing: 10px;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@import './common.less';
|
|
2
|
-
|
|
3
|
-
@layout-space: 10px;
|
|
4
|
-
|
|
5
|
-
.detail-panel {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
height: 100%;
|
|
9
|
-
padding: @layout-space;
|
|
10
|
-
background: #FFF;
|
|
11
|
-
|
|
12
|
-
.ant-segmented{
|
|
13
|
-
padding: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.view-switcher{
|
|
17
|
-
margin-bottom: @layout-space;
|
|
18
|
-
flex-shrink: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.detail-content{
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-grow: 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.blackboard {
|
|
30
|
-
margin: 0 auto;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.screenshot-item {
|
|
34
|
-
margin-bottom: @layout-space;
|
|
35
|
-
|
|
36
|
-
.screenshot-item-title {
|
|
37
|
-
// font-weight: bold;
|
|
38
|
-
margin-bottom: 5px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
img {
|
|
42
|
-
border: 1px solid @heavy-border-color;
|
|
43
|
-
max-width: 100%;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}
|