tiptap-markdown-react 0.14.4 → 0.15.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 +2 -0
- package/THIRD_PARTY_LICENSES.md +2 -0
- package/dist/{ReportContent-DxldXfpO.js → ReportContent-JC-DkC9D.js} +9 -7
- package/dist/{ReportContent-DxldXfpO.js.map → ReportContent-JC-DkC9D.js.map} +1 -1
- package/dist/components/MarkdownWysiwygEditor.d.ts +16 -1
- package/dist/{extractToc-C2zqDjSP.js → extractToc-FJquRnX7.js} +2 -2
- package/dist/{extractToc-C2zqDjSP.js.map → extractToc-FJquRnX7.js.map} +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +600 -59
- package/dist/index.js.map +1 -1
- package/dist/labels.d.ts +57 -0
- package/dist/reader.js +2 -2
- package/dist/{scrollToTocHeading-DKL19FQG.js → scrollToTocHeading-DTphNbqx.js} +2 -2
- package/dist/{scrollToTocHeading-DKL19FQG.js.map → scrollToTocHeading-DTphNbqx.js.map} +1 -1
- package/dist/server.js +4 -4
- package/dist/shortcuts/ShortcutPanel.d.ts +13 -0
- package/dist/shortcuts/shortcutPanel.test.d.ts +1 -0
- package/dist/shortcuts/types.d.ts +32 -0
- package/dist/slashMenu/SlashMenuExtension.d.ts +21 -0
- package/dist/slashMenu/SlashMenuPopup.d.ts +18 -0
- package/dist/slashMenu/insertSlashMarkdown.d.ts +8 -0
- package/dist/slashMenu/items.d.ts +12 -0
- package/dist/slashMenu/slashMenu.test.d.ts +1 -0
- package/dist/slashMenu/slashMenuTyping.test.d.ts +1 -0
- package/dist/slashMenu/types.d.ts +33 -0
- package/dist/style.css +353 -52
- package/package.json +3 -1
package/dist/style.css
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
/* 编辑器最外层:查找替换浮动条的粘性范围就是它(超出编辑器范围后浮动条随之离场)。
|
|
5
5
|
正文的滚动容器仍是 .editorScroll(宿主传的 className 依然落在它身上,契约不变)。 */
|
|
6
|
-
.
|
|
6
|
+
._editorHost_1hpoe_6 {
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/* 浮动条的粘性锚点:高度 0,不占布局、不推挤正文;sticky 让浮动条在「最近的滚动容器」
|
|
11
11
|
里粘住(宿主的外层滚动容器或页面本身),正文滚动时不会把条子卷上去。
|
|
12
12
|
注意:锚点必须在 DOM 里排在正文之前——排在后面的话它的自然位置在正文底部,粘性范围就错了。 */
|
|
13
|
-
.
|
|
13
|
+
._findBarAnchor_1hpoe_13 {
|
|
14
14
|
position: sticky;
|
|
15
15
|
top: 0;
|
|
16
16
|
height: 0;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* 浮动条本体:绝对定位浮在正文之上,具体落点由 findBarOffset 决定(默认右上 4px) */
|
|
21
|
-
.
|
|
21
|
+
._findBar_1hpoe_13 {
|
|
22
22
|
position: absolute;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
25
|
+
._editorScroll_1hpoe_5 {
|
|
26
26
|
margin-top: 24px;
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
._editorContent_1hpoe_30 {
|
|
31
31
|
outline: none;
|
|
32
32
|
padding: 0;
|
|
33
33
|
font-family: var(
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/* placeholder:空文档第一段显示占位符 */
|
|
53
|
-
.
|
|
53
|
+
._editorContent_1hpoe_30 p.is-editor-empty:first-child::before {
|
|
54
54
|
content: attr(data-placeholder);
|
|
55
55
|
float: left;
|
|
56
56
|
height: 0;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
pointer-events: none;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.
|
|
61
|
+
._editorContent_1hpoe_30 h1 {
|
|
62
62
|
font-family: inherit;
|
|
63
63
|
font-size: 1.55em;
|
|
64
64
|
font-weight: 700;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
line-height: 1.3;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
._editorContent_1hpoe_30 h2 {
|
|
70
70
|
font-family: inherit;
|
|
71
71
|
font-size: 1.3em;
|
|
72
72
|
font-weight: 700;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
line-height: 1.3;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.
|
|
77
|
+
._editorContent_1hpoe_30 h3 {
|
|
78
78
|
font-family: inherit;
|
|
79
79
|
font-size: 1.12em;
|
|
80
80
|
font-weight: 600;
|
|
@@ -82,21 +82,21 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* h4-h6:延续 h1-h3 尺寸梯度递减;字号差变小后靠字重保持标题感,h6 字色稍弱。 */
|
|
85
|
-
.
|
|
85
|
+
._editorContent_1hpoe_30 h4 {
|
|
86
86
|
font-family: inherit;
|
|
87
87
|
font-size: 1.05em;
|
|
88
88
|
font-weight: 600;
|
|
89
89
|
margin: 0.7em 0 0.3em;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
92
|
+
._editorContent_1hpoe_30 h5 {
|
|
93
93
|
font-family: inherit;
|
|
94
94
|
font-size: 0.95em;
|
|
95
95
|
font-weight: 600;
|
|
96
96
|
margin: 0.7em 0 0.3em;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
._editorContent_1hpoe_30 h6 {
|
|
100
100
|
font-family: inherit;
|
|
101
101
|
font-size: 0.88em;
|
|
102
102
|
font-weight: 600;
|
|
@@ -104,25 +104,25 @@
|
|
|
104
104
|
color: var(--tmr-muted, #777777);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.
|
|
107
|
+
._editorContent_1hpoe_30 p {
|
|
108
108
|
margin: 0.7em 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.
|
|
112
|
-
.
|
|
111
|
+
._editorContent_1hpoe_30 ul,
|
|
112
|
+
._editorContent_1hpoe_30 ol {
|
|
113
113
|
padding-left: 1.5em;
|
|
114
114
|
margin: 0.7em 0;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
._editorContent_1hpoe_30 ul {
|
|
118
118
|
list-style: disc;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
._editorContent_1hpoe_30 ol {
|
|
122
122
|
list-style: decimal;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
._editorContent_1hpoe_30 blockquote {
|
|
126
126
|
border-left: 3px solid var(--tmr-accent, #ff6719);
|
|
127
127
|
padding-left: 1em;
|
|
128
128
|
margin: 0.9em 0;
|
|
@@ -130,13 +130,13 @@
|
|
|
130
130
|
font-style: italic;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
._editorContent_1hpoe_30 a {
|
|
134
134
|
color: var(--tmr-accent, #ff6719);
|
|
135
135
|
text-decoration: underline;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/* 仅行内代码加灰底;代码块内的 <code>(在 pre 内)由 NodeView 自管,排除掉 */
|
|
139
|
-
.
|
|
139
|
+
._editorContent_1hpoe_30 code:not(pre code) {
|
|
140
140
|
background: var(--tmr-code-bg, #f4f4f4);
|
|
141
141
|
padding: 0.15em 0.4em;
|
|
142
142
|
border-radius: 4px;
|
|
@@ -151,13 +151,13 @@
|
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
.
|
|
154
|
+
._editorContent_1hpoe_30 hr {
|
|
155
155
|
border: none;
|
|
156
156
|
border-top: 1px solid var(--tmr-border, #e6e6e6);
|
|
157
157
|
margin: 1.5em 0;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
160
|
+
._editorContent_1hpoe_30 img {
|
|
161
161
|
max-width: 100%;
|
|
162
162
|
height: auto;
|
|
163
163
|
border-radius: 6px;
|
|
@@ -166,21 +166,21 @@
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/* 选中的图片高亮 */
|
|
169
|
-
.
|
|
169
|
+
._editorContent_1hpoe_30 img.ProseMirror-selectednode {
|
|
170
170
|
outline: 2px solid var(--tmr-accent, #ff6719);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/* 表格:细边框、表头浅灰;外包 .tableWrapper(编辑器 NodeView + SSR renderWrapper)
|
|
174
174
|
* 桌面:width:100% + 允许换行,整表落在阅读列内(与改前一致)
|
|
175
175
|
* 窄屏:max-content + nowrap,避免列被挤扁,wrapper 内横滑 */
|
|
176
|
-
.
|
|
176
|
+
._editorContent_1hpoe_30 .tableWrapper {
|
|
177
177
|
max-width: 100%;
|
|
178
178
|
overflow-x: auto;
|
|
179
179
|
-webkit-overflow-scrolling: touch;
|
|
180
180
|
margin: 1em 0;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.
|
|
183
|
+
._editorContent_1hpoe_30 table {
|
|
184
184
|
border-collapse: collapse;
|
|
185
185
|
table-layout: auto;
|
|
186
186
|
width: 100%;
|
|
@@ -190,12 +190,12 @@
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/* 无 wrapper 的遗留 HTML(旧缓存)仍给一点外边距 */
|
|
193
|
-
.
|
|
193
|
+
._editorContent_1hpoe_30 :not(.tableWrapper) > table {
|
|
194
194
|
margin: 1em 0;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
.
|
|
198
|
-
.
|
|
197
|
+
._editorContent_1hpoe_30 table td,
|
|
198
|
+
._editorContent_1hpoe_30 table th {
|
|
199
199
|
border: 1px solid var(--tmr-border, #e6e6e6);
|
|
200
200
|
padding: 8px 12px;
|
|
201
201
|
vertical-align: top;
|
|
@@ -206,27 +206,27 @@
|
|
|
206
206
|
word-break: break-word;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.
|
|
209
|
+
._editorContent_1hpoe_30 table th {
|
|
210
210
|
background: var(--tmr-table-header-bg, #f7f7f7);
|
|
211
211
|
font-weight: 600;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
@media (max-width: 640px) {
|
|
215
|
-
.
|
|
215
|
+
._editorContent_1hpoe_30 table {
|
|
216
216
|
width: max-content;
|
|
217
217
|
min-width: 100%;
|
|
218
218
|
max-width: none;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
.
|
|
222
|
-
.
|
|
221
|
+
._editorContent_1hpoe_30 table td,
|
|
222
|
+
._editorContent_1hpoe_30 table th {
|
|
223
223
|
white-space: nowrap;
|
|
224
224
|
word-break: normal;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/* 选中的单元格高亮 */
|
|
229
|
-
.
|
|
229
|
+
._editorContent_1hpoe_30 table .selectedCell::after {
|
|
230
230
|
content: '';
|
|
231
231
|
position: absolute;
|
|
232
232
|
inset: 0;
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
/* 列宽拖拽手柄 */
|
|
238
|
-
.
|
|
238
|
+
._editorContent_1hpoe_30 table .column-resize-handle {
|
|
239
239
|
position: absolute;
|
|
240
240
|
right: -2px;
|
|
241
241
|
top: 0;
|
|
@@ -248,30 +248,30 @@
|
|
|
248
248
|
/* 任务清单:复选框与首行文字在同一行高内垂直居中。
|
|
249
249
|
li 是 flex 容器,项内段落的外边距不会塌到 li 外(不像普通 ul/ol),只会把正文往下推,
|
|
250
250
|
所以项内段落清零外边距,项间距改由 li 按 ul/ol 的 0.7em 承担。 */
|
|
251
|
-
.
|
|
251
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] {
|
|
252
252
|
list-style: none;
|
|
253
253
|
padding-left: 0.2em;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.
|
|
256
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] li {
|
|
257
257
|
display: flex;
|
|
258
258
|
align-items: flex-start;
|
|
259
259
|
gap: 0.5em;
|
|
260
260
|
margin: 0.7em 0;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
.
|
|
263
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] li > div > p {
|
|
264
264
|
margin: 0;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/* 项内第二段起保留半档间距,避免多段任务项的段落粘成一片(首段仍不带外边距) */
|
|
268
|
-
.
|
|
268
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] li > div > p + p {
|
|
269
269
|
margin-top: 0.35em;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
/* label 撑满一行行高并居中,框心落在首行文字中线上;
|
|
273
273
|
1lh 即该元素当前行高,随 --tmr-line-height(数字或长度写法)一起变,不靠手调偏移。 */
|
|
274
|
-
.
|
|
274
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] li > label {
|
|
275
275
|
display: flex;
|
|
276
276
|
align-items: center;
|
|
277
277
|
flex: 0 0 auto;
|
|
@@ -279,18 +279,18 @@
|
|
|
279
279
|
user-select: none;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
.
|
|
282
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] li > div {
|
|
283
283
|
flex: 1;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
.
|
|
286
|
+
._editorContent_1hpoe_30 ul[data-type='taskList'] input[type='checkbox'] {
|
|
287
287
|
margin: 0;
|
|
288
288
|
accent-color: var(--tmr-accent, #ff6719);
|
|
289
289
|
cursor: pointer;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
/* 脚注/引文圆标:与正文字垂直居中;配色对齐工具栏 active(浅橙底 + accent 字) */
|
|
293
|
-
.
|
|
293
|
+
._editorContent_1hpoe_30 span.citation-ref {
|
|
294
294
|
display: inline-flex;
|
|
295
295
|
align-items: center;
|
|
296
296
|
justify-content: center;
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
border-color 0.15s ease;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
.
|
|
330
|
+
._editorContent_1hpoe_30 span.citation-ref a {
|
|
331
331
|
color: inherit;
|
|
332
332
|
text-decoration: none;
|
|
333
333
|
display: flex;
|
|
@@ -339,26 +339,26 @@
|
|
|
339
339
|
pointer-events: none;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
.
|
|
343
|
-
.
|
|
344
|
-
.
|
|
342
|
+
._editorContent_1hpoe_30 span.citation-ref:hover,
|
|
343
|
+
._editorContent_1hpoe_30 span.citation-ref:focus-within,
|
|
344
|
+
._editorContent_1hpoe_30 span.citation-ref[data-tmr-citation-active] {
|
|
345
345
|
background: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
346
346
|
border-color: var(--tmr-citation-bg-hover, var(--tmr-accent, #ff6719));
|
|
347
347
|
color: var(--tmr-citation-fg-hover, #ffffff);
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
.
|
|
350
|
+
._editorContent_1hpoe_30 .tiptap-mathematics-render[data-type='inline-math'] {
|
|
351
351
|
display: inline;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
.
|
|
354
|
+
._editorContent_1hpoe_30 .tiptap-mathematics-render[data-type='block-math'] {
|
|
355
355
|
margin: 0.9em 0;
|
|
356
356
|
overflow-x: auto;
|
|
357
357
|
text-align: center;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
/* 导入占位:进度写在光标处,不进 Markdown */
|
|
361
|
-
.
|
|
361
|
+
._editorContent_1hpoe_30 .tmr-import-placeholder {
|
|
362
362
|
display: flex;
|
|
363
363
|
align-items: center;
|
|
364
364
|
gap: 0.5em;
|
|
@@ -368,20 +368,48 @@
|
|
|
368
368
|
user-select: none;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
.
|
|
371
|
+
._editorContent_1hpoe_30 .tmr-import-placeholder-spin {
|
|
372
372
|
width: 0.7em;
|
|
373
373
|
height: 0.7em;
|
|
374
374
|
border: 1.5px solid var(--tmr-border, #e6e6e6);
|
|
375
375
|
border-top-color: var(--tmr-accent, #ff6719);
|
|
376
376
|
border-radius: 50%;
|
|
377
|
-
animation: _tmr-import-
|
|
377
|
+
animation: _tmr-import-spin_1hpoe_1 0.7s linear infinite;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
@keyframes _tmr-import-
|
|
380
|
+
@keyframes _tmr-import-spin_1hpoe_1 {
|
|
381
381
|
to {
|
|
382
382
|
transform: rotate(360deg);
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
+
|
|
386
|
+
/* 快捷键抽屉的悬浮入口:sticky-bottom——自然位置在编辑器底部,
|
|
387
|
+
内容滚动时保持悬浮在可视区右下;到内容末尾落位对齐右缘 */
|
|
388
|
+
._shortcutFab_1hpoe_388 {
|
|
389
|
+
position: sticky;
|
|
390
|
+
bottom: 20px;
|
|
391
|
+
z-index: 6;
|
|
392
|
+
display: flex;
|
|
393
|
+
align-items: center;
|
|
394
|
+
justify-content: center;
|
|
395
|
+
width: 44px;
|
|
396
|
+
height: 44px;
|
|
397
|
+
margin: 0 16px 12px auto;
|
|
398
|
+
padding: 0;
|
|
399
|
+
box-sizing: border-box;
|
|
400
|
+
border: 1px solid var(--tmr-toolbar-border, #ececec);
|
|
401
|
+
border-radius: 50%;
|
|
402
|
+
background: #fff;
|
|
403
|
+
color: var(--tmr-text, #363737);
|
|
404
|
+
box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
transition: box-shadow 0.15s, color 0.15s;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
._shortcutFab_1hpoe_388:hover {
|
|
410
|
+
color: var(--tmr-accent, #ff6719);
|
|
411
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
|
|
412
|
+
}
|
|
385
413
|
/* Global chart styles — shared by NodeView, SSR placeholder, ChartMount */
|
|
386
414
|
|
|
387
415
|
.tmr-chart {
|
|
@@ -744,6 +772,279 @@
|
|
|
744
772
|
font-size: 13px;
|
|
745
773
|
white-space: nowrap;
|
|
746
774
|
}
|
|
775
|
+
/* 斜杠菜单弹层。样式对齐工具栏下拉菜单(toolbar.module.css 的 .menu/.menuItem)
|
|
776
|
+
——同一套面板(10px 圆角 + ring 阴影)、条目(6px 圆角 + #f3f3f3 悬停)、
|
|
777
|
+
选中态(#fff3ec + 品牌色)、文字字形图标槽(26px,SF Pro Display 粗体)。
|
|
778
|
+
配色走 --tmr-* 变量:弹层挂 document.body(逃出宿主 overflow 裁剪),
|
|
779
|
+
挂载时由扩展把编辑器上解析出的变量值复制到宿主元素,主题保真不依赖
|
|
780
|
+
变量定义位置。定位(absolute + left/top)由 @tiptap/suggestion 的
|
|
781
|
+
mount(floating-ui autoUpdate)写在外层宿主元素上。 */
|
|
782
|
+
|
|
783
|
+
/* ReactRenderer 宿主元素:真正被 suggestion 定位/显示隐藏的那层。
|
|
784
|
+
z-index 对齐库内菜单面板(1000),保证盖过宿主页面的 sticky 头部。 */
|
|
785
|
+
._popupHost_1noza_11 {
|
|
786
|
+
z-index: 1000;
|
|
787
|
+
width: max-content;
|
|
788
|
+
max-width: min(320px, calc(100vw - 24px));
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
._menu_1noza_1 {
|
|
792
|
+
display: flex;
|
|
793
|
+
flex-direction: column;
|
|
794
|
+
/* 矮视口里弹层不至于翻转后两头裁切:列表自身封顶,内部滚动 */
|
|
795
|
+
max-height: min(420px, 60vh);
|
|
796
|
+
overflow-y: auto;
|
|
797
|
+
min-width: 208px;
|
|
798
|
+
padding: 6px;
|
|
799
|
+
box-sizing: border-box;
|
|
800
|
+
background: #fff;
|
|
801
|
+
border-radius: 10px;
|
|
802
|
+
box-shadow:
|
|
803
|
+
0 6px 24px rgba(0, 0, 0, 0.12),
|
|
804
|
+
0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
805
|
+
color: var(--tmr-text, #363737);
|
|
806
|
+
/* 弹层是 UI 控件,不继承正文的衬线字号字距(同工具栏字体栈) */
|
|
807
|
+
font-family: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
808
|
+
font-size: 14px;
|
|
809
|
+
line-height: 1.3;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
._menu_1noza_1:empty {
|
|
813
|
+
display: none;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/* 分组标题:弱化的节头,节奏同条目内衬 */
|
|
817
|
+
._groupLabel_1noza_43 {
|
|
818
|
+
padding: 8px 10px 3px;
|
|
819
|
+
color: var(--tmr-toolbar-muted, #6b6b6b);
|
|
820
|
+
font-size: 11px;
|
|
821
|
+
font-weight: 600;
|
|
822
|
+
letter-spacing: 0.05em;
|
|
823
|
+
text-transform: uppercase;
|
|
824
|
+
user-select: none;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
._item_1noza_53,
|
|
828
|
+
._itemActive_1noza_54 {
|
|
829
|
+
display: flex;
|
|
830
|
+
align-items: center;
|
|
831
|
+
gap: 10px;
|
|
832
|
+
width: 100%;
|
|
833
|
+
padding: 7px 10px;
|
|
834
|
+
box-sizing: border-box;
|
|
835
|
+
border: none;
|
|
836
|
+
border-radius: 6px;
|
|
837
|
+
background: transparent;
|
|
838
|
+
color: inherit;
|
|
839
|
+
font: inherit;
|
|
840
|
+
text-align: left;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
user-select: none;
|
|
843
|
+
outline: none;
|
|
844
|
+
transition: background 0.1s, color 0.1s;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
._itemActive_1noza_54 {
|
|
848
|
+
background: #fff3ec;
|
|
849
|
+
color: var(--tmr-accent, #ff6719);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/* 文字字形图标槽:对齐 toolbar.module.css 的 .styleIcon */
|
|
853
|
+
._itemIcon_1noza_79 {
|
|
854
|
+
display: inline-flex;
|
|
855
|
+
align-items: center;
|
|
856
|
+
justify-content: center;
|
|
857
|
+
flex: none;
|
|
858
|
+
min-width: 26px;
|
|
859
|
+
color: var(--tmr-toolbar-muted, #6b6b6b);
|
|
860
|
+
font-weight: 700;
|
|
861
|
+
font-size: 13px;
|
|
862
|
+
letter-spacing: -0.01em;
|
|
863
|
+
white-space: pre;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
._itemActive_1noza_54 ._itemIcon_1noza_79 {
|
|
867
|
+
color: var(--tmr-accent, #ff6719);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/* 宿主传 SVG 图标时按库内按钮规格呈现 */
|
|
871
|
+
._itemIcon_1noza_79 svg {
|
|
872
|
+
width: 16px;
|
|
873
|
+
height: 16px;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
._itemTitle_1noza_102 {
|
|
877
|
+
flex: 1 1 auto;
|
|
878
|
+
min-width: 0;
|
|
879
|
+
overflow: hidden;
|
|
880
|
+
text-overflow: ellipsis;
|
|
881
|
+
white-space: nowrap;
|
|
882
|
+
}
|
|
883
|
+
/* 快捷键抽屉(语雀式右侧滑出)。配色走 --tmr-* 变量(与工具栏同一套),
|
|
884
|
+
面板形态对齐工具栏下拉菜单:白底 + ring 阴影 + 10px 圆角。
|
|
885
|
+
fixed 贴视口右缘,不随编辑器滚动;开合走 transform 过渡。 */
|
|
886
|
+
|
|
887
|
+
._drawer_ljnq6_5 {
|
|
888
|
+
position: fixed;
|
|
889
|
+
top: 0;
|
|
890
|
+
right: 0;
|
|
891
|
+
z-index: 1000;
|
|
892
|
+
display: flex;
|
|
893
|
+
flex-direction: column;
|
|
894
|
+
width: min(480px, 94vw);
|
|
895
|
+
height: 100dvh;
|
|
896
|
+
box-sizing: border-box;
|
|
897
|
+
background: #fff;
|
|
898
|
+
border-radius: 0;
|
|
899
|
+
box-shadow:
|
|
900
|
+
-12px 0 40px rgb(0 0 0 / 10%),
|
|
901
|
+
0 0 0 1px rgb(0 0 0 / 6%);
|
|
902
|
+
color: var(--tmr-text, #363737);
|
|
903
|
+
font-family: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
904
|
+
font-size: 14px;
|
|
905
|
+
line-height: 1.4;
|
|
906
|
+
animation: _tmr-shortcut-drawer-in_ljnq6_1 0.24s ease-out;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
@keyframes _tmr-shortcut-drawer-in_ljnq6_1 {
|
|
910
|
+
from {
|
|
911
|
+
transform: translateX(24px);
|
|
912
|
+
opacity: 0;
|
|
913
|
+
}
|
|
914
|
+
to {
|
|
915
|
+
transform: translateX(0);
|
|
916
|
+
opacity: 1;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
@media (prefers-reduced-motion: reduce) {
|
|
921
|
+
._drawer_ljnq6_5 {
|
|
922
|
+
animation: none;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
._closeBtn_ljnq6_44 {
|
|
927
|
+
position: absolute;
|
|
928
|
+
top: 10px;
|
|
929
|
+
right: 10px;
|
|
930
|
+
display: inline-flex;
|
|
931
|
+
align-items: center;
|
|
932
|
+
justify-content: center;
|
|
933
|
+
width: 28px;
|
|
934
|
+
height: 28px;
|
|
935
|
+
padding: 0;
|
|
936
|
+
border: none;
|
|
937
|
+
border-radius: 6px;
|
|
938
|
+
background: transparent;
|
|
939
|
+
color: var(--tmr-toolbar-muted, #6b6b6b);
|
|
940
|
+
cursor: pointer;
|
|
941
|
+
transition: background 0.15s, color 0.15s;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
._closeBtn_ljnq6_44:hover {
|
|
945
|
+
background: #f3f3f3;
|
|
946
|
+
color: var(--tmr-text, #363737);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/* 三列表头:sticky 吸顶 */
|
|
950
|
+
._head_ljnq6_68 {
|
|
951
|
+
display: grid;
|
|
952
|
+
grid-template-columns: 1.4fr 1.2fr 1.4fr;
|
|
953
|
+
gap: 12px;
|
|
954
|
+
flex: none;
|
|
955
|
+
padding: 16px 18px 10px;
|
|
956
|
+
border-bottom: 1px solid var(--tmr-toolbar-border, #ececec);
|
|
957
|
+
font-weight: 600;
|
|
958
|
+
font-size: 13px;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
._colShortcut_ljnq6_79 {
|
|
962
|
+
text-align: center;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
._colMarkdown_ljnq6_83 {
|
|
966
|
+
text-align: center;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/* 滚动区 */
|
|
970
|
+
._body_ljnq6_88 {
|
|
971
|
+
flex: 1 1 auto;
|
|
972
|
+
min-height: 0;
|
|
973
|
+
overflow-y: auto;
|
|
974
|
+
padding: 0 18px 24px;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
._group_ljnq6_95 {
|
|
978
|
+
padding-top: 14px;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
._groupTitle_ljnq6_99 {
|
|
982
|
+
margin: 0 0 6px;
|
|
983
|
+
color: var(--tmr-toolbar-muted, #6b6b6b);
|
|
984
|
+
font-size: 12px;
|
|
985
|
+
font-weight: 600;
|
|
986
|
+
letter-spacing: 0.04em;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
._row_ljnq6_107 {
|
|
990
|
+
display: grid;
|
|
991
|
+
grid-template-columns: 1.4fr 1.2fr 1.4fr;
|
|
992
|
+
gap: 12px;
|
|
993
|
+
align-items: center;
|
|
994
|
+
padding: 8px 0;
|
|
995
|
+
border-bottom: 1px solid var(--tmr-toolbar-border, #ececec);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
._row_ljnq6_107:last-child {
|
|
999
|
+
border-bottom: none;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
._rowLabel_ljnq6_120 {
|
|
1003
|
+
min-width: 0;
|
|
1004
|
+
overflow: hidden;
|
|
1005
|
+
text-overflow: ellipsis;
|
|
1006
|
+
white-space: nowrap;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
._rowKeys_ljnq6_127,
|
|
1010
|
+
._rowMd_ljnq6_128 {
|
|
1011
|
+
display: inline-flex;
|
|
1012
|
+
align-items: center;
|
|
1013
|
+
justify-content: center;
|
|
1014
|
+
flex-wrap: wrap;
|
|
1015
|
+
gap: 4px;
|
|
1016
|
+
min-width: 0;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/* 键帽 */
|
|
1020
|
+
._keycap_ljnq6_138 {
|
|
1021
|
+
display: inline-flex;
|
|
1022
|
+
align-items: center;
|
|
1023
|
+
justify-content: center;
|
|
1024
|
+
min-width: 24px;
|
|
1025
|
+
padding: 2px 7px;
|
|
1026
|
+
box-sizing: border-box;
|
|
1027
|
+
border: 1px solid var(--tmr-toolbar-border, #e2e2e2);
|
|
1028
|
+
border-bottom-width: 2px;
|
|
1029
|
+
border-radius: 6px;
|
|
1030
|
+
background: #fafafa;
|
|
1031
|
+
color: var(--tmr-text, #363737);
|
|
1032
|
+
font-family: inherit;
|
|
1033
|
+
font-size: 12px;
|
|
1034
|
+
font-weight: 500;
|
|
1035
|
+
line-height: 1.5;
|
|
1036
|
+
white-space: nowrap;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
/* markdown 片段键帽用等宽字体,字符间不拆 */
|
|
1040
|
+
._rowMd_ljnq6_128 ._keycap_ljnq6_138 {
|
|
1041
|
+
font-family: var(--tmr-mono-font, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
1042
|
+
font-size: 12px;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
._none_ljnq6_163 {
|
|
1046
|
+
color: var(--tmr-toolbar-muted, #b5b5b5);
|
|
1047
|
+
}
|
|
747
1048
|
/* 「这段正在被 AI 改写」的高亮(decoration,只存在于编辑会话里、不进 markdown)。
|
|
748
1049
|
普通 CSS(不是 *.module.css):模块写法在这种「只做副作用的 import」下会被库构建丢掉
|
|
749
1050
|
—— 与 chart.css 同一种写法,保证能进 dist/style.css。色值走 --tmr-* 变量,宿主可覆盖。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptap-markdown-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.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",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"react-dom": ">=18.0.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
+
"@floating-ui/dom": "1.8.0",
|
|
68
69
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
69
70
|
"@radix-ui/react-popover": "^1.1.15",
|
|
70
71
|
"@tiptap/core": "3.31.3",
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
"@tiptap/react": "3.31.3",
|
|
89
90
|
"@tiptap/starter-kit": "3.31.3",
|
|
90
91
|
"@tiptap/static-renderer": "3.31.3",
|
|
92
|
+
"@tiptap/suggestion": "3.31.3",
|
|
91
93
|
"chart.js": "^4.5.1",
|
|
92
94
|
"katex": "^0.16.47",
|
|
93
95
|
"lowlight": "3.3.0"
|