mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-07-06 08:01:32 +00:00

* chore: add vendor submodules * feat: add packages for db,ci,schema,api,jarvis cmds * feat: add tauri-jarvis-plugin * feat: implement extension commands list * fix(desktop): import path errors after packages refactor * chore: add self signed cert * fix: prevent prerender for desktop * fix(desktop): desktop sveltekit static build, use csr for dynamic route * feat: add error handling page and components * refactor: component lib * refactor: move more types, functions and components out of desktop * refactor(ui): more refactor * refactor(ui): move store components to @kksh/ui * ci: add CI for build & test * refactor: rename @kksh/extensions to @kksh/extension * ci: add 2 more ci * ci: fix * fix: CI env var * chore: add changeset * feat: implement extension store item detail view * feat: implement extension store install, uninstall, upgrade * format * revert: upgradable logic, the new one doesn't work yet * refactor: make @kksh/ui dependent only on @kksh/api Reason: @kksh/ui may be published later for building website, all its dependency packages must be also published. To avoid trouble it should be standalone, depend only on packages already published * refactor: cleanup * fixed: some typescript error * chore: got typedoc working on @kksh/api * ci: disable manifest schema upload CI on push
50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
import {
|
|
hexColor,
|
|
literal,
|
|
maxValue,
|
|
minValue,
|
|
number,
|
|
object,
|
|
optional,
|
|
pipe,
|
|
string,
|
|
union,
|
|
type InferOutput
|
|
} from "valibot"
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Color */
|
|
/* -------------------------------------------------------------------------- */
|
|
export const Color = pipe(string(), hexColor())
|
|
export type Color = InferOutput<typeof Color>
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Style */
|
|
/* -------------------------------------------------------------------------- */
|
|
export const CustomPosition = object({
|
|
top: optional(number()),
|
|
right: optional(number()),
|
|
bottom: optional(number()),
|
|
left: optional(number())
|
|
})
|
|
export type CustomPosition = InferOutput<typeof CustomPosition>
|
|
export type Position = "top-left" | "top-right" | "bottom-left" | "bottom-right" | CustomPosition
|
|
export const LightMode = union([literal("light"), literal("dark"), literal("auto")])
|
|
export type LightMode = InferOutput<typeof LightMode>
|
|
export const ThemeColor = union([
|
|
literal("zinc"),
|
|
literal("slate"),
|
|
literal("stone"),
|
|
literal("gray"),
|
|
literal("neutral"),
|
|
literal("red"),
|
|
literal("rose"),
|
|
literal("orange"),
|
|
literal("green"),
|
|
literal("blue"),
|
|
literal("yellow"),
|
|
literal("violet")
|
|
])
|
|
export type ThemeColor = InferOutput<typeof ThemeColor>
|
|
export const Radius = pipe(number(), minValue(0), maxValue(1))
|
|
export type Radius = InferOutput<typeof Radius>
|