@akairos/myno 0.3.2 → 0.4.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +14 -0
  3. package/dist/.vite/manifest.json +46 -46
  4. package/dist/assets/image-markdown-D_KxLndJ.js +1265 -0
  5. package/dist/assets/image-markdown-DjLPX8Cn.js +1265 -0
  6. package/dist/assets/index-B4ecS-cF.js +1 -0
  7. package/dist/assets/index-BADrVn75.js +1 -0
  8. package/dist/assets/index-BTretno4.js +1 -0
  9. package/dist/assets/index-BXlZZMOz.js +1 -0
  10. package/dist/assets/index-Bd0I8kF1.js +1 -0
  11. package/dist/assets/index-BfO3YJzD.js +1 -0
  12. package/dist/assets/index-BhUr-B6E.js +1 -0
  13. package/dist/assets/index-Bvh2Wgzo.js +1 -0
  14. package/dist/assets/index-C8MZF2M1.js +1 -0
  15. package/dist/assets/index-CDQ6fPsF.js +7 -0
  16. package/dist/assets/index-CERUTt28.js +1 -0
  17. package/dist/assets/index-CHAJKy6Z.js +1 -0
  18. package/dist/assets/index-COuMfdWH.js +3 -0
  19. package/dist/assets/index-CT1Zmf0B.js +2 -0
  20. package/dist/assets/index-C_mIGN7h.js +1 -0
  21. package/dist/assets/index-Cgs3alSt.js +2 -0
  22. package/dist/assets/index-Cl8ck_yS.js +1 -0
  23. package/dist/assets/index-Clh0l7tA.js +6 -0
  24. package/dist/assets/index-CoD6FnDs.js +1 -0
  25. package/dist/assets/index-CsnJQClJ.js +1 -0
  26. package/dist/assets/index-D-v57VOj.js +1 -0
  27. package/dist/assets/index-D4yhPgHm.js +1 -0
  28. package/dist/assets/index-D96XFM__.js +1 -0
  29. package/dist/assets/index-DHqWq6xc.js +1 -0
  30. package/dist/assets/index-DK8kmMNZ.js +1 -0
  31. package/dist/assets/index-DNMR53rb.js +1 -0
  32. package/dist/assets/index-DNTDwjMb.js +1 -0
  33. package/dist/assets/index-DTBc-iCV.js +1 -0
  34. package/dist/assets/index-DgUo7cv1.js +1 -0
  35. package/dist/assets/index-DickJnaB.js +1 -0
  36. package/dist/assets/index-Dni2u4TR.js +1 -0
  37. package/dist/assets/index-DqPLvEv8.js +1 -0
  38. package/dist/assets/index-Du_1nXQ0.js +1 -0
  39. package/dist/assets/index-DvFEir78.js +7 -0
  40. package/dist/assets/index-DyFBKBTt.js +6 -0
  41. package/dist/assets/index-KmRmudm8.js +13 -0
  42. package/dist/assets/index-Qt71JNB9.js +1 -0
  43. package/dist/assets/index-Vb_uz0jk.js +3 -0
  44. package/dist/assets/index-cPhT19Rl.js +1 -0
  45. package/dist/assets/index-pGJ67V8L.js +1 -0
  46. package/dist/assets/index-tEdwQR6u.js +1 -0
  47. package/dist/assets/index-tLrnxT69.js +13 -0
  48. package/dist/editor/image-markdown.d.ts +4 -1
  49. package/dist/editor/image-markdown.d.ts.map +1 -1
  50. package/dist/editor/image-markdown.js +75 -1
  51. package/dist/editor/image-markdown.js.map +1 -1
  52. package/dist/editor-export.js +1 -1
  53. package/dist/src/studio/studio.html +1 -1
  54. package/dist/studio.js +127 -129
  55. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.4.0
4
+
5
+ - Preserve descriptive image alt text, titles, node order and block-image resizing through Markdown round trips.
6
+ - Store non-default descriptive-image ratios in adjacent versioned metadata shared by the editor, Studio source preview and browser export, while retaining numeric-alt ratio syntax.
7
+
3
8
  ## v0.3.2
4
9
 
5
10
  - Preserve Markdown images without a title when Milkdown validates image attributes.
package/README.md CHANGED
@@ -58,6 +58,20 @@ import "@akairos/myno/article.css";
58
58
 
59
59
  以上为纯 CSS 入口,不加载编辑器 JavaScript。样式源文件位于 `src/styles/`,编辑器、Studio 和导出共用。表格表头保持单行,超出正文宽度时左右滚动,正文单元格允许换行。更新 CSS 后需重建 myno;Pipeline 内置导出也需更新依赖并重建浏览器资源。
