@heycys/gallery 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) 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/embed/page.mjs +1 -1
  5. package/browser/editor/components/file/page.mjs +4 -4
  6. package/browser/editor/components/heading/index.mjs +7 -6
  7. package/browser/editor/components/icon/page.mjs +6 -4
  8. package/browser/editor/components/icons.mjs +5 -2
  9. package/browser/editor/components/image/index.mjs +2 -0
  10. package/browser/editor/components/image/page.mjs +172 -90
  11. package/browser/editor/components/installed/index.mjs +6 -2
  12. package/browser/editor/components/installed/page.mjs +80 -13
  13. package/browser/editor/components/media/icons.mjs +13 -8
  14. package/browser/editor/components/media/page.mjs +5 -3
  15. package/browser/editor/components/media/toolbar.mjs +12 -3
  16. package/browser/editor/components/paragraph/index.mjs +4 -3
  17. package/browser/editor/components/registry.mjs +17 -5
  18. package/browser/editor/components/table/index.mjs +4 -2
  19. package/browser/editor/page/after/index.mjs +288 -0
  20. package/browser/editor/page/align.mjs +91 -0
  21. package/browser/editor/page/beside.mjs +5 -6
  22. package/browser/editor/page/block-menu/index.mjs +6 -3
  23. package/browser/editor/page/blocks.mjs +3 -1
  24. package/browser/editor/page/board/hint.mjs +64 -27
  25. package/browser/editor/page/board/index.mjs +160 -71
  26. package/browser/editor/page/board/motion.mjs +177 -0
  27. package/browser/editor/page/board/settings.mjs +4 -3
  28. package/browser/editor/page/clipboard/import/read.mjs +20 -2
  29. package/browser/editor/page/clipboard/index.mjs +10 -3
  30. package/browser/editor/page/clipboard/own/blocks.mjs +3 -4
  31. package/browser/editor/page/clipboard/own/describe.mjs +6 -2
  32. package/browser/editor/page/commit.mjs +2 -2
  33. package/browser/editor/page/core.mjs +3 -1
  34. package/browser/editor/page/custom-page.mjs +15 -11
  35. package/browser/editor/page/editor.mjs +31 -14
  36. package/browser/editor/page/history.mjs +19 -4
  37. package/browser/editor/page/insert/index.mjs +20 -22
  38. package/browser/editor/page/menu.mjs +15 -7
  39. package/browser/editor/page/page-objects.mjs +3 -7
  40. package/browser/editor/page/present-links.mjs +5 -4
  41. package/browser/editor/page/present-shell.mjs +63 -0
  42. package/browser/editor/page/selection/index.mjs +10 -2
  43. package/browser/editor/page/table/binding.mjs +87 -0
  44. package/browser/editor/page/table/icons.mjs +0 -2
  45. package/browser/editor/page/table/index.mjs +10 -14
  46. package/browser/editor/page/table/views.mjs +5 -52
  47. package/browser/editor/page/table/widths.mjs +82 -10
  48. package/browser/editor/page/typing/index.mjs +44 -12
  49. package/browser/editor/page/typing/leave.mjs +19 -5
  50. package/browser/shared/block-packs.mjs +23 -8
  51. package/browser/shared/component-catalog.mjs +15 -8
  52. package/browser/shared/component-source.mjs +3 -1
  53. package/browser/shared/components/heading.mjs +2 -1
  54. package/browser/shared/components/installed.mjs +1 -1
  55. package/browser/shared/components/page.mjs +2 -0
  56. package/browser/shared/components/paragraph.mjs +8 -1
  57. package/browser/shared/components/table.mjs +1 -0
  58. package/browser/shared/document-copy.mjs +43 -0
  59. package/browser/shared/drafts.mjs +10 -3
  60. package/browser/shared/emoji/icon-value.mjs +2 -2
  61. package/browser/shared/emoji/line-icons.mjs +37 -0
  62. package/browser/shared/extensions.mjs +83 -7
  63. package/browser/shared/http.mjs +9 -0
  64. package/browser/shared/i18n/en.mjs +50 -17
  65. package/browser/shared/outline-shape.mjs +6 -0
  66. package/browser/shared/outline.mjs +165 -12
  67. package/browser/shared/pack-manifest.mjs +12 -1
  68. package/browser/shared/pages.mjs +169 -57
  69. package/browser/shared/pinyin.mjs +92 -0
  70. package/browser/shared/present-step.mjs +17 -0
  71. package/browser/shared/sidebar-head.mjs +70 -0
  72. package/browser/shared/web-links.mjs +5 -0
  73. package/browser/shared/workspace-columns.mjs +11 -7
  74. package/dist/{chunk-N7AZZLGT.mjs → chunk-2GKGEVMR.mjs} +29 -24
  75. package/dist/chunk-2OHANJ6Q.mjs +2 -0
  76. package/dist/{chunk-HYMEEXKN.mjs → chunk-2RKIHJI2.mjs} +1 -1
  77. package/dist/{chunk-742D2WWJ.mjs → chunk-36FIRJIF.mjs} +2 -2
  78. package/dist/{chunk-BPL64HGA.mjs → chunk-3A5I2GJK.mjs} +1 -1
  79. package/dist/{chunk-RFDZXFJF.mjs → chunk-3OFXMN6N.mjs} +1 -1
  80. package/dist/chunk-46ACXOU5.mjs +2 -0
  81. package/dist/{chunk-PUOQ65NC.mjs → chunk-4AMTKWDO.mjs} +1 -1
  82. package/dist/{chunk-VTKNEYT3.mjs → chunk-4DNHHJSL.mjs} +1 -1
  83. package/dist/chunk-5DPABPBI.mjs +2 -0
  84. package/dist/chunk-5IIH335D.mjs +3 -0
  85. package/dist/chunk-5L26JUYA.mjs +2 -0
  86. package/dist/{chunk-3NJACR4W.mjs → chunk-5MEXZ2UF.mjs} +1 -1
  87. package/dist/{chunk-ZHEHPMBK.mjs → chunk-6MPKCH3P.mjs} +1 -1
  88. package/dist/{chunk-C564NU2H.mjs → chunk-74RPP2M2.mjs} +1 -1
  89. package/dist/chunk-7M2BQQGZ.mjs +2 -0
  90. package/dist/{chunk-VXACTLO3.mjs → chunk-7M7UPWU6.mjs} +1 -1
  91. package/dist/{chunk-ZB4H7ZN4.mjs → chunk-7N2LPG33.mjs} +1 -1
  92. package/dist/{chunk-UBBRTJ2R.mjs → chunk-7XDYK3UC.mjs} +1 -1
  93. package/dist/chunk-AEMVZYZQ.mjs +166 -0
  94. package/dist/{chunk-POQSE4C2.mjs → chunk-AFGUR7SY.mjs} +1 -1
  95. package/dist/{chunk-QKXMPUXC.mjs → chunk-AMDGVDNV.mjs} +1 -1
  96. package/dist/{chunk-KTKHRC6H.mjs → chunk-ASAXY2DJ.mjs} +1 -1
  97. package/dist/{chunk-NVRNLK25.mjs → chunk-BYSF5UMM.mjs} +2 -2
  98. package/dist/{chunk-U3SSPL4K.mjs → chunk-CCSGFCLZ.mjs} +1 -1
  99. package/dist/{chunk-NWFBE2YA.mjs → chunk-CG3UHDKH.mjs} +1 -1
  100. package/dist/chunk-CPS4SRPF.mjs +5 -0
  101. package/dist/{chunk-B4P2CM2J.mjs → chunk-CZ5KJSGK.mjs} +1 -1
  102. package/dist/chunk-DAMVDXR3.mjs +2 -0
  103. package/dist/{chunk-NG375ILQ.mjs → chunk-DH6GMDNN.mjs} +1 -1
  104. package/dist/chunk-DHB7UZ7F.mjs +3 -0
  105. package/dist/{chunk-MHW7ZKOU.mjs → chunk-DKR7LFIY.mjs} +1 -1
  106. package/dist/chunk-DLFZJJEE.mjs +2 -0
  107. package/dist/{chunk-6EZ7FNIK.mjs → chunk-F4ZA6JRZ.mjs} +1 -1
  108. package/dist/{chunk-6VTU6KEO.mjs → chunk-FCK6NXON.mjs} +1 -1
  109. package/dist/{chunk-ZWPMCK7P.mjs → chunk-FX42XU6J.mjs} +1 -1
  110. package/dist/chunk-FXQBADMN.mjs +5 -0
  111. package/dist/{chunk-W3BGBJQW.mjs → chunk-G4YP7GVC.mjs} +1 -1
  112. package/dist/{chunk-V6XZ4VIR.mjs → chunk-GWOYMENX.mjs} +1 -1
  113. package/dist/chunk-HATA2W7X.mjs +2 -0
  114. package/dist/{chunk-YI43RG4P.mjs → chunk-HBAUKKQH.mjs} +1 -1
  115. package/dist/{chunk-MAFIGVXY.mjs → chunk-HM4E43VM.mjs} +1 -1
  116. package/dist/{chunk-CRJEG7MT.mjs → chunk-JI6T3A4Y.mjs} +1 -1
  117. package/dist/{chunk-NFMCP2HI.mjs → chunk-JJNRIFND.mjs} +2 -2
  118. package/dist/chunk-JL6R4FG4.mjs +4 -0
  119. package/dist/{chunk-UMHUSOPJ.mjs → chunk-JXLSHVJ2.mjs} +1 -1
  120. package/dist/{chunk-FJYN7RTH.mjs → chunk-KFZBYDIS.mjs} +1 -1
  121. package/dist/{chunk-ZTHICSSF.mjs → chunk-KH24LWAT.mjs} +1 -1
  122. package/dist/{chunk-RKPWLGZ3.mjs → chunk-KUILYI7H.mjs} +1 -1
  123. package/dist/{chunk-RMECZA2K.mjs → chunk-L7W624FD.mjs} +1 -1
  124. package/dist/chunk-LE44MD3O.mjs +4 -0
  125. package/dist/{chunk-4K5KC6V2.mjs → chunk-LV24RY2E.mjs} +1 -1
  126. package/dist/{chunk-43B75J5T.mjs → chunk-MKTX5PGV.mjs} +1 -1
  127. package/dist/{chunk-LKX55H76.mjs → chunk-NAGMRVW4.mjs} +1 -1
  128. package/dist/{chunk-D4CKRD3V.mjs → chunk-NFABH3QW.mjs} +2 -2
  129. package/dist/{chunk-PVER7LSC.mjs → chunk-NIW7F7LU.mjs} +2 -2
  130. package/dist/{chunk-PAREWQGB.mjs → chunk-NWRZXELO.mjs} +1 -1
  131. package/dist/{chunk-OJKMINIU.mjs → chunk-OU3S466R.mjs} +15 -15
  132. package/dist/{chunk-5ZJA7CXT.mjs → chunk-PAFSFVYB.mjs} +1 -1
  133. package/dist/chunk-QCEATQC4.mjs +2 -0
  134. package/dist/{chunk-Y34NR5JL.mjs → chunk-QJ3TFJLQ.mjs} +1 -1
  135. package/dist/{chunk-IA4PSIMD.mjs → chunk-QK3VISCA.mjs} +1 -1
  136. package/dist/{chunk-ZUNVAXLH.mjs → chunk-QXVNUASA.mjs} +1 -1
  137. package/dist/{chunk-GRAXKKG4.mjs → chunk-QZ35UAB4.mjs} +1 -1
  138. package/dist/{chunk-UGWYKHBL.mjs → chunk-S2Y7VI4H.mjs} +2 -2
  139. package/dist/{chunk-OW5NWPOJ.mjs → chunk-SAHS56QM.mjs} +1 -1
  140. package/dist/{chunk-QOUEFUCH.mjs → chunk-SOD23RGL.mjs} +1 -1
  141. package/dist/chunk-TDWJKOLN.mjs +2 -0
  142. package/dist/{chunk-V6RIYQZZ.mjs → chunk-TOE6DPLH.mjs} +1 -1
  143. package/dist/chunk-UGO5N3EI.mjs +15 -0
  144. package/dist/{chunk-Q47PLKIJ.mjs → chunk-UGWMMEJ5.mjs} +1 -1
  145. package/dist/{chunk-NWR2LT5B.mjs → chunk-V5JRSGZF.mjs} +1 -1
  146. package/dist/{chunk-BZ5RAF7L.mjs → chunk-VA3KAQZD.mjs} +1 -1
  147. package/dist/chunk-VG5JEIUQ.mjs +12 -0
  148. package/dist/{chunk-UNOYVIYR.mjs → chunk-VGTMLQWZ.mjs} +1 -1
  149. package/dist/chunk-VKSRM7EY.mjs +22 -0
  150. package/dist/{chunk-YQGT4AB2.mjs → chunk-VNUWREXU.mjs} +1 -1
  151. package/dist/{chunk-AGDILNWB.mjs → chunk-VPVOAJ7X.mjs} +1 -1
  152. package/dist/{chunk-HLYV7RIH.mjs → chunk-WCWYNFDF.mjs} +1 -1
  153. package/dist/chunk-WTEGUPFG.mjs +16 -0
  154. package/dist/{chunk-N76HWBA3.mjs → chunk-XKOHV4H6.mjs} +1 -1
  155. package/dist/{chunk-HMYTM3GT.mjs → chunk-XMKHCUI6.mjs} +1 -1
  156. package/dist/{chunk-OUUP3WKT.mjs → chunk-XQRUG4G3.mjs} +1 -1
  157. package/dist/{chunk-32ZUEFZ7.mjs → chunk-YBB5LWZK.mjs} +1 -1
  158. package/dist/{chunk-SX4LJYT6.mjs → chunk-YFJU3O7G.mjs} +1 -1
  159. package/dist/chunk-YPPJVDQI.mjs +2 -0
  160. package/dist/chunk-ZANMKAWS.mjs +2 -0
  161. package/dist/{chunk-6QBHU4DF.mjs → chunk-ZCP7BTOZ.mjs} +1 -1
  162. package/dist/{chunk-ERLAIBOA.mjs → chunk-ZEY2RLBT.mjs} +2 -2
  163. package/dist/{chunk-SQ6Y2ZMA.mjs → chunk-ZO7SFB2E.mjs} +2 -2
  164. package/dist/cli.mjs +1 -1
  165. package/dist/server.mjs +1 -1
  166. package/dist/worker.mjs +1 -1
  167. package/kit/board.css +5 -5
  168. package/kit/code.js +15 -15
  169. package/kit/math.js +1 -1
  170. package/kit/report.css +123 -44
  171. package/kit/runtime.js +45 -7
  172. package/kit/tables.js +2 -0
  173. package/kit/ui.js +2 -0
  174. package/package.json +1 -1
  175. package/packs/gallery/chart-view/kit.js +3 -3
  176. package/packs/gallery/chart-view/writing.md +1 -1
  177. package/packs/gallery/countdown/component.json +1 -1
  178. package/packs/gallery/countdown/kit.js +89 -29
  179. package/packs/gallery/countdown/preview.svg +1 -1
  180. package/packs/gallery/countdown/style.css +88 -100
  181. package/packs/gallery/countdown/writing.md +2 -2
  182. package/packs/gallery/habit/component.json +3 -3
  183. package/packs/gallery/habit/kit.js +114 -75
  184. package/packs/gallery/habit/preview.svg +1 -1
  185. package/packs/gallery/habit/style.css +133 -205
  186. package/packs/gallery/habit/writing.md +2 -2
  187. package/packs/gallery/heatmap/component.json +2 -2
  188. package/packs/gallery/heatmap/kit.js +335 -173
  189. package/packs/gallery/heatmap/preview.svg +1 -1
  190. package/packs/gallery/heatmap/style.css +158 -170
  191. package/packs/gallery/heatmap/writing.md +2 -2
  192. package/packs/gallery/kanban/kit.js +3 -3
  193. package/packs/gallery/kanban/writing.md +1 -1
  194. package/packs/gallery/metric/kit.js +3 -3
  195. package/packs/gallery/metric/writing.md +1 -1
  196. package/packs/gallery/note/component.json +3 -3
  197. package/packs/gallery/note/kit.js +40 -13
  198. package/packs/gallery/note/preview.svg +1 -1
  199. package/packs/gallery/note/style.css +51 -30
  200. package/packs/gallery/note/writing.md +2 -2
  201. package/packs/gallery/recent/component.json +2 -2
  202. package/packs/gallery/recent/kit.js +141 -86
  203. package/packs/gallery/recent/preview.svg +1 -1
  204. package/packs/gallery/recent/style.css +53 -126
  205. package/packs/gallery/recent/writing.md +2 -2
  206. package/packs/gallery/static/component.json +2 -2
  207. package/packs/gallery/static/preview.svg +1 -1
  208. package/packs/gallery/static/style.css +99 -66
  209. package/packs/gallery/static/writing.md +2 -2
  210. package/packs/gallery/stats/component.json +3 -3
  211. package/packs/gallery/stats/kit.js +253 -72
  212. package/packs/gallery/stats/preview.svg +1 -1
  213. package/packs/gallery/stats/style.css +64 -142
  214. package/packs/gallery/stats/writing.md +2 -2
  215. package/packs/gallery/today/component.json +2 -2
  216. package/packs/gallery/today/kit.js +62 -27
  217. package/packs/gallery/today/preview.svg +1 -1
  218. package/packs/gallery/today/style.css +101 -72
  219. package/packs/gallery/today/writing.md +2 -2
  220. package/packs/gallery/todos/component.json +1 -1
  221. package/packs/gallery/todos/kit.js +218 -71
  222. package/packs/gallery/todos/preview.svg +1 -1
  223. package/packs/gallery/todos/style.css +170 -223
  224. package/packs/gallery/todos/writing.md +1 -1
  225. package/packs/gallery/weather/component.json +2 -2
  226. package/packs/gallery/weather/kit.js +165 -90
  227. package/packs/gallery/weather/preview.svg +1 -1
  228. package/packs/gallery/weather/style.css +100 -218
  229. package/packs/gallery/weather/writing.md +1 -1
  230. package/packs/gallery-soft/countdown/component.json +18 -0
  231. package/packs/gallery-soft/countdown/example.html +3 -0
  232. package/packs/gallery-soft/countdown/kit.js +206 -0
  233. package/packs/gallery-soft/countdown/preview.svg +1 -0
  234. package/packs/gallery-soft/countdown/style.css +211 -0
  235. package/packs/gallery-soft/countdown/template.html +3 -0
  236. package/packs/gallery-soft/countdown/writing.md +24 -0
  237. package/packs/gallery-soft/habit/component.json +14 -0
  238. package/packs/gallery-soft/habit/example.html +3 -0
  239. package/packs/gallery-soft/habit/kit.js +366 -0
  240. package/packs/gallery-soft/habit/preview.svg +1 -0
  241. package/packs/gallery-soft/habit/style.css +251 -0
  242. package/packs/gallery-soft/habit/template.html +3 -0
  243. package/packs/gallery-soft/habit/writing.md +23 -0
  244. package/packs/gallery-soft/heatmap/component.json +18 -0
  245. package/packs/gallery-soft/heatmap/example.html +3 -0
  246. package/packs/gallery-soft/heatmap/kit.js +498 -0
  247. package/packs/gallery-soft/heatmap/preview.svg +1 -0
  248. package/packs/gallery-soft/heatmap/style.css +181 -0
  249. package/packs/gallery-soft/heatmap/template.html +3 -0
  250. package/packs/gallery-soft/heatmap/writing.md +23 -0
  251. package/packs/gallery-soft/note/component.json +14 -0
  252. package/packs/gallery-soft/note/example.html +3 -0
  253. package/packs/gallery-soft/note/kit.js +162 -0
  254. package/packs/gallery-soft/note/preview.svg +1 -0
  255. package/packs/gallery-soft/note/style.css +148 -0
  256. package/packs/gallery-soft/note/template.html +3 -0
  257. package/packs/gallery-soft/note/writing.md +20 -0
  258. package/packs/gallery-soft/recent/component.json +13 -0
  259. package/packs/gallery-soft/recent/example.html +1 -0
  260. package/packs/gallery-soft/recent/kit.js +335 -0
  261. package/packs/gallery-soft/recent/preview.svg +1 -0
  262. package/packs/gallery-soft/recent/style.css +160 -0
  263. package/packs/gallery-soft/recent/template.html +1 -0
  264. package/packs/gallery-soft/recent/writing.md +17 -0
  265. package/packs/gallery-soft/static/component.json +13 -0
  266. package/packs/gallery-soft/static/example.html +12 -0
  267. package/packs/gallery-soft/static/preview.svg +1 -0
  268. package/packs/gallery-soft/static/style.css +186 -0
  269. package/packs/gallery-soft/static/template.html +1 -0
  270. package/packs/gallery-soft/static/writing.md +20 -0
  271. package/packs/gallery-soft/stats/component.json +13 -0
  272. package/packs/gallery-soft/stats/example.html +1 -0
  273. package/packs/gallery-soft/stats/kit.js +341 -0
  274. package/packs/gallery-soft/stats/preview.svg +1 -0
  275. package/packs/gallery-soft/stats/style.css +119 -0
  276. package/packs/gallery-soft/stats/template.html +1 -0
  277. package/packs/gallery-soft/stats/writing.md +13 -0
  278. package/packs/gallery-soft/today/component.json +12 -0
  279. package/packs/gallery-soft/today/example.html +1 -0
  280. package/packs/gallery-soft/today/kit.js +222 -0
  281. package/packs/gallery-soft/today/preview.svg +1 -0
  282. package/packs/gallery-soft/today/style.css +178 -0
  283. package/packs/gallery-soft/today/template.html +1 -0
  284. package/packs/gallery-soft/today/writing.md +16 -0
  285. package/packs/gallery-soft/todos/component.json +19 -0
  286. package/packs/gallery-soft/todos/example.html +3 -0
  287. package/packs/gallery-soft/todos/kit.js +527 -0
  288. package/packs/gallery-soft/todos/preview.svg +1 -0
  289. package/packs/gallery-soft/todos/style.css +212 -0
  290. package/packs/gallery-soft/todos/template.html +3 -0
  291. package/packs/gallery-soft/todos/writing.md +32 -0
  292. package/packs/gallery-soft/weather/component.json +19 -0
  293. package/packs/gallery-soft/weather/example.html +3 -0
  294. package/packs/gallery-soft/weather/kit.js +411 -0
  295. package/packs/gallery-soft/weather/preview.svg +1 -0
  296. package/packs/gallery-soft/weather/style.css +185 -0
  297. package/packs/gallery-soft/weather/template.html +3 -0
  298. package/packs/gallery-soft/weather/writing.md +28 -0
  299. package/release.json +10 -10
  300. package/skill/SKILL.md +15 -14
  301. package/skill/references/building-blocks.md +4 -4
  302. package/skill/references/extensions.md +11 -7
  303. package/skill/references/pages-and-data.md +13 -9
  304. package/skill/references/writing-html.md +2 -0
  305. package/web/assets/index-BHC5ZOMh.js +15 -0
  306. package/web/assets/index-xP0uw3a0.css +1 -0
  307. package/web/index.html +2 -2
  308. package/dist/chunk-2NRBY6AJ.mjs +0 -2
  309. package/dist/chunk-35NQ4PLQ.mjs +0 -2
  310. package/dist/chunk-3KJHLHUO.mjs +0 -2
  311. package/dist/chunk-4AV456RQ.mjs +0 -2
  312. package/dist/chunk-5XYHDBJ5.mjs +0 -2
  313. package/dist/chunk-6A53MZYZ.mjs +0 -2
  314. package/dist/chunk-6EXH3ORZ.mjs +0 -166
  315. package/dist/chunk-BVEFGE4B.mjs +0 -2
  316. package/dist/chunk-D4EURAX4.mjs +0 -4
  317. package/dist/chunk-DQCE7TJY.mjs +0 -5
  318. package/dist/chunk-FWNRPMCJ.mjs +0 -12
  319. package/dist/chunk-FWW4CSAZ.mjs +0 -2
  320. package/dist/chunk-GY3FAUVM.mjs +0 -2
  321. package/dist/chunk-JVHHHGEA.mjs +0 -3
  322. package/dist/chunk-L7UP52JO.mjs +0 -2
  323. package/dist/chunk-NAMN3RAF.mjs +0 -2
  324. package/dist/chunk-PZDLJJTJ.mjs +0 -3
  325. package/dist/chunk-SXHBYZST.mjs +0 -16
  326. package/dist/chunk-TEZAWDSQ.mjs +0 -2
  327. package/dist/chunk-UFNYFFKO.mjs +0 -20
  328. package/dist/chunk-UKSHDZZ6.mjs +0 -2
  329. package/dist/chunk-VJPFVNNW.mjs +0 -15
  330. package/dist/chunk-VS3ZMVGX.mjs +0 -5
  331. package/web/assets/index-BK2e_07w.js +0 -13
  332. package/web/assets/index-CWFI83mF.css +0 -1
  333. /package/dist/{chunk-YEY3RSFQ.mjs → chunk-5MMN3N5J.mjs} +0 -0
  334. /package/dist/{chunk-UH4SIXTR.mjs → chunk-74UW7QSL.mjs} +0 -0
  335. /package/dist/{chunk-W7XHE4CT.mjs → chunk-EKGYYOSP.mjs} +0 -0
  336. /package/dist/{chunk-QAIHRH3I.mjs → chunk-KNZJT4ET.mjs} +0 -0
  337. /package/dist/{chunk-A55HN5OK.mjs → chunk-N3DSBH5S.mjs} +0 -0
  338. /package/dist/{chunk-QR6A54KJ.mjs → chunk-ZW2A6GBW.mjs} +0 -0
