overtype 2.1.1 → 2.3.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.
- package/README.md +36 -23
- package/dist/overtype-webcomponent.esm.js +1647 -120
- package/dist/overtype-webcomponent.esm.js.map +4 -4
- package/dist/overtype-webcomponent.js +1647 -120
- package/dist/overtype-webcomponent.js.map +4 -4
- package/dist/overtype-webcomponent.min.js +129 -111
- package/dist/overtype.cjs +1617 -117
- package/dist/overtype.cjs.map +4 -4
- package/dist/overtype.d.ts +33 -0
- package/dist/overtype.esm.js +1617 -117
- package/dist/overtype.esm.js.map +4 -4
- package/dist/overtype.js +1617 -117
- package/dist/overtype.js.map +4 -4
- package/dist/overtype.min.js +132 -114
- package/package.json +4 -4
- package/src/icons.js +6 -0
- package/src/link-tooltip.js +22 -67
- package/src/overtype-webcomponent.js +32 -3
- package/src/overtype.d.ts +33 -0
- package/src/overtype.js +272 -36
- package/src/parser.js +9 -3
- package/src/styles.js +62 -49
- package/src/themes.js +54 -3
- package/src/toolbar-buttons.js +23 -0
- package/src/toolbar.js +12 -0
package/dist/overtype.d.ts
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
// Definitions generated from themes.js and styles.js
|
|
4
4
|
// DO NOT EDIT MANUALLY - Run 'npm run generate:types' to regenerate
|
|
5
5
|
|
|
6
|
+
export interface PreviewColors {
|
|
7
|
+
bg?: string;
|
|
8
|
+
blockquote?: string;
|
|
9
|
+
code?: string;
|
|
10
|
+
codeBg?: string;
|
|
11
|
+
em?: string;
|
|
12
|
+
h1?: string;
|
|
13
|
+
h2?: string;
|
|
14
|
+
h3?: string;
|
|
15
|
+
hr?: string;
|
|
16
|
+
link?: string;
|
|
17
|
+
strong?: string;
|
|
18
|
+
text?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
export interface Theme {
|
|
7
22
|
name: string;
|
|
8
23
|
colors: {
|
|
@@ -22,6 +37,7 @@ export interface Theme {
|
|
|
22
37
|
hr?: string;
|
|
23
38
|
link?: string;
|
|
24
39
|
listMarker?: string;
|
|
40
|
+
placeholder?: string;
|
|
25
41
|
primary?: string;
|
|
26
42
|
rawLine?: string;
|
|
27
43
|
selection?: string;
|
|
@@ -37,6 +53,7 @@ export interface Theme {
|
|
|
37
53
|
toolbarHover?: string;
|
|
38
54
|
toolbarIcon?: string;
|
|
39
55
|
};
|
|
56
|
+
previewColors?: PreviewColors;
|
|
40
57
|
}
|
|
41
58
|
|
|
42
59
|
export interface Stats {
|
|
@@ -102,12 +119,23 @@ export interface Options {
|
|
|
102
119
|
toolbar?: boolean;
|
|
103
120
|
toolbarButtons?: ToolbarButton[]; // Custom toolbar button configuration
|
|
104
121
|
smartLists?: boolean; // v1.2.3+ Smart list continuation
|
|
122
|
+
spellcheck?: boolean; // Browser spellcheck (default: false)
|
|
105
123
|
statsFormatter?: (stats: Stats) => string;
|
|
106
124
|
codeHighlighter?: ((code: string, language: string) => string) | null; // Per-instance code highlighter
|
|
107
125
|
|
|
108
126
|
// Theme (deprecated in favor of global theme)
|
|
109
127
|
theme?: string | Theme;
|
|
110
128
|
colors?: Partial<Theme['colors']>;
|
|
129
|
+
previewColors?: PreviewColors;
|
|
130
|
+
|
|
131
|
+
// File upload
|
|
132
|
+
fileUpload?: {
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
maxSize?: number;
|
|
135
|
+
mimeTypes?: string[];
|
|
136
|
+
batch?: boolean;
|
|
137
|
+
onInsertFile: (file: File | File[]) => Promise<string | string[]>;
|
|
138
|
+
};
|
|
111
139
|
|
|
112
140
|
// Callbacks
|
|
113
141
|
onChange?: (value: string, instance: OverTypeInstance) => void;
|
|
@@ -172,6 +200,10 @@ export interface OverTypeInstance {
|
|
|
172
200
|
setTheme(theme: string | Theme): this;
|
|
173
201
|
setCodeHighlighter(highlighter: ((code: string, language: string) => string) | null): void;
|
|
174
202
|
updatePreview(): void;
|
|
203
|
+
performAction(actionId: string, event?: Event | null): Promise<boolean>;
|
|
204
|
+
showToolbar(): void;
|
|
205
|
+
hideToolbar(): void;
|
|
206
|
+
insertAtCursor(text: string): void;
|
|
175
207
|
|
|
176
208
|
// HTML output methods
|
|
177
209
|
getRenderedHTML(options?: RenderOptions): string;
|
|
@@ -209,6 +241,7 @@ export const toolbarButtons: {
|
|
|
209
241
|
orderedList: ToolbarButton;
|
|
210
242
|
taskList: ToolbarButton;
|
|
211
243
|
quote: ToolbarButton;
|
|
244
|
+
upload: ToolbarButton;
|
|
212
245
|
viewMode: ToolbarButton;
|
|
213
246
|
};
|
|
214
247
|
|