add auto_focus parameter (and refactor TS)

This commit is contained in:
Aran-Fey
2025-03-09 20:07:51 +01:00
parent 312abe62cc
commit dea9cbbf71
75 changed files with 673 additions and 653 deletions

View File

@@ -1,4 +1,4 @@
import { ComponentBase, ComponentState } from "./componentBase";
import { ComponentBase, ComponentState, DeltaState } from "./componentBase";
import { Color } from "../dataModels";
import { colorToCssString } from "../cssUtils";
@@ -9,9 +9,7 @@ export type NodeInputState = ComponentState & {
key: string;
};
export class NodeInputComponent extends ComponentBase {
declare state: Required<NodeInputState>;
export class NodeInputComponent extends ComponentBase<NodeInputState> {
textElement: HTMLElement;
circleElement: HTMLElement;
@@ -39,7 +37,7 @@ export class NodeInputComponent extends ComponentBase {
}
updateElement(
deltaState: NodeInputState,
deltaState: DeltaState<NodeInputState>,
latentComponents: Set<ComponentBase>
): void {
super.updateElement(deltaState, latentComponents);