@@ -1,151 +1,73 @@
1
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 face fills its card on a custom page (the board draws the frame), in
3
- the kit's card tokens: its head (the chip and 工作区统计, its end clear of the card's grip), then four
4
- cells in the middle of the room under it, each its label small and muted (after a small picture of
5
- what it counts) over its number, large (the cards' figure size), its
6
- unit small and muted after it, the to-dos done with a bar under their count, as wide as the cell, the
7
- share done in the accent on the track; two by two on a card 4 cells wide, the room the card has spread
8
- evenly above, between and under the rows (the face's gap between them at the least), all four in a row
9
- past 560px (the instance is a container), the hero size, a hairline between them and each cell's bar
10
- ending short of the next one's line, and on a card too low for two rows with their air (under 160px: a
11
- 4 x 2 one from a window 1440px wide and narrower) in a row too, smaller; a line under them where the
12
- workspace cannot be read. Light and dark. */
2
+ reaches the rest of the page. The pack's design B, in the kit's card tokens: no head, four cells, each
3
+ its label after a small picture of what it counts (12px, muted; the picture faint), its number (28px,
4
+ 32px on a wide card) with its unit or its whole after it, its picture at the bottom (the documents'
5
+ squares, the words' line and the area fading under it, the to-dos' bar, the week's bars: the accent and
6
+ its middle shade, on the track) and a faint line under it, its key words 600. In a row (8 × 2, 12 × 2)
7
+ the cells stand a hairline apart, the face out over the card's padding at its sides so that each cell has
8
+ the card's own 16px; two by two (4 × 4) the face fills the card, each cell padded 16px, lined between
9
+ them. Unread (no workspace) a faint dash each and a line at the bottom left. Light and dark. */
13
10
  [data-doc-component="gallery/stats"] {
14
- container-type: size;
15
- height: 9em;
16
- > .gallery-stats-face {
17
- display: flex;
18
- flex-direction: column;
19
- gap: var(--gallery-face-gap);
20
- box-sizing: border-box;
21
- height: 100%;
22
- min-height: 0;
23
- color: var(--gallery-text);
24
- }
25
- > .gallery-stats-face > .gallery-stats-head {
26
- display: flex;
27
- align-items: center;
28
- gap: 8px;
29
- flex: none;
30
- min-width: 0;
31
- padding-inline-end: var(--gallery-grip-room, 0px);
32
- }
33
- > .gallery-stats-face > .gallery-stats-head > .gallery-stats-chip {
34
- flex: none;
35
- display: inline-flex;
36
- align-items: center;
37
- justify-content: center;
38
- width: var(--gallery-chip-size);
39
- height: var(--gallery-chip-size);
40
- border-radius: var(--gallery-chip-radius);
41
- background: var(--gallery-accent-soft);
42
- color: var(--gallery-accent);
43
- }
44
- > .gallery-stats-face > .gallery-stats-head > .gallery-stats-chip > svg { width: var(--gallery-chip-icon); height: var(--gallery-chip-icon); }
45
- > .gallery-stats-face > .gallery-stats-head > .gallery-stats-title {
46
- min-width: 0;
47
- overflow: hidden;
48
- white-space: nowrap;
49
- text-overflow: ellipsis;
50
- font-size: var(--gallery-title-size);
51
- line-height: var(--gallery-title-line);
52
- font-weight: 600;
53
- color: var(--gallery-text-strong);
54
- }
55
- > .gallery-stats-face > .gallery-stats-grid {
56
- display: grid;
57
- flex: 1 1 auto;
58
- grid-template-columns: repeat(2, minmax(0, 1fr));
59
- align-content: space-evenly;
60
- gap: var(--gallery-face-gap) 16px;
61
- min-height: 0;
62
- margin: 0;
63
- }
64
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell { min-width: 0; }
65
- /* Each label after a small picture of what it counts, in its muted color. */
66
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label {
67
- display: flex;
68
- align-items: center;
69
- gap: 5px;
70
- font-size: var(--gallery-meta-size);
71
- line-height: 16px;
72
- color: var(--doc-muted);
73
- overflow: hidden;
74
- white-space: nowrap;
75
- text-overflow: ellipsis;
76
- }
77
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label::before {
78
- content: "";
79
- flex: none;
80
- width: 13px;
81
- height: 13px;
82
- background: currentColor;
83
- opacity: .85;
84
- -webkit-mask: var(--gallery-stats-icon) center / contain no-repeat;
85
- mask: var(--gallery-stats-icon) center / contain no-repeat;
86
- }
87
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="documents"] { --gallery-stats-icon: 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='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3C/svg%3E"); }
88
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="todos"] { --gallery-stats-icon: 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='M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
89
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="words"] { --gallery-stats-icon: 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='M5 7V5h14v2'/%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M9 19h6'/%3E%3C/svg%3E"); }
90
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="week"] { --gallery-stats-icon: 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='M4 20h4L18.5 9.5a2.83 2.83 0 1 0-4-4L4 16v4'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E"); }
91
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value {
92
- display: flex;
93
- flex-wrap: wrap;
94
- align-items: baseline;
95
- margin: 3px 0 0;
96
- font-size: var(--gallery-figure-size);
97
- line-height: 1.1;
11
+ font-family: var(--gallery-font);
12
+ font-size: 13px;
13
+ line-height: 1.5;
14
+ color: var(--gallery-text);
15
+ > .gallery-stats-face { position: relative; display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; }
16
+ > .gallery-stats-face > .gallery-stats-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 0; margin: 0; }
17
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell { display: flex; flex-direction: column; min-width: 0; padding: 0 16px; }
18
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left: 1px solid var(--gallery-hair); }
19
+ > .gallery-stats-face[data-unread] > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left-color: transparent; }
20
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > dd { margin: 0; }
21
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label { display: flex; align-items: center; gap: 6px; padding-inline-end: 0; font-size: 12px; line-height: 16px; color: var(--gallery-muted); white-space: nowrap; }
22
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label > svg { flex: none; width: 13px; height: 13px; color: var(--gallery-faint); }
23
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label > .gallery-stats-label-words { overflow: hidden; text-overflow: ellipsis; }
24
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { display: flex; align-items: baseline; margin-top: 7px; white-space: nowrap; }
25
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number {
26
+ font-size: 28px;
27
+ line-height: 1;
98
28
  font-weight: var(--gallery-numeral-weight);
99
29
  letter-spacing: var(--gallery-numeral-tracking);
30
+ font-variant-numeric: lining-nums;
100
31
  color: var(--gallery-text-strong);
101
- font-variant-numeric: tabular-nums;
102
- white-space: nowrap;
103
- }
104
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit {
105
- margin-inline-start: var(--gallery-unit-gap);
106
- font-size: max(12px, var(--gallery-unit-size));
107
- font-weight: 500;
108
- letter-spacing: 0;
109
- color: var(--doc-muted);
110
- }
111
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit:empty { display: none; }
112
- /* The share of the to-dos done: a bar of the accent on the track under the count, as wide as the cell. */
113
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-bar {
114
- flex: 0 0 100%;
115
- height: 4px;
116
- margin-top: 6px;
117
- border-radius: 2px;
118
- background: var(--gallery-track);
119
- overflow: hidden;
120
32
  }
