@veltdev/react 1.0.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.
Files changed (100) hide show
  1. package/cjs/index.js +381 -0
  2. package/cjs/index.js.map +1 -0
  3. package/cjs/types/components/Snippyly/Snippyly.d.ts +11 -0
  4. package/cjs/types/components/Snippyly/Snippyly.stories.d.ts +5 -0
  5. package/cjs/types/components/Snippyly/index.d.ts +1 -0
  6. package/cjs/types/components/SnippylyArrowTool/SnippylyArrowTool.d.ts +3 -0
  7. package/cjs/types/components/SnippylyArrowTool/index.d.ts +1 -0
  8. package/cjs/types/components/SnippylyArrows/SnippylyArrows.d.ts +3 -0
  9. package/cjs/types/components/SnippylyArrows/index.d.ts +1 -0
  10. package/cjs/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +12 -0
  11. package/cjs/types/components/SnippylyCommentBubble/index.d.ts +1 -0
  12. package/cjs/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +6 -0
  13. package/cjs/types/components/SnippylyCommentTool/index.d.ts +1 -0
  14. package/cjs/types/components/SnippylyComments/SnippylyComments.d.ts +134 -0
  15. package/cjs/types/components/SnippylyComments/index.d.ts +1 -0
  16. package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +17 -0
  17. package/cjs/types/components/SnippylyCommentsSidebar/index.d.ts +1 -0
  18. package/cjs/types/components/SnippylyCursor/SnippylyCursor.d.ts +13 -0
  19. package/cjs/types/components/SnippylyCursor/index.d.ts +1 -0
  20. package/cjs/types/components/SnippylyHuddle/SnippylyHuddle.d.ts +5 -0
  21. package/cjs/types/components/SnippylyHuddle/index.d.ts +1 -0
  22. package/cjs/types/components/SnippylyHuddleTool/SnippylyHuddleTool.d.ts +6 -0
  23. package/cjs/types/components/SnippylyHuddleTool/index.d.ts +1 -0
  24. package/cjs/types/components/SnippylyPresence/SnippylyPresence.d.ts +25 -0
  25. package/cjs/types/components/SnippylyPresence/index.d.ts +1 -0
  26. package/cjs/types/components/SnippylyRecorderControlPanel/SnippylyRecorderControlPanel.d.ts +8 -0
  27. package/cjs/types/components/SnippylyRecorderControlPanel/index.d.ts +1 -0
  28. package/cjs/types/components/SnippylyRecorderNotes/SnippylyRecorderNotes.d.ts +5 -0
  29. package/cjs/types/components/SnippylyRecorderNotes/index.d.ts +1 -0
  30. package/cjs/types/components/SnippylyRecorderPlayer/SnippylyRecorderPlayer.d.ts +12 -0
  31. package/cjs/types/components/SnippylyRecorderPlayer/index.d.ts +1 -0
  32. package/cjs/types/components/SnippylyRecorderTool/SnippylyRecorderTool.d.ts +8 -0
  33. package/cjs/types/components/SnippylyRecorderTool/index.d.ts +1 -0
  34. package/cjs/types/components/SnippylySidebarButton/SnippylySidebarButton.d.ts +6 -0
  35. package/cjs/types/components/SnippylySidebarButton/index.d.ts +1 -0
  36. package/cjs/types/components/SnippylyTagTool/SnippylyTagTool.d.ts +6 -0
  37. package/cjs/types/components/SnippylyTagTool/index.d.ts +1 -0
  38. package/cjs/types/components/SnippylyTags/SnippylyTags.d.ts +6 -0
  39. package/cjs/types/components/SnippylyTags/index.d.ts +1 -0
  40. package/cjs/types/components/SnippylyUserInviteTool/SnippylyUserInviteTool.d.ts +10 -0
  41. package/cjs/types/components/SnippylyUserInviteTool/index.d.ts +1 -0
  42. package/cjs/types/components/SnippylyUserRequestTool/SnippylyUserRequestTool.d.ts +11 -0
  43. package/cjs/types/components/SnippylyUserRequestTool/index.d.ts +1 -0
  44. package/cjs/types/components/index.d.ts +20 -0
  45. package/cjs/types/constants.d.ts +1 -0
  46. package/cjs/types/context/SnippylyContext.d.ts +8 -0
  47. package/cjs/types/context/index.d.ts +1 -0
  48. package/cjs/types/index.d.ts +3 -0
  49. package/cjs/types/loadSnippyly.d.ts +2 -0
  50. package/esm/index.js +353 -0
  51. package/esm/index.js.map +1 -0
  52. package/esm/types/components/Snippyly/Snippyly.d.ts +11 -0
  53. package/esm/types/components/Snippyly/Snippyly.stories.d.ts +5 -0
  54. package/esm/types/components/Snippyly/index.d.ts +1 -0
  55. package/esm/types/components/SnippylyArrowTool/SnippylyArrowTool.d.ts +3 -0
  56. package/esm/types/components/SnippylyArrowTool/index.d.ts +1 -0
  57. package/esm/types/components/SnippylyArrows/SnippylyArrows.d.ts +3 -0
  58. package/esm/types/components/SnippylyArrows/index.d.ts +1 -0
  59. package/esm/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +12 -0
  60. package/esm/types/components/SnippylyCommentBubble/index.d.ts +1 -0
  61. package/esm/types/components/SnippylyCommentTool/SnippylyCommentTool.d.ts +6 -0
  62. package/esm/types/components/SnippylyCommentTool/index.d.ts +1 -0
  63. package/esm/types/components/SnippylyComments/SnippylyComments.d.ts +134 -0
  64. package/esm/types/components/SnippylyComments/index.d.ts +1 -0
  65. package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +17 -0
  66. package/esm/types/components/SnippylyCommentsSidebar/index.d.ts +1 -0
  67. package/esm/types/components/SnippylyCursor/SnippylyCursor.d.ts +13 -0
  68. package/esm/types/components/SnippylyCursor/index.d.ts +1 -0
  69. package/esm/types/components/SnippylyHuddle/SnippylyHuddle.d.ts +5 -0
  70. package/esm/types/components/SnippylyHuddle/index.d.ts +1 -0
  71. package/esm/types/components/SnippylyHuddleTool/SnippylyHuddleTool.d.ts +6 -0
  72. package/esm/types/components/SnippylyHuddleTool/index.d.ts +1 -0
  73. package/esm/types/components/SnippylyPresence/SnippylyPresence.d.ts +25 -0
  74. package/esm/types/components/SnippylyPresence/index.d.ts +1 -0
  75. package/esm/types/components/SnippylyRecorderControlPanel/SnippylyRecorderControlPanel.d.ts +8 -0
  76. package/esm/types/components/SnippylyRecorderControlPanel/index.d.ts +1 -0
  77. package/esm/types/components/SnippylyRecorderNotes/SnippylyRecorderNotes.d.ts +5 -0
  78. package/esm/types/components/SnippylyRecorderNotes/index.d.ts +1 -0
  79. package/esm/types/components/SnippylyRecorderPlayer/SnippylyRecorderPlayer.d.ts +12 -0
  80. package/esm/types/components/SnippylyRecorderPlayer/index.d.ts +1 -0
  81. package/esm/types/components/SnippylyRecorderTool/SnippylyRecorderTool.d.ts +8 -0
  82. package/esm/types/components/SnippylyRecorderTool/index.d.ts +1 -0
  83. package/esm/types/components/SnippylySidebarButton/SnippylySidebarButton.d.ts +6 -0
  84. package/esm/types/components/SnippylySidebarButton/index.d.ts +1 -0
  85. package/esm/types/components/SnippylyTagTool/SnippylyTagTool.d.ts +6 -0
  86. package/esm/types/components/SnippylyTagTool/index.d.ts +1 -0
  87. package/esm/types/components/SnippylyTags/SnippylyTags.d.ts +6 -0
  88. package/esm/types/components/SnippylyTags/index.d.ts +1 -0
  89. package/esm/types/components/SnippylyUserInviteTool/SnippylyUserInviteTool.d.ts +10 -0
  90. package/esm/types/components/SnippylyUserInviteTool/index.d.ts +1 -0
  91. package/esm/types/components/SnippylyUserRequestTool/SnippylyUserRequestTool.d.ts +11 -0
  92. package/esm/types/components/SnippylyUserRequestTool/index.d.ts +1 -0
  93. package/esm/types/components/index.d.ts +20 -0
  94. package/esm/types/constants.d.ts +1 -0
  95. package/esm/types/context/SnippylyContext.d.ts +8 -0
  96. package/esm/types/context/index.d.ts +1 -0
  97. package/esm/types/index.d.ts +3 -0
  98. package/esm/types/loadSnippyly.d.ts +2 -0
  99. package/index.d.ts +295 -0
  100. package/package.json +19 -0
