Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Apr 12, 2024
1 parent 3f7e1c2 commit 57bcee7
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 31 deletions.
6 changes: 4 additions & 2 deletions code/addons/controls/src/ControlsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export const ControlsPanel: FC = () => {
const hasControls = Object.values(rows).some((arg) => arg?.control);

const withPresetColors = Object.entries(rows).reduce((acc, [key, arg]) => {
if (arg?.control?.type !== 'color' || arg?.control?.presetColors) acc[key] = arg;
else acc[key] = { ...arg, control: { ...arg.control, presetColors } };
const control = arg?.control;
if (typeof control !== 'object' || control?.type !== 'color' || control?.presetColors)
acc[key] = arg;
else acc[key] = { ...arg, control: { ...control, presetColors } };
return acc;
}, {} as ArgTypes);

Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/global": "^5.0.0",
"ts-dedent": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/types": "^7.23.0",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/types": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@storybook/channels": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-mdx": "3.0.0",
"@storybook/global": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/csf-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@babel/parser": "^7.23.0",
"@babel/traverse": "^7.23.2",
"@babel/types": "^7.23.0",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/types": "workspace:*",
"fs-extra": "^11.1.0",
"recast": "^0.23.5",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/manager-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/router": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/preview-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@storybook/channels": "workspace:*",
"@storybook/client-logger": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/global": "^5.0.0",
"@storybook/types": "workspace:*",
"@types/qs": "^6.9.5",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/types": "workspace:*",
"estraverse": "^5.2.0",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"file-system-cache": "2.3.0"
},
"devDependencies": {
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.0.0",
"typescript": "^5.3.2"
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"@storybook/core-events": "workspace:*",
"@storybook/core-server": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/csf-plugin": "workspace:*",
"@storybook/csf-tools": "workspace:*",
"@storybook/docs-tools": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/csf-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/vue3/src/docs/extractArgTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const extractFromVueDocgenApi = (
type: sbType ? { ...sbType, required } : { name: 'other', value: type ?? '' },
table: {
type: type ? { summary: type } : undefined,
defaultValue: extractedProp?.propDef.defaultValue,
defaultValue: extractedProp?.propDef.defaultValue ?? undefined,
jsDocTags: extractedProp?.propDef.jsDocTags,
category: section,
},
Expand Down
2 changes: 1 addition & 1 deletion code/ui/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/docs-tools": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
Expand Down
2 changes: 1 addition & 1 deletion code/ui/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"@radix-ui/react-slot": "^1.0.2",
"@storybook/client-logger": "workspace:*",
"@storybook/csf": "0.1.4--canary.82.eb42c88.0",
"@storybook/csf": "0.1.4--canary.82.07bccd8.0",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/theming": "workspace:*",
Expand Down
32 changes: 16 additions & 16 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4947,7 +4947,7 @@ __metadata:
dependencies:
"@storybook/client-logger": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/manager-api": "workspace:*"
"@storybook/preview-api": "workspace:*"
Expand Down Expand Up @@ -5215,7 +5215,7 @@ __metadata:
"@storybook/client-logger": "workspace:*"
"@storybook/components": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/docs-tools": "workspace:*"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
Expand Down Expand Up @@ -5446,7 +5446,7 @@ __metadata:
"@babel/core": "npm:^7.23.2"
"@babel/preset-env": "npm:^7.23.2"
"@babel/types": "npm:^7.23.0"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/node-logger": "workspace:*"
"@storybook/types": "workspace:*"
Expand Down Expand Up @@ -5482,7 +5482,7 @@ __metadata:
"@radix-ui/react-scroll-area": "npm:^1.0.5"
"@radix-ui/react-slot": "npm:^1.0.2"
"@storybook/client-logger": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
"@storybook/test": "workspace:*"
Expand Down Expand Up @@ -5575,7 +5575,7 @@ __metadata:
"@storybook/channels": "workspace:*"
"@storybook/core-common": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/docs-mdx": "npm:3.0.0"
"@storybook/global": "npm:^5.0.0"
Expand Down Expand Up @@ -5657,7 +5657,7 @@ __metadata:
"@babel/parser": "npm:^7.23.0"
"@babel/traverse": "npm:^7.23.2"
"@babel/types": "npm:^7.23.0"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/types": "workspace:*"
"@types/fs-extra": "npm:^11.0.1"
"@types/js-yaml": "npm:^4.0.5"
Expand All @@ -5669,12 +5669,12 @@ __metadata:
languageName: unknown
linkType: soft

"@storybook/csf@npm:0.1.4--canary.82.eb42c88.0":
version: 0.1.4--canary.82.eb42c88.0
resolution: "@storybook/csf@npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf@npm:0.1.4--canary.82.07bccd8.0":
version: 0.1.4--canary.82.07bccd8.0
resolution: "@storybook/csf@npm:0.1.4--canary.82.07bccd8.0"
dependencies:
type-fest: "npm:^2.19.0"
checksum: 10c0/ecf33ccc2fbadf2d7e8add3a38f7dcd993c4168619b61709295231fd741fa9a1cabcd6471bfc5b870418c300461ac021345eea7bdde5188811acd0ddc44bb9f8
checksum: 10c0/1e00891cfdbf9b9d82f5b5713c463e9499107f96b2e8062f6710f41c586e6abcbf20bdc7d98823e11aff53f2f31ae01608ba06b5c0fb12f142f284c8508ad729
languageName: node
linkType: hard

Expand Down Expand Up @@ -5854,7 +5854,7 @@ __metadata:
"@storybook/channels": "workspace:*"
"@storybook/client-logger": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/icons": "npm:^1.2.5"
"@storybook/router": "workspace:*"
Expand Down Expand Up @@ -6187,7 +6187,7 @@ __metadata:
"@storybook/client-logger": "workspace:*"
"@storybook/core-common": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/global": "npm:^5.0.0"
"@storybook/types": "workspace:*"
"@types/qs": "npm:^6.9.5"
Expand Down Expand Up @@ -6372,7 +6372,7 @@ __metadata:
"@storybook/core-events": "workspace:*"
"@storybook/core-server": "workspace:*"
"@storybook/core-webpack": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/csf-plugin": "workspace:*"
"@storybook/csf-tools": "workspace:*"
"@storybook/docs-tools": "workspace:*"
Expand Down Expand Up @@ -6527,7 +6527,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/server@workspace:renderers/server"
dependencies:
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/csf-tools": "workspace:*"
"@storybook/global": "npm:^5.0.0"
"@storybook/preview-api": "workspace:*"
Expand All @@ -6544,7 +6544,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/source-loader@workspace:lib/source-loader"
dependencies:
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@storybook/types": "workspace:*"
estraverse: "npm:^5.2.0"
lodash: "npm:^4.17.21"
Expand Down Expand Up @@ -6723,7 +6723,7 @@ __metadata:
resolution: "@storybook/types@workspace:lib/types"
dependencies:
"@storybook/channels": "workspace:*"
"@storybook/csf": "npm:0.1.4--canary.82.eb42c88.0"
"@storybook/csf": "npm:0.1.4--canary.82.07bccd8.0"
"@types/express": "npm:^4.7.0"
"@types/fs-extra": "npm:^11.0.1"
"@types/node": "npm:^18.0.0"
Expand Down

0 comments on commit 57bcee7

Please sign in to comment.