@veltdev/types-dev 4.5.1 → 4.5.2-beta.11

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.
@@ -8,6 +8,7 @@ export declare class AutocompleteData {
8
8
  description?: string;
9
9
  type: 'custom' | 'contact' | 'group';
10
10
  data: AutocompleteItem[];
11
+ groups?: AutocompleteGroup[];
11
12
  }
12
13
  export declare class AutocompleteItem {
13
14
  id: string;
@@ -18,6 +19,7 @@ export declare class AutocompleteItem {
18
19
  svg?: string;
19
20
  };
20
21
  link?: string;
22
+ groupId?: string;
21
23
  }
22
24
  export declare class AutocompleteReplaceData {
23
25
  text: string;
@@ -34,6 +36,10 @@ export declare class AutocompleteUserContactReplaceData {
34
36
  userId: string;
35
37
  contact?: UserContact;
36
38
  }
39
+ export declare class AutocompleteGroup {
40
+ id: string;
41
+ name: string;
42
+ }
37
43
  export declare class AutocompleteChipData extends AutocompleteItem {
38
44
  type: 'contact' | 'custom';
39
45
  }
@@ -1,4 +1,5 @@
1
1
  import { SingleEditorState, SingleEditorStatus } from "../../utils/enums";
2
+ import { ErrorEvent } from "./core-events.data.model";
2
3
  import { User } from "./user.data.model";
3
4
  export declare class LiveStateData {
4
5
  /**
@@ -72,3 +73,20 @@ export declare class EditorAccessTimer {
72
73
  export declare class LiveStateDataConfig {
73
74
  listenToNewChangesOnly?: boolean;
74
75
  }
76
+ export interface SetUserAsEditorResponse {
77
+ error?: ErrorEvent;
78
+ }
79
+ export interface LiveStateSingleEditorExternalUserPresence {
80
+ /**
81
+ * True if the same user is present on different tab.
82
+ */
83
+ sameUserPresentOnTab?: boolean;
84
+ /**
85
+ * True if the different user is present on different tab.
86
+ */
87
+ differentUserPresentOnTab?: boolean;
88
+ /**
89
+ * User ids of the users present on different tab.
90
+ */
91
+ userIds?: string[];
92
+ }
@@ -1,8 +1,8 @@
1
1
  // @ts-nocheck
2
- import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer, LiveStateDataConfig, SetLiveStateDataConfig } from '../data/live-state-data.data.model';
3
- import { User } from '../data/user.data.model';
4
2
  import { ServerConnectionState } from '../../utils/enums';
3
+ import { EditorAccessTimer, LiveStateDataConfig, LiveStateSingleEditorExternalUserPresence, SetLiveStateDataConfig, SetUserAsEditorResponse, SingleEditorConfig, UserEditorAccess } from '../data/live-state-data.data.model';
5
4
  import { LiveStateEventTypesMap } from '../data/live-state-events.data.model';
5
+ import { User } from '../data/user.data.model';
6
6
 
7
7
  /**
8
8
  * Represents the synchronization element for live state.
@@ -54,7 +54,7 @@ export declare class LiveStateSyncElement {
54
54
  /**
55
55
  * Sets the current user as an editor.
56
56
  */
57
- setUserAsEditor: () => void;
57
+ setUserAsEditor: () => Promise<SetUserAsEditorResponse | void>;
58
58
 
59
59
  /**
60
60
  * Resets the user access.
@@ -142,6 +142,11 @@ export declare class LiveStateSyncElement {
142
142
  */
143
143
  onServerConnectionStateChange: () => Observable<ServerConnectionState>;
144
144
 
145
+ /**
146
+ * To update user presence for single editor mode
147
+ */
148
+ updateUserPresence: (userPresence: LiveStateSingleEditorExternalUserPresence) => void;
149
+
145
150
  /**
146
151
  * Subscribe to live state events
147
152
  */
@@ -285,6 +290,11 @@ export declare class LiveStateSyncElement {
285
290
  */
286
291
  private _onServerConnectionStateChange;
287
292
 
293
+ /**
294
+ * To update user presence for single editor mode
295
+ */
296
+ private _updateUserPresence;
297
+
288
298
  /**
289
299
  * Subscribe to live state events
290
300
  */
@@ -367,6 +367,7 @@ export declare class Constants {
367
367
  VELT_USER_FORCE_RE_LOGGED_IN: string;
368
368
  VELT_VERSION: string;
369
369
  VELT_ADVANCED_QUERIES: string;
370
+ VELT_COMMENT_VIEWS_MIGRATED: string;
370
371
  };
371
372
  static NON_NESTABLE_ELEMENTS: {
372
373
  [tag: string]: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "4.5.1",
3
+ "version": "4.5.2-beta.11",
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": [