121
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-bar > .gallery-stats-fill {
122
- display: block;
123
- width: calc(var(--share, 0) * 100%);
124
- height: 100%;
125
- border-radius: 2px;
126
- background: var(--gallery-accent);
127
- }
128
- > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-bar[hidden] { display: none; }
129
- > .gallery-stats-face > .gallery-stats-line { margin: 0; font-size: var(--gallery-meta-size); line-height: 1.4; color: var(--doc-muted); }
33
+ > .gallery-stats-face[data-unread] > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number { font-weight: 300; color: var(--gallery-faintest); }
34
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit { margin-left: 3px; font-size: var(--gallery-unit); font-weight: 500; color: var(--gallery-muted); }
35
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-of { margin-left: 3px; font-size: 15px; font-weight: 600; color: var(--gallery-faint); }
36
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-picture { margin-top: auto; }
37
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-picture > svg { display: block; overflow: visible; }
38
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; line-height: 16px; color: var(--gallery-faint); white-space: nowrap; overflow: hidden; }
39
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption > .gallery-stats-mark { flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--gallery-accent); }
40
+ > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption > .gallery-stats-strong { font-weight: 600; color: var(--gallery-muted); }
41
+ /* The pictures' colors. */
42
+ > .gallery-stats-face .gallery-stats-on { fill: var(--gallery-accent); }
43
+ > .gallery-stats-face :is(.gallery-stats-off, .gallery-stats-stub) { fill: var(--gallery-track); }
44
+ > .gallery-stats-face .gallery-stats-empty { fill: var(--gallery-fill); }
45
+ > .gallery-stats-face .gallery-stats-flat { stroke: var(--gallery-track); }
46
+ > .gallery-stats-face .gallery-stats-line { stroke: var(--gallery-accent); }
47
+ > .gallery-stats-face .gallery-stats-stop { stop-color: var(--gallery-accent); }
48
+ > .gallery-stats-face .gallery-stats-end { fill: var(--gallery-accent); stroke: var(--gallery-card-fill); }
49
+ > .gallery-stats-face .gallery-stats-today { fill: var(--gallery-accent); }
50
+ > .gallery-stats-face .gallery-stats-day { fill: var(--gallery-accent-mid); }
51
+ > .gallery-stats-face .gallery-stats-bar { position: relative; display: block; height: 6px; border-radius: 3px; overflow: hidden; background: var(--gallery-track); }
52
+ > .gallery-stats-face .gallery-stats-bar > .gallery-stats-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--gallery-accent); }
53
+ /* Unread: a line at the bottom left. */
54
+ > .gallery-stats-face > .gallery-stats-line { position: absolute; left: 16px; bottom: 0; margin: 0; font-size: 11.5px; line-height: 16px; color: var(--gallery-faint); }
130
55
  > .gallery-stats-face > .gallery-stats-line[hidden] { display: none; }
