@heycys/gallery 0.1.0 → 0.1.2

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 (465) hide show
  1. package/THIRD-PARTY-NOTICES.md +51 -1
  2. package/browser/editor/components/callout/index.mjs +40 -15
  3. package/browser/editor/components/columns/page.mjs +45 -32
  4. package/browser/editor/components/details/index.mjs +2 -1
  5. package/browser/editor/components/dialog/index.mjs +2 -1
  6. package/browser/editor/components/dialog/page.mjs +0 -18
  7. package/browser/editor/components/divider/index.mjs +1 -1
  8. package/browser/editor/components/embed/index.mjs +2 -2
  9. package/browser/editor/components/figure/page.mjs +10 -1
  10. package/browser/editor/components/file/page.mjs +2 -2
  11. package/browser/editor/components/flowchart/add.mjs +7 -6
  12. package/browser/editor/components/flowchart/page.mjs +1 -1
  13. package/browser/editor/components/heading/index.mjs +2 -0
  14. package/browser/editor/components/heading/page.mjs +6 -0
  15. package/browser/editor/components/highlight/index.mjs +4 -20
  16. package/browser/editor/components/icons.mjs +13 -2
  17. package/browser/editor/components/image/crop.mjs +6 -9
  18. package/browser/editor/components/image/page.mjs +2 -2
  19. package/browser/editor/components/installed/index.mjs +82 -29
  20. package/browser/editor/components/installed/page.mjs +146 -34
  21. package/browser/editor/components/installed/served.mjs +6 -5
  22. package/browser/editor/components/instances.mjs +18 -0
  23. package/browser/editor/components/kit.mjs +3 -0
  24. package/browser/editor/components/list/page.mjs +3 -6
  25. package/browser/editor/components/media/page.mjs +44 -14
  26. package/browser/editor/components/pages.mjs +2 -2
  27. package/browser/editor/components/registry.mjs +68 -33
  28. package/browser/editor/components/section/index.mjs +2 -1
  29. package/browser/editor/components/set-apart.mjs +24 -0
  30. package/browser/editor/components/table/index.mjs +64 -5
  31. package/browser/editor/components/table/page.mjs +30 -19
  32. package/browser/editor/page/annotate/anchors.mjs +4 -3
  33. package/browser/editor/page/annotate/card.mjs +3 -6
  34. package/browser/editor/page/annotate/index.mjs +61 -34
  35. package/browser/editor/page/autosave.mjs +357 -38
  36. package/browser/editor/page/beside.mjs +5 -5
  37. package/browser/editor/page/block-menu/colors.mjs +3 -1
  38. package/browser/editor/page/block-menu/index.mjs +8 -6
  39. package/browser/editor/page/blocks.mjs +16 -7
  40. package/browser/editor/page/board/client.mjs +57 -0
  41. package/browser/editor/page/board/hint.mjs +145 -0
  42. package/browser/editor/page/board/history.mjs +119 -0
  43. package/browser/editor/page/board/index.mjs +970 -0
  44. package/browser/editor/page/board/settings.mjs +209 -0
  45. package/browser/editor/page/caret.mjs +5 -2
  46. package/browser/editor/page/changes/bar.mjs +94 -0
  47. package/browser/editor/page/changes/ghost.mjs +206 -0
  48. package/browser/editor/page/changes/gone-words.mjs +94 -0
  49. package/browser/editor/page/changes/index.mjs +447 -0
  50. package/browser/editor/page/changes/words.mjs +27 -0
  51. package/browser/editor/page/clipboard/import/colors.mjs +3 -3
  52. package/browser/editor/page/clipboard/import/html.mjs +29 -6
  53. package/browser/editor/page/clipboard/import/inline.mjs +32 -0
  54. package/browser/editor/page/clipboard/import/markdown.mjs +58 -13
  55. package/browser/editor/page/clipboard/import/read.mjs +6 -1
  56. package/browser/editor/page/clipboard/import/to-blocks.mjs +44 -12
  57. package/browser/editor/page/clipboard/import/yuque.mjs +622 -0
  58. package/browser/editor/page/clipboard/index.mjs +156 -26
  59. package/browser/editor/page/clipboard/own/blocks.mjs +25 -16
  60. package/browser/editor/page/clipboard/own/chart-keys.mjs +41 -28
  61. package/browser/editor/page/clipboard/own/describe.mjs +16 -7
  62. package/browser/editor/page/clipboard/own/export.mjs +6 -6
  63. package/browser/editor/page/clipboard/own/selection.mjs +3 -3
  64. package/browser/editor/page/clipboard/own/writers.mjs +0 -11
  65. package/browser/editor/page/columns/index.mjs +48 -46
  66. package/browser/editor/page/commit.mjs +98 -25
  67. package/browser/editor/page/conflicts.mjs +13 -33
  68. package/browser/editor/page/convert.mjs +8 -7
  69. package/browser/editor/page/core.mjs +81 -27
  70. package/browser/editor/page/custom-page.mjs +106 -0
  71. package/browser/editor/page/drag/index.mjs +40 -24
  72. package/browser/editor/page/drag/preview.mjs +9 -4
  73. package/browser/editor/page/editor.mjs +120 -28
  74. package/browser/editor/page/emoji-picker/emoji-tab.mjs +22 -13
  75. package/browser/editor/page/emoji-picker/grid.mjs +7 -5
  76. package/browser/editor/page/emoji-picker/icon-tab.mjs +4 -4
  77. package/browser/editor/page/emoji-picker/icons.mjs +0 -1
  78. package/browser/editor/page/emoji-picker/index.mjs +11 -9
  79. package/browser/editor/page/emoji-picker/styles.mjs +156 -2
  80. package/browser/editor/page/emoji-picker/support.mjs +6 -4
  81. package/browser/editor/page/emoji-picker/upload.mjs +14 -13
  82. package/browser/editor/page/fills.mjs +5 -3
  83. package/browser/editor/page/fold/index.mjs +348 -0
  84. package/browser/editor/page/fold/rule.mjs +125 -0
  85. package/browser/editor/page/folded.mjs +23 -0
  86. package/browser/editor/page/format-bar/bar.mjs +2 -1
  87. package/browser/editor/page/format-bar/index.mjs +1 -1
  88. package/browser/editor/page/geometry.mjs +8 -6
  89. package/browser/editor/page/handle/index.mjs +22 -14
  90. package/browser/editor/page/hints/index.mjs +1 -1
  91. package/browser/editor/page/history.mjs +24 -4
  92. package/browser/editor/page/insert/index.mjs +30 -17
  93. package/browser/editor/page/links/index.mjs +5 -3
  94. package/browser/editor/page/links/pages.mjs +27 -9
  95. package/browser/editor/page/long-runs.mjs +75 -0
  96. package/browser/editor/page/look.mjs +69 -6
  97. package/browser/editor/page/margin.mjs +63 -27
  98. package/browser/editor/page/media-menu/index.mjs +6 -7
  99. package/browser/editor/page/menu.mjs +86 -31
  100. package/browser/editor/page/merge.mjs +24 -0
  101. package/browser/editor/page/notices.mjs +3 -3
  102. package/browser/editor/page/offered.mjs +1 -1
  103. package/browser/editor/page/outline/folds.mjs +11 -10
  104. package/browser/editor/page/outline/index.mjs +131 -45
  105. package/browser/editor/page/outline/list.mjs +23 -11
  106. package/browser/editor/page/outline/read.mjs +1 -1
  107. package/browser/editor/page/outline/strip.mjs +7 -1
  108. package/browser/editor/page/page-objects.mjs +13 -2
  109. package/browser/editor/page/panel.mjs +9 -13
  110. package/browser/editor/page/present-links.mjs +11 -2
  111. package/browser/editor/page/resize/index.mjs +42 -29
  112. package/browser/editor/page/selection/delete.mjs +8 -6
  113. package/browser/editor/page/selection/index.mjs +10 -3
  114. package/browser/editor/page/served.mjs +14 -0
  115. package/browser/editor/page/session.mjs +101 -6
  116. package/browser/editor/page/slash-menu/index.mjs +3 -3
  117. package/browser/editor/page/table/cell-bar.mjs +4 -1
  118. package/browser/editor/page/table/cells.mjs +103 -47
  119. package/browser/editor/page/table/icons.mjs +3 -1
  120. package/browser/editor/page/table/index.mjs +40 -16
  121. package/browser/editor/page/table/pictures.mjs +299 -0
  122. package/browser/editor/page/table/views.mjs +150 -0
  123. package/browser/editor/page/table/widths.mjs +9 -4
  124. package/browser/editor/page/text-select/index.mjs +43 -14
  125. package/browser/editor/page/todo-writes.mjs +75 -0
  126. package/browser/editor/page/tooltip.mjs +1 -1
  127. package/browser/editor/page/type-grid.mjs +4 -3
  128. package/browser/editor/page/typing/code-edges.mjs +63 -17
  129. package/browser/editor/page/typing/index.mjs +65 -9
  130. package/browser/editor/page/typing/leave.mjs +1 -1
  131. package/browser/editor/page/ui.mjs +13 -0
  132. package/browser/shared/annotations.mjs +8 -10
  133. package/browser/shared/block-packs.mjs +404 -0
  134. package/browser/shared/board-places.mjs +224 -0
  135. package/browser/shared/card-size.mjs +59 -0
  136. package/browser/shared/code-folds.mjs +5 -1
  137. package/browser/shared/colors.mjs +17 -14
  138. package/browser/shared/component-catalog.mjs +345 -54
  139. package/browser/shared/component-source.mjs +37 -0
  140. package/browser/shared/components/callout.mjs +4 -2
  141. package/browser/shared/components/index.mjs +72 -9
  142. package/browser/shared/components/installed.mjs +110 -8
  143. package/browser/shared/components/page.mjs +22 -3
  144. package/browser/shared/components/state.mjs +5 -1
  145. package/browser/shared/components/table.mjs +1 -1
  146. package/browser/shared/components/text.mjs +2 -2
  147. package/browser/shared/document-look.mjs +183 -0
  148. package/browser/shared/drafts.mjs +432 -0
  149. package/browser/shared/emoji/data/LICENSE-lucide.txt +43 -0
  150. package/browser/shared/emoji/data/README.md +4 -2
  151. package/browser/shared/emoji/data/categories.json +1 -1
  152. package/browser/shared/emoji/data/keywords-en.json +1 -1
  153. package/browser/shared/emoji/data/keywords-zh.json +1 -1
  154. package/browser/shared/emoji/data/names.json +1 -1
  155. package/browser/shared/emoji/data/positions.json +1 -1
  156. package/browser/shared/emoji/data/twemoji-index.json +1 -1
  157. package/browser/shared/emoji/data/twemoji-svg.bin +0 -0
  158. package/browser/shared/emoji/data.mjs +10 -12
  159. package/browser/shared/emoji/emoji.mjs +8 -7
  160. package/browser/shared/emoji/icon-value.mjs +4 -3
  161. package/browser/shared/extension-sidebar.mjs +126 -0
  162. package/browser/shared/extensions.mjs +79 -0
  163. package/browser/shared/file-table.mjs +101 -0
  164. package/browser/shared/html-tree.mjs +11 -5
  165. package/browser/shared/i18n/en.mjs +374 -35
  166. package/browser/shared/json-layout.mjs +47 -0
  167. package/browser/shared/long-runs.mjs +39 -0
  168. package/browser/shared/net-cache.mjs +133 -0
  169. package/browser/shared/net-keys.mjs +32 -0
  170. package/browser/shared/net-policy.mjs +177 -0
  171. package/browser/shared/new-names.mjs +5 -2
  172. package/browser/shared/outline-shape.mjs +128 -0
  173. package/browser/shared/outline.mjs +458 -0
  174. package/browser/shared/pack-manifest.mjs +77 -0
  175. package/browser/shared/page-address.mjs +6 -3
  176. package/browser/shared/page-cards.mjs +308 -0
  177. package/browser/shared/page-links.mjs +69 -6
  178. package/browser/shared/pages.mjs +388 -0
  179. package/browser/shared/paths.mjs +6 -0
  180. package/browser/shared/preferences.mjs +10 -4
  181. package/browser/shared/preview-server.mjs +3 -7
  182. package/browser/shared/session.mjs +13 -5
  183. package/browser/shared/shipped-blocks.mjs +299 -0
  184. package/browser/shared/table-chart.mjs +33 -1
  185. package/browser/shared/todos.mjs +83 -0
  186. package/browser/shared/user-directory.mjs +24 -0
  187. package/browser/shared/versions.mjs +14 -0
  188. package/browser/shared/web-links.mjs +134 -0
  189. package/browser/shared/workspace-columns.mjs +120 -0
  190. package/browser/shared/workspace-look.mjs +91 -0
  191. package/browser/shared/workspace-name.mjs +154 -0
  192. package/browser/shared/workspace-query.mjs +125 -0
  193. package/browser/shared/workspace-registry.mjs +272 -0
  194. package/browser/shared/workspace.mjs +171 -20
  195. package/browser/shared/zoom.mjs +5 -5
  196. package/dist/chunk-2NRBY6AJ.mjs +2 -0
  197. package/dist/chunk-32ZUEFZ7.mjs +2 -0
  198. package/dist/chunk-35NQ4PLQ.mjs +2 -0
  199. package/dist/chunk-3KJHLHUO.mjs +2 -0
  200. package/dist/chunk-3NJACR4W.mjs +2 -0
  201. package/dist/chunk-4AV456RQ.mjs +2 -0
  202. package/dist/chunk-4OZWXZE5.mjs +5 -0
  203. package/dist/chunk-5XYHDBJ5.mjs +2 -0
  204. package/dist/chunk-5ZJA7CXT.mjs +2 -0
  205. package/dist/chunk-6A53MZYZ.mjs +2 -0
  206. package/dist/chunk-6EXH3ORZ.mjs +166 -0
  207. package/dist/chunk-6EZ7FNIK.mjs +3 -0
  208. package/dist/{chunk-UXUK4PMC.mjs → chunk-6QBHU4DF.mjs} +1 -1
  209. package/dist/{chunk-6U2SLSDN.mjs → chunk-6VTU6KEO.mjs} +1 -1
  210. package/dist/chunk-B4P2CM2J.mjs +3 -0
  211. package/dist/chunk-BPL64HGA.mjs +4 -0
  212. package/dist/chunk-BVEFGE4B.mjs +2 -0
  213. package/dist/chunk-BZ5RAF7L.mjs +2 -0
  214. package/dist/chunk-CRJEG7MT.mjs +2 -0
  215. package/dist/{chunk-B3VTYBYR.mjs → chunk-D4CKRD3V.mjs} +91 -91
  216. package/dist/chunk-D4EURAX4.mjs +4 -0
  217. package/dist/chunk-DQCE7TJY.mjs +5 -0
  218. package/dist/chunk-DR73Y2UJ.mjs +3 -0
  219. package/dist/{chunk-TMYZB6AV.mjs → chunk-EKNHM3P4.mjs} +1 -1
  220. package/dist/{chunk-DB4WKGYF.mjs → chunk-ERLAIBOA.mjs} +2 -2
  221. package/dist/chunk-EURLTOTZ.mjs +4 -0
  222. package/dist/chunk-FJYN7RTH.mjs +4 -0
  223. package/dist/chunk-FWNRPMCJ.mjs +12 -0
  224. package/dist/chunk-FWW4CSAZ.mjs +2 -0
  225. package/dist/{chunk-2B5E4CDJ.mjs → chunk-GPIWQ4X4.mjs} +1 -1
  226. package/dist/chunk-GY3FAUVM.mjs +2 -0
  227. package/dist/chunk-HLYV7RIH.mjs +2 -0
  228. package/dist/chunk-HMYTM3GT.mjs +15 -0
  229. package/dist/chunk-IA4PSIMD.mjs +2 -0
  230. package/dist/chunk-JEUK3ZO7.mjs +2 -0
  231. package/dist/chunk-JVHHHGEA.mjs +3 -0
  232. package/dist/chunk-KTKHRC6H.mjs +2 -0
  233. package/dist/chunk-L7UP52JO.mjs +2 -0
  234. package/dist/chunk-MHW7ZKOU.mjs +2 -0
  235. package/dist/chunk-N76HWBA3.mjs +10 -0
  236. package/dist/chunk-N7AZZLGT.mjs +548 -0
  237. package/dist/chunk-NAMN3RAF.mjs +2 -0
  238. package/dist/{chunk-YXAUQPVK.mjs → chunk-NFMCP2HI.mjs} +3 -3
  239. package/dist/chunk-NG375ILQ.mjs +2 -0
  240. package/dist/chunk-NVRNLK25.mjs +6 -0
  241. package/dist/chunk-NWFBE2YA.mjs +2 -0
  242. package/dist/chunk-NWR2LT5B.mjs +2 -0
  243. package/dist/chunk-OJKMINIU.mjs +20 -0
  244. package/dist/chunk-OUUP3WKT.mjs +2 -0
  245. package/dist/chunk-OW5NWPOJ.mjs +10 -0
  246. package/dist/chunk-PAREWQGB.mjs +4 -0
  247. package/dist/chunk-POQSE4C2.mjs +2 -0
  248. package/dist/chunk-PUOQ65NC.mjs +2 -0
  249. package/dist/{chunk-Z52HTUW7.mjs → chunk-PVER7LSC.mjs} +2 -2
  250. package/dist/chunk-PZDLJJTJ.mjs +3 -0
  251. package/dist/chunk-Q47PLKIJ.mjs +15 -0
  252. package/dist/chunk-Q4UEPUWF.mjs +2 -0
  253. package/dist/chunk-QKXMPUXC.mjs +2 -0
  254. package/dist/chunk-QOUEFUCH.mjs +16 -0
  255. package/dist/chunk-RFDZXFJF.mjs +13 -0
  256. package/dist/chunk-RKPWLGZ3.mjs +4 -0
  257. package/dist/chunk-RMECZA2K.mjs +2 -0
  258. package/dist/{chunk-EUX7IC5J.mjs → chunk-SQ6Y2ZMA.mjs} +2 -2
  259. package/dist/chunk-SX4LJYT6.mjs +8 -0
  260. package/dist/chunk-SXHBYZST.mjs +16 -0
  261. package/dist/chunk-TANZRINB.mjs +2 -0
  262. package/dist/chunk-TEZAWDSQ.mjs +2 -0
  263. package/dist/chunk-UBBRTJ2R.mjs +24 -0
  264. package/dist/chunk-UFNYFFKO.mjs +20 -0
  265. package/dist/chunk-UGWYKHBL.mjs +170 -0
  266. package/dist/chunk-UKSHDZZ6.mjs +2 -0
  267. package/dist/chunk-UMHUSOPJ.mjs +2 -0
  268. package/dist/chunk-UNOYVIYR.mjs +2 -0
  269. package/dist/chunk-V6RIYQZZ.mjs +4 -0
  270. package/dist/chunk-VJPFVNNW.mjs +15 -0
  271. package/dist/chunk-VS3ZMVGX.mjs +5 -0
  272. package/dist/chunk-VTKNEYT3.mjs +6 -0
  273. package/dist/chunk-VXACTLO3.mjs +3 -0
  274. package/dist/chunk-W3BGBJQW.mjs +2 -0
  275. package/dist/chunk-YI43RG4P.mjs +2 -0
  276. package/dist/chunk-YQGT4AB2.mjs +6 -0
  277. package/dist/chunk-ZB4H7ZN4.mjs +2 -0
  278. package/dist/{chunk-ACOPDCNB.mjs → chunk-ZHEHPMBK.mjs} +1 -1
  279. package/dist/chunk-ZTHICSSF.mjs +2 -0
  280. package/dist/chunk-ZUNVAXLH.mjs +2 -0
  281. package/dist/chunk-ZWPMCK7P.mjs +2 -0
  282. package/dist/cli.mjs +1 -1
  283. package/dist/server.mjs +1 -1
  284. package/dist/{chunk-EVJ3BX3M.mjs → update-fetch.mjs} +1 -1
  285. package/dist/worker.mjs +1 -1
  286. package/kit/board.css +95 -0
  287. package/kit/board.js +250 -0
  288. package/kit/charts.js +5 -71
  289. package/kit/code.js +14 -14
  290. package/kit/math.js +18 -2
  291. package/kit/report.css +500 -151
  292. package/kit/runtime.js +1720 -170
  293. package/kit/state.js +10 -1
  294. package/kit/tables.js +172 -37
  295. package/kit/ui.js +166 -27
  296. package/package.json +2 -1
  297. package/packs/gallery/card/component.json +14 -0
  298. package/packs/gallery/card/example.html +10 -0
  299. package/packs/gallery/card/preview.svg +1 -0
  300. package/packs/gallery/card/style.css +6 -0
  301. package/packs/gallery/card/template.html +6 -0
  302. package/packs/gallery/card/writing.md +14 -0
  303. package/packs/gallery/chart-card/component.json +15 -0
  304. package/packs/gallery/chart-card/example.html +14 -0
  305. package/packs/gallery/chart-card/kit.js +130 -0
  306. package/packs/gallery/chart-card/preview.svg +1 -0
  307. package/packs/gallery/chart-card/style.css +42 -0
  308. package/packs/gallery/chart-card/template.html +13 -0
  309. package/packs/gallery/chart-card/writing.md +20 -0
  310. package/packs/gallery/chart-view/component.json +20 -0
  311. package/packs/gallery/chart-view/example.html +13 -0
  312. package/packs/gallery/chart-view/kit.js +355 -0
  313. package/packs/gallery/chart-view/preview.svg +1 -0
  314. package/packs/gallery/chart-view/style.css +94 -0
  315. package/packs/gallery/chart-view/template.html +3 -0
  316. package/packs/gallery/chart-view/writing.md +22 -0
  317. package/packs/gallery/countdown/component.json +18 -0
  318. package/packs/gallery/countdown/example.html +3 -0
  319. package/packs/gallery/countdown/kit.js +156 -0
  320. package/packs/gallery/countdown/preview.svg +1 -0
  321. package/packs/gallery/countdown/style.css +130 -0
  322. package/packs/gallery/countdown/template.html +3 -0
  323. package/packs/gallery/countdown/writing.md +22 -0
  324. package/packs/gallery/habit/component.json +14 -0
  325. package/packs/gallery/habit/example.html +3 -0
  326. package/packs/gallery/habit/kit.js +295 -0
  327. package/packs/gallery/habit/preview.svg +1 -0
  328. package/packs/gallery/habit/style.css +246 -0
  329. package/packs/gallery/habit/template.html +3 -0
  330. package/packs/gallery/habit/writing.md +21 -0
  331. package/packs/gallery/heatmap/component.json +18 -0
  332. package/packs/gallery/heatmap/example.html +3 -0
  333. package/packs/gallery/heatmap/kit.js +351 -0
  334. package/packs/gallery/heatmap/preview.svg +1 -0
  335. package/packs/gallery/heatmap/style.css +201 -0
  336. package/packs/gallery/heatmap/template.html +3 -0
  337. package/packs/gallery/heatmap/writing.md +21 -0
  338. package/packs/gallery/kanban/component.json +18 -0
  339. package/packs/gallery/kanban/example.html +12 -0
  340. package/packs/gallery/kanban/kit.js +540 -0
  341. package/packs/gallery/kanban/preview.svg +1 -0
  342. package/packs/gallery/kanban/style.css +212 -0
  343. package/packs/gallery/kanban/template.html +3 -0
  344. package/packs/gallery/kanban/writing.md +20 -0
  345. package/packs/gallery/metric/component.json +22 -0
  346. package/packs/gallery/metric/example.html +15 -0
  347. package/packs/gallery/metric/kit.js +248 -0
  348. package/packs/gallery/metric/preview.svg +1 -0
  349. package/packs/gallery/metric/style.css +92 -0
  350. package/packs/gallery/metric/template.html +3 -0
  351. package/packs/gallery/metric/writing.md +23 -0
  352. package/packs/gallery/note/component.json +14 -0
  353. package/packs/gallery/note/example.html +3 -0
  354. package/packs/gallery/note/kit.js +102 -0
  355. package/packs/gallery/note/preview.svg +1 -0
  356. package/packs/gallery/note/style.css +76 -0
  357. package/packs/gallery/note/template.html +3 -0
  358. package/packs/gallery/note/writing.md +18 -0
  359. package/packs/gallery/pack.json +8 -0
  360. package/packs/gallery/recent/component.json +13 -0
  361. package/packs/gallery/recent/example.html +1 -0
  362. package/packs/gallery/recent/kit.js +238 -0
  363. package/packs/gallery/recent/preview.svg +1 -0
  364. package/packs/gallery/recent/style.css +158 -0
  365. package/packs/gallery/recent/template.html +1 -0
  366. package/packs/gallery/recent/writing.md +15 -0
  367. package/packs/gallery/static/component.json +13 -0
  368. package/packs/gallery/static/example.html +11 -0
  369. package/packs/gallery/static/preview.svg +1 -0
  370. package/packs/gallery/static/style.css +138 -0
  371. package/packs/gallery/static/template.html +1 -0
  372. package/packs/gallery/static/writing.md +18 -0
  373. package/packs/gallery/stats/component.json +13 -0
  374. package/packs/gallery/stats/example.html +1 -0
  375. package/packs/gallery/stats/kit.js +166 -0
  376. package/packs/gallery/stats/preview.svg +1 -0
  377. package/packs/gallery/stats/style.css +151 -0
  378. package/packs/gallery/stats/template.html +1 -0
  379. package/packs/gallery/stats/writing.md +11 -0
  380. package/packs/gallery/today/component.json +12 -0
  381. package/packs/gallery/today/example.html +1 -0
  382. package/packs/gallery/today/kit.js +185 -0
  383. package/packs/gallery/today/preview.svg +1 -0
  384. package/packs/gallery/today/style.css +120 -0
  385. package/packs/gallery/today/template.html +1 -0
  386. package/packs/gallery/today/writing.md +14 -0
  387. package/packs/gallery/todos/component.json +19 -0
  388. package/packs/gallery/todos/example.html +3 -0
  389. package/packs/gallery/todos/kit.js +342 -0
  390. package/packs/gallery/todos/preview.svg +1 -0
  391. package/packs/gallery/todos/style.css +267 -0
  392. package/packs/gallery/todos/template.html +3 -0
  393. package/packs/gallery/todos/writing.md +30 -0
  394. package/packs/gallery/weather/component.json +19 -0
  395. package/packs/gallery/weather/example.html +3 -0
  396. package/packs/gallery/weather/kit.js +312 -0
  397. package/packs/gallery/weather/preview.svg +1 -0
  398. package/packs/gallery/weather/style.css +258 -0
  399. package/packs/gallery/weather/template.html +3 -0
  400. package/packs/gallery/weather/writing.md +26 -0
  401. package/packs/gallery-soft/pack.json +8 -0
  402. package/release.json +13 -11
  403. package/sdk/doc-kit.d.ts +404 -7
  404. package/sdk/doc-state.d.ts +2 -0
  405. package/skill/SKILL.md +71 -26
  406. package/skill/references/block-script.md +140 -0
  407. package/skill/references/building-blocks.md +257 -0
  408. package/skill/references/example-report.html +1 -1
  409. package/skill/references/extensions.md +59 -0
  410. package/skill/references/pages-and-data.md +221 -0
  411. package/skill/references/writing-html.md +9 -7
  412. package/skill/sdk/doc-kit.d.ts +404 -7
  413. package/skill/sdk/doc-state.d.ts +2 -0
  414. package/web/assets/index-BK2e_07w.js +13 -0
  415. package/web/assets/index-CWFI83mF.css +1 -0
  416. package/web/index.html +2 -2
  417. package/browser/editor/components/callout/page.mjs +0 -13
  418. package/dist/chunk-2PBALTR3.mjs +0 -57
  419. package/dist/chunk-3LA3EMDE.mjs +0 -15
  420. package/dist/chunk-5FRMCDPY.mjs +0 -16
  421. package/dist/chunk-5LEK2CBS.mjs +0 -2
  422. package/dist/chunk-5OFN5AHC.mjs +0 -2
  423. package/dist/chunk-5SIYS5HN.mjs +0 -2
  424. package/dist/chunk-5TEK3RAD.mjs +0 -2
  425. package/dist/chunk-6CYG3Z4V.mjs +0 -2
  426. package/dist/chunk-7GHT2UCA.mjs +0 -15
  427. package/dist/chunk-7QQBR7PB.mjs +0 -2
  428. package/dist/chunk-ATCJYAR4.mjs +0 -2
  429. package/dist/chunk-C7HWOBIF.mjs +0 -2
  430. package/dist/chunk-E7VYDG2X.mjs +0 -2
  431. package/dist/chunk-EZY3WC6Z.mjs +0 -15
  432. package/dist/chunk-FQGQH4KM.mjs +0 -2
  433. package/dist/chunk-G7TOXONE.mjs +0 -6
  434. package/dist/chunk-GPF4YWWB.mjs +0 -9
  435. package/dist/chunk-GYQV7Y4J.mjs +0 -120
  436. package/dist/chunk-HMHK3EQ6.mjs +0 -2
  437. package/dist/chunk-HQQMJCQJ.mjs +0 -10
  438. package/dist/chunk-IERUOGC3.mjs +0 -6
  439. package/dist/chunk-ITNLYXXV.mjs +0 -3
  440. package/dist/chunk-L4DVONOG.mjs +0 -2
  441. package/dist/chunk-LAE5NQ4B.mjs +0 -2
  442. package/dist/chunk-LC7YNQFG.mjs +0 -2
  443. package/dist/chunk-LHTFLRB6.mjs +0 -4
  444. package/dist/chunk-NFIBI4IP.mjs +0 -26
  445. package/dist/chunk-NSKUTQ5J.mjs +0 -5
  446. package/dist/chunk-O52JMOCZ.mjs +0 -2
  447. package/dist/chunk-P2CAZPDP.mjs +0 -3
  448. package/dist/chunk-QMQUXTU4.mjs +0 -12
  449. package/dist/chunk-QVWVFC5K.mjs +0 -6
  450. package/dist/chunk-QYKCJ7FG.mjs +0 -8
  451. package/dist/chunk-QZY6Q64C.mjs +0 -2
  452. package/dist/chunk-TDQP3DKQ.mjs +0 -10
  453. package/dist/chunk-TX6JH7TR.mjs +0 -2
  454. package/dist/chunk-UNUEWH4S.mjs +0 -2
  455. package/dist/chunk-V4CPWKMZ.mjs +0 -2
  456. package/dist/chunk-VACRB2NE.mjs +0 -3
  457. package/dist/chunk-W63L7367.mjs +0 -7
  458. package/dist/chunk-W7CXPCRV.mjs +0 -6
  459. package/dist/chunk-XINNG4F2.mjs +0 -4
  460. package/dist/chunk-YL2DPWVS.mjs +0 -4
  461. package/dist/chunk-YZ5Z6H4W.mjs +0 -4
  462. package/dist/chunk-ZBIM6ARY.mjs +0 -216
  463. package/skill/references/building-components.md +0 -327
  464. package/web/assets/index-B6Ai3wsa.js +0 -13
  465. package/web/assets/index-SYPC3EZy.css +0 -1
