@heycys/gallery 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/browser/editor/components/align.mjs +58 -0
- package/browser/editor/components/code/index.mjs +1 -1
- package/browser/editor/components/embed/page.mjs +1 -1
- package/browser/editor/components/file/page.mjs +4 -4
- package/browser/editor/components/heading/index.mjs +7 -6
- package/browser/editor/components/icons.mjs +3 -0
- package/browser/editor/components/image/index.mjs +2 -0
- package/browser/editor/components/image/page.mjs +172 -90
- package/browser/editor/components/installed/index.mjs +6 -2
- package/browser/editor/components/installed/page.mjs +80 -13
- package/browser/editor/components/media/icons.mjs +13 -8
- package/browser/editor/components/media/page.mjs +5 -3
- package/browser/editor/components/media/toolbar.mjs +12 -3
- package/browser/editor/components/paragraph/index.mjs +4 -3
- package/browser/editor/components/registry.mjs +17 -5
- package/browser/editor/components/table/index.mjs +4 -2
- package/browser/editor/page/after/index.mjs +288 -0
- package/browser/editor/page/align.mjs +91 -0
- package/browser/editor/page/beside.mjs +5 -6
- package/browser/editor/page/block-menu/index.mjs +6 -3
- package/browser/editor/page/blocks.mjs +3 -1
- package/browser/editor/page/board/hint.mjs +64 -27
- package/browser/editor/page/board/index.mjs +160 -71
- package/browser/editor/page/board/motion.mjs +177 -0
- package/browser/editor/page/board/settings.mjs +4 -3
- package/browser/editor/page/clipboard/index.mjs +10 -3
- package/browser/editor/page/clipboard/own/blocks.mjs +3 -4
- package/browser/editor/page/clipboard/own/describe.mjs +6 -2
- package/browser/editor/page/commit.mjs +2 -2
- package/browser/editor/page/core.mjs +3 -1
- package/browser/editor/page/custom-page.mjs +15 -11
- package/browser/editor/page/editor.mjs +31 -14
- package/browser/editor/page/history.mjs +19 -4
- package/browser/editor/page/insert/index.mjs +20 -22
- package/browser/editor/page/menu.mjs +15 -7
- package/browser/editor/page/page-objects.mjs +3 -7
- package/browser/editor/page/present-links.mjs +5 -4
- package/browser/editor/page/present-shell.mjs +63 -0
- package/browser/editor/page/selection/index.mjs +10 -2
- package/browser/editor/page/table/binding.mjs +87 -0
- package/browser/editor/page/table/icons.mjs +0 -2
- package/browser/editor/page/table/index.mjs +10 -14
- package/browser/editor/page/table/views.mjs +5 -52
- package/browser/editor/page/table/widths.mjs +82 -10
- package/browser/editor/page/typing/index.mjs +44 -12
- package/browser/editor/page/typing/leave.mjs +19 -5
- package/browser/shared/block-packs.mjs +23 -8
- package/browser/shared/component-catalog.mjs +15 -8
- package/browser/shared/component-source.mjs +3 -1
- package/browser/shared/components/heading.mjs +2 -1
- package/browser/shared/components/installed.mjs +1 -1
- package/browser/shared/components/page.mjs +2 -0
- package/browser/shared/components/paragraph.mjs +8 -1
- package/browser/shared/components/table.mjs +1 -0
- package/browser/shared/emoji/line-icons.mjs +37 -0
- package/browser/shared/http.mjs +9 -0
- package/browser/shared/i18n/en.mjs +40 -17
- package/browser/shared/outline.mjs +30 -2
- package/browser/shared/pack-manifest.mjs +12 -1
- package/browser/shared/pages.mjs +169 -57
- package/browser/shared/pinyin.mjs +92 -0
- package/browser/shared/present-step.mjs +17 -0
- package/browser/shared/sidebar-head.mjs +70 -0
- package/browser/shared/web-links.mjs +5 -0
- package/dist/chunk-2OHANJ6Q.mjs +2 -0
- package/dist/{chunk-QOUEFUCH.mjs → chunk-3MBRL2PM.mjs} +1 -1
- package/dist/{chunk-NWR2LT5B.mjs → chunk-4OKWZY5E.mjs} +1 -1
- package/dist/{chunk-RMECZA2K.mjs → chunk-5K44HLTZ.mjs} +1 -1
- package/dist/{chunk-NFMCP2HI.mjs → chunk-5XA2ZBAE.mjs} +2 -2
- package/dist/{chunk-OUUP3WKT.mjs → chunk-67N2QJYT.mjs} +1 -1
- package/dist/chunk-6KBYRA2C.mjs +2 -0
- package/dist/{chunk-SX4LJYT6.mjs → chunk-6N3PX4XX.mjs} +1 -1
- package/dist/{chunk-RFDZXFJF.mjs → chunk-7JDX4E65.mjs} +1 -1
- package/dist/chunk-7M2BQQGZ.mjs +2 -0
- package/dist/{chunk-ZUNVAXLH.mjs → chunk-7OG26PGF.mjs} +1 -1
- package/dist/{chunk-B4P2CM2J.mjs → chunk-AHN3NFKJ.mjs} +1 -1
- package/dist/chunk-ALZ6ZENZ.mjs +3 -0
- package/dist/{chunk-UGWYKHBL.mjs → chunk-AR5D57ZD.mjs} +2 -2
- package/dist/{chunk-W3BGBJQW.mjs → chunk-BFJGHSQN.mjs} +1 -1
- package/dist/{chunk-HLYV7RIH.mjs → chunk-CMA72MAG.mjs} +1 -1
- package/dist/{chunk-D4CKRD3V.mjs → chunk-DAZL73VK.mjs} +2 -2
- package/dist/{chunk-6VTU6KEO.mjs → chunk-DJISHPUL.mjs} +1 -1
- package/dist/{chunk-BPL64HGA.mjs → chunk-EAIFITAV.mjs} +1 -1
- package/dist/chunk-EP25HDAJ.mjs +2 -0
- package/dist/{chunk-6EZ7FNIK.mjs → chunk-F4ZA6JRZ.mjs} +1 -1
- package/dist/{chunk-3KJHLHUO.mjs → chunk-F6HVDZR4.mjs} +1 -1
- package/dist/{chunk-3NJACR4W.mjs → chunk-FDMAXMQA.mjs} +1 -1
- package/dist/chunk-FETSREUN.mjs +5 -0
- package/dist/{chunk-RKPWLGZ3.mjs → chunk-GHOYKMQ3.mjs} +1 -1
- package/dist/chunk-HDWTZ763.mjs +12 -0
- package/dist/{chunk-VTKNEYT3.mjs → chunk-HPOI4ZX7.mjs} +1 -1
- package/dist/{chunk-OW5NWPOJ.mjs → chunk-HXG7EOPJ.mjs} +1 -1
- package/dist/{chunk-V6RIYQZZ.mjs → chunk-ITOH5EGO.mjs} +1 -1
- package/dist/{chunk-ZWPMCK7P.mjs → chunk-IV64FFI4.mjs} +1 -1
- package/dist/chunk-J43Z6LSS.mjs +2 -0
- package/dist/chunk-J5PUIV3Y.mjs +4 -0
- package/dist/{chunk-KTKHRC6H.mjs → chunk-JA7G53PC.mjs} +1 -1
- package/dist/{chunk-NWFBE2YA.mjs → chunk-JLTZF4LA.mjs} +1 -1
- package/dist/{chunk-GY3FAUVM.mjs → chunk-JZT7I2OJ.mjs} +1 -1
- package/dist/{chunk-QKXMPUXC.mjs → chunk-K5XATEOO.mjs} +1 -1
- package/dist/chunk-L2SUIS5S.mjs +2 -0
- package/dist/{chunk-TEZAWDSQ.mjs → chunk-LM4XFQHZ.mjs} +1 -1
- package/dist/{chunk-5ZJA7CXT.mjs → chunk-MN7BZL4R.mjs} +1 -1
- package/dist/chunk-MTYYHM2G.mjs +15 -0
- package/dist/{chunk-HMYTM3GT.mjs → chunk-MXUBKDRO.mjs} +1 -1
- package/dist/{chunk-MHW7ZKOU.mjs → chunk-OEXWRJME.mjs} +1 -1
- package/dist/{chunk-CRJEG7MT.mjs → chunk-OFHXGWOX.mjs} +1 -1
- package/dist/chunk-ORID3AE7.mjs +166 -0
- package/dist/{chunk-32ZUEFZ7.mjs → chunk-PGDE24N5.mjs} +1 -1
- package/dist/{chunk-UNOYVIYR.mjs → chunk-POTA2FV4.mjs} +1 -1
- package/dist/{chunk-N7AZZLGT.mjs → chunk-QE5RG76S.mjs} +18 -17
- package/dist/{chunk-N76HWBA3.mjs → chunk-R2ZDLJYT.mjs} +1 -1
- package/dist/chunk-SWUTTZCN.mjs +2 -0
- package/dist/{chunk-POQSE4C2.mjs → chunk-TR7TWGHB.mjs} +1 -1
- package/dist/chunk-U5XL7D6A.mjs +3 -0
- package/dist/{chunk-PVER7LSC.mjs → chunk-U7NZI6N4.mjs} +2 -2
- package/dist/{chunk-Q47PLKIJ.mjs → chunk-UGWMMEJ5.mjs} +1 -1
- package/dist/chunk-UJQJKNGK.mjs +2 -0
- package/dist/chunk-UYVCQK3H.mjs +22 -0
- package/dist/{chunk-FJYN7RTH.mjs → chunk-VFX2KNHP.mjs} +1 -1
- package/dist/{chunk-UBBRTJ2R.mjs → chunk-VS7JIGJW.mjs} +1 -1
- package/dist/{chunk-NVRNLK25.mjs → chunk-W7665ZEC.mjs} +2 -2
- package/dist/{chunk-NG375ILQ.mjs → chunk-WQDQWCX5.mjs} +1 -1
- package/dist/chunk-YLPSMDIS.mjs +5 -0
- package/dist/{chunk-VXACTLO3.mjs → chunk-YNAWBAYN.mjs} +1 -1
- package/dist/{chunk-ZB4H7ZN4.mjs → chunk-YROX2O22.mjs} +1 -1
- package/dist/{chunk-YQGT4AB2.mjs → chunk-ZDLPUOAG.mjs} +1 -1
- package/dist/chunk-ZQS6H473.mjs +16 -0
- package/dist/{chunk-OJKMINIU.mjs → chunk-ZWWC4KLF.mjs} +15 -15
- package/dist/cli.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/dist/worker.mjs +1 -1
- package/kit/board.css +5 -5
- package/kit/code.js +15 -15
- package/kit/report.css +120 -41
- package/kit/runtime.js +45 -7
- package/kit/tables.js +2 -0
- package/kit/ui.js +2 -0
- package/package.json +1 -1
- package/packs/gallery/chart-view/kit.js +3 -3
- package/packs/gallery/chart-view/writing.md +1 -1
- package/packs/gallery/countdown/component.json +1 -1
- package/packs/gallery/countdown/kit.js +89 -29
- package/packs/gallery/countdown/preview.svg +1 -1
- package/packs/gallery/countdown/style.css +88 -100
- package/packs/gallery/countdown/writing.md +2 -2
- package/packs/gallery/habit/component.json +3 -3
- package/packs/gallery/habit/kit.js +114 -75
- package/packs/gallery/habit/preview.svg +1 -1
- package/packs/gallery/habit/style.css +133 -205
- package/packs/gallery/habit/writing.md +2 -2
- package/packs/gallery/heatmap/component.json +2 -2
- package/packs/gallery/heatmap/kit.js +335 -173
- package/packs/gallery/heatmap/preview.svg +1 -1
- package/packs/gallery/heatmap/style.css +158 -170
- package/packs/gallery/heatmap/writing.md +2 -2
- package/packs/gallery/kanban/kit.js +3 -3
- package/packs/gallery/kanban/writing.md +1 -1
- package/packs/gallery/metric/kit.js +3 -3
- package/packs/gallery/metric/writing.md +1 -1
- package/packs/gallery/note/component.json +3 -3
- package/packs/gallery/note/kit.js +40 -13
- package/packs/gallery/note/preview.svg +1 -1
- package/packs/gallery/note/style.css +51 -30
- package/packs/gallery/note/writing.md +2 -2
- package/packs/gallery/recent/component.json +2 -2
- package/packs/gallery/recent/kit.js +141 -86
- package/packs/gallery/recent/preview.svg +1 -1
- package/packs/gallery/recent/style.css +53 -126
- package/packs/gallery/recent/writing.md +2 -2
- package/packs/gallery/static/component.json +2 -2
- package/packs/gallery/static/preview.svg +1 -1
- package/packs/gallery/static/style.css +99 -66
- package/packs/gallery/static/writing.md +2 -2
- package/packs/gallery/stats/component.json +3 -3
- package/packs/gallery/stats/kit.js +253 -72
- package/packs/gallery/stats/preview.svg +1 -1
- package/packs/gallery/stats/style.css +64 -142
- package/packs/gallery/stats/writing.md +2 -2
- package/packs/gallery/today/component.json +2 -2
- package/packs/gallery/today/kit.js +62 -27
- package/packs/gallery/today/preview.svg +1 -1
- package/packs/gallery/today/style.css +101 -72
- package/packs/gallery/today/writing.md +2 -2
- package/packs/gallery/todos/component.json +1 -1
- package/packs/gallery/todos/kit.js +218 -71
- package/packs/gallery/todos/preview.svg +1 -1
- package/packs/gallery/todos/style.css +170 -223
- package/packs/gallery/todos/writing.md +1 -1
- package/packs/gallery/weather/component.json +2 -2
- package/packs/gallery/weather/kit.js +165 -90
- package/packs/gallery/weather/preview.svg +1 -1
- package/packs/gallery/weather/style.css +100 -218
- package/packs/gallery/weather/writing.md +1 -1
- package/packs/gallery-soft/countdown/component.json +18 -0
- package/packs/gallery-soft/countdown/example.html +3 -0
- package/packs/gallery-soft/countdown/kit.js +206 -0
- package/packs/gallery-soft/countdown/preview.svg +1 -0
- package/packs/gallery-soft/countdown/style.css +211 -0
- package/packs/gallery-soft/countdown/template.html +3 -0
- package/packs/gallery-soft/countdown/writing.md +24 -0
- package/packs/gallery-soft/habit/component.json +14 -0
- package/packs/gallery-soft/habit/example.html +3 -0
- package/packs/gallery-soft/habit/kit.js +366 -0
- package/packs/gallery-soft/habit/preview.svg +1 -0
- package/packs/gallery-soft/habit/style.css +251 -0
- package/packs/gallery-soft/habit/template.html +3 -0
- package/packs/gallery-soft/habit/writing.md +23 -0
- package/packs/gallery-soft/heatmap/component.json +18 -0
- package/packs/gallery-soft/heatmap/example.html +3 -0
- package/packs/gallery-soft/heatmap/kit.js +498 -0
- package/packs/gallery-soft/heatmap/preview.svg +1 -0
- package/packs/gallery-soft/heatmap/style.css +181 -0
- package/packs/gallery-soft/heatmap/template.html +3 -0
- package/packs/gallery-soft/heatmap/writing.md +23 -0
- package/packs/gallery-soft/note/component.json +14 -0
- package/packs/gallery-soft/note/example.html +3 -0
- package/packs/gallery-soft/note/kit.js +162 -0
- package/packs/gallery-soft/note/preview.svg +1 -0
- package/packs/gallery-soft/note/style.css +148 -0
- package/packs/gallery-soft/note/template.html +3 -0
- package/packs/gallery-soft/note/writing.md +20 -0
- package/packs/gallery-soft/recent/component.json +13 -0
- package/packs/gallery-soft/recent/example.html +1 -0
- package/packs/gallery-soft/recent/kit.js +335 -0
- package/packs/gallery-soft/recent/preview.svg +1 -0
- package/packs/gallery-soft/recent/style.css +160 -0
- package/packs/gallery-soft/recent/template.html +1 -0
- package/packs/gallery-soft/recent/writing.md +17 -0
- package/packs/gallery-soft/static/component.json +13 -0
- package/packs/gallery-soft/static/example.html +12 -0
- package/packs/gallery-soft/static/preview.svg +1 -0
- package/packs/gallery-soft/static/style.css +186 -0
- package/packs/gallery-soft/static/template.html +1 -0
- package/packs/gallery-soft/static/writing.md +20 -0
- package/packs/gallery-soft/stats/component.json +13 -0
- package/packs/gallery-soft/stats/example.html +1 -0
- package/packs/gallery-soft/stats/kit.js +341 -0
- package/packs/gallery-soft/stats/preview.svg +1 -0
- package/packs/gallery-soft/stats/style.css +119 -0
- package/packs/gallery-soft/stats/template.html +1 -0
- package/packs/gallery-soft/stats/writing.md +13 -0
- package/packs/gallery-soft/today/component.json +12 -0
- package/packs/gallery-soft/today/example.html +1 -0
- package/packs/gallery-soft/today/kit.js +222 -0
- package/packs/gallery-soft/today/preview.svg +1 -0
- package/packs/gallery-soft/today/style.css +178 -0
- package/packs/gallery-soft/today/template.html +1 -0
- package/packs/gallery-soft/today/writing.md +16 -0
- package/packs/gallery-soft/todos/component.json +19 -0
- package/packs/gallery-soft/todos/example.html +3 -0
- package/packs/gallery-soft/todos/kit.js +527 -0
- package/packs/gallery-soft/todos/preview.svg +1 -0
- package/packs/gallery-soft/todos/style.css +212 -0
- package/packs/gallery-soft/todos/template.html +3 -0
- package/packs/gallery-soft/todos/writing.md +32 -0
- package/packs/gallery-soft/weather/component.json +19 -0
- package/packs/gallery-soft/weather/example.html +3 -0
- package/packs/gallery-soft/weather/kit.js +411 -0
- package/packs/gallery-soft/weather/preview.svg +1 -0
- package/packs/gallery-soft/weather/style.css +185 -0
- package/packs/gallery-soft/weather/template.html +3 -0
- package/packs/gallery-soft/weather/writing.md +28 -0
- package/release.json +9 -9
- package/skill/SKILL.md +12 -12
- package/skill/references/building-blocks.md +4 -4
- package/skill/references/pages-and-data.md +13 -9
- package/skill/references/writing-html.md +2 -0
- package/web/assets/index-BM_K-Auu.css +1 -0
- package/web/assets/index-DRslOBiv.js +15 -0
- package/web/index.html +2 -2
- package/dist/chunk-2NRBY6AJ.mjs +0 -2
- package/dist/chunk-35NQ4PLQ.mjs +0 -2
- package/dist/chunk-4AV456RQ.mjs +0 -2
- package/dist/chunk-5XYHDBJ5.mjs +0 -2
- package/dist/chunk-6A53MZYZ.mjs +0 -2
- package/dist/chunk-6EXH3ORZ.mjs +0 -166
- package/dist/chunk-BVEFGE4B.mjs +0 -2
- package/dist/chunk-D4EURAX4.mjs +0 -4
- package/dist/chunk-DQCE7TJY.mjs +0 -5
- package/dist/chunk-FWNRPMCJ.mjs +0 -12
- package/dist/chunk-FWW4CSAZ.mjs +0 -2
- package/dist/chunk-JVHHHGEA.mjs +0 -3
- package/dist/chunk-PZDLJJTJ.mjs +0 -3
- package/dist/chunk-SXHBYZST.mjs +0 -16
- package/dist/chunk-UFNYFFKO.mjs +0 -20
- package/dist/chunk-UKSHDZZ6.mjs +0 -2
- package/dist/chunk-VJPFVNNW.mjs +0 -15
- package/dist/chunk-VS3ZMVGX.mjs +0 -5
- package/web/assets/index-BK2e_07w.js +0 -13
- package/web/assets/index-CWFI83mF.css +0 -1
package/kit/report.css
CHANGED
|
@@ -131,6 +131,8 @@
|
|
|
131
131
|
palette's gray, opaque. The frame lies over the table's body, whose fill is the page's, where the
|
|
132
132
|
veil comes out the gray of a block around it. */
|
|
133
133
|
--doc-table-frame-filled: light-dark(#e6e5e3, #545450);
|
|
134
|
+
/* The hairline as it lies on the page, opaque: the right edge of a frame that scrolls sideways (table.css), under which the columns past it must not show through the dark veil. */
|
|
135
|
+
--doc-hairline-solid: light-dark(#e6e5e3, #383836);
|
|
134
136
|
/* A flowchart's arrows and the circle behind a step's number (flowchart.css): neutral greys. */
|
|
135
137
|
--doc-flow-line: light-dark(rgb(55 53 47 / 38%), rgb(255 255 255 / 34%));
|
|
136
138
|
--doc-flow-badge: light-dark(rgb(55 53 47 / 8%), rgb(255 255 255 / 10%));
|
|
@@ -176,49 +178,73 @@
|
|
|
176
178
|
--doc-chart-axis-font-size: 13px;
|
|
177
179
|
--doc-table-fill: var(--doc-bg);
|
|
178
180
|
/* 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
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--gallery-
|
|
187
|
-
--gallery-card-
|
|
188
|
-
--gallery-card-
|
|
189
|
-
--gallery-card-
|
|
190
|
-
--gallery-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
--gallery-
|
|
181
|
+
(board.css), and the language Gallery's own blocks draw their faces in (the pack 「Gallery 风格」, the
|
|
182
|
+
design B of 2026-11-09: notes/plans/block-packs-plan-2026-11-09.md), which an Agent's block uses too
|
|
183
|
+
(references/pages-and-data.md). A quiet, type-led look: each card one hero (a big number, a field of
|
|
184
|
+
squares, a list), its head saying only whose it is, the rest small and gray. One accent, a Notion blue,
|
|
185
|
+
on the data and on today alone; a warm orange for the sun and a flame; green only for a thing done.
|
|
186
|
+
White cards on the page's own white, set off by a hairline ring and a soft shadow; dark its own pair of
|
|
187
|
+
surfaces (a card a step lighter than the ground), never the light one inverted. */
|
|
188
|
+
--gallery-page-fill: light-dark(#ffffff, #191919);
|
|
189
|
+
--gallery-card-fill: light-dark(#ffffff, #202020);
|
|
190
|
+
--gallery-card-line: light-dark(rgb(15 15 15 / 7%), rgb(255 255 255 / 7.5%));
|
|
191
|
+
--gallery-card-radius: 12px;
|
|
192
|
+
--gallery-card-pad: 16px;
|
|
193
|
+
/* The ring (the card's line, drawn outside it so that it takes nothing of its cells), a close shadow and a soft
|
|
194
|
+
one under it, deeper in dark: each a color of light-dark(), as a shadow's offsets cannot be. */
|
|
195
|
+
--gallery-card-shadow: 0 0 0 1px var(--gallery-card-line), 0 1px 2px light-dark(rgb(15 15 15 / 3.5%), rgb(0 0 0 / 25%)), 0 4px 14px -6px light-dark(rgb(15 15 15 / 7%), transparent), 0 6px 16px -8px light-dark(transparent, rgb(0 0 0 / 50%));
|
|
196
|
+
/* Its ink, five steps: the big numbers and a greeting (strong), the words (text), a label or a unit
|
|
197
|
+
(muted), a caption or a head's quiet meta (faint), and the faintest, a separator or a day to come. */
|
|
198
|
+
--gallery-text-strong: light-dark(#1d1d1b, #f3f3f1);
|
|
199
|
+
--gallery-text: light-dark(#37352f, rgb(255 255 255 / 86%));
|
|
200
|
+
--gallery-muted: light-dark(#7a7975, rgb(255 255 255 / 55%));
|
|
201
|
+
--gallery-faint: light-dark(#a6a5a1, rgb(255 255 255 / 36%));
|
|
202
|
+
--gallery-faintest: light-dark(#d4d3cf, rgb(255 255 255 / 17%));
|
|
203
|
+
/* A line between rows, a soft gray fill (a chip, an empty day), the track a bar or a ring stands on,
|
|
204
|
+
and a row under the pointer. */
|
|
205
|
+
--gallery-hair: light-dark(rgb(55 53 47 / 9%), rgb(255 255 255 / 8%));
|
|
206
|
+
--gallery-fill: light-dark(rgb(55 53 47 / 5.5%), rgb(255 255 255 / 6%));
|
|
207
|
+
--gallery-track: light-dark(rgb(55 53 47 / 10%), rgb(255 255 255 / 10%));
|
|
208
|
+
--gallery-hover: light-dark(rgb(55 53 47 / 6%), rgb(255 255 255 / 5.5%));
|
|
209
|
+
--gallery-neutral-soft: var(--gallery-fill);
|
|
210
|
+
/* The accent: its fill (today, a bar, a day done), its ink (words in it), a pale fill behind a primary
|
|
211
|
+
button's words, a middle shade (the days before today's in a week's bars, the Agent's share) and a wash
|
|
212
|
+
(a field's focus). */
|
|
213
|
+
--gallery-accent: light-dark(#4084cf, #508fd6);
|
|
214
|
+
--gallery-accent-ink: light-dark(#336db0, #8bb8e9);
|
|
215
|
+
--gallery-accent-soft: light-dark(#ebf2fa, rgb(80 143 214 / 17%));
|
|
216
|
+
--gallery-accent-mid: light-dark(#b0cbeb, #395f8d);
|
|
217
|
+
--gallery-accent-wash: light-dark(rgb(64 132 207 / 11%), rgb(80 143 214 / 18%));
|
|
218
|
+
--gallery-good: light-dark(#2f9e68, #3db37a);
|
|
219
|
+
--gallery-good-ink: light-dark(#217a4e, #74d4a3);
|
|
220
|
+
--gallery-good-soft: light-dark(#e6f4ec, rgb(61 179 122 / 16%));
|
|
194
221
|
--gallery-bad: light-dark(#c8473d, #f07d72);
|
|
195
222
|
--gallery-bad-soft: light-dark(rgb(200 71 61 / 9%), rgb(240 125 114 / 14%));
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
--gallery-
|
|
199
|
-
/* A card's head: its icon in a
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
--gallery-
|
|
223
|
+
/* The warm one: the sun's chip by day, a streak's flame, a stale weather's sign. */
|
|
224
|
+
--gallery-warm: light-dark(#e08a12, #f2ae45);
|
|
225
|
+
--gallery-warm-soft: light-dark(#fdf1dd, rgb(242 174 69 / 15%));
|
|
226
|
+
/* A card's head: its icon in a small gray rounded square (the chip; warm or blue for the sun, a flame, the
|
|
227
|
+
moon), its title, a quiet meta text; 8px apart, the row 20px high. */
|
|
228
|
+
/* The cards' own type: Segoe UI on Windows, PingFang SC on a Mac, Microsoft YaHei for the Chinese Segoe UI
|
|
229
|
+
has not; as the system draws them (not the document's metrics-tuned alias, --doc-font's Doc Segoe). */
|
|
230
|
+
--gallery-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
|
|
231
|
+
--gallery-chip-size: 20px;
|
|
232
|
+
--gallery-chip-radius: 6px;
|
|
233
|
+
--gallery-chip-icon: 13px;
|
|
234
|
+
--gallery-title-size: 13px;
|
|
204
235
|
--gallery-title-line: 20px;
|
|
205
236
|
--gallery-meta-size: 12px;
|
|
206
237
|
/* The rows of a card's face stand this far apart. */
|
|
207
|
-
--gallery-face-gap:
|
|
208
|
-
/* A
|
|
209
|
-
|
|
210
|
-
|
|
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). */
|
|
238
|
+
--gallery-face-gap: 8px;
|
|
239
|
+
/* A big number: its weight and tracking, figures of one height; its unit a 13px muted word 3px after it
|
|
240
|
+
(--gallery-unit-size, a share of the number, is what a document's metric takes). Two sizes: the hero,
|
|
241
|
+
a card's one main number, and the figure, a number among others. */
|
|
217
242
|
--gallery-numeral-weight: 600;
|
|
218
243
|
--gallery-numeral-tracking: -.025em;
|
|
219
244
|
--gallery-unit-size: .4em;
|
|
220
245
|
--gallery-unit-gap: .3em;
|
|
221
|
-
--gallery-
|
|
246
|
+
--gallery-unit: 13px;
|
|
247
|
+
--gallery-hero-size: 44px;
|
|
222
248
|
--gallery-figure-size: 28px;
|
|
223
249
|
}
|
|
224
250
|
|
|
@@ -448,19 +474,48 @@ span:is(.doc-highlight-gray, .doc-highlight-brown, .doc-highlight-orange, .doc-h
|
|
|
448
474
|
}
|
|
449
475
|
.doc-net-consent-allow:is(:hover, :focus-visible) { outline: none; background: color-mix(in srgb, var(--doc-accent) 22%, transparent); }
|
|
450
476
|
.doc-net-consent-allow:active { background: color-mix(in srgb, var(--doc-accent) 30%, transparent); }
|
|
477
|
+
/* The why's words, and the button's: in a document the why and 允许访问 <host>; on a card the from line and the short words too. */
|
|
478
|
+
.doc-net-consent-words { display: contents; }
|
|
479
|
+
.doc-net-consent-from, .doc-net-consent-short { display: none; }
|
|
480
|
+
/* On a card of a custom page (the pack Gallery 风格's banner, design B): over the card under its head row, on
|
|
481
|
+
the card's fill, so that the card still says whose it is: the why (13.5px, 600) over whose the data is
|
|
482
|
+
(faint) at the left, 允许访问 at the right, a pale primary with no line; the hosts in its title. */
|
|
451
483
|
.gallery-card > .doc-net-consent {
|
|
452
484
|
position: absolute;
|
|
453
|
-
inset: 0;
|
|
485
|
+
inset: calc(var(--gallery-card-pad, 16px) + 20px) 0 0;
|
|
454
486
|
z-index: 1;
|
|
455
|
-
flex-direction: column;
|
|
456
487
|
flex-wrap: nowrap;
|
|
457
|
-
justify-content:
|
|
488
|
+
justify-content: space-between;
|
|
489
|
+
gap: 12px;
|
|
458
490
|
margin: 0;
|
|
459
|
-
padding:
|
|
460
|
-
border-radius:
|
|
461
|
-
|
|
491
|
+
padding: 0 var(--gallery-card-pad, 16px) var(--gallery-card-pad, 16px);
|
|
492
|
+
border-radius: 0 0 var(--gallery-card-radius, 12px) var(--gallery-card-radius, 12px);
|
|
493
|
+
font: 13px/1.5 var(--gallery-font, var(--doc-font));
|
|
462
494
|
background: var(--gallery-card-fill, var(--doc-surface));
|
|
463
495
|
}
|
|
496
|
+
.gallery-card > .doc-net-consent > .doc-net-consent-words { display: flex; flex-direction: column; min-width: 0; }
|
|
497
|
+
.gallery-card > .doc-net-consent .doc-net-consent-why { font-size: 13.5px; line-height: 20px; font-weight: 600; color: var(--gallery-text, var(--doc-text)); }
|
|
498
|
+
.gallery-card > .doc-net-consent .doc-net-consent-from { display: block; overflow: hidden; font-size: 12px; line-height: 18px; color: var(--gallery-faint, var(--doc-muted)); white-space: nowrap; text-overflow: ellipsis; }
|
|
499
|
+
.gallery-card > .doc-net-consent > .doc-net-consent-allow {
|
|
500
|
+
flex: none;
|
|
501
|
+
height: 30px;
|
|
502
|
+
padding: 0 14px;
|
|
503
|
+
border-radius: 8px;
|
|
504
|
+
font-size: 13px;
|
|
505
|
+
font-weight: 600;
|
|
506
|
+
white-space: nowrap;
|
|
507
|
+
color: var(--gallery-accent-ink, var(--doc-accent));
|
|
508
|
+
background: var(--gallery-accent-soft, color-mix(in srgb, var(--doc-accent) 14%, transparent));
|
|
509
|
+
}
|
|
510
|
+
.gallery-card > .doc-net-consent > .doc-net-consent-allow:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--gallery-accent, var(--doc-accent)) 18%, var(--gallery-accent-soft, transparent)); }
|
|
511
|
+
.gallery-card > .doc-net-consent .doc-net-consent-long { display: none; }
|
|
512
|
+
.gallery-card > .doc-net-consent .doc-net-consent-short { display: inline; }
|
|
513
|
+
/* On a narrow card (data-doc-net-narrow: under 240px of content, net.js) the line just over the button, both at the card's
|
|
514
|
+
foot, the button as wide as the card, as a narrow habit card's streak and 打卡 are; the line 13px, three lines at
|
|
515
|
+
most, and whose the data is left to the button's title, so that the banner fits a 2 × 2 card in either language. */
|
|
516
|
+
.gallery-card > .doc-net-consent[data-doc-net-narrow] { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 8px; }
|
|
517
|
+
.gallery-card > .doc-net-consent[data-doc-net-narrow] .doc-net-consent-why { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 17px; }
|
|
518
|
+
.gallery-card > .doc-net-consent[data-doc-net-narrow] .doc-net-consent-from { display: none; }
|
|
464
519
|
@media print {
|
|
465
520
|
.doc-net-consent { display: none; }
|
|
466
521
|
}
|
|
@@ -1639,6 +1694,21 @@ span.doc-link-mention-icon {
|
|
|
1639
1694
|
title too, and a callout the file has empty (an empty one of the editor's before 2026-11-07). */
|
|
1640
1695
|
.doc-page :where(p, h1, h2, h3, h4, li, .doc-callout, .doc-details-summary-label):empty::after { content: "\200b"; }
|
|
1641
1696
|
|
|
1697
|
+
/* A paragraph's or a heading's alignment and indent (对齐与缩进 in the page editor's block menu,
|
|
1698
|
+
Feishu's): centred or at the right (left is neither), and moved in by levels of two body characters,
|
|
1699
|
+
whatever the block's own size, its background with it (a margin, so its fill keeps to its words). */
|
|
1700
|
+
:is(p, h1, h2, h3, h4).doc-align-center { text-align: center; }
|
|
1701
|
+
:is(p, h1, h2, h3, h4).doc-align-right { text-align: right; }
|
|
1702
|
+
:is(p, h1, h2, h3, h4):is(.doc-indent-1, .doc-indent-2, .doc-indent-3, .doc-indent-4, .doc-indent-5, .doc-indent-6, .doc-indent-7, .doc-indent-8) { margin-inline-start: calc(var(--doc-indent-level) * 2 * var(--doc-body-font-size)); }
|
|
1703
|
+
.doc-indent-1 { --doc-indent-level: 1; }
|
|
1704
|
+
.doc-indent-2 { --doc-indent-level: 2; }
|
|
1705
|
+
.doc-indent-3 { --doc-indent-level: 3; }
|
|
1706
|
+
.doc-indent-4 { --doc-indent-level: 4; }
|
|
1707
|
+
.doc-indent-5 { --doc-indent-level: 5; }
|
|
1708
|
+
.doc-indent-6 { --doc-indent-level: 6; }
|
|
1709
|
+
.doc-indent-7 { --doc-indent-level: 7; }
|
|
1710
|
+
.doc-indent-8 { --doc-indent-level: 8; }
|
|
1711
|
+
|
|
1642
1712
|
/* An item's color (颜色 in the page editor's block menu, notion-lite's: base.css's classes): a text
|
|
1643
1713
|
color is its marker's too, and the items it holds take both; a background lies behind it, its
|
|
1644
1714
|
marker and the items it holds, 2px past them as a paragraph's (base.css), its part left of the
|
|
@@ -2601,6 +2671,7 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
|
|
|
2601
2671
|
|
|
2602
2672
|
.doc-table-wrap {
|
|
2603
2673
|
--doc-table-frame: var(--doc-hairline);
|
|
2674
|
+
--doc-table-frame-solid: var(--doc-hairline-solid);
|
|
2604
2675
|
position: relative;
|
|
2605
2676
|
align-self: start;
|
|
2606
2677
|
/* A share over 1 keeps the wrapper at the reading width; the table is that much wider and
|
|
@@ -2627,6 +2698,11 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
|
|
|
2627
2698
|
scrollbar-width: none;
|
|
2628
2699
|
}
|
|
2629
2700
|
.doc-table-wrap::-webkit-scrollbar { display: none; } /* WebKit without scrollbar-width */
|
|
2701
|
+
/* A table narrower than the text is placed on the page as a paragraph's words are (对齐 in the page
|
|
2702
|
+
editor's block menu, a text block's classes: components/align.mjs): at the left unless its frame
|
|
2703
|
+
says centred or at the right, where the text has room (a frame as wide as the text has none). */
|
|
2704
|
+
:is(.doc-table-wrap, table).doc-align-center { margin-inline: auto; }
|
|
2705
|
+
:is(.doc-table-wrap, table).doc-align-right { margin-inline: auto 0; }
|
|
2630
2706
|
/* A short table, or one mostly of words (data-doc-whole, tables/whole.js), is shown whole: its
|
|
2631
2707
|
frame as tall as its rows, read with the page. A long table of data keeps the kit's height above,
|
|
2632
2708
|
its rows scrolling under the header row that stays; a height written on the frame
|
|
@@ -2702,7 +2778,7 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
|
|
|
2702
2778
|
.doc-table-wrap:has(> .doc-scrollbars) { outline-color: transparent; }
|
|
2703
2779
|
/* In a block with a fill of its own (a highlight block, its gray its own unless it is given a text
|
|
2704
2780
|
color; any block of the palette's background colors) the frame's line is opaque (above). */
|
|
2705
|
-
:is(:is(.doc-summary, .doc-panel):not(.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), .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) .doc-table-wrap { --doc-table-frame: var(--doc-table-frame-filled); }
|
|
2781
|
+
:is(:is(.doc-summary, .doc-panel):not(.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), .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) .doc-table-wrap { --doc-table-frame: var(--doc-table-frame-filled); --doc-table-frame-solid: var(--doc-table-frame-filled); }
|
|
2706
2782
|
/* A frame that scrolls sideways and is not at its end fades out at its right edge (data-more,
|
|
2707
2783
|
tables.js): the columns go on past it, which its rails, shown only under the pointer, do not say.
|
|
2708
2784
|
Drawn over the cells by the frame's line layer, taking no room. */
|
|
@@ -2719,6 +2795,9 @@ figure:is(.doc-image, .doc-file, .doc-bookmark, .doc-embed):not(:has(> *)) { dis
|
|
|
2719
2795
|
transition: opacity 160ms ease;
|
|
2720
2796
|
}
|
|
2721
2797
|
.doc-scrollbars[data-more] > .doc-scrollbars-frame::after { opacity: 1; }
|
|
2798
|
+
/* Its right edge, under which the columns past it lie, is drawn opaque (the dark line is a veil that
|
|
2799
|
+
shows what is under it): the line over the fade, nothing of those columns through it. */
|
|
2800
|
+
.doc-scrollbars[data-more] > .doc-scrollbars-frame { border-right-color: var(--doc-table-frame-solid); }
|
|
2722
2801
|
|
|
2723
2802
|
/* Each cell draws its own lines, on its right and at its bottom (separate borders: a cell that sticks
|
|
2724
2803
|
while the frame scrolls takes its lines along, a merged cell has them where it ends); in a frame
|
package/kit/runtime.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var define_COMPONENT_FLOWS_default = [".doc-page", ".doc-section", ".doc-summary", ".doc-panel", ".doc-callout", ".doc-details-content", ".doc-dialog-content", "[data-doc-sheet]", ".doc-column", "[data-doc-slot]"];
|
|
5
5
|
|
|
6
6
|
// <define:__COMPONENT_RUNTIME__>
|
|
7
|
-
var define_COMPONENT_RUNTIME_default = [{ id: "page", match: "main.doc-page", runtime: { generated: [".doc-display", "script[data-doc-state]"], root: { attrs: ["data-doc-ready", "data-doc-drawn", "data-doc-controls", "data-doc-effective-theme", "data-doc-platform"] }, state: { html: ["data-doc-theme", "data-doc-font", "data-doc-size", "data-doc-spacing", "data-doc-measure", "data-doc-width"] }, internal: ["doc-display*", "data-doc-export-copy", "data-theme", "doc-export-id", "doc-reveal", "doc-kit-error", "doc-net-consent*", "data-doc-snapshot", "data-at", "data-x", "data-y", "data-w", "data-h", "data-columns"] } }, { id: "text", runtime: { classes: { ".doc-range": ["doc-range"], ".doc-long-run": ["doc-long-run"] } } }, { id: "mention", runtime: { attrs: { "a.doc-link-mention": ["data-doc-gone"] } } }, { id: "paragraph", match: "p" }, { id: "heading", match: "h1, h2, h3, h4" }, { id: "list", match: "ul, ol", runtime: { attrs: { "ol.doc-flow": ["data-doc-flow-key", "data-doc-flow-recount"] }, generated: ["br.doc-item-line"] } }, { id: "quote", match: "blockquote" }, { id: "code", match: ".doc-code", runtime: { generated: [".doc-code-fold", ".doc-code-range", ".doc-code-tools"], internal: ["doc-code-lines", "doc-code-line*", "doc-code-content", "doc-code-toolbar", "doc-code-language", "doc-code-separator", "doc-code-copy*", "doc-code-wrap*", "data-line-number"] } }, { id: "divider", match: "hr" }, { id: "math", match: ".doc-math-inline, .doc-math-block", runtime: { generated: [".doc-math-break", ".doc-math-joiner"], classes: { ".doc-math-tie": ["doc-math-tie"], ".doc-math-skip": ["doc-math-skip"] } } }, { id: "section", match: "section.doc-section" }, { id: "highlight", match: ".doc-panel, .doc-summary" }, { id: "callout", match: ".doc-callout" }, { id: "details", match: "details.doc-details" }, { id: "dialog", match: "dialog.doc-dialog", runtime: { attrs: { "dialog.doc-dialog": ["data-doc-dialog-ready", "open", "aria-label"], ".doc-dialog-content": ["tabindex"] }, root: { classes: ["doc-dialog-open", "doc-dialog-gutter"] }, internal: ["doc-dialog-in", "doc-dialog-fade"] } }, { id: "sheets", match: "[data-doc-sheets]", runtime: { state: { "[data-doc-sheets]": ["data-active-sheet"], "[data-sheet-tab]": ["aria-selected", "tabindex", "is-active"], "[data-doc-sheet]": ["hidden", "aria-hidden"] }, internal: ["doc-sheets"] } }, { id: "table", match: "table.doc-table", runtime: { generated: ["colgroup[data-doc-columns]", ".doc-scrollbars"], attrs: { "table.doc-table": ["data-doc-sortable-ready", "data-doc-filled"], ".doc-table-wrap": ["data-doc-min-width", "data-doc-layout", "data-doc-whole"], "th, td": ["data-column-kind", "data-column-wrap", "data-run-wrap", "data-doc-edge"] }, classes: { "table.doc-table": ["doc-table--auto"] }, internal: ["doc-code-run", "doc-table-sort-button", "doc-scrollbar*", "data-doc-sort-arrow", "data-active", "data-drag", "data-x", "data-y", "data-more"] } }, { id: "columns", match: ".doc-columns" }, { id: "figure", match: "figure" }, { id: "chart", match: "[data-doc-chart]", runtime: { attrs: { "[data-doc-chart]": ["data-doc-layout"] }, classes: { "[data-doc-chart]": ["doc-chart"] }, internal: ["doc-chart-message", "data-missing"] } }, { id: "image", match: "figure.doc-image", runtime: { generated: ["dialog.doc-zoom"], attrs: { "img[data-doc-zoom]": ["data-doc-zoom", "tabindex", "role", "aria-haspopup", "aria-label"] }, root: { classes: ["doc-zoom-open", "doc-zoom-gutter", "doc-zoom-hover"] }, internal: ["doc-zoom-*"] } }, { id: "file", match: "figure.doc-file" }, { id: "bookmark", match: "figure.doc-bookmark" }, { id: "embed", match: "figure.doc-embed", runtime: { attrs: { "iframe.doc-embed-frame": ["data-doc-blob"] } } }, { id: "diff", match: ".doc-diff", runtime: { generated: [".doc-diff-body", ".doc-diff-stats"], internal: ["doc-diff-added", "doc-diff-removed"] } }, { id: "icon", match: ".doc-icon", runtime: { internal: ["data-doc-tab-icon"] } }, { id: "installed", match: "div[data-doc-component], section[data-doc-component]", runtime: { generated: [".doc-component-note", ".doc-component-data"], attrs: { "[data-doc-fallback]": ["data-doc-fallback"], "[data-doc-fallback-control]": ["data-doc-fallback-control", "inert"] }, internal: ["data-doc-package", "doc-component-more", "doc-component-one", "doc-component-line", "doc-component-short", "doc-dragging"] } }, { id: "state", match: "[data-doc-bind], [data-doc-show]", runtime: { generated: [".doc-choice"], attrs: { "[data-doc-show]": ["hidden"] }, state: { "button[data-doc-bind]": ["aria-pressed"] }, internal: ["doc-choice-*"] } }];
|
|
7
|
+
var define_COMPONENT_RUNTIME_default = [{ id: "page", match: "main.doc-page", runtime: { generated: [".doc-display", "script[data-doc-state]"], root: { attrs: ["data-doc-ready", "data-doc-drawn", "data-doc-controls", "data-doc-effective-theme", "data-doc-platform"] }, state: { html: ["data-doc-theme", "data-doc-font", "data-doc-size", "data-doc-spacing", "data-doc-measure", "data-doc-width"] }, internal: ["doc-display*", "data-doc-export-copy", "data-theme", "doc-export-id", "doc-reveal", "doc-kit-error", "doc-net-consent*", "data-doc-snapshot", "data-doc-net-narrow", "data-at", "data-x", "data-y", "data-w", "data-h", "data-columns"] } }, { id: "text", runtime: { classes: { ".doc-range": ["doc-range"], ".doc-long-run": ["doc-long-run"] } } }, { id: "mention", runtime: { attrs: { "a.doc-link-mention": ["data-doc-gone"] } } }, { id: "paragraph", match: "p" }, { id: "heading", match: "h1, h2, h3, h4" }, { id: "list", match: "ul, ol", runtime: { attrs: { "ol.doc-flow": ["data-doc-flow-key", "data-doc-flow-recount"] }, generated: ["br.doc-item-line"] } }, { id: "quote", match: "blockquote" }, { id: "code", match: ".doc-code", runtime: { generated: [".doc-code-fold", ".doc-code-range", ".doc-code-tools"], internal: ["doc-code-lines", "doc-code-line*", "doc-code-content", "doc-code-toolbar", "doc-code-language", "doc-code-separator", "doc-code-copy*", "doc-code-wrap*", "data-line-number"] } }, { id: "divider", match: "hr" }, { id: "math", match: ".doc-math-inline, .doc-math-block", runtime: { generated: [".doc-math-break", ".doc-math-joiner"], classes: { ".doc-math-tie": ["doc-math-tie"], ".doc-math-skip": ["doc-math-skip"] } } }, { id: "section", match: "section.doc-section" }, { id: "highlight", match: ".doc-panel, .doc-summary" }, { id: "callout", match: ".doc-callout" }, { id: "details", match: "details.doc-details" }, { id: "dialog", match: "dialog.doc-dialog", runtime: { attrs: { "dialog.doc-dialog": ["data-doc-dialog-ready", "open", "aria-label"], ".doc-dialog-content": ["tabindex"] }, root: { classes: ["doc-dialog-open", "doc-dialog-gutter"] }, internal: ["doc-dialog-in", "doc-dialog-fade"] } }, { id: "sheets", match: "[data-doc-sheets]", runtime: { state: { "[data-doc-sheets]": ["data-active-sheet"], "[data-sheet-tab]": ["aria-selected", "tabindex", "is-active"], "[data-doc-sheet]": ["hidden", "aria-hidden"] }, internal: ["doc-sheets"] } }, { id: "table", match: "table.doc-table", runtime: { generated: ["colgroup[data-doc-columns]", ".doc-scrollbars"], attrs: { "table.doc-table": ["data-doc-sortable-ready", "data-doc-filled"], ".doc-table-wrap": ["data-doc-min-width", "data-doc-layout", "data-doc-whole"], "th, td": ["data-column-kind", "data-column-wrap", "data-run-wrap", "data-doc-edge"] }, classes: { "table.doc-table": ["doc-table--auto"] }, internal: ["doc-code-run", "doc-table-sort-button", "doc-scrollbar*", "data-doc-sort-arrow", "data-active", "data-drag", "data-x", "data-y", "data-more"] } }, { id: "columns", match: ".doc-columns" }, { id: "figure", match: "figure" }, { id: "chart", match: "[data-doc-chart]", runtime: { attrs: { "[data-doc-chart]": ["data-doc-layout"] }, classes: { "[data-doc-chart]": ["doc-chart"] }, internal: ["doc-chart-message", "data-missing"] } }, { id: "image", match: "figure.doc-image", runtime: { generated: ["dialog.doc-zoom"], attrs: { "img[data-doc-zoom]": ["data-doc-zoom", "tabindex", "role", "aria-haspopup", "aria-label"] }, root: { classes: ["doc-zoom-open", "doc-zoom-gutter", "doc-zoom-hover"] }, internal: ["doc-zoom-*"] } }, { id: "file", match: "figure.doc-file" }, { id: "bookmark", match: "figure.doc-bookmark" }, { id: "embed", match: "figure.doc-embed", runtime: { attrs: { "iframe.doc-embed-frame": ["data-doc-blob"] } } }, { id: "diff", match: ".doc-diff", runtime: { generated: [".doc-diff-body", ".doc-diff-stats"], internal: ["doc-diff-added", "doc-diff-removed"] } }, { id: "icon", match: ".doc-icon", runtime: { internal: ["data-doc-tab-icon"] } }, { id: "installed", match: "div[data-doc-component], section[data-doc-component]", runtime: { generated: [".doc-component-note", ".doc-component-data"], attrs: { "[data-doc-fallback]": ["data-doc-fallback"], "[data-doc-fallback-control]": ["data-doc-fallback-control", "inert"] }, internal: ["data-doc-package", "doc-component-more", "doc-component-one", "doc-component-line", "doc-component-short", "doc-dragging"] } }, { id: "state", match: "[data-doc-bind], [data-doc-show]", runtime: { generated: [".doc-choice"], attrs: { "[data-doc-show]": ["hidden"] }, state: { "button[data-doc-bind]": ["aria-pressed"] }, internal: ["doc-choice-*"] } }];
|
|
8
8
|
|
|
9
9
|
// src/render/kit/runtime/bindings.js
|
|
10
10
|
var global = globalThis;
|
|
@@ -494,8 +494,14 @@
|
|
|
494
494
|
"flowchart": FLOW_LABEL,
|
|
495
495
|
// net.js: a block whose fetch waits for the reader's consent, its bar's line and its button.
|
|
496
496
|
"net-why": { zh: "\u8FD9\u4E2A\u5757\u8981\u8054\u7F51\u624D\u80FD\u663E\u793A\u5185\u5BB9", en: "This block needs the internet to show its content" },
|
|
497
|
+
// On a card a reader reads: what letting it online brings, never the maintainers' 块 (a block's manifest may say its own: card.consent).
|
|
498
|
+
"net-card-why": { zh: "\u5141\u8BB8\u8054\u7F51\u4E4B\u540E\u663E\u793A\u5185\u5BB9", en: "Allow internet access to show this" },
|
|
497
499
|
"net-allow": { zh: "\u5141\u8BB8\u8BBF\u95EE {0}", en: "Allow {0}" },
|
|
498
|
-
"net-allow-many": { zh: "\u5141\u8BB8\u8BBF\u95EE {0} \u7B49 {1} \u4E2A\u7F51\u7AD9", en: "Allow {0} and others ({1} sites)" }
|
|
500
|
+
"net-allow-many": { zh: "\u5141\u8BB8\u8BBF\u95EE {0} \u7B49 {1} \u4E2A\u7F51\u7AD9", en: "Allow {0} and others ({1} sites)" },
|
|
501
|
+
// On a card of a custom page: the button's words alone, and a line under the why saying whose the data is.
|
|
502
|
+
"net-allow-short": { zh: "\u5141\u8BB8\u8BBF\u95EE", en: "Allow" },
|
|
503
|
+
"net-from": { zh: "\u6570\u636E\u6765\u81EA {0}", en: "From {0}" },
|
|
504
|
+
"net-from-many": { zh: "\u6570\u636E\u6765\u81EA {0} \u7B49 {1} \u4E2A\u7F51\u7AD9", en: "From {0} and others ({1} sites)" }
|
|
499
505
|
};
|
|
500
506
|
var UI_LANGUAGE = "data-ge-language";
|
|
501
507
|
function kitLanguage(root = globalThis.document?.documentElement) {
|
|
@@ -1070,7 +1076,9 @@
|
|
|
1070
1076
|
"doc-valign-top",
|
|
1071
1077
|
"doc-valign-middle",
|
|
1072
1078
|
"doc-valign-bottom",
|
|
1073
|
-
"doc-bold"
|
|
1079
|
+
"doc-bold",
|
|
1080
|
+
// A paragraph's or a heading's indent (the editor's components/align.mjs INDENTS; its alignment is a cell's classes above).
|
|
1081
|
+
...Array.from({ length: 8 }, (_, index) => `doc-indent-${index + 1}`)
|
|
1074
1082
|
]);
|
|
1075
1083
|
function lookChanged(before, after) {
|
|
1076
1084
|
const looks = (value) => [...new Set(String(value ?? "").split(/\s+/).filter((name) => LOOK_CLASSES.has(name)))].sort().join(" ");
|
|
@@ -1250,6 +1258,17 @@ ${indent}${list2 ? "]" : "}"}`;
|
|
|
1250
1258
|
}
|
|
1251
1259
|
};
|
|
1252
1260
|
const ownSlug = () => document.querySelector(".doc-page")?.dataset.docId || null;
|
|
1261
|
+
const NARROW = 240;
|
|
1262
|
+
const fit = (bar) => {
|
|
1263
|
+
const card = bar.parentElement;
|
|
1264
|
+
if (!card?.classList.contains("gallery-card")) return;
|
|
1265
|
+
const style = global2.getComputedStyle(card);
|
|
1266
|
+
const inner = card.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
|
|
1267
|
+
bar.toggleAttribute("data-doc-net-narrow", inner > 0 && inner < NARROW);
|
|
1268
|
+
};
|
|
1269
|
+
global2.addEventListener("doc-layout-change", () => {
|
|
1270
|
+
for (const bar of bars.values()) if (bar.isConnected) fit(bar);
|
|
1271
|
+
});
|
|
1253
1272
|
const pageSlug = () => /^\/pages\/([a-z0-9-]+)\/?$/.exec(location.pathname)?.[1] ?? null;
|
|
1254
1273
|
function clear(host) {
|
|
1255
1274
|
refused.delete(host);
|
|
@@ -1275,6 +1294,11 @@ ${indent}${list2 ? "]" : "}"}`;
|
|
|
1275
1294
|
bar.setAttribute("role", "group");
|
|
1276
1295
|
const why = document.createElement("span");
|
|
1277
1296
|
why.className = `${CONSENT_BAR}-why`;
|
|
1297
|
+
const from = document.createElement("span");
|
|
1298
|
+
from.className = `${CONSENT_BAR}-from`;
|
|
1299
|
+
const words = document.createElement("span");
|
|
1300
|
+
words.className = `${CONSENT_BAR}-words`;
|
|
1301
|
+
words.append(why, from);
|
|
1278
1302
|
const button2 = document.createElement("button");
|
|
1279
1303
|
button2.type = "button";
|
|
1280
1304
|
button2.className = `${CONSENT_BAR}-allow`;
|
|
@@ -1284,16 +1308,30 @@ ${indent}${list2 ? "]" : "}"}`;
|
|
|
1284
1308
|
const waiting = refused.get(host);
|
|
1285
1309
|
if (waiting) ask(waiting.id, waiting.hosts);
|
|
1286
1310
|
});
|
|
1287
|
-
bar.append(
|
|
1311
|
+
bar.append(words, button2);
|
|
1288
1312
|
host.after(bar);
|
|
1289
1313
|
bars.set(host, bar);
|
|
1290
1314
|
}
|
|
1291
1315
|
const [first, ...others] = hosts;
|
|
1292
|
-
|
|
1316
|
+
const onCard = host.parentElement?.classList.contains("gallery-card") === true;
|
|
1317
|
+
const own = describe(id)?.consent?.[kitLanguage()];
|
|
1318
|
+
const reason = onCard ? typeof own === "string" && own ? own : sayRuntime("net-card-why") : sayRuntime("net-why");
|
|
1319
|
+
bar.querySelector(`.${CONSENT_BAR}-why`).textContent = reason;
|
|
1320
|
+
fit(bar);
|
|
1293
1321
|
const button = bar.querySelector(`.${CONSENT_BAR}-allow`);
|
|
1294
|
-
|
|
1322
|
+
const long2 = document.createElement("span");
|
|
1323
|
+
long2.className = `${CONSENT_BAR}-long`;
|
|
1324
|
+
long2.textContent = others.length > 0 ? sayRuntime("net-allow-many", first, hosts.length) : sayRuntime("net-allow", first);
|
|
1325
|
+
const short = document.createElement("span");
|
|
1326
|
+
short.className = `${CONSENT_BAR}-short`;
|
|
1327
|
+
short.textContent = sayRuntime("net-allow-short");
|
|
1328
|
+
button.replaceChildren(long2, short);
|
|
1329
|
+
button.setAttribute("aria-label", long2.textContent);
|
|
1330
|
+
const site = (name) => name.split(".").slice(-2).join(".");
|
|
1331
|
+
const shared = hosts.every((name) => site(name) === site(first)) ? site(first) : null;
|
|
1332
|
+
bar.querySelector(`.${CONSENT_BAR}-from`).textContent = shared ? sayRuntime("net-from", shared) : others.length > 0 ? sayRuntime("net-from-many", first, hosts.length) : sayRuntime("net-from", first);
|
|
1295
1333
|
button.title = hosts.join("\n");
|
|
1296
|
-
bar.setAttribute("aria-label",
|
|
1334
|
+
bar.setAttribute("aria-label", reason);
|
|
1297
1335
|
}
|
|
1298
1336
|
global2.addEventListener("doc-settings-changed", (event) => {
|
|
1299
1337
|
const told = event.detail?.net;
|
package/kit/tables.js
CHANGED
|
@@ -421,6 +421,8 @@
|
|
|
421
421
|
"doc-kit-error",
|
|
422
422
|
"doc-net-consent*",
|
|
423
423
|
"data-doc-snapshot",
|
|
424
|
+
// A consent bar on a card under 240px of content (runtime/net.js), its line over its button.
|
|
425
|
+
"data-doc-net-narrow",
|
|
424
426
|
// The time an export's snapshot was made (its data-doc-snapshot tag's: render/net-snapshot.mjs), which context.workspace.query answers as `at`.
|
|
425
427
|
"data-at",
|
|
426
428
|
// A custom page's (no document's: src/render/page-html.mjs, the kit's board/): its cards' cells, the Agent's
|
package/kit/ui.js
CHANGED
|
@@ -250,6 +250,8 @@ ${source}
|
|
|
250
250
|
"doc-kit-error",
|
|
251
251
|
"doc-net-consent*",
|
|
252
252
|
"data-doc-snapshot",
|
|
253
|
+
// A consent bar on a card under 240px of content (runtime/net.js), its line over its button.
|
|
254
|
+
"data-doc-net-narrow",
|
|
253
255
|
// The time an export's snapshot was made (its data-doc-snapshot tag's: render/net-snapshot.mjs), which context.workspace.query answers as `at`.
|
|
254
256
|
"data-at",
|
|
255
257
|
// A custom page's (no document's: src/render/page-html.mjs, the kit's board/): its cards' cells, the Agent's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heycys/gallery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Gallery: documents written as HTML by an AI agent, shown and edited in the browser, delivered as one offline file. The gallery command and its local server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gallery",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// gallery/chart-view (图表): a view of a table of the document (its manifest's needs hold "tables"; the
|
|
2
|
-
// table's frame carries the key its data-doc-from names, which
|
|
2
|
+
// table's frame carries the key its data-doc-from names, which a chart made from "/" takes from the table above it), drawn as
|
|
3
3
|
// horizontal bars from zero, each with its value at its end, under its title. Its settings (its data part
|
|
4
4
|
// `settings`, JSON) say what: `by` a column whose values are the bars (the rows grouped by it, in the order
|
|
5
5
|
// the rows first say them), each the `op` of its rows, "count" (how many), "sum" or "average" of the
|
|
@@ -30,7 +30,7 @@ const WORDS = {
|
|
|
30
30
|
average: (/** @type {string} */ by, /** @type {string} */ value) => `各${by}的${value}平均`,
|
|
31
31
|
each_: (/** @type {string} */ name, /** @type {string} */ value) => `各${name}的${value}`,
|
|
32
32
|
more: (/** @type {number} */ shown, /** @type {number} */ all) => `只画了前 ${shown} 条,共 ${all} 条:按一列分组可以都画出来。`,
|
|
33
|
-
unbound: "
|
|
33
|
+
unbound: "这张图还没有接到表格上:在它的菜单里选“设置…”,选一张表格。",
|
|
34
34
|
unread: "读不到这张图的表格:它不在页面上了,或者有合并的单元格。",
|
|
35
35
|
missing: (/** @type {string} */ name) => `找不到列“${name}”:表格的列名改过了吗?`,
|
|
36
36
|
noNumbers: "表格里没有写数的列:每行一条、合计和平均要一列数。",
|
|
@@ -50,7 +50,7 @@ const WORDS = {
|
|
|
50
50
|
average: (/** @type {string} */ by, /** @type {string} */ value) => `Average ${value} by ${by}`,
|
|
51
51
|
each_: (/** @type {string} */ name, /** @type {string} */ value) => `${value} by ${name}`,
|
|
52
52
|
more: (/** @type {number} */ shown, /** @type {number} */ all) => `The first ${shown} bars of ${all}: group by a column to draw them all.`,
|
|
53
|
-
unbound: "This chart reads no table yet: pick
|
|
53
|
+
unbound: "This chart reads no table yet: pick Settings… in its menu and choose a table.",
|
|
54
54
|
unread: "This chart's table cannot be read: it is not on the page, or it has merged cells.",
|
|
55
55
|
missing: (/** @type {string} */ name) => `No column “${name}”: was the table's column renamed?`,
|
|
56
56
|
noNumbers: "The table has no column of numbers: a bar a row, a sum and an average need one.",
|
|
@@ -15,7 +15,7 @@ Write a table, then the chart, as example.html does (`gallery block show gallery
|
|
|
15
15
|
|
|
16
16
|
One table may have several views (a 看板, 指标, another chart), each with the same key.
|
|
17
17
|
|
|
18
|
-
The reader adds a chart in Gallery from
|
|
18
|
+
The reader adds a chart in Gallery from "/" (图表): it reads the nearest table above it, the key written on both; its menu's 设置… picks another table and changes its settings (so does its ⚙, where the page edits).
|
|
19
19
|
|
|
20
20
|
## How it looks
|
|
21
21
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "gallery/countdown",
|
|
3
3
|
"apiVersion": 1,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"name": { "zh": "倒计时", "en": "Countdown" },
|
|
6
6
|
"description": { "zh": "离某一天还有几天,到了那天说今天,过了说已经几天", "en": "How many days until a date: today on the day, and the days since after it" },
|
|
7
7
|
"words": "daojishi daoshu countdown days until 倒计时 倒数日 纪念日 日子",
|