tiptap-markdown-react 0.13.0 → 0.14.1

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/labels.d.ts CHANGED
@@ -109,6 +109,12 @@ export declare const defaultTocLabels: TocLabels;
109
109
  export interface CodeBlockLabels {
110
110
  autoDetect: string;
111
111
  delete: string;
112
+ /** 只读态:复制代码内容。 */
113
+ copy: string;
114
+ /** 只读态:展开超出限高的代码块。 */
115
+ expand: string;
116
+ /** 只读态:收起已展开的代码块。 */
117
+ collapse: string;
112
118
  }
113
119
  export declare const defaultCodeBlockLabels: CodeBlockLabels;
114
120
  export interface CommentLabels {
package/dist/style.css CHANGED
@@ -782,7 +782,7 @@ table.tmr-pending-anchor {
782
782
  box-shadow: 0 0 0 1px var(--tmr-find-active-ring, rgba(230, 122, 0, 0.7));
783
783
  }
784
784
  /* 代码块 NodeView:白底、细边框、顶部 header 放语言选择(Radix 下拉)+ 删除。 */
785
- ._wrapper_5i2vi_2 {
785
+ ._wrapper_16490_2 {
786
786
  position: relative;
787
787
  margin: 0.9em 0;
788
788
  border: 1px solid #e8e8e8;
@@ -792,13 +792,13 @@ table.tmr-pending-anchor {
792
792
  }
793
793
 
794
794
  /* 选中整个代码块时(NodeSelection):accent 边框高亮,作为删除前的二次确认提示 */
795
- ._wrapper_5i2vi_2.ProseMirror-selectednode,
796
- .ProseMirror-selectednode > ._wrapper_5i2vi_2 {
795
+ ._wrapper_16490_2.ProseMirror-selectednode,
796
+ .ProseMirror-selectednode > ._wrapper_16490_2 {
797
797
  border-color: var(--tmr-accent, #ff6719);
798
798
  box-shadow: 0 0 0 1px var(--tmr-accent, #ff6719);
799
799
  }
800
800
 
801
- ._header_5i2vi_18 {
801
+ ._header_16490_18 {
802
802
  display: flex;
803
803
  align-items: center;
804
804
  justify-content: flex-end;
@@ -808,7 +808,7 @@ table.tmr-pending-anchor {
808
808
  }
809
809
 
810
810
  /* 语言选择触发按钮:无边框胶囊,hover 出灰底,右侧箭头图标 */
811
- ._langTrigger_5i2vi_28 {
811
+ ._langTrigger_16490_28 {
812
812
  display: inline-flex;
813
813
  align-items: center;
814
814
  gap: 4px;
@@ -825,22 +825,29 @@ table.tmr-pending-anchor {
825
825
  transition: background 0.15s;
826
826
  }
827
827
 
828
- ._langTrigger_5i2vi_28:hover,
829
- ._langTrigger_5i2vi_28[data-state='open'] {
828
+ ._langTrigger_16490_28:hover,
829
+ ._langTrigger_16490_28[data-state='open'] {
830
830
  background-color: #f0f0f0;
831
831
  }
832
832
 
833
- ._langChevron_5i2vi_50 {
833
+ ._langChevron_16490_50 {
834
834
  color: #8a8a8a;
835
835
  flex-shrink: 0;
836
836
  }
837
837
 
838
838
  /* 只读态语言徽标:无下拉 / 删除交互,样式对齐 langTrigger 但不可点 */
839
- ._langBadge_5i2vi_56 {
839
+ ._readonlyHeader_16490_56 {
840
+ display: flex;
841
+ align-items: center;
842
+ justify-content: space-between;
843
+ padding: 8px 12px;
844
+ border-bottom: 1px solid #efefef;
845
+ }
846
+
847
+ ._langBadge_16490_64 {
840
848
  display: inline-flex;
841
849
  align-items: center;
842
850
  padding: 3px 10px;
843
- margin: 8px 12px;
844
851
  border-radius: 8px;
845
852
  background: #f0f0f0;
846
853
  color: #6b7280;
@@ -851,7 +858,7 @@ table.tmr-pending-anchor {
851
858
  }
852
859
 
853
860
  /* 下拉菜单气泡:白底圆角、细边框、轻阴影,最大高度可滚动 */
854
- ._langMenu_5i2vi_71 {
861
+ ._langMenu_16490_78 {
855
862
  z-index: 50;
856
863
  min-width: 160px;
857
864
  max-height: 280px;
@@ -864,7 +871,7 @@ table.tmr-pending-anchor {
864
871
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
865
872
  }
866
873
 
867
- ._langItem_5i2vi_84 {
874
+ ._langItem_16490_91 {
868
875
  display: flex;
869
876
  align-items: center;
870
877
  gap: 6px;
@@ -879,16 +886,16 @@ table.tmr-pending-anchor {
879
886
  }
880
887
 
881
888
  /* 键盘方向键 / 鼠标 hover 高亮态(Radix 用 data-highlighted 标记) */
882
- ._langItem_5i2vi_84[data-highlighted] {
889
+ ._langItem_16490_91[data-highlighted] {
883
890
  background-color: #f0f0f0;
884
891
  }
885
892
 
886
- ._langItemSelected_5i2vi_103 {
893
+ ._langItemSelected_16490_110 {
887
894
  color: var(--tmr-accent, #ff6719);
888
895
  font-weight: 600;
889
896
  }
890
897
 
891
- ._langItemCheck_5i2vi_108 {
898
+ ._langItemCheck_16490_115 {
892
899
  display: inline-flex;
893
900
  align-items: center;
894
901
  justify-content: center;
@@ -896,7 +903,7 @@ table.tmr-pending-anchor {
896
903
  flex-shrink: 0;
897
904
  }
898
905
 
899
- ._deleteBtn_5i2vi_116 {
906
+ ._deleteBtn_16490_123 {
900
907
  display: inline-flex;
901
908
  align-items: center;
902
909
  justify-content: center;
@@ -911,23 +918,90 @@ table.tmr-pending-anchor {
911
918
  transition: background 0.15s, color 0.15s;
912
919
  }
913
920
 
914
- ._deleteBtn_5i2vi_116:hover {
921
+ ._deleteBtn_16490_123:hover {
915
922
  background: #f4f4f4;
916
923
  color: #d4380d;
917
924
  }
918
925
 
919
- ._pre_5i2vi_136 {
926
+ ._pre_16490_143 {
920
927
  margin: 0;
921
928
  padding: 16px 18px;
922
929
  background: transparent;
923
930
  border: none;
924
931
  border-radius: 0;
925
- overflow-x: auto;
932
+ overflow: auto;
926
933
  font-size: 0.9em;
927
934
  line-height: 1.65;
928
935
  }
929
936
 
930
- ._pre_5i2vi_136 code {
937
+ /* 只读展示(MarkdownPreview / 只读编辑器):默认限高块内滚动,
938
+ 头部展开按钮可切换为不限高;编辑态不封顶(写长代码不应被折断) */
939
+ ._readonly_16490_56 ._pre_16490_143 {
940
+ display: flex;
941
+ align-items: flex-start;
942
+ max-height: var(--tmr-code-max-height, 480px);
943
+ }
944
+
945
+ ._readonly_16490_56._expanded_16490_162 ._pre_16490_143 {
946
+ max-height: none;
947
+ }
948
+
949
+ /* 行号槽:sticky-left 保证横向滚动时行号可见;code 不折行(white-space: pre),
950
+ 逻辑行与视觉行一一对应,行高继承 pre,格子无需逐行测高 */
951
+ ._gutter_16490_168 {
952
+ display: block;
953
+ flex: none;
954
+ position: sticky;
955
+ left: 0;
956
+ align-self: stretch;
957
+ padding-right: 12px;
958
+ margin-right: 14px;
959
+ border-right: 1px solid #f0f0f0;
960
+ background: #fff;
961
+ color: #9ca3af;
962
+ text-align: right;
963
+ min-width: 2ch;
964
+ user-select: none;
965
+ font-variant-numeric: tabular-nums;
966
+ }
967
+
968
+ ._gutterLine_16490_185 {
969
+ display: block;
970
+ }
971
+
972
+ ._readonlyActions_16490_189 {
973
+ display: inline-flex;
974
+ align-items: center;
975
+ gap: 4px;
976
+ }
977
+
978
+ ._actionBtn_16490_195 {
979
+ display: inline-flex;
980
+ align-items: center;
981
+ justify-content: center;
982
+ width: 28px;
983
+ height: 28px;
984
+ border: none;
985
+ border-radius: 6px;
986
+ background: transparent;
987
+ color: #57606a;
988
+ cursor: pointer;
989
+ transition: background 0.15s, color 0.15s;
990
+ }
991
+
992
+ ._actionBtn_16490_195:hover {
993
+ background: #f0f0f0;
994
+ color: #1f2937;
995
+ }
996
+
997
+ ._langBraces_16490_214 {
998
+ margin-right: 6px;
999
+ color: var(--tmr-accent, #ff6719);
1000
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1001
+ font-weight: 700;
1002
+ }
1003
+
1004
+ ._pre_16490_143 code {
931
1005
  display: block;
932
1006
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
933
1007
  color: #24292e;
@@ -939,45 +1013,49 @@ table.tmr-pending-anchor {
939
1013
  }
940
1014
 
941
1015
  /* 语法高亮配色(lowlight / highlight.js token,GitHub 浅色主题) */
942
- ._pre_5i2vi_136 .hljs-comment,
943
- ._pre_5i2vi_136 .hljs-quote {
1016
+ ._pre_16490_143 .hljs-comment,
1017
+ ._pre_16490_143 .hljs-quote {
944
1018
  color: #6a737d;
945
1019
  font-style: italic;
946
1020
  }
947
1021
 
948
- ._pre_5i2vi_136 .hljs-keyword,
949
- ._pre_5i2vi_136 .hljs-selector-tag,
950
- ._pre_5i2vi_136 .hljs-literal,
951
- ._pre_5i2vi_136 .hljs-type {
1022
+ ._pre_16490_143 .hljs-keyword,
1023
+ ._pre_16490_143 .hljs-selector-tag,
1024
+ ._pre_16490_143 .hljs-literal,
1025
+ ._pre_16490_143 .hljs-type {
952
1026
  color: #d73a49;
953
1027
  }
954
1028
 
955
- ._pre_5i2vi_136 .hljs-string,
956
- ._pre_5i2vi_136 .hljs-meta .hljs-string,
957
- ._pre_5i2vi_136 .hljs-regexp {
958
- color: #032f62;
1029
+ ._pre_16490_143 .hljs-string,
1030
+ ._pre_16490_143 .hljs-meta .hljs-string,
1031
+ ._pre_16490_143 .hljs-regexp {
1032
+ color: #c0392b;
959
1033
  }
960
1034
 
961
- ._pre_5i2vi_136 .hljs-number,
962
- ._pre_5i2vi_136 .hljs-built_in,
963
- ._pre_5i2vi_136 .hljs-builtin-name {
1035
+ ._pre_16490_143 .hljs-number,
1036
+ ._pre_16490_143 .hljs-built_in,
1037
+ ._pre_16490_143 .hljs-builtin-name {
964
1038
  color: #005cc5;
965
1039
  }
966
1040
 
967
- ._pre_5i2vi_136 .hljs-title,
968
- ._pre_5i2vi_136 .hljs-function .hljs-title,
969
- ._pre_5i2vi_136 .hljs-section {
1041
+ ._pre_16490_143 .hljs-title,
1042
+ ._pre_16490_143 .hljs-function .hljs-title,
1043
+ ._pre_16490_143 .hljs-section {
970
1044
  color: #6f42c1;
971
1045
  }
972
1046
 
973
- ._pre_5i2vi_136 .hljs-attr,
974
- ._pre_5i2vi_136 .hljs-attribute,
975
- ._pre_5i2vi_136 .hljs-variable,
976
- ._pre_5i2vi_136 .hljs-template-variable {
977
- color: #e36209;
1047
+ ._pre_16490_143 .hljs-attr,
1048
+ ._pre_16490_143 .hljs-attribute,
1049
+ ._pre_16490_143 .hljs-variable,
1050
+ ._pre_16490_143 .hljs-template-variable {
1051
+ color: #24292e;
1052
+ }
1053
+
1054
+ ._pre_16490_143 .hljs-punctuation {
1055
+ color: #57606a;
978
1056
  }
979
1057
 
980
- ._pre_5i2vi_136 .hljs-tag {
1058
+ ._pre_16490_143 .hljs-tag {
981
1059
  color: #22863a;
982
1060
  }
983
1061
  /* 顶部操作栏:横跨宽度、内容居中、细线灰图标。配色映射到可覆盖的 --tmr-* 变量。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiptap-markdown-react",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
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",