@veltdev/react 4.0.0-beta.10 → 4.0.0-beta.11

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
@@ -140,12 +140,12 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
140
140
  }
141
141
  };
142
142
 
143
- var VELT_SDK_VERSION = '4.0.0-beta.10';
143
+ var VELT_SDK_VERSION = '4.0.0-beta.11';
144
144
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
145
145
  var VELT_TAB_ID = 'veltTabId';
146
146
 
147
147
  var SnippylyProvider = function (props) {
148
- var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, onClientLoad = props.onClientLoad, children = props.children;
148
+ var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, userDataProvider = props.userDataProvider, onClientLoad = props.onClientLoad, children = props.children;
149
149
  var _a = React.useState(null), client = _a[0], setClient = _a[1];
150
150
  React.useEffect(function () {
151
151
  if (apiKey) {
@@ -154,6 +154,13 @@ var SnippylyProvider = function (props) {
154
154
  }, (config === null || config === void 0 ? void 0 : config.version) || VELT_SDK_VERSION, config === null || config === void 0 ? void 0 : config.staging, config === null || config === void 0 ? void 0 : config.develop, config === null || config === void 0 ? void 0 : config.proxyDomain);
155
155
  }
156
156
  }, []);
157
+ React.useEffect(function () {
158
+ if (client && userDataProvider) {
159
+ if (typeof (client === null || client === void 0 ? void 0 : client.setUserDataProvider) === 'function') {
160
+ client === null || client === void 0 ? void 0 : client.setUserDataProvider(userDataProvider);
161
+ }
162
+ }
163
+ }, [client, userDataProvider]);
157
164
  var initVelt = function () { return __awaiter(void 0, void 0, void 0, function () {
158
165
  var velt, event;
159
166
  var _a, _b;
@@ -606,7 +613,8 @@ var SnippylyRecorderControlPanel = function (props) {
606
613
  };
607
614
 
608
615
  var SnippylyRecorderNotes = function (props) {
609
- return (React__default["default"].createElement("velt-recorder-notes", null));
616
+ var shadowDom = props.shadowDom, children = props.children;
617
+ return (React__default["default"].createElement("velt-recorder-notes", { "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }, children));
610
618
  };
611
619
 
612
620
  var SnippylyRecorderPlayer = function (props) {
@@ -640,8 +648,8 @@ var SnippylyRecorderPlayer = function (props) {
640
648
  };
641
649
 
642
650
  var SnippylyRecorderTool = function (props) {
643
- var type = props.type, panelId = props.panelId, buttonLabel = props.buttonLabel, children = props.children, darkMode = props.darkMode;
644
- return (React__default["default"].createElement("velt-recorder-tool", { type: type, "panel-id": panelId, "button-label": buttonLabel, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
651
+ var type = props.type, panelId = props.panelId, buttonLabel = props.buttonLabel, children = props.children, darkMode = props.darkMode, shadowDom = props.shadowDom;
652
+ return (React__default["default"].createElement("velt-recorder-tool", { type: type, "panel-id": panelId, "button-label": buttonLabel, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }, children));
645
653
  };
646
654
 
647
655
  var SnippylySidebarButton = function (props) {