@tumaet/prompt-ui-components 0.0.5 → 0.0.7

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 (161) hide show
  1. package/dist/components/index.js +1 -1
  2. package/dist/components/index.js.map +1 -1
  3. package/dist/index.css +1036 -96
  4. package/dist/types/components/index.d.ts +0 -1
  5. package/package.json +4 -3
  6. package/src/index.css +1 -24
  7. package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js +0 -65
  8. package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js.map +0 -1
  9. package/dist/components/minimal-tiptap/components/image/image-edit-block.js +0 -38
  10. package/dist/components/minimal-tiptap/components/image/image-edit-block.js.map +0 -1
  11. package/dist/components/minimal-tiptap/components/image/image-edit-dialog.js +0 -12
  12. package/dist/components/minimal-tiptap/components/image/image-edit-dialog.js.map +0 -1
  13. package/dist/components/minimal-tiptap/components/link/link-edit-block.js +0 -34
  14. package/dist/components/minimal-tiptap/components/link/link-edit-block.js.map +0 -1
  15. package/dist/components/minimal-tiptap/components/link/link-edit-popover.js +0 -38
  16. package/dist/components/minimal-tiptap/components/link/link-edit-popover.js.map +0 -1
  17. package/dist/components/minimal-tiptap/components/link/link-popover-block.js +0 -28
  18. package/dist/components/minimal-tiptap/components/link/link-popover-block.js.map +0 -1
  19. package/dist/components/minimal-tiptap/components/measured-container.js +0 -16
  20. package/dist/components/minimal-tiptap/components/measured-container.js.map +0 -1
  21. package/dist/components/minimal-tiptap/components/section/five.js +0 -39
  22. package/dist/components/minimal-tiptap/components/section/five.js.map +0 -1
  23. package/dist/components/minimal-tiptap/components/section/four.js +0 -29
  24. package/dist/components/minimal-tiptap/components/section/four.js.map +0 -1
  25. package/dist/components/minimal-tiptap/components/section/mailingPlaceholders.js +0 -23
  26. package/dist/components/minimal-tiptap/components/section/mailingPlaceholders.js.map +0 -1
  27. package/dist/components/minimal-tiptap/components/section/one.js +0 -77
  28. package/dist/components/minimal-tiptap/components/section/one.js.map +0 -1
  29. package/dist/components/minimal-tiptap/components/section/three.js +0 -79
  30. package/dist/components/minimal-tiptap/components/section/three.js.map +0 -1
  31. package/dist/components/minimal-tiptap/components/section/two.js +0 -65
  32. package/dist/components/minimal-tiptap/components/section/two.js.map +0 -1
  33. package/dist/components/minimal-tiptap/components/shortcut-key.js +0 -11
  34. package/dist/components/minimal-tiptap/components/shortcut-key.js.map +0 -1
  35. package/dist/components/minimal-tiptap/components/spinner.js +0 -9
  36. package/dist/components/minimal-tiptap/components/spinner.js.map +0 -1
  37. package/dist/components/minimal-tiptap/components/toolbar-button.js +0 -15
  38. package/dist/components/minimal-tiptap/components/toolbar-button.js.map +0 -1
  39. package/dist/components/minimal-tiptap/components/toolbar-section.js +0 -27
  40. package/dist/components/minimal-tiptap/components/toolbar-section.js.map +0 -1
  41. package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js +0 -16
  42. package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js.map +0 -1
  43. package/dist/components/minimal-tiptap/extensions/code-block-lowlight/index.js +0 -2
  44. package/dist/components/minimal-tiptap/extensions/code-block-lowlight/index.js.map +0 -1
  45. package/dist/components/minimal-tiptap/extensions/color/color.js +0 -20
  46. package/dist/components/minimal-tiptap/extensions/color/color.js.map +0 -1
  47. package/dist/components/minimal-tiptap/extensions/color/index.js +0 -2
  48. package/dist/components/minimal-tiptap/extensions/color/index.js.map +0 -1
  49. package/dist/components/minimal-tiptap/extensions/file-handler/index.js +0 -74
  50. package/dist/components/minimal-tiptap/extensions/file-handler/index.js.map +0 -1
  51. package/dist/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.js +0 -16
  52. package/dist/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.js.map +0 -1
  53. package/dist/components/minimal-tiptap/extensions/horizontal-rule/index.js +0 -2
  54. package/dist/components/minimal-tiptap/extensions/horizontal-rule/index.js.map +0 -1
  55. package/dist/components/minimal-tiptap/extensions/image/components/image-actions.js +0 -39
  56. package/dist/components/minimal-tiptap/extensions/image/components/image-actions.js.map +0 -1
  57. package/dist/components/minimal-tiptap/extensions/image/components/image-overlay.js +0 -9
  58. package/dist/components/minimal-tiptap/extensions/image/components/image-overlay.js.map +0 -1
  59. package/dist/components/minimal-tiptap/extensions/image/components/image-view-block.js +0 -167
  60. package/dist/components/minimal-tiptap/extensions/image/components/image-view-block.js.map +0 -1
  61. package/dist/components/minimal-tiptap/extensions/image/components/resize-handle.js +0 -11
  62. package/dist/components/minimal-tiptap/extensions/image/components/resize-handle.js.map +0 -1
  63. package/dist/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.js +0 -88
  64. package/dist/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.js.map +0 -1
  65. package/dist/components/minimal-tiptap/extensions/image/hooks/use-image-actions.js +0 -32
  66. package/dist/components/minimal-tiptap/extensions/image/hooks/use-image-actions.js.map +0 -1
  67. package/dist/components/minimal-tiptap/extensions/image/image.js +0 -225
  68. package/dist/components/minimal-tiptap/extensions/image/image.js.map +0 -1
  69. package/dist/components/minimal-tiptap/extensions/image/index.js +0 -2
  70. package/dist/components/minimal-tiptap/extensions/image/index.js.map +0 -1
  71. package/dist/components/minimal-tiptap/extensions/index.js +0 -10
  72. package/dist/components/minimal-tiptap/extensions/index.js.map +0 -1
  73. package/dist/components/minimal-tiptap/extensions/link/index.js +0 -2
  74. package/dist/components/minimal-tiptap/extensions/link/index.js.map +0 -1
  75. package/dist/components/minimal-tiptap/extensions/link/link.js +0 -74
  76. package/dist/components/minimal-tiptap/extensions/link/link.js.map +0 -1
  77. package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/index.js +0 -2
  78. package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/index.js.map +0 -1
  79. package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.js +0 -20
  80. package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.js.map +0 -1
  81. package/dist/components/minimal-tiptap/extensions/selection/index.js +0 -2
  82. package/dist/components/minimal-tiptap/extensions/selection/index.js.map +0 -1
  83. package/dist/components/minimal-tiptap/extensions/selection/selection.js +0 -31
  84. package/dist/components/minimal-tiptap/extensions/selection/selection.js.map +0 -1
  85. package/dist/components/minimal-tiptap/extensions/unset-all-marks/index.js +0 -2
  86. package/dist/components/minimal-tiptap/extensions/unset-all-marks/index.js.map +0 -1
  87. package/dist/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.js +0 -9
  88. package/dist/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.js.map +0 -1
  89. package/dist/components/minimal-tiptap/form-description-tiptap.js +0 -26
  90. package/dist/components/minimal-tiptap/form-description-tiptap.js.map +0 -1
  91. package/dist/components/minimal-tiptap/hooks/use-container-size.js +0 -44
  92. package/dist/components/minimal-tiptap/hooks/use-container-size.js.map +0 -1
  93. package/dist/components/minimal-tiptap/hooks/use-minimal-tiptap.js +0 -160
  94. package/dist/components/minimal-tiptap/hooks/use-minimal-tiptap.js.map +0 -1
  95. package/dist/components/minimal-tiptap/hooks/use-theme.js +0 -19
  96. package/dist/components/minimal-tiptap/hooks/use-theme.js.map +0 -1
  97. package/dist/components/minimal-tiptap/hooks/use-throttle.js +0 -24
  98. package/dist/components/minimal-tiptap/hooks/use-throttle.js.map +0 -1
  99. package/dist/components/minimal-tiptap/index.js +0 -2
  100. package/dist/components/minimal-tiptap/index.js.map +0 -1
  101. package/dist/components/minimal-tiptap/mailing-tiptap.js +0 -30
  102. package/dist/components/minimal-tiptap/mailing-tiptap.js.map +0 -1
  103. package/dist/components/minimal-tiptap/minimal-tiptap.js +0 -29
  104. package/dist/components/minimal-tiptap/minimal-tiptap.js.map +0 -1
  105. package/dist/components/minimal-tiptap/types.js +0 -2
  106. package/dist/components/minimal-tiptap/types.js.map +0 -1
  107. package/dist/components/minimal-tiptap/utils.js +0 -156
  108. package/dist/components/minimal-tiptap/utils.js.map +0 -1
  109. package/dist/types/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.d.ts +0 -7
  110. package/dist/types/components/minimal-tiptap/components/image/image-edit-block.d.ts +0 -8
  111. package/dist/types/components/minimal-tiptap/components/image/image-edit-dialog.d.ts +0 -8
  112. package/dist/types/components/minimal-tiptap/components/link/link-edit-block.d.ts +0 -9
  113. package/dist/types/components/minimal-tiptap/components/link/link-edit-popover.d.ts +0 -8
  114. package/dist/types/components/minimal-tiptap/components/link/link-popover-block.d.ts +0 -8
  115. package/dist/types/components/minimal-tiptap/components/measured-container.d.ts +0 -2
  116. package/dist/types/components/minimal-tiptap/components/section/five.d.ts +0 -12
  117. package/dist/types/components/minimal-tiptap/components/section/four.d.ts +0 -12
  118. package/dist/types/components/minimal-tiptap/components/section/mailingPlaceholders.d.ts +0 -10
  119. package/dist/types/components/minimal-tiptap/components/section/one.d.ts +0 -11
  120. package/dist/types/components/minimal-tiptap/components/section/three.d.ts +0 -9
  121. package/dist/types/components/minimal-tiptap/components/section/two.d.ts +0 -12
  122. package/dist/types/components/minimal-tiptap/components/shortcut-key.d.ts +0 -5
  123. package/dist/types/components/minimal-tiptap/components/spinner.d.ts +0 -5
  124. package/dist/types/components/minimal-tiptap/components/toolbar-button.d.ts +0 -10
  125. package/dist/types/components/minimal-tiptap/components/toolbar-section.d.ts +0 -16
  126. package/dist/types/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.d.ts +0 -2
  127. package/dist/types/components/minimal-tiptap/extensions/code-block-lowlight/index.d.ts +0 -1
  128. package/dist/types/components/minimal-tiptap/extensions/color/color.d.ts +0 -1
  129. package/dist/types/components/minimal-tiptap/extensions/color/index.d.ts +0 -1
  130. package/dist/types/components/minimal-tiptap/extensions/file-handler/index.d.ts +0 -12
  131. package/dist/types/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.d.ts +0 -2
  132. package/dist/types/components/minimal-tiptap/extensions/horizontal-rule/index.d.ts +0 -1
  133. package/dist/types/components/minimal-tiptap/extensions/image/components/image-actions.d.ts +0 -17
  134. package/dist/types/components/minimal-tiptap/extensions/image/components/image-overlay.d.ts +0 -2
  135. package/dist/types/components/minimal-tiptap/extensions/image/components/image-view-block.d.ts +0 -3
  136. package/dist/types/components/minimal-tiptap/extensions/image/components/resize-handle.d.ts +0 -6
  137. package/dist/types/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.d.ts +0 -24
  138. package/dist/types/components/minimal-tiptap/extensions/image/hooks/use-image-actions.d.ts +0 -24
  139. package/dist/types/components/minimal-tiptap/extensions/image/image.d.ts +0 -52
  140. package/dist/types/components/minimal-tiptap/extensions/image/index.d.ts +0 -1
  141. package/dist/types/components/minimal-tiptap/extensions/index.d.ts +0 -9
  142. package/dist/types/components/minimal-tiptap/extensions/link/index.d.ts +0 -1
  143. package/dist/types/components/minimal-tiptap/extensions/link/link.d.ts +0 -2
  144. package/dist/types/components/minimal-tiptap/extensions/reset-marks-on-enter/index.d.ts +0 -1
  145. package/dist/types/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.d.ts +0 -2
  146. package/dist/types/components/minimal-tiptap/extensions/selection/index.d.ts +0 -1
  147. package/dist/types/components/minimal-tiptap/extensions/selection/selection.d.ts +0 -3
  148. package/dist/types/components/minimal-tiptap/extensions/unset-all-marks/index.d.ts +0 -1
  149. package/dist/types/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.d.ts +0 -2
  150. package/dist/types/components/minimal-tiptap/form-description-tiptap.d.ts +0 -4
  151. package/dist/types/components/minimal-tiptap/hooks/use-container-size.d.ts +0 -1
  152. package/dist/types/components/minimal-tiptap/hooks/use-minimal-tiptap.d.ts +0 -13
  153. package/dist/types/components/minimal-tiptap/hooks/use-theme.d.ts +0 -2
  154. package/dist/types/components/minimal-tiptap/hooks/use-throttle.d.ts +0 -1
  155. package/dist/types/components/minimal-tiptap/index.d.ts +0 -1
  156. package/dist/types/components/minimal-tiptap/mailing-tiptap.d.ts +0 -13
  157. package/dist/types/components/minimal-tiptap/minimal-tiptap.d.ts +0 -12
  158. package/dist/types/components/minimal-tiptap/types.d.ts +0 -25
  159. package/dist/types/components/minimal-tiptap/utils.d.ts +0 -38
  160. package/tailwind/postcss.config.js +0 -7
  161. package/tailwind/tailwind.config.js +0 -69
