📄 原始资料 (已截断) | 展开查看原始 JSON(svg.json)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bricks://elements/svg",
"schemaVersion": "2.3",
"type": "object",
"title": "SVG",
"description": "Schema for Bricks SVG element",
"metadata": {
"name": "svg",
"category": "media",
"tag": "svg",
"nestable": false
},
"settings": {
"source": {
"label": "Source",
"options": {
"dynamicData": "Dynamic data",
"code": "Code",
"iconSet": "Icon set",
"dynamicDataZh": "动态数据",
"codeZh": "代码",
"iconSetZh": "图标集"
},
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Single selection",
"descriptionZh": "单选。"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple selection",
"descriptionZh": "多选。"
}
]
},
"controlType": "select",
"labelZh": "来源"
},
"file": {
"hasRequired": true,
"valueSchema": {
"type": "object",
"properties": {
"id": {
"type": [
"string",
"integer"
]
},
"url": {
"type": "string"
},
"library": {
"type": "string"
}
}
},
"controlType": "svg"
},
"iconSet": {
"label": "Icon set",
"hasRequired": true,
"valueSchema": {
"type": "object",
"description": "Icon settings",
"properties": {
"library": {
"type": "string"
},
"icon": {
"type": "string"
},
"svg": {
"type": "object"
}
},
"descriptionZh": "图标设置。"
},
"controlType": "icon",
"labelZh": "图标集"
},
"dynamicData": {
"label": "Dynamic data",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "动态数据"
},
"code": {
"label": "Code",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "code",
"labelZh": "代码"
},
"height": {
"label": "Height",
"units": true,
"css": [
{
"property": "height"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "高度"
},
"width": {
"label": "Width",
"units": true,
"css": [
{
"property": "width"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "宽度"
},
"strokeWidth": {
"label": "Stroke width",
"css": [
{
"property": "stroke-width",
"selector": "*",
"important": true
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "描边宽度"
},
"stroke": {
"label": "Stroke color",
"css": [
{
"property": "stroke",
"selector": ":not([stroke=\"none\"])",
"important": true
}
],
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "描边颜色"
},
"fill": {
"label": "Fill",
"css": [
{
"property": "fill",
"selector": ":not([fill=\"none\"])",
"important": true
}
],
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "填充"
},
"link": {
"label": "Link",
"valueSchema": {
"type": "object",
"description": "Link settings",
"properties": {
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"postId": {
"type": [
"string",
"integer"
]
},
"newTab": {
"type": "boolean"
},
"rel": {
"type": "string"
},
"title": {
"type": "string"
},
"ariaLabel": {
"type": "string"
},
"lightboxId": {
"type": "string"
},
"lightboxType": {
"type": "string"
}
},
"descriptionZh": "链接设置。"
},
"controlType": "link",
"labelZh": "链接"
},
"_content": {
"label": "Content",
"css": [
{
... (内容过长已截断,完整 JSON 见原始文件)