tiptap-markdown-react 0.14.5 → 0.16.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/dist/style.css CHANGED
@@ -3,14 +3,14 @@
3
3
 
4
4
  /* 编辑器最外层:查找替换浮动条的粘性范围就是它(超出编辑器范围后浮动条随之离场)。
5
5
  正文的滚动容器仍是 .editorScroll(宿主传的 className 依然落在它身上,契约不变)。 */
6
- ._editorHost_1k0bn_6 {
6
+ ._editorHost_w9lw8_6 {
7
7
  position: relative;
8
8
  }
9
9
 
10
10
  /* 浮动条的粘性锚点:高度 0,不占布局、不推挤正文;sticky 让浮动条在「最近的滚动容器」
11
11
  里粘住(宿主的外层滚动容器或页面本身),正文滚动时不会把条子卷上去。
12
12
  注意:锚点必须在 DOM 里排在正文之前——排在后面的话它的自然位置在正文底部,粘性范围就错了。 */
13
- ._findBarAnchor_1k0bn_13 {
13
+ ._findBarAnchor_w9lw8_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
- ._findBar_1k0bn_13 {
21
+ ._findBar_w9lw8_13 {
22
22
  position: absolute;
23
23
  }
24
24
 
25
- ._editorScroll_1k0bn_5 {
25
+ ._editorScroll_w9lw8_5 {
26
26
  margin-top: 24px;
27
27
  position: relative;
28
28
  }
29
29
 
30
- ._editorContent_1k0bn_30 {
30
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 p.is-editor-empty:first-child::before {
53
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h1 {
61
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h2 {
69
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h3 {
77
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h4 {
85
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h5 {
92
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 h6 {
99
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 p {
107
+ ._editorContent_w9lw8_30 p {
108
108
  margin: 0.7em 0;
109
109
  }
110
110
 
111
- ._editorContent_1k0bn_30 ul,
112
- ._editorContent_1k0bn_30 ol {
111
+ ._editorContent_w9lw8_30 ul,
112
+ ._editorContent_w9lw8_30 ol {
113
113
  padding-left: 1.5em;
114
114
  margin: 0.7em 0;
115
115
  }
116
116
 
117
- ._editorContent_1k0bn_30 ul {
117
+ ._editorContent_w9lw8_30 ul {
118
118
  list-style: disc;
119
119
  }
120
120
 
121
- ._editorContent_1k0bn_30 ol {
121
+ ._editorContent_w9lw8_30 ol {
122
122
  list-style: decimal;
123
123
  }
124
124
 
125
- ._editorContent_1k0bn_30 blockquote {
125
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 a {
133
+ ._editorContent_w9lw8_30 a {
134
134
  color: var(--tmr-accent, #ff6719);
135
135
  text-decoration: underline;
136
136
  }
137
137
 
138
138
  /* 仅行内代码加灰底;代码块内的 <code>(在 pre 内)由 NodeView 自管,排除掉 */
139
- ._editorContent_1k0bn_30 code:not(pre code) {
139
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 hr {
154
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 img {
160
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 img.ProseMirror-selectednode {
169
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 .tableWrapper {
176
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 table {
183
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 :not(.tableWrapper) > table {
193
+ ._editorContent_w9lw8_30 :not(.tableWrapper) > table {
194
194
  margin: 1em 0;
195
195
  }
196
196
 
197
- ._editorContent_1k0bn_30 table td,
198
- ._editorContent_1k0bn_30 table th {
197
+ ._editorContent_w9lw8_30 table td,
198
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 table th {
209
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 table {
215
+ ._editorContent_w9lw8_30 table {
216
216
  width: max-content;
217
217
  min-width: 100%;
218
218
  max-width: none;
219
219
  }
220
220
 
221
- ._editorContent_1k0bn_30 table td,
222
- ._editorContent_1k0bn_30 table th {
221
+ ._editorContent_w9lw8_30 table td,
222
+ ._editorContent_w9lw8_30 table th {
223
223
  white-space: nowrap;
224
224
  word-break: normal;
225
225
  }
226
226
  }
227
227
 
228
228
  /* 选中的单元格高亮 */
229
- ._editorContent_1k0bn_30 table .selectedCell::after {
229
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 table .column-resize-handle {
238
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 ul[data-type='taskList'] {
251
+ ._editorContent_w9lw8_30 ul[data-type='taskList'] {
252
252
  list-style: none;
253
253
  padding-left: 0.2em;
254
254
  }
255
255
 
256
- ._editorContent_1k0bn_30 ul[data-type='taskList'] li {
256
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 ul[data-type='taskList'] li > div > p {
263
+ ._editorContent_w9lw8_30 ul[data-type='taskList'] li > div > p {
264
264
  margin: 0;
265
265
  }
266
266
 
267
267
  /* 项内第二段起保留半档间距,避免多段任务项的段落粘成一片(首段仍不带外边距) */
268
- ._editorContent_1k0bn_30 ul[data-type='taskList'] li > div > p + p {
268
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 ul[data-type='taskList'] li > label {
274
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 ul[data-type='taskList'] li > div {
282
+ ._editorContent_w9lw8_30 ul[data-type='taskList'] li > div {
283
283
  flex: 1;
284
284
  }
285
285
 
286
- ._editorContent_1k0bn_30 ul[data-type='taskList'] input[type='checkbox'] {
286
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 span.citation-ref {
293
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 span.citation-ref a {
330
+ ._editorContent_w9lw8_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
- ._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] {
342
+ ._editorContent_w9lw8_30 span.citation-ref:hover,
343
+ ._editorContent_w9lw8_30 span.citation-ref:focus-within,
344
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 .tiptap-mathematics-render[data-type='inline-math'] {
350
+ ._editorContent_w9lw8_30 .tiptap-mathematics-render[data-type='inline-math'] {
351
351
  display: inline;
352
352
  }
353
353
 
354
- ._editorContent_1k0bn_30 .tiptap-mathematics-render[data-type='block-math'] {
354
+ ._editorContent_w9lw8_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
- ._editorContent_1k0bn_30 .tmr-import-placeholder {
361
+ ._editorContent_w9lw8_30 .tmr-import-placeholder {
362
362
  display: flex;
363
363
  align-items: center;
364
364
  gap: 0.5em;
@@ -368,20 +368,55 @@
368
368
  user-select: none;
369
369
  }
370
370
 
371
- ._editorContent_1k0bn_30 .tmr-import-placeholder-spin {
371
+ ._editorContent_w9lw8_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-spin_1k0bn_1 0.7s linear infinite;
377
+ animation: _tmr-import-spin_w9lw8_1 0.7s linear infinite;
378
378
  }
379
379
 
380
- @keyframes _tmr-import-spin_1k0bn_1 {
380
+ @keyframes _tmr-import-spin_w9lw8_1 {
381
381
  to {
382
382
  transform: rotate(360deg);
383
383
  }
384
384
  }
385
+
386
+ /* 快捷键抽屉的悬浮入口:sticky-bottom——自然位置在编辑器底部,
387
+ 内容滚动时保持悬浮在可视区右下;到内容末尾落位对齐右缘 */
388
+ ._shortcutFab_w9lw8_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_w9lw8_388:hover {
410
+ color: var(--tmr-accent, #ff6719);
411
+ box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
412
+ }
413
+
414
+ /* 宿主容器模式的悬浮键:定位归宿主(如叠在「回到顶部」按钮上方),
415
+ 库只保留按钮本体视觉,不加粘性定位与右下角外边距 */
416
+ ._shortcutFabHosted_w9lw8_416 {
417
+ position: static;
418
+ margin: 0;
419
+ }
385
420
  /* Global chart styles — shared by NodeView, SSR placeholder, ChartMount */
386
421
 
387
422
  .tmr-chart {
@@ -744,6 +779,279 @@
744
779
  font-size: 13px;
745
780
  white-space: nowrap;
746
781
  }
782
+ /* 斜杠菜单弹层。样式对齐工具栏下拉菜单(toolbar.module.css 的 .menu/.menuItem)
783
+ ——同一套面板(10px 圆角 + ring 阴影)、条目(6px 圆角 + #f3f3f3 悬停)、
784
+ 选中态(#fff3ec + 品牌色)、文字字形图标槽(26px,SF Pro Display 粗体)。
785
+ 配色走 --tmr-* 变量:弹层挂 document.body(逃出宿主 overflow 裁剪),
786
+ 挂载时由扩展把编辑器上解析出的变量值复制到宿主元素,主题保真不依赖
787
+ 变量定义位置。定位(absolute + left/top)由 @tiptap/suggestion 的
788
+ mount(floating-ui autoUpdate)写在外层宿主元素上。 */
789
+
790
+ /* ReactRenderer 宿主元素:真正被 suggestion 定位/显示隐藏的那层。
791
+ z-index 对齐库内菜单面板(1000),保证盖过宿主页面的 sticky 头部。 */
792
+ ._popupHost_1noza_11 {
793
+ z-index: 1000;
794
+ width: max-content;
795
+ max-width: min(320px, calc(100vw - 24px));
796
+ }
797
+
798
+ ._menu_1noza_1 {
799
+ display: flex;
800
+ flex-direction: column;
801
+ /* 矮视口里弹层不至于翻转后两头裁切:列表自身封顶,内部滚动 */
802
+ max-height: min(420px, 60vh);
803
+ overflow-y: auto;
804
+ min-width: 208px;
805
+ padding: 6px;
806
+ box-sizing: border-box;
807
+ background: #fff;
808
+ border-radius: 10px;
809
+ box-shadow:
810
+ 0 6px 24px rgba(0, 0, 0, 0.12),
811
+ 0 0 0 1px rgba(0, 0, 0, 0.06);
812
+ color: var(--tmr-text, #363737);
813
+ /* 弹层是 UI 控件,不继承正文的衬线字号字距(同工具栏字体栈) */
814
+ font-family: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
815
+ font-size: 14px;
816
+ line-height: 1.3;
817
+ }
818
+
819
+ ._menu_1noza_1:empty {
820
+ display: none;
821
+ }
822
+
823
+ /* 分组标题:弱化的节头,节奏同条目内衬 */
824
+ ._groupLabel_1noza_43 {
825
+ padding: 8px 10px 3px;
826
+ color: var(--tmr-toolbar-muted, #6b6b6b);
827
+ font-size: 11px;
828
+ font-weight: 600;
829
+ letter-spacing: 0.05em;
830
+ text-transform: uppercase;
831
+ user-select: none;
832
+ }
833
+
834
+ ._item_1noza_53,
835
+ ._itemActive_1noza_54 {
836
+ display: flex;
837
+ align-items: center;
838
+ gap: 10px;
839
+ width: 100%;
840
+ padding: 7px 10px;
841
+ box-sizing: border-box;
842
+ border: none;
843
+ border-radius: 6px;
844
+ background: transparent;
845
+ color: inherit;
846
+ font: inherit;
847
+ text-align: left;
848
+ cursor: pointer;
849
+ user-select: none;
850
+ outline: none;
851
+ transition: background 0.1s, color 0.1s;
852
+ }
853
+
854
+ ._itemActive_1noza_54 {
855
+ background: #fff3ec;
856
+ color: var(--tmr-accent, #ff6719);
857
+ }
858
+
859
+ /* 文字字形图标槽:对齐 toolbar.module.css 的 .styleIcon */
860
+ ._itemIcon_1noza_79 {
861
+ display: inline-flex;
862
+ align-items: center;
863
+ justify-content: center;
864
+ flex: none;
865
+ min-width: 26px;
866
+ color: var(--tmr-toolbar-muted, #6b6b6b);
867
+ font-weight: 700;
868
+ font-size: 13px;
869
+ letter-spacing: -0.01em;
870
+ white-space: pre;
871
+ }
872
+
873
+ ._itemActive_1noza_54 ._itemIcon_1noza_79 {
874
+ color: var(--tmr-accent, #ff6719);
875
+ }
876
+
877
+ /* 宿主传 SVG 图标时按库内按钮规格呈现 */
878
+ ._itemIcon_1noza_79 svg {
879
+ width: 16px;
880
+ height: 16px;
881
+ }
882
+
883
+ ._itemTitle_1noza_102 {
884
+ flex: 1 1 auto;
885
+ min-width: 0;
886
+ overflow: hidden;
887
+ text-overflow: ellipsis;
888
+ white-space: nowrap;
889
+ }
890
+ /* 快捷键抽屉(语雀式右侧滑出)。配色走 --tmr-* 变量(与工具栏同一套),
891
+ 面板形态对齐工具栏下拉菜单:白底 + ring 阴影 + 10px 圆角。
892
+ fixed 贴视口右缘,不随编辑器滚动;开合走 transform 过渡。 */
893
+
894
+ ._drawer_ljnq6_5 {
895
+ position: fixed;
896
+ top: 0;
897
+ right: 0;
898
+ z-index: 1000;
899
+ display: flex;
900
+ flex-direction: column;
901
+ width: min(480px, 94vw);
902
+ height: 100dvh;
903
+ box-sizing: border-box;
904
+ background: #fff;
905
+ border-radius: 0;
906
+ box-shadow:
907
+ -12px 0 40px rgb(0 0 0 / 10%),
908
+ 0 0 0 1px rgb(0 0 0 / 6%);
909
+ color: var(--tmr-text, #363737);
910
+ font-family: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
911
+ font-size: 14px;
912
+ line-height: 1.4;
913
+ animation: _tmr-shortcut-drawer-in_ljnq6_1 0.24s ease-out;
914
+ }
915
+
916
+ @keyframes _tmr-shortcut-drawer-in_ljnq6_1 {
917
+ from {
918
+ transform: translateX(24px);
919
+ opacity: 0;
920
+ }
921
+ to {
922
+ transform: translateX(0);
923
+ opacity: 1;
924
+ }
925
+ }
926
+
927
+ @media (prefers-reduced-motion: reduce) {
928
+ ._drawer_ljnq6_5 {
929
+ animation: none;
930
+ }
931
+ }
932
+
933
+ ._closeBtn_ljnq6_44 {
934
+ position: absolute;
935
+ top: 10px;
936
+ right: 10px;
937
+ display: inline-flex;
938
+ align-items: center;
939
+ justify-content: center;
940
+ width: 28px;
941
+ height: 28px;
942
+ padding: 0;
943
+ border: none;
944
+ border-radius: 6px;
945
+ background: transparent;
946
+ color: var(--tmr-toolbar-muted, #6b6b6b);
947
+ cursor: pointer;
948
+ transition: background 0.15s, color 0.15s;
949
+ }
950
+
951
+ ._closeBtn_ljnq6_44:hover {
952
+ background: #f3f3f3;
953
+ color: var(--tmr-text, #363737);
954
+ }
955
+
956
+ /* 三列表头:sticky 吸顶 */
957
+ ._head_ljnq6_68 {
958
+ display: grid;
959
+ grid-template-columns: 1.4fr 1.2fr 1.4fr;
960
+ gap: 12px;
961
+ flex: none;
962
+ padding: 16px 18px 10px;
963
+ border-bottom: 1px solid var(--tmr-toolbar-border, #ececec);
964
+ font-weight: 600;
965
+ font-size: 13px;
966
+ }
967
+
968
+ ._colShortcut_ljnq6_79 {
969
+ text-align: center;
970
+ }
971
+
972
+ ._colMarkdown_ljnq6_83 {
973
+ text-align: center;
974
+ }
975
+
976
+ /* 滚动区 */
977
+ ._body_ljnq6_88 {
978
+ flex: 1 1 auto;
979
+ min-height: 0;
980
+ overflow-y: auto;
981
+ padding: 0 18px 24px;
982
+ }
983
+
984
+ ._group_ljnq6_95 {
985
+ padding-top: 14px;
986
+ }
987
+
988
+ ._groupTitle_ljnq6_99 {
989
+ margin: 0 0 6px;
990
+ color: var(--tmr-toolbar-muted, #6b6b6b);
991
+ font-size: 12px;
992
+ font-weight: 600;
993
+ letter-spacing: 0.04em;
994
+ }
995
+
996
+ ._row_ljnq6_107 {
997
+ display: grid;
998
+ grid-template-columns: 1.4fr 1.2fr 1.4fr;
999
+ gap: 12px;
1000
+ align-items: center;
1001
+ padding: 8px 0;
1002
+ border-bottom: 1px solid var(--tmr-toolbar-border, #ececec);
1003
+ }
1004
+
1005
+ ._row_ljnq6_107:last-child {
1006
+ border-bottom: none;
1007
+ }
1008
+
1009
+ ._rowLabel_ljnq6_120 {
1010
+ min-width: 0;
1011
+ overflow: hidden;
1012
+ text-overflow: ellipsis;
1013
+ white-space: nowrap;
1014
+ }
1015
+
1016
+ ._rowKeys_ljnq6_127,
1017
+ ._rowMd_ljnq6_128 {
1018
+ display: inline-flex;
1019
+ align-items: center;
1020
+ justify-content: center;
1021
+ flex-wrap: wrap;
1022
+ gap: 4px;
1023
+ min-width: 0;
1024
+ }
1025
+
1026
+ /* 键帽 */
1027
+ ._keycap_ljnq6_138 {
1028
+ display: inline-flex;
1029
+ align-items: center;
1030
+ justify-content: center;
1031
+ min-width: 24px;
1032
+ padding: 2px 7px;
1033
+ box-sizing: border-box;
1034
+ border: 1px solid var(--tmr-toolbar-border, #e2e2e2);
1035
+ border-bottom-width: 2px;
1036
+ border-radius: 6px;
1037
+ background: #fafafa;
1038
+ color: var(--tmr-text, #363737);
1039
+ font-family: inherit;
1040
+ font-size: 12px;
1041
+ font-weight: 500;
1042
+ line-height: 1.5;
1043
+ white-space: nowrap;
1044
+ }
1045
+
1046
+ /* markdown 片段键帽用等宽字体,字符间不拆 */
1047
+ ._rowMd_ljnq6_128 ._keycap_ljnq6_138 {
1048
+ font-family: var(--tmr-mono-font, ui-monospace, SFMono-Regular, Menlo, monospace);
1049
+ font-size: 12px;
1050
+ }
1051
+
1052
+ ._none_ljnq6_163 {
1053
+ color: var(--tmr-toolbar-muted, #b5b5b5);
1054
+ }
747
1055
  /* 「这段正在被 AI 改写」的高亮(decoration,只存在于编辑会话里、不进 markdown)。
748
1056
  普通 CSS(不是 *.module.css):模块写法在这种「只做副作用的 import」下会被库构建丢掉
749
1057
  —— 与 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.14.5",
3
+ "version": "0.16.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"