@livepreso/react-plugin-textfield 0.0.2

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 (176) hide show
  1. package/.lintstagedrc.js +6 -0
  2. package/.rush/temp/shrinkwrap-deps.json +311 -0
  3. package/.vscode/settings.json +22 -0
  4. package/CHANGELOG.json +17 -0
  5. package/CHANGELOG.md +9 -0
  6. package/components/BubbleMenu.js +181 -0
  7. package/components/BubbleMenu.module.scss +9 -0
  8. package/components/LinkEditDialog.js +105 -0
  9. package/components/LinkEditDialog.module.scss +171 -0
  10. package/components/Popover.js +43 -0
  11. package/components/Popover.module.scss +80 -0
  12. package/components/PrimaryToolbar.js +27 -0
  13. package/components/Select/Select.js +71 -0
  14. package/components/Select/Select.module.scss +100 -0
  15. package/components/Select/SelectGroup.js +37 -0
  16. package/components/Select/index.js +1 -0
  17. package/components/TableCellMenu.js +43 -0
  18. package/components/TableToolbar.js +41 -0
  19. package/components/Tooltip.js +34 -0
  20. package/components/Tooltip.module.scss +87 -0
  21. package/components/VerticalAlignToggle.js +65 -0
  22. package/components/color-picker/ColorPicker.js +28 -0
  23. package/components/color-picker/ColorPicker.module.scss +8 -0
  24. package/components/color-picker/ColorPickerChip.js +22 -0
  25. package/components/color-picker/ColorPickerChip.module.scss +25 -0
  26. package/components/color-picker/ColorPickerCombo.js +45 -0
  27. package/components/color-picker/ColorPickerCombo.module.scss +23 -0
  28. package/components/color-picker/TextColorIcon.js +18 -0
  29. package/components/editor-toolbars/EditorMenu.js +104 -0
  30. package/components/editor-toolbars/EditorMenu.module.scss +96 -0
  31. package/components/editor-toolbars/EditorToolbar.js +146 -0
  32. package/components/editor-toolbars/EditorToolbar.module.scss +75 -0
  33. package/components/editor-toolbars/MenuItem.js +24 -0
  34. package/components/editor-toolbars/SubMenu.js +50 -0
  35. package/components/editor-toolbars/ToolbarButton.js +26 -0
  36. package/components/editor-toolbars/ToolbarToggle.js +35 -0
  37. package/components/editor-toolbars/ToolbarToggleGroup.js +43 -0
  38. package/components/editor-toolbars/utils.js +7 -0
  39. package/components/hooks/use-presenter.js +5 -0
  40. package/components/style.module.scss +63 -0
  41. package/components/tiptap/ListItem.js +5 -0
  42. package/components/tiptap/Table.js +397 -0
  43. package/components/tiptap/TableCells.js +99 -0
  44. package/components/utils.js +84 -0
  45. package/configs/generate-toolbar-configuration.js +130 -0
  46. package/configs/generate-toolbar-options.js +96 -0
  47. package/configs/table-toolbar-configuration.js +187 -0
  48. package/configs/toolbar-configuration.js +330 -0
  49. package/constants.js +198 -0
  50. package/eslint.config.mjs +15 -0
  51. package/icons/AddColumnLeft.js +15 -0
  52. package/icons/AddColumnRight.js +15 -0
  53. package/icons/AddRowAbove.js +15 -0
  54. package/icons/AddRowBelow.js +15 -0
  55. package/icons/AlignHorizontalCenter.js +13 -0
  56. package/icons/AlignHorizontalLeft.js +13 -0
  57. package/icons/AlignHorizontalRight.js +13 -0
  58. package/icons/AlignVerticalBottom.js +13 -0
  59. package/icons/AlignVerticalCenter.js +13 -0
  60. package/icons/AlignVerticalTop.js +13 -0
  61. package/icons/Backspace.js +13 -0
  62. package/icons/Bold.js +14 -0
  63. package/icons/BorderAll.js +13 -0
  64. package/icons/BorderBottom.js +13 -0
  65. package/icons/BorderClear.js +13 -0
  66. package/icons/BorderHorizontal.js +13 -0
  67. package/icons/BorderInner.js +13 -0
  68. package/icons/BorderLeft.js +13 -0
  69. package/icons/BorderOuter.js +13 -0
  70. package/icons/BorderRight.js +13 -0
  71. package/icons/BorderTop.js +13 -0
  72. package/icons/BorderVertical.js +13 -0
  73. package/icons/Close.js +13 -0
  74. package/icons/Delete.js +13 -0
  75. package/icons/EvenlyDistribute.js +14 -0
  76. package/icons/FitWidth.js +13 -0
  77. package/icons/FitWidthArrows.js +21 -0
  78. package/icons/FormatAlignCenter.js +13 -0
  79. package/icons/FormatAlignJustify.js +13 -0
  80. package/icons/FormatAlignLeft.js +13 -0
  81. package/icons/FormatAlignRight.js +13 -0
  82. package/icons/FormatBold.js +13 -0
  83. package/icons/FormatClear.js +13 -0
  84. package/icons/FormatColorFill.js +13 -0
  85. package/icons/FormatColorText.js +13 -0
  86. package/icons/FormatItalic.js +13 -0
  87. package/icons/FormatLineSpacing.js +13 -0
  88. package/icons/FormatListBulleted.js +13 -0
  89. package/icons/FormatListNumbered.js +13 -0
  90. package/icons/FormatStrikethrough.js +13 -0
  91. package/icons/FormatUnderlined.js +13 -0
  92. package/icons/HorizontalRule.js +13 -0
  93. package/icons/Italic.js +14 -0
  94. package/icons/ItalicIcon.js +18 -0
  95. package/icons/Link.js +13 -0
  96. package/icons/LinkOff.js +13 -0
  97. package/icons/MergeCells.js +14 -0
  98. package/icons/Redo.js +13 -0
  99. package/icons/RemoveColumnOutline.js +28 -0
  100. package/icons/RemoveRowOutline.js +25 -0
  101. package/icons/SplitCells.js +14 -0
  102. package/icons/SplitScene.js +13 -0
  103. package/icons/Subscript.js +13 -0
  104. package/icons/Superscript.js +13 -0
  105. package/icons/Underline.js +14 -0
  106. package/icons/Undo.js +13 -0
  107. package/icons/VerticalAlignBottom.js +13 -0
  108. package/icons/VerticalAlignCenter.js +13 -0
  109. package/icons/VerticalAlignTop.js +13 -0
  110. package/icons/add_column_left.svg +6 -0
  111. package/icons/add_column_right.svg +6 -0
  112. package/icons/add_row_above.svg +6 -0
  113. package/icons/add_row_below.svg +6 -0
  114. package/icons/align_horizontal_center.svg +1 -0
  115. package/icons/align_horizontal_left.svg +1 -0
  116. package/icons/align_horizontal_right.svg +1 -0
  117. package/icons/align_vertical_bottom.svg +1 -0
  118. package/icons/align_vertical_center.svg +1 -0
  119. package/icons/align_vertical_top.svg +1 -0
  120. package/icons/backspace.svg +1 -0
  121. package/icons/bold.svg +1 -0
  122. package/icons/border_all.svg +1 -0
  123. package/icons/border_bottom.svg +1 -0
  124. package/icons/border_clear.svg +1 -0
  125. package/icons/border_horizontal.svg +1 -0
  126. package/icons/border_inner.svg +1 -0
  127. package/icons/border_left.svg +1 -0
  128. package/icons/border_outer.svg +1 -0
  129. package/icons/border_right.svg +1 -0
  130. package/icons/border_top.svg +1 -0
  131. package/icons/border_vertical.svg +1 -0
  132. package/icons/close.svg +1 -0
  133. package/icons/delete.svg +1 -0
  134. package/icons/evenly_distribute.svg +5 -0
  135. package/icons/fit_width.svg +1 -0
  136. package/icons/fit_width_arrows.svg +12 -0
  137. package/icons/format_align_center.svg +1 -0
  138. package/icons/format_align_justify.svg +1 -0
  139. package/icons/format_align_left.svg +1 -0
  140. package/icons/format_align_right.svg +1 -0
  141. package/icons/format_bold.svg +1 -0
  142. package/icons/format_clear.svg +1 -0
  143. package/icons/format_color_fill.svg +1 -0
  144. package/icons/format_color_text.svg +5 -0
  145. package/icons/format_color_text_ungrouped.svg +6 -0
  146. package/icons/format_italic.svg +1 -0
  147. package/icons/format_line_spacing.svg +1 -0
  148. package/icons/format_list_bulleted.svg +1 -0
  149. package/icons/format_list_numbered.svg +1 -0
  150. package/icons/format_strikethrough.svg +1 -0
  151. package/icons/format_underlined.svg +1 -0
  152. package/icons/horizontal_rule.svg +1 -0
  153. package/icons/index.js +191 -0
  154. package/icons/italic.svg +1 -0
  155. package/icons/link.svg +1 -0
  156. package/icons/link_off.svg +1 -0
  157. package/icons/merge_cells.svg +5 -0
  158. package/icons/redo.svg +1 -0
  159. package/icons/remove_column_outline.svg +20 -0
  160. package/icons/remove_row_outline.svg +17 -0
  161. package/icons/split_cells.svg +5 -0
  162. package/icons/split_scene.svg +1 -0
  163. package/icons/subscript.svg +1 -0
  164. package/icons/superscript.svg +1 -0
  165. package/icons/underline.svg +1 -0
  166. package/icons/undo.svg +1 -0
  167. package/icons/vertical_align_bottom.svg +1 -0
  168. package/icons/vertical_align_center.svg +1 -0
  169. package/icons/vertical_align_top.svg +1 -0
  170. package/index.js +334 -0
  171. package/index.module.scss +106 -0
  172. package/package.json +63 -0
  173. package/scripts/extract-svg.js +288 -0
  174. package/utils/color-utils.js +42 -0
  175. package/utils/generate-vertical-alignment-icon.js +22 -0
  176. package/utils/generateCustomExtensions.js +49 -0
