@pantograph/pattern-vue 0.0.3 → 0.0.4

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.
Files changed (102) hide show
  1. package/README.md +2 -2
  2. package/dist/ComponentMap-B17Koyjo.js +1 -0
  3. package/dist/ComponentMap-D-1MyYm9.js +21 -0
  4. package/dist/ComponentMap.d.ts +1 -1
  5. package/dist/components/CoachMark/CoachMark.d.ts +52 -0
  6. package/dist/components/CoachMark/constant.d.ts +72 -0
  7. package/dist/components/CoachMark/index.d.ts +5 -0
  8. package/dist/components/CoachMark/model.d.ts +8 -0
  9. package/dist/components/CoachMark/types.d.ts +105 -0
  10. package/dist/components/Comment/Comment.d.ts +28 -0
  11. package/dist/components/Comment/CommentAction.d.ts +17 -0
  12. package/dist/components/Comment/CommentActions.d.ts +431 -0
  13. package/dist/components/Comment/CommentEditor.d.ts +67 -0
  14. package/dist/components/Comment/CommentFileList.d.ts +2 -0
  15. package/dist/components/Comment/CommentMention.d.ts +639 -0
  16. package/dist/components/Comment/CommentReaction.d.ts +11 -0
  17. package/dist/components/Comment/CommentReactionHoverCard.d.ts +10 -0
  18. package/dist/components/Comment/CommentReactionList.d.ts +217 -0
  19. package/dist/components/Comment/CommentReactionListItem.d.ts +3 -0
  20. package/dist/components/Comment/CommentTrigger.d.ts +15 -0
  21. package/dist/components/Comment/constant.d.ts +59 -0
  22. package/dist/components/Comment/context.d.ts +3 -0
  23. package/dist/components/Comment/index.d.ts +13 -0
  24. package/dist/components/Comment/types.d.ts +563 -0
  25. package/dist/components/Comment/useComment.d.ts +49 -0
  26. package/dist/components/DataTable/DataTable.d.ts +99 -0
  27. package/dist/components/DataTable/components/DataTableBatchActions.d.ts +9 -0
  28. package/dist/components/DataTable/components/DataTableBatchActionsContent.d.ts +2 -0
  29. package/dist/components/DataTable/components/DataTableColGroup.d.ts +6 -0
  30. package/dist/components/DataTable/components/DataTableContent.d.ts +2 -0
  31. package/dist/components/DataTable/components/DataTableEmpty.d.ts +2 -0
  32. package/dist/components/DataTable/components/DataTableFooter.d.ts +2 -0
  33. package/dist/components/DataTable/components/DataTableHeader.d.ts +57 -0
  34. package/dist/components/DataTable/components/DataTableHeaderCell.d.ts +243 -0
  35. package/dist/components/DataTable/components/DataTableHeaderCellActionsPopover.d.ts +2 -0
  36. package/dist/components/DataTable/components/DataTableInsertBetween.d.ts +2 -0
  37. package/dist/components/DataTable/components/DataTableLazyLoading.d.ts +56 -0
  38. package/dist/components/DataTable/components/DataTableLoadingRow.d.ts +18 -0
  39. package/dist/components/DataTable/components/DataTableRow.d.ts +15 -0
  40. package/dist/components/DataTable/components/ThDragGhost.d.ts +16 -0
  41. package/dist/components/DataTable/constant.d.ts +20 -0
  42. package/dist/components/DataTable/context.d.ts +2 -0
  43. package/dist/components/DataTable/index.d.ts +5 -0
  44. package/dist/components/DataTable/types/cell.d.ts +15 -0
  45. package/dist/components/DataTable/types/column.d.ts +69 -0
  46. package/dist/components/DataTable/types/common.d.ts +18 -0
  47. package/dist/components/DataTable/types/context.d.ts +44 -0
  48. package/dist/components/DataTable/types/index.d.ts +139 -0
  49. package/dist/components/DataTable/types/select.d.ts +25 -0
  50. package/dist/components/DataTable/utils/index.d.ts +14 -0
  51. package/dist/components/DataTable/utils/useCell.d.ts +23 -0
  52. package/dist/components/DataTable/utils/useCol.d.ts +35 -0
  53. package/dist/components/DataTable/utils/useColumnFixed.d.ts +23 -0
  54. package/dist/components/DataTable/utils/useColumnOrder.d.ts +32 -0
  55. package/dist/components/DataTable/utils/useColumnPopover.d.ts +19 -0
  56. package/dist/components/DataTable/utils/useColumnSize.d.ts +14 -0
  57. package/dist/components/DataTable/utils/useColumnWrap.d.ts +7 -0
  58. package/dist/components/DataTable/utils/useFilter.d.ts +14 -0
  59. package/dist/components/DataTable/utils/useInsertBetween.d.ts +5 -0
  60. package/dist/components/DataTable/utils/useRow.d.ts +9 -0
  61. package/dist/components/DataTable/utils/useRowOrder.d.ts +114 -0
  62. package/dist/components/DataTable/utils/useRowVirtualizer.d.ts +12 -0
  63. package/dist/components/DataTable/utils/useSelection.d.ts +30 -0
  64. package/dist/components/DataTable/utils/useSort.d.ts +12 -0
  65. package/dist/components/Form/Form.d.ts +58 -0
  66. package/dist/components/Form/FormItem.d.ts +22 -0
  67. package/dist/components/Form/constant.d.ts +18 -0
  68. package/dist/components/Form/defineRules.d.ts +6 -0
  69. package/dist/components/Form/index.d.ts +5 -0
  70. package/dist/components/Form/types.d.ts +418 -0
  71. package/dist/components/GOPicker/GOItemSkeleton.d.ts +2 -0
  72. package/dist/components/GOPicker/GOPicker.d.ts +33 -0
  73. package/dist/components/GOPicker/constant.d.ts +40 -0
  74. package/dist/components/GOPicker/emojis.d.ts +24 -0
  75. package/dist/components/GOPicker/getEmojiList.d.ts +42 -0
  76. package/dist/components/GOPicker/icons.d.ts +9 -0
  77. package/dist/components/GOPicker/index.d.ts +6 -0
  78. package/dist/components/GOPicker/model.d.ts +16 -0
  79. package/dist/components/GOPicker/types.d.ts +353 -0
  80. package/dist/components/InputPassword/InputPassword.d.ts +4 -71
  81. package/dist/components/InputPassword/constant.d.ts +12 -0
  82. package/dist/components/InputPassword/index.d.ts +4 -8
  83. package/dist/components/InputPassword/types.d.ts +46 -0
  84. package/dist/components/ListView/ListView.d.ts +15 -0
  85. package/dist/components/ListView/ListViewItem.d.ts +10 -0
  86. package/dist/components/ListView/constant.d.ts +4 -0
  87. package/dist/components/ListView/index.d.ts +5 -0
  88. package/dist/components/ListView/types.d.ts +16 -0
  89. package/dist/index-D-WRsztv.js +3431 -0
  90. package/dist/index-DhcyeKI-.js +1 -0
  91. package/dist/index.d.ts +6 -0
  92. package/dist/index.js +52 -4
  93. package/dist/index.umd.cjs +1 -1
  94. package/dist/nuxt/index.js +1 -1
  95. package/dist/nuxt/index.umd.cjs +1 -1
  96. package/dist/resolver/index.js +1 -1
  97. package/dist/resolver/index.umd.cjs +1 -1
  98. package/dist/use/index.js +24437 -100
  99. package/dist/use/index.umd.cjs +30 -1
  100. package/package.json +10 -6
  101. package/dist/ComponentMap-BDQ8ar3z.js +0 -6
  102. package/dist/ComponentMap-CTyWVtmA.js +0 -1
