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