refactor: clean up unused imports and styles
- Remove unused `MessageTypeDef` imports in `ComposePanel` and `DynamicForm` - Remove unused `schema` memo in `DynamicForm` - Update `FieldInput` label class to use `shrink-0` instead of `flex-shrink-0` - Exclude test files from `tsconfig.cli.json`
This commit is contained in:
parent
ffa023b92a
commit
c4038a5213
|
|
@ -5,7 +5,6 @@
|
|||
import { Component, createSignal, For, Show, createMemo } from "solid-js";
|
||||
import { registeredTypes, canEmit } from "./registry";
|
||||
import { sendMessage, useJournalStream } from "../stores/journalStream";
|
||||
import type { MessageTypeDef } from "./registry";
|
||||
import { DynamicForm } from "./DynamicForm";
|
||||
|
||||
export const ComposePanel: Component = () => {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
import { Component, For, Show, createMemo } from "solid-js";
|
||||
import { z } from "zod";
|
||||
import { getMessageType } from "./registry";
|
||||
import type { MessageTypeDef } from "./registry";
|
||||
|
||||
type FormData = Record<string, unknown>;
|
||||
|
||||
|
|
@ -22,9 +21,6 @@ interface DynamicFormProps {
|
|||
export const DynamicForm: Component<DynamicFormProps> = (props) => {
|
||||
const def = createMemo(() => getMessageType(props.type));
|
||||
|
||||
// Generate default on type change
|
||||
const schema = createMemo(() => def()?.schema);
|
||||
|
||||
return (
|
||||
<div class="space-y-1.5">
|
||||
<Show when={def()}>
|
||||
|
|
@ -136,7 +132,7 @@ const FieldInput: Component<{
|
|||
return (
|
||||
<div class="flex items-center gap-1">
|
||||
<label
|
||||
class="text-xs text-gray-500 w-20 flex-shrink-0 truncate"
|
||||
class="text-xs text-gray-500 w-20 shrink-0 truncate"
|
||||
title={props.label}
|
||||
>
|
||||
{props.label}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@
|
|||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
},
|
||||
"include": ["src/cli/**/*"],
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"exclude": ["node_modules", "dist", "src/**/*.test.ts"],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue