tiptap-notion-editor 0.5.0

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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +172 -0
  3. package/lib/NotionEditor.d.ts +58 -0
  4. package/lib/components/Draggable/index.d.ts +5 -0
  5. package/lib/components/ToggleButton.d.ts +16 -0
  6. package/lib/components/TooltipWrapper.d.ts +9 -0
  7. package/lib/components/blocks/attachment.d.ts +2 -0
  8. package/lib/components/blocks/code.d.ts +2 -0
  9. package/lib/components/blocks/emoji.d.ts +2 -0
  10. package/lib/components/blocks/image.d.ts +2 -0
  11. package/lib/components/blocks/list.d.ts +4 -0
  12. package/lib/components/blocks/separator.d.ts +2 -0
  13. package/lib/components/blocks/table.d.ts +2 -0
  14. package/lib/components/blocks/tableOfContents.d.ts +2 -0
  15. package/lib/components/blocks/types.d.ts +26 -0
  16. package/lib/components/blocks/typography.d.ts +8 -0
  17. package/lib/components/bubble/BubbleMoreOption.d.ts +5 -0
  18. package/lib/components/bubble/ImageBubbleMenu.d.ts +7 -0
  19. package/lib/components/bubble/IndentButtons.d.ts +5 -0
  20. package/lib/components/bubble/MyBubbleMenu.d.ts +5 -0
  21. package/lib/components/bubble/PickLink.d.ts +6 -0
  22. package/lib/components/bubble/TextTurnInto.d.ts +5 -0
  23. package/lib/components/bubble/icon.d.ts +4 -0
  24. package/lib/components/color/ColorDropdown.d.ts +5 -0
  25. package/lib/components/color/ColorItem.d.ts +5 -0
  26. package/lib/components/color/ColorSubMenu.d.ts +7 -0
  27. package/lib/components/color/HighlightButton.d.ts +15 -0
  28. package/lib/components/color/TextButton.d.ts +9 -0
  29. package/lib/components/color/constant.d.ts +12 -0
  30. package/lib/components/color/icon.d.ts +2 -0
  31. package/lib/components/color/type.d.ts +9 -0
  32. package/lib/components/color/utils.d.ts +5 -0
  33. package/lib/components/extensions/Indent.d.ts +16 -0
  34. package/lib/components/extensions/emoji-picker/EmojiList.d.ts +8 -0
  35. package/lib/components/extensions/emoji-picker/EmojiPicker.d.ts +14 -0
  36. package/lib/components/extensions/emoji-picker/emoji-suggestion.d.ts +3 -0
  37. package/lib/components/extensions/file-handle.d.ts +19 -0
  38. package/lib/components/extensions/global-block-background.d.ts +2 -0
  39. package/lib/components/extensions/index.d.ts +51 -0
  40. package/lib/components/extensions/mention/MentionList.d.ts +11 -0
  41. package/lib/components/extensions/mention/mentionSuggestion.d.ts +11 -0
  42. package/lib/components/extensions/mention/types.d.ts +12 -0
  43. package/lib/components/extensions/slash-command/MenuListGroup.d.ts +9 -0
  44. package/lib/components/extensions/slash-command/SlashMenu.d.ts +11 -0
  45. package/lib/components/extensions/slash-command/items.d.ts +3 -0
  46. package/lib/components/extensions/slash-command/slash-command.d.ts +7 -0
  47. package/lib/components/extensions/slash-command/suggestion.d.ts +3 -0
  48. package/lib/components/icons.d.ts +5 -0
  49. package/lib/components/node/attachment/AttachmentNode.d.ts +38 -0
  50. package/lib/components/node/attachment/AttachmentNodeView.d.ts +3 -0
  51. package/lib/components/node/attachment/AttachmentUploadNode.d.ts +37 -0
  52. package/lib/components/node/attachment/AttachmentUploadNodeView.d.ts +3 -0
  53. package/lib/components/node/attachment/context.d.ts +16 -0
  54. package/lib/components/node/attachment/index.d.ts +3 -0
  55. package/lib/components/node/image/CustomImage.d.ts +1 -0
  56. package/lib/components/node/image/ImageNodeView.d.ts +5 -0
  57. package/lib/components/node/image-upload/drop-zone-content.d.ts +4 -0
  58. package/lib/components/node/image-upload/hooks.d.ts +7 -0
  59. package/lib/components/node/image-upload/image-drop-area.d.ts +15 -0
  60. package/lib/components/node/image-upload/image-preview.d.ts +13 -0
  61. package/lib/components/node/image-upload/image-upload-node-extension.d.ts +58 -0
  62. package/lib/components/node/image-upload/image-upload-node-view.d.ts +2 -0
  63. package/lib/components/node/image-upload/index.d.ts +1 -0
  64. package/lib/components/node/image-upload/types.d.ts +66 -0
  65. package/lib/components/node/table-node/AddRowButton.d.ts +5 -0
  66. package/lib/components/node/table-node/CustomTable.d.ts +1 -0
  67. package/lib/components/node/table-node/TableAddRowColumnHandle.d.ts +7 -0
  68. package/lib/components/node/table-node/TableHandle.d.ts +4 -0
  69. package/lib/components/node/table-node/TableMenuHandle.d.ts +7 -0
  70. package/lib/components/node/table-node/TableSelectionOverlay.d.ts +7 -0
  71. package/lib/components/node/table-node/plugins/add-row-plugin.d.ts +9 -0
  72. package/lib/components/node/table-node/plugins/plugin-keys.d.ts +6 -0
  73. package/lib/components/node/table-node/plugins/table-menu-handle-plugin.d.ts +33 -0
  74. package/lib/components/node/table-node/plugins/table-selection-overlay.d.ts +10 -0
  75. package/lib/components/node/table-node/popover/AlignmentContent.d.ts +4 -0
  76. package/lib/components/node/table-node/popover/CellMenuPopover.d.ts +4 -0
  77. package/lib/components/node/table-node/popover/Colors.d.ts +4 -0
  78. package/lib/components/node/table-node/popover/TableMenuItem.d.ts +11 -0
  79. package/lib/components/node/table-node/popover/TableMenuPopover.d.ts +9 -0
  80. package/lib/components/node/table-node/table-kit.d.ts +2 -0
  81. package/lib/components/node/table-node/utils/getActiveTableCellAlignment.d.ts +14 -0
  82. package/lib/components/node/table-node/utils/getTableColumnMeta.d.ts +15 -0
  83. package/lib/components/node/table-node/utils/getTableContext.d.ts +16 -0
  84. package/lib/components/node/table-node/utils/index.d.ts +17 -0
  85. package/lib/components/node/table-node/utils/table.d.ts +51 -0
  86. package/lib/components/node/toc-node/TableOfContentsNode.d.ts +13 -0
  87. package/lib/components/node/toc-node/TocNodeView.d.ts +9 -0
  88. package/lib/components/toc-sidebar/TocPopover.d.ts +6 -0
  89. package/lib/components/toc-sidebar/TocSidebar.d.ts +9 -0
  90. package/lib/components/toc-sidebar/TocSidebarContent.d.ts +6 -0
  91. package/lib/components/toc-sidebar/TocUIList.d.ts +8 -0
  92. package/lib/components/ui/button.d.ts +10 -0
  93. package/lib/components/ui/command.d.ts +18 -0
  94. package/lib/components/ui/dialog.d.ts +17 -0
  95. package/lib/components/ui/dropdown-menu.d.ts +29 -0
  96. package/lib/components/ui/input-group.d.ts +16 -0
  97. package/lib/components/ui/input.d.ts +3 -0
  98. package/lib/components/ui/popover.d.ts +10 -0
  99. package/lib/components/ui/scroll-area.d.ts +5 -0
  100. package/lib/components/ui/separator.d.ts +4 -0
  101. package/lib/components/ui/textarea.d.ts +3 -0
  102. package/lib/components/ui/tooltip.d.ts +7 -0
  103. package/lib/i18n/context.d.ts +15 -0
  104. package/lib/i18n/index.d.ts +2 -0
  105. package/lib/i18n/messages.d.ts +202 -0
  106. package/lib/index.cjs +9 -0
  107. package/lib/index.cjs.map +1 -0
  108. package/lib/index.d.ts +15 -0
  109. package/lib/index.js +5188 -0
  110. package/lib/index.js.map +1 -0
  111. package/lib/lib/aspect-ratio.d.ts +21 -0
  112. package/lib/lib/collect-file-urls.d.ts +10 -0
  113. package/lib/lib/tiptap-utils.d.ts +173 -0
  114. package/lib/lib/use-event.d.ts +1 -0
  115. package/lib/lib/utils.d.ts +25 -0
  116. package/lib/styles/colors.css +88 -0
  117. package/lib/styles/editor.css +268 -0
  118. package/lib/styles/image-upload.css +256 -0
  119. package/lib/styles/image.css +113 -0
  120. package/lib/styles/index.css +18 -0
  121. package/lib/styles/prosemirror.css +271 -0
  122. package/lib/styles/table.css +243 -0
  123. package/lib/styles/tokens.css +66 -0
  124. package/package.json +114 -0
