@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
@@ -0,0 +1,85 @@
1
+ /* Every selector starts at the instance and goes down a step at a time (>), so that nothing here
2
+ reaches the rest of the page. The pack's design B, in the kit's card tokens: the head (the chip, a
3
+ clock, 最近编辑 and how many were edited today, faint), its end clear of the card's grip; rows like the
4
+ sidebar's (30px, out to the face's edges by 6px so that a row's hover fill has room), each its icon, its
5
+ title and its time at its end, faint; the groups' titles (今天, 昨天, 本周, 更早) small, faint and 600; and
6
+ under them how many more there are, faint. A short card (data-layout "short") lists three, no groups.
7
+ No document: the cards' empty face in the middle. A document's icon as the sidebar draws it (a picture,
8
+ a glyph masked in the faint color, or a page drawn here). Light and dark. */
9
+ [data-doc-component="gallery/recent"] {
10
+ font-family: var(--gallery-font);
11
+ font-size: 13px;
12
+ line-height: 1.5;
13
+ color: var(--gallery-text);
14
+ > .gallery-recent-face { display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; }
15
+ > .gallery-recent-face > .gallery-recent-head {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 8px;
19
+ flex: none;
20
+ height: 20px;
21
+ min-width: 0;
22
+ padding-inline-end: var(--gallery-grip-room, 0px);
23
+ }
24
+ > .gallery-recent-face > .gallery-recent-head > .gallery-recent-chip {
25
+ flex: none;
26
+ display: grid;
27
+ place-items: center;
28
+ width: var(--gallery-chip-size);
29
+ height: var(--gallery-chip-size);
30
+ border-radius: var(--gallery-chip-radius);
31
+ background: var(--gallery-fill);
32
+ color: var(--gallery-muted);
33
+ }
34
+ > .gallery-recent-face > .gallery-recent-head > .gallery-recent-chip > svg { display: block; width: var(--gallery-chip-icon); height: var(--gallery-chip-icon); }
35
+ > .gallery-recent-face > .gallery-recent-head > .gallery-recent-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--gallery-title-size); line-height: var(--gallery-title-line); font-weight: 600; color: var(--gallery-text); }
36
+ > .gallery-recent-face > .gallery-recent-head > .gallery-recent-meta { flex: none; font-size: var(--gallery-meta-size); color: var(--gallery-faint); white-space: nowrap; }
37
+ > .gallery-recent-face > .gallery-recent-list { flex: 1 1 auto; min-height: 0; margin: 6px -6px 0; padding: 0; overflow: hidden; list-style: none; }
38
+ > .gallery-recent-face[data-layout="short"] > .gallery-recent-list { margin-top: 4px; }
39
+ > .gallery-recent-face > .gallery-recent-list[hidden] { display: none; }
40
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-group { padding: 8px 6px 2px; font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--gallery-faint); }
41
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 8px;
45
+ box-sizing: border-box;
46
+ width: 100%;
47
+ height: 30px;
48
+ padding: 0 6px;
49
+ border: 0;
50
+ border-radius: 6px;
51
+ background: none;
52
+ font: inherit;
53
+ color: inherit;
54
+ text-align: start;
55
+ cursor: pointer;
56
+ }
57
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document:hover { background: var(--gallery-hover); }
58
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document:focus-visible { outline: 2px solid var(--gallery-accent-wash); outline-offset: -2px; }
59
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-icon { flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
60
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-picture > img { display: block; width: 15px; height: 15px; object-fit: contain; }
61
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-glyph::before { content: ""; width: 15px; height: 15px; background: var(--gallery-faint); -webkit-mask: var(--gallery-recent-icon) center / contain no-repeat; mask: var(--gallery-recent-icon) center / contain no-repeat; }
62
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-icon:empty::before {
63
+ content: "";
64
+ width: 15px;
65
+ height: 15px;
66
+ background: var(--gallery-faint);
67
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h6.5L18 8v11a1.5 1.5 0 0 1-1.5 1.5h-9.5A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5z'/%3E%3Cpath d='M13.5 3.5V8H18'/%3E%3C/svg%3E") center / contain no-repeat;
68
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h6.5L18 8v11a1.5 1.5 0 0 1-1.5 1.5h-9.5A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5z'/%3E%3Cpath d='M13.5 3.5V8H18'/%3E%3C/svg%3E") center / contain no-repeat;
69
+ }
70
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--gallery-text); }
71
+ > .gallery-recent-face > .gallery-recent-list > .gallery-recent-item > .gallery-recent-document > .gallery-recent-when { flex: none; font-size: 12px; color: var(--gallery-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
72
+ > .gallery-recent-face > .gallery-recent-more { flex: none; margin: 0; padding-top: 6px; font-size: 12px; line-height: 18px; color: var(--gallery-faint); }
73
+ > .gallery-recent-face > .gallery-recent-more[hidden] { display: none; }
74
+ /* No document, or no workspace: the cards' empty face in the middle. */
75
+ > .gallery-recent-face > .gallery-recent-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; text-align: center; }
76
+ > .gallery-recent-face > .gallery-recent-empty[hidden] { display: none; }
77
+ > .gallery-recent-face > .gallery-recent-empty > p { margin: 0; }
78
+ > .gallery-recent-face > .gallery-recent-empty > .gallery-recent-empty-picture { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 6px; border-radius: 8px; background: var(--gallery-fill); color: var(--gallery-faint); }
79
+ > .gallery-recent-face > .gallery-recent-empty > .gallery-recent-empty-picture > svg { width: 16px; height: 16px; }
80
+ > .gallery-recent-face > .gallery-recent-empty > .gallery-recent-line { font-size: 13.5px; line-height: 20px; font-weight: 600; color: var(--gallery-text); }
81
+ > .gallery-recent-face > .gallery-recent-empty > .gallery-recent-hint { font-size: 12px; line-height: 18px; color: var(--gallery-faint); }
82
+ }
83
+ /* On a custom page the face fills the card the board frames. */
84
+ .gallery-card > [data-doc-component="gallery/recent"] { height: 100%; }
85
+ .gallery-card > [data-doc-component="gallery/recent"] > .gallery-recent-face { height: 100%; }
@@ -0,0 +1 @@
1
+ <div data-doc-component="gallery/recent"></div>
@@ -0,0 +1,15 @@
1
+ # 最近编辑 (gallery/recent)
2
+
3
+ A card for a custom page (its places are `page`, its needs `workspace`): the documents of the workspace edited last, the last first, each with its page icon, its title and when it was edited (刚刚, 5 分钟前, 昨天, 11月2日). Use it on the home page, for the user to go back to what they were working on.
4
+
5
+ ## How to write it
6
+
7
+ Put it on a custom page as a card of its board, `<section class="gallery-card" data-card-id="…" data-x data-y data-w data-h>`, holding one instance, after `gallery block add recent`: the instance is empty, `<div data-doc-component="gallery/recent"></div>`, everything on it drawn by its script. It has no settings and holds no data: there is nothing to fill in and nothing it writes. Sizes: 4 × 4 (the default), 4 × 2 (the last three, no groups) and 4 × 6 are the ones its menu lists; it is 4 wide and any height from 2 to 8 cells. As many whole rows as the card holds, and how many more there are under them.
8
+
9
+ ## What the user does
10
+
11
+ Clicks a document: it opens. The list follows by itself: a document written, renamed or given another icon, made or taken away shows at once, and the times move on each minute.
12
+
13
+ ## How it looks
14
+
15
+ In Gallery 风格's look (the kit's card tokens, light and dark): a head of a small gray chip and a title, its end clear of the card's grip; one hero; the rest small and gray; the accent on the data and on today alone. Its head is a clock's chip, 最近编辑 and how many were edited today; then rows like the sidebar's, grouped as 今天, 昨天, 本周 and 更早, each the document's icon, its title and its time at its end (12 分钟前, then the hour; yesterday's hour; this week's weekday, 周二; earlier ones the date). A row under the pointer takes the hover's gray. No document yet: it says so in the middle.
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gallery/static",
3
+ "apiVersion": 1,
4
+ "version": "2.0.0",
5
+ "name": { "zh": "静态卡片", "en": "Static card" },
6
+ "description": { "zh": "放一段任意的 HTML,只展示,不能在页面上改", "en": "Any HTML, shown as it is: nothing on it changes in the page" },
7
+ "words": "jingtaikapian jingtai kapian static html card 静态 卡片 展示 内容",
8
+ "parts": {
9
+ "content": { "at": ":scope > div", "edit": "none" }
10
+ },
11
+ "places": ["page"],
12
+ "card": { "sizes": [[4, 4], [4, 2], [8, 2], [2, 2], [4, 1], [2, 1]], "min": { "w": 1, "h": 1 }, "max": { "w": 12, "h": 24 }, "resize": true }
13
+ }
@@ -0,0 +1,11 @@
1
+ <div data-doc-component="gallery/static">
2
+ <div>
3
+ <h3>这周的重点</h3>
4
+ <ul>
5
+ <li>周三前定下发布日期</li>
6
+ <li>和设计一起过一遍首页</li>
7
+ <li>读完《深度工作》第三章</li>
8
+ </ul>
9
+ <p><a href="https://example.com/plan">完整的计划</a> · <small>11 月 7 日更新</small></p>
10
+ </div>
11
+ </div>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120"><rect width="240" height="120" rx="8" fill="#f3f3f1"/><rect x="60.5" y="6.5" width="119" height="107" rx="8" fill="#ffffff" stroke="#e6e6e3"/><rect x="70" y="14" width="10" height="10" rx="3" fill="#efefed"/><rect x="84" y="16.5" width="30" height="5" rx="2.5" fill="#37352f"/><circle cx="72" cy="36" r="1.5" fill="#a6a5a1"/><rect x="77" y="34" width="52" height="4.5" rx="2.25" fill="#37352f"/><circle cx="72" cy="46" r="1.5" fill="#a6a5a1"/><rect x="77" y="44" width="40" height="4.5" rx="2.25" fill="#37352f"/><circle cx="72" cy="56" r="1.5" fill="#a6a5a1"/><rect x="77" y="54" width="46" height="4.5" rx="2.25" fill="#37352f"/><rect x="70" y="66" width="14" height="3.5" rx="1.75" fill="#a6a5a1"/><rect x="70" y="76" width="6" height="6" rx="3" fill="#d4d3cf"/><rect x="80" y="77" width="48" height="4.5" rx="2.25" fill="#4084cf"/><rect x="70" y="87" width="6" height="6" rx="3" fill="#d4d3cf"/><rect x="80" y="88" width="54" height="4.5" rx="2.25" fill="#4084cf"/><rect x="148" y="88.5" width="22" height="3.5" rx="1.75" fill="#d4d3cf"/><rect x="70" y="98" width="6" height="6" rx="3" fill="#d4d3cf"/><rect x="80" y="99" width="40" height="4.5" rx="2.25" fill="#4084cf"/></svg>
@@ -0,0 +1,171 @@
1
+ /* The static card has no script: what its content holds, any HTML, is what a reader sees. It gives that
2
+ HTML a light reading look (the pack's design B): 13px words on 20px lines; the heading it starts with,
3
+ where more follows it, the cards' head row (a small chip of lines before it, 13px and 600, 8px over what
4
+ follows); a list's items after a small dot; a small heading (h4 to h6) a faint 11.5px label over what it
5
+ names; a paragraph of strong words alone right after the heading it starts with at the card's foot, with
6
+ what follows it; a paragraph holding one link a row of 28px, a small picture before the link (a page for one of the
7
+ workspace's, a link's for the web) and its <small> (a domain, a date) at its end; a table compact, its
8
+ heads faint, its rows a hairline apart; a heading alone (a card that names a group of cards) 15px, its
9
+ <small> beside it; a link alone (a tile) 600 after an arrow; content of one line on a card one cell high
10
+ in the middle of it. Each of those rules is written in an @scope of the instance with :where(), so that
11
+ it weighs nothing: the page's own <style> and an inline style always win over it. It sets no color of
12
+ its own but the links' (the accent's ink): its words are the color they stand in, inherited (the page's
13
+ text, which follows the theme, or a color the page gives the card or a wrapper of the content), and what
14
+ is muted (small words, a label, a quote, a dot, an empty card's words) or drawn as a line is a share of
15
+ that color (color-mix with currentColor: 65% muted, 12% a line), so that light words on a dark fill a page
16
+ writes stay light in every heading and line. Its first line keeps its end clear of the card's grip, and
17
+ only its first: a float as wide and as high as the grip's corner (--gallery-grip-room) stands at the top
18
+ right of the instance on a card, before its content, so that the words of the first line or two go round
19
+ it; its text wraps so that no line is left with a word or a character alone (text-wrap: pretty). Every
20
+ selector stands in the instance: nothing here reaches the rest of the page. A card with nothing in its
21
+ content (a new one, from a menu) says so, in the page's language, until an Agent writes it: the cards'
22
+ empty face, a short line over a muted one saying what to do. */
23
+ [data-doc-component="gallery/static"] > div {
24
+ font-family: var(--gallery-font);
25
+ font-size: 13px;
26
+ line-height: 20px;
27
+ overflow-wrap: break-word;
28
+ text-wrap: pretty;
29
+ }
30
+ /* The grip's corner, on a card: a float the content's first lines go round. */
31
+ .gallery-card > [data-doc-component="gallery/static"]::before {
32
+ content: "";
33
+ float: inline-end;
34
+ width: var(--gallery-grip-room, 0px);
35
+ height: var(--gallery-grip-room, 0px);
36
+ }
37
+ @scope ([data-doc-component="gallery/static"]) {
38
+ :where(h1, h2, h3) { margin: 12px 0 6px; font-size: 15px; line-height: 22px; font-weight: 600; }
39
+ :where(h4, h5, h6) { margin: 14px 0 4px; font-size: 11.5px; line-height: 16px; font-weight: 600; color: color-mix(in srgb, currentColor 65%, transparent); }
40
+ :where(p, ul, ol, dl, blockquote, table, figure, pre) { margin: 0 0 8px; }
41
+ :where(ul) { display: flex; flex-direction: column; gap: 5px; padding: 0; list-style: none; }
42
+ :where(ul) > :where(li) { position: relative; padding-inline-start: 14px; }
43
+ :where(ul) > :where(li)::before { content: ""; position: absolute; top: 8px; inset-inline-start: 3px; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, currentColor 45%, transparent); }
44
+ :where(ol) { padding-inline-start: 1.5em; }
45
+ :where(a) { color: var(--gallery-accent-ink); text-decoration: none; }
46
+ :where(a:hover) { text-decoration: underline; }
47
+ :where(img, svg, video) { max-width: 100%; }
48
+ :where(img, video) { height: auto; }
49
+ :where(table) { width: 100%; border-collapse: collapse; font-size: 12.5px; }
50
+ :where(th, td) { padding: 5px 8px 5px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); line-height: 18px; text-align: start; vertical-align: top; white-space: nowrap; }
51
+ :where(th) { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, currentColor 65%, transparent); }
52
+ :where(tr:last-child) > :where(td) { border-bottom-style: none; }
53
+ :where(hr) { margin: 12px 0; border: 0; border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
54
+ :where(code) { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, currentColor 6%, transparent); font-family: var(--doc-mono); font-size: .9em; }
55
+ /* A quote's line is a share of its own muted color: 18% of 65%, about the 12% of the other lines. */
56
+ :where(blockquote) { padding-inline-start: 12px; border-inline-start: 3px solid color-mix(in srgb, currentColor 18%, transparent); color: color-mix(in srgb, currentColor 65%, transparent); }
57
+ :where(small) { font-size: 11.5px; color: color-mix(in srgb, currentColor 65%, transparent); }
58
+ :scope > div > :where(:first-child) { margin-top: 0; }
59
+ :scope > div > :where(:last-child) { margin-bottom: 0; }
60
+ /* A paragraph of one link (and a small word after it): a row, a small picture before the link, the small word at its end. */
61
+ :where(p:has(> a:only-of-type)):where(:not(:has(> :not(a, small)))) { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 0 -6px; padding: 0 6px; border-radius: 6px; }
62
+ :where(p:has(> a:only-of-type)):where(:not(:has(> :not(a, small)))) > :where(a) { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
63
+ :where(p:has(> a:only-of-type)):where(:not(:has(> :not(a, small)))) > :where(a)::before {
64
+ content: "";
65
+ display: inline-block;
66
+ width: 14px;
67
+ height: 14px;
68
+ margin-inline-end: 8px;
69
+ vertical-align: -2px;
70
+ background: color-mix(in srgb, var(--gallery-text, currentColor) 45%, transparent);
71
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h6.5L18 8v11a1.5 1.5 0 0 1-1.5 1.5h-9.5A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5z'/%3E%3Cpath d='M13.5 3.5V8H18'/%3E%3C/svg%3E") center / contain no-repeat;
72
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h6.5L18 8v11a1.5 1.5 0 0 1-1.5 1.5h-9.5A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5z'/%3E%3Cpath d='M13.5 3.5V8H18'/%3E%3C/svg%3E") center / contain no-repeat;
73
+ }
74
+ :where(p:has(> a:only-of-type)):where(:not(:has(> :not(a, small)))) > :where(a[href^="http"])::before {
75
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 13.5a3.5 3.5 0 0 0 5 0l3-3a3.5 3.5 0 0 0-5-5l-1 1M13.5 10.5a3.5 3.5 0 0 0-5 0l-3 3a3.5 3.5 0 0 0 5 5l1-1'/%3E%3C/svg%3E");
76
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 13.5a3.5 3.5 0 0 0 5 0l3-3a3.5 3.5 0 0 0-5-5l-1 1M13.5 10.5a3.5 3.5 0 0 0-5 0l-3 3a3.5 3.5 0 0 0 5 5l1-1'/%3E%3C/svg%3E");
77
+ }
78
+ :where(p:has(> a:only-of-type)):where(:not(:has(> :not(a, small)))) > :where(small) { flex: none; }
79
+ /* A paragraph of strong words alone: a line larger, 15px. */
80
+ :where(p:has(> strong:only-child)):where(:not(:has(> :not(strong)))) { font-size: 15px; line-height: 22px; }
81
+ /* The heading it starts with, where more follows: the cards' head row, a chip before it. */
82
+ :scope > div > :where(h1, h2, h3, h4, h5, h6):where(:first-child:not(:last-child)) {
83
+ position: relative;
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 8px;
87
+ min-height: var(--gallery-chip-size);
88
+ margin: 0 0 8px;
89
+ font-size: var(--gallery-title-size);
90
+ line-height: var(--gallery-title-line);
91
+ font-weight: 600;
92
+ color: inherit;
93
+ }
94
+ :scope > div > :where(h1, h2, h3, h4, h5, h6):where(:first-child:not(:last-child))::before {
95
+ content: "";
96
+ flex: none;
97
+ width: var(--gallery-chip-size);
98
+ height: var(--gallery-chip-size);
99
+ border-radius: var(--gallery-chip-radius);
100
+ background: color-mix(in srgb, currentColor 6%, transparent);
101
+ }
102
+ :scope > div > :where(h1, h2, h3, h4, h5, h6):where(:first-child:not(:last-child))::after {
103
+ content: "";
104
+ position: absolute;
105
+ top: 50%;
106
+ left: calc((var(--gallery-chip-size) - var(--gallery-chip-icon)) / 2);
107
+ width: var(--gallery-chip-icon);
108
+ height: var(--gallery-chip-icon);
109
+ margin-top: calc(var(--gallery-chip-icon) / -2);
110
+ background: color-mix(in srgb, currentColor 60%, transparent);
111
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5h14M5 12h14M5 17.5h9'/%3E%3C/svg%3E") center / contain no-repeat;
112
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5h14M5 12h14M5 17.5h9'/%3E%3C/svg%3E") center / contain no-repeat;
113
+ }
114
+ /* A heading alone (a card naming a group of cards): 15px, its small words beside it. */
115
+ :scope > div > :where(h1, h2, h3, h4, h5, h6):where(:only-child) { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: inherit; }
116
+ :scope > div > :where(h1, h2, h3, h4, h5, h6):where(:only-child) > :where(small) { font-size: 12px; font-weight: 400; }
117
+ /* A link alone (a tile): 600, after an arrow, in the words' color. */
118
+ :scope > div > :where(p:only-child:has(> a:only-child)) > :where(a) { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: inherit; }
119
+ :scope > div > :where(p:only-child:has(> a:only-child)) > :where(a)::before {
120
+ content: "";
121
+ width: 15px;
122
+ height: 15px;
123
+ margin: 0;
124
+ background: color-mix(in srgb, currentColor 45%, transparent);
125
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 16 16 8M9.5 8H16v6.5'/%3E%3C/svg%3E") center / contain no-repeat;
126
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 16 16 8M9.5 8H16v6.5'/%3E%3C/svg%3E") center / contain no-repeat;
127
+ }
128
+ }
129
+ /* A card whose heading is followed by a paragraph of strong words alone (还差 2 项, a number, a word to keep in
130
+ mind): the content as high as the card, a column, and that paragraph and what follows it at the card's foot,
131
+ as a small widget's figure (margin-top: auto). In a column no float goes round, so the grip's corner is
132
+ the heading's to keep clear (padding at its end), one line as it is. One rule for every size. */
133
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div > :is(h1, h2, h3, h4, h5, h6):first-child + p > strong:only-child) { height: 100%; }
134
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div > :is(h1, h2, h3, h4, h5, h6):first-child + p > strong:only-child)::before { display: none; }
135
+ .gallery-card > [data-doc-component="gallery/static"] > div:has(> :is(h1, h2, h3, h4, h5, h6):first-child + p > strong:only-child) { display: flex; flex-direction: column; box-sizing: border-box; min-height: 100%; }
136
+ .gallery-card > [data-doc-component="gallery/static"] > div:has(> :is(h1, h2, h3, h4, h5, h6):first-child + p > strong:only-child) > :is(h1, h2, h3, h4, h5, h6):first-child { padding-inline-end: var(--gallery-grip-room, 0px); }
137
+ .gallery-card > [data-doc-component="gallery/static"] > div > :is(h1, h2, h3, h4, h5, h6):first-child + p:has(> strong:only-child) { margin-top: auto; }
138
+ .gallery-card > [data-doc-component="gallery/static"] > div > :is(h1, h2, h3, h4, h5, h6):first-child + p:has(> strong:only-child) + p { margin-top: -2px; }
139
+ /* Content of one line on a card: in the middle of its height. */
140
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div > :only-child:is(h1, h2, h3, h4, h5, h6, p)) { display: flex; flex-direction: column; justify-content: center; height: 100%; }
141
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div > :only-child:is(h1, h2, h3, h4, h5, h6, p))::before { display: none; }
142
+ /* Nothing in it: the cards' empty face, a short line over what to do, muted (the content's ::before and
143
+ ::after), each line whole, at the left of the card's middle. */
144
+ [data-doc-component="gallery/static"]:has(> div:empty) {
145
+ display: flex;
146
+ flex-direction: column;
147
+ justify-content: center;
148
+ box-sizing: border-box;
149
+ }
150
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div:empty) { height: 100%; }
151
+ .gallery-card > [data-doc-component="gallery/static"]:has(> div:empty)::before { display: none; }
152
+ [data-doc-component="gallery/static"] > div:empty {
153
+ display: flex;
154
+ flex-direction: column;
155
+ align-items: flex-start;
156
+ gap: 4px;
157
+ box-sizing: border-box;
158
+ font-size: 12px;
159
+ line-height: 18px;
160
+ }
161
+ [data-doc-component="gallery/static"] > div:empty::before { content: "还没有内容"; font-size: 13.5px; line-height: 20px; font-weight: 600; }
162
+ [data-doc-component="gallery/static"] > div:empty::after {
163
+ content: "跟 Agent 说要在这里放什么";
164
+ color: color-mix(in srgb, currentColor 55%, transparent);
165
+ }
166
+ :root[data-ge-language="en"] [data-doc-component="gallery/static"] > div:empty::before,
167
+ :root:not([data-ge-language])[lang|="en" i] [data-doc-component="gallery/static"] > div:empty::before { content: "Nothing here yet"; }
168
+ :root[data-ge-language="en"] [data-doc-component="gallery/static"] > div:empty::after,
169
+ :root:not([data-ge-language])[lang|="en" i] [data-doc-component="gallery/static"] > div:empty::after {
170
+ content: "Tell your Agent what this card should show";
171
+ }
@@ -0,0 +1 @@
1
+ <div data-doc-component="gallery/static"><div></div></div>
@@ -0,0 +1,18 @@
1
+ # 静态卡片 (gallery/static)
2
+
3
+ A card that shows any HTML you write, as it is: nothing on it changes in the page, and it has no script. Use it on a custom page for whatever only shows (a heading for a group of cards, links the user opens often, a short list, a picture, a table of a few rows); make a block of your own only where the card needs behavior or data that changes. Its places are `page` alone: a document already has a block for everything that only shows, and you write its HTML as it is there (writing-html.md), so no document's menu offers it.
4
+
5
+ ## How to write it
6
+
7
+ Put it on a custom page as a card of its board, `<section class="gallery-card" data-card-id="…" data-x data-y data-w data-h>`, holding one instance, after `gallery block add static`, and write the HTML in the instance's one `<div>`, as example.html does:
8
+
9
+ - the content, the `div` right inside the instance (its part `content`, edited as `none`): any HTML, headings, paragraphs, lists, links, a table, a picture. No `<script>`, no form fields, no `on…` attributes: the card only shows.
10
+ - a picture: a file of the page's `assets/` (`pages/<slug>/assets/`), written `assets/<file>` (a name of letters, digits, dots, dashes and underscores, right in that folder), which the server serves at `/pages/<slug>/assets/<file>`: put the file there first (`gallery page check` says a picture whose file is not there), and never `cover.png` alone, which nothing serves. A small SVG or PNG may be a `data:` address in the `<img>` itself.
11
+ - the look: the card gives it a light one (Gallery 风格's: 13px words on 20px lines) that weighs nothing, so that a page's own `<style>` or a `style` attribute changes any of it: a heading the content starts with, where more follows it, is drawn as the cards' head row (13px, 600, a small chip of lines before it), so that the card sits among Gallery's own; a list's items stand after small dots; a small heading (`<h4>`) is a faint label over what follows (常用); a paragraph of one link is a row with a small picture before it (a page for one of the workspace's, a link's for the web) and its `<small>` at its end, for a domain or a date: `<p><a href="https://www.npmjs.com/…">npm · @heycys/gallery</a><small>npmjs.com</small></p>`; a paragraph of `<strong>` words alone is a line larger (15px), and right after the heading the content starts with it stands at the card's foot with what follows it, a small widget's figure (`<h3>发布前</h3><p><strong>还差 2 项</strong></p><p><small>门禁 · 盲测</small></p>`); a table is compact, its heads faint, its rows a hairline apart; a heading alone (a card that names a group of cards, `<h2>工作 <small>项目和待办</small></h2>`) is 15px with its small words beside it, and a link alone is a tile (600, after an arrow); content of one line stands in the middle of a card one cell high. Links are in the accent's ink. It sets no other color: its words are the color they stand in, the page's text or the color your page gives the card (`.gallery-card[data-card-id="…"] { background: …; color: … }`) or a wrapper of the content (`style="color: …"`), every heading in it too, and its small words, labels, dots, quotes and lines a share of that color. Write colors of your own for both themes (`:root[data-doc-effective-theme="dark"]` on a custom page), a link's too where its fill is dark.
12
+ - Size: any whole number of cells, 1 to 12 wide and 1 to 24 high, 4 × 4 by default (2 × 1 for one link, 4 × 1 for a heading of a group, 4 × 2 for a few links, 8 × 2 for a short table): write `data-w` and `data-h` to fit what you wrote (`gallery page add static --w <w> --h <h>` does too). The user changes it by dragging the card's lower right corner, or from the 大小 menu of the grip at the card's top right, which lists the common sizes. The card does not grow with what it holds: what does not fit scrolls inside it, so give it the height it needs.
13
+
14
+ An empty one (`<div></div>`, what a menu adds) says that it has nothing yet (还没有内容, 跟 Agent 说要在这里放什么), so that the user asks you for it.
15
+
16
+ ## How it looks
17
+
18
+ What you wrote, in the board's card frame on a page. The user changes it only by asking you: to change it, write the HTML in `page.html` again, that card alone, its `data-card-id` and place kept.
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "gallery/stats",
3
+ "apiVersion": 1,
4
+ "version": "2.0.0",
5
+ "name": { "zh": "工作区统计", "en": "Workspace numbers" },
6
+ "description": { "zh": "文档数、总字数、待办完成了几项、本周编辑了几次,各配一张小图", "en": "How many documents, words in all, to-dos done and edits this week, each over a small chart" },
7
+ "words": "gongzuoqutongji tongji shuzi stats statistics numbers count words 统计 工作区 字数 文档数 待办",
8
+ "parts": {},
9
+ "runtime": { "generated": [":scope > .gallery-stats-face"] },
10
+ "places": ["page"],
11
+ "card": { "sizes": [[8, 2], [12, 2], [4, 4]], "resize": true },
12
+ "needs": ["workspace"]
13
+ }
@@ -0,0 +1 @@
1
+ <div data-doc-component="gallery/stats"></div>