@heycys/gallery 0.1.1 → 0.2.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 (473) hide show
  1. package/THIRD-PARTY-NOTICES.md +2 -2
  2. package/browser/editor/components/align.mjs +58 -0
  3. package/browser/editor/components/code/index.mjs +1 -1
  4. package/browser/editor/components/columns/page.mjs +4 -4
  5. package/browser/editor/components/embed/index.mjs +2 -2
  6. package/browser/editor/components/embed/page.mjs +1 -1
  7. package/browser/editor/components/file/page.mjs +4 -4
  8. package/browser/editor/components/flowchart/add.mjs +7 -6
  9. package/browser/editor/components/flowchart/page.mjs +1 -1
  10. package/browser/editor/components/heading/index.mjs +7 -6
  11. package/browser/editor/components/icons.mjs +11 -0
  12. package/browser/editor/components/image/crop.mjs +6 -9
  13. package/browser/editor/components/image/index.mjs +2 -0
  14. package/browser/editor/components/image/page.mjs +172 -90
  15. package/browser/editor/components/installed/index.mjs +15 -4
  16. package/browser/editor/components/installed/page.mjs +103 -25
  17. package/browser/editor/components/installed/served.mjs +6 -5
  18. package/browser/editor/components/instances.mjs +18 -0
  19. package/browser/editor/components/list/page.mjs +3 -6
  20. package/browser/editor/components/media/icons.mjs +13 -8
  21. package/browser/editor/components/media/page.mjs +5 -3
  22. package/browser/editor/components/media/toolbar.mjs +12 -3
  23. package/browser/editor/components/paragraph/index.mjs +4 -3
  24. package/browser/editor/components/registry.mjs +30 -9
  25. package/browser/editor/components/table/index.mjs +61 -2
  26. package/browser/editor/components/table/page.mjs +1 -1
  27. package/browser/editor/page/after/index.mjs +288 -0
  28. package/browser/editor/page/align.mjs +91 -0
  29. package/browser/editor/page/annotate/card.mjs +3 -6
  30. package/browser/editor/page/autosave.mjs +310 -37
  31. package/browser/editor/page/beside.mjs +5 -6
  32. package/browser/editor/page/block-menu/index.mjs +6 -3
  33. package/browser/editor/page/blocks.mjs +3 -1
  34. package/browser/editor/page/board/client.mjs +57 -0
  35. package/browser/editor/page/board/hint.mjs +182 -0
  36. package/browser/editor/page/board/history.mjs +119 -0
  37. package/browser/editor/page/board/index.mjs +1059 -0
  38. package/browser/editor/page/board/motion.mjs +177 -0
  39. package/browser/editor/page/board/settings.mjs +210 -0
  40. package/browser/editor/page/caret.mjs +1 -1
  41. package/browser/editor/page/changes/bar.mjs +6 -14
  42. package/browser/editor/page/changes/index.mjs +2 -2
  43. package/browser/editor/page/clipboard/import/html.mjs +29 -6
  44. package/browser/editor/page/clipboard/import/inline.mjs +32 -0
  45. package/browser/editor/page/clipboard/import/markdown.mjs +58 -13
  46. package/browser/editor/page/clipboard/import/read.mjs +6 -1
  47. package/browser/editor/page/clipboard/import/to-blocks.mjs +44 -12
  48. package/browser/editor/page/clipboard/import/yuque.mjs +622 -0
  49. package/browser/editor/page/clipboard/index.mjs +133 -15
  50. package/browser/editor/page/clipboard/own/blocks.mjs +13 -14
  51. package/browser/editor/page/clipboard/own/chart-keys.mjs +41 -28
  52. package/browser/editor/page/clipboard/own/describe.mjs +6 -2
  53. package/browser/editor/page/clipboard/own/selection.mjs +1 -1
  54. package/browser/editor/page/columns/index.mjs +48 -46
  55. package/browser/editor/page/commit.mjs +80 -22
  56. package/browser/editor/page/conflicts.mjs +7 -7
  57. package/browser/editor/page/core.mjs +34 -16
  58. package/browser/editor/page/custom-page.mjs +110 -0
  59. package/browser/editor/page/editor.mjs +71 -17
  60. package/browser/editor/page/emoji-picker/styles.mjs +7 -12
  61. package/browser/editor/page/emoji-picker/upload.mjs +2 -2
  62. package/browser/editor/page/handle/index.mjs +5 -8
  63. package/browser/editor/page/history.mjs +41 -6
  64. package/browser/editor/page/insert/index.mjs +20 -22
  65. package/browser/editor/page/links/index.mjs +5 -3
  66. package/browser/editor/page/links/pages.mjs +27 -9
  67. package/browser/editor/page/look.mjs +54 -3
  68. package/browser/editor/page/margin.mjs +18 -3
  69. package/browser/editor/page/media-menu/index.mjs +6 -7
  70. package/browser/editor/page/menu.mjs +33 -14
  71. package/browser/editor/page/notices.mjs +2 -2
  72. package/browser/editor/page/page-objects.mjs +9 -2
  73. package/browser/editor/page/panel.mjs +4 -9
  74. package/browser/editor/page/present-links.mjs +15 -5
  75. package/browser/editor/page/present-shell.mjs +63 -0
  76. package/browser/editor/page/resize/index.mjs +42 -29
  77. package/browser/editor/page/selection/index.mjs +10 -2
  78. package/browser/editor/page/served.mjs +14 -0
  79. package/browser/editor/page/session.mjs +48 -4
  80. package/browser/editor/page/slash-menu/index.mjs +3 -3
  81. package/browser/editor/page/table/binding.mjs +87 -0
  82. package/browser/editor/page/table/cells.mjs +102 -46
  83. package/browser/editor/page/table/index.mjs +24 -9
  84. package/browser/editor/page/table/pictures.mjs +299 -0
  85. package/browser/editor/page/table/views.mjs +103 -0
  86. package/browser/editor/page/table/widths.mjs +82 -10
  87. package/browser/editor/page/text-select/index.mjs +26 -12
  88. package/browser/editor/page/todo-writes.mjs +75 -0
  89. package/browser/editor/page/typing/index.mjs +97 -15
  90. package/browser/editor/page/typing/leave.mjs +19 -5
  91. package/browser/editor/page/ui.mjs +13 -0
  92. package/browser/shared/block-packs.mjs +419 -0
  93. package/browser/shared/board-places.mjs +224 -0
  94. package/browser/shared/card-size.mjs +59 -0
  95. package/browser/shared/colors.mjs +3 -2
  96. package/browser/shared/component-catalog.mjs +330 -46
  97. package/browser/shared/component-source.mjs +39 -0
  98. package/browser/shared/components/heading.mjs +2 -1
  99. package/browser/shared/components/index.mjs +12 -3
  100. package/browser/shared/components/installed.mjs +35 -3
  101. package/browser/shared/components/page.mjs +20 -8
  102. package/browser/shared/components/paragraph.mjs +8 -1
  103. package/browser/shared/components/state.mjs +5 -1
  104. package/browser/shared/components/table.mjs +1 -0
  105. package/browser/shared/document-look.mjs +10 -5
  106. package/browser/shared/drafts.mjs +432 -0
  107. package/browser/shared/emoji/line-icons.mjs +37 -0
  108. package/browser/shared/extension-sidebar.mjs +126 -0
  109. package/browser/shared/extensions.mjs +79 -0
  110. package/browser/shared/file-table.mjs +101 -0
  111. package/browser/shared/http.mjs +9 -0
  112. package/browser/shared/i18n/en.mjs +330 -27
  113. package/browser/shared/json-layout.mjs +47 -0
  114. package/browser/shared/net-cache.mjs +133 -0
  115. package/browser/shared/net-keys.mjs +32 -0
  116. package/browser/shared/net-policy.mjs +177 -0
  117. package/browser/shared/outline-shape.mjs +128 -0
  118. package/browser/shared/outline.mjs +359 -67
  119. package/browser/shared/pack-manifest.mjs +88 -0
  120. package/browser/shared/page-address.mjs +6 -3
  121. package/browser/shared/page-cards.mjs +308 -0
  122. package/browser/shared/page-links.mjs +69 -6
  123. package/browser/shared/pages.mjs +500 -0
  124. package/browser/shared/paths.mjs +6 -0
  125. package/browser/shared/pinyin.mjs +92 -0
  126. package/browser/shared/present-step.mjs +17 -0
  127. package/browser/shared/preview-server.mjs +3 -7
  128. package/browser/shared/session.mjs +8 -1
  129. package/browser/shared/shipped-blocks.mjs +299 -0
  130. package/browser/shared/sidebar-head.mjs +70 -0
  131. package/browser/shared/table-chart.mjs +33 -1
  132. package/browser/shared/todos.mjs +83 -0
  133. package/browser/shared/user-directory.mjs +24 -0
  134. package/browser/shared/versions.mjs +14 -0
  135. package/browser/shared/web-links.mjs +139 -0
  136. package/browser/shared/workspace-columns.mjs +120 -0
  137. package/browser/shared/workspace-name.mjs +154 -0
  138. package/browser/shared/workspace-query.mjs +125 -0
  139. package/browser/shared/workspace-registry.mjs +272 -0
  140. package/browser/shared/workspace.mjs +171 -20
  141. package/dist/chunk-2OHANJ6Q.mjs +2 -0
  142. package/dist/chunk-3MBRL2PM.mjs +16 -0
  143. package/dist/chunk-4OKWZY5E.mjs +2 -0
  144. package/dist/chunk-4OZWXZE5.mjs +5 -0
  145. package/dist/chunk-5K44HLTZ.mjs +2 -0
  146. package/dist/{chunk-5ZKJ3H4P.mjs → chunk-5XA2ZBAE.mjs} +3 -3
  147. package/dist/{chunk-4FS7Z7WR.mjs → chunk-67N2QJYT.mjs} +1 -1
  148. package/dist/chunk-6KBYRA2C.mjs +2 -0
  149. package/dist/chunk-6N3PX4XX.mjs +8 -0
  150. package/dist/{chunk-V5JTW2LH.mjs → chunk-6QBHU4DF.mjs} +1 -1
  151. package/dist/chunk-7JDX4E65.mjs +13 -0
  152. package/dist/chunk-7M2BQQGZ.mjs +2 -0
  153. package/dist/chunk-7OG26PGF.mjs +2 -0
  154. package/dist/chunk-AHN3NFKJ.mjs +3 -0
  155. package/dist/chunk-ALZ6ZENZ.mjs +3 -0
  156. package/dist/chunk-AR5D57ZD.mjs +170 -0
  157. package/dist/{chunk-W3BGBJQW.mjs → chunk-BFJGHSQN.mjs} +1 -1
  158. package/dist/{chunk-LS4F7JUM.mjs → chunk-BZ5RAF7L.mjs} +1 -1
  159. package/dist/chunk-CMA72MAG.mjs +2 -0
  160. package/dist/{chunk-LCTHTZIL.mjs → chunk-DAZL73VK.mjs} +91 -91
  161. package/dist/{chunk-Y6RLRPG3.mjs → chunk-DJISHPUL.mjs} +1 -1
  162. package/dist/chunk-DR73Y2UJ.mjs +3 -0
  163. package/dist/{chunk-FDLXYYG4.mjs → chunk-EAIFITAV.mjs} +1 -1
  164. package/dist/{chunk-TMYZB6AV.mjs → chunk-EKNHM3P4.mjs} +1 -1
  165. package/dist/chunk-EP25HDAJ.mjs +2 -0
  166. package/dist/{chunk-GB5SOYQJ.mjs → chunk-ERLAIBOA.mjs} +2 -2
  167. package/dist/chunk-EURLTOTZ.mjs +4 -0
  168. package/dist/chunk-F4ZA6JRZ.mjs +3 -0
  169. package/dist/chunk-F6HVDZR4.mjs +2 -0
  170. package/dist/chunk-FDMAXMQA.mjs +2 -0
  171. package/dist/chunk-FETSREUN.mjs +5 -0
  172. package/dist/chunk-GHOYKMQ3.mjs +4 -0
  173. package/dist/{chunk-2B5E4CDJ.mjs → chunk-GPIWQ4X4.mjs} +1 -1
  174. package/dist/chunk-HDWTZ763.mjs +12 -0
  175. package/dist/chunk-HPOI4ZX7.mjs +6 -0
  176. package/dist/{chunk-BGGDRNYQ.mjs → chunk-HXG7EOPJ.mjs} +1 -1
  177. package/dist/chunk-IA4PSIMD.mjs +2 -0
  178. package/dist/{chunk-E7LWZRXY.mjs → chunk-ITOH5EGO.mjs} +1 -1
  179. package/dist/chunk-IV64FFI4.mjs +2 -0
  180. package/dist/chunk-J43Z6LSS.mjs +2 -0
  181. package/dist/chunk-J5PUIV3Y.mjs +4 -0
  182. package/dist/chunk-JA7G53PC.mjs +2 -0
  183. package/dist/chunk-JEUK3ZO7.mjs +2 -0
  184. package/dist/chunk-JLTZF4LA.mjs +2 -0
  185. package/dist/chunk-JZT7I2OJ.mjs +2 -0
  186. package/dist/chunk-K5XATEOO.mjs +2 -0
  187. package/dist/chunk-L2SUIS5S.mjs +2 -0
  188. package/dist/chunk-L7UP52JO.mjs +2 -0
  189. package/dist/chunk-LM4XFQHZ.mjs +2 -0
  190. package/dist/chunk-MN7BZL4R.mjs +2 -0
  191. package/dist/chunk-MTYYHM2G.mjs +15 -0
  192. package/dist/chunk-MXUBKDRO.mjs +15 -0
  193. package/dist/chunk-NAMN3RAF.mjs +2 -0
  194. package/dist/{chunk-SYGN7GLU.mjs → chunk-OEXWRJME.mjs} +1 -1
  195. package/dist/chunk-OFHXGWOX.mjs +2 -0
  196. package/dist/chunk-ORID3AE7.mjs +166 -0
  197. package/dist/chunk-PAREWQGB.mjs +4 -0
  198. package/dist/chunk-PGDE24N5.mjs +2 -0
  199. package/dist/chunk-POTA2FV4.mjs +2 -0
  200. package/dist/chunk-PUOQ65NC.mjs +2 -0
  201. package/dist/chunk-Q4UEPUWF.mjs +2 -0
  202. package/dist/chunk-QE5RG76S.mjs +549 -0
  203. package/dist/chunk-R2ZDLJYT.mjs +10 -0
  204. package/dist/{chunk-7DTINW6U.mjs → chunk-SQ6Y2ZMA.mjs} +2 -2
  205. package/dist/chunk-SWUTTZCN.mjs +2 -0
  206. package/dist/chunk-TANZRINB.mjs +2 -0
  207. package/dist/chunk-TR7TWGHB.mjs +2 -0
  208. package/dist/chunk-U5XL7D6A.mjs +3 -0
  209. package/dist/{chunk-XNROSH2T.mjs → chunk-U7NZI6N4.mjs} +2 -2
  210. package/dist/chunk-UGWMMEJ5.mjs +15 -0
  211. package/dist/chunk-UJQJKNGK.mjs +2 -0
  212. package/dist/chunk-UYVCQK3H.mjs +22 -0
  213. package/dist/chunk-VFX2KNHP.mjs +4 -0
  214. package/dist/chunk-VS7JIGJW.mjs +24 -0
  215. package/dist/chunk-W7665ZEC.mjs +6 -0
  216. package/dist/chunk-WQDQWCX5.mjs +2 -0
  217. package/dist/chunk-YI43RG4P.mjs +2 -0
  218. package/dist/chunk-YLPSMDIS.mjs +5 -0
  219. package/dist/chunk-YNAWBAYN.mjs +3 -0
  220. package/dist/chunk-YROX2O22.mjs +2 -0
  221. package/dist/chunk-ZDLPUOAG.mjs +6 -0
  222. package/dist/{chunk-IVDLMMBD.mjs → chunk-ZHEHPMBK.mjs} +1 -1
  223. package/dist/chunk-ZQS6H473.mjs +16 -0
  224. package/dist/chunk-ZTHICSSF.mjs +2 -0
  225. package/dist/chunk-ZWWC4KLF.mjs +20 -0
  226. package/dist/cli.mjs +1 -1
  227. package/dist/server.mjs +1 -1
  228. package/dist/{chunk-U6KNPJPR.mjs → update-fetch.mjs} +1 -1
  229. package/dist/worker.mjs +1 -1
  230. package/kit/board.css +95 -0
  231. package/kit/board.js +250 -0
  232. package/kit/charts.js +5 -71
  233. package/kit/code.js +17 -17
  234. package/kit/report.css +335 -18
  235. package/kit/runtime.js +1638 -125
  236. package/kit/state.js +10 -1
  237. package/kit/tables.js +130 -43
  238. package/kit/ui.js +79 -35
  239. package/package.json +2 -1
  240. package/packs/gallery/card/component.json +14 -0
  241. package/packs/gallery/card/example.html +10 -0
  242. package/packs/gallery/card/preview.svg +1 -0
  243. package/packs/gallery/card/style.css +6 -0
  244. package/packs/gallery/card/template.html +6 -0
  245. package/packs/gallery/card/writing.md +14 -0
  246. package/packs/gallery/chart-card/component.json +15 -0
  247. package/packs/gallery/chart-card/example.html +14 -0
  248. package/packs/gallery/chart-card/kit.js +130 -0
  249. package/packs/gallery/chart-card/preview.svg +1 -0
  250. package/packs/gallery/chart-card/style.css +42 -0
  251. package/packs/gallery/chart-card/template.html +13 -0
  252. package/packs/gallery/chart-card/writing.md +20 -0
  253. package/packs/gallery/chart-view/component.json +20 -0
  254. package/packs/gallery/chart-view/example.html +13 -0
  255. package/packs/gallery/chart-view/kit.js +355 -0
  256. package/packs/gallery/chart-view/preview.svg +1 -0
  257. package/packs/gallery/chart-view/style.css +94 -0
  258. package/packs/gallery/chart-view/template.html +3 -0
  259. package/packs/gallery/chart-view/writing.md +22 -0
  260. package/packs/gallery/countdown/component.json +18 -0
  261. package/packs/gallery/countdown/example.html +3 -0
  262. package/packs/gallery/countdown/kit.js +216 -0
  263. package/packs/gallery/countdown/preview.svg +1 -0
  264. package/packs/gallery/countdown/style.css +118 -0
  265. package/packs/gallery/countdown/template.html +3 -0
  266. package/packs/gallery/countdown/writing.md +22 -0
  267. package/packs/gallery/habit/component.json +14 -0
  268. package/packs/gallery/habit/example.html +3 -0
  269. package/packs/gallery/habit/kit.js +334 -0
  270. package/packs/gallery/habit/preview.svg +1 -0
  271. package/packs/gallery/habit/style.css +174 -0
  272. package/packs/gallery/habit/template.html +3 -0
  273. package/packs/gallery/habit/writing.md +21 -0
  274. package/packs/gallery/heatmap/component.json +18 -0
  275. package/packs/gallery/heatmap/example.html +3 -0
  276. package/packs/gallery/heatmap/kit.js +513 -0
  277. package/packs/gallery/heatmap/preview.svg +1 -0
  278. package/packs/gallery/heatmap/style.css +189 -0
  279. package/packs/gallery/heatmap/template.html +3 -0
  280. package/packs/gallery/heatmap/writing.md +21 -0
  281. package/packs/gallery/kanban/component.json +18 -0
  282. package/packs/gallery/kanban/example.html +12 -0
  283. package/packs/gallery/kanban/kit.js +540 -0
  284. package/packs/gallery/kanban/preview.svg +1 -0
  285. package/packs/gallery/kanban/style.css +212 -0
  286. package/packs/gallery/kanban/template.html +3 -0
  287. package/packs/gallery/kanban/writing.md +20 -0
  288. package/packs/gallery/metric/component.json +22 -0
  289. package/packs/gallery/metric/example.html +15 -0
  290. package/packs/gallery/metric/kit.js +248 -0
  291. package/packs/gallery/metric/preview.svg +1 -0
  292. package/packs/gallery/metric/style.css +92 -0
  293. package/packs/gallery/metric/template.html +3 -0
  294. package/packs/gallery/metric/writing.md +23 -0
  295. package/packs/gallery/note/component.json +14 -0
  296. package/packs/gallery/note/example.html +3 -0
  297. package/packs/gallery/note/kit.js +129 -0
  298. package/packs/gallery/note/preview.svg +1 -0
  299. package/packs/gallery/note/style.css +97 -0
  300. package/packs/gallery/note/template.html +3 -0
  301. package/packs/gallery/note/writing.md +18 -0
  302. package/packs/gallery/pack.json +8 -0
  303. package/packs/gallery/recent/component.json +13 -0
  304. package/packs/gallery/recent/example.html +1 -0
  305. package/packs/gallery/recent/kit.js +293 -0
  306. package/packs/gallery/recent/preview.svg +1 -0
  307. package/packs/gallery/recent/style.css +85 -0
  308. package/packs/gallery/recent/template.html +1 -0
  309. package/packs/gallery/recent/writing.md +15 -0
  310. package/packs/gallery/static/component.json +13 -0
  311. package/packs/gallery/static/example.html +11 -0
  312. package/packs/gallery/static/preview.svg +1 -0
  313. package/packs/gallery/static/style.css +171 -0
  314. package/packs/gallery/static/template.html +1 -0
  315. package/packs/gallery/static/writing.md +18 -0
  316. package/packs/gallery/stats/component.json +13 -0
  317. package/packs/gallery/stats/example.html +1 -0
  318. package/packs/gallery/stats/kit.js +347 -0
  319. package/packs/gallery/stats/preview.svg +1 -0
  320. package/packs/gallery/stats/style.css +73 -0
  321. package/packs/gallery/stats/template.html +1 -0
  322. package/packs/gallery/stats/writing.md +11 -0
  323. package/packs/gallery/today/component.json +12 -0
  324. package/packs/gallery/today/example.html +1 -0
  325. package/packs/gallery/today/kit.js +220 -0
  326. package/packs/gallery/today/preview.svg +1 -0
  327. package/packs/gallery/today/style.css +149 -0
  328. package/packs/gallery/today/template.html +1 -0
  329. package/packs/gallery/today/writing.md +14 -0
  330. package/packs/gallery/todos/component.json +19 -0
  331. package/packs/gallery/todos/example.html +3 -0
  332. package/packs/gallery/todos/kit.js +489 -0
  333. package/packs/gallery/todos/preview.svg +1 -0
  334. package/packs/gallery/todos/style.css +214 -0
  335. package/packs/gallery/todos/template.html +3 -0
  336. package/packs/gallery/todos/writing.md +30 -0
  337. package/packs/gallery/weather/component.json +19 -0
  338. package/packs/gallery/weather/example.html +3 -0
  339. package/packs/gallery/weather/kit.js +387 -0
  340. package/packs/gallery/weather/preview.svg +1 -0
  341. package/packs/gallery/weather/style.css +140 -0
  342. package/packs/gallery/weather/template.html +3 -0
  343. package/packs/gallery/weather/writing.md +26 -0
  344. package/packs/gallery-soft/countdown/component.json +18 -0
  345. package/packs/gallery-soft/countdown/example.html +3 -0
  346. package/packs/gallery-soft/countdown/kit.js +206 -0
  347. package/packs/gallery-soft/countdown/preview.svg +1 -0
  348. package/packs/gallery-soft/countdown/style.css +211 -0
  349. package/packs/gallery-soft/countdown/template.html +3 -0
  350. package/packs/gallery-soft/countdown/writing.md +24 -0
  351. package/packs/gallery-soft/habit/component.json +14 -0
  352. package/packs/gallery-soft/habit/example.html +3 -0
  353. package/packs/gallery-soft/habit/kit.js +366 -0
  354. package/packs/gallery-soft/habit/preview.svg +1 -0
  355. package/packs/gallery-soft/habit/style.css +251 -0
  356. package/packs/gallery-soft/habit/template.html +3 -0
  357. package/packs/gallery-soft/habit/writing.md +23 -0
  358. package/packs/gallery-soft/heatmap/component.json +18 -0
  359. package/packs/gallery-soft/heatmap/example.html +3 -0
  360. package/packs/gallery-soft/heatmap/kit.js +498 -0
  361. package/packs/gallery-soft/heatmap/preview.svg +1 -0
  362. package/packs/gallery-soft/heatmap/style.css +181 -0
  363. package/packs/gallery-soft/heatmap/template.html +3 -0
  364. package/packs/gallery-soft/heatmap/writing.md +23 -0
  365. package/packs/gallery-soft/note/component.json +14 -0
  366. package/packs/gallery-soft/note/example.html +3 -0
  367. package/packs/gallery-soft/note/kit.js +162 -0
  368. package/packs/gallery-soft/note/preview.svg +1 -0
  369. package/packs/gallery-soft/note/style.css +148 -0
  370. package/packs/gallery-soft/note/template.html +3 -0
  371. package/packs/gallery-soft/note/writing.md +20 -0
  372. package/packs/gallery-soft/pack.json +8 -0
  373. package/packs/gallery-soft/recent/component.json +13 -0
  374. package/packs/gallery-soft/recent/example.html +1 -0
  375. package/packs/gallery-soft/recent/kit.js +335 -0
  376. package/packs/gallery-soft/recent/preview.svg +1 -0
  377. package/packs/gallery-soft/recent/style.css +160 -0
  378. package/packs/gallery-soft/recent/template.html +1 -0
  379. package/packs/gallery-soft/recent/writing.md +17 -0
  380. package/packs/gallery-soft/static/component.json +13 -0
  381. package/packs/gallery-soft/static/example.html +12 -0
  382. package/packs/gallery-soft/static/preview.svg +1 -0
  383. package/packs/gallery-soft/static/style.css +186 -0
  384. package/packs/gallery-soft/static/template.html +1 -0
  385. package/packs/gallery-soft/static/writing.md +20 -0
  386. package/packs/gallery-soft/stats/component.json +13 -0
  387. package/packs/gallery-soft/stats/example.html +1 -0
  388. package/packs/gallery-soft/stats/kit.js +341 -0
  389. package/packs/gallery-soft/stats/preview.svg +1 -0
  390. package/packs/gallery-soft/stats/style.css +119 -0
  391. package/packs/gallery-soft/stats/template.html +1 -0
  392. package/packs/gallery-soft/stats/writing.md +13 -0
  393. package/packs/gallery-soft/today/component.json +12 -0
  394. package/packs/gallery-soft/today/example.html +1 -0
  395. package/packs/gallery-soft/today/kit.js +222 -0
  396. package/packs/gallery-soft/today/preview.svg +1 -0
  397. package/packs/gallery-soft/today/style.css +178 -0
  398. package/packs/gallery-soft/today/template.html +1 -0
  399. package/packs/gallery-soft/today/writing.md +16 -0
  400. package/packs/gallery-soft/todos/component.json +19 -0
  401. package/packs/gallery-soft/todos/example.html +3 -0
  402. package/packs/gallery-soft/todos/kit.js +527 -0
  403. package/packs/gallery-soft/todos/preview.svg +1 -0
  404. package/packs/gallery-soft/todos/style.css +212 -0
  405. package/packs/gallery-soft/todos/template.html +3 -0
  406. package/packs/gallery-soft/todos/writing.md +32 -0
  407. package/packs/gallery-soft/weather/component.json +19 -0
  408. package/packs/gallery-soft/weather/example.html +3 -0
  409. package/packs/gallery-soft/weather/kit.js +411 -0
  410. package/packs/gallery-soft/weather/preview.svg +1 -0
  411. package/packs/gallery-soft/weather/style.css +185 -0
  412. package/packs/gallery-soft/weather/template.html +3 -0
  413. package/packs/gallery-soft/weather/writing.md +28 -0
  414. package/release.json +12 -10
  415. package/sdk/doc-kit.d.ts +396 -5
  416. package/sdk/doc-state.d.ts +2 -0
  417. package/skill/SKILL.md +56 -23
  418. package/skill/references/block-script.md +140 -0
  419. package/skill/references/building-blocks.md +257 -0
  420. package/skill/references/extensions.md +59 -0
  421. package/skill/references/pages-and-data.md +225 -0
  422. package/skill/references/writing-html.md +8 -4
  423. package/skill/sdk/doc-kit.d.ts +396 -5
  424. package/skill/sdk/doc-state.d.ts +2 -0
  425. package/web/assets/index-BM_K-Auu.css +1 -0
  426. package/web/assets/index-DRslOBiv.js +15 -0
  427. package/web/index.html +2 -2
  428. package/dist/chunk-3HIRPVLU.mjs +0 -2
  429. package/dist/chunk-5MHMDLZD.mjs +0 -4
  430. package/dist/chunk-64K7IPLO.mjs +0 -255
  431. package/dist/chunk-6QXGZM36.mjs +0 -8
  432. package/dist/chunk-6RGJOMJP.mjs +0 -16
  433. package/dist/chunk-AJ73XJF3.mjs +0 -2
  434. package/dist/chunk-AUZGSZJH.mjs +0 -13
  435. package/dist/chunk-BFE45AKL.mjs +0 -2
  436. package/dist/chunk-BXO2ZY5P.mjs +0 -2
  437. package/dist/chunk-CEH4MRCC.mjs +0 -2
  438. package/dist/chunk-CY2FNNAB.mjs +0 -16
  439. package/dist/chunk-DFUDV4LX.mjs +0 -2
  440. package/dist/chunk-DKXG4XDG.mjs +0 -2
  441. package/dist/chunk-EZQ34M3F.mjs +0 -124
  442. package/dist/chunk-EZY3WC6Z.mjs +0 -15
  443. package/dist/chunk-FUKQNOQS.mjs +0 -9
  444. package/dist/chunk-JPOSLGOC.mjs +0 -6
  445. package/dist/chunk-JVHHHGEA.mjs +0 -3
  446. package/dist/chunk-L3QKH4OK.mjs +0 -26
  447. package/dist/chunk-LAE5NQ4B.mjs +0 -2
  448. package/dist/chunk-LEF6DRCK.mjs +0 -59
  449. package/dist/chunk-NO5NJCHO.mjs +0 -2
  450. package/dist/chunk-NQPVAU63.mjs +0 -2
  451. package/dist/chunk-NSKUTQ5J.mjs +0 -5
  452. package/dist/chunk-O35FIXRB.mjs +0 -2
  453. package/dist/chunk-P2CAZPDP.mjs +0 -3
  454. package/dist/chunk-PL6GHLGD.mjs +0 -15
  455. package/dist/chunk-QJIR2BLP.mjs +0 -6
  456. package/dist/chunk-QUPLVPB2.mjs +0 -7
  457. package/dist/chunk-R7BNENLY.mjs +0 -4
  458. package/dist/chunk-S6O4UHLC.mjs +0 -2
  459. package/dist/chunk-SGJWQKEI.mjs +0 -2
  460. package/dist/chunk-TX6JH7TR.mjs +0 -2
  461. package/dist/chunk-TYK6VNAB.mjs +0 -10
  462. package/dist/chunk-UALRNVSE.mjs +0 -4
  463. package/dist/chunk-V3HXVQEM.mjs +0 -2
  464. package/dist/chunk-V5VXUJKG.mjs +0 -2
  465. package/dist/chunk-VBXMADMP.mjs +0 -2
  466. package/dist/chunk-VNV55RUA.mjs +0 -2
  467. package/dist/chunk-VPD2PS35.mjs +0 -2
  468. package/dist/chunk-W4VKN3GF.mjs +0 -7
  469. package/dist/chunk-W5BXXPDJ.mjs +0 -3
  470. package/dist/chunk-XUNHRCOG.mjs +0 -6
  471. package/skill/references/building-components.md +0 -367
  472. package/web/assets/index-Bh74DfsV.css +0 -1
  473. package/web/assets/index-UW0RyFFt.js +0 -13