60
60
 
61
+ ## 图片描述与缩放
62
+
63
+ 从 0.4.0 起,独立图片的描述性 `alt`、`title` 图注和缩放分别保存在图片节点上。同一 URL 可以出现多次并保留各自描述、图注及顺序。既有 `![0.50](image.png "图注")` 数值 alt 仍表示原有缩放比例。
64
+
65
+ 描述性 alt 图片默认比例为 1,不增加标记;用户缩放后使用紧邻该图片的有限元数据,标记和图片之间固定一个空行:
66
+
67
+ ```md
68
+ <!-- myno-image-ratio:v1 0.50 -->
69
+
70
+ ![图片描述](image.png "图注")
71
+ ```
72
+
73
+ 仅精确 v1 标记、有限正数且非 1 的两位小数比例,以及紧邻的独立描述性图片会被消费。普通注释、未知版本、无效比例或隔有正文的标记保持原样;不按 URL 关联图片。编辑器、Studio 和微信导出共用解析规则,有效元数据不显示到正文。其他 Markdown 渲染器忽略注释时仍保留图片和描述,可能不应用该缩放。
74
+
61
75
  ## 独立启动工作台
62
76
 
63
77
  下面的命令在克隆本仓库后执行,npm 包没有独立 Studio CLI:
@@ -1,6 +1,6 @@
1
1
  {
2
- "_image-markdown-flIFnZQz.js": {
3
- "file": "assets/image-markdown-flIFnZQz.js",
2
+ "_image-markdown-DjLPX8Cn.js": {
3
+ "file": "assets/image-markdown-DjLPX8Cn.js",
4
4
  "name": "image-markdown"
5
5
  },
6
6
  "_index-CAXLlEvK.js": {
@@ -15,7 +15,7 @@
15
15
  "name": "simple-mode"
16
16
  },
17
17
  "node_modules/@codemirror/lang-angular/dist/index.js": {
18
- "file": "assets/index-DdtnTgdR.js",
18
+ "file": "assets/index-Bd0I8kF1.js",
19
19
  "name": "index",
20
20
  "src": "node_modules/@codemirror/lang-angular/dist/index.js",
21
21
  "isDynamicEntry": true,
@@ -24,45 +24,45 @@
24
24
  "node_modules/@codemirror/lang-html/dist/index.js",
25
25
  "node_modules/@codemirror/lang-javascript/dist/index.js",
26
26
  "_index-CAXLlEvK.js",
27
- "_image-markdown-flIFnZQz.js",
27
+ "_image-markdown-DjLPX8Cn.js",
28
28
  "node_modules/@codemirror/lang-css/dist/index.js"
29
29
  ]
30
30
  },
31
31
  "node_modules/@codemirror/lang-cpp/dist/index.js": {
32
- "file": "assets/index-Ci1ADeNw.js",
32
+ "file": "assets/index-DqPLvEv8.js",
33
33
  "name": "index",
34
34
  "src": "node_modules/@codemirror/lang-cpp/dist/index.js",
35
35
  "isDynamicEntry": true,
36
36
  "imports": [
37
37
  "_index-CAXLlEvK.js",
38
38
  "src/studio/studio.html",
39
- "_image-markdown-flIFnZQz.js"
39
+ "_image-markdown-DjLPX8Cn.js"
40
40
  ]
41
41
  },
42
42
  "node_modules/@codemirror/lang-css/dist/index.js": {
43
- "file": "assets/index-DoiEiA2M.js",
43
+ "file": "assets/index-DickJnaB.js",
44
44
  "name": "index",
45
45
  "src": "node_modules/@codemirror/lang-css/dist/index.js",
46
46
  "isDynamicEntry": true,
47
47
  "imports": [
48
48
  "_index-CAXLlEvK.js",
49
49
  "src/studio/studio.html",
50
- "_image-markdown-flIFnZQz.js"
50
+ "_image-markdown-DjLPX8Cn.js"
51
51
  ]
52
52
  },
53
53
  "node_modules/@codemirror/lang-go/dist/index.js": {
54
- "file": "assets/index-DYzqKMaM.js",
54
+ "file": "assets/index-DvFEir78.js",
55
55
  "name": "index",
56
56
  "src": "node_modules/@codemirror/lang-go/dist/index.js",
57
57
  "isDynamicEntry": true,
58
58
  "imports": [
59
59
  "_index-CAXLlEvK.js",
60
60
  "src/studio/studio.html",
61
- "_image-markdown-flIFnZQz.js"
61
+ "_image-markdown-DjLPX8Cn.js"
62
62
  ]
63
63
  },
64
64
  "node_modules/@codemirror/lang-html/dist/index.js": {
65
- "file": "assets/index-CmmXvZ6J.js",
65
+ "file": "assets/index-DgUo7cv1.js",
66
66
  "name": "index",
67
67
  "src": "node_modules/@codemirror/lang-html/dist/index.js",
68
68
  "isDynamicEntry": true,
@@ -71,33 +71,33 @@
71
71
  "src/studio/studio.html",
72
72
  "node_modules/@codemirror/lang-css/dist/index.js",
73
73
  "node_modules/@codemirror/lang-javascript/dist/index.js",
74
- "_image-markdown-flIFnZQz.js"
74
+ "_image-markdown-DjLPX8Cn.js"
75
75
  ]
76
76
  },
