@storybook/nextjs 7.0.22 → 7.0.23
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.
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
${options.variable?`.${variableClassName} { ${options.variable}: '${options.fontFamily}'; }`:""}
|
|
25
|
-
`,fontFaceCSS=`${changeFontDisplayToSwap(options.fontFaceCSS)}`;return{className,fontFaceCSS,classNamesCSS,style,...options.variable?{variableClassName}:{}}}function getClassName({styles,weights,fontFamily}){let font=fontFamily.
|
|
25
|
+
`,fontFaceCSS=`${changeFontDisplayToSwap(options.fontFaceCSS)}`;return{className,fontFaceCSS,classNamesCSS,style,...options.variable?{variableClassName}:{}}}function getClassName({styles,weights,fontFamily}){let font=fontFamily.replaceAll(" ","-").toLowerCase(),style=isNextCSSPropertyValid(styles)?styles[0]:null,weight=isNextCSSPropertyValid(weights)?weights[0]:null;return`${font}${style?`-${style}`:""}${weight?`-${weight}`:""}`}function getStylesObj({styles,weights,fontFamily}){return{fontFamily,...isNextCSSPropertyValid(styles)?{fontStyle:styles[0]}:{},...isNextCSSPropertyValid(weights)?{fontWeight:weights[0]}:{}}}function isNextCSSPropertyValid(prop){return prop.length===1&&prop[0]!=="variable"}function changeFontDisplayToSwap(css){return css.replaceAll("font-display: optional;","font-display: block;")}function setFontDeclarationsInHead({id,fontFaceCSS,classNamesCSS}){return`
|
|
26
26
|
if (!document.getElementById('id-${id}')) {
|
|
27
27
|
const fontDeclarations = \`${fontFaceCSS}\`;
|
|
28
28
|
const style = document.createElement('style');
|
|
@@ -27,7 +27,7 @@ var google_font_utils_exports={};__export(google_font_utils_exports,{fetchCSSFro
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
${options.variable?`.${variableClassName} { ${options.variable}: '${options.fontFamily}'; }`:""}
|
|
30
|
-
`,fontFaceCSS=`${changeFontDisplayToSwap(options.fontFaceCSS)}`;return {className,fontFaceCSS,classNamesCSS,style,...options.variable?{variableClassName}:{}}}function getClassName({styles,weights,fontFamily}){let font=fontFamily.
|
|
30
|
+
`,fontFaceCSS=`${changeFontDisplayToSwap(options.fontFaceCSS)}`;return {className,fontFaceCSS,classNamesCSS,style,...options.variable?{variableClassName}:{}}}function getClassName({styles,weights,fontFamily}){let font=fontFamily.replaceAll(" ","-").toLowerCase(),style=isNextCSSPropertyValid(styles)?styles[0]:null,weight=isNextCSSPropertyValid(weights)?weights[0]:null;return `${font}${style?`-${style}`:""}${weight?`-${weight}`:""}`}function getStylesObj({styles,weights,fontFamily}){return {fontFamily,...isNextCSSPropertyValid(styles)?{fontStyle:styles[0]}:{},...isNextCSSPropertyValid(weights)?{fontWeight:weights[0]}:{}}}function isNextCSSPropertyValid(prop){return prop.length===1&&prop[0]!=="variable"}function changeFontDisplayToSwap(css){return css.replaceAll("font-display: optional;","font-display: block;")}function setFontDeclarationsInHead({id,fontFaceCSS,classNamesCSS}){return `
|
|
31
31
|
if (!document.getElementById('id-${id}')) {
|
|
32
32
|
const fontDeclarations = \`${fontFaceCSS}\`;
|
|
33
33
|
const style = document.createElement('style');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.23",
|
|
4
4
|
"description": "Storybook for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@babel/preset-react": "^7.18.6",
|
|
71
71
|
"@babel/preset-typescript": "^7.21.0",
|
|
72
72
|
"@babel/runtime": "^7.21.0",
|
|
73
|
-
"@storybook/addon-actions": "7.0.
|
|
74
|
-
"@storybook/builder-webpack5": "7.0.
|
|
75
|
-
"@storybook/core-common": "7.0.
|
|
76
|
-
"@storybook/node-logger": "7.0.
|
|
77
|
-
"@storybook/preset-react-webpack": "7.0.
|
|
78
|
-
"@storybook/preview-api": "7.0.
|
|
79
|
-
"@storybook/react": "7.0.
|
|
73
|
+
"@storybook/addon-actions": "7.0.23",
|
|
74
|
+
"@storybook/builder-webpack5": "7.0.23",
|
|
75
|
+
"@storybook/core-common": "7.0.23",
|
|
76
|
+
"@storybook/node-logger": "7.0.23",
|
|
77
|
+
"@storybook/preset-react-webpack": "7.0.23",
|
|
78
|
+
"@storybook/preview-api": "7.0.23",
|
|
79
|
+
"@storybook/react": "7.0.23",
|
|
80
80
|
"@types/node": "^16.0.0",
|
|
81
81
|
"css-loader": "^6.7.3",
|
|
82
82
|
"find-up": "^5.0.0",
|