@gjsify/example-gtk-adwaita-storybook 0.35.0 → 0.37.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/example-gtk-adwaita-storybook",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Interactive component browser for Libadwaita widgets — a native Adwaita storybook built on @gjsify/storybook, debuggable over DBus/MCP via @gjsify/devtools",
5
5
  "type": "module",
6
6
  "main": "dist/gjs.js",
@@ -54,11 +54,11 @@
54
54
  "@girs/glib-2.0": "^4.1.0",
55
55
  "@girs/gobject-2.0": "^4.1.0",
56
56
  "@girs/gtk-4.0": "^4.1.0",
57
- "@gjsify/adwaita-web": "^0.35.0",
58
- "@gjsify/cli": "^0.35.0",
57
+ "@gjsify/adwaita-web": "^0.37.0",
58
+ "@gjsify/cli": "^0.37.0",
59
59
  "@gjsify/node-gi": "file:../../../packages/node-gi/node-gi",
60
- "@gjsify/storybook": "^0.35.0",
61
- "@gjsify/adwaita-storybook": "^0.35.0",
60
+ "@gjsify/storybook": "^0.37.0",
61
+ "@gjsify/adwaita-storybook": "^0.37.0",
62
62
  "@types/node": "^25.9.2",
63
63
  "typescript": "^6.0.3"
64
64
  },
@@ -1,36 +1,27 @@
1
- // Embeddable browser target — `mount(container)` renders the Adwaita storybook
2
- // into any DOM element, mirroring the `mount()` contract the DOM showcases
3
- // expose (e.g. `@gjsify/example-dom-minimalist-browser/browser`). The gjsify
4
- // website uses it to embed the storybook live in its showcase pages and the
5
- // home-page slideshow.
1
+ // `mount(container)` renders the storybook into any DOM element, the same contract the DOM showcases
2
+ // expose, which is how the gjsify website embeds it live.
6
3
  //
7
- // The storybook's root is an `<adw-window class="sb-window">`; the website's
8
- // embed CSS sizes any `adw-window` to fill its slot, so the storybook fills the
9
- // container the same way the native window fills its toplevel. The renderer is
10
- // responsive (it collapses to single-pane navigation below 720px, like the
11
- // native `Adw.Breakpoint`), so it adapts to both the wide doc-page embed and
12
- // narrow mobile layouts.
4
+ // The root is an `<adw-window>`, and the website's embed CSS sizes any `adw-window` to fill its slot,
5
+ // so the storybook fills its container as the native window fills its toplevel. The renderer
6
+ // collapses to single-pane navigation below 720px, mirroring the native `Adw.Breakpoint`.
13
7
 
14
8
  import { mountStorybook } from '@gjsify/adwaita-storybook';
15
9
  import { stories } from './stories.js';
16
10
 
17
11
  export interface ShowcaseHandle {
18
- /** No-op: the storybook renders no animation, so there's nothing to pause. */
12
+ /** Inert: the storybook has no rAF loop. Present only for the slideshow's handle contract. */
19
13
  pause(): void;
20
14
  resume(): void;
21
15
  readonly isPaused: boolean;
22
16
  }
23
17
 
24
18
  export interface MountOptions {
25
- /** Window title shown in the sidebar header (default "Adwaita Storybook"). */
26
19
  title?: string;
27
20
  }
28
21
 
29
22
  export function mount(container: HTMLElement, options?: MountOptions): ShowcaseHandle {
30
23
  mountStorybook(container, { title: options?.title ?? 'Adwaita Storybook', stories });
31
24
 
32
- // The storybook is static (no rAF loop), so pause/resume are inert — they
33
- // exist only to satisfy the slideshow's optional ShowcaseHandle contract.
34
25
  let paused = false;
35
26
  return {
36
27
  pause(): void {
@@ -1,14 +1,11 @@
1
- // Browser entry — mounts the Adwaita storybook as a web app built from
2
- // @gjsify/adwaita-web custom elements, mirroring the native GTK storybook
3
- // (launched via `gjsify storybook`). Each *.web.ts story shares its metadata
4
- // with the GTK *.story.ts twin, so the two targets expose identical controls.
5
- // They are NOT compared by screenshot — no such harness exists (#1052); the
6
- // parity that is held is behavioural, via the @gjsify/adwaita-core/conformance
7
- // vectors both renderer suites assert against.
1
+ // Browser entry, mounting the storybook from @gjsify/adwaita-web custom elements as a mirror of the
2
+ // native GTK one (`gjsify storybook`). Each *.web.ts story shares metadata with its GTK *.story.ts
3
+ // twin, so both targets expose identical controls. Parity is BEHAVIOURAL, asserted by both renderer
4
+ // suites against the @gjsify/adwaita-core/conformance vectors — there is no screenshot harness
5
+ // (#1052).
8
6
  //
9
- // The story list lives in `./stories.ts` so the standalone entry here and the
10
- // embeddable `mount(container)` (`./embed.ts`, used by the gjsify website) stay
11
- // in lockstep.
7
+ // The story list is in ./stories.ts so this standalone entry and the embeddable `mount(container)`
8
+ // in ./embed.ts stay in lockstep.
12
9
 
13
10
  import { mountStorybook } from '@gjsify/adwaita-storybook';
14
11
  import { stories } from './stories.js';