@veltdev/react 2.0.26 → 2.0.28

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 CHANGED
@@ -121,7 +121,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
121
121
  script.src = "".concat(proxyDomain, "/lib/sdk@").concat(version, "/velt.js");
122
122
  }
123
123
  else {
124
- script.src = "https://cdn.jsdelivr.net/npm/@veltdev/sdk@".concat(version, "/velt.js");
124
+ script.src = "https://cdn.velt.dev/lib/sdk@".concat(version, "/velt.js");
125
125
  }
126
126
  }
127
127
  script.id = 'veltScript';
@@ -140,7 +140,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
140
140
  }
141
141
  };
142
142
 
143
- var VELT_SDK_VERSION = '2.0.26';
143
+ var VELT_SDK_VERSION = '2.0.28';
144
144
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
145
145
  var VELT_TAB_ID = 'veltTabId';
146
146
 
@@ -1904,6 +1904,11 @@ var VeltCommentDialogThreadCardTime = function (props) {
1904
1904
  return (React__default["default"].createElement("velt-comment-dialog-thread-card-time-wireframe", __assign({}, remainingProp), children));
1905
1905
  };
1906
1906
 
1907
+ var VeltCommentDialogThreadCardUnread = function (props) {
1908
+ var children = props.children, remainingProp = __rest(props, ["children"]);
1909
+ return (React__default["default"].createElement("velt-comment-dialog-thread-card-unread-wireframe", __assign({}, remainingProp), children));
1910
+ };
1911
+
1907
1912
  // Main Thread Card component
1908
1913
  var VeltCommentDialogThreadCard = function (props) {
1909
1914
  var children = props.children, remainingProp = __rest(props, ["children"]);
@@ -1920,6 +1925,7 @@ VeltCommentDialogThreadCard.Reactions = VeltCommentDialogThreadCardReactions;
1920
1925
  VeltCommentDialogThreadCard.ReactionTool = VeltCommentDialogThreadCardReactionTool;
1921
1926
  VeltCommentDialogThreadCard.Recordings = VeltCommentDialogThreadCardRecordings;
1922
1927
  VeltCommentDialogThreadCard.Time = VeltCommentDialogThreadCardTime;
1928
+ VeltCommentDialogThreadCard.Unread = VeltCommentDialogThreadCardUnread;
1923
1929
 
1924
1930
  var VeltCommentDialogThreads = function (props) {
1925
1931
  var children = props.children, remainingProp = __rest(props, ["children"]);
@@ -2932,6 +2938,12 @@ function useIdentify(user, userOptions) {
2932
2938
  client && client.identify(user, userOptions);
2933
2939
  }, [client]);
2934
2940
  }
2941
+ function useSetDocument(documentId, documentMetadata) {
2942
+ var client = useVeltClient().client;
2943
+ React__default["default"].useEffect(function () {
2944
+ client && client.setDocument(documentId, documentMetadata);
2945
+ }, [client]);
2946
+ }
2935
2947
  function useSetDocumentId(documentId) {
2936
2948
  var client = useVeltClient().client;
2937
2949
  React__default["default"].useEffect(function () {
@@ -2979,7 +2991,7 @@ function useCommentUtils() {
2979
2991
  }
2980
2992
  function useCommentAnnotations(documentId, location) {
2981
2993
  var commentElement = useCommentUtils();
2982
- var _a = React__default["default"].useState([]), data = _a[0], setData = _a[1];
2994
+ var _a = React__default["default"].useState(undefined), data = _a[0], setData = _a[1];
2983
2995
  React.useEffect(function () {
2984
2996
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getAllCommentAnnotations))
2985
2997
  return;
@@ -3775,6 +3787,7 @@ exports.usePresenceUtils = usePresenceUtils;
3775
3787
  exports.useRecorderAddHandler = useRecorderAddHandler;
3776
3788
  exports.useRecorderUtils = useRecorderUtils;
3777
3789
  exports.useServerConnectionStateChangeHandler = useServerConnectionStateChangeHandler;
3790
+ exports.useSetDocument = useSetDocument;
3778
3791
  exports.useSetDocumentId = useSetDocumentId;
3779
3792
  exports.useSetLiveStateData = useSetLiveStateData;
3780
3793
  exports.useSetLocation = useSetLocation;