overtype 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,7 @@ export interface Theme {
22
22
  hr?: string;
23
23
  link?: string;
24
24
  listMarker?: string;
25
+ placeholder?: string;
25
26
  primary?: string;
26
27
  rawLine?: string;
27
28
  selection?: string;
@@ -102,6 +103,7 @@ export interface Options {
102
103
  toolbar?: boolean;
103
104
  toolbarButtons?: ToolbarButton[]; // Custom toolbar button configuration
104
105
  smartLists?: boolean; // v1.2.3+ Smart list continuation
106
+ spellcheck?: boolean; // Browser spellcheck (default: false)
105
107
  statsFormatter?: (stats: Stats) => string;
106
108
  codeHighlighter?: ((code: string, language: string) => string) | null; // Per-instance code highlighter
107
109
 
@@ -109,6 +111,15 @@ export interface Options {
109
111
  theme?: string | Theme;
110
112
  colors?: Partial<Theme['colors']>;
111
113
 
114
+ // File upload
115
+ fileUpload?: {
116
+ enabled: boolean;
117
+ maxSize?: number;
118
+ mimeTypes?: string[];
119
+ batch?: boolean;
120
+ onInsertFile: (file: File | File[]) => Promise<string | string[]>;
121
+ };
122
+
112
123
  // Callbacks
113
124
  onChange?: (value: string, instance: OverTypeInstance) => void;
114
125
  onKeydown?: (event: KeyboardEvent, instance: OverTypeInstance) => void;
@@ -172,6 +183,10 @@ export interface OverTypeInstance {
172
183
  setTheme(theme: string | Theme): this;
173
184
  setCodeHighlighter(highlighter: ((code: string, language: string) => string) | null): void;
174
185
  updatePreview(): void;
186
+ performAction(actionId: string, event?: Event | null): Promise<boolean>;
187
+ showToolbar(): void;
188
+ hideToolbar(): void;
189
+ insertAtCursor(text: string): void;
175
190
 
176
191
  // HTML output methods
177
192
  getRenderedHTML(options?: RenderOptions): string;
@@ -209,6 +224,7 @@ export const toolbarButtons: {
209
224
  orderedList: ToolbarButton;
210
225
  taskList: ToolbarButton;
211
226
  quote: ToolbarButton;
227
+ upload: ToolbarButton;
212
228
  viewMode: ToolbarButton;
213
229
  };
214
230