@veltdev/react 3.0.77 → 3.0.78
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 +84 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltButtonWireframe/VeltButtonWireframe.d.ts +10 -0
- package/cjs/types/components/VeltButtonWireframe/index.d.ts +1 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReply.d.ts +9 -1
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyCount/VeltCommentDialogToggleReplyCount.d.ts +8 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyCount/index.d.ts +1 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyIcon/VeltCommentDialogToggleReplyIcon.d.ts +8 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyIcon/index.d.ts +1 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyText/VeltCommentDialogToggleReplyText.d.ts +8 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyText/index.d.ts +1 -0
- package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -2
- package/cjs/types/components/VeltInlineCommentsSection/VeltInlineCommentsSection.d.ts +1 -1
- package/cjs/types/components/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/CommentActions.d.ts +4 -0
- package/cjs/types/hooks/CoreActions.d.ts +2 -0
- package/cjs/types/hooks/index.d.ts +2 -1
- package/esm/index.js +82 -2
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltButtonWireframe/VeltButtonWireframe.d.ts +10 -0
- package/esm/types/components/VeltButtonWireframe/index.d.ts +1 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReply.d.ts +9 -1
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyCount/VeltCommentDialogToggleReplyCount.d.ts +8 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyCount/index.d.ts +1 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyIcon/VeltCommentDialogToggleReplyIcon.d.ts +8 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyIcon/index.d.ts +1 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyText/VeltCommentDialogToggleReplyText.d.ts +8 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogToggleReply/VeltCommentDialogToggleReplyText/index.d.ts +1 -0
- package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -2
- package/esm/types/components/VeltInlineCommentsSection/VeltInlineCommentsSection.d.ts +1 -1
- package/esm/types/components/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/CommentActions.d.ts +4 -0
- package/esm/types/hooks/CoreActions.d.ts +2 -0
- package/esm/types/hooks/index.d.ts +2 -1
- package/index.d.ts +42 -4
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -140,7 +140,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
var VELT_SDK_VERSION = '3.0.
|
|
143
|
+
var VELT_SDK_VERSION = '3.0.78';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
var VELT_TAB_ID = 'veltTabId';
|
|
146
146
|
|
|
@@ -2127,10 +2127,28 @@ var VeltCommentDialogThreads = function (props) {
|
|
|
2127
2127
|
return (React__default["default"].createElement("velt-comment-dialog-threads-wireframe", __assign({}, remainingProp), children));
|
|
2128
2128
|
};
|
|
2129
2129
|
|
|
2130
|
+
var VeltCommentDialogToggleReplyCount = function (props) {
|
|
2131
|
+
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2132
|
+
return (React__default["default"].createElement("velt-comment-dialog-toggle-reply-count-wireframe", __assign({}, remainingProp), children));
|
|
2133
|
+
};
|
|
2134
|
+
|
|
2135
|
+
var VeltCommentDialogToggleReplyText = function (props) {
|
|
2136
|
+
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2137
|
+
return (React__default["default"].createElement("velt-comment-dialog-toggle-reply-text-wireframe", __assign({}, remainingProp), children));
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
var VeltCommentDialogToggleReplyIcon = function (props) {
|
|
2141
|
+
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2142
|
+
return (React__default["default"].createElement("velt-comment-dialog-toggle-reply-icon-wireframe", __assign({}, remainingProp), children));
|
|
2143
|
+
};
|
|
2144
|
+
|
|
2130
2145
|
var VeltCommentDialogToggleReply = function (props) {
|
|
2131
2146
|
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2132
2147
|
return (React__default["default"].createElement("velt-comment-dialog-toggle-reply-wireframe", __assign({}, remainingProp), children));
|
|
2133
2148
|
};
|
|
2149
|
+
VeltCommentDialogToggleReply.Icon = VeltCommentDialogToggleReplyIcon;
|
|
2150
|
+
VeltCommentDialogToggleReply.Text = VeltCommentDialogToggleReplyText;
|
|
2151
|
+
VeltCommentDialogToggleReply.Count = VeltCommentDialogToggleReplyCount;
|
|
2134
2152
|
|
|
2135
2153
|
var VeltCommentDialogUpgrade = function (props) {
|
|
2136
2154
|
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
@@ -4313,6 +4331,12 @@ var VeltTranscriptionWireframe = function (props) {
|
|
|
4313
4331
|
VeltTranscriptionWireframe.EmbedMode = VeltTranscriptionEmbedModeWireframe;
|
|
4314
4332
|
VeltTranscriptionWireframe.FloatingMode = VeltTranscriptionFloatingModeWireframe;
|
|
4315
4333
|
|
|
4334
|
+
var VeltButtonWireframe = function (props) {
|
|
4335
|
+
var id = props.id, disabled = props.disabled, active = props.active, type = props.type, group = props.group, children = props.children;
|
|
4336
|
+
var ref = React.useRef();
|
|
4337
|
+
return (React__default["default"].createElement("velt-button-wireframe", { ref: ref, id: id, disabled: [true, false].includes(disabled) ? (disabled ? 'true' : 'false') : undefined, active: [true, false].includes(active) ? (active ? 'true' : 'false') : undefined, type: type, group: group }, children));
|
|
4338
|
+
};
|
|
4339
|
+
|
|
4316
4340
|
function useClient() {
|
|
4317
4341
|
var client = useVeltClient().client;
|
|
4318
4342
|
var _a = React__default["default"].useState(), veltClient = _a[0], setVeltClient = _a[1];
|
|
@@ -5021,6 +5045,9 @@ function useToggleReaction() {
|
|
|
5021
5045
|
}
|
|
5022
5046
|
};
|
|
5023
5047
|
}
|
|
5048
|
+
/**
|
|
5049
|
+
* @deprecated Use useCommentEventCallback hook instead.
|
|
5050
|
+
*/
|
|
5024
5051
|
function useCommentActionCallback(action) {
|
|
5025
5052
|
var commentElement = useCommentUtils();
|
|
5026
5053
|
var _a = React.useState(null), data = _a[0], setData = _a[1];
|
|
@@ -5047,6 +5074,59 @@ function useCommentActionCallback(action) {
|
|
|
5047
5074
|
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.on, memoizedAction]);
|
|
5048
5075
|
return data;
|
|
5049
5076
|
}
|
|
5077
|
+
function useCommentEventCallback(action) {
|
|
5078
|
+
var commentElement = useCommentUtils();
|
|
5079
|
+
var _a = React.useState(null), data = _a[0], setData = _a[1];
|
|
5080
|
+
var subscriptionRef = React.useRef(null);
|
|
5081
|
+
var memoizedAction = React.useMemo(function () { return action; }, [action]);
|
|
5082
|
+
React.useEffect(function () {
|
|
5083
|
+
var _a;
|
|
5084
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.on))
|
|
5085
|
+
return;
|
|
5086
|
+
if (subscriptionRef.current) {
|
|
5087
|
+
subscriptionRef.current.unsubscribe();
|
|
5088
|
+
}
|
|
5089
|
+
var subscription = (_a = commentElement === null || commentElement === void 0 ? void 0 : commentElement.on(memoizedAction)) === null || _a === void 0 ? void 0 : _a.subscribe(function (data) {
|
|
5090
|
+
setData(data);
|
|
5091
|
+
});
|
|
5092
|
+
// Store the new subscription
|
|
5093
|
+
subscriptionRef.current = subscription;
|
|
5094
|
+
// Cleanup function
|
|
5095
|
+
return function () {
|
|
5096
|
+
if (subscriptionRef.current) {
|
|
5097
|
+
subscriptionRef.current.unsubscribe();
|
|
5098
|
+
}
|
|
5099
|
+
};
|
|
5100
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.on, memoizedAction]);
|
|
5101
|
+
return data;
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5104
|
+
function useVeltEventCallback(action) {
|
|
5105
|
+
var client = useVeltClient().client;
|
|
5106
|
+
var _a = React.useState(null), data = _a[0], setData = _a[1];
|
|
5107
|
+
var subscriptionRef = React.useRef(null);
|
|
5108
|
+
var memoizedAction = React.useMemo(function () { return action; }, [action]);
|
|
5109
|
+
React.useEffect(function () {
|
|
5110
|
+
var _a;
|
|
5111
|
+
if (!(client === null || client === void 0 ? void 0 : client.on))
|
|
5112
|
+
return;
|
|
5113
|
+
if (subscriptionRef.current) {
|
|
5114
|
+
subscriptionRef.current.unsubscribe();
|
|
5115
|
+
}
|
|
5116
|
+
var subscription = (_a = client === null || client === void 0 ? void 0 : client.on(memoizedAction)) === null || _a === void 0 ? void 0 : _a.subscribe(function (data) {
|
|
5117
|
+
setData(data);
|
|
5118
|
+
});
|
|
5119
|
+
// Store the new subscription
|
|
5120
|
+
subscriptionRef.current = subscription;
|
|
5121
|
+
// Cleanup function
|
|
5122
|
+
return function () {
|
|
5123
|
+
if (subscriptionRef.current) {
|
|
5124
|
+
subscriptionRef.current.unsubscribe();
|
|
5125
|
+
}
|
|
5126
|
+
};
|
|
5127
|
+
}, [client === null || client === void 0 ? void 0 : client.on, memoizedAction]);
|
|
5128
|
+
return data;
|
|
5129
|
+
}
|
|
5050
5130
|
|
|
5051
5131
|
function useCursorUtils() {
|
|
5052
5132
|
var _a = React__default["default"].useState(), cursorElement = _a[0], setCursorElement = _a[1];
|
|
@@ -5675,6 +5755,7 @@ exports.VeltArrows = SnippylyArrows;
|
|
|
5675
5755
|
exports.VeltAutocomplete = VeltAutocomplete;
|
|
5676
5756
|
exports.VeltAutocompleteChipTooltipWireframe = VeltAutocompleteChipTooltipWireframe;
|
|
5677
5757
|
exports.VeltAutocompleteOptionWireframe = VeltAutocompleteOptionWireframe;
|
|
5758
|
+
exports.VeltButtonWireframe = VeltButtonWireframe;
|
|
5678
5759
|
exports.VeltCanvasComment = VeltCanvasComment;
|
|
5679
5760
|
exports.VeltChartComment = VeltChartComment;
|
|
5680
5761
|
exports.VeltCommentBubble = SnippylyCommentBubble;
|
|
@@ -5773,6 +5854,7 @@ exports.useCommentAnnotationById = useCommentAnnotationById;
|
|
|
5773
5854
|
exports.useCommentAnnotations = useCommentAnnotations;
|
|
5774
5855
|
exports.useCommentCopyLinkHandler = useCommentCopyLinkHandler;
|
|
5775
5856
|
exports.useCommentDialogSidebarClickHandler = useCommentDialogSidebarClickHandler;
|
|
5857
|
+
exports.useCommentEventCallback = useCommentEventCallback;
|
|
5776
5858
|
exports.useCommentModeState = useCommentModeState;
|
|
5777
5859
|
exports.useCommentSelectionChangeHandler = useCommentSelectionChangeHandler;
|
|
5778
5860
|
exports.useCommentSidebarActionButtonClick = useCommentSidebarActionButtonClick;
|
|
@@ -5838,6 +5920,7 @@ exports.useUpdatePriority = useUpdatePriority;
|
|
|
5838
5920
|
exports.useUpdateStatus = useUpdateStatus;
|
|
5839
5921
|
exports.useUserEditorState = useUserEditorState;
|
|
5840
5922
|
exports.useVeltClient = useVeltClient;
|
|
5923
|
+
exports.useVeltEventCallback = useVeltEventCallback;
|
|
5841
5924
|
exports.useVeltInitState = useVeltInitState;
|
|
5842
5925
|
exports.useViewsUtils = useViewsUtils;
|
|
5843
5926
|
//# sourceMappingURL=index.js.map
|