tiptap-markdown-react 0.7.1 → 0.7.3

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 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 — highlights are
153
- driven purely by `focusComment(id)` from a sidebar (mark style is border-only,
154
- no background fill).
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 = "_popoverAnchor_1ceh7_57";
2079
- const popoverContent = "_popoverContent_1ceh7_64";
2078
+ const popoverAnchor = "_popoverAnchor_1ymep_55";
2079
+ const popoverContent = "_popoverContent_1ymep_62";
2080
2080
  const styles = {
2081
2081
  popoverAnchor,
2082
2082
  popoverContent
package/dist/style.css CHANGED
@@ -1053,24 +1053,22 @@
1053
1053
  /* 评论锚定样式(编辑会话专属,只读态不渲染)。
1054
1054
  全部走 :global + --tmr-* 变量,与库其它样式约定一致。 */
1055
1055
 
1056
- /* 评论锚定:仅黄色边框,无背景填充(不打扰正文阅读)。 */
1056
+ /* 评论锚定默认无视觉样式:mark 只承载锚定位置,不打扰正文阅读。
1057
+ 只有 active 评论(侧栏点评论 → focusComment)才显示黄色边框 + block 外框。 */
1057
1058
  .tmr-comment {
1059
+ cursor: default;
1060
+ /* 关键:<mark> 有浏览器 UA 默认黄色背景(background-color: yellow),
1061
+ 必须显式透明,否则锚定 mark 会漏出默认底色。 */
1062
+ background: transparent;
1063
+ }
1064
+
1065
+ /* active:侧栏点评论后的强调态(黄色边框,无背景填充) */
1066
+ .tmr-comment.tmr-comment-active {
1058
1067
  border-radius: 3px;
1059
1068
  padding: 0 1px;
1060
- cursor: default;
1061
1069
  box-shadow: 0 0 0 1.5px var(--tmr-comment-ring, rgba(219, 171, 10, 0.75));
1062
1070
  box-decoration-break: clone;
1063
1071
  -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
1072
  }
1075
1073
 
1076
1074
  /* active 评论所在 block 的外框 */
@@ -1106,14 +1104,14 @@
1106
1104
  background: var(--tmr-comment-gutter-bg-hover, #dd9f00);
1107
1105
  }
1108
1106
 
1109
- ._popoverAnchor_1ceh7_57 {
1107
+ ._popoverAnchor_1ymep_55 {
1110
1108
  position: fixed;
1111
1109
  width: 0;
1112
1110
  height: 0;
1113
1111
  pointer-events: none;
1114
1112
  }
1115
1113
 
1116
- ._popoverContent_1ceh7_64 {
1114
+ ._popoverContent_1ymep_62 {
1117
1115
  min-width: 320px;
1118
1116
  max-width: 420px;
1119
1117
  background: var(--tmr-popover-bg, #fff);
@@ -1128,6 +1126,6 @@
1128
1126
  outline: none;
1129
1127
  }
1130
1128
 
1131
- ._popoverContent_1ceh7_64 .tmr-popover-arrow {
1129
+ ._popoverContent_1ymep_62 .tmr-popover-arrow {
1132
1130
  fill: var(--tmr-popover-bg, #fff);
1133
1131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiptap-markdown-react",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
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",