2022-12-04 17:51:05 +01:00
|
|
|
import { JSX } from "solid-js";
|
|
|
|
|
2022-12-21 13:56:42 +01:00
|
|
|
export interface SimpleProps {
|
2023-01-07 16:01:53 +01:00
|
|
|
name?: string;
|
2022-12-04 17:51:05 +01:00
|
|
|
className?: string,
|
2022-12-21 13:56:42 +01:00
|
|
|
style?: JSX.CSSProperties,
|
2022-12-04 17:51:05 +01:00
|
|
|
id?: string,
|
|
|
|
}
|
|
|
|
|
2022-12-21 13:56:42 +01:00
|
|
|
export interface ChildProps extends SimpleProps {
|
|
|
|
children?: JSX.Element,
|
|
|
|
}
|
|
|
|
|
2022-12-04 17:51:05 +01:00
|
|
|
export interface LinkProps extends ChildProps {
|
|
|
|
to?: string,
|
|
|
|
rel?: string,
|
|
|
|
newTab?: boolean,
|
2022-12-21 13:56:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface TitleProps extends ChildProps {
|
2022-12-21 15:47:08 +01:00
|
|
|
title?: string,
|
2022-12-21 13:56:42 +01:00
|
|
|
}
|
|
|
|
|
2023-01-11 23:45:43 +01:00
|
|
|
export interface ButtonProps extends TitleProps {
|
|
|
|
onClick?: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent>,
|
|
|
|
type?: "button" | "submit" | "reset",
|
|
|
|
}
|
|
|
|
|
2023-01-07 16:01:53 +01:00
|
|
|
export interface InputProps<T> extends TitleProps {
|
2023-01-10 22:49:47 +01:00
|
|
|
onInput?: JSX.EventHandlerUnion<T, Event>,
|
2023-01-07 16:01:53 +01:00
|
|
|
placeholder?: string | null,
|
|
|
|
required?: boolean,
|
|
|
|
type?: string,
|
|
|
|
}
|
|
|
|
|
2022-12-21 13:56:42 +01:00
|
|
|
export interface CardProps extends LinkProps {
|
2022-12-21 15:47:08 +01:00
|
|
|
title?: string;
|
2023-01-07 16:01:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Expression = {
|
|
|
|
leading: string,
|
|
|
|
left: Expression | null,
|
|
|
|
operator: Operator | null,
|
|
|
|
right: Expression | null,
|
|
|
|
trailing: string,
|
|
|
|
atomic: string | null,
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Operator = "AND" | "OR" | "NOT" | "IMPLICATION";
|
|
|
|
|
|
|
|
export type Table = boolean[][];
|
|
|
|
|
|
|
|
export type OrderOfOperations = {
|
|
|
|
before: string,
|
|
|
|
after: string,
|
|
|
|
law: string,
|
|
|
|
}[];
|
|
|
|
|
|
|
|
export type FetchResult = {
|
|
|
|
status: {
|
|
|
|
code: number,
|
|
|
|
message: string,
|
|
|
|
},
|
|
|
|
before: string,
|
|
|
|
after: string,
|
|
|
|
orderOperations: OrderOfOperations | null,
|
|
|
|
expression: Expression | null,
|
|
|
|
header: string[] | null,
|
|
|
|
table: {
|
|
|
|
truthMatrix: Table,
|
|
|
|
} | null,
|
|
|
|
};
|