@pyreon/storybook 0.6.0 → 0.7.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.
@@ -1,6 +1,6 @@
1
- import { mount } from "@pyreon/runtime-dom";
2
1
  import { ComponentFn, ComponentFn as ComponentFn$1, Fragment, Props, Props as Props$1, VNode, VNodeChild, VNodeChild as VNodeChild$1, h } from "@pyreon/core";
3
2
  import { computed, effect, signal } from "@pyreon/reactivity";
3
+ import { mount } from "@pyreon/runtime-dom";
4
4
 
5
5
  //#region src/types.d.ts
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/types.ts","../../src/render-impl.tsx"],"mappings":";;;;;;;;;UAQiB,cAAA;EACf,SAAA,EAAW,aAAA;EACX,WAAA,EAAa,YAAA;EACb,aAAA,EAAe,WAAA;AAAA;;KAML,UAAA,MAAgB,CAAA,SAAU,aAAA,YAAuB,CAAA,GAAI,OAAA;AAAA,UAIhD,YAAA,SAAqB,OAAA;EACpC,IAAA,EAAM,KAAA;EACN,QAAA,EAAU,MAAA;EACV,OAAA,EAAS,MAAA;EACT,EAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;AAAA;AAAA,KAGU,OAAA,SAAgB,OAAA,KAC1B,IAAA,EAAM,KAAA,EACN,OAAA,EAAS,YAAA,CAAa,KAAA,MACnB,YAAA;AAAA,KAEO,WAAA,SAAoB,OAAA,KAC9B,OAAA,EAAS,OAAA,CAAQ,KAAA,GACjB,OAAA,EAAS,YAAA,CAAa,KAAA,MACnB,YAAA;AAAA,UAIY,IAAA,oBAAwB,aAAA,QAAmB,aAAA;EA1BhC;EA4B1B,SAAA,GAAY,UAAA;EA5BmD;EA8B/D,KAAA;EA9BoE;EAgCpE,UAAA,GAAa,WAAA,CAAY,UAAA,CAAW,UAAA;EAhCV;EAkC1B,IAAA,GAAO,OAAA,CAAQ,UAAA,CAAW,UAAA;EAlC4B;EAoCtD,QAAA,GA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OAAA,CAAQ,QAAA,CAAS,KAAA;EArDd;EAuDV,QAAA,GAAW,MAAA;EAtDF;EAwDT,UAAA,GAAa,WAAA,CAAY,QAAA,CAAS,KAAA;EAtDlC;EAwDA,UAAA,GAAa,MAAA;EAtDb;EAwDA,IAAA;EAxDQ;EA0DR,MAAA,IACE,IAAA,EAAM,QAAA,CAAS,KAAA,GACf,OAAA,EAAS,YAAA,CAAa,QAAA,CAAS,KAAA,OAC5B,YAAA;EA1DY;EA4DjB,IAAA;EA5D0B;EA8D1B,IAAA,IAAQ,OAAA;IACN,aAAA,EAAe,WAAA;IACf,IAAA,EAAM,QAAA,CAAS,KAAA;IACf,IAAA,GAAO,IAAA,UAAc,EAAA,QAAU,OAAA,WAAkB,OAAA;EAAA,MAC7C,OAAA;AAAA;;KAIH,QAAA,UAAkB,KAAA,SAAc,IAAA,YAAgB,UAAA,CAAW,CAAA,IAAK,OAAA;;;;;;;AA7FrE;;;;;;;;iBCYgB,cAAA,CAAA;EAEZ,OAAA;EACA,QAAA;EACA;AAAA;EAEA,OAAA,QAAe,YAAA;EACf,YAAA;IACE,SAAA,GAAY,aAAA;IACZ,IAAA,EAAM,MAAA;IAAA,CACL,GAAA;EAAA;EAEH,QAAA;EACA,SAAA,GAAY,KAAA;IAAS,KAAA;IAAe,WAAA;EAAA;EACpC,YAAA;AAAA,GAEF,aAAA,EAAe,WAAA;;;;iBA0BD,aAAA,CACd,SAAA,EAAW,aAAA,OACX,IAAA,EAAM,MAAA,oBACL,YAAA"}
@@ -1,17 +1,19 @@
1
- import { join } from "node:path";
2
-
3
- //#region src/preset.ts
1
+ //#region src/preset.d.ts
4
2
  /**
5
- * Storybook preset for @pyreon/storybook.
6
- *
7
- * This file is loaded by Storybook's server when the user sets
8
- * `framework: "@pyreon/storybook"` in their `.storybook/main.ts`.
9
- *
10
- * It tells Storybook:
11
- * - Which renderer to use (via the preview entry)
12
- * - What framework name to report
13
- */
14
-
3
+ * Storybook preset for @pyreon/storybook.
4
+ *
5
+ * This file is loaded by Storybook's server when the user sets
6
+ * `framework: "@pyreon/storybook"` in their `.storybook/main.ts`.
7
+ *
8
+ * It tells Storybook:
9
+ * - Which renderer to use (via the preview entry)
10
+ * - What framework name to report
11
+ */
12
+ declare const addons: string[];
13
+ declare const previewAnnotations: string[];
14
+ declare const core: {
15
+ renderer: string;
16
+ };
15
17
  //#endregion