package/index.js ADDED
@@ -0,0 +1,334 @@
1
+ import React, { useEffect, useMemo, useRef, useState } from "react";
2
+
3
+ import { renderToString } from "react-dom/server";
4
+
5
+ import {
6
+ autoUpdate,
7
+ flip,
8
+ inline,
9
+ offset,
10
+ useFloating,
11
+ } from "@floating-ui/react-dom";
12
+ import {
13
+ useCMSVal,
14
+ useModes,
15
+ usePrepEditable,
16
+ useSlide,
17
+ } from "@livepreso/content-react";
18
+ import Document from "@tiptap/extension-document";
19
+ import HardBreak from "@tiptap/extension-hard-break";
20
+ import Paragraph from "@tiptap/extension-paragraph";
21
+ import Text from "@tiptap/extension-text";
22
+ import {
23
+ EditorContent,
24
+ EditorContext,
25
+ useEditor,
26
+ useEditorState,
27
+ } from "@tiptap/react";
28
+
29
+ import { PrimaryToolbar } from "./components/PrimaryToolbar.js";
30
+ import { TableToolbar } from "./components/TableToolbar.js";
31
+ import { generateToolbarOptions } from "./configs/generate-toolbar-options.js";
32
+ import {
33
+ DEFAULT_TOOLBAR_CONFIG,
34
+ DEFAULT_TABLE_TOOLBAR_CONFIG,
35
+ EDITABLE_OUTER_SELECTOR,
36
+ } from "./constants.js";
37
+ import { TableCellMenu } from "./components/TableCellMenu.js";
38
+ import style from "./index.module.scss";
39
+ import { generateExtensionsFromTag } from "./utils/generateCustomExtensions.js";
40
+ import debounce from "lodash.debounce";
41
+
42
+ function EditableTextField({
43
+ value,
44
+ onChange,
45
+ className,
46
+ isEditable,
47
+ textStyles,
48
+ colors,
49
+ toolbarConfig = DEFAULT_TOOLBAR_CONFIG,
50
+ tableToolbarConfig = DEFAULT_TABLE_TOOLBAR_CONFIG,
51
+ maskSelector,
52
+ extensions: customExtensions = {},
53
+ tag,
54
+ autofocus = false,
55
+ disableSpellcheck = false,
56
+ // TODO implement an equivalent to the EditableText handler
57
+ // for editables inside tab handlers / accordion headers etc
58
+ // stopPropagation = false,
59
+ ...other
60
+ }) {
61
+ const [textColor, setTextColor] = useState(null);
62
+ const initialValue = useRef(value);
63
+
64
+ // a custom tag can result in a custom Document extension
65
+ // or you can pass custom extensions
66
+ const additionalExtensions = {
67
+ ...generateExtensionsFromTag(tag),
68
+ ...customExtensions,
69
+ };
70
+
71
+ const baseExtensions = [Text, Paragraph, HardBreak];
72
+
73
+ // it is your responsibility not to double-specify any extensions you need here
74
+ // vs those derived from the toolbar config
75
+
76
+ const { document: documentExtension = Document, ...restExtensions } =
77
+ additionalExtensions;
78
+ const otherExtensions = Object.values(restExtensions);
79
+
80
+ const {
81
+ primaryOptions = [],
82
+ tableOptions = [],
83
+ tableCellOptions = [],
84
+ extensions: toolbarAddedExtensions = [],
85
+ } = useMemo(
86
+ () =>
87
+ generateToolbarOptions({
88
+ toolbarConfig,
89
+ tableToolbarConfig,
90
+ textStyles,
91
+ colors,
92
+ }),
93
+ [textStyles, colors, toolbarConfig, tableToolbarConfig],
94
+ );
95
+
96
+ const groupedOptions = [
97
+ ...primaryOptions,
98
+ ...tableOptions,
99
+ ...tableCellOptions,
100
+ ];
101
+
102
+ const editor = useEditor({
103
+ content: initialValue.current,
104
+ extensions: [
105
+ documentExtension,
106
+ ...baseExtensions,
107
+ ...toolbarAddedExtensions,
108
+ ...otherExtensions,
109
+ ],
110
+ editable: isEditable,
111
+ autofocus: false,
112
+ onUpdate: debounce(({ editor }) => {
113
+ onChange?.(editor.getHTML());
114
+ }, 100),
115
+ });
116
+
117
+ const { refs } = useFloating({
118
+ whileElementsMounted: autoUpdate,
119
+ placement: "top-start",
120
+ middleware: [inline(), offset(2), flip()],
121
+ });
122
+
123
+ const preventPropagation = (event) => {
124
+ event.stopPropagation();
125
+ };
126
+
127
+ useEffect(() => {
128
+ if (refs?.reference?.current) {
129
+ if (disableSpellcheck) {
130
+ refs.reference.current.removeEventListener(
131
+ "contextmenu",
132
+ preventPropagation,
133
+ );
134
+ } else {
135
+ refs.reference.current.addEventListener(
136
+ "contextmenu",
137
+ preventPropagation,
138
+ );
139
+ }
140
+ }
141
+ return () => {
142
+ if (refs?.reference?.current)
143
+ refs.reference.current.removeEventListener(
144
+ "contextmenu",
145
+ preventPropagation,
146
+ );
147
+ };
148
+ }, [refs, disableSpellcheck]);
149
+
150
+ const providerArgs = useMemo(() => ({ editor }), [editor]);
151
+
152
+ // // doing this way, rather than a filter, lets us set an arbitrary order for the button groups
153
+ // const selectedControlGroups = toolbarConfig.map((groupId) =>
154
+ // components.find((configGroup) => configGroup.id === groupId)
155
+ // );
156
+
157
+ const items = groupedOptions.flatMap((group) => group.items || []);
158
+
159
+ // thought about adding the focus to the state,
160
+ // to do away with the useState()
161
+ // but probably fine as is
162
+ // items.push({id: 'editor', active: (editor) => editor.isFocused})
163
+
164
+ useEffect(() => {
165
+ if (autofocus && editor) {
166
+ // timeout required as toolbar position is wrong otherwise
167
+ // similar delay with TinyMCE based editor
168
+ setTimeout(() => {
169
+ editor.chain().focus().run();
170
+ }, 300);
171
+ }
172
+ }, [autofocus]);
173
+
174
+ const selector = ({ editor }) => {
175
+ return items.reduce(
176
+ (
177
+ acc,
178
+ { id, active = () => false, enabled = () => true, value = () => null },
179
+ ) => {
180
+ return {
181
+ ...acc,
182
+ [id]: {
183
+ active: active(editor),
184
+ enabled: enabled(editor),
185
+ value: value(editor),
186
+ },
187
+ };
188
+ },
189
+ {},
190
+ );
191
+ };
192
+
193
+ const editorState = useEditorState({
194
+ editor,
195
+ selector,
196
+ });
197
+
198
+ const classes = [
199
+ "interactive",
200
+ EDITABLE_OUTER_SELECTOR,
201
+ className,
202
+ isEditable && style.editable,
203
+ style.textField,
204
+ ].filter(Boolean);
205
+
206
+ const toolbarOptions = {
207
+ editor,
208
+ editorState,
209
+ maskSelector,
210
+ // For storing user selections outside of the current selected state of the editor
211
+ // eg. Previous selected color, for easy re-use in the same session.
212
+ userSelections: {
213
+ textColor: { value: textColor, setValue: setTextColor },
214
+ },
215
+ };
216
+
217
+ return (
218
+ <EditorContext.Provider value={providerArgs}>
219
+ {isEditable && (
220
+ <>
221
+ <PrimaryToolbar configuration={primaryOptions} {...toolbarOptions} />
222
+ <TableCellMenu configuration={tableCellOptions} {...toolbarOptions} />
223
+ <TableToolbar configuration={tableOptions} {...toolbarOptions} />
224
+ </>
225
+ )}
226
+ <div
227
+ data-companywide-interactive={isEditable}
228
+ className={classes.join(" ")}
229
+ ref={refs.setReference}
230
+ {...other}
231
+ >
232
+ <EditorContent editor={editor} />
233
+ </div>
234
+ </EditorContext.Provider>
235
+ );
236
+ }
237
+
238
+ function PrepEditableField({ id, prepId = id, children, isCompany, ...props }) {
239
+ const { isPresomanager } = useModes();
240
+ const { isUserTemplateLibrary, isUserTemplate } = useSlide();
241
+
242
+ const [defaultCmsValue] = useCMSVal(id, {
243
+ enabled: isCompany && !isPresomanager,
244
+ });
245
+
246
+ const [prepValue, setPrepValue] = usePrepEditable(prepId);
247
+
248
+ let value = isCompany && prepValue === null ? defaultCmsValue : prepValue;
249
+
250
+ const isEditable =
251
+ props.isEditable &&
252
+ (!isPresomanager || isUserTemplateLibrary || isUserTemplate);
253
+
254
+ return (
255
+ <EditableTextField
256
+ {...props}
257
+ value={value ?? renderToString(children)}
258
+ onChange={setPrepValue}
259
+ isEditable={isEditable}
260
+ />
261
+ );
262
+ }
263
+
264
+ function CMSValField({ id, children, ...props }) {
265
+ const { isPresomanager, isThumbnailScreenshot } = useModes();
266
+ const { isUserTemplateLibrary, isUserTemplate } = useSlide();
267
+
268
+ const [cmsValue, setCMSValue] = useCMSVal(id);
269
+ const value = !isThumbnailScreenshot && cmsValue;
270
+
271
+ const isEditable =
272
+ props.isEditable &&
273
+ (isPresomanager || isUserTemplateLibrary || isUserTemplate);
274
+ return (
275
+ <EditableTextField
276
+ {...props}
277
+ value={value ?? renderToString(children)}
278
+ onChange={setCMSValue}
279
+ isEditable={isEditable}
280
+ />
281
+ );
282
+ }
283
+
284
+ export function TextField(props) {
285
+ const { value, children, onChange, isReadOnly, ...other } = props;
286
+
287
+ return (
288
+ <EditableTextField
289
+ value={value ?? renderToString(children)}
290
+ onChange={onChange}
291
+ isEditable={!isReadOnly}
292
+ {...other}
293
+ />
294
+ );
295
+ }
296
+
297
+ export function ManagedTextField(props) {
298
+ const { isPresomanager, isPreview, isEmptyPreview } = useModes();
299
+ const { isUserTemplateLibrary } = useSlide();
300
+ const {
301
+ isReadOnly = false,
302
+ isPrep = false,
303
+ isCompany = false,
304
+ // we only want to pass this to the PrepEditableField, not the CMSValField
305
+ prepId,
306
+ ...other
307
+ } = props;
308
+
309
+ const isEditable = !isReadOnly && (isPresomanager || isPreview);
310
+ const sharedProps = { ...other, isEditable };
311
+
312
+ // occasionally, we want to lock the field and pass a value
313
+ // without it ever being configured to allow updates
314
+ if (!isReadOnly && !isPrep && !isCompany) {
315
+ throw new Error("Must set isPrep or isCompany or both");
316
+ }
317
+
318
+ const isReallyPresoManager = isPresomanager && !isUserTemplateLibrary;
319
+
320
+ if (
321
+ (isPrep && !isReallyPresoManager && !isEmptyPreview) ||
322
+ (isPrep && isReallyPresoManager && !isCompany)
323
+ ) {
324
+ return (
325
+ <PrepEditableField
326
+ isCompany={isCompany}
327
+ prepId={prepId}
328
+ {...sharedProps}
329
+ />
330
+ );
331
+ }
332
+
333
+ return <CMSValField {...sharedProps} />;
334
+ }
@@ -0,0 +1,106 @@
1
+ $interactive-color: #3c80f6;
2
+ $button-color: #f0f0f0;
3
+ $button-hover-color: #e0e0e0;
4
+
5
+ :global(.sp-presenter-overlay) {
6
+ * {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ overflow: hidden;
11
+
12
+ --sp-toolbar-color-white: #ffffff;
13
+ --sp-toolbar-bg-color: var(--sp-toolbar-color-white);
14
+ --sp-toolbar-color: rgb(34, 47, 62);
15
+ --sp-toolbar-modal-bg-color: rgba(255, 255, 255, 0.75);
16
+ --sp-toolbar-separator-color: rgba(0, 0, 0, 0.12);
17
+ --sp-toolbar-highlight-color: rgba(0, 0, 0, 0.38);
18
+ --sp-toolbar-interactive-color: $interactive-color;
19
+ --sp-toolbar-focus-color: #006ce7;
20
+ --sp-toolbar-active-color: #a6ccf7;
21
+ --sp-toolbar-hover-color: #cce2fa;
22
+ --sp-toolbar-select-trigger: #f7f7f7;
23
+ // Buttons
24
+ --sp-toolbar-button: $button-color;
25
+ --sp-toolbar-button-hover: $button-hover-color;
26
+ --sp-toolbar-button-primary: var(--sp-toolbar-focus-color);
27
+ --sp-toolbar-button-primary-hover: #0060ce;
28
+
29
+ a,
30
+ button,
31
+ fieldset,
32
+ input {
33
+ all: unset;
34
+ }
35
+
36
+ .toolbar-container {
37
+ position: fixed;
38
+ top: 0;
39
+ left: 0;
40
+ right: 0;
41
+ bottom: 0;
42
+ }
43
+ }
44
+
45
+ .text-field {
46
+ overflow: hidden;
47
+
48
+ table {
49
+ border-collapse: collapse;
50
+ }
51
+ }
52
+
53
+ .editable {
54
+ outline: 1px solid $interactive-color;
55
+
56
+ > div {
57
+ height: 100%;
58
+ }
59
+
60
+ :global {
61
+ .tiptap {
62
+ height: 100%;
63
+ white-space: pre-wrap;
64
+ outline: none;
65
+
66
+ &.resize-cursor {
67
+ cursor: ew-resize;
68
+ cursor: col-resize;
69
+ }
70
+ }
71
+
72
+ .tableWrapper {
73
+ th,
74
+ td {
75
+ position: relative;
76
+
77
+ &.selectedCell::after {
78
+ content: "";
79
+ position: absolute;
80
+ left: 0;
81
+ right: 0;
82
+ top: 0;
83
+ bottom: 0;
84
+ background-color: rgba(0, 0, 0, 0.15);
85
+ pointer-events: none;
86
+ z-index: 2;
87
+ }
88
+
89
+ &.tiptap-table-cell-dark.selectedCell::after {
90
+ background-color: rgba(255, 255, 255, 0.4);
91
+ }
92
+ }
93
+
94
+ // Loz: I think I broke this...
95
+ .column-resize-handle {
96
+ background-color: $interactive-color;
97
+ bottom: -2px;
98
+ pointer-events: none;
99
+ position: relative;
100
+ right: -2px;
101
+ top: 0;
102
+ width: 4px;
103
+ }
104
+ }
105
+ }
106
+ }
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@livepreso/react-plugin-textfield",
3
+ "version": "0.0.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "devDependencies": {
13
+ "eslint": "~9.15.0",
14
+ "@babel/preset-react": "~7.25.9",
15
+ "react": "18.x",
16
+ "react-dom": "18.x",
17
+ "@babel/parser": "^7.26.10",
18
+ "@babel/traverse": "^7.26.10",
19
+ "@svgr/core": "^8.1.0",
20
+ "@svgr/plugin-jsx": "^8.1.0",
21
+ "@livepreso/eslint-config": "1.0.0"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "18.x",
25
+ "react-dom": "18.x"
26
+ },
27
+ "dependencies": {
28
+ "@floating-ui/react-dom": "~2.1.3",
29
+ "use-sync-external-store": "~1.5.0",
30
+ "classnames": "~2.5.1",
31
+ "radix-ui": "~1.4.2",
32
+ "@radix-ui/react-icons": "~1.3.2",
33
+ "@tiptap/core": "~3.0.6",
34
+ "@tiptap/react": "~3.0.6",
35
+ "@tiptap/pm": "~3.0.6",
36
+ "@tiptap/extension-document": "~3.0.6",
37
+ "@tiptap/extension-paragraph": "~3.0.6",
38
+ "@tiptap/extension-text": "~3.0.6",
39
+ "@tiptap/extension-hard-break": "~3.0.6",
40
+ "@tiptap/extension-heading": "~3.0.6",
41
+ "@tiptap/extension-bubble-menu": "~3.0.6",
42
+ "@tiptap/extension-table": "~3.0.6",
43
+ "@tiptap/extension-table-cell": "~3.0.6",
44
+ "@tiptap/extension-table-header": "~3.0.6",
45
+ "@tiptap/extension-table-row": "~3.0.6",
46
+ "@tiptap/extension-image": "~3.0.6",
47
+ "@tiptap/extension-text-align": "~3.0.6",
48
+ "@tiptap/extension-underline": "~3.0.6",
49
+ "@tiptap/extension-link": "~3.0.6",
50
+ "@tiptap/extension-bold": "~3.0.6",
51
+ "@tiptap/extension-italic": "~3.0.6",
52
+ "@tiptap/extension-list": "~3.0.6",
53
+ "@tiptap/extension-text-style": "~3.0.6",
54
+ "@tiptap/extensions": "~3.0.6",
55
+ "@tiptap/extension-subscript": "~3.0.6",
56
+ "@tiptap/extension-superscript": "~3.0.6",
57
+ "lodash.debounce": "~4.0.8",
58
+ "@livepreso/content-react": "2.0.0"
59
+ },
60
+ "scripts": {
61
+ "build": ""
62
+ }
63
+ }