mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
config: storybook,tsx,preview (2 files)
This commit is contained in:
39
package.json
39
package.json
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"scripts": {
|
||||
"generate:package": "npx ts-node scripts/generate-package.ts",
|
||||
"todos:scan": "python3 docs/todo/scans/scan-project-todos.py",
|
||||
"todos:preview": "python3 tools/project-management/populate-kanban.py --dry-run --limit 10",
|
||||
"todos:export": "python3 tools/project-management/populate-kanban.py --output todos.json",
|
||||
"todos:export-critical": "python3 tools/project-management/populate-kanban.py --output todos-critical.json --filter-priority critical",
|
||||
"todos:export-filtered": "python3 tools/project-management/populate-kanban.py --output todos-filtered.json --exclude-checklist",
|
||||
"todos:test": "python3 tools/project-management/test_populate_kanban.py",
|
||||
"todos:create": "python3 tools/project-management/populate-kanban.py --create",
|
||||
"todos:help": "python3 tools/project-management/populate-kanban.py --help",
|
||||
"todos:check": "python3 tools/project-management/check-new-todos.py",
|
||||
"todos:baseline": "python3 tools/project-management/check-new-todos.py --save-baseline",
|
||||
"extract:preview": "cd frontends/nextjs && npm run extract:preview",
|
||||
"extract:quick": "cd frontends/nextjs && npm run extract:quick",
|
||||
"extract:auto": "cd frontends/nextjs && npm run extract:auto",
|
||||
"extract:all": "cd frontends/nextjs && npm run extract:all",
|
||||
"extract:help": "cd frontends/nextjs && npm run extract:help",
|
||||
"schema:scan": "npx ts-node tools/codegen/schema-cli.ts scan",
|
||||
"schema:list": "npx ts-node tools/codegen/schema-cli.ts list",
|
||||
"schema:approve": "npx ts-node tools/codegen/schema-cli.ts approve",
|
||||
"schema:generate": "npx ts-node tools/codegen/schema-cli.ts generate",
|
||||
"schema:status": "npx ts-node tools/codegen/schema-cli.ts status",
|
||||
"schema:preview": "npx ts-node tools/codegen/schema-cli.ts preview",
|
||||
"db:generate": "npx prisma generate",
|
||||
"db:migrate": "npx prisma migrate dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@prisma/client": "^7.2.0",
|
||||
"prisma": "^7.2.0",
|
||||
"yaml": "^2.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/adapter-better-sqlite3": "^7.2.0",
|
||||
"better-sqlite3": "^12.5.0",
|
||||
"clsx": "^2.1.1",
|
||||
"jszip": "^3.10.1"
|
||||
}
|
||||
}
|
||||
@@ -52,13 +52,19 @@ const preview: Preview = {
|
||||
},
|
||||
decorators: [
|
||||
(Story) => {
|
||||
// Load story-specific package styles
|
||||
// Load story-specific package styles on demand
|
||||
useEffect(() => {
|
||||
const storyPackage = (Story as any)?.parameters?.package
|
||||
if (storyPackage && !PACKAGES_TO_LOAD.includes(storyPackage)) {
|
||||
loadAndInjectStyles(storyPackage).then((css) => {
|
||||
console.log(`✓ Loaded story-specific styles for ${storyPackage}`)
|
||||
})
|
||||
if (storyPackage) {
|
||||
// Check if already loaded
|
||||
const existingStyle = document.getElementById(`styles-${storyPackage}`)
|
||||
if (!existingStyle) {
|
||||
loadAndInjectStyles(storyPackage).then((css) => {
|
||||
console.log(`✓ Story-specific: ${storyPackage} (${css.length} bytes)`)
|
||||
}).catch((error) => {
|
||||
console.warn(`✗ Story-specific ${storyPackage}:`, error)
|
||||
})
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user