@forgebook/react 0.1.5 → 0.1.7
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/dist/src/storyJsx.d.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* A text is an attribute in quotes (in braces when it holds a quote), a number or `null` in braces, `true` the bare
|
|
7
|
-
* name, `false` in braces, a named value by its name (`icon={IconFolder}`)
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* name, `false` in braces, a named value by its name (`icon={IconFolder}`), a list as an array literal
|
|
8
|
+
* (`options={["weekly", "monthly"]}`); `children` goes between the tags. Only the values that cross from the frame are
|
|
9
|
+
* known (texts, numbers, booleans, `null`, lists of texts and numbers, named values): a function or an element the
|
|
10
|
+
* story passes is left out. Pure.
|
|
10
11
|
*
|
|
11
12
|
* @module
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storyJsx.d.ts","sourceRoot":"","sources":["../../src/storyJsx.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storyJsx.d.ts","sourceRoot":"","sources":["../../src/storyJsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAiB1D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,WAAW,MAAM,EAAE,MAAM,SAAS,KAAG,MAY7D,CAAC;AAEF,iHAAiH;AACjH,eAAO,MAAM,MAAM,EAAE,eAA0B,CAAC"}
|
package/dist/src/storyJsx.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* A text is an attribute in quotes (in braces when it holds a quote), a number or `null` in braces, `true` the bare
|
|
7
|
-
* name, `false` in braces, a named value by its name (`icon={IconFolder}`)
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* name, `false` in braces, a named value by its name (`icon={IconFolder}`), a list as an array literal
|
|
8
|
+
* (`options={["weekly", "monthly"]}`); `children` goes between the tags. Only the values that cross from the frame are
|
|
9
|
+
* known (texts, numbers, booleans, `null`, lists of texts and numbers, named values): a function or an element the
|
|
10
|
+
* story passes is left out. Pure.
|
|
10
11
|
*
|
|
11
12
|
* @module
|
|
12
13
|
*/
|
|
@@ -20,6 +21,9 @@ const attribute = (name, value) => {
|
|
|
20
21
|
// a named value is written by its name, as the source's module exports it (`icon={IconFolder}`)
|
|
21
22
|
if (isNamedArg(value))
|
|
22
23
|
return `${name}={${value.named}}`;
|
|
24
|
+
// a multiple choice's values, as the source writes a list
|
|
25
|
+
if (Array.isArray(value))
|
|
26
|
+
return `${name}={[${value.map((item) => JSON.stringify(item)).join(", ")}]}`;
|
|
23
27
|
return `${name}={${String(value)}}`;
|
|
24
28
|
};
|
|
25
29
|
/** The longest line the attributes stay on one line for, in characters. */
|
package/dist/src/storyJsx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storyJsx.js","sourceRoot":"","sources":["../../src/storyJsx.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storyJsx.js","sourceRoot":"","sources":["../../src/storyJsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAiB,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAG/E,sCAAsC;AACtC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,KAAe,EAAU,EAAE;IAC1D,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,S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,CAAC;IACjD,MAAM,OAAO,GAAG,SAAS;QACvB,CAAC,CAAC,IAAI,OAAO,EAAE;QACf,CAAC,CAAC,IAAI,SAAS,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3E,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;IACtE,OAAO,GAAG,OAAO,IAAI,KAAK,KAAK,SAAS,GAAG,CAAC;AAC9C,CAAC,CAAC;AAEF,iHAAiH;AACjH,MAAM,CAAC,MAAM,MAAM,GAAoB,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgebook/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Forgebook for React: the story types and hooks, the renderer the frame mounts a story with, and the adapter that reads a React component's props.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@vitejs/plugin-react": "6.1.2",
|
|
55
55
|
"typescript-6": "npm:typescript@6.0.3",
|
|
56
|
-
"@forgebook/story-format": "0.1.
|
|
56
|
+
"@forgebook/story-format": "0.1.4"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "^18.2.0 || ^19.0.0",
|
|
60
60
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
61
|
-
"forgebook": "^0.1.
|
|
61
|
+
"forgebook": "^0.1.7"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/node": "24.19.2",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"vite": "8.3.5",
|
|
71
71
|
"vitest": "5.0.5",
|
|
72
72
|
"@forgebook/tools": "0.0.0",
|
|
73
|
-
"forgebook": "0.
|
|
74
|
-
"
|
|
73
|
+
"@forgebook/typescript-config": "0.0.0",
|
|
74
|
+
"forgebook": "0.1.7"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|