Skip to content

Commit

Permalink
feat: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hngngn committed Jan 28, 2025
1 parent db46cc8 commit 5315483
Show file tree
Hide file tree
Showing 7 changed files with 963 additions and 76 deletions.
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"devDependencies": {
"@vinxi/plugin-mdx": "^3.7.2",
"autoprefixer": "^10.4.20",
"eta": "^3.5.0",
"postcss": "^8.4.49",
"rehype-pretty-code": "^0.14.0",
"rehype-slug": "^6.0.0",
Expand Down
167 changes: 167 additions & 0 deletions docs/public/registry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"registry:libs",
"registry:example",
"registry:block",
"registry:component",
"registry:ui",
"registry:hook",
"registry:page"
]
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"author": {
"type": "string"
},
"dependencies": {
"type": "array",
"items": {
"type": "string"
}
},
"devDependencies": {
"type": "array",
"items": {
"type": "string"
}
},
"registryDependencies": {
"type": "array",
"items": {
"type": "string"
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"registry:libs",
"registry:example",
"registry:block",
"registry:component",
"registry:ui",
"registry:hook",
"registry:page"
]
},
"target": {
"type": "string"
}
},
"if": {
"properties": {
"type": {
"enum": ["registry:page"]
}
}
},
"then": {
"required": ["path", "type", "target"]
},
"else": {
"required": ["path", "type"]
}
}
},
"tailwind": {
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "string"
}
},
"theme": {
"type": "object",
"additionalProperties": true
},
"plugins": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"uno": {
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "string"
}
},
"theme": {
"type": "object",
"additionalProperties": true
},
"plugins": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"cssVars": {
"type": "object",
"properties": {
"light": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"dark": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": true
},
"docs": {
"type": "string"
}
},
"required": ["name", "type"]
}
144 changes: 72 additions & 72 deletions docs/public/schema.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"tailwind": {
"type": "object",
"properties": {
"config": {
"type": "string"
},
"css": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"variable": {
"type": "boolean"
}
}
},
"color": {
"type": "string"
},
"prefix": {
"type": "string"
}
},
"required": ["config", "css", "color"]
},
"uno": {
"type": "object",
"properties": {
"config": {
"type": "string"
},
"css": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"variable": {
"type": "boolean"
}
}
},
"color": {
"type": "string"
},
"prefix": {
"type": "string"
}
},
"required": ["config", "css", "color"]
},
"alias": {
"type": "object",
"properties": {
"cn": {
"type": "string"
},
"component": {
"type": "string"
},
"ui": {
"type": "string"
}
},
"required": ["cn", "component"]
}
},
"required": ["alias"]
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"tailwind": {
"type": "object",
"properties": {
"config": {
"type": "string"
},
"css": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"variable": {
"type": "boolean"
}
}
},
"color": {
"type": "string"
},
"prefix": {
"type": "string"
}
},
"required": ["config", "css", "color"]
},
"uno": {
"type": "object",
"properties": {
"config": {
"type": "string"
},
"css": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"variable": {
"type": "boolean"
}
}
},
"color": {
"type": "string"
},
"prefix": {
"type": "string"
}
},
"required": ["config", "css", "color"]
},
"alias": {
"type": "object",
"properties": {
"cn": {
"type": "string"
},
"component": {
"type": "string"
},
"ui": {
"type": "string"
}
},
"required": ["cn", "component"]
}
},
"required": ["alias"]
}
Loading

0 comments on commit 5315483

Please sign in to comment.