77
77
  "node_modules/@codemirror/lang-java/dist/index.js": {
78
- "file": "assets/index-ktq63SwX.js",
78
+ "file": "assets/index-D4yhPgHm.js",
79
79
  "name": "index",
80
80
  "src": "node_modules/@codemirror/lang-java/dist/index.js",
81
81
  "isDynamicEntry": true,
82
82
  "imports": [
83
83
  "_index-CAXLlEvK.js",
84
84
  "src/studio/studio.html",
85
- "_image-markdown-flIFnZQz.js"
85
+ "_image-markdown-DjLPX8Cn.js"
86
86
  ]
87
87
  },
88
88
  "node_modules/@codemirror/lang-javascript/dist/index.js": {
89
- "file": "assets/index-DlWplKCS.js",
89
+ "file": "assets/index-tLrnxT69.js",
90
90
  "name": "index",
91
91
  "src": "node_modules/@codemirror/lang-javascript/dist/index.js",
92
92
  "isDynamicEntry": true,
93
93
  "imports": [
94
94
  "_index-CAXLlEvK.js",
95
95
  "src/studio/studio.html",
96
- "_image-markdown-flIFnZQz.js"
96
+ "_image-markdown-DjLPX8Cn.js"
97
97
  ]
98
98
  },
99
99
  "node_modules/@codemirror/lang-jinja/dist/index.js": {
100
- "file": "assets/index-Dt8w_V-H.js",
100
+ "file": "assets/index-CERUTt28.js",
101
101
  "name": "index",
102
102
  "src": "node_modules/@codemirror/lang-jinja/dist/index.js",
103
103
  "isDynamicEntry": true,
@@ -105,24 +105,24 @@
105
105
  "src/studio/studio.html",
106
106
  "node_modules/@codemirror/lang-html/dist/index.js",
107
107
  "_index-CAXLlEvK.js",
108
- "_image-markdown-flIFnZQz.js",
108
+ "_image-markdown-DjLPX8Cn.js",
109
109
  "node_modules/@codemirror/lang-css/dist/index.js",
110
110
  "node_modules/@codemirror/lang-javascript/dist/index.js"
111
111
  ]
112
112
  },
113
113
  "node_modules/@codemirror/lang-json/dist/index.js": {
114
- "file": "assets/index-lzIwkAor.js",
114
+ "file": "assets/index-Qt71JNB9.js",
115
115
  "name": "index",
116
116
  "src": "node_modules/@codemirror/lang-json/dist/index.js",
117
117
  "isDynamicEntry": true,
118
118
  "imports": [
119
119
  "_index-CAXLlEvK.js",
120
120
  "src/studio/studio.html",
121
- "_image-markdown-flIFnZQz.js"
121
+ "_image-markdown-DjLPX8Cn.js"
122
122
  ]
123
123
  },
124
124
  "node_modules/@codemirror/lang-less/dist/index.js": {
125
- "file": "assets/index-nZYfY4TR.js",
125
+ "file": "assets/index-BfO3YJzD.js",
126
126
  "name": "index",
127
127
  "src": "node_modules/@codemirror/lang-less/dist/index.js",
128
128
  "isDynamicEntry": true,
@@ -130,11 +130,11 @@
130
130
  "src/studio/studio.html",
131
131
  "node_modules/@codemirror/lang-css/dist/index.js",
132
132
  "_index-CAXLlEvK.js",
133
- "_image-markdown-flIFnZQz.js"
133
+ "_image-markdown-DjLPX8Cn.js"
134
134
  ]
