Files
metabuilder/storybook/storybook-config.schema.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

99 lines
2.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Storybook Config",
"description": "Configuration for auto-discovering and rendering MetaBuilder packages in Storybook",
"type": "object",
"properties": {
"$schema": { "type": "string" },
"description": { "type": "string" },
"packagesPath": {
"type": "string",
"description": "Relative path to packages directory"
},
"packagesIndex": {
"type": "string",
"description": "Relative path to packages/index.json"
},
"discovery": {
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"scanManifests": { "type": "boolean" },
"includedCategories": {
"type": "array",
"items": { "type": "string" }
},
"excludedPackages": {
"type": "array",
"items": { "type": "string" }
},
"minLevel": { "type": "integer", "minimum": 1, "maximum": 6 },
"maxLevel": { "type": "integer", "minimum": 1, "maximum": 6 }
}
},
"rendering": {
"type": "object",
"properties": {
"defaultContext": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"id": { "type": "string" },
"username": { "type": "string" },
"level": { "type": "integer" },
"email": { "type": "string" }
}
},
"nerdMode": { "type": "boolean" },
"theme": { "type": "string", "enum": ["light", "dark"] }
}
},
"contextVariants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"context": { "type": "object" }
},
"required": ["name", "context"]
}
}
}
},
"scripts": {
"type": "object",
"properties": {
"renderFunctions": {
"type": "array",
"items": { "type": "string" }
},
"ignoredScripts": {
"type": "array",
"items": { "type": "string" }
}
}
},
"manualOverrides": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"featured": { "type": "boolean" },
"renders": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"description": { "type": "string" }
}
}
}
}
}
}
}
}