@abyss-project/commons-front-core 16.2.0 → 17.1.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/CHANGELOG.md +15 -0
- package/catalog/pages/Toast.tsx +5 -5
- package/dist/components/layers/Toast/Toast.d.ts +3 -2
- package/dist/components/layers/Toast/toast-store.d.ts +11 -8
- package/dist/design-system-toasts.spec.d.ts +1 -0
- package/dist/{design-theme-B1PgRGnU.js → design-theme-GNwBGEo_.js} +7098 -7010
- package/dist/{editors-NTlXfUf3.js → editors-npV-IKED.js} +2263 -2242
- package/dist/editors.js +1 -1
- package/dist/{index-rHl9uQvG.js → index-4ZuDYpO-.js} +3 -3
- package/dist/{index-BIQNTPCh.js → index-B0uq2NNW.js} +2 -2
- package/dist/{index-DDsn4UyZ.js → index-B7TpUAN3.js} +2 -2
- package/dist/{index-BH6GeV66.js → index-BGhYJfRf.js} +2 -2
- package/dist/{index-BKbESj9f.js → index-BP3DenBU.js} +2 -2
- package/dist/{index-D-75Bwy8.js → index-BUwk65yN.js} +2 -2
- package/dist/{index-Dr3sF4q3.js → index-BtesgJeO.js} +2 -2
- package/dist/{index-DmtNuZcU.js → index-C1_3Bq6c.js} +2 -2
- package/dist/{index-VntY82At.js → index-C52yVIrz.js} +2 -2
- package/dist/{index-C-pVBVRm.js → index-C7tcg6JR.js} +3 -3
- package/dist/{index-BHFYCrDl.js → index-C8xWjIs7.js} +4 -4
- package/dist/{index-MiIytQo8.js → index-CAyUKp6J.js} +3 -3
- package/dist/{index-DGKfXQr5.js → index-CCVhl3JV.js} +2 -2
- package/dist/{index-DTfxCpd4.js → index-CboA-nSE.js} +4 -4
- package/dist/{index-DXSxiqo1.js → index-Cp4UAUdF.js} +2 -2
- package/dist/{index-BEm81V4i.js → index-CqQ3PZ3K.js} +3 -3
- package/dist/{index-7ovesCC_.js → index-CtRut8xk.js} +2 -2
- package/dist/{index-DloK9ass.js → index-Dd5hKcko.js} +2 -2
- package/dist/{index-Bt3EOSkY.js → index-DnFO_WNV.js} +4 -4
- package/dist/{index-DeB1ImKD.js → index-bmHi0NgU.js} +2 -2
- package/dist/{index-CHsTUwr0.js → index-sK15Uy0d.js} +1 -1
- package/dist/index.js +8803 -8635
- package/dist/legacy/components/Spotlight/ProjectLinkSelector/ProjectLinkSelector.component.spec.d.ts +1 -0
- package/dist/legacy/components/Utils/index.d.ts +0 -1
- package/dist/legacy.js +2561 -2697
- package/package.json +4 -6
- package/scripts/check-auth-entry-isolation.cjs +1 -2
- package/vite.config.ts +3 -3
- package/dist/legacy/components/Utils/Toast/AbyssToast.component.d.ts +0 -9
- package/dist/legacy/components/Utils/Toast/index.d.ts +0 -1
- package/scripts/check-external-react-toastify.cjs +0 -104
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/commons-front-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"description": "Front Core package of AbyssProject",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -86,9 +86,8 @@
|
|
|
86
86
|
"react-intl": "^6.2.5",
|
|
87
87
|
"react-is": "^18.0.0 || ^19.0.0",
|
|
88
88
|
"react-router-dom": "^6.15.0",
|
|
89
|
-
"react-toastify": "^8.0.2 || ^10.0.0",
|
|
90
89
|
"zustand": "^5.0.0",
|
|
91
|
-
"@abyss-project/main": "
|
|
90
|
+
"@abyss-project/main": "31.2.1"
|
|
92
91
|
},
|
|
93
92
|
"peerDependenciesMeta": {
|
|
94
93
|
"@abyss-project/capacitor-auth": {
|
|
@@ -140,7 +139,7 @@
|
|
|
140
139
|
"use-debounce": "^10.0.5",
|
|
141
140
|
"uuid": "^9.0.0",
|
|
142
141
|
"yup": "^0.32.11",
|
|
143
|
-
"@abyss-project/main": "
|
|
142
|
+
"@abyss-project/main": "31.2.1"
|
|
144
143
|
},
|
|
145
144
|
"devDependencies": {
|
|
146
145
|
"@abyss-project/cloud": "^2.4.0",
|
|
@@ -172,7 +171,6 @@
|
|
|
172
171
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
173
172
|
"jsdom": "^29.1.1",
|
|
174
173
|
"prettier": "^2.5.1",
|
|
175
|
-
"react-toastify": "^8.0.2",
|
|
176
174
|
"tsc-watch": "^4.6.2",
|
|
177
175
|
"typescript": "5.9.3",
|
|
178
176
|
"vite": "^6.3.5",
|
|
@@ -184,7 +182,7 @@
|
|
|
184
182
|
"lint": "eslint \"{src,apps,libs,test,core,catalog}/**/*.{ts,tsx}\" --fix",
|
|
185
183
|
"lint:check": "eslint \"{src,apps,libs,test,core,catalog}/**/*.{ts,tsx}\" --max-warnings 0",
|
|
186
184
|
"tsc": "tsc --noEmit && tsc --noEmit -p catalog/tsconfig.json",
|
|
187
|
-
"build": "vite build && node scripts/check-auth-entry-isolation.cjs
|
|
185
|
+
"build": "vite build && node scripts/check-auth-entry-isolation.cjs",
|
|
188
186
|
"dev": "vite build --watch",
|
|
189
187
|
"test": "vitest run --config vitest.config.ts",
|
|
190
188
|
"test:watch": "vitest --config vitest.config.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* The `@abyss-project/commons-front-core/auth` entry exists so that an app's auth bootstrap
|
|
9
9
|
* module (and every test that re-imports it, e.g. after `vi.resetModules()`) never pays for the
|
|
10
10
|
* screens (`AuthFlow`, `SecuritySettings`, `ReauthDialog`…) and their dependencies (MUI, pdf.js,
|
|
11
|
-
* milkdown, nivo
|
|
11
|
+
* milkdown, nivo…) — the whole reason this entry exists alongside the full
|
|
12
12
|
* barrel, same as `cookie-consent` and `auth-native` already do for their own concerns.
|
|
13
13
|
*
|
|
14
14
|
* This walks `dist/auth.js` and every chunk it statically imports by a relative path (a bare
|
|
@@ -45,7 +45,6 @@ const FORBIDDEN_MARKERS = [
|
|
|
45
45
|
'@milkdown/',
|
|
46
46
|
'pdfjs-dist',
|
|
47
47
|
'pdf-lib',
|
|
48
|
-
'react-toastify',
|
|
49
48
|
'react-dropzone',
|
|
50
49
|
'qrcode',
|
|
51
50
|
'@dnd-kit/',
|
package/vite.config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export default defineConfig({
|
|
|
57
57
|
// Multiple entries: the full barrel (`index`) plus a browser-safe,
|
|
58
58
|
// tree-shaken `cookie-consent` entry. The latter lets webpack consumers
|
|
59
59
|
// (e.g. the Next.js landing) pull ONLY the cookie-consent UI without
|
|
60
|
-
// dragging in
|
|
61
|
-
//
|
|
60
|
+
// dragging in pdf.js or the server monitor SDK that the full barrel
|
|
61
|
+
// transitively includes.
|
|
62
62
|
entry: {
|
|
63
63
|
index: resolve(__dirname, 'src/index.ts'),
|
|
64
64
|
'cookie-consent': resolve(__dirname, 'src/components/business/CookieConsent/index.ts'),
|
|
@@ -93,7 +93,7 @@ export default defineConfig({
|
|
|
93
93
|
// 'react' silently externalizes 'react-is', 'react-fast-compare', etc.
|
|
94
94
|
external: (id) => {
|
|
95
95
|
const exactNames = [
|
|
96
|
-
'react', 'react-dom', 'react-intl', 'react-router-dom',
|
|
96
|
+
'react', 'react-dom', 'react-intl', 'react-router-dom',
|
|
97
97
|
'pdfjs-dist', 'pdf-lib',
|
|
98
98
|
// Monaco: one copy per app, resolved by the consumer (like pdf.js).
|
|
99
99
|
'@monaco-editor/react',
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* AbyssToast — Injects theme-aware CSS overrides for react-toastify.
|
|
4
|
-
* Place this component inside your ThemeProvider, next to <ToastContainer />.
|
|
5
|
-
*
|
|
6
|
-
* Adapts to light/dark mode automatically via MUI theme tokens.
|
|
7
|
-
*/
|
|
8
|
-
declare const AbyssToast: React.FC;
|
|
9
|
-
export default AbyssToast;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as AbyssToast } from './AbyssToast.component';
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* eslint-disable no-console */
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* check-external-react-toastify.cjs - build guard for the `react-toastify` peer dependency (#766).
|
|
7
|
-
*
|
|
8
|
-
* `react-toastify` is a peerDependency of the package and is declared external in `vite.config.ts`.
|
|
9
|
-
* Bundled instead, the toasts emitted from the core (the quota helpers, the legacy DropZone,
|
|
10
|
-
* CloudImport, ProjectLinkSelector and SupportMessageThread) would go to a private copy of the
|
|
11
|
-
* library that no `ToastContainer` listens to, and be lost silently.
|
|
12
|
-
*
|
|
13
|
-
* This walks `dist/index.js` and `dist/legacy.js` plus every chunk they import by a relative path,
|
|
14
|
-
* and fails if, for either entry:
|
|
15
|
-
* - no reachable file imports the bare specifier "react-toastify";
|
|
16
|
-
* - any reachable file carries the internal code of the library (markers below).
|
|
17
|
-
*
|
|
18
|
-
* Exit 0: external. Exit 1: bundled or not imported. Exit 2: usage or tooling error (dist absent -
|
|
19
|
-
* build the package first). Run from the package's own `build` script, after `vite build`.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const fs = require('fs');
|
|
23
|
-
const path = require('path');
|
|
24
|
-
|
|
25
|
-
const DIST_DIR = path.resolve(__dirname, '../dist');
|
|
26
|
-
const ENTRIES = ['index.js', 'legacy.js'];
|
|
27
|
-
|
|
28
|
-
// Internal symbols of react-toastify that only exist when its code is bundled.
|
|
29
|
-
const BUNDLED_MARKERS = ['useToastContainer', 'eventManager'];
|
|
30
|
-
|
|
31
|
-
const BARE_IMPORT = /(?:import|export)\s[^'"]*?from\s*["']react-toastify["']|import\s*["']react-toastify["']/;
|
|
32
|
-
|
|
33
|
-
class UsageError extends Error {}
|
|
34
|
-
|
|
35
|
-
function localImportSpecifiers(source) {
|
|
36
|
-
const specifiers = new Set();
|
|
37
|
-
const re = /(?:import|export)\s[^'"]*?from\s*["']([^"']+)["']|import\s*["']([^"']+)["']/g;
|
|
38
|
-
let match = re.exec(source);
|
|
39
|
-
while (match !== null) {
|
|
40
|
-
const specifier = match[1] || match[2];
|
|
41
|
-
if (specifier.startsWith('.')) {
|
|
42
|
-
specifiers.add(specifier);
|
|
43
|
-
}
|
|
44
|
-
match = re.exec(source);
|
|
45
|
-
}
|
|
46
|
-
return specifiers;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function walk(entry) {
|
|
50
|
-
const files = new Map();
|
|
51
|
-
const queue = [entry];
|
|
52
|
-
while (queue.length > 0) {
|
|
53
|
-
const file = queue.shift();
|
|
54
|
-
if (files.has(file)) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (!fs.existsSync(file)) {
|
|
58
|
-
throw new UsageError(`${file} is missing: build the package first (\`vite build\`).`);
|
|
59
|
-
}
|
|
60
|
-
const source = fs.readFileSync(file, 'utf8');
|
|
61
|
-
files.set(file, source);
|
|
62
|
-
for (const specifier of localImportSpecifiers(source)) {
|
|
63
|
-
queue.push(path.resolve(path.dirname(file), specifier));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return files;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function run() {
|
|
70
|
-
const failures = [];
|
|
71
|
-
for (const name of ENTRIES) {
|
|
72
|
-
const files = walk(path.join(DIST_DIR, name));
|
|
73
|
-
const sources = [...files.entries()];
|
|
74
|
-
if (!sources.some(([, source]) => BARE_IMPORT.test(source))) {
|
|
75
|
-
failures.push(`${name} does not import "react-toastify"`);
|
|
76
|
-
}
|
|
77
|
-
for (const [file, source] of sources) {
|
|
78
|
-
for (const marker of BUNDLED_MARKERS) {
|
|
79
|
-
if (source.includes(marker)) {
|
|
80
|
-
failures.push(
|
|
81
|
-
`${name}: ${path.relative(DIST_DIR, file)} embeds react-toastify code ("${marker}")`,
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (failures.length > 0) {
|
|
88
|
-
console.error('REACT-TOASTIFY EXTERNAL REFUSE :');
|
|
89
|
-
for (const failure of failures) console.error(` - ${failure}`);
|
|
90
|
-
return 1;
|
|
91
|
-
}
|
|
92
|
-
console.log('REACT-TOASTIFY EXTERNAL OK : imported by index.js and legacy.js, not bundled.');
|
|
93
|
-
return 0;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
try {
|
|
97
|
-
process.exit(run());
|
|
98
|
-
} catch (error) {
|
|
99
|
-
if (error instanceof UsageError) {
|
|
100
|
-
console.error(error.message);
|
|
101
|
-
process.exit(2);
|
|
102
|
-
}
|
|
103
|
-
throw error;
|
|
104
|
-
}
|