135
135
  },
136
136
  "node_modules/@codemirror/lang-liquid/dist/index.js": {
137
- "file": "assets/index-BZ-5737Z.js",
137
+ "file": "assets/index-DHqWq6xc.js",
138
138
  "name": "index",
139
139
  "src": "node_modules/@codemirror/lang-liquid/dist/index.js",
140
140
  "isDynamicEntry": true,
@@ -142,27 +142,27 @@
142
142
  "src/studio/studio.html",
143
143
  "node_modules/@codemirror/lang-html/dist/index.js",
144
144
  "_index-CAXLlEvK.js",
145
- "_image-markdown-flIFnZQz.js",
145
+ "_image-markdown-DjLPX8Cn.js",
146
146
  "node_modules/@codemirror/lang-css/dist/index.js",
147
147
  "node_modules/@codemirror/lang-javascript/dist/index.js"
148
148
  ]
149
149
  },
150
150
  "node_modules/@codemirror/lang-markdown/dist/index.js": {
151
- "file": "assets/index-66BBLxhh.js",
151
+ "file": "assets/index-Clh0l7tA.js",
152
152
  "name": "index",
153
153
  "src": "node_modules/@codemirror/lang-markdown/dist/index.js",
154
154
  "isDynamicEntry": true,
155
155
  "imports": [
156
156
  "src/studio/studio.html",
157
157
  "node_modules/@codemirror/lang-html/dist/index.js",
158
- "_image-markdown-flIFnZQz.js",
158
+ "_image-markdown-DjLPX8Cn.js",
159
159
  "_index-CAXLlEvK.js",
160
160
  "node_modules/@codemirror/lang-css/dist/index.js",
161
161
  "node_modules/@codemirror/lang-javascript/dist/index.js"
162
162
  ]
163
163
  },
164
164
  "node_modules/@codemirror/lang-php/dist/index.js": {
165
- "file": "assets/index-CNRHxRLz.js",
165
+ "file": "assets/index-pGJ67V8L.js",
166
166
  "name": "index",
167
167
  "src": "node_modules/@codemirror/lang-php/dist/index.js",
168
168
  "isDynamicEntry": true,
@@ -170,35 +170,35 @@
170
170
  "_index-CAXLlEvK.js",
171
171
  "src/studio/studio.html",
172
172
  "node_modules/@codemirror/lang-html/dist/index.js",
173
- "_image-markdown-flIFnZQz.js",
173
+ "_image-markdown-DjLPX8Cn.js",
174
174
  "node_modules/@codemirror/lang-css/dist/index.js",
175
175
  "node_modules/@codemirror/lang-javascript/dist/index.js"
176
176
  ]
177
177
  },
178
178
  "node_modules/@codemirror/lang-python/dist/index.js": {
179
- "file": "assets/index-BZem0vzC.js",
179
+ "file": "assets/index-Vb_uz0jk.js",
180
180
  "name": "index",
181
181
  "src": "node_modules/@codemirror/lang-python/dist/index.js",
182
182
  "isDynamicEntry": true,
183
183
  "imports": [
184
184
  "_index-CAXLlEvK.js",
185
185
  "src/studio/studio.html",
186
- "_image-markdown-flIFnZQz.js"
186
+ "_image-markdown-DjLPX8Cn.js"
187
187
  ]
188
188
  },
189
189
  "node_modules/@codemirror/lang-rust/dist/index.js": {
190
- "file": "assets/index-CZq60G2m.js",
190
+ "file": "assets/index-DTBc-iCV.js",
191
191
  "name": "index",
192
192
  "src": "node_modules/@codemirror/lang-rust/dist/index.js",
193
193
  "isDynamicEntry": true,
194
194
  "imports": [
195
195
  "_index-CAXLlEvK.js",
196
196
  "src/studio/studio.html",
197
- "_image-markdown-flIFnZQz.js"
197
+ "_image-markdown-DjLPX8Cn.js"
198
198
  ]
199
199
  },
200
200
  "node_modules/@codemirror/lang-sass/dist/index.js": {
201
- "file": "assets/index-Cu7G95Iq.js",
201
+ "file": "assets/index-Cl8ck_yS.js",
202
202
  "name": "index",
203
203
  "src": "node_modules/@codemirror/lang-sass/dist/index.js",
204
204
  "isDynamicEntry": true,
@@ -206,22 +206,22 @@
206
206
  "_index-CAXLlEvK.js",
207
207
  "src/studio/studio.html",
208
208
  "node_modules/@codemirror/lang-css/dist/index.js",
209
- "_image-markdown-flIFnZQz.js"
209
+ "_image-markdown-DjLPX8Cn.js"
210
210
  ]
