Files
penpot/plugins/apps/lorem-ipsum-plugin/src/model.ts
Andrey Antukh ec1af4ad96 🎉 Import penpot-plugins repository
As commit 819a549e4928d2b1fa98e52bee82d59aec0f70d8
2025-12-30 14:56:15 +01:00

41 lines
745 B
TypeScript

export type GenerationTypes =
| 'paragraphs'
| 'sentences'
| 'words'
| 'characters';
export interface InitPluginUIEvent {
type: 'ready';
}
export interface TextPluginUIEvent {
type: 'text';
generationType: GenerationTypes;
startWithLorem: boolean;
size: number;
autoClose: boolean;
}
export type PluginUIEvent = InitPluginUIEvent | TextPluginUIEvent;
export interface InitPluginEvent {
type: 'init';
content: {
theme: string;
selection: number;
};
}
export interface SelectionPluginEvent {
type: 'selection';
content: number;
}
export interface ThemePluginEvent {
type: 'theme';
content: string;
}
export type PluginMessageEvent =
| InitPluginEvent
| SelectionPluginEvent
| ThemePluginEvent;