@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,212 @@
1
+ /* 柔光风格's to-dos. Every selector starts at the instance and goes down from it, so that nothing here
2
+ reaches the rest of the page. The soft look's tokens first, light and dark (light-dark(): the page's color
3
+ scheme, which follows its theme), then the face: a faint wash of the accent from the card's top over the
4
+ soft card's fill; a head of a checked list's chip and 我的待办, how many are done at its end (fading while
5
+ the grip shows); the list the hero, grouped by document, each group's title small and muted after its
6
+ document's icon, its count at the end, each item a row: a box with no fill and a soft ring (the accent's,
7
+ a check in it, once done, the words then faint and struck), the words, the headings it stands under faint
8
+ at the end; a row under the pointer a soft gray. By the card's size (data-layout, from the script): square
9
+ (4 × 4) the list alone; tall (4 × 6) a ring of the share done and a key of the two counts over it; wide (8 ×
10
+ 4) the ring and the key down the left side, a hairline after them, the groups two to a row beside them.
11
+ Under the list a muted line of how many more are below. Nothing to list: the cards' empty face (a soft
12
+ disc of the list's picture, red where nothing could be read; all done the ring full in green). On a custom
13
+ page the face is the card's whole room, taken out over the card's padding and given the soft frame's
14
+ (data-pad: 24px on these tall cards), the board's line around it; where no card is (a document, as gallery
15
+ block check shows it) the face frames itself at a 4 × 4 card's size. */
16
+ [data-doc-component="gallery-soft/todos"] {
17
+ --soft-font: "PingFang SC", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
18
+ --soft-num: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
19
+ --soft-card: light-dark(#ffffff, #1f1f20);
20
+ --soft-card-line: light-dark(rgb(28 28 32 / 6.5%), rgb(255 255 255 / 7.5%));
21
+ --soft-card-shadow: 0 0 0 1px var(--soft-card-line), 0 1px 2px light-dark(rgb(28 28 32 / 3.5%), rgb(0 0 0 / 0%)), 0 8px 24px -14px light-dark(rgb(28 28 32 / 12%), rgb(0 0 0 / 60%));
22
+ --soft-wash: linear-gradient(180deg, light-dark(rgb(62 122 198 / 6%), rgb(126 173 226 / 7%)) 0%, transparent 52%);
23
+ --soft-text: light-dark(#37352f, #d9d9dc);
24
+ --soft-strong: light-dark(#1f1f1f, #f1f1f2);
25
+ --soft-muted: light-dark(#7a7a7f, #9d9da3);
26
+ --soft-faint: light-dark(#ababb0, #66666c);
27
+ --soft-accent: light-dark(#3e7ac6, #7eade2);
28
+ --soft-accent-soft: light-dark(#ecf3fb, rgb(126 173 226 / 14%));
29
+ --soft-accent-mid: light-dark(#afcaea, #4a6f9b);
30
+ --soft-on-accent: light-dark(#ffffff, #152436);
31
+ --soft-track: light-dark(rgb(28 28 32 / 7%), rgb(255 255 255 / 8%));
32
+ --soft-box: light-dark(rgb(28 28 32 / 28%), rgb(255 255 255 / 32%));
33
+ --soft-hover: light-dark(rgb(55 53 47 / 6%), rgb(255 255 255 / 6%));
34
+ --soft-good: light-dark(#23874f, #6fcf97);
35
+ --soft-good-mark: light-dark(#2fa463, #4cb87c);
36
+ --soft-bad: light-dark(#c9473d, #f08a80);
37
+ --soft-bad-soft: light-dark(#fcecea, rgb(240 138 128 / 14%));
38
+ --soft-grip-room: 0px;
39
+ > .gallery-soft-todos-face {
40
+ --soft-pad: 24px;
41
+ position: relative;
42
+ box-sizing: border-box;
43
+ display: grid;
44
+ grid-template-columns: minmax(0, 1fr);
45
+ grid-template-rows: 28px minmax(0, 1fr) auto auto;
46
+ grid-template-areas: "head" "list" "more" "note";
47
+ min-width: 0;
48
+ width: 304px;
49
+ max-width: 100%;
50
+ height: 304px;
51
+ padding: calc(var(--soft-pad) - var(--soft-edge, 0px));
52
+ overflow: hidden;
53
+ border-radius: 16px;
54
+ box-shadow: var(--soft-card-shadow);
55
+ background: var(--soft-wash), var(--soft-card);
56
+ color: var(--soft-text);
57
+ font: 13px/1.5 var(--soft-font);
58
+ -webkit-font-smoothing: antialiased;
59
+ }
60
+ > .gallery-soft-todos-face[data-pad="m"] { --soft-pad: 20px; }
61
+ > .gallery-soft-todos-face[data-pad="s"] { --soft-pad: 18px; }
62
+ > .gallery-soft-todos-face[data-layout="tall"] { grid-template-rows: 28px auto minmax(0, 1fr) auto auto; grid-template-areas: "head" "summary" "list" "more" "note"; }
63
+ > .gallery-soft-todos-face[data-layout="wide"] { grid-template-columns: 136px minmax(0, 1fr); grid-template-rows: 28px minmax(0, 1fr) auto auto; grid-template-areas: "head head" "summary list" ". more" ". note"; column-gap: 28px; }
64
+ /* The head: the chip, 我的待办, how many are done at its end. */
65
+ > .gallery-soft-todos-face > .gallery-soft-todos-head { grid-area: head; display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline-end: var(--soft-grip-room); }
66
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-chip { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--soft-accent-soft); color: var(--soft-accent); }
67
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-chip > svg { display: block; width: 16px; height: 16px; }
68
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; color: var(--soft-strong); }
69
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-count {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 6px;
73
+ flex: none;
74
+ margin-left: auto;
75
+ margin-inline-end: calc(-1 * var(--soft-grip-room));
76
+ font-size: 12px;
77
+ color: var(--soft-muted);
78
+ white-space: nowrap;
79
+ opacity: calc(1 - var(--gallery-grip-shown, 0));
80
+ transition: opacity .12s ease-out;
81
+ }
82
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-count > .gallery-soft-todos-done-count { font: 600 12px var(--soft-num); color: var(--soft-text); }
83
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-count > .gallery-soft-todos-of { font-family: var(--soft-num); }
84
+ > .gallery-soft-todos-face > .gallery-soft-todos-head > .gallery-soft-todos-count > .gallery-soft-todos-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
85
+ /* A ring of the share done, its percent in its middle. */
86
+ .gallery-soft-todos-ring { position: relative; display: grid; place-items: center; flex: none; }
87
+ .gallery-soft-todos-ring > svg { position: absolute; inset: 0; display: block; }
88
+ .gallery-soft-todos-ring > svg > circle { fill: none; }
89
+ .gallery-soft-todos-ring > svg > .gallery-soft-todos-track { stroke: var(--soft-track); }
90
+ .gallery-soft-todos-ring > svg > .gallery-soft-todos-arc { stroke: var(--soft-accent); stroke-linecap: round; }
91
+ .gallery-soft-todos-ring > .gallery-soft-todos-percent { position: relative; font: 700 15px/1 var(--soft-num); letter-spacing: -.01em; color: var(--soft-strong); }
92
+ .gallery-soft-todos-ring > .gallery-soft-todos-percent > .gallery-soft-todos-percent-sign { margin-left: 1px; font-size: .62em; font-weight: 600; color: var(--soft-muted); }
93
+ /* The summary: the ring and a key of the two counts (a tall card's over the list, a wide one's beside it). */
94
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary { grid-area: summary; display: none; }
95
+ > .gallery-soft-todos-face[data-state="items"][data-layout="tall"] > .gallery-soft-todos-summary { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
96
+ > .gallery-soft-todos-face[data-state="items"][data-layout="wide"] > .gallery-soft-todos-summary { display: flex; flex-direction: column; justify-content: center; gap: 18px; margin-top: 16px; padding-right: 28px; box-shadow: inset -1px 0 0 var(--soft-track); }
97
+ > .gallery-soft-todos-face[data-layout="wide"] > .gallery-soft-todos-summary .gallery-soft-todos-percent { font-size: 24px; }
98
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 18px; row-gap: 4px; margin: 0; font-size: 12.5px; }
99
+ > .gallery-soft-todos-face[data-layout="wide"] > .gallery-soft-todos-summary > .gallery-soft-todos-key { grid-template-columns: 1fr auto; row-gap: 8px; }
100
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key > .gallery-soft-todos-key-row { display: contents; }
101
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key > .gallery-soft-todos-key-row > .gallery-soft-todos-key-name { display: flex; align-items: center; gap: 7px; color: var(--soft-muted); white-space: nowrap; }
102
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key > .gallery-soft-todos-key-row > .gallery-soft-todos-key-name > .gallery-soft-todos-key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--soft-accent); }
103
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key > .gallery-soft-todos-key-row[data-kind="left"] > .gallery-soft-todos-key-name > .gallery-soft-todos-key-dot { background: var(--soft-track); box-shadow: inset 0 0 0 1.5px var(--soft-accent-mid); }
104
+ > .gallery-soft-todos-face > .gallery-soft-todos-summary > .gallery-soft-todos-key > .gallery-soft-todos-key-row > .gallery-soft-todos-key-count { margin: 0; font: 600 13px var(--soft-num); color: var(--soft-strong); text-align: right; }
105
+ /* The list: its groups, a row an item. */
106
+ > .gallery-soft-todos-face > .gallery-soft-todos-list {
107
+ grid-area: list;
108
+ position: relative;
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: 12px;
112
+ min-height: 0;
113
+ margin-top: 14px;
114
+ overflow-x: hidden;
115
+ overflow-y: auto;
116
+ scrollbar-width: none;
117
+ }
118
+ > .gallery-soft-todos-face[data-layout="tall"] > .gallery-soft-todos-list { margin-top: 20px; }
119
+ > .gallery-soft-todos-face[data-layout="wide"] > .gallery-soft-todos-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; row-gap: 12px; align-content: start; margin-top: 16px; }
120
+ > .gallery-soft-todos-face:not([data-state="items"]) > :is(.gallery-soft-todos-list, .gallery-soft-todos-more) { display: none; }
121
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group { min-width: 0; }
122
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head { display: flex; align-items: center; gap: 6px; height: 20px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--soft-muted); }
123
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-icon { display: grid; place-items: center; flex: none; width: 16px; height: 16px; font-size: 12px; line-height: 1; }
124
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-icon > :is(svg, img) { display: block; width: 14px; height: 14px; object-fit: cover; border-radius: 3px; }
125
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-plain { color: var(--soft-faint); }
126
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-glyph::before { content: ""; width: 14px; height: 14px; background: var(--soft-muted); -webkit-mask: var(--gallery-soft-todos-icon) center / contain no-repeat; mask: var(--gallery-soft-todos-icon) center / contain no-repeat; }
127
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-doc {
128
+ min-width: 0;
129
+ margin: 0;
130
+ padding: 0;
131
+ border: 0;
132
+ background: none;
133
+ font: inherit;
134
+ color: inherit;
135
+ overflow: hidden;
136
+ white-space: nowrap;
137
+ text-overflow: ellipsis;
138
+ cursor: pointer;
139
+ }
140
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-doc:is(:hover, :focus-visible) { outline: none; color: var(--soft-text); }
141
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-group-head > .gallery-soft-todos-group-count { flex: none; margin-left: auto; font: 500 11.5px var(--soft-num); color: var(--soft-faint); }
142
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items { margin: 0; padding: 0; list-style: none; }
143
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item {
144
+ display: flex;
145
+ align-items: center;
146
+ gap: 10px;
147
+ height: 28px;
148
+ min-width: 0;
149
+ margin: 0 -6px;
150
+ padding: 0 6px;
151
+ border-radius: 6px;
152
+ }
153
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item:hover { background: var(--soft-hover); }
154
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > :is(.gallery-soft-todos-check, .gallery-soft-todos-todo) {
155
+ margin: 0;
156
+ padding: 0;
157
+ border: 0;
158
+ background: none;
159
+ font: inherit;
160
+ color: inherit;
161
+ cursor: pointer;
162
+ }
163
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-check { display: grid; place-items: center; flex: none; border-radius: 5px; }
164
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-check:focus-visible { outline: 2px solid var(--soft-accent-soft); outline-offset: 1px; }
165
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item .gallery-soft-todos-box {
166
+ display: grid;
167
+ place-items: center;
168
+ flex: none;
169
+ width: 16px;
170
+ height: 16px;
171
+ border-radius: 5px;
172
+ box-shadow: inset 0 0 0 1.5px var(--soft-box);
173
+ color: transparent;
174
+ }
175
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item .gallery-soft-todos-box > svg { display: block; width: 11px; height: 11px; }
176
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-done .gallery-soft-todos-box { background: var(--soft-accent); box-shadow: none; color: var(--soft-on-accent); }
177
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-todo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 100%; text-align: left; }
178
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-todo:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--soft-faint); }
179
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-todo > .gallery-soft-todos-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; color: var(--soft-text); }
180
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-done > .gallery-soft-todos-todo > .gallery-soft-todos-text { color: var(--soft-faint); text-decoration: line-through; text-decoration-color: var(--soft-faint); }
181
+ > .gallery-soft-todos-face > .gallery-soft-todos-list > .gallery-soft-todos-group > .gallery-soft-todos-items > .gallery-soft-todos-item > .gallery-soft-todos-todo > .gallery-soft-todos-path { flex: none; margin-left: auto; padding-left: 8px; max-width: 50%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; color: var(--soft-faint); }
182
+ /* How many more are below. */
183
+ > .gallery-soft-todos-face > .gallery-soft-todos-more { grid-area: more; display: flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: 12px; color: var(--soft-muted); }
184
+ > .gallery-soft-todos-face > .gallery-soft-todos-more[hidden] { display: none; }
185
+ > .gallery-soft-todos-face > .gallery-soft-todos-more > .gallery-soft-todos-arrow { display: block; width: 13px; height: 13px; }
186
+ > .gallery-soft-todos-face > .gallery-soft-todos-more > .gallery-soft-todos-arrow > svg { display: block; width: 100%; height: 100%; }
187
+ > .gallery-soft-todos-face > .gallery-soft-todos-note { grid-area: note; margin: 6px 0 0; font-size: 12px; color: var(--soft-bad); }
188
+ > .gallery-soft-todos-face > .gallery-soft-todos-note[hidden] { display: none; }
189
+ /* Nothing to list: the cards' empty face, over the list's room and the summary's. */
190
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty { display: none; }
191
+ > .gallery-soft-todos-face:not([data-state="items"]) > .gallery-soft-todos-empty { grid-column: 1 / -1; grid-row: 2 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; text-align: center; }
192
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-disc { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 50%; background: var(--soft-track); color: var(--soft-muted); }
193
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-disc > svg { display: block; width: 20px; height: 20px; }
194
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-bad { background: var(--soft-bad-soft); color: var(--soft-bad); }
195
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-full { margin-bottom: 12px; }
196
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-full > svg > .gallery-soft-todos-arc { stroke: var(--soft-good-mark); }
197
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-full > .gallery-soft-todos-percent { font-size: 20px; color: var(--soft-good); }
198
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-line { margin: 0; font-size: 13px; color: var(--soft-text); }
199
+ > .gallery-soft-todos-face > .gallery-soft-todos-empty > .gallery-soft-todos-how { margin: 0; font-size: 12px; color: var(--soft-muted); }
200
+ }
201
+ /* On a custom page: the face over the card's whole room, its padding the soft frame's, the board's line around it; the head's end kept clear of the grip's corner. */
202
+ .gallery-card > [data-doc-component="gallery-soft/todos"] { height: 100%; }
203
+ .gallery-card > [data-doc-component="gallery-soft/todos"] > .gallery-soft-todos-face {
204
+ --soft-edge: 1px;
205
+ --soft-grip-room: max(0px, calc(40px - var(--soft-pad)));
206
+ width: auto;
207
+ max-width: none;
208
+ height: calc(100% + 2 * var(--gallery-card-pad));
209
+ margin: calc(-1 * var(--gallery-card-pad));
210
+ border-radius: calc(var(--gallery-card-radius) - 1px);
211
+ box-shadow: none;
212
+ }
@@ -0,0 +1,3 @@
1
+ <div data-doc-component="gallery-soft/todos">
2
+ <script type="application/json">{}</script>
3
+ </div>
@@ -0,0 +1,32 @@
1
+ # 我的待办 (gallery-soft/todos)
2
+
3
+ A card for a custom page (its places are `page`, its needs `workspace`): the to-dos of every document of the workspace that are not done yet, an item of a to-do list each (`<ul class="doc-todo">`), grouped by document, the one edited last first, each with the headings it stands under. Use it on the home page, or on a page about the user's work.
4
+
5
+ It is 柔光风格's (the pack `gallery-soft`, off until the user turns it on in 设置 › 组件列表): the same card as Gallery 风格's `gallery/todos`, its settings, its data and what the user does on it the same, in the soft look of design A (a faint wash of blue from the card's top, rounded chips, big numbers). Write it only where the user asked for 柔光风格 or the page already holds its cards.
6
+
7
+ ## Settings
8
+
9
+ Its two settings are the card's form, which the user opens from the grip at the card's top right › 设置…:
10
+
11
+ | Key | Label | Type | What it is |
12
+ | --- | --- | --- | --- |
13
+ | `document` | 只看这篇文档 | document | a document's slug: its to-dos alone; left out, every document's |
14
+ | `done` | 也显示已完成的 | switch | the done ones too, checked and struck through |
15
+
16
+ They are kept in its data part `settings`, a `<script type="application/json">`: `{}` (template.html, what a menu adds) shows the open to-dos of every document. Write `document` when the user asks for one document's to-dos. The block reads them and writes nothing.
17
+
18
+ ## How to write it
19
+
20
+ 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 gallery-soft/todos`, the instance as template.html has it. Sizes: 4 × 4 (the default), 4 × 6 and 8 × 4; the list shows whole rows and scrolls inside the card, a muted line under it saying how many more.
21
+
22
+ ## What the user does
23
+
24
+ - clicks an item's box: the item is checked (or cleared) in its document, which Gallery writes as the user's own edit; the home page's undo (Ctrl+Z) checks it back. An item checked on the card stays there, struck through, until the page is shown again. Where the item changed meanwhile (its words), the card says so and reads again;
25
+ - clicks an item's words: its document opens, at the item where it has a block id;
26
+ - clicks a document's title: the document opens.
27
+
28
+ The card follows by itself: a to-do added, checked or taken out in any document shows at once.
29
+
30
+ ## How it looks
31
+
32
+ 我的待办 beside a checked list's chip on the top line, how many are done of all at its end (a small ring and 18 / 27; 共 27 项 on a tall card; 9 项没做完 · 4 篇文档 on a wide one); the list under it, grouped by document, each group's title small and muted after its document's icon, its count at the end, each to-do a row: a box with a soft ring (the accent's, with a check, once done), its words, the headings it stands under faint at the end; a 4 × 6 card shows over the list a ring of the share done and a key of the two counts, an 8 × 4 card the ring and the key down its left side and the groups two to a row; under the list 还有 4 项 where more are below; all done, the ring full in green over 待办都完成了; in 柔光风格's soft look (as every card of it: a faint wash of blue from the card's top, a head of a rounded tinted chip and a title, its end clear of the card's grip), light and dark. The script runs with the rights of the page's own scripts, as any block's does.
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "gallery-soft/weather",
3
+ "apiVersion": 1,
4
+ "version": "1.0.0",
5
+ "name": { "zh": "天气", "en": "Weather" },
6
+ "description": { "zh": "一个城市现在的天气和接下来几天的预报,天空画成小图,数据来自 Open-Meteo,要先允许联网", "en": "A city's weather now and for the days ahead, its sky drawn in color, from Open-Meteo, once the reader lets it online" },
7
+ "words": "tianqi qiwen yubao weather forecast temperature 天气 气温 预报 温度 下雨",
8
+ "parts": {
9
+ "settings": { "at": ":scope > script", "edit": "data" }
10
+ },
11
+ "runtime": { "generated": [":scope > .gallery-soft-weather-face"] },
12
+ "places": ["page"],
13
+ "card": { "sizes": [[4, 2], [2, 2], [4, 4]], "resize": true, "consent": { "zh": "允许联网之后显示天气", "en": "Allow internet access to show the weather" } },
14
+ "settings": [
15
+ { "key": "city", "label": { "zh": "城市", "en": "City" }, "type": "text", "default": "", "required": true },
16
+ { "key": "unit", "label": { "zh": "单位", "en": "Unit" }, "type": "select", "options": ["℃", "℉"], "default": "℃" }
17
+ ],
18
+ "needs": ["net:api.open-meteo.com", "net:geocoding-api.open-meteo.com"]
19
+ }
@@ -0,0 +1,3 @@
1
+ <div data-doc-component="gallery-soft/weather">
2
+ <script type="application/json">{"city":"上海","unit":"℃"}</script>
3
+ </div>