@veltdev/react 1.0.67 → 1.0.69

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,8 +1,9 @@
1
+ import { CursorElement, CursorUser } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function useCursorUtils(): any | undefined;
5
+ export declare function useCursorUtils(): CursorElement | undefined;
5
6
  /**
6
7
  * @beta This hook is in beta
7
8
  */
8
- export declare function useCursorUsers(): any;
9
+ export declare function useCursorUsers(): CursorUser[] | null;
@@ -1,7 +1,8 @@
1
+ import { LiveStateSyncElement, User, UserEditorAccess } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function useLiveStateSyncUtils(): any | undefined;
5
+ export declare function useLiveStateSyncUtils(): LiveStateSyncElement | undefined;
5
6
  /**
6
7
  * @beta This hook is in beta
7
8
  */
@@ -13,12 +14,15 @@ export declare function useSetLiveStateData(liveStateDataId: string, liveStateDa
13
14
  /**
14
15
  * @beta This hook is in beta
15
16
  */
16
- export declare function useUserEditorState(): any;
17
+ export declare function useUserEditorState(): UserEditorAccess | null;
17
18
  /**
18
19
  * @beta This hook is in beta
19
20
  */
20
- export declare function useEditor(): any;
21
+ export declare function useEditor(): User | null;
21
22
  /**
22
23
  * @beta This hook is in beta
23
24
  */
24
- export declare function useEditorAccessRequestHandler(): any;
25
+ export declare function useEditorAccessRequestHandler(): {
26
+ requestStatus: string;
27
+ requestedBy: User;
28
+ } | null;
@@ -1,8 +1,9 @@
1
+ import { PresenceElement, PresenceUser } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function usePresenceUtils(): any | undefined;
5
+ export declare function usePresenceUtils(): PresenceElement | undefined;
5
6
  /**
6
7
  * @beta This hook is in beta
7
8
  */
8
- export declare function usePresenceUsers(): any;
9
+ export declare function usePresenceUsers(): PresenceUser[] | null;
@@ -1,7 +1,8 @@
1
+ import { RecorderElement } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function useRecorderUtils(): any | undefined;
5
+ export declare function useRecorderUtils(): RecorderElement | undefined;
5
6
  /**
6
7
  * @beta This hook is in beta
7
8
  */
@@ -1,4 +1,5 @@
1
+ import { RewriterElement } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function useAIRewriterUtils(): any | undefined;
5
+ export declare function useAIRewriterUtils(): RewriterElement | undefined;
@@ -1,4 +1,5 @@
1
+ import { SelectionElement } from "@veltdev/types";
1
2
  /**
2
3
  * @beta This hook is in beta
3
4
  */
4
- export declare function useLiveSelectionUtils(): any | undefined;
5
+ export declare function useLiveSelectionUtils(): SelectionElement | undefined;
@@ -1,9 +1,9 @@
1
- import { Location } from "@veltdev/types";
1
+ import { Location, TagAnnotation, TagElement } from "@veltdev/types";
2
2
  /**
3
3
  * @beta This hook is in beta
4
4
  */
5
- export declare function useTagUtils(): any | undefined;
5
+ export declare function useTagUtils(): TagElement | undefined;
6
6
  /**
7
7
  * @beta This hook is in beta
8
8
  */
9
- export declare function useTagAnnotations(documentId?: string, location?: Location): any;
9
+ export declare function useTagAnnotations(documentId?: string, location?: Location): TagAnnotation[] | null;
package/esm/index.js CHANGED
@@ -86,7 +86,7 @@ var loadVelt = function (callback, version, staging) {
86
86
  }
87
87
  };
88
88
 
89
- var VELT_SDK_VERSION = '1.0.82';
89
+ var VELT_SDK_VERSION = '1.0.85';
90
90
 
91
91
  var SnippylyProvider = function (props) {
92
92
  var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, onClientLoad = props.onClientLoad, children = props.children;
@@ -585,7 +585,7 @@ function useCursorUtils() {
585
585
  */
586
586
  function useCursorUsers() {
587
587
  var cursorElement = useCursorUtils();
588
- var _a = React.useState(), data = _a[0], setData = _a[1];
588
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
589
589
  useEffect(function () {
590
590
  if (!cursorElement)
591
591
  return;
@@ -662,7 +662,7 @@ function useSetLiveStateData(liveStateDataId, liveStateData) {
662
662
  */
663
663
  function useUserEditorState() {
664
664
  var liveStateSyncElement = useLiveStateSyncUtils();
665
- var _a = React.useState(), data = _a[0], setData = _a[1];
665
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
666
666
  useEffect(function () {
667
667
  if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.isUserEditor))
668
668
  return;
@@ -680,7 +680,7 @@ function useUserEditorState() {
680
680
  */
681
681
  function useEditor() {
682
682
  var liveStateSyncElement = useLiveStateSyncUtils();
683
- var _a = React.useState(), data = _a[0], setData = _a[1];
683
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
684
684
  useEffect(function () {
685
685
  if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getEditor))
686
686
  return;
@@ -698,7 +698,7 @@ function useEditor() {
698
698
  */
699
699
  function useEditorAccessRequestHandler() {
700
700
  var liveStateSyncElement = useLiveStateSyncUtils();
701
- var _a = React.useState(), data = _a[0], setData = _a[1];
701
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
702
702
  useEffect(function () {
703
703
  if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.isEditorAccessRequested))
704
704
  return;
@@ -731,7 +731,7 @@ function usePresenceUtils() {
731
731
  */
732
732
  function usePresenceUsers() {
733
733
  var presenceElement = usePresenceUtils();
734
- var _a = React.useState(), data = _a[0], setData = _a[1];
734
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
735
735
  useEffect(function () {
736
736
  if (!presenceElement)
737
737
  return;
@@ -827,7 +827,7 @@ function useTagUtils() {
827
827
  */
828
828
  function useTagAnnotations(documentId, location) {
829
829
  var tagElement = useTagUtils();
830
- var _a = React.useState(), data = _a[0], setData = _a[1];
830
+ var _a = React.useState(null), data = _a[0], setData = _a[1];
831
831
  useEffect(function () {
832
832
  if (!tagElement)
833
833
  return;