56
+ /* A wide card: the numbers larger. */
57
+ > .gallery-stats-face[data-layout="wide"] > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number { font-size: 32px; }
58
+ /* A square card: two by two. */
59
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
60
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell { padding: 16px; }
61
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left: 0; }
62
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell:nth-child(2n) { border-left: 1px solid var(--gallery-hair); }
63
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell:nth-child(n + 3) { border-top: 1px solid var(--gallery-hair); }
64
+ > .gallery-stats-face[data-layout="square"][data-unread] > .gallery-stats-grid > .gallery-stats-cell { border-color: transparent; }
65
+ > .gallery-stats-face[data-layout="square"] .gallery-stats-bar { height: 8px; border-radius: 4px; }
66
+ > .gallery-stats-face[data-layout="square"] .gallery-stats-bar > .gallery-stats-fill { border-radius: 4px; }
67
+ > .gallery-stats-face[data-layout="square"] > .gallery-stats-line { bottom: 16px; }
131
68
  }
132
- /* Wide (8 cells and more): the four in one row, a hairline between them, each cell's bar ending short of the
133
- next line, the hero size. */
134
- @container (min-width: 560px) {
135
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
136
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { padding-inline-start: 20px; border-inline-start: 1px solid var(--doc-grid); }
137
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell:not(:last-child) { padding-inline-end: 16px; }
138
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { font-size: var(--gallery-hero-size); }
139
- }
140
- /* Low (under 160px: a 4 x 2 card from a window 1440px wide and narrower, where two rows under the head would
141
- leave the second at the card's bottom edge): the four in one row, their numbers smaller, their labels with
142
- no picture. */
143
- @container (max-height: 160px) and (max-width: 559px) {
144
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; align-content: center; }
145
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label::before { display: none; }
146
- [data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { font-size: clamp(16px, 6.4cqi, 22px); }
147
- }
148
- /* On a custom page the face is the card's: as high as what the card holds inside its padding. Where no card
149
- is around it (a document, as gallery block check shows it) it is as high as a 4 x 2 card's face, for the
150
- instance is a container of its height too and would otherwise have none. */
69
+ /* On a custom page the face is the card's: out over its padding at its sides (all round when square), so
70
+ that each cell has the card's own room. */
151
71
  .gallery-card > [data-doc-component="gallery/stats"] { height: 100%; }
