@semcore/illustration 16.0.0-prerelease.21 → 16.0.0-prerelease.23
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/lib/esm/index.mjs +13 -0
- package/package.json +5 -5
- package/vite.config.ts +24 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var version = "16.0.0";
|
|
2
|
+
var formatName = function formatName2(name) {
|
|
3
|
+
return name.split(/_|-/).map(function(el) {
|
|
4
|
+
return el[0].toUpperCase() + el.slice(1);
|
|
5
|
+
}).join("");
|
|
6
|
+
};
|
|
7
|
+
var getIllustrationPath = function getIllustrationPath2(name) {
|
|
8
|
+
var formattedName = formatName(name);
|
|
9
|
+
return "https://static.semrush.com/intergalactic/illustrations/".concat(version, "/").concat(formattedName, ".svg");
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
getIllustrationPath
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/illustration",
|
|
3
3
|
"description": "Semrush Illustration Component",
|
|
4
|
-
"version": "16.0.0-prerelease.
|
|
4
|
+
"version": "16.0.0-prerelease.23",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
|
-
"module": "lib/
|
|
6
|
+
"module": "lib/esm/index.mjs",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"colorjs.io": "0.4.3"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@semcore/base-components": "^16.0.0-prerelease.
|
|
16
|
+
"@semcore/base-components": "^16.0.0-prerelease.23"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
34
|
"require": "./lib/cjs/index.js",
|
|
35
|
-
"import": "./lib/
|
|
35
|
+
"import": "./lib/esm/index.mjs",
|
|
36
36
|
"types": "./lib/types/index.d.ts"
|
|
37
37
|
},
|
|
38
38
|
"./AccessDenied": {
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
299
|
"scripts": {
|
|
300
|
-
"build": "pnpm clear && pnpm semcore-builder --source=js && pnpm run transform",
|
|
300
|
+
"build": "pnpm clear && pnpm semcore-builder --source=js && pnpm run transform && pnpm vite build",
|
|
301
301
|
"transform": "tsm --require=../../.ci/tsm-filter-warnings.js transform.ts",
|
|
302
302
|
"clear": "tsm --require=../../.ci/tsm-filter-warnings.js clear.ts",
|
|
303
303
|
"upload-static": "gcs-upload svg/*.svg"
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vite';
|
|
2
|
+
|
|
3
|
+
import viteConfig from '../../commonVite.config';
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: './src/index.ts',
|
|
11
|
+
},
|
|
12
|
+
rollupOptions: {
|
|
13
|
+
external: [
|
|
14
|
+
'react',
|
|
15
|
+
'react-dom',
|
|
16
|
+
'react/jsx-runtime',
|
|
17
|
+
/@babel\/runtime\/*/,
|
|
18
|
+
/@semcore\/*/,
|
|
19
|
+
'colorjs.io',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
);
|