@egen-civitas/esm-styleguide 1.13.0 → 1.14.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 +18 -0
- package/dist/components/_general.scss +22 -0
- package/dist/workbench/tool-window-zone.component.d.ts.map +1 -1
- package/dist/workbench/tool-window-zone.component.js +16 -5
- package/dist/workbench/workbench.render.d.ts.map +1 -1
- package/dist/workbench/workbench.render.js +20 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 1.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 23488df: Scrollbars invisibles dans toutes les apps et tous les composants (le défilement reste intact). Règle globale dans la feuille de style du shell, avec `!important` pour neutraliser aussi les réglages locaux (`scrollbar-thin`, `scrollbar-thumb-*`, Carbon). Exception ponctuelle : attribut `data-scrollbar="visible"` sur l'élément concerné.
|
|
8
|
+
|
|
9
|
+
## 1.13.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2a9541f: Plan de travail du shell : chaque racine (rails gauche/droit, zones gauche/droite/bas) est maintenant décorée par `egenComponentDecorator`. Avant, `renderWorkbench` montait `createRoot(...).render(<ToolWindowZone />)` sans `ComponentContext` : dès qu'on choisissait un outil dans un rail, la zone rendait son `ExtensionSlot` et levait « ComponentContext has not been provided. This should come from @egen-civitas/esm-react-utils ». Les composants du plan de travail ont aussi accès au namespace i18n `@egen-civitas/esm-styleguide`, à SWR et à la garde d'erreur, comme les autres apps. Test de régression : `workbench.render.test.tsx` (échoue sans le correctif). L'app-shell est republié car il embarque le styleguide.
|
|
14
|
+
|
|
15
|
+
## 1.13.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- fdbe154: Plan de travail : corrige l'erreur « ComponentContext has not been provided » à l'ouverture d'une zone (clic sur un bouton de rail). Les zones sont montées par le shell hors de tout décorateur de composant ; elles fournissent maintenant leur propre `ComponentContext` à l'`ExtensionSlot` qui rend la fenêtre d'outils active.
|
|
20
|
+
|
|
3
21
|
## 1.13.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -5,6 +5,28 @@ html {
|
|
|
5
5
|
scroll-behavior: smooth;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// SCROLLBARS — Invisibles partout (toutes les apps, tous les composants)
|
|
10
|
+
//
|
|
11
|
+
// Le défilement (molette, tactile, clavier, trackpad) reste intact : seule la barre est
|
|
12
|
+
// masquée. `!important` est volontaire : il neutralise aussi les réglages locaux des apps
|
|
13
|
+
// (`scrollbar-thin`, `scrollbar-thumb-*`, styles Carbon) pour qu'aucune barre ne réapparaisse.
|
|
14
|
+
//
|
|
15
|
+
// Pour un élément qui doit exceptionnellement garder sa barre : `data-scrollbar="visible"`.
|
|
16
|
+
// Pour passer à des barres personnalisées plus tard, ne modifier que ce bloc.
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
*:not([data-scrollbar='visible']) {
|
|
20
|
+
scrollbar-width: none !important; // Firefox, Chrome 121+, Safari 18.2+
|
|
21
|
+
-ms-overflow-style: none !important; // anciens Edge / IE
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
*:not([data-scrollbar='visible'])::-webkit-scrollbar {
|
|
25
|
+
display: none !important; // anciens Chrome / Safari
|
|
26
|
+
width: 0 !important;
|
|
27
|
+
height: 0 !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
8
30
|
// =============================================================================
|
|
9
31
|
// LAYOUT PUBLIC — Routes sans navigation primaire (landing, login, suspended)
|
|
10
32
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-window-zone.component.d.ts","sourceRoot":"","sources":["../../src/workbench/tool-window-zone.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAsBxF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBA6D7D"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect } from "react";
|
|
3
3
|
import { TOOL_WINDOW_SLOTS } from "@egen-civitas/esm-extensions";
|
|
4
|
-
import { ExtensionSlot, useStore } from "@egen-civitas/esm-react-utils";
|
|
4
|
+
import { ComponentContext, ExtensionSlot, useStore } from "@egen-civitas/esm-react-utils";
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { Splitter } from "./splitter.component.js";
|
|
7
7
|
import { toolWindowTitle, useToolWindows } from "./use-tool-windows.js";
|
|
8
8
|
import { closeToolWindow, workbenchStore } from "./workbench.store.js";
|
|
9
9
|
import styles from "./workbench.module.scss";
|
|
10
|
+
/**
|
|
11
|
+
* Contexte de composant des zones. Le shell monte chaque zone dans un `createRoot` autonome, hors de tout
|
|
12
|
+
* `egenComponentDecorator` : sans ce contexte, `ExtensionSlot` lève « ComponentContext has not been provided »
|
|
13
|
+
* dès qu'une fenêtre d'outils s'ouvre. Les extensions rendues gardent, elles, le contexte de leur propre app.
|
|
14
|
+
*/ const ZONE_CONTEXT = {
|
|
15
|
+
moduleName: '@egen-civitas/esm-styleguide',
|
|
16
|
+
featureName: 'workbench'
|
|
17
|
+
};
|
|
10
18
|
/** Variable CSS lue par la grille du body (`_general.scss`) pour dimensionner chaque zone. */ const ZONE_SIZE_VARIABLES = {
|
|
11
19
|
left: '--egen-zone-left-width',
|
|
12
20
|
right: '--egen-zone-right-width',
|
|
@@ -74,10 +82,13 @@ import styles from "./workbench.module.scss";
|
|
|
74
82
|
}),
|
|
75
83
|
/*#__PURE__*/ _jsx("div", {
|
|
76
84
|
className: styles.zoneBody,
|
|
77
|
-
children: /*#__PURE__*/ _jsx(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
children: /*#__PURE__*/ _jsx(ComponentContext.Provider, {
|
|
86
|
+
value: ZONE_CONTEXT,
|
|
87
|
+
children: /*#__PURE__*/ _jsx(ExtensionSlot, {
|
|
88
|
+
name: TOOL_WINDOW_SLOTS[anchor],
|
|
89
|
+
select: selectActive,
|
|
90
|
+
className: styles.zoneSlot
|
|
91
|
+
})
|
|
81
92
|
})
|
|
82
93
|
}),
|
|
83
94
|
/*#__PURE__*/ _jsx(Splitter, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbench.render.d.ts","sourceRoot":"","sources":["../../src/workbench/workbench.render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workbench.render.d.ts","sourceRoot":"","sources":["../../src/workbench/workbench.render.tsx"],"names":[],"mappings":"AAwBA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,gBAAgB,QAMzG"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/** @module @category Workbench */ import React from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
|
+
import { egenComponentDecorator } from "@egen-civitas/esm-react-utils";
|
|
4
5
|
import { LeftRail, RightRail } from "./tool-window-rail.component.js";
|
|
5
6
|
import { ToolWindowZone } from "./tool-window-zone.component.js";
|
|
7
|
+
/**
|
|
8
|
+
* Le shell monte chaque morceau du plan de travail dans sa propre racine React, hors de toute app :
|
|
9
|
+
* sans décorateur, ces racines n'ont ni `ComponentContext` (les `ExtensionSlot` de `ToolWindowZone`
|
|
10
|
+
* levaient « ComponentContext has not been provided » dès qu'on ouvrait une fenêtre d'outils),
|
|
11
|
+
* ni namespace i18n, ni garde d'erreur. On les décore donc comme n'importe quelle app.
|
|
12
|
+
* `strictMode` est désactivé : ce sont des éléments de châssis du shell, montés une seule fois.
|
|
13
|
+
*/ const decoratorOptions = {
|
|
14
|
+
moduleName: '@egen-civitas/esm-styleguide',
|
|
15
|
+
featureName: 'workbench',
|
|
16
|
+
strictMode: false
|
|
17
|
+
};
|
|
18
|
+
const DecoratedLeftRail = egenComponentDecorator(decoratorOptions)(LeftRail);
|
|
19
|
+
const DecoratedRightRail = egenComponentDecorator(decoratorOptions)(RightRail);
|
|
20
|
+
const DecoratedToolWindowZone = egenComponentDecorator(decoratorOptions)(ToolWindowZone);
|
|
6
21
|
/**
|
|
7
22
|
* Monte le plan de travail du shell : rails gauche/droit fixes et zones gauche, droite, bas
|
|
8
23
|
* redimensionnables. À utiliser uniquement par le shell, une seule fois ; les apps y déclarent
|
|
@@ -10,15 +25,15 @@ import { ToolWindowZone } from "./tool-window-zone.component.js";
|
|
|
10
25
|
*
|
|
11
26
|
* Tant qu'aucune extension n'est déclarée, les rails sont vides et les zones repliées.
|
|
12
27
|
*/ export function renderWorkbench({ railLeft, railRight, zoneLeft, zoneRight, zoneBottom }) {
|
|
13
|
-
if (railLeft) createRoot(railLeft).render(/*#__PURE__*/ _jsx(
|
|
14
|
-
if (railRight) createRoot(railRight).render(/*#__PURE__*/ _jsx(
|
|
15
|
-
if (zoneLeft) createRoot(zoneLeft).render(/*#__PURE__*/ _jsx(
|
|
28
|
+
if (railLeft) createRoot(railLeft).render(/*#__PURE__*/ _jsx(DecoratedLeftRail, {}));
|
|
29
|
+
if (railRight) createRoot(railRight).render(/*#__PURE__*/ _jsx(DecoratedRightRail, {}));
|
|
30
|
+
if (zoneLeft) createRoot(zoneLeft).render(/*#__PURE__*/ _jsx(DecoratedToolWindowZone, {
|
|
16
31
|
anchor: "left"
|
|
17
32
|
}));
|
|
18
|
-
if (zoneRight) createRoot(zoneRight).render(/*#__PURE__*/ _jsx(
|
|
33
|
+
if (zoneRight) createRoot(zoneRight).render(/*#__PURE__*/ _jsx(DecoratedToolWindowZone, {
|
|
19
34
|
anchor: "right"
|
|
20
35
|
}));
|
|
21
|
-
if (zoneBottom) createRoot(zoneBottom).render(/*#__PURE__*/ _jsx(
|
|
36
|
+
if (zoneBottom) createRoot(zoneBottom).render(/*#__PURE__*/ _jsx(DecoratedToolWindowZone, {
|
|
22
37
|
anchor: "bottom"
|
|
23
38
|
}));
|
|
24
39
|
}
|