libmodulor
Version:
A TypeScript library to create platform-agnostic applications
17 lines (16 loc) • 561 B
TypeScript
import type { UIntQuantity } from '../dt/index.js';
import type { UCOPIBase } from './opi.js';
export type UCOPILayoutType = string;
export interface UCOPILayoutInput {
}
export interface UCOPILayoutContext {
availableWidthInPx: UIntQuantity;
target: 'cli' | 'mobile' | 'web';
}
/**
* @alpha This feature is not fully ready yet.
*/
export type UCOPILayout<OPI extends UCOPIBase, LT extends UCOPILayoutType = UCOPILayoutType, LI extends UCOPILayoutInput = UCOPILayoutInput> = {
get: (item: OPI, context: UCOPILayoutContext) => LI;
type: LT;
};