Files
metabuilder/storybook/storybook.config.json
johndoe6345789 42446ef255 feat: Update package schemas and scripts to support JSON-based lifecycle hooks
- Added `jsonScript` property to metadata schema for JSON script entry points.
- Refactored `generate-package.ts` to replace Lua scripts with JSON scripts for lifecycle hooks.
- Updated test generation to use JSON format for metadata validation.
- Modified documentation and comments to reflect the transition from Lua to JSON scripting.
- Adjusted Storybook configuration and mock data to align with new JSON script structure.
- Renamed relevant files and references from Lua to JSON for consistency across the project.
2026-01-07 15:25:45 +00:00

75 lines
2.1 KiB
JSON

{
"$schema": "./storybook-config.schema.json",
"description": "Auto-discovery configuration for the MetaBuilder package Storybook",
"packagesPath": "../packages",
"packagesIndex": "../packages/index.json",
"discovery": {
"enabled": true,
"scanManifests": true,
"includedCategories": ["ui", "admin", "gaming", "social", "editors", "examples"],
"excludedPackages": ["shared", "testing"],
"minLevel": 0,
"maxLevel": 6
},
"rendering": {
"defaultContext": {
"user": {
"id": "storybook-user",
"username": "demo_user",
"level": 4,
"email": "demo@example.com"
},
"nerdMode": false,
"theme": "light"
},
"contextVariants": [
{
"name": "Guest",
"context": { "user": { "username": "guest", "level": 1 } }
},
{
"name": "Admin",
"context": { "user": { "username": "admin", "level": 4 }, "nerdMode": false }
},
{
"name": "Admin (Nerd Mode)",
"context": { "user": { "username": "admin", "level": 4 }, "nerdMode": true }
},
{
"name": "Supergod",
"context": { "user": { "username": "supergod", "level": 6 } }
}
]
},
"scripts": {
"renderFunctions": ["render", "main", "layout", "login_form", "register_form", "forgot_password", "form", "page", "view"],
"ignoredScripts": ["test", "types", "utils", "init", "validate", "actions", "formatting", "format_time", "format", "send_message", "handle_command", "user_join", "user_leave", "helper", "db"]
},
"manualOverrides": {
"dashboard": {
"featured": true,
"renders": {
"stats.card": { "description": "Single stat card with trend indicator" },
"stats.grid": { "description": "Grid of stat cards" },
"layout.standard": { "description": "Standard dashboard layout" }
}
},
"ui_level4": {
"featured": true,
"renders": {
"layout.render": { "description": "Admin panel main layout" }
}
},
"user_manager": {
"featured": true,
"renders": {
"render_users": { "description": "User management table" }
}
}
}
}