72
+ .gallery-card > [data-doc-component="gallery/stats"] > .gallery-stats-face { height: 100%; margin: 0 calc(-1 * var(--gallery-card-pad)); }
73
+ .gallery-card > [data-doc-component="gallery/stats"] > .gallery-stats-face[data-layout="square"] { height: calc(100% + 2 * var(--gallery-card-pad)); margin: calc(-1 * var(--gallery-card-pad)); }
@@ -4,8 +4,8 @@ A card for a custom page (its places are `page`, its needs `workspace`): four nu
4
4
 
5
5
  ## How to write it
6
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 stats`: the instance is empty, `<div data-doc-component="gallery/stats"></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 × 2 (the default: two by two) and 8 × 2 (the four in a row).
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 stats`: the instance is empty, `<div data-doc-component="gallery/stats"></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: 8 × 2 (the default: the four in a row), 12 × 2 (the same, larger) and 4 × 4 (two by two).
8
8
 
9
9
  ## How it looks
10
10
 
11
- 工作区统计 beside a chart's chip on the top line, then each number large under its label, muted, after a small picture of what it counts (two by two, or four in a row on a wide card or a low one), the to-dos done with a bar under them, the share done in the accent; in the kit's card tokens (as every Gallery card: a head of a tinted chip and a title, its end clear of the card's grip), light and dark; a workspace with no document shows each 0. The numbers follow by themselves: a document written, a to-do checked, a document made or taken away shows at once. A big count of words is said short (12.3万). In an exported file, which has no workspace to read, each is a dash, with a line saying it shows when the page is opened in Gallery. The script runs with the rights of the page's own scripts, as any block's does.
11
+ 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. It has no head: the four labels are its titles, each after a small picture of what it counts, four cells a hairline apart (two by two on a 4 × 4 card), each a number (28px) and a small chart of its own: the documents a square each, those edited this week in the accent; the words a line of their total over the last 30 days and what those days added (近 30 天 +6万); the to-dos done a bar (70% · 还剩 8 项); the edits this week a bar a day, today's in the accent, against the same days of the week before (比上周同期 +14%). An empty workspace says 0 and what each waits for; where the workspace cannot be read, a dash each.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "id": "gallery/today",
3
3
  "apiVersion": 1,
4
- "version": "1.2.0",
4
+ "version": "2.0.0",
5
5
  "name": { "zh": "问候与日期", "en": "Greeting and date" },
6
6
  "description": { "zh": "按时间问候,显示今天的日期和星期,到点自己更新", "en": "A greeting by the time of day, today's date and weekday, kept up to date by the clock" },
7
7
  "words": "wenhouyuriqi wenhou riqi xingqi jintian today greeting date 问候 日期 星期 今天 时间",
8
8
  "parts": {},
9
9
  "runtime": { "generated": [":scope > .gallery-today-face"] },
10
10
  "places": ["page"],
11
- "card": { "sizes": [[4, 2], [2, 2]], "resize": true }
11
+ "card": { "sizes": [[4, 2], [2, 2], [4, 1]], "resize": true }
12
12
  }
