@abyss-project/commons-front-core 2.0.0 → 2.0.2
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/README.md +30 -30
- package/declaration.d.ts +13 -13
- package/dist/components/Chips/ApplicationSentinelTypeChip/ApplicationSentinelTypeChip.component.d.ts +3 -5
- package/dist/components/Chips/ApplicationWebhookTypeChip/ApplicationWebhookTypeChip.component.d.ts +3 -5
- package/dist/components/Chips/LogTypeChip/LogTypeChip.component.d.ts +3 -5
- package/dist/components/Chips/ProjectStatusChip/ProjectStatusChip.component.d.ts +3 -5
- package/dist/components/Chips/WebhookResponseCodeChip/WebhookResponseCodeChip.component.d.ts +3 -6
- package/dist/components/Chips/WebhookTypeChip/WebhookTypeChip.component.d.ts +3 -5
- package/dist/components/Inputs/AbyssDatePicker/AbyssDatePicker.component.d.ts +3 -4
- package/dist/components/Inputs/AbyssDateTimePicker/AbyssDateTimePicker.component.d.ts +3 -4
- package/dist/components/Spotlight/ProjectCard/ProjectCard.component.d.ts +2 -4
- package/dist/components/Spotlight/ProjectLinkSelector/ProjectLinkSelector.component.d.ts +2 -4
- package/dist/components/Support/SupportCategoryChip.component.d.ts +0 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +3 -1548
- package/dist/{index-CoY-Eqah.js → index-AfPILbiz.js} +2 -2
- package/dist/{index-Db-3tPxk.js → index-B7y4RhPo.js} +2 -2
- package/dist/{index-B3gKqf-p.js → index-BGWToGw7.js} +3 -3
- package/dist/{index-a9_oOlg4.js → index-BewTTU30.js} +31010 -29414
- package/dist/{index-DON7Q_3s.js → index-CCn-sMqt.js} +2 -2
- package/dist/{index-ldQTy6Xb.js → index-CIZfTmzg.js} +2 -2
- package/dist/{index-BCVRYGLI.js → index-CJ2IUHYl.js} +4 -4
- package/dist/{index-VEVfBSFw.js → index-CQlSFcvw.js} +2 -2
- package/dist/{index-DZG8q-Mp.js → index-CwF5H7Ob.js} +3 -3
- package/dist/{index-DpUTQu7B.js → index-CzYQbF5K.js} +2 -2
- package/dist/{index-Cil-O_44.js → index-D2Nmwb2S.js} +2 -2
- package/dist/{index-CL4h9Xoy.js → index-D4yU10Kk.js} +4 -4
- package/dist/{index-CSpwXL74.js → index-DP0NlFvb.js} +1 -1
- package/dist/{index-BiREoCYc.js → index-DYMZ6gxP.js} +2 -2
- package/dist/{index-BcInTypv.js → index-Di8-ci04.js} +4 -4
- package/dist/{index-QwHRQNwT.js → index-DwVkf4ef.js} +2 -2
- package/dist/{index-CTVUhat-.js → index-OhVD4ih9.js} +2 -2
- package/dist/{index--KPqynn_.js → index-RwGG-Rkd.js} +2 -2
- package/dist/{index-Ca_vS7os.js → index-by-wazLm.js} +2 -2
- package/dist/{index-Df71mOHZ.js → index-eKUyfHjO.js} +3 -3
- package/dist/{index-BdWnB1rS.js → index-h44l9OLZ.js} +2 -2
- package/dist/{index-AykyIzzG.js → index-uIaFCoT2.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/utils/color.utils.d.ts +0 -1
- package/package.json +138 -143
- package/tsconfig.json +35 -35
- package/vite.config.ts +83 -75
- package/vitest.config.ts +14 -14
- package/.claude/settings.local.json +0 -7
package/vite.config.ts
CHANGED
|
@@ -1,75 +1,83 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import path, { resolve } from 'path'
|
|
4
|
-
import dts from 'vite-plugin-dts';
|
|
5
|
-
|
|
6
|
-
const isWatch = process.argv.includes('--watch');
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
plugins: [
|
|
10
|
-
react(),
|
|
11
|
-
!isWatch && dts({
|
|
12
|
-
skipDiagnostics: true, // Skip TypeScript diagnostics to avoid type conflicts
|
|
13
|
-
staticImport: true,
|
|
14
|
-
insertTypesEntry: true,
|
|
15
|
-
}),
|
|
16
|
-
].filter(Boolean),
|
|
17
|
-
resolve: {
|
|
18
|
-
alias: {
|
|
19
|
-
"@components-spotlight/*": path.resolve(__dirname, './src/components/Spotlight'),
|
|
20
|
-
"@components-avatars/*": path.resolve(__dirname, './src/components/Avatars'),
|
|
21
|
-
"@components-chips/*": path.resolve(__dirname, './src/components/Chips'),
|
|
22
|
-
"@components-utils/*": path.resolve(__dirname, './src/components/Utils'),
|
|
23
|
-
"@components-inputs/*": path.resolve(__dirname, './src/components/Inputs'),
|
|
24
|
-
"@components-modals/*": path.resolve(__dirname, './src/components/Modals'),
|
|
25
|
-
'@components': path.resolve(__dirname, './src/components'),
|
|
26
|
-
'@assets': path.resolve(__dirname, './src/assets'),
|
|
27
|
-
'@utils': path.resolve(__dirname, './src/utils'),
|
|
28
|
-
'@types': path.resolve(__dirname, './src/types'),
|
|
29
|
-
'@hooks': path.resolve(__dirname, './src/hooks'),
|
|
30
|
-
'@': path.resolve(__dirname, './src'),
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
build: {
|
|
34
|
-
lib: {
|
|
35
|
-
// Multiple entries: the full barrel (`index`) plus a browser-safe,
|
|
36
|
-
// tree-shaken `cookie-consent` entry. The latter lets webpack consumers
|
|
37
|
-
// (e.g. the Next.js landing) pull ONLY the cookie-consent UI without
|
|
38
|
-
// dragging in react-toastify (React-17 `render`), pdf.js, or the server
|
|
39
|
-
// monitor SDK that the full barrel transitively includes.
|
|
40
|
-
entry: {
|
|
41
|
-
index: resolve(__dirname, 'src/index.ts'),
|
|
42
|
-
'cookie-consent': resolve(__dirname, 'src/components/CookieConsent/index.ts'),
|
|
43
|
-
},
|
|
44
|
-
formats: ['es'],
|
|
45
|
-
fileName: (_format, entryName) => `${entryName}.js`,
|
|
46
|
-
},
|
|
47
|
-
rollupOptions: {
|
|
48
|
-
// Externalize peer dependencies. Match exact name OR sub-path imports
|
|
49
|
-
// (e.g. 'react/jsx-runtime') — never match by raw prefix, otherwise
|
|
50
|
-
// 'react' silently externalizes 'react-is', 'react-fast-compare', etc.
|
|
51
|
-
external: (id) => {
|
|
52
|
-
const exactNames = [
|
|
53
|
-
'react', 'react-dom', 'react-intl', 'react-router-dom',
|
|
54
|
-
'pdfjs-dist', 'pdf-lib',
|
|
55
|
-
'osx-temperature-sensor', 'fs', 'path', 'os',
|
|
56
|
-
];
|
|
57
|
-
if (exactNames.includes(id)) return true;
|
|
58
|
-
if (exactNames.some((name) => id.startsWith(name + '/'))) return true;
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import path, { resolve } from 'path'
|
|
4
|
+
import dts from 'vite-plugin-dts';
|
|
5
|
+
|
|
6
|
+
const isWatch = process.argv.includes('--watch');
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
plugins: [
|
|
10
|
+
react(),
|
|
11
|
+
!isWatch && dts({
|
|
12
|
+
skipDiagnostics: true, // Skip TypeScript diagnostics to avoid type conflicts
|
|
13
|
+
staticImport: true,
|
|
14
|
+
insertTypesEntry: true,
|
|
15
|
+
}),
|
|
16
|
+
].filter(Boolean),
|
|
17
|
+
resolve: {
|
|
18
|
+
alias: {
|
|
19
|
+
"@components-spotlight/*": path.resolve(__dirname, './src/components/Spotlight'),
|
|
20
|
+
"@components-avatars/*": path.resolve(__dirname, './src/components/Avatars'),
|
|
21
|
+
"@components-chips/*": path.resolve(__dirname, './src/components/Chips'),
|
|
22
|
+
"@components-utils/*": path.resolve(__dirname, './src/components/Utils'),
|
|
23
|
+
"@components-inputs/*": path.resolve(__dirname, './src/components/Inputs'),
|
|
24
|
+
"@components-modals/*": path.resolve(__dirname, './src/components/Modals'),
|
|
25
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
26
|
+
'@assets': path.resolve(__dirname, './src/assets'),
|
|
27
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
28
|
+
'@types': path.resolve(__dirname, './src/types'),
|
|
29
|
+
'@hooks': path.resolve(__dirname, './src/hooks'),
|
|
30
|
+
'@': path.resolve(__dirname, './src'),
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
build: {
|
|
34
|
+
lib: {
|
|
35
|
+
// Multiple entries: the full barrel (`index`) plus a browser-safe,
|
|
36
|
+
// tree-shaken `cookie-consent` entry. The latter lets webpack consumers
|
|
37
|
+
// (e.g. the Next.js landing) pull ONLY the cookie-consent UI without
|
|
38
|
+
// dragging in react-toastify (React-17 `render`), pdf.js, or the server
|
|
39
|
+
// monitor SDK that the full barrel transitively includes.
|
|
40
|
+
entry: {
|
|
41
|
+
index: resolve(__dirname, 'src/index.ts'),
|
|
42
|
+
'cookie-consent': resolve(__dirname, 'src/components/CookieConsent/index.ts'),
|
|
43
|
+
},
|
|
44
|
+
formats: ['es'],
|
|
45
|
+
fileName: (_format, entryName) => `${entryName}.js`,
|
|
46
|
+
},
|
|
47
|
+
rollupOptions: {
|
|
48
|
+
// Externalize peer dependencies. Match exact name OR sub-path imports
|
|
49
|
+
// (e.g. 'react/jsx-runtime') — never match by raw prefix, otherwise
|
|
50
|
+
// 'react' silently externalizes 'react-is', 'react-fast-compare', etc.
|
|
51
|
+
external: (id) => {
|
|
52
|
+
const exactNames = [
|
|
53
|
+
'react', 'react-dom', 'react-intl', 'react-router-dom',
|
|
54
|
+
'pdfjs-dist', 'pdf-lib',
|
|
55
|
+
'osx-temperature-sensor', 'fs', 'path', 'os',
|
|
56
|
+
];
|
|
57
|
+
if (exactNames.includes(id)) return true;
|
|
58
|
+
if (exactNames.some((name) => id.startsWith(name + '/'))) return true;
|
|
59
|
+
// `@mui/x-date-pickers/AdapterDateFns` is a DIRECTORY sub-path with no
|
|
60
|
+
// `./AdapterDateFns` entry in x-date-pickers v6's `exports` map, so an
|
|
61
|
+
// externalized bare import of it is an unresolvable directory import
|
|
62
|
+
// under Node ESM (ERR_UNSUPPORTED_DIR_IMPORT — breaks vitest in every
|
|
63
|
+
// consumer). Bundle just that adapter so the dist has no such import.
|
|
64
|
+
// (Icon sub-paths like `@mui/icons-material/AddRounded` are `.js`
|
|
65
|
+
// FILES and resolve fine, so they stay externalized below.)
|
|
66
|
+
if (id === '@mui/x-date-pickers/AdapterDateFns') return false;
|
|
67
|
+
// Scoped-package prefixes (these always end with '/')
|
|
68
|
+
const scopedPrefixes = ['@mui/', '@emotion/', '@abyss-project/', '@tanstack/'];
|
|
69
|
+
return scopedPrefixes.some((prefix) => id.startsWith(prefix));
|
|
70
|
+
},
|
|
71
|
+
output: {
|
|
72
|
+
globals: {
|
|
73
|
+
'react': 'React',
|
|
74
|
+
'react-dom': 'ReactDOM',
|
|
75
|
+
'react-router-dom': 'ReactRouterDOM',
|
|
76
|
+
'@mui/material': 'MaterialUI',
|
|
77
|
+
'@abyss-project/main': 'AbyssMain',
|
|
78
|
+
'react-intl': 'ReactIntl'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
})
|
package/vitest.config.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
2
|
-
import viteConfig from './vite.config';
|
|
3
|
-
|
|
4
|
-
export default mergeConfig(
|
|
5
|
-
viteConfig,
|
|
6
|
-
defineConfig({
|
|
7
|
-
test: {
|
|
8
|
-
environment: 'node',
|
|
9
|
-
include: ['src/**/*.spec.ts'],
|
|
10
|
-
globals: false,
|
|
11
|
-
passWithNoTests: true,
|
|
12
|
-
},
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
2
|
+
import viteConfig from './vite.config';
|
|
3
|
+
|
|
4
|
+
export default mergeConfig(
|
|
5
|
+
viteConfig,
|
|
6
|
+
defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
environment: 'node',
|
|
9
|
+
include: ['src/**/*.spec.ts'],
|
|
10
|
+
globals: false,
|
|
11
|
+
passWithNoTests: true,
|
|
12
|
+
},
|
|
13
|
+
}),
|
|
14
|
+
);
|