@razorwind/storybook 0.0.5 → 0.0.6
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/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +19 -19
- package/package.json +6 -5
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require("@razorwind/core/plugin"),t=require("@razorwind/core/utils"),n=require("node:path");function r(e){return e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`).replaceAll(`
|
|
2
|
-
`,`\\n`).replaceAll(`\r`,`\\r`)}function i(e){return typeof e==`string`?`"${r(e)}"`:typeof e==`number`||typeof e==`boolean`?String(e):e==null?`undefined`:JSON.stringify(e)}const a=/^(?:light|dark|dim|high-contrast|hc|default|base|theme)(?:[._-].+)?$/i;function o(e){return
|
|
2
|
+
`,`\\n`).replaceAll(`\r`,`\\r`)}function i(e){return typeof e==`string`?`"${r(e)}"`:typeof e==`number`||typeof e==`boolean`?String(e):e==null?`undefined`:JSON.stringify(e)}const a=/^(?:light|dark|dim|high-contrast|hc|default|base|theme)(?:[._-].+)?$/i;function o(e){return`$value`in e||`value`in e||`$ref`in e||`ref`in e}function s(e){if(typeof e.$description==`string`)return e.$description;if(typeof e.description==`string`)return e.description}function c(e,t){return typeof e.$type==`string`?e.$type:typeof e.type==`string`?e.type:t}function l(e){if(`$value`in e)return e.$value;if(`value`in e)return e.value;if(typeof e.$ref==`string`)return e.$ref;if(typeof e.ref==`string`)return e.ref}function u(e,n,r,i,a,d){if(!(0,t.isObject)(e))return;let f=c(e,r);if(o(e)){let r=l(e),o=n.join(`.`);d.push({path:o,type:f,value:r,cssValue:(0,t.formatTokenValue)(r,f),cssVar:(0,t.toCssVar)(o,a),description:s(e),theme:i});return}for(let[t,r]of Object.entries(e))t.startsWith(`$`)||u(r,[...n,t],f,i,a,d)}function d(e){if(!(0,t.isObject)(e))return[];let n=Object.keys(e).filter(e=>!e.startsWith(`$`));return n.length>0&&n.every(e=>a.test(e))?n.map(t=>({id:t,tokens:e[t]})):[{id:`default`,tokens:e}]}function f(e,t={}){let n=t.cssVarPrefix??`rw`,r=t.includeTypes?new Set(t.includeTypes):void 0,i=[];for(let t of d(e)){let e=t.id==="default"?void 0:t.id;u(t.tokens,[],void 0,e,n,i)}return r?i.filter(e=>!e.type||r.has(e.type)):i}function p(e,t){let n=new Map;for(let r of e){let e=r.path.split(`.`).slice(0,Math.max(t,1)).join(`.`)||r.path,i=n.get(e)??[];i.push(r),n.set(e,i)}return n}function m(e,t){return e===t?e.split(`.`).at(-1)??e:e.startsWith(`${t}.`)?e.slice(t.length+1):e.split(`.`).at(-1)??e}function h(e,t={}){return`import { ColorPalette, ColorItem } from "@storybook/addon-docs/blocks";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Color tokens rendered with Storybook's ColorPalette doc block.
|
|
@@ -9,7 +9,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
|
|
|
9
9
|
export function ColorPaletteBlock() {
|
|
10
10
|
return (
|
|
11
11
|
<ColorPalette>
|
|
12
|
-
${[...
|
|
12
|
+
${[...p(e.filter(e=>e.type===`color`),t.colorGroupBy??2).entries()].toSorted(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{let n=t.map(t=>` ${i(m(t.path,e))}: ${i(t.cssValue)}`).join(`,
|
|
13
13
|
`),r=t.find(e=>e.description)?.description??`${t.length} token${t.length===1?``:`s`}`;return` <ColorItem
|
|
14
14
|
title={${i(e)}}
|
|
15
15
|
subtitle={${i(r)}}
|
|
@@ -21,7 +21,7 @@ ${n}
|
|
|
21
21
|
</ColorPalette>
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
`}function
|
|
24
|
+
`}function g(e,t={}){let n=t.sampleText??`The quick brown fox jumps over the lazy dog`,r=e.filter(e=>e.type===`dimension`&&/(?:font|type|text).*size|size.*(?:font|type|text)/i.test(e.path)).map(e=>{let t=/^(\d+(?:\.\d+)?)/.exec(e.cssValue);return t?Number(t[1]):e.cssValue}),a=[...new Set(r)],o=e.find(e=>e.type===`fontFamily`)?.cssValue??`system-ui, sans-serif`,s=e.find(e=>e.type===`fontWeight`),c=s&&Number.parseFloat(s.cssValue)||400,l=a.length>0?`[${a.map(e=>i(e)).join(`, `)}]`:`[12, 14, 16, 20, 24, 32]`;return`import { Typeset } from "@storybook/addon-docs/blocks";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Typography tokens rendered with Storybook's Typeset doc block.
|
|
@@ -38,7 +38,7 @@ export function TypesetBlock() {
|
|
|
38
38
|
/>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
`}function
|
|
41
|
+
`}function _(e){return`import type { CSSProperties, ReactElement } from "react";
|
|
42
42
|
|
|
43
43
|
export interface TokenTableRow {
|
|
44
44
|
path: string;
|
|
@@ -142,7 +142,7 @@ export function TokenTableBlock({
|
|
|
142
142
|
</table>
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
`}function
|
|
145
|
+
`}function v(e){let t=e.titlePrefix??`Design Tokens`,n=e.hasColors?`
|
|
146
146
|
## Colors
|
|
147
147
|
|
|
148
148
|
<ColorPaletteBlock />
|
|
@@ -164,7 +164,7 @@ ${n}${i}
|
|
|
164
164
|
## All tokens
|
|
165
165
|
|
|
166
166
|
<TokenTableBlock />
|
|
167
|
-
`}function
|
|
167
|
+
`}function y(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
168
168
|
import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
169
169
|
|
|
170
170
|
<Meta title="${r(e.titlePrefix??`Design Tokens`)}/Colors" />
|
|
@@ -172,7 +172,7 @@ import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
|
172
172
|
# Colors
|
|
173
173
|
|
|
174
174
|
<ColorPaletteBlock />
|
|
175
|
-
`}function
|
|
175
|
+
`}function b(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
176
176
|
import { TypesetBlock } from "./blocks/Typeset";
|
|
177
177
|
|
|
178
178
|
<Meta title="${r(e.titlePrefix??`Design Tokens`)}/Typography" />
|
|
@@ -180,8 +180,8 @@ import { TypesetBlock } from "./blocks/Typeset";
|
|
|
180
180
|
# Typography
|
|
181
181
|
|
|
182
182
|
<TypesetBlock />
|
|
183
|
-
`}function
|
|
183
|
+
`}function x(){return`export { ColorPaletteBlock } from "./ColorPalette";
|
|
184
184
|
export { TokenTableBlock } from "./TokenTable";
|
|
185
185
|
export type { TokenTableBlockProps, TokenTableRow } from "./TokenTable";
|
|
186
186
|
export { TypesetBlock } from "./Typeset";
|
|
187
|
-
`}function
|
|
187
|
+
`}function S(e,n,r){return(0,t.createDocument)(e,n,{name:`razorwind-storybook`},r)}function C(e,t={}){let r=t.outDir??`storybook/tokens`,i=f(e.tokens,t),a=i.some(e=>e.type===`color`),o=i.some(e=>e.type===`fontFamily`||e.type===`fontWeight`||e.type===`typography`||e.type===`dimension`&&/(?:font|type|text).*size|size.*(?:font|type|text)/i.test(e.path)),s={[(0,n.join)(r,`blocks/ColorPalette.tsx`)]:S((0,n.join)(r,`blocks/ColorPalette.tsx`),h(i,t),`tsx`),[(0,n.join)(r,`blocks/Typeset.tsx`)]:S((0,n.join)(r,`blocks/Typeset.tsx`),g(i,t),`tsx`),[(0,n.join)(r,`blocks/TokenTable.tsx`)]:S((0,n.join)(r,`blocks/TokenTable.tsx`),_(i),`tsx`),[(0,n.join)(r,`blocks/index.ts`)]:S((0,n.join)(r,`blocks/index.ts`),x(),`typescript`),[(0,n.join)(r,`Tokens.mdx`)]:S((0,n.join)(r,`Tokens.mdx`),v({titlePrefix:t.titlePrefix,hasColors:a,hasTypography:o}),`mdx`)};return a&&(s[(0,n.join)(r,`Colors.mdx`)]=S((0,n.join)(r,`Colors.mdx`),y(t),`mdx`)),o&&(s[(0,n.join)(r,`Typography.mdx`)]=S((0,n.join)(r,`Typography.mdx`),b(t),`mdx`)),s[(0,n.join)(r,`tokens.json`)]=S((0,n.join)(r,`tokens.json`),`${JSON.stringify(i,null,2)}\n`,`json`),s}var w=(0,e.definePlugin)((e={})=>({name:`storybook`,generate:async t=>C(t,e)}));exports.default=w,exports.flattenTokens=f,Object.defineProperty(exports,"formatTokenValue",{enumerable:!0,get:function(){return t.formatTokenValue}}),exports.generateTokenDocs=C,exports.resolveTokenSets=d,Object.defineProperty(exports,"toCssVar",{enumerable:!0,get:function(){return t.toCssVar}});
|
package/dist/index.d.cts
CHANGED
|
@@ -104,7 +104,7 @@ declare function generateTokenDocs(spec: Schema, options?: StorybookPluginOption
|
|
|
104
104
|
* });
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
declare const _default: any;
|
|
107
|
+
declare const _default: (options: any) => import("@razorwind/core/plugin").Plugin;
|
|
108
108
|
//#endregion
|
|
109
109
|
export { type FlatToken, type StorybookPluginOptions, _default as default, flattenTokens, formatTokenValue, generateTokenDocs, resolveTokenSets, toCssVar };
|
|
110
110
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/flatten.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;UAuBiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA,eAAe;;;;;;EAOf;;;;;UAMe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;EAEA;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/flatten.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;UAuBiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA,eAAe;;;;;;EAOf;;;;;UAMe;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;EAEA;;;;UCyBe;EACf;EACA,QAAQ;;;;;;;;iBASM,iBACd,QAAQ,SAAS,eAAe,UAC/B;;;;iBAsBa,cACd,QAAQ,SAAS,eAAe,SAChC,UAAS,KAAK,2DACb;;;;;;iBCiPa,kBACd,MAAM,QACN,UAAS,yBACR,wBAAwB,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -104,7 +104,7 @@ declare function generateTokenDocs(spec: Schema, options?: StorybookPluginOption
|
|
|
104
104
|
* });
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
declare const _default: any;
|
|
107
|
+
declare const _default: (options: any) => import("@razorwind/core/plugin").Plugin;
|
|
108
108
|
//#endregion
|
|
109
109
|
export { type FlatToken, type StorybookPluginOptions, _default as default, flattenTokens, formatTokenValue, generateTokenDocs, resolveTokenSets, toCssVar };
|
|
110
110
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{definePlugin as e}from"@razorwind/core/plugin";import{createDocument as t,formatTokenValue as n,toCssVar as
|
|
2
|
-
`,`\\n`).replaceAll(`\r`,`\\r`)}function
|
|
1
|
+
import{definePlugin as e}from"@razorwind/core/plugin";import{createDocument as t,formatTokenValue as n,isObject as r,toCssVar as i}from"@razorwind/core/utils";import{join as a}from"node:path";function o(e){return e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`).replaceAll(`
|
|
2
|
+
`,`\\n`).replaceAll(`\r`,`\\r`)}function s(e){return typeof e==`string`?`"${o(e)}"`:typeof e==`number`||typeof e==`boolean`?String(e):e==null?`undefined`:JSON.stringify(e)}const c=/^(?:light|dark|dim|high-contrast|hc|default|base|theme)(?:[._-].+)?$/i;function l(e){return`$value`in e||`value`in e||`$ref`in e||`ref`in e}function u(e){if(typeof e.$description==`string`)return e.$description;if(typeof e.description==`string`)return e.description}function d(e,t){return typeof e.$type==`string`?e.$type:typeof e.type==`string`?e.type:t}function f(e){if(`$value`in e)return e.$value;if(`value`in e)return e.value;if(typeof e.$ref==`string`)return e.$ref;if(typeof e.ref==`string`)return e.ref}function p(e,t,a,o,s,c){if(!r(e))return;let m=d(e,a);if(l(e)){let r=f(e),a=t.join(`.`);c.push({path:a,type:m,value:r,cssValue:n(r,m),cssVar:i(a,s),description:u(e),theme:o});return}for(let[n,r]of Object.entries(e))n.startsWith(`$`)||p(r,[...t,n],m,o,s,c)}function m(e){if(!r(e))return[];let t=Object.keys(e).filter(e=>!e.startsWith(`$`));return t.length>0&&t.every(e=>c.test(e))?t.map(t=>({id:t,tokens:e[t]})):[{id:`default`,tokens:e}]}function h(e,t={}){let n=t.cssVarPrefix??`rw`,r=t.includeTypes?new Set(t.includeTypes):void 0,i=[];for(let t of m(e)){let e=t.id==="default"?void 0:t.id;p(t.tokens,[],void 0,e,n,i)}return r?i.filter(e=>!e.type||r.has(e.type)):i}function g(e,t){let n=new Map;for(let r of e){let e=r.path.split(`.`).slice(0,Math.max(t,1)).join(`.`)||r.path,i=n.get(e)??[];i.push(r),n.set(e,i)}return n}function _(e,t){return e===t?e.split(`.`).at(-1)??e:e.startsWith(`${t}.`)?e.slice(t.length+1):e.split(`.`).at(-1)??e}function v(e,t={}){return`import { ColorPalette, ColorItem } from "@storybook/addon-docs/blocks";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Color tokens rendered with Storybook's ColorPalette doc block.
|
|
@@ -9,10 +9,10 @@ import{definePlugin as e}from"@razorwind/core/plugin";import{createDocument as t
|
|
|
9
9
|
export function ColorPaletteBlock() {
|
|
10
10
|
return (
|
|
11
11
|
<ColorPalette>
|
|
12
|
-
${[...g(e.filter(e=>e.type===`color`),t.colorGroupBy??2).entries()].toSorted(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{let n=t.map(t=>` ${
|
|
12
|
+
${[...g(e.filter(e=>e.type===`color`),t.colorGroupBy??2).entries()].toSorted(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{let n=t.map(t=>` ${s(_(t.path,e))}: ${s(t.cssValue)}`).join(`,
|
|
13
13
|
`),r=t.find(e=>e.description)?.description??`${t.length} token${t.length===1?``:`s`}`;return` <ColorItem
|
|
14
|
-
title={${
|
|
15
|
-
subtitle={${
|
|
14
|
+
title={${s(e)}}
|
|
15
|
+
subtitle={${s(r)}}
|
|
16
16
|
colors={{
|
|
17
17
|
${n}
|
|
18
18
|
}}
|
|
@@ -21,7 +21,7 @@ ${n}
|
|
|
21
21
|
</ColorPalette>
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
`}function y(e,t={}){let n=t.sampleText??`The quick brown fox jumps over the lazy dog`,r=e.filter(e=>e.type===`dimension`&&/(?:font|type|text).*size|size.*(?:font|type|text)/i.test(e.path)).map(e=>{let t=/^(\d+(?:\.\d+)?)/.exec(e.cssValue);return t?Number(t[1]):e.cssValue}),i=[...new Set(r)],a=e.find(e=>e.type===`fontFamily`)?.cssValue??`system-ui, sans-serif`,
|
|
24
|
+
`}function y(e,t={}){let n=t.sampleText??`The quick brown fox jumps over the lazy dog`,r=e.filter(e=>e.type===`dimension`&&/(?:font|type|text).*size|size.*(?:font|type|text)/i.test(e.path)).map(e=>{let t=/^(\d+(?:\.\d+)?)/.exec(e.cssValue);return t?Number(t[1]):e.cssValue}),i=[...new Set(r)],a=e.find(e=>e.type===`fontFamily`)?.cssValue??`system-ui, sans-serif`,o=e.find(e=>e.type===`fontWeight`),c=o&&Number.parseFloat(o.cssValue)||400,l=i.length>0?`[${i.map(e=>s(e)).join(`, `)}]`:`[12, 14, 16, 20, 24, 32]`;return`import { Typeset } from "@storybook/addon-docs/blocks";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Typography tokens rendered with Storybook's Typeset doc block.
|
|
@@ -31,10 +31,10 @@ ${n}
|
|
|
31
31
|
export function TypesetBlock() {
|
|
32
32
|
return (
|
|
33
33
|
<Typeset
|
|
34
|
-
fontFamily={${
|
|
34
|
+
fontFamily={${s(a)}}
|
|
35
35
|
fontSizes={${l}}
|
|
36
|
-
fontWeight={${
|
|
37
|
-
sampleText={${
|
|
36
|
+
fontWeight={${s(c)}}
|
|
37
|
+
sampleText={${s(n)}}
|
|
38
38
|
/>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
@@ -50,12 +50,12 @@ export interface TokenTableRow {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const TOKENS: TokenTableRow[] = [
|
|
53
|
-
${e.map(e=>{let t=e.theme?
|
|
54
|
-
path: ${
|
|
55
|
-
type: ${e.type?
|
|
56
|
-
value: ${
|
|
57
|
-
cssVar: ${
|
|
58
|
-
description: ${e.description?
|
|
53
|
+
${e.map(e=>{let t=e.theme?s(e.theme):`undefined`;return` {
|
|
54
|
+
path: ${s(e.path)},
|
|
55
|
+
type: ${e.type?s(e.type):`undefined`},
|
|
56
|
+
value: ${s(e.cssValue)},
|
|
57
|
+
cssVar: ${s(e.cssVar)},
|
|
58
|
+
description: ${e.description?s(e.description):`undefined`},
|
|
59
59
|
theme: ${t}
|
|
60
60
|
}`}).join(`,
|
|
61
61
|
`)||``}
|
|
@@ -155,7 +155,7 @@ import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
|
155
155
|
import { TokenTableBlock } from "./blocks/TokenTable";
|
|
156
156
|
import { TypesetBlock } from "./blocks/Typeset";
|
|
157
157
|
|
|
158
|
-
<Meta title="${
|
|
158
|
+
<Meta title="${o(t)}/Overview" />
|
|
159
159
|
|
|
160
160
|
# ${t}
|
|
161
161
|
|
|
@@ -167,7 +167,7 @@ ${n}${r}
|
|
|
167
167
|
`}function S(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
168
168
|
import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
169
169
|
|
|
170
|
-
<Meta title="${
|
|
170
|
+
<Meta title="${o(e.titlePrefix??`Design Tokens`)}/Colors" />
|
|
171
171
|
|
|
172
172
|
# Colors
|
|
173
173
|
|
|
@@ -175,7 +175,7 @@ import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
|
175
175
|
`}function C(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
176
176
|
import { TypesetBlock } from "./blocks/Typeset";
|
|
177
177
|
|
|
178
|
-
<Meta title="${
|
|
178
|
+
<Meta title="${o(e.titlePrefix??`Design Tokens`)}/Typography" />
|
|
179
179
|
|
|
180
180
|
# Typography
|
|
181
181
|
|
|
@@ -184,5 +184,5 @@ import { TypesetBlock } from "./blocks/Typeset";
|
|
|
184
184
|
export { TokenTableBlock } from "./TokenTable";
|
|
185
185
|
export type { TokenTableBlockProps, TokenTableRow } from "./TokenTable";
|
|
186
186
|
export { TypesetBlock } from "./Typeset";
|
|
187
|
-
`}function T(e,n,r){return t(e,n,{name:`razorwind-storybook`},r)}function E(e,t={}){let n=t.outDir??`storybook/tokens`,r=h(e.tokens,t),
|
|
187
|
+
`}function T(e,n,r){return t(e,n,{name:`razorwind-storybook`},r)}function E(e,t={}){let n=t.outDir??`storybook/tokens`,r=h(e.tokens,t),i=r.some(e=>e.type===`color`),o=r.some(e=>e.type===`fontFamily`||e.type===`fontWeight`||e.type===`typography`||e.type===`dimension`&&/(?:font|type|text).*size|size.*(?:font|type|text)/i.test(e.path)),s={[a(n,`blocks/ColorPalette.tsx`)]:T(a(n,`blocks/ColorPalette.tsx`),v(r,t),`tsx`),[a(n,`blocks/Typeset.tsx`)]:T(a(n,`blocks/Typeset.tsx`),y(r,t),`tsx`),[a(n,`blocks/TokenTable.tsx`)]:T(a(n,`blocks/TokenTable.tsx`),b(r),`tsx`),[a(n,`blocks/index.ts`)]:T(a(n,`blocks/index.ts`),w(),`typescript`),[a(n,`Tokens.mdx`)]:T(a(n,`Tokens.mdx`),x({titlePrefix:t.titlePrefix,hasColors:i,hasTypography:o}),`mdx`)};return i&&(s[a(n,`Colors.mdx`)]=T(a(n,`Colors.mdx`),S(t),`mdx`)),o&&(s[a(n,`Typography.mdx`)]=T(a(n,`Typography.mdx`),C(t),`mdx`)),s[a(n,`tokens.json`)]=T(a(n,`tokens.json`),`${JSON.stringify(r,null,2)}\n`,`json`),s}var D=e((e={})=>({name:`storybook`,generate:async t=>E(t,e)}));export{D as default,h as flattenTokens,n as formatTokenValue,E as generateTokenDocs,m as resolveTokenSets,i as toCssVar};
|
|
188
188
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorwind/storybook",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Razorwind plugin that creates Storybook MDX token doc blocks from Razorwind design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -69,9 +69,10 @@
|
|
|
69
69
|
"types": "./dist/index.d.cts",
|
|
70
70
|
"typings": "dist/index.d.mts",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@power-plant/core": "^0.0.
|
|
72
|
+
"@power-plant/core": "^0.0.40",
|
|
73
73
|
"@power-plant/dtcg-schema": "^0.0.1",
|
|
74
|
-
"@razorwind/core": "^0.0.
|
|
74
|
+
"@razorwind/core": "^0.0.10",
|
|
75
|
+
"@stryke/type-checks": "^0.6.31"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
77
78
|
"@storybook/addon-docs": ">=8",
|
|
@@ -84,10 +85,10 @@
|
|
|
84
85
|
"storybook": { "optional": true }
|
|
85
86
|
},
|
|
86
87
|
"devDependencies": {
|
|
87
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
88
|
+
"@powerlines/plugin-tsdown": "^0.1.561",
|
|
88
89
|
"@types/node": "^25.9.5",
|
|
89
90
|
"typescript": "^6.0.3"
|
|
90
91
|
},
|
|
91
92
|
"publishConfig": { "access": "public" },
|
|
92
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "35f5d31c337fdedeb003c0d9eca72949d4305437"
|
|
93
94
|
}
|