@veltdev/react 1.0.136 → 1.0.138

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.
@@ -40,6 +40,7 @@ export { default as VeltTextCommentToolbarWireframe } from "./VeltTextCommentToo
40
40
  export { default as VeltUserSelectorDropdownWireframe } from "./VeltUserSelectorDropdownWireframe";
41
41
  export { default as VeltAutocompleteOptionWireframe } from "./VeltAutocompleteOptionWireframe";
42
42
  export { default as VeltAutocompleteChipTooltipWireframe } from "./VeltAutocompleteChipTooltipWireframe";
43
+ export { default as VeltCommentBubbleWireframe } from "./VeltCommentBubble";
43
44
  export { default as VeltCommentBubbleAvatar } from "./VeltCommentBubble/VeltCommentBubbleAvatar";
44
45
  export { default as VeltCommentBubbleCommentsCount } from "./VeltCommentBubble/VeltCommentBubbleCommentsCount";
45
46
  export { default as VeltCommentDialogStatusDropdownContent } from "./VeltCommentDialogStatusDropdownContentWireframe/VeltCommentDialogStatusDropdownContentWireframe";
@@ -1,2 +1,2 @@
1
- export declare const VELT_SDK_VERSION = "1.0.153";
1
+ export declare const VELT_SDK_VERSION = "1.0.156";
2
2
  export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
@@ -1,6 +1,6 @@
1
1
  import { EditorAccessTimer, LiveStateSyncElement, User, UserEditorAccess } from "@veltdev/types";
2
2
  export declare function useLiveStateSyncUtils(): LiveStateSyncElement | undefined;
3
- export declare function useLiveStateData(liveStateDataId?: string): any;
3
+ export declare function useLiveStateData(liveStateDataId?: string, listenToNewChangesOnly?: boolean): any;
4
4
  export declare function useSetLiveStateData(liveStateDataId: string, liveStateData: any): any;
5
5
  export declare function useUserEditorState(): UserEditorAccess | null;
6
6
  export declare function useEditor(): User | null;
@@ -12,4 +12,5 @@ export declare function useEditorAccessRequestHandler(): {
12
12
  export declare function useLiveState<T>(liveStateDataId: string, initialValue?: any, options?: {
13
13
  syncDuration?: number;
14
14
  resetLiveState?: boolean;
15
+ listenToNewChangesOnly?: boolean;
15
16
  }): [T, (value: T) => void];
package/esm/index.js CHANGED
@@ -132,7 +132,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
132
132
  }
133
133
  };
134
134
 
135
- var VELT_SDK_VERSION = '1.0.153';
135
+ var VELT_SDK_VERSION = '1.0.156';
136
136
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
137
137
 
138
138
  var SnippylyProvider = function (props) {
@@ -2052,6 +2052,13 @@ var VeltCommentBubbleCommentsCount = function (props) {
2052
2052
  return (React.createElement("velt-comment-bubble-comments-count-wireframe", null, children));
2053
2053
  };
2054
2054
 
2055
+ var VeltCommentBubbleWireframe = function (props) {
2056
+ var children = props.children, remainingProp = __rest(props, ["children"]);
2057
+ return (React.createElement("velt-comment-bubble-wireframe", __assign({}, remainingProp), children));
2058
+ };
2059
+ VeltCommentBubbleWireframe.Avatar = VeltCommentBubbleAvatar;
2060
+ VeltCommentBubbleWireframe.CommentsCount = VeltCommentBubbleCommentsCount;
2061
+
2055
2062
  var VeltReactionToolWireframe = function (props) {
2056
2063
  var children = props.children, remainingProp = __rest(props, ["children"]);
2057
2064
  return (React.createElement("velt-reaction-tool-wireframe", __assign({}, remainingProp), children));
@@ -2164,15 +2171,15 @@ function useVeltInitState() {
2164
2171
  var client = useVeltClient().client;
2165
2172
  var _a = React.useState(), data = _a[0], setData = _a[1];
2166
2173
  React.useEffect(function () {
2167
- if (!(client === null || client === void 0 ? void 0 : client.getVeltInitState$))
2174
+ if (!(client === null || client === void 0 ? void 0 : client.getVeltInitState))
2168
2175
  return;
2169
- var subscription = client === null || client === void 0 ? void 0 : client.getVeltInitState$().subscribe(function (res) {
2176
+ var subscription = client === null || client === void 0 ? void 0 : client.getVeltInitState().subscribe(function (res) {
2170
2177
  setData(res);
2171
2178
  });
2172
2179
  return function () {
2173
2180
  subscription.unsubscribe();
2174
2181
  };
2175
- }, [client === null || client === void 0 ? void 0 : client.getVeltInitState$]);
2182
+ }, [client === null || client === void 0 ? void 0 : client.getVeltInitState]);
2176
2183
  return data;
2177
2184
  }
2178
2185
 
@@ -2328,13 +2335,13 @@ function useLiveStateSyncUtils() {
2328
2335
  }, [client, setLiveStateSyncElement, liveStateSyncElement]);
2329
2336
  return liveStateSyncElement;
2330
2337
  }