@@ -0,0 +1,256 @@
1
+ :root {
2
+ --tiptap-image-upload-active: var(--tt-brand-color-500);
3
+ --tiptap-image-upload-progress-bg: var(--tt-brand-color-50);
4
+ --tiptap-image-upload-icon-bg: var(--tt-brand-color-500);
5
+
6
+ --tiptap-image-upload-text-color: var(--tt-gray-light-a-700);
7
+ --tiptap-image-upload-subtext-color: var(--tt-gray-light-a-400);
8
+ --tiptap-image-upload-border: var(--tt-gray-light-a-300);
9
+ --tiptap-image-upload-border-hover: var(--tt-gray-light-a-400);
10
+ --tiptap-image-upload-border-active: var(--tt-brand-color-500);
11
+
12
+ --tiptap-image-upload-icon-doc-bg: var(--tt-gray-light-a-200);
13
+ --tiptap-image-upload-icon-doc-border: var(--tt-gray-light-300);
14
+ --tiptap-image-upload-icon-color: var(--white);
15
+ }
16
+
17
+ .dark,
18
+ [data-theme="dark"],
19
+ [data-color-scheme="dark"] {
20
+ --tiptap-image-upload-active: var(--tt-brand-color-400);
21
+ --tiptap-image-upload-progress-bg: var(--tt-brand-color-900);
22
+ --tiptap-image-upload-icon-bg: var(--tt-brand-color-400);
23
+
24
+ --tiptap-image-upload-text-color: var(--tt-gray-dark-a-700);
25
+ --tiptap-image-upload-subtext-color: var(--tt-gray-dark-a-400);
26
+ --tiptap-image-upload-border: var(--tt-gray-dark-a-300);
27
+ --tiptap-image-upload-border-hover: var(--tt-gray-dark-a-400);
28
+ --tiptap-image-upload-border-active: var(--tt-brand-color-400);
29
+
30
+ --tiptap-image-upload-icon-doc-bg: var(--tt-gray-dark-a-200);
31
+ --tiptap-image-upload-icon-doc-border: var(--tt-gray-dark-300);
32
+ --tiptap-image-upload-icon-color: var(--black);
33
+ }
34
+
35
+ .tiptap-image-upload {
36
+ margin: 2rem 0;
37
+
38
+ input[type="file"] {
39
+
40
+
41
+
42
+
43
+ display: none;
44
+ }
45
+
46
+ .tiptap-image-upload-dropzone {
47
+ position: relative;
48
+ width: 3.125rem;
49
+ height: 3.75rem;
50
+ display: inline-flex;
51
+ align-items: flex-start;
52
+ justify-content: center;
53
+ -webkit-user-select: none; /* Safari */
54
+ -ms-user-select: none; /* IE 10 and IE 11 */
55
+ user-select: none;
56
+ }
57
+
58
+ .tiptap-image-upload-icon-container {
59
+ position: absolute;
60
+ width: 1.75rem;
61
+ height: 1.75rem;
62
+ bottom: 0;
63
+ right: 0;
64
+ background-color: var(--color-background);
65
+ border-radius: var(--radius-lg, 0.75rem);
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ border: 1px solid var(--color-border)
70
+ }
71
+
72
+ .tiptap-image-upload-icon {
73
+ width: 0.875rem;
74
+ height: 0.875rem;
75
+ color: var(--color-foreground);
76
+ }
77
+
78
+ .tiptap-image-upload-dropzone-rect-primary {
79
+ color: var(--color-card);
80
+ position: absolute;
81
+ }
82
+
83
+ .tiptap-image-upload-dropzone-rect-secondary {
84
+ position: absolute;
85
+ top: 0;
86
+ right: 0.25rem;
87
+ bottom: 0;
88
+ color: var(--border);
89
+ }
90
+
91
+ .tiptap-image-upload-text {
92
+ color: var(--color-foreground);
93
+ font-weight: 500;
94
+ font-size: 0.875rem;
95
+ line-height: normal;
96
+
97
+ em {
98
+ font-style: normal;
99
+ text-decoration: underline;
100
+ }
101
+ }
102
+
103
+ .tiptap-image-upload-subtext {
104
+ color: var(--color-gray-400);
105
+ font-weight: 600;
106
+ line-height: normal;
107
+ font-size: 0.75rem;
108
+ }
109
+
110
+ .tiptap-image-upload-drag-area {
111
+ padding: 2rem 1.5rem;
112
+ border: 1.5px dashed var(--border);
113
+ border-radius: var(--radius-md);
114
+ text-align: center;
115
+ cursor: pointer;
116
+ position: relative;
117
+ overflow: hidden;
118
+ transition: all 0.2s ease;
119
+
120
+ &:hover {
121
+ border-color: var(--border-border);
122
+ }
123
+
124
+ &.drag-active {
125
+ border-color: var(--tiptap-image-upload-border-active);
126
+ background-color: rgba(
127
+ var(--color-card, 0, 123, 255),
128
+ 0.05
129
+ );
130
+ }
131
+
132
+ &.drag-over {
133
+ border-color: var(--tiptap-image-upload-border-active);
134
+ background-color: rgba(
135
+ var(--tiptap-image-upload-active-rgb, 0, 123, 255),
136
+ 0.1
137
+ );
138
+ }
139
+ }
140
+
141
+ .tiptap-image-upload-content {
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ flex-direction: column;
146
+ gap: 0.25rem;
147
+ -webkit-user-select: none; /* Safari */
148
+ -ms-user-select: none; /* IE 10 and IE 11 */
149
+ user-select: none;
150
+ }
151
+
152
+ .tiptap-image-upload-previews {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: 0.75rem;
156
+ }
157
+
158
+ .tiptap-image-upload-header {
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: space-between;
162
+ padding: 0.5rem 0;
163
+ border-bottom: 1px solid var(--tiptap-image-upload-border);
164
+ margin-bottom: 0.5rem;
165
+
166
+ span {
167
+ font-size: 0.875rem;
168
+ font-weight: 500;
169
+ color: var(--tiptap-image-upload-text-color);
170
+ }
171
+ }
172
+
173
+ // === Individual File Preview Styles ===
174
+ .tiptap-image-upload-preview {
175
+ position: relative;
176
+ border-radius: var(--radius-md);
177
+ overflow: hidden;
178
+
179
+ .tiptap-image-upload-progress {
180
+ position: absolute;
181
+ inset: 0;
182
+ background-color: var(--color-indigo-500);
183
+ transition: all 300ms ease-out;
184
+ }
185
+
186
+ .tiptap-image-upload-preview-content {
187
+ position: relative;
188
+ border: 1px solid var(--color-border);
189
+ border-radius: var(--tt-radius-md, 0.5rem);
190
+ padding: 1rem;
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: space-between;
194
+ }
195
+
196
+ .tiptap-image-upload-file-info {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 0.75rem;
200
+ height: 2rem;
201
+
202
+ .tiptap-image-upload-file-icon {
203
+ padding: 0.5rem;
204
+ background-color: var(--tiptap-image-upload-icon-bg);
205
+ border-radius: var(--tt-radius-lg, 0.75rem);
206
+
207
+ svg {
208
+ width: 0.875rem;
209
+ height: 0.875rem;
210
+ color: var(--tiptap-image-upload-icon-color);
211
+ }
212
+ }
213
+ }
214
+
215
+ .tiptap-image-upload-details {
216
+ display: flex;
217
+ flex-direction: column;
218
+ }
219
+
220
+ .tiptap-image-upload-actions {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 0.5rem;
224
+
225
+ .tiptap-image-upload-progress-text {
226
+ font-size: 0.75rem;
227
+ color: var(--tiptap-image-upload-border-active);
228
+ font-weight: 600;
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ .tiptap.notion-editor.ProseMirror.ProseMirror-focused {
235
+ .ProseMirror-selectednode .tiptap-image-upload-drag-area {
236
+ border-color: var(--tiptap-image-upload-active);
237
+ }
238
+ }
239
+
240
+ @media (max-width: 480px) {
241
+ .tiptap-image-upload {
242
+ .tiptap-image-upload-drag-area {
243
+ padding: 1.5rem 1rem;
244
+ }
245
+
246
+ .tiptap-image-upload-header {
247
+ flex-direction: column;
248
+ align-items: flex-start;
249
+ gap: 0.5rem;
250
+ }
251
+
252
+ .tiptap-image-upload-preview-content {
253
+ padding: 0.75rem;
254
+ }
255
+ }
256
+ }
@@ -0,0 +1,113 @@
1
+ :root {
2
+ --tiptap-image-handle-bg: var(--color-indigo-700);
3
+ }
4
+
5
+ .dark,
6
+ [data-theme="dark"],
7
+ [data-color-scheme="dark"] {
8
+ --tiptap-image-handle-bg: var(--color-indigo-600);
9
+ }
10
+
11
+ .tiptap.notion-editor.ProseMirror
12
+ .ProseMirror-selectednode
13
+ .tiptap-image
14
+ .tiptap-image-container {
15
+ outline: 0.125rem solid #0000;
16
+ outline-color: var(--color-indigo-600);
17
+ border-radius: var(--radius, 0.25rem);
18
+ overflow: hidden;
19
+ }
20
+
21
+ .tiptap.notion-editor.ProseMirror .tiptap-image {
22
+ width: 100%;
23
+ margin: 1.5rem 0 !important;
24
+ display: flex;
25
+ }
26
+
27
+ .tiptap.notion-editor.ProseMirror .tiptap-image[data-align="right"] {
28
+ text-align: right;
29
+ justify-content: flex-end;
30
+ }
31
+
32
+ .tiptap.notion-editor.ProseMirror .tiptap-image[data-align="center"] {
33
+ text-align: center;
34
+ justify-content: center;
35
+ }
36
+
37
+ .tiptap.notion-editor.ProseMirror .tiptap-image-container {
38
+ cursor: pointer;
39
+ -webkit-user-select: none;
40
+ user-select: none;
41
+ flex-direction: column;
42
+ display: flex;
43
+ border-radius: var(--radius, 0.25rem);
44
+ overflow: hidden;
45
+ }
46
+
47
+ .tiptap.notion-editor.ProseMirror .tiptap-image-content {
48
+ align-items: center;
49
+ max-width: 100%;
50
+ display: flex;
51
+ position: relative;
52
+ border-radius: var(--radius, 0.25rem);
53
+ }
54
+
55
+ .tiptap.notion-editor.ProseMirror .tiptap-image-img {
56
+ border-radius: var(--radius-sm, 0.25rem);
57
+ width: 100%;
58
+ }
59
+
60
+ .tiptap.notion-editor.ProseMirror .tiptap-image-handle {
61
+ background-color: var(--tiptap-image-handle-bg);
62
+ cursor: ew-resize;
63
+ z-index: 10;
64
+ border-radius: 1.875rem;
65
+ width: 0.375rem;
66
+ height: 3rem;
67
+ position: absolute;
68
+ top: 50%;
69
+ transform: translateY(-50%);
70
+ }
71
+
72
+ .tiptap.notion-editor.ProseMirror .tiptap-image-handle.tiptap-image-handle-left {
73
+ left: 4px;
74
+ }
75
+
76
+ .tiptap.notion-editor.ProseMirror .tiptap-image-handle.tiptap-image-handle-right {
77
+ right: 4px;
78
+ }
79
+
80
+ .tiptap.notion-editor.ProseMirror .tiptap-image-caption {
81
+ cursor: text;
82
+ text-align: center;
83
+ white-space: break-spaces;
84
+ word-break: break-word;
85
+ outline: none;
86
+ width: 100%;
87
+ max-width: 100%;
88
+ margin-top: 1rem;
89
+ font-size: 15px;
90
+ position: relative;
91
+ }
92
+
93
+ .tiptap.notion-editor.ProseMirror
94
+ .tiptap-image-caption:has(
95
+ > [data-node-view-content-react] > .ProseMirror-trailingBreak:only-child
96
+ ):before {
97
+ content: attr(data-placeholder);
98
+ color: #9ca3af;
99
+ pointer-events: none;
100
+ position: absolute;
101
+ left: 0;
102
+ right: 0;
103
+ }
104
+
105
+ .tiptap.notion-editor.ProseMirror
106
+ .tiptap-image-caption:has(> [data-node-view-content-react]:empty):before {
107
+ content: attr(data-placeholder);
108
+ color: #9ca3af;
109
+ pointer-events: none;
110
+ position: absolute;
111
+ left: 0;
112
+ right: 0;
113
+ }
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Entry style duy nhất của tiptap-notion-editor.
3
+ *
4
+ * Thứ tự import có ý nghĩa: token phải đứng trước mọi file tiêu thụ chúng,
5
+ * và `editor.css` đứng cuối để ghi đè được phần khung do prosemirror/table đặt.
6
+ *
7
+ * File này KHÔNG chứa `@import "tailwindcss"`. Các class tiện ích mà component
8
+ * dùng do app chủ biên dịch — xem hướng dẫn `@source` trong README.
9
+ */
10
+ @import "katex/dist/katex.min.css";
11
+
12
+ @import "./tokens.css";
13
+ @import "./colors.css";
14
+ @import "./prosemirror.css";
15
+ @import "./table.css";
16
+ @import "./image.css";
17
+ @import "./image-upload.css";
18
+ @import "./editor.css";
@@ -0,0 +1,271 @@
1
+ .ProseMirror.notion-editor .is-editor-empty:first-child::before {
2
+ content: attr(data-placeholder);
3
+ float: left;
4
+ color: var(--muted-foreground);
5
+ pointer-events: none;
6
+ height: 0;
7
+ }
8
+ .ProseMirror.notion-editor .is-empty::before {
9
+ content: attr(data-placeholder);
10
+ float: left;
11
+ color: var(--muted-foreground);
12
+ pointer-events: none;
13
+ height: 0;
14
+ }
15
+
16
+ /* Custom image styles */
17
+
18
+ .ProseMirror.notion-editor img {
19
+ transition: filter 0.1s ease-in-out;
20
+
21
+ &:hover {
22
+ cursor: pointer;
23
+ filter: brightness(90%);
24
+ }
25
+
26
+ &.ProseMirror-selectednode {
27
+ outline: 3px solid #5abbf7;
28
+ filter: brightness(90%);
29
+ }
30
+ }
31
+
32
+ .img-placeholder {
33
+ position: relative;
34
+
35
+ &:before {
36
+ content: "";
37
+ box-sizing: border-box;
38
+ position: absolute;
39
+ top: 50%;
40
+ left: 50%;
41
+ width: 36px;
42
+ height: 36px;
43
+ border-radius: 50%;
44
+ border: 3px solid var(--novel-stone-200);
45
+ border-top-color: var(--novel-stone-800);
46
+ animation: spinning 0.6s linear infinite;
47
+ }
48
+ }
49
+
50
+ @keyframes spinning {
51
+ to {
52
+ transform: rotate(360deg);
53
+ }
54
+ }
55
+
56
+ .ProseMirror.notion-editor:not(.dragging) .ProseMirror-selectednode {
57
+ outline: none !important;
58
+ background-color: var(--accent);
59
+ transition: background-color 0.2s;
60
+ box-shadow: none;
61
+ }
62
+
63
+ /* .drag-handle {
64
+ position: fixed;
65
+ opacity: 1;
66
+ transition: opacity ease-in 0.2s;
67
+ border-radius: 0.25rem;
68
+
69
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(0, 0, 0, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E");
70
+ background-size: calc(0.5em + 0.375rem) calc(0.5em + 0.375rem);
71
+ background-repeat: no-repeat;
72
+ background-position: center;
73
+ width: 1.2rem;
74
+ height: 1.5rem;
75
+ z-index: 50;
76
+ cursor: grab;
77
+
78
+ &:hover {
79
+ background-color: var(--novel-stone-100);
80
+ transition: background-color 0.2s;
81
+ }
82
+
83
+ &:active {
84
+ background-color: var(--novel-stone-200);
85
+ transition: background-color 0.2s;
86
+ cursor: grabbing;
87
+ }
88
+
89
+ &.hide {
90
+ opacity: 0;
91
+ pointer-events: none;
92
+ }
93
+
94
+ @media screen and (max-width: 600px) {
95
+ display: none;
96
+ pointer-events: none;
97
+ }
98
+ }
99
+
100
+ .dark .drag-handle,
101
+ [data-theme="dark"] .drag-handle,
102
+ [data-color-scheme="dark"] .drag-handle {
103
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(255, 255, 255, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E");
104
+ } */
105
+
106
+ /* Custom Youtube Video CSS */
107
+ iframe {
108
+ border: 8px solid #ffd00027;
109
+ border-radius: 4px;
110
+ min-width: 200px;
111
+ min-height: 200px;
112
+ display: block;
113
+ outline: 0px solid transparent;
114
+ }
115
+
116
+ div[data-youtube-video] > iframe {
117
+ cursor: move;
118
+ aspect-ratio: 16 / 9;
119
+ width: 100%;
120
+ }
121
+
122
+ .ProseMirror-selectednode iframe {
123
+ transition: outline 0.15s;
124
+ outline: 6px solid #fbbf24;
125
+ }
126
+
127
+ @media only screen and (max-width: 480px) {
128
+ div[data-youtube-video] > iframe {
129
+ max-height: 50px;
130
+ }
131
+ }
132
+
133
+ @media only screen and (max-width: 720px) {
134
+ div[data-youtube-video] > iframe {
135
+ max-height: 100px;
136
+ }
137
+ }
138
+
139
+ /* CSS for bold coloring and highlighting issue*/
140
+ span[style] > strong {
141
+ color: inherit;
142
+ }
143
+
144
+ mark[style] > strong {
145
+ color: inherit;
146
+ }
147
+
148
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] {
149
+ padding-left: 0.25em;
150
+ }
151
+
152
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li {
153
+ flex-direction: row;
154
+ align-items: flex-start;
155
+ display: flex;
156
+ }
157
+
158
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li:not(:has(> p:first-child)) {
159
+ list-style-type: none;
160
+ }
161
+
162
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div > p {
163
+ opacity: 0.5;
164
+ text-decoration: line-through;
165
+ }
166
+
167
+ .tiptap.notion-editor.ProseMirror
168
+ ul[data-type="taskList"]
169
+ li[data-checked="true"]
170
+ > div
171
+ > p
172
+ span {
173
+ text-decoration: line-through;
174
+ }
175
+
176
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li label {
177
+ padding-top: 0.375rem;
178
+ padding-right: 0.5rem;
179
+ position: relative;
180
+ }
181
+
182
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li label input[type="checkbox"] {
183
+ opacity: 0;
184
+ width: 0;
185
+ height: 0;
186
+ position: absolute;
187
+ }
188
+
189
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li label span {
190
+ border: 1px solid var(--color-border);
191
+ border-radius: 0.25rem;
192
+ cursor: pointer;
193
+ background-color: var(--color-input);
194
+ width: 1em;
195
+ height: 1em;
196
+ transition:
197
+ background-color 80ms ease-out,
198
+ border-color 80ms ease-out;
199
+ display: block;
200
+ position: relative;
201
+ }
202
+
203
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li label span:before {
204
+ content: "";
205
+ background-color: var(--color-background);
206
+ opacity: 0;
207
+ width: 0.75em;
208
+ height: 0.75em;
209
+ position: absolute;
210
+ top: 50%;
211
+ left: 50%;
212
+ transform: translate(-50%, -50%);
213
+ -webkit-mask: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fillRule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E)
214
+ 50% / contain no-repeat;
215
+ mask: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fillRule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E)
216
+ 50% / contain no-repeat;
217
+ }
218
+
219
+ .tiptap.notion-editor.ProseMirror
220
+ ul[data-type="taskList"]
221
+ li
222
+ label
223
+ input[type="checkbox"]:checked
224
+ + span {
225
+ background: var(--color-primary);
226
+ border-color: var(--color-border);
227
+ }
228
+
229
+ .tiptap.notion-editor.ProseMirror
230
+ ul[data-type="taskList"]
231
+ li
232
+ label
233
+ input[type="checkbox"]:checked
234
+ + span:before {
235
+ opacity: 1;
236
+ }
237
+
238
+ .tiptap.notion-editor.ProseMirror ul[data-type="taskList"] li div {
239
+ flex: 1;
240
+ min-width: 0;
241
+ }
242
+
243
+ .tiptap.notion-editor.ProseMirror {
244
+ --tt-indent-unit: 24px;
245
+ }
246
+
247
+ .tiptap.notion-editor.ProseMirror [data-indent] {
248
+ margin-left: calc(var(--tt-indent-unit) * var(--tt-indent-level, 0));
249
+ transition: margin-left 0.2s ease-in-out;
250
+ }
251
+ /*
252
+ .ProseMirror.notion-editor td:not([data-colwidth]):not(.column-resize-dragging),
253
+ .ProseMirror.notion-editor th:not([data-colwidth]):not(.column-resize-dragging) {
254
+ min-width: var(--default-cell-min-width);
255
+ }
256
+
257
+ .ProseMirror.notion-editor .column-resize-handle {
258
+ z-index: 20;
259
+ pointer-events: none;
260
+ background-color: #adf;
261
+ width: 4px;
262
+ position: absolute;
263
+ top: 0;
264
+ bottom: 0;
265
+ right: -2px;
266
+ }
267
+
268
+ .ProseMirror.notion-editor.resize-cursor {
269
+ cursor: ew-resize;
270
+ cursor: col-resize;
271
+ } */