@veltdev/react 4.5.2-beta.7 → 4.5.2-beta.9
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 +35 -2
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogComposer/VeltCommentDialogComposerInput/VeltCommentDialogComposerInput.d.ts +2 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCard.d.ts +2 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCardEdited/VeltCommentDialogThreadCardEdited.d.ts +8 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCardEdited/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/Client.d.ts +4 -0
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +35 -3
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogComposer/VeltCommentDialogComposerInput/VeltCommentDialogComposerInput.d.ts +2 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCard.d.ts +2 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCardEdited/VeltCommentDialogThreadCardEdited.d.ts +8 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogThreadCard/VeltCommentDialogThreadCardEdited/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/Client.d.ts +4 -0
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +13 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -144,13 +144,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
var VELT_SDK_VERSION = '4.5.2-beta.
|
|
147
|
+
var VELT_SDK_VERSION = '4.5.2-beta.9';
|
|
148
148
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
149
149
|
var VELT_TAB_ID = 'veltTabId';
|
|
150
150
|
// integrity map for the Velt SDK
|
|
151
151
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
152
152
|
var INTEGRITY_MAP = {
|
|
153
|
-
'4.5.2-beta.
|
|
153
|
+
'4.5.2-beta.9': 'sha384-eHsLGDuFiMGK/FfVwxdX/UnQWBK20Us02ibLEJdbYykNKSl22TDEqfuRvSO+r1Lj',
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
var SnippylyProvider = function (props) {
|
|
@@ -2307,6 +2307,12 @@ var VeltCommentDialogThreadCardSeenDropdown = function (props) {
|
|
|
2307
2307
|
VeltCommentDialogThreadCardSeenDropdown.Trigger = VeltCommentDialogThreadCardSeenDropdownTrigger;
|
|
2308
2308
|
VeltCommentDialogThreadCardSeenDropdown.Content = VeltCommentDialogThreadCardSeenDropdownContent;
|
|
2309
2309
|
|
|
2310
|
+
var VeltCommentDialogThreadCardEdited = function (props) {
|
|
2311
|
+
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
2312
|
+
var transformedProps = transformWireframeProps(remainingProps);
|
|
2313
|
+
return (React__default["default"].createElement("velt-comment-dialog-thread-card-edited-wireframe", __assign({}, transformedProps), children));
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2310
2316
|
// Main Thread Card component
|
|
2311
2317
|
var VeltCommentDialogThreadCard = function (props) {
|
|
2312
2318
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
@@ -2327,6 +2333,7 @@ VeltCommentDialogThreadCard.Time = VeltCommentDialogThreadCardTime;
|
|
|
2327
2333
|
VeltCommentDialogThreadCard.Unread = VeltCommentDialogThreadCardUnread;
|
|
2328
2334
|
VeltCommentDialogThreadCard.Draft = VeltCommentDialogThreadCardDraft;
|
|
2329
2335
|
VeltCommentDialogThreadCard.SeenDropdown = VeltCommentDialogThreadCardSeenDropdown;
|
|
2336
|
+
VeltCommentDialogThreadCard.Edited = VeltCommentDialogThreadCardEdited;
|
|
2330
2337
|
|
|
2331
2338
|
var VeltCommentDialogThreads = function (props) {
|
|
2332
2339
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
@@ -6004,6 +6011,31 @@ function useVeltInitState() {
|
|
|
6004
6011
|
}, [client === null || client === void 0 ? void 0 : client.getVeltInitState]);
|
|
6005
6012
|
return data;
|
|
6006
6013
|
}
|
|
6014
|
+
function useUiState() {
|
|
6015
|
+
var client = useVeltClient().client;
|
|
6016
|
+
var _a = React__default["default"].useState(), uiState = _a[0], setUiStateData = _a[1];
|
|
6017
|
+
// Subscribe to UI state changes
|
|
6018
|
+
React__default["default"].useEffect(function () {
|
|
6019
|
+
if (!(client === null || client === void 0 ? void 0 : client.getUiState))
|
|
6020
|
+
return;
|
|
6021
|
+
var subscription = client.getUiState().subscribe(function (data) {
|
|
6022
|
+
setUiStateData(data);
|
|
6023
|
+
});
|
|
6024
|
+
return function () {
|
|
6025
|
+
subscription.unsubscribe();
|
|
6026
|
+
};
|
|
6027
|
+
}, [client === null || client === void 0 ? void 0 : client.getUiState]);
|
|
6028
|
+
// Memoize the setUiState callback to make it stable
|
|
6029
|
+
var setUiState = React__default["default"].useCallback(function (data) {
|
|
6030
|
+
if (client === null || client === void 0 ? void 0 : client.setUiState) {
|
|
6031
|
+
client.setUiState(data);
|
|
6032
|
+
}
|
|
6033
|
+
}, [client === null || client === void 0 ? void 0 : client.setUiState]);
|
|
6034
|
+
return {
|
|
6035
|
+
uiState: uiState,
|
|
6036
|
+
setUiState: setUiState
|
|
6037
|
+
};
|
|
6038
|
+
}
|
|
6007
6039
|
|
|
6008
6040
|
function useCommentUtils() {
|
|
6009
6041
|
var _a = React__default["default"].useState(), commentElement = _a[0], setCommentElement = _a[1];
|
|
@@ -7892,6 +7924,7 @@ exports.useSubscribeCommentAnnotation = useSubscribeCommentAnnotation;
|
|
|
7892
7924
|
exports.useTagAnnotations = useTagAnnotations;
|
|
7893
7925
|
exports.useTagUtils = useTagUtils;
|
|
7894
7926
|
exports.useToggleReaction = useToggleReaction;
|
|
7927
|
+
exports.useUiState = useUiState;
|
|
7895
7928
|
exports.useUniqueViewsByDate = useUniqueViewsByDate;
|
|
7896
7929
|
exports.useUniqueViewsByUser = useUniqueViewsByUser;
|
|
7897
7930
|
exports.useUnreadCommentAnnotationCountByLocationId = useUnreadCommentAnnotationCountByLocationId;
|