package/index.d.ts ADDED
@@ -0,0 +1,295 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { Config, Snippyly } from '@snippyly/types';
4
+
5
+ interface IVeltProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
6
+ apiKey: string;
7
+ config?: Config;
8
+ user?: any;
9
+ documentId?: string;
10
+ onClientLoad?: (snippylyClient?: Snippyly) => any;
11
+ }
12
+ declare const SnippylyProvider: React.FC<IVeltProps>;
13
+
14
+ interface IVeltCommentBubbleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
15
+ targetCommentElementId?: string;
16
+ /**
17
+ * @deprecated Use `avatar` instead
18
+ */
19
+ showAvatar?: boolean;
20
+ avatar?: boolean;
21
+ commentBubbleTargetPinHover?: boolean;
22
+ }
23
+ declare const SnippylyCommentBubble: React.FC<IVeltCommentBubbleProps>;
24
+
25
+ interface IVeltCommentsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
26
+ streamViewContainerId?: string;
27
+ /**
28
+ * @deprecated
29
+ */
30
+ pinHighlighterClass?: string;
31
+ /**
32
+ * @deprecated
33
+ */
34
+ textHighlighterClass?: string;
35
+ autoCategorize?: boolean;
36
+ /**
37
+ * @deprecated Use `onSignIn` instead
38
+ */
39
+ signIn?: Function;
40
+ onSignIn?: Function;
41
+ textMode?: boolean;
42
+ popoverMode?: boolean;
43
+ /**
44
+ * @deprecated Use `floatingMode` instead
45
+ */
46
+ floatingCommentsMode?: boolean;
47
+ floatingMode?: boolean;
48
+ moderatorMode?: boolean;
49
+ streamMode?: boolean;
50
+ signInButton?: boolean;
51
+ /**
52
+ * @deprecated Use `attachments` instead
53
+ */
54
+ allowAttachments?: boolean;
55
+ attachments?: boolean;
56
+ /**
57
+ * @deprecated Use `deviceInfo` instead
58
+ */
59
+ showDeviceInfo?: boolean;
60
+ deviceInfo?: boolean;
61
+ /**
62
+ * @deprecated Use `commentIndex` instead
63
+ */
64
+ showCommentIndex?: boolean;
65
+ commentIndex?: boolean;
66
+ dialogOnHover?: boolean;
67
+ dialogOnTargetElementClick?: boolean;
68
+ /**
69
+ * @deprecated Use `priority` instead
70
+ */
71
+ showPriority?: boolean;
72
+ priority?: boolean;
73
+ /**
74
+ * @deprecated Use `status` instead
75
+ */
76
+ showStatus?: boolean;
77
+ status?: boolean;
78
+ /**
79
+ * @deprecated Use `resolveButton` instead
80
+ */
81
+ showResolveButton?: boolean;
82
+ resolveButton?: boolean;
83
+ inboxMode?: boolean;
84
+ suggestionMode?: boolean;
85
+ ghostComments?: boolean;
86
+ /**
87
+ * @deprecated Use `ghostCommentsIndicator` instead
88
+ */
89
+ ghostCommentsMessage?: boolean;
90
+ ghostCommentsIndicator?: boolean;
91
+ allowedElementIds?: string[];
92
+ commentAdded?: Function;
93
+ onCustomPinInject?: Function;
94
+ onCommentUpdate?: Function;
95
+ /**
96
+ * @deprecated Use `onCommentAccept` instead
97
+ */
98
+ commentAccepted?: Function;
99
+ onCommentAccept?: Function;
100
+ /**
101
+ * @deprecated Use `onCommentReject` instead
102
+ */
103
+ commentRejected?: Function;
104
+ onCommentReject?: Function;
105
+ /**
106
+ * @deprecated Use `customStatus` instead
107
+ */
108
+ customStatuses?: {
109
+ id: string;
110
+ color: string;
111
+ name: string;
112
+ type: 'default' | 'ongoing' | 'terminal';
113
+ lightColor?: string;
114
+ svg?: string;
115
+ iconUrl?: string;
116
+ }[];
117
+ customStatus?: {
118
+ id: string;
119
+ color: string;
120
+ name: string;
121
+ type: 'default' | 'ongoing' | 'terminal';
122
+ lightColor?: string;
123
+ svg?: string;
124
+ iconUrl?: string;
125
+ }[];
126
+ /**
127
+ * @deprecated Use `customPriority` instead
128
+ */
129
+ customPriorities?: {
130
+ id: string;
131
+ color: string;
132
+ name: string;
133
+ lightColor?: string;
134
+ }[];
135
+ customPriority?: {
136
+ id: string;
137
+ color: string;
138
+ name: string;
139
+ lightColor?: string;
140
+ }[];
141
+ /**
142
+ * @deprecated Use `customCategory` instead
143
+ */
144
+ customCategories?: {
145
+ id: string;
146
+ color: string;
147
+ name: string;
148
+ }[];
149
+ customCategory?: {
150
+ id: string;
151
+ color: string;
152
+ name: string;
153
+ }[];
154
+ darkMode?: boolean;
155
+ }
156
+ declare const SnippylyComments: React.FC<IVeltCommentsProps>;
157
+
158
+ interface IVeltCommentsSidebarProps {
159
+ embedMode?: boolean;
160
+ /**
161
+ * @deprecated Use `urlNavigation` instead
162
+ */
163
+ enableUrlNavigation?: boolean;
164
+ urlNavigation?: boolean;
165
+ /**
166
+ * @deprecated Use `onSidebarOpen` instead
167
+ */
168
+ openSidebar?: Function;
169
+ onSidebarOpen?: Function;
170
+ onSidebarCommentClick?: Function;
171
+ }
172
+ declare const SnippylyCommentsSidebar: React.FC<IVeltCommentsSidebarProps>;
173
+
174
+ interface IVeltCommentToolProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
175
+ targetCommentElementId?: string;
176
+ }
177
+ declare const SnippylyCommentTool: React.FC<IVeltCommentToolProps>;
178
+
179
+ interface IVeltCursorProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
180
+ avatarMode?: boolean;
181
+ inactivityTime?: number;
182
+ allowedElementIds?: string;
183
+ /**
184
+ * @deprecated Use `onCursorUserChange` instead
185
+ */
186
+ onCursorUsersChanged?: Function;
187
+ onCursorUserChange?: Function;
188
+ }
189
+ declare const SnippylyCursor: React.FC<IVeltCursorProps>;
190
+
191
+ interface IVeltHuddleProps {
192
+ }
193
+ declare const SnippylyHuddle: React.FC<IVeltHuddleProps>;
194
+
195
+ interface IVeltHuddleToolProps {
196
+ type?: string;
197
+ }
198
+ declare const SnippylyHuddleTool: React.FC<IVeltHuddleToolProps>;
199
+
200
+ interface IVeltPresenceProps {
201
+ maxUsers?: number;
202
+ inactivityTime?: number;
203
+ documentParams?: any;
204
+ location?: any;
205
+ /**
206
+ * @deprecated Use `onPresenceUserChange` instead
207
+ */
208
+ onUsersChanged?: Function;
209
+ onPresenceUserChange?: Function;
210
+ flockMode?: boolean;
211
+ /**
212
+ * @deprecated Use `defaultFlockNavigation` instead
213
+ */
214
+ disableFlockNavigation?: boolean;
215
+ defaultFlockNavigation?: boolean;
216
+ onNavigate?: (pageInfo: {
217
+ path: string;
218
+ url: string;
219
+ baseUrl: string;
220
+ }) => void;
221
+ }
222
+ declare const SnippylyPresence: React.FC<IVeltPresenceProps>;
223
+
224
+ interface IVeltRecorderControlPanelProps {
225
+ mode?: string;
226
+ panelId?: string;
227
+ onRecordedData?: Function;
228
+ }
229
+ declare const SnippylyRecorderControlPanel: React.FC<IVeltRecorderControlPanelProps>;
230
+
231
+ interface IVeltRecorderNotesProps {
232
+ }
233
+ declare const SnippylyRecorderNotes: React.FC<IVeltRecorderNotesProps>;
234
+
235
+ interface IVeltRecorderPlayerProps {
236
+ recorderId?: string;
237
+ onDelete?: Function;
238
+ /**
239
+ * @deprecated Use `summary` instead.
240
+ */
241
+ showSummary?: boolean;
242
+ summary?: boolean;
243
+ }
244
+ declare const SnippylyRecorderPlayer: React.FC<IVeltRecorderPlayerProps>;
245
+
246
+ interface IVeltRecorderToolProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
247
+ type?: string;
248
+ panelId?: string;
249
+ buttonLabel?: string;
250
+ }
251
+ declare const SnippylyRecorderTool: React.FC<IVeltRecorderToolProps>;
252
+
253
+ interface IVeltSidebarButtonProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
254
+ tooltipText?: string;
255
+ }
256
+ declare const SnippylySidebarButton: React.FC<IVeltSidebarButtonProps>;
257
+
258
+ interface IVeltTagsProps {
259
+ pinHighlighterClass?: string;
260
+ }
261
+ declare const SnippylyTags: React.FC<IVeltTagsProps>;
262
+
263
+ interface IVeltTagToolProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
264
+ targetTagElementId?: string;
265
+ }
266
+ declare const SnippylyTagTool: React.FC<IVeltTagToolProps>;
267
+
268
+ declare const SnippylyArrows: React.FC<any>;
269
+
270
+ declare const SnippylyArrowTool: React.FC<any>;
271
+
272
+ interface IVeltUserInviteToolProps {
273
+ type?: string;
274
+ source?: string;
275
+ title?: string;
276
+ placeholder?: string;
277
+ accessControlDropdown?: boolean;
278
+ }
279
+ declare const SnippylyUserInviteTool: React.FC<IVeltUserInviteToolProps>;
280
+
281
+ interface IVeltUserRequestToolProps {
282
+ /**
283
+ * Allowed values: 'feedback', 'reportBug', 'contactUs'
284
+ *
285
+ * Default value: 'feedback'
286
+ */
287
+ type?: string;
288
+ }
289
+ declare const SnippylyUserRequestTool: React.FC<IVeltUserRequestToolProps>;
290
+
291
+ declare function useVeltClient(): {
292
+ client: Snippyly;
293
+ };
294
+
295
+ export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, SnippylyCommentBubble as VeltCommentBubble, SnippylyCommentTool as VeltCommentTool, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, SnippylyCursor as VeltCursor, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, useVeltClient };
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@veltdev/react",
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "version:update": "npm version patch",
8
+ "publish:sdk-react": "npm publish --access public"
9
+ },
10
+ "author": "",
11
+ "license": "ISC",
12
+ "main": "cjs/index.js",
13
+ "module": "esm/index.js",
14
+ "types": "index.d.ts",
15
+ "peerDependencies": {
16
+ "react": "^18.0.0 || ^17.0.0 || ^16.0.0",
17
+ "react-dom": "^18.0.0 || ^17.0.0 || ^16.0.0"
18
+ }
19
+ }