refactor(tui): load native V2 themes (#38430)
This commit is contained in:
parent
466b75b19d
commit
8f3465c951
20 changed files with 410 additions and 161 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { Schema, SchemaAST } from "effect"
|
||||
import { format } from "prettier"
|
||||
import { ThemeDefinition, ThemeFile } from "../../tui/src/theme/v2/schema"
|
||||
import { ThemeDefinition, ThemeDocument } from "../../tui/src/theme/v2/schema"
|
||||
|
||||
const target = import.meta.dir + "/../snippets/generated/theme-tokens.mdx"
|
||||
const root = requireObject(ThemeDefinition.ast)
|
||||
|
|
@ -52,8 +52,8 @@ const example = {
|
|||
default: "#101014",
|
||||
},
|
||||
},
|
||||
} satisfies ThemeFile
|
||||
Schema.decodeUnknownSync(ThemeFile)(example)
|
||||
} satisfies ThemeDocument
|
||||
Schema.decodeUnknownSync(ThemeDocument)(example)
|
||||
const output = await format(
|
||||
`{/* Generated by packages/docs/script/generate-theme-tokens.ts. Do not edit. */}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue