@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.
- package/THIRD-PARTY-NOTICES.md +51 -1
- package/browser/editor/components/callout/index.mjs +40 -15
- package/browser/editor/components/columns/page.mjs +45 -32
- package/browser/editor/components/details/index.mjs +2 -1
- package/browser/editor/components/dialog/index.mjs +2 -1
- package/browser/editor/components/dialog/page.mjs +0 -18
- package/browser/editor/components/divider/index.mjs +1 -1
- package/browser/editor/components/embed/index.mjs +2 -2
- package/browser/editor/components/figure/page.mjs +10 -1
- package/browser/editor/components/file/page.mjs +2 -2
- package/browser/editor/components/flowchart/add.mjs +7 -6
- package/browser/editor/components/flowchart/page.mjs +1 -1
- package/browser/editor/components/heading/index.mjs +2 -0
- package/browser/editor/components/heading/page.mjs +6 -0
- package/browser/editor/components/highlight/index.mjs +4 -20
- package/browser/editor/components/icons.mjs +13 -2
- package/browser/editor/components/image/crop.mjs +6 -9
- package/browser/editor/components/image/page.mjs +2 -2
- package/browser/editor/components/installed/index.mjs +82 -29
- package/browser/editor/components/installed/page.mjs +146 -34
- package/browser/editor/components/installed/served.mjs +6 -5
- package/browser/editor/components/instances.mjs +18 -0
- package/browser/editor/components/kit.mjs +3 -0
- package/browser/editor/components/list/page.mjs +3 -6
- package/browser/editor/components/media/page.mjs +44 -14
- package/browser/editor/components/pages.mjs +2 -2
- package/browser/editor/components/registry.mjs +68 -33
- package/browser/editor/components/section/index.mjs +2 -1
- package/browser/editor/components/set-apart.mjs +24 -0
- package/browser/editor/components/table/index.mjs +64 -5
- package/browser/editor/components/table/page.mjs +30 -19
- package/browser/editor/page/annotate/anchors.mjs +4 -3
- package/browser/editor/page/annotate/card.mjs +3 -6
- package/browser/editor/page/annotate/index.mjs +61 -34
- package/browser/editor/page/autosave.mjs +357 -38
- package/browser/editor/page/beside.mjs +5 -5
- package/browser/editor/page/block-menu/colors.mjs +3 -1
- package/browser/editor/page/block-menu/index.mjs +8 -6
- package/browser/editor/page/blocks.mjs +16 -7
- package/browser/editor/page/board/client.mjs +57 -0
- package/browser/editor/page/board/hint.mjs +145 -0
- package/browser/editor/page/board/history.mjs +119 -0
- package/browser/editor/page/board/index.mjs +970 -0
- package/browser/editor/page/board/settings.mjs +209 -0
- package/browser/editor/page/caret.mjs +5 -2
- package/browser/editor/page/changes/bar.mjs +94 -0
- package/browser/editor/page/changes/ghost.mjs +206 -0
- package/browser/editor/page/changes/gone-words.mjs +94 -0
- package/browser/editor/page/changes/index.mjs +447 -0
- package/browser/editor/page/changes/words.mjs +27 -0
- package/browser/editor/page/clipboard/import/colors.mjs +3 -3
- package/browser/editor/page/clipboard/import/html.mjs +29 -6
- package/browser/editor/page/clipboard/import/inline.mjs +32 -0
- package/browser/editor/page/clipboard/import/markdown.mjs +58 -13
- package/browser/editor/page/clipboard/import/read.mjs +6 -1
- package/browser/editor/page/clipboard/import/to-blocks.mjs +44 -12
- package/browser/editor/page/clipboard/import/yuque.mjs +622 -0
- package/browser/editor/page/clipboard/index.mjs +156 -26
- package/browser/editor/page/clipboard/own/blocks.mjs +25 -16
- package/browser/editor/page/clipboard/own/chart-keys.mjs +41 -28
- package/browser/editor/page/clipboard/own/describe.mjs +16 -7
- package/browser/editor/page/clipboard/own/export.mjs +6 -6
- package/browser/editor/page/clipboard/own/selection.mjs +3 -3
- package/browser/editor/page/clipboard/own/writers.mjs +0 -11
- package/browser/editor/page/columns/index.mjs +48 -46
- package/browser/editor/page/commit.mjs +98 -25
- package/browser/editor/page/conflicts.mjs +13 -33
- package/browser/editor/page/convert.mjs +8 -7
- package/browser/editor/page/core.mjs +81 -27
- package/browser/editor/page/custom-page.mjs +106 -0
- package/browser/editor/page/drag/index.mjs +40 -24
- package/browser/editor/page/drag/preview.mjs +9 -4
- package/browser/editor/page/editor.mjs +120 -28
- package/browser/editor/page/emoji-picker/emoji-tab.mjs +22 -13
- package/browser/editor/page/emoji-picker/grid.mjs +7 -5
- package/browser/editor/page/emoji-picker/icon-tab.mjs +4 -4
- package/browser/editor/page/emoji-picker/icons.mjs +0 -1
- package/browser/editor/page/emoji-picker/index.mjs +11 -9
- package/browser/editor/page/emoji-picker/styles.mjs +156 -2
- package/browser/editor/page/emoji-picker/support.mjs +6 -4
- package/browser/editor/page/emoji-picker/upload.mjs +14 -13
- package/browser/editor/page/fills.mjs +5 -3
- package/browser/editor/page/fold/index.mjs +348 -0
- package/browser/editor/page/fold/rule.mjs +125 -0
- package/browser/editor/page/folded.mjs +23 -0
- package/browser/editor/page/format-bar/bar.mjs +2 -1
- package/browser/editor/page/format-bar/index.mjs +1 -1
- package/browser/editor/page/geometry.mjs +8 -6
- package/browser/editor/page/handle/index.mjs +22 -14
- package/browser/editor/page/hints/index.mjs +1 -1
- package/browser/editor/page/history.mjs +24 -4
- package/browser/editor/page/insert/index.mjs +30 -17
- package/browser/editor/page/links/index.mjs +5 -3
- package/browser/editor/page/links/pages.mjs +27 -9
- package/browser/editor/page/long-runs.mjs +75 -0
- package/browser/editor/page/look.mjs +69 -6
- package/browser/editor/page/margin.mjs +63 -27
- package/browser/editor/page/media-menu/index.mjs +6 -7
- package/browser/editor/page/menu.mjs +86 -31
- package/browser/editor/page/merge.mjs +24 -0
- package/browser/editor/page/notices.mjs +3 -3
- package/browser/editor/page/offered.mjs +1 -1
- package/browser/editor/page/outline/folds.mjs +11 -10
- package/browser/editor/page/outline/index.mjs +131 -45
- package/browser/editor/page/outline/list.mjs +23 -11
- package/browser/editor/page/outline/read.mjs +1 -1
- package/browser/editor/page/outline/strip.mjs +7 -1
- package/browser/editor/page/page-objects.mjs +13 -2
- package/browser/editor/page/panel.mjs +9 -13
- package/browser/editor/page/present-links.mjs +11 -2
- package/browser/editor/page/resize/index.mjs +42 -29
- package/browser/editor/page/selection/delete.mjs +8 -6
- package/browser/editor/page/selection/index.mjs +10 -3
- package/browser/editor/page/served.mjs +14 -0
- package/browser/editor/page/session.mjs +101 -6
- package/browser/editor/page/slash-menu/index.mjs +3 -3
- package/browser/editor/page/table/cell-bar.mjs +4 -1
- package/browser/editor/page/table/cells.mjs +103 -47
- package/browser/editor/page/table/icons.mjs +3 -1
- package/browser/editor/page/table/index.mjs +40 -16
- package/browser/editor/page/table/pictures.mjs +299 -0
- package/browser/editor/page/table/views.mjs +150 -0
- package/browser/editor/page/table/widths.mjs +9 -4
- package/browser/editor/page/text-select/index.mjs +43 -14
- package/browser/editor/page/todo-writes.mjs +75 -0
- package/browser/editor/page/tooltip.mjs +1 -1
- package/browser/editor/page/type-grid.mjs +4 -3
- package/browser/editor/page/typing/code-edges.mjs +63 -17
- package/browser/editor/page/typing/index.mjs +65 -9
- package/browser/editor/page/typing/leave.mjs +1 -1
- package/browser/editor/page/ui.mjs +13 -0
- package/browser/shared/annotations.mjs +8 -10
- package/browser/shared/block-packs.mjs +404 -0
- package/browser/shared/board-places.mjs +224 -0
- package/browser/shared/card-size.mjs +59 -0
- package/browser/shared/code-folds.mjs +5 -1
- package/browser/shared/colors.mjs +17 -14
- package/browser/shared/component-catalog.mjs +345 -54
- package/browser/shared/component-source.mjs +37 -0
- package/browser/shared/components/callout.mjs +4 -2
- package/browser/shared/components/index.mjs +72 -9
- package/browser/shared/components/installed.mjs +110 -8
- package/browser/shared/components/page.mjs +22 -3
- package/browser/shared/components/state.mjs +5 -1
- package/browser/shared/components/table.mjs +1 -1
- package/browser/shared/components/text.mjs +2 -2
- package/browser/shared/document-look.mjs +183 -0
- package/browser/shared/drafts.mjs +432 -0
- package/browser/shared/emoji/data/LICENSE-lucide.txt +43 -0
- package/browser/shared/emoji/data/README.md +4 -2
- package/browser/shared/emoji/data/categories.json +1 -1
- package/browser/shared/emoji/data/keywords-en.json +1 -1
- package/browser/shared/emoji/data/keywords-zh.json +1 -1
- package/browser/shared/emoji/data/names.json +1 -1
- package/browser/shared/emoji/data/positions.json +1 -1
- package/browser/shared/emoji/data/twemoji-index.json +1 -1
- package/browser/shared/emoji/data/twemoji-svg.bin +0 -0
- package/browser/shared/emoji/data.mjs +10 -12
- package/browser/shared/emoji/emoji.mjs +8 -7
- package/browser/shared/emoji/icon-value.mjs +4 -3
- package/browser/shared/extension-sidebar.mjs +126 -0
- package/browser/shared/extensions.mjs +79 -0
- package/browser/shared/file-table.mjs +101 -0
- package/browser/shared/html-tree.mjs +11 -5
- package/browser/shared/i18n/en.mjs +374 -35
- package/browser/shared/json-layout.mjs +47 -0
- package/browser/shared/long-runs.mjs +39 -0
- package/browser/shared/net-cache.mjs +133 -0
- package/browser/shared/net-keys.mjs +32 -0
- package/browser/shared/net-policy.mjs +177 -0
- package/browser/shared/new-names.mjs +5 -2
- package/browser/shared/outline-shape.mjs +128 -0
- package/browser/shared/outline.mjs +458 -0
- package/browser/shared/pack-manifest.mjs +77 -0
- package/browser/shared/page-address.mjs +6 -3
- package/browser/shared/page-cards.mjs +308 -0
- package/browser/shared/page-links.mjs +69 -6
- package/browser/shared/pages.mjs +388 -0
- package/browser/shared/paths.mjs +6 -0
- package/browser/shared/preferences.mjs +10 -4
- package/browser/shared/preview-server.mjs +3 -7
- package/browser/shared/session.mjs +13 -5
- package/browser/shared/shipped-blocks.mjs +299 -0
- package/browser/shared/table-chart.mjs +33 -1
- package/browser/shared/todos.mjs +83 -0
- package/browser/shared/user-directory.mjs +24 -0
- package/browser/shared/versions.mjs +14 -0
- package/browser/shared/web-links.mjs +134 -0
- package/browser/shared/workspace-columns.mjs +120 -0
- package/browser/shared/workspace-look.mjs +91 -0
- package/browser/shared/workspace-name.mjs +154 -0
- package/browser/shared/workspace-query.mjs +125 -0
- package/browser/shared/workspace-registry.mjs +272 -0
- package/browser/shared/workspace.mjs +171 -20
- package/browser/shared/zoom.mjs +5 -5
- package/dist/chunk-2NRBY6AJ.mjs +2 -0
- package/dist/chunk-32ZUEFZ7.mjs +2 -0
- package/dist/chunk-35NQ4PLQ.mjs +2 -0
- package/dist/chunk-3KJHLHUO.mjs +2 -0
- package/dist/chunk-3NJACR4W.mjs +2 -0
- package/dist/chunk-4AV456RQ.mjs +2 -0
- package/dist/chunk-4OZWXZE5.mjs +5 -0
- package/dist/chunk-5XYHDBJ5.mjs +2 -0
- package/dist/chunk-5ZJA7CXT.mjs +2 -0
- package/dist/chunk-6A53MZYZ.mjs +2 -0
- package/dist/chunk-6EXH3ORZ.mjs +166 -0
- package/dist/chunk-6EZ7FNIK.mjs +3 -0
- package/dist/{chunk-UXUK4PMC.mjs → chunk-6QBHU4DF.mjs} +1 -1
- package/dist/{chunk-6U2SLSDN.mjs → chunk-6VTU6KEO.mjs} +1 -1
- package/dist/chunk-B4P2CM2J.mjs +3 -0
- package/dist/chunk-BPL64HGA.mjs +4 -0
- package/dist/chunk-BVEFGE4B.mjs +2 -0
- package/dist/chunk-BZ5RAF7L.mjs +2 -0
- package/dist/chunk-CRJEG7MT.mjs +2 -0
- package/dist/{chunk-B3VTYBYR.mjs → chunk-D4CKRD3V.mjs} +91 -91
- package/dist/chunk-D4EURAX4.mjs +4 -0
- package/dist/chunk-DQCE7TJY.mjs +5 -0
- package/dist/chunk-DR73Y2UJ.mjs +3 -0
- package/dist/{chunk-TMYZB6AV.mjs → chunk-EKNHM3P4.mjs} +1 -1
- package/dist/{chunk-DB4WKGYF.mjs → chunk-ERLAIBOA.mjs} +2 -2
- package/dist/chunk-EURLTOTZ.mjs +4 -0
- package/dist/chunk-FJYN7RTH.mjs +4 -0
- package/dist/chunk-FWNRPMCJ.mjs +12 -0
- package/dist/chunk-FWW4CSAZ.mjs +2 -0
- package/dist/{chunk-2B5E4CDJ.mjs → chunk-GPIWQ4X4.mjs} +1 -1
- package/dist/chunk-GY3FAUVM.mjs +2 -0
- package/dist/chunk-HLYV7RIH.mjs +2 -0
- package/dist/chunk-HMYTM3GT.mjs +15 -0
- package/dist/chunk-IA4PSIMD.mjs +2 -0
- package/dist/chunk-JEUK3ZO7.mjs +2 -0
- package/dist/chunk-JVHHHGEA.mjs +3 -0
- package/dist/chunk-KTKHRC6H.mjs +2 -0
- package/dist/chunk-L7UP52JO.mjs +2 -0
- package/dist/chunk-MHW7ZKOU.mjs +2 -0
- package/dist/chunk-N76HWBA3.mjs +10 -0
- package/dist/chunk-N7AZZLGT.mjs +548 -0
- package/dist/chunk-NAMN3RAF.mjs +2 -0
- package/dist/{chunk-YXAUQPVK.mjs → chunk-NFMCP2HI.mjs} +3 -3
- package/dist/chunk-NG375ILQ.mjs +2 -0
- package/dist/chunk-NVRNLK25.mjs +6 -0
- package/dist/chunk-NWFBE2YA.mjs +2 -0
- package/dist/chunk-NWR2LT5B.mjs +2 -0
- package/dist/chunk-OJKMINIU.mjs +20 -0
- package/dist/chunk-OUUP3WKT.mjs +2 -0
- package/dist/chunk-OW5NWPOJ.mjs +10 -0
- package/dist/chunk-PAREWQGB.mjs +4 -0
- package/dist/chunk-POQSE4C2.mjs +2 -0
- package/dist/chunk-PUOQ65NC.mjs +2 -0
- package/dist/{chunk-Z52HTUW7.mjs → chunk-PVER7LSC.mjs} +2 -2
- package/dist/chunk-PZDLJJTJ.mjs +3 -0
- package/dist/chunk-Q47PLKIJ.mjs +15 -0
- package/dist/chunk-Q4UEPUWF.mjs +2 -0
- package/dist/chunk-QKXMPUXC.mjs +2 -0
- package/dist/chunk-QOUEFUCH.mjs +16 -0
- package/dist/chunk-RFDZXFJF.mjs +13 -0
- package/dist/chunk-RKPWLGZ3.mjs +4 -0
- package/dist/chunk-RMECZA2K.mjs +2 -0
- package/dist/{chunk-EUX7IC5J.mjs → chunk-SQ6Y2ZMA.mjs} +2 -2
- package/dist/chunk-SX4LJYT6.mjs +8 -0
- package/dist/chunk-SXHBYZST.mjs +16 -0
- package/dist/chunk-TANZRINB.mjs +2 -0
- package/dist/chunk-TEZAWDSQ.mjs +2 -0
- package/dist/chunk-UBBRTJ2R.mjs +24 -0
- package/dist/chunk-UFNYFFKO.mjs +20 -0
- package/dist/chunk-UGWYKHBL.mjs +170 -0
- package/dist/chunk-UKSHDZZ6.mjs +2 -0
- package/dist/chunk-UMHUSOPJ.mjs +2 -0
- package/dist/chunk-UNOYVIYR.mjs +2 -0
- package/dist/chunk-V6RIYQZZ.mjs +4 -0
- package/dist/chunk-VJPFVNNW.mjs +15 -0
- package/dist/chunk-VS3ZMVGX.mjs +5 -0
- package/dist/chunk-VTKNEYT3.mjs +6 -0
- package/dist/chunk-VXACTLO3.mjs +3 -0
- package/dist/chunk-W3BGBJQW.mjs +2 -0
- package/dist/chunk-YI43RG4P.mjs +2 -0
- package/dist/chunk-YQGT4AB2.mjs +6 -0
- package/dist/chunk-ZB4H7ZN4.mjs +2 -0
- package/dist/{chunk-ACOPDCNB.mjs → chunk-ZHEHPMBK.mjs} +1 -1
- package/dist/chunk-ZTHICSSF.mjs +2 -0
- package/dist/chunk-ZUNVAXLH.mjs +2 -0
- package/dist/chunk-ZWPMCK7P.mjs +2 -0
- package/dist/cli.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/dist/{chunk-EVJ3BX3M.mjs → update-fetch.mjs} +1 -1
- package/dist/worker.mjs +1 -1
- package/kit/board.css +95 -0
- package/kit/board.js +250 -0
- package/kit/charts.js +5 -71
- package/kit/code.js +14 -14
- package/kit/math.js +18 -2
- package/kit/report.css +500 -151
- package/kit/runtime.js +1720 -170
- package/kit/state.js +10 -1
- package/kit/tables.js +172 -37
- package/kit/ui.js +166 -27
- package/package.json +2 -1
- package/packs/gallery/card/component.json +14 -0
- package/packs/gallery/card/example.html +10 -0
- package/packs/gallery/card/preview.svg +1 -0
- package/packs/gallery/card/style.css +6 -0
- package/packs/gallery/card/template.html +6 -0
- package/packs/gallery/card/writing.md +14 -0
- package/packs/gallery/chart-card/component.json +15 -0
- package/packs/gallery/chart-card/example.html +14 -0
- package/packs/gallery/chart-card/kit.js +130 -0
- package/packs/gallery/chart-card/preview.svg +1 -0
- package/packs/gallery/chart-card/style.css +42 -0
- package/packs/gallery/chart-card/template.html +13 -0
- package/packs/gallery/chart-card/writing.md +20 -0
- package/packs/gallery/chart-view/component.json +20 -0
- package/packs/gallery/chart-view/example.html +13 -0
- package/packs/gallery/chart-view/kit.js +355 -0
- package/packs/gallery/chart-view/preview.svg +1 -0
- package/packs/gallery/chart-view/style.css +94 -0
- package/packs/gallery/chart-view/template.html +3 -0
- package/packs/gallery/chart-view/writing.md +22 -0
- package/packs/gallery/countdown/component.json +18 -0
- package/packs/gallery/countdown/example.html +3 -0
- package/packs/gallery/countdown/kit.js +156 -0
- package/packs/gallery/countdown/preview.svg +1 -0
- package/packs/gallery/countdown/style.css +130 -0
- package/packs/gallery/countdown/template.html +3 -0
- package/packs/gallery/countdown/writing.md +22 -0
- package/packs/gallery/habit/component.json +14 -0
- package/packs/gallery/habit/example.html +3 -0
- package/packs/gallery/habit/kit.js +295 -0
- package/packs/gallery/habit/preview.svg +1 -0
- package/packs/gallery/habit/style.css +246 -0
- package/packs/gallery/habit/template.html +3 -0
- package/packs/gallery/habit/writing.md +21 -0
- package/packs/gallery/heatmap/component.json +18 -0
- package/packs/gallery/heatmap/example.html +3 -0
- package/packs/gallery/heatmap/kit.js +351 -0
- package/packs/gallery/heatmap/preview.svg +1 -0
- package/packs/gallery/heatmap/style.css +201 -0
- package/packs/gallery/heatmap/template.html +3 -0
- package/packs/gallery/heatmap/writing.md +21 -0
- package/packs/gallery/kanban/component.json +18 -0
- package/packs/gallery/kanban/example.html +12 -0
- package/packs/gallery/kanban/kit.js +540 -0
- package/packs/gallery/kanban/preview.svg +1 -0
- package/packs/gallery/kanban/style.css +212 -0
- package/packs/gallery/kanban/template.html +3 -0
- package/packs/gallery/kanban/writing.md +20 -0
- package/packs/gallery/metric/component.json +22 -0
- package/packs/gallery/metric/example.html +15 -0
- package/packs/gallery/metric/kit.js +248 -0
- package/packs/gallery/metric/preview.svg +1 -0
- package/packs/gallery/metric/style.css +92 -0
- package/packs/gallery/metric/template.html +3 -0
- package/packs/gallery/metric/writing.md +23 -0
- package/packs/gallery/note/component.json +14 -0
- package/packs/gallery/note/example.html +3 -0
- package/packs/gallery/note/kit.js +102 -0
- package/packs/gallery/note/preview.svg +1 -0
- package/packs/gallery/note/style.css +76 -0
- package/packs/gallery/note/template.html +3 -0
- package/packs/gallery/note/writing.md +18 -0
- package/packs/gallery/pack.json +8 -0
- package/packs/gallery/recent/component.json +13 -0
- package/packs/gallery/recent/example.html +1 -0
- package/packs/gallery/recent/kit.js +238 -0
- package/packs/gallery/recent/preview.svg +1 -0
- package/packs/gallery/recent/style.css +158 -0
- package/packs/gallery/recent/template.html +1 -0
- package/packs/gallery/recent/writing.md +15 -0
- package/packs/gallery/static/component.json +13 -0
- package/packs/gallery/static/example.html +11 -0
- package/packs/gallery/static/preview.svg +1 -0
- package/packs/gallery/static/style.css +138 -0
- package/packs/gallery/static/template.html +1 -0
- package/packs/gallery/static/writing.md +18 -0
- package/packs/gallery/stats/component.json +13 -0
- package/packs/gallery/stats/example.html +1 -0
- package/packs/gallery/stats/kit.js +166 -0
- package/packs/gallery/stats/preview.svg +1 -0
- package/packs/gallery/stats/style.css +151 -0
- package/packs/gallery/stats/template.html +1 -0
- package/packs/gallery/stats/writing.md +11 -0
- package/packs/gallery/today/component.json +12 -0
- package/packs/gallery/today/example.html +1 -0
- package/packs/gallery/today/kit.js +185 -0
- package/packs/gallery/today/preview.svg +1 -0
- package/packs/gallery/today/style.css +120 -0
- package/packs/gallery/today/template.html +1 -0
- package/packs/gallery/today/writing.md +14 -0
- package/packs/gallery/todos/component.json +19 -0
- package/packs/gallery/todos/example.html +3 -0
- package/packs/gallery/todos/kit.js +342 -0
- package/packs/gallery/todos/preview.svg +1 -0
- package/packs/gallery/todos/style.css +267 -0
- package/packs/gallery/todos/template.html +3 -0
- package/packs/gallery/todos/writing.md +30 -0
- package/packs/gallery/weather/component.json +19 -0
- package/packs/gallery/weather/example.html +3 -0
- package/packs/gallery/weather/kit.js +312 -0
- package/packs/gallery/weather/preview.svg +1 -0
- package/packs/gallery/weather/style.css +258 -0
- package/packs/gallery/weather/template.html +3 -0
- package/packs/gallery/weather/writing.md +26 -0
- package/packs/gallery-soft/pack.json +8 -0
- package/release.json +13 -11
- package/sdk/doc-kit.d.ts +404 -7
- package/sdk/doc-state.d.ts +2 -0
- package/skill/SKILL.md +71 -26
- package/skill/references/block-script.md +140 -0
- package/skill/references/building-blocks.md +257 -0
- package/skill/references/example-report.html +1 -1
- package/skill/references/extensions.md +59 -0
- package/skill/references/pages-and-data.md +221 -0
- package/skill/references/writing-html.md +9 -7
- package/skill/sdk/doc-kit.d.ts +404 -7
- package/skill/sdk/doc-state.d.ts +2 -0
- package/web/assets/index-BK2e_07w.js +13 -0
- package/web/assets/index-CWFI83mF.css +1 -0
- package/web/index.html +2 -2
- package/browser/editor/components/callout/page.mjs +0 -13
- package/dist/chunk-2PBALTR3.mjs +0 -57
- package/dist/chunk-3LA3EMDE.mjs +0 -15
- package/dist/chunk-5FRMCDPY.mjs +0 -16
- package/dist/chunk-5LEK2CBS.mjs +0 -2
- package/dist/chunk-5OFN5AHC.mjs +0 -2
- package/dist/chunk-5SIYS5HN.mjs +0 -2
- package/dist/chunk-5TEK3RAD.mjs +0 -2
- package/dist/chunk-6CYG3Z4V.mjs +0 -2
- package/dist/chunk-7GHT2UCA.mjs +0 -15
- package/dist/chunk-7QQBR7PB.mjs +0 -2
- package/dist/chunk-ATCJYAR4.mjs +0 -2
- package/dist/chunk-C7HWOBIF.mjs +0 -2
- package/dist/chunk-E7VYDG2X.mjs +0 -2
- package/dist/chunk-EZY3WC6Z.mjs +0 -15
- package/dist/chunk-FQGQH4KM.mjs +0 -2
- package/dist/chunk-G7TOXONE.mjs +0 -6
- package/dist/chunk-GPF4YWWB.mjs +0 -9
- package/dist/chunk-GYQV7Y4J.mjs +0 -120
- package/dist/chunk-HMHK3EQ6.mjs +0 -2
- package/dist/chunk-HQQMJCQJ.mjs +0 -10
- package/dist/chunk-IERUOGC3.mjs +0 -6
- package/dist/chunk-ITNLYXXV.mjs +0 -3
- package/dist/chunk-L4DVONOG.mjs +0 -2
- package/dist/chunk-LAE5NQ4B.mjs +0 -2
- package/dist/chunk-LC7YNQFG.mjs +0 -2
- package/dist/chunk-LHTFLRB6.mjs +0 -4
- package/dist/chunk-NFIBI4IP.mjs +0 -26
- package/dist/chunk-NSKUTQ5J.mjs +0 -5
- package/dist/chunk-O52JMOCZ.mjs +0 -2
- package/dist/chunk-P2CAZPDP.mjs +0 -3
- package/dist/chunk-QMQUXTU4.mjs +0 -12
- package/dist/chunk-QVWVFC5K.mjs +0 -6
- package/dist/chunk-QYKCJ7FG.mjs +0 -8
- package/dist/chunk-QZY6Q64C.mjs +0 -2
- package/dist/chunk-TDQP3DKQ.mjs +0 -10
- package/dist/chunk-TX6JH7TR.mjs +0 -2
- package/dist/chunk-UNUEWH4S.mjs +0 -2
- package/dist/chunk-V4CPWKMZ.mjs +0 -2
- package/dist/chunk-VACRB2NE.mjs +0 -3
- package/dist/chunk-W63L7367.mjs +0 -7
- package/dist/chunk-W7CXPCRV.mjs +0 -6
- package/dist/chunk-XINNG4F2.mjs +0 -4
- package/dist/chunk-YL2DPWVS.mjs +0 -4
- package/dist/chunk-YZ5Z6H4W.mjs +0 -4
- package/dist/chunk-ZBIM6ARY.mjs +0 -216
- package/skill/references/building-components.md +0 -327
- package/web/assets/index-B6Ai3wsa.js +0 -13
- package/web/assets/index-SYPC3EZy.css +0 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
// Taken over from notion-lite (its src/ui/media-picker/index.js)
|
|
2
|
-
// Gallery's own (support.mjs, src/shared/emoji/)
|
|
1
|
+
// Taken over from notion-lite (its src/ui/media-picker/index.js): its structure and behaviour as there,
|
|
2
|
+
// what it imports Gallery's own (support.mjs, src/shared/emoji/), and since 2026-11 (the user's word) its
|
|
3
|
+
// look Gallery's own (styles.mjs: the editor's palette, text tabs as the formula editor's, no blue). Its
|
|
4
|
+
// notes, below, are notion-lite's, the look's changed.
|
|
3
5
|
/* 图标选择器(Notion 485357 MediaPicker,页签由 569553 m 给:表情符号 / 图标 / 上传;尺寸、颜色是线上实测):标注图标、选项卡图标、页面图标共用。
|
|
4
6
|
* 宽 408(569553 popupWidth);“表情符号”“图标”页签高 390(tabHeight),“上传”页签没给高度,随内容。
|
|
5
|
-
* 页签栏(eU
|
|
7
|
+
* 页签栏(eU):上下 6、左右 8、底下一条 --ge-line;“表情符号 / 图标 / 上传”是文字页签,当前的一块灰底(没有下划线);右边“移除”(灰色文字按钮)。
|
|
6
8
|
* 打开时当前图标是 Notion 图标就在“图标”页签,否则在“表情符号”(569553 d;Notion 的当前页签只记在内存里)
|
|
7
|
-
* 筛选行(ec
|
|
8
|
-
* + “随机”(28×28
|
|
9
|
+
* 筛选行(ec):只有“表情符号”“图标”页签有。8 12 6:输入框(放大镜、“筛选…”、有字时的清除按钮;聚焦时灰色内框)
|
|
10
|
+
* + “随机”(28×28,无框)+ 页签自己的按钮(表情:选肤色;图标:选图标颜色),两个页签共用同一个筛选词(onFilterChange 同时改两边)
|
|
9
11
|
* “上传”页签(569553 custom → 963369,./upload.js):上传 / 拖进来 / 粘贴一张图片或图片链接,“保存”就用它当图标;
|
|
10
12
|
* 勾上“添加到表情符号库”再起个名字,就同时存成自定义表情(以后在“表情符号”页签的“自定义”里)
|
|
11
13
|
* 随机:选上但不关菜单(keepVisible)
|
|
@@ -53,9 +55,9 @@ export function openMediaPicker({ origin, value, isCallout = false, onPick, only
|
|
|
53
55
|
`<div class="nmm-header">` +
|
|
54
56
|
`<div class="nmm-tabbar">` +
|
|
55
57
|
`<div role="tablist" class="nmm-tabs">` +
|
|
56
|
-
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="emoji">${t("表情符号")}</div
|
|
57
|
-
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="icon">${t("图标")}</div
|
|
58
|
-
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="upload">${t("上传")}</div
|
|
58
|
+
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="emoji">${t("表情符号")}</div></div>` +
|
|
59
|
+
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="icon">${t("图标")}</div></div>` +
|
|
60
|
+
`<div class="nmm-tab-wrap"><div role="tab" class="nmm-tab" data-tab="upload">${t("上传")}</div></div>` +
|
|
59
61
|
`</div>` +
|
|
60
62
|
`<div class="nmm-tabbar-right"><div role="button" tabindex="0" class="nmm-text-button" data-act="remove">${t("移除")}</div></div>` +
|
|
61
63
|
`</div>` +
|
|
@@ -63,7 +65,7 @@ export function openMediaPicker({ origin, value, isCallout = false, onPick, only
|
|
|
63
65
|
`<div class="nmm-input"><div class="nmm-input-icon">${icon('magnifyingGlassSmall', 16)}</div>` +
|
|
64
66
|
`<input type="text" role="combobox" placeholder="${t("筛选…")}" autocomplete="off" spellcheck="false" aria-autocomplete="list" aria-haspopup="grid" aria-expanded="true">` +
|
|
65
67
|
`<div role="button" tabindex="0" aria-label="${t("清除输入")}" class="nmm-clear" data-act="clear" hidden>${icon('xMarkCircle', 20)}</div></div>` +
|
|
66
|
-
`<div class="nmm-filter-right"><div class="nmm-tab-left"></div><div role="button" tabindex="0" aria-label="${t("随机")}" class="nmm-random" data-act="random">${icon('arrowIntersectRightSmall',
|
|
68
|
+
`<div class="nmm-filter-right"><div class="nmm-tab-left"></div><div role="button" tabindex="0" aria-label="${t("随机")}" class="nmm-random" data-act="random">${icon('arrowIntersectRightSmall', 16)}</div><div class="nmm-tab-button"></div></div>` +
|
|
67
69
|
`</div></div>` +
|
|
68
70
|
`</div>` +
|
|
69
71
|
`<div class="nmm-content"></div>`;
|
|
@@ -1,2 +1,156 @@
|
|
|
1
|
-
//
|
|
2
|
-
export const PICKER_CSS = "/* 图标选择器(./index.js、./emoji-tab.js、./icon-tab.js;数值是线上实测) */\n.notion-media-menu { display: flex; flex-direction: column; max-height: calc(100vh - 24px); border-radius: 10px; background: var(--c-popBac); box-shadow: var(--c-shaOutLg); overflow: hidden; color: var(--c-texPri); font-size: 14px; line-height: 1.2; }\n\n/* 页签栏:高 40,左右 8,底下一条线;页签 28 高、左右 8、圆角 6;选中的下面 2px 线(左右缩进 8) */\n.nmm-header { flex-shrink: 0; }\n.nmm-tabbar { display: flex; height: 40px; padding: 0 8px; box-shadow: inset 0 -1px 0 var(--ca-borSecTra); overflow: auto hidden; scrollbar-width: none; }\n.nmm-tabs { display: flex; }\n.nmm-tab-wrap { position: relative; padding: 6px 0; }\n.nmm-tab { display: inline-flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 6px; white-space: nowrap; color: var(--c-texTer); cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-tab:hover { background: var(--ca-bacIntTra); }\n.nmm-tab.selected { color: var(--c-texPri); }\n.nmm-tab.disabled { cursor: default; background: none; }\n.nmm-tab-line { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--c-texPri); }\n.nmm-tab-wrap:not(.selected) .nmm-tab-line { display: none; }\n.nmm-tabbar-right { display: flex; align-items: center; margin-inline-start: auto; }\n/* 图标页签:随机按钮左边,写着现在这一套图标的名字(MingCute / Tabler),点一下换成另一套(icon-tab.mjs) */\n.nmm-set-toggle { display: flex; align-items: center; justify-content: center; min-width: 74px; height: 28px; box-sizing: border-box; margin-inline-end: 6px; padding: 0 8px; border: 1px solid var(--ca-borPriTra); border-radius: 6px; color: var(--c-texSec); font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-set-toggle:hover { background: var(--ca-bacIntTra); }\n.nmm-tab-left:empty { display: none; }\n.nmm-tab-left { display: flex; }\n.nmm-text-button { display: flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--c-texTer); cursor: pointer; white-space: nowrap; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-text-button:hover { background: var(--ca-bacIntTra); }\n\n/* 筛选行:上 4 下 10;里面 4px 8px、间距 8 */\n.nmm-filter-row { margin: 4px 0 10px; }\n.nmm-filter { display: flex; align-items: center; gap: 8px; height: 36px; padding: 4px 8px; }\n.nmm-input { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; height: 28px; padding: 3px 6px; border-radius: 6px; background: var(--ca-graBacPriTra); box-shadow: inset 0 0 0 1px var(--ca-borPriTra); cursor: text; line-height: 20px; }\n.nmm-input:focus-within { box-shadow: var(--c-inpBluFocRin); }\n.nmm-input-icon { width: 16px; height: 16px; margin-inline-end: 6px; --nmm-icon: var(--c-icoSec); }\n.nmm-input input { flex: 1; min-width: 0; height: 20px; border: none; outline: none; background: transparent; padding: 0; font: inherit; font-size: 14px; line-height: 20px; color: var(--c-texPri); }\n.nmm-input input::placeholder { color: var(--c-texTer); }\n.nmm-clear { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; margin: -2px -4px -2px 0; border-radius: 20px; --nmm-icon: var(--c-icoTer); cursor: pointer; }\n.nmm-clear[hidden] { display: none; }\n.nmm-clear:hover { background: var(--ca-bacIntTra); }\n.nmm-filter-right { display: flex; flex: 0 0 auto; }\n.nmm-random, .nmm-color-button { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; box-sizing: border-box; border: 1px solid var(--ca-borPriTra); border-radius: 6px; --nmm-icon: var(--c-icoPri); cursor: pointer; transition: background 100ms ease-in-out; }\n.nmm-random:hover, .nmm-color-button:hover { background: var(--ca-bacIntTra); }\n.nmm-skin-wrap { margin-inline-start: 6px; }\n.nmm-skin { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0 6px; border-radius: 6px; font-size: 20px; line-height: 24px; cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-skin:hover { background: var(--ca-bacIntTra); }\n\n/* 列表区:高 300。表情:列表(最高 305,下 6)+ 分类栏;图标:列表占满 */\n.nmm-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }\n.nmm-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }\n.nmm-scroller { flex: 1 1 auto; min-height: 0; max-height: 305px; padding-bottom: 6px; overflow: hidden auto; }\n.nmm-icon-scroller { max-height: none; padding-bottom: 0; }\n.nmm-section { display: flex; flex-direction: column; gap: 1px; }\n.nmm-section-title { display: flex; margin: 6px 0 8px; padding: 6px 8px 0; font-size: 12px; font-weight: 500; line-height: 12px; color: var(--c-texSec); user-select: none; }\n.nmm-section-title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.nmm-rows { display: flex; flex-direction: column; padding: 0 12px; }\n.nmm-row { display: flex; }\n.nmm-cell { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 4px; font-size: 24px; line-height: 36px; cursor: pointer; user-select: none; }\n.nmm-cell.focused { background: var(--ca-bacIntTra); }\n.nmm-cell.focus-visible { box-shadow: var(--c-butBluFocRin); }\n.nmm-cell img { display: block; }\n/* 图标页签:每组外面 4px,标题没有上内边距、行高 14.4;格子圆角 8 */\n.nmm-icon-grid .nmm-section { padding: 4px; }\n.nmm-icon-grid .nmm-section-title { padding: 0 8px; line-height: 14.4px; }\n.nmm-icon-cell { border-radius: 8px; }\n/* 无结果:外层 4px,说明文字 12px / 500 */\n.nmm-empty { padding: 4px; }\n.nmm-empty-caption { display: flex; align-items: center; height: 20px; margin: 2px 0 2px 2px; padding: 4px 8px; font-size: 12px; font-weight: 500; line-height: 16.8px; color: var(--c-texSec); }\n\n/* 分类栏:上边一条线,内边距 8 12 10,按钮 32×32、图标 22、圆角 6 */\n.nmm-categories { display: flex; justify-content: space-between; flex-shrink: 0; padding: 8px 12px 10px; border-top: 1px solid var(--c-borSec); }\n.nmm-categories[hidden] { display: none; }\n.nmm-category { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; --nmm-icon: var(--c-icoSec); cursor: pointer; transition: background 100ms ease-in-out; }\n.nmm-category:hover, .nmm-category.focused { background: var(--ca-bacIntTra); }\n.nmm-category.disabled { opacity: .4; cursor: default; background: none; }\n\n/* 小浮层:肤色变体 / 选肤色(一排,padding 4);图标颜色变体(两行各 5 个,行内边距 2、间距 1);选图标颜色的菜单(宽 134) */\n.nmm-variations, .nmm-icon-variations, .nmm-color-menu { border-radius: 10px; background: var(--c-popBac); box-shadow: var(--c-shaOutLg); }\n.nmm-variations { display: flex; padding: 4px; }\n.nmm-icon-variations-row { display: flex; padding: 2px; gap: 1px; }\n.nmm-color-menu { width: 134px; padding: 4px 0; }\n.nmm-color-row { display: flex; padding: 4px; gap: 4px; }\n.nmm-color-row.dim { opacity: .5; }\n.nmm-color-swatch { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; opacity: .4; cursor: pointer; transition: background 100ms ease-in-out; }\n.nmm-color-swatch.selected { opacity: 1; }\n.nmm-color-swatch:hover { background: var(--ca-bacIntTra); }\n.nmm-color-ask { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; margin: 4px 0 0; padding: 4px 4px 0; border-top: 1px solid var(--ca-borSecTra); }\n.nmm-color-ask-item { display: flex; align-items: center; width: 100%; height: 28px; padding-inline: 6px; border-radius: 6px; font-size: 14px; cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-color-ask-item:hover { background: var(--ca-bacIntTra); }\n.nmm-color-ask-label { flex: 1; margin-inline-start: 6px; white-space: nowrap; }\n.nmm-switch { display: flex; flex-shrink: 0; width: 26px; height: 14px; padding: 2px; margin-inline-end: 4px; box-sizing: content-box; border-radius: 44px; background: var(--ca-swiTogDesTraBgVar); transition: background 200ms; }\n.nmm-switch.on { background: var(--c-bluBacAccPri); }\n.nmm-switch-knob { width: 14px; height: 14px; border-radius: 44px; background: white; transition: transform 200ms ease-out; }\n.nmm-switch.on .nmm-switch-knob { transform: translateX(12px); }\n\n/* 自定义表情(./emoji-tab.js,943244 S):“添加表情符号”的圆形加号(28×28、外边距 2、1px --c-borPri、圆角 15,加号 16 --c-icoSec);\n 无结果时的“添加表情符号”按钮(28 高、4px 8px、左右外边距 12、圆角 6、1px --c-borPri、14px / 500、间距 6,加号 --c-icoPri) */\n.nmm-cell.nmm-add-cell { width: 28px; height: 28px; margin: 2px; box-sizing: border-box; border: 1px solid var(--c-borPri); border-radius: 15px; --nmm-icon: var(--c-icoSec); }\n.nmm-empty.with-add { display: flex; flex-direction: column; }\n.nmm-empty.with-add .nmm-empty-caption { height: 20px; margin: 0 0 2px 2px; box-sizing: content-box; }\n.nmm-cell.nmm-add-button { display: flex; align-items: center; justify-content: flex-start; gap: 6px; width: auto; height: 28px; margin: 0 12px; padding: 4px 8px; box-sizing: border-box; border: 1px solid var(--c-borPri); border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; --nmm-icon: var(--c-icoPri); }\n.nmm-cell img.notion-custom-emoji { object-fit: contain; color: transparent; }\n\n/* “上传”页签 / “添加表情符号”浮层(./upload.js,963369;数值见那里开头) */\n.nmm-upload { display: flex; flex-direction: column; padding: 0 16px; font-size: 14px; color: var(--c-texPri); }\n.nmm-upload-title { margin-top: 12px; font-size: 14px; font-weight: 600; }\n.nmm-upload-description { margin-top: 2px; font-size: 12px; color: var(--c-texSec); }\n.nmm-upload-zone-wrap { display: flex; flex-direction: column; align-items: stretch; margin-top: 20px; }\n.nmm-upload-zone { border-radius: 4px; background: var(--ca-bacSecTra); }\n.nmm-upload-zone-wrap.dragover .nmm-upload-zone { background: var(--ca-bluBacSecTra); }\n.nmm-upload-button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 6px; font-weight: 500; line-height: 1.2; white-space: nowrap; color: var(--c-texSec); --nmm-icon: var(--c-icoSec); cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-upload-button:hover { background: var(--ca-bacIntTra); }\n.nmm-upload-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; }\n.nmm-upload.large .nmm-upload-preview { padding: 16px; }\n.nmm-upload-preview.with-replace { padding-bottom: 4px; }\n.nmm-upload-preview-label { margin-bottom: 4px; font-size: 12px; color: var(--c-texSec); }\n.nmm-upload-preview-row { display: flex; align-items: center; gap: 6px; }\n.nmm-upload-preview-row img { width: 48px; height: 48px; padding: 8px; box-sizing: border-box; border: 1px solid var(--ca-borPriTra); border-radius: 8px; object-fit: cover; }\n.nmm-upload.large .nmm-upload-preview-row img { width: 80px; height: 80px; padding: 6px; }\n.nmm-upload-zone.contain .nmm-upload-preview-row img { object-fit: contain; }\n.nmm-upload-preview-row img.light { background: var(--c-whi); }\n.nmm-upload-preview-row img.dark { background: var(--c-priBla); }\n.nmm-upload-replace { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--c-graTexAccPri); --nmm-icon: var(--c-graTexAccPri); cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-upload-replace:hover { background: var(--ca-graBacIntTra); }\n.nmm-upload-paste { margin-top: 10px; font-size: 12px; color: var(--c-texTer); text-align: center; }\n.nmm-upload-error { margin-top: 10px; font-size: 12px; color: var(--c-redTexAccPri); text-align: center; }\n.nmm-upload-confirm { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; cursor: pointer; user-select: none; }\n.nmm-upload-checkbox { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 14px; height: 14px; box-sizing: border-box; border: 1px solid var(--ca-borStrTra); border-radius: 3px; cursor: pointer; transition: background .2s ease-out; }\n.nmm-upload-checkbox[aria-checked=\"true\"] { border: none; background: var(--c-bluBacAccPri); }\n.nmm-upload-name { display: block; margin-top: 20px; }\n.nmm-upload-name-label { margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--c-texSec); }\n.nmm-upload-input { display: flex; align-items: center; height: 28px; padding: 3px 6px; border-radius: 6px; background: var(--ca-bacSecTra); box-shadow: 0 0 0 1px var(--ca-borPriTra); cursor: text; }\n.nmm-upload-input:focus-within { box-shadow: var(--c-inpBluFocRin); }\n.nmm-upload-input input { flex: 1; min-width: 0; height: 20px; border: none; outline: none; background: transparent; padding: 0; font: inherit; font-size: 14px; line-height: 20px; color: var(--c-texPri); }\n.nmm-upload-input input::placeholder { color: var(--c-texTer); }\n.nmm-upload-name-error { margin-top: 10px; font-size: 12px; color: var(--c-redTexAccPri); }\n.nmm-upload-name-error[hidden], .nmm-upload [hidden] { display: none; }\n.nmm-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }\n.nmm-upload-secondary, .nmm-upload-save { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; user-select: none; transition: background 100ms ease-in-out; }\n.nmm-upload-secondary { color: var(--c-texSec); }\n.nmm-upload-secondary:hover { background: var(--ca-bacIntTra); }\n.nmm-upload-save { background: var(--c-bluBacAccPri); color: var(--c-texInvPri); }\n.nmm-upload-save:not(.disabled):hover { filter: brightness(.94); }\n.nmm-upload-save.disabled { opacity: .4; cursor: default; }\n/* “添加表情符号”浮层(749527 tM → 747369 Popup,最小宽 280) */\n.nmm-custom-emoji-popup { min-width: 280px; border-radius: 10px; background: var(--c-popBac); box-shadow: var(--c-shaOutLg); }\n\n/* 图标:编辑器自己的线条图(../icons.mjs),颜色由所在处的 --nmm-icon 定 */\n.notion-popup-layer svg:not(.ge-glyph) { fill: none; stroke: var(--nmm-icon, currentColor); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }\n.nmm-upload-checkbox { --nmm-icon: #fff; }\n.nmm-upload-checkbox svg { stroke-width: 2; }";
|
|
1
|
+
// The icon picker's look (index.mjs, emoji-tab.mjs, icon-tab.mjs, upload.mjs, grid.mjs), Gallery's own
|
|
2
|
+
// since 2026-11 (the user's word: notion-lite's media-picker.css, which it was, gave way): the editor's
|
|
3
|
+
// palette (page/look.mjs, --ge-*), text tabs and gray fills as the formula editor's symbol bar
|
|
4
|
+
// (formula/panel.mjs), buttons without a frame, nothing in blue or any other bright color. Its structure,
|
|
5
|
+
// its class names (.notion-media-menu, .nmm-*: the scenarios read them) and its sizes (408 x 390, 4px
|
|
6
|
+
// under the icon) as before. support.mjs style() adds it to the popups' layer.
|
|
7
|
+
export const PICKER_CSS = `
|
|
8
|
+
.notion-media-menu { display: flex; flex-direction: column; max-height: calc(100vh - 24px); border-radius: 10px; background: var(--ge-bg); box-shadow: var(--ge-shadow-pop); overflow: hidden; color: var(--ge-tx); font-size: 14px; line-height: 1.2; }
|
|
9
|
+
|
|
10
|
+
/* The tab bar: 6 8, a --ge-line under it. A tab 26 high, 8 each side, 13px, rounded 6, --ge-tx2; the one
|
|
11
|
+
shown the only gray block (--ge-hover) in --ge-tx, another darkening its words alone under the pointer.
|
|
12
|
+
移除 at its right end, a text button of the same size (as the formula editor's 完成). */
|
|
13
|
+
.nmm-header { flex-shrink: 0; }
|
|
14
|
+
.nmm-tabbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--ge-line); overflow: auto hidden; scrollbar-width: none; }
|
|
15
|
+
.nmm-tabs { display: flex; gap: 2px; }
|
|
16
|
+
.nmm-tab-wrap { display: flex; }
|
|
17
|
+
.nmm-tab { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; font-size: 13px; white-space: nowrap; color: var(--ge-tx2); cursor: pointer; user-select: none; transition: color 20ms ease-in, background 20ms ease-in; }
|
|
18
|
+
.nmm-tab:hover { color: var(--ge-tx); }
|
|
19
|
+
.nmm-tab.selected { background: var(--ge-hover); color: var(--ge-tx); }
|
|
20
|
+
.nmm-tabbar-right { display: flex; align-items: center; margin-inline-start: auto; }
|
|
21
|
+
.nmm-text-button { display: flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; font-size: 13px; color: var(--ge-tx2); white-space: nowrap; cursor: pointer; user-select: none; }
|
|
22
|
+
.nmm-text-button:hover { background: var(--ge-hover); color: var(--ge-tx); }
|
|
23
|
+
|
|
24
|
+
/* The filter row: 8 12 6. The field 28 high on --ge-field, a 1px --ge-edge inside it, which focus only
|
|
25
|
+
deepens (to --ge-ico3, no blue ring). The buttons right of it (随机, the skin tone, the icon color, the
|
|
26
|
+
set) 28 x 28 without a frame, their icons --ge-ico2; --ge-hover under the pointer, --ge-press pressed. */
|
|
27
|
+
.nmm-filter-row { padding: 8px 12px 6px; }
|
|
28
|
+
.nmm-filter { display: flex; align-items: center; gap: 4px; }
|
|
29
|
+
.nmm-input { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; height: 28px; box-sizing: border-box; margin-inline-end: 4px; padding: 0 4px 0 8px; border-radius: 6px; background: var(--ge-field); box-shadow: inset 0 0 0 1px var(--ge-edge); cursor: text; }
|
|
30
|
+
.nmm-input:focus-within { box-shadow: inset 0 0 0 1px var(--ge-ico3); }
|
|
31
|
+
.nmm-input-icon { display: flex; width: 16px; height: 16px; margin-inline-end: 6px; --nmm-icon: var(--ge-ico2); }
|
|
32
|
+
.nmm-input input { flex: 1; min-width: 0; height: 20px; border: none; outline: none; background: transparent; padding: 0; font: inherit; font-size: 14px; line-height: 20px; color: var(--ge-tx); }
|
|
33
|
+
.nmm-input input::placeholder { color: var(--ge-tx3); }
|
|
34
|
+
.nmm-clear { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; --nmm-icon: var(--ge-ico3); cursor: pointer; }
|
|
35
|
+
.nmm-clear[hidden] { display: none; }
|
|
36
|
+
.nmm-clear:hover { --nmm-icon: var(--ge-ico2); }
|
|
37
|
+
.nmm-filter-right { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
|
|
38
|
+
.nmm-tab-left { display: flex; }
|
|
39
|
+
.nmm-tab-left:empty { display: none; }
|
|
40
|
+
.nmm-skin-wrap { display: flex; }
|
|
41
|
+
.nmm-random, .nmm-color-button, .nmm-skin { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; box-sizing: border-box; border-radius: 6px; --nmm-icon: var(--ge-ico2); cursor: pointer; user-select: none; }
|
|
42
|
+
.nmm-skin img, .nmm-skin .ge-emoji-pending { display: block; width: 18px; height: 18px; }
|
|
43
|
+
/* The 图标 tab: left of 随机 the set shown (MingCute / Tabler), a click the other one (icon-tab.mjs); 72 wide at least, so a new name moves nothing */
|
|
44
|
+
.nmm-set-toggle { display: flex; align-items: center; justify-content: center; min-width: 72px; height: 28px; box-sizing: border-box; padding: 0 8px; border-radius: 6px; color: var(--ge-tx2); font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; }
|
|
45
|
+
.nmm-random:hover, .nmm-color-button:hover, .nmm-skin:hover, .nmm-set-toggle:hover { background: var(--ge-hover); color: var(--ge-tx); --nmm-icon: var(--ge-ico); }
|
|
46
|
+
.nmm-random:active, .nmm-color-button:active, .nmm-skin:active, .nmm-set-toggle:active { background: var(--ge-press); }
|
|
47
|
+
|
|
48
|
+
/* The list: in the 表情符号 tab above the category bar, in the 图标 tab all the rest. The scroller is
|
|
49
|
+
positioned, so a group's offsetTop counts from it (a category's button scrolls its group to the top). */
|
|
50
|
+
.nmm-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
51
|
+
.nmm-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
52
|
+
.nmm-scroller { position: relative; flex: 1 1 auto; min-height: 0; padding-bottom: 6px; overflow: hidden auto; }
|
|
53
|
+
.nmm-section { display: flex; flex-direction: column; }
|
|
54
|
+
/* A group's title sticks to the list's top as it scrolls (the next one pushes it away): 28 high, 12px / 500,
|
|
55
|
+
--ge-tx2, on the card's own color; 16 from the left, where the first column's emoji and the tabs' words start
|
|
56
|
+
(the rows' 12 and a cell's 4) */
|
|
57
|
+
.nmm-section-title { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-end; height: 28px; box-sizing: border-box; padding: 0 16px 6px; background: var(--ge-bg); font-size: 12px; font-weight: 500; line-height: 16px; color: var(--ge-tx2); user-select: none; }
|
|
58
|
+
.nmm-section-title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
59
|
+
.nmm-rows { display: flex; flex-direction: column; padding: 0 12px; }
|
|
60
|
+
.nmm-row { display: flex; }
|
|
61
|
+
/* A cell 32 x 32, rounded 6, its emoji or icon 24: --ge-hover under the pointer, --ge-press where the keys moved to (no blue ring) */
|
|
62
|
+
.nmm-cell { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 6px; font-size: 24px; line-height: 1; cursor: pointer; user-select: none; }
|
|
63
|
+
.nmm-cell.focused { background: var(--ge-hover); }
|
|
64
|
+
.nmm-cell.focus-visible { background: var(--ge-press); }
|
|
65
|
+
.nmm-cell img { display: block; }
|
|
66
|
+
.nmm-cell img.notion-custom-emoji { object-fit: contain; color: transparent; }
|
|
67
|
+
/* 添加表情符号: the custom group's first cell, a round plus (26, 3 around, the plus --ge-ico3, no line round
|
|
68
|
+
it: gray under the pointer as a cell); with no result, a button (28 high, 13px / 500, no line either) */
|
|
69
|
+
.nmm-cell.nmm-add-cell { width: 26px; height: 26px; margin: 3px; box-sizing: border-box; border-radius: 50%; --nmm-icon: var(--ge-ico3); }
|
|
70
|
+
.nmm-cell.nmm-add-cell.focused { --nmm-icon: var(--ge-ico); }
|
|
71
|
+
.nmm-empty { padding: 8px 12px; }
|
|
72
|
+
.nmm-empty-caption { display: flex; align-items: center; height: 20px; padding: 0 4px; font-size: 12px; font-weight: 500; color: var(--ge-tx3); }
|
|
73
|
+
.nmm-empty.with-add { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
|
|
74
|
+
.nmm-cell.nmm-add-button { justify-content: flex-start; gap: 6px; width: max-content; height: 28px; padding: 0 10px 0 8px; box-sizing: border-box; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 1; color: var(--ge-tx); white-space: nowrap; --nmm-icon: var(--ge-ico2); }
|
|
75
|
+
|
|
76
|
+
/* The category bar: a --ge-line above it, 6 12 8; buttons 28 x 28, icons 18 in --ge-ico3; the group scrolled
|
|
77
|
+
to on --ge-hover, its icon --ge-ico; a group with no emoji faded to .35 and not to be clicked (自定义 and
|
|
78
|
+
添加 always can) */
|
|
79
|
+
.nmm-categories { display: flex; justify-content: space-between; flex-shrink: 0; padding: 6px 12px 8px; border-top: 1px solid var(--ge-line); }
|
|
80
|
+
.nmm-categories[hidden] { display: none; }
|
|
81
|
+
.nmm-category { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; --nmm-icon: var(--ge-ico3); cursor: pointer; }
|
|
82
|
+
.nmm-category:hover { background: var(--ge-hover); --nmm-icon: var(--ge-ico2); }
|
|
83
|
+
.nmm-category.focused { background: var(--ge-hover); --nmm-icon: var(--ge-ico); }
|
|
84
|
+
.nmm-category.disabled { opacity: .35; cursor: default; background: none; }
|
|
85
|
+
|
|
86
|
+
/* The small popups: the skin tones of an emoji or to choose (one row), an icon's colors (two rows of 5), the
|
|
87
|
+
icon color's menu; the card's color, shadow and corners */
|
|
88
|
+
.nmm-variations, .nmm-icon-variations, .nmm-color-menu { border-radius: 10px; background: var(--ge-bg); box-shadow: var(--ge-shadow-pop); }
|
|
89
|
+
.nmm-variations { display: flex; gap: 2px; padding: 4px; }
|
|
90
|
+
.nmm-icon-variations { padding: 4px; }
|
|
91
|
+
.nmm-icon-variations-row { display: flex; gap: 2px; }
|
|
92
|
+
.nmm-color-menu { width: 160px; box-sizing: border-box; padding: 6px; }
|
|
93
|
+
.nmm-color-row { display: flex; justify-content: space-between; padding: 2px 0; }
|
|
94
|
+
.nmm-color-row.dim { opacity: .5; }
|
|
95
|
+
.nmm-color-swatch { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; opacity: .45; cursor: pointer; }
|
|
96
|
+
.nmm-color-swatch.selected, .nmm-color-swatch:hover { opacity: 1; background: var(--ge-hover); }
|
|
97
|
+
.nmm-color-ask { display: flex; margin: 6px -6px 0; padding: 6px 6px 0; border-top: 1px solid var(--ge-line); }
|
|
98
|
+
.nmm-color-ask-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 6px; border-radius: 6px; font-size: 13px; color: var(--ge-tx); cursor: pointer; user-select: none; }
|
|
99
|
+
.nmm-color-ask-item:hover { background: var(--ge-hover); }
|
|
100
|
+
.nmm-color-ask-label { flex: 1; white-space: nowrap; }
|
|
101
|
+
/* 每次询问's switch: off --ge-line-strong, on --ge-tx2 (a neutral gray, not the blue), its knob white */
|
|
102
|
+
.nmm-switch { display: flex; flex-shrink: 0; width: 26px; height: 14px; padding: 2px; box-sizing: content-box; border-radius: 44px; background: var(--ge-line-strong); transition: background 200ms; }
|
|
103
|
+
.nmm-switch.on { background: var(--ge-tx2); }
|
|
104
|
+
.nmm-switch-knob { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(15 15 15 / 20%); transition: transform 200ms ease-out; }
|
|
105
|
+
.nmm-switch.on .nmm-switch-knob { transform: translateX(12px); }
|
|
106
|
+
|
|
107
|
+
/* The 上传 tab and the 添加表情符号 popup (upload.mjs): the zone an image goes in on --ge-field, a 1px
|
|
108
|
+
--ge-edge inside it, rounded 8, deeper while a file is dragged over it (--ge-hover, --ge-ico3), never blue;
|
|
109
|
+
保存 the pale blue primary and 取消 / 返回 the plain text button (look.mjs BUTTONS: .ge-btn, dimmed while it cannot be
|
|
110
|
+
clicked); the checkbox checked --ge-tx2 with a white tick; an error --ge-red */
|
|
111
|
+
.nmm-upload { display: flex; flex-direction: column; padding: 0 16px; font-size: 14px; color: var(--ge-tx); }
|
|
112
|
+
.nmm-upload-title { margin-top: 14px; font-size: 14px; font-weight: 600; }
|
|
113
|
+
.nmm-upload-description { margin-top: 2px; font-size: 12px; color: var(--ge-tx2); }
|
|
114
|
+
.nmm-upload-zone-wrap { display: flex; flex-direction: column; align-items: stretch; margin-top: 16px; }
|
|
115
|
+
.nmm-upload-zone { border-radius: 8px; background: var(--ge-field); box-shadow: inset 0 0 0 1px var(--ge-edge); }
|
|
116
|
+
.nmm-upload-zone-wrap.dragover .nmm-upload-zone { background: var(--ge-hover); box-shadow: inset 0 0 0 1px var(--ge-ico3); }
|
|
117
|
+
.nmm-upload-button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 14px; border-radius: 8px; font-weight: 500; line-height: 1.2; white-space: nowrap; color: var(--ge-tx2); --nmm-icon: var(--ge-ico2); cursor: pointer; user-select: none; }
|
|
118
|
+
.nmm-upload-button:hover { background: var(--ge-hover); color: var(--ge-tx); }
|
|
119
|
+
.nmm-upload-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; }
|
|
120
|
+
.nmm-upload.large .nmm-upload-preview { padding: 16px; }
|
|
121
|
+
.nmm-upload-preview.with-replace { padding-bottom: 4px; }
|
|
122
|
+
.nmm-upload-preview-label { margin-bottom: 4px; font-size: 12px; color: var(--ge-tx2); }
|
|
123
|
+
.nmm-upload-preview-row { display: flex; align-items: center; gap: 6px; }
|
|
124
|
+
.nmm-upload-preview-row img { width: 48px; height: 48px; padding: 8px; box-sizing: border-box; border: 1px solid var(--ge-edge); border-radius: 8px; object-fit: cover; }
|
|
125
|
+
.nmm-upload.large .nmm-upload-preview-row img { width: 80px; height: 80px; padding: 6px; }
|
|
126
|
+
.nmm-upload-zone.contain .nmm-upload-preview-row img { object-fit: contain; }
|
|
127
|
+
.nmm-upload-preview-row img.light { background: #fff; }
|
|
128
|
+
.nmm-upload-preview-row img.dark { background: #191919; }
|
|
129
|
+
.nmm-upload-replace { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--ge-tx2); --nmm-icon: var(--ge-ico2); cursor: pointer; user-select: none; }
|
|
130
|
+
.nmm-upload-replace:hover { background: var(--ge-hover); }
|
|
131
|
+
.nmm-upload-paste { margin-top: 10px; font-size: 12px; color: var(--ge-tx3); text-align: center; }
|
|
132
|
+
.nmm-upload-error { margin-top: 10px; font-size: 12px; color: var(--ge-red); text-align: center; }
|
|
133
|
+
.nmm-upload-confirm { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; cursor: pointer; user-select: none; }
|
|
134
|
+
.nmm-upload-checkbox { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 14px; height: 14px; box-sizing: border-box; border: 1px solid var(--ge-ico3); border-radius: 3px; cursor: pointer; transition: background .2s ease-out; }
|
|
135
|
+
.nmm-upload-checkbox[aria-checked="true"] { border-color: transparent; background: var(--ge-tx2); }
|
|
136
|
+
.nmm-upload-name { display: block; margin-top: 20px; }
|
|
137
|
+
.nmm-upload-name-label { margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--ge-tx2); }
|
|
138
|
+
.nmm-upload-input { display: flex; align-items: center; height: 28px; box-sizing: border-box; padding: 0 8px; border-radius: 6px; background: var(--ge-field); box-shadow: inset 0 0 0 1px var(--ge-edge); cursor: text; }
|
|
139
|
+
.nmm-upload-input:focus-within { box-shadow: inset 0 0 0 1px var(--ge-ico3); }
|
|
140
|
+
.nmm-upload-input input { flex: 1; min-width: 0; height: 20px; border: none; outline: none; background: transparent; padding: 0; font: inherit; font-size: 14px; line-height: 20px; color: var(--ge-tx); }
|
|
141
|
+
.nmm-upload-input input::placeholder { color: var(--ge-tx3); }
|
|
142
|
+
.nmm-upload-name-error { margin-top: 10px; font-size: 12px; color: var(--ge-red); }
|
|
143
|
+
.nmm-upload-name-error[hidden], .nmm-upload [hidden] { display: none; }
|
|
144
|
+
.nmm-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }
|
|
145
|
+
.nmm-upload-secondary, .nmm-upload-save { font-size: 14px; }
|
|
146
|
+
.nmm-custom-emoji-popup { min-width: 280px; border-radius: 10px; background: var(--ge-bg); box-shadow: var(--ge-shadow-pop); }
|
|
147
|
+
|
|
148
|
+
/* A button reached by Tab: a gray fill, not the browser's dark or blue ring; the checkbox a gray ring */
|
|
149
|
+
.notion-media-menu [role="button"]:focus-visible, .nmm-custom-emoji-popup [role="button"]:focus-visible { outline: none; background: var(--ge-hover); }
|
|
150
|
+
.nmm-upload-checkbox:focus-visible { outline: 1px solid var(--ge-ico3); outline-offset: 2px; }
|
|
151
|
+
|
|
152
|
+
/* Icons: the editor's own line drawings (icons.mjs), in the color --nmm-icon gives where they are (the media menu's are in this layer too) */
|
|
153
|
+
.notion-popup-layer svg:not(.ge-glyph) { fill: none; stroke: var(--nmm-icon, currentColor); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
|
|
154
|
+
.nmm-upload-checkbox { --nmm-icon: #fff; }
|
|
155
|
+
.nmm-upload-checkbox svg { stroke-width: 2; }
|
|
156
|
+
`;
|
|
@@ -16,14 +16,16 @@ import { t } from "../../../shared/i18n/index.mjs";
|
|
|
16
16
|
// a press outside every one closes them all, one inside closes those above it), its tooltip
|
|
17
17
|
// (ui/tooltip.js: the editor's own, tooltip.mjs), its snackbar (the editor's status line), the storage its uploads and custom
|
|
18
18
|
// emojis go to (this Gallery's server: the report's own folder, the workspace's library) and its
|
|
19
|
-
// styles
|
|
19
|
+
// styles. The picker's own (styles.mjs) read the editor's palette (page/look.mjs, since 2026-11); Notion's
|
|
20
|
+
// tokens (--c-*, --ca-*, light and dark) stay on the layer for the media menu (media-menu/) and the image's
|
|
21
|
+
// alignment bar (components/image/page.mjs), which still read them. Everything drawn carries data-doc-dev.
|
|
20
22
|
|
|
21
23
|
export const esc = (s) => escapeMarkup(String(s ?? "")).replaceAll("'", "'");
|
|
22
24
|
export { icon };
|
|
23
25
|
|
|
24
26
|
// ---------- styles ----------
|
|
25
27
|
|
|
26
|
-
// Notion's tokens
|
|
28
|
+
// Notion's tokens (notion-lite's view/theme/notion-vars.css), light and dark: the media menu's and the image's alignment bar's (the picker reads --ge-*).
|
|
27
29
|
const TOKENS = `
|
|
28
30
|
--ca-bacIntTra: light-dark(rgba(33,27,23,.05), rgba(255,255,255,.055));
|
|
29
31
|
--ca-bacSecTra: light-dark(rgba(66,35,3,.03), rgba(252,252,252,.03));
|
|
@@ -46,14 +48,14 @@ const TOKENS = `
|
|
|
46
48
|
`;
|
|
47
49
|
const FONT = `ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif`;
|
|
48
50
|
|
|
49
|
-
/** The
|
|
51
|
+
/** The popups' layer (notion-lite's popup.css) and the picker's styles (styles.mjs), added once. */
|
|
50
52
|
export function style() {
|
|
51
53
|
addStyle(`
|
|
52
54
|
.notion-popup-layer { ${TOKENS} }
|
|
53
55
|
.notion-popup-layer { position: fixed; inset: 0; pointer-events: none; z-index: ${Z.menu}; font: 14px/1.2 ${FONT}; color: var(--c-texPri); }
|
|
54
56
|
.notion-popup { position: fixed; pointer-events: auto; opacity: 0; transition: opacity 200ms; }
|
|
55
57
|
.notion-popup.shown { opacity: 1; }
|
|
56
|
-
.notion-popup-layer .notion-scroller { scrollbar-width: thin; scrollbar-color: var(--
|
|
58
|
+
.notion-popup-layer .notion-scroller { scrollbar-width: thin; scrollbar-color: var(--ge-edge) transparent; }
|
|
57
59
|
${PICKER_CSS}
|
|
58
60
|
`);
|
|
59
61
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
// Taken over from notion-lite (its src/ui/media-picker/upload.js)
|
|
2
|
-
// Gallery's own (support.mjs, src/shared/emoji/)
|
|
1
|
+
// Taken over from notion-lite (its src/ui/media-picker/upload.js): its structure and behaviour as there,
|
|
2
|
+
// what it imports Gallery's own (support.mjs, src/shared/emoji/), and since 2026-11 its look (styles.mjs:
|
|
3
|
+
// the editor's palette, no blue). Its notes, below, are notion-lite's, the colors changed.
|
|
3
4
|
/* 上传图片做图标 / 添加自定义表情(963369 CustomEmojiUploadPopup;数值、文案照源码,文案取自中文语言包)。两处用:
|
|
4
5
|
* 图标选择器的“上传”页签(569553 custom → customEmoji 页签:没有标题、大预览、能粘贴链接、可以勾“添加到表情符号库”)
|
|
5
6
|
* 表情页的“添加表情符号”浮层(749527 tM:有标题、小预览、不能粘贴链接、直接存成自定义表情;浮层最小宽 280)
|
|
6
7
|
* 布局(外层左右 16、14px,从上到下):
|
|
7
|
-
* 标题(上
|
|
8
|
-
* 放图片的区域(上
|
|
9
|
-
* 没图片:整块是一个按钮(内边距 14、间距 8、14px / 500、--
|
|
10
|
-
* 有图片:一列居中(内边距 16 / 12,有“替换”时下 4,间距 4):“预览”(12px、--
|
|
11
|
-
* 80 / 48 见方、内边距 6 / 8、圆角 8、1px --
|
|
8
|
+
* 标题(上 14、14px / 600)+ 说明(上 2、12px、--ge-tx2)——只有浮层有
|
|
9
|
+
* 放图片的区域(上 16、--ge-field 底、1px --ge-edge 内框、圆角 8;拖文件进来时灰底加深,不变蓝):
|
|
10
|
+
* 没图片:整块是一个按钮(内边距 18 14、间距 8、14px / 500、--ge-tx2、居中):图片图标 +“上传图片”
|
|
11
|
+
* 有图片:一列居中(内边距 16 / 12,有“替换”时下 4,间距 4):“预览”(12px、--ge-tx2、下 4)+ 一亮一暗两张(间距 6;
|
|
12
|
+
* 80 / 48 见方、内边距 6 / 8、圆角 8、1px --ge-edge;存成表情时 contain、否则 cover)+ 灰色“替换”(能粘贴链接时没有)
|
|
12
13
|
* 把文件拖进来:只收图片,别的显示“仅支持图片”
|
|
13
|
-
* 粘贴提示(上 10、12px、--
|
|
14
|
+
* 粘贴提示(上 10、12px、--ge-tx3、居中)“或Ctrl+V粘贴图片或链接”——能粘贴链接、还没图片、没出错时
|
|
14
15
|
* 错误(上 10、12px、红、居中)
|
|
15
|
-
* 勾选框(上 12、间距 8、14px;框 14
|
|
16
|
-
* 表情符号名称(上 20;标签 12px / 500 / --
|
|
16
|
+
* 勾选框(上 12、间距 8、14px;框 14,勾上是 --ge-tx2 底、白勾)“添加到表情符号库”——能勾、有图片时
|
|
17
|
+
* 表情符号名称(上 20;标签 12px / 500 / --ge-tx2、下 6;输入框;错误 上 10、12px、红)——要存成表情、
|
|
17
18
|
* 并且(不能粘贴链接,或者已经有图片)时;选了文件、名字还空着(或者还是上一个文件名生成的)就用文件名生成
|
|
18
|
-
* 底部(上 16 下 12、两端对齐、间距 8
|
|
19
|
+
* 底部(上 16 下 12、两端对齐、间距 8):左边灰色“返回”(能粘贴链接、有图片时:全部清掉重来)或“取消”(关掉);右边“保存”(文字按钮,500,不能点时淡灰)
|
|
19
20
|
* 保存(963369 r 的保存按钮):
|
|
20
21
|
* 要存成表情(浮层;或者勾了“添加到表情符号库”):名字必填、合法、不重名,才能点;图片存到本地 → 记进表情库 →
|
|
21
22
|
* 提示“已将 {name} 添加到表情符号库” → onDone(表情字符串);失败提示“无法保存此表情符号。请重试。”
|
|
@@ -75,8 +76,8 @@ export function createUploadForm({ showTitle = false, largeEmoji = false, allowU
|
|
|
75
76
|
`<label class="nmm-upload-name" hidden><div class="nmm-upload-name-label">${T.nameLabel}</div>` +
|
|
76
77
|
`<div class="nmm-upload-input"><input type="text" placeholder="${T.namePlaceholder}" autocomplete="off" spellcheck="false"></div>` +
|
|
77
78
|
`<div class="nmm-upload-name-error" hidden></div></label>` +
|
|
78
|
-
`<div class="nmm-upload-footer"><div role="button" tabindex="0" class="nmm-upload-secondary" data-act="secondary"></div>` +
|
|
79
|
-
`<div role="button" tabindex="0" class="nmm-upload-save" data-act="save">${T.save}</div></div>` +
|
|
79
|
+
`<div class="nmm-upload-footer"><div role="button" tabindex="0" class="ge-btn nmm-upload-secondary" data-act="secondary"></div>` +
|
|
80
|
+
`<div role="button" tabindex="0" class="ge-btn nmm-upload-save" data-primary data-act="save">${T.save}</div></div>` +
|
|
80
81
|
`<input type="file" accept="${ACCEPT}" hidden>`;
|
|
81
82
|
|
|
82
83
|
const zone = el.querySelector('.nmm-upload-zone'), wrap = el.querySelector('.nmm-upload-zone-wrap');
|
|
@@ -4,17 +4,19 @@ import { own } from "./overlays.mjs";
|
|
|
4
4
|
import { addStyle, element } from "./ui.mjs";
|
|
5
5
|
|
|
6
6
|
// The fills laid over blocks (docs/editor.md, "Overlays"), one painter for all of them: the blocks
|
|
7
|
-
// selected (selection/)
|
|
7
|
+
// selected (selection/), the blocks of the 批注 whose card shows (annotate/) and the blocks an Agent added
|
|
8
|
+
// or changed (changes/). There is one fill per
|
|
8
9
|
// block, in the editor's own layer for that block (overlay-layer.mjs), never inside it, and what it
|
|
9
10
|
// covers is the block's own to say: where it shows (a list item with its marker), how far the fill
|
|
10
11
|
// reaches past it (reachOf), the room its neighbours leave (roomOf), its corners and what cuts it. Only
|
|
11
12
|
// the colour is the caller's.
|
|
12
13
|
|
|
13
14
|
const STYLE = `
|
|
14
|
-
/* A block's fill, as a box selection's rectangle: blue for the blocks selected, warm for a 批注's. */
|
|
15
|
-
.ge-halo, .ge-note-halo { position: absolute; left: 0; top: 0; z-index: ${IN_LAYER.halo}; pointer-events: none; }
|
|
15
|
+
/* A block's fill, as a box selection's rectangle: blue for the blocks selected, warm for a 批注's, green for what an Agent added or changed (changes/). */
|
|
16
|
+
.ge-halo, .ge-note-halo, .ge-diff-halo { position: absolute; left: 0; top: 0; z-index: ${IN_LAYER.halo}; pointer-events: none; }
|
|
16
17
|
.ge-halo { background: var(--ge-halo); }
|
|
17
18
|
.ge-note-halo { background: var(--ge-note); }
|
|
19
|
+
.ge-diff-halo { background: var(--ge-diff-add-fill); }
|
|
18
20
|
`;
|
|
19
21
|
|
|
20
22
|
/**
|