@abyss-project/commons-front-core 7.0.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.
Files changed (64) hide show
  1. package/README.md +24 -0
  2. package/catalog/playwright.ci.config.ts +29 -0
  3. package/catalog/vite.config.ts +6 -1
  4. package/dist/{AbyssModal.component-Be9980v8.js → AbyssCookieConsentProvider-BhSzVu8P.js} +2393 -2142
  5. package/dist/CookieConsentSettings.component-DMEAuCVS.js +77 -0
  6. package/dist/auth/components/AuthHeroLayout/AuthHeroLayout.component.d.ts +39 -0
  7. package/dist/auth/components/AuthHeroLayout/AuthHeroLayout.component.spec.d.ts +1 -0
  8. package/dist/auth/components/AuthHeroLayout/auth-hero.context.d.ts +11 -0
  9. package/dist/auth/components/index.d.ts +3 -0
  10. package/dist/auth/components/shared/OneTimeCodeField.component.d.ts +6 -2
  11. package/dist/auth/components/shared/OneTimeCodeField.component.spec.d.ts +1 -0
  12. package/dist/auth/components/test-support/own-css.d.ts +5 -0
  13. package/dist/components/layers/Toast/Toast.d.ts +1 -1
  14. package/dist/components/structure/AppShell/AppShell.d.ts +1 -1
  15. package/dist/components/structure/test-support/structure-test-harness.d.ts +1 -1
  16. package/dist/cookie-consent.js +17 -16
  17. package/dist/{design-theme-BSrfO5Lg.js → design-theme-CvLzOz3p.js} +3469 -3262
  18. package/dist/fonts.css +1 -1
  19. package/dist/hooks/use-rich-intl.hook.d.ts +36 -0
  20. package/dist/{index-DEAXSgTl.js → index-21vSFz6u.js} +2 -2
  21. package/dist/{index-BLlNcpG3.js → index-6KdfKdSJ.js} +2 -2
  22. package/dist/{index-C_Sk7zwR.js → index-7HAvRXgu.js} +2 -2
  23. package/dist/{index-MZi-_cYy.js → index-ASLTmD1Y.js} +2 -2
  24. package/dist/{index-BzCSI9XW.js → index-BTjzj7mm.js} +2 -2
  25. package/dist/{index-A5kt29MO.js → index-BVS73U9E.js} +4 -4
  26. package/dist/{index-Do1fJzj3.js → index-BkfBpYKR.js} +3 -3
  27. package/dist/{index-CHSMfNLS.js → index-BqIg55B3.js} +4 -4
  28. package/dist/{index-CqYmPMRC.js → index-Btnmn1iK.js} +4 -4
  29. package/dist/{index-DwH67Kcz.js → index-BtsnuEJC.js} +25265 -23537
  30. package/dist/{index-CfGWl_3N.js → index-C92C_oG5.js} +2 -2
  31. package/dist/{index-CQtuGy2v.js → index-CHGRiRCe.js} +3 -3
  32. package/dist/{index-Ds5uSeS4.js → index-ClLoBnCN.js} +2 -2
  33. package/dist/{index-WQz3nM40.js → index-D4Qh2Iww.js} +3 -3
  34. package/dist/{index-BuzeZTOG.js → index-D5e4uD4k.js} +2 -2
  35. package/dist/{index-Cnpf4y1o.js → index-D_GWBYM2.js} +1 -1
  36. package/dist/{index-Dj8ju3uH.js → index-DixNft1u.js} +2 -2
  37. package/dist/{index-Bkf4H0Hz.js → index-GoHiFeaw.js} +2 -2
  38. package/dist/{index-BaELetix.js → index-LdiTmDFg.js} +2 -2
  39. package/dist/{index-DTPUe23x.js → index-Ni4BmFs4.js} +2 -2
  40. package/dist/{index-CrrfwI5H.js → index-bR-mnNUA.js} +2 -2
  41. package/dist/{index-l4rCdiSM.js → index-l7FAjaVB.js} +3 -3
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +2610 -2232
  44. package/dist/legacy/components/CookieConsent/AbyssCookieConsentProvider.d.ts +5 -0
  45. package/dist/legacy/components/CookieConsent/AbyssCookieConsentProvider.spec.d.ts +1 -0
  46. package/dist/legacy/components/Utils/AbyssErrorPage/AbyssErrorBoundary.component.spec.d.ts +1 -0
  47. package/dist/legacy/fonts.css +1 -1
  48. package/dist/legacy.js +206 -205
  49. package/dist/rum/AbyssRumProvider.d.ts +29 -0
  50. package/dist/rum/AbyssRumProvider.spec.d.ts +1 -0
  51. package/dist/rum/feedback-ticket.d.ts +24 -0
  52. package/dist/rum/index.d.ts +2 -0
  53. package/dist/theme/augmentation.d.ts +1 -1
  54. package/dist/theme/components/shared.d.ts +1 -1
  55. package/dist/theme/create-abyss-theme.d.ts +1 -1
  56. package/dist/theme/design-theme.d.ts +1 -1
  57. package/dist/theme/tokens/oklch.d.ts +1 -1
  58. package/dist/theme/tokens/soft.d.ts +1 -1
  59. package/dist/translations/en.d.ts +14 -0
  60. package/dist/translations/fr.d.ts +14 -0
  61. package/package.json +10 -5
  62. package/vite.config.ts +1 -1
  63. package/dist/CookieConsentSettings.component-CE2qOlyC.js +0 -299
  64. package/test-results/catalog/.last-run.json +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/commons-front-core",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "Front Core package of AbyssProject",
