@astryx-vue/richtext 0.5.2 → 0.6.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/richtext",
3
3
  "type": "module",
4
- "version": "0.5.2",
4
+ "version": "0.6.1",
5
5
  "description": "Astryx rich text for Vue — Lexical nodes and lossless Markdown import/export. Not affiliated with Meta.",
6
6
  "author": "ShenQingchuan",
7
7
  "license": "MIT",
@@ -66,7 +66,7 @@
66
66
  "@lexical/utils": "0.52.0",
67
67
  "lexical": "0.52.0",
68
68
  "vue": "^3.5.0",
69
- "@astryx-vue/core": "^0.5.2"
69
+ "@astryx-vue/core": "^0.6.1"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@lexical/code": {
@@ -130,7 +130,7 @@
130
130
  "unplugin-vue": "8.0.0",
131
131
  "vue": "3.5.43",
132
132
  "vue-tsc": "3.3.12",
133
- "@astryx-vue/core": "^0.5.2"
133
+ "@astryx-vue/core": "^0.6.1"
134
134
  },
135
135
  "publishConfig": {
136
136
  "access": "public"
@@ -172,7 +172,8 @@
172
172
  padding-block-start: calc(var(--astryx-spacing-2, 8px) + var(--astryx-size-element-sm, 24px) + var(--astryx-spacing-2, 8px) + var(--astryx-spacing-3, 12px));
173
173
  }
174
174
 
175
- /* GFM 表格:表头半粗、次要颜色;每行下面一条分隔线,最后一行除外;表格太宽就在自己的容器里横向滚动。 */
175
+ /* GFM 表格:表头半粗、次要颜色;行线和列线画满每个格子,外沿由表格自己的边框收口;
176
+ 表格太宽就在自己的容器里横向滚动。 */
176
177
  .astryx-richtext__table-wrap {
177
178
  display: grid;
178
179
  grid-template-columns: minmax(0, 1fr);
@@ -184,8 +185,11 @@
184
185
  .astryx-richtext__table-wrap:first-child { margin-block-start: 0; }
185
186
  .astryx-richtext__table-wrap:last-child { margin-block-end: 0; }
186
187
 
188
+ /* 外沿边框在表格元素上,`border-collapse: collapse` 会把它和行线、列线合成一条
189
+ 1px 线,不会叠成双线。 */
187
190
  .astryx-richtext__table {
188
191
  width: 100%;
192
+ border: 1px solid var(--astryx-color-border, #ebebeb);
189
193
  border-collapse: collapse;
190
194
  }
191
195
 
@@ -193,7 +197,9 @@
193
197
  border-block-end: 1px solid var(--astryx-color-border, #ebebeb);
194
198
  }
195
199
 
196
- .astryx-richtext__table-row:last-child { border-block-end-color: transparent; }
200
+ /* 最后一行的行线交给表格边框。用 0 而不是透明:collapse 下行线的颜色会压过表格边框,
201
+ 透明会让底边少一条线。 */
202
+ .astryx-richtext__table-row:last-child { border-block-end: 0; }
197
203
 
198
204
  .astryx-richtext__table-cell {
199
205
  box-sizing: content-box;
@@ -203,6 +209,11 @@
203
209
  overflow-wrap: break-word;
204
210
  }
205
211
 
212
+ /* 列线;最后一列不画,外沿由表格边框收口。 */
213
+ .astryx-richtext__table-cell:not(:last-child) {
214
+ border-inline-end: 1px solid var(--astryx-color-border, #ebebeb);
215
+ }
216
+
206
217
  /* 格子里的段落不留上下外边距:外边距是段落和段落之间的间距,格子里只有这一段,留着会把格子撑成两倍高。 */
207
218
  .astryx-richtext__table-cell > .astryx-richtext__paragraph {
208
219
  margin-block: 0;