@abyss-project/commons-front-core 17.2.0 → 18.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 (66) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/README.md +2 -1
  3. package/catalog/captures-plan.ts +120 -116
  4. package/catalog/catalog-entries.ts +149 -148
  5. package/catalog/pages/AppShell.tsx +18 -9
  6. package/catalog/pages/CookieConsent.tsx +54 -31
  7. package/catalog/pages/DeliveryHistory.tsx +66 -66
  8. package/catalog/pages/DeliverySubscriptions.tsx +110 -110
  9. package/catalog/pages/ScheduledTasks.tsx +117 -117
  10. package/catalog/pages/index.ts +166 -165
  11. package/catalog/playwright.ci.config.ts +4 -3
  12. package/catalog/specs/captures.spec.ts +145 -145
  13. package/catalog/specs/cookie-consent-modal.spec.ts +187 -0
  14. package/catalog/specs/responsive.spec.ts +106 -0
  15. package/catalog/specs/write-capture-index.ts +81 -81
  16. package/dist/CookieConsentSettings-B7HIIzyI.js +595 -0
  17. package/dist/{Surface-BUxzLLhb.js → Surface-dziv23sf.js} +60 -53
  18. package/dist/{Tabs-D7TDtprO.js → Tabs-_onUZBA-.js} +613 -591
  19. package/dist/components/business/CookieConsent/AbyssCookieConsentProvider.d.ts +11 -3
  20. package/dist/components/business/CookieConsent/CookieConsentBanner.d.ts +4 -3
  21. package/dist/components/business/CookieConsent/CookieConsentPreferences.d.ts +12 -0
  22. package/dist/components/business/CookieConsent/index.d.ts +2 -0
  23. package/dist/components/business/CookieConsent/use-banner-portal.d.ts +36 -0
  24. package/dist/components/inputs/NumberField/NumberField.d.ts +18 -2
  25. package/dist/components/layers/Toast/toast-clearance.d.ts +5 -0
  26. package/dist/components/structure/AccountMenu/AccountMenu.d.ts +2 -1
  27. package/dist/components/structure/AppShell/SpaceSwitcher.d.ts +4 -2
  28. package/dist/components/structure/AppShell/app-shell.types.d.ts +5 -1
  29. package/dist/components/structure/FilterBar/FilterBar.d.ts +7 -2
  30. package/dist/cookie-consent.js +26 -17
  31. package/dist/{design-theme-Bc2sMuUP.js → design-theme-B3C3z1gE.js} +1 -1
  32. package/dist/{editors-CGj-vsZu.js → editors-BhQlONOy.js} +27 -27
  33. package/dist/editors.js +1 -1
  34. package/dist/hooks/use-cookie-consent.hook.spec.d.ts +1 -0
  35. package/dist/hooks/use-rich-intl.hook.d.ts +4 -0
  36. package/dist/{index-DOrEPYZN.js → index-B6LMTOKG.js} +3 -3
  37. package/dist/{index-853Jaoqw.js → index-B6w5_TeJ.js} +3 -3
  38. package/dist/{index-BVsU-XEb.js → index-BBF-FvT6.js} +2 -2
  39. package/dist/{index-5lpeThh7.js → index-BGAZK8Vk.js} +2 -2
  40. package/dist/{index-DKMFAW5f.js → index-BGJobvxw.js} +1 -1
  41. package/dist/{index-DvrKcy8f.js → index-BTDlbjWW.js} +2 -2
  42. package/dist/{index-DrgdyC6J.js → index-BcjlG5TB.js} +2 -2
  43. package/dist/{index-CNfYiPB9.js → index-BeMiREqf.js} +2 -2
  44. package/dist/{index-YX_yu3BN.js → index-ByN6DcaL.js} +2 -2
  45. package/dist/{index-_3uQ1KPn.js → index-CJI1dJrw.js} +3 -3
  46. package/dist/{index-BISOeVc7.js → index-D1mQgWN3.js} +2 -2
  47. package/dist/{index-DykCZUJc.js → index-DLlWMDxB.js} +4 -4
  48. package/dist/{index-BS3QPrVM.js → index-DNd8NZnu.js} +4 -4
  49. package/dist/{index-CTsQY6zW.js → index-Dakpr4C1.js} +3 -3
  50. package/dist/{index-B4PJ4K6l.js → index-DkZAsKob.js} +2 -2
  51. package/dist/{index-CYmjv9TK.js → index-DprTO7yi.js} +4 -4
  52. package/dist/{index-a62vDo6s.js → index-N4BwXTyk.js} +2 -2
  53. package/dist/{index-DfnEQYyW.js → index-V4F4Sk7y.js} +2 -2
  54. package/dist/{index-DxZ1bG6u.js → index-y-TnfE6Z.js} +2 -2
  55. package/dist/{index-CONaN903.js → index-yFJTDKIX.js} +2 -2
  56. package/dist/{index-Bxpp4VC9.js → index-ytgNPz5f.js} +2 -2
  57. package/dist/index.js +3482 -3419
  58. package/dist/legacy.js +1728 -1707
  59. package/dist/translations/en.d.ts +2 -0
  60. package/dist/translations/fr.d.ts +2 -0
  61. package/dist/utils/cookie-consent-contract.d.ts +55 -0
  62. package/dist/utils/cookie-consent-contract.spec.d.ts +1 -0
  63. package/dist/utils/cookie-storage.utils.d.ts +1 -8
  64. package/dist/utils/index.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/dist/CookieConsentSettings-DHpcYTa2.js +0 -505
