@veltdev/react 1.0.98 → 1.0.99
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.
- package/cjs/index.js +20 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/LiveStateSyncElement.d.ts +5 -1
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +20 -2
- package/esm/index.js.map +1 -1
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/LiveStateSyncElement.d.ts +5 -1
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +6 -2
- package/package.json +1 -1
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VELT_SDK_VERSION = "1.0.
|
|
1
|
+
export declare const VELT_SDK_VERSION = "1.0.112";
|
|
2
2
|
export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LiveStateSyncElement, User, UserEditorAccess } from "@veltdev/types";
|
|
1
|
+
import { EditorAccessTimer, LiveStateSyncElement, User, UserEditorAccess } from "@veltdev/types";
|
|
2
2
|
/**
|
|
3
3
|
* @beta This hook is in beta
|
|
4
4
|
*/
|
|
@@ -19,6 +19,10 @@ export declare function useUserEditorState(): UserEditorAccess | null;
|
|
|
19
19
|
* @beta This hook is in beta
|
|
20
20
|
*/
|
|
21
21
|
export declare function useEditor(): User | null;
|
|
22
|
+
/**
|
|
23
|
+
* @beta This hook is in beta
|
|
24
|
+
*/
|
|
25
|
+
export declare function useEditorAccessTimer(): EditorAccessTimer;
|
|
22
26
|
/**
|
|
23
27
|
* @beta This hook is in beta
|
|
24
28
|
*/
|
|
@@ -2,7 +2,7 @@ export { useAddLocation, useSetLocation, useSetDocumentId, useIdentify, useClien
|
|
|
2
2
|
export { useCommentUtils, useCommentAnnotations, useCommentAddHandler, useCommentModeState, useCommentUpdateHandler, useCommentDialogSidebarClickHandler, } from './CommentElement';
|
|
3
3
|
export { useCursorUtils, useCursorUsers, } from './CursorElement';
|
|
4
4
|
export { useHuddleUtils, } from './HuddleElement';
|
|
5
|
-
export { useLiveStateSyncUtils, useLiveStateData, useSetLiveStateData, useUserEditorState, useEditor, useEditorAccessRequestHandler, useLiveState, } from './LiveStateSyncElement';
|
|
5
|
+
export { useLiveStateSyncUtils, useLiveStateData, useSetLiveStateData, useUserEditorState, useEditor, useEditorAccessTimer, useEditorAccessRequestHandler, useLiveState, } from './LiveStateSyncElement';
|
|
6
6
|
export { usePresenceUtils, usePresenceUsers, } from './PresenceElement';
|
|
7
7
|
export { useRecorderUtils, useRecorderAddHandler, } from './RecorderElement';
|
|
8
8
|
export { useAIRewriterUtils, } from './RewriterElement';
|
package/esm/index.js
CHANGED
|
@@ -101,7 +101,7 @@ var loadVelt = function (callback, version, staging, develop) {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
var VELT_SDK_VERSION = '1.0.
|
|
104
|
+
var VELT_SDK_VERSION = '1.0.112';
|
|
105
105
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
106
106
|
|
|
107
107
|
var SnippylyProvider = function (props) {
|
|
@@ -844,6 +844,24 @@ function useEditor() {
|
|
|
844
844
|
}, [liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getEditor]);
|
|
845
845
|
return data;
|
|
846
846
|
}
|
|
847
|
+
/**
|
|
848
|
+
* @beta This hook is in beta
|
|
849
|
+
*/
|
|
850
|
+
function useEditorAccessTimer() {
|
|
851
|
+
var liveStateSyncElement = useLiveStateSyncUtils();
|
|
852
|
+
var _a = React.useState({ state: 'idle' }), data = _a[0], setData = _a[1];
|
|
853
|
+
useEffect(function () {
|
|
854
|
+
if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getEditorAccessTimer))
|
|
855
|
+
return;
|
|
856
|
+
var subscription = liveStateSyncElement.getEditorAccessTimer().subscribe(function (res) {
|
|
857
|
+
setData(res);
|
|
858
|
+
});
|
|
859
|
+
return function () {
|
|
860
|
+
subscription.unsubscribe();
|
|
861
|
+
};
|
|
862
|
+
}, [liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getEditorAccessTimer]);
|
|
863
|
+
return data;
|
|
864
|
+
}
|
|
847
865
|
/**
|
|
848
866
|
* @beta This hook is in beta
|
|
849
867
|
*/
|
|
@@ -1211,5 +1229,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
1211
1229
|
}
|
|
1212
1230
|
};
|
|
1213
1231
|
|
|
1214
|
-
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, SnippylyCommentBubble as VeltCommentBubble, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, SnippylyCursor as VeltCursor, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltVideoPlayer, VeltViewAnalytics, createLiveStateMiddleware, useAIRewriterUtils, useAddLocation, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentUpdateHandler, useCommentUtils, useCursorUsers, useCursorUtils, useEditor, useEditorAccessRequestHandler, useHuddleUtils, useIdentify, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncUtils, useNotificationUtils, useNotificationsData, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderUtils, useSetDocumentId, useSetLiveStateData, useSetLocation, useTagAnnotations, useTagUtils, useUniqueViewsByDate, useUniqueViewsByUser, useUserEditorState, useVeltClient, useViewsUtils };
|
|
1232
|
+
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, SnippylyCommentBubble as VeltCommentBubble, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, SnippylyCursor as VeltCursor, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltVideoPlayer, VeltViewAnalytics, createLiveStateMiddleware, useAIRewriterUtils, useAddLocation, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentUpdateHandler, useCommentUtils, useCursorUsers, useCursorUtils, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useHuddleUtils, useIdentify, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncUtils, useNotificationUtils, useNotificationsData, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderUtils, useSetDocumentId, useSetLiveStateData, useSetLocation, useTagAnnotations, useTagUtils, useUniqueViewsByDate, useUniqueViewsByUser, useUserEditorState, useVeltClient, useViewsUtils };
|
|
1215
1233
|
//# sourceMappingURL=index.js.map
|