@@ -0,0 +1,563 @@
1
+ import { PopoverProps, AvatarSlots, ShortcutProps, UploadBaseProps, UploadEmits, ButtonProps, KbdProps, AvatarProps, UploadProps, UploadSlots, Direction, ComboboxProps } from '@pantograph/vue';
2
+ import { ClassValue } from 'clsx';
3
+ import { VNode, Ref } from 'vue';
4
+ import { GOPickerProps } from '../GOPicker';
5
+ import { DefineComponent, EmitToProp, EmitType } from '@pantograph/utils-vue';
6
+ export interface CommentReactionUser {
7
+ id: string;
8
+ avatar: AvatarProps;
9
+ name: string;
10
+ }
11
+ /**
12
+ * Interface representing a reaction item for a comment
13
+ */
14
+ export interface CommentReactionItem {
15
+ /**
16
+ * The emoji character to display
17
+ */
18
+ emoji: string;
19
+ /**
20
+ * The count of reactions for this emoji
21
+ */
22
+ count: number;
23
+ /**
24
+ * Whether this reaction is active for the current user
25
+ */
26
+ active?: boolean;
27
+ users?: CommentReactionUser[];
28
+ }
29
+ /**
30
+ * Props for the Comment component
31
+ */
32
+ export interface CommentProps {
33
+ /**
34
+ * Additional CSS classes to apply to the comment
35
+ */
36
+ class?: ClassValue;
37
+ /**
38
+ * CSS classes to apply to the header element
39
+ */
40
+ headerCls?: ClassValue;
41
+ /**
42
+ * CSS classes to apply to the actions element
43
+ */
44
+ actionsCls?: ClassValue;
45
+ /**
46
+ * CSS classes to apply to the body element
47
+ */
48
+ bodyCls?: ClassValue;
49
+ /**
50
+ * CSS classes to apply to the datetime element
51
+ */
52
+ datetimeCls?: ClassValue;
53
+ /**
54
+ * Props to pass to the upload component
55
+ */
56
+ uploadProps?: Omit<UploadProps, 'action'>;
57
+ /**
58
+ * CSS classes to apply to the content element
59
+ */
60
+ contentCls?: ClassValue;
61
+ /**
62
+ * CSS classes to apply to the author element
63
+ */
64
+ authorCls?: ClassValue;
65
+ /**
66
+ * CSS classes to apply to the replies element
67
+ */
68
+ repliesCls?: ClassValue;
69
+ /**
70
+ * CSS classes to apply to the header content element
71
+ */
72
+ headerContentCls?: ClassValue;
73
+ /**
74
+ * CSS classes to apply to the reactions element
75
+ */
76
+ reactionsCls?: ClassValue;
77
+ /**
78
+ * CSS classes to apply to the replies header element
79
+ */
80
+ repliesHeaderCls?: ClassValue;
81
+ /**
82
+ * CSS classes to apply to the replies title element
83
+ */
84
+ repliesTitleCls?: ClassValue;
85
+ /**
86
+ * CSS classes to apply to the replies content element
87
+ */
88
+ repliesContentCls?: ClassValue;
89
+ /**
90
+ * The author of the comment
91
+ */
92
+ author?: string;
93
+ /**
94
+ * URL of the author's avatar image
95
+ */
96
+ avatar?: string;
97
+ /**
98
+ * The content of the comment
99
+ */
100
+ content?: string;
101
+ /**
102
+ * The datetime of the comment
103
+ */
104
+ datetime?: string;
105
+ /**
106
+ * The number of replies to the comment
107
+ */
108
+ repliesCount?: number | string;
109
+ /**
110
+ * The title for the replies section
111
+ * @default 'Replies'
112
+ */
113
+ repliesTitle?: string;
114
+ /**
115
+ * Props to pass to the avatar component
116
+ */
117
+ avatarProps?: AvatarProps;
118
+ /**
119
+ * Whether the replies section is open
120
+ * Supports v-model binding
121
+ */
122
+ open?: boolean;
123
+ /**
124
+ * Whether to show the reaction functionality
125
+ * @default true
126
+ */
127
+ hasReaction?: boolean;
128
+ /**
129
+ * Whether to show the edit action
130
+ * @default true
131
+ */
132
+ hasEdit?: boolean;
133
+ /**
134
+ * Whether to show the delete action
135
+ * @default true
136
+ */
137
+ hasDelete?: boolean;
138
+ /**
139
+ * Whether to show the reply action
140
+ * @default true
141
+ */
142
+ hasReply?: boolean;
143
+ /**
144
+ * The reactions to display on the comment
145
+ */
146
+ reactions?: CommentReactionItem[];
147
+ /**
148
+ * Whether to show the replies section
149
+ */
150
+ showReplies?: boolean;
151
+ /**
152
+ * The ID of the current user who reacted (for highlighting active reactions)
153
+ */
154
+ currentReactorId?: string;
155
+ /**
156
+ * CSS classes to apply to the reaction users hover card
157
+ */
158
+ reactionUsersCls?: ClassValue;
159
+ /**
160
+ * The title text for reaction users hover card
161
+ * @default 'people reacted with'
162
+ */
163
+ reactionUsersTitle?: string;
164
+ dir?: Direction;
165
+ }
166
+ /**
167
+ * Base emits for the Comment component
168
+ */
169
+ export interface CommentBaseEmits {
170
+ /**
171
+ * Emitted when the reaction button is clicked
172
+ * @param value - The HTMLElement reference for positioning the reaction picker
173
+ */
174
+ openReaction: [value: HTMLElement];
175
+ }
176
+ /**
177
+ * Emits for the Comment component
178
+ */
179
+ export interface CommentEmits extends CommentBaseEmits {
180
+ /**
181
+ * Emitted when the replies section open state changes
182
+ * Used for v-model binding
183
+ * @param value - The new open state
184
+ */
185
+ 'update:open': [value: boolean];
186
+ /**
187
+ * Emitted when the actions button is clicked
188
+ * @param value - The HTMLElement reference for positioning the actions menu
189
+ */
190
+ openActions: [value: HTMLElement];
191
+ /**
192
+ * Emitted when a reaction is selected
193
+ * @param value - The selected reaction item
194
+ */
195
+ reaction: [value: CommentReactionItem];
196
+ /**
197
+ * Emitted when the reply button is clicked
198
+ * @param callback - Callback function to handle reply state
199
+ */
200
+ reply: [callback: (value?: boolean) => void];
201
+ }
202
+ /**
203
+ * Slots for the Comment component
204
+ */
205
+ export interface CommentSlots extends Omit<UploadSlots, 'default'> {
206
+ /**
207
+ * Custom content for the comment header
208
+ * @param data - Slot data object
209
+ */
210
+ header?: (data?: object) => never;
211
+ /**
212
+ * Custom content for the author information
213
+ * @param data - Slot data object
214
+ */
215
+ author?: (data?: object) => never;
216
+ /**
217
+ * Custom content for the author avatar
218
+ * @param data - Slot data object
219
+ */
220
+ avatar?: (data?: object) => never;
221
+ /**
222
+ * Custom content for the comment body
223
+ * @param data - Slot data object
224
+ */
225
+ content?: (data?: object) => never;
226
+ /**
227
+ * Custom content for the timestamp
228
+ * @param data - Slot data object
229
+ */
230
+ datetime?: (data?: object) => never;
231
+ /**
232
+ * Custom content for the replies header
233
+ * @param data - Slot data with open state
234
+ */
235
+ repliesHeader?: (data?: {
236
+ open: boolean;
237
+ }) => never;
238
+ /**
239
+ * Custom content for the replies title
240
+ * @param data - Slot data object
241
+ */
242
+ repliesTitle?: (data?: object) => never;
243
+ /**
244
+ * Custom content for the replies count
245
+ * @param data - Slot data object
246
+ */
247
+ repliesCount?: (data?: object) => never;
248
+ /**
249
+ * Custom content for the replies section
250
+ * @param data - Slot data object
251
+ */
252
+ replies?: (data?: object) => never;
253
+ /**
254
+ * Custom content for individual reaction items
255
+ * @param reaction - The reaction item data
256
+ */
257
+ reactionItem?: ({ reaction }: {
258
+ reaction: CommentReactionItem;
259
+ }) => never;
260
+ /**
261
+ * Custom trigger element for the reaction hover card
262
+ * Maps to ReactionHoverCardSlots['trigger']
263
+ */
264
+ reactionHoverCardTrigger?: ReactionHoverCardSlots['header'];
265
+ /**
266
+ * Custom header content for the reaction hover card
267
+ * Maps to ReactionHoverCardSlots['header']
268
+ */
269
+ reactionHoverCardHeader?: ReactionHoverCardSlots['header'];
270
+ /**
271
+ * Custom users list content for the reaction hover card
272
+ * Maps to ReactionHoverCardSlots['users']
273
+ */
274
+ reactionHoverCardUsers?: ReactionHoverCardSlots['users'];
275
+ /**
276
+ * Custom user item content for the reaction hover card
277
+ * Maps to ReactionHoverCardSlots['user']
278
+ */
279
+ reactionHoverCardUser?: ReactionHoverCardSlots['user'];
280
+ /**
281
+ * Custom avatar content for users in the reaction hover card
282
+ * Maps to ReactionHoverCardSlots['avatar']
283
+ */
284
+ reactionHoverCardAvatar?: ReactionHoverCardSlots['avatar'];
285
+ /**
286
+ * Custom fallback content for avatars in the reaction hover card
287
+ * Maps to ReactionHoverCardSlots['fallback']
288
+ */
289
+ reactionHoverCardFallback?: ReactionHoverCardSlots['fallback'];
290
+ /**
291
+ * Custom name content for users in the reaction hover card
292
+ * Maps to ReactionHoverCardSlots['name']
293
+ */
294
+ reactionHoverCardName?: ReactionHoverCardSlots['name'];
295
+ }
296
+ export interface CommentContext {
297
+ props: CommentProps;
298
+ emit: EmitType<CommentEmits>;
299
+ slots: CommentSlots;
300
+ fileListRef?: Ref<any>;
301
+ openReplies?: Ref<boolean | undefined>;
302
+ }
303
+ /**
304
+ * Props for the CommentAction component
305
+ */
306
+ export interface CommentActionProps extends PopoverProps {
307
+ /**
308
+ * Whether to show the edit action
309
+ * @default true
310
+ */
311
+ hasEdit?: boolean;
312
+ /**
313
+ * Whether to show the delete action
314
+ * @default true
315
+ */
316
+ hasDelete?: boolean;
317
+ /**
318
+ * Text to display for the edit action
319
+ * @default 'Edit'
320
+ */
321
+ editText?: string;
322
+ /**
323
+ * Text to display for the delete action
324
+ * @default 'Delete'
325
+ */
326
+ deleteText?: string;
327
+ }
328
+ /**
329
+ * Emits for the CommentAction component
330
+ */
331
+ export interface CommentActionEmits {
332
+ /**
333
+ * Emitted when the edit action is triggered
334
+ */
335
+ edit: [];
336
+ /**
337
+ * Emitted when the delete action is triggered
338
+ */
339
+ delete: [];
340
+ /**
341
+ * Emitted when the open state changes
342
+ */
343
+ 'update:open': [value: string];
344
+ }
345
+ /**
346
+ * Props for the CommentEditor component
347
+ */
348
+ export interface CommentEditorProps {
349
+ /**
350
+ * Additional CSS classes to apply to the comment editor
351
+ */
352
+ class?: ClassValue;
353
+ /**
354
+ * CSS classes to apply to the actions element
355
+ */
356
+ actionsCls?: ClassValue;
357
+ /**
358
+ * CSS classes to apply to the editor element
359
+ */
360
+ editorCls?: ClassValue;
361
+ /**
362
+ * CSS classes to apply to the footer element
363
+ */
364
+ footerCls?: ClassValue;
365
+ /**
366
+ * Whether to hide the reaction functionality
367
+ */
368
+ noReaction?: boolean;
369
+ /**
370
+ * Whether to hide the upload functionality
371
+ */
372
+ noUpload?: boolean;
373
+ /**
374
+ * Whether to hide the mention functionality
375
+ */
376
+ noMention?: boolean;
377
+ /**
378
+ * Props to pass to the upload trigger component
379
+ */
380
+ uploadTriggerProps?: UploadBaseProps;
381
+ /**
382
+ * Reference element for the mentions
383
+ */
384
+ mentionsReference?: HTMLElement | undefined;
385
+ /**
386
+ * Props to pass to the upload component
387
+ */
388
+ uploadProps: UploadProps & Partial<{
389
+ [K in keyof UploadEmits as EmitToProp<K>]: (...params: UploadEmits[K]) => void;
390
+ }>;
391
+ /**
392
+ * Maximum height of the comment editor
393
+ * @default 100
394
+ */
395
+ maxHeight?: string | number;
396
+ sendActionsCls?: ClassValue;
397
+ okProps?: ButtonProps & {
398
+ text: string;
399
+ hide?: boolean;
400
+ };
401
+ cancelProps?: ButtonProps & {
402
+ text: string;
403
+ hide?: boolean;
404
+ };
405
+ kbdProps?: KbdProps & {
406
+ text: string;
407
+ hide?: boolean;
408
+ };
409
+ kbdDescription?: string;
410
+ kbdDescriptionCls?: ClassValue;
411
+ dividerCls?: ClassValue;
412
+ }
413
+ /**
414
+ * Emits for the CommentEditor component
415
+ */
416
+ export interface CommentEditorEmits extends CommentBaseEmits {
417
+ /**
418
+ * Emitted when the reaction picker is opened
419
+ */
420
+ openReaction: [value: HTMLElement];
421
+ /**
422
+ * Emitted when the mention picker is opened
423
+ */
424
+ openMention: [value: HTMLElement];
425
+ /**
426
+ * Emitted when the comment editor loses focus
427
+ */
428
+ blur: [value: InputEvent];
429
+ /**
430
+ * Emitted when the comment editor receives focus
431
+ */
432
+ focus: [value: InputEvent];
433
+ /**
434
+ * Emitted when the comment is submitted
435
+ */
436
+ submit: [];
437
+ cancel: [];
438
+ }
439
+ /**
440
+ * Props for the CommentReaction component
441
+ */
442
+ export interface CommentReactionProps extends GOPickerProps {
443
+ /**
444
+ * The reference element for positioning the reaction picker
445
+ */
446
+ reference: HTMLElement;
447
+ /**
448
+ * Whether the reaction picker is open
449
+ */
450
+ open?: boolean;
451
+ }
452
+ /**
453
+ * Emits for the CommentReaction component
454
+ */
455
+ export interface CommentReactionEmits {
456
+ /**
457
+ * Emitted when a reaction is selected
458
+ */
459
+ reaction: [value: string];
460
+ /**
461
+ * Emitted when the open state changes
462
+ */
463
+ 'update:open': [value: string];
464
+ }
465
+ export interface ReactionHoverCardProps {
466
+ reaction: CommentReactionItem;
467
+ reactionUsersCls?: any;
468
+ reactionUsersTitle?: string;
469
+ }
470
+ export interface ReactionHoverCardSlots {
471
+ trigger?: () => VNode;
472
+ header?: ({ reaction }: {
473
+ reaction: CommentReactionItem;
474
+ }) => VNode;
475
+ users?: ({ reaction }: {
476
+ reaction: CommentReactionItem;
477
+ }) => VNode;
478
+ user?: ({ user }: {
479
+ user: CommentReactionUser;
480
+ }) => VNode;
481
+ avatar?: ({ user }: {
482
+ user: CommentReactionUser;
483
+ }) => VNode;
484
+ fallback?: ({ user }: {
485
+ user: CommentReactionUser;
486
+ }) => VNode;
487
+ name?: ({ user }: {
488
+ user: CommentReactionUser;
489
+ }) => VNode;
490
+ }
491
+ export interface CommentReactionItemProps {
492
+ reaction: CommentReactionItem;
493
+ }
494
+ /**
495
+ * Props for the CommentTrigger component
496
+ */
497
+ export interface CommentTriggerProps {
498
+ /**
499
+ * Additional CSS classes to apply to the component
500
+ */
501
+ class?: ClassValue;
502
+ /**
503
+ * Text to display in the trigger
504
+ * @default 'Add a Comment or type @ to Mention...'
505
+ */
506
+ text?: string;
507
+ /**
508
+ * URL of the avatar image to display
509
+ */
510
+ src?: string;
511
+ /**
512
+ * Whether to enable the keyboard shortcut
513
+ * @default false
514
+ */
515
+ withShortcut?: boolean;
516
+ /**
517
+ * Whether to ignore the keyboard shortcut
518
+ * @default false
519
+ */
520
+ ignoreShortcut?: boolean;
521
+ /**
522
+ * Whether the trigger is disabled
523
+ */
524
+ disabled?: boolean;
525
+ /**
526
+ * Props to pass to the avatar component
527
+ */
528
+ avatarProps?: AvatarProps;
529
+ /**
530
+ * Props to pass to the shortcut component
531
+ */
532
+ shortcutProps?: ShortcutProps;
533
+ }
534
+ /**
535
+ * Slots for the CommentTrigger component
536
+ */
537
+ export interface CommentTriggerSlots extends AvatarSlots {
538
+ /**
539
+ * Slot for custom text content
540
+ */
541
+ text?: (params?: object) => never;
542
+ }
543
+ /**
544
+ * Emits for the CommentTrigger component
545
+ */
546
+ export interface CommentTriggerEmits {
547
+ /**
548
+ * Emitted when the add action is triggered
549
+ */
550
+ add: [value: MouseEvent | KeyboardEvent];
551
+ }
552
+ declare module 'vue' {
553
+ interface GlobalComponents {
554
+ Comment: DefineComponent<CommentProps, CommentSlots, CommentEmits>;
555
+ CommentAction: DefineComponent<CommentActionProps>;
556
+ CommentReaction: DefineComponent<CommentReactionProps>;
557
+ CommentReactionListItem: DefineComponent<CommentReactionItemProps>;
558
+ CommentReactionHoverCard: DefineComponent<ReactionHoverCardProps, ReactionHoverCardSlots>;
559
+ CommentMention: DefineComponent<ComboboxProps>;
560
+ CommentEditor: DefineComponent<CommentEditorProps>;
561
+ CommentTrigger: DefineComponent<CommentTriggerProps, CommentTriggerSlots, CommentTriggerEmits>;
562
+ }
563
+ }
@@ -0,0 +1,49 @@
1
+ import { CommentReactionProps, CommentActionProps } from './types';
2
+ /**
3
+ * Composable function for managing comment functionality
4
+ * @param params - Parameters including onReaction and addEmoji callbacks
5
+ * @returns Object containing refs, bindings, and helper functions
6
+ */
7
+ export declare const useComment: (params: {
8
+ /**
9
+ * Callback function when a reaction is selected
10
+ */
11
+ onReaction: (reaction: string) => void;
12
+ /**
13
+ * Callback function to add an emoji
14
+ */
15
+ addEmoji: (emoji: string) => void;
16
+ }) => {
17
+ forwardRefMention: import('vue').Ref<any, any>;
18
+ openMention: import('vue').Ref<boolean, boolean>;
19
+ handleMentionUpdateOpen: (value: boolean) => void;
20
+ search: import('vue').Ref<string | undefined, string | undefined>;
21
+ handleMentionUpdateSearch: (value: string) => void;
22
+ mentionsReference: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
23
+ mentionsHeaderSearch: import('vue').Ref<boolean, boolean>;
24
+ reactionBinding: import('vue').ComputedRef<CommentReactionProps>;
25
+ actionBinding: import('vue').ComputedRef<CommentActionProps>;
26
+ editorBinding: import('vue').ComputedRef<{
27
+ onOpenReaction: (reference: HTMLElement) => void;
28
+ onOpenMention: (reference: HTMLElement) => void;
29
+ }>;
30
+ mentionBinding: import('vue').ComputedRef<{
31
+ ref: (el: any) => any;
32
+ open: boolean;
33
+ 'onUpdate:open': (value: boolean) => void;
34
+ search: string | undefined;
35
+ 'onUpdate:search': (value: string) => void;
36
+ reference: HTMLElement | undefined;
37
+ disableOutsidePointerEvents: boolean;
38
+ resetSearchTermOnBlur: boolean;
39
+ resetHighlightedOptionAfterSelect: boolean;
40
+ headerSearch: boolean;
41
+ onPointerDownOutside: () => void;
42
+ onEscapeKeyDown: () => void;
43
+ }>;
44
+ openActions: (reference: HTMLElement) => void;
45
+ openReaction: (reference: HTMLElement, fromEditor?: boolean) => void;
46
+ openMentionInEditor: (clientRect?: null | (() => DOMRect | null)) => void;
47
+ closeMentionInEditor: () => void;
48
+ updateMentionQuery: (query: string) => void;
49
+ };