@@ -5,14 +5,20 @@
5
5
  // else Chinese, the kit's own rule. Drawn again by the kit's clock (`clock`): at each whole minute, which
6
6
  // moves the greeting on as the hour turns, and as a day begins, which moves the date; one timer for
7
7
  // every block on the page, none of its own. It holds no part and writes nothing: all it shows is drawn
8
- // (the manifest's `runtime`), and a file holds the bare instance. On a custom page it is a card's whole
9
- // face, laid out by the room it has (style.css, container queries): a 2 x 2 card stacks what a 4 x 2
10
- // one sets on a line. Its head is the cards' chip (the kit's card tokens): the sun from 5 to 17, the moon
11
- // from 18 to 4, as the greeting's part of the day, which the face says too (`data-sky`: its glow, the
12
- // sun's warm color or the accent), and the number of the week (ISO 8601's, `weekNumberOf`) its quiet meta. A card wide enough also shows the week it is in, Monday
13
- // to Sunday, each day's initial over its date, today's 今 (Today) over its date and marked (`weekOf`):
14
- // drawn, for the eye alone (the date says it), again as a day begins. The date line's weekday is marked
15
- // (gallery-today-weekday), which a narrow card leaves out, so that its head stays one line (11月9日).
8
+ // (the manifest's `runtime`), and a file holds the bare instance.
9
+ //
10
+ // Its face (the pack's design B, notes/plans/block-packs-plan-2026-11-09.md) is laid out by its card's
11
+ // cells (`context.size`, read again on `layout`: the face's `data-layout`, style.css): a card 3 or more
12
+ // wide and 2 or more high ("full", the 4 × 2 default) has a head of the chip (the sun from 5 to 17 in its
13
+ // warm color, the moon after it in the accent's), the date and the number of the week (ISO 8601's,
14
+ // `weekNumberOf`: 第 46 周) as its quiet meta, the greeting large under it, and the week it is in at the
15
+ // bottom, Monday to Sunday, each day's initial over its date, the days gone fainter, today's 今 (Today)
16
+ // over its date on the accent (`weekOf`, for the eye alone: the date says it); a narrow card ("narrow",
17
+ // 2 wide) is a page of a desk calendar, the greeting in its head, today's day of the month large at the
18
+ // bottom and its weekday and month under it; a card one cell high ("line", 4 × 1) a line, the chip, the
19
+ // greeting and the date. A soft glow from the card's top left, the sun's warm color by day, the accent's
20
+ // in the evening (the face's `data-sky`), the one mood of a home page. The date line's weekday is
21
+ // marked (gallery-today-weekday), a piece a line breaks before and never inside.
16
22
 
