@veltdev/types 6.0.43 → 6.0.45

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.
@@ -427,15 +427,21 @@ export interface CommentToolClickedEvent extends CommentToolClickEvent {
427
427
  }
428
428
  export interface SidebarButtonClickEvent {
429
429
  metadata?: VeltEventMetadata;
430
+ /** Set only when the button is bound to a named Sidebar V2 (`sidebar-id`); absent for the default button. */
431
+ sidebarId?: string;
430
432
  }
431
433
  export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
432
434
  }
433
435
  /** Fired when the comment sidebar opens. Subscribe via `commentElement.on('sidebarOpen')`. */
434
436
  export interface SidebarOpenEvent {
437
+ /** The `sidebar-id` of the named sidebar that emitted the event. Absent for the default sidebar. */
438
+ sidebarId?: string;
435
439
  metadata?: VeltEventMetadata;
436
440
  }
437
441
  /** Fired when the comment sidebar closes. Subscribe via `commentElement.on('sidebarClose')`. */
438
442
  export interface SidebarCloseEvent {
443
+ /** The `sidebar-id` of the named sidebar that emitted the event. Absent for the default sidebar. */
444
+ sidebarId?: string;
439
445
  metadata?: VeltEventMetadata;
440
446
  }
441
447
  /**
@@ -445,6 +451,8 @@ export interface SidebarCloseEvent {
445
451
  */
446
452
  export interface FullscreenClickEvent {
447
453
  fullScreen: boolean;
454
+ /** The `sidebar-id` of the named sidebar that emitted the event. Absent for the default sidebar. */
455
+ sidebarId?: string;
448
456
  metadata?: VeltEventMetadata;
449
457
  }
450
458
  /** Fired when a comment is clicked in the sidebar list. Subscribe via `commentElement.on('commentClick')`. */
@@ -456,6 +464,8 @@ export interface CommentClickEvent {
456
464
  [key: string]: any;
457
465
  };
458
466
  annotation?: CommentAnnotation;
467
+ /** The `sidebar-id` of the named sidebar that emitted the event. Absent for the default sidebar. */
468
+ sidebarId?: string;
459
469
  metadata?: VeltEventMetadata;
460
470
  }
461
471
  /**
@@ -105,5 +105,40 @@ export interface OpenCommentSidebarConfig {
105
105
  * select the annotation (no pin dialog opens) and does not move keyboard focus. Sidebar V2 only.
106
106
  */
107
107
  annotationId?: string;
108
+ /**
109
+ * Open the Sidebar V2 instance mounted with this `sidebar-id` instead of the default sidebar.
110
+ * Without it the call opens the default (unnamed) sidebar exactly as before. When the named
111
+ * sidebar is not mounted, one warning is logged and nothing opens. When `annotationId` is
112
+ * outside that sidebar's `scope`, one warning is logged and nothing is focused (the scope is
113
+ * never widened).
114
+ */
115
+ sidebarId?: string;
116
+ }
117
+ /**
118
+ * Optional config for `closeCommentSidebar(config?)` and `toggleCommentSidebar(config?)`.
119
+ * Without `sidebarId` both calls act on the default sidebar exactly as before.
120
+ */
121
+ export interface CommentSidebarInstanceConfig {
122
+ /** Act on the Sidebar V2 instance mounted with this `sidebar-id`. */
123
+ sidebarId?: string;
124
+ }
125
+ /**
126
+ * One rule of a Sidebar V2 `scope`. It matches an annotation when the value at `path` (a dot
127
+ * path on the annotation, for example `sourceType` or `checkInfo.ruleKey`) equals any entry of
128
+ * `values`, with typed equality (no string coercion). An array at the path matches when any
129
+ * element matches. A missing, undefined or null value never matches.
130
+ */
131
+ export interface CommentSidebarScopeRule {
132
+ path: string;
133
+ values: Array<string | number | boolean>;
134
+ }
135
+ /**
136
+ * A fixed, non-clearable pre-filter for one Sidebar V2 instance (the `scope` attribute). An
137
+ * annotation is in scope when EVERY `include` rule matches and NO `exclude` rule matches.
138
+ * Filters, facets, counts, search, Reset, grouping and empty states all work inside the scope.
139
+ */
140
+ export interface CommentSidebarScope {
141
+ include?: CommentSidebarScopeRule[];
142
+ exclude?: CommentSidebarScopeRule[];
108
143
  }
109
144
  export {};
@@ -7,7 +7,7 @@ import { AutocompleteData } from "../data/autocomplete.data.model";
7
7
  import { AcceptSuggestionRequest, RejectSuggestionRequest, AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, CommentRequestQuery, CommentVisibilityConfig, ClearComposerRequest, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, FetchCommentAnnotationsRequest, FormatConfig, GetAttachmentRequest, GetCommentRequest, GetComposerDataRequest, GetLinkRequest, GetRecordingRequest, PrivateModeConfig, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubmitCommentRequest, SubscribeCommentAnnotationRequest, ToggleReactionRequest, UnsubscribeCommentAnnotationRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
8
8
  import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
9
9
  import { SuggestionAcceptEvent, SuggestionRejectEvent, AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, AssignToConfig, AssignUserEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, ComposerTextChangeEvent, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, FetchCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetLinkResponse, PageModeComposerConfig, RejectCommentAnnotationEvent, SubscribeCommentAnnotationEvent, UnsubscribeCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
10
- import { CommentSidebarCustomActionEventData, CommentSidebarCustomActionsState, CommentSidebarData, CommentSidebarDataOptions, OpenCommentSidebarConfig } from "../data/comment-sidebar-config.model";
10
+ import { CommentSidebarCustomActionEventData, CommentSidebarCustomActionsState, CommentSidebarData, CommentSidebarDataOptions, OpenCommentSidebarConfig, CommentSidebarInstanceConfig } from "../data/comment-sidebar-config.model";
11
11
  import { CommentContextProvider, IdScopedAnchoringConfig, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
12
12
  import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
13
13
  import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
@@ -75,18 +75,21 @@ export declare class CommentElement {
75
75
  * To open comment sidebar
76
76
  * @param config Optional. `{ annotationId }` opens the sidebar on that thread: focused view with
77
77
  * `focusedThreadMode` + `openAnnotationInFocusMode`, otherwise its card is scrolled into view (sidebar V2).
78
+ * `{ sidebarId }` opens the Sidebar V2 mounted with that `sidebar-id` instead of the default sidebar.
78
79
  */
79
80
  openCommentSidebar: (config?: OpenCommentSidebarConfig) => void;
80
81
 
81
82
  /**
82
83
  * To close comment sidebar
84
+ * @param config Optional. `{ sidebarId }` closes the Sidebar V2 mounted with that `sidebar-id`.
83
85
  */
84
- closeCommentSidebar: () => void;
86
+ closeCommentSidebar: { (): void; (config?: CommentSidebarInstanceConfig): void };
85
87
 
86
88
  /**
87
89
  * To toggle comment sidebar
90
+ * @param config Optional. `{ sidebarId }` toggles the Sidebar V2 mounted with that `sidebar-id`.
88
91
  */
89
- toggleCommentSidebar: () => void;
92
+ toggleCommentSidebar: { (): void; (config?: CommentSidebarInstanceConfig): void };
90
93
 
91
94
  /**
92
95
  * To enable context in page mode composer feature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types",
3
- "version": "6.0.43",
3
+ "version": "6.0.45",
4
4
  "description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
5
5
  "homepage": "https://velt.dev",
6
6
  "keywords": [