@veltdev/react 4.5.2 → 4.5.4-beta.1

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.
@@ -15,6 +15,7 @@ export interface IVeltCommentBubbleProps extends React.DetailedHTMLProps<React.H
15
15
  shadowDom?: boolean;
16
16
  variant?: string;
17
17
  darkMode?: boolean;
18
+ readOnly?: boolean;
18
19
  commentCountType?: 'total' | 'unread';
19
20
  context?: {
20
21
  [key: string]: any;
@@ -9,6 +9,7 @@ export interface IVeltCommentToolProps extends React.DetailedHTMLProps<React.HTM
9
9
  onCommentModeChange?: Function;
10
10
  sourceId?: string;
11
11
  darkMode?: boolean;
12
+ disabled?: boolean;
12
13
  variant?: string;
13
14
  shadowDom?: boolean;
14
15
  context?: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const VELT_SDK_VERSION = "4.5.2";
2
+ export declare const VELT_SDK_VERSION = "4.5.4-beta.1";
3
3
  export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
4
4
  export declare const VELT_TAB_ID = "veltTabId";
5
5
  export declare const INTEGRITY_MAP: Record<string, string>;
package/esm/index.js CHANGED
@@ -137,13 +137,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
137
137
  }
138
138
  };
139
139
 
140
- var VELT_SDK_VERSION = '4.5.2';
140
+ var VELT_SDK_VERSION = '4.5.4-beta.1';
141
141
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
142
142
  var VELT_TAB_ID = 'veltTabId';
143
143
  // integrity map for the Velt SDK
144
144
  // Note: generate integrity hashes with: https://www.srihash.org/
145
145
  var INTEGRITY_MAP = {
146
- '4.5.2': 'sha384-wv8xKKl0fddxiuEgnhnZ/vV4DOH6zrMRb22I7V1mMPJ5lZINEbCIDwNt2AOqaJdo',
146
+ '4.5.4-beta.1': 'sha384-CPL4NAjuUaRJOEnfarwu+L1X/ptQglenXuZvd0NJqGy0S2iIZrkJM1dBd/LHNu3Q',
147
147
  };
148
148
 
149
149
  var SnippylyProvider = function (props) {
@@ -274,8 +274,8 @@ var SnippylyProvider = function (props) {
274
274
  };
275
275
 
276
276
  var SnippylyCommentBubble = function (props) {
277
- 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;
278
- return (React.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));
277
+ 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, readOnly = props.readOnly;
278
+ return (React.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, "read-only": [true, false].includes(readOnly) ? (readOnly ? 'true' : 'false') : undefined, variant: variant }, children));
279
279
  };
280
280
 
281
281
  var SnippylyComments = function (props) {
@@ -485,7 +485,7 @@ var SnippylyCommentsSidebar = function (props) {
485
485
  };
486
486
 
487
487
  var SnippylyCommentTool = function (props) {
488
- 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, context = props.context, contextOptions = props.contextOptions, documentId = props.documentId, folderId = props.folderId, locationId = props.locationId;
488
+ 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, context = props.context, contextOptions = props.contextOptions, documentId = props.documentId, folderId = props.folderId, locationId = props.locationId, disabled = props.disabled;
489
489
  var ref = useRef();
490
490
  var onCommentModeChangeRef = useRef(onCommentModeChange);
491
491
  // Update the ref to always point to the latest callback function
@@ -511,7 +511,7 @@ var SnippylyCommentTool = function (props) {
511
511
  }
512
512
  };
513
513
  }, []);
514
- return (React.createElement("velt-comment-tool", { ref: ref, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, "source-id": sourceId, variant: variant, context: JSON.stringify(context), "context-options": JSON.stringify(contextOptions), "location-id": locationId, "document-id": documentId, "folder-id": folderId, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
514
+ return (React.createElement("velt-comment-tool", { ref: ref, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, "source-id": sourceId, variant: variant, context: JSON.stringify(context), "context-options": JSON.stringify(contextOptions), "location-id": locationId, "document-id": documentId, "folder-id": folderId, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, disabled: [true, false].includes(disabled) ? (disabled ? 'true' : 'false') : undefined }, children));
515
515
  };
516
516
 
517
517
  var SnippylyCursor = function (props) {