From 34ff87d504836ff71b3bb2d466842c00ee3c5ec2 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 8 Nov 2025 01:59:02 +0000 Subject: chore: format code --- packages/ui/src/components/checkbox.tsx | 13 ++----------- packages/ui/src/components/dialog.tsx | 6 +----- packages/ui/src/components/diff-changes.tsx | 6 +----- packages/ui/src/components/diff.tsx | 22 +++------------------- packages/ui/src/components/icon-button.tsx | 6 +----- packages/ui/src/components/input.tsx | 7 +------ packages/ui/src/components/list.tsx | 8 +------- packages/ui/src/components/message-part.tsx | 21 ++++----------------- packages/ui/src/components/progress-circle.tsx | 16 ++-------------- packages/ui/src/components/select-dialog.tsx | 22 ++++++++++------------ packages/ui/src/components/select.tsx | 4 +--- packages/ui/src/components/typewriter.tsx | 6 +----- 12 files changed, 28 insertions(+), 109 deletions(-) (limited to 'packages/ui/src/components') diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx index ac9abfdab..2009a430b 100644 --- a/packages/ui/src/components/checkbox.tsx +++ b/packages/ui/src/components/checkbox.tsx @@ -9,14 +9,7 @@ export interface CheckboxProps extends ParentProps local.children) return ( @@ -42,9 +35,7 @@ export function Checkbox(props: CheckboxProps) { - - {local.description} - + {local.description} diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx index fdbb9022d..ce7a4b3ac 100644 --- a/packages/ui/src/components/dialog.tsx +++ b/packages/ui/src/components/dialog.tsx @@ -38,11 +38,7 @@ export function DialogRoot(props: DialogProps) { return ( - + {props.trigger} diff --git a/packages/ui/src/components/diff-changes.tsx b/packages/ui/src/components/diff-changes.tsx index 3095ddbdb..a8ab737f7 100644 --- a/packages/ui/src/components/diff-changes.tsx +++ b/packages/ui/src/components/diff-changes.tsx @@ -93,11 +93,7 @@ export function DiffChanges(props: { return ( 0 : true}> -
+
diff --git a/packages/ui/src/components/diff.tsx b/packages/ui/src/components/diff.tsx index 21ff980c1..a53d5b3f3 100644 --- a/packages/ui/src/components/diff.tsx +++ b/packages/ui/src/components/diff.tsx @@ -23,13 +23,7 @@ export type DiffProps = FileDiffOptions & { export function Diff(props: DiffProps) { let container!: HTMLDivElement - const [local, others] = splitProps(props, [ - "before", - "after", - "class", - "classList", - "annotations", - ]) + const [local, others] = splitProps(props, ["before", "after", "class", "classList", "annotations"]) // const lineAnnotations: DiffLineAnnotation[] = [ // { @@ -226,13 +220,7 @@ registerCustomTheme("OpenCode", () => { }, }, { - scope: [ - "constant", - "entity.name.constant", - "variable.other.constant", - "variable.language", - "entity", - ], + scope: ["constant", "entity.name.constant", "variable.other.constant", "variable.language", "entity"], settings: { foreground: "var(--syntax-constant)", }, @@ -320,11 +308,7 @@ registerCustomTheme("OpenCode", () => { }, }, { - scope: [ - "support.type.object.module", - "variable.other.object", - "support.type.property-name.css", - ], + scope: ["support.type.object.module", "variable.other.object", "support.type.property-name.css"], settings: { foreground: "var(--syntax-object)", }, diff --git a/packages/ui/src/components/icon-button.tsx b/packages/ui/src/components/icon-button.tsx index fccdebd04..79a7cb9c9 100644 --- a/packages/ui/src/components/icon-button.tsx +++ b/packages/ui/src/components/icon-button.tsx @@ -22,11 +22,7 @@ export function IconButton(props: ComponentProps<"button"> & IconButtonProps) { [split.class ?? ""]: !!split.class, }} > - + ) } diff --git a/packages/ui/src/components/input.tsx b/packages/ui/src/components/input.tsx index 7688d9fc5..9557e90f3 100644 --- a/packages/ui/src/components/input.tsx +++ b/packages/ui/src/components/input.tsx @@ -21,12 +21,7 @@ export function Input(props: InputProps) { "onKeyDown", ]) return ( - + {local.label} diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index 766979ae6..aaba61fdf 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -62,13 +62,7 @@ export function List(props: ListProps) { }) return ( - + {(item) => ( @@ -93,12 +88,7 @@ export function Part(props: MessagePartProps) { const component = createMemo(() => PART_MAPPING[props.part.type]) return ( - + ) } @@ -226,10 +216,7 @@ ToolRegistry.register({ name: "list", render(props) { return ( - +
{props.output}
diff --git a/packages/ui/src/components/progress-circle.tsx b/packages/ui/src/components/progress-circle.tsx index a659c0f2e..f2e497fe5 100644 --- a/packages/ui/src/components/progress-circle.tsx +++ b/packages/ui/src/components/progress-circle.tsx @@ -7,13 +7,7 @@ export interface ProgressCircleProps extends Pick, "class" } export function ProgressCircle(props: ProgressCircleProps) { - const [split, rest] = splitProps(props, [ - "percentage", - "size", - "strokeWidth", - "class", - "classList", - ]) + const [split, rest] = splitProps(props, ["percentage", "size", "strokeWidth", "class", "classList"]) const size = () => split.size || 16 const strokeWidth = () => split.strokeWidth || 3 @@ -42,13 +36,7 @@ export function ProgressCircle(props: ProgressCircleProps) { [split.class ?? ""]: !!split.class, }} > - + (props: SelectDialogProps) { mouseActive: false, }) - const { filter, grouped, flat, reset, clear, active, setActive, onKeyDown, onInput } = - useFilteredList({ - items: others.items, - key: others.key, - filterKeys: others.filterKeys, - current: others.current, - groupBy: others.groupBy, - sortBy: others.sortBy, - sortGroupsBy: others.sortGroupsBy, - }) + const { filter, grouped, flat, reset, clear, active, setActive, onKeyDown, onInput } = useFilteredList({ + items: others.items, + key: others.key, + filterKeys: others.filterKeys, + current: others.current, + groupBy: others.groupBy, + sortBy: others.sortBy, + sortGroupsBy: others.sortGroupsBy, + }) createEffect(() => { filter() @@ -118,8 +117,7 @@ export function SelectDialog(props: SelectDialogProps) { fallback={
- {props.emptyMessage ?? "No search results"} for{" "} - "{filter()}" + {props.emptyMessage ?? "No search results"} for "{filter()}"
} diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx index 305e8a4f8..dea6743ee 100644 --- a/packages/ui/src/components/select.tsx +++ b/packages/ui/src/components/select.tsx @@ -49,9 +49,7 @@ export function Select(props: SelectProps & ButtonProps) { {...itemProps} > - {props.label - ? props.label(itemProps.item.rawValue) - : (itemProps.item.rawValue as string)} + {props.label ? props.label(itemProps.item.rawValue) : (itemProps.item.rawValue as string)} diff --git a/packages/ui/src/components/typewriter.tsx b/packages/ui/src/components/typewriter.tsx index 9adb267ad..2f6ecb016 100644 --- a/packages/ui/src/components/typewriter.tsx +++ b/packages/ui/src/components/typewriter.tsx @@ -2,11 +2,7 @@ import { createEffect, Show, type ValidComponent } from "solid-js" import { createStore } from "solid-js/store" import { Dynamic } from "solid-js/web" -export const Typewriter = (props: { - text?: string - class?: string - as?: T -}) => { +export const Typewriter = (props: { text?: string; class?: string; as?: T }) => { const [store, setStore] = createStore({ typing: false, displayed: "", -- cgit v1.2.3