@veltdev/react 3.0.82 → 3.0.84

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.
@@ -1,3 +1,3 @@
1
- export declare const VELT_SDK_VERSION = "3.0.82";
1
+ export declare const VELT_SDK_VERSION = "3.0.84";
2
2
  export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
3
3
  export declare const VELT_TAB_ID = "veltTabId";
@@ -1,21 +1,11 @@
1
- import { CommentAnnotation, CommentElement, Location, CommentSelectionChangeData, CommentSidebarCustomActionEventData, CommentAddEventData, CommentUpdateEventData } from "@veltdev/types";
1
+ import { CommentAnnotation, CommentElement, Location, CommentSelectionChangeData, CommentSidebarCustomActionEventData, CommentAddEventData, CommentUpdateEventData, UnreadCommentsCount } from "@veltdev/types";
2
2
  export declare function useCommentUtils(): CommentElement | undefined;
3
3
  export declare function useCommentAnnotations(documentId?: string, location?: Location): CommentAnnotation[] | null | undefined;
4
- export declare function useUnreadCommentCountByAnnotationId(annotationId: string): {
5
- count: number;
6
- } | null;
7
- export declare function useUnreadCommentAnnotationCountOnCurrentDocument(): {
8
- count: number;
9
- } | null;
10
- export declare function useUnreadCommentCountOnCurrentDocument(): {
11
- count: number;
12
- } | null;
13
- export declare function useUnreadCommentCountByLocationId(locationId: string): {
14
- count: number;
15
- } | null;
16
- export declare function useUnreadCommentAnnotationCountByLocationId(locationId: string): {
17
- count: number;
18
- } | null;
4
+ export declare function useUnreadCommentCountByAnnotationId(annotationId: string): UnreadCommentsCount;
5
+ export declare function useUnreadCommentAnnotationCountOnCurrentDocument(): UnreadCommentsCount;
6
+ export declare function useUnreadCommentCountOnCurrentDocument(): UnreadCommentsCount;
7
+ export declare function useUnreadCommentCountByLocationId(locationId: string): UnreadCommentsCount;
8
+ export declare function useUnreadCommentAnnotationCountByLocationId(locationId: string): UnreadCommentsCount;
19
9
  export declare function useCommentModeState(): boolean | undefined;
20
10
  /**
21
11
  * @deprecated Use `useAddCommentAnnotation` event hook instead.
package/esm/index.js CHANGED
@@ -132,7 +132,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
132
132
  }
133
133
  };
134
134
 
135
- var VELT_SDK_VERSION = '3.0.82';
135
+ var VELT_SDK_VERSION = '3.0.84';
136
136
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
137
137
  var VELT_TAB_ID = 'veltTabId';
138
138
 
@@ -4453,7 +4453,7 @@ function useCommentAnnotations(documentId, location) {
4453
4453
  }
4454
4454
  function useUnreadCommentCountByAnnotationId(annotationId) {
4455
4455
  var commentElement = useCommentUtils();
4456
- var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
4456
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
4457
4457
  var subscriptionRef = React.useRef();
4458
4458
  // Memoize the input
4459
4459
  var memoizedAnnotationId = React.useMemo(function () { return annotationId; }, [annotationId]);
@@ -4481,7 +4481,7 @@ function useUnreadCommentCountByAnnotationId(annotationId) {
4481
4481
  }
4482
4482
  function useUnreadCommentAnnotationCountOnCurrentDocument() {
4483
4483
  var commentElement = useCommentUtils();
4484
- var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
4484
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
4485
4485
  useEffect(function () {
4486
4486
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentAnnotationCountOnCurrentDocument))
4487
4487
  return;
@@ -4496,7 +4496,7 @@ function useUnreadCommentAnnotationCountOnCurrentDocument() {
4496
4496
  }
4497
4497
  function useUnreadCommentCountOnCurrentDocument() {
4498
4498
  var commentElement = useCommentUtils();
4499
- var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
4499
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
4500
4500
  useEffect(function () {
4501
4501
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountOnCurrentDocument))
4502
4502
  return;
@@ -4511,7 +4511,7 @@ function useUnreadCommentCountOnCurrentDocument() {
4511
4511
  }
4512
4512
  function useUnreadCommentCountByLocationId(locationId) {
4513
4513
  var commentElement = useCommentUtils();
4514
- var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
4514
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
4515
4515
  var subscriptionRef = React.useRef();
4516
4516
  // Memoize the input
4517
4517
  var memoizedLocationId = React.useMemo(function () { return locationId; }, [locationId]);
@@ -4539,7 +4539,7 @@ function useUnreadCommentCountByLocationId(locationId) {
4539
4539
  }
4540
4540
  function useUnreadCommentAnnotationCountByLocationId(locationId) {
4541
4541
  var commentElement = useCommentUtils();
4542
- var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
4542
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
4543
4543
  var subscriptionRef = React.useRef();
4544
4544
  // Memoize the input
4545
4545
  var memoizedLocationId = React.useMemo(function () { return locationId; }, [locationId]);