76 lines
1.5 KiB
TypeScript
76 lines
1.5 KiB
TypeScript
/*
|
|
* dotfiles - components.d.ts
|
|
*
|
|
* Created by Janis Hutz 03/22/2025, Licensed under the GPL V3 License
|
|
* https://janishutz.com, development@janishutz.com
|
|
*
|
|
*
|
|
*/
|
|
|
|
import type { UIComponent, ResultElement } from "./rendering";
|
|
|
|
|
|
export interface App extends ResultElement {
|
|
/**
|
|
* The app start command that will be executed
|
|
*/
|
|
command: string;
|
|
}
|
|
|
|
// TODO: Finish
|
|
export interface DictionaryEntry extends ResultElement {
|
|
/**
|
|
* Execute no command
|
|
*/
|
|
action: null;
|
|
|
|
|
|
/**
|
|
* The dictionary definition
|
|
*/
|
|
definition: string;
|
|
}
|
|
|
|
export interface CMDOutput extends ResultElement {
|
|
/**
|
|
* Stdout from the command that was run
|
|
*/
|
|
result: string;
|
|
}
|
|
|
|
export interface Calculation extends ResultElement {
|
|
/**
|
|
* THe calculation result
|
|
*/
|
|
result: string;
|
|
}
|
|
|
|
|
|
/* ************* *
|
|
* UI Components *
|
|
* ************* */
|
|
|
|
export interface LargeUIComponent extends UIComponent {
|
|
/**
|
|
* The number of items to display per line. Image size will automatically be scaled
|
|
* based on width
|
|
*/
|
|
itemsPerLine: number;
|
|
}
|
|
|
|
export interface MediumUIComponent extends UIComponent {}
|
|
|
|
export interface ListUIComponent extends UIComponent {}
|
|
|
|
export interface DictionaryUIComponent extends UIComponent {
|
|
elements: DictionaryEntry[];
|
|
}
|
|
|
|
export interface CMDOutputUIComponent extends UIComponent {
|
|
elements: CMDOutput[];
|
|
}
|
|
|
|
export interface CalculationUIComponent extends UIComponent {
|
|
elements: Calculation[];
|
|
}
|