@veltdev/react 6.0.8 → 6.0.9-beta.1
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/constants.d.ts +1 -1
- package/cjs/hooks/CommentActions.d.ts +23 -1
- package/cjs/hooks/index.d.ts +1 -1
- package/cjs/index.js +44 -2
- package/cjs/index.js.map +1 -1
- package/esm/constants.d.ts +1 -1
- package/esm/hooks/CommentActions.d.ts +23 -1
- package/esm/hooks/index.d.ts +1 -1
- package/esm/index.js +43 -3
- package/esm/index.js.map +1 -1
- package/index.d.ts +24 -2
- package/package.json +1 -1
package/cjs/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VELT_SDK_VERSION = "6.0.
|
|
2
|
+
export declare const VELT_SDK_VERSION = "6.0.9-beta.1";
|
|
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 { AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationEvent, AddCommentAnnotationRequest, AddCommentEvent, AddCommentRequest, AddReactionEvent, AddReactionRequest, ApproveCommentAnnotationEvent, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, Attachment, CommentEventTypesMap, CommentRequestQuery, CopyLinkEvent, CopyLinkRequest, DeleteAttachmentEvent, DeleteAttachmentRequest, DeleteCommentAnnotationEvent, DeleteCommentAnnotationRequest, DeleteCommentEvent, DeleteCommentRequest, DeleteReactionEvent, DeleteReactionRequest, DeleteRecordingEvent, DeleteRecordingRequest, GetAttachmentRequest, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetCommentRequest, GetLinkRequest, GetLinkResponse, GetRecordingRequest, RecordedData, RejectCommentAnnotationEvent, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationEvent, SubscribeCommentAnnotationRequest, ToggleReactionEvent, ToggleReactionRequest, UnsubscribeCommentAnnotationEvent, UnsubscribeCommentAnnotationRequest, UpdateAccessEvent, UpdateAccessRequest, UpdateCommentEvent, UpdateCommentRequest, UpdatePriorityEvent, UpdatePriorityRequest, UpdateStatusEvent, UpdateStatusRequest } from "@veltdev/types";
|
|
1
|
+
import { AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationEvent, AddCommentAnnotationRequest, AddCommentEvent, AddCommentRequest, AddReactionEvent, AddReactionRequest, ApproveCommentAnnotationEvent, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, Attachment, CommentEventTypesMap, CommentRequestQuery, CopyLinkEvent, CopyLinkRequest, DeleteAttachmentEvent, DeleteAttachmentRequest, DeleteCommentAnnotationEvent, DeleteCommentAnnotationRequest, DeleteCommentEvent, DeleteCommentRequest, DeleteReactionEvent, DeleteReactionRequest, DeleteRecordingEvent, DeleteRecordingRequest, GetAttachmentRequest, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetCommentRequest, GetLinkRequest, GetLinkResponse, GetRecordingRequest, RecordedData, RejectCommentAnnotationEvent, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, AcceptSuggestionRequest, RejectSuggestionRequest, SuggestionAcceptEvent, SuggestionRejectEvent, SubscribeCommentAnnotationEvent, SubscribeCommentAnnotationRequest, ToggleReactionEvent, ToggleReactionRequest, UnsubscribeCommentAnnotationEvent, UnsubscribeCommentAnnotationRequest, UpdateAccessEvent, UpdateAccessRequest, UpdateCommentEvent, UpdateCommentRequest, UpdatePriorityEvent, UpdatePriorityRequest, UpdateStatusEvent, UpdateStatusRequest } from "@veltdev/types";
|
|
2
2
|
export declare function useAddCommentAnnotation(): {
|
|
3
3
|
addCommentAnnotation: (request: AddCommentAnnotationRequest) => Promise<AddCommentAnnotationEvent | null>;
|
|
4
4
|
};
|
|
@@ -8,6 +8,28 @@ export declare function useApproveCommentAnnotation(): {
|
|
|
8
8
|
export declare function useRejectCommentAnnotation(): {
|
|
9
9
|
rejectCommentAnnotation: (request: RejectCommentAnnotationRequest) => Promise<RejectCommentAnnotationEvent | null>;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Accept a `type: 'suggestion'` annotation — the same operation the suggestion
|
|
13
|
+
* card's built-in accept button performs.
|
|
14
|
+
*
|
|
15
|
+
* Distinct from `useAcceptCommentAnnotation`, which is the legacy
|
|
16
|
+
* comments-as-suggestions flow: that writes `annotation.status`, this writes
|
|
17
|
+
* `suggestion.status` AND flips `type` to `'comment'`, which is what retires the
|
|
18
|
+
* suggestion card into a normal thread.
|
|
19
|
+
*
|
|
20
|
+
* Needed because customer-defined action chips REPLACE the built-in
|
|
21
|
+
* accept/reject on that card — without this, a customer who declares their own
|
|
22
|
+
* actions has no way to accept or reject from the browser.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useAcceptSuggestion(): {
|
|
25
|
+
acceptSuggestion: (request: AcceptSuggestionRequest) => Promise<SuggestionAcceptEvent | null>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Reject a `type: 'suggestion'` annotation. See {@link useAcceptSuggestion}.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useRejectSuggestion(): {
|
|
31
|
+
rejectSuggestion: (request: RejectSuggestionRequest) => Promise<SuggestionRejectEvent | null>;
|
|
32
|
+
};
|
|
11
33
|
export declare function useSubscribeCommentAnnotation(): {
|
|
12
34
|
subscribeCommentAnnotation: (request: SubscribeCommentAnnotationRequest) => Promise<SubscribeCommentAnnotationEvent | null>;
|
|
13
35
|
};
|
package/cjs/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSetLocation, useSetDocument, useSetDocumentId, useSetDocuments, useSetRootDocument, useSetPageInfo, useClearPageInfo, useSetLocations, useSetRootLocation, useUnsetDocumentId, useUnsetDocuments, useIdentify, useClient, useVeltInitState, useUiState, useHeartbeat, useCurrentUser, useCurrentUserPermissions, } from './Client';
|
|
2
2
|
export { useCommentUtils, useCommentAnnotations, useCommentAddHandler, useCommentModeState, useCommentUpdateHandler, useCommentDialogSidebarClickHandler, useCommentSelectionChangeHandler, useUnreadCommentCountByAnnotationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountOnCurrentDocument, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentCountByLocationId, useCommentCopyLinkHandler, useCommentAnnotationById, useCommentSidebarActionButtonClick, useCommentSidebarInit, useCommentSidebarData, useSetContextProvider, } from './CommentElement';
|
|
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';
|
|
3
|
+
export { useAddAttachment, useDeleteAttachment, useGetAttachment, useDeleteRecording, useGetRecording, useAddReaction, useDeleteReaction, useToggleReaction, useAddComment, useUpdateComment, useDeleteComment, useAddCommentAnnotation, useDeleteCommentAnnotation, useApproveCommentAnnotation, useSubscribeCommentAnnotation, useUnsubscribeCommentAnnotation, useAssignUser, useCopyLink, useGetComment, useGetLink, useRejectCommentAnnotation, useAcceptSuggestion, useRejectSuggestion, useResolveCommentAnnotation, useUpdateAccess, useUpdatePriority, useUpdateStatus, useCommentActionCallback, useCommentEventCallback, useGetCommentAnnotations, useCommentAnnotationsCount, } from './CommentActions';
|
|
4
4
|
export { useVeltEventCallback } from './CoreActions';
|
|
5
5
|
export { useCursorUtils, useCursorUsers, } from './CursorElement';
|
|
6
6
|
export { useHuddleUtils, } from './HuddleElement';
|
package/cjs/index.js
CHANGED
|
@@ -212,13 +212,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
var VELT_SDK_VERSION = '6.0.
|
|
215
|
+
var VELT_SDK_VERSION = '6.0.9-beta.1';
|
|
216
216
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
217
217
|
var VELT_TAB_ID = 'veltTabId';
|
|
218
218
|
// integrity map for the Velt SDK
|
|
219
219
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
220
220
|
var INTEGRITY_MAP = {
|
|
221
|
-
'6.0.
|
|
221
|
+
'6.0.9-beta.1': 'sha384-2jJV3okF3YonYaKq7A3iGK23zGJkPdCSsadLql1EPaKaKI5FOzI9QoO8w+2FbC2B',
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
var validProps = ['veltIf', 'veltClass', 'className', 'variant'];
|
|
@@ -10892,6 +10892,46 @@ function useRejectCommentAnnotation() {
|
|
|
10892
10892
|
}
|
|
10893
10893
|
};
|
|
10894
10894
|
}
|
|
10895
|
+
/**
|
|
10896
|
+
* Accept a `type: 'suggestion'` annotation — the same operation the suggestion
|
|
10897
|
+
* card's built-in accept button performs.
|
|
10898
|
+
*
|
|
10899
|
+
* Distinct from `useAcceptCommentAnnotation`, which is the legacy
|
|
10900
|
+
* comments-as-suggestions flow: that writes `annotation.status`, this writes
|
|
10901
|
+
* `suggestion.status` AND flips `type` to `'comment'`, which is what retires the
|
|
10902
|
+
* suggestion card into a normal thread.
|
|
10903
|
+
*
|
|
10904
|
+
* Needed because customer-defined action chips REPLACE the built-in
|
|
10905
|
+
* accept/reject on that card — without this, a customer who declares their own
|
|
10906
|
+
* actions has no way to accept or reject from the browser.
|
|
10907
|
+
*/
|
|
10908
|
+
function useAcceptSuggestion() {
|
|
10909
|
+
var commentElement = useCommentUtils();
|
|
10910
|
+
return {
|
|
10911
|
+
acceptSuggestion: function (request) {
|
|
10912
|
+
return new Promise(function (resolve, reject) {
|
|
10913
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.acceptSuggestion))
|
|
10914
|
+
return reject(new Error('Velt SDK is not initialized.'));
|
|
10915
|
+
commentElement.acceptSuggestion(request).then(resolve).catch(reject);
|
|
10916
|
+
});
|
|
10917
|
+
}
|
|
10918
|
+
};
|
|
10919
|
+
}
|
|
10920
|
+
/**
|
|
10921
|
+
* Reject a `type: 'suggestion'` annotation. See {@link useAcceptSuggestion}.
|
|
10922
|
+
*/
|
|
10923
|
+
function useRejectSuggestion() {
|
|
10924
|
+
var commentElement = useCommentUtils();
|
|
10925
|
+
return {
|
|
10926
|
+
rejectSuggestion: function (request) {
|
|
10927
|
+
return new Promise(function (resolve, reject) {
|
|
10928
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.rejectSuggestion))
|
|
10929
|
+
return reject(new Error('Velt SDK is not initialized.'));
|
|
10930
|
+
commentElement.rejectSuggestion(request).then(resolve).catch(reject);
|
|
10931
|
+
});
|
|
10932
|
+
}
|
|
10933
|
+
};
|
|
10934
|
+
}
|
|
10895
10935
|
function useSubscribeCommentAnnotation() {
|
|
10896
10936
|
var commentElement = useCommentUtils();
|
|
10897
10937
|
return {
|
|
@@ -13092,6 +13132,7 @@ exports.VeltViewAnalytics = VeltViewAnalytics;
|
|
|
13092
13132
|
exports.VeltWireframe = VeltWireframe;
|
|
13093
13133
|
exports.createLiveStateMiddleware = createLiveStateMiddleware;
|
|
13094
13134
|
exports.useAIRewriterUtils = useAIRewriterUtils;
|
|
13135
|
+
exports.useAcceptSuggestion = useAcceptSuggestion;
|
|
13095
13136
|
exports.useActivityUtils = useActivityUtils;
|
|
13096
13137
|
exports.useAddAttachment = useAddAttachment;
|
|
13097
13138
|
exports.useAddComment = useAddComment;
|
|
@@ -13170,6 +13211,7 @@ exports.useRecordingDataByRecorderId = useRecordingDataByRecorderId;
|
|
|
13170
13211
|
exports.useRecordings = useRecordings;
|
|
13171
13212
|
exports.useRegisterTarget = useRegisterTarget;
|
|
13172
13213
|
exports.useRejectCommentAnnotation = useRejectCommentAnnotation;
|
|
13214
|
+
exports.useRejectSuggestion = useRejectSuggestion;
|
|
13173
13215
|
exports.useResolveCommentAnnotation = useResolveCommentAnnotation;
|
|
13174
13216
|
exports.useServerConnectionStateChangeHandler = useServerConnectionStateChangeHandler;
|
|
13175
13217
|
exports.useSetContextProvider = useSetContextProvider;
|