@@ -1,81 +1,81 @@
1
- import { existsSync, mkdirSync, writeFileSync } from 'fs';
2
- import { resolve } from 'path';
3
- import { CAPTURES, CAPTURES_DIR } from '../captures-plan';
4
- import type { Capture, CaptureState } from '../captures-plan';
5
- import type { CatalogFamily } from '../catalog-entries';
6
-
7
- // Global teardown of the catalog run: writes `index.md` next to the screenshots, from the capture
8
- // plan, listing only the files present on disk.
9
-
10
- const FAMILY_TITLES: Record<CatalogFamily, string> = {
11
- scenes: 'Scènes composées (à regarder en premier)',
12
- structure: 'Structure',
13
- mobile: 'Mobile',
14
- states: 'États',
15
- data: 'Données',
16
- meaning: 'Sens',
17
- business: 'Métier',
18
- layers: 'Couches',
19
- navigation: 'Navigation',
20
- inputs: 'Saisie',
21
- };
22
-
23
- const STATE_LABEL: Record<CaptureState, string> = {
24
- arrival: '',
25
- 'sheet-open': ', feuille ouverte',
26
- 'list-open': ', liste ouverte',
27
- 'calendar-open': ', calendrier ouvert',
28
- 'panel-open': ', panneau ouvert',
29
- 'menu-open': ', menu ouvert',
30
- 'settings-open': ', réglages ouverts',
31
- 'form-open': ', formulaire ouvert',
32
- 'secret-shown': ', secret affiché une fois',
33
- 'delete-confirm': ', confirmation de suppression',
34
- 'detail-open': ', détail ouvert',
35
- 'runs-open': ', exécutions ouvertes',
36
- };
37
-
38
- const describe = (capture: Capture): string =>
39
- `${capture.theme === 'dark' ? 'sombre' : 'clair'}, ${capture.width} px${
40
- STATE_LABEL[capture.state]
41
- }`;
42
-
43
- const writeCaptureIndex = (): void => {
44
- mkdirSync(CAPTURES_DIR, { recursive: true });
45
- const present = CAPTURES.filter((capture) =>
46
- existsSync(resolve(CAPTURES_DIR, capture.file)),
47
- );
48
- const families = Object.keys(FAMILY_TITLES) as CatalogFamily[];
49
- const sections = families
50
- .map((family) => {
51
- const lines = present
52
- .filter((capture) => capture.entry.family === family)
53
- .map(
54
- (capture) =>
55
- `- \`${capture.file}\` : ${capture.entry.name}, ${describe(
56
- capture,
57
- )}`,
58
- );
59
- return lines.length === 0
60
- ? ''
61
- : `## ${FAMILY_TITLES[family]}\n\n${lines.join('\n')}\n`;
62
- })
63
- .filter((section) => section !== '');
64
- const missing = CAPTURES.length - present.length;
65
- const content = [
66
- '# Captures du catalogue du core (#286)',
67
- '',
68
- 'Produites par `pnpm --filter @abyss-project/commons-front-core catalog:test` (`catalog/specs/captures.spec.ts`).',
69
- 'Chaque composant en clair et en sombre à 1440 px ; à 390 px aussi ceux qui changent de forme sous 768 px ;',
70
- 'le shell et la scène bureau aussi à 768 px (rail d’icônes).',
71
- '',
72
- `${present.length} fichiers${
73
- missing > 0 ? `, ${missing} manquants (lancement partiel)` : ''
74
- }.`,
75
- '',
76
- ...sections,
77
- ].join('\n');
78
- writeFileSync(resolve(CAPTURES_DIR, 'index.md'), content);
79
- };
80
-
81
- export default writeCaptureIndex;
1
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
2
+ import { resolve } from 'path';
3
+ import { CAPTURES, CAPTURES_DIR } from '../captures-plan';
4
+ import type { Capture, CaptureState } from '../captures-plan';
5
+ import type { CatalogFamily } from '../catalog-entries';
6
+
7
+ // Global teardown of the catalog run: writes `index.md` next to the screenshots, from the capture
8
+ // plan, listing only the files present on disk.
9
+
10
+ const FAMILY_TITLES: Record<CatalogFamily, string> = {
11
+ scenes: 'Scènes composées (à regarder en premier)',
12
+ structure: 'Structure',
13
+ mobile: 'Mobile',
14
+ states: 'États',
15
+ data: 'Données',
16
+ meaning: 'Sens',
17
+ business: 'Métier',
18
+ layers: 'Couches',
19
+ navigation: 'Navigation',
20
+ inputs: 'Saisie',
21
+ };
22
+
23
+ const STATE_LABEL: Record<CaptureState, string> = {
24
+ arrival: '',
25
+ 'sheet-open': ', feuille ouverte',
26
+ 'list-open': ', liste ouverte',
27
+ 'calendar-open': ', calendrier ouvert',
28
+ 'panel-open': ', panneau ouvert',
29
+ 'menu-open': ', menu ouvert',
30
+ 'settings-open': ', réglages ouverts',
31
+ 'form-open': ', formulaire ouvert',
32
+ 'secret-shown': ', secret affiché une fois',
33
+ 'delete-confirm': ', confirmation de suppression',
34
+ 'detail-open': ', détail ouvert',
35
+ 'runs-open': ', exécutions ouvertes',
36
+ };
37
+
38
+ const describe = (capture: Capture): string =>
39
+ `${capture.theme === 'dark' ? 'sombre' : 'clair'}, ${capture.width} px${
40
+ STATE_LABEL[capture.state]
41
+ }`;
42
+
43
+ const writeCaptureIndex = (): void => {
44
+ mkdirSync(CAPTURES_DIR, { recursive: true });
45
+ const present = CAPTURES.filter((capture) =>
46
+ existsSync(resolve(CAPTURES_DIR, capture.file)),
47
+ );
48
+ const families = Object.keys(FAMILY_TITLES) as CatalogFamily[];
49
+ const sections = families
50
+ .map((family) => {
51
+ const lines = present
52
+ .filter((capture) => capture.entry.family === family)
53
+ .map(
54
+ (capture) =>
55
+ `- \`${capture.file}\` : ${capture.entry.name}, ${describe(
56
+ capture,
57
+ )}`,
58
+ );
59
+ return lines.length === 0
60
+ ? ''
61
+ : `## ${FAMILY_TITLES[family]}\n\n${lines.join('\n')}\n`;
62
+ })
63
+ .filter((section) => section !== '');
64
+ const missing = CAPTURES.length - present.length;
65
+ const content = [
66
+ '# Captures du catalogue du core (#286)',
67
+ '',
68
+ 'Produites par `pnpm --filter @abyss-project/commons-front-core catalog:test` (`catalog/specs/captures.spec.ts`).',
69
+ 'Chaque composant en clair et en sombre à 1440 px ; à 390 px aussi ceux qui changent de forme sous 768 px ;',
70
+ 'le shell et la scène bureau aussi à 768 px (rail d’icônes).',
71
+ '',
72
+ `${present.length} fichiers${
73
+ missing > 0 ? `, ${missing} manquants (lancement partiel)` : ''
74
+ }.`,
75
+ '',
76
+ ...sections,
77
+ ].join('\n');
78
+ writeFileSync(resolve(CAPTURES_DIR, 'index.md'), content);
79
+ };
80
+
81
+ export default writeCaptureIndex;