@egen-civitas/esm-nextjs-utils 0.3.0 → 0.3.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,14 @@
1
1
  # @egen-civitas/esm-nextjs-utils
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d47a26: L'iframe créée par `getEmbedLifecycle` porte désormais `data-egen-fill` :
8
+ le conteneur single-spa reçoit `height: 100%` de `#egen-scroll-region`
9
+ (règle opt-in du styleguide), sans travail requis côté application
10
+ embarquée.
11
+
3
12
  ## 0.3.0
4
13
 
5
14
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,yEAAyE;IACzE,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,CAAC;IACvD,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2GAA2G;IAC3G,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAG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5D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,UAAU,CAwJ7E;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,eAAe,CAEhF"}
package/dist/host.js CHANGED
@@ -107,6 +107,9 @@ var SAFE_PATH = /^\/(?!\/)[^\s\\]*$/;
107
107
  iframe.title = (_opts_title = opts.title) !== null && _opts_title !== void 0 ? _opts_title : opts.featureName;
108
108
  iframe.setAttribute('sandbox', sandbox);
109
109
  iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
110
+ // Demande au Shell de donner à ce conteneur la hauteur de
111
+ // #egen-scroll-region (règle :has(> [data-egen-fill]) du styleguide).
112
+ iframe.setAttribute('data-egen-fill', '');
110
113
  iframe.style.cssText = "width:100%;border:0;display:block;min-height:".concat((_opts_minHeight = opts.minHeight) !== null && _opts_minHeight !== void 0 ? _opts_minHeight : 400, "px");
111
114
  var send = function send(message) {
112
115
  var _iframe_contentWindow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egen-civitas/esm-nextjs-utils",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Intégration d'applications autonomes (Next.js, SSR, routeur propre) à EGEN par iframe et pont postMessage sécurisé : lifecycle côté Shell et client côté application",
6
6
  "type": "module",
package/src/host.ts CHANGED
@@ -97,6 +97,9 @@ export function getEmbedLifecycle(userOpts: EmbedLifecycleOptions): LifeCycles {
97
97
  iframe.title = opts.title ?? opts.featureName;
98
98
  iframe.setAttribute('sandbox', sandbox);
99
99
  iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
100
+ // Demande au Shell de donner à ce conteneur la hauteur de
101
+ // #egen-scroll-region (règle :has(> [data-egen-fill]) du styleguide).
102
+ iframe.setAttribute('data-egen-fill', '');
100
103
  iframe.style.cssText = `width:100%;border:0;display:block;min-height:${opts.minHeight ?? 400}px`;
101
104
 
102
105
  const send = (message: HostToEmbed) => iframe.contentWindow?.postMessage(wrap(opts.moduleName, message), origin);