@semcore/illustration 17.0.0 → 17.0.1-prerelease.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.
- package/AccessDenied/index.d.ts +28 -0
- package/AccessDenied/index.js +242 -0
- package/AccessDenied/index.mjs +220 -0
- package/AccessLogIn/index.d.ts +28 -0
- package/AccessLogIn/index.js +344 -0
- package/AccessLogIn/index.mjs +322 -0
- package/AreaChart/index.d.ts +28 -0
- package/AreaChart/index.js +89 -0
- package/AreaChart/index.mjs +67 -0
- package/Blocked/index.d.ts +28 -0
- package/Blocked/index.js +493 -0
- package/Blocked/index.mjs +471 -0
- package/CHANGELOG.md +3 -73
- package/ChoroplethMapChart/index.d.ts +28 -0
- package/ChoroplethMapChart/index.js +111 -0
- package/ChoroplethMapChart/index.mjs +89 -0
- package/Coffee/index.d.ts +28 -0
- package/Coffee/index.js +96 -0
- package/Coffee/index.mjs +74 -0
- package/Collection/index.d.ts +28 -0
- package/Collection/index.js +90 -0
- package/Collection/index.mjs +68 -0
- package/CombinedChart/index.d.ts +28 -0
- package/CombinedChart/index.js +118 -0
- package/CombinedChart/index.mjs +96 -0
- package/Configuration/index.d.ts +28 -0
- package/Configuration/index.js +197 -0
- package/Configuration/index.mjs +175 -0
- package/Confirmation/index.d.ts +28 -0
- package/Confirmation/index.js +267 -0
- package/Confirmation/index.mjs +245 -0
- package/Congrats/index.d.ts +28 -0
- package/Congrats/index.js +147 -0
- package/Congrats/index.mjs +125 -0
- package/ConnectionLost/index.d.ts +28 -0
- package/ConnectionLost/index.js +299 -0
- package/ConnectionLost/index.mjs +277 -0
- package/DeletedAccount/index.d.ts +28 -0
- package/DeletedAccount/index.js +376 -0
- package/DeletedAccount/index.mjs +354 -0
- package/DeletedPage/index.d.ts +28 -0
- package/DeletedPage/index.js +81 -0
- package/DeletedPage/index.mjs +59 -0
- package/Dns/index.d.ts +28 -0
- package/Dns/index.js +180 -0
- package/Dns/index.mjs +158 -0
- package/DonutChart/index.d.ts +28 -0
- package/DonutChart/index.js +131 -0
- package/DonutChart/index.mjs +109 -0
- package/Duplicates/index.d.ts +28 -0
- package/Duplicates/index.js +108 -0
- package/Duplicates/index.mjs +86 -0
- package/Feedback/index.d.ts +28 -0
- package/Feedback/index.js +96 -0
- package/Feedback/index.mjs +74 -0
- package/FunnelChart/index.d.ts +28 -0
- package/FunnelChart/index.js +98 -0
- package/FunnelChart/index.mjs +76 -0
- package/Good/index.d.ts +28 -0
- package/Good/index.js +131 -0
- package/Good/index.mjs +109 -0
- package/HeatMapChart/index.d.ts +28 -0
- package/HeatMapChart/index.js +116 -0
- package/HeatMapChart/index.mjs +94 -0
- package/HorizontalBarChart/index.d.ts +28 -0
- package/HorizontalBarChart/index.js +102 -0
- package/HorizontalBarChart/index.mjs +80 -0
- package/KagiChart/index.d.ts +28 -0
- package/KagiChart/index.js +83 -0
- package/KagiChart/index.mjs +61 -0
- package/LineChart/index.d.ts +28 -0
- package/LineChart/index.js +86 -0
- package/LineChart/index.mjs +64 -0
- package/LollipopChart/index.d.ts +28 -0
- package/LollipopChart/index.js +103 -0
- package/LollipopChart/index.mjs +81 -0
- package/MailSent/index.d.ts +28 -0
- package/MailSent/index.js +142 -0
- package/MailSent/index.mjs +120 -0
- package/Maintenance/index.d.ts +28 -0
- package/Maintenance/index.js +363 -0
- package/Maintenance/index.mjs +341 -0
- package/Nexttime/index.d.ts +28 -0
- package/Nexttime/index.js +110 -0
- package/Nexttime/index.mjs +88 -0
- package/NoPayment/index.d.ts +28 -0
- package/NoPayment/index.js +304 -0
- package/NoPayment/index.mjs +282 -0
- package/NothingFound/index.d.ts +28 -0
- package/NothingFound/index.js +134 -0
- package/NothingFound/index.mjs +112 -0
- package/OtherData/index.d.ts +28 -0
- package/OtherData/index.js +117 -0
- package/OtherData/index.mjs +95 -0
- package/PageError/index.d.ts +28 -0
- package/PageError/index.js +224 -0
- package/PageError/index.mjs +202 -0
- package/PageNotFound/index.d.ts +28 -0
- package/PageNotFound/index.js +284 -0
- package/PageNotFound/index.mjs +262 -0
- package/PieChart/index.d.ts +28 -0
- package/PieChart/index.js +116 -0
- package/PieChart/index.mjs +94 -0
- package/Processing/index.d.ts +28 -0
- package/Processing/index.js +96 -0
- package/Processing/index.mjs +74 -0
- package/ProjectNotFound/index.d.ts +28 -0
- package/ProjectNotFound/index.js +247 -0
- package/ProjectNotFound/index.mjs +225 -0
- package/README.md +32 -5
- package/RadarChart/index.d.ts +28 -0
- package/RadarChart/index.js +95 -0
- package/RadarChart/index.mjs +73 -0
- package/RadialTreeChart/index.d.ts +28 -0
- package/RadialTreeChart/index.js +137 -0
- package/RadialTreeChart/index.mjs +115 -0
- package/SankeyChart/index.d.ts +28 -0
- package/SankeyChart/index.js +123 -0
- package/SankeyChart/index.mjs +101 -0
- package/ScatterPlotChart/index.d.ts +28 -0
- package/ScatterPlotChart/index.js +108 -0
- package/ScatterPlotChart/index.mjs +86 -0
- package/StackedAreaChart/index.d.ts +28 -0
- package/StackedAreaChart/index.js +110 -0
- package/StackedAreaChart/index.mjs +88 -0
- package/Suggestion/index.d.ts +28 -0
- package/Suggestion/index.js +94 -0
- package/Suggestion/index.mjs +72 -0
- package/Suggestions/index.d.ts +28 -0
- package/Suggestions/index.js +97 -0
- package/Suggestions/index.mjs +75 -0
- package/Table/index.d.ts +28 -0
- package/Table/index.js +81 -0
- package/Table/index.mjs +59 -0
- package/TagCloud/index.d.ts +28 -0
- package/TagCloud/index.js +108 -0
- package/TagCloud/index.mjs +86 -0
- package/TextLinksEtc/index.d.ts +28 -0
- package/TextLinksEtc/index.js +84 -0
- package/TextLinksEtc/index.mjs +62 -0
- package/Timeout/index.d.ts +28 -0
- package/Timeout/index.js +381 -0
- package/Timeout/index.mjs +359 -0
- package/UnderConstruction/index.d.ts +28 -0
- package/UnderConstruction/index.js +143 -0
- package/UnderConstruction/index.mjs +121 -0
- package/VennChart/index.d.ts +28 -0
- package/VennChart/index.js +109 -0
- package/VennChart/index.mjs +87 -0
- package/VerticalBarChart/index.d.ts +28 -0
- package/VerticalBarChart/index.js +103 -0
- package/VerticalBarChart/index.mjs +81 -0
- package/Waiting/index.d.ts +28 -0
- package/Waiting/index.js +96 -0
- package/Waiting/index.mjs +74 -0
- package/Warning/index.d.ts +28 -0
- package/Warning/index.js +91 -0
- package/Warning/index.mjs +69 -0
- package/clear.ts +25 -0
- package/lib/AccessDenied/index.js +26 -207
- package/lib/AccessDenied/index.mjs +18 -206
- package/lib/AccessLogIn/index.js +26 -309
- package/lib/AccessLogIn/index.mjs +18 -308
- package/lib/AreaChart/index.js +32 -54
- package/lib/AreaChart/index.mjs +24 -53
- package/lib/Blocked/index.js +118 -458
- package/lib/Blocked/index.mjs +110 -457
- package/lib/ChoroplethMapChart/index.js +34 -76
- package/lib/ChoroplethMapChart/index.mjs +26 -75
- package/lib/Coffee/index.js +29 -61
- package/lib/Coffee/index.mjs +21 -60
- package/lib/Collection/index.js +31 -55
- package/lib/Collection/index.mjs +23 -54
- package/lib/CombinedChart/index.js +36 -83
- package/lib/CombinedChart/index.mjs +28 -82
- package/lib/Configuration/index.js +47 -162
- package/lib/Configuration/index.mjs +39 -161
- package/lib/Confirmation/index.js +28 -232
- package/lib/Confirmation/index.mjs +20 -231
- package/lib/Congrats/index.js +23 -112
- package/lib/Congrats/index.mjs +15 -111
- package/lib/ConnectionLost/index.js +31 -264
- package/lib/ConnectionLost/index.mjs +23 -263
- package/lib/DeletedAccount/index.js +47 -341
- package/lib/DeletedAccount/index.mjs +39 -340
- package/lib/DeletedPage/index.js +23 -46
- package/lib/DeletedPage/index.mjs +15 -45
- package/lib/Dns/index.js +27 -145
- package/lib/Dns/index.mjs +19 -144
- package/lib/DonutChart/index.js +37 -96
- package/lib/DonutChart/index.mjs +29 -95
- package/lib/Duplicates/index.js +34 -73
- package/lib/Duplicates/index.mjs +26 -72
- package/lib/Feedback/index.js +31 -61
- package/lib/Feedback/index.mjs +23 -60
- package/lib/FunnelChart/index.js +33 -63
- package/lib/FunnelChart/index.mjs +25 -62
- package/lib/Good/index.js +38 -96
- package/lib/Good/index.mjs +30 -95
- package/lib/HeatMapChart/index.js +35 -81
- package/lib/HeatMapChart/index.mjs +27 -80
- package/lib/HorizontalBarChart/index.js +33 -67
- package/lib/HorizontalBarChart/index.mjs +25 -66
- package/lib/KagiChart/index.js +30 -48
- package/lib/KagiChart/index.mjs +22 -47
- package/lib/LineChart/index.js +31 -51
- package/lib/LineChart/index.mjs +23 -50
- package/lib/LollipopChart/index.js +33 -68
- package/lib/LollipopChart/index.mjs +25 -67
- package/lib/MailSent/index.js +23 -107
- package/lib/MailSent/index.mjs +15 -106
- package/lib/Maintenance/index.js +27 -328
- package/lib/Maintenance/index.mjs +19 -327
- package/lib/Nexttime/index.js +35 -75
- package/lib/Nexttime/index.mjs +27 -74
- package/lib/NoPayment/index.js +23 -269
- package/lib/NoPayment/index.mjs +15 -268
- package/lib/NothingFound/index.js +37 -99
- package/lib/NothingFound/index.mjs +29 -98
- package/lib/OtherData/index.js +35 -82
- package/lib/OtherData/index.mjs +27 -81
- package/lib/PageError/index.js +60 -189
- package/lib/PageError/index.mjs +52 -188
- package/lib/PageNotFound/index.js +78 -249
- package/lib/PageNotFound/index.mjs +70 -248
- package/lib/PieChart/index.js +35 -81
- package/lib/PieChart/index.mjs +27 -80
- package/lib/Processing/index.js +32 -61
- package/lib/Processing/index.mjs +24 -60
- package/lib/ProjectNotFound/index.js +60 -212
- package/lib/ProjectNotFound/index.mjs +52 -211
- package/lib/RadarChart/index.js +32 -60
- package/lib/RadarChart/index.mjs +24 -59
- package/lib/RadialTreeChart/index.js +38 -102
- package/lib/RadialTreeChart/index.mjs +30 -101
- package/lib/SankeyChart/index.js +36 -88
- package/lib/SankeyChart/index.mjs +28 -87
- package/lib/ScatterPlotChart/index.js +34 -73
- package/lib/ScatterPlotChart/index.mjs +26 -72
- package/lib/StackedAreaChart/index.js +36 -75
- package/lib/StackedAreaChart/index.mjs +28 -74
- package/lib/Suggestion/index.js +32 -59
- package/lib/Suggestion/index.mjs +24 -58
- package/lib/Suggestions/index.js +32 -62
- package/lib/Suggestions/index.mjs +24 -61
- package/lib/Table/index.js +29 -46
- package/lib/Table/index.mjs +21 -45
- package/lib/TagCloud/index.js +34 -73
- package/lib/TagCloud/index.mjs +26 -72
- package/lib/TextLinksEtc/index.js +30 -49
- package/lib/TextLinksEtc/index.mjs +22 -48
- package/lib/Timeout/index.js +26 -346
- package/lib/Timeout/index.mjs +18 -345
- package/lib/UnderConstruction/index.js +40 -108
- package/lib/UnderConstruction/index.mjs +32 -107
- package/lib/VennChart/index.js +34 -74
- package/lib/VennChart/index.mjs +26 -73
- package/lib/VerticalBarChart/index.js +33 -68
- package/lib/VerticalBarChart/index.mjs +25 -67
- package/lib/Waiting/index.js +33 -61
- package/lib/Waiting/index.mjs +25 -60
- package/lib/Warning/index.js +31 -56
- package/lib/Warning/index.mjs +23 -55
- package/lib/cjs/index.js +8 -7
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/index.js +8 -6
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/index.mjs +8 -6
- package/package.json +173 -169
- package/transform.ts +20 -21
- package/types/svg-to-jsx.d.ts +1 -1
- package/vite.config.ts +0 -24
package/lib/esm/index.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return name.split(/_|-/).map((el)
|
|
1
|
+
var version = "17.0.1";
|
|
2
|
+
var formatName = function formatName2(name) {
|
|
3
|
+
return name.split(/_|-/).map(function(el) {
|
|
4
|
+
return el[0].toUpperCase() + el.slice(1);
|
|
5
|
+
}).join("");
|
|
4
6
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
7
|
+
var getIllustrationPath = function getIllustrationPath2(name) {
|
|
8
|
+
var formattedName = formatName(name);
|
|
9
|
+
return "https://static.semrush.com/intergalactic/illustrations/".concat(version, "/").concat(formattedName, ".svg");
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
12
|
getIllustrationPath
|
package/package.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/illustration",
|
|
3
3
|
"description": "Semrush Illustration Component",
|
|
4
|
-
"version": "17.0.0",
|
|
4
|
+
"version": "17.0.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
|
-
"module": "lib/
|
|
6
|
+
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"@babel/runtime": "^7.17.9",
|
|
13
|
+
"@semcore/flex-box": "16.0.11-prerelease.0",
|
|
12
14
|
"colorjs.io": "0.4.3"
|
|
13
15
|
},
|
|
14
16
|
"peerDependencies": {
|
|
15
|
-
"@semcore/
|
|
17
|
+
"@semcore/core": "^17.0.1-prerelease.0",
|
|
18
|
+
"react": "16.8 - 18",
|
|
19
|
+
"react-dom": "16.8 - 18"
|
|
16
20
|
},
|
|
17
21
|
"repository": {
|
|
18
22
|
"type": "git",
|
|
@@ -20,285 +24,285 @@
|
|
|
20
24
|
"directory": "semcore/illustration"
|
|
21
25
|
},
|
|
22
26
|
"devDependencies": {
|
|
23
|
-
"@types/fs-extra": "8.1.0",
|
|
24
27
|
"esbuild": "0.14.29",
|
|
25
|
-
"fs-extra": "8.1.0",
|
|
26
28
|
"happy-dom": "9.20.3",
|
|
27
|
-
"
|
|
29
|
+
"fs-extra": "8.1.0",
|
|
30
|
+
"svg-to-jsx": "^1.0.4",
|
|
28
31
|
"@semcore/testing-utils": "1.0.0",
|
|
29
|
-
"@
|
|
32
|
+
"@types/react": "18.0.21",
|
|
33
|
+
"@types/fs-extra": "8.1.0"
|
|
30
34
|
},
|
|
31
35
|
"exports": {
|
|
32
36
|
".": {
|
|
33
|
-
"
|
|
34
|
-
"import": "./lib/
|
|
35
|
-
"
|
|
37
|
+
"require": "./lib/cjs/index.js",
|
|
38
|
+
"import": "./lib/es6/index.js",
|
|
39
|
+
"types": "./lib/types/index.d.ts"
|
|
36
40
|
},
|
|
37
41
|
"./AccessDenied": {
|
|
38
|
-
"
|
|
39
|
-
"import": "./
|
|
40
|
-
"
|
|
42
|
+
"require": "./AccessDenied/index.js",
|
|
43
|
+
"import": "./AccessDenied/index.mjs",
|
|
44
|
+
"types": "./AccessDenied/index.d.ts"
|
|
41
45
|
},
|
|
42
46
|
"./AccessLogIn": {
|
|
43
|
-
"
|
|
44
|
-
"import": "./
|
|
45
|
-
"
|
|
47
|
+
"require": "./AccessLogIn/index.js",
|
|
48
|
+
"import": "./AccessLogIn/index.mjs",
|
|
49
|
+
"types": "./AccessLogIn/index.d.ts"
|
|
46
50
|
},
|
|
47
51
|
"./AreaChart": {
|
|
48
|
-
"
|
|
49
|
-
"import": "./
|
|
50
|
-
"
|
|
52
|
+
"require": "./AreaChart/index.js",
|
|
53
|
+
"import": "./AreaChart/index.mjs",
|
|
54
|
+
"types": "./AreaChart/index.d.ts"
|
|
51
55
|
},
|
|
52
56
|
"./Blocked": {
|
|
53
|
-
"
|
|
54
|
-
"import": "./
|
|
55
|
-
"
|
|
57
|
+
"require": "./Blocked/index.js",
|
|
58
|
+
"import": "./Blocked/index.mjs",
|
|
59
|
+
"types": "./Blocked/index.d.ts"
|
|
56
60
|
},
|
|
57
61
|
"./ChoroplethMapChart": {
|
|
58
|
-
"
|
|
59
|
-
"import": "./
|
|
60
|
-
"
|
|
62
|
+
"require": "./ChoroplethMapChart/index.js",
|
|
63
|
+
"import": "./ChoroplethMapChart/index.mjs",
|
|
64
|
+
"types": "./ChoroplethMapChart/index.d.ts"
|
|
61
65
|
},
|
|
62
66
|
"./Coffee": {
|
|
63
|
-
"
|
|
64
|
-
"import": "./
|
|
65
|
-
"
|
|
67
|
+
"require": "./Coffee/index.js",
|
|
68
|
+
"import": "./Coffee/index.mjs",
|
|
69
|
+
"types": "./Coffee/index.d.ts"
|
|
66
70
|
},
|
|
67
71
|
"./Collection": {
|
|
68
|
-
"
|
|
69
|
-
"import": "./
|
|
70
|
-
"
|
|
72
|
+
"require": "./Collection/index.js",
|
|
73
|
+
"import": "./Collection/index.mjs",
|
|
74
|
+
"types": "./Collection/index.d.ts"
|
|
71
75
|
},
|
|
72
76
|
"./CombinedChart": {
|
|
73
|
-
"
|
|
74
|
-
"import": "./
|
|
75
|
-
"
|
|
77
|
+
"require": "./CombinedChart/index.js",
|
|
78
|
+
"import": "./CombinedChart/index.mjs",
|
|
79
|
+
"types": "./CombinedChart/index.d.ts"
|
|
76
80
|
},
|
|
77
81
|
"./Configuration": {
|
|
78
|
-
"
|
|
79
|
-
"import": "./
|
|
80
|
-
"
|
|
82
|
+
"require": "./Configuration/index.js",
|
|
83
|
+
"import": "./Configuration/index.mjs",
|
|
84
|
+
"types": "./Configuration/index.d.ts"
|
|
81
85
|
},
|
|
82
86
|
"./Confirmation": {
|
|
83
|
-
"
|
|
84
|
-
"import": "./
|
|
85
|
-
"
|
|
87
|
+
"require": "./Confirmation/index.js",
|
|
88
|
+
"import": "./Confirmation/index.mjs",
|
|
89
|
+
"types": "./Confirmation/index.d.ts"
|
|
86
90
|
},
|
|
87
91
|
"./Congrats": {
|
|
88
|
-
"
|
|
89
|
-
"import": "./
|
|
90
|
-
"
|
|
92
|
+
"require": "./Congrats/index.js",
|
|
93
|
+
"import": "./Congrats/index.mjs",
|
|
94
|
+
"types": "./Congrats/index.d.ts"
|
|
91
95
|
},
|
|
92
96
|
"./ConnectionLost": {
|
|
93
|
-
"
|
|
94
|
-
"import": "./
|
|
95
|
-
"
|
|
97
|
+
"require": "./ConnectionLost/index.js",
|
|
98
|
+
"import": "./ConnectionLost/index.mjs",
|
|
99
|
+
"types": "./ConnectionLost/index.d.ts"
|
|
96
100
|
},
|
|
97
101
|
"./DeletedAccount": {
|
|
98
|
-
"
|
|
99
|
-
"import": "./
|
|
100
|
-
"
|
|
102
|
+
"require": "./DeletedAccount/index.js",
|
|
103
|
+
"import": "./DeletedAccount/index.mjs",
|
|
104
|
+
"types": "./DeletedAccount/index.d.ts"
|
|
101
105
|
},
|
|
102
106
|
"./DeletedPage": {
|
|
103
|
-
"
|
|
104
|
-
"import": "./
|
|
105
|
-
"
|
|
107
|
+
"require": "./DeletedPage/index.js",
|
|
108
|
+
"import": "./DeletedPage/index.mjs",
|
|
109
|
+
"types": "./DeletedPage/index.d.ts"
|
|
106
110
|
},
|
|
107
111
|
"./Dns": {
|
|
108
|
-
"
|
|
109
|
-
"import": "./
|
|
110
|
-
"
|
|
112
|
+
"require": "./Dns/index.js",
|
|
113
|
+
"import": "./Dns/index.mjs",
|
|
114
|
+
"types": "./Dns/index.d.ts"
|
|
111
115
|
},
|
|
112
116
|
"./DonutChart": {
|
|
113
|
-
"
|
|
114
|
-
"import": "./
|
|
115
|
-
"
|
|
117
|
+
"require": "./DonutChart/index.js",
|
|
118
|
+
"import": "./DonutChart/index.mjs",
|
|
119
|
+
"types": "./DonutChart/index.d.ts"
|
|
116
120
|
},
|
|
117
121
|
"./Duplicates": {
|
|
118
|
-
"
|
|
119
|
-
"import": "./
|
|
120
|
-
"
|
|
122
|
+
"require": "./Duplicates/index.js",
|
|
123
|
+
"import": "./Duplicates/index.mjs",
|
|
124
|
+
"types": "./Duplicates/index.d.ts"
|
|
121
125
|
},
|
|
122
126
|
"./Feedback": {
|
|
123
|
-
"
|
|
124
|
-
"import": "./
|
|
125
|
-
"
|
|
127
|
+
"require": "./Feedback/index.js",
|
|
128
|
+
"import": "./Feedback/index.mjs",
|
|
129
|
+
"types": "./Feedback/index.d.ts"
|
|
126
130
|
},
|
|
127
131
|
"./FunnelChart": {
|
|
128
|
-
"
|
|
129
|
-
"import": "./
|
|
130
|
-
"
|
|
132
|
+
"require": "./FunnelChart/index.js",
|
|
133
|
+
"import": "./FunnelChart/index.mjs",
|
|
134
|
+
"types": "./FunnelChart/index.d.ts"
|
|
131
135
|
},
|
|
132
136
|
"./Good": {
|
|
133
|
-
"
|
|
134
|
-
"import": "./
|
|
135
|
-
"
|
|
137
|
+
"require": "./Good/index.js",
|
|
138
|
+
"import": "./Good/index.mjs",
|
|
139
|
+
"types": "./Good/index.d.ts"
|
|
136
140
|
},
|
|
137
141
|
"./HeatMapChart": {
|
|
138
|
-
"
|
|
139
|
-
"import": "./
|
|
140
|
-
"
|
|
142
|
+
"require": "./HeatMapChart/index.js",
|
|
143
|
+
"import": "./HeatMapChart/index.mjs",
|
|
144
|
+
"types": "./HeatMapChart/index.d.ts"
|
|
141
145
|
},
|
|
142
146
|
"./HorizontalBarChart": {
|
|
143
|
-
"
|
|
144
|
-
"import": "./
|
|
145
|
-
"
|
|
147
|
+
"require": "./HorizontalBarChart/index.js",
|
|
148
|
+
"import": "./HorizontalBarChart/index.mjs",
|
|
149
|
+
"types": "./HorizontalBarChart/index.d.ts"
|
|
146
150
|
},
|
|
147
151
|
"./KagiChart": {
|
|
148
|
-
"
|
|
149
|
-
"import": "./
|
|
150
|
-
"
|
|
152
|
+
"require": "./KagiChart/index.js",
|
|
153
|
+
"import": "./KagiChart/index.mjs",
|
|
154
|
+
"types": "./KagiChart/index.d.ts"
|
|
151
155
|
},
|
|
152
156
|
"./LineChart": {
|
|
153
|
-
"
|
|
154
|
-
"import": "./
|
|
155
|
-
"
|
|
157
|
+
"require": "./LineChart/index.js",
|
|
158
|
+
"import": "./LineChart/index.mjs",
|
|
159
|
+
"types": "./LineChart/index.d.ts"
|
|
156
160
|
},
|
|
157
161
|
"./LollipopChart": {
|
|
158
|
-
"
|
|
159
|
-
"import": "./
|
|
160
|
-
"
|
|
162
|
+
"require": "./LollipopChart/index.js",
|
|
163
|
+
"import": "./LollipopChart/index.mjs",
|
|
164
|
+
"types": "./LollipopChart/index.d.ts"
|
|
161
165
|
},
|
|
162
166
|
"./MailSent": {
|
|
163
|
-
"
|
|
164
|
-
"import": "./
|
|
165
|
-
"
|
|
167
|
+
"require": "./MailSent/index.js",
|
|
168
|
+
"import": "./MailSent/index.mjs",
|
|
169
|
+
"types": "./MailSent/index.d.ts"
|
|
166
170
|
},
|
|
167
171
|
"./Maintenance": {
|
|
168
|
-
"
|
|
169
|
-
"import": "./
|
|
170
|
-
"
|
|
172
|
+
"require": "./Maintenance/index.js",
|
|
173
|
+
"import": "./Maintenance/index.mjs",
|
|
174
|
+
"types": "./Maintenance/index.d.ts"
|
|
171
175
|
},
|
|
172
176
|
"./Nexttime": {
|
|
173
|
-
"
|
|
174
|
-
"import": "./
|
|
175
|
-
"
|
|
177
|
+
"require": "./Nexttime/index.js",
|
|
178
|
+
"import": "./Nexttime/index.mjs",
|
|
179
|
+
"types": "./Nexttime/index.d.ts"
|
|
176
180
|
},
|
|
177
181
|
"./NoPayment": {
|
|
178
|
-
"
|
|
179
|
-
"import": "./
|
|
180
|
-
"
|
|
182
|
+
"require": "./NoPayment/index.js",
|
|
183
|
+
"import": "./NoPayment/index.mjs",
|
|
184
|
+
"types": "./NoPayment/index.d.ts"
|
|
181
185
|
},
|
|
182
186
|
"./NothingFound": {
|
|
183
|
-
"
|
|
184
|
-
"import": "./
|
|
185
|
-
"
|
|
187
|
+
"require": "./NothingFound/index.js",
|
|
188
|
+
"import": "./NothingFound/index.mjs",
|
|
189
|
+
"types": "./NothingFound/index.d.ts"
|
|
186
190
|
},
|
|
187
191
|
"./OtherData": {
|
|
188
|
-
"
|
|
189
|
-
"import": "./
|
|
190
|
-
"
|
|
192
|
+
"require": "./OtherData/index.js",
|
|
193
|
+
"import": "./OtherData/index.mjs",
|
|
194
|
+
"types": "./OtherData/index.d.ts"
|
|
191
195
|
},
|
|
192
196
|
"./PageError": {
|
|
193
|
-
"
|
|
194
|
-
"import": "./
|
|
195
|
-
"
|
|
197
|
+
"require": "./PageError/index.js",
|
|
198
|
+
"import": "./PageError/index.mjs",
|
|
199
|
+
"types": "./PageError/index.d.ts"
|
|
196
200
|
},
|
|
197
201
|
"./PageNotFound": {
|
|
198
|
-
"
|
|
199
|
-
"import": "./
|
|
200
|
-
"
|
|
202
|
+
"require": "./PageNotFound/index.js",
|
|
203
|
+
"import": "./PageNotFound/index.mjs",
|
|
204
|
+
"types": "./PageNotFound/index.d.ts"
|
|
201
205
|
},
|
|
202
206
|
"./PieChart": {
|
|
203
|
-
"
|
|
204
|
-
"import": "./
|
|
205
|
-
"
|
|
207
|
+
"require": "./PieChart/index.js",
|
|
208
|
+
"import": "./PieChart/index.mjs",
|
|
209
|
+
"types": "./PieChart/index.d.ts"
|
|
206
210
|
},
|
|
207
211
|
"./Processing": {
|
|
208
|
-
"
|
|
209
|
-
"import": "./
|
|
210
|
-
"
|
|
212
|
+
"require": "./Processing/index.js",
|
|
213
|
+
"import": "./Processing/index.mjs",
|
|
214
|
+
"types": "./Processing/index.d.ts"
|
|
211
215
|
},
|
|
212
216
|
"./ProjectNotFound": {
|
|
213
|
-
"
|
|
214
|
-
"import": "./
|
|
215
|
-
"
|
|
217
|
+
"require": "./ProjectNotFound/index.js",
|
|
218
|
+
"import": "./ProjectNotFound/index.mjs",
|
|
219
|
+
"types": "./ProjectNotFound/index.d.ts"
|
|
216
220
|
},
|
|
217
221
|
"./RadarChart": {
|
|
218
|
-
"
|
|
219
|
-
"import": "./
|
|
220
|
-
"
|
|
222
|
+
"require": "./RadarChart/index.js",
|
|
223
|
+
"import": "./RadarChart/index.mjs",
|
|
224
|
+
"types": "./RadarChart/index.d.ts"
|
|
221
225
|
},
|
|
222
226
|
"./RadialTreeChart": {
|
|
223
|
-
"
|
|
224
|
-
"import": "./
|
|
225
|
-
"
|
|
227
|
+
"require": "./RadialTreeChart/index.js",
|
|
228
|
+
"import": "./RadialTreeChart/index.mjs",
|
|
229
|
+
"types": "./RadialTreeChart/index.d.ts"
|
|
226
230
|
},
|
|
227
231
|
"./SankeyChart": {
|
|
228
|
-
"
|
|
229
|
-
"import": "./
|
|
230
|
-
"
|
|
232
|
+
"require": "./SankeyChart/index.js",
|
|
233
|
+
"import": "./SankeyChart/index.mjs",
|
|
234
|
+
"types": "./SankeyChart/index.d.ts"
|
|
231
235
|
},
|
|
232
236
|
"./ScatterPlotChart": {
|
|
233
|
-
"
|
|
234
|
-
"import": "./
|
|
235
|
-
"
|
|
237
|
+
"require": "./ScatterPlotChart/index.js",
|
|
238
|
+
"import": "./ScatterPlotChart/index.mjs",
|
|
239
|
+
"types": "./ScatterPlotChart/index.d.ts"
|
|
236
240
|
},
|
|
237
241
|
"./StackedAreaChart": {
|
|
238
|
-
"
|
|
239
|
-
"import": "./
|
|
240
|
-
"
|
|
242
|
+
"require": "./StackedAreaChart/index.js",
|
|
243
|
+
"import": "./StackedAreaChart/index.mjs",
|
|
244
|
+
"types": "./StackedAreaChart/index.d.ts"
|
|
241
245
|
},
|
|
242
246
|
"./Suggestion": {
|
|
243
|
-
"
|
|
244
|
-
"import": "./
|
|
245
|
-
"
|
|
247
|
+
"require": "./Suggestion/index.js",
|
|
248
|
+
"import": "./Suggestion/index.mjs",
|
|
249
|
+
"types": "./Suggestion/index.d.ts"
|
|
246
250
|
},
|
|
247
251
|
"./Suggestions": {
|
|
248
|
-
"
|
|
249
|
-
"import": "./
|
|
250
|
-
"
|
|
252
|
+
"require": "./Suggestions/index.js",
|
|
253
|
+
"import": "./Suggestions/index.mjs",
|
|
254
|
+
"types": "./Suggestions/index.d.ts"
|
|
251
255
|
},
|
|
252
256
|
"./Table": {
|
|
253
|
-
"
|
|
254
|
-
"import": "./
|
|
255
|
-
"
|
|
257
|
+
"require": "./Table/index.js",
|
|
258
|
+
"import": "./Table/index.mjs",
|
|
259
|
+
"types": "./Table/index.d.ts"
|
|
256
260
|
},
|
|
257
261
|
"./TagCloud": {
|
|
258
|
-
"
|
|
259
|
-
"import": "./
|
|
260
|
-
"
|
|
262
|
+
"require": "./TagCloud/index.js",
|
|
263
|
+
"import": "./TagCloud/index.mjs",
|
|
264
|
+
"types": "./TagCloud/index.d.ts"
|
|
261
265
|
},
|
|
262
266
|
"./TextLinksEtc": {
|
|
263
|
-
"
|
|
264
|
-
"import": "./
|
|
265
|
-
"
|
|
267
|
+
"require": "./TextLinksEtc/index.js",
|
|
268
|
+
"import": "./TextLinksEtc/index.mjs",
|
|
269
|
+
"types": "./TextLinksEtc/index.d.ts"
|
|
266
270
|
},
|
|
267
271
|
"./Timeout": {
|
|
268
|
-
"
|
|
269
|
-
"import": "./
|
|
270
|
-
"
|
|
272
|
+
"require": "./Timeout/index.js",
|
|
273
|
+
"import": "./Timeout/index.mjs",
|
|
274
|
+
"types": "./Timeout/index.d.ts"
|
|
271
275
|
},
|
|
272
276
|
"./UnderConstruction": {
|
|
273
|
-
"
|
|
274
|
-
"import": "./
|
|
275
|
-
"
|
|
277
|
+
"require": "./UnderConstruction/index.js",
|
|
278
|
+
"import": "./UnderConstruction/index.mjs",
|
|
279
|
+
"types": "./UnderConstruction/index.d.ts"
|
|
276
280
|
},
|
|
277
281
|
"./VennChart": {
|
|
278
|
-
"
|
|
279
|
-
"import": "./
|
|
280
|
-
"
|
|
282
|
+
"require": "./VennChart/index.js",
|
|
283
|
+
"import": "./VennChart/index.mjs",
|
|
284
|
+
"types": "./VennChart/index.d.ts"
|
|
281
285
|
},
|
|
282
286
|
"./VerticalBarChart": {
|
|
283
|
-
"
|
|
284
|
-
"import": "./
|
|
285
|
-
"
|
|
287
|
+
"require": "./VerticalBarChart/index.js",
|
|
288
|
+
"import": "./VerticalBarChart/index.mjs",
|
|
289
|
+
"types": "./VerticalBarChart/index.d.ts"
|
|
286
290
|
},
|
|
287
291
|
"./Waiting": {
|
|
288
|
-
"
|
|
289
|
-
"import": "./
|
|
290
|
-
"
|
|
292
|
+
"require": "./Waiting/index.js",
|
|
293
|
+
"import": "./Waiting/index.mjs",
|
|
294
|
+
"types": "./Waiting/index.d.ts"
|
|
291
295
|
},
|
|
292
296
|
"./Warning": {
|
|
293
|
-
"
|
|
294
|
-
"import": "./
|
|
295
|
-
"
|
|
297
|
+
"require": "./Warning/index.js",
|
|
298
|
+
"import": "./Warning/index.mjs",
|
|
299
|
+
"types": "./Warning/index.d.ts"
|
|
296
300
|
}
|
|
297
301
|
},
|
|
298
302
|
"scripts": {
|
|
299
|
-
"build": "pnpm
|
|
303
|
+
"build": "pnpm clear && pnpm semcore-builder --source=js && pnpm run transform",
|
|
300
304
|
"transform": "tsm --require=../../.ci/tsm-filter-warnings.js transform.ts",
|
|
301
|
-
"
|
|
302
|
-
"upload-static": "gcs-upload
|
|
305
|
+
"clear": "tsm --require=../../.ci/tsm-filter-warnings.js clear.ts",
|
|
306
|
+
"upload-static": "gcs-upload svg/*.svg"
|
|
303
307
|
}
|
|
304
308
|
}
|
package/transform.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import path, { resolve as resolvePath } from 'path';
|
|
2
|
-
|
|
3
|
-
import ColorJSIO from 'colorjs.io';
|
|
4
|
-
import esbuild from 'esbuild';
|
|
5
1
|
import fs from 'fs-extra';
|
|
6
|
-
import {
|
|
2
|
+
import path, { resolve as resolvePath } from 'path';
|
|
7
3
|
import svgToJsx from 'svg-to-jsx';
|
|
4
|
+
import { Window } from 'happy-dom';
|
|
5
|
+
import esbuild from 'esbuild';
|
|
6
|
+
import ColorJSIO from 'colorjs.io';
|
|
8
7
|
const Color = ColorJSIO as any;
|
|
9
8
|
|
|
10
9
|
const illustrations = await fs.readdir('svg');
|
|
@@ -108,13 +107,13 @@ await Promise.all(
|
|
|
108
107
|
const component = `
|
|
109
108
|
import React from 'react';
|
|
110
109
|
import { createBaseComponent } from '@semcore/core';
|
|
111
|
-
import { Box } from '@semcore/
|
|
112
|
-
import { useColorResolver } from '@semcore/
|
|
110
|
+
import { Box } from '@semcore/flex-box';
|
|
111
|
+
import { useColorResolver } from '@semcore/utils/lib/use/useColorResolver';
|
|
113
112
|
|
|
114
113
|
const ${illustration} = ({${props.join(', ')}, ...props}, ref) => {
|
|
115
114
|
${prerenderLines.join('\n')}
|
|
116
115
|
return (
|
|
117
|
-
<Box
|
|
116
|
+
<Box
|
|
118
117
|
ref={ref}
|
|
119
118
|
width={width}
|
|
120
119
|
height={height}
|
|
@@ -133,7 +132,7 @@ export default createBaseComponent(${illustration})
|
|
|
133
132
|
`;
|
|
134
133
|
|
|
135
134
|
const typesDeclaration = `
|
|
136
|
-
import { BoxProps } from '@semcore/
|
|
135
|
+
import { BoxProps } from '@semcore/flex-box';
|
|
137
136
|
import { Intergalactic } from '@semcore/core';
|
|
138
137
|
|
|
139
138
|
type IllustrationProps = BoxProps & {
|
|
@@ -159,7 +158,7 @@ type IllustrationProps = BoxProps & {
|
|
|
159
158
|
height?: string | number;
|
|
160
159
|
}
|
|
161
160
|
declare const Illustration: Intergalactic.Component<'svg', IllustrationProps>;
|
|
162
|
-
export default Illustration;
|
|
161
|
+
export default Illustration;
|
|
163
162
|
`;
|
|
164
163
|
|
|
165
164
|
const { code: cjs } = await esbuild.transform(component, {
|
|
@@ -172,14 +171,14 @@ export default Illustration;
|
|
|
172
171
|
});
|
|
173
172
|
|
|
174
173
|
try {
|
|
175
|
-
await fs.access(
|
|
174
|
+
await fs.access(illustration);
|
|
176
175
|
} catch {
|
|
177
|
-
await fs.mkdir(
|
|
176
|
+
await fs.mkdir(illustration);
|
|
178
177
|
}
|
|
179
178
|
|
|
180
|
-
await fs.writeFile(resolvePath(
|
|
181
|
-
await fs.writeFile(resolvePath(
|
|
182
|
-
await fs.writeFile(resolvePath(
|
|
179
|
+
await fs.writeFile(resolvePath(illustration, 'index.js'), cjs);
|
|
180
|
+
await fs.writeFile(resolvePath(illustration, 'index.mjs'), esm);
|
|
181
|
+
await fs.writeFile(resolvePath(illustration, 'index.d.ts'), typesDeclaration);
|
|
183
182
|
}),
|
|
184
183
|
);
|
|
185
184
|
|
|
@@ -190,9 +189,9 @@ async function patchExports(illustrations: string[]) {
|
|
|
190
189
|
|
|
191
190
|
const exports: Record<string, any> = {
|
|
192
191
|
'.': {
|
|
193
|
-
types: './lib/types/index.d.ts',
|
|
194
|
-
import: './lib/esm/index.mjs',
|
|
195
192
|
require: './lib/cjs/index.js',
|
|
193
|
+
import: './lib/es6/index.js',
|
|
194
|
+
types: './lib/types/index.d.ts',
|
|
196
195
|
},
|
|
197
196
|
};
|
|
198
197
|
|
|
@@ -200,9 +199,9 @@ async function patchExports(illustrations: string[]) {
|
|
|
200
199
|
const name = item.replace('.svg', '');
|
|
201
200
|
|
|
202
201
|
exports[`./${name}`] = {
|
|
203
|
-
|
|
204
|
-
import:
|
|
205
|
-
|
|
202
|
+
require: `./${name}/index.js`,
|
|
203
|
+
import: `./${name}/index.mjs`,
|
|
204
|
+
types: `./${name}/index.d.ts`,
|
|
206
205
|
};
|
|
207
206
|
});
|
|
208
207
|
|
|
@@ -210,7 +209,7 @@ async function patchExports(illustrations: string[]) {
|
|
|
210
209
|
|
|
211
210
|
await fs.writeJSON(packageJsonPath, packageJson, { spaces: 2 });
|
|
212
211
|
|
|
213
|
-
//
|
|
212
|
+
// biome-ignore lint/suspicious/noConsoleLog:
|
|
214
213
|
console.log('Patched exports in package.json.');
|
|
215
214
|
}
|
|
216
215
|
|
package/types/svg-to-jsx.d.ts
CHANGED