forstok-ui-lib 7.7.0 → 8.0.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/dist/index.js +4767 -1232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4767 -1232
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/rollup.config.js +17 -41
- package/src/components/text/index.tsx +2 -2
- package/tsconfig.json +5 -3
package/package.json
CHANGED
package/rollup.config.js
CHANGED
|
@@ -2,17 +2,19 @@ import PeerDepsExternalPlugin from 'rollup-plugin-peer-deps-external';
|
|
|
2
2
|
import resolve from '@rollup/plugin-node-resolve';
|
|
3
3
|
import commonjs from '@rollup/plugin-commonjs';
|
|
4
4
|
import terser from '@rollup/plugin-terser';
|
|
5
|
-
import dts from 'rollup-plugin-dts';
|
|
5
|
+
import { default as dts } from 'rollup-plugin-dts';
|
|
6
6
|
import typescript from '@rollup/plugin-typescript';
|
|
7
7
|
import url from '@rollup/plugin-url';
|
|
8
8
|
import svgr from '@svgr/rollup';
|
|
9
9
|
import image from '@rollup/plugin-image';
|
|
10
10
|
import css from 'rollup-plugin-import-css';
|
|
11
11
|
import createStyledComponentsTransformer from 'typescript-plugin-styled-components';
|
|
12
|
-
|
|
13
12
|
const packageJson = require('./package.json');
|
|
14
13
|
|
|
15
14
|
export default [
|
|
15
|
+
// -----------------------------
|
|
16
|
+
// 1️⃣ JS Build (CJS + ESM)
|
|
17
|
+
// -----------------------------
|
|
16
18
|
{
|
|
17
19
|
input: 'src/index.ts',
|
|
18
20
|
output: [
|
|
@@ -20,18 +22,7 @@ export default [
|
|
|
20
22
|
{ file: packageJson.module, format: 'esm', sourcemap: true, interop: 'auto' },
|
|
21
23
|
],
|
|
22
24
|
plugins: [
|
|
23
|
-
PeerDepsExternalPlugin(),
|
|
24
|
-
commonjs({
|
|
25
|
-
include: /node_modules/,
|
|
26
|
-
requireReturnsDefault: 'auto',
|
|
27
|
-
dynamicRequireTargets: []
|
|
28
|
-
}),
|
|
29
|
-
resolve({
|
|
30
|
-
browser: true,
|
|
31
|
-
extensions: ['.mjs', '.js', '.json', '.ts', '.tsx'],
|
|
32
|
-
preferBuiltins: false,
|
|
33
|
-
mainFields: ['module', 'main', 'browser'],
|
|
34
|
-
}),
|
|
25
|
+
PeerDepsExternalPlugin(),
|
|
35
26
|
typescript({
|
|
36
27
|
tsconfig: './tsconfig.json',
|
|
37
28
|
transformers: [
|
|
@@ -47,15 +38,13 @@ export default [
|
|
|
47
38
|
}),
|
|
48
39
|
],
|
|
49
40
|
}),
|
|
50
|
-
|
|
41
|
+
commonjs({ include: /node_modules/, requireReturnsDefault: 'auto', dynamicRequireTargets: [] }),
|
|
42
|
+
resolve({ browser: true, extensions: ['.mjs', '.js', '.json', '.ts', '.tsx'], preferBuiltins: false }),
|
|
51
43
|
css({ minify: true, modules: true, inject: true }),
|
|
52
44
|
url(),
|
|
53
45
|
svgr({ icon: true }),
|
|
54
|
-
image({
|
|
55
|
-
|
|
56
|
-
extensions: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
57
|
-
exclude: 'node_modules/**',
|
|
58
|
-
}),
|
|
46
|
+
image({ output: `${packageJson.path}/images`, extensions: /\.(png|jpg|jpeg|gif|svg)$/ }),
|
|
47
|
+
terser(),
|
|
59
48
|
],
|
|
60
49
|
external: (id) =>
|
|
61
50
|
[
|
|
@@ -74,31 +63,18 @@ export default [
|
|
|
74
63
|
'frimousse',
|
|
75
64
|
].some((pkg) => id === pkg || id.startsWith(pkg + '/')),
|
|
76
65
|
onwarn: (warning, warn) => {
|
|
77
|
-
|
|
78
|
-
if (warning.code === '
|
|
79
|
-
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
warn(warning); // show other warnings
|
|
66
|
+
if (warning.code === 'CIRCULAR_DEPENDENCY') return;
|
|
67
|
+
if (warning.code === 'EVAL' || /the request of a dependency is an expression/.test(warning.message)) return;
|
|
68
|
+
warn(warning);
|
|
83
69
|
},
|
|
84
70
|
},
|
|
71
|
+
|
|
72
|
+
// -----------------------------
|
|
73
|
+
// 2️⃣ DTS Build (ONLY types)
|
|
74
|
+
// -----------------------------
|
|
85
75
|
{
|
|
86
76
|
input: 'src/index.ts',
|
|
87
|
-
output:
|
|
88
|
-
{
|
|
89
|
-
file: packageJson.main,
|
|
90
|
-
format: 'cjs',
|
|
91
|
-
sourcemap: true,
|
|
92
|
-
interop: 'auto',
|
|
93
|
-
inlineDynamicImports: true,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
file: packageJson.module,
|
|
97
|
-
format: 'esm',
|
|
98
|
-
sourcemap: true,
|
|
99
|
-
interop: 'auto',
|
|
100
|
-
}
|
|
101
|
-
],
|
|
77
|
+
output: { file: packageJson.types || 'dist/index.d.ts', format: 'es' },
|
|
102
78
|
plugins: [dts.default()],
|
|
103
79
|
external: [/\.css$/],
|
|
104
80
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { TextContainer } from './styles';
|
|
3
3
|
|
|
4
4
|
type TText = HTMLAttributes<HTMLSpanElement> & {
|
|
@@ -9,7 +9,7 @@ type TText = HTMLAttributes<HTMLSpanElement> & {
|
|
|
9
9
|
|
|
10
10
|
const TextComponent = ({ children, $color, $elipsis=true, ...props }:TText) => {
|
|
11
11
|
return (
|
|
12
|
-
<TextContainer $elipsis={$elipsis
|
|
12
|
+
<TextContainer $elipsis={$elipsis} $color={$color} {...props}>
|
|
13
13
|
{children}
|
|
14
14
|
</TextContainer>
|
|
15
15
|
);
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"noEmit": false,
|
|
4
|
+
"allowJs": false,
|
|
5
|
+
"isolatedModules": false,
|
|
6
|
+
"declaration": false,
|
|
7
|
+
"emitDeclarationOnly": false,
|
|
3
8
|
"target": "ES2017",
|
|
4
9
|
"lib": [
|
|
5
10
|
"dom",
|
|
@@ -7,17 +12,14 @@
|
|
|
7
12
|
"ESNext"
|
|
8
13
|
],
|
|
9
14
|
"sourceMap": true,
|
|
10
|
-
"allowJs": true,
|
|
11
15
|
"skipLibCheck": true,
|
|
12
16
|
"esModuleInterop": true,
|
|
13
17
|
"allowSyntheticDefaultImports": true,
|
|
14
18
|
"strict": true,
|
|
15
19
|
"forceConsistentCasingInFileNames": true,
|
|
16
20
|
"module": "esnext",
|
|
17
|
-
"noEmit": true,
|
|
18
21
|
"moduleResolution": "node",
|
|
19
22
|
"resolveJsonModule": true,
|
|
20
|
-
"isolatedModules": true,
|
|
21
23
|
"jsx": "react-jsx"
|
|
22
24
|
},
|
|
23
25
|
"include": [
|