@veltdev/types-dev 6.0.18 → 6.0.20

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.
@@ -7,6 +7,25 @@ export interface IUnreadCommentsCount {
7
7
  count: number;
8
8
  }
9
9
  export type UnreadCommentsCount = IUnreadCommentsCount | null;
10
+ /**
11
+ * Config for `commentElement.enableIdScopedAnchoring(config)` and
12
+ * `<velt-comments id-scoped-anchoring>` (which also accepts `true` / `false`).
13
+ *
14
+ * Use it when several documents are set (`setDocuments`) and only some of them should use
15
+ * id-scoped anchoring, e.g. comments made on another page that can only be matched by element id.
16
+ */
17
+ export interface IdScopedAnchoringConfig {
18
+ /**
19
+ * Client document ids (the ids passed to `setDocuments`) whose comment pins use id-scoped
20
+ * anchoring. Pins of every other document resolve as they do with the feature off.
21
+ *
22
+ * - Omitted: every document (same as calling `enableIdScopedAnchoring()` with no config).
23
+ * - `[]`: no document.
24
+ *
25
+ * Calling `enableIdScopedAnchoring` again replaces the list.
26
+ */
27
+ documentIds?: string[];
28
+ }
10
29
  export interface TransformContext {
11
30
  containerSelector: string;
12
31
  transforms: {
@@ -8,7 +8,7 @@ import { AcceptSuggestionRequest, RejectSuggestionRequest, AcceptCommentAnnotati
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
10
  import { CommentSidebarCustomActionEventData, CommentSidebarCustomActionsState, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
11
- import { CommentContextProvider, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
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";
14
14
  export { ReactionMap } from '../data/reaction-annotation.data.model';
@@ -1397,8 +1397,15 @@ export declare class CommentElement {
1397
1397
  * saved path, else on the id element itself with the saved position percentages), and is not
1398
1398
  * shown where the id is absent, duplicated or hidden. New pins also skip framework-generated ids (React `useId`,
1399
1399
  * Radix) when choosing the id to root at. Applies to existing pins. Defaults to disabled.
1400
- */
1401
- public enableIdScopedAnchoring: () => void;
1400
+ *
1401
+ * With several documents set, pass `{ documentIds }` to limit it to those client document ids;
1402
+ * pins of the other documents keep the default resolution. No `documentIds` = every document,
1403
+ * `[]` = none; a `documentIds` that is not an array = none (with a console warning). Calling it again
1404
+ * (or setting `<velt-comments id-scoped-anchoring>`) replaces the list, and pins already on the page
1405
+ * are placed again.
1406
+ * @param config optional {@link IdScopedAnchoringConfig}
1407
+ */
1408
+ public enableIdScopedAnchoring: (config?: IdScopedAnchoringConfig) => void;
1402
1409
 
1403
1410
  /**
1404
1411
  * To disable id-scoped anchoring. Pins resolve through the default anchor resolution,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "6.0.18",
3
+ "version": "6.0.20",
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": [