package/kit/report.css CHANGED
@@ -6,7 +6,9 @@
6
6
  download, their ascent and descent rewritten so a line's ink sits in the middle of its line box, as
7
7
  Feishu's first Windows font (Tahoma) has it; Segoe UI's own leaves room above its letters, and the
8
8
  Chinese text, on the same baseline, sat a pixel low in a selected block's fill and a colored one's
9
- background. Absent elsewhere (macOS, Linux): the stack goes on to the next family. */
9
+ background. PingFang SC stands before it in --doc-font: where the system has PingFang SC (macOS,
10
+ iOS, a Windows it was installed on) the whole text is set in it and this alias is not reached.
11
+ Where Segoe UI is absent (macOS, Linux) the stack goes on to the next family. */
10
12
  @font-face { font-family: "Doc Segoe"; src: local("Segoe UI"), local("SegoeUI"); font-weight: 400; ascent-override: 100%; descent-override: 25%; line-gap-override: 0%; }
11
13
  @font-face { font-family: "Doc Segoe"; src: local("Segoe UI Italic"), local("SegoeUI-Italic"); font-weight: 400; font-style: italic; ascent-override: 100%; descent-override: 25%; line-gap-override: 0%; }
12
14
  @font-face { font-family: "Doc Segoe"; src: local("Segoe UI Semibold"), local("SegoeUI-Semibold"); font-weight: 600; ascent-override: 100%; descent-override: 25%; line-gap-override: 0%; }
