@vizel/vue 0.0.1-alpha.1
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 +87 -0
- package/dist/index.d.ts +981 -0
- package/dist/index.js +63 -0
- package/dist/index10.js +135 -0
- package/dist/index11.js +30 -0
- package/dist/index12.js +14 -0
- package/dist/index13.js +91 -0
- package/dist/index14.js +134 -0
- package/dist/index15.js +37 -0
- package/dist/index16.js +21 -0
- package/dist/index17.js +79 -0
- package/dist/index18.js +120 -0
- package/dist/index19.js +21 -0
- package/dist/index2.js +88 -0
- package/dist/index20.js +52 -0
- package/dist/index21.js +43 -0
- package/dist/index22.js +12 -0
- package/dist/index23.js +16 -0
- package/dist/index24.js +37 -0
- package/dist/index25.js +48 -0
- package/dist/index26.js +24 -0
- package/dist/index27.js +10 -0
- package/dist/index28.js +46 -0
- package/dist/index29.js +23 -0
- package/dist/index3.js +61 -0
- package/dist/index30.js +15 -0
- package/dist/index31.js +4 -0
- package/dist/index32.js +4 -0
- package/dist/index33.js +4 -0
- package/dist/index34.js +4 -0
- package/dist/index35.js +4 -0
- package/dist/index36.js +4 -0
- package/dist/index37.js +4 -0
- package/dist/index38.js +4 -0
- package/dist/index39.js +4 -0
- package/dist/index4.js +34 -0
- package/dist/index40.js +4 -0
- package/dist/index41.js +4 -0
- package/dist/index42.js +4 -0
- package/dist/index43.js +4 -0
- package/dist/index44.js +4 -0
- package/dist/index45.js +4 -0
- package/dist/index46.js +4 -0
- package/dist/index47.js +4 -0
- package/dist/index48.js +4 -0
- package/dist/index49.js +4 -0
- package/dist/index5.js +76 -0
- package/dist/index50.js +4 -0
- package/dist/index51.js +4 -0
- package/dist/index6.js +108 -0
- package/dist/index7.js +15 -0
- package/dist/index8.js +191 -0
- package/dist/index9.js +35 -0
- package/package.json +63 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,981 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { CustomIconMap } from '@vizel/core';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { Editor } from '@vizel/core';
|
|
7
|
+
import { JSONContent } from '@vizel/core';
|
|
8
|
+
import { PublicProps } from 'vue';
|
|
9
|
+
import { Ref } from 'vue';
|
|
10
|
+
import { ShallowRef } from 'vue';
|
|
11
|
+
import { SuggestionOptions } from '@vizel/core';
|
|
12
|
+
import { VizelAutoSaveOptions } from '@vizel/core';
|
|
13
|
+
import { VizelColorDefinition } from '@vizel/core';
|
|
14
|
+
import { VizelCreateEditorOptions } from '@vizel/core';
|
|
15
|
+
import { VizelEditorState } from '@vizel/core';
|
|
16
|
+
import { VizelEmbedData } from '@vizel/core';
|
|
17
|
+
import { VizelFeatureOptions } from '@vizel/core';
|
|
18
|
+
import { VizelIconContextValue } from '@vizel/core';
|
|
19
|
+
import { VizelIconName } from '@vizel/core';
|
|
20
|
+
import { VizelMarkdownSyncOptions } from '@vizel/core';
|
|
21
|
+
import { VizelNodeTypeOption } from '@vizel/core';
|
|
22
|
+
import { VizelPortalLayer } from '@vizel/core';
|
|
23
|
+
import { VizelSaveStatus } from '@vizel/core';
|
|
24
|
+
import { VizelSlashCommandItem } from '@vizel/core';
|
|
25
|
+
import { VizelSlashMenuRendererOptions } from '@vizel/core';
|
|
26
|
+
import { VizelTheme } from '@vizel/core';
|
|
27
|
+
import { VizelThemeProviderOptions } from '@vizel/core';
|
|
28
|
+
import { VizelThemeState } from '@vizel/core';
|
|
29
|
+
|
|
30
|
+
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
|
|
31
|
+
/** The underlying Tiptap editor instance */
|
|
32
|
+
editor: Editor | null;
|
|
33
|
+
getEditor: () => Editor | null;
|
|
34
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
35
|
+
destroy: () => any;
|
|
36
|
+
blur: (args_0: {
|
|
37
|
+
editor: Editor;
|
|
38
|
+
}) => any;
|
|
39
|
+
focus: (args_0: {
|
|
40
|
+
editor: Editor;
|
|
41
|
+
}) => any;
|
|
42
|
+
create: (args_0: {
|
|
43
|
+
editor: Editor;
|
|
44
|
+
}) => any;
|
|
45
|
+
update: (args_0: {
|
|
46
|
+
editor: Editor;
|
|
47
|
+
}) => any;
|
|
48
|
+
selectionUpdate: (args_0: {
|
|
49
|
+
editor: Editor;
|
|
50
|
+
}) => any;
|
|
51
|
+
"update:markdown": (value: string) => any;
|
|
52
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
53
|
+
onDestroy?: () => any;
|
|
54
|
+
onBlur?: (args_0: {
|
|
55
|
+
editor: Editor;
|
|
56
|
+
}) => any;
|
|
57
|
+
onFocus?: (args_0: {
|
|
58
|
+
editor: Editor;
|
|
59
|
+
}) => any;
|
|
60
|
+
onCreate?: (args_0: {
|
|
61
|
+
editor: Editor;
|
|
62
|
+
}) => any;
|
|
63
|
+
onUpdate?: (args_0: {
|
|
64
|
+
editor: Editor;
|
|
65
|
+
}) => any;
|
|
66
|
+
onSelectionUpdate?: (args_0: {
|
|
67
|
+
editor: Editor;
|
|
68
|
+
}) => any;
|
|
69
|
+
"onUpdate:markdown"?: (value: string) => any;
|
|
70
|
+
}>, {
|
|
71
|
+
transformDiagramsOnImport: boolean;
|
|
72
|
+
editable: boolean;
|
|
73
|
+
autofocus: boolean | "start" | "end" | "all" | number;
|
|
74
|
+
enableEmbed: boolean;
|
|
75
|
+
showBubbleMenu: boolean;
|
|
76
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
77
|
+
|
|
78
|
+
declare const __VLS_component_2: DefineComponent<VizelBubbleMenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelBubbleMenuProps> & Readonly<{}>, {
|
|
79
|
+
pluginKey: string;
|
|
80
|
+
showDefaultMenu: boolean;
|
|
81
|
+
updateDelay: number;
|
|
82
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
83
|
+
menuRef: HTMLDivElement;
|
|
84
|
+
}, any>;
|
|
85
|
+
|
|
86
|
+
declare const __VLS_component_3: DefineComponent<VizelBubbleMenuButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
87
|
+
click: () => any;
|
|
88
|
+
}, string, PublicProps, Readonly<VizelBubbleMenuButtonProps> & Readonly<{
|
|
89
|
+
onClick?: () => any;
|
|
90
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
91
|
+
|
|
92
|
+
declare const __VLS_component_4: DefineComponent<VizelIconProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelIconProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
93
|
+
|
|
94
|
+
declare const __VLS_component_5: DefineComponent<VizelPortalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelPortalProps> & Readonly<{}>, {
|
|
95
|
+
disabled: boolean;
|
|
96
|
+
layer: VizelPortalLayer;
|
|
97
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
98
|
+
|
|
99
|
+
declare const __VLS_component_6: DefineComponent<VizelProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
100
|
+
|
|
101
|
+
declare const __VLS_component_7: DefineComponent<VizelSlashMenuProps, {
|
|
102
|
+
onKeyDown: typeof handleKeyDown;
|
|
103
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
104
|
+
command: (item: VizelSlashCommandItem) => any;
|
|
105
|
+
}, string, PublicProps, Readonly<VizelSlashMenuProps> & Readonly<{
|
|
106
|
+
onCommand?: (item: VizelSlashCommandItem) => any;
|
|
107
|
+
}>, {
|
|
108
|
+
showGroups: boolean;
|
|
109
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
110
|
+
|
|
111
|
+
declare const __VLS_component_8: DefineComponent<VizelSlashMenuEmptyProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelSlashMenuEmptyProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
112
|
+
|
|
113
|
+
declare const __VLS_component_9: DefineComponent<VizelThemeProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelThemeProviderProps> & Readonly<{}>, {
|
|
114
|
+
defaultTheme: VizelTheme;
|
|
115
|
+
storageKey: string;
|
|
116
|
+
disableTransitionOnChange: boolean;
|
|
117
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
118
|
+
|
|
119
|
+
declare type __VLS_Props = VizelProps;
|
|
120
|
+
|
|
121
|
+
declare type __VLS_PublicProps = {
|
|
122
|
+
"markdown"?: string;
|
|
123
|
+
} & __VLS_Props;
|
|
124
|
+
|
|
125
|
+
declare function __VLS_template(): {
|
|
126
|
+
attrs: Partial<{}>;
|
|
127
|
+
slots: {
|
|
128
|
+
'bubble-menu'?(_: {
|
|
129
|
+
editor: Editor;
|
|
130
|
+
}): any;
|
|
131
|
+
default?(_: {
|
|
132
|
+
editor: Editor | null;
|
|
133
|
+
}): any;
|
|
134
|
+
};
|
|
135
|
+
refs: {};
|
|
136
|
+
rootEl: HTMLDivElement;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare function __VLS_template_2(): {
|
|
140
|
+
attrs: Partial<{}>;
|
|
141
|
+
slots: {
|
|
142
|
+
default?(_: {}): any;
|
|
143
|
+
};
|
|
144
|
+
refs: {
|
|
145
|
+
menuRef: HTMLDivElement;
|
|
146
|
+
};
|
|
147
|
+
rootEl: any;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
declare function __VLS_template_3(): {
|
|
151
|
+
attrs: Partial<{}>;
|
|
152
|
+
slots: {
|
|
153
|
+
default?(_: {}): any;
|
|
154
|
+
};
|
|
155
|
+
refs: {};
|
|
156
|
+
rootEl: HTMLButtonElement;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare function __VLS_template_4(): {
|
|
160
|
+
attrs: Partial<{}>;
|
|
161
|
+
slots: {
|
|
162
|
+
default?(_: {}): any;
|
|
163
|
+
};
|
|
164
|
+
refs: {};
|
|
165
|
+
rootEl: any;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
declare function __VLS_template_5(): {
|
|
169
|
+
attrs: Partial<{}>;
|
|
170
|
+
slots: {
|
|
171
|
+
default?(_: {}): any;
|
|
172
|
+
default?(_: {}): any;
|
|
173
|
+
};
|
|
174
|
+
refs: {};
|
|
175
|
+
rootEl: any;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
declare function __VLS_template_6(): {
|
|
179
|
+
attrs: Partial<{}>;
|
|
180
|
+
slots: {
|
|
181
|
+
default?(_: {}): any;
|
|
182
|
+
};
|
|
183
|
+
refs: {};
|
|
184
|
+
rootEl: HTMLDivElement;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
declare function __VLS_template_7(): {
|
|
188
|
+
attrs: Partial<{}>;
|
|
189
|
+
slots: {
|
|
190
|
+
empty?(_: {}): any;
|
|
191
|
+
item?(_: {
|
|
192
|
+
item: VizelSlashCommandItem;
|
|
193
|
+
isSelected: boolean;
|
|
194
|
+
onClick: () => void;
|
|
195
|
+
}): any;
|
|
196
|
+
item?(_: {
|
|
197
|
+
item: VizelSlashCommandItem;
|
|
198
|
+
isSelected: boolean;
|
|
199
|
+
onClick: () => void;
|
|
200
|
+
}): any;
|
|
201
|
+
};
|
|
202
|
+
refs: {};
|
|
203
|
+
rootEl: HTMLDivElement;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
declare function __VLS_template_8(): {
|
|
207
|
+
attrs: Partial<{}>;
|
|
208
|
+
slots: {
|
|
209
|
+
default?(_: {}): any;
|
|
210
|
+
};
|
|
211
|
+
refs: {};
|
|
212
|
+
rootEl: HTMLDivElement;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
declare function __VLS_template_9(): {
|
|
216
|
+
attrs: Partial<{}>;
|
|
217
|
+
slots: {
|
|
218
|
+
default?(_: {}): any;
|
|
219
|
+
};
|
|
220
|
+
refs: {};
|
|
221
|
+
rootEl: any;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
225
|
+
|
|
226
|
+
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
227
|
+
|
|
228
|
+
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
229
|
+
|
|
230
|
+
declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
|
|
231
|
+
|
|
232
|
+
declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
|
|
233
|
+
|
|
234
|
+
declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
|
|
235
|
+
|
|
236
|
+
declare type __VLS_TemplateResult_7 = ReturnType<typeof __VLS_template_7>;
|
|
237
|
+
|
|
238
|
+
declare type __VLS_TemplateResult_8 = ReturnType<typeof __VLS_template_8>;
|
|
239
|
+
|
|
240
|
+
declare type __VLS_TemplateResult_9 = ReturnType<typeof __VLS_template_9>;
|
|
241
|
+
|
|
242
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
243
|
+
new (): {
|
|
244
|
+
$slots: S;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
249
|
+
new (): {
|
|
250
|
+
$slots: S;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
255
|
+
new (): {
|
|
256
|
+
$slots: S;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
261
|
+
new (): {
|
|
262
|
+
$slots: S;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
declare type __VLS_WithTemplateSlots_5<T, S> = T & {
|
|
267
|
+
new (): {
|
|
268
|
+
$slots: S;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
declare type __VLS_WithTemplateSlots_6<T, S> = T & {
|
|
273
|
+
new (): {
|
|
274
|
+
$slots: S;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
declare type __VLS_WithTemplateSlots_7<T, S> = T & {
|
|
279
|
+
new (): {
|
|
280
|
+
$slots: S;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
declare type __VLS_WithTemplateSlots_8<T, S> = T & {
|
|
285
|
+
new (): {
|
|
286
|
+
$slots: S;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
declare type __VLS_WithTemplateSlots_9<T, S> = T & {
|
|
291
|
+
new (): {
|
|
292
|
+
$slots: S;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Creates a suggestion render configuration for the SlashCommand extension.
|
|
298
|
+
* This handles the popup positioning and Vue component lifecycle.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* ```ts
|
|
302
|
+
* import { createVizelSlashMenuRenderer } from '@vizel/vue';
|
|
303
|
+
* import { VizelSlashCommand } from '@vizel/core';
|
|
304
|
+
*
|
|
305
|
+
* const editor = new Editor({
|
|
306
|
+
* extensions: [
|
|
307
|
+
* VizelSlashCommand.configure({
|
|
308
|
+
* suggestion: createVizelSlashMenuRenderer(),
|
|
309
|
+
* }),
|
|
310
|
+
* ],
|
|
311
|
+
* });
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
export declare function createVizelSlashMenuRenderer(options?: VizelSlashMenuRendererOptions): Partial<SuggestionOptions<VizelSlashCommandItem>>;
|
|
315
|
+
|
|
316
|
+
declare function handleKeyDown(event: KeyboardEvent): boolean;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Provide custom icon mappings to child components.
|
|
320
|
+
* Call this in a parent component's setup to customize icons for all descendants.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* ```vue
|
|
324
|
+
* <script setup lang="ts">
|
|
325
|
+
* import { provideVizelIcons } from "@vizel/vue";
|
|
326
|
+
*
|
|
327
|
+
* // Use Phosphor icons
|
|
328
|
+
* provideVizelIcons({
|
|
329
|
+
* heading1: "ph:text-h-one",
|
|
330
|
+
* heading2: "ph:text-h-two",
|
|
331
|
+
* bold: "ph:text-b-bold",
|
|
332
|
+
* italic: "ph:text-italic",
|
|
333
|
+
* });
|
|
334
|
+
* </script>
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
export declare function provideVizelIcons(customIcons?: CustomIconMap): void;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Composable for auto-saving editor content with debouncing.
|
|
341
|
+
*
|
|
342
|
+
* @param getEditor - Function that returns the editor instance
|
|
343
|
+
* @param options - Auto-save configuration options
|
|
344
|
+
* @returns Auto-save state and controls
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```vue
|
|
348
|
+
* <script setup lang="ts">
|
|
349
|
+
* import { useVizelEditor, useVizelAutoSave, VizelEditor, VizelSaveIndicator } from '@vizel/vue';
|
|
350
|
+
*
|
|
351
|
+
* const editor = useVizelEditor({ ... });
|
|
352
|
+
* const { status, lastSaved, save } = useVizelAutoSave(() => editor.value, {
|
|
353
|
+
* debounceMs: 2000,
|
|
354
|
+
* storage: 'localStorage',
|
|
355
|
+
* key: 'my-document',
|
|
356
|
+
* });
|
|
357
|
+
* </script>
|
|
358
|
+
*
|
|
359
|
+
* <template>
|
|
360
|
+
* <VizelEditor :editor="editor" />
|
|
361
|
+
* <VizelSaveIndicator :status="status" :lastSaved="lastSaved" />
|
|
362
|
+
* </template>
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
export declare function useVizelAutoSave(getEditor: () => Editor | null | undefined, options?: VizelAutoSaveOptions): UseVizelAutoSaveResult;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Auto-save composable result
|
|
369
|
+
*/
|
|
370
|
+
export declare interface UseVizelAutoSaveResult {
|
|
371
|
+
/** Current save status */
|
|
372
|
+
status: ComputedRef<VizelSaveStatus>;
|
|
373
|
+
/** Whether there are unsaved changes */
|
|
374
|
+
hasUnsavedChanges: ComputedRef<boolean>;
|
|
375
|
+
/** Timestamp of last successful save */
|
|
376
|
+
lastSaved: ComputedRef<Date | null>;
|
|
377
|
+
/** Last error that occurred */
|
|
378
|
+
error: ComputedRef<Error | null>;
|
|
379
|
+
/** Manually trigger save */
|
|
380
|
+
save: () => Promise<void>;
|
|
381
|
+
/** Restore content from storage */
|
|
382
|
+
restore: () => Promise<JSONContent | null>;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Composable to access the editor instance from VizelProvider context.
|
|
387
|
+
* Returns a computed ref that reactively updates when the editor changes.
|
|
388
|
+
*
|
|
389
|
+
* @throws Error if used outside of VizelProvider
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```vue
|
|
393
|
+
* <script setup lang="ts">
|
|
394
|
+
* import { useVizelContext } from '@vizel/vue';
|
|
395
|
+
*
|
|
396
|
+
* const editor = useVizelContext();
|
|
397
|
+
* </script>
|
|
398
|
+
*
|
|
399
|
+
* <template>
|
|
400
|
+
* <button @click="editor?.chain().focus().toggleBold().run()">
|
|
401
|
+
* Bold
|
|
402
|
+
* </button>
|
|
403
|
+
* </template>
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
export declare function useVizelContext(): ComputedRef<Editor | null>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Composable to access the editor getter from context.
|
|
410
|
+
* Returns null if used outside of VizelProvider (does not throw).
|
|
411
|
+
*
|
|
412
|
+
* @returns A getter function that returns the editor, or null if outside VizelProvider
|
|
413
|
+
*/
|
|
414
|
+
export declare function useVizelContextSafe(): (() => Editor | null) | null;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Vue composable to create and manage a Vizel editor instance.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```vue
|
|
421
|
+
* <script setup lang="ts">
|
|
422
|
+
* import { useVizelEditor, EditorContent } from '@vizel/vue';
|
|
423
|
+
*
|
|
424
|
+
* const editor = useVizelEditor({
|
|
425
|
+
* placeholder: "Start typing...",
|
|
426
|
+
* onUpdate: ({ editor }) => {
|
|
427
|
+
* console.log(editor.getJSON());
|
|
428
|
+
* },
|
|
429
|
+
* });
|
|
430
|
+
* </script>
|
|
431
|
+
*
|
|
432
|
+
* <template>
|
|
433
|
+
* <EditorContent :editor="editor" />
|
|
434
|
+
* </template>
|
|
435
|
+
* ```
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```vue
|
|
439
|
+
* <script setup lang="ts">
|
|
440
|
+
* // With initial markdown content
|
|
441
|
+
* const editor = useVizelEditor({
|
|
442
|
+
* initialMarkdown: "# Hello World\n\nThis is **bold** text.",
|
|
443
|
+
* });
|
|
444
|
+
* </script>
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
export declare function useVizelEditor(options?: UseVizelEditorOptions): ShallowRef<Editor | null>;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Options for useVizelEditor composable.
|
|
451
|
+
* @see VizelCreateEditorOptions for available options.
|
|
452
|
+
*/
|
|
453
|
+
export declare type UseVizelEditorOptions = VizelCreateEditorOptions;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Composable that returns the current editor state and re-renders on state changes.
|
|
457
|
+
* This is a convenience composable that combines `useVizelState` (for reactivity)
|
|
458
|
+
* and `getVizelEditorState` (for state extraction).
|
|
459
|
+
*
|
|
460
|
+
* @param getEditor - A function that returns the editor instance
|
|
461
|
+
* @returns A computed ref containing the current editor state
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```vue
|
|
465
|
+
* <script setup lang="ts">
|
|
466
|
+
* const props = defineProps<{ editor: Editor | null }>();
|
|
467
|
+
* const editorState = useVizelEditorState(() => props.editor);
|
|
468
|
+
* </script>
|
|
469
|
+
*
|
|
470
|
+
* <template>
|
|
471
|
+
* <div class="status-bar">
|
|
472
|
+
* <span>{{ editorState.characterCount }} characters</span>
|
|
473
|
+
* <span>{{ editorState.wordCount }} words</span>
|
|
474
|
+
* <button :disabled="!editorState.canUndo">Undo</button>
|
|
475
|
+
* <button :disabled="!editorState.canRedo">Redo</button>
|
|
476
|
+
* </div>
|
|
477
|
+
* </template>
|
|
478
|
+
* ```
|
|
479
|
+
*/
|
|
480
|
+
export declare function useVizelEditorState(getEditor: () => Editor | null | undefined): ComputedRef<VizelEditorState>;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Inject custom icon mappings from parent IconProvider.
|
|
484
|
+
* Returns an empty object if no provider is present.
|
|
485
|
+
*/
|
|
486
|
+
export declare function useVizelIconContext(): VizelIconContextValue;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Vue composable for bidirectional Markdown synchronization with the editor.
|
|
490
|
+
*
|
|
491
|
+
* @param getEditor - Function to get the editor instance
|
|
492
|
+
* @param options - Sync options
|
|
493
|
+
* @returns Markdown state and control functions
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```vue
|
|
497
|
+
* <script setup lang="ts">
|
|
498
|
+
* import { useVizelEditor, useVizelMarkdown, VizelEditor } from '@vizel/vue';
|
|
499
|
+
*
|
|
500
|
+
* const editor = useVizelEditor();
|
|
501
|
+
* const { markdown, setMarkdown, isPending } = useVizelMarkdown(() => editor.value, {
|
|
502
|
+
* debounceMs: 300,
|
|
503
|
+
* });
|
|
504
|
+
* </script>
|
|
505
|
+
*
|
|
506
|
+
* <template>
|
|
507
|
+
* <VizelEditor :editor="editor" />
|
|
508
|
+
* <textarea
|
|
509
|
+
* :value="markdown"
|
|
510
|
+
* @input="setMarkdown(($event.target as HTMLTextAreaElement).value)"
|
|
511
|
+
* />
|
|
512
|
+
* <span v-if="isPending">Syncing...</span>
|
|
513
|
+
* </template>
|
|
514
|
+
* ```
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```vue
|
|
518
|
+
* <script setup lang="ts">
|
|
519
|
+
* // With initial markdown value
|
|
520
|
+
* const { markdown, setMarkdown } = useVizelMarkdown(() => editor.value, {
|
|
521
|
+
* initialValue: "# Hello World",
|
|
522
|
+
* transformDiagrams: true,
|
|
523
|
+
* });
|
|
524
|
+
* </script>
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
export declare function useVizelMarkdown(getEditor: () => Editor | null | undefined, options?: UseVizelMarkdownOptions): UseVizelMarkdownResult;
|
|
528
|
+
|
|
529
|
+
export declare interface UseVizelMarkdownOptions extends VizelMarkdownSyncOptions {
|
|
530
|
+
/**
|
|
531
|
+
* Initial markdown value. If provided, this will be set to the editor on mount.
|
|
532
|
+
*/
|
|
533
|
+
initialValue?: string;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export declare interface UseVizelMarkdownResult {
|
|
537
|
+
/**
|
|
538
|
+
* Current markdown content (reactive).
|
|
539
|
+
* Updates with debounce when editor content changes.
|
|
540
|
+
*/
|
|
541
|
+
markdown: Ref<string>;
|
|
542
|
+
/**
|
|
543
|
+
* Set markdown content to the editor.
|
|
544
|
+
* Automatically transforms diagram code blocks if transformDiagrams is enabled.
|
|
545
|
+
*/
|
|
546
|
+
setMarkdown: (markdown: string) => void;
|
|
547
|
+
/**
|
|
548
|
+
* Whether markdown export is currently pending (debounced).
|
|
549
|
+
*/
|
|
550
|
+
isPending: ComputedRef<boolean>;
|
|
551
|
+
/**
|
|
552
|
+
* Force immediate export (flush pending debounced export).
|
|
553
|
+
*/
|
|
554
|
+
flush: () => void;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Composable that forces a re-render whenever the editor's state changes.
|
|
559
|
+
* This is useful for components that need to reflect the current editor state
|
|
560
|
+
* (e.g., formatting buttons that show active state).
|
|
561
|
+
*
|
|
562
|
+
* @param getEditor - A function that returns the editor instance
|
|
563
|
+
* @returns A ref that changes on each editor state update (can be ignored)
|
|
564
|
+
*
|
|
565
|
+
* @example
|
|
566
|
+
* ```vue
|
|
567
|
+
* <script setup>
|
|
568
|
+
* const props = defineProps<{ editor: Editor }>();
|
|
569
|
+
* useVizelState(() => props.editor);
|
|
570
|
+
* </script>
|
|
571
|
+
* <template>
|
|
572
|
+
* <button :class="{ active: props.editor.isActive('bold') }">Bold</button>
|
|
573
|
+
* </template>
|
|
574
|
+
* ```
|
|
575
|
+
*/
|
|
576
|
+
export declare function useVizelState(getEditor: () => Editor | null | undefined): Ref<number>;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Composable to access theme state and controls
|
|
580
|
+
*
|
|
581
|
+
* Must be used within a VizelThemeProvider
|
|
582
|
+
*
|
|
583
|
+
* @example
|
|
584
|
+
* ```vue
|
|
585
|
+
* <script setup>
|
|
586
|
+
* const { theme, setTheme, resolvedTheme } = useVizelTheme();
|
|
587
|
+
* </script>
|
|
588
|
+
*
|
|
589
|
+
* <template>
|
|
590
|
+
* <button @click="setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')">
|
|
591
|
+
* Toggle theme
|
|
592
|
+
* </button>
|
|
593
|
+
* </template>
|
|
594
|
+
* ```
|
|
595
|
+
*/
|
|
596
|
+
export declare function useVizelTheme(): VizelThemeState;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Composable to access theme state safely (returns null if not in provider)
|
|
600
|
+
*/
|
|
601
|
+
export declare function useVizelThemeSafe(): VizelThemeState | null;
|
|
602
|
+
|
|
603
|
+
export declare const Vizel: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
604
|
+
|
|
605
|
+
export declare const VizelBubbleMenu: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
606
|
+
|
|
607
|
+
export declare const VizelBubbleMenuButton: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
608
|
+
|
|
609
|
+
export declare interface VizelBubbleMenuButtonProps {
|
|
610
|
+
/** Whether the button is in active state */
|
|
611
|
+
isActive?: boolean;
|
|
612
|
+
/** Whether the button is disabled */
|
|
613
|
+
disabled?: boolean;
|
|
614
|
+
/** Tooltip title */
|
|
615
|
+
title?: string;
|
|
616
|
+
/** Custom class name */
|
|
617
|
+
class?: string;
|
|
618
|
+
/** Action identifier for testing */
|
|
619
|
+
action?: string;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export declare const VizelBubbleMenuColorPicker: DefineComponent<VizelBubbleMenuColorPickerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelBubbleMenuColorPickerProps> & Readonly<{}>, {
|
|
623
|
+
allowCustomColor: boolean;
|
|
624
|
+
showRecentColors: boolean;
|
|
625
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
626
|
+
containerRef: HTMLDivElement;
|
|
627
|
+
}, HTMLDivElement>;
|
|
628
|
+
|
|
629
|
+
export declare interface VizelBubbleMenuColorPickerProps {
|
|
630
|
+
/** The editor instance */
|
|
631
|
+
editor: Editor;
|
|
632
|
+
/** Color picker type */
|
|
633
|
+
type: "textColor" | "highlight";
|
|
634
|
+
/** Custom color palette */
|
|
635
|
+
colors?: VizelColorDefinition[];
|
|
636
|
+
/** Custom class name */
|
|
637
|
+
class?: string;
|
|
638
|
+
/** Enable custom color input (default: true) */
|
|
639
|
+
allowCustomColor?: boolean;
|
|
640
|
+
/** Enable recent colors (default: true) */
|
|
641
|
+
showRecentColors?: boolean;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export declare const VizelBubbleMenuDefault: DefineComponent<VizelBubbleMenuDefaultProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelBubbleMenuDefaultProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
645
|
+
|
|
646
|
+
export declare interface VizelBubbleMenuDefaultProps {
|
|
647
|
+
/** The editor instance */
|
|
648
|
+
editor: Editor;
|
|
649
|
+
/** Custom class name */
|
|
650
|
+
class?: string;
|
|
651
|
+
/** Enable embed option in link editor (requires Embed extension) */
|
|
652
|
+
enableEmbed?: boolean;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
export declare const VizelBubbleMenuDivider: DefineComponent<VizelBubbleMenuDividerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelBubbleMenuDividerProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
656
|
+
|
|
657
|
+
export declare interface VizelBubbleMenuDividerProps {
|
|
658
|
+
/** Custom class name */
|
|
659
|
+
class?: string;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export declare interface VizelBubbleMenuProps {
|
|
663
|
+
/** Override the editor from context */
|
|
664
|
+
editor?: Editor;
|
|
665
|
+
/** Custom class name for the menu container */
|
|
666
|
+
class?: string;
|
|
667
|
+
/** Whether to show the default formatting menu */
|
|
668
|
+
showDefaultMenu?: boolean;
|
|
669
|
+
/** Plugin key for the bubble menu */
|
|
670
|
+
pluginKey?: string;
|
|
671
|
+
/** Delay in ms before updating the menu position */
|
|
672
|
+
updateDelay?: number;
|
|
673
|
+
/** Custom shouldShow function */
|
|
674
|
+
shouldShow?: (props: {
|
|
675
|
+
editor: Editor;
|
|
676
|
+
from: number;
|
|
677
|
+
to: number;
|
|
678
|
+
}) => boolean;
|
|
679
|
+
/** Enable embed option in link editor (requires Embed extension) */
|
|
680
|
+
enableEmbed?: boolean;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export declare const VizelColorPicker: DefineComponent<VizelColorPickerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
684
|
+
change: (color: string) => any;
|
|
685
|
+
"update:modelValue": (color: string) => any;
|
|
686
|
+
}, string, PublicProps, Readonly<VizelColorPickerProps> & Readonly<{
|
|
687
|
+
onChange?: (color: string) => any;
|
|
688
|
+
"onUpdate:modelValue"?: (color: string) => any;
|
|
689
|
+
}>, {
|
|
690
|
+
label: string;
|
|
691
|
+
allowCustomColor: boolean;
|
|
692
|
+
recentColors: string[];
|
|
693
|
+
showRecentColors: boolean;
|
|
694
|
+
noneValues: string[];
|
|
695
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
696
|
+
inputRef: HTMLInputElement;
|
|
697
|
+
}, HTMLDivElement>;
|
|
698
|
+
|
|
699
|
+
export declare interface VizelColorPickerProps {
|
|
700
|
+
/** Color palette to display */
|
|
701
|
+
colors: VizelColorDefinition[];
|
|
702
|
+
/**
|
|
703
|
+
* Currently selected color (v-model supported)
|
|
704
|
+
* @deprecated Use modelValue instead for v-model binding
|
|
705
|
+
*/
|
|
706
|
+
value?: string;
|
|
707
|
+
/** Currently selected color for v-model binding */
|
|
708
|
+
modelValue?: string;
|
|
709
|
+
/** Label for accessibility */
|
|
710
|
+
label?: string;
|
|
711
|
+
/** Custom class name */
|
|
712
|
+
class?: string;
|
|
713
|
+
/** Enable custom HEX input (default: true) */
|
|
714
|
+
allowCustomColor?: boolean;
|
|
715
|
+
/** Recent colors to display */
|
|
716
|
+
recentColors?: string[];
|
|
717
|
+
/** Show recent colors section (default: true) */
|
|
718
|
+
showRecentColors?: boolean;
|
|
719
|
+
/** "None" option color values (e.g., ["transparent", "inherit"]) */
|
|
720
|
+
noneValues?: string[];
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export declare const VizelEditor: DefineComponent<VizelEditorProps, {
|
|
724
|
+
/** The container DOM element */
|
|
725
|
+
container: HTMLDivElement | null;
|
|
726
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
727
|
+
containerRef: HTMLDivElement;
|
|
728
|
+
}, any>;
|
|
729
|
+
|
|
730
|
+
export declare interface VizelEditorProps {
|
|
731
|
+
/** Override the editor from context */
|
|
732
|
+
editor?: Editor | null;
|
|
733
|
+
/** Custom class name */
|
|
734
|
+
class?: string;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export declare const VizelEmbedView: DefineComponent<VizelEmbedViewProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelEmbedViewProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
738
|
+
containerRef: HTMLDivElement;
|
|
739
|
+
}, any>;
|
|
740
|
+
|
|
741
|
+
export declare interface VizelEmbedViewProps {
|
|
742
|
+
/** Embed data */
|
|
743
|
+
data: VizelEmbedData;
|
|
744
|
+
/** Additional class name */
|
|
745
|
+
class?: string;
|
|
746
|
+
/** Whether the embed is selected */
|
|
747
|
+
selected?: boolean;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export declare interface VizelExposed {
|
|
751
|
+
/** The container DOM element */
|
|
752
|
+
container: HTMLDivElement | null;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export declare const VizelIcon: DefineComponent<VizelIconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelIconProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
756
|
+
|
|
757
|
+
export declare interface VizelIconProps {
|
|
758
|
+
/**
|
|
759
|
+
* The semantic icon name from Vizel's icon system.
|
|
760
|
+
*/
|
|
761
|
+
name: VizelIconName;
|
|
762
|
+
/**
|
|
763
|
+
* Custom icon mappings to override default Iconify icon IDs.
|
|
764
|
+
* If provided, will take precedence over context icons.
|
|
765
|
+
*/
|
|
766
|
+
customIcons?: CustomIconMap;
|
|
767
|
+
/**
|
|
768
|
+
* Icon width in pixels or CSS value.
|
|
769
|
+
*/
|
|
770
|
+
width?: string | number;
|
|
771
|
+
/**
|
|
772
|
+
* Icon height in pixels or CSS value.
|
|
773
|
+
*/
|
|
774
|
+
height?: string | number;
|
|
775
|
+
/**
|
|
776
|
+
* Icon color.
|
|
777
|
+
*/
|
|
778
|
+
color?: string;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export declare const VizelIconProvider: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Props for VizelIconProvider component.
|
|
785
|
+
*/
|
|
786
|
+
export declare interface VizelIconProviderProps {
|
|
787
|
+
/**
|
|
788
|
+
* Custom icon mappings to override default Lucide icons.
|
|
789
|
+
* Any icon not specified will fall back to the default Lucide icon.
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* ```vue
|
|
793
|
+
* <template>
|
|
794
|
+
* <!-- Use Material Design Icons for some icons -->
|
|
795
|
+
* <VizelIconProvider :icons="{ bold: 'mdi:format-bold', italic: 'mdi:format-italic' }">
|
|
796
|
+
* <App />
|
|
797
|
+
* </VizelIconProvider>
|
|
798
|
+
*
|
|
799
|
+
* <!-- Use Heroicons -->
|
|
800
|
+
* <VizelIconProvider :icons="{ check: 'heroicons:check', warning: 'heroicons:exclamation-triangle' }">
|
|
801
|
+
* <App />
|
|
802
|
+
* </VizelIconProvider>
|
|
803
|
+
* </template>
|
|
804
|
+
* ```
|
|
805
|
+
*/
|
|
806
|
+
icons?: CustomIconMap;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export declare const VizelLinkEditor: DefineComponent<VizelLinkEditorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
810
|
+
close: () => any;
|
|
811
|
+
}, string, PublicProps, Readonly<VizelLinkEditorProps> & Readonly<{
|
|
812
|
+
onClose?: () => any;
|
|
813
|
+
}>, {
|
|
814
|
+
enableEmbed: boolean;
|
|
815
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
816
|
+
formRef: HTMLFormElement;
|
|
817
|
+
inputRef: HTMLInputElement;
|
|
818
|
+
}, HTMLFormElement>;
|
|
819
|
+
|
|
820
|
+
export declare interface VizelLinkEditorProps {
|
|
821
|
+
/** The editor instance */
|
|
822
|
+
editor: Editor;
|
|
823
|
+
/** Custom class name */
|
|
824
|
+
class?: string;
|
|
825
|
+
/** Enable embed option (requires Embed extension) */
|
|
826
|
+
enableEmbed?: boolean;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export declare const VizelNodeSelector: DefineComponent<VizelNodeSelectorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelNodeSelectorProps> & Readonly<{}>, {
|
|
830
|
+
nodeTypes: VizelNodeTypeOption[];
|
|
831
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
832
|
+
containerRef: HTMLDivElement;
|
|
833
|
+
dropdownRef: HTMLDivElement;
|
|
834
|
+
}, HTMLDivElement>;
|
|
835
|
+
|
|
836
|
+
export declare interface VizelNodeSelectorProps {
|
|
837
|
+
/** The editor instance */
|
|
838
|
+
editor: Editor;
|
|
839
|
+
/** Custom node types (defaults to vizelDefaultNodeTypes) */
|
|
840
|
+
nodeTypes?: VizelNodeTypeOption[];
|
|
841
|
+
/** Custom class name */
|
|
842
|
+
class?: string;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export declare const VizelPortal: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Props for the Portal component.
|
|
849
|
+
*/
|
|
850
|
+
export declare interface VizelPortalProps {
|
|
851
|
+
/** Z-index layer for the portal content */
|
|
852
|
+
layer?: VizelPortalLayer;
|
|
853
|
+
/** Additional CSS class name */
|
|
854
|
+
class?: string;
|
|
855
|
+
/** Whether the portal is disabled (renders children in place) */
|
|
856
|
+
disabled?: boolean;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export declare interface VizelProps {
|
|
860
|
+
/** Initial content in JSON format */
|
|
861
|
+
initialContent?: JSONContent;
|
|
862
|
+
/**
|
|
863
|
+
* Initial content in Markdown format.
|
|
864
|
+
* If both initialContent and initialMarkdown are provided, initialMarkdown takes precedence.
|
|
865
|
+
* @example
|
|
866
|
+
* ```vue
|
|
867
|
+
* <Vizel initial-markdown="# Hello World\n\nThis is **bold** text." />
|
|
868
|
+
* ```
|
|
869
|
+
*/
|
|
870
|
+
initialMarkdown?: string;
|
|
871
|
+
/**
|
|
872
|
+
* Automatically transform diagram code blocks (mermaid, graphviz) to diagram nodes
|
|
873
|
+
* when importing markdown content. Only applies when initialMarkdown is provided.
|
|
874
|
+
* @default true
|
|
875
|
+
*/
|
|
876
|
+
transformDiagramsOnImport?: boolean;
|
|
877
|
+
/** Placeholder text when editor is empty */
|
|
878
|
+
placeholder?: string;
|
|
879
|
+
/** Whether the editor is editable (default: true) */
|
|
880
|
+
editable?: boolean;
|
|
881
|
+
/** Auto focus on mount */
|
|
882
|
+
autofocus?: boolean | "start" | "end" | "all" | number;
|
|
883
|
+
/** Feature configuration */
|
|
884
|
+
features?: VizelFeatureOptions;
|
|
885
|
+
/** Custom class name for the editor container */
|
|
886
|
+
class?: string;
|
|
887
|
+
/** Whether to show the bubble menu (default: true) */
|
|
888
|
+
showBubbleMenu?: boolean;
|
|
889
|
+
/** Enable embed option in bubble menu link editor (requires Embed extension) */
|
|
890
|
+
enableEmbed?: boolean;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export declare const VizelProvider: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
894
|
+
|
|
895
|
+
export declare interface VizelProviderProps {
|
|
896
|
+
/** The editor instance */
|
|
897
|
+
editor: Editor | null;
|
|
898
|
+
/** Custom class name */
|
|
899
|
+
class?: string;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Exposed ref type for Vizel component.
|
|
904
|
+
* Use with `ref` attribute to access the editor instance.
|
|
905
|
+
*/
|
|
906
|
+
export declare interface VizelRef {
|
|
907
|
+
/** The underlying Tiptap editor instance */
|
|
908
|
+
editor: Editor | null;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export declare const VizelSaveIndicator: DefineComponent<VizelSaveIndicatorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelSaveIndicatorProps> & Readonly<{}>, {
|
|
912
|
+
showTimestamp: boolean;
|
|
913
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
914
|
+
|
|
915
|
+
export declare interface VizelSaveIndicatorProps {
|
|
916
|
+
/** Current save status */
|
|
917
|
+
status: VizelSaveStatus;
|
|
918
|
+
/** Timestamp of last successful save */
|
|
919
|
+
lastSaved?: Date | null;
|
|
920
|
+
/** Show relative timestamp (default: true) */
|
|
921
|
+
showTimestamp?: boolean;
|
|
922
|
+
/** Custom class name */
|
|
923
|
+
class?: string;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export declare const VizelSlashMenu: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
927
|
+
|
|
928
|
+
export declare const VizelSlashMenuEmpty: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
929
|
+
|
|
930
|
+
export declare interface VizelSlashMenuEmptyProps {
|
|
931
|
+
/** Custom class name */
|
|
932
|
+
class?: string;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export declare const VizelSlashMenuItem: DefineComponent<VizelSlashMenuItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
936
|
+
click: () => any;
|
|
937
|
+
}, string, PublicProps, Readonly<VizelSlashMenuItemProps> & Readonly<{
|
|
938
|
+
onClick?: () => any;
|
|
939
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
940
|
+
|
|
941
|
+
export declare interface VizelSlashMenuItemProps {
|
|
942
|
+
/** The slash command item to display */
|
|
943
|
+
item: VizelSlashCommandItem;
|
|
944
|
+
/** Whether the item is selected */
|
|
945
|
+
isSelected?: boolean;
|
|
946
|
+
/** Custom class name */
|
|
947
|
+
class?: string;
|
|
948
|
+
/** Match indices for highlighting (from fuzzy search) */
|
|
949
|
+
titleMatches?: [number, number][];
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
export declare interface VizelSlashMenuProps {
|
|
953
|
+
/** The list of slash command items */
|
|
954
|
+
items: VizelSlashCommandItem[];
|
|
955
|
+
/** Custom class name */
|
|
956
|
+
class?: string;
|
|
957
|
+
/** Whether to show items grouped by category (default: true when not searching) */
|
|
958
|
+
showGroups?: boolean;
|
|
959
|
+
/** Custom group order */
|
|
960
|
+
groupOrder?: string[];
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Ref interface for VizelSlashMenu component.
|
|
965
|
+
* Exposes keyboard navigation handler for parent components.
|
|
966
|
+
*/
|
|
967
|
+
export declare interface VizelSlashMenuRef {
|
|
968
|
+
/** Handle keyboard navigation events (ArrowUp, ArrowDown, Enter, Tab) */
|
|
969
|
+
onKeyDown: (props: {
|
|
970
|
+
event: KeyboardEvent;
|
|
971
|
+
}) => boolean;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
export { VizelSlashMenuRendererOptions }
|
|
975
|
+
|
|
976
|
+
export declare const VizelThemeProvider: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
977
|
+
|
|
978
|
+
export declare interface VizelThemeProviderProps extends VizelThemeProviderOptions {
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
export { }
|