@gjsify/adwaita-storybook 0.64.52 → 0.64.54

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.
@@ -17,6 +17,7 @@ export declare class StorybookWebApp implements StorybookView<StoryElement> {
17
17
  private _controller;
18
18
  private _options;
19
19
  private _container;
20
+ private _window;
20
21
  /**
21
22
  * Colour scheme + accent for the whole storybook, not for one story.
22
23
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-storybook",
3
- "version": "0.64.52",
3
+ "version": "0.64.54",
4
4
  "description": "Browser renderer for the @gjsify/stories contract — the web counterpart of @gjsify/storybook, built on @gjsify/adwaita-web",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -30,13 +30,13 @@
30
30
  "browser"
31
31
  ],
32
32
  "dependencies": {
33
- "@gjsify/adwaita-core": "0.64.52",
34
- "@gjsify/adwaita-web": "0.64.52",
35
- "@gjsify/stories": "0.64.52",
36
- "@gjsify/storybook-core": "0.64.52"
33
+ "@gjsify/adwaita-core": "0.64.54",
34
+ "@gjsify/adwaita-web": "0.64.54",
35
+ "@gjsify/stories": "0.64.54",
36
+ "@gjsify/storybook-core": "0.64.54"
37
37
  },
38
38
  "devDependencies": {
39
- "@gjsify/cli": "0.64.52",
39
+ "@gjsify/cli": "0.64.54",
40
40
  "typescript": "^6.0.3"
41
41
  },
42
42
  "gjsify": {
package/src/app.ts CHANGED
@@ -58,6 +58,7 @@ export class StorybookWebApp implements StorybookView<StoryElement> {
58
58
  private _controller = new StorybookController<StoryElement>(this, (story) => this._buildControls(story));
59
59
  private _options: StorybookWebOptions;
60
60
  private _container: HTMLElement;
61
+ private _window: HTMLElement | null = null;
61
62
  /**
62
63
  * Colour scheme + accent for the whole storybook, not for one story.
63
64
  *
@@ -280,7 +281,9 @@ export class StorybookWebApp implements StorybookView<StoryElement> {
280
281
  appearanceBtn.addEventListener('click', () => {
281
282
  // Mounted on first press: a dialog nobody opens should not sit in the
282
283
  // tree of every storybook that never asks for it.
283
- if (!appearanceDialog.isConnected) this._container.append(appearanceDialog);
284
+ // Inside the window, not beside it: the window contains its own scrim, so the
285
+ // dimming and the centring are the window's, not the host element's.
286
+ if (!appearanceDialog.isConnected) this._window?.append(appearanceDialog);
284
287
  appearanceDialog.toggleAttribute('open', true);
285
288
  });
286
289
 
@@ -300,6 +303,7 @@ export class StorybookWebApp implements StorybookView<StoryElement> {
300
303
  contentPane,
301
304
  ]);
302
305
  const window_ = h('adw-window', { class: 'sb-window' }, [this._navSplit]);
306
+ this._window = window_;
303
307
  this._container.replaceChildren(window_);
304
308
  // `<adw-window>` writes its size request as inline style on connect, which outranks
305
309
  // `.sb-window`; the storybook fills its host, so it states that after connect, and