5
5
  "main": "dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -60,6 +60,8 @@
60
60
  "peerDependencies": {
61
61
  "@abyss-project/capacitor-auth": "^1.0.0",
62
62
  "@abyss-project/cloud": "^2.4.0",
63
+ "@abyss-project/console": "^12.4.0",
64
+ "@abyss-project/monitor-browser": "^1.2.0",
63
65
  "@dnd-kit/core": "^6.0.0",
64
66
  "@dnd-kit/sortable": "^9.0.0",
65
67
  "@dnd-kit/utilities": "^3.0.0",
@@ -78,7 +80,7 @@
78
80
  "react-is": "^18.0.0 || ^19.0.0",
79
81
  "react-router-dom": "^6.15.0",
80
82
  "zustand": "^5.0.0",
81
- "@abyss-project/main": "14.0.0"
83
+ "@abyss-project/main": "15.1.0"
82
84
  },
83
85
  "peerDependenciesMeta": {
84
86
  "@abyss-project/capacitor-auth": {
@@ -90,7 +92,7 @@
90
92
  "@abyss-project/crypt": "^1.0.9",
91
93
  "@abyss-project/form": "^1.0.13",
92
94
  "@abyss-project/memories": "^1.0.12",
93
- "@abyss-project/monitor": "^9.3.0",
95
+ "@abyss-project/monitor": "^10.0.0",
94
96
  "@abyss-project/spotlight": "^1.0.24",
95
97
  "@abyss-project/storage": "^1.0.30",
96
98
  "@capacitor/clipboard": "^7.0.1",
@@ -128,10 +130,12 @@
128
130
  "use-debounce": "^10.0.5",
129
131
  "uuid": "^9.0.0",
130
132
  "yup": "^0.32.11",
131
- "@abyss-project/main": "14.0.0"
133
+ "@abyss-project/main": "15.1.0"
132
134
  },
133
135
  "devDependencies": {
134
136
  "@abyss-project/cloud": "^2.4.0",
137
+ "@abyss-project/console": "^12.4.0",
138
+ "@abyss-project/monitor-browser": "^1.2.0",
135
139
  "@playwright/test": "^1.52.0",
136
140
  "@testing-library/react": "^16.3.2",
137
141
  "@types/byte-size": "^8.1.0",
@@ -174,6 +178,7 @@
174
178
  "test": "vitest run --config vitest.config.ts",
175
179
  "test:watch": "vitest --config vitest.config.ts",
176
180
  "catalog": "vite --config catalog/vite.config.ts",
177
- "catalog:test": "playwright test --config catalog/playwright.config.ts"
181
+ "catalog:test": "playwright test --config catalog/playwright.config.ts",
182
+ "catalog:test:ci": "vite build --config catalog/vite.config.ts && playwright test --config catalog/playwright.ci.config.ts"
178
183
  }
179
184
  }