@@ -1,156 +0,0 @@
1
- export const isClient = () => typeof window !== 'undefined';
2
- export const isServer = () => !isClient();
3
- export const isMacOS = () => isClient() && window.navigator.platform === 'MacIntel';
4
- const shortcutKeyMap = {
5
- mod: isMacOS() ? { symbol: '⌘', readable: 'Command' } : { symbol: 'Ctrl', readable: 'Control' },
6
- alt: isMacOS() ? { symbol: '⌥', readable: 'Option' } : { symbol: 'Alt', readable: 'Alt' },
7
- shift: { symbol: '⇧', readable: 'Shift' }
8
- };
9
- export const getShortcutKey = (key) => shortcutKeyMap[key.toLowerCase()] || { symbol: key, readable: key };
10
- export const getShortcutKeys = (keys) => keys.map(getShortcutKey);
11
- export const getOutput = (editor, format) => {
12
- switch (format) {
13
- case 'json':
14
- return editor.getJSON();
15
- case 'html':
16
- return editor.isEmpty ? '' : editor.getHTML();
17
- default:
18
- return editor.getText();
19
- }
20
- };
21
- export const isUrl = (text, options = { requireHostname: false }) => {
22
- if (text.includes('\n'))
23
- return false;
24
- try {
25
- const url = new URL(text);
26
- const blockedProtocols = ['javascript:', 'file:', 'vbscript:', ...(options.allowBase64 ? [] : ['data:'])];
27
- if (blockedProtocols.includes(url.protocol))
28
- return false;
29
- if (options.allowBase64 && url.protocol === 'data:')
30
- return /^data:image\/[a-z]+;base64,/.test(text);
31
- if (url.hostname)
32
- return true;
33
- return (url.protocol !== '' &&
34
- (url.pathname.startsWith('//') || url.pathname.startsWith('http')) &&
35
- !options.requireHostname);
36
- }
37
- catch {
38
- return false;
39
- }
40
- };
41
- export const sanitizeUrl = (url, options = {}) => {
42
- if (!url)
43
- return undefined;
44
- if (options.allowBase64 && url.startsWith('data:image')) {
45
- return isUrl(url, { requireHostname: false, allowBase64: true }) ? url : undefined;
46
- }
47
- return isUrl(url, { requireHostname: false, allowBase64: options.allowBase64 }) ||
48
- /^(\/|#|mailto:|sms:|fax:|tel:)/.test(url)
49
- ? url
50
- : `https://${url}`;
51
- };
52
- export const blobUrlToBase64 = async (blobUrl) => {
53
- const response = await fetch(blobUrl);
54
- const blob = await response.blob();
55
- return new Promise((resolve, reject) => {
56
- const reader = new FileReader();
57
- reader.onloadend = () => {
58
- if (typeof reader.result === 'string') {
59
- resolve(reader.result);
60
- }
61
- else {
62
- reject(new Error('Failed to convert Blob to base64'));
63
- }
64
- };
65
- reader.onerror = reject;
66
- reader.readAsDataURL(blob);
67
- });
68
- };
69
- export const randomId = () => Math.random().toString(36).slice(2, 11);
70
- export const fileToBase64 = (file) => {
71
- return new Promise((resolve, reject) => {
72
- const reader = new FileReader();
73
- reader.onloadend = () => {
74
- if (typeof reader.result === 'string') {
75
- resolve(reader.result);
76
- }
77
- else {
78
- reject(new Error('Failed to convert File to base64'));
79
- }
80
- };
81
- reader.onerror = reject;
82
- reader.readAsDataURL(file);
83
- });
84
- };
85
- const validateFileOrBase64 = (input, options, originalFile, validFiles, errors) => {
86
- const { isValidType, isValidSize } = checkTypeAndSize(input, options);
87
- if (isValidType && isValidSize) {
88
- validFiles.push(originalFile);
89
- }
90
- else {
91
- if (!isValidType)
92
- errors.push({ file: input, reason: 'type' });
93
- if (!isValidSize)
94
- errors.push({ file: input, reason: 'size' });
95
- }
96
- };
97
- const checkTypeAndSize = (input, { allowedMimeTypes, maxFileSize }) => {
98
- const mimeType = input instanceof File ? input.type : base64MimeType(input);
99
- const size = input instanceof File ? input.size : atob(input.split(',')[1]).length;
100
- const isValidType = allowedMimeTypes.length === 0 ||
101
- allowedMimeTypes.includes(mimeType) ||
102
- allowedMimeTypes.includes(`${mimeType.split('/')[0]}/*`);
103
- const isValidSize = !maxFileSize || size <= maxFileSize;
104
- return { isValidType, isValidSize };
105
- };
106
- const base64MimeType = (encoded) => {
107
- const result = encoded.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);
108
- return result && result.length > 1 ? result[1] : 'unknown';
109
- };
110
- const isBase64 = (str) => {
111
- if (str.startsWith('data:')) {
112
- const matches = str.match(/^data:[^;]+;base64,(.+)$/);
113
- if (matches && matches[1]) {
114
- str = matches[1];
115
- }
116
- else {
117
- return false;
118
- }
119
- }
120
- try {
121
- return btoa(atob(str)) === str;
122
- }
123
- catch {
124
- return false;
125
- }
126
- };
127
- export const filterFiles = (files, options) => {
128
- const validFiles = [];
129
- const errors = [];
130
- files.forEach(file => {
131
- const actualFile = 'src' in file ? file.src : file;
132
- if (actualFile instanceof File) {
133
- validateFileOrBase64(actualFile, options, file, validFiles, errors);
134
- }
135
- else if (typeof actualFile === 'string') {
136
- if (isBase64(actualFile)) {
137
- if (options.allowBase64) {
138
- validateFileOrBase64(actualFile, options, file, validFiles, errors);
139
- }
140
- else {
141
- errors.push({ file: actualFile, reason: 'base64NotAllowed' });
142
- }
143
- }
144
- else {
145
- if (!sanitizeUrl(actualFile, { allowBase64: options.allowBase64 })) {
146
- errors.push({ file: actualFile, reason: 'invalidBase64' });
147
- }
148
- else {
149
- validFiles.push(file);
150
- }
151
- }
152
- }
153
- });
154
- return [validFiles, errors];
155
- };
156
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/minimal-tiptap/utils.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAY,EAAE,CAAC,OAAO,MAAM,KAAK,WAAW,CAAA;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAA;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAY,EAAE,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAA;AAE5F,MAAM,cAAc,GAAsC;IACxD,GAAG,EAAE,OAAO,EAAE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AAC,CAAC,CAAA;IAEF,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAC7B,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- interface LinkBubbleMenuProps {
4
- editor: Editor;
5
- }
6
- export declare const LinkBubbleMenu: React.FC<LinkBubbleMenuProps>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- interface ImageEditBlockProps {
4
- editor: Editor;
5
- close: () => void;
6
- }
7
- export declare const ImageEditBlock: React.FC<ImageEditBlockProps>;
8
- export default ImageEditBlock;
@@ -1,8 +0,0 @@
1
- import type { Editor } from '@tiptap/react';
2
- import type { VariantProps } from 'class-variance-authority';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- interface ImageEditDialogProps extends VariantProps<typeof toggleVariants> {
5
- editor: Editor;
6
- }
7
- declare const ImageEditDialog: ({ editor, size, variant }: ImageEditDialogProps) => import("react/jsx-runtime").JSX.Element;
8
- export { ImageEditDialog };
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- export interface LinkEditorProps extends React.HTMLAttributes<HTMLDivElement> {
3
- defaultUrl?: string;
4
- defaultText?: string;
5
- defaultIsNewTab?: boolean;
6
- onSave: (url: string, text?: string, isNewTab?: boolean) => void;
7
- }
8
- export declare const LinkEditBlock: React.ForwardRefExoticComponent<LinkEditorProps & React.RefAttributes<HTMLDivElement>>;
9
- export default LinkEditBlock;
@@ -1,8 +0,0 @@
1
- import type { Editor } from '@tiptap/react';
2
- import type { VariantProps } from 'class-variance-authority';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- interface LinkEditPopoverProps extends VariantProps<typeof toggleVariants> {
5
- editor: Editor;
6
- }
7
- declare const LinkEditPopover: ({ editor, size, variant }: LinkEditPopoverProps) => import("react/jsx-runtime").JSX.Element;
8
- export { LinkEditPopover };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- interface LinkPopoverBlockProps {
3
- url: string;
4
- onClear: () => void;
5
- onEdit: (e: React.MouseEvent<HTMLButtonElement>) => void;
6
- }
7
- export declare const LinkPopoverBlock: React.FC<LinkPopoverBlockProps>;
8
- export {};
@@ -1,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare const MeasuredContainer: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- import type { VariantProps } from 'class-variance-authority';
5
- type InsertElementAction = 'codeBlock' | 'blockquote' | 'horizontalRule';
6
- interface SectionFiveProps extends VariantProps<typeof toggleVariants> {
7
- editor: Editor;
8
- activeActions?: InsertElementAction[];
9
- mainActionCount?: number;
10
- }
11
- export declare const SectionFive: React.FC<SectionFiveProps>;
12
- export default SectionFive;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- import type { VariantProps } from 'class-variance-authority';
5
- type ListItemAction = 'orderedList' | 'bulletList';
6
- interface SectionFourProps extends VariantProps<typeof toggleVariants> {
7
- editor: Editor;
8
- activeActions?: ListItemAction[];
9
- mainActionCount?: number;
10
- }
11
- export declare const SectionFour: React.FC<SectionFourProps>;
12
- export default SectionFour;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- import type { VariantProps } from 'class-variance-authority';
5
- interface SectionMailingPlaceholderProps extends VariantProps<typeof toggleVariants> {
6
- editor: Editor;
7
- placeholders: string[];
8
- }
9
- export declare const SectionMailingPlaceholders: React.FC<SectionMailingPlaceholderProps>;
10
- export default SectionMailingPlaceholders;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { Level } from '@tiptap/extension-heading';
4
- import type { VariantProps } from 'class-variance-authority';
5
- import type { toggleVariants } from '../../../../../components/ui/toggle';
6
- interface SectionOneProps extends VariantProps<typeof toggleVariants> {
7
- editor: Editor;
8
- activeLevels?: Level[];
9
- }
10
- export declare const SectionOne: React.FC<SectionOneProps>;
11
- export default SectionOne;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- import type { VariantProps } from 'class-variance-authority';
5
- interface SectionThreeProps extends VariantProps<typeof toggleVariants> {
6
- editor: Editor;
7
- }
8
- export declare const SectionThree: React.FC<SectionThreeProps>;
9
- export default SectionThree;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { toggleVariants } from '../../../../../components/ui/toggle';
4
- import type { VariantProps } from 'class-variance-authority';
5
- type TextStyleAction = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'clearFormatting';
6
- interface SectionTwoProps extends VariantProps<typeof toggleVariants> {
7
- editor: Editor;
8
- activeActions?: TextStyleAction[];
9
- mainActionCount?: number;
10
- }
11
- export declare const SectionTwo: React.FC<SectionTwoProps>;
12
- export default SectionTwo;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface ShortcutKeyProps extends React.HTMLAttributes<HTMLSpanElement> {
3
- keys: string[];
4
- }
5
- export declare const ShortcutKey: React.ForwardRefExoticComponent<ShortcutKeyProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- interface SpinnerProps extends React.SVGProps<SVGSVGElement> {
3
- }
4
- export declare const Spinner: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React.RefAttributes<SVGSVGElement>>>;
5
- export {};
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import type { TooltipContentProps } from '@radix-ui/react-tooltip';
3
- import { Toggle } from '../../../../components/ui/toggle';
4
- interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toggle> {
5
- isActive?: boolean;
6
- tooltip?: string;
7
- tooltipOptions?: TooltipContentProps;
8
- }
9
- export declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
- export default ToolbarButton;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import type { Editor } from '@tiptap/react';
3
- import type { FormatAction } from '../types';
4
- import type { VariantProps } from 'class-variance-authority';
5
- import type { toggleVariants } from '../../../../components/ui/toggle';
6
- interface ToolbarSectionProps extends VariantProps<typeof toggleVariants> {
7
- editor: Editor;
8
- actions: FormatAction[];
9
- activeActions?: string[];
10
- mainActionCount?: number;
11
- dropdownIcon?: React.ReactNode;
12
- dropdownTooltip?: string;
13
- dropdownClassName?: string;
14
- }
15
- export declare const ToolbarSection: React.FC<ToolbarSectionProps>;
16
- export default ToolbarSection;
@@ -1,2 +0,0 @@
1
- export declare const CodeBlockLowlight: import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any>;
2
- export default CodeBlockLowlight;
@@ -1 +0,0 @@
1
- export * from './code-block-lowlight';
@@ -1 +0,0 @@
1
- export declare const Color: import("@tiptap/core").Extension<import("@tiptap/extension-color").ColorOptions, any>;
@@ -1 +0,0 @@
1
- export * from './color';
@@ -1,12 +0,0 @@
1
- import { type Editor, Extension } from '@tiptap/react';
2
- import { PluginKey } from '@tiptap/pm/state';
3
- import type { FileError, FileValidationOptions } from '../../utils';
4
- type FileHandlePluginOptions = {
5
- key?: PluginKey;
6
- editor: Editor;
7
- onPaste?: (editor: Editor, files: File[], pasteContent?: string) => void;
8
- onDrop?: (editor: Editor, files: File[], pos: number) => void;
9
- onValidationError?: (errors: FileError[]) => void;
10
- } & FileValidationOptions;
11
- export declare const FileHandler: Extension<Omit<FileHandlePluginOptions, "key" | "editor">, any>;
12
- export {};
@@ -1,2 +0,0 @@
1
- export declare const HorizontalRule: import("@tiptap/core").Node<import("@tiptap/extension-horizontal-rule").HorizontalRuleOptions, any>;
2
- export default HorizontalRule;
@@ -1 +0,0 @@
1
- export * from './horizontal-rule';
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- interface ImageActionsProps {
3
- shouldMerge?: boolean;
4
- isLink?: boolean;
5
- onView?: () => void;
6
- onDownload?: () => void;
7
- onCopy?: () => void;
8
- onCopyLink?: () => void;
9
- }
10
- interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
- icon: React.ReactNode;
12
- tooltip: string;
13
- }
14
- export declare const ActionWrapper: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>>;
15
- export declare const ActionButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<ActionButtonProps & React.RefAttributes<HTMLButtonElement>>>;
16
- export declare const ImageActions: React.FC<ImageActionsProps>;
17
- export {};
@@ -1,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare const ImageOverlay: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { type NodeViewProps } from '@tiptap/react';
3
- export declare const ImageViewBlock: React.FC<NodeViewProps>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- interface ResizeProps extends React.HTMLAttributes<HTMLDivElement> {
3
- isResizing?: boolean;
4
- }
5
- export declare const ResizeHandle: React.ForwardRefExoticComponent<ResizeProps & React.RefAttributes<HTMLDivElement>>;
6
- export {};
@@ -1,24 +0,0 @@
1
- type ResizeDirection = 'left' | 'right';
2
- export type ElementDimensions = {
3
- width: number;
4
- height: number;
5
- };
6
- type HookParams = {
7
- initialWidth?: number;
8
- initialHeight?: number;
9
- contentWidth?: number;
10
- contentHeight?: number;
11
- gridInterval: number;
12
- minWidth: number;
13
- minHeight: number;
14
- maxWidth: number;
15
- onDimensionsChange?: (dimensions: ElementDimensions) => void;
16
- };
17
- export declare function useDragResize({ initialWidth, initialHeight, contentWidth, contentHeight, gridInterval, minWidth, minHeight, maxWidth, onDimensionsChange }: HookParams): {
18
- initiateResize: (direction: ResizeDirection) => (event: React.PointerEvent<HTMLDivElement>) => void;
19
- isResizing: boolean;
20
- updateDimensions: import("react").Dispatch<import("react").SetStateAction<ElementDimensions>>;
21
- currentWidth: number;
22
- currentHeight: number;
23
- };
24
- export {};
@@ -1,24 +0,0 @@
1
- import type { Editor } from '@tiptap/react';
2
- import type { Node } from '@tiptap/pm/model';
3
- interface UseImageActionsProps {
4
- editor: Editor;
5
- node: Node;
6
- src: string;
7
- onViewClick: (value: boolean) => void;
8
- }
9
- export type ImageActionHandlers = {
10
- onView?: () => void;
11
- onDownload?: () => void;
12
- onCopy?: () => void;
13
- onCopyLink?: () => void;
14
- onRemoveImg?: () => void;
15
- };
16
- export declare const useImageActions: ({ editor, node, src, onViewClick }: UseImageActionsProps) => {
17
- isLink: boolean;
18
- onView: () => void;
19
- onDownload: () => void;
20
- onCopy: () => void;
21
- onCopyLink: () => void;
22
- onRemoveImg: () => void;
23
- };
24
- export {};
@@ -1,52 +0,0 @@
1
- import type { ImageOptions } from '@tiptap/extension-image';
2
- import type { Editor } from '@tiptap/react';
3
- import { type FileError, type FileValidationOptions } from '../../utils';
4
- import type { Attrs } from '@tiptap/pm/model';
5
- type ImageAction = 'download' | 'copyImage' | 'copyLink';
6
- interface DownloadImageCommandProps {
7
- src: string;
8
- alt?: string;
9
- }
10
- interface ImageActionProps extends DownloadImageCommandProps {
11
- action: ImageAction;
12
- }
13
- export type UploadReturnType = string | {
14
- id: string | number;
15
- src: string;
16
- };
17
- interface CustomImageOptions extends ImageOptions, Omit<FileValidationOptions, 'allowBase64'> {
18
- uploadFn?: (file: File, editor: Editor) => Promise<UploadReturnType>;
19
- onImageRemoved?: (props: Attrs) => void;
20
- onActionSuccess?: (props: ImageActionProps) => void;
21
- onActionError?: (error: Error, props: ImageActionProps) => void;
22
- downloadImage?: (props: ImageActionProps, options: CustomImageOptions) => Promise<void>;
23
- copyImage?: (props: ImageActionProps, options: CustomImageOptions) => Promise<void>;
24
- copyLink?: (props: ImageActionProps, options: CustomImageOptions) => Promise<void>;
25
- onValidationError?: (errors: FileError[]) => void;
26
- onToggle?: (editor: Editor, files: File[], pos: number) => void;
27
- }
28
- declare module '@tiptap/react' {
29
- interface Commands<ReturnType> {
30
- setImages: {
31
- setImages: (attrs: {
32
- src: string | File;
33
- alt?: string;
34
- title?: string;
35
- }[]) => ReturnType;
36
- };
37
- downloadImage: {
38
- downloadImage: (attrs: DownloadImageCommandProps) => ReturnType;
39
- };
40
- copyImage: {
41
- copyImage: (attrs: DownloadImageCommandProps) => ReturnType;
42
- };
43
- copyLink: {
44
- copyLink: (attrs: DownloadImageCommandProps) => ReturnType;
45
- };
46
- toggleImage: {
47
- toggleImage: () => ReturnType;
48
- };
49
- }
50
- }
51
- export declare const Image: import("@tiptap/react").Node<CustomImageOptions, any>;
52
- export {};
@@ -1 +0,0 @@
1
- export * from './image';
@@ -1,9 +0,0 @@
1
- export * from './code-block-lowlight';
2
- export * from './color';
3
- export * from './horizontal-rule';
4
- export * from './image';
5
- export * from './link';
6
- export * from './selection';
7
- export * from './unset-all-marks';
8
- export * from './reset-marks-on-enter';
9
- export * from './file-handler';
@@ -1 +0,0 @@
1
- export * from './link';
@@ -1,2 +0,0 @@
1
- export declare const Link: import("@tiptap/react").Mark<import("@tiptap/extension-link").LinkOptions, any>;
2
- export default Link;
@@ -1 +0,0 @@
1
- export * from './reset-marks-on-enter';
@@ -1,2 +0,0 @@
1
- import { Extension } from '@tiptap/react';
2
- export declare const ResetMarksOnEnter: Extension<any, any>;
@@ -1 +0,0 @@
1
- export * from './selection';
@@ -1,3 +0,0 @@
1
- import { Extension } from '@tiptap/react';
2
- export declare const Selection: Extension<any, any>;
3
- export default Selection;
@@ -1 +0,0 @@
1
- export * from './unset-all-marks';
@@ -1,2 +0,0 @@
1
- import { Extension } from '@tiptap/react';
2
- export declare const UnsetAllMarks: Extension<any, any>;
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import './styles/index.css';
3
- import { MinimalTiptapProps } from './minimal-tiptap';
4
- export declare const DescriptionMinimalTiptapEditor: React.ForwardRefExoticComponent<MinimalTiptapProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +0,0 @@
1
- export declare function useContainerSize(element: HTMLElement | null): DOMRect;
@@ -1,13 +0,0 @@
1
- import type { Editor } from '@tiptap/react';
2
- import type { Content, UseEditorOptions } from '@tiptap/react';
3
- export interface UseMinimalTiptapEditorProps extends UseEditorOptions {
4
- value?: Content;
5
- output?: 'html' | 'json' | 'text';
6
- placeholder?: string;
7
- editorClassName?: string;
8
- throttleDelay?: number;
9
- onUpdate?: (content: Content) => void;
10
- onBlur?: (content: Content) => void;
11
- }
12
- export declare const useMinimalTiptapEditor: ({ value, output, placeholder, editorClassName, throttleDelay, onUpdate, onBlur, ...props }: UseMinimalTiptapEditorProps) => Editor | null;
13
- export default useMinimalTiptapEditor;
@@ -1,2 +0,0 @@
1
- export declare const useTheme: () => boolean;
2
- export default useTheme;
@@ -1 +0,0 @@
1
- export declare function useThrottle<T extends (...args: any[]) => void>(callback: T, delay: number): (...args: Parameters<T>) => void;
@@ -1 +0,0 @@
1
- export * from './minimal-tiptap';
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import './styles/index.css';
3
- import type { Content } from '@tiptap/react';
4
- import type { UseMinimalTiptapEditorProps } from './hooks/use-minimal-tiptap';
5
- export interface MailingTiptapProps extends Omit<UseMinimalTiptapEditorProps, 'onUpdate'> {
6
- value?: Content;
7
- onChange?: (value: Content) => void;
8
- className?: string;
9
- editorContentClassName?: string;
10
- placeholders: string[];
11
- }
12
- export declare const MailingTiptapEditor: React.ForwardRefExoticComponent<MailingTiptapProps & React.RefAttributes<HTMLDivElement>>;
13
- export default MailingTiptapEditor;