-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: Now fully utilizing React Server Components
- Loading branch information
1 parent
26dfe27
commit 03e842b
Showing
12 changed files
with
219 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,57 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
// import { resolve } from 'node:path'; | ||
// import { mergeConfig } from 'vite'; | ||
import type { StorybookConfig } from '@storybook/nextjs'; | ||
import { resolve } from 'node:path'; | ||
import { globSync } from 'glob'; | ||
|
||
const tsFiles = globSync(resolve(__dirname, '../packages/ui/src/*.ts')); | ||
const tsFilesObject = tsFiles.reduce((acc, filePath) => { | ||
const fileName = filePath.split('/').pop()?.replace('.ts', ''); | ||
if (fileName) { | ||
acc[`@do-ob/ui/${fileName}`] = filePath; | ||
} | ||
return acc; | ||
}, {}); | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
'../packages/ui/src/**/*.stories.@(js|jsx|mjs|ts|tsx)' | ||
], | ||
|
||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-a11y', | ||
'@storybook/addon-themes', | ||
'@chromatic-com/storybook' | ||
], | ||
|
||
framework: { | ||
name: '@storybook/nextjs', | ||
options: { | ||
}, | ||
options: {}, | ||
}, | ||
|
||
features: { | ||
experimentalRSC: true, | ||
} | ||
}, | ||
|
||
docs: {}, | ||
|
||
typescript: { | ||
reactDocgen: 'react-docgen-typescript' | ||
}, | ||
|
||
webpackFinal: async (config) => { | ||
if (config.resolve) { | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
// 👇 Internal modules | ||
...tsFilesObject, | ||
}; | ||
} | ||
|
||
return config; | ||
}, | ||
|
||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { DoobUiProvider } from '../packages/ui/src/provider'; | ||
|
||
export const withDoob = (Story) => ( | ||
<DoobUiProvider navigate={(path) => { history.pushState({}, '', path); }}> | ||
<div style={{ minHeight: '100vh' }}> | ||
{Story()} | ||
</div> | ||
</DoobUiProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
{ | ||
"name": "@do-ob/ui", | ||
"name": "do-ob", | ||
"private": true, | ||
"version": "0.0.0", | ||
"description": "do-ob workspace for mild components", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"exports": { | ||
".": "./packages/ui/src/index.ts" | ||
}, | ||
"scripts": { | ||
"build": "pnpm --filter './packages/*' build", | ||
"watch": "pnpm --filter './packages/*' watch", | ||
|
@@ -20,22 +17,22 @@ | |
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@chromatic-com/storybook": "^1", | ||
"@do-ob/core": "^1.1.0", | ||
"@do-ob/eslint-config": "^2.3.0", | ||
"@do-ob/ts-config": "^2.0.0", | ||
"@do-ob/vite-lib-config": "^3.0.1", | ||
"@eslint/compat": "^1.1.0", | ||
"@heroicons/react": "^2.1.3", | ||
"@storybook/addon-a11y": "8.2.0-alpha.10", | ||
"@storybook/addon-essentials": "8.2.0-alpha.10", | ||
"@storybook/addon-interactions": "8.2.0-alpha.10", | ||
"@storybook/addon-links": "8.2.0-alpha.10", | ||
"@storybook/addon-themes": "8.2.0-alpha.10", | ||
"@storybook/blocks": "8.2.0-alpha.10", | ||
"@storybook/nextjs": "8.2.0-alpha.10", | ||
"@storybook/react": "8.2.0-alpha.10", | ||
"@storybook/react-vite": "8.2.0-alpha.10", | ||
"@storybook/test": "8.2.0-alpha.10", | ||
"@storybook/addon-a11y": "^8.2.0-alpha.10", | ||
"@storybook/addon-essentials": "^8.2.0-alpha.10", | ||
"@storybook/addon-interactions": "^8.2.0-alpha.10", | ||
"@storybook/addon-links": "^8.2.0-alpha.10", | ||
"@storybook/addon-themes": "^8.2.0-alpha.10", | ||
"@storybook/blocks": "^8.2.0-alpha.10", | ||
"@storybook/nextjs": "^8.2.0-alpha.10", | ||
"@storybook/react": "^8.2.0-alpha.10", | ||
"@storybook/test": "^8.2.0-alpha.10", | ||
"@tailwindcss/container-queries": "^0.1.1", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/node": "^20.12.12", | ||
|
@@ -49,13 +46,14 @@ | |
"eslint-plugin-react-compiler": "0.0.0-experimental-51a85ea-20240601", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"framer-motion": "^11.2.10", | ||
"glob": "^10.4.2", | ||
"next": "15.0.0-rc.0", | ||
"postcss": "^8.4.38", | ||
"react": "19.0.0-rc-8971381549-20240625", | ||
"react-aria": "nightly", | ||
"react-aria-components": "nightly", | ||
"react-dom": "19.0.0-rc-8971381549-20240625", | ||
"storybook": "8.2.0-alpha.10", | ||
"storybook": "^8.2.0-alpha.10", | ||
"tailwind-merge": "^2.3.0", | ||
"tailwindcss": "^3.4.3", | ||
"tailwindcss-animate": "^1.0.7", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.