tiptap-markdown-react 0.10.4 → 0.11.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 +52 -1
- package/THIRD_PARTY_LICENSES.md +2 -0
- package/dist/{ReportContent-DQKBSQmm.js → ReportContent-By-tSiNn.js} +9 -3
- package/dist/{ReportContent-DQKBSQmm.js.map → ReportContent-By-tSiNn.js.map} +1 -1
- package/dist/components/FindReplaceBar.d.ts +25 -0
- package/dist/components/FindReplaceBar.dom.test.d.ts +1 -0
- package/dist/components/MarkdownWysiwygEditor.d.ts +19 -1
- package/dist/{extractToc-CKTMdT0a.js → extractToc-CB4RYsMJ.js} +2 -2
- package/dist/{extractToc-CKTMdT0a.js.map → extractToc-CB4RYsMJ.js.map} +1 -1
- package/dist/findReplace.d.ts +30 -0
- package/dist/findReplace.test.d.ts +1 -0
- package/dist/icons/index.d.ts +5 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +741 -365
- package/dist/index.js.map +1 -1
- package/dist/labels.d.ts +21 -0
- package/dist/reader.js +2 -2
- package/dist/{scrollToTocHeading-DIAd_fIC.js → scrollToTocHeading-EkePiWil.js} +2 -2
- package/dist/{scrollToTocHeading-DIAd_fIC.js.map → scrollToTocHeading-EkePiWil.js.map} +1 -1
- package/dist/server.js +4 -4
- package/dist/style.css +225 -49
- package/package.json +30 -29
package/dist/style.css
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
/* 规范正文样式(编辑器 / 只读预览 / SSR 阅读三处共用同一个类,保证所见即所得、
|
|
2
2
|
发布后一致)。配色/字体全部走可被消费方覆盖的 CSS 变量(--tmr-*,带默认值)。 */
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/* 编辑器最外层:查找替换浮动条的粘性范围就是它(超出编辑器范围后浮动条随之离场)。
|
|
5
|
+
正文的滚动容器仍是 .editorScroll(宿主传的 className 依然落在它身上,契约不变)。 */
|
|
6
|
+
._editorHost_teucm_6 {
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* 浮动条的粘性锚点:高度 0,不占布局、不推挤正文;sticky 让浮动条在「最近的滚动容器」
|
|
11
|
+
里粘住(宿主的外层滚动容器或页面本身),正文滚动时不会把条子卷上去。
|
|
12
|
+
注意:锚点必须在 DOM 里排在正文之前——排在后面的话它的自然位置在正文底部,粘性范围就错了。 */
|
|
13
|
+
._findBarAnchor_teucm_13 {
|
|
14
|
+
position: sticky;
|
|
15
|
+
top: 4px;
|
|
16
|
+
height: 0;
|
|
17
|
+
z-index: 7;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* 浮动条本体:相对锚点绝对定位,浮在正文右上角 */
|
|
21
|
+
._findBar_teucm_13 {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
right: 4px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
._editorScroll_teucm_5 {
|
|
5
28
|
margin-top: 24px;
|
|
6
29
|
position: relative;
|
|
7
30
|
}
|
|
8
31
|
|
|
9
|
-
.
|
|
32
|
+
._editorContent_teucm_32 {
|
|
10
33
|
outline: none;
|
|
11
34
|
padding: 0;
|
|
12
35
|
font-family: var(
|
|
@@ -29,7 +52,7 @@
|
|
|
29
52
|
}
|
|
30
53
|
|
|
31
54
|
/* placeholder:空文档第一段显示占位符 */
|
|
32
|
-
.
|
|
55
|
+
._editorContent_teucm_32 p.is-editor-empty:first-child::before {
|
|
33
56
|
content: attr(data-placeholder);
|
|
34
57
|
float: left;
|
|
35
58
|
height: 0;
|
|
@@ -37,7 +60,7 @@
|
|
|
37
60
|
pointer-events: none;
|
|
38
61
|
}
|
|
39
62
|
|
|
40
|
-
.
|
|
63
|
+
._editorContent_teucm_32 h1 {
|
|
41
64
|
font-family: inherit;
|
|
42
65
|
font-size: 1.55em;
|
|
43
66
|
font-weight: 700;
|
|
@@ -45,7 +68,7 @@
|
|
|
45
68
|
line-height: 1.3;
|
|
46
69
|
}
|
|
47
70
|
|
|
48
|
-
.
|
|
71
|
+
._editorContent_teucm_32 h2 {
|
|
49
72
|
font-family: inherit;
|
|
50
73
|
font-size: 1.3em;
|
|
51
74
|
font-weight: 700;
|
|
@@ -53,7 +76,7 @@
|
|
|
53
76
|
line-height: 1.3;
|
|
54
77
|
}
|
|
55
78
|
|
|
56
|
-
.
|
|
79
|
+
._editorContent_teucm_32 h3 {
|
|
57
80
|
font-family: inherit;
|
|
58
81
|
font-size: 1.12em;
|
|
59
82
|
font-weight: 600;
|
|
@@ -61,21 +84,21 @@
|
|
|
61
84
|
}
|
|
62
85
|
|
|
63
86
|
/* h4-h6:延续 h1-h3 尺寸梯度递减;字号差变小后靠字重保持标题感,h6 字色稍弱。 */
|
|
64
|
-
.
|
|
87
|
+
._editorContent_teucm_32 h4 {
|
|
65
88
|
font-family: inherit;
|
|
66
89
|
font-size: 1.05em;
|
|
67
90
|
font-weight: 600;
|
|
68
91
|
margin: 0.7em 0 0.3em;
|
|
69
92
|
}
|
|
70
93
|
|
|
71
|
-
.
|
|
94
|
+
._editorContent_teucm_32 h5 {
|
|
72
95
|
font-family: inherit;
|
|
73
96
|
font-size: 0.95em;
|
|
74
97
|
font-weight: 600;
|
|
75
98
|
margin: 0.7em 0 0.3em;
|
|
76
99
|
}
|
|
77
100
|
|
|
78
|
-
.
|
|
101
|
+
._editorContent_teucm_32 h6 {
|
|
79
102
|
font-family: inherit;
|
|
80
103
|
font-size: 0.88em;
|
|
81
104
|
font-weight: 600;
|
|
@@ -83,25 +106,25 @@
|
|
|
83
106
|
color: var(--tmr-muted, #777777);
|
|
84
107
|
}
|
|
85
108
|
|
|
86
|
-
.
|
|
109
|
+
._editorContent_teucm_32 p {
|
|
87
110
|
margin: 0.7em 0;
|
|
88
111
|
}
|
|
89
112
|
|
|
90
|
-
.
|
|
91
|
-
.
|
|
113
|
+
._editorContent_teucm_32 ul,
|
|
114
|
+
._editorContent_teucm_32 ol {
|
|
92
115
|
padding-left: 1.5em;
|
|
93
116
|
margin: 0.7em 0;
|
|
94
117
|
}
|
|
95
118
|
|
|
96
|
-
.
|
|
119
|
+
._editorContent_teucm_32 ul {
|
|
97
120
|
list-style: disc;
|
|
98
121
|
}
|
|
99
122
|
|
|
100
|
-
.
|
|
123
|
+
._editorContent_teucm_32 ol {
|
|
101
124
|
list-style: decimal;
|
|
102
125
|
}
|
|
103
126
|
|
|
104
|
-
.
|
|
127
|
+
._editorContent_teucm_32 blockquote {
|
|
105
128
|
border-left: 3px solid var(--tmr-accent, #ff6719);
|
|
106
129
|
padding-left: 1em;
|
|
107
130
|
margin: 0.9em 0;
|
|
@@ -109,13 +132,13 @@
|
|
|
109
132
|
font-style: italic;
|
|
110
133
|
}
|
|
111
134
|
|
|
112
|
-
.
|
|
135
|
+
._editorContent_teucm_32 a {
|
|
113
136
|
color: var(--tmr-accent, #ff6719);
|
|
114
137
|
text-decoration: underline;
|
|
115
138
|
}
|
|
116
139
|
|
|
117
140
|
/* 仅行内代码加灰底;代码块内的 <code>(在 pre 内)由 NodeView 自管,排除掉 */
|
|
118
|
-
.
|
|
141
|
+
._editorContent_teucm_32 code:not(pre code) {
|
|
119
142
|
background: var(--tmr-code-bg, #f4f4f4);
|
|
120
143
|
padding: 0.15em 0.4em;
|
|
121
144
|
border-radius: 4px;
|
|
@@ -130,13 +153,13 @@
|
|
|
130
153
|
);
|
|
131
154
|
}
|
|
132
155
|
|
|
133
|
-
.
|
|
156
|
+
._editorContent_teucm_32 hr {
|
|
134
157
|
border: none;
|
|
135
158
|
border-top: 1px solid var(--tmr-border, #e6e6e6);
|
|
136
159
|
margin: 1.5em 0;
|
|
137
160
|
}
|
|
138
161
|
|
|
139
|
-
.
|
|
162
|
+
._editorContent_teucm_32 img {
|
|
140
163
|
max-width: 100%;
|
|
141
164
|
height: auto;
|
|
142
165
|
border-radius: 6px;
|
|
@@ -145,21 +168,21 @@
|
|
|
145
168
|
}
|
|
146
169
|
|
|
147
170
|
/* 选中的图片高亮 */
|
|
148
|
-
.
|
|
171
|
+
._editorContent_teucm_32 img.ProseMirror-selectednode {
|
|
149
172
|
outline: 2px solid var(--tmr-accent, #ff6719);
|
|
150
173
|
}
|
|
151
174
|
|
|
152
175
|
/* 表格:细边框、表头浅灰;外包 .tableWrapper(编辑器 NodeView + SSR renderWrapper)
|
|
153
176
|
* 桌面:width:100% + 允许换行,整表落在阅读列内(与改前一致)
|
|
154
177
|
* 窄屏:max-content + nowrap,避免列被挤扁,wrapper 内横滑 */
|
|
155
|
-
.
|
|
178
|
+
._editorContent_teucm_32 .tableWrapper {
|
|
156
179
|
max-width: 100%;
|
|
157
180
|
overflow-x: auto;
|
|
158
181
|
-webkit-overflow-scrolling: touch;
|
|
159
182
|
margin: 1em 0;
|
|
160
183
|
}
|
|
161
184
|
|
|
162
|
-
.
|
|
185
|
+
._editorContent_teucm_32 table {
|
|
163
186
|
border-collapse: collapse;
|
|
164
187
|
table-layout: auto;
|
|
165
188
|
width: 100%;
|
|
@@ -169,12 +192,12 @@
|
|
|
169
192
|
}
|
|
170
193
|
|
|
171
194
|
/* 无 wrapper 的遗留 HTML(旧缓存)仍给一点外边距 */
|
|
172
|
-
.
|
|
195
|
+
._editorContent_teucm_32 :not(.tableWrapper) > table {
|
|
173
196
|
margin: 1em 0;
|
|
174
197
|
}
|
|
175
198
|
|
|
176
|
-
.
|
|
177
|
-
.
|
|
199
|
+
._editorContent_teucm_32 table td,
|
|
200
|
+
._editorContent_teucm_32 table th {
|
|
178
201
|
border: 1px solid var(--tmr-border, #e6e6e6);
|
|
179
202
|
padding: 8px 12px;
|
|
180
203
|
vertical-align: top;
|
|
@@ -185,27 +208,27 @@
|
|
|
185
208
|
word-break: break-word;
|
|
186
209
|
}
|
|
187
210
|
|
|
188
|
-
.
|
|
211
|
+
._editorContent_teucm_32 table th {
|
|
189
212
|
background: var(--tmr-table-header-bg, #f7f7f7);
|
|
190
213
|
font-weight: 600;
|
|
191
214
|
}
|
|
192
215
|
|
|
193
216
|
@media (max-width: 640px) {
|
|
194
|
-
.
|
|
217
|
+
._editorContent_teucm_32 table {
|
|
195
218
|
width: max-content;
|
|
196
219
|
min-width: 100%;
|
|
197
220
|
max-width: none;
|
|
198
221
|
}
|
|
199
222
|
|
|
200
|
-
.
|
|
201
|
-
.
|
|
223
|
+
._editorContent_teucm_32 table td,
|
|
224
|
+
._editorContent_teucm_32 table th {
|
|
202
225
|
white-space: nowrap;
|
|
203
226
|
word-break: normal;
|
|
204
227
|
}
|
|
205
228
|
}
|
|
206
229
|
|
|
207
230
|
/* 选中的单元格高亮 */
|
|
208
|
-
.
|
|
231
|
+
._editorContent_teucm_32 table .selectedCell::after {
|
|
209
232
|
content: '';
|
|
210
233
|
position: absolute;
|
|
211
234
|
inset: 0;
|
|
@@ -214,7 +237,7 @@
|
|
|
214
237
|
}
|
|
215
238
|
|
|
216
239
|
/* 列宽拖拽手柄 */
|
|
217
|
-
.
|
|
240
|
+
._editorContent_teucm_32 table .column-resize-handle {
|
|
218
241
|
position: absolute;
|
|
219
242
|
right: -2px;
|
|
220
243
|
top: 0;
|
|
@@ -227,30 +250,30 @@
|
|
|
227
250
|
/* 任务清单:复选框与首行文字在同一行高内垂直居中。
|
|
228
251
|
li 是 flex 容器,项内段落的外边距不会塌到 li 外(不像普通 ul/ol),只会把正文往下推,
|
|
229
252
|
所以项内段落清零外边距,项间距改由 li 按 ul/ol 的 0.7em 承担。 */
|
|
230
|
-
.
|
|
253
|
+
._editorContent_teucm_32 ul[data-type='taskList'] {
|
|
231
254
|
list-style: none;
|
|
232
255
|
padding-left: 0.2em;
|
|
233
256
|
}
|
|
234
257
|
|
|
235
|
-
.
|
|
258
|
+
._editorContent_teucm_32 ul[data-type='taskList'] li {
|
|
236
259
|
display: flex;
|
|
237
260
|
align-items: flex-start;
|
|
238
261
|
gap: 0.5em;
|
|
239
262
|
margin: 0.7em 0;
|
|
240
263
|
}
|
|
241
264
|
|
|
242
|
-
.
|
|
265
|
+
._editorContent_teucm_32 ul[data-type='taskList'] li > div > p {
|
|
243
266
|
margin: 0;
|
|
244
267
|
}
|
|
245
268
|
|
|
246
269
|
/* 项内第二段起保留半档间距,避免多段任务项的段落粘成一片(首段仍不带外边距) */
|
|
247
|
-
.
|
|
270
|
+
._editorContent_teucm_32 ul[data-type='taskList'] li > div > p + p {
|
|
248
271
|
margin-top: 0.35em;
|
|
249
272
|
}
|
|
250
273
|
|
|
251
274
|
/* label 撑满一行行高并居中,框心落在首行文字中线上;
|
|
252
275
|
1lh 即该元素当前行高,随 --tmr-line-height(数字或长度写法)一起变,不靠手调偏移。 */
|
|
253
|
-
.
|
|
276
|
+
._editorContent_teucm_32 ul[data-type='taskList'] li > label {
|
|
254
277
|
display: flex;
|
|
255
278
|
align-items: center;
|
|
256
279
|
flex: 0 0 auto;
|
|
@@ -258,18 +281,18 @@
|
|
|
258
281
|
user-select: none;
|
|
259
282
|
}
|
|
260
283
|
|
|
261
|
-
.
|
|
284
|
+
._editorContent_teucm_32 ul[data-type='taskList'] li > div {
|
|
262
285
|
flex: 1;
|
|
263
286
|
}
|
|
264
287
|
|
|
265
|
-
.
|
|
288
|
+
._editorContent_teucm_32 ul[data-type='taskList'] input[type='checkbox'] {
|
|
266
289
|
margin: 0;
|
|
267
290
|
accent-color: var(--tmr-accent, #ff6719);
|
|
268
291
|
cursor: pointer;
|
|
269
292
|
}
|
|
270
293
|
|
|
271
294
|
/* 脚注/引文圆标:与正文字垂直居中;配色对齐工具栏 active(浅橙底 + accent 字) */
|
|
272
|
-
.
|
|
295
|
+
._editorContent_teucm_32 span.citation-ref {
|
|
273
296
|
display: inline-flex;
|
|
274
297
|
align-items: center;
|
|
275
298
|
justify-content: center;
|
|
@@ -306,7 +329,7 @@
|
|
|
306
329
|
border-color 0.15s ease;
|
|
307
330
|
}
|
|
308
331
|
|
|
309
|
-
.
|
|
332
|
+
._editorContent_teucm_32 span.citation-ref a {
|
|
310
333
|
color: inherit;
|
|
311
334
|
text-decoration: none;
|
|
312
335
|
display: flex;
|
|
@@ -318,26 +341,26 @@
|
|
|
318
341
|
pointer-events: none;
|
|
319
342
|
}
|
|
320
343
|
|
|
321
|
-
.
|
|
322
|
-
.
|
|
323
|
-
.
|
|
344
|
+
._editorContent_teucm_32 span.citation-ref:hover,
|
|
345
|
+
._editorContent_teucm_32 span.citation-ref:focus-within,
|
|
346
|
+
._editorContent_teucm_32 span.citation-ref[data-tmr-citation-active] {
|
|
324
347
|
background: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
325
348
|
border-color: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
326
349
|
color: var(--tmr-citation-fg-hover, #ffffff);
|
|
327
350
|
}
|
|
328
351
|
|
|
329
|
-
.
|
|
352
|
+
._editorContent_teucm_32 .tiptap-mathematics-render[data-type='inline-math'] {
|
|
330
353
|
display: inline;
|
|
331
354
|
}
|
|
332
355
|
|
|
333
|
-
.
|
|
356
|
+
._editorContent_teucm_32 .tiptap-mathematics-render[data-type='block-math'] {
|
|
334
357
|
margin: 0.9em 0;
|
|
335
358
|
overflow-x: auto;
|
|
336
359
|
text-align: center;
|
|
337
360
|
}
|
|
338
361
|
|
|
339
362
|
/* 导入占位:进度写在光标处,不进 Markdown */
|
|
340
|
-
.
|
|
363
|
+
._editorContent_teucm_32 .tmr-import-placeholder {
|
|
341
364
|
display: flex;
|
|
342
365
|
align-items: center;
|
|
343
366
|
gap: 0.5em;
|
|
@@ -347,16 +370,16 @@
|
|
|
347
370
|
user-select: none;
|
|
348
371
|
}
|
|
349
372
|
|
|
350
|
-
.
|
|
373
|
+
._editorContent_teucm_32 .tmr-import-placeholder-spin {
|
|
351
374
|
width: 0.7em;
|
|
352
375
|
height: 0.7em;
|
|
353
376
|
border: 1.5px solid var(--tmr-border, #e6e6e6);
|
|
354
377
|
border-top-color: var(--tmr-accent, #ff6719);
|
|
355
378
|
border-radius: 50%;
|
|
356
|
-
animation: _tmr-import-
|
|
379
|
+
animation: _tmr-import-spin_teucm_1 0.7s linear infinite;
|
|
357
380
|
}
|
|
358
381
|
|
|
359
|
-
@keyframes _tmr-import-
|
|
382
|
+
@keyframes _tmr-import-spin_teucm_1 {
|
|
360
383
|
to {
|
|
361
384
|
transform: rotate(360deg);
|
|
362
385
|
}
|
|
@@ -564,6 +587,141 @@
|
|
|
564
587
|
background: #fff3ec;
|
|
565
588
|
border-radius: 4px;
|
|
566
589
|
}
|
|
590
|
+
/* 查找替换浮动条。配色走 --tmr-* 变量(与工具栏/评论同一套),宿主可覆盖。 */
|
|
591
|
+
|
|
592
|
+
._bar_fzqxj_3 {
|
|
593
|
+
--fb-accent: var(--tmr-accent, #ff6719);
|
|
594
|
+
--fb-text: var(--tmr-text, #363737);
|
|
595
|
+
--fb-muted: var(--tmr-toolbar-muted, #6b6b6b);
|
|
596
|
+
--fb-border: var(--tmr-toolbar-border, #ececec);
|
|
597
|
+
|
|
598
|
+
display: flex;
|
|
599
|
+
flex-direction: column;
|
|
600
|
+
gap: 6px;
|
|
601
|
+
width: max-content;
|
|
602
|
+
max-width: 100%;
|
|
603
|
+
padding: 8px;
|
|
604
|
+
box-sizing: border-box;
|
|
605
|
+
background: #fff;
|
|
606
|
+
border: 1px solid var(--fb-border);
|
|
607
|
+
border-radius: 10px;
|
|
608
|
+
box-shadow: 0 6px 24px rgb(0 0 0 / 14%);
|
|
609
|
+
color: var(--fb-text);
|
|
610
|
+
font-size: 14px;
|
|
611
|
+
line-height: 1.3;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
._row_fzqxj_25 {
|
|
615
|
+
display: flex;
|
|
616
|
+
align-items: center;
|
|
617
|
+
gap: 4px;
|
|
618
|
+
/* 窄屏(手机)允许折行,浮动条不会横向溢出 */
|
|
619
|
+
flex-wrap: wrap;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
._field_fzqxj_33 {
|
|
623
|
+
display: inline-flex;
|
|
624
|
+
align-items: center;
|
|
625
|
+
gap: 6px;
|
|
626
|
+
height: 30px;
|
|
627
|
+
padding: 0 8px;
|
|
628
|
+
box-sizing: border-box;
|
|
629
|
+
border: 1px solid var(--fb-border);
|
|
630
|
+
border-radius: 6px;
|
|
631
|
+
background: #fff;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
._field_fzqxj_33:focus-within {
|
|
635
|
+
border-color: var(--fb-accent);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
._fieldIcon_fzqxj_49 {
|
|
639
|
+
flex: none;
|
|
640
|
+
color: var(--fb-muted);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
._input_fzqxj_54 {
|
|
644
|
+
width: 190px;
|
|
645
|
+
min-width: 0;
|
|
646
|
+
border: none;
|
|
647
|
+
outline: none;
|
|
648
|
+
background: transparent;
|
|
649
|
+
color: inherit;
|
|
650
|
+
font: inherit;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* 计数:等宽数字,避免 1 / 9 → 1 / 10 时宽度跳动 */
|
|
654
|
+
._counter_fzqxj_65 {
|
|
655
|
+
flex: none;
|
|
656
|
+
min-width: 46px;
|
|
657
|
+
padding: 0 2px;
|
|
658
|
+
color: var(--fb-muted);
|
|
659
|
+
font-variant-numeric: tabular-nums;
|
|
660
|
+
text-align: right;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
._counterInvalid_fzqxj_74 {
|
|
664
|
+
color: var(--tmr-danger, #d4380d);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
._btn_fzqxj_78 {
|
|
668
|
+
display: inline-flex;
|
|
669
|
+
align-items: center;
|
|
670
|
+
justify-content: center;
|
|
671
|
+
flex: none;
|
|
672
|
+
height: 30px;
|
|
673
|
+
min-width: 30px;
|
|
674
|
+
padding: 0 8px;
|
|
675
|
+
border: none;
|
|
676
|
+
border-radius: 6px;
|
|
677
|
+
background: transparent;
|
|
678
|
+
color: var(--fb-muted);
|
|
679
|
+
font: inherit;
|
|
680
|
+
cursor: pointer;
|
|
681
|
+
transition: background 0.15s, color 0.15s;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
._btn_fzqxj_78:hover:not(:disabled) {
|
|
685
|
+
background: #f3f3f3;
|
|
686
|
+
color: var(--fb-text);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
._btn_fzqxj_78:disabled {
|
|
690
|
+
opacity: 0.3;
|
|
691
|
+
cursor: not-allowed;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/* 三个开关用短标记(Aa / ab / .*),省宽度且不依赖文案 */
|
|
695
|
+
._toggle_fzqxj_106 {
|
|
696
|
+
font-family: var(--tmr-mono-font, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
697
|
+
font-size: 13px;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
._toggleOn_fzqxj_111 {
|
|
701
|
+
color: var(--fb-accent);
|
|
702
|
+
background: #fff3ec;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
._toggleOn_fzqxj_111:hover:not(:disabled) {
|
|
706
|
+
color: var(--fb-accent);
|
|
707
|
+
background: #ffe8da;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
._textBtn_fzqxj_121 {
|
|
711
|
+
padding: 0 10px;
|
|
712
|
+
color: var(--fb-text);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
._spacer_fzqxj_126 {
|
|
716
|
+
flex: 1 1 auto;
|
|
717
|
+
min-width: 0;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
._readOnly_fzqxj_131 {
|
|
721
|
+
color: var(--fb-muted);
|
|
722
|
+
font-size: 13px;
|
|
723
|
+
white-space: nowrap;
|
|
724
|
+
}
|
|
567
725
|
/* 「这段正在被 AI 改写」的高亮(decoration,只存在于编辑会话里、不进 markdown)。
|
|
568
726
|
普通 CSS(不是 *.module.css):模块写法在这种「只做副作用的 import」下会被库构建丢掉
|
|
569
727
|
—— 与 chart.css 同一种写法,保证能进 dist/style.css。色值走 --tmr-* 变量,宿主可覆盖。 */
|
|
@@ -583,6 +741,24 @@ li.tmr-pending-anchor,
|
|
|
583
741
|
table.tmr-pending-anchor {
|
|
584
742
|
box-shadow: inset 3px 0 0 0 var(--tmr-pending-bar, rgba(22, 119, 255, 0.45));
|
|
585
743
|
}
|
|
744
|
+
/* 查找替换命中(decoration,只存在于编辑会话里、不进 markdown、不进 undo 历史)。
|
|
745
|
+
普通 CSS(不是 *.module.css):类名由 @tiptap/extension-find-and-replace 输出,必须保持全局,
|
|
746
|
+
与 chart.css / pending.css 同一种写法,保证能进 dist/style.css。色值走 --tmr-* 变量,宿主可覆盖。 */
|
|
747
|
+
|
|
748
|
+
/* 全部命中:淡黄底 + 轻微圆角(跨行的命中靠 box-decoration-break 保持断行处也有底色) */
|
|
749
|
+
.find-and-replace-result {
|
|
750
|
+
background: var(--tmr-find-bg, rgba(255, 196, 0, 0.32));
|
|
751
|
+
border-radius: 2px;
|
|
752
|
+
box-decoration-break: clone;
|
|
753
|
+
-webkit-box-decoration-break: clone;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/* 当前命中:官方在同一个元素上同时挂 result 与 result-current 两个类,所以这条规则必须写在上面
|
|
757
|
+
那条之后——同优先级下后来者胜出。 */
|
|
758
|
+
.find-and-replace-result-current {
|
|
759
|
+
background: var(--tmr-find-active-bg, rgba(255, 145, 0, 0.5));
|
|
760
|
+
box-shadow: 0 0 0 1px var(--tmr-find-active-ring, rgba(230, 122, 0, 0.7));
|
|
761
|
+
}
|
|
586
762
|
/* 代码块 NodeView:白底、细边框、顶部 header 放语言选择(Radix 下拉)+ 删除。 */
|
|
587
763
|
._wrapper_5i2vi_2 {
|
|
588
764
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptap-markdown-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|
|
@@ -67,26 +67,27 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
69
69
|
"@radix-ui/react-popover": "^1.1.15",
|
|
70
|
-
"@tiptap/core": "3.
|
|
71
|
-
"@tiptap/extension-code": "3.
|
|
72
|
-
"@tiptap/extension-code-block-lowlight": "3.
|
|
73
|
-
"@tiptap/extension-file-handler": "3.
|
|
74
|
-
"@tiptap/extension-
|
|
75
|
-
"@tiptap/extension-
|
|
76
|
-
"@tiptap/extension-
|
|
77
|
-
"@tiptap/extension-
|
|
78
|
-
"@tiptap/extension-
|
|
79
|
-
"@tiptap/extension-
|
|
80
|
-
"@tiptap/extension-table
|
|
81
|
-
"@tiptap/extension-
|
|
82
|
-
"@tiptap/extension-task-
|
|
83
|
-
"@tiptap/extension-
|
|
84
|
-
"@tiptap/
|
|
85
|
-
"@tiptap/
|
|
86
|
-
"@tiptap/
|
|
87
|
-
"@tiptap/
|
|
88
|
-
"@tiptap/
|
|
89
|
-
"@tiptap/
|
|
70
|
+
"@tiptap/core": "3.31.3",
|
|
71
|
+
"@tiptap/extension-code": "3.31.3",
|
|
72
|
+
"@tiptap/extension-code-block-lowlight": "3.31.3",
|
|
73
|
+
"@tiptap/extension-file-handler": "3.31.3",
|
|
74
|
+
"@tiptap/extension-find-and-replace": "3.31.3",
|
|
75
|
+
"@tiptap/extension-highlight": "3.31.3",
|
|
76
|
+
"@tiptap/extension-image": "3.31.3",
|
|
77
|
+
"@tiptap/extension-mathematics": "3.31.3",
|
|
78
|
+
"@tiptap/extension-subscript": "3.31.3",
|
|
79
|
+
"@tiptap/extension-superscript": "3.31.3",
|
|
80
|
+
"@tiptap/extension-table": "3.31.3",
|
|
81
|
+
"@tiptap/extension-table-of-contents": "3.31.3",
|
|
82
|
+
"@tiptap/extension-task-item": "3.31.3",
|
|
83
|
+
"@tiptap/extension-task-list": "3.31.3",
|
|
84
|
+
"@tiptap/extension-text-style": "3.31.3",
|
|
85
|
+
"@tiptap/extensions": "3.31.3",
|
|
86
|
+
"@tiptap/markdown": "3.31.3",
|
|
87
|
+
"@tiptap/pm": "3.31.3",
|
|
88
|
+
"@tiptap/react": "3.31.3",
|
|
89
|
+
"@tiptap/starter-kit": "3.31.3",
|
|
90
|
+
"@tiptap/static-renderer": "3.31.3",
|
|
90
91
|
"chart.js": "^4.5.1",
|
|
91
92
|
"katex": "^0.16.47",
|
|
92
93
|
"lowlight": "3.3.0"
|
|
@@ -105,13 +106,13 @@
|
|
|
105
106
|
"vitest": "^3.2.4"
|
|
106
107
|
},
|
|
107
108
|
"overrides": {
|
|
108
|
-
"@tiptap/core": "3.
|
|
109
|
-
"@tiptap/pm": "3.
|
|
110
|
-
"@tiptap/extension-list": "3.
|
|
111
|
-
"@tiptap/extensions": "3.
|
|
112
|
-
"@tiptap/extension-code-block": "3.
|
|
113
|
-
"@tiptap/extension-file-handler": "3.
|
|
114
|
-
"@tiptap/extension-bubble-menu": "3.
|
|
115
|
-
"@tiptap/extension-floating-menu": "3.
|
|
109
|
+
"@tiptap/core": "3.31.3",
|
|
110
|
+
"@tiptap/pm": "3.31.3",
|
|
111
|
+
"@tiptap/extension-list": "3.31.3",
|
|
112
|
+
"@tiptap/extensions": "3.31.3",
|
|
113
|
+
"@tiptap/extension-code-block": "3.31.3",
|
|
114
|
+
"@tiptap/extension-file-handler": "3.31.3",
|
|
115
|
+
"@tiptap/extension-bubble-menu": "3.31.3",
|
|
116
|
+
"@tiptap/extension-floating-menu": "3.31.3"
|
|
116
117
|
}
|
|
117
118
|
}
|