@veltdev/react 4.5.0-beta.15 → 4.5.0-beta.17
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 +6 -6
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +5 -0
- package/cjs/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +2 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +6 -6
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +5 -0
- package/esm/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +2 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContextOptions } from '@veltdev/types';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export interface IVeltCommentBubbleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
3
4
|
/**
|
|
@@ -15,6 +16,10 @@ export interface IVeltCommentBubbleProps extends React.DetailedHTMLProps<React.H
|
|
|
15
16
|
variant?: string;
|
|
16
17
|
darkMode?: boolean;
|
|
17
18
|
commentCountType?: 'total' | 'unread';
|
|
19
|
+
context?: {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
};
|
|
22
|
+
contextOptions?: ContextOptions;
|
|
18
23
|
}
|
|
19
24
|
declare const SnippylyCommentBubble: React.FC<IVeltCommentBubbleProps>;
|
|
20
25
|
export default SnippylyCommentBubble;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContextOptions } from '@veltdev/types';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export interface IVeltCommentToolProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
3
4
|
/**
|
|
@@ -13,6 +14,7 @@ export interface IVeltCommentToolProps extends React.DetailedHTMLProps<React.HTM
|
|
|
13
14
|
context?: {
|
|
14
15
|
[key: string]: any;
|
|
15
16
|
};
|
|
17
|
+
contextOptions?: ContextOptions;
|
|
16
18
|
}
|
|
17
19
|
declare const SnippylyCommentTool: React.FC<IVeltCommentToolProps>;
|
|
18
20
|
export default SnippylyCommentTool;
|
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VELT_SDK_VERSION = "4.5.0-beta.
|
|
2
|
+
export declare const VELT_SDK_VERSION = "4.5.0-beta.17";
|
|
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
|
@@ -136,13 +136,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var VELT_SDK_VERSION = '4.5.0-beta.
|
|
139
|
+
var VELT_SDK_VERSION = '4.5.0-beta.17';
|
|
140
140
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
141
141
|
var VELT_TAB_ID = 'veltTabId';
|
|
142
142
|
// integrity map for the Velt SDK
|
|
143
143
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
144
144
|
var INTEGRITY_MAP = {
|
|
145
|
-
'4.5.0-beta.
|
|
145
|
+
'4.5.0-beta.17': 'sha384-1ysxnEKlEW6Wk+6MUn6D/mp5o96uYNE5bD+DpiUtgUg3ZuPZeeE+x2PDjsER/MFr',
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
var SnippylyProvider = function (props) {
|
|
@@ -261,8 +261,8 @@ var SnippylyProvider = function (props) {
|
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
var SnippylyCommentBubble = function (props) {
|
|
264
|
-
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;
|
|
265
|
-
return (React.createElement("velt-comment-bubble", { "comment-count-type": commentCountType, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, "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));
|
|
264
|
+
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;
|
|
265
|
+
return (React.createElement("velt-comment-bubble", { "comment-count-type": commentCountType, "target-comment-element-id": targetCommentElementId, "target-element-id": targetElementId, context: JSON.stringify(context), "context-options": JSON.stringify(contextOptions), "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));
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
var SnippylyComments = function (props) {
|
|
@@ -472,7 +472,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
472
472
|
};
|
|
473
473
|
|
|
474
474
|
var SnippylyCommentTool = function (props) {
|
|
475
|
-
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;
|
|
475
|
+
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;
|
|
476
476
|
var ref = useRef();
|
|
477
477
|
var onCommentModeChangeRef = useRef(onCommentModeChange);
|
|
478
478
|
// Update the ref to always point to the latest callback function
|
|
@@ -498,7 +498,7 @@ var SnippylyCommentTool = function (props) {
|
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
500
|
}, []);
|
|
501
|
-
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), "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
501
|
+
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), "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
502
502
|
};
|
|
503
503
|
|
|
504
504
|
var SnippylyCursor = function (props) {
|