@egen-civitas/esm-styleguide 1.13.0 → 1.13.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @egen-civitas/esm-styleguide
2
2
 
3
+ ## 1.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+
3
9
  ## 1.13.0
4
10
 
5
11
  ### Minor Changes
@@ -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;AAexF,UAAU,mBAAmB;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBA2D7D"}
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(ExtensionSlot, {
78
- name: TOOL_WINDOW_SLOTS[anchor],
79
- select: selectActive,
80
- className: styles.zoneSlot
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egen-civitas/esm-styleguide",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for Egen SPA",
6
6
  "main": "dist/internal.js",