package/vite.config.ts CHANGED
@@ -77,7 +77,7 @@ export default defineConfig({
77
77
  // subpath stays `./auth` (package.json `exports`) — only the dist filename differs.
78
78
  'auth-client': resolve(__dirname, 'src/auth/client/index.ts'),
79
79
  // The previous design system (theme, visual components, their visual utils and hooks),
80
- // isolated until every app has migrated off it (ADR-0166 §2). Public subpath `./legacy`.
80
+ // isolated until every app has migrated off it (ADR-0174 §2). Public subpath `./legacy`.
81
81
  legacy: resolve(__dirname, 'src/legacy/index.ts'),
82
82
  },
83
83
  formats: ['es'],
@@ -1,299 +0,0 @@
1
- import { jsxs as r, Fragment as S, jsx as e } from "react/jsx-runtime";
2
- import { useState as b, createContext as I, useContext as P, useMemo as j, useEffect as F } from "react";
3
- import { useTheme as R, Paper as _, Typography as s, Link as z, Stack as f, Button as m, Box as p, Switch as E, Card as T, CardContent as L, FormControlLabel as x, Checkbox as y } from "@mui/material";
4
- import { b as v, l as k, D as Y, A as $, u as D } from "./AbyssModal.component-Be9980v8.js";
5
- const C = ({ category: i, checked: o, locked: t = !1, onChange: c }) => {
6
- const n = R(), a = v();
7
- return /* @__PURE__ */ r(
8
- f,
9
- {
10
- direction: "row",
11
- spacing: 2,
12
- alignItems: "flex-start",
13
- sx: {
14
- p: 2,
15
- borderRadius: "12px",
16
- border: "1px solid",
17
- borderColor: k(n.palette.mode).glass.border,
18
- bgcolor: k(n.palette.mode).glass.background
19
- },
20
- children: [
21
- /* @__PURE__ */ r(p, { sx: { flex: 1, minWidth: 0 }, children: [
22
- /* @__PURE__ */ r(f, { direction: "row", spacing: 1, alignItems: "center", children: [
23
- /* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: a.formatRichMessage({
24
- id: `cookies.category.${i}.title`
25
- }) }),
26
- t && /* @__PURE__ */ e(
27
- s,
28
- {
29
- variant: "caption",
30
- sx: {
31
- px: 0.75,
32
- py: 0.125,
33
- borderRadius: "6px",
34
- color: n.palette.primary.main,
35
- border: "1px solid",
36
- borderColor: k(n.palette.mode).glass.borderHover,
37
- whiteSpace: "nowrap"
38
- },
39
- children: a.formatRichMessage({
40
- id: "cookies.category.essentials.always-on"
41
- })
42
- }
43
- )
44
- ] }),
45
- /* @__PURE__ */ e(
46
- s,
47
- {
48
- variant: "caption",
49
- color: "text.secondary",
50
- sx: { display: "block", mt: 0.5 },
51
- children: a.formatRichMessage({
52
- id: `cookies.category.${i}.description`
53
- })
54
- }
55
- )
56
- ] }),
57
- /* @__PURE__ */ e(
58
- E,
59
- {
60
- checked: o,
61
- disabled: t,
62
- onChange: (d, l) => c == null ? void 0 : c(l),
63
- inputProps: {
64
- "aria-label": a.formatRichMessage({
65
- id: `cookies.category.${i}.title`
66
- })
67
- }
68
- }
69
- )
70
- ]
71
- }
72
- );
73
- }, H = ({
74
- api: i
75
- }) => {
76
- const o = R(), t = v(), { acceptAll: c, rejectAll: n, save: a } = i, [d, l] = b(!1), [h, u] = b(!1), [g, w] = b(!1), A = () => {
77
- a({ analytics: h, marketing: g }), l(!1);
78
- };
79
- return /* @__PURE__ */ r(S, { children: [
80
- /* @__PURE__ */ r(
81
- _,
82
- {
83
- elevation: 0,
84
- role: "dialog",
85
- "aria-modal": !1,
86
- "aria-labelledby": "cookie-consent-title",
87
- "aria-describedby": "cookie-consent-description",
88
- sx: {
89
- position: "fixed",
90
- bottom: { xs: 12, md: 24 },
91
- left: { xs: 12, md: "auto" },
92
- right: { xs: 12, md: 24 },
93
- width: { xs: "auto", md: 420 },
94
- zIndex: (W) => W.zIndex.snackbar,
95
- p: { xs: 2.5, md: 3 },
96
- borderRadius: "16px",
97
- border: "1px solid",
98
- borderColor: k(o.palette.mode).glass.border,
99
- // Opaque base under the gradient: the surface gradient is translucent,
100
- // and on its own it let the page text behind the card show through.
101
- backgroundColor: o.palette.background.paper,
102
- backgroundImage: k(o.palette.mode).gradients.surface,
103
- backdropFilter: k(o.palette.mode).glass.blurStrong,
104
- boxShadow: "0 16px 48px rgba(0, 0, 0, 0.45)",
105
- animation: "cookie-consent-in 320ms cubic-bezier(0.16, 1, 0.3, 1)",
106
- "@keyframes cookie-consent-in": {
107
- from: { opacity: 0, transform: "translateY(12px)" },
108
- to: { opacity: 1, transform: "translateY(0)" }
109
- },
110
- "@media (prefers-reduced-motion: reduce)": {
111
- animation: "none"
112
- }
113
- },
114
- children: [
115
- /* @__PURE__ */ e(
116
- s,
117
- {
118
- id: "cookie-consent-title",
119
- variant: "subtitle1",
120
- fontWeight: 700,
121
- children: t.formatRichMessage({ id: "cookies.banner.title" })
122
- }
123
- ),
124
- /* @__PURE__ */ e(
125
- s,
126
- {
127
- id: "cookie-consent-description",
128
- variant: "body2",
129
- color: "text.secondary",
130
- sx: { mt: 1 },
131
- children: t.formatRichMessage({ id: "cookies.banner.description" })
132
- }
133
- ),
134
- /* @__PURE__ */ e(
135
- z,
136
- {
137
- href: Y,
138
- rel: "noreferrer",
139
- underline: "hover",
140
- variant: "body2",
141
- sx: {
142
- display: "inline-block",
143
- mt: 1.5,
144
- color: o.palette.primary.main
145
- },
146
- children: t.formatRichMessage({ id: "cookies.banner.privacy-link" })
147
- }
148
- ),
149
- /* @__PURE__ */ r(f, { direction: "row", spacing: 1, sx: { mt: 2.5 }, children: [
150
- /* @__PURE__ */ e(m, { variant: "contained", onClick: c, sx: { flex: 1 }, children: t.formatRichMessage({ id: "cookies.action.accept-all" }) }),
151
- /* @__PURE__ */ e(m, { variant: "outlined", onClick: n, sx: { flex: 1 }, children: t.formatRichMessage({ id: "cookies.action.reject-all" }) })
152
- ] }),
153
- /* @__PURE__ */ e(
154
- m,
155
- {
156
- variant: "text",
157
- size: "small",
158
- onClick: () => l(!0),
159
- sx: { mt: 1, width: "100%", color: "text.secondary" },
160
- children: t.formatRichMessage({ id: "cookies.action.configure" })
161
- }
162
- )
163
- ]
164
- }
165
- ),
166
- /* @__PURE__ */ r(
167
- $,
168
- {
169
- open: d,
170
- onClose: () => l(!1),
171
- maxWidth: "sm",
172
- fullWidth: !0,
173
- children: [
174
- /* @__PURE__ */ e(s, { variant: "h6", fontWeight: 700, children: t.formatRichMessage({ id: "cookies.configure.title" }) }),
175
- /* @__PURE__ */ r(f, { spacing: 1.5, sx: { mt: 3 }, children: [
176
- /* @__PURE__ */ e(C, { category: "essentials", checked: !0, locked: !0 }),
177
- /* @__PURE__ */ e(
178
- C,
179
- {
180
- category: "analytics",
181
- checked: h,
182
- onChange: u
183
- }
184
- ),
185
- /* @__PURE__ */ e(
186
- C,
187
- {
188
- category: "marketing",
189
- checked: g,
190
- onChange: w
191
- }
192
- )
193
- ] }),
194
- /* @__PURE__ */ r(
195
- f,
196
- {
197
- direction: "row",
198
- spacing: 1,
199
- justifyContent: "flex-end",
200
- sx: { mt: 3 },
201
- children: [
202
- /* @__PURE__ */ e(m, { variant: "text", onClick: () => l(!1), children: t.formatRichMessage({ id: "cookies.action.cancel" }) }),
203
- /* @__PURE__ */ e(m, { variant: "contained", onClick: A, children: t.formatRichMessage({ id: "cookies.action.save" }) })
204
- ]
205
- }
206
- )
207
- ]
208
- }
209
- )
210
- ] });
211
- }, M = I(null), O = () => {
212
- const i = P(M);
213
- if (!i)
214
- throw new Error(
215
- "useAbyssCookieConsent must be used inside <AbyssCookieConsentProvider>"
216
- );
217
- return i;
218
- }, G = ({ children: i, consentVersion: o, isAuthenticated: t, domain: c, renderBanner: n }) => {
219
- const a = D({ isAuthenticated: t, consentVersion: o, domain: c }), d = j(() => a.isResolved ? null : n ? n(a) : /* @__PURE__ */ e(H, { api: a }), [a, n]);
220
- return /* @__PURE__ */ r(M.Provider, { value: a, children: [
221
- i,
222
- d
223
- ] });
224
- }, J = () => {
225
- const i = v(), { consent: o, save: t } = O(), [c, n] = b((o == null ? void 0 : o.analytics) ?? !1), [a, d] = b((o == null ? void 0 : o.marketing) ?? !1), l = o == null ? void 0 : o.analytics, h = o == null ? void 0 : o.marketing;
226
- return F(() => {
227
- l !== void 0 && n(l), h !== void 0 && d(h);
228
- }, [l, h]), /* @__PURE__ */ e(T, { sx: { borderRadius: 3 }, children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ r(f, { spacing: 2, children: [
229
- /* @__PURE__ */ e(s, { variant: "h6", children: i.formatRichMessage({ id: "cookies.configure.title" }) }),
230
- /* @__PURE__ */ e(
231
- x,
232
- {
233
- control: /* @__PURE__ */ e(y, { checked: !0, disabled: !0 }),
234
- label: /* @__PURE__ */ r(p, { children: [
235
- /* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
236
- id: "cookies.category.essentials.title"
237
- }) }),
238
- /* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
239
- id: "cookies.category.essentials.description"
240
- }) })
241
- ] })
242
- }
243
- ),
244
- /* @__PURE__ */ e(
245
- x,
246
- {
247
- control: /* @__PURE__ */ e(
248
- y,
249
- {
250
- checked: c,
251
- onChange: (u, g) => n(g)
252
- }
253
- ),
254
- label: /* @__PURE__ */ r(p, { children: [
255
- /* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
256
- id: "cookies.category.analytics.title"
257
- }) }),
258
- /* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
259
- id: "cookies.category.analytics.description"
260
- }) })
261
- ] })
262
- }
263
- ),
264
- /* @__PURE__ */ e(
265
- x,
266
- {
267
- control: /* @__PURE__ */ e(
268
- y,
269
- {
270
- checked: a,
271
- onChange: (u, g) => d(g)
272
- }
273
- ),
274
- label: /* @__PURE__ */ r(p, { children: [
275
- /* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
276
- id: "cookies.category.marketing.title"
277
- }) }),
278
- /* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
279
- id: "cookies.category.marketing.description"
280
- }) })
281
- ] })
282
- }
283
- ),
284
- /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
285
- m,
286
- {
287
- variant: "contained",
288
- onClick: () => t({ analytics: c, marketing: a }),
289
- children: i.formatRichMessage({ id: "cookies.action.save" })
290
- }
291
- ) })
292
- ] }) }) });
293
- };
294
- export {
295
- G as A,
296
- H as C,
297
- J as a,
298
- O as u
299
- };
@@ -1,4 +0,0 @@
1
- {
2
- "status": "passed",
3
- "failedTests": []
4
- }