@veltdev/react 4.5.0-beta.54 → 4.5.0-beta.56
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 +19 -2
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltAuthProvider/VeltAuthProvider.d.ts +9 -0
- package/cjs/types/components/VeltAuthProvider/index.d.ts +1 -0
- package/cjs/types/components/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +19 -3
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltAuthProvider/VeltAuthProvider.d.ts +9 -0
- package/esm/types/components/VeltAuthProvider/index.d.ts +1 -0
- package/esm/types/components/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +9 -2
- 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.0-beta.
|
|
147
|
+
var VELT_SDK_VERSION = '4.5.0-beta.56';
|
|
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.0-beta.
|
|
153
|
+
'4.5.0-beta.56': 'sha384-OfVCaSPz4Oioe1XgkC1e2ttq7z/uTuRgzp7CCPPDe2jf5pJZE/B1ra6kbtOaKpZk',
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
var SnippylyProvider = function (props) {
|
|
@@ -268,6 +268,22 @@ var SnippylyProvider = function (props) {
|
|
|
268
268
|
React__default["default"].createElement(VeltContext.Provider, { value: { client: client } }, children)));
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
+
var VeltAuthProvider = function (props) {
|
|
272
|
+
var children = props.children, user = props.user, options = props.options, retryConfig = props.retryConfig;
|
|
273
|
+
var client = useVeltClient().client;
|
|
274
|
+
React.useEffect(function () {
|
|
275
|
+
if ((client === null || client === void 0 ? void 0 : client.setVeltAuthProvider) && user) {
|
|
276
|
+
var authProviderConfig = {
|
|
277
|
+
user: user,
|
|
278
|
+
options: options,
|
|
279
|
+
retryConfig: retryConfig
|
|
280
|
+
};
|
|
281
|
+
client.setVeltAuthProvider(authProviderConfig);
|
|
282
|
+
}
|
|
283
|
+
}, [client, user, options, retryConfig]);
|
|
284
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, children));
|
|
285
|
+
};
|
|
286
|
+
|
|
271
287
|
var SnippylyCommentBubble = function (props) {
|
|
272
288
|
var targetCommentElementId = props.targetCommentElementId, targetElementId = props.targetElementId, avatar = props.avatar, showAvatar = props.showAvatar, commentBubbleTargetPinHover = props.commentBubbleTargetPinHover, children = props.children, shadowDom = props.shadowDom, variant = props.variant, darkMode = props.darkMode, commentCountType = props.commentCountType, context = props.context, contextOptions = props.contextOptions, annotationId = props.annotationId, documentId = props.documentId, folderId = props.folderId, locationId = props.locationId;
|
|
273
289
|
return (React__default["default"].createElement("velt-comment-bubble", { "annotation-id": annotationId, "comment-count-type": commentCountType, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, context: JSON.stringify(context), "context-options": JSON.stringify(contextOptions), "location-id": locationId, "document-id": documentId, "folder-id": folderId, "show-avatar": [true, false].includes(showAvatar) ? (showAvatar ? 'true' : 'false') : undefined, avatar: [true, false].includes(avatar) ? (avatar ? 'true' : 'false') : undefined, "comment-bubble-target-pin-hover": commentBubbleTargetPinHover ? 'true' : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, variant: variant }, children));
|
|
@@ -7688,6 +7704,7 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
7688
7704
|
|
|
7689
7705
|
exports.VeltArrowTool = SnippylyArrowTool;
|
|
7690
7706
|
exports.VeltArrows = SnippylyArrows;
|
|
7707
|
+
exports.VeltAuthProvider = VeltAuthProvider;
|
|
7691
7708
|
exports.VeltAutocomplete = VeltAutocomplete;
|
|
7692
7709
|
exports.VeltAutocompleteChipTooltipWireframe = VeltAutocompleteChipTooltipWireframe;
|
|
7693
7710
|
exports.VeltAutocompleteGroupOptionWireframe = VeltAutocompleteGroupOptionWireframe;
|