@abyss-project/commons-front-core 3.3.2 → 4.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/{CookieConsentSettings.component-tRVw_4zH.js → CookieConsentSettings.component-B06_BnQP.js} +2703 -2118
- package/dist/auth/client/auth-bridge.d.ts +51 -0
- package/dist/auth/client/auth-client.d.ts +125 -0
- package/dist/auth/client/auth-client.spec.d.ts +1 -0
- package/dist/auth/client/capacitor-bridge.d.ts +16 -0
- package/dist/auth/client/index.d.ts +6 -0
- package/dist/auth/client/native-bridge.d.ts +53 -0
- package/dist/auth/client/native-bridge.spec.d.ts +1 -0
- package/dist/auth/client/token-storage.d.ts +31 -0
- package/dist/auth/client/web-bridge.d.ts +13 -0
- package/dist/auth/client/web-bridge.spec.d.ts +1 -0
- package/dist/auth/components/AuthFlow/AuthFlow.component.d.ts +30 -0
- package/dist/auth/components/AuthFlow/AuthFlow.component.spec.d.ts +1 -0
- package/dist/auth/components/AuthFlow/auth-flow.types.d.ts +62 -0
- package/dist/auth/components/AuthFlow/steps/CodeStep.component.d.ts +17 -0
- package/dist/auth/components/AuthFlow/steps/EmailStep.component.d.ts +22 -0
- package/dist/auth/components/AuthFlow/steps/MfaEnrollmentStep.component.d.ts +13 -0
- package/dist/auth/components/AuthFlow/steps/MfaStep.component.d.ts +20 -0
- package/dist/auth/components/AuthFlow/steps/PasskeyNudgeStep.component.d.ts +11 -0
- package/dist/auth/components/AuthFlow/steps/PasswordStep.component.d.ts +17 -0
- package/dist/auth/components/AuthFlow/steps/SignupStep.component.d.ts +24 -0
- package/dist/auth/components/AuthFlow/steps/steps.autocomplete.spec.d.ts +1 -0
- package/dist/auth/components/AuthProviderButtons/AuthProviderButtons.component.d.ts +30 -0
- package/dist/auth/components/MfaRequirementBanner/MfaRequirementBanner.component.d.ts +12 -0
- package/dist/auth/components/MfaRequirementBanner/MfaRequirementBanner.component.spec.d.ts +1 -0
- package/dist/auth/components/ReauthDialog/AuthReauthHost.component.d.ts +8 -0
- package/dist/auth/components/ReauthDialog/ReauthDialog.component.d.ts +22 -0
- package/dist/auth/components/ReauthDialog/ReauthDialog.component.spec.d.ts +1 -0
- package/dist/auth/components/SecuritySettings/SecuritySettings.component.d.ts +7 -0
- package/dist/auth/components/SecuritySettings/SecuritySettings.component.spec.d.ts +1 -0
- package/dist/auth/components/SecuritySettings/sections/EmailSection.component.d.ts +6 -0
- package/dist/auth/components/SecuritySettings/sections/PasskeysSection.component.d.ts +10 -0
- package/dist/auth/components/SecuritySettings/sections/PasswordSection.component.d.ts +9 -0
- package/dist/auth/components/SecuritySettings/sections/RecoveryCodesSection.component.d.ts +10 -0
- package/dist/auth/components/SecuritySettings/sections/SecuritySection.component.d.ts +26 -0
- package/dist/auth/components/SecuritySettings/sections/SessionsSection.component.d.ts +8 -0
- package/dist/auth/components/SecuritySettings/sections/TotpSection.component.d.ts +11 -0
- package/dist/auth/components/SecuritySettings/sections/use-section-action.hook.d.ts +9 -0
- package/dist/auth/components/index.d.ts +11 -0
- package/dist/auth/components/shared/AuthStepFrame.component.d.ts +19 -0
- package/dist/auth/components/shared/OneTimeCodeField.component.d.ts +17 -0
- package/dist/auth/components/shared/RecoveryCodesPanel.component.d.ts +12 -0
- package/dist/auth/components/shared/TotpSetupPanel.component.d.ts +14 -0
- package/dist/auth/components/shared/auth-errors.d.ts +42 -0
- package/dist/auth/components/shared/mfa-status-events.d.ts +2 -0
- package/dist/auth/components/shared/passkey-ceremonies.d.ts +17 -0
- package/dist/auth/components/shared/use-async-resource.hook.d.ts +18 -0
- package/dist/auth/components/shared/use-offline.hook.d.ts +2 -0
- package/dist/auth/components/shared/use-passkey-name.hook.d.ts +5 -0
- package/dist/auth/components/test-support/auth-sdk.mock.d.ts +57 -0
- package/dist/auth/components/test-support/auth-test-harness.d.ts +48 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/react/AuthProvider.component.d.ts +15 -0
- package/dist/auth/react/AuthProvider.component.spec.d.ts +1 -0
- package/dist/auth/react/use-auth.hook.d.ts +3 -0
- package/dist/auth-client.d.ts +2 -0
- package/dist/auth-client.js +26 -0
- package/dist/auth-native.d.ts +2 -0
- package/dist/auth-native.js +84 -0
- package/dist/components/Layouts/AbyssLayoutProvider/AbyssLayoutProvider.component.d.ts +2 -3
- package/dist/components/Layouts/AbyssLayoutProvider/abyss-layout.store.d.ts +1 -1
- package/dist/components/Support/SupportTicketDetail.mobile-layout.spec.d.ts +1 -0
- package/dist/cookie-consent.js +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +654 -4
- package/dist/{index-g_LMIl_j.js → index-B99FVtM1.js} +2 -2
- package/dist/{index-Cy5aV6-7.js → index-BAiia-Dl.js} +4 -4
- package/dist/{index-CSOs_Ccx.js → index-BI56obfe.js} +1 -1
- package/dist/{index-sAQE8yH0.js → index-BLjfAtDQ.js} +2 -2
- package/dist/{index-BHSTpRDB.js → index-BQMgvLh9.js} +4 -4
- package/dist/{index-Bb8UEu0K.js → index-BU5c0hG9.js} +3 -3
- package/dist/{index-CJghyDOF.js → index-B_rGVaUU.js} +2 -2
- package/dist/{index-nT4uFN7k.js → index-BokeagcV.js} +3 -3
- package/dist/{index-N73aWpoj.js → index-C36LEiRs.js} +2 -2
- package/dist/{index-Dn4CNQkV.js → index-C4fkwJmM.js} +2 -2
- package/dist/{index-TbU1rvxC.js → index-COBKSaJ6.js} +2 -2
- package/dist/{index-DUuSQC1S.js → index-CQcl-JnX.js} +2 -2
- package/dist/{index-BDwKynBn.js → index-Cp_oEtd_.js} +33265 -30088
- package/dist/{index-DUxqfZmd.js → index-D1vKJSB3.js} +3 -3
- package/dist/index-D7cgykJH.js +324 -0
- package/dist/{index-C2SpycHF.js → index-DA5MOwJ6.js} +2 -2
- package/dist/{index-DDBCCwMT.js → index-DAEl7d3x.js} +2 -2
- package/dist/{index-D84kdr5l.js → index-DPDhWaXC.js} +2 -2
- package/dist/{index-Hf4VgoUQ.js → index-Dy57KM7a.js} +2 -2
- package/dist/{index-BDI9bSnM.js → index-QsS__hk5.js} +3 -3
- package/dist/{index-D8hjJcQ2.js → index-cHPTPlez.js} +2 -2
- package/dist/{index-DlNShbQC.js → index-pmj-p-Pq.js} +2 -2
- package/dist/{index-DcZU8Tc4.js → index-rgzxHuXo.js} +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +273 -242
- package/dist/token-storage-D3e11ePD.js +38 -0
- package/dist/translations/en.d.ts +289 -0
- package/dist/translations/fr.d.ts +289 -0
- package/dist/translations/translations-parity.spec.d.ts +1 -0
- package/dist/use-auth.hook-B_TU5W3g.js +391 -0
- package/dist/utils/billing.utils.d.ts +2 -2
- package/dist/utils/cookie.utils.d.ts +1 -1
- package/dist/utils/space-display-name.utils.d.ts +2 -2
- package/package.json +32 -10
- package/scripts/check-auth-entry-isolation.cjs +140 -0
- package/vite.config.ts +24 -1
- package/vitest.config.ts +1 -1
package/vite.config.ts
CHANGED
|
@@ -20,6 +20,11 @@ export default defineConfig({
|
|
|
20
20
|
// its own, older `@abyss-project/main`, which has no such entry — so this package carries
|
|
21
21
|
// its own copy, compiled from the single source in abyss_main_core.
|
|
22
22
|
'@abyss-project/main/plan-name': resolve(__dirname, '../abyss_main_core/src/plan-name/index.ts'),
|
|
23
|
+
// Same for the metric labels: the invoices and the quota dialog read one table.
|
|
24
|
+
'@abyss-project/main/billing-metric-label': resolve(
|
|
25
|
+
__dirname,
|
|
26
|
+
'../abyss_main_core/src/billing-metric-label/index.ts',
|
|
27
|
+
),
|
|
23
28
|
},
|
|
24
29
|
},
|
|
25
30
|
build: {
|
|
@@ -32,6 +37,20 @@ export default defineConfig({
|
|
|
32
37
|
entry: {
|
|
33
38
|
index: resolve(__dirname, 'src/index.ts'),
|
|
34
39
|
'cookie-consent': resolve(__dirname, 'src/components/CookieConsent/index.ts'),
|
|
40
|
+
// The native auth bridge, out of the main barrel: the only importer of the optional peer
|
|
41
|
+
// `@abyss-project/capacitor-auth`, which a web-only consumer does not install.
|
|
42
|
+
'auth-native': resolve(__dirname, 'src/auth/client/capacitor-bridge.ts'),
|
|
43
|
+
// The session-only auth surface (client, bridges, token storage, `<AuthProvider>`,
|
|
44
|
+
// `useAuth`), out of the main barrel: an app's auth bootstrap module (created once, at
|
|
45
|
+
// cold start and in every test that re-imports it) never needs the screens
|
|
46
|
+
// (`AuthFlow`, `SecuritySettings`…) and their dependencies (MUI, pdf.js, milkdown, nivo).
|
|
47
|
+
// Checked by `scripts/check-auth-entry-isolation.cjs` (run from `build`): #510 task 14d.
|
|
48
|
+
// Entry key `auth-client`, not `auth`: `vite-plugin-dts` mirrors `src/auth/` into
|
|
49
|
+
// `dist/auth/` (the full barrel's own type resolution for `export * from './auth'`); a
|
|
50
|
+
// same-named root file `dist/auth.d.ts` would win module resolution over that directory
|
|
51
|
+
// and silently swap the full barrel's own `./auth` export for this narrow one. The public
|
|
52
|
+
// subpath stays `./auth` (package.json `exports`) — only the dist filename differs.
|
|
53
|
+
'auth-client': resolve(__dirname, 'src/auth/client/index.ts'),
|
|
35
54
|
},
|
|
36
55
|
formats: ['es'],
|
|
37
56
|
fileName: (_format, entryName) => `${entryName}.js`,
|
|
@@ -44,6 +63,8 @@ export default defineConfig({
|
|
|
44
63
|
const exactNames = [
|
|
45
64
|
'react', 'react-dom', 'react-intl', 'react-router-dom',
|
|
46
65
|
'pdfjs-dist', 'pdf-lib',
|
|
66
|
+
// A dependency, resolved by the consumer: one WebAuthn copy per app.
|
|
67
|
+
'@simplewebauthn/browser',
|
|
47
68
|
'osx-temperature-sensor', 'fs', 'path', 'os',
|
|
48
69
|
];
|
|
49
70
|
if (exactNames.includes(id)) return true;
|
|
@@ -61,7 +82,9 @@ export default defineConfig({
|
|
|
61
82
|
if (id === '@mui/x-date-pickers/PickersDay') return false;
|
|
62
83
|
// Bundled on purpose, see `resolve.alias` above.
|
|
63
84
|
if (id === '@abyss-project/main/plan-name') return false;
|
|
64
|
-
|
|
85
|
+
if (id === '@abyss-project/main/billing-metric-label') return false;
|
|
86
|
+
// Scoped-package prefixes (these always end with '/'). `@abyss-project/` keeps
|
|
87
|
+
// `@abyss-project/capacitor-auth` external: imported lazily by the `auth-native` entry only.
|
|
65
88
|
const scopedPrefixes = ['@mui/', '@emotion/', '@abyss-project/', '@tanstack/'];
|
|
66
89
|
return scopedPrefixes.some((prefix) => id.startsWith(prefix));
|
|
67
90
|
},
|
package/vitest.config.ts
CHANGED
|
@@ -13,7 +13,7 @@ export default mergeConfig(
|
|
|
13
13
|
include: ['src/**/*.spec.ts', 'src/**/*.spec.tsx'],
|
|
14
14
|
globals: false,
|
|
15
15
|
passWithNoTests: true,
|
|
16
|
-
// Tests change process.env through `vi.stubEnv` only (lint rule in .eslintrc.
|
|
16
|
+
// Tests change process.env through `vi.stubEnv` only (lint rule in .eslintrc.cjs, card #612):
|
|
17
17
|
// every stub is undone before the next test, absence included.
|
|
18
18
|
unstubEnvs: true,
|
|
19
19
|
},
|