@veltdev/react 3.0.51 → 3.0.53
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 +5 -5
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/context/SnippylyContext.d.ts +2 -2
- package/cjs/types/hooks/CommentElement.d.ts +3 -3
- package/esm/index.js +5 -5
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/context/SnippylyContext.d.ts +2 -2
- package/esm/types/hooks/CommentElement.d.ts +3 -3
- package/index.d.ts +5 -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.53';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
var VELT_TAB_ID = 'veltTabId';
|
|
146
146
|
|
|
@@ -440,7 +440,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
440
440
|
};
|
|
441
441
|
|
|
442
442
|
var SnippylyCommentTool = function (props) {
|
|
443
|
-
var targetCommentElementId = props.targetCommentElementId, targetElementId = props.targetElementId, onCommentModeChange = props.onCommentModeChange, children = props.children, darkMode = props.darkMode, variant = props.variant, shadowDom = props.shadowDom;
|
|
443
|
+
var targetCommentElementId = props.targetCommentElementId, targetElementId = props.targetElementId, onCommentModeChange = props.onCommentModeChange, sourceId = props.sourceId, children = props.children, darkMode = props.darkMode, variant = props.variant, shadowDom = props.shadowDom;
|
|
444
444
|
var ref = React.useRef();
|
|
445
445
|
var onCommentModeChangeRef = React.useRef(onCommentModeChange);
|
|
446
446
|
// Update the ref to always point to the latest callback function
|
|
@@ -466,7 +466,7 @@ var SnippylyCommentTool = function (props) {
|
|
|
466
466
|
}
|
|
467
467
|
};
|
|
468
468
|
}, []);
|
|
469
|
-
return (React__default["default"].createElement("velt-comment-tool", { ref: ref, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, variant: variant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
469
|
+
return (React__default["default"].createElement("velt-comment-tool", { ref: ref, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, "source-id": sourceId, variant: variant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
470
470
|
};
|
|
471
471
|
|
|
472
472
|
var SnippylyCursor = function (props) {
|
|
@@ -4566,7 +4566,7 @@ function useCommentModeState() {
|
|
|
4566
4566
|
}
|
|
4567
4567
|
function useCommentAddHandler() {
|
|
4568
4568
|
var commentElement = useCommentUtils();
|
|
4569
|
-
var _a = React__default["default"].useState(), data = _a[0], setData = _a[1];
|
|
4569
|
+
var _a = React__default["default"].useState(undefined), data = _a[0], setData = _a[1];
|
|
4570
4570
|
React.useEffect(function () {
|
|
4571
4571
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentAdd))
|
|
4572
4572
|
return;
|
|
@@ -4581,7 +4581,7 @@ function useCommentAddHandler() {
|
|
|
4581
4581
|
}
|
|
4582
4582
|
function useCommentUpdateHandler() {
|
|
4583
4583
|
var commentElement = useCommentUtils();
|
|
4584
|
-
var _a = React__default["default"].useState(), data = _a[0], setData = _a[1];
|
|
4584
|
+
var _a = React__default["default"].useState(undefined), data = _a[0], setData = _a[1];
|
|
4585
4585
|
React.useEffect(function () {
|
|
4586
4586
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentUpdate))
|
|
4587
4587
|
return;
|