2331
- function useLiveStateData(liveStateDataId) {
2338
+ function useLiveStateData(liveStateDataId, listenToNewChangesOnly) {
2332
2339
  var liveStateSyncElement = useLiveStateSyncUtils();
2333
2340
  var _a = React.useState(), data = _a[0], setData = _a[1];
2334
2341
  useEffect(function () {
2335
2342
  if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getLiveStateData))
2336
2343
  return;
2337
- var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId).subscribe(function (res) {
2344
+ var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId, listenToNewChangesOnly).subscribe(function (res) {
2338
2345
  setData(res);
2339
2346
  });
2340
2347
  return function () {
@@ -2443,7 +2450,7 @@ function useLiveState(liveStateDataId, initialValue, options) {
2443
2450
  }
2444
2451
  });
2445
2452
  }
2446
- var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId).subscribe(function (res) {
2453
+ var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId, options === null || options === void 0 ? void 0 : options.listenToNewChangesOnly).subscribe(function (res) {
2447
2454
  setData(res);
2448
2455
  });
2449
2456
  return function () {
@@ -2772,5 +2779,5 @@ var logLiveState = function (action, liveStateDataId) {
2772
2779
  }
2773
2780
  };
2774
2781
 
2775
- export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteOptionWireframe, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleAvatar, VeltCommentBubbleCommentsCount, VeltCommentDialogPriorityDropdownContent, VeltCommentDialogPriorityDropdownTrigger, VeltCommentDialogStatusDropdownContent, VeltCommentDialogStatusDropdownTrigger, VeltCommentDialogWireframe, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarWireframe, SnippylyCursor as VeltCursor, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, VeltCommentDialogOptionsDropdownContent as VeltOptionsDropdownContent, VeltCommentDialogOptionsDropdownTrigger as VeltOptionsDropdownTrigger, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionToolWireframe, VeltReactionsPanelWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentSelectionChangeHandler, 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, useUnsetDocumentId, useUserEditorState, useVeltClient, useVeltInitState, useViewsUtils };
2782
+ export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteOptionWireframe, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleAvatar, VeltCommentBubbleCommentsCount, VeltCommentBubbleWireframe, VeltCommentDialogPriorityDropdownContent, VeltCommentDialogPriorityDropdownTrigger, VeltCommentDialogStatusDropdownContent, VeltCommentDialogStatusDropdownTrigger, VeltCommentDialogWireframe, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarWireframe, SnippylyCursor as VeltCursor, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, VeltCommentDialogOptionsDropdownContent as VeltOptionsDropdownContent, VeltCommentDialogOptionsDropdownTrigger as VeltOptionsDropdownTrigger, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionToolWireframe, VeltReactionsPanelWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentSelectionChangeHandler, 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, useUnsetDocumentId, useUserEditorState, useVeltClient, useVeltInitState, useViewsUtils };
2776
2783
  //# sourceMappingURL=index.js.map