@gjsify/storybook 0.47.0 → 0.49.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/README.md +23 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -49,6 +49,17 @@ export const MyButtonStories: StoryModule = { stories: [MyButtonStory] };
|
|
|
49
49
|
|
|
50
50
|
Subclasses that supply their own composite `.blp` template have full layout control; otherwise `addContent()` drops the preview into default chrome. The optional `withActionGroup(prefix, actions)` decorator (`StoryModule.decorators`) installs a stubbed `Gio.SimpleActionGroup` so a previewed widget's buttons resolve in the sandbox.
|
|
51
51
|
|
|
52
|
+
## The `gjsify.storybook` block is machine-checked
|
|
53
|
+
|
|
54
|
+
Config lives in `package.json#gjsify.storybook`: `applicationId`, `title`, the `stories`
|
|
55
|
+
directory, `globals` (`auto,dom` for canvas/DOM stories) and `runtime` (`gjs` | `node`).
|
|
56
|
+
|
|
57
|
+
That block is held by the portable `storybook` conformance rule: the declared `stories`
|
|
58
|
+
directory (default `src`) must exist and hold at least one `*.story.*`, resolved exactly the
|
|
59
|
+
way the command resolves it. Before the rule existed a typo surfaced only when somebody
|
|
60
|
+
actually ran `gjsify storybook` — and the one CI job that does is path-filtered to
|
|
61
|
+
`packages/node-gi/**`, i.e. advisory.
|
|
62
|
+
|
|
52
63
|
## Run it
|
|
53
64
|
|
|
54
65
|
The easy way — let the CLI discover and launch every `*.story.ts`:
|
|
@@ -93,6 +104,18 @@ gjsify debug --profile storybook # MCP bridge: list_stories / get_curre
|
|
|
93
104
|
|
|
94
105
|
See the [Debugging & remote control guide](https://gjsify.github.io/gjsify/guides/devtools/).
|
|
95
106
|
|
|
107
|
+
## Self-verify (the node-gi capstone)
|
|
108
|
+
|
|
109
|
+
`installStorybookProbe(app, window)` plus `probeEnabled()` (env `GJSIFY_STORYBOOK_PROBE`, gated
|
|
110
|
+
exactly like devtools so a production build is byte-unchanged) drive a running storybook
|
|
111
|
+
HEADLESSLY and IN-PROCESS — no DBus, reusing `captureWidgetPng` and `dumpTree`. It asserts the
|
|
112
|
+
sidebar categories, the chrome tree, that a story renders its widget subtree, and that the window
|
|
113
|
+
rasterises to a non-empty PNG, then exits 0 or 1.
|
|
114
|
+
|
|
115
|
+
That is how `gjsify storybook --runtime node` proves the full Libadwaita gallery renders on Node,
|
|
116
|
+
on Linux AND on Windows (the `--windowing` GTK bundle, no gvsbuild): CI
|
|
117
|
+
`storybook-node-gi-bundle` feeds `gtk-smoke` and `windows-gtk-storybook`.
|
|
118
|
+
|
|
96
119
|
## Exports
|
|
97
120
|
|
|
98
121
|
- `StoryWidget` — Adw.Bin base class; `fromMeta()`, `addContent()`, `initialize()`/`updateArgs()`/`teardown()` hooks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/storybook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Reusable GTK/Adwaita storybook for GJS — author *.story.ts and browse them in a generic component explorer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@girs/glib-2.0": "4.6.0",
|
|
42
42
|
"@girs/gobject-2.0": "4.6.0",
|
|
43
43
|
"@girs/gtk-4.0": "4.6.0",
|
|
44
|
-
"@gjsify/adwaita-app": "^0.
|
|
45
|
-
"@gjsify/adwaita-core": "^0.
|
|
46
|
-
"@gjsify/devtools": "^0.
|
|
47
|
-
"@gjsify/stories": "^0.
|
|
48
|
-
"@gjsify/storybook-core": "^0.
|
|
44
|
+
"@gjsify/adwaita-app": "^0.49.0",
|
|
45
|
+
"@gjsify/adwaita-core": "^0.49.0",
|
|
46
|
+
"@gjsify/devtools": "^0.49.0",
|
|
47
|
+
"@gjsify/stories": "^0.49.0",
|
|
48
|
+
"@gjsify/storybook-core": "^0.49.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@gjsify/cli": "^0.
|
|
52
|
-
"@gjsify/unit": "^0.
|
|
51
|
+
"@gjsify/cli": "^0.49.0",
|
|
52
|
+
"@gjsify/unit": "^0.49.0",
|
|
53
53
|
"@types/node": "^25.9.2",
|
|
54
54
|
"typescript": "^6.0.3"
|
|
55
55
|
},
|