16
18
  export { addons, core, previewAnnotations };
17
- //# sourceMappingURL=preset.d.ts.map
19
+ //# sourceMappingURL=preset2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","names":[],"sources":["../../src/preset.ts"],"mappings":""}
1
+ {"version":3,"file":"preset2.d.ts","names":[],"sources":["../../../src/preset.ts"],"mappings":";;AAiBA;;;;;AAEA;;;;cAFa,MAAA;AAAA,cAEA,kBAAA;AAAA,cAEA,IAAA;EAEZ,QAAA;AAAA"}
@@ -1,109 +1,45 @@
1
- import { mount } from "@pyreon/runtime-dom";
1
+ import { ComponentFn, VNodeChild } from "@pyreon/core";
2
2
 
3
- //#region ../../node_modules/.bun/@pyreon+core@0.6.0/node_modules/@pyreon/core/lib/jsx-runtime.js
3
+ //#region src/render-impl.d.ts
4
4
  /**
5
- * Hyperscript function the compiled output of JSX.
6
- * `<div class="x">hello</div>` → `h("div", { class: "x" }, "hello")`
7
- *
8
- * Generic on P so TypeScript validates props match the component's signature
9
- * at the call site, then stores the result in the loosely-typed VNode.
10
- */
11
- /** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */
12
-
13
- function h(type, props, ...children) {
14
- return {
15
- type,
16
- props: props ?? EMPTY_PROPS,
17
- children: normalizeChildren(children),
18
- key: props?.key ?? null
19
- };
20
- }
21
- function normalizeChildren(children) {
22
- for (let i = 0; i < children.length; i++) if (Array.isArray(children[i])) return flattenChildren(children);
23
- return children;
24
- }
25
- function flattenChildren(children) {
26
- const result = [];
27
- for (const child of children) if (Array.isArray(child)) result.push(...flattenChildren(child));else result.push(child);
28
- return result;
29
- }
30
- /**
31
- * JSX automatic runtime.
32
- *
33
- * When tsconfig has `"jsxImportSource": "@pyreon/core"`, the TS/bundler compiler
34
- * rewrites JSX to imports from this file automatically:
35
- * <div class="x" /> → jsx("div", { class: "x" })
36
- */
37
- function jsx(type, props, key) {
38
- const {
39
- children,
40
- ...rest
41
- } = props;
42
- const propsWithKey = key != null ? {
43
- ...rest,
44
- key
45
- } : rest;
46
- if (typeof type === "function") return h(type, children !== void 0 ? {
47
- ...propsWithKey,
48
- children
49
- } : propsWithKey);
50
- return h(type, propsWithKey, ...(children === void 0 ? [] : Array.isArray(children) ? children : [children]));
51
- }
52
-
53
- //#endregion
54
- //#region src/render-impl.tsx
55
- /**
56
- * State tracked per canvas element so we can clean up between renders.
57
- */
58
-
59
- /**
60
- * Render a Pyreon story into a Storybook canvas element.
61
- *
62
- * This is the core integration point — Storybook calls this function
63
- * every time a story needs to be displayed or re-rendered (e.g. when
64
- * the user changes args via the Controls panel).
65
- *
66
- * It handles:
67
- * 1. Cleaning up the previous mount (disposing effects, removing DOM)
68
- * 2. Building the VNode from the story function or component + args
69
- * 3. Mounting the new VNode into the canvas
70
- */
71
- function renderToCanvas({
5
+ * Render a Pyreon story into a Storybook canvas element.
6
+ *
7
+ * This is the core integration point — Storybook calls this function
8
+ * every time a story needs to be displayed or re-rendered (e.g. when
9
+ * the user changes args via the Controls panel).
10
+ *
11
+ * It handles:
12
+ * 1. Cleaning up the previous mount (disposing effects, removing DOM)
13
+ * 2. Building the VNode from the story function or component + args
14
+ * 3. Mounting the new VNode into the canvas
15
+ */
16
+ declare function renderToCanvas({
72
17
  storyFn,
73
18
  showMain,
74
19
  showError
75
- }, canvasElement) {
76
- const prevUnmount = canvasState.get(canvasElement);
77
- if (prevUnmount) {
78
- prevUnmount();
79
- canvasState.delete(canvasElement);
80
- }
81
- try {
82
- const unmount = mount(storyFn(), canvasElement);
83
- canvasState.set(canvasElement, unmount);
84
- showMain();
85
- } catch (err) {
86
- showError({
87
- title: `Error rendering story`,
88
- description: (err instanceof Error ? err : new Error(String(err))).message
89
- });
90
- }
91
- }
92
-
20
+ }: {
21
+ storyFn: () => VNodeChild;
22
+ storyContext: {
23
+ component?: ComponentFn<any>;
24
+ args: Record<string, unknown>;
25
+ [key: string]: unknown;
26
+ };
27
+ showMain: () => void;
28
+ showError: (error: {
29
+ title: string;
30
+ description: string;
31
+ }) => void;
32
+ forceRemount: boolean;
33
+ }, canvasElement: HTMLElement): void;
93
34
  //#endregion
