@tumaet/prompt-ui-components 0.0.10 → 0.0.12
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/dist/components/index.js +10 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js +65 -0
- package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js.map +1 -0
- package/dist/components/minimal-tiptap/components/image/image-edit-block.js +38 -0
- package/dist/components/minimal-tiptap/components/image/image-edit-block.js.map +1 -0
- package/dist/components/minimal-tiptap/components/image/image-edit-dialog.js +12 -0
- package/dist/components/minimal-tiptap/components/image/image-edit-dialog.js.map +1 -0
- package/dist/components/minimal-tiptap/components/link/link-edit-block.js +34 -0
- package/dist/components/minimal-tiptap/components/link/link-edit-block.js.map +1 -0
- package/dist/components/minimal-tiptap/components/link/link-edit-popover.js +38 -0
- package/dist/components/minimal-tiptap/components/link/link-edit-popover.js.map +1 -0
- package/dist/components/minimal-tiptap/components/link/link-popover-block.js +28 -0
- package/dist/components/minimal-tiptap/components/link/link-popover-block.js.map +1 -0
- package/dist/components/minimal-tiptap/components/measured-container.js +16 -0
- package/dist/components/minimal-tiptap/components/measured-container.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/five.js +39 -0
- package/dist/components/minimal-tiptap/components/section/five.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/four.js +29 -0
- package/dist/components/minimal-tiptap/components/section/four.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/mailingPlaceholders.js +23 -0
- package/dist/components/minimal-tiptap/components/section/mailingPlaceholders.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/one.js +77 -0
- package/dist/components/minimal-tiptap/components/section/one.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/three.js +79 -0
- package/dist/components/minimal-tiptap/components/section/three.js.map +1 -0
- package/dist/components/minimal-tiptap/components/section/two.js +65 -0
- package/dist/components/minimal-tiptap/components/section/two.js.map +1 -0
- package/dist/components/minimal-tiptap/components/shortcut-key.js +11 -0
- package/dist/components/minimal-tiptap/components/shortcut-key.js.map +1 -0
- package/dist/components/minimal-tiptap/components/spinner.js +9 -0
- package/dist/components/minimal-tiptap/components/spinner.js.map +1 -0
- package/dist/components/minimal-tiptap/components/toolbar-button.js +15 -0
- package/dist/components/minimal-tiptap/components/toolbar-button.js.map +1 -0
- package/dist/components/minimal-tiptap/components/toolbar-section.js +27 -0
- package/dist/components/minimal-tiptap/components/toolbar-section.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js +16 -0
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/color/color.js +20 -0
- package/dist/components/minimal-tiptap/extensions/color/color.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/color/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/color/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/file-handler/index.js +74 -0
- package/dist/components/minimal-tiptap/extensions/file-handler/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.js +16 -0
- package/dist/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/horizontal-rule/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/horizontal-rule/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-actions.js +39 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-actions.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-overlay.js +9 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-overlay.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-view-block.js +167 -0
- package/dist/components/minimal-tiptap/extensions/image/components/image-view-block.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/components/resize-handle.js +11 -0
- package/dist/components/minimal-tiptap/extensions/image/components/resize-handle.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.js +88 -0
- package/dist/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/hooks/use-image-actions.js +32 -0
- package/dist/components/minimal-tiptap/extensions/image/hooks/use-image-actions.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/image.js +225 -0
- package/dist/components/minimal-tiptap/extensions/image/image.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/image/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/image/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/index.js +10 -0
- package/dist/components/minimal-tiptap/extensions/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/link/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/link/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/link/link.js +74 -0
- package/dist/components/minimal-tiptap/extensions/link/link.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.js +20 -0
- package/dist/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/selection/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/selection/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/selection/selection.js +31 -0
- package/dist/components/minimal-tiptap/extensions/selection/selection.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/unset-all-marks/index.js +2 -0
- package/dist/components/minimal-tiptap/extensions/unset-all-marks/index.js.map +1 -0
- package/dist/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.js +9 -0
- package/dist/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.js.map +1 -0
- package/dist/components/minimal-tiptap/form-description-tiptap.js +26 -0
- package/dist/components/minimal-tiptap/form-description-tiptap.js.map +1 -0
- package/dist/components/minimal-tiptap/hooks/use-container-size.js +44 -0
- package/dist/components/minimal-tiptap/hooks/use-container-size.js.map +1 -0
- package/dist/components/minimal-tiptap/hooks/use-minimal-tiptap.js +160 -0
- package/dist/components/minimal-tiptap/hooks/use-minimal-tiptap.js.map +1 -0
- package/dist/components/minimal-tiptap/hooks/use-theme.js +19 -0
- package/dist/components/minimal-tiptap/hooks/use-theme.js.map +1 -0
- package/dist/components/minimal-tiptap/hooks/use-throttle.js +24 -0
- package/dist/components/minimal-tiptap/hooks/use-throttle.js.map +1 -0
- package/dist/components/minimal-tiptap/index.js +2 -0
- package/dist/components/minimal-tiptap/index.js.map +1 -0
- package/dist/components/minimal-tiptap/mailing-tiptap.js +30 -0
- package/dist/components/minimal-tiptap/mailing-tiptap.js.map +1 -0
- package/dist/components/minimal-tiptap/minimal-tiptap.js +29 -0
- package/dist/components/minimal-tiptap/minimal-tiptap.js.map +1 -0
- package/dist/components/minimal-tiptap/styles/index.css +444 -0
- package/dist/components/minimal-tiptap/types.js +2 -0
- package/dist/components/minimal-tiptap/types.js.map +1 -0
- package/dist/components/minimal-tiptap/utils.js +156 -0
- package/dist/components/minimal-tiptap/utils.js.map +1 -0
- package/dist/types/components/index.d.ts +10 -0
- package/dist/types/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.d.ts +7 -0
- package/dist/types/components/minimal-tiptap/components/image/image-edit-block.d.ts +8 -0
- package/dist/types/components/minimal-tiptap/components/image/image-edit-dialog.d.ts +8 -0
- package/dist/types/components/minimal-tiptap/components/link/link-edit-block.d.ts +9 -0
- package/dist/types/components/minimal-tiptap/components/link/link-edit-popover.d.ts +8 -0
- package/dist/types/components/minimal-tiptap/components/link/link-popover-block.d.ts +8 -0
- package/dist/types/components/minimal-tiptap/components/measured-container.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/components/section/five.d.ts +12 -0
- package/dist/types/components/minimal-tiptap/components/section/four.d.ts +12 -0
- package/dist/types/components/minimal-tiptap/components/section/mailingPlaceholders.d.ts +10 -0
- package/dist/types/components/minimal-tiptap/components/section/one.d.ts +11 -0
- package/dist/types/components/minimal-tiptap/components/section/three.d.ts +9 -0
- package/dist/types/components/minimal-tiptap/components/section/two.d.ts +12 -0
- package/dist/types/components/minimal-tiptap/components/shortcut-key.d.ts +5 -0
- package/dist/types/components/minimal-tiptap/components/spinner.d.ts +5 -0
- package/dist/types/components/minimal-tiptap/components/toolbar-button.d.ts +10 -0
- package/dist/types/components/minimal-tiptap/components/toolbar-section.d.ts +16 -0
- package/dist/types/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/extensions/code-block-lowlight/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/color/color.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/color/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/file-handler/index.d.ts +12 -0
- package/dist/types/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/extensions/horizontal-rule/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/image/components/image-actions.d.ts +17 -0
- package/dist/types/components/minimal-tiptap/extensions/image/components/image-overlay.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/extensions/image/components/image-view-block.d.ts +3 -0
- package/dist/types/components/minimal-tiptap/extensions/image/components/resize-handle.d.ts +6 -0
- package/dist/types/components/minimal-tiptap/extensions/image/hooks/use-drag-resize.d.ts +24 -0
- package/dist/types/components/minimal-tiptap/extensions/image/hooks/use-image-actions.d.ts +24 -0
- package/dist/types/components/minimal-tiptap/extensions/image/image.d.ts +52 -0
- package/dist/types/components/minimal-tiptap/extensions/image/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/index.d.ts +9 -0
- package/dist/types/components/minimal-tiptap/extensions/link/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/link/link.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/extensions/reset-marks-on-enter/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/extensions/selection/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/selection/selection.d.ts +3 -0
- package/dist/types/components/minimal-tiptap/extensions/unset-all-marks/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/form-description-tiptap.d.ts +4 -0
- package/dist/types/components/minimal-tiptap/hooks/use-container-size.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/hooks/use-minimal-tiptap.d.ts +13 -0
- package/dist/types/components/minimal-tiptap/hooks/use-theme.d.ts +2 -0
- package/dist/types/components/minimal-tiptap/hooks/use-throttle.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/index.d.ts +1 -0
- package/dist/types/components/minimal-tiptap/mailing-tiptap.d.ts +13 -0
- package/dist/types/components/minimal-tiptap/minimal-tiptap.d.ts +12 -0
- package/dist/types/components/minimal-tiptap/types.d.ts +25 -0
- package/dist/types/components/minimal-tiptap/utils.d.ts +38 -0
- package/package.json +26 -4
- package/src/components/minimal-tiptap/styles/index.css +444 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--mt-overlay: rgba(251, 251, 251, 0.75);
|
|
3
|
+
--mt-transparent-foreground: rgba(0, 0, 0, 0.4);
|
|
4
|
+
--mt-bg-secondary: rgba(251, 251, 251, 0.8);
|
|
5
|
+
--mt-code-background: #082b781f;
|
|
6
|
+
--mt-code-color: #d4d4d4;
|
|
7
|
+
--mt-secondary: #9d9d9f;
|
|
8
|
+
--mt-pre-background: #ececec;
|
|
9
|
+
--mt-pre-border: #e0e0e0;
|
|
10
|
+
--mt-pre-color: #2f2f31;
|
|
11
|
+
--mt-hr: #dcdcdc;
|
|
12
|
+
--mt-drag-handle-hover: #5c5c5e;
|
|
13
|
+
|
|
14
|
+
--mt-accent-bold-blue: #05c;
|
|
15
|
+
--mt-accent-bold-teal: #206a83;
|
|
16
|
+
--mt-accent-bold-green: #216e4e;
|
|
17
|
+
--mt-accent-bold-orange: #a54800;
|
|
18
|
+
--mt-accent-bold-red: #ae2e24;
|
|
19
|
+
--mt-accent-bold-purple: #5e4db2;
|
|
20
|
+
|
|
21
|
+
--mt-accent-gray: #758195;
|
|
22
|
+
--mt-accent-blue: #1d7afc;
|
|
23
|
+
--mt-accent-teal: #2898bd;
|
|
24
|
+
--mt-accent-green: #22a06b;
|
|
25
|
+
--mt-accent-orange: #fea362;
|
|
26
|
+
--mt-accent-red: #c9372c;
|
|
27
|
+
--mt-accent-purple: #8270db;
|
|
28
|
+
|
|
29
|
+
--mt-accent-blue-subtler: #cce0ff;
|
|
30
|
+
--mt-accent-teal-subtler: #c6edfb;
|
|
31
|
+
--mt-accent-green-subtler: #baf3db;
|
|
32
|
+
--mt-accent-yellow-subtler: #f8e6a0;
|
|
33
|
+
--mt-accent-red-subtler: #ffd5d2;
|
|
34
|
+
--mt-accent-purple-subtler: #dfd8fd;
|
|
35
|
+
|
|
36
|
+
--hljs-string: #aa430f;
|
|
37
|
+
--hljs-title: #b08836;
|
|
38
|
+
--hljs-comment: #999999;
|
|
39
|
+
--hljs-keyword: #0c5eb1;
|
|
40
|
+
--hljs-attr: #3a92bc;
|
|
41
|
+
--hljs-literal: #c82b0f;
|
|
42
|
+
--hljs-name: #259792;
|
|
43
|
+
--hljs-selector-tag: #c8500f;
|
|
44
|
+
--hljs-number: #3da067;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dark {
|
|
48
|
+
--mt-overlay: rgba(31, 32, 35, 0.75);
|
|
49
|
+
--mt-transparent-foreground: rgba(255, 255, 255, 0.4);
|
|
50
|
+
--mt-bg-secondary: rgba(31, 32, 35, 0.8);
|
|
51
|
+
--mt-code-background: #ffffff13;
|
|
52
|
+
--mt-code-color: #2c2e33;
|
|
53
|
+
--mt-secondary: #595a5c;
|
|
54
|
+
--mt-pre-background: #080808;
|
|
55
|
+
--mt-pre-border: #23252a;
|
|
56
|
+
--mt-pre-color: #e3e4e6;
|
|
57
|
+
--mt-hr: #26282d;
|
|
58
|
+
--mt-drag-handle-hover: #969799;
|
|
59
|
+
|
|
60
|
+
--mt-accent-bold-blue: #85b8ff;
|
|
61
|
+
--mt-accent-bold-teal: #9dd9ee;
|
|
62
|
+
--mt-accent-bold-green: #7ee2b8;
|
|
63
|
+
--mt-accent-bold-orange: #fec195;
|
|
64
|
+
--mt-accent-bold-red: #fd9891;
|
|
65
|
+
--mt-accent-bold-purple: #b8acf6;
|
|
66
|
+
|
|
67
|
+
--mt-accent-gray: #738496;
|
|
68
|
+
--mt-accent-blue: #388bff;
|
|
69
|
+
--mt-accent-teal: #42b2d7;
|
|
70
|
+
--mt-accent-green: #2abb7f;
|
|
71
|
+
--mt-accent-orange: #a54800;
|
|
72
|
+
--mt-accent-red: #e2483d;
|
|
73
|
+
--mt-accent-purple: #8f7ee7;
|
|
74
|
+
|
|
75
|
+
--mt-accent-blue-subtler: #09326c;
|
|
76
|
+
--mt-accent-teal-subtler: #164555;
|
|
77
|
+
--mt-accent-green-subtler: #164b35;
|
|
78
|
+
--mt-accent-yellow-subtler: #533f04;
|
|
79
|
+
--mt-accent-red-subtler: #5d1f1a;
|
|
80
|
+
--mt-accent-purple-subtler: #352c63;
|
|
81
|
+
|
|
82
|
+
--hljs-string: #da936b;
|
|
83
|
+
--hljs-title: #f1d59d;
|
|
84
|
+
--hljs-comment: #aaaaaa;
|
|
85
|
+
--hljs-keyword: #6699cc;
|
|
86
|
+
--hljs-attr: #90cae8;
|
|
87
|
+
--hljs-literal: #f2777a;
|
|
88
|
+
--hljs-name: #5fc0a0;
|
|
89
|
+
--hljs-selector-tag: #e8c785;
|
|
90
|
+
--hljs-number: #b6e7b6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.minimal-tiptap-editor .ProseMirror {
|
|
94
|
+
@apply flex max-w-full cursor-text flex-col;
|
|
95
|
+
@apply z-0 outline-0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.minimal-tiptap-editor .ProseMirror > div.editor {
|
|
99
|
+
@apply block flex-1 whitespace-pre-wrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.minimal-tiptap-editor .ProseMirror .block-node:not(:last-child),
|
|
103
|
+
.minimal-tiptap-editor .ProseMirror .list-node:not(:last-child),
|
|
104
|
+
.minimal-tiptap-editor .ProseMirror .text-node:not(:last-child) {
|
|
105
|
+
@apply mb-2.5;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
109
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
110
|
+
@apply pl-6;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.minimal-tiptap-editor .ProseMirror blockquote,
|
|
114
|
+
.minimal-tiptap-editor .ProseMirror dl,
|
|
115
|
+
.minimal-tiptap-editor .ProseMirror ol,
|
|
116
|
+
.minimal-tiptap-editor .ProseMirror p,
|
|
117
|
+
.minimal-tiptap-editor .ProseMirror pre,
|
|
118
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
119
|
+
@apply m-0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.minimal-tiptap-editor .ProseMirror li {
|
|
123
|
+
@apply leading-7;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.minimal-tiptap-editor .ProseMirror p {
|
|
127
|
+
@apply break-words;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.minimal-tiptap-editor .ProseMirror li .text-node:has(+ .list-node),
|
|
131
|
+
.minimal-tiptap-editor .ProseMirror li > .list-node,
|
|
132
|
+
.minimal-tiptap-editor .ProseMirror li > .text-node,
|
|
133
|
+
.minimal-tiptap-editor .ProseMirror li p {
|
|
134
|
+
@apply mb-0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.minimal-tiptap-editor .ProseMirror blockquote {
|
|
138
|
+
@apply relative pl-3.5;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.minimal-tiptap-editor .ProseMirror blockquote::before,
|
|
142
|
+
.minimal-tiptap-editor .ProseMirror blockquote.is-empty::before {
|
|
143
|
+
@apply absolute bottom-0 left-0 top-0 h-full w-1 rounded-sm bg-accent-foreground/15 content-[''];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.minimal-tiptap-editor .ProseMirror hr {
|
|
147
|
+
@apply my-3 h-0.5 w-full border-none bg-[var(--mt-hr)];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.minimal-tiptap-editor .ProseMirror-focused hr.ProseMirror-selectednode {
|
|
151
|
+
@apply rounded-full outline outline-2 outline-offset-1 outline-muted-foreground;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-gapcursor {
|
|
155
|
+
@apply pointer-events-none absolute hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.minimal-tiptap-editor .ProseMirror .ProseMirror-hideselection {
|
|
159
|
+
@apply caret-transparent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.minimal-tiptap-editor .ProseMirror.resize-cursor {
|
|
163
|
+
@apply cursor-col-resize;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.minimal-tiptap-editor .ProseMirror .selection {
|
|
167
|
+
@apply inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.minimal-tiptap-editor .ProseMirror s span {
|
|
171
|
+
@apply line-through;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.minimal-tiptap-editor .ProseMirror .selection,
|
|
175
|
+
.minimal-tiptap-editor .ProseMirror *::selection,
|
|
176
|
+
::selection {
|
|
177
|
+
@apply bg-primary/25;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Override native selection when custom selection is present */
|
|
181
|
+
.minimal-tiptap-editor .ProseMirror .selection::selection {
|
|
182
|
+
background: transparent;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/* Typography */
|
|
187
|
+
.minimal-tiptap-editor .ProseMirror .heading-node {
|
|
188
|
+
@apply relative font-semibold;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.minimal-tiptap-editor .ProseMirror .heading-node:first-child {
|
|
192
|
+
@apply mt-0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.minimal-tiptap-editor .ProseMirror h1 {
|
|
196
|
+
@apply mb-4 mt-[46px] text-[1.375rem] leading-7 tracking-[-0.004375rem];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.minimal-tiptap-editor .ProseMirror h2 {
|
|
200
|
+
@apply mb-3.5 mt-8 text-[1.1875rem] leading-7 tracking-[0.003125rem];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.minimal-tiptap-editor .ProseMirror h3 {
|
|
204
|
+
@apply mb-3 mt-6 text-[1.0625rem] leading-6 tracking-[0.00625rem];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.minimal-tiptap-editor .ProseMirror h4 {
|
|
208
|
+
@apply mb-2 mt-4 text-[0.9375rem] leading-6;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
212
|
+
@apply mb-2 mt-4 text-sm;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.minimal-tiptap-editor .ProseMirror h5 {
|
|
216
|
+
@apply mb-2 mt-4 text-sm;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.minimal-tiptap-editor .ProseMirror a.link {
|
|
220
|
+
@apply cursor-pointer text-blue-700;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.minimal-tiptap-editor .ProseMirror a.link:hover {
|
|
224
|
+
@apply underline;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/** Lists */
|
|
229
|
+
.minimal-tiptap-editor .ProseMirror ol {
|
|
230
|
+
@apply list-decimal;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.minimal-tiptap-editor .ProseMirror ol ol {
|
|
234
|
+
list-style: lower-alpha;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.minimal-tiptap-editor .ProseMirror ol ol ol {
|
|
238
|
+
list-style: lower-roman;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.minimal-tiptap-editor .ProseMirror ul {
|
|
242
|
+
list-style: disc;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.minimal-tiptap-editor .ProseMirror ul ul {
|
|
246
|
+
list-style: circle;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.minimal-tiptap-editor .ProseMirror ul ul ul {
|
|
250
|
+
list-style: square;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
/** Placeholders */
|
|
255
|
+
.minimal-tiptap-editor .ProseMirror > p.is-editor-empty::before {
|
|
256
|
+
content: attr(data-placeholder);
|
|
257
|
+
@apply pointer-events-none float-left h-0 text-[var(--mt-secondary)];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/** Code */
|
|
262
|
+
.minimal-tiptap-editor .ProseMirror code.inline {
|
|
263
|
+
@apply rounded border border-[var(--mt-code-color)] bg-[var(--mt-code-background)] px-1 py-0.5 text-sm;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
267
|
+
@apply relative overflow-auto rounded border font-mono text-sm;
|
|
268
|
+
@apply border-[var(--mt-pre-border)] bg-[var(--mt-pre-background)] text-[var(--mt-pre-color)];
|
|
269
|
+
@apply hyphens-none whitespace-pre text-left;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.minimal-tiptap-editor .ProseMirror code {
|
|
273
|
+
@apply break-words leading-[1.7em];
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.minimal-tiptap-editor .ProseMirror pre code {
|
|
277
|
+
@apply block overflow-x-auto p-3.5;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.minimal-tiptap-editor .ProseMirror pre {
|
|
281
|
+
.hljs-keyword,
|
|
282
|
+
.hljs-operator,
|
|
283
|
+
.hljs-function,
|
|
284
|
+
.hljs-built_in,
|
|
285
|
+
.hljs-builtin-name {
|
|
286
|
+
color: var(--hljs-keyword);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.hljs-attr,
|
|
290
|
+
.hljs-symbol,
|
|
291
|
+
.hljs-property,
|
|
292
|
+
.hljs-attribute,
|
|
293
|
+
.hljs-variable,
|
|
294
|
+
.hljs-template-variable,
|
|
295
|
+
.hljs-params {
|
|
296
|
+
color: var(--hljs-attr);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.hljs-name,
|
|
300
|
+
.hljs-regexp,
|
|
301
|
+
.hljs-link,
|
|
302
|
+
.hljs-type,
|
|
303
|
+
.hljs-addition {
|
|
304
|
+
color: var(--hljs-name);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hljs-string,
|
|
308
|
+
.hljs-bullet {
|
|
309
|
+
color: var(--hljs-string);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.hljs-title,
|
|
313
|
+
.hljs-subst,
|
|
314
|
+
.hljs-section {
|
|
315
|
+
color: var(--hljs-title);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.hljs-literal,
|
|
319
|
+
.hljs-type,
|
|
320
|
+
.hljs-deletion {
|
|
321
|
+
color: var(--hljs-literal);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.hljs-selector-tag,
|
|
325
|
+
.hljs-selector-id,
|
|
326
|
+
.hljs-selector-class {
|
|
327
|
+
color: var(--hljs-selector-tag);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.hljs-number {
|
|
331
|
+
color: var(--hljs-number);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.hljs-comment,
|
|
335
|
+
.hljs-meta,
|
|
336
|
+
.hljs-quote {
|
|
337
|
+
color: var(--hljs-comment);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.hljs-emphasis {
|
|
341
|
+
@apply italic;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.hljs-strong {
|
|
345
|
+
@apply font-bold;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
/** Zoom */
|
|
351
|
+
[data-rmiz-ghost] {
|
|
352
|
+
position: absolute;
|
|
353
|
+
pointer-events: none;
|
|
354
|
+
}
|
|
355
|
+
[data-rmiz-btn-zoom],
|
|
356
|
+
[data-rmiz-btn-unzoom] {
|
|
357
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
358
|
+
border-radius: 50%;
|
|
359
|
+
border: none;
|
|
360
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
361
|
+
color: #fff;
|
|
362
|
+
height: 40px;
|
|
363
|
+
margin: 0;
|
|
364
|
+
outline-offset: 2px;
|
|
365
|
+
padding: 9px;
|
|
366
|
+
touch-action: manipulation;
|
|
367
|
+
width: 40px;
|
|
368
|
+
-webkit-appearance: none;
|
|
369
|
+
-moz-appearance: none;
|
|
370
|
+
appearance: none;
|
|
371
|
+
}
|
|
372
|
+
[data-rmiz-btn-zoom]:not(:focus):not(:active) {
|
|
373
|
+
position: absolute;
|
|
374
|
+
clip: rect(0 0 0 0);
|
|
375
|
+
clip-path: inset(50%);
|
|
376
|
+
height: 1px;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
pointer-events: none;
|
|
379
|
+
white-space: nowrap;
|
|
380
|
+
width: 1px;
|
|
381
|
+
}
|
|
382
|
+
[data-rmiz-btn-zoom] {
|
|
383
|
+
position: absolute;
|
|
384
|
+
inset: 10px 10px auto auto;
|
|
385
|
+
cursor: zoom-in;
|
|
386
|
+
}
|
|
387
|
+
[data-rmiz-btn-unzoom] {
|
|
388
|
+
position: absolute;
|
|
389
|
+
inset: 20px 20px auto auto;
|
|
390
|
+
cursor: zoom-out;
|
|
391
|
+
z-index: 1;
|
|
392
|
+
}
|
|
393
|
+
[data-rmiz-content='found'] img,
|
|
394
|
+
[data-rmiz-content='found'] svg,
|
|
395
|
+
[data-rmiz-content='found'] [role='img'],
|
|
396
|
+
[data-rmiz-content='found'] [data-zoom] {
|
|
397
|
+
cursor: inherit;
|
|
398
|
+
}
|
|
399
|
+
[data-rmiz-modal]::backdrop {
|
|
400
|
+
display: none;
|
|
401
|
+
}
|
|
402
|
+
[data-rmiz-modal][open] {
|
|
403
|
+
position: fixed;
|
|
404
|
+
width: 100vw;
|
|
405
|
+
width: 100dvw;
|
|
406
|
+
height: 100vh;
|
|
407
|
+
height: 100dvh;
|
|
408
|
+
max-width: none;
|
|
409
|
+
max-height: none;
|
|
410
|
+
margin: 0;
|
|
411
|
+
padding: 0;
|
|
412
|
+
border: 0;
|
|
413
|
+
background: transparent;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
}
|
|
416
|
+
[data-rmiz-modal-overlay] {
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: 0;
|
|
419
|
+
transition: background-color 0.3s;
|
|
420
|
+
}
|
|
421
|
+
[data-rmiz-modal-overlay='hidden'] {
|
|
422
|
+
background-color: rgba(255, 255, 255, 0);
|
|
423
|
+
}
|
|
424
|
+
[data-rmiz-modal-overlay='visible'] {
|
|
425
|
+
background-color: rgba(255, 255, 255, 1);
|
|
426
|
+
}
|
|
427
|
+
[data-rmiz-modal-content] {
|
|
428
|
+
position: relative;
|
|
429
|
+
width: 100%;
|
|
430
|
+
height: 100%;
|
|
431
|
+
}
|
|
432
|
+
[data-rmiz-modal-img] {
|
|
433
|
+
position: absolute;
|
|
434
|
+
cursor: zoom-out;
|
|
435
|
+
image-rendering: high-quality;
|
|
436
|
+
transform-origin: top left;
|
|
437
|
+
transition: transform 0.3s;
|
|
438
|
+
}
|
|
439
|
+
@media (prefers-reduced-motion: reduce) {
|
|
440
|
+
[data-rmiz-modal-overlay],
|
|
441
|
+
[data-rmiz-modal-img] {
|
|
442
|
+
transition-duration: 0.01ms !important;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/minimal-tiptap/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAA;gBAC/D,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;oBACnE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAA;gBAC5D,CAAC;qBAAM,CAAC;oBACN,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACvB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAC7B,CAAC,CAAA"}
|
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export * from './ui';
|
|
2
|
+
export * from './minimal-tiptap';
|
|
3
|
+
export * from './DatePicker';
|
|
4
|
+
export * from './DateRangePicker';
|
|
5
|
+
export * from './DeleteConfirmationDialog';
|
|
6
|
+
export * from './ErrorPage';
|
|
7
|
+
export * from './LoadingPage';
|
|
8
|
+
export * from './ManagementPageHeader';
|
|
9
|
+
export * from './MultiSelect';
|
|
10
|
+
export * from './SaveChangesAlert';
|
|
11
|
+
export * from './UnauthorizedPage';
|
|
@@ -0,0 +1,8 @@
|
|
|
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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 };
|