@gjsify/storybook-core 0.36.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.
@@ -32,10 +32,8 @@ export interface StorySummary {
32
32
  controls: unknown[];
33
33
  }
34
34
  /**
35
- * The render seams the controller drives — each is a renderer-specific view
36
- * operation. The breakpoint/fold is NOT here (adapter-owned).
37
- *
38
- * @typeParam TInstance the renderer's story-instance type.
35
+ * The renderer-specific view operations the controller drives. The breakpoint/fold is
36
+ * adapter-owned and deliberately not among them.
39
37
  */
40
38
  export interface StorybookView<TInstance> {
41
39
  /** Build the category-grouped story list; `onSelect(instance)` selects a story. */
@@ -50,10 +48,8 @@ export interface StorybookView<TInstance> {
50
48
  renderControls(rows: Array<ControlRow<unknown>>): void;
51
49
  }
52
50
  /**
53
- * Drives a storybook: registers + instantiates modules, groups them, shows a
54
- * story and wires its controls, and exposes the MCP/devtools control surface.
55
- *
56
- * @typeParam TInstance the renderer's story-instance type.
51
+ * Drives a storybook: registers and instantiates modules, groups them, shows a story and
52
+ * wires its controls, and exposes the MCP/devtools control surface.
57
53
  */
58
54
  export declare class StorybookController<TInstance extends StoryInstanceLike> {
59
55
  private _registry;
@@ -1,10 +1,6 @@
1
1
  /**
2
- * A story module — a group of related story constructors plus optional
3
- * module-level decorators wrapping each story's `initialize()`.
4
- *
5
- * @typeParam TInstance the renderer's story-instance type (it must expose
6
- * `initialize()`).
7
- * @typeParam TCtor the zero-arg constructor producing `TInstance`.
2
+ * A group of related story constructors plus optional module-level decorators wrapping
3
+ * each story's `initialize()`.
8
4
  */
9
5
  export interface StoryModuleLike<TInstance extends {
10
6
  initialize(): void;
@@ -16,12 +12,7 @@ export interface StoryModuleLike<TInstance extends {
16
12
  /** Decorators applied around every story's `initialize()` in this module. */
17
13
  decorators?: Array<(build: () => void, instance: TInstance) => void>;
18
14
  }
19
- /**
20
- * Collects story modules and instantiates their stories. One per storybook run
21
- * (no shared singleton).
22
- *
23
- * @typeParam TInstance the renderer's story-instance type.
24
- */
15
+ /** Collects story modules and instantiates their stories. One per storybook run. */
25
16
  export declare class StoryRegistry<TInstance extends {
26
17
  initialize(): void;
27
18
  }> {
@@ -19,11 +19,10 @@ export interface StoryChrome<TNode> {
19
19
  setChromeText(title: string, description: string): void;
20
20
  }
21
21
  /**
22
- * Base class for a single story's view, parameterised by the renderer's node
23
- * type. A renderer's story base (`StoryWidget` / `StoryElement` / `StoryView`)
24
- * extends this, implements {@link createChrome}, and calls {@link initBase} from
25
- * its own constructor (a base constructor cannot call an abstract method before
26
- * the subclass's field initialisers have run, so init is explicit).
22
+ * Base class for a single story's view. A renderer extends it, implements
23
+ * {@link createChrome} and calls {@link initBase} from its own constructor — init is
24
+ * explicit because a base constructor cannot call an abstract method before the
25
+ * subclass's field initialisers have run.
27
26
  *
28
27
  * @typeParam TNode the renderer's view-node type.
29
28
  */
@@ -40,9 +39,8 @@ export declare abstract class StoryViewBase<TNode> {
40
39
  */
41
40
  protected abstract createChrome(meta: StoryMeta, customRoot?: TNode): StoryChrome<TNode>;
42
41
  /**
43
- * Initialise the base state + chrome. Call from the subclass constructor
44
- * (NOT the base constructor — an abstract `createChrome` must not run before
45
- * the subclass's own fields are initialised).
42
+ * Initialise base state + chrome from the SUBCLASS constructor: an abstract
43
+ * `createChrome` must not run before the subclass's own fields exist.
46
44
  */
47
45
  protected initBase(meta: StoryMeta, story: string, customRoot?: TNode): void;
48
46
  get meta(): StoryMeta;
@@ -52,9 +50,8 @@ export declare abstract class StoryViewBase<TNode> {
52
50
  get root(): TNode;
53
51
  set args(value: StoryArgs);
54
52
  /**
55
- * Notify args listeners. Overridable so a renderer can ALSO fire its own
56
- * change signal (e.g. the GTK adapter's GObject `notify('args')`) in the
57
- * same path.
53
+ * Notify args listeners. Overridable so a renderer can fire its own change signal
54
+ * (the GTK adapter's GObject `notify('args')`) in the same path.
58
55
  */
59
56
  protected emitArgs(value: StoryArgs): void;
60
57
  /** Subscribe to args changes; returns an unsubscribe function. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/storybook-core",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Renderer-agnostic storybook logic (story base, registry, control binding, controller, discovery, devtools) shared by the GTK, browser and NativeScript storybook renderers",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -40,11 +40,11 @@
40
40
  "stories"
41
41
  ],
42
42
  "dependencies": {
43
- "@gjsify/stories": "^0.36.0"
43
+ "@gjsify/stories": "^0.37.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@gjsify/cli": "^0.36.0",
47
- "@gjsify/unit": "^0.36.0",
46
+ "@gjsify/cli": "^0.37.0",
47
+ "@gjsify/unit": "^0.37.0",
48
48
  "@types/node": "^25.9.2",
49
49
  "typescript": "^6.0.3"
50
50
  },