94
- //#region src/preview-impl.tsx
35
+ //#region src/preview-impl.d.ts
95
36
  /**
96
- * Default render function — if the story CSF has a `component` but no
97
- * explicit `render`, this is used to create the VNode.
98
- */
99
- function render(args, context) {
100
- const Component = context.component;
101
- if (!Component) throw new Error("[@pyreon/storybook] No component provided. Either set `component` in your meta or provide a `render` function.");
102
- return /* @__PURE__ */jsx(Component, {
103
- ...args
104
- });
105
- }
106
-
37
+ * Default render function — if the story CSF has a `component` but no
38
+ * explicit `render`, this is used to create the VNode.
39
+ */
40
+ declare function render<TArgs extends Record<string, unknown>>(args: TArgs, context: {
41
+ component?: ComponentFn<any>;
42
+ }): VNodeChild;
107
43
  //#endregion
108
44
  export { render, renderToCanvas };
109
- //# sourceMappingURL=preview.d.ts.map
45
+ //# sourceMappingURL=preview2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","names":[],"sources":["../../../../node_modules/.bun/@pyreon+core@0.6.0/node_modules/@pyreon/core/lib/jsx-runtime.js","../../src/render-impl.tsx","../../src/preview-impl.tsx"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAYA,SAAS,CAAA,CAAE,IAAA,EAAM,KAAA,EAAO,GAAG,QAAA,EAAU;EACpC,OAAO;IACN,IAAA;IACA,KAAA,EAAO,KAAA,IAAS,WAAA;IAChB,QAAA,EAAU,iBAAA,CAAkB,QAAA,CAAS;IACrC,GAAA,EAAK,KAAA,EAAO,GAAA,IAAO;GACnB;;AAEF,SAAS,iBAAA,CAAkB,QAAA,EAAU;E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a;IACf,WAAA,CAAA,CAAa;IACb,WAAA,CAAY,MAAA,CAAO,aAAA,CAAc;;EAGnC,IAAI;IAEF,MAAM,OAAA,GAAU,KAAA,CADA,OAAA,CAAA,CAAS,EACM,aAAA,CAAc;IAC7C,WAAA,CAAY,GAAA,CAAI,aAAA,EAAe,OAAA,CAAQ;IACvC,QAAA,CAAA,CAAU;WACH,GAAA,EAAK;IAEZ,SAAA,CAAU;MACR,KAAA,EAAO,uBAAA;MACP,WAAA,EAAA,CAHY,GAAA,YAAe,KAAA,GAAQ,GAAA,GAAM,IAAI,KAAA,CAAM,MAAA,CAAO,GAAA,CAAI,CAAC,EAG5C;KACpB,CAAC;;;;;;;;;;ACvCN,SAAgB,MAAA,CACd,IAAA,EACA,OAAA,EACY;EACZ,MAAM,SAAA,GAAY,OAAA,CAAQ,SAAA;EAC1B,IAAI,CAAC,SAAA,EACH,MAAM,IAAI,KAAA,CACR,gHAAA,CACD;EAEH,OAAO,eAAA,GAAA,CAAC,SAAA,EAAD;IAAW,GAAI;EAAA,CAAQ,CAAA"}
1
+ {"version":3,"file":"preview2.d.ts","names":[],"sources":["../../../src/render-impl.tsx","../../../src/preview-impl.tsx"],"mappings":";;;;;AAoBA;;;;;;;;;;iBAAgB,cAAA,CAAA;EAEZ,OAAA;EACA,QAAA;EACA;AAAA;EAEA,OAAA,QAAe,UAAA;EACf,YAAA;IACE,SAAA,GAAY,WAAA;IACZ,IAAA,EAAM,MAAA;IAAA,CACL,GAAA;EAAA;EAEH,QAAA;EACA,SAAA,GAAY,KAAA;IAAS,KAAA;IAAe,WAAA;EAAA;EACpC,YAAA;AAAA,GAEF,aAAA,EAAe,WAAA;;;;;;;iBCpBD,MAAA,eAAqB,MAAA,kBAAA,CACnC,IAAA,EAAM,KAAA,EACN,OAAA;EAAW,SAAA,GAAY,WAAA;AAAA,IACtB,UAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/storybook",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Storybook renderer for Pyreon — mount, render, and interact with Pyreon components in Storybook",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,19 +0,0 @@
1
- //#region src/preset.d.ts
2
- /**
3
- * Storybook preset for @pyreon/storybook.
4
- *
5
- * This file is loaded by Storybook's server when the user sets
6
- * `framework: "@pyreon/storybook"` in their `.storybook/main.ts`.
7
- *
8
- * It tells Storybook:
9
- * - Which renderer to use (via the preview entry)
10
- * - What framework name to report
11
- */
12
- declare const addons: string[];
13
- declare const previewAnnotations: string[];
14
- declare const core: {
15
- renderer: string;
16
- };
17
- //#endregion
18
- export { addons, core, previewAnnotations };
19
- //# sourceMappingURL=preset2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preset2.d.ts","names":[],"sources":["../../src/preset.ts"],"mappings":";;AAiBA;;;;;AAEA;;;;cAFa,MAAA;AAAA,cAEA,kBAAA;AAAA,cAEA,IAAA;EAEZ,QAAA;AAAA"}
@@ -1,45 +0,0 @@
1
- import { ComponentFn, VNodeChild } from "@pyreon/core";
2
-
3
- //#region src/render-impl.d.ts
4
- /**
5
- * Render a Pyreon story into a Storybook canvas element.
6
- *
7
- * This is the core integration point — Storybook calls this function
8
- * every time a story needs to be displayed or re-rendered (e.g. when
9
- * the user changes args via the Controls panel).
10
- *
11
- * It handles:
12
- * 1. Cleaning up the previous mount (disposing effects, removing DOM)
13
- * 2. Building the VNode from the story function or component + args
14
- * 3. Mounting the new VNode into the canvas
15
- */
16
- declare function renderToCanvas({
17
- storyFn,
18
- showMain,
19
- showError
20
- }: {
21
- storyFn: () => VNodeChild;
22
- storyContext: {
23
- component?: ComponentFn<any>;
24
- args: Record<string, unknown>;
25
- [key: string]: unknown;
26
- };
27
- showMain: () => void;
28
- showError: (error: {
29
- title: string;
30
- description: string;
31
- }) => void;
32
- forceRemount: boolean;
33
- }, canvasElement: HTMLElement): void;
34
- //#endregion
35
- //#region src/preview-impl.d.ts
36
- /**
37
- * Default render function — if the story CSF has a `component` but no
38
- * explicit `render`, this is used to create the VNode.
39
- */
40
- declare function render<TArgs extends Record<string, unknown>>(args: TArgs, context: {
41
- component?: ComponentFn<any>;
42
- }): VNodeChild;
43
- //#endregion
44
- export { render, renderToCanvas };
45
- //# sourceMappingURL=preview2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preview2.d.ts","names":[],"sources":["../../src/render-impl.tsx","../../src/preview-impl.tsx"],"mappings":";;;;;AAoBA;;;;;;;;;;iBAAgB,cAAA,CAAA;EAEZ,OAAA;EACA,QAAA;EACA;AAAA;EAEA,OAAA,QAAe,UAAA;EACf,YAAA;IACE,SAAA,GAAY,WAAA;IACZ,IAAA,EAAM,MAAA;IAAA,CACL,GAAA;EAAA;EAEH,QAAA;EACA,SAAA,GAAY,KAAA;IAAS,KAAA;IAAe,WAAA;EAAA;EACpC,YAAA;AAAA,GAEF,aAAA,EAAe,WAAA;;;;;;;iBCpBD,MAAA,eAAqB,MAAA,kBAAA,CACnC,IAAA,EAAM,KAAA,EACN,OAAA;EAAW,SAAA,GAAY,WAAA;AAAA,IACtB,UAAA"}