@@ -38,7 +38,6 @@ export default {
38
38
  "写作偏好": "Writing preferences",
39
39
  "复制页面内容": "Copy page content",
40
40
  "Markdown 格式": "As Markdown",
41
- "复制底稿路径": "Copy source path",
42
41
  "这份文档在电脑上的位置,可以直接告诉 Agent": "Where this document is on your computer, to tell an Agent",
43
42
  "在新标签页打开": "Open in new tab",
44
43
  "导出": "Export",
@@ -169,7 +168,6 @@ export default {
169
168
  "已导入,{0} · 把图片和 Markdown 文件一起选上(图片在别的文件夹里时,把整个文件夹压缩成 .zip)再导入,就能带上它们": "Imported; {0} · choose the pictures together with the Markdown file (pictures in another folder: zip the whole folder) and import again to bring them in",
170
169
  "这页还有修改没有保存": "This page has unsaved changes",
171
170
  "已复制页面内容": "Page content copied",
172
- "已复制底稿路径": "Source path copied",
173
171
  "没有复制:{0}": "Not copied: {0}",
174
172
  "这份文档没有标题": "This document has no title",
175
173
  "没有改成标题": "The title was not changed",
@@ -213,6 +211,10 @@ export default {
213
211
  "选中外层": "Select outer block",
214
212
  "{0}的操作": "{0} actions",
215
213
  "选项卡 {0}": "Tab {0}",
214
+ "({0}没有粘贴过来:Gallery 没有这种块)": "({0} was not pasted: Gallery has no such block)",
215
+ "语雀画板「{0}」": "The Yuque board “{0}”",
216
+ "语雀画板": "A Yuque board",
217
+ "语雀的「{0}」卡片": "A Yuque “{0}” card",
216
218
  "选中的块还没保存,保存之后再复制。": "The selected blocks aren't saved yet; copy them once they are.",
217
219
  "选中的块里有{0}:文档自己的组件不能在页面上复制,可以让 AI 复制。": "The selection holds {0}: the document's own components can't be copied on the page; ask the AI to copy it.",
218
220
  "组件": "a component",
@@ -244,7 +246,7 @@ export default {
244
246
  "你修改的这一块已被 AI 删除。": "The AI deleted a block you edited.",
245
247
  "接受删除": "Accept the deletion",
246
248
  "你修改的这一处所在的组件已被 AI 改过结构,没法确定对应的位置。": "The AI restructured the component around your edit, so its place can't be found.",
247
- "这个组件的组件包刚刚变了,这处文字不再能修改,你的修改没有写进文件。": "This component's package just changed and no longer lets this text be edited, so your edit isn't in the file.",
249
+ "这个自定义块刚刚变了,这处文字不再能修改,你的修改没有写进文件。": "This custom block just changed and no longer lets this text be edited, so your edit isn't in the file.",
248
250
  "这一处在文件里找不到唯一对应的位置,没有保存。": "This edit has no single matching place in the file, so it wasn't saved.",
249
251
  "转换类型": "Convert",
250
252
  "移动": "Move",
@@ -306,7 +308,7 @@ export default {
306
308
  "{0}:修改暂存在浏览器里,连上后自动保存。": "{0}: changes are kept in the browser and saved once it reconnects.",
307
309
  "已重新连上,修改已保存。": "Reconnected; changes saved.",
308
310
  "这个组件已经不在这个工作区里,这一块没有保存。": "This component is no longer in this workspace, so this block wasn't saved.",
309
- "template.html 要是这个组件包的一个实例,有自己的结束标签,此外什么都没有": "template.html is to be one instance of this package, with an end tag of its own, and nothing else",
311
+ "template.html 要是这个自定义块的一个实例,有自己的结束标签,此外什么都没有": "template.html is to be one instance of this block, with an end tag of its own, and nothing else",
310
312
  "template.html 里的 <{0}> 进不了新建的块:脚本、事件、样式和 Gallery 自己的标记都不写在模板里": "the <{0}> in template.html cannot go into a new block: scripts, handlers, styles and Gallery's own marks stay out of a template",
311
313
  "template.html 的 {0} 和清单写的数目不符": "template.html does not hold as many of {0} as its manifest says",
312
314
  "这里合并进了 AI 同时写的字,撤销会把它们一起撤掉:没有撤销,可以直接改。": "This merged in words the AI wrote meanwhile, and undo would take them away too, so it wasn't undone; edit it directly instead.",
@@ -335,7 +337,7 @@ export default {
335
337
  "撤销已经过期": "It is too late to undo",
336
338
  "预览服务器出错": "The preview server failed",
337
339
  "{0} 处修改和文件的最新版本冲突,没有保存:在左下方选择怎么处理。": "{0} edits conflict with the file's latest version and weren't saved: choose what to do at the bottom left.",
338
- "组件包刚刚变了,{0} 处修改没有保存:在左下方选择怎么处理。": "A component package just changed and {0} edits weren't saved: choose what to do at the bottom left.",
340
+ "自定义块刚刚变了,{0} 处修改没有保存:在左下方选择怎么处理。": "A custom block just changed and {0} edits weren't saved: choose what to do at the bottom left.",
339
341
  "{0} 处内容文档存不下,没有保存:在左下方选择怎么处理。": "{0} items can't be stored in the document and weren't saved: choose what to do at the bottom left.",
340
342
  "这一处的内容文档存不下,没有保存。": "This can't be stored in the document, so it wasn't saved.",
341
343
  "已自动合并 {0} 段 AI 同时做的修改。": "Merged {0} changes the AI made meanwhile.",
@@ -344,7 +346,6 @@ export default {
344
346
  "这次的修改太大,一次存不下": "This change is too large to save at once",
345
347
  "没有保存:{0}": "Not saved: {0}",
346
348
  "红框里的新段落所在的位置放不下段落,没有保存:请并入相邻段落,或拖到别处。": "The new paragraph in red can't stand where it is, so it wasn't saved: merge it into a neighbour or drag it elsewhere.",
347
- "文档主标题还空着:写上标题后才会保存。": "The document's title is empty: it's saved once it has one.",
348
349
  "这里还空着:写上内容后才会保存。": "This is empty: it's saved once it has something in it.",
349
350
  "已转换为{0}": "Turned into {0}",
350
351
  "{0} · Ctrl+Z 撤销": "{0} · Ctrl+Z to undo",
@@ -356,40 +357,65 @@ export default {
356
357
  "这个组件没有运行:内容只能看,可以整块移动、复制和删除。": "This component is not running: what it holds can only be read, and the block moved, copied and deleted whole.",
357
358
  "内容区": "content area",
358
359
  "组件里的文字": "A component's text",
359
- "组件@block": "Component",
360
- "组件@group": "Components",
360
+ "自定义块@block": "Custom block",
361
361
  "组件列表": "Components",
362
- "组件包": "Packages",
362
+ "自定义块": "Custom blocks",
363
363
  "内置块": "Built-in blocks",
364
364
  "正常": "Normal",
365
- "已隐藏": "Hidden",
365
+ "不在文档菜单里": "Not in the document menus",
366
366
  "已停用": "Disabled",
367
367
  "没有加载": "Not loaded",
368
- "隐藏": "Hide",
368
+ "在文档菜单里显示": "Show in document menus",
369
369
  "停用": "Disable",
370
- "隐藏{0}": "Hide {0}",
371
- "停用{0}": "Disable {0}",
370
+ "文档@place": "documents",
371
+ "自定义页": "custom pages",
372
+ "用在:{0}": "Used in: {0}",
373
+ "{0} · 要用:{1}": "{0} · Uses: {1}",
374
+ "工作区的数据": "the workspace's data",
375
+ "文档里的表格": "the document's tables",
376
+ "联网:{0}": "the network: {0}",
372
377
  "设置没有保存:{0}": "The setting wasn't saved: {0}",
373
- "这个组件包没有加载,开关不起作用": "This package isn't loaded, so its switches do nothing",
378
+ "这个自定义块没有加载,开关不起作用": "This block isn't loaded, so its switches do nothing",
374
379
  "改好 gallery.json 之后才能改这里": "Fix gallery.json to change this",
375
380
  "{0}:没有能用的模板,菜单里不会出现": "{0}: it has no template to make a block from, so no menu offers it",
376
- "不出现在菜单和给 Agent 的清单里,已有的块照常运行和导出": "Left out of the menus and of what Agents are offered. Existing blocks run and export as before",
381
+ "Gallery 有新版本 {0}。这份副本添加后改过,所以不会自动更新;要换成新版本,删掉工作区里的 components/{1} 文件夹(改动会丢掉),再运行 gallery block add {2}。": "Gallery has a newer version, {0}. This copy was changed after it was added, so it is not updated by itself; to take the new one, delete the folder components/{1} in the workspace (its changes are lost) and run gallery block add {2}.",
382
+ "出现在 “/”、在下方新建和手柄的网格里;关掉后已有的块照常运行和导出,自定义页里照样能添加": "Offered in \"/\", Add below and the handle's grid. Off, existing blocks still run and export, and custom pages can still add it",
377
383
  "不加载它的脚本和样式,已有的块只显示内容": "Its script and style aren't loaded. Existing blocks show only what they hold",
378
- "菜单里出现哪些块,这个工作区加载哪些组件包。": "Which blocks the menus offer, and which packages this workspace loads.",
379
- "菜单里出现哪些块,这个工作区加载哪些组件包": "Which blocks the menus offer, and which packages this workspace loads",
380
- "这个工作区还没有组件包:让 Agent 做一个,它会放进工作区的 components 文件夹。": "This workspace has no packages yet: ask an Agent to make one, and it goes in the workspace's components folder.",
381
- "隐藏的块不再出现在 “/”、在下方新建和手柄的网格里,已有的块照常。": "A hidden block leaves \"/\", Add below and the handle's grid. Existing blocks stay as they are.",
384
+ "文档菜单里出现哪些块,这个工作区加载哪些自定义块。": "Which blocks the document menus offer, and which custom blocks this workspace loads.",
385
+ "文档菜单里出现哪些块,这个工作区加载哪些自定义块": "Which blocks the document menus offer, and which custom blocks this workspace loads",
386
+ "块包的开关关掉后,它的块都不在 “/”和添加自定义块里;已经写在文档和页面里的块照常显示。": "With a pack's switch off, none of its blocks is offered in “/” or Add custom block; those already in documents and pages show as ever.",
387
+ "打开块包「{0}」": "Open the pack “{0}”",
388
+ "{0} 个块": "{0} blocks",
389
+ "启用块包": "Pack on",
390
+ "选择 zip 文件…": "Choose a zip file…",
391
+ "Gallery 自带": "Gallery's own",
392
+ "工作区自己写的块": "This workspace's own blocks",
393
+ "pack.json 读不出来:{0}": "pack.json can't be read: {0}",
394
+ "这个块包关着:它的块都不在 “/”和添加自定义块里;已经写在文档和页面里的块照常显示。": "This pack is off: none of its blocks is offered in “/” or Add custom block; those already in documents and pages show as ever.",
395
+ "这个块包装上后改过({0}),Gallery 的新版本 {1} 不会换上改过的部分;没改过的块照常更新。": "This pack was changed after it was installed ({0}): Gallery's new version {1} is not put over what changed; the blocks not changed are updated as ever.",
396
+ "这个块包装上后改过({0}):再装一次新版本时,改过的部分保持不变。": "This pack was changed after it was installed ({0}): installing a new version keeps what changed as it is.",
397
+ "这个块包里还没有块。": "This pack has no blocks yet.",
398
+ "已导入块包「{0}」{1}": "Imported the pack “{0}” {1}",
399
+ "块包「{0}」已更新到 {1}": "The pack “{0}” is updated to {1}",
400
+ "块包「{0}」{1} 已经装好了": "The pack “{0}” {1} is installed already",
401
+ "自定义块按块包放:每个块包右边的开关管它的块在 “/”和添加自定义块里提不提供;点一个块包看它的块。": "Custom blocks come in packs: the switch at a pack's right says whether its blocks are offered in “/” and Add custom block; click a pack to see its blocks.",
402
+ "这个工作区还没有自定义块:让 Agent 做一个,或导入一个块包,它们放在工作区的 components 文件夹里。": "This workspace has no custom blocks yet: ask an Agent to make one, or import a block pack. They live in the workspace's components folder.",
403
+ "每个块右边的开关管 “/”和添加自定义块里提不提供它,默认打开;点一行看它的说明和别的开关。": "The switch right of each block decides whether \"/\" and Add custom block offer it, on by default. Click a row for what it is and its other switches.",
404
+ "在所有菜单里提供": "Offer in every menu",
405
+ "总开关关掉后,“/”和添加自定义块里都不再提供它;已经写在文档和页面里的块照常显示。": "With the master switch off, it is no longer offered in \"/\" or Add custom block. Blocks already written into documents and pages keep showing.",
406
+ "每个块右边的开关是「在文档菜单里显示」:关掉的块不再出现在 “/”、在下方新建和手柄的网格里,已有的块照常。": "The switch right of each block is \"Show in document menus\": a block switched off leaves \"/\", Add below and the handle's grid. Existing blocks stay as they are.",
407
+ "这个块总在文档菜单里": "This block is always in the document menus",
382
408
  "读不出 component.json": "component.json cannot be read",
383
409
  "component.json 不是 JSON:{0}": "component.json is not JSON: {0}",
384
410
  "{0} 不是 UTF-8 编码:请存成 UTF-8": "{0} is not UTF-8: save it as UTF-8",
385
411
  "component.json 写的不是一个对象": "component.json holds no object",
386
- "{0} 不能做组件包的 id:范围和名字都只用小写字母、数字和连字符": "{0} can be no package's id: its scope and its name are lowercase letters, digits and dashes",
387
- "{0} 不能做组件包的 id:{1} 是 Windows 留给设备的名字": "{0} can be no package's id: {1} is a name Windows keeps for a device",
412
+ "{0} 不能做自定义块的 id:范围和名字都只用小写字母、数字和连字符": "{0} can be no custom block's id: its scope and its name are lowercase letters, digits and dashes",
413
+ "{0} 不能做自定义块的 id:{1} 是 Windows 留给设备的名字": "{0} can be no custom block's id: {1} is a name Windows keeps for a device",
388
414
  "{0} 有 {1} KB,而每一页都带着它,最多 {2} KB": "{0} is {1} KB, and every page holds it: {2} KB at most",
389
415
  "清单的 id 是 {0},和它的文件夹 {1} 不一样": "its id says {0}, and its folder is {1}",
390
416
  "缺少 {0}": "it has no {0}",
391
417
  "apiVersion 要写成一个正整数": "apiVersion is a whole number from 1",
392
- "这个组件包要 apiVersion {0},这一版 Gallery 只支持 {1}": "it needs apiVersion {0}, and this Gallery runs {1}",
418
+ "这个自定义块要 apiVersion {0},这一版 Gallery 只支持 {1}": "it needs apiVersion {0}, and this Gallery runs {1}",
393
419
  "在设置里停用了": "turned off in the settings",
394
420
  "开关的值不对": "That setting isn't valid",
395
421
  "没有这个组件": "There is no such component",
@@ -399,7 +425,7 @@ export default {
399
425
  "gallery.json 不是 Gallery 的文件": "gallery.json isn't Gallery's file",
400
426
  "gallery.json 写不进去:可能是只读的,或被别的程序占着": "gallery.json can't be written: it may be read-only, or held by another program",
401
427
  "gallery.json 刚刚被改过:再试一次": "gallery.json just changed: try again",
402
- "{0} 不是组件包能写的字段": "{0} is no field a package writes",
428
+ "{0} 不是自定义块的清单能写的字段": "{0} is no field a custom block's manifest writes",
403
429
  "{0} 要写成文字": "{0} is words",
404
430
  "{0} 要写成 { zh, en } 两种语言的文字": "{0} is words in both languages: { zh, en }",
405
431
  "{0} 要写成一张表": "{0} is a table, by name",
@@ -414,12 +440,36 @@ export default {
414
440
  "{0} 不能按文字编辑:<{1}> 不是能打字的文字": "{0} cannot be edited as text: a <{1}> is no text to type in",
415
441
  "{0} 的 {1} 是整个实例,而这里只写它生成的节点": "{0}: {1} is the whole instance, and this names only what it generates",
416
442
  "{0} 要写成一串文字": "{0} is a list of words",
417
- "{0} 是 Gallery 自己的名字,组件包不能用": "{0} is a name of Gallery's own, which no package may use",
418
- "assets 里的 {0} 既不是套件的资源,也不是包里的文件": "{0} in assets is neither a file of the kit's nor one of the package's",
419
- "assets 写了 {0},包里没有这个文件": "assets names {0}, which the package does not hold",
443
+ "{0} 是 Gallery 自己的名字,自定义块不能用": "{0} is a name of Gallery's own, which no custom block may use",
444
+ "assets 里的 {0} 既不是套件的资源,也不是块的文件夹里的文件": "{0} in assets is neither a file of the kit's nor one of the block's folder",
445
+ "assets 写了 {0},块的文件夹里没有这个文件": "assets names {0}, which the block's folder does not hold",
420
446
  "markdown 只能是 parts 或 text": "markdown is parts or text",
421
447
  "schema 要写成一个正整数": "schema is a whole number from 1",
422
- "组件包刚刚变了,这次改动没有保存,页面已按新的组件重新显示。": "This component's package just changed, so that change was not saved. The page now shows the new version.",
448
+ "places 要写成 document、page 中的一个或两个,如 [\"document\"]": "places is document, page or both, as [\"document\"]",
449
+ "places 里 {0} 写了两次": "places names {0} twice",
450
+ "card.sizes 要写成 [宽, 高] 的一串,宽 1 到 {0} 格,高 1 到 {1} 格": "card.sizes is a list of [width, height], from 1 to {0} cells wide and 1 to {1} high",
451
+ "card.sizes 里 {0} 写了两次": "card.sizes names {0} twice",
452
+ "写了 card.sizes,就不再写 card.{0}:第一种大小是默认的": "with card.sizes, write no card.{0}: the first size is the default",
453
+ "card.sizes 里 {0} 不在 card.min 到 card.max 之间": "card.sizes names {0} outside card.min to card.max",
454
+ "{0} 要写成 1 到 {1} 的整数": "{0} is a whole number from 1 to {1}",
455
+ "{0} 要写成 { w, h },单位是格": "{0} is { w, h }, in cells",
456
+ "card.min.{0} 比 card.max.{0} 大": "card.min.{0} is over card.max.{0}",
457
+ "默认的 card.{0} 是 {1},不在 card.min 到 card.max 之间({2} 到 {3})": "the default card.{0} is {1}, outside card.min to card.max ({2} to {3})",
458
+ "card.fit 只能是 fixed 或 content": "card.fit is fixed or content",
459
+ "{0} 要写成一串字段": "{0} is a list of fields",
460
+ "{0} 的 key 以小写字母开头,只用字母和数字(如 city、startDate)": "{0}: its key starts with a lowercase letter and has letters and digits alone (city, startDate)",
461
+ "settings 里 key {0} 写了两次": "settings has the key {0} twice",
462
+ "{0} 的 type 只能是 {1}": "{0}: its type is one of {1}",
463
+ "{0} 是 select,要有 options:一串文字": "{0} is a select: it has options, a list of words",
464
+ "{0} 的 options 里 {1} 写了两次": "{0}: its options name {1} twice",
465
+ "{0} 不是 select,不写 options": "{0} is no select: it has no options",
466
+ "{0} 的 default 和它的 type {1} 不符": "{0}: its default is no {1}",
467
+ "{0} 的 required 要写 true 或 false": "{0}: required is true or false",
468
+ "写了 settings,parts 里就要有一个名为 settings、edit 为 data 的部分,它是一个 <script type=\"application/json\">,存卡片设置的值": "with settings, its parts have one named settings, edited as data, a <script type=\"application/json\"> that holds the values of the card's settings",
469
+ "needs 里的 {0} 不认识:只认 workspace、tables 和 net:<域名>(小写的主机名,不带端口和路径,可以以 *. 开头)": "{0} in needs is none Gallery knows: workspace, tables and net:<host> (a lowercase host name, no port and no path, *. first for its subdomains)",
470
+ "needs 里 {0} 写了两次": "needs names {0} twice",
471
+ "places 里有 page,就不能有插槽:{0} 的 edit 是 flow,插槽放的是文档的块,自定义页上没有": "with page in its places it has no slot: {0} is edited as flow, and a slot holds a document's blocks, which a custom page has none of",
472
+ "自定义块刚刚变了,这次改动没有保存,页面已按新的块重新显示。": "A custom block just changed, so that change was not saved. The page now shows its new version.",
423
473
  "其余修改已保存;红框处的冲突还没有保存。": "Other changes are saved; the conflict marked in red isn't.",
424
474
  "其余修改已保存;红框处的内容还没有保存。": "Other changes are saved; what's marked in red isn't saved yet.",
425
475
  "其余修改已保存;红框处的内容文档存不下,没有保存。": "Other changes are saved; what's marked in red can't be stored in the document and wasn't saved.",
@@ -644,6 +694,7 @@ export default {
644
694
  "添加标题后,这里会列出它们": "Headings you add are listed here",
645
695
  "拖动以移动": "Drag to move",
646
696
  "点击打开菜单": "Click to open menu",
697
+ "窗口宽一些才能拖动": "Widen the window to drag it",
647
698
  "点击在下方添加块": "Click to add a block below",
648
699
  "{0}+点击在上方添加": "{0}+click to add a block above",
649
700
  "分区菜单": "Section menu",
@@ -733,6 +784,9 @@ export default {
733
784
  "显示全部行": "Show all rows",
734
785
  "高 {0}px": "{0}px high",
735
786
  "已调整{0}{1}:{2} · Ctrl+Z 撤销": "{0} {1}: {2} · Ctrl+Z to undo",
787
+ "{0}{1}:{2}": "{0} {1}: {2}",
788
+ "栏宽:{0}": "Column widths: {0}",
789
+ "节点宽度:{0}": "Node widths: {0}",
736
790
  "卡片": "Card",
737
791
  "代码块": "Code",
738
792
  "表格": "Table",
@@ -971,6 +1025,9 @@ export default {
971
1025
  "左对齐": "Align left",
972
1026
  "居中对齐": "Align center",
973
1027
  "右对齐": "Align right",
1028
+ "对齐与缩进": "Align and indent",
1029
+ "增加缩进": "Indent",
1030
+ "减少缩进": "Outdent",
974
1031
  "粘贴图片链接…": "Paste an image link…",
975
1032
  "嵌入图片": "Embed image",
976
1033
  "适用于网络上的任何图片。": "Works with any image on the web.",
@@ -993,6 +1050,9 @@ export default {
993
1050
  "替换图片": "Replace image",
994
1051
  "恢复原始大小": "Original size",
995
1052
  "已恢复原始大小 · Ctrl+Z 撤销": "Original size restored · Ctrl+Z to undo",
1053
+ "同步宽度到全局": "Use this width for all images",
1054
+ "页面上的图片已经都是这个宽度。": "The images on this page are all this width already.",
1055
+ "已将 {0} 张图片设为同一宽度 · Ctrl+Z 撤销": "{0} images set to the same width · Ctrl+Z to undo",
996
1056
  "上一张": "Previous",
997
1057
  "下一张": "Next",
998
1058
  "查看图片": "Image viewer",
@@ -1211,13 +1271,256 @@ export default {
1211
1271
  "偏窄": "Narrow",
1212
1272
  "偏宽": "Wide",
1213
1273
  "默认字号下一行约 {0} 个字": "About {0} characters a line at the default font size",
1274
+ "全宽": "Full width",
1275
+ "不管字体与布局里的正文宽度设成多少,页面都按全宽显示": "Shows the page at full width, whatever its text width is set to",
1276
+ "全宽开着时不起作用,关掉全宽后按这里的宽度显示": "Not used while full width is on; with it off, the page takes this width",
1214
1277
  "字体与布局没有保存:{0}": "Font and layout not saved: {0}",
1215
1278
  "写作偏好没有字体与布局": "Writing preferences have no font and layout",
1216
1279
  "字体与布局不对": "The font and layout given are not right",
1217
1280
  "这份文档的标题和说明读不出来": "This document's title and description could not be read",
1218
1281
  "应用到全部文档": "Apply to all documents",
1219
1282
  "这份文档的字体与布局用到全部文档,新建的文档也一样": "Use this document's font and layout in every document, new ones too",
1283
+ "这份文档的字体与布局用到它所在工作区的全部文档,新建的文档也一样": "Use this document's font and layout in every document of its workspace, new ones too",
1220
1284
  "已应用到全部文档": "Applied to all documents",
1221
1285
  "已应用到全部文档,替换了 {0} 篇的单独设置": "Applied to all documents; own settings replaced in {0}",
1222
1286
  "没有应用到全部文档:{0}": "Not applied to all documents: {0}",
1287
+ // 自定义页(侧栏「新建」「搜索」下面那几行、搜索、回收区)
1288
+ "自定义页": "Custom page",
1289
+ "更多页面": "More pages",
1290
+ "未命名页面": "Untitled page",
1291
+ "找不到这个页面": "This page was not found",
1292
+ "标题不能是空的,也不能超过 200 个字": "A title cannot be empty or longer than 200 characters",
1293
+ // 自定义页顶栏右上角的 ···(页的菜单)
1294
+ "这一页在电脑上的位置,可以直接告诉 Agent": "Where this page is on your computer, to tell an Agent",
1295
+ "把缺的默认卡片放回空位,别的不动": "Puts the missing default cards back in empty spots; nothing else moves",
1296
+ // 自定义页的画布(卡片的把手、⋯ 菜单、设置、添加自定义块)
1297
+ "这张卡片刚被改过,请再操作一次": "This card was just changed: please do that again",
1298
+ "没能改动这个页面": "The page could not be changed",
1299
+ "这一项待办刚被改过,没能撤销": "This to-do was just changed: it was not undone",
1300
+ "没能改动这一项待办": "The to-do could not be changed",
1301
+ "这个块只能放在文档里": "This block goes in documents only",
1302
+ "这个块已停用": "This block is turned off",
1303
+ "拖动以移动卡片,点击打开菜单": "Drag to move the card, click to open its menu",
1304
+ "现在不能添加自定义块": "A custom block cannot be added now",
1305
+ "卡片菜单": "Card menu",
1306
+ "拖动调整大小": "Drag to resize",
1307
+ "添加自定义块": "Add custom block",
1308
+ "设置…": "Settings…",
1309
+ "大小": "Size",
1310
+ "自带": "Built in",
1311
+ "没有能放在页面上的块": "No block goes on a page",
1312
+ "没有找到": "Nothing found",
1313
+ "这个块不能放在页面上": "This block cannot go on a page",
1314
+ "卡片设置": "Card settings",
1315
+ "(未选择)": "(none)",
1316
+ // 自定义块的设置:视图读哪一张表格
1317
+ "表格 {0}": "Table {0}",
1318
+ "表格 {0} · {1}": "Table {0} · {1}",
1319
+ // 首页:恢复默认卡片(侧栏里首页的菜单)和第一次打开时的说明
1320
+ "恢复默认卡片": "Restore default cards",
1321
+ "已放回默认卡片:{0}": "Default cards put back: {0}",
1322
+ "{0}已停用,没有放回": "{0} is turned off: not put back",
1323
+ "没能放回:{0}": "Could not put back: {0}",
1324
+ "默认卡片都在,没有要放回的": "All the default cards are there: nothing to put back",
1325
+ "没能恢复默认卡片": "The default cards could not be restored",
1326
+ "这一页之后又改过,在页面上按 Ctrl+Z 撤销": "This page changed since: press Ctrl+Z on the page to undo",
1327
+ "放回的卡片之后被改过或拿掉了,没有撤销": "The cards put back were changed or taken out since: nothing undone",
1328
+ "这一页的卡片可以自己摆": "This page's cards are yours to arrange",
1329
+ "拖卡片右上角的 {0} 移动它,点一下它打开菜单(大小、设置、删除),点页面右上角的 ··· 里的「添加自定义块」加一张。": "Drag {0} at a card's top right to move it, click it to open the card's menu (Size, Settings, Delete), and use Add custom block in the ··· menu at the top right of the page to add one.",
1330
+ "拖卡片右上角的 {0} 移动它,点一下它打开菜单(大小、设置、删除),点页面右上方的「添加自定义块」加一张。": "Drag {0} at a card's top right to move it, click it to open the card's menu (Size, Settings, Delete), and use Add custom block at the top right of the page to add one.",
1331
+ "想要新卡片或新页面,跟 Agent 说,比如:": "For a new card or a new page, ask your Agent, for example:",
1332
+ "用 Gallery 在「{0}」这一页加一张卡片,记我每天喝了几杯水。别动我摆好的卡片。": "Use Gallery to add a card to my page “{0}” that counts the glasses of water I drink each day. Leave the cards I placed where they are.",
1333
+ "复制": "Copy",
1334
+ "已复制": "Copied",
1335
+ "已复制这句话,发给 Agent 就行": "Copied: send it to your Agent",
1336
+ "关闭这条说明": "Close this note",
1337
+ "这一页的说明": "About this page",
1338
+ "没能记下这条说明已关闭": "Could not keep this note closed",
1339
+ // 联网:卡片上的「允许访问」和组件列表的「允许联网」打开的同意框(netConsent.ts)
1340
+ "这个块现在没有要联网的地方": "This block reaches no website now",
1341
+ "允许「{0}」联网?": "Let “{0}” go online?",
1342
+ "它要从这些网站取数据:{0}。Gallery 替它去取,只访问这些网站,不带你的登录信息;取到的数据只在 Gallery 里显示,不写进文档,导出的文件里只带最近一次取到的。随时可以在 设置 › 组件列表 里撤回。": "It fetches data from these websites: {0}. Gallery fetches it for the block, from these websites alone and without your sign-ins; what it gets is shown in Gallery and never written into a document, and an exported file holds only the last of it. Take it back at any time in Settings › Components.",
1343
+ "允许": "Allow",
1344
+ "已允许「{0}」访问 {1}": "“{0}” may now reach {1}",
1345
+ "允许联网": "Online",
1346
+ "允许它从这些网站取数据:{0}": "Lets it fetch data from these websites: {0}",
1347
+ "这个块不联网": "This block reaches no website",
1348
+ "加到这一页": "Add to this page",
1349
+ "有了新的默认卡片": "New default cards",
1350
+ "点「加到这一页」放进空位,已有的卡片不动。以后也可以在这一页的菜单中点「恢复默认卡片」。": "Add to this page puts them in the empty spots and leaves your cards as they are. Later, Restore default cards in this page's menu does it too.",
1351
+ "新的默认卡片": "New default cards",
1352
+ "没能把卡片放到这一页": "The cards could not be put on this page",
1353
+ // 侧栏头部的拖动、自定义页的 ··· 菜单和新建页面、默认块包(SidebarHead.tsx、reportMenus.tsx、board/hint.mjs、ComponentSettings.tsx)
1354
+ "还没有块。让 Agent 写一个自定义块,没有指定块包时就放在这里。": "No blocks yet. Ask an Agent for a custom block: one it puts in no pack of its own goes here.",
1355
+ "新建页面": "New page",
1356
+ "一个空白页,放在这一页下面,让 Agent 来写": "A blank page under this one, for an Agent to write",
1357
+ "重命名、新建页面等…": "Rename, new page and more…",
1358
+ "页面的操作": "Page actions",
1359
+ "用 Gallery 把「{0}」这个自定义页写出来:放上我这周的待办,和离月底还有几天。": "Use Gallery to write my custom page “{0}”: this week's to-dos, and how many days are left in the month.",
1360
+ "这一页还是空的": "This page is empty",
1361
+ "自定义页由 Agent 来写:可以是一页卡片,也可以是它为你做的任何网页。": "An Agent writes a custom page: a page of cards, or any web page it makes for you.",
1362
+ "跟 Agent 说你想在这里放什么,比如:": "Tell your Agent what you want here, for example:",
1363
+ "空白的自定义页": "A blank custom page",
1364
+ "侧栏头部的顺序不对": "The order of the sidebar's top rows is not valid",
1365
+ // 侧栏的栏和网页链接(SidebarTree.tsx、LinkForm.tsx、LinkView.tsx,服务器的 link、link-set)
1366
+ "这是 Gallery 自己的地址,请直接链接文档": "This is Gallery's own address: link the document instead",
1367
+ "这个网站不允许在别的页面里显示": "This website doesn't let other pages show it",
1368
+ "在浏览器中打开": "Open in browser",
1369
+ "修改网址": "Change address",
1370
+ "网址": "Address",
1371
+ "粘贴网址,例如 https://…": "Paste an address, like https://…",
1372
+ "名称": "Name",
1373
+ "正在读取网页标题…": "Reading the page's title…",
1374
+ "网页的标题": "The page's title",
1375
+ "添加": "Add",
1376
+ "网页链接": "Web link",
1377
+ "修改网址…": "Change address…",
1378
+ "复制网址": "Copy address",
1379
+ "新建栏": "New column",
1380
+ "把条目拖到这里": "Drag entries here",
1381
+ "在这一栏新建文档": "New document in this column",
1382
+ "栏的名字": "Column name",
1383
+ "这一栏的操作…": "Column actions…",
1384
+ "这一栏的操作": "Column actions",
1385
+ "链接的名称": "Link name",
1386
+ "改名、复制网址等…": "Rename, copy address and more…",
1387
+ "这个网站不允许在 Gallery 里显示,点开时会提供“在浏览器中打开”": "This website doesn't let Gallery show it: opening it offers Open in browser",
1388
+ "已复制网址": "Address copied",
1389
+ "未命名栏": "Untitled column",
1390
+ "找不到这个链接": "Link not found",
1391
+ "找不到要放在它后面的条目": "No entry to put it after",
1392
+ "要放在它后面的条目不在这一层": "The entry to put it after is not at this level",
1393
+ "找不到这一栏": "Column not found",
1394
+ "找不到要放到它下面的条目": "No entry to put it under",
1395
+ "这不是一个网址": "This is not a web address",
1396
+ "没有这个命令": "No such command",
1397
+ "网址不能是空的": "The address can't be empty",
1398
+ "只能链接 http 或 https 的网址": "Only http and https addresses can be linked",
1399
+ "网址太长了(最多 2048 个字符)": "The address is too long (2048 characters at most)",
1400
+ "名称不能是空的,也不能超过 200 个字": "The name can't be empty or longer than 200 characters",
1401
+ "图标只能是表情或图标页签里的图标": "The icon must be an emoji or an icon of the Icons tab",
1402
+ "正在启动它所在工作区的服务…": "Starting the server of its workspace…",
1403
+ "没能打开这份底稿:{0}": "Couldn't open this draft: {0}",
1404
+ "正在读取别的工作区…": "Reading the other workspaces…",
1405
+ "别处的底稿 · {0}": "Draft from elsewhere · {0}",
1406
+ "别处的底稿": "Draft from elsewhere",
1407
+ "改的是那篇底稿的标题": "Changes the title of that draft",
1408
+ "只改它在这里的显示位置,文件不动": "Changes only where it shows here: no file moves",
1409
+ "在文件夹中显示": "Show in folder",
1410
+ "在它的工作区里打开": "Open in its workspace",
1411
+ "「{0}」已移至它所在工作区的回收区": "“{0}” moved to the trash of its workspace",
1412
+ "副本在它所在的工作区里": "The copy is made in its workspace",
1413
+ "导入的页面在它所在的工作区里": "The imported pages are made in its workspace",
1414
+ "进它所在工作区的回收区": "Goes to the trash of its workspace",
1415
+ "从文档树移除": "Remove from the sidebar",
1416
+ "只移除这一条,不删除底稿": "Removes this entry only: the draft is not deleted",
1417
+ "找不到底稿:本机登记的两个工作区编号相同": "Draft not found: two registered workspaces share one id",
1418
+ "找不到底稿:{0}": "Draft not found: {0}",
1419
+ "找不到底稿": "Draft not found",
1420
+ "这份文档在它自己的工作区里,不在这里的侧边栏中": "This document is in its own workspace, not in this sidebar",
1421
+ "找不到它所在的工作区": "Its workspace was not found",
1422
+ "没有打开文件夹:{0}": "The folder was not opened: {0}",
1423
+ "已从文档树移除「{0}」,底稿没有删除": "Removed “{0}” from the sidebar; the draft was not deleted",
1424
+ "把这个文件夹登记成工作区?": "Register this folder as a workspace?",
1425
+ "登记并添加": "Register and add",
1426
+ "没有添加:{0} 不在任何工作区里": "Not added: {0} is in no workspace",
1427
+ "这份文档就在这个工作区里": "This document is in this workspace",
1428
+ "它已经在侧边栏里了": "It is in the sidebar already",
1429
+ "找不到这个文件或文件夹": "No such file or folder",
1430
+ "{0} 里的 gallery.json 是别的程序的,不能把它登记成工作区": "The gallery.json in {0} is another program's: it can't be registered as a workspace",
1431
+ "会把 {0} 登记成一个工作区(在里面放 gallery.json 和 .gallery/)": "{0} will be registered as a workspace (a gallery.json and a .gallery/ put in it)",
1432
+ "没能把它的工作区记进本机的登记表": "Its workspace could not be added to this machine's registry",
1433
+ "本机登记的 {0} 个工作区编号相同({1}),先用 gallery workspaces --forget 去掉其中一个": "{0} registered workspaces share one id ({1}): take one off with gallery workspaces --forget first",
1434
+ "这是当前的工作区": "This is the current workspace",
1435
+ "这个工作区不在本机的登记表里": "This workspace is not on this machine's registry",
1436
+ "本机登记的工作区里有两个用的是同一个编号,先用 gallery workspaces --forget 去掉其中一个": "Two registered workspaces share this id: take one off with gallery workspaces --forget first",
1437
+ "找不到它所在的工作区:它不在本机的登记表里": "Its workspace was not found: it is not on this machine's registry",
1438
+ "找不到它所在的工作区:{0} 不在了": "Its workspace was not found: {0} is gone",
1439
+ "找不到这个文件夹": "Folder not found",
1440
+ "它所在工作区的服务没有在运行": "The server of its workspace is not running",
1441
+ "它所在工作区的服务没有回答": "The server of its workspace did not answer",
1442
+ "没能启动它所在工作区的服务:{0}": "The server of its workspace did not start: {0}",
1443
+ "这个命令不能转给别的工作区": "This command can't be passed on to another workspace",
1444
+ "它所在工作区的服务没有给出结果": "The server of its workspace gave no answer",
1445
+ // Extension columns (src/shared/extension-sidebar.mjs, extensions.mjs, workbench/app/features/sidebar/SidebarExtension.tsx)
1446
+ "这个条目已被扩展移除": "This entry was removed by its extension",
1447
+ "条目读不出来:{0}": "Entries can't be read: {0}",
1448
+ "没有条目": "No entries",
1449
+ "在浏览器中打开、复制网址等…": "Open in browser, copy address…",
1450
+ "扩展": "Extension",
1451
+ "扩展的栏里放不了别的条目": "An extension's column holds no other entries",
1452
+ "文件超过 1MB": "The file is over 1 MB",
1453
+ "不是 JSON:{0}": "Not JSON: {0}",
1454
+ "最外层要是一个对象,有 title 和 entries": "The outermost value must be an object with title and entries",
1455
+ "title 要有,是栏的名字(100 个字以内)": "title is needed: the column's name (100 characters at most)",
1456
+ "entries 要是一个列表": "entries must be a list",
1457
+ "icon 不是表情,也不是图标页签里的图标,没有显示": "icon is no emoji nor an icon of the Icons tab, so it is not shown",
1458
+ "条目超过 {0} 层({1})": "Entries go past {0} levels ({1})",
1459
+ "条目超过 {0} 个": "More than {0} entries",
1460
+ "{0} 要是一个对象": "{0} must be an object",
1461
+ "{0} 的 id 不对(1 到 128 个字符,只能用字母、数字和 . _ : -)": "{0}'s id is wrong (1 to 128 characters: letters, digits and . _ : -)",
1462
+ "{0} 的 id「{1}」重复了(同一个文件里 id 不能重)": "{0}'s id \"{1}\" is repeated (an id is used once in a file)",
1463
+ "{0} 要有 title(名称,200 个字以内)": "{0} needs a title (its name, 200 characters at most)",
1464
+ "{0} 的 url 只能是 http 或 https 的网址": "{0}'s url must be an http or https address",
1465
+ "{0} 的 url 太长了(最多 2048 个字符)": "{0}'s url is too long (2048 characters at most)",
1466
+ "{0} 的 url 不是一个网址": "{0}'s url is not an address",
1467
+ "{0} 的 icon 不是表情,也不是图标页签里的图标,没有显示": "{0}'s icon is no emoji nor an icon of the Icons tab, so it is not shown",
1468
+ "{0} 的 children 要是一个列表": "{0}'s children must be a list",
1469
+ "没有 sidebar.json": "No sidebar.json",
1470
+ "读不出这个文件:{0}": "The file can't be read: {0}",
1471
+ "sidebar.json 不是一个文件": "sidebar.json is not a file",
1472
+ // The sidebar's columns of 2026-11-09 (one a workspace, 添加其他 Gallery 项目…, 复制本地路径).
1473
+ "添加在线网页": "Add a web page",
1474
+ "添加在线网页…": "Add a web page…",
1475
+ "添加其他 Gallery 项目": "Add another Gallery project",
1476
+ "添加其他 Gallery 项目…": "Add another Gallery project…",
1477
+ "粘贴工作区的文件夹、doc.html 或它所在的文件夹": "Paste a workspace's folder, a doc.html or its folder",
1478
+ "本机没有登记别的工作区": "No other workspace is registered on this computer",
1479
+ "复制本地路径": "Copy local path",
1480
+ "别的工作区,或其中的一篇文档:文件不动": "Another workspace, or one of its documents: no file moves",
1481
+ "从侧边栏移除": "Remove from sidebar",
1482
+ "只是不在这里显示,工作区和文件都不动": "It is only no longer shown here: the workspace and its files stay",
1483
+ "里面的条目回到「{0}」,不删除任何文件": "Its entries go back to “{0}”; no file is deleted",
1484
+ "复制本地路径、移除等…": "Copy local path, remove and more…",
1485
+ "已从侧边栏移除「{0}」,文件都没动": "Removed “{0}” from the sidebar; no file moved",
1486
+ "已从侧边栏移除「{0}」,拖进去的 {1} 项回到了「{2}」,文件都没动": "Removed “{0}” from the sidebar: the {1} entries dragged into it went back to “{2}”; no file moved",
1487
+ "已删除「{0}」栏,里面的 {1} 项回到了「{2}」": "Removed the column “{0}”: its {1} entries went back to “{2}”",
1488
+ "已复制本地路径": "Local path copied",
1489
+ "这就是当前的工作区": "This is the current workspace",
1490
+ "侧边栏最多 {0} 栏,放不下这个工作区了": "The sidebar holds {0} columns at most: there is no room for this workspace",
1491
+ "默认文档": "Default documents",
1492
+ "这不是 Gallery 的底稿或工作区,可以用「导入」把文件复制进来": "This is no Gallery draft or workspace: Import copies a file in",
1493
+ "这份底稿不在它工作区的第一层(在回收区里,或是写作偏好),不能添加": "This draft is not at the top of its workspace (it is in the trash, or the writing preferences): it can't be added",
1494
+ "这个文件夹的名字不是 Gallery 文档的写法(小写字母、数字和连字符),不能添加": "This folder's name is not a Gallery document's (lowercase letters, digits and hyphens): it can't be added",
1495
+ "这个工作区在系统的临时文件夹里,不能添加": "This workspace is in the system's temporary folder: it can't be added",
1496
+ "pack.json 的 {0} 要写成一段文字,或 { zh, en } 两种语言的文字": "pack.json's {0} is words, or { zh, en }: words in both languages",
1497
+ "pack.json 不是 JSON": "pack.json is not JSON",
1498
+ "pack.json 要写成一张表": "pack.json is to be an object",
1499
+ "{0} 不是 pack.json 能写的字段": "{0} is not a field pack.json may hold",
1500
+ "pack.json 缺少 {0}": "pack.json has no {0}",
1501
+ "pack.json 的 id 只用小写字母、数字和连字符,如 my-cards": "pack.json's id is lowercase letters, digits and hyphens, as my-cards",
1502
+ "{0} 留给工作区自己的块,块包换一个 id": "{0} is kept for the workspace's own blocks: give the pack another id",
1503
+ "pack.json 的 version 要写成 1.0.0 这样的三段数字": "pack.json's version is three numbers, as 1.0.0",
1504
+ "pack.json 的 {0} 要写成一段文字": "pack.json's {0} is words",
1505
+ "pack.json 的 homepage 要写成 http 或 https 开头的地址": "pack.json's homepage is an address that starts with http or https",
1506
+ "pack.json 的 icon 要写成一个表情或一两个字": "pack.json's icon is an emoji or a character or two",
1507
+ "块包太大:最多 {0} 个文件、{1} MB": "The pack is too large: at most {0} files and {1} MB",
1508
+ "{0} 指向块包外面,不能装": "{0} points outside the pack: not installed",
1509
+ "最上一层没有 pack.json:块包是一个文件夹,最上一层放 pack.json,每个块一个文件夹": "No pack.json at its top: a block pack is a folder with pack.json at its top and a folder for each block",
1510
+ "{0} 不是块的文件夹名:只用小写字母、数字和连字符": "{0} is no block's folder name: lowercase letters, digits and hyphens only",
1511
+ "{0}/ 里没有 component.json": "{0}/ holds no component.json",
1512
+ "{0}/component.json 不是 JSON": "{0}/component.json is not JSON",
1513
+ "{0}/component.json 的 id 要写成 {1}": "{0}/component.json's id is to be {1}",
1514
+ "{0} 是 Gallery 自带的块包用的 id:换一个 id 再装": "{0} is the id of one of Gallery's own packs: give this pack another id",
1515
+ "工作区里已经有 components/{0}:这个名字被别的块包或别人写的块用着,换一个 id,或先把那个文件夹挪走": "The workspace has components/{0} already, another pack's or blocks someone wrote: give this pack another id, or move that folder away first",
1516
+ "{0} 是 Gallery 自带的块包,不能删除:在 设置 › 组件列表 里把它关掉": "{0} is one of Gallery's own packs and can't be removed: turn it off in Settings › Components",
1517
+ "工作区里没有块包 {0}": "The workspace has no pack {0}",
1518
+ "components/{0} 不是装进来的块包,里面的块是有人在这个工作区写的:要删就自己删掉这个文件夹": "components/{0} is no pack an install put in: its blocks were written in this workspace, and are someone's; delete the folder yourself if you mean to",
1519
+ "pack.json 的 id 是 {0},它的文件夹却是 components/{1}": "pack.json's id is {0}, but its folder is components/{1}",
1520
+ "{0} 读不出来:不是完好的 zip": "{0} can't be read: not a whole zip",
1521
+ "找不到 {0}": "{0} was not found",
1522
+ "{0} 不是文件夹,也不是 zip": "{0} is neither a folder nor a zip",
1523
+ "选的文件不是 zip": "The file chosen is not a zip",
1524
+ "没有这个块包": "No such block pack",
1525
+ "粘贴块包的文件夹或 zip 的路径": "Paste the path of the pack's folder or zip",
1223
1526
  };
@@ -0,0 +1,47 @@
1
+ // JSON written back as it was laid out (references/block-script.md, "Writing back"): what a
2
+ // package's script of data holds, rewritten by a reader's gesture, changes on the lines that gesture
3
+ // means and no others. One copy for every side: the kit's context.editJSON (runtime/kernel.js) writes
4
+ // by it, and gallery block check (cli/component-look.mjs) says by it how a part not laid out so
5
+ // would be. Pure, no DOM and no Node.
6
+
7
+ // A value that stands alone on a line's end: no object, no list.
8
+ const isValue = (value) => value === null || typeof value !== "object";
9
+
10
+ /** Whether an object or a list holds values alone, or lists of values: what stands on one line (`{ "name": "价格", "weight": 3 }`, `[[1, 2], [3, 4]]`). */
11
+ export const isFlat = (value) => Object.values(value).every((each) => isValue(each) || (Array.isArray(each) && each.every(isValue)));
12
+
13
+ /**
14
+ * `value` as JSON laid out as a person writes it: what isFlat says on one line, with a space inside an
15
+ * object's braces (`{ "name": "价格", "weight": 3 }`, `[4, 3, 5]`), anything else a line for each
16
+ * entry, two spaces a level from `indent`, so that a change of one value changes its line alone.
17
+ * @param {unknown} value
18
+ * @param {string} indent
19
+ * @returns {string}
20
+ */
21
+ export function laidOut(value, indent) {
22
+ if (typeof value?.toJSON === "function") return laidOut(value.toJSON(), indent); // a Date, as JSON.stringify writes it
23
+ if (isValue(value)) return JSON.stringify(value) ?? "null";
24
+ const list = Array.isArray(value);
25
+ // An object's entry of no JSON (undefined, a function) is left out, as JSON.stringify leaves it; a
26
+ // value with toJSON (a Date) is what that gives.
27
+ const entries = Object.entries(value).map(([key, each]) => [key, typeof each?.toJSON === "function" ? each.toJSON() : each]).filter(([, each]) => list || (each !== undefined && typeof each !== "function"));
28
+ const items = entries.map(([key, each]) => `${list ? "" : `${JSON.stringify(key)}: `}${laidOut(each, `${indent} `)}`);
29
+ if (items.length === 0) return list ? "[]" : "{}";
30
+ if (isFlat(Object.fromEntries(entries))) return list ? `[${items.join(", ")}]` : `{ ${items.join(", ")} }`;
31
+ return `${list ? "[" : "{"}\n${items.map((item) => `${indent} ${item}`).join(",\n")}\n${indent}${list ? "]" : "}"}`;
32
+ }
33
+
34
+ /**
35
+ * The JSON of `value` in place of what `text` holds (a script of data's text): on one line where it
36
+ * was on one, else laid out (laidOut) from the indentation its first character stands at; the blanks
37
+ * around it kept, and `</` and `<!--`, which could end the script it stands in, escaped.
38
+ * @param {string} text
39
+ * @param {unknown} value
40
+ */
41
+ export function jsonIn(text, value) {
42
+ const start = text.length - text.trimStart().length;
43
+ const end = text.trimEnd().length;
44
+ const indent = text.slice(text.lastIndexOf("\n", start) + 1, start);
45
+ const json = text.slice(start, end).includes("\n") ? laidOut(value, indent) : JSON.stringify(value) ?? "null";
46
+ return text.slice(0, start) + json.replaceAll("</", "<\\/").replaceAll("<!--", "\\u003c!--") + text.slice(end);
47
+ }