@@ -16,15 +18,19 @@
16
18
 
17
19
  :root {
18
20
  color-scheme: light dark;
19
- --doc-bg: light-dark(#fcfcfc, #181818);
21
+ /* The page: #2d2d2d on white in light, #262626 where the platform is Apple's (below), its own pair in dark; the lines below are the text at a strength. */
22
+ --doc-bg: light-dark(#ffffff, #181818);
20
23
  --doc-surface: light-dark(#ffffff, #202020);
21
- --doc-text: light-dark(#1d1d1f, #f3f3f3);
24
+ --doc-text: light-dark(#2d2d2d, #f3f3f3); /* the text: #2d2d2d, and #262626 on an Apple platform (the user's of 2026-11-08, below) */
22
25
  --doc-muted: light-dark(#6e6e73, #a1a1a6);
23
- --doc-border: light-dark(rgb(29 29 31 / 12%), rgb(243 243 243 / 13%));
24
- --doc-grid: light-dark(rgb(29 29 31 / 8%), rgb(243 243 243 / 8%));
26
+ --doc-border: light-dark(rgb(44 44 43 / 12%), rgb(243 243 243 / 13%));
27
+ --doc-grid: light-dark(rgb(44 44 43 / 8%), rgb(243 243 243 / 8%));
25
28
  --doc-accent: light-dark(#2678d8, #72adf0);
26
29
  --doc-accent-soft: light-dark(#eaf3fd, #172a3d);
27
- --doc-list-marker: light-dark(rgb(20 86 240), rgb(76 136 255)); /* list numbers and bullets: Feishu's blue */
30
+ /* List numbers and bullets: a blue of their own (the user's #2e7cd1 of 2026-11-07, a purer blue than the palette's
31
+ #387dc9 that links take; in dark the same hue at the dark palette's lightness, where the palette's #5e87c9 leans
32
+ gray), quieter than Feishu's, whose place and shapes they keep. */
33
+ --doc-list-marker: light-dark(#2e7cd1, #5492d4);
28
34
  --doc-success: var(--doc-series-3);
29
35
  --doc-warning: var(--doc-series-2);
30
36
  /* Cursor Canvas category red; the other Gallery series colors stay unchanged. */
@@ -37,13 +43,20 @@
37
43
  --doc-series-4: light-dark(#927ab8, #b4a0d2);
38
44
  --doc-series-5: light-dark(#c04848, #fc6b83);
39
45
  --doc-series-6: light-dark(#65bdba, #89d1ce);
40
- /* System UI fonts: Apple's, then Segoe UI with its line on its glyphs on Windows (Doc Segoe,
41
- above), then Chinese ones. */
42
- --doc-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Doc Segoe", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
46
+ /* PingFang SC first (the user's feedback of 2026-11-06, notes/建议1.txt): where the system has it
47
+ (macOS, iOS) the whole text, Chinese, Latin and figures, is set in it, whatever the page's lang;
48
+ elsewhere the system's UI fonts as before: Apple's, then Segoe UI with its line on its glyphs on
49
+ Windows (Doc Segoe, above), then Microsoft YaHei for Chinese. */
50
+ --doc-font: "PingFang SC", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Doc Segoe", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
43
51
  --doc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "PT Mono", "Liberation Mono", monospace;
44
- /* Links in the text: the muted gray in every block, on a thin line of Notion's gray always shown. */
45
- --doc-link: var(--doc-muted);
46
- --doc-link-line: light-dark(rgb(55 53 47 / 40%), rgb(255 255 255 / 28.2%));
52
+ /* Links in the text: the palette's blue (colors.mjs, .doc-text-blue: the format bar's 蓝色) in every block, with
53
+ no line but under the pointer, a thin one of the same blue there (the user's of 2026-11-07, Feishu's way). A link
54
+ shown with its icon and a page block (mention.css) keep Notion's look: the muted gray on a thin line of Notion's
55
+ gray always shown. */
56
+ --doc-link: light-dark(#387dc9, #5e87c9);
57
+ --doc-link-line: currentColor;
58
+ --doc-mention: var(--doc-muted);
59
+ --doc-mention-line: light-dark(rgb(55 53 47 / 40%), rgb(255 255 255 / 28.2%));
47
60
  /* Inline code (as Notion): red text on a faint fill. */
48
61
  --doc-code-inline: light-dark(#cf5148, #e8776d);
49
62
  --doc-code-inline-fill: var(--doc-hover);
@@ -52,12 +65,16 @@
52
65
  --doc-compact-figure-max-width: 520px;
53
66
  --doc-page-gutter: 20px;
54
67
  --doc-wide-gutter: clamp(12px, 2.5vw, 40px);
55
- /* A detail card (dialog.css): the room on each side of its text, how far it stays from the
56
- window's sides (a reader's card goes up to them), the room above and below it, where a press
57
- closes it, and its scrollbar's width. */
58
- --doc-dialog-side: 40px;
59
- --doc-dialog-edge: 0px;
60
- --doc-dialog-block-gutter: 40px;
68
+ /* A detail card (dialog.css), a little smaller than the workbench's settings dialogs (写作偏好's
69
+ 880 by 86% of the window, at most 900): its width, its height (80% of the window, at most 760px;
70
+ the window is the page's own, or in a workbench the workbench's, whose height the editor's
71
+ session gives as --doc-dialog-window-height: src/editor/page/session.mjs), the least room between
72
+ it and the window's sides, where a press closes it, the least room on each side of its text (the
73
+ reading column, centred where the card is wider), and its scrollbar's width. */
74
+ --doc-dialog-width: 760px;
75
+ --doc-dialog-height: min(calc(0.8 * var(--doc-dialog-window-height, 100dvh)), 760px);
76
+ --doc-dialog-margin: 24px;
77
+ --doc-dialog-pad: 48px;
61
78
  --doc-dialog-scrollbar: 10px;
62
79
  /* The gap above and below a block, one name per distinct gap (docs/render.md says which block
63
80
  takes which). A component (a card, a table, a callout, a row of columns, a widget) and a divider
@@ -118,8 +135,8 @@
118
135
  --doc-flow-line: light-dark(rgb(55 53 47 / 38%), rgb(255 255 255 / 34%));
119
136
  --doc-flow-badge: light-dark(rgb(55 53 47 / 8%), rgb(255 255 255 / 10%));
120
137
  /* The thin scrollbars the kit draws over a table's frame (tables.js). */
121
- --doc-scrollbar-thumb: light-dark(rgb(29 29 31 / 24%), rgb(243 243 243 / 26%));
122
- --doc-scrollbar-thumb-active: light-dark(rgb(29 29 31 / 42%), rgb(243 243 243 / 44%));
138
+ --doc-scrollbar-thumb: light-dark(rgb(44 44 43 / 24%), rgb(243 243 243 / 26%));
139
+ --doc-scrollbar-thumb-active: light-dark(rgb(44 44 43 / 42%), rgb(243 243 243 / 44%));
123
140
  /* Code blocks in Notion's look (its panel, monospace, toolbar and Prism colors), independent of
124
141
  chart categories. The room above and below the words of a code block's title and a disclosure's
125
142
  (their header row: code.css, details.css), one design for the two. */
@@ -158,11 +175,87 @@
158
175
  --doc-diff-removed-strip: light-dark(rgb(248 81 73 / 55%), rgb(248 81 73 / 55%));
159
176
  --doc-chart-axis-font-size: 13px;
160
177
  --doc-table-fill: var(--doc-bg);
178
+ /* Cards (docs/render.md, Design defaults, "Cards"): a custom page's ground and the board's frame around each card
179
+ (board.css), and the language Gallery's own blocks draw their faces in, which an Agent's block uses
180
+ too (references/pages-and-data.md). One accent, Gallery's own blue (the list markers'), used
181
+ sparingly: an icon's chip, a ring or bar toward a target, a day done; green and red only for a state
182
+ that is good or bad; everything else the text and its muted gray. Dark is its own pair of surfaces
183
+ (a ground, a card a step lighter with a faint top edge), never the light one inverted. */
184
+ --gallery-page-fill: light-dark(#f8f8f7, #181818);
185
+ --gallery-card-fill: light-dark(#ffffff, #212121);
186
+ --gallery-card-line: light-dark(rgb(28 25 20 / 9%), rgb(255 255 255 / 8%));
187
+ --gallery-card-radius: 14px;
188
+ --gallery-card-pad: 18px;
189
+ --gallery-card-shadow: 0 1px 2px light-dark(rgb(28 25 20 / 4.5%), rgb(0 0 0 / 24%)), 0 8px 20px -10px light-dark(rgb(28 25 20 / 10%), rgb(0 0 0 / 45%)), inset 0 1px 0 light-dark(rgb(255 255 255 / 0%), rgb(255 255 255 / 4.5%));
190
+ --gallery-accent: light-dark(#2e7cd1, #5c9ad9);
191
+ --gallery-accent-soft: light-dark(rgb(46 124 209 / 9%), rgb(92 154 217 / 15%));
192
+ --gallery-good: light-dark(#2b8a4e, #5dbb7c);
193
+ --gallery-good-soft: light-dark(rgb(43 138 78 / 10%), rgb(93 187 124 / 14%));
194
+ --gallery-bad: light-dark(#c8473d, #f07d72);
195
+ --gallery-bad-soft: light-dark(rgb(200 71 61 / 9%), rgb(240 125 114 / 14%));
196
+ --gallery-neutral-soft: light-dark(rgb(33 27 23 / 5.5%), rgb(255 255 255 / 7%));
197
+ /* What a ring, a bar or an empty day stands on: the track. */
198
+ --gallery-track: light-dark(rgb(33 27 23 / 7%), rgb(255 255 255 / 8%));
199
+ /* A card's head: its icon in a tinted rounded square (the chip), its title, a quiet meta text. */
200
+ --gallery-chip-size: 26px;
201
+ --gallery-chip-radius: 8px;
202
+ --gallery-chip-icon: 15px;
203
+ --gallery-title-size: 14px;
204
+ --gallery-title-line: 20px;
205
+ --gallery-meta-size: 12px;
206
+ /* The rows of a card's face stand this far apart. */
207
+ --gallery-face-gap: 10px;
208
+ /* A card's ink: the document's text in light; in dark a softer white than the document's #f3f3f3 (which
209
+ on a card's #212121 makes Chinese words look heavy and lit), a step brighter for its titles and big
210
+ numbers. The muted gray stays the document's. */
211
+ --gallery-text: light-dark(var(--doc-text), rgb(255 255 255 / 82%));
212
+ --gallery-text-strong: light-dark(var(--doc-text), rgb(255 255 255 / 90%));
213
+ /* A big number: its weight and tracking, figures of one width; its unit a smaller muted word after it,
214
+ this far from it (of the unit's own size), the same in every block. Two sizes: the hero, a card's one
215
+ main number (a countdown's days, a streak, a temperature, a heatmap's total), and the figure, a
216
+ number among others (the stats' cells, a ring's middle on a large ring). */
217
+ --gallery-numeral-weight: 600;
218
+ --gallery-numeral-tracking: -.025em;
219
+ --gallery-unit-size: .4em;
220
+ --gallery-unit-gap: .3em;
221
+ --gallery-hero-size: 40px;
222
+ --gallery-figure-size: 28px;
161
223
  }
162
224
 
163
225
  :root[data-doc-theme="light"] { color-scheme: light; }
164
226
  :root[data-doc-theme="dark"] { color-scheme: dark; }
165
227
 
228
+ /* The document's look (字体与布局: its doc.json's look, which the render puts on <html> as
229
+ data-doc-font, data-doc-size, data-doc-spacing and data-doc-measure; src/shared/document-look.mjs),
230
+ written here by kit-build.mjs from the values above (src/render/look-css.mjs): a rule of those
231
+ attributes giving the tokens their values for the serif or the mixed font (--doc-font the serif,
232
+ --doc-sans-font what it was; --doc-heading-font the serif), a size, a spacing and a width, in pixels,
233
+ and --doc-space, the factor the gaps are taken at, for a margin a stylesheet writes
234
+ in pixels of its own (calc(26px * var(--doc-space, 1)): a heading's, the title's). With none of
235
+ them, as a document without a look is, nothing here applies. */
236
+ :root[data-doc-font="serif"] { --doc-sans-font: "PingFang SC", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Doc Segoe", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; --doc-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif; }
237
+ :root[data-doc-font="mixed"] { --doc-heading-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif; }
238
+ :root[data-doc-size="small"] { --doc-body-font-size: 15px; --doc-body-line-height: 24px; --doc-small-font-size: 12px; --doc-small-line-height: 17px; --doc-note-font-size: 13px; --doc-note-line-height: 19px; --doc-title-font-size: 26px; --doc-title-line-height: 34px; --doc-h1-font-size: 24px; --doc-h1-line-height: 33px; --doc-h2-font-size: 21px; --doc-h2-line-height: 29px; --doc-h3-font-size: 19px; --doc-h3-line-height: 27px; --doc-h4-font-size: 15px; --doc-h4-line-height: 23px; --doc-card-title-font-size: 17px; --doc-card-title-line-height: 24px; --doc-table-font-size: 14px; --doc-table-line-height: 19px; }
239
+ :root[data-doc-size="large"] { --doc-body-font-size: 18px; --doc-body-line-height: 29px; --doc-small-font-size: 15px; --doc-small-line-height: 21px; --doc-note-font-size: 16px; --doc-note-line-height: 23px; --doc-title-font-size: 32px; --doc-title-line-height: 41px; --doc-h1-font-size: 29px; --doc-h1-line-height: 40px; --doc-h2-font-size: 25px; --doc-h2-line-height: 35px; --doc-h3-font-size: 23px; --doc-h3-line-height: 32px; --doc-h4-font-size: 18px; --doc-h4-line-height: 27px; --doc-card-title-font-size: 20px; --doc-card-title-line-height: 28px; --doc-table-font-size: 17px; --doc-table-line-height: 23px; }
240
+ :root[data-doc-spacing="compact"] { --doc-body-line-height: 24px; --doc-small-line-height: 17px; --doc-note-line-height: 19px; --doc-title-line-height: 34px; --doc-h1-line-height: 34px; --doc-h2-line-height: 29px; --doc-h3-line-height: 26px; --doc-h4-line-height: 22px; --doc-card-title-line-height: 24px; --doc-table-line-height: 19px; --doc-component-gap: 15px; --doc-block-gap: 12px; --doc-media-gap: 11px; --doc-paragraph-gap: 9px; --doc-group-gap: 6px; --doc-list-gap: 4px; --doc-space: 0.75; }
241
+ :root[data-doc-spacing="loose"] { --doc-body-line-height: 28px; --doc-small-line-height: 19px; --doc-note-line-height: 21px; --doc-title-line-height: 38px; --doc-h1-line-height: 38px; --doc-h2-line-height: 33px; --doc-h3-line-height: 30px; --doc-h4-line-height: 26px; --doc-card-title-line-height: 26px; --doc-table-line-height: 21px; --doc-component-gap: 25px; --doc-block-gap: 20px; --doc-media-gap: 18px; --doc-paragraph-gap: 15px; --doc-group-gap: 10px; --doc-list-gap: 6px; --doc-space: 1.25; }
242
+ :root[data-doc-measure="narrow"] { --doc-content-max-width: 648px; }
243
+ :root[data-doc-measure="wide"] { --doc-content-max-width: 776px; }
244
+ :root[data-doc-size="small"][data-doc-spacing="compact"] { --doc-body-line-height: 23px; --doc-small-line-height: 16px; --doc-note-line-height: 18px; --doc-title-line-height: 32px; --doc-h1-line-height: 32px; --doc-h2-line-height: 28px; --doc-h3-line-height: 25px; --doc-h4-line-height: 21px; --doc-card-title-line-height: 22px; --doc-table-line-height: 18px; }
245
+ :root[data-doc-size="small"][data-doc-spacing="loose"] { --doc-body-line-height: 26px; --doc-small-line-height: 18px; --doc-note-line-height: 20px; --doc-title-line-height: 35px; --doc-h1-line-height: 35px; --doc-h2-line-height: 31px; --doc-h3-line-height: 28px; --doc-h4-line-height: 24px; --doc-card-title-line-height: 25px; --doc-table-line-height: 20px; }
246
+ :root[data-doc-size="large"][data-doc-spacing="compact"] { --doc-body-line-height: 27px; --doc-small-line-height: 20px; --doc-note-line-height: 21px; --doc-title-line-height: 39px; --doc-h1-line-height: 38px; --doc-h2-line-height: 33px; --doc-h3-line-height: 30px; --doc-h4-line-height: 25px; --doc-card-title-line-height: 26px; --doc-table-line-height: 22px; }
247
+ :root[data-doc-size="large"][data-doc-spacing="loose"] { --doc-body-line-height: 32px; --doc-small-line-height: 22px; --doc-note-line-height: 24px; --doc-title-line-height: 43px; --doc-h1-line-height: 43px; --doc-h2-line-height: 37px; --doc-h3-line-height: 34px; --doc-h4-line-height: 29px; --doc-card-title-line-height: 29px; --doc-table-line-height: 24px; }
248
+
249
+ /* The text on an Apple platform (macOS, iOS, iPadOS: runtime/index.js sets data-doc-platform when the page opens, so an exported file
250
+ judges on its reader's machine): a shade darker, as its type is drawn thinner there; base.css smooths it. Dark is the same. */
251
+ :root[data-doc-platform="mac"] { --doc-text: light-dark(#262626, #f3f3f3); }
252
+ /* 衬线体: the kit's own controls (the display menu, a code block's language, a diff's counts) keep the
253
+ sans, --doc-font itself given it back on them, for what in them names --doc-font again (the display
254
+ menu's card, controls.css) takes it there. 混合体: the title and every heading in the serif, of no
255
+ weight (:where), so a document's own rule for its headings wins as the text's font they inherit does not. */
256
+ :root[data-doc-font="serif"] :is(.doc-display, .doc-code-language, .doc-diff-stats) { --doc-font: var(--doc-sans-font); font-family: var(--doc-font); }
257
+ :where(:root[data-doc-font="mixed"] :is(.doc-title, h1, h2, h3, h4)) { font-family: var(--doc-heading-font); }
258
+
166
259
  /* The kit's words a stylesheet shows (--doc-word-<key>: an empty code block's title), written here
167
260
  from its table (src/render/kit/words.js, STYLE_WORDS) by kit-build.mjs: Chinese, and English where
168
261
  Gallery says its UI is (data-ge-language="en") or, in a file of its own, the page's lang is en. */
@@ -170,7 +263,7 @@
170
263
  :root[data-ge-language="en"], :root:not([data-ge-language])[lang|="en" i] { --doc-word-code-title: "Code"; }
171
264
 
172
265
  @media (max-width: 640px) {
173
- :root { --doc-page-gutter: 12px; }
266
+ :root { --doc-page-gutter: 12px; --doc-dialog-margin: 12px; --doc-dialog-pad: 16px; }
174
267
  }
175
268
 
176
269
  /* The document itself: the body's type and colors, holding the first paint until the page is
@@ -203,11 +296,14 @@ body {
203
296
  font-size: var(--doc-body-font-size);
204
297
  line-height: var(--doc-body-line-height);
205
298
  }
299
+ /* On an Apple platform (runtime/index.js) the type is smoothed as the system's own apps' is; the workbench's frame has it, a document in its iframe does not inherit it. */
300
+ :root[data-doc-platform="mac"] body { -webkit-font-smoothing: antialiased; }
206
301
 
207
302
  /* Hold the first paint until ui.js marks the page ready: by then the reader's theme and width
208
303
  are applied and the report's scripts have set up Sheets, charts, tables and formulas, so the
209
- page never flashes an intermediate state. If that never happens, reveal it anyway. */
210
- :root:not([data-doc-ready]) body:has(> .doc-page) {
304
+ page never flashes an intermediate state. If that never happens, reveal it anyway. A custom page
305
+ (main.gallery-page) is held the same way, until its board has placed its cards (board/). */
306
+ :root:not([data-doc-ready]) body:has(> :is(.doc-page, .gallery-page)) {
211
307
  visibility: hidden;
212
308
  animation: doc-reveal 0s linear 1.2s forwards;
213
309
  }
@@ -215,8 +311,11 @@ body {
215
311
 
216
312
  button, input, select, textarea { font: inherit; }
217
313
 
218
- /* A link is gray with a thin line under it, clear of Chinese characters, under the pointer as anywhere. */
219
- a { color: var(--doc-link); text-decoration: underline .05em var(--doc-link-line); text-underline-offset: .2em; }
314
+ /* A link is the palette's blue with no line under it, a thin one (1px, clear of Chinese characters) only while the
315
+ pointer is on it. The pointer's rule weighs what `a` weighs, so a link of a look of its own (a bookmark, a file,
316
+ a detail card's, one shown with its icon: their classes) never takes the line from it. */
317
+ a { color: var(--doc-link); text-decoration: none; text-underline-offset: .2em; }
318
+ a:where(:hover) { text-decoration: underline 1px var(--doc-link-line); }
220
319
  /* Underlined text: the line clear of Chinese characters, in inline code's red. */
221
320
  u { text-decoration: underline 2px var(--doc-code-inline); text-underline-offset: .3em; text-decoration-skip-ink: none; }
222
321
  /* An underline's line in another color than the red, or thinner or heavier than its 2px (the page
@@ -249,17 +348,27 @@ code:where(:not(:is(.doc-code > pre, .doc-diff-body) code)) {
249
348
  (runtime/spacing.js holds it in this span as the page renders). */
250
349
  .doc-range { white-space: nowrap; }
251
350
 
351
+ /* A long run (a path, a URL, a long identifier: more than 20 characters with no place to break inside
352
+ it, src/shared/long-runs.mjs) breaks where its line ends, an ordinary word staying whole:
353
+ runtime/spacing.js holds it in this span as the page renders (the page editor marks a block
354
+ holding one: editor/page/long-runs.mjs). Punctuation keeps its rules (no line starts with ,。)). */
355
+ .doc-long-run { word-break: break-all; }
356
+
252
357
  /* Inline text colors and highlights (<span class="doc-text-red">): Notion's nine colors
253
358
  (its text and background colors, light and dark). The page editor's selection toolbar writes
254
359
  these classes; both follow the light/dark theme. A text color is also --doc-ink, for a
255
360
  component that takes it over (a code block's plain text, a list item's marker, a formula block).
256
361
  A background is --doc-fill, and its deep shade --doc-fill-deep (its color's text color),
257
- for a line a component draws along its fill (a callout's). */
362
+ for a line a component draws along its fill (a callout's). Words in a line (a span: the format
363
+ bar's 背景颜色, an Agent's <mark>) take --doc-mark instead, a step deeper than a block's fill and
364
+ square: Notion keeps its inline colors apart from its block colors, Feishu's highlight on words
365
+ is deeper than its block backgrounds, and the user found the words' fill too faint (2026-11-06). */
258
366
  /* The fill a color class sets is its host's own, not passed down to what stands in it: a table's cell
259
367
  takes its own fill or the table's (table.css), never that of the panel or disclosure around it;
260
368
  a callout without a color its own default's, never the line of the panel it stands in. */
261
369
  @property --doc-fill { syntax: "*"; inherits: false; }
262
370
  @property --doc-fill-deep { syntax: "*"; inherits: false; }
371
+ @property --doc-mark { syntax: "*"; inherits: false; }
263
372
  .doc-text-gray { --doc-ink: var(--doc-muted); color: var(--doc-ink); }
264
373
  .doc-text-brown { --doc-ink: light-dark(#9f765a, #ba856f); color: var(--doc-ink); }
265
374
  .doc-text-orange { --doc-ink: light-dark(#d27b2d, #c77d48); color: var(--doc-ink); }
@@ -270,19 +379,20 @@ code:where(:not(:is(.doc-code > pre, .doc-diff-body) code)) {
270
379
  .doc-text-pink { --doc-ink: light-dark(#c14c8a, #d15796); color: var(--doc-ink); }
271
380
  .doc-text-red { --doc-ink: light-dark(#cf5148, #df5452); color: var(--doc-ink); }
272
381
  /* What every host of a color class has: the fill, as its background. Its corners are its host's own, one declaration
273
- each (a span here, a paragraph and heading below, a list item in flow.css, a card or a disclosure in its own
274
- stylesheet); a block that takes no corners is square, and says nothing. */
382
+ each (a paragraph and heading below, a list item in flow.css, a card or a disclosure in its own
383
+ stylesheet); a span and a block that takes no corners are square, and say nothing. */
275
384
  :is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-highlight-yellow, .doc-highlight-green, .doc-highlight-blue, .doc-highlight-purple, .doc-highlight-pink, .doc-highlight-red) { background: var(--doc-fill); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
276
- span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-highlight-yellow, .doc-highlight-green, .doc-highlight-blue, .doc-highlight-purple, .doc-highlight-pink, .doc-highlight-red) { border-radius: 3px; }
277
- .doc-highlight-gray { --doc-fill: light-dark(#f0efed, #383836); --doc-fill-deep: var(--doc-muted); }
278
- .doc-highlight-brown { --doc-fill: light-dark(#f5ede9, #45362d); --doc-fill-deep: light-dark(#9f765a, #ba856f); }
279
- .doc-highlight-orange { --doc-fill: light-dark(#fbebde, #53361f); --doc-fill-deep: light-dark(#d27b2d, #c77d48); }
280
- .doc-highlight-yellow { --doc-fill: light-dark(#f9f3dc, #504425); --doc-fill-deep: light-dark(#cb9434, #ca9849); }
281
- .doc-highlight-green { --doc-fill: light-dark(#e8f1ec, #263d30); --doc-fill-deep: light-dark(#50946e, #529e72); }
282
- .doc-highlight-blue { --doc-fill: light-dark(#e5f2fc, #233850); --doc-fill-deep: light-dark(#387dc9, #5e87c9); }
283
- .doc-highlight-purple { --doc-fill: light-dark(#f3ebf9, #3c2d47); --doc-fill-deep: light-dark(#9a6bb4, #9d68d3); }
284
- .doc-highlight-pink { --doc-fill: light-dark(#fae9f1, #4e2b3c); --doc-fill-deep: light-dark(#c14c8a, #d15796); }
285
- .doc-highlight-red { --doc-fill: light-dark(#fce9e7, #502c29); --doc-fill-deep: light-dark(#cf5148, #df5452); }
385
+ /* Words in a line take the words' fill, deeper than a block's (Notion's inline colors are their own). */
386
+ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-highlight-yellow, .doc-highlight-green, .doc-highlight-blue, .doc-highlight-purple, .doc-highlight-pink, .doc-highlight-red) { background: var(--doc-mark); }
387
+ .doc-highlight-gray { --doc-fill: light-dark(#f0efed, #383836); --doc-fill-deep: var(--doc-muted); --doc-mark: light-dark(#e0dfdd, #454542); }
388
+ .doc-highlight-brown { --doc-fill: light-dark(#f5ede9, #45362d); --doc-fill-deep: light-dark(#9f765a, #ba856f); --doc-mark: light-dark(#efdbce, #534034); }
389
+ .doc-highlight-orange { --doc-fill: light-dark(#fbebde, #53361f); --doc-fill-deep: light-dark(#d27b2d, #c77d48); --doc-mark: light-dark(#fbddc5, #654025); }
390
+ .doc-highlight-yellow { --doc-fill: light-dark(#f9f3dc, #504425); --doc-fill-deep: light-dark(#cb9434, #ca9849); --doc-mark: light-dark(#f8eab6, #614f26); }
391
+ .doc-highlight-green { --doc-fill: light-dark(#e8f1ec, #263d30); --doc-fill-deep: light-dark(#50946e, #529e72); --doc-mark: light-dark(#cfead9, #2c4b3a); }
392
+ .doc-highlight-blue { --doc-fill: light-dark(#e5f2fc, #233850); --doc-fill-deep: light-dark(#387dc9, #5e87c9); --doc-mark: light-dark(#cde5fb, #294564); }
393
+ .doc-highlight-purple { --doc-fill: light-dark(#f3ebf9, #3c2d47); --doc-fill-deep: light-dark(#9a6bb4, #9d68d3); --doc-mark: light-dark(#ebdaf6, #4b3859); }
394
+ .doc-highlight-pink { --doc-fill: light-dark(#fae9f1, #4e2b3c); --doc-fill-deep: light-dark(#c14c8a, #d15796); --doc-mark: light-dark(#f8d7e6, #5d3548); }
395
+ .doc-highlight-red { --doc-fill: light-dark(#fce9e7, #502c29); --doc-fill-deep: light-dark(#cf5148, #df5452); --doc-mark: light-dark(#fed7d1, #663632); }
286
396
 
287
397
  /* A block's color (颜色 in the page editor's block menu, Notion's block colors): the same classes on
288
398
  a paragraph or heading color its whole text, or put a background behind the whole block. The
@@ -306,6 +416,55 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
306
416
  .doc-kit-error { display: none; }
307
417
  }
308
418
 
419
+ /* A block online that waits for the reader's consent (the kit's runtime, net.js): a line and a button
420
+ after it in a document, over its card on a custom page (the card is the board's, position: relative),
421
+ its fill the card's so that what the block drew underneath does not show through. Never in a file,
422
+ an export or on paper (data-doc-dev). */
423
+ .doc-net-consent {
424
+ display: flex;
425
+ flex-wrap: wrap;
426
+ align-items: center;
427
+ gap: 8px 12px;
428
+ margin: 8px 0;
429
+ padding: 8px 12px;
430
+ border-radius: 6px;
431
+ color: var(--doc-muted);
432
+ background: var(--doc-surface);
433
+ font: 13px/1.5 var(--doc-font);
434
+ }
435
+ /* 允许 is the card's one action: a button with no line, the pale blue fill of a primary (the editor's look.mjs
436
+ BUTTONS and the workbench's, from the document's own accent), a deeper one under the pointer and pressed. */
437
+ .doc-net-consent-allow {
438
+ padding: 4px 10px;
439
+ border: 0;
440
+ border-radius: 6px;
441
+ color: color-mix(in srgb, var(--doc-accent) 80%, var(--doc-text));
442
+ background: color-mix(in srgb, var(--doc-accent) 14%, transparent);
443
+ font: inherit;
444
+ font-weight: 500;
445
+ cursor: pointer;
446
+ overflow-wrap: anywhere;
447
+ transition: background-color 20ms ease-in;
448
+ }
449
+ .doc-net-consent-allow:is(:hover, :focus-visible) { outline: none; background: color-mix(in srgb, var(--doc-accent) 22%, transparent); }
450
+ .doc-net-consent-allow:active { background: color-mix(in srgb, var(--doc-accent) 30%, transparent); }
451
+ .gallery-card > .doc-net-consent {
452
+ position: absolute;
453
+ inset: 0;
454
+ z-index: 1;
455
+ flex-direction: column;
456
+ flex-wrap: nowrap;
457
+ justify-content: center;
458
+ margin: 0;
459
+ padding: 12px;
460
+ border-radius: inherit;
461
+ text-align: center;
462
+ background: var(--gallery-card-fill, var(--doc-surface));
463
+ }
464
+ @media print {
465
+ .doc-net-consent { display: none; }
466
+ }
467
+
309
468
  @media (prefers-reduced-motion: reduce) {
310
469
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
311
470
  }
@@ -326,7 +485,11 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
326
485
  /* A run with no place to break (a long path or URL in prose, a callout or inline code) breaks
327
486
  where it would leave its line, as a cell's, a caption's and a code block's already do: unbroken,
328
487
  it widened the page past a 360px window. break-word, not anywhere: a word still counts whole
329
- for min-content, so a table's columns and a card's least width stay as they were. */
488
+ for min-content. The page's words are whole at a line's end (word-break: normal), in a Chinese
489
+ page as in an English one; a long run (more than 20 characters with no place to break inside it,
490
+ src/shared/long-runs.mjs) breaks where its line ends instead of going whole to the next one: the
491
+ kit holds it in a span that breaks anywhere (.doc-long-run, base.css; runtime/spacing.js), the
492
+ page editor marks a block holding one (page/long-runs.mjs). */
330
493
  overflow-wrap: break-word;
331
494
  }
332
495
 
@@ -376,7 +539,7 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
376
539
  /* The title keeps one gap below it, whatever comes next, in the header or after it (a line under it,
377
540
  body text, a card, a section): its margin collapses with the next block's, through the header. */
378
541
  .doc-title {
379
- margin: 0 0 32px;
542
+ margin: 0 0 calc(32px * var(--doc-space, 1));
380
543
  font-size: var(--doc-title-font-size);
381
544
  font-weight: 600;
382
545
  line-height: var(--doc-title-line-height);
@@ -433,7 +596,9 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
433
596
  transition: color 100ms ease-in-out, background-color 100ms ease-in-out;
434
597
  }
435
598
 
436
- .doc-display-button:hover,
599
+ /* An icon button: the icon darkens under the pointer, the gray only while it is pressed or its menu is open. */
600
+ .doc-display-button:hover { color: var(--doc-text); }
601
+
437
602
  .doc-display-button[aria-expanded="true"] {
438
603
  color: var(--doc-text);
439
604
  background: var(--doc-hover);
@@ -617,6 +782,122 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
617
782
  .doc-display { display: none; }
618
783
  }
619
784
 
785
+ /* A choice (runtime/choice.js): the menu card a <select> and DocKit.choose open instead of the browser's
786
+ popup, and the quiet look a <select> has where nobody gave it one. The card is the display menu's
787
+ (controls.css): radius 10, Notion's popup surface and shadow, rows of 28px that take one light fill
788
+ under the pointer or the keys, the chosen row checked at its right (no empty column before the words
789
+ on the others), as wide as its rows (the trigger's width at least, 320px at most, its words cut by an
790
+ ellipsis past that). It stands in the top layer (a popover, so no z-index of the page covers it);
791
+ z-index is for a browser without popovers. */
792
+
793
+ .doc-choice {
794
+ position: fixed;
795
+ inset: auto;
796
+ left: 0;
797
+ top: 0;
798
+ z-index: 1100;
799
+ box-sizing: border-box;
800
+ width: max-content;
801
+ max-width: min(320px, calc(100vw - 16px));
802
+ margin: 0;
803
+ padding: 4px 0;
804
+ overflow-x: hidden;
805
+ overflow-y: auto;
806
+ overscroll-behavior: contain;
807
+ scrollbar-width: thin;
808
+ border: 0;
809
+ border-radius: 10px;
810
+ color: var(--doc-text);
811
+ background: light-dark(#ffffff, #252525);
812
+ box-shadow:
813
+ 0 0 0 1px light-dark(rgb(42 28 0 / 7%), #383836),
814
+ 0 20px 24px light-dark(rgb(25 25 25 / 5%), rgb(0 0 0 / 20%)),
815
+ 0 5px 8px light-dark(rgb(25 25 25 / 2.7%), rgb(0 0 0 / 12%));
816
+ font: 14px/1.2 var(--doc-font);
817
+ user-select: none;
818
+ transition: opacity 120ms ease-out;
819
+ }
820
+
821
+ @starting-style {
822
+ .doc-choice { opacity: 0; }
823
+ }
824
+
825
+ .doc-choice-row {
826
+ display: flex;
827
+ align-items: center;
828
+ gap: 8px;
829
+ min-height: 28px;
830
+ margin: 0 4px 1px;
831
+ padding: 0 8px;
832
+ border-radius: 6px;
833
+ cursor: pointer;
834
+ transition: background-color 20ms ease-in;
835
+ }
836
+
837
+ /* Under the pointer, or reached with the keys: one light fill, as every menu's rows. */
838
+ .doc-choice-row.is-active { background: var(--doc-hover); }
839
+ .doc-choice-row:active { background: var(--doc-press); }
840
+ .doc-choice-row[aria-disabled="true"] { opacity: .45; cursor: default; }
841
+ .doc-choice-row[aria-disabled="true"]:active { background: transparent; }
842
+
843
+ .doc-choice-label {
844
+ flex: 1 1 auto;
845
+ min-width: 0;
846
+ overflow: hidden;
847
+ text-overflow: ellipsis;
848
+ white-space: nowrap;
849
+ }
850
+
851
+ /* The chosen row: a check at its right. */
852
+ .doc-choice-check {
853
+ flex: none;
854
+ width: 16px;
855
+ height: 16px;
856
+ fill: none;
857
+ stroke: currentColor;
858
+ stroke-width: 1.7;
859
+ stroke-linecap: round;
860
+ stroke-linejoin: round;
861
+ }
862
+
863
+ /* An <optgroup>'s name: a small heading, no row. */
864
+ .doc-choice-group {
865
+ padding: 6px 12px 2px;
866
+ color: var(--doc-muted);
867
+ font-size: 12px;
868
+ font-weight: 500;
869
+ }
870
+
871
+ .doc-choice-group:not(:first-child) { margin-top: 4px; }
872
+
873
+ /* A <select> nobody styled: no frame, a light fill that darkens under the pointer, the browser's own
874
+ arrow at its right (kept whatever the page sets as border or background, which a drawn arrow would
875
+ lose). A class's or a block's own rule outweighs this (it has no weight); a list box (multiple) is
876
+ the browser's. */
877
+ :where(select:not([multiple], [size])) {
878
+ min-height: 28px;
879
+ padding: 0 4px 0 8px;
880
+ border: 0;
881
+ border-radius: 6px;
882
+ color: var(--doc-text);
883
+ background-color: var(--doc-hover);
884
+ font: inherit;
885
+ cursor: pointer;
886
+ }
887
+
888
+ :where(select:not([multiple], [size]):hover) { background-color: var(--doc-press); }
889
+
890
+ :where(select:not([multiple], [size]):focus-visible) {
891
+ outline: 2px solid var(--doc-accent);
892
+ outline-offset: 2px;
893
+ }
894
+
895
+ /* On paper a <select> is the words of its chosen option, no arrow, and the menu is never there. */
896
+ @media print {
897
+ select { appearance: none; background-image: none; }
898
+ .doc-choice { display: none; }
899
+ }
900
+
620
901
  /* 选项卡区块 (sheets.js), as Notion's tabs: a frame 16px round (1px, Notion's line) holding a row of
621
902
  pill tabs and the panel shown, 16px in; or, with .doc-sheet-shell--plain, no frame and no room
622
903
  inside it (the tabs and the panel at the flow's edge). A tab is a pill 32px high, its name 14px:
@@ -833,10 +1114,12 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
833
1114
  .doc-math-block:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-highlight-yellow, .doc-highlight-green, .doc-highlight-blue, .doc-highlight-purple, .doc-highlight-pink, .doc-highlight-red) { padding-inline: 12px; border-radius: 10px; }
834
1115
  .doc-math-block:is(.doc-text-gray, .doc-text-brown, .doc-text-orange, .doc-text-yellow, .doc-text-green, .doc-text-blue, .doc-text-purple, .doc-text-pink, .doc-text-red) { color: var(--doc-ink); }
835
1116
 
836
- /* A link shown as its page's icon and title (图标视图, 页面块: shared/components/mention.mjs): the
837
- link's color and line as any link's (base.css), the icon before the title, a little taller than
838
- a capital and on the text's middle, rounded a little, the line under the title alone; an empty
839
- icon is a globe drawn in the link's color. */
1117
+ /* A link shown as its page's icon and title (图标视图, 页面块: shared/components/mention.mjs): Notion's
1118
+ look, not a text link's blue (base.css): the muted gray on a thin line always shown, under the pointer
1119
+ too (--doc-mention, --doc-mention-line), the icon before the title, a little taller than a capital
1120
+ and on the text's middle, rounded a little, the line under the title alone; an empty icon is a
1121
+ globe drawn in the link's color. */
1122
+ .doc-link-mention { color: var(--doc-mention); text-decoration: underline .05em var(--doc-mention-line); text-underline-offset: .2em; }
840
1123
  .doc-link-mention-icon {
841
1124
  display: inline-block;
842
1125
  width: 1.125em;
@@ -855,10 +1138,10 @@ span.doc-link-mention-icon {
855
1138
  }
856
1139
 
857
1140
  /* A page block: the address is a document's. An empty icon is a page, as a page with none has in the
858
- workbench's tree, and the pointer lights it up as Notion's page mention, a whole to click on. */
1141
+ workbench's tree (Lucide's file-text), and the pointer lights it up as Notion's page mention, a whole to click on. */
859
1142
  .doc-link-mention[href]:not([href^="http" i]) > span.doc-link-mention-icon {
860
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.75 2.75h5.5l3.5 3.5v9.5a1.5 1.5 0 0 1-1.5 1.5h-7.5a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5z'/%3E%3Cpath d='M11 2.75v3c0 .41.34.75.75.75h3'/%3E%3Cpath d='M7.25 10h5.5M7.25 13h3.5'/%3E%3C/svg%3E");
861
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.75 2.75h5.5l3.5 3.5v9.5a1.5 1.5 0 0 1-1.5 1.5h-7.5a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5z'/%3E%3Cpath d='M11 2.75v3c0 .41.34.75.75.75h3'/%3E%3Cpath d='M7.25 10h5.5M7.25 13h3.5'/%3E%3C/svg%3E");
1143
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z'/%3E%3Cpath d='M14 2v5a1 1 0 0 0 1 1h5'/%3E%3Cpath d='M10 9H8M16 13H8M16 17H8'/%3E%3C/svg%3E");
1144
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z'/%3E%3Cpath d='M14 2v5a1 1 0 0 0 1 1h5'/%3E%3Cpath d='M10 9H8M16 13H8M16 17H8'/%3E%3C/svg%3E");
862
1145
  }
863
1146
  .doc-link-mention[href]:not([href^="http" i]):hover {
864
1147
  border-radius: 1px;
@@ -965,6 +1248,9 @@ span.doc-link-mention-icon {
965
1248
  }
966
1249
  .doc-code-range::before { content: "·"; margin: 0 6px; }
967
1250
 
1251
+ /* The toolbar shows only while the pointer is over the block or the focus is in it (notion-lite's
1252
+ code actions), folded or not; a diff's counts always (what changed, not a control: its copy shows
1253
+ under the pointer, below). */
968
1254
  .doc-code-tools {
969
1255
  grid-area: 1 / 5;
970
1256
  display: flex;
@@ -975,7 +1261,6 @@ span.doc-link-mention-icon {
975
1261
  }
976
1262
  :is(.doc-code, .doc-diff):hover > .doc-code-tools,
977
1263
  .doc-code-tools:focus-within,
978
- .doc-code--folded > .doc-code-tools,
979
1264
  .doc-diff > .doc-code-tools { opacity: 1; pointer-events: auto; }
980
1265
  .doc-code-toolbar {
981
1266
  display: flex;
@@ -1013,8 +1298,8 @@ span.doc-link-mention-icon {
1013
1298
  :is(.doc-code-copy, .doc-code-wrap) svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
1014
1299
  :is(.doc-code-copy, .doc-code-wrap):hover { background: var(--doc-hover); }
1015
1300
 
1016
- /* Folded, its language and copy show at the right all the time, alone, with no bar (Feishu's; its
1017
- language is not picked then). */
1301
+ /* Folded, its toolbar is its language and copy alone, with no bar (Feishu's look; its language is
1302
+ not picked then), shown under the pointer as an open block's. */
1018
1303
  .doc-code--folded .doc-code-toolbar { background: none; box-shadow: none; }
1019
1304
  .doc-code--folded :is(.doc-code-separator, .doc-code-wrap) { display: none; }
1020
1305
 
@@ -1140,13 +1425,12 @@ span.doc-link-mention-icon {
1140
1425
 
1141
1426
  /* A narrow screen (the kit's narrowest breakpoint): a code block shows its code whole, its lines
1142
1427
  wrapped (a frame height of its own, a size, still holds: sizes.css), its title wraps rather than
1143
- being cut, and its toolbar lies over the header's right end when it shows (the pointer or the focus
1144
- in the block), taking no room from the title; a folded block's too. */
1428
+ being cut, and its toolbar lies over the header's right end when it shows (the pointer over the
1429
+ block or the focus in it), taking no room from the title. */
1145
1430
  @media (max-width: 420px) {
1146
1431
  .doc-code > pre { max-height: var(--doc-code-height, none); }
1147
1432
  .doc-code-title { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
1148
1433
  .doc-code > .doc-code-tools { position: absolute; top: 4px; right: 0; }
1149
- .doc-code--folded:not(:hover) > .doc-code-tools:not(:focus-within) { opacity: 0; pointer-events: none; }
1150
1434
  }
1151
1435
 
1152
1436
  /* A code block's color (颜色 in the page editor's block menu, base.css's classes): its background, or
@@ -1199,24 +1483,26 @@ span.doc-link-mention-icon {
1199
1483
  /* Its text keeps the flow's gaps (flow.css), and a text, code or formula block at its edges takes none (these rules
1200
1484
  weigh as much as a component's own margin and stand before the components' files, which win): a
1201
1485
  card, a table, a callout or a disclosure first or last in it keeps its own margins, a panel's
1202
- inside being the one place a component is spaced as it is among text. A column's, a disclosure's
1203
- and a detail card's edges take none whatever the block (flow.css). */
1204
- :is(.doc-summary, .doc-panel) > :where(:first-child, .doc-icon + *) { margin-top: 0; }
1205
- :is(.doc-summary, .doc-panel) > :where(:last-child) { margin-bottom: 0; }
1486
+ inside being the one place a component is spaced as it is among text. A callout's blocks are
1487
+ spaced as a panel's, by the same rules (callout.css: one kind of block, its own look). A column's,
1488
+ a disclosure's and a detail card's edges take none whatever the block (flow.css). */
1489
+ :is(.doc-summary, .doc-panel, .doc-callout) > :where(:first-child, .doc-icon + *) { margin-top: 0; }
1490
+ :is(.doc-summary, .doc-panel, .doc-callout) > :where(:last-child) { margin-bottom: 0; }
1206
1491
 
1207
1492
  /* ---------- body text in flows ----------
1208
1493
  A flow is the page itself, a Sheet panel, the content of a section, the opening
1209
- summary, a highlight panel, a disclosure, a dialog or a column, and of a plain <div> (no class) grouping
1210
- blocks inside any of them but the page and a panel. The text blocks of a flow (its own
1494
+ summary, a highlight panel, a callout, a disclosure, a dialog, a column or a slot of an instance of a component
1495
+ package (data-doc-slot), and of a plain <div> (no class) grouping blocks inside any of them but the
1496
+ page and a panel. The text blocks of a flow (its own
1211
1497
  paragraphs, headings, lists, quotes and rules) read the same wherever they sit, and the rules
1212
- stop at them: the inside of a card, table, callout or report widget keeps its own styles, so a
1498
+ stop at them: the inside of a card, table or report widget keeps its own styles, so a
1213
1499
  component looks the same in any flow too. The flows are the components' descriptions' (flow,
1214
1500
  and the parts edited as flow: src/shared/components/): the one list of them is the selector
1215
1501
  below, which every rule of the flow nests in (&), and a unit test holds it to the descriptions.
1216
1502
  The rules have no weight (:where, and & has none of its own), so any component or report class
1217
1503
  wins. */
1218
1504
 
1219
- :where(.doc-page, .doc-section, .doc-summary, .doc-panel, .doc-details-content, .doc-dialog-content, [data-doc-sheet], .doc-column, :is(.doc-section, .doc-summary, .doc-panel, .doc-details-content, .doc-dialog-content, .doc-column) > div:not([class])) {
1505
+ :where(.doc-page, .doc-section, .doc-summary, .doc-panel, .doc-callout, .doc-details-content, .doc-dialog-content, [data-doc-sheet], .doc-column, [data-doc-slot], :is(.doc-section, .doc-summary, .doc-panel, .doc-callout, .doc-details-content, .doc-dialog-content, .doc-column, [data-doc-slot]) > div:not([class])) {
1220
1506
  & > :where(p),
1221
1507
  & > :where(ul, ol, blockquote) :where(p) {
1222
1508
  margin: 0 0 var(--doc-paragraph-gap);
@@ -1231,30 +1517,30 @@ span.doc-link-mention-icon {
1231
1517
  }
1232
1518
  & > :where(h1),
1233
1519
  & > :where(ul, ol) :where(li) > :where(h1) {
1234
- margin: 26px 0 10px;
1520
+ margin: calc(26px * var(--doc-space, 1)) 0 calc(10px * var(--doc-space, 1));
1235
1521
  font-size: var(--doc-h1-font-size);
1236
1522
  line-height: var(--doc-h1-line-height);
1237
1523
  }
1238
1524
  & > :where(h2),
1239
1525
  & > :where(ul, ol) :where(li) > :where(h2) {
1240
- margin: 22px 0 8px;
1526
+ margin: calc(22px * var(--doc-space, 1)) 0 calc(8px * var(--doc-space, 1));
1241
1527
  font-size: var(--doc-h2-font-size);
1242
1528
  line-height: var(--doc-h2-line-height);
1243
1529
  }
1244
1530
  & > :where(h3),
1245
1531
  & > :where(ul, ol) :where(li) > :where(h3) {
1246
- margin: 20px 0 8px;
1532
+ margin: calc(20px * var(--doc-space, 1)) 0 calc(8px * var(--doc-space, 1));
1247
1533
  font-size: var(--doc-h3-font-size);
1248
1534
  line-height: var(--doc-h3-line-height);
1249
1535
  }
1250
1536
  & > :where(h4),
1251
1537
  & > :where(ul, ol) :where(li) > :where(h4) {
1252
- margin: 16px 0 8px;
1538
+ margin: calc(16px * var(--doc-space, 1)) 0 calc(8px * var(--doc-space, 1));
1253
1539
  font-size: var(--doc-h4-font-size);
1254
1540
  line-height: var(--doc-h4-line-height);
1255
1541
  }
1256
1542
  & > :where(ul, ol) {
1257
- margin: 10px 0 var(--doc-block-gap);
1543
+ margin: calc(10px * var(--doc-space, 1)) 0 var(--doc-block-gap);
1258
1544
  padding-inline-start: 1.625em;
1259
1545
  }
1260
1546
  /* One gap between any two items, as Notion's and Feishu's: between items of a level, from an item
@@ -1276,7 +1562,7 @@ span.doc-link-mention-icon {
1276
1562
  & > :where(ul:not([class]), ol:not([class])), & :where(ol.doc-flow > li) > :where(ul:not([class]), ol:not([class])) {
1277
1563
  &, & :where(li > :is(ul, ol)) { list-style: none; }
1278
1564
  & :where(li) { position: relative; }
1279
- /* Lists (Feishu's): their markers the kit's, blue, left of the text: numbers 1., a., i. by depth,
1565
+ /* Lists (Feishu's place and shapes): their markers the kit's, in their own blue (--doc-list-marker), left of the text: numbers 1., a., i. by depth,
1280
1566
  each list from its start (or an item's value), right-aligned 6px from the text; bullets a dot, a
1281
1567
  ring, a square by depth, 16px left of the text, on the middle of the first line. A list with a
1282
1568
  class of its own keeps the browser's markers. */
@@ -1320,7 +1606,7 @@ span.doc-link-mention-icon {
1320
1606
  :where(&:is(ol):has(> li[value]), & li > ol:has(> li[value])) > li::marker { color: var(--doc-list-marker); }
1321
1607
  }
1322
1608
 
1323
- & > :where(p, ul, ol, blockquote, h1, h2, h3, h4) :where(strong) { font-weight: 600; }
1609
+ & > :where(p, ul, ol, blockquote, h1, h2, h3, h4) :where(strong) { font-weight: 700; }
1324
1610
 
1325
1611
  /* A quote and a divider (in the flow, or held by one of its list items: the same look, there the
1326
1612
  list's one gap above it and none below, as any block an item holds, none at its sides). */
@@ -1349,8 +1635,8 @@ span.doc-link-mention-icon {
1349
1635
  the tabs' margin). */
1350
1636
  :is(.doc-column, .doc-details-content, .doc-dialog-content) > :first-child { margin-top: 0; }
1351
1637
  :is(.doc-column, .doc-details-content, .doc-dialog-content, [data-doc-sheet]) > :last-child { margin-bottom: 0; }
1352
- /* A text block the reader left empty (a line of space, as in Notion) is one line high: a callout's
1353
- text and a disclosure's title too. */
1638
+ /* A text block the reader left empty (a line of space, as in Notion) is one line high: a disclosure's
1639
+ title too, and a callout the file has empty (an empty one of the editor's before 2026-11-07). */
1354
1640
  .doc-page :where(p, h1, h2, h3, h4, li, .doc-callout, .doc-details-summary-label):empty::after { content: "\200b"; }
1355
1641
 
1356
1642
  /* An item's color (颜色 in the page editor's block menu, notion-lite's: base.css's classes): a text
@@ -1476,7 +1762,7 @@ ol.doc-flow > li {
1476
1762
  border-radius: 8px;
1477
1763
  background: var(--doc-surface);
1478
1764
  box-shadow: none;
1479
- font-weight: 600; /* a step written the short way: its own words its title */
1765
+ font-weight: 700; /* a step written the short way: its own words its title, bold as a <strong> is (flow.css) */
1480
1766
  overflow-wrap: anywhere;
1481
1767
  break-inside: avoid;
1482
1768
  }
@@ -2009,7 +2295,6 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2009
2295
  border-radius: 6px;
2010
2296
  color: inherit;
2011
2297
  background: color-mix(in srgb, currentColor 8%, transparent);
2012
- box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 9%, transparent);
2013
2298
  font: inherit;
2014
2299
  font-weight: inherit;
2015
2300
  line-height: inherit;
@@ -2052,20 +2337,19 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2052
2337
  :root.doc-dialog-open.doc-dialog-gutter { scrollbar-gutter: stable; }
2053
2338
  }
2054
2339
 
2055
- /* The reading column and 40px on each side of it, up to the page's sides (their edge while the page
2056
- is edited, dialog/): 100% is the window less a scrollbar's room kept, as it is for the page. Height
2057
- follows the content; long content stops at the viewport gutters and scrolls inside. A modal
2058
- dialog is fixed with inset 0, so `auto` would stretch it; `fit-content` matches the UA default. */
2340
+ /* The card is the workbench's settings dialogs' (组件列表, 写作偏好, Notion's centred dialog), a
2341
+ little smaller: 760 wide and 80% of the window high (at most 760), at least 24px clear of the
2342
+ window's sides (12px on a phone), whatever it holds, centred (a modal dialog is fixed with inset 0
2343
+ and margin auto); what it holds scrolls inside it. 100% is the window less a scrollbar's room kept,
2344
+ as it is for the page. The same while the page is edited. No header, no line, no close button.
2345
+ Their radius and their shadow (the workbench's --shaOutLg, light and dark). */
2059
2346
  .doc-dialog {
2060
- width: min(
2061
- calc(var(--doc-content-max-width) + (2 * var(--doc-dialog-side))),
2062
- calc(100% - (2 * var(--doc-dialog-edge)))
2063
- );
2064
- height: fit-content;
2347
+ width: min(var(--doc-dialog-width), calc(100% - (2 * var(--doc-dialog-margin))));
2348
+ height: min(var(--doc-dialog-height), calc(100dvh - (2 * var(--doc-dialog-margin))));
2065
2349
  min-width: 0;
2066
2350
  max-width: none;
2067
2351
  min-height: 0;
2068
- max-height: calc(100dvh - (2 * var(--doc-dialog-block-gutter)));
2352
+ max-height: none;
2069
2353
  margin: auto;
2070
2354
  padding: 0;
2071
2355
  overflow: hidden;
@@ -2073,26 +2357,53 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2073
2357
  border-radius: 12px;
2074
2358
  color: var(--doc-text);
2075
2359
  background: var(--doc-surface);
2076
- box-shadow: 0 0 0 1px var(--doc-border), 0 6px 14px rgb(15 15 15 / 8%), 0 18px 48px rgb(15 15 15 / 18%);
2360
+ box-shadow: 0 20px 24px rgb(25 25 25 / 5%), 0 5px 8px rgb(25 25 25 / 2.7%), 0 0 0 1px rgb(42 28 0 / 7%);
2077
2361
  }
2362
+ :root[data-doc-theme="dark"] .doc-dialog { box-shadow: 0 0 0 1px #383836, 0 14px 28px -6px rgb(25 25 25 / 20%), 0 2px 4px -1px rgb(25 25 25 / 11.8%); }
2078
2363
 
2079
- /* It comes up from a little below, the backdrop fading in. */
2364
+ @media (prefers-color-scheme: dark) {
2365
+ :root:not([data-doc-theme="light"]) .doc-dialog { box-shadow: 0 0 0 1px #383836, 0 14px 28px -6px rgb(25 25 25 / 20%), 0 2px 4px -1px rgb(25 25 25 / 11.8%); }
2366
+ }
2367
+
2368
+ /* Its middle is the middle of the window it stands in. In a workbench the page is a frame right of
2369
+ the sidebar and under the top bar, and the workbench's window is the one (the workbench covers its
2370
+ own bars, the frame's backdrop the rest: features/report/cards.ts); the editor's session gives
2371
+ where that window's middle falls in the page's (--doc-dialog-centre-x and -y, from the frame's
2372
+ place: src/editor/page/session.mjs), and the card goes that far from the frame's middle, as far as
2373
+ the frame lets it stay 24px clear of the frame's sides (never cut off): where the frame is too
2374
+ narrow or low for that, it stands nearer the frame's middle, in it where the frame has no more room
2375
+ than the card needs. Moved by its insets, a box as wide as the frame, never by a transform, which
2376
+ would make the card the containing block of the editor's fixed tools in it. Unsaid (a page on its
2377
+ own, an export), its middle is the page's window's. */
2378
+ .doc-dialog:modal {
2379
+ --doc-dialog-shift-x: clamp(-1 * var(--doc-dialog-room-x), calc(var(--doc-dialog-centre-x, 50%) - 50%), var(--doc-dialog-room-x));
2380
+ --doc-dialog-shift-y: clamp(-1 * var(--doc-dialog-room-y), calc(var(--doc-dialog-centre-y, 50%) - 50%), var(--doc-dialog-room-y));
2381
+ --doc-dialog-room-x: max(0px, calc((100% - min(var(--doc-dialog-width), calc(100% - (2 * var(--doc-dialog-margin))))) / 2 - var(--doc-dialog-margin)));
2382
+ --doc-dialog-room-y: max(0px, calc((100% - min(var(--doc-dialog-height), calc(100% - (2 * var(--doc-dialog-margin))))) / 2 - var(--doc-dialog-margin)));
2383
+ inset: var(--doc-dialog-shift-y) calc(-1 * var(--doc-dialog-shift-x)) calc(-1 * var(--doc-dialog-shift-y)) var(--doc-dialog-shift-x);
2384
+ }
2385
+
2386
+ /* It comes up as the settings dialogs do (their pop-in: 2px from above, 0.12s), the backdrop, their
2387
+ overlay's color (light 60%, dark 80%; the workbench's underlay outside a frame is the same, its
2388
+ --overlay), fading in where their overlay comes at once: the workbench's underlay hears of a card
2389
+ from the page a frame or two after it opens, and the fade, which it has too, hides that. Plain
2390
+ colors: a ::backdrop inherits from nothing in some browsers. */
2080
2391
  .doc-dialog[open] {
2081
2392
  display: flex;
2082
2393
  flex-direction: column;
2083
- animation: doc-dialog-in 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
2394
+ animation: doc-dialog-in 0.12s ease-out;
2084
2395
  }
2085
2396
 
2086
- .doc-dialog::backdrop { background: rgb(15 15 15 / 36%); }
2397
+ .doc-dialog::backdrop { background: rgb(15 15 15 / 60%); }
2087
2398
  .doc-dialog[open]::backdrop { animation: doc-dialog-fade 0.16s ease-out; }
2088
- :root[data-doc-theme="dark"] .doc-dialog::backdrop { background: rgb(0 0 0 / 55%); }
2399
+ :root[data-doc-theme="dark"] .doc-dialog::backdrop { background: rgb(15 15 15 / 80%); }
2089
2400
 
2090
2401
  @media (prefers-color-scheme: dark) {
2091
- :root:not([data-doc-theme="light"]) .doc-dialog::backdrop { background: rgb(0 0 0 / 55%); }
2402
+ :root:not([data-doc-theme="light"]) .doc-dialog::backdrop { background: rgb(15 15 15 / 80%); }
2092
2403
  }
2093
2404
 
2094
2405
  @keyframes doc-dialog-in {
2095
- from { opacity: 0; transform: translateY(8px) scale(0.985); }
2406
+ from { opacity: 0; transform: translateY(-2px); }
2096
2407
  }
2097
2408
 
2098
2409
  @keyframes doc-dialog-fade {
@@ -2112,22 +2423,17 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2112
2423
  flex-direction: column;
2113
2424
  }
2114
2425
 
2115
- /* Its text is the page's at any window: the reading column, and on a window narrower than the card
2116
- as far from the window's side as the page's text (--doc-dialog-inset: the page's gutter, less
2117
- what stands between the card and that side). Room for what it holds from the start (a card just
2118
- made holds a heading and an empty line), no more than the card may be high. What is scrolled into view keeps the content's padding
2119
- clear of the card's edges (scroll-padding, which the browser's caret following and
2120
- scrollIntoView both keep): the caret in the last block, or a block made at the end, takes the
2426
+ /* Its text is the reading column, centred, at most 712px and at least --doc-dialog-pad (48px; 16px
2427
+ on a phone) from the card's sides (--doc-dialog-inset). What is scrolled into view keeps the
2428
+ content's padding clear of the card's edges (scroll-padding, which the browser's caret following
2429
+ and scrollIntoView both keep): the caret in the last block, or a block made at the end, takes the
2121
2430
  content to its very end, the padding under it shown, where the browser stopped with that block
2122
2431
  against the card's bottom edge. 8px more below than the padding: the caret's box is its glyphs',
2123
2432
  a few pixels short of its line (the scroll stops at the end all the same). */
2124
2433
  .doc-dialog-content {
2125
- --doc-dialog-inset: max(
2126
- calc(var(--doc-page-gutter) - var(--doc-dialog-edge)),
2127
- calc((100% - var(--doc-content-max-width)) / 2)
2128
- );
2434
+ --doc-dialog-inset: max(var(--doc-dialog-pad), calc((100% - var(--doc-content-max-width)) / 2));
2129
2435
  min-width: 0;
2130
- min-height: min(160px, calc(100dvh - (2 * var(--doc-dialog-block-gutter))));
2436
+ min-height: 0;
2131
2437
  max-width: 100%;
2132
2438
  flex: 1 1 auto;
2133
2439
  padding: 32px var(--doc-dialog-inset) 40px;
@@ -2284,8 +2590,8 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2284
2590
  scroll height are sizes (sizes.css). A table is lines on the page (Notion's and Feishu's): the
2285
2591
  frame's rounded line around it and one line between every two rows and every two columns, all
2286
2592
  one color (--doc-hairline); no fills of its own. A header cell (th) looks as any other: its
2287
- gray and its bold are looks it was given (the page editor's 标题行 and 标题列 give them), it only
2288
- sticks. The frame and the table are one: the table fills the frame to its edge, the frame's
2593
+ gray and its bold are looks it was given (the page editor's 标题行 gives them; its 标题列 none:
2594
+ a header column only sticks), it only sticks. The frame and the table are one: the table fills the frame to its edge, the frame's
2289
2595
  line drawn over it. The line is drawn once wherever it lies: in dark it is a light veil over what
2290
2596
  is under it (tokens.css), so that it shows on a gray header cell and beside a gray highlight
2291
2597
  block as on the page, and a line drawn over another would be lighter there. In a block with a
@@ -2328,18 +2634,19 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2328
2634
  .doc-table-wrap[data-doc-whole] { max-height: var(--doc-table-height, none); }
2329
2635
  .doc-table-wrap:has(> .doc-scrollbars[data-y]) { overscroll-behavior-block: none; }
2330
2636
 
2331
- /* The frame's scrollbars (tables.js): a layer stuck at the frame's top-left that takes no room,
2332
- with a rail along the right edge and one along the bottom for each axis that overflows
2333
- (data-y, data-x), each thumb 3px in from the frame's edge. tables.js sets each rail's place
2334
- (the part of the edge that scrolls: below the header, between the rounded corners) and its
2335
- track, thumb size and thumb offset (--doc-scrollbar-*). They show while the pointer is
2336
- over the frame or it scrolls. */
2637
+ /* The frame's scrollbars (tables.js): a layer stuck at the frame's top-left that takes no room (no
2638
+ height; as wide as the frame's inside, which it never makes wider, so that the frame's line is
2639
+ as wide as the frame in the same layout as the frame: below), with a rail along the right edge
2640
+ and one along the bottom for each axis that overflows (data-y, data-x), each thumb 3px in from
2641
+ the frame's edge. tables.js sets each rail's place (the part of the edge that scrolls: below the
2642
+ header, between the rounded corners) and its track, thumb size and thumb offset
2643
+ (--doc-scrollbar-*). They show while the pointer is over the frame or it scrolls. */
2337
2644
  .doc-scrollbars {
2338
2645
  position: sticky;
2339
2646
  top: 0;
2340
2647
  left: 0;
2341
2648
  z-index: 6;
2342
- width: 0;
2649
+ width: 100%;
2343
2650
  height: 0;
2344
2651
  }
2345
2652
  .doc-scrollbar {
@@ -2377,11 +2684,14 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2377
2684
  }
2378
2685
  .doc-scrollbar:is(:hover, [data-drag]) > .doc-scrollbar-thumb { background: var(--doc-scrollbar-thumb-active); }
2379
2686
  /* The frame's line above everything in the frame (a header row or column that sticks over the
2380
- outline too): as big as the frame (tables.js), on the layer stuck at its top-left. */
2687
+ outline too): as big as the frame, on the layer stuck at its top-left; as wide as the layer, so
2688
+ as the frame whenever the frame is laid out (a width read and written later by a script could
2689
+ disagree with it for a frame), as tall as tables.js reads the frame. */
2381
2690
  .doc-scrollbars-frame {
2382
2691
  position: absolute;
2383
2692
  top: 0;
2384
2693
  left: 0;
2694
+ width: 100%;
2385
2695
  box-sizing: border-box;
2386
2696
  border: 1px solid var(--doc-table-frame);
2387
2697
  border-radius: var(--doc-table-radius);
@@ -2429,6 +2739,10 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2429
2739
  /* Keys moving into a frame that scrolls: the accent's line in place of its own. */
2430
2740
  .doc-table-wrap:focus-visible { outline: 2px solid var(--doc-accent); outline-offset: -2px; }
2431
2741
 
2742
+ /* A cell's words break as the page's do (word-break inherited: an ordinary word whole at a line's
2743
+ end, a long run anywhere in the span the kit holds it in, .doc-long-run, page.css), a word wider
2744
+ than its column anywhere too (overflow-wrap); what a table keeps whole says so below: its headers,
2745
+ a short field, inline code. */
2432
2746
  .doc-table th,
2433
2747
  .doc-table td {
2434
2748
  padding: 10px 9px; /* Notion's 9px at the sides */
@@ -2440,7 +2754,6 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2440
2754
  text-align: left;
2441
2755
  vertical-align: top;
2442
2756
  white-space: normal;
2443
- word-break: break-word;
2444
2757
  }
2445
2758
  /* A cell left empty is one line high, as a text block left empty is (flow.css): a row of empty cells
2446
2759
  is as tall as a row of words from the first paint on, not flat until the page editor makes the
@@ -2469,12 +2782,21 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2469
2782
  .doc-table :is(td, th) > :is(ul, ol):last-child { margin-bottom: 0; }
2470
2783
  .doc-table :is(td, th) > :is(ul, ol) > li + li { margin-top: 2px; }
2471
2784
 
2785
+ /* A picture in a cell (单元格里的图片, an <img> amid its words): as wide as its width says (pixels; the
2786
+ page editor's drag of its edge writes it), with none at most 240px, never past its cell; its height
2787
+ by its own ratio, its middle on the line's, so a row grows with it. */
2788
+ .doc-table :is(td, th) img { max-width: 100%; height: auto; vertical-align: middle; }
2789
+ .doc-table :is(td, th) img:not([width]) { max-width: min(100%, 240px); }
2790
+
2472
2791
  .doc-table--auto { table-layout: fixed; max-width: none; }
2473
2792
  .doc-table [data-column-kind="compact"] { white-space: nowrap; word-break: normal; }
2474
- .doc-table [data-column-kind="narrative"] { overflow-wrap: break-word; word-break: normal; }
2793
+ .doc-table [data-column-kind="narrative"] { overflow-wrap: break-word; }
2794
+ /* No word-break here: a compact cell that wraps (data-column-wrap="") keeps the compact rule's normal
2795
+ above, a column of paths (token-heavy) the page's (its long runs breaking anywhere). */
2475
2796
  .doc-table [data-column-kind="token-heavy"],
2476
- .doc-table [data-column-wrap] { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
2797
+ .doc-table [data-column-wrap] { white-space: normal; overflow-wrap: anywhere; }
2477
2798
  .doc-table [data-column-kind] code { white-space: inherit; }
2799
+ /* A short field (compact) keeps its pieces whole (a number, (1606)): its column's floor is the widest of them (layout.js). */
2478
2800
  /* Words kept whole (keep-all: a line breaks at a space or a punctuation mark, never between the
2479
2801
  characters of a Chinese word): a header's (标准差, 区间, a unit in brackets: (%)) and a short
2480
2802
  field's that wraps (卷数 beside columns of prose: 六十卷、 / 目录一卷; tables/layout.js), where its
@@ -2483,6 +2805,9 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2483
2805
  the browser lays the table out) keeps them whole too. */
2484
2806
  .doc-table th:not([data-column-wrap]),
2485
2807
  .doc-table [data-column-wrap="words"] { word-break: keep-all; }
2808
+ /* What a header or a short field keeps whole, a long run in it too: the span the kit holds the run in
2809
+ (.doc-long-run, base.css) breaks as its cell does. */
2810
+ .doc-table :is(th:not([data-column-wrap]), [data-column-wrap="words"], [data-column-kind="compact"]) .doc-long-run { word-break: inherit; }
2486
2811
  /* Inline code in a cell breaks only after a slash or at a space (a path at its folders, never at a
2487
2812
  hyphen or inside a word): its runs (tables/cells.js, as the page renders; not while the page
2488
2813
  editor edits the cell) each kept on one line, a break allowed between them. A column the kit sizes
@@ -2532,8 +2857,8 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2532
2857
  /* A cell's look (the page editor's table tools write these classes on its td or th): a text color
2533
2858
  (base.css), a fill over the whole cell (base.css's: a cell is square, and one that sticks wears it too, above), bold words (the words
2534
2859
  typed in it later too), and an alignment over the kit's own (a numeric column's centre), a vertical one (the kit's: top). A header
2535
- row's and column's look is these: .doc-highlight-gray and .doc-bold. */
2536
- .doc-table :is(td, th).doc-bold { font-weight: 600; }
2860
+ row's look is these: .doc-highlight-gray and .doc-bold (a header column has none of its own). */
2861
+ .doc-table :is(td, th).doc-bold { font-weight: 700; }
2537
2862
  .doc-table :is(td, th).doc-align-left { text-align: left; }
2538
2863
  .doc-table :is(td, th).doc-align-center { text-align: center; }
2539
2864
  .doc-table :is(td, th).doc-align-right { text-align: right; }
@@ -2629,19 +2954,22 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2629
2954
  .doc-table-meta > span:not([class]) + :not([class]):last-child { display: block; float: none; margin: 4px 0 0; }
2630
2955
  }
2631
2956
 
2632
- /* 提示块: inline text set apart on a fill, with a line at its left in that fill's deep shade. Its
2633
- color is the background it is given (颜色 in the page editor's block menu, base.css's classes:
2634
- --doc-fill and --doc-fill-deep), and with none the palette's blue (src/shared/colors.mjs),
2635
- the same as one given that blue. A text color colors its words only. Its corners are square;
2636
- the editor's selection lies 6px past it, round (--doc-box-reach: what it wraps, base.css). */
2957
+ /* 提示块: blocks set apart on a fill, with a line at its left in that fill's deep shade. It holds
2958
+ blocks as a highlight block does (its paragraphs, lists, code…: they read as in any flow, flow.css,
2959
+ its first and last taking no margin outside them, highlight.css); one written the old way, words
2960
+ straight in it, shows them as its one paragraph. Its color is the background it is given (颜色 in
2961
+ the page editor's block menu, base.css's classes: --doc-fill and --doc-fill-deep), and with none
2962
+ the palette's blue (src/shared/colors.mjs), the same as one given that blue; its fill is that
2963
+ color taken a little toward the page's background (the user's, 2026-11-07: a little lighter),
2964
+ its line that color's deep shade as it is. A text color colors its words only. Its corners are
2965
+ square; the editor's selection lies 6px past it, round (--doc-box-reach: what it wraps, base.css). */
2637
2966
 
2638
2967
  .doc-callout {
2639
2968
  --doc-box-reach: 6px;
2640
2969
  margin-block: var(--doc-component-gap);
2641
2970
  padding: 12px 14px;
2642
2971
  border-left: 3px solid var(--doc-fill-deep, light-dark(#387dc9, #5e87c9));
2643
- background: var(--doc-fill, light-dark(#e5f2fc, #233850));
2644
- line-height: 1.6;
2972
+ background: color-mix(in srgb, var(--doc-fill, light-dark(#e5f2fc, #233850)) 70%, var(--doc-bg));
2645
2973
  }
2646
2974
 
2647
2975
  /* 折叠列表: a disclosure, its title row with an arrow, and its content region, a flow. It is drawn
@@ -2681,17 +3009,16 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2681
3009
  }
2682
3010
 
2683
3011
  .doc-details > summary::-webkit-details-marker { display: none; }
3012
+ /* Its words whole as the page's, a long run breaking anywhere (page.css); overflow-wrap: anywhere keeps a word from widening the title's column. */
2684
3013
  .doc-details-summary-label {
2685
3014
  min-width: 0;
2686
3015
  padding: var(--doc-block-title-padding) 16px var(--doc-block-title-padding) 0;
2687
3016
  overflow-wrap: anywhere;
2688
- word-break: break-word;
2689
3017
  }
2690
3018
 
2691
3019
  .doc-details-summary-label code {
2692
3020
  white-space: normal;
2693
3021
  overflow-wrap: anywhere;
2694
- word-break: break-word;
2695
3022
  }
2696
3023
 
2697
3024
  /* The code block's fold arrow: a small filled triangle, pointing right while the block is closed,
@@ -2732,40 +3059,62 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
2732
3059
  there, so this is all the look it has, and what reads by itself reads: a title, paragraphs, lists,
2733
3060
  a table, what a script of data holds as the kit draws it (doc-component-data: a table, keys beside
2734
3061
  their values, a list), what is wider than the page scrolling in it. In the preview a note above it
2735
- says why, to who writes the page (data-doc-dev: no export takes it, nor a presentation or paper). */
3062
+ says why, to who writes the page (data-doc-dev: no export takes it, nor a presentation or paper).
3063
+ What its slots hold (data-doc-slot) is the document's blocks, which read as in any flow (flow.css)
3064
+ whatever state it is in: this look stops at a slot (@scope … to; a browser without @scope shows
3065
+ it with none of this look, what it holds all there). */
2736
3066
 
2737
3067
  [data-doc-component] {
2738
3068
  margin: var(--doc-block-gap) 0;
2739
3069
  }
2740
- [data-doc-fallback] {
2741
- overflow-x: auto;
2742
- }
2743
- [data-doc-fallback] :where(img, svg, video, iframe) {
2744
- max-width: 100%;
2745
- }
2746
- [data-doc-fallback] :where(img, video) {
2747
- height: auto;
2748
- }
2749
- [data-doc-fallback] :where(h1, h2, h3, h4) {
2750
- margin: 12px 0 6px;
2751
- color: var(--doc-text);
2752
- font-size: var(--doc-h4-font-size);
2753
- line-height: var(--doc-h4-line-height);
2754
- font-weight: 600;
3070
+ /* [hidden] hides what is in an instance whatever display a block's style gave it: a control a block
3071
+ hides where nothing is written (an export: form.hidden = !context.canEdit()) stays hidden though its
3072
+ own rule says display: flex, which an author's rule on the class would otherwise win over the
3073
+ browser's [hidden] { display: none }. What a slot holds is the document's blocks, which keep their
3074
+ own rules (a Sheet panel, an empty figure the editor shows), so the rule stops at a slot. */
3075
+ @scope ([data-doc-component]) to ([data-doc-slot]) {
3076
+ :scope [hidden] {
3077
+ display: none !important;
3078
+ }
2755
3079
  }
2756
- [data-doc-fallback] :where(p, ul, ol, dl, table) {
2757
- margin: 0 0 8px;
3080
+ /* A slot holds the document's blocks: they read as in any flow (flow.css), the first and the last flush with it. */
3081
+ [data-doc-slot] > :where(:first-child) {
3082
+ margin-top: 0;
2758
3083
  }
2759
- [data-doc-fallback] :where(ul, ol) {
2760
- padding-inline-start: 1.625em;
3084
+ [data-doc-slot] > :where(:last-child) {
3085
+ margin-bottom: 0;
2761
3086
  }
2762
- [data-doc-fallback] :where(table) {
2763
- border-collapse: collapse;
3087
+ [data-doc-fallback] {
3088
+ overflow-x: auto;
2764
3089
  }
2765
- [data-doc-fallback] :where(th, td) {
2766
- padding: 4px 8px;
2767
- border: 1px solid var(--doc-border);
2768
- text-align: start;
3090
+ @scope ([data-doc-fallback]) to ([data-doc-slot]) {
3091
+ :scope :where(img, svg, video, iframe) {
3092
+ max-width: 100%;
3093
+ }
3094
+ :scope :where(img, video) {
3095
+ height: auto;
3096
+ }
3097
+ :scope :where(h1, h2, h3, h4) {
3098
+ margin: 12px 0 6px;
3099
+ color: var(--doc-text);
3100
+ font-size: var(--doc-h4-font-size);
3101
+ line-height: var(--doc-h4-line-height);
3102
+ font-weight: 600;
3103
+ }
3104
+ :scope :where(p, ul, ol, dl, table) {
3105
+ margin: 0 0 8px;
3106
+ }
3107
+ :scope :where(ul, ol) {
3108
+ padding-inline-start: 1.625em;
3109
+ }
3110
+ :scope :where(table) {
3111
+ border-collapse: collapse;
3112
+ }
3113
+ :scope :where(th, td) {
3114
+ padding: 4px 8px;
3115
+ border: 1px solid var(--doc-border);
3116
+ text-align: start;
3117
+ }
2769
3118
  }
2770
3119
  .doc-component-data :where(ul, dl, table) {
2771
3120
  margin: 0;