Switch to BiomeJS (#306)

This commit is contained in:
Gregory Schier
2025-11-23 08:38:13 -08:00
committed by GitHub
parent 2bac610efe
commit ec3e2e16a9
332 changed files with 3007 additions and 4097 deletions

View File

@@ -32,7 +32,6 @@ import { VStack } from './core/Stacks';
import { Markdown } from './Markdown';
import { SelectFile } from './SelectFile';
// eslint-disable-next-line react-refresh/only-export-components
export const DYNAMIC_FORM_NULL_ARG = '__NULL__';
const INPUT_SIZE = 'sm';
@@ -59,7 +58,7 @@ export function DynamicForm<T extends Record<string, JsonPrimitive>>({
}: Props<T>) {
const setDataAttr = useCallback(
(name: string, value: JsonPrimitive) => {
onChange({ ...data, [name]: value == DYNAMIC_FORM_NULL_ARG ? undefined : value });
onChange({ ...data, [name]: value === DYNAMIC_FORM_NULL_ARG ? undefined : value });
},
[data, onChange],
);
@@ -128,7 +127,7 @@ function FormInputs<T extends Record<string, JsonPrimitive>>({
case 'select':
return (
<SelectArg
key={i}
key={i + stateKey}
arg={input}
onChange={(v) => setDataAttr(input.name, v)}
value={
@@ -250,6 +249,9 @@ function FormInputs<T extends Record<string, JsonPrimitive>>({
);
case 'markdown':
return <Markdown key={i + stateKey}>{input.content}</Markdown>;
default:
// @ts-expect-error
throw new Error(`Invalid input type: ${input.type}`);
}
})}
</>
@@ -293,9 +295,8 @@ function TextArg({
};
if (autocompleteVariables || autocompleteFunctions) {
return <Input {...props} />;
} else {
return <PlainInput {...props} />;
}
return <PlainInput {...props} />;
}
function EditorArg({
@@ -491,7 +492,7 @@ function HttpRequestArg({
return {
label:
buildRequestBreadcrumbs(r, folders).join(' / ') +
(r.id == activeHttpRequest?.id ? ' (current)' : ''),
(r.id === activeHttpRequest?.id ? ' (current)' : ''),
value: r.id,
};
}),