@razorwind/storybook 0.0.78 → 0.0.79
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 +53 -19
- package/dist/index.d.cts +6 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.mjs +67 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require("@razorwind/core/plugin"),t=require("@razorwind/
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require("@razorwind/core/plugin"),t=require("@razorwind/core/lib/fonts"),n=require("@razorwind/core/utils"),r=require("@razorwind/docgen/generate"),i=require("@stryke/path/join");function a(e){return e===!0||e===`true`||e===1}function o(e,t){return e?`${e}:${t}`:t}function s(e){let t=e.theme??e.$theme;return typeof t==`string`&&t.length>0?t:void 0}function c(e,t){return e===`palette`||e===`$palette`?typeof t==`boolean`||typeof t==`number`||typeof t==`string`:(e===`theme`||e===`$theme`)&&typeof t==`string`}function l(e){let t=/* @__PURE__ */ new Map;function r(e,i,l,u,d){if(!(0,n.isObject)(e))return;let f=u||a(e.palette)||a(e.$palette),p=s(e)??d;if((0,n.isTokenLeaf)(e)){(f||p)&&t.set(o(l,i.join(`.`)),{...f&&{palette:!0},...p&&{childTheme:p}});return}for(let[t,n]of Object.entries(e))t.startsWith(`$`)&&t!==`$palette`&&t!==`$theme`||c(t,n)||r(n,[...i,t],l,f,p)}for(let t of(0,n.resolveTokenSets)(e)){let e=t.id==="default"?void 0:t.id;r(t.tokens,[],e,!1,void 0)}return t}function u(e,t={}){let r=t.cssVarPrefix,i=l(e);return(0,n.flattenTokens)(e,{includeTypes:t.includeTypes,shouldIncludeToken:e=>e.skipDocs!==!0,enrichToken:e=>{let t=i.get(o(e.theme,e.path));return{...e,cssVar:(0,n.toCssVar)(e.path,r),...e.type===`color`&&t}}})}function d(e){return e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`).replaceAll(`
|
|
2
2
|
`,`\\n`).replaceAll(`\r`,`\\r`)}function f(e){return typeof e==`string`?`"${d(e)}"`:typeof e==`number`||typeof e==`boolean`?String(e):e==null?`undefined`:JSON.stringify(e)}function p(e){let t=e.titlePrefix??`Design Tokens`,n=e.themeFiles?.[0],r=e.themeNames??[],i=e.tokenThemeNames??[],a=i.length>1?`
|
|
3
3
|
## Token-doc variants
|
|
4
4
|
|
|
@@ -71,7 +71,7 @@ import { ColorPaletteBlock } from "./blocks";
|
|
|
71
71
|
## Regenerate
|
|
72
72
|
|
|
73
73
|
Re-run Razorwind generate when tokens change to refresh docs under \`${e.outputPath}/\`.
|
|
74
|
-
`}const m=
|
|
74
|
+
`}const m=r.FONT_SPECIMEN_TEXT,h=/* @__PURE__ */ new Set([`fontFamily`,`fontWeight`,`typography`]),g=/font|typography|type|text|line[-_.]?height|letter[-_.]?spacing/i;function _(e){return h.has(e.type??``)?!0:(e.type===`dimension`||e.type===`number`)&&g.test(e.path)}function v(e,t){return e.some(e=>t.some(t=>e.path===t||e.path.startsWith(`${t}.`)))}const y=/^\{([^{}]+)\}$/,b=/^var\((--[^),\s]+)(?:\s*,[^)]*)?\)$/;function x(e){if(typeof e==`string`)return y.exec(e.trim())?.[1]?.trim()}function S(e){if(typeof e==`string`)return b.exec(e.trim())?.[1]}function C(e){let t=new Map(e.map(e=>[e.path,e])),r=new Map(e.map(e=>[(0,n.toThemeCssVar)(e.path),e])),i=e=>{let n=e,i=/* @__PURE__ */ new Set;for(let a=0;a<8;a++){if(i.has(n.path))return e.cssValue;i.add(n.path);let a=t.get(x(n.value)??``)??r.get(S(n.value)??S(n.cssValue)??``);if(!a||a.path===n.path)return n.cssValue;n=a}return e.cssValue};return e.map(e=>e.type===`color`?{...e,cssValue:i(e)}:e)}function w(e){return Object.keys(e).length>1}function ee(){return`/**
|
|
75
75
|
* Select a generated token variant. Callers may pass \`theme\` to override
|
|
76
76
|
* the generated fallback without requiring Storybook preview-hook context.
|
|
77
77
|
*/
|
|
@@ -84,7 +84,7 @@ export function resolveThemeVariant<T extends Record<string, unknown>>(
|
|
|
84
84
|
? (theme as keyof T & string)
|
|
85
85
|
: fallback;
|
|
86
86
|
}
|
|
87
|
-
`}function T(e,t){let
|
|
87
|
+
`}function T(e,t){let r=(0,n.resolveTokenSets)(e),i=r.filter(e=>!(0,n.isSharedThemeId)(e.id));return i.length<=1?{default:C(u(e,t))}:Object.fromEntries(i.map(e=>[e.id,C(u(H(r,e),t))]))}function E(e,t){let n=/* @__PURE__ */ 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 D(e,t){return e===t?e.split(`.`).at(-1)??e:e.startsWith(`${t}.`)?e.slice(t.length+1):e.split(`.`).at(-1)??e}function te(e,t={}){let n=t.colorGroupBy??2,r=Object.entries(e),i=r[0]?.[0]??`default`,a=w(e),o=(e,t=` `)=>[...E(e,n).entries()].toSorted(([e],[t])=>e.localeCompare(t)).map(([e,n])=>{let r=n.map(n=>`${t} ${f(D(n.path,e))}: ${f(n.cssValue)}`).join(`,
|
|
88
88
|
`),i=n.find(e=>e.description)?.description??`${n.length} token${n.length===1?``:`s`}`;return`${t}<ColorItem
|
|
89
89
|
title={${f(e)}}
|
|
90
90
|
subtitle={${f(i)}}
|
|
@@ -122,7 +122,7 @@ export function ColorPaletteBlock({ theme }: ColorPaletteBlockProps = {}) {
|
|
|
122
122
|
|
|
123
123
|
return COLOR_VARIANTS[activeTheme];
|
|
124
124
|
}
|
|
125
|
-
`}function O(e,
|
|
125
|
+
`}function O(e,n={}){let r=n.sampleText??m,i=w(e),a=Object.entries(e),o=a[0]?.[0]??`default`,s=e=>{let i=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(i)],o=(0,t.pickFontByRole)(n.fonts,t.SANS_ROLES),s=(o?(0,t.cssFontFamily)(o):void 0)??e.find(e=>e.type===`fontFamily`)?.cssValue??`system-ui, sans-serif`,c=e.find(e=>e.type===`fontWeight`),l=c&&Number.parseFloat(c.cssValue)||400,u=a.length>0?`[${a.map(e=>f(e)).join(`, `)}]`:`[12, 14, 16, 20, 24, 32]`;return`<Typeset
|
|
126
126
|
fontFamily={${f(s)}}
|
|
127
127
|
fontSizes={${u}}
|
|
128
128
|
fontWeight={${f(l)}}
|
|
@@ -365,11 +365,13 @@ import { IconGalleryBlock } from "./blocks/IconGallery";
|
|
|
365
365
|
# Icons
|
|
366
366
|
|
|
367
367
|
<IconGalleryBlock />
|
|
368
|
-
`}function N(e,
|
|
369
|
-
family: ${f(
|
|
370
|
-
title: ${f(k(e,`title`)??
|
|
368
|
+
`}function N(e,t={}){let n=t.sampleText??m,i=e.map(e=>{let t=k(e,`name`)??`unknown`,n=(0,r.resolveFontStack)(e);return` ${f(t)}: {
|
|
369
|
+
family: ${f(n)},
|
|
370
|
+
title: ${f(k(e,`title`)??t)},
|
|
371
|
+
weights: [${(0,r.resolveFontWeights)(e).join(`, `)}]
|
|
371
372
|
}`}).join(`,
|
|
372
|
-
`),a=`[${
|
|
373
|
+
`),a=`[${r.FONT_SPECIMEN_SIZES.join(`, `)}]`,o=Object.entries(r.FONT_WEIGHT_NAMES).map(([e,t])=>` ${e}: ${f(t)}`).join(`,
|
|
374
|
+
`);return`import type { CSSProperties, ReactElement } from "react";
|
|
373
375
|
|
|
374
376
|
export interface FontSpecimenBlockProps {
|
|
375
377
|
/** Font entry name. Defaults to the first font. */
|
|
@@ -378,31 +380,49 @@ export interface FontSpecimenBlockProps {
|
|
|
378
380
|
sampleText?: string;
|
|
379
381
|
/** Override the previewed sizes. */
|
|
380
382
|
sizes?: number[];
|
|
383
|
+
/** Override the previewed font weights. Defaults to the weights the font provides. */
|
|
384
|
+
weights?: number[];
|
|
381
385
|
}
|
|
382
386
|
|
|
383
|
-
const FONT_FAMILIES: Record<
|
|
387
|
+
const FONT_FAMILIES: Record<
|
|
388
|
+
string,
|
|
389
|
+
{ family: string; title: string; weights: number[] }
|
|
390
|
+
> = {
|
|
384
391
|
${i||` // No fonts`}
|
|
385
392
|
};
|
|
386
393
|
|
|
394
|
+
const WEIGHT_NAMES: Record<number, string> = {
|
|
395
|
+
${o}
|
|
396
|
+
};
|
|
397
|
+
|
|
387
398
|
const DEFAULT_FONT = ${f(e[0]?k(e[0],`name`)??`unknown`:`unknown`)};
|
|
388
399
|
const DEFAULT_SIZES = ${a};
|
|
389
|
-
const DEFAULT_SAMPLE_TEXT = ${f(
|
|
400
|
+
const DEFAULT_SAMPLE_TEXT = ${f(n)};
|
|
401
|
+
const WEIGHT_SAMPLE_SIZE = ${r.FONT_WEIGHT_SPECIMEN_SIZE};
|
|
390
402
|
|
|
391
403
|
const labelStyle: CSSProperties = {
|
|
392
404
|
display: "block",
|
|
393
405
|
fontSize: "12px",
|
|
406
|
+
fontWeight: 400,
|
|
394
407
|
lineHeight: 1.4,
|
|
395
408
|
fontFamily: "system-ui, sans-serif",
|
|
396
409
|
color: "rgba(128, 128, 128, 0.9)"
|
|
397
410
|
};
|
|
398
411
|
|
|
412
|
+
function weightLabel(weight: number): string {
|
|
413
|
+
const weightName = WEIGHT_NAMES[weight];
|
|
414
|
+
|
|
415
|
+
return weightName ? \`\${weight} · \${weightName}\` : String(weight);
|
|
416
|
+
}
|
|
417
|
+
|
|
399
418
|
/**
|
|
400
419
|
* Font specimen previews for Storybook MDX docs.
|
|
401
420
|
*/
|
|
402
421
|
export function FontSpecimenBlock({
|
|
403
422
|
name,
|
|
404
423
|
sampleText = DEFAULT_SAMPLE_TEXT,
|
|
405
|
-
sizes = DEFAULT_SIZES
|
|
424
|
+
sizes = DEFAULT_SIZES,
|
|
425
|
+
weights
|
|
406
426
|
}: FontSpecimenBlockProps = {}): ReactElement {
|
|
407
427
|
const entry = (name && FONT_FAMILIES[name]) || FONT_FAMILIES[DEFAULT_FONT];
|
|
408
428
|
|
|
@@ -419,7 +439,7 @@ export function FontSpecimenBlock({
|
|
|
419
439
|
lineHeight: 1.25,
|
|
420
440
|
margin: "0 0 0.5em"
|
|
421
441
|
}}>
|
|
422
|
-
${
|
|
442
|
+
${r.FONT_CHARACTER_SET}
|
|
423
443
|
</div>
|
|
424
444
|
{sizes.map(size => (
|
|
425
445
|
<div
|
|
@@ -434,26 +454,40 @@ export function FontSpecimenBlock({
|
|
|
434
454
|
{sampleText}
|
|
435
455
|
</div>
|
|
436
456
|
))}
|
|
457
|
+
{(weights ?? entry.weights).map(weight => (
|
|
458
|
+
<div
|
|
459
|
+
key={\`weight-\${weight}\`}
|
|
460
|
+
style={{
|
|
461
|
+
fontFamily: entry.family,
|
|
462
|
+
fontSize: \`\${WEIGHT_SAMPLE_SIZE}px\`,
|
|
463
|
+
fontWeight: weight,
|
|
464
|
+
lineHeight: 1.45,
|
|
465
|
+
margin: "0 0 0.4em"
|
|
466
|
+
}}>
|
|
467
|
+
<span style={labelStyle}>{weightLabel(weight)}</span>
|
|
468
|
+
{sampleText}
|
|
469
|
+
</div>
|
|
470
|
+
))}
|
|
437
471
|
</div>
|
|
438
472
|
);
|
|
439
473
|
}
|
|
440
|
-
`}function P(e){let
|
|
474
|
+
`}function P(e){let t=e.titlePrefix??`Design Tokens`,n=e.fonts.map(t=>{let n=k(t,`name`)??`unknown`;return`- [${k(t,`title`)??n}](./Fonts/${e.slugs.get(t)??(0,r.fontSlug)(t)}.mdx)`});return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
441
475
|
|
|
442
|
-
<Meta title="${d(
|
|
476
|
+
<Meta title="${d(t)}/Fonts" />
|
|
443
477
|
|
|
444
478
|
# Fonts
|
|
445
479
|
|
|
446
480
|
${e.fonts.length} font${e.fonts.length===1?``:`s`} in the design system.
|
|
447
481
|
|
|
448
|
-
${
|
|
482
|
+
${n.join(`
|
|
449
483
|
`)}
|
|
450
|
-
`}function F(e,n
|
|
484
|
+
`}function F(e,t,n={}){let i=n.titlePrefix??`Design Tokens`,a=k(e,`name`)??`unknown`,o=k(e,`title`)??a;return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
451
485
|
|
|
452
486
|
<Meta title="${d(i)}/Fonts/${d(o)}" />
|
|
453
487
|
|
|
454
488
|
# ${o}
|
|
455
489
|
|
|
456
|
-
${(0,
|
|
490
|
+
${(0,r.renderFontBody)(e,n.sampleText,n.fontAssetBaseUrl)}
|
|
457
491
|
`}function oe(e=!0,t=!0){return`export { ColorPaletteBlock } from "./ColorPalette";
|
|
458
492
|
export type { ColorPaletteBlockProps } from "./ColorPalette";
|
|
459
493
|
${e?`export { IconGalleryBlock } from "./IconGallery";
|
|
@@ -463,7 +497,7 @@ export type { FontSpecimenBlockProps } from "./FontSpecimen";
|
|
|
463
497
|
export type { TokenTableBlockProps, TokenTableRow } from "./TokenTable";
|
|
464
498
|
export { TypesetBlock } from "./Typeset";
|
|
465
499
|
export type { TypesetBlockProps } from "./Typeset";
|
|
466
|
-
`}const I=/* @__PURE__ */ new Set(/* @__PURE__ */ `base.colorPrimary.colorSecondary.appBg.appContentBg.appHoverBg.appPreviewBg.appBorderColor.appBorderRadius.fontBase.fontCode.textColor.textInverseColor.textMutedColor.barTextColor.barHoverColor.barSelectedColor.barBg.buttonBg.buttonBorder.booleanBg.booleanSelectedBg.inputBg.inputBorder.inputTextColor.inputBorderRadius.brandTitle.brandUrl.brandImage.brandTarget.gridCellSize`.split(`.`));function L(e){return A(e)?e.base===`light`||e.base===`dark`:!1}function R(e){return A(e)?L(e)?!0:Object.keys(e).some(e=>I.has(e)):!1}function z(e){if(!A(e)||R(e))return!1;let t=Object.values(e);return t.length>0&&t.every(R)}function B(e,t,n){return t.base===`light`||t.base===`dark`?t.base:`${e} ${n??``}`.toLowerCase().includes(`light`)?`light`:`dark`}function V(e){return/^[a-z_$][\w$]*$/i.test(e)?e:f(e)}function H(e,t){let
|
|
500
|
+
`}const I=/* @__PURE__ */ new Set(/* @__PURE__ */ `base.colorPrimary.colorSecondary.appBg.appContentBg.appHoverBg.appPreviewBg.appBorderColor.appBorderRadius.fontBase.fontCode.textColor.textInverseColor.textMutedColor.barTextColor.barHoverColor.barSelectedColor.barBg.buttonBg.buttonBorder.booleanBg.booleanSelectedBg.inputBg.inputBorder.inputTextColor.inputBorderRadius.brandTitle.brandUrl.brandImage.brandTarget.gridCellSize`.split(`.`));function L(e){return A(e)?e.base===`light`||e.base===`dark`:!1}function R(e){return A(e)?L(e)?!0:Object.keys(e).some(e=>I.has(e)):!1}function z(e){if(!A(e)||R(e))return!1;let t=Object.values(e);return t.length>0&&t.every(R)}function B(e,t,n){return t.base===`light`||t.base===`dark`?t.base:`${e} ${n??``}`.toLowerCase().includes(`light`)?`light`:`dark`}function V(e){return/^[a-z_$][\w$]*$/i.test(e)?e:f(e)}function H(e,t){let r=e.find(e=>e.id===n.SHARED_THEME_ID);return!r||(0,n.isSharedThemeId)(t.id)?t.tokens:(0,n.mergeTokenTrees)(t.tokens,r.tokens)}function U(e){return A(e)&&`$value`in e&&!(`colorSpace`in e)&&!(`hex`in e)?e.$value:e}function W(e,t){let n=U(e),r=/* @__PURE__ */ new Set;for(let e=0;e<8;e++){let e=x(n);if(!e||r.has(e))break;r.add(e);let i=t.get(e);if(!i)break;n=i.value}return n}function G(e){return e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:(0,n.formatTokenValue)(e)}function K(e,t){let r=(0,n.resolveTokenSets)(e),i=r.find(e=>e.id===t)??(r.length===1?r[0]:void 0),a=i?H(r,i):e,o=/* @__PURE__ */ new Map;for(let e of u(a))(!o.get(e.path)||e.theme===t)&&o.set(e.path,e);return o}function se(e,t){let n={...e};for(let[r,i]of Object.entries(e))r!==`base`&&i!==void 0&&(n[r]=G(W(i,t)));return n}function ce(e,t,n,r,i){let a=se(t,K(i.tokens,e));return q(B(e,a,i.theme),a,n,r)}function q(e,n,r,i){let a=(0,t.pickFontByRole)(i,t.SANS_ROLES),o=(0,t.pickFontByRole)(i,t.MONO_ROLES);return{brandTarget:`_blank`,base:e||`light`,...n,brandTitle:n.brandTitle??r.title,brandUrl:n.brandUrl??r.homepage,brandImage:n.brandImage??r.logo,fontBase:n.fontBase??(a?(0,t.cssFontFamily)(a):void 0),fontCode:n.fontCode??(o?(0,t.cssFontFamily)(o):void 0)}}function J(e,t=``){return`create({\n${Object.entries(e).filter(([,e])=>e!==void 0).map(([e,n])=>`${t} ${e}: ${f(n)}`).join(`,
|
|
467
501
|
`)}\n${t}})`}function Y(e){return`import { create } from "storybook/theming";
|
|
468
502
|
|
|
469
503
|
/**
|
|
@@ -483,4 +517,4 @@ export default {
|
|
|
483
517
|
${Object.entries(e).map(([e,t])=>` ${V(e)}: ${J(t,` `)}`).join(`,
|
|
484
518
|
`)}
|
|
485
519
|
};
|
|
486
|
-
`}function Z(e){if(L(e))return Y(e);let t=Object.entries(e);if(t.length!==1)return X(e);let[,n]=t[0]??[];return n?Y(n):X(e)}function Q(e,t,
|
|
520
|
+
`}function Z(e){if(L(e))return Y(e);let t=Object.entries(e);if(t.length!==1)return X(e);let[,n]=t[0]??[];return n?Y(n):X(e)}function Q(e,t,r,i){let a=(e,n)=>ce(e,n,r,t.fonts,t);if(z(e))return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,a(e,t)]));let o=(0,n.resolveTokenSets)(t.tokens),s=o.filter(e=>!(0,n.isSharedThemeId)(e.id));if(s.length>1){let e={};for(let t of s){let n=i(H(o,t));if(z(n)){let r=n[t.id];if(r){e[t.id]=a(t.id,r);continue}for(let[t,r]of Object.entries(n))e[t]=a(t,r);continue}R(n)&&(e[t.id]=a(t.id,n))}return e}if(R(e)){let n=s[0]&&s[0].id!=="default"?s[0].id:t.theme??`default`;return{[n]:a(n,e)}}return{}}const le=e=>(t,r,a)=>(0,n.createDocument)((0,i.joinPaths)(e,t),r,{name:`razorwind-storybook`},!1,a);function $(e,t={}){let a=t.outputPath??`storybook/tokens`,o=(0,n.resolveSchemaIdentity)(e),s=t.titlePrefix??o.title??`Design Tokens`,c={...t,titlePrefix:s,cssVarPrefix:t.cssVarPrefix??(0,n.cssVarPrefixFromName)(e.name)},l=u(e.tokens,c),d=T(e.tokens,c),f=l.some(e=>e.type===`color`),m=e.fonts&&Object.keys(e.fonts).length>0||l.some(_),h=v(l,[`size`]),g=v(l,[`space`,`spacing`]),y=!t.skipIcons&&A(e.icons)&&Object.keys(e.icons).length>0,b=t.skipFonts?[]:(0,r.extractFonts)(e.fonts),x=b.length>0,S=(0,r.fontSlugs)(b),C=le(a),E={[(0,i.joinPaths)(a,`blocks/ColorPalette.tsx`)]:C(`blocks/ColorPalette.tsx`,te(d,c),`tsx`),[(0,i.joinPaths)(a,`blocks/Typeset.tsx`)]:C(`blocks/Typeset.tsx`,O(d,{...c,fonts:e.fonts}),`tsx`),[(0,i.joinPaths)(a,`blocks/TokenTable.tsx`)]:C(`blocks/TokenTable.tsx`,ne(d),`tsx`),[(0,i.joinPaths)(a,`blocks/index.ts`)]:C(`blocks/index.ts`,oe(y,x),`typescript`),[(0,i.joinPaths)(a,`Tokens.mdx`)]:C(`Tokens.mdx`,re({titlePrefix:s,hasColors:f,hasTypography:m,hasSizes:h,hasSpaces:g,hasFonts:x}),`mdx`)};if(y&&(E[(0,i.joinPaths)(a,`blocks/IconGallery.tsx`)]=C(`blocks/IconGallery.tsx`,j(e.icons),`tsx`)),w(d)&&(E[(0,i.joinPaths)(a,`blocks/ThemeVariant.ts`)]=C(`blocks/ThemeVariant.ts`,ee(),`typescript`)),f&&(E[(0,i.joinPaths)(a,`Colors.mdx`)]=C(`Colors.mdx`,ie(c),`mdx`)),m&&(E[(0,i.joinPaths)(a,`Typography.mdx`)]=C(`Typography.mdx`,ae(c),`mdx`)),y&&(E[(0,i.joinPaths)(a,`Icons.mdx`)]=C(`Icons.mdx`,M(c),`mdx`)),x){E[(0,i.joinPaths)(a,`blocks/FontSpecimen.tsx`)]=C(`blocks/FontSpecimen.tsx`,N(b,c),`tsx`),E[(0,i.joinPaths)(a,`Fonts.mdx`)]=C(`Fonts.mdx`,P({...c,fonts:b,slugs:S}),`mdx`);for(let e of b){let t=S.get(e)??(0,r.fontSlug)(e),n=k(e,`name`)??`unknown`,o=(0,i.joinPaths)(`Fonts`,`${t}.mdx`);E[(0,i.joinPaths)(a,o)]=C(o,F(e,n,c),`mdx`)}}E[(0,i.joinPaths)(a,`tokens.json`)]=C(`tokens.json`,`${JSON.stringify(l,null,2)}\n`,`json`);let D;if(t.mapTheme){let n=Q(t.mapTheme(e.tokens),e,o,t.mapTheme);Object.keys(n).length>0&&(D=Object.keys(n),E[(0,i.joinPaths)(a,`theme.ts`)]=C(`theme.ts`,Z(n),`typescript`))}let I=`INSTALL.md`;return E[(0,i.joinPaths)(a,I)]=C(I,t.installGuide??p({outputPath:a,titlePrefix:s,themeFiles:D?[`theme.ts`]:void 0,themeNames:D,tokenThemeNames:Object.keys(d)}),`markdown`),E}var ue=(0,e.definePlugin)(e=>({name:`storybook`,themeGeneration:`combined`,generate:async(t,n)=>$(t,{fontAssetBaseUrl:n.fontAssetBaseUrl,...e})}));exports.applyBrandDefaults=q,exports.default=ue,Object.defineProperty(exports,"extractFonts",{enumerable:!0,get:function(){return r.extractFonts}}),exports.flattenTokens=u,Object.defineProperty(exports,"fontSlug",{enumerable:!0,get:function(){return r.fontSlug}}),Object.defineProperty(exports,"fontSlugs",{enumerable:!0,get:function(){return r.fontSlugs}}),Object.defineProperty(exports,"formatTokenValue",{enumerable:!0,get:function(){return n.formatTokenValue}}),exports.generateTokenDocs=$,exports.normalizeThemes=Q,exports.renderFontMdx=F,exports.renderFontSpecimenBlock=N,exports.renderFontsMdx=P,exports.renderInstallMd=p,exports.renderThemeFile=Z,Object.defineProperty(exports,"resolveFontStack",{enumerable:!0,get:function(){return r.resolveFontStack}}),Object.defineProperty(exports,"resolveFontWeights",{enumerable:!0,get:function(){return r.resolveFontWeights}}),exports.resolveTokenSets=n.resolveTokenSets,Object.defineProperty(exports,"toCssVar",{enumerable:!0,get:function(){return n.toCssVar}});
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { PartialKeys } from "@stryke/types/base";
|
|
|
3
3
|
import { Fonts, Schema, Tokens as Tokens$1 } from "@razorwind/core/schema";
|
|
4
4
|
import { formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
5
5
|
import { GeneratorFunctionResult } from "@power-plant/core";
|
|
6
|
-
import { extractFonts, fontSlug, fontSlugs, resolveFontStack } from "@razorwind/docgen/generate";
|
|
6
|
+
import { extractFonts, fontSlug, fontSlugs, resolveFontStack, resolveFontWeights } from "@razorwind/docgen/generate";
|
|
7
7
|
//#region src/types.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* A flattened design token ready for documentation rendering.
|
|
@@ -79,6 +79,8 @@ type GenerateStorybookTheme = (tokens: Tokens | Record<string, Tokens>) => Story
|
|
|
79
79
|
* Options for the Razorwind Storybook token docs generator.
|
|
80
80
|
*/
|
|
81
81
|
interface StorybookPluginOptions {
|
|
82
|
+
/** Absolute HTTP(S) base URL for generated local font asset references. */
|
|
83
|
+
fontAssetBaseUrl?: string;
|
|
82
84
|
/**
|
|
83
85
|
* Directory (relative to the execution cwd) where generated docs are written.
|
|
84
86
|
*
|
|
@@ -170,14 +172,14 @@ declare function renderInstallMd(options: {
|
|
|
170
172
|
//#region src/generate.d.ts
|
|
171
173
|
/**
|
|
172
174
|
* Build a React FontSpecimen doc block previewing each font at a range of
|
|
173
|
-
* sizes.
|
|
175
|
+
* sizes and at each of its font weights.
|
|
174
176
|
*/
|
|
175
177
|
declare function renderFontSpecimenBlock(fonts: Record<string, unknown>[], options?: Pick<StorybookPluginOptions, "sampleText">): string;
|
|
176
178
|
declare function renderFontsMdx(options: Pick<StorybookPluginOptions, "titlePrefix"> & {
|
|
177
179
|
fonts: Record<string, unknown>[];
|
|
178
180
|
slugs: Map<Record<string, unknown>, string>;
|
|
179
181
|
}): string;
|
|
180
|
-
declare function renderFontMdx(font: Record<string, unknown>, _fontName: string, options?: Pick<StorybookPluginOptions, "sampleText" | "titlePrefix">): string;
|
|
182
|
+
declare function renderFontMdx(font: Record<string, unknown>, _fontName: string, options?: Pick<StorybookPluginOptions, "fontAssetBaseUrl" | "sampleText" | "titlePrefix">): string;
|
|
181
183
|
/**
|
|
182
184
|
* Fill Storybook brand fields from Schema identity when the mapped theme omits them.
|
|
183
185
|
*/
|
|
@@ -243,5 +245,5 @@ declare function generateTokenDocs(spec: Schema, options?: StorybookPluginOption
|
|
|
243
245
|
*/
|
|
244
246
|
declare const _default: (options?: StorybookPluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
|
|
245
247
|
//#endregion
|
|
246
|
-
export { type FlatToken, type GenerateStorybookTheme, type StorybookPluginOptions, type StorybookTheme, type StorybookThemePartial, type StorybookThemeResult, applyBrandDefaults, _default as default, extractFonts, flattenTokens, fontSlug, fontSlugs, formatTokenValue, generateTokenDocs, normalizeThemes, renderFontMdx, renderFontSpecimenBlock, renderFontsMdx, renderInstallMd, renderThemeFile, resolveFontStack, resolveTokenSets, toCssVar };
|
|
248
|
+
export { type FlatToken, type GenerateStorybookTheme, type StorybookPluginOptions, type StorybookTheme, type StorybookThemePartial, type StorybookThemeResult, applyBrandDefaults, _default as default, extractFonts, flattenTokens, fontSlug, fontSlugs, formatTokenValue, generateTokenDocs, normalizeThemes, renderFontMdx, renderFontSpecimenBlock, renderFontsMdx, renderInstallMd, renderThemeFile, resolveFontStack, resolveFontWeights, resolveTokenSets, toCssVar };
|
|
247
249
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["Tokens"],"sources":["../src/types.ts","../src/flatten.ts","../src/install.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;UAwBiB;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;UAQe;;EAEf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,wBAAwB,YAAY;KAEpC,uBACV,wBAAwB,eAAe;;;;;;KAO7B,0BACV,QAAQ,SAAS,eAAe,YAC7B;;;;UAKY;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["Tokens"],"sources":["../src/types.ts","../src/flatten.ts","../src/install.ts","../src/generate.ts","../src/index.ts"],"mappings":";;;;;;;;;;UAwBiB;;EAEf;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;UAQe;;EAEf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,wBAAwB,YAAY;KAEpC,uBACV,wBAAwB,eAAe;;;;;;KAO7B,0BACV,QAAQ,SAAS,eAAe,YAC7B;;;;UAKY;;EAEf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA,eAAe;;;;;;EAOf;;;;;;;;;;;;;;EAeA,WAAW;;;;;;EAOX;;;;;;EAOA;;;;;EAMA;;;;;;;iBCrEc,cACd,QAAQA,WAAS,eAAeA,WAChC,UAAS,KAAK,2DACb;;;;;;;;iBC3Fa,gBAAgB;EAC9B;EACA;EACA;EACA;EACA;;;;;;;;iBC+tBc,wBACd,OAAO,2BACP,UAAS,KAAK;iBA2HA,eACd,SAAS,KAAK;EACZ,OAAO;EACP,OAAO,IAAI;;iBAwBC,cACd,MAAM,yBACN,mBACA,UAAS,KACP;;;;iBA6PY,mBACd,wBACA,OAAO,YAAY,yBACnB;EAAY;EAAgB;EAAmB;GAC/C,QAAQ,QACP;;;;;;;;;iBAkEa,gBACd,OAAO,iBAAiB,eAAe;;;;;;iBAwBzB,gBACd,iBACA,MAAM,KAAK,uCACX;EAAY;EAAgB;EAAmB;GAC/C,UAAU,YAAY,sCACrB,eAAe;;;;iBAwEF,kBACd,MAAM,QACN,UAAS,yBACR,wBAAwB,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { extractFonts, fontSlug, fontSlugs, resolveFontStack } from "@razorwind/docgen/generate";
|
|
2
1
|
import { formatTokenValue, resolveTokenSets, toCssVar } from "@razorwind/core/utils";
|
|
2
|
+
import { extractFonts, fontSlug, fontSlugs, resolveFontStack, resolveFontWeights } from "@razorwind/docgen/generate";
|
|
3
3
|
import { TokenType, Tokens } from "@power-plant/dtcg-schema";
|
|
4
4
|
import { PartialKeys } from "@stryke/types/base";
|
|
5
5
|
import { Fonts, Schema, Tokens as Tokens$1 } from "@razorwind/core/schema";
|
|
@@ -79,6 +79,8 @@ type GenerateStorybookTheme = (tokens: Tokens | Record<string, Tokens>) => Story
|
|
|
79
79
|
* Options for the Razorwind Storybook token docs generator.
|
|
80
80
|
*/
|
|
81
81
|
interface StorybookPluginOptions {
|
|
82
|
+
/** Absolute HTTP(S) base URL for generated local font asset references. */
|
|
83
|
+
fontAssetBaseUrl?: string;
|
|
82
84
|
/**
|
|
83
85
|
* Directory (relative to the execution cwd) where generated docs are written.
|
|
84
86
|
*
|
|
@@ -170,14 +172,14 @@ declare function renderInstallMd(options: {
|
|
|
170
172
|
//#region src/generate.d.ts
|
|
171
173
|
/**
|
|
172
174
|
* Build a React FontSpecimen doc block previewing each font at a range of
|
|
173
|
-
* sizes.
|
|
175
|
+
* sizes and at each of its font weights.
|
|
174
176
|
*/
|
|
175
177
|
declare function renderFontSpecimenBlock(fonts: Record<string, unknown>[], options?: Pick<StorybookPluginOptions, "sampleText">): string;
|
|
176
178
|
declare function renderFontsMdx(options: Pick<StorybookPluginOptions, "titlePrefix"> & {
|
|
177
179
|
fonts: Record<string, unknown>[];
|
|
178
180
|
slugs: Map<Record<string, unknown>, string>;
|
|
179
181
|
}): string;
|
|
180
|
-
declare function renderFontMdx(font: Record<string, unknown>, _fontName: string, options?: Pick<StorybookPluginOptions, "sampleText" | "titlePrefix">): string;
|
|
182
|
+
declare function renderFontMdx(font: Record<string, unknown>, _fontName: string, options?: Pick<StorybookPluginOptions, "fontAssetBaseUrl" | "sampleText" | "titlePrefix">): string;
|
|
181
183
|
/**
|
|
182
184
|
* Fill Storybook brand fields from Schema identity when the mapped theme omits them.
|
|
183
185
|
*/
|
|
@@ -243,5 +245,5 @@ declare function generateTokenDocs(spec: Schema, options?: StorybookPluginOption
|
|
|
243
245
|
*/
|
|
244
246
|
declare const _default: (options?: StorybookPluginOptions | undefined) => import("@razorwind/core/plugin").Plugin;
|
|
245
247
|
//#endregion
|
|
246
|
-
export { type FlatToken, type GenerateStorybookTheme, type StorybookPluginOptions, type StorybookTheme, type StorybookThemePartial, type StorybookThemeResult, applyBrandDefaults, _default as default, extractFonts, flattenTokens, fontSlug, fontSlugs, formatTokenValue, generateTokenDocs, normalizeThemes, renderFontMdx, renderFontSpecimenBlock, renderFontsMdx, renderInstallMd, renderThemeFile, resolveFontStack, resolveTokenSets, toCssVar };
|
|
248
|
+
export { type FlatToken, type GenerateStorybookTheme, type StorybookPluginOptions, type StorybookTheme, type StorybookThemePartial, type StorybookThemeResult, applyBrandDefaults, _default as default, extractFonts, flattenTokens, fontSlug, fontSlugs, formatTokenValue, generateTokenDocs, normalizeThemes, renderFontMdx, renderFontSpecimenBlock, renderFontsMdx, renderInstallMd, renderThemeFile, resolveFontStack, resolveFontWeights, resolveTokenSets, toCssVar };
|
|
247
249
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{definePlugin as e}from"@razorwind/core/plugin";import{
|
|
1
|
+
import{definePlugin as e}from"@razorwind/core/plugin";import{MONO_ROLES as t,SANS_ROLES as n,cssFontFamily as r,pickFontByRole as i}from"@razorwind/core/lib/fonts";import{SHARED_THEME_ID as a,createDocument as o,cssVarPrefixFromName as s,flattenTokens as c,formatTokenValue as l,isObject as u,isSharedThemeId as d,isTokenLeaf as f,mergeTokenTrees as p,resolveSchemaIdentity as m,resolveTokenSets as h,toCssVar as g,toCssVar as _,toThemeCssVar as v}from"@razorwind/core/utils";import{FONT_CHARACTER_SET as y,FONT_SPECIMEN_SIZES as b,FONT_SPECIMEN_TEXT as x,FONT_WEIGHT_NAMES as S,FONT_WEIGHT_SPECIMEN_SIZE as ee,extractFonts as te,extractFonts as ne,fontSlug as re,fontSlug as C,fontSlugs as ie,fontSlugs as ae,renderFontBody as oe,resolveFontStack as se,resolveFontStack as ce,resolveFontWeights as le,resolveFontWeights as ue}from"@razorwind/docgen/generate";import{joinPaths as w}from"@stryke/path/join";function T(e){return e===!0||e===`true`||e===1}function E(e,t){return e?`${e}:${t}`:t}function de(e){let t=e.theme??e.$theme;return typeof t==`string`&&t.length>0?t:void 0}function fe(e,t){return e===`palette`||e===`$palette`?typeof t==`boolean`||typeof t==`number`||typeof t==`string`:(e===`theme`||e===`$theme`)&&typeof t==`string`}function pe(e){let t=/* @__PURE__ */ new Map;function n(e,r,i,a,o){if(!u(e))return;let s=a||T(e.palette)||T(e.$palette),c=de(e)??o;if(f(e)){(s||c)&&t.set(E(i,r.join(`.`)),{...s&&{palette:!0},...c&&{childTheme:c}});return}for(let[t,a]of Object.entries(e))t.startsWith(`$`)&&t!==`$palette`&&t!==`$theme`||fe(t,a)||n(a,[...r,t],i,s,c)}for(let t of h(e)){let e=t.id==="default"?void 0:t.id;n(t.tokens,[],e,!1,void 0)}return t}function D(e,t={}){let n=t.cssVarPrefix,r=pe(e);return c(e,{includeTypes:t.includeTypes,shouldIncludeToken:e=>e.skipDocs!==!0,enrichToken:e=>{let t=r.get(E(e.theme,e.path));return{...e,cssVar:_(e.path,n),...e.type===`color`&&t}}})}function O(e){return e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`).replaceAll(`
|
|
2
2
|
`,`\\n`).replaceAll(`\r`,`\\r`)}function k(e){return typeof e==`string`?`"${O(e)}"`:typeof e==`number`||typeof e==`boolean`?String(e):e==null?`undefined`:JSON.stringify(e)}function A(e){let t=e.titlePrefix??`Design Tokens`,n=e.themeFiles?.[0],r=e.themeNames??[],i=e.tokenThemeNames??[],a=i.length>1?`
|
|
3
3
|
## Token-doc variants
|
|
4
4
|
|
|
@@ -71,7 +71,7 @@ import { ColorPaletteBlock } from "./blocks";
|
|
|
71
71
|
## Regenerate
|
|
72
72
|
|
|
73
73
|
Re-run Razorwind generate when tokens change to refresh docs under \`${e.outputPath}/\`.
|
|
74
|
-
`}const j=
|
|
74
|
+
`}const j=x,me=/* @__PURE__ */ new Set([`fontFamily`,`fontWeight`,`typography`]),he=/font|typography|type|text|line[-_.]?height|letter[-_.]?spacing/i;function M(e){return me.has(e.type??``)?!0:(e.type===`dimension`||e.type===`number`)&&he.test(e.path)}function N(e,t){return e.some(e=>t.some(t=>e.path===t||e.path.startsWith(`${t}.`)))}const ge=/^\{([^{}]+)\}$/,_e=/^var\((--[^),\s]+)(?:\s*,[^)]*)?\)$/;function P(e){if(typeof e==`string`)return ge.exec(e.trim())?.[1]?.trim()}function F(e){if(typeof e==`string`)return _e.exec(e.trim())?.[1]}function I(e){let t=new Map(e.map(e=>[e.path,e])),n=new Map(e.map(e=>[v(e.path),e])),r=e=>{let r=e,i=/* @__PURE__ */ new Set;for(let a=0;a<8;a++){if(i.has(r.path))return e.cssValue;i.add(r.path);let a=t.get(P(r.value)??``)??n.get(F(r.value)??F(r.cssValue)??``);if(!a||a.path===r.path)return r.cssValue;r=a}return e.cssValue};return e.map(e=>e.type===`color`?{...e,cssValue:r(e)}:e)}function L(e){return Object.keys(e).length>1}function ve(){return`/**
|
|
75
75
|
* Select a generated token variant. Callers may pass \`theme\` to override
|
|
76
76
|
* the generated fallback without requiring Storybook preview-hook context.
|
|
77
77
|
*/
|
|
@@ -84,7 +84,7 @@ export function resolveThemeVariant<T extends Record<string, unknown>>(
|
|
|
84
84
|
? (theme as keyof T & string)
|
|
85
85
|
: fallback;
|
|
86
86
|
}
|
|
87
|
-
`}function
|
|
87
|
+
`}function ye(e,t){let n=h(e),r=n.filter(e=>!d(e.id));return r.length<=1?{default:I(D(e,t))}:Object.fromEntries(r.map(e=>[e.id,I(D(K(n,e),t))]))}function be(e,t){let n=/* @__PURE__ */ 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 xe(e,t){return e===t?e.split(`.`).at(-1)??e:e.startsWith(`${t}.`)?e.slice(t.length+1):e.split(`.`).at(-1)??e}function Se(e,t={}){let n=t.colorGroupBy??2,r=Object.entries(e),i=r[0]?.[0]??`default`,a=L(e),o=(e,t=` `)=>[...be(e,n).entries()].toSorted(([e],[t])=>e.localeCompare(t)).map(([e,n])=>{let r=n.map(n=>`${t} ${k(xe(n.path,e))}: ${k(n.cssValue)}`).join(`,
|
|
88
88
|
`),i=n.find(e=>e.description)?.description??`${n.length} token${n.length===1?``:`s`}`;return`${t}<ColorItem
|
|
89
89
|
title={${k(e)}}
|
|
90
90
|
subtitle={${k(i)}}
|
|
@@ -122,14 +122,14 @@ export function ColorPaletteBlock({ theme }: ColorPaletteBlockProps = {}) {
|
|
|
122
122
|
|
|
123
123
|
return COLOR_VARIANTS[activeTheme];
|
|
124
124
|
}
|
|
125
|
-
`}function
|
|
126
|
-
fontFamily={${k(
|
|
127
|
-
fontSizes={${
|
|
128
|
-
fontWeight={${k(
|
|
129
|
-
sampleText={${k(
|
|
130
|
-
/>`},s
|
|
125
|
+
`}function Ce(e,t={}){let a=t.sampleText??j,o=L(e),s=Object.entries(e),c=s[0]?.[0]??`default`,l=e=>{let o=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}),s=[...new Set(o)],c=i(t.fonts,n),l=(c?r(c):void 0)??e.find(e=>e.type===`fontFamily`)?.cssValue??`system-ui, sans-serif`,u=e.find(e=>e.type===`fontWeight`),d=u&&Number.parseFloat(u.cssValue)||400,f=s.length>0?`[${s.map(e=>k(e)).join(`, `)}]`:`[12, 14, 16, 20, 24, 32]`;return`<Typeset
|
|
126
|
+
fontFamily={${k(l)}}
|
|
127
|
+
fontSizes={${f}}
|
|
128
|
+
fontWeight={${k(d)}}
|
|
129
|
+
sampleText={${k(a)}}
|
|
130
|
+
/>`},u=s.map(([e,t])=>` ${k(e)}: (${l(t)})`).join(`,
|
|
131
131
|
`);return`import { Typeset } from "@storybook/addon-docs/blocks";
|
|
132
|
-
${
|
|
132
|
+
${o?`import { resolveThemeVariant } from "./ThemeVariant";
|
|
133
133
|
`:``}
|
|
134
134
|
|
|
135
135
|
/**
|
|
@@ -138,7 +138,7 @@ ${r?`import { resolveThemeVariant } from "./ThemeVariant";
|
|
|
138
138
|
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-typeset
|
|
139
139
|
*/
|
|
140
140
|
const TYPESET_VARIANTS = {
|
|
141
|
-
${
|
|
141
|
+
${u}
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
export interface TypesetBlockProps {
|
|
@@ -147,11 +147,11 @@ export interface TypesetBlockProps {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export function TypesetBlock({ theme }: TypesetBlockProps = {}) {
|
|
150
|
-
const activeTheme = ${
|
|
150
|
+
const activeTheme = ${o?`resolveThemeVariant(TYPESET_VARIANTS, ${k(c)}, theme)`:k(c)};
|
|
151
151
|
|
|
152
152
|
return TYPESET_VARIANTS[activeTheme];
|
|
153
153
|
}
|
|
154
|
-
`}function
|
|
154
|
+
`}function we(e){let t=L(e),n=Object.entries(e),r=n[0]?.[0]??`default`,i=e=>e.map(e=>{let t=e.theme?k(e.theme):`undefined`;return` {
|
|
155
155
|
path: ${k(e.path)},
|
|
156
156
|
type: ${e.type?k(e.type):`undefined`},
|
|
157
157
|
value: ${k(e.cssValue)},
|
|
@@ -278,7 +278,7 @@ export function TokenTableBlock({
|
|
|
278
278
|
</table>
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
|
-
`}function
|
|
281
|
+
`}function Te(e){let t=e.titlePrefix??`Design Tokens`,n=e.hasColors?`
|
|
282
282
|
## Colors
|
|
283
283
|
|
|
284
284
|
<ColorPaletteBlock />
|
|
@@ -316,7 +316,7 @@ ${n}${r}${i}${a}${o}
|
|
|
316
316
|
## All tokens
|
|
317
317
|
|
|
318
318
|
<TokenTableBlock />
|
|
319
|
-
`}function
|
|
319
|
+
`}function Ee(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
320
320
|
import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
321
321
|
|
|
322
322
|
<Meta title="${O(e.titlePrefix??`Design Tokens`)}/Colors" />
|
|
@@ -324,7 +324,7 @@ import { ColorPaletteBlock } from "./blocks/ColorPalette";
|
|
|
324
324
|
# Colors
|
|
325
325
|
|
|
326
326
|
<ColorPaletteBlock />
|
|
327
|
-
`}function
|
|
327
|
+
`}function De(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
328
328
|
import { TypesetBlock } from "./blocks/Typeset";
|
|
329
329
|
import { TokenTableBlock } from "./blocks/TokenTable";
|
|
330
330
|
|
|
@@ -337,7 +337,7 @@ import { TokenTableBlock } from "./blocks/TokenTable";
|
|
|
337
337
|
## Typography tokens
|
|
338
338
|
|
|
339
339
|
<TokenTableBlock typography />
|
|
340
|
-
`}function R(e,t){let n=e[t];return typeof n==`string`?n:void 0}function z(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function
|
|
340
|
+
`}function R(e,t){let n=e[t];return typeof n==`string`?n:void 0}function z(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Oe(e){return`import { IconGallery, IconItem } from "@storybook/addon-docs/blocks";
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
343
|
* Icons rendered with Storybook's IconGallery doc block.
|
|
@@ -357,7 +357,7 @@ ${(z(e)?Object.values(e).filter(z).toSorted((e,t)=>(R(e,`name`)??``).localeCompa
|
|
|
357
357
|
</IconGallery>
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
`}function
|
|
360
|
+
`}function ke(e={}){return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
361
361
|
import { IconGalleryBlock } from "./blocks/IconGallery";
|
|
362
362
|
|
|
363
363
|
<Meta title="${O(e.titlePrefix??`Design Tokens`)}/Icons" />
|
|
@@ -365,11 +365,13 @@ import { IconGalleryBlock } from "./blocks/IconGallery";
|
|
|
365
365
|
# Icons
|
|
366
366
|
|
|
367
367
|
<IconGalleryBlock />
|
|
368
|
-
`}function B(e,
|
|
368
|
+
`}function B(e,t={}){let n=t.sampleText??j,r=e.map(e=>{let t=R(e,`name`)??`unknown`,n=ce(e);return` ${k(t)}: {
|
|
369
369
|
family: ${k(n)},
|
|
370
|
-
title: ${k(R(e,`title`)??t)}
|
|
370
|
+
title: ${k(R(e,`title`)??t)},
|
|
371
|
+
weights: [${ue(e).join(`, `)}]
|
|
371
372
|
}`}).join(`,
|
|
372
|
-
`),
|
|
373
|
+
`),i=`[${b.join(`, `)}]`,a=Object.entries(S).map(([e,t])=>` ${e}: ${k(t)}`).join(`,
|
|
374
|
+
`);return`import type { CSSProperties, ReactElement } from "react";
|
|
373
375
|
|
|
374
376
|
export interface FontSpecimenBlockProps {
|
|
375
377
|
/** Font entry name. Defaults to the first font. */
|
|
@@ -378,31 +380,49 @@ export interface FontSpecimenBlockProps {
|
|
|
378
380
|
sampleText?: string;
|
|
379
381
|
/** Override the previewed sizes. */
|
|
380
382
|
sizes?: number[];
|
|
383
|
+
/** Override the previewed font weights. Defaults to the weights the font provides. */
|
|
384
|
+
weights?: number[];
|
|
381
385
|
}
|
|
382
386
|
|
|
383
|
-
const FONT_FAMILIES: Record<
|
|
384
|
-
|
|
387
|
+
const FONT_FAMILIES: Record<
|
|
388
|
+
string,
|
|
389
|
+
{ family: string; title: string; weights: number[] }
|
|
390
|
+
> = {
|
|
391
|
+
${r||` // No fonts`}
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
const WEIGHT_NAMES: Record<number, string> = {
|
|
395
|
+
${a}
|
|
385
396
|
};
|
|
386
397
|
|
|
387
398
|
const DEFAULT_FONT = ${k(e[0]?R(e[0],`name`)??`unknown`:`unknown`)};
|
|
388
|
-
const DEFAULT_SIZES = ${
|
|
389
|
-
const DEFAULT_SAMPLE_TEXT = ${k(
|
|
399
|
+
const DEFAULT_SIZES = ${i};
|
|
400
|
+
const DEFAULT_SAMPLE_TEXT = ${k(n)};
|
|
401
|
+
const WEIGHT_SAMPLE_SIZE = ${ee};
|
|
390
402
|
|
|
391
403
|
const labelStyle: CSSProperties = {
|
|
392
404
|
display: "block",
|
|
393
405
|
fontSize: "12px",
|
|
406
|
+
fontWeight: 400,
|
|
394
407
|
lineHeight: 1.4,
|
|
395
408
|
fontFamily: "system-ui, sans-serif",
|
|
396
409
|
color: "rgba(128, 128, 128, 0.9)"
|
|
397
410
|
};
|
|
398
411
|
|
|
412
|
+
function weightLabel(weight: number): string {
|
|
413
|
+
const weightName = WEIGHT_NAMES[weight];
|
|
414
|
+
|
|
415
|
+
return weightName ? \`\${weight} · \${weightName}\` : String(weight);
|
|
416
|
+
}
|
|
417
|
+
|
|
399
418
|
/**
|
|
400
419
|
* Font specimen previews for Storybook MDX docs.
|
|
401
420
|
*/
|
|
402
421
|
export function FontSpecimenBlock({
|
|
403
422
|
name,
|
|
404
423
|
sampleText = DEFAULT_SAMPLE_TEXT,
|
|
405
|
-
sizes = DEFAULT_SIZES
|
|
424
|
+
sizes = DEFAULT_SIZES,
|
|
425
|
+
weights
|
|
406
426
|
}: FontSpecimenBlockProps = {}): ReactElement {
|
|
407
427
|
const entry = (name && FONT_FAMILIES[name]) || FONT_FAMILIES[DEFAULT_FONT];
|
|
408
428
|
|
|
@@ -419,7 +439,7 @@ export function FontSpecimenBlock({
|
|
|
419
439
|
lineHeight: 1.25,
|
|
420
440
|
margin: "0 0 0.5em"
|
|
421
441
|
}}>
|
|
422
|
-
${
|
|
442
|
+
${y}
|
|
423
443
|
</div>
|
|
424
444
|
{sizes.map(size => (
|
|
425
445
|
<div
|
|
@@ -434,10 +454,24 @@ export function FontSpecimenBlock({
|
|
|
434
454
|
{sampleText}
|
|
435
455
|
</div>
|
|
436
456
|
))}
|
|
457
|
+
{(weights ?? entry.weights).map(weight => (
|
|
458
|
+
<div
|
|
459
|
+
key={\`weight-\${weight}\`}
|
|
460
|
+
style={{
|
|
461
|
+
fontFamily: entry.family,
|
|
462
|
+
fontSize: \`\${WEIGHT_SAMPLE_SIZE}px\`,
|
|
463
|
+
fontWeight: weight,
|
|
464
|
+
lineHeight: 1.45,
|
|
465
|
+
margin: "0 0 0.4em"
|
|
466
|
+
}}>
|
|
467
|
+
<span style={labelStyle}>{weightLabel(weight)}</span>
|
|
468
|
+
{sampleText}
|
|
469
|
+
</div>
|
|
470
|
+
))}
|
|
437
471
|
</div>
|
|
438
472
|
);
|
|
439
473
|
}
|
|
440
|
-
`}function V(e){let t=e.titlePrefix??`Design Tokens`,n=e.fonts.map(t=>{let n=R(t,`name`)??`unknown`;return`- [${R(t,`title`)??n}](./Fonts/${e.slugs.get(t)??
|
|
474
|
+
`}function V(e){let t=e.titlePrefix??`Design Tokens`,n=e.fonts.map(t=>{let n=R(t,`name`)??`unknown`;return`- [${R(t,`title`)??n}](./Fonts/${e.slugs.get(t)??C(t)}.mdx)`});return`import { Meta } from "@storybook/addon-docs/blocks";
|
|
441
475
|
|
|
442
476
|
<Meta title="${O(t)}/Fonts" />
|
|
443
477
|
|
|
@@ -453,8 +487,8 @@ ${n.join(`
|
|
|
453
487
|
|
|
454
488
|
# ${a}
|
|
455
489
|
|
|
456
|
-
${
|
|
457
|
-
`}function
|
|
490
|
+
${oe(e,n.sampleText,n.fontAssetBaseUrl)}
|
|
491
|
+
`}function Ae(e=!0,t=!0){return`export { ColorPaletteBlock } from "./ColorPalette";
|
|
458
492
|
export type { ColorPaletteBlockProps } from "./ColorPalette";
|
|
459
493
|
${e?`export { IconGalleryBlock } from "./IconGallery";
|
|
460
494
|
`:``}${t?`export { FontSpecimenBlock } from "./FontSpecimen";
|
|
@@ -463,7 +497,7 @@ export type { FontSpecimenBlockProps } from "./FontSpecimen";
|
|
|
463
497
|
export type { TokenTableBlockProps, TokenTableRow } from "./TokenTable";
|
|
464
498
|
export { TypesetBlock } from "./Typeset";
|
|
465
499
|
export type { TypesetBlockProps } from "./Typeset";
|
|
466
|
-
`}const
|
|
500
|
+
`}const je=/* @__PURE__ */ new Set(/* @__PURE__ */ `base.colorPrimary.colorSecondary.appBg.appContentBg.appHoverBg.appPreviewBg.appBorderColor.appBorderRadius.fontBase.fontCode.textColor.textInverseColor.textMutedColor.barTextColor.barHoverColor.barSelectedColor.barBg.buttonBg.buttonBorder.booleanBg.booleanSelectedBg.inputBg.inputBorder.inputTextColor.inputBorderRadius.brandTitle.brandUrl.brandImage.brandTarget.gridCellSize`.split(`.`));function U(e){return z(e)?e.base===`light`||e.base===`dark`:!1}function W(e){return z(e)?U(e)?!0:Object.keys(e).some(e=>je.has(e)):!1}function G(e){if(!z(e)||W(e))return!1;let t=Object.values(e);return t.length>0&&t.every(W)}function Me(e,t,n){return t.base===`light`||t.base===`dark`?t.base:`${e} ${n??``}`.toLowerCase().includes(`light`)?`light`:`dark`}function Ne(e){return/^[a-z_$][\w$]*$/i.test(e)?e:k(e)}function K(e,t){let n=e.find(e=>e.id===a);return!n||d(t.id)?t.tokens:p(t.tokens,n.tokens)}function Pe(e){return z(e)&&`$value`in e&&!(`colorSpace`in e)&&!(`hex`in e)?e.$value:e}function Fe(e,t){let n=Pe(e),r=/* @__PURE__ */ new Set;for(let e=0;e<8;e++){let e=P(n);if(!e||r.has(e))break;r.add(e);let i=t.get(e);if(!i)break;n=i.value}return n}function Ie(e){return e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:l(e)}function Le(e,t){let n=h(e),r=n.find(e=>e.id===t)??(n.length===1?n[0]:void 0),i=r?K(n,r):e,a=/* @__PURE__ */ new Map;for(let e of D(i))(!a.get(e.path)||e.theme===t)&&a.set(e.path,e);return a}function Re(e,t){let n={...e};for(let[r,i]of Object.entries(e))r!==`base`&&i!==void 0&&(n[r]=Ie(Fe(i,t)));return n}function ze(e,t,n,r,i){let a=Re(t,Le(i.tokens,e));return q(Me(e,a,i.theme),a,n,r)}function q(e,a,o,s){let c=i(s,n),l=i(s,t);return{brandTarget:`_blank`,base:e||`light`,...a,brandTitle:a.brandTitle??o.title,brandUrl:a.brandUrl??o.homepage,brandImage:a.brandImage??o.logo,fontBase:a.fontBase??(c?r(c):void 0),fontCode:a.fontCode??(l?r(l):void 0)}}function J(e,t=``){return`create({\n${Object.entries(e).filter(([,e])=>e!==void 0).map(([e,n])=>`${t} ${e}: ${k(n)}`).join(`,
|
|
467
501
|
`)}\n${t}})`}function Y(e){return`import { create } from "storybook/theming";
|
|
468
502
|
|
|
469
503
|
/**
|
|
@@ -480,8 +514,8 @@ export default ${J(e)};
|
|
|
480
514
|
* @see https://storybook.js.org/docs/configure/user-interface/theming
|
|
481
515
|
*/
|
|
482
516
|
export default {
|
|
483
|
-
${Object.entries(e).map(([e,t])=>` ${
|
|
517
|
+
${Object.entries(e).map(([e,t])=>` ${Ne(e)}: ${J(t,` `)}`).join(`,
|
|
484
518
|
`)}
|
|
485
519
|
};
|
|
486
|
-
`}function Z(e){if(U(e))return Y(e);let t=Object.entries(e);if(t.length!==1)return X(e);let[,n]=t[0]??[];return n?Y(n):X(e)}function Q(e,t,n,r){let i=(e,r)=>
|
|
520
|
+
`}function Z(e){if(U(e))return Y(e);let t=Object.entries(e);if(t.length!==1)return X(e);let[,n]=t[0]??[];return n?Y(n):X(e)}function Q(e,t,n,r){let i=(e,r)=>ze(e,r,n,t.fonts,t);if(G(e))return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,i(e,t)]));let a=h(t.tokens),o=a.filter(e=>!d(e.id));if(o.length>1){let e={};for(let t of o){let n=r(K(a,t));if(G(n)){let r=n[t.id];if(r){e[t.id]=i(t.id,r);continue}for(let[t,r]of Object.entries(n))e[t]=i(t,r);continue}W(n)&&(e[t.id]=i(t.id,n))}return e}if(W(e)){let n=o[0]&&o[0].id!=="default"?o[0].id:t.theme??`default`;return{[n]:i(n,e)}}return{}}const Be=e=>(t,n,r)=>o(w(e,t),n,{name:`razorwind-storybook`},!1,r);function $(e,t={}){let n=t.outputPath??`storybook/tokens`,r=m(e),i=t.titlePrefix??r.title??`Design Tokens`,a={...t,titlePrefix:i,cssVarPrefix:t.cssVarPrefix??s(e.name)},o=D(e.tokens,a),c=ye(e.tokens,a),l=o.some(e=>e.type===`color`),u=e.fonts&&Object.keys(e.fonts).length>0||o.some(M),d=N(o,[`size`]),f=N(o,[`space`,`spacing`]),p=!t.skipIcons&&z(e.icons)&&Object.keys(e.icons).length>0,h=t.skipFonts?[]:ne(e.fonts),g=h.length>0,_=ae(h),v=Be(n),y={[w(n,`blocks/ColorPalette.tsx`)]:v(`blocks/ColorPalette.tsx`,Se(c,a),`tsx`),[w(n,`blocks/Typeset.tsx`)]:v(`blocks/Typeset.tsx`,Ce(c,{...a,fonts:e.fonts}),`tsx`),[w(n,`blocks/TokenTable.tsx`)]:v(`blocks/TokenTable.tsx`,we(c),`tsx`),[w(n,`blocks/index.ts`)]:v(`blocks/index.ts`,Ae(p,g),`typescript`),[w(n,`Tokens.mdx`)]:v(`Tokens.mdx`,Te({titlePrefix:i,hasColors:l,hasTypography:u,hasSizes:d,hasSpaces:f,hasFonts:g}),`mdx`)};if(p&&(y[w(n,`blocks/IconGallery.tsx`)]=v(`blocks/IconGallery.tsx`,Oe(e.icons),`tsx`)),L(c)&&(y[w(n,`blocks/ThemeVariant.ts`)]=v(`blocks/ThemeVariant.ts`,ve(),`typescript`)),l&&(y[w(n,`Colors.mdx`)]=v(`Colors.mdx`,Ee(a),`mdx`)),u&&(y[w(n,`Typography.mdx`)]=v(`Typography.mdx`,De(a),`mdx`)),p&&(y[w(n,`Icons.mdx`)]=v(`Icons.mdx`,ke(a),`mdx`)),g){y[w(n,`blocks/FontSpecimen.tsx`)]=v(`blocks/FontSpecimen.tsx`,B(h,a),`tsx`),y[w(n,`Fonts.mdx`)]=v(`Fonts.mdx`,V({...a,fonts:h,slugs:_}),`mdx`);for(let e of h){let t=_.get(e)??C(e),r=R(e,`name`)??`unknown`,i=w(`Fonts`,`${t}.mdx`);y[w(n,i)]=v(i,H(e,r,a),`mdx`)}}y[w(n,`tokens.json`)]=v(`tokens.json`,`${JSON.stringify(o,null,2)}\n`,`json`);let b;if(t.mapTheme){let i=Q(t.mapTheme(e.tokens),e,r,t.mapTheme);Object.keys(i).length>0&&(b=Object.keys(i),y[w(n,`theme.ts`)]=v(`theme.ts`,Z(i),`typescript`))}let x=`INSTALL.md`;return y[w(n,x)]=v(x,t.installGuide??A({outputPath:n,titlePrefix:i,themeFiles:b?[`theme.ts`]:void 0,themeNames:b,tokenThemeNames:Object.keys(c)}),`markdown`),y}var Ve=e(e=>({name:`storybook`,themeGeneration:`combined`,generate:async(t,n)=>$(t,{fontAssetBaseUrl:n.fontAssetBaseUrl,...e})}));export{q as applyBrandDefaults,Ve as default,te as extractFonts,D as flattenTokens,re as fontSlug,ie as fontSlugs,l as formatTokenValue,$ as generateTokenDocs,Q as normalizeThemes,H as renderFontMdx,B as renderFontSpecimenBlock,V as renderFontsMdx,A as renderInstallMd,Z as renderThemeFile,se as resolveFontStack,le as resolveFontWeights,h as resolveTokenSets,g as toCssVar};
|
|
487
521
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["flattenTokensBase","toCssVar","isObject","resolveFontStack","fontSlug","extractFonts","fontSlugs","
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["flattenTokensBase","toCssVar","isObject","resolveFontStack","resolveFontWeights","fontSlug","extractFonts","fontSlugs","flattenTokens$1","toCssVar$1","extractFonts$1","fontSlug$1","fontSlugs$1","resolveFontStack$1","resolveFontWeights$1","isTruthyFlag","value","metadataKey","theme","path","readChildTheme","node","isColorMetadataKey","key","collectColorMetadata","metadata","walk","isObject","nextPalette","palette","nextChildTheme","childTheme","isTokenLeaf","child","set","resolveTokenSets","tokens","flattenTokens","cssVarPrefix","options","token","colorMetadata","base","escapeString","toLiteral","renderInstallMd","titlePrefix","themeFile","themeNames","tokenThemeNames","tokenThemeSection","name","themeSection","DEFAULT_SAMPLE_TEXT","FONT_SPECIMEN_TEXT","TYPOGRAPHY_TOKEN_TYPES","TYPOGRAPHY_DIMENSION_PATTERN","isTypographyToken","hasTokenPathPrefix","prefixes","prefix","DTCG_ALIAS_PATTERN","CSS_VAR_PATTERN","readAliasPath","readCssVarName","resolveColorValues","byPath","byCssVar","toThemeCssVar","resolve","current","seen","depth","next","hasThemeVariants","variants","renderVariantResolver","resolveTokenVariants","sets","themes","isSharedThemeId","tokensForThemeSet","groupByPath","groups","list","leafLabel","group","renderColorPaletteBlock","groupBy","variantEntries","defaultTheme","themed","renderItems","sectionTokens","a","b","groupTokens","colorsObject","indent","subtitle","renderPalette","colors","paletteColors","semanticColors","otherColors","hasCategorizedColors","items","sections","section","title","paletteVariants","renderTypesetBlock","sampleText","renderTypeset","fontSizes","match","uniqueSizes","fromFonts","pickFontByRole","SANS_ROLES","fontFamily","cssFontFamily","fontWeightToken","fontWeight","sizesLiteral","size","typesetVariants","renderTokenTableBlock","renderRows","rowsByTheme","renderTokensMdx","colorSection","typographySection","sizeSection","spaceSection","fontsSection","renderColorsMdx","renderTypographyMdx","readString","item","isObject$1","renderIconGalleryBlock","icons","icon","svg","file","preview","renderIconsMdx","renderFontSpecimenBlock","entries","fonts","font","family","FONT_SPECIMEN_SIZES","weightNames","FONT_WEIGHT_NAMES","weight","weightName","FONT_WEIGHT_SPECIMEN_SIZE","FONT_CHARACTER_SET","renderFontsMdx","links","renderFontMdx","renderFontBody","renderBlocksIndex","hasIcons","hasFonts","STORYBOOK_THEME_KEYS","isStorybookTheme","isThemePartial","isThemeRecord","values","inferThemeBase","specTheme","toPropertyKey","SHARED_THEME_ID","mergeTokenTrees","unwrapTokenNode","resolveAliasValue","aliasPath","formatResolvedThemeValue","formatTokenValue","tokenLookupForTheme","themeName","tree","lookup","resolveThemeFields","resolved","applyMappedTheme","spec","applyBrandDefaults","identity","sans","mono","MONO_ROLES","renderCreateCall","renderSingleThemeFile","renderThemeRecordFile","renderThemeFile","single","normalizeThemes","apply","mapped","result","perTheme","mapTheme","getCreateDocument","createDocument","joinPaths","outputPath","content","language","generateTokenDocs","resolveSchemaIdentity","docsOptions","cssVarPrefixFromName","flat","hasColors","hasTypography","hasSizes","hasSpaces","fontPageSlugs","createDoc","documents","slug","fontName","installPath","src_default","definePlugin","config","extractFonts","fontSlug","fontSlugs","resolveFontStack","resolveFontWeights","toCssVar"],"sources":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorwind/storybook",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Razorwind plugin that creates Storybook MDX token doc blocks from Razorwind design tokens.",
|
|
6
6
|
"repository": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@power-plant/core": "^0.0.93",
|
|
87
87
|
"@power-plant/dtcg-schema": "^0.0.1",
|
|
88
|
-
"@razorwind/core": "^0.0.
|
|
89
|
-
"@razorwind/docgen": "^0.0.
|
|
88
|
+
"@razorwind/core": "^0.0.81",
|
|
89
|
+
"@razorwind/docgen": "^0.0.77",
|
|
90
90
|
"@stryke/path": "^0.29.43",
|
|
91
91
|
"@stryke/type-checks": "^0.6.49"
|
|
92
92
|
},
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"typescript": "^6.0.3"
|
|
108
108
|
},
|
|
109
109
|
"publishConfig": { "access": "public" },
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "83a394e1328c7c4e901e40a29a371edeb0403a77"
|
|
111
111
|
}
|