Skip to content

Commit 2506dd7

Browse files
committed
Upgrade alpha storybook setup
1 parent 8a6ae78 commit 2506dd7

23 files changed

Lines changed: 2581 additions & 363 deletions

AGENTS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ This repository is the source monorepo for `startupjs-ui`: the shared multiplatf
99
- `packages/docs` and `packages/mdx`: internal docs support packages, not normal app-facing components.
1010
- `packages/core`: shared theming, helpers, CSS variables, and other low-level infrastructure.
1111
- `docs/`: the user-facing StartupJS + Expo documentation app.
12-
- `storybook/`: shared stories and native Storybook workspace.
13-
- `storybook-web/`: the web Storybook harness used for interaction and accessibility checks.
12+
- `storybook/`: shared Storybook workspace with native `.rnstorybook` and web `.storybook` setups.
1413
- `scripts/`: repo maintenance scripts such as export checks and declaration generation.
1514
- `tasks.md`: the live QA ledger and follow-up backlog.
1615

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"expo-symbols": "~55.0.7",
4545
"expo-system-ui": "~55.0.13",
4646
"expo-web-browser": "~55.0.12",
47-
"react": "19.2.0",
48-
"react-dom": "19.2.0",
47+
"react": "19.2.5",
48+
"react-dom": "19.2.5",
4949
"react-native": "0.83.4",
5050
"react-native-gesture-handler": "~2.30.0",
5151
"react-native-pager-view": "8.0.0",
@@ -55,7 +55,7 @@
5555
"react-native-svg": "15.15.3",
5656
"react-native-web": "~0.21.0",
5757
"react-native-worklets": "0.7.2",
58-
"startupjs": "^0.62.0-alpha.14"
58+
"startupjs": "^0.62.0-alpha.16"
5959
},
6060
"devDependencies": {
6161
"@types/react": "~19.2.10",

eslint.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ export default defineConfig([
1818
ignores: [
1919
'node_modules/*', 'dist/*',
2020
'docs/.expo', 'docs/dist/*', 'docs/expo-env.d.ts',
21-
// Storybook workspaces
21+
// Storybook workspace
2222
'storybook/*',
23-
'storybook-web/*',
2423
// Outdated code left for reference and future refactoring
2524
'packages/docs/client/app/*',
2625
// AUTO-GENERATED START (generate-package-dts)

lerna.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"npmClient": "yarn",
44
"packages": [
55
"packages/*",
6-
"docs"
6+
"docs",
7+
"storybook"
78
]
8-
}
9+
}

package.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
},
66
"workspaces": [
77
"packages/*",
8-
"docs"
9-
],
10-
"//workspaces": [
11-
"storybook",
12-
"storybook-web"
8+
"docs",
9+
"storybook"
1310
],
1411
"scripts": {
1512
"start": "yarn docs",
@@ -19,15 +16,15 @@
1916
"start-production": "cd docs && yarn start-production",
2017
"start-production-static": "cd docs && yarn start-production-static",
2118
"docs": "cd docs && yarn start",
22-
"storybook": "cd storybook-web && yarn storybook",
23-
"storybook:web": "cd storybook-web && yarn storybook",
24-
"storybook:build": "cd storybook-web && yarn build-storybook",
25-
"storybook:build:pages": "cd storybook-web && yarn build-storybook --output-dir ../docs/dist/storybook",
26-
"storybook:test": "cd storybook-web && yarn test-storybook",
27-
"storybook:test:watch": "cd storybook-web && yarn test-storybook:watch",
28-
"storybook:native": "cd storybook && yarn start",
29-
"storybook:native:web": "cd storybook && yarn web",
30-
"storybook:native:build": "cd storybook && yarn build",
19+
"storybook": "yarn workspace startupjs-ui-storybook storybook",
20+
"storybook:web": "yarn workspace startupjs-ui-storybook storybook",
21+
"storybook:build": "yarn workspace startupjs-ui-storybook build-storybook",
22+
"storybook:build:pages": "yarn workspace startupjs-ui-storybook build-storybook --output-dir ../docs/dist/storybook",
23+
"storybook:test": "yarn workspace startupjs-ui-storybook test-storybook",
24+
"storybook:test:watch": "yarn workspace startupjs-ui-storybook test-storybook:watch",
25+
"storybook:native": "yarn workspace startupjs-ui-storybook start",
26+
"storybook:native:web": "yarn workspace startupjs-ui-storybook web",
27+
"storybook:native:build": "yarn workspace startupjs-ui-storybook build",
3128
"test": "sh -c 'set -e; for dir in packages/*/; do echo \"Testing $dir\"; (cd \"$dir\" && yarn test) || { echo \"\\033[31mERROR: Tests failed for $dir\\033[0m\"; exit 1; }; done'",
3229
"generate-package-dts": "node scripts/generate-package-dts.mjs",
3330
"publish-patch": "dotenv -- npx lerna publish patch --conventional-commits --create-release=github",

scripts/generate-package-dts.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ async function main () {
6767
include: [],
6868
exclude: [
6969
'../../docs/**/*',
70-
'../../storybook/**/*',
71-
'../../storybook-web/**/*'
70+
'../../storybook/**/*'
7271
],
7372
files: [
7473
...packagesToBuild.map(pkg => path.relative(tempDir, path.join(rootDir, pkg.entryFile))),

scripts/run-storybook.mjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os from 'node:os'
2+
3+
const originalNetworkInterfaces = os.networkInterfaces
4+
5+
os.networkInterfaces = function networkInterfacesWithLoopbackFallback () {
6+
try {
7+
return originalNetworkInterfaces.call(os)
8+
} catch (err) {
9+
if (err?.code !== 'ERR_SYSTEM_ERROR' && err?.syscall !== 'uv_interface_addresses') {
10+
throw err
11+
}
12+
13+
return {
14+
lo: [
15+
{
16+
address: '127.0.0.1',
17+
netmask: '255.0.0.0',
18+
family: 'IPv4',
19+
mac: '00:00:00:00:00:00',
20+
internal: true,
21+
cidr: '127.0.0.1/8'
22+
},
23+
{
24+
address: '::1',
25+
netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
26+
family: 'IPv6',
27+
mac: '00:00:00:00:00:00',
28+
internal: true,
29+
cidr: '::1/128',
30+
scopeid: 0
31+
}
32+
]
33+
}
34+
}
35+
}
36+
37+
await import('../node_modules/storybook/dist/bin/dispatcher.js')

storybook-web/package.json

Lines changed: 0 additions & 67 deletions
This file was deleted.

storybook-web/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const transpiledModules = [
1717
]
1818

1919
const config: StorybookConfig = {
20-
stories: ['../../storybook/stories/**/*.stories.@(ts|tsx|js|jsx)'],
20+
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
2121
addons: [
2222
'@storybook/addon-docs',
2323
'@storybook/addon-a11y',

0 commit comments

Comments
 (0)