Files
metabuilder/packages/screenshot_analyzer/components/ui.json
johndoe6345789 6992c3a650 feat(ui_pages): Add UI Pages Bundle with multi-level navigation and components
- Created package.json for ui_pages with dependencies and exports.
- Added roles.json for access permissions related to UI pages.
- Implemented functions.json for managing UI pages and routing.
- Developed stories.json for Storybook showcasing UI pages components.
- Defined styles tokens for UI pages including colors, spacing, and typography.

feat(ui_permissions): Introduce UI Permissions package for access control

- Created package.json for ui_permissions with permission utilities.
- Added roles.json defining permissions for a 6-level access control system.
- Implemented functions.json for permission checking and level management.
- Developed stories.json for Storybook showcasing permission-related components.
- Defined styles tokens for UI permissions including colors and spacing.
2026-01-02 19:45:10 +00:00

321 lines
9.0 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "https://metabuilder.dev/schemas/json-script-components.schema.json",
"schemaVersion": "2.0.0",
"package": "screenshot_analyzer",
"description": "Screenshot Analyzer components for capturing and analyzing pages",
"components": [
{
"id": "screenshot_analyzer",
"name": "ScreenshotAnalyzer",
"description": "Main screenshot analyzer container with capture and analysis",
"category": "demo",
"icon": "camera",
"props": [],
"render": {
"type": "element",
"template": {
"type": "Container",
"className": "screenshot-analyzer-container",
"children": [
{
"type": "Header",
"title": "Screenshot Analyzer",
"description": "Capture and analyze the current page",
"children": [
{
"type": "Chip",
"label": "Local Analysis",
"color": "secondary"
}
]
},
{
"type": "UploadSection",
"props": {}
},
{
"type": "ResultPanel",
"props": {}
},
{
"type": "PageInfo",
"props": {}
}
]
}
},
"bindings": {
"browser": true
}
},
{
"id": "upload_section",
"name": "UploadSection",
"description": "Screenshot capture and download controls",
"category": "demo",
"icon": "upload",
"props": [
{
"name": "screenshotData",
"type": "string",
"required": false,
"default": null,
"description": "Screenshot data as base64 or data URL"
},
{
"name": "isCapturing",
"type": "boolean",
"required": false,
"default": false,
"description": "Whether capture is in progress"
},
{
"name": "isAnalyzing",
"type": "boolean",
"required": false,
"default": false,
"description": "Whether analysis is in progress"
}
],
"render": {
"type": "element",
"template": {
"type": "Card",
"className": "upload-section",
"title": "Capture",
"description": "Take a screenshot of the current page",
"children": [
{
"type": "conditional",
"condition": "{{!screenshotData}}",
"then": {
"type": "UploadZone",
"icon": "camera",
"title": "Capture Screenshot",
"description": "Click to capture the current page"
}
},
{
"type": "conditional",
"condition": "{{screenshotData}}",
"then": {
"type": "ImagePreview",
"src": "{{screenshotData}}",
"alt": "Screenshot"
}
},
{
"type": "ButtonGroup",
"children": [
{
"type": "Button",
"label": "Capture",
"icon": "camera",
"action": "capture_screenshot",
"loading": "{{isCapturing}}"
},
{
"type": "Button",
"label": "Download",
"icon": "download",
"action": "download_screenshot",
"disabled": "{{!screenshotData}}",
"variant": "outline"
},
{
"type": "Button",
"label": "Re-analyze",
"icon": "refresh",
"action": "reanalyze",
"disabled": "{{!screenshotData}}",
"loading": "{{isAnalyzing}}",
"variant": "outline"
}
]
}
]
}
},
"bindings": {
"browser": true
}
},
{
"id": "result_panel",
"name": "ResultPanel",
"description": "Analysis results display with tabs",
"category": "demo",
"icon": "chart",
"props": [
{
"name": "analysisReport",
"type": "string",
"required": false,
"default": "",
"description": "Markdown formatted analysis report"
},
{
"name": "analysisResult",
"type": "object",
"required": false,
"default": null,
"description": "Structured analysis result object"
}
],
"render": {
"type": "element",
"template": {
"type": "Card",
"className": "result-panel",
"children": [
{
"type": "conditional",
"condition": "{{analysisReport}}",
"then": {
"type": "Card",
"title": "Analysis Report",
"children": [
{
"type": "Markdown",
"content": "{{analysisReport}}"
}
]
}
},
{
"type": "conditional",
"condition": "{{analysisResult}}",
"then": {
"type": "Tabs",
"defaultValue": "summary",
"tabs": [
{ "value": "summary", "label": "Summary" },
{ "value": "components", "label": "Components" },
{ "value": "recommendations", "label": "Recommendations" }
],
"children": [
{
"type": "TabPanel",
"value": "summary",
"children": [
{
"type": "DataDisplay",
"dataSource": "{{analysisResult.summary}}",
"title": "Summary"
}
]
},
{
"type": "TabPanel",
"value": "components",
"children": [
{
"type": "ListDisplay",
"dataSource": "{{analysisResult.components}}",
"title": "Detected Components"
}
]
},
{
"type": "TabPanel",
"value": "recommendations",
"children": [
{
"type": "ListDisplay",
"dataSource": "{{analysisResult.recommendations}}",
"title": "Recommendations"
}
]
}
]
}
}
]
}
},
"bindings": {
"browser": false
}
},
{
"id": "page_info",
"name": "PageInfo",
"description": "Current page metadata display",
"category": "demo",
"icon": "info",
"props": [
{
"name": "pageTitle",
"type": "string",
"required": false,
"description": "Page title"
},
{
"name": "pageUrl",
"type": "string",
"required": false,
"description": "Page URL"
},
{
"name": "viewport",
"type": "object",
"required": false,
"description": "Viewport dimensions with width and height"
},
{
"name": "userAgent",
"type": "string",
"required": false,
"description": "Browser user agent string"
}
],
"render": {
"type": "element",
"template": {
"type": "Card",
"className": "page-info",
"title": "Page Information",
"children": [
{
"type": "Grid",
"columns": 2,
"gap": 2,
"children": [
{
"type": "InfoItem",
"label": "Title",
"value": "{{pageTitle}}",
"font": "monospace"
},
{
"type": "InfoItem",
"label": "URL",
"value": "{{pageUrl}}",
"font": "monospace",
"truncate": true
},
{
"type": "InfoItem",
"label": "Viewport",
"value": "{{viewport.width}} × {{viewport.height}}",
"font": "monospace"
},
{
"type": "InfoItem",
"label": "User Agent",
"value": "{{userAgent}}",
"font": "monospace",
"truncate": true
}
]
}
]
}
},
"bindings": {
"browser": true
}
}
]
}