tiptap-markdown-react 0.6.2 → 0.7.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.
- package/README.md +48 -1
- package/dist/commentAnchor/CommentMark.d.ts +29 -0
- package/dist/commentAnchor/CommentPopover.d.ts +18 -0
- package/dist/commentAnchor/commentAnchor.test.d.ts +1 -0
- package/dist/commentAnchor/commentAnchorController.d.ts +15 -0
- package/dist/commentAnchor/commentAnchorPlugin.d.ts +26 -0
- package/dist/commentAnchor/commentMapper.d.ts +40 -0
- package/dist/commentAnchor/commentTypes.d.ts +33 -0
- package/dist/components/CodeBlockView.d.ts +1 -1
- package/dist/components/MarkdownWysiwygEditor.d.ts +27 -0
- package/dist/extractToc-AUH9u6o-.js +515 -0
- package/dist/extractToc-AUH9u6o-.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +518 -129
- package/dist/index.js.map +1 -1
- package/dist/labels.d.ts +10 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +6 -2
- package/dist/style.css +191 -81
- package/package.json +1 -1
- package/dist/extractToc-CSawxIx-.js +0 -260
- package/dist/extractToc-CSawxIx-.js.map +0 -1
package/dist/labels.d.ts
CHANGED
|
@@ -61,3 +61,13 @@ export interface CodeBlockLabels {
|
|
|
61
61
|
delete: string;
|
|
62
62
|
}
|
|
63
63
|
export declare const defaultCodeBlockLabels: CodeBlockLabels;
|
|
64
|
+
export interface CommentLabels {
|
|
65
|
+
open: string;
|
|
66
|
+
resolved: string;
|
|
67
|
+
dismissed: string;
|
|
68
|
+
outdated: string;
|
|
69
|
+
ambiguous: string;
|
|
70
|
+
partial: string;
|
|
71
|
+
gutterTitle: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const defaultCommentLabels: CommentLabels;
|
package/dist/server.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { baseExtensions, lowlight, pureCodeBlock, pureImage, } from './extensions';
|
|
6
6
|
export { CitationRef } from './CitationRef';
|
|
7
|
+
export { CommentMark, type CommentMarkOptions, type CommentInterval } from './commentAnchor/CommentMark';
|
|
8
|
+
export { mapCommentAnchors, mergeCommentIntervals, blockTextHash, type CommentSegment, type CommentAnchorInput, type CommentAnchorResult, type CommentAnchorStatus, type CommentRange, } from './commentAnchor/commentMapper';
|
|
7
9
|
export { applyCitationSources, enrichMarkdownCitations, type SourceRef, } from './citationUtils';
|
|
8
10
|
export { ReportContent, type ReportContentProps } from './ReportContent';
|
|
9
11
|
export { renderReportHtml, type RenderedReport, type RenderReportHtmlOptions, } from './renderReportHtml';
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R, e, l } from "./extractToc-
|
|
1
|
+
import { g as applyCitationSources, b as baseExtensions, p as pureCodeBlock, f as pureImage, C as CitationRef, d as makeTocGetId, i as extractToc } from "./extractToc-AUH9u6o-.js";
|
|
2
|
+
import { c, R, h, e, l, a, m } from "./extractToc-AUH9u6o-.js";
|
|
3
3
|
import { TableOfContents, generateTocIds } from "@tiptap/extension-table-of-contents";
|
|
4
4
|
import { MarkdownManager } from "@tiptap/markdown";
|
|
5
5
|
import { renderToHTMLString } from "@tiptap/static-renderer";
|
|
@@ -42,13 +42,17 @@ function renderReportHtml(markdown, lockedTitlesOrOptions = []) {
|
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
44
|
CitationRef,
|
|
45
|
+
c as CommentMark,
|
|
45
46
|
R as ReportContent,
|
|
46
47
|
applyCitationSources,
|
|
47
48
|
baseExtensions,
|
|
49
|
+
h as blockTextHash,
|
|
48
50
|
e as enrichMarkdownCitations,
|
|
49
51
|
extractToc,
|
|
50
52
|
l as lowlight,
|
|
51
53
|
makeTocGetId,
|
|
54
|
+
a as mapCommentAnchors,
|
|
55
|
+
m as mergeCommentIntervals,
|
|
52
56
|
pureCodeBlock,
|
|
53
57
|
pureImage,
|
|
54
58
|
renderReportHtml
|
package/dist/style.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* 规范正文样式(编辑器 / 只读预览 / SSR 阅读三处共用同一个类,保证所见即所得、
|
|
2
2
|
发布后一致)。配色/字体全部走可被消费方覆盖的 CSS 变量(--tmr-*,带默认值)。 */
|
|
3
3
|
|
|
4
|
-
.
|
|
4
|
+
._editorScroll_q3j4s_4 {
|
|
5
5
|
margin-top: 24px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
8
|
+
._editorContent_q3j4s_8 {
|
|
9
9
|
outline: none;
|
|
10
10
|
padding: 0;
|
|
11
11
|
font-family: var(
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/* placeholder:空文档第一段显示占位符 */
|
|
31
|
-
.
|
|
31
|
+
._editorContent_q3j4s_8 p.is-editor-empty:first-child::before {
|
|
32
32
|
content: attr(data-placeholder);
|
|
33
33
|
float: left;
|
|
34
34
|
height: 0;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
pointer-events: none;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
._editorContent_q3j4s_8 h1 {
|
|
40
40
|
font-family: inherit;
|
|
41
41
|
font-size: 1.55em;
|
|
42
42
|
font-weight: 700;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
line-height: 1.3;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
._editorContent_q3j4s_8 h2 {
|
|
48
48
|
font-family: inherit;
|
|
49
49
|
font-size: 1.3em;
|
|
50
50
|
font-weight: 700;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
line-height: 1.3;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
._editorContent_q3j4s_8 h3 {
|
|
56
56
|
font-family: inherit;
|
|
57
57
|
font-size: 1.12em;
|
|
58
58
|
font-weight: 600;
|
|
@@ -60,21 +60,21 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/* h4-h6:延续 h1-h3 尺寸梯度递减;字号差变小后靠字重保持标题感,h6 字色稍弱。 */
|
|
63
|
-
.
|
|
63
|
+
._editorContent_q3j4s_8 h4 {
|
|
64
64
|
font-family: inherit;
|
|
65
65
|
font-size: 1.05em;
|
|
66
66
|
font-weight: 600;
|
|
67
67
|
margin: 0.7em 0 0.3em;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
._editorContent_q3j4s_8 h5 {
|
|
71
71
|
font-family: inherit;
|
|
72
72
|
font-size: 0.95em;
|
|
73
73
|
font-weight: 600;
|
|
74
74
|
margin: 0.7em 0 0.3em;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.
|
|
77
|
+
._editorContent_q3j4s_8 h6 {
|
|
78
78
|
font-family: inherit;
|
|
79
79
|
font-size: 0.88em;
|
|
80
80
|
font-weight: 600;
|
|
@@ -82,25 +82,25 @@
|
|
|
82
82
|
color: var(--tmr-muted, #777777);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.
|
|
85
|
+
._editorContent_q3j4s_8 p {
|
|
86
86
|
margin: 0.7em 0;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.
|
|
90
|
-
.
|
|
89
|
+
._editorContent_q3j4s_8 ul,
|
|
90
|
+
._editorContent_q3j4s_8 ol {
|
|
91
91
|
padding-left: 1.5em;
|
|
92
92
|
margin: 0.7em 0;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
._editorContent_q3j4s_8 ul {
|
|
96
96
|
list-style: disc;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
._editorContent_q3j4s_8 ol {
|
|
100
100
|
list-style: decimal;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.
|
|
103
|
+
._editorContent_q3j4s_8 blockquote {
|
|
104
104
|
border-left: 3px solid var(--tmr-accent, #ff6719);
|
|
105
105
|
padding-left: 1em;
|
|
106
106
|
margin: 0.9em 0;
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
font-style: italic;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.
|
|
111
|
+
._editorContent_q3j4s_8 a {
|
|
112
112
|
color: var(--tmr-accent, #ff6719);
|
|
113
113
|
text-decoration: underline;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/* 仅行内代码加灰底;代码块内的 <code>(在 pre 内)由 NodeView 自管,排除掉 */
|
|
117
|
-
.
|
|
117
|
+
._editorContent_q3j4s_8 code:not(pre code) {
|
|
118
118
|
background: var(--tmr-code-bg, #f4f4f4);
|
|
119
119
|
padding: 0.15em 0.4em;
|
|
120
120
|
border-radius: 4px;
|
|
@@ -129,13 +129,13 @@
|
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
.
|
|
132
|
+
._editorContent_q3j4s_8 hr {
|
|
133
133
|
border: none;
|
|
134
134
|
border-top: 1px solid var(--tmr-border, #e6e6e6);
|
|
135
135
|
margin: 1.5em 0;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.
|
|
138
|
+
._editorContent_q3j4s_8 img {
|
|
139
139
|
max-width: 100%;
|
|
140
140
|
height: auto;
|
|
141
141
|
border-radius: 6px;
|
|
@@ -144,53 +144,67 @@
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/* 选中的图片高亮 */
|
|
147
|
-
.
|
|
147
|
+
._editorContent_q3j4s_8 img.ProseMirror-selectednode {
|
|
148
148
|
outline: 2px solid var(--tmr-accent, #ff6719);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
/* 表格:细边框、表头浅灰;外包 .tableWrapper
|
|
152
|
-
|
|
151
|
+
/* 表格:细边框、表头浅灰;外包 .tableWrapper(编辑器 NodeView + SSR renderWrapper)
|
|
152
|
+
* 桌面:width:100% + 允许换行,整表落在阅读列内(与改前一致)
|
|
153
|
+
* 窄屏:max-content + nowrap,避免列被挤扁,wrapper 内横滑 */
|
|
154
|
+
._editorContent_q3j4s_8 .tableWrapper {
|
|
153
155
|
max-width: 100%;
|
|
154
156
|
overflow-x: auto;
|
|
155
157
|
-webkit-overflow-scrolling: touch;
|
|
156
158
|
margin: 1em 0;
|
|
157
159
|
}
|
|
158
160
|
|
|
159
|
-
.
|
|
161
|
+
._editorContent_q3j4s_8 table {
|
|
160
162
|
border-collapse: collapse;
|
|
161
|
-
/* 勿用 fixed+width:100%:窄屏会把多列均分挤扁、文字狂换行,且撑不出横滑 */
|
|
162
163
|
table-layout: auto;
|
|
163
|
-
width:
|
|
164
|
-
min-width: 100%;
|
|
165
|
-
max-width: none;
|
|
164
|
+
width: 100%;
|
|
166
165
|
margin: 0;
|
|
167
166
|
overflow: visible;
|
|
168
167
|
font-size: 0.92em;
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
/* 无 wrapper 的遗留 HTML(旧缓存)仍给一点外边距 */
|
|
172
|
-
.
|
|
171
|
+
._editorContent_q3j4s_8 :not(.tableWrapper) > table {
|
|
173
172
|
margin: 1em 0;
|
|
174
173
|
}
|
|
175
174
|
|
|
176
|
-
.
|
|
177
|
-
.
|
|
175
|
+
._editorContent_q3j4s_8 table td,
|
|
176
|
+
._editorContent_q3j4s_8 table th {
|
|
178
177
|
border: 1px solid var(--tmr-border, #e6e6e6);
|
|
179
178
|
padding: 8px 12px;
|
|
180
179
|
vertical-align: top;
|
|
181
180
|
text-align: left;
|
|
182
181
|
position: relative;
|
|
183
182
|
min-width: 60px;
|
|
184
|
-
white-space:
|
|
183
|
+
white-space: normal;
|
|
184
|
+
word-break: break-word;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.
|
|
187
|
+
._editorContent_q3j4s_8 table th {
|
|
188
188
|
background: var(--tmr-table-header-bg, #f7f7f7);
|
|
189
189
|
font-weight: 600;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
@media (max-width: 640px) {
|
|
193
|
+
._editorContent_q3j4s_8 table {
|
|
194
|
+
width: max-content;
|
|
195
|
+
min-width: 100%;
|
|
196
|
+
max-width: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
._editorContent_q3j4s_8 table td,
|
|
200
|
+
._editorContent_q3j4s_8 table th {
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
word-break: normal;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
192
206
|
/* 选中的单元格高亮 */
|
|
193
|
-
.
|
|
207
|
+
._editorContent_q3j4s_8 table .selectedCell::after {
|
|
194
208
|
content: '';
|
|
195
209
|
position: absolute;
|
|
196
210
|
inset: 0;
|
|
@@ -199,7 +213,7 @@
|
|
|
199
213
|
}
|
|
200
214
|
|
|
201
215
|
/* 列宽拖拽手柄 */
|
|
202
|
-
.
|
|
216
|
+
._editorContent_q3j4s_8 table .column-resize-handle {
|
|
203
217
|
position: absolute;
|
|
204
218
|
right: -2px;
|
|
205
219
|
top: 0;
|
|
@@ -210,34 +224,34 @@
|
|
|
210
224
|
}
|
|
211
225
|
|
|
212
226
|
/* 任务清单 */
|
|
213
|
-
.
|
|
227
|
+
._editorContent_q3j4s_8 ul[data-type='taskList'] {
|
|
214
228
|
list-style: none;
|
|
215
229
|
padding-left: 0.2em;
|
|
216
230
|
}
|
|
217
231
|
|
|
218
|
-
.
|
|
232
|
+
._editorContent_q3j4s_8 ul[data-type='taskList'] li {
|
|
219
233
|
display: flex;
|
|
220
234
|
align-items: flex-start;
|
|
221
235
|
gap: 0.5em;
|
|
222
236
|
margin: 0.3em 0;
|
|
223
237
|
}
|
|
224
238
|
|
|
225
|
-
.
|
|
239
|
+
._editorContent_q3j4s_8 ul[data-type='taskList'] li > label {
|
|
226
240
|
margin-top: 0.35em;
|
|
227
241
|
user-select: none;
|
|
228
242
|
}
|
|
229
243
|
|
|
230
|
-
.
|
|
244
|
+
._editorContent_q3j4s_8 ul[data-type='taskList'] li > div {
|
|
231
245
|
flex: 1;
|
|
232
246
|
}
|
|
233
247
|
|
|
234
|
-
.
|
|
248
|
+
._editorContent_q3j4s_8 ul[data-type='taskList'] input[type='checkbox'] {
|
|
235
249
|
accent-color: var(--tmr-accent, #ff6719);
|
|
236
250
|
cursor: pointer;
|
|
237
251
|
}
|
|
238
252
|
|
|
239
253
|
/* 脚注/引文圆标:与正文字垂直居中;配色对齐工具栏 active(浅橙底 + accent 字) */
|
|
240
|
-
.
|
|
254
|
+
._editorContent_q3j4s_8 span.citation-ref {
|
|
241
255
|
display: inline-flex;
|
|
242
256
|
align-items: center;
|
|
243
257
|
justify-content: center;
|
|
@@ -274,7 +288,7 @@
|
|
|
274
288
|
border-color 0.15s ease;
|
|
275
289
|
}
|
|
276
290
|
|
|
277
|
-
.
|
|
291
|
+
._editorContent_q3j4s_8 span.citation-ref a {
|
|
278
292
|
color: inherit;
|
|
279
293
|
text-decoration: none;
|
|
280
294
|
display: flex;
|
|
@@ -286,15 +300,15 @@
|
|
|
286
300
|
pointer-events: none;
|
|
287
301
|
}
|
|
288
302
|
|
|
289
|
-
.
|
|
290
|
-
.
|
|
291
|
-
.
|
|
303
|
+
._editorContent_q3j4s_8 span.citation-ref:hover,
|
|
304
|
+
._editorContent_q3j4s_8 span.citation-ref:focus-within,
|
|
305
|
+
._editorContent_q3j4s_8 span.citation-ref[data-tmr-citation-active] {
|
|
292
306
|
background: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
293
307
|
border-color: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
294
308
|
color: var(--tmr-citation-fg-hover, #ffffff);
|
|
295
309
|
}
|
|
296
310
|
/* 代码块 NodeView:白底、细边框、顶部 header 放语言选择(Radix 下拉)+ 删除。 */
|
|
297
|
-
.
|
|
311
|
+
._wrapper_5i2vi_2 {
|
|
298
312
|
position: relative;
|
|
299
313
|
margin: 0.9em 0;
|
|
300
314
|
border: 1px solid #e8e8e8;
|
|
@@ -304,13 +318,13 @@
|
|
|
304
318
|
}
|
|
305
319
|
|
|
306
320
|
/* 选中整个代码块时(NodeSelection):accent 边框高亮,作为删除前的二次确认提示 */
|
|
307
|
-
.
|
|
308
|
-
.ProseMirror-selectednode > .
|
|
321
|
+
._wrapper_5i2vi_2.ProseMirror-selectednode,
|
|
322
|
+
.ProseMirror-selectednode > ._wrapper_5i2vi_2 {
|
|
309
323
|
border-color: var(--tmr-accent, #ff6719);
|
|
310
324
|
box-shadow: 0 0 0 1px var(--tmr-accent, #ff6719);
|
|
311
325
|
}
|
|
312
326
|
|
|
313
|
-
.
|
|
327
|
+
._header_5i2vi_18 {
|
|
314
328
|
display: flex;
|
|
315
329
|
align-items: center;
|
|
316
330
|
justify-content: flex-end;
|
|
@@ -320,7 +334,7 @@
|
|
|
320
334
|
}
|
|
321
335
|
|
|
322
336
|
/* 语言选择触发按钮:无边框胶囊,hover 出灰底,右侧箭头图标 */
|
|
323
|
-
.
|
|
337
|
+
._langTrigger_5i2vi_28 {
|
|
324
338
|
display: inline-flex;
|
|
325
339
|
align-items: center;
|
|
326
340
|
gap: 4px;
|
|
@@ -337,18 +351,33 @@
|
|
|
337
351
|
transition: background 0.15s;
|
|
338
352
|
}
|
|
339
353
|
|
|
340
|
-
.
|
|
341
|
-
.
|
|
354
|
+
._langTrigger_5i2vi_28:hover,
|
|
355
|
+
._langTrigger_5i2vi_28[data-state='open'] {
|
|
342
356
|
background-color: #f0f0f0;
|
|
343
357
|
}
|
|
344
358
|
|
|
345
|
-
.
|
|
359
|
+
._langChevron_5i2vi_50 {
|
|
346
360
|
color: #8a8a8a;
|
|
347
361
|
flex-shrink: 0;
|
|
348
362
|
}
|
|
349
363
|
|
|
364
|
+
/* 只读态语言徽标:无下拉 / 删除交互,样式对齐 langTrigger 但不可点 */
|
|
365
|
+
._langBadge_5i2vi_56 {
|
|
366
|
+
display: inline-flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
padding: 3px 10px;
|
|
369
|
+
margin: 8px 12px;
|
|
370
|
+
border-radius: 8px;
|
|
371
|
+
background: #f0f0f0;
|
|
372
|
+
color: #6b7280;
|
|
373
|
+
font-size: 13px;
|
|
374
|
+
font-weight: 500;
|
|
375
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
376
|
+
user-select: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
350
379
|
/* 下拉菜单气泡:白底圆角、细边框、轻阴影,最大高度可滚动 */
|
|
351
|
-
.
|
|
380
|
+
._langMenu_5i2vi_71 {
|
|
352
381
|
z-index: 50;
|
|
353
382
|
min-width: 160px;
|
|
354
383
|
max-height: 280px;
|
|
@@ -361,7 +390,7 @@
|
|
|
361
390
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
362
391
|
}
|
|
363
392
|
|
|
364
|
-
.
|
|
393
|
+
._langItem_5i2vi_84 {
|
|
365
394
|
display: flex;
|
|
366
395
|
align-items: center;
|
|
367
396
|
gap: 6px;
|
|
@@ -376,16 +405,16 @@
|
|
|
376
405
|
}
|
|
377
406
|
|
|
378
407
|
/* 键盘方向键 / 鼠标 hover 高亮态(Radix 用 data-highlighted 标记) */
|
|
379
|
-
.
|
|
408
|
+
._langItem_5i2vi_84[data-highlighted] {
|
|
380
409
|
background-color: #f0f0f0;
|
|
381
410
|
}
|
|
382
411
|
|
|
383
|
-
.
|
|
412
|
+
._langItemSelected_5i2vi_103 {
|
|
384
413
|
color: var(--tmr-accent, #ff6719);
|
|
385
414
|
font-weight: 600;
|
|
386
415
|
}
|
|
387
416
|
|
|
388
|
-
.
|
|
417
|
+
._langItemCheck_5i2vi_108 {
|
|
389
418
|
display: inline-flex;
|
|
390
419
|
align-items: center;
|
|
391
420
|
justify-content: center;
|
|
@@ -393,7 +422,7 @@
|
|
|
393
422
|
flex-shrink: 0;
|
|
394
423
|
}
|
|
395
424
|
|
|
396
|
-
.
|
|
425
|
+
._deleteBtn_5i2vi_116 {
|
|
397
426
|
display: inline-flex;
|
|
398
427
|
align-items: center;
|
|
399
428
|
justify-content: center;
|
|
@@ -408,12 +437,12 @@
|
|
|
408
437
|
transition: background 0.15s, color 0.15s;
|
|
409
438
|
}
|
|
410
439
|
|
|
411
|
-
.
|
|
440
|
+
._deleteBtn_5i2vi_116:hover {
|
|
412
441
|
background: #f4f4f4;
|
|
413
442
|
color: #d4380d;
|
|
414
443
|
}
|
|
415
444
|
|
|
416
|
-
.
|
|
445
|
+
._pre_5i2vi_136 {
|
|
417
446
|
margin: 0;
|
|
418
447
|
padding: 16px 18px;
|
|
419
448
|
background: transparent;
|
|
@@ -424,7 +453,7 @@
|
|
|
424
453
|
line-height: 1.65;
|
|
425
454
|
}
|
|
426
455
|
|
|
427
|
-
.
|
|
456
|
+
._pre_5i2vi_136 code {
|
|
428
457
|
display: block;
|
|
429
458
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
430
459
|
color: #24292e;
|
|
@@ -436,45 +465,45 @@
|
|
|
436
465
|
}
|
|
437
466
|
|
|
438
467
|
/* 语法高亮配色(lowlight / highlight.js token,GitHub 浅色主题) */
|
|
439
|
-
.
|
|
440
|
-
.
|
|
468
|
+
._pre_5i2vi_136 .hljs-comment,
|
|
469
|
+
._pre_5i2vi_136 .hljs-quote {
|
|
441
470
|
color: #6a737d;
|
|
442
471
|
font-style: italic;
|
|
443
472
|
}
|
|
444
473
|
|
|
445
|
-
.
|
|
446
|
-
.
|
|
447
|
-
.
|
|
448
|
-
.
|
|
474
|
+
._pre_5i2vi_136 .hljs-keyword,
|
|
475
|
+
._pre_5i2vi_136 .hljs-selector-tag,
|
|
476
|
+
._pre_5i2vi_136 .hljs-literal,
|
|
477
|
+
._pre_5i2vi_136 .hljs-type {
|
|
449
478
|
color: #d73a49;
|
|
450
479
|
}
|
|
451
480
|
|
|
452
|
-
.
|
|
453
|
-
.
|
|
454
|
-
.
|
|
481
|
+
._pre_5i2vi_136 .hljs-string,
|
|
482
|
+
._pre_5i2vi_136 .hljs-meta .hljs-string,
|
|
483
|
+
._pre_5i2vi_136 .hljs-regexp {
|
|
455
484
|
color: #032f62;
|
|
456
485
|
}
|
|
457
486
|
|
|
458
|
-
.
|
|
459
|
-
.
|
|
460
|
-
.
|
|
487
|
+
._pre_5i2vi_136 .hljs-number,
|
|
488
|
+
._pre_5i2vi_136 .hljs-built_in,
|
|
489
|
+
._pre_5i2vi_136 .hljs-builtin-name {
|
|
461
490
|
color: #005cc5;
|
|
462
491
|
}
|
|
463
492
|
|
|
464
|
-
.
|
|
465
|
-
.
|
|
466
|
-
.
|
|
493
|
+
._pre_5i2vi_136 .hljs-title,
|
|
494
|
+
._pre_5i2vi_136 .hljs-function .hljs-title,
|
|
495
|
+
._pre_5i2vi_136 .hljs-section {
|
|
467
496
|
color: #6f42c1;
|
|
468
497
|
}
|
|
469
498
|
|
|
470
|
-
.
|
|
471
|
-
.
|
|
472
|
-
.
|
|
473
|
-
.
|
|
499
|
+
._pre_5i2vi_136 .hljs-attr,
|
|
500
|
+
._pre_5i2vi_136 .hljs-attribute,
|
|
501
|
+
._pre_5i2vi_136 .hljs-variable,
|
|
502
|
+
._pre_5i2vi_136 .hljs-template-variable {
|
|
474
503
|
color: #e36209;
|
|
475
504
|
}
|
|
476
505
|
|
|
477
|
-
.
|
|
506
|
+
._pre_5i2vi_136 .hljs-tag {
|
|
478
507
|
color: #22863a;
|
|
479
508
|
}
|
|
480
509
|
/* 顶部操作栏:横跨宽度、内容居中、细线灰图标。配色映射到可覆盖的 --tmr-* 变量。 */
|
|
@@ -1021,3 +1050,84 @@
|
|
|
1021
1050
|
transition: none;
|
|
1022
1051
|
}
|
|
1023
1052
|
}
|
|
1053
|
+
/* 评论锚定样式(编辑会话专属,只读态不渲染)。
|
|
1054
|
+
全部走 :global + --tmr-* 变量,与库其它样式约定一致。 */
|
|
1055
|
+
|
|
1056
|
+
.tmr-comment {
|
|
1057
|
+
background: var(--tmr-comment-bg, rgba(255, 213, 79, 0.32));
|
|
1058
|
+
border-radius: 3px;
|
|
1059
|
+
padding: 0 1px;
|
|
1060
|
+
cursor: pointer;
|
|
1061
|
+
box-decoration-break: clone;
|
|
1062
|
+
-webkit-box-decoration-break: clone;
|
|
1063
|
+
transition: background 0.12s ease;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.tmr-comment:hover {
|
|
1067
|
+
background: var(--tmr-comment-bg-hover, rgba(255, 213, 79, 0.5));
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/* active:sidebar 点评论 / 编辑器内点 mark 后的强调态 */
|
|
1071
|
+
.tmr-comment.tmr-comment-active {
|
|
1072
|
+
background: var(--tmr-comment-bg-active, rgba(255, 183, 0, 0.55));
|
|
1073
|
+
box-shadow: 0 0 0 2px var(--tmr-comment-ring, rgba(191, 121, 0, 0.35));
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/* active 评论所在 block 的外框 */
|
|
1077
|
+
.tmr-comment-block-active {
|
|
1078
|
+
box-shadow: 0 0 0 3px var(--tmr-comment-ring, rgba(219, 171, 10, 0.55));
|
|
1079
|
+
border-radius: 4px;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/* block 左缘 gutter 气泡(Decoration.widget,side:-1 前置) */
|
|
1083
|
+
.tmr-comment-gutter {
|
|
1084
|
+
position: absolute;
|
|
1085
|
+
left: -30px;
|
|
1086
|
+
top: 50%;
|
|
1087
|
+
transform: translateY(-50%);
|
|
1088
|
+
min-width: 18px;
|
|
1089
|
+
height: 18px;
|
|
1090
|
+
padding: 0 4px;
|
|
1091
|
+
box-sizing: border-box;
|
|
1092
|
+
display: inline-flex;
|
|
1093
|
+
align-items: center;
|
|
1094
|
+
justify-content: center;
|
|
1095
|
+
border-radius: 999px;
|
|
1096
|
+
background: var(--tmr-comment-gutter-bg, #f4b400);
|
|
1097
|
+
color: #fff;
|
|
1098
|
+
font-size: 11px;
|
|
1099
|
+
font-weight: 600;
|
|
1100
|
+
line-height: 1;
|
|
1101
|
+
cursor: pointer;
|
|
1102
|
+
user-select: none;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.tmr-comment-gutter:hover {
|
|
1106
|
+
background: var(--tmr-comment-gutter-bg-hover, #dd9f00);
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
._popoverAnchor_ztxwe_57 {
|
|
1110
|
+
position: fixed;
|
|
1111
|
+
width: 0;
|
|
1112
|
+
height: 0;
|
|
1113
|
+
pointer-events: none;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
._popoverContent_ztxwe_64 {
|
|
1117
|
+
min-width: 320px;
|
|
1118
|
+
max-width: 420px;
|
|
1119
|
+
background: var(--tmr-popover-bg, #fff);
|
|
1120
|
+
border: 1px solid var(--tmr-border, #e4e2dd);
|
|
1121
|
+
border-radius: 8px;
|
|
1122
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
1123
|
+
padding: 12px 14px;
|
|
1124
|
+
font-family: var(--tmr-body-font, inherit);
|
|
1125
|
+
font-size: 13px;
|
|
1126
|
+
line-height: 1.55;
|
|
1127
|
+
color: var(--tmr-text, #363737);
|
|
1128
|
+
outline: none;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
._popoverContent_ztxwe_64 .tmr-popover-arrow {
|
|
1132
|
+
fill: var(--tmr-popover-bg, #fff);
|
|
1133
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptap-markdown-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A batteries-included, self-styled Markdown WYSIWYG editor and reader suite built on Tiptap v3. Markdown in/out, SSR/static rendering, table of contents, themeable via CSS variables, zero Ant Design.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|