17
23
  const WORDS = {
18
24
  zh: {
@@ -27,6 +33,8 @@ const WORDS = {
27
33
  line: (month, day, weekday) => [`${month}月${day}日`, weekday],
28
34
  /** Which of the line's pieces is the weekday. */
29
35
  weekdayAt: 1,
36
+ /** A desk calendar's foot: the weekday, then the month. @param {number} month @param {string} weekday */
37
+ foot: (month, weekday) => [weekday, `${month}月`],
30
38
  },
31
39
  en: {
32
40
  morning: "Good morning",
@@ -37,10 +45,13 @@ const WORDS = {
37
45
  today: "Today",
38
46
  week: (/** @type {number} */ number) => `Week ${number}`,
39
47
  /** The weekday first: Saturday, November 7. @param {number} month @param {number} day @param {string} weekday */
40
- line: (month, day, weekday) => [`${weekday},`, `${["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][month - 1]} ${day}`],
48
+ line: (month, day, weekday) => [`${weekday},`, `${MONTHS[month - 1]} ${day}`],
41
49
  weekdayAt: 0,
50
+ /** @param {number} month @param {string} weekday */
51
+ foot: (month, weekday) => [weekday, MONTHS[month - 1].slice(0, 3)],
42
52
  },
43
53
  };
54
+ const MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
44
55
 
45
56
  /** The language the page speaks: the UI's where Gallery says it (data-ge-language), else its lang's. */
46
57
  function languageOf(/** @type {HTMLElement} */ root) {
@@ -77,10 +88,22 @@ function faceOf(now, language) {
77
88
  };
78
89
  }
79
90
 
91
+ /**
92
+ * How a card of `size` (context.size: its cells, or null where no card holds it, a document) lays its face
93
+ * out: "line" one cell high, "narrow" two wide or less, else "full".
94
+ * @param {{ w: number, h: number } | null | undefined} size
95
+ * @returns {"full" | "narrow" | "line"}
96
+ */
97
+ function layoutOf(size) {
98
+ if (!size) return "full";
99
+ if (size.h <= 1) return "line";
100
+ return size.w <= 2 ? "narrow" : "full";
101
+ }
102
+
80
103
  // The chip's two pictures, 24 x 24 lines in the chip's ink: the sun by day, the moon in the evening.
81
104
  const PICTURES = {
82
- sun: '<circle cx="12" cy="12" r="4" fill="currentColor" fill-opacity=".28"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.4 5.4l1.6 1.6M17 17l1.6 1.6M5.4 18.6l1.6-1.6M17 7l1.6-1.6"/>',
83
- moon: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"/>',
105
+ sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2.8v1.9M12 19.3v1.9M2.8 12h1.9M19.3 12h1.9M5.5 5.5l1.3 1.3M17.2 17.2l1.3 1.3M5.5 18.5l1.3-1.3M17.2 6.8l1.3-1.3"/>',
106
+ moon: '<path d="M19.5 14.3A7.8 7.8 0 0 1 9.7 4.5a7.8 7.8 0 1 0 9.8 9.8z"/>',
84
107
  };
85
108
 
86
109
  /**
@@ -124,20 +147,24 @@ function made(tag, kind) {
124
147
 
125
148
  DocKit.component({
126
149
  id: "gallery/today",
127
- on: ["clock"],
128
- mount(host) {
150
+ on: ["clock", "layout"],
151
+ mount(host, context) {
129
152
  const face = made("div", "face");
130
153
  const chip = made("span", "chip");
131
154
  chip.setAttribute("aria-hidden", "true");
132
155
  const greeting = made("p", "greeting");
133
156
  const date = made("time", "date");
134
- const week = made("ol", "week");
135
- week.setAttribute("aria-hidden", "true");
136
- face.append(chip, greeting, date, week);
137
- // The head's quiet meta, at its end: the number of the week.
157
+ // The head's quiet meta, after the date: the number of the week.
138
158
  const number = made("span", "meta");
139
159
  number.setAttribute("aria-hidden", "true");
140
- face.append(number);
160
+ const week = made("ol", "week");
161
+ week.setAttribute("aria-hidden", "true");
162
+ // A narrow card's desk calendar: the day of the month, large, and its weekday and month under it.
163
+ const big = made("span", "big");
164
+ big.setAttribute("aria-hidden", "true");
165
+ const foot = made("span", "foot");
166
+ foot.setAttribute("aria-hidden", "true");
167
+ face.append(chip, greeting, date, number, week, big, foot);
141
168
  host.append(face);
142
169
  // Each word set only when it is another, so that a minute that changes nothing writes nothing.
143
170
  const put = (/** @type {HTMLElement} */ node, /** @type {string} */ words) => {
@@ -146,7 +173,10 @@ DocKit.component({
146
173
  const draw = () => {
147
174
  const at = new Date();
148
175
  const language = languageOf(document.documentElement);
176
+ const words = WORDS[language];
149
177
  const now = faceOf(at, language);
178
+ const layout = layoutOf(context?.size);
179
+ if (face.dataset.layout !== layout) face.dataset.layout = layout;
150
180
  const sky = partOfDay(at.getHours()) === "evening" ? "moon" : "sun";
151
181
  if (chip.dataset.sky !== sky) {
152
182
  chip.dataset.sky = sky;
@@ -156,25 +186,30 @@ DocKit.component({
156
186
  put(greeting, now.greeting);
157
187
  // The date line's pieces, a space between them, made again only when its words are others.
158
188
  if (date.textContent !== now.line.join(" ")) {
159
- date.replaceChildren(...now.line.flatMap((words, index) => {
160
- const piece = made("span", "piece");
161
- piece.classList.toggle("gallery-today-weekday", index === WORDS[language].weekdayAt);
162
- piece.textContent = words;
163
- return index === 0 ? [piece] : [" ", piece];
189
+ date.replaceChildren(...now.line.flatMap((piece, index) => {
190
+ const node = made("span", "piece");
191
+ node.classList.toggle("gallery-today-weekday", index === words.weekdayAt);
192
+ node.textContent = piece;
193
+ return index === 0 ? [node] : [" ", node];
164
194
  }));
165
195
  }
166
196
  if (date.dateTime !== now.datetime) {
167
197
  date.dateTime = now.datetime;
168
- number.textContent = WORDS[language].week(weekNumberOf(at));
198
+ number.textContent = words.week(weekNumberOf(at));
199
+ big.textContent = String(at.getDate());
200
+ const [weekday, month] = words.foot(at.getMonth() + 1, words.weekdays[at.getDay()]);
201
+ const dot = made("span", "dot");
202
+ dot.textContent = "·";
203
+ foot.replaceChildren(weekday, dot, month);
169
204
  week.replaceChildren(...weekOf(at, language).map((day) => {
170
205
  const item = made("li", "day");
171
206
  item.classList.toggle("gallery-today-now", day.today);
172
207
  item.classList.toggle("gallery-today-past", day.past);
173
208
  const initial = made("span", "initial");
174
209
  initial.textContent = day.initial;
175
- const number = made("span", "number");
176
- number.textContent = String(day.date);
177
- item.append(initial, number);
210
+ const value = made("span", "number");
211
+ value.textContent = String(day.date);
212
+ item.append(initial, value);
178
213
  return item;
179
214
  }));
180
215
  }
@@ -1 +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="16.5" y="12.5" width="207" height="95" rx="12" fill="#ffffff" stroke="#e7e6e3"/><rect x="30" y="24" width="14" height="14" rx="4.5" fill="#fbf0df"/><g transform="translate(32 26) scale(.4167)" fill="none" stroke="#d98a1c" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3.6"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.4 5.4l1.6 1.6M17 17l1.6 1.6M5.4 18.6l1.6-1.6M17 7l1.6-1.6"/></g><rect x="50" y="28" width="30" height="6" rx="3" fill="#3b3a37"/><rect x="84" y="28" width="22" height="6" rx="3" fill="#c4c2bd"/><rect x="30" y="50" width="74" height="17" rx="5" fill="#3b3a37"/><rect x="35.5" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="34" y="89" width="10" height="5" rx="2.5" fill="#e9e8e5"/><rect x="61" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="59.5" y="89" width="10" height="5" rx="2.5" fill="#e9e8e5"/><rect x="80" y="78" width="20" height="20" rx="5" fill="#efeeec"/><rect x="86.5" y="82" width="7" height="3" rx="1.5" fill="#2e7cd1"/><rect x="85" y="89" width="10" height="5" rx="2.5" fill="#2e7cd1"/><rect x="112" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="110.5" y="89" width="10" height="5" rx="2.5" fill="#c4c2bd"/><rect x="137.5" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="136" y="89" width="10" height="5" rx="2.5" fill="#c4c2bd"/><rect x="163" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="161.5" y="89" width="10" height="5" rx="2.5" fill="#c4c2bd"/><rect x="188.5" y="82" width="7" height="3" rx="1.5" fill="#c4c2bd"/><rect x="187" y="89" width="10" height="5" rx="2.5" fill="#c4c2bd"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120"><rect width="240" height="120" rx="8" fill="#f3f3f1"/><defs><radialGradient id="g" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(16 12) scale(140 96)"><stop offset="0" stop-color="#ffb74d" stop-opacity=".22"/><stop offset=".62" stop-color="#ffb74d" stop-opacity="0"/></radialGradient></defs><rect x="16.5" y="12.5" width="207" height="95" rx="8" fill="#ffffff" stroke="#e6e6e3"/><rect x="17" y="13" width="206" height="94" rx="7.5" fill="url(#g)"/><rect x="28" y="22" width="10" height="10" rx="3" fill="#fdf1dd"/><rect x="42" y="24.5" width="46" height="5" rx="2.5" fill="#37352f"/><rect x="92" y="24.5" width="20" height="5" rx="2.5" fill="#d4d3cf"/><rect x="28" y="42" width="60" height="15" rx="3" fill="#1d1d1b"/><rect x="35" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="33" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="62" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="60" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="89" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="87" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="108" y="71" width="22" height="26" rx="6" fill="#4084cf"/><rect x="116" y="76" width="6" height="3" rx="1.5" fill="#ffffff"/><rect x="114" y="84" width="10" height="6" rx="3" fill="#ffffff"/><rect x="143" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="141" y="84" width="10" height="6" rx="3" fill="#37352f"/><rect x="170" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="168" y="84" width="10" height="6" rx="3" fill="#37352f"/><rect x="197" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="195" y="84" width="10" height="6" rx="3" fill="#37352f"/></svg>