@veltdev/react 4.5.0-beta.18 → 4.5.0-beta.19
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 +60 -8
- package/cjs/index.js.map +1 -1
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/Client.d.ts +10 -1
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +58 -9
- package/esm/index.js.map +1 -1
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/Client.d.ts +10 -1
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +11 -2
- package/package.json +1 -1
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VELT_SDK_VERSION = "4.5.0-beta.
|
|
2
|
+
export declare const VELT_SDK_VERSION = "4.5.0-beta.19";
|
|
3
3
|
export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
|
|
4
4
|
export declare const VELT_TAB_ID = "veltTabId";
|
|
5
5
|
export declare const INTEGRITY_MAP: Record<string, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Location, User, Options, DocumentMetadata, Document, SetDocumentsRequestOptions } from "@veltdev/types";
|
|
1
|
+
import { Location, User, Options, DocumentMetadata, Document, SetDocumentsRequestOptions, SetLocationsRequestOptions } from "@veltdev/types";
|
|
2
2
|
export declare function useClient(): any;
|
|
3
3
|
export declare function useIdentify(user: User, userOptions?: Options): void;
|
|
4
4
|
export declare function useSetDocument(documentId: string, documentMetadata?: DocumentMetadata): void;
|
|
@@ -6,7 +6,16 @@ export declare function useSetDocumentId(documentId: string): void;
|
|
|
6
6
|
export declare function useSetDocuments(): {
|
|
7
7
|
setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
|
|
8
8
|
};
|
|
9
|
+
export declare function useSetRootDocument(): {
|
|
10
|
+
setRootDocument: (document: Document) => void;
|
|
11
|
+
};
|
|
9
12
|
export declare function useUnsetDocumentId(): void;
|
|
10
13
|
export declare function useUnsetDocuments(): void;
|
|
11
14
|
export declare function useSetLocation(location: Location, appendLocation?: boolean): void;
|
|
15
|
+
export declare function useSetLocations(): {
|
|
16
|
+
setLocations: (locations: Location[], options?: SetLocationsRequestOptions) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function useSetRootLocation(): {
|
|
19
|
+
setRootLocation: (location: Location) => void;
|
|
20
|
+
};
|
|
12
21
|
export declare function useVeltInitState(): boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useSetLocation, useSetDocument, useSetDocumentId, useSetDocuments, useUnsetDocumentId, useUnsetDocuments, useIdentify, useClient, useVeltInitState, } from './Client';
|
|
1
|
+
export { useSetLocation, useSetDocument, useSetDocumentId, useSetDocuments, useSetRootDocument, useSetLocations, useSetRootLocation, useUnsetDocumentId, useUnsetDocuments, useIdentify, useClient, useVeltInitState, } from './Client';
|
|
2
2
|
export { useCommentUtils, useCommentAnnotations, useCommentAddHandler, useCommentModeState, useCommentUpdateHandler, useCommentDialogSidebarClickHandler, useCommentSelectionChangeHandler, useUnreadCommentCountByAnnotationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountOnCurrentDocument, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentCountByLocationId, useCommentCopyLinkHandler, useCommentAnnotationById, useCommentSidebarActionButtonClick, useCommentSidebarInit, useCommentSidebarData, } from './CommentElement';
|
|
3
3
|
export { useAddAttachment, useDeleteAttachment, useGetAttachment, useDeleteRecording, useGetRecording, useAddReaction, useDeleteReaction, useToggleReaction, useAddComment, useUpdateComment, useDeleteComment, useAddCommentAnnotation, useDeleteCommentAnnotation, useApproveCommentAnnotation, useSubscribeCommentAnnotation, useUnsubscribeCommentAnnotation, useAssignUser, useCopyLink, useGetComment, useGetLink, useRejectCommentAnnotation, useResolveCommentAnnotation, useUpdateAccess, useUpdatePriority, useUpdateStatus, useCommentActionCallback, useCommentEventCallback, useGetCommentAnnotations, useCommentAnnotationsCount, } from './CommentActions';
|
|
4
4
|
export { useVeltEventCallback } from './CoreActions';
|
package/esm/index.js
CHANGED
|
@@ -136,13 +136,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var VELT_SDK_VERSION = '4.5.0-beta.
|
|
139
|
+
var VELT_SDK_VERSION = '4.5.0-beta.19';
|
|
140
140
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
141
141
|
var VELT_TAB_ID = 'veltTabId';
|
|
142
142
|
// integrity map for the Velt SDK
|
|
143
143
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
144
144
|
var INTEGRITY_MAP = {
|
|
145
|
-
'4.5.0-beta.
|
|
145
|
+
'4.5.0-beta.19': 'sha384-4cBwejg47Xi4Abp4w1UbJFsRB4U3qD9k4MXj7WHVNFl+9zG/EGQJw07I00JkGORv',
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
var SnippylyProvider = function (props) {
|
|
@@ -5599,15 +5599,15 @@ function useSetDocuments() {
|
|
|
5599
5599
|
var client = useVeltClient().client;
|
|
5600
5600
|
var _a = React.useState(undefined), data = _a[0], setData = _a[1];
|
|
5601
5601
|
// Memoize the setDocuments call
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
}, [JSON.stringify(data
|
|
5602
|
+
// const memoizedData = React.useMemo(() => {
|
|
5603
|
+
// return data;
|
|
5604
|
+
// }, [JSON.stringify(data?.documents), JSON.stringify(data?.options)]);
|
|
5605
5605
|
React.useEffect(function () {
|
|
5606
5606
|
var _a;
|
|
5607
|
-
if (client && ((_a =
|
|
5608
|
-
client.setDocuments(
|
|
5607
|
+
if ((client === null || client === void 0 ? void 0 : client.setDocuments) && ((_a = data === null || data === void 0 ? void 0 : data.documents) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
5608
|
+
client.setDocuments(data.documents, data.options);
|
|
5609
5609
|
}
|
|
5610
|
-
}, [client === null || client === void 0 ? void 0 : client.setDocuments,
|
|
5610
|
+
}, [client === null || client === void 0 ? void 0 : client.setDocuments, data]);
|
|
5611
5611
|
// Memoize the setDocuments callback
|
|
5612
5612
|
var setDocumentsCallback = React.useCallback(function (documents, options) {
|
|
5613
5613
|
setData({ documents: documents, options: options });
|
|
@@ -5616,6 +5616,22 @@ function useSetDocuments() {
|
|
|
5616
5616
|
setDocuments: setDocumentsCallback
|
|
5617
5617
|
};
|
|
5618
5618
|
}
|
|
5619
|
+
function useSetRootDocument() {
|
|
5620
|
+
var client = useVeltClient().client;
|
|
5621
|
+
var _a = React.useState(undefined), data = _a[0], setData = _a[1];
|
|
5622
|
+
React.useEffect(function () {
|
|
5623
|
+
if ((client === null || client === void 0 ? void 0 : client.setRootDocument) && data) {
|
|
5624
|
+
client.setRootDocument(data);
|
|
5625
|
+
}
|
|
5626
|
+
}, [client === null || client === void 0 ? void 0 : client.setRootDocument, data]);
|
|
5627
|
+
// Memoize the setRootDocument callback
|
|
5628
|
+
var setRootDocumentCallback = React.useCallback(function (document) {
|
|
5629
|
+
setData(document);
|
|
5630
|
+
}, []); // Empty dependency array since it only uses setState which is stable
|
|
5631
|
+
return {
|
|
5632
|
+
setRootDocument: setRootDocumentCallback
|
|
5633
|
+
};
|
|
5634
|
+
}
|
|
5619
5635
|
function useUnsetDocumentId() {
|
|
5620
5636
|
var client = useVeltClient().client;
|
|
5621
5637
|
React.useEffect(function () {
|
|
@@ -5640,6 +5656,39 @@ function useSetLocation(location, appendLocation) {
|
|
|
5640
5656
|
}
|
|
5641
5657
|
}, [client, shouldSetLocation]);
|
|
5642
5658
|
}
|
|
5659
|
+
function useSetLocations() {
|
|
5660
|
+
var client = useVeltClient().client;
|
|
5661
|
+
var _a = React.useState(undefined), data = _a[0], setData = _a[1];
|
|
5662
|
+
React.useEffect(function () {
|
|
5663
|
+
var _a;
|
|
5664
|
+
if ((client === null || client === void 0 ? void 0 : client.setLocations) && ((_a = data === null || data === void 0 ? void 0 : data.locations) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
5665
|
+
client.setLocations(data.locations, data.options);
|
|
5666
|
+
}
|
|
5667
|
+
}, [client === null || client === void 0 ? void 0 : client.setLocations, data]);
|
|
5668
|
+
// Memoize the setLocations callback
|
|
5669
|
+
var setLocationsCallback = React.useCallback(function (locations, options) {
|
|
5670
|
+
setData({ locations: locations, options: options });
|
|
5671
|
+
}, []); // Empty dependency array since it only uses setState which is stable
|
|
5672
|
+
return {
|
|
5673
|
+
setLocations: setLocationsCallback
|
|
5674
|
+
};
|
|
5675
|
+
}
|
|
5676
|
+
function useSetRootLocation() {
|
|
5677
|
+
var client = useVeltClient().client;
|
|
5678
|
+
var _a = React.useState(undefined), data = _a[0], setData = _a[1];
|
|
5679
|
+
React.useEffect(function () {
|
|
5680
|
+
if ((client === null || client === void 0 ? void 0 : client.setRootLocation) && data) {
|
|
5681
|
+
client.setRootLocation(data);
|
|
5682
|
+
}
|
|
5683
|
+
}, [client === null || client === void 0 ? void 0 : client.setRootLocation, data]);
|
|
5684
|
+
// Memoize the setRootLocation callback
|
|
5685
|
+
var setRootLocationCallback = React.useCallback(function (location) {
|
|
5686
|
+
setData(location);
|
|
5687
|
+
}, []); // Empty dependency array since it only uses setState which is stable
|
|
5688
|
+
return {
|
|
5689
|
+
setRootLocation: setRootLocationCallback
|
|
5690
|
+
};
|
|
5691
|
+
}
|
|
5643
5692
|
function useVeltInitState() {
|
|
5644
5693
|
var client = useVeltClient().client;
|
|
5645
5694
|
var _a = React.useState(), data = _a[0], setData = _a[1];
|
|
@@ -7313,5 +7362,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
7313
7362
|
}
|
|
7314
7363
|
};
|
|
7315
7364
|
|
|
7316
|
-
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteGroupOptionWireframe, VeltAutocompleteOptionWireframe, VeltButtonWireframe, VeltCanvasComment, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentComposer, VeltCommentComposerWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPin, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentText, VeltCommentThread, VeltCommentThreadWireframe, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, VeltCommentsMinimap, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarButton, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, VeltConfirmDialogWireframe, SnippylyCursor as VeltCursor, VeltData, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltIf, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltInlineReactionsSection, VeltInlineReactionsSectionWireframe, VeltMediaSourceSettingsWireframe, VeltMultiThreadCommentDialogWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsPanelWireframe, VeltNotificationsTool, VeltNotificationsToolWireframe, VeltPersistentCommentModeWireframe, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionTool, VeltReactionToolWireframe, VeltReactionsPanelWireframe, VeltRecorderAllToolMenuWireframe, VeltRecorderAllToolWireframe, VeltRecorderAudioToolWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, VeltRecorderControlPanelWireframe, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, VeltRecorderPlayerExpandedWireframe, VeltRecorderPlayerWireframe, VeltRecorderScreenToolWireframe, SnippylyRecorderTool as VeltRecorderTool, VeltRecorderVideoToolWireframe, VeltRecordingPreviewStepsDialogWireframe, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, VeltSingleEditorModePanel, VeltSingleEditorModePanelWireframe, VeltSubtitlesWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, VeltTranscriptionWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoEditorPlayerWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAddAttachment, useAddComment, useAddCommentAnnotation, useAddReaction, useApproveCommentAnnotation, useAssignUser, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentActionCallback, useCommentAddHandler, useCommentAnnotationById, useCommentAnnotations, useCommentAnnotationsCount, useCommentCopyLinkHandler, useCommentDialogSidebarClickHandler, useCommentEventCallback, useCommentModeState, useCommentSelectionChangeHandler, useCommentSidebarActionButtonClick, useCommentSidebarData, useCommentSidebarInit, useCommentUpdateHandler, useCommentUtils, useContactList, useContactSelected, useContactUtils, useCopyLink, useCursorUsers, useCursorUtils, useDeleteAttachment, useDeleteComment, useDeleteCommentAnnotation, useDeleteReaction, useDeleteRecording, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useGetAttachment, useGetComment, useGetCommentAnnotations, useGetLink, useGetRecording, useHuddleUtils, useIdentify, useLiveSelectionDataHandler, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncEventCallback, useLiveStateSyncUtils, useNotificationEventCallback, useNotificationUtils, useNotificationsData, usePresenceData, usePresenceEventCallback, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderEventCallback, useRecorderUtils, useRecordingDataByRecorderId, useRecordings, useRejectCommentAnnotation, useResolveCommentAnnotation, useServerConnectionStateChangeHandler, useSetDocument, useSetDocumentId, useSetDocuments, useSetLiveStateData, useSetLocation, useSubscribeCommentAnnotation, useTagAnnotations, useTagUtils, useToggleReaction, useUniqueViewsByDate, useUniqueViewsByUser, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountByAnnotationId, useUnreadCommentCountByLocationId, useUnreadCommentCountOnCurrentDocument, useUnreadNotificationsCount, useUnsetDocumentId, useUnsetDocuments, useUnsubscribeCommentAnnotation, useUpdateAccess, useUpdateComment, useUpdatePriority, useUpdateStatus, useUserEditorState, useVeltClient, useVeltEventCallback, useVeltInitState, useViewsUtils };
|
|
7365
|
+
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteGroupOptionWireframe, VeltAutocompleteOptionWireframe, VeltButtonWireframe, VeltCanvasComment, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentComposer, VeltCommentComposerWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPin, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentText, VeltCommentThread, VeltCommentThreadWireframe, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, VeltCommentsMinimap, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarButton, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, VeltConfirmDialogWireframe, SnippylyCursor as VeltCursor, VeltData, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltIf, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltInlineReactionsSection, VeltInlineReactionsSectionWireframe, VeltMediaSourceSettingsWireframe, VeltMultiThreadCommentDialogWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsPanelWireframe, VeltNotificationsTool, VeltNotificationsToolWireframe, VeltPersistentCommentModeWireframe, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionTool, VeltReactionToolWireframe, VeltReactionsPanelWireframe, VeltRecorderAllToolMenuWireframe, VeltRecorderAllToolWireframe, VeltRecorderAudioToolWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, VeltRecorderControlPanelWireframe, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, VeltRecorderPlayerExpandedWireframe, VeltRecorderPlayerWireframe, VeltRecorderScreenToolWireframe, SnippylyRecorderTool as VeltRecorderTool, VeltRecorderVideoToolWireframe, VeltRecordingPreviewStepsDialogWireframe, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, VeltSingleEditorModePanel, VeltSingleEditorModePanelWireframe, VeltSubtitlesWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, VeltTranscriptionWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoEditorPlayerWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAddAttachment, useAddComment, useAddCommentAnnotation, useAddReaction, useApproveCommentAnnotation, useAssignUser, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentActionCallback, useCommentAddHandler, useCommentAnnotationById, useCommentAnnotations, useCommentAnnotationsCount, useCommentCopyLinkHandler, useCommentDialogSidebarClickHandler, useCommentEventCallback, useCommentModeState, useCommentSelectionChangeHandler, useCommentSidebarActionButtonClick, useCommentSidebarData, useCommentSidebarInit, useCommentUpdateHandler, useCommentUtils, useContactList, useContactSelected, useContactUtils, useCopyLink, useCursorUsers, useCursorUtils, useDeleteAttachment, useDeleteComment, useDeleteCommentAnnotation, useDeleteReaction, useDeleteRecording, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useGetAttachment, useGetComment, useGetCommentAnnotations, useGetLink, useGetRecording, useHuddleUtils, useIdentify, useLiveSelectionDataHandler, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncEventCallback, useLiveStateSyncUtils, useNotificationEventCallback, useNotificationUtils, useNotificationsData, usePresenceData, usePresenceEventCallback, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderEventCallback, useRecorderUtils, useRecordingDataByRecorderId, useRecordings, useRejectCommentAnnotation, useResolveCommentAnnotation, useServerConnectionStateChangeHandler, useSetDocument, useSetDocumentId, useSetDocuments, useSetLiveStateData, useSetLocation, useSetLocations, useSetRootDocument, useSetRootLocation, useSubscribeCommentAnnotation, useTagAnnotations, useTagUtils, useToggleReaction, useUniqueViewsByDate, useUniqueViewsByUser, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountByAnnotationId, useUnreadCommentCountByLocationId, useUnreadCommentCountOnCurrentDocument, useUnreadNotificationsCount, useUnsetDocumentId, useUnsetDocuments, useUnsubscribeCommentAnnotation, useUpdateAccess, useUpdateComment, useUpdatePriority, useUpdateStatus, useUserEditorState, useVeltClient, useVeltEventCallback, useVeltInitState, useViewsUtils };
|
|
7317
7366
|
//# sourceMappingURL=index.js.map
|