211
211
  },
212
212
  "node_modules/@codemirror/lang-sql/dist/index.js": {
213
- "file": "assets/index-C5i0rs3g.js",
213
+ "file": "assets/index-Cgs3alSt.js",
214
214
  "name": "index",
215
215
  "src": "node_modules/@codemirror/lang-sql/dist/index.js",
216
216
  "isDynamicEntry": true,
217
217
  "imports": [
218
218
  "src/studio/studio.html",
219
219
  "_index-CAXLlEvK.js",
220
- "_image-markdown-flIFnZQz.js"
220
+ "_image-markdown-DjLPX8Cn.js"
221
221
  ]
222
222
  },
223
223
  "node_modules/@codemirror/lang-vue/dist/index.js": {
224
- "file": "assets/index-DKRYs_np.js",
224
+ "file": "assets/index-BADrVn75.js",
225
225
  "name": "index",
226
226
  "src": "node_modules/@codemirror/lang-vue/dist/index.js",
227
227
  "isDynamicEntry": true,
@@ -230,41 +230,41 @@
230
230
  "node_modules/@codemirror/lang-html/dist/index.js",
231
231
  "node_modules/@codemirror/lang-javascript/dist/index.js",
232
232
  "_index-CAXLlEvK.js",
233
- "_image-markdown-flIFnZQz.js",
233
+ "_image-markdown-DjLPX8Cn.js",
234
234
  "node_modules/@codemirror/lang-css/dist/index.js"
235
235
  ]
236
236
  },
237
237
  "node_modules/@codemirror/lang-wast/dist/index.js": {
238
- "file": "assets/index-pMBzGDJd.js",
238
+ "file": "assets/index-D96XFM__.js",
239
239
  "name": "index",
240
240
  "src": "node_modules/@codemirror/lang-wast/dist/index.js",
241
241
  "isDynamicEntry": true,
242
242
  "imports": [
243
243
  "src/studio/studio.html",
244
244
  "_index-CAXLlEvK.js",
245
- "_image-markdown-flIFnZQz.js"
245
+ "_image-markdown-DjLPX8Cn.js"
246
246
  ]
247
247
  },
248
248
  "node_modules/@codemirror/lang-xml/dist/index.js": {
249
- "file": "assets/index-DI76JKrp.js",
249
+ "file": "assets/index-DNTDwjMb.js",
250
250
  "name": "index",
251
251
  "src": "node_modules/@codemirror/lang-xml/dist/index.js",
252
252
  "isDynamicEntry": true,
253
253
  "imports": [
254
254
  "_index-CAXLlEvK.js",
255
255
  "src/studio/studio.html",
256
- "_image-markdown-flIFnZQz.js"
256
+ "_image-markdown-DjLPX8Cn.js"
257
257
  ]
258
258
  },
259
259
  "node_modules/@codemirror/lang-yaml/dist/index.js": {
260
- "file": "assets/index-BsUkmM8V.js",
260
+ "file": "assets/index-BXlZZMOz.js",
261
261
  "name": "index",
262
262
  "src": "node_modules/@codemirror/lang-yaml/dist/index.js",
263
263
  "isDynamicEntry": true,
264
264
  "imports": [
265
265
  "_index-CAXLlEvK.js",
266
266
  "src/studio/studio.html",
267
- "_image-markdown-flIFnZQz.js"
267
+ "_image-markdown-DjLPX8Cn.js"
268
268
  ]
269
269
  },
270
270
  "node_modules/@codemirror/legacy-modes/mode/apl.js": {
@@ -1085,7 +1085,7 @@
1085
1085
  "src": "src/studio/editor-export.ts",
1086
1086
  "isEntry": true,
1087
1087
  "imports": [
1088
- "_image-markdown-flIFnZQz.js"
1088
+ "_image-markdown-DjLPX8Cn.js"
1089
1089
  ]
1090
1090
  },
1091
1091
  "src/studio/studio.html": {
@@ -1094,7 +1094,7 @@
1094
1094
  "src": "src/studio/studio.html",
1095
1095
  "isEntry": true,
1096
1096
  "imports": [
1097
- "_image-markdown-flIFnZQz.js"
1097
+ "_image-markdown-DjLPX8Cn.js"
1098
1098
  ],
1099
1099
  "dynamicImports": [
1100
1100
  "node_modules/@codemirror/lang-sql/dist/index.js",