tiptap-markdown-react 0.7.1 → 0.7.2
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 +3 -3
- package/dist/index.js +2 -2
- package/dist/style.css +10 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -149,9 +149,9 @@ const comments: CommentRef[] = [
|
|
|
149
149
|
- **Popover**: `CommentPopover` (Radix) anchors to the clicked mark; content is
|
|
150
150
|
host-owned (`renderComment`-style children).
|
|
151
151
|
- **One-way hosts**: pass `commentInteractive={false}` and
|
|
152
|
-
`showCommentGutter={false}` to make editor-side clicks inert —
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
`showCommentGutter={false}` to make editor-side clicks inert — marks are
|
|
153
|
+
invisible by default and only the **active** comment (driven by
|
|
154
|
+
`focusComment(id)` from a sidebar) shows a yellow border + block outline.
|
|
155
155
|
- **Guards**: paste / drop strips marks via `transformPasted`; anchor application
|
|
156
156
|
is excluded from undo history.
|
|
157
157
|
- **Segments**: `CommentSegment[]` (`{ blockHash?, prefix?, exact, suffix? }`).
|
package/dist/index.js
CHANGED
|
@@ -2075,8 +2075,8 @@ function scrollToTocHeading(headingId, scrollContainer, options) {
|
|
|
2075
2075
|
};
|
|
2076
2076
|
requestAnimationFrame(animate);
|
|
2077
2077
|
}
|
|
2078
|
-
const popoverAnchor = "
|
|
2079
|
-
const popoverContent = "
|
|
2078
|
+
const popoverAnchor = "_popoverAnchor_1c2ff_52";
|
|
2079
|
+
const popoverContent = "_popoverContent_1c2ff_59";
|
|
2080
2080
|
const styles = {
|
|
2081
2081
|
popoverAnchor,
|
|
2082
2082
|
popoverContent
|
package/dist/style.css
CHANGED
|
@@ -1053,24 +1053,19 @@
|
|
|
1053
1053
|
/* 评论锚定样式(编辑会话专属,只读态不渲染)。
|
|
1054
1054
|
全部走 :global + --tmr-* 变量,与库其它样式约定一致。 */
|
|
1055
1055
|
|
|
1056
|
-
/*
|
|
1056
|
+
/* 评论锚定默认无视觉样式:mark 只承载锚定位置,不打扰正文阅读。
|
|
1057
|
+
只有 active 评论(侧栏点评论 → focusComment)才显示黄色边框 + block 外框。 */
|
|
1057
1058
|
.tmr-comment {
|
|
1059
|
+
cursor: default;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/* active:侧栏点评论后的强调态(黄色边框,无背景填充) */
|
|
1063
|
+
.tmr-comment.tmr-comment-active {
|
|
1058
1064
|
border-radius: 3px;
|
|
1059
1065
|
padding: 0 1px;
|
|
1060
|
-
cursor: default;
|
|
1061
1066
|
box-shadow: 0 0 0 1.5px var(--tmr-comment-ring, rgba(219, 171, 10, 0.75));
|
|
1062
1067
|
box-decoration-break: clone;
|
|
1063
1068
|
-webkit-box-decoration-break: clone;
|
|
1064
|
-
transition: box-shadow 0.12s ease;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.tmr-comment:hover {
|
|
1068
|
-
box-shadow: 0 0 0 2px var(--tmr-comment-ring, rgba(219, 171, 10, 0.9));
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
/* active:侧栏点评论后的强调态(加粗边框,仍无背景) */
|
|
1072
|
-
.tmr-comment.tmr-comment-active {
|
|
1073
|
-
box-shadow: 0 0 0 2.5px var(--tmr-comment-ring, rgba(191, 121, 0, 0.95));
|
|
1074
1069
|
}
|
|
1075
1070
|
|
|
1076
1071
|
/* active 评论所在 block 的外框 */
|
|
@@ -1106,14 +1101,14 @@
|
|
|
1106
1101
|
background: var(--tmr-comment-gutter-bg-hover, #dd9f00);
|
|
1107
1102
|
}
|
|
1108
1103
|
|
|
1109
|
-
.
|
|
1104
|
+
._popoverAnchor_1c2ff_52 {
|
|
1110
1105
|
position: fixed;
|
|
1111
1106
|
width: 0;
|
|
1112
1107
|
height: 0;
|
|
1113
1108
|
pointer-events: none;
|
|
1114
1109
|
}
|
|
1115
1110
|
|
|
1116
|
-
.
|
|
1111
|
+
._popoverContent_1c2ff_59 {
|
|
1117
1112
|
min-width: 320px;
|
|
1118
1113
|
max-width: 420px;
|
|
1119
1114
|
background: var(--tmr-popover-bg, #fff);
|
|
@@ -1128,6 +1123,6 @@
|
|
|
1128
1123
|
outline: none;
|
|
1129
1124
|
}
|
|
1130
1125
|
|
|
1131
|
-
.
|
|
1126
|
+
._popoverContent_1c2ff_59 .tmr-popover-arrow {
|
|
1132
1127
|
fill: var(--tmr-popover-bg, #fff);
|
|
1133
1128
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiptap-markdown-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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",
|