@heycys/gallery 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -2
- package/THIRD-PARTY-NOTICES.md +3303 -0
- package/assets/writing-preferences.md +107 -0
- package/bin/gallery.mjs +10 -0
- package/browser/editor/components/bookmark/icons.mjs +6 -0
- package/browser/editor/components/bookmark/index.mjs +80 -0
- package/browser/editor/components/bookmark/page.mjs +147 -0
- package/browser/editor/components/builders.mjs +19 -0
- package/browser/editor/components/callout/index.mjs +64 -0
- package/browser/editor/components/code/index.mjs +327 -0
- package/browser/editor/components/code/page.mjs +561 -0
- package/browser/editor/components/colors.mjs +50 -0
- package/browser/editor/components/columns/index.mjs +104 -0
- package/browser/editor/components/columns/page.mjs +310 -0
- package/browser/editor/components/details/index.mjs +73 -0
- package/browser/editor/components/details/page.mjs +86 -0
- package/browser/editor/components/dialog/index.mjs +84 -0
- package/browser/editor/components/dialog/page.mjs +201 -0
- package/browser/editor/components/divider/index.mjs +48 -0
- package/browser/editor/components/embed/icons.mjs +11 -0
- package/browser/editor/components/embed/index.mjs +123 -0
- package/browser/editor/components/embed/page.mjs +309 -0
- package/browser/editor/components/figure/index.mjs +87 -0
- package/browser/editor/components/figure/page.mjs +42 -0
- package/browser/editor/components/file/icons.mjs +14 -0
- package/browser/editor/components/file/index.mjs +77 -0
- package/browser/editor/components/file/page.mjs +114 -0
- package/browser/editor/components/flowchart/add.mjs +123 -0
- package/browser/editor/components/flowchart/index.mjs +246 -0
- package/browser/editor/components/flowchart/page.mjs +453 -0
- package/browser/editor/components/heading/index.mjs +53 -0
- package/browser/editor/components/heading/page.mjs +6 -0
- package/browser/editor/components/highlight/index.mjs +63 -0
- package/browser/editor/components/icon/index.mjs +57 -0
- package/browser/editor/components/icon/page.mjs +286 -0
- package/browser/editor/components/icons.mjs +48 -0
- package/browser/editor/components/image/crop.mjs +189 -0
- package/browser/editor/components/image/index.mjs +104 -0
- package/browser/editor/components/image/page.mjs +385 -0
- package/browser/editor/components/image/viewer.mjs +213 -0
- package/browser/editor/components/installed/index.mjs +179 -0
- package/browser/editor/components/installed/page.mjs +523 -0
- package/browser/editor/components/installed/served.mjs +35 -0
- package/browser/editor/components/kit.mjs +67 -0
- package/browser/editor/components/list/index.mjs +194 -0
- package/browser/editor/components/list/join.mjs +68 -0
- package/browser/editor/components/list/numbers.mjs +107 -0
- package/browser/editor/components/list/page.mjs +632 -0
- package/browser/editor/components/math/index.mjs +88 -0
- package/browser/editor/components/math/page.mjs +236 -0
- package/browser/editor/components/math/tex-logo.mjs +6 -0
- package/browser/editor/components/media/icons.mjs +19 -0
- package/browser/editor/components/media/page.mjs +192 -0
- package/browser/editor/components/media/parts.mjs +60 -0
- package/browser/editor/components/media/size.mjs +20 -0
- package/browser/editor/components/media/toolbar.mjs +37 -0
- package/browser/editor/components/media/write.mjs +7 -0
- package/browser/editor/components/pages.mjs +46 -0
- package/browser/editor/components/paragraph/index.mjs +43 -0
- package/browser/editor/components/paragraph/page.mjs +52 -0
- package/browser/editor/components/placeholder-bar.mjs +17 -0
- package/browser/editor/components/placeholder.mjs +128 -0
- package/browser/editor/components/quote/index.mjs +33 -0
- package/browser/editor/components/registry.mjs +859 -0
- package/browser/editor/components/rows.mjs +16 -0
- package/browser/editor/components/section/index.mjs +42 -0
- package/browser/editor/components/section/page.mjs +141 -0
- package/browser/editor/components/set-apart.mjs +24 -0
- package/browser/editor/components/sheets/index.mjs +137 -0
- package/browser/editor/components/sheets/page.mjs +227 -0
- package/browser/editor/components/sheets/pills.mjs +226 -0
- package/browser/editor/components/table/grid.mjs +73 -0
- package/browser/editor/components/table/index.mjs +308 -0
- package/browser/editor/components/table/page.mjs +683 -0
- package/browser/editor/components/table/slots.mjs +41 -0
- package/browser/editor/components/widget/index.mjs +50 -0
- package/browser/editor/page/annotate/anchors.mjs +230 -0
- package/browser/editor/page/annotate/card.mjs +102 -0
- package/browser/editor/page/annotate/index.mjs +1656 -0
- package/browser/editor/page/at-menu/index.mjs +317 -0
- package/browser/editor/page/autosave.mjs +1023 -0
- package/browser/editor/page/beside.mjs +21 -0
- package/browser/editor/page/block-info.mjs +63 -0
- package/browser/editor/page/block-menu/colors.mjs +84 -0
- package/browser/editor/page/block-menu/index.mjs +217 -0
- package/browser/editor/page/blocks.mjs +255 -0
- package/browser/editor/page/caret.mjs +682 -0
- package/browser/editor/page/changes/bar.mjs +102 -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/chip-fills.mjs +126 -0
- package/browser/editor/page/clipboard/import/colors.mjs +192 -0
- package/browser/editor/page/clipboard/import/html.mjs +792 -0
- package/browser/editor/page/clipboard/import/inline.mjs +232 -0
- package/browser/editor/page/clipboard/import/languages.mjs +42 -0
- package/browser/editor/page/clipboard/import/markdown.mjs +760 -0
- package/browser/editor/page/clipboard/import/math.mjs +100 -0
- package/browser/editor/page/clipboard/import/office.mjs +245 -0
- package/browser/editor/page/clipboard/import/read.mjs +120 -0
- package/browser/editor/page/clipboard/import/rich.mjs +29 -0
- package/browser/editor/page/clipboard/import/to-blocks.mjs +290 -0
- package/browser/editor/page/clipboard/index.mjs +816 -0
- package/browser/editor/page/clipboard/own/blocks.mjs +211 -0
- package/browser/editor/page/clipboard/own/chart-keys.mjs +58 -0
- package/browser/editor/page/clipboard/own/describe.mjs +124 -0
- package/browser/editor/page/clipboard/own/export.mjs +167 -0
- package/browser/editor/page/clipboard/own/ids.mjs +39 -0
- package/browser/editor/page/clipboard/own/index.mjs +13 -0
- package/browser/editor/page/clipboard/own/rules.mjs +44 -0
- package/browser/editor/page/clipboard/own/selection.mjs +159 -0
- package/browser/editor/page/clipboard/own/writers.mjs +315 -0
- package/browser/editor/page/columns/index.mjs +360 -0
- package/browser/editor/page/commit.mjs +1813 -0
- package/browser/editor/page/conflicts.mjs +249 -0
- package/browser/editor/page/convert.mjs +831 -0
- package/browser/editor/page/core.mjs +1693 -0
- package/browser/editor/page/drag/drop.mjs +307 -0
- package/browser/editor/page/drag/index.mjs +351 -0
- package/browser/editor/page/drag/preview.mjs +126 -0
- package/browser/editor/page/edge-scroll.mjs +50 -0
- package/browser/editor/page/editor.mjs +1780 -0
- package/browser/editor/page/emoji-picker/emoji-tab.mjs +287 -0
- package/browser/editor/page/emoji-picker/glyph-html.mjs +26 -0
- package/browser/editor/page/emoji-picker/grid.mjs +81 -0
- package/browser/editor/page/emoji-picker/icon-tab.mjs +217 -0
- package/browser/editor/page/emoji-picker/icons.mjs +31 -0
- package/browser/editor/page/emoji-picker/index.mjs +166 -0
- package/browser/editor/page/emoji-picker/styles.mjs +161 -0
- package/browser/editor/page/emoji-picker/support.mjs +204 -0
- package/browser/editor/page/emoji-picker/upload.mjs +236 -0
- package/browser/editor/page/export-report.mjs +23 -0
- package/browser/editor/page/fills.mjs +62 -0
- package/browser/editor/page/find/index.mjs +107 -0
- package/browser/editor/page/flags.mjs +70 -0
- 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 +449 -0
- package/browser/editor/page/format-bar/brush.mjs +77 -0
- package/browser/editor/page/format-bar/colors.mjs +46 -0
- package/browser/editor/page/format-bar/index.mjs +404 -0
- package/browser/editor/page/formula/index.mjs +236 -0
- package/browser/editor/page/formula/panel.mjs +336 -0
- package/browser/editor/page/formula/symbols.mjs +156 -0
- package/browser/editor/page/frame.mjs +74 -0
- package/browser/editor/page/frames.mjs +196 -0
- package/browser/editor/page/geometry.mjs +402 -0
- package/browser/editor/page/gesture.mjs +45 -0
- package/browser/editor/page/handle/index.mjs +650 -0
- package/browser/editor/page/handle-sizes.mjs +14 -0
- package/browser/editor/page/hints/index.mjs +84 -0
- package/browser/editor/page/history.mjs +401 -0
- package/browser/editor/page/insert/index.mjs +256 -0
- package/browser/editor/page/kept.mjs +38 -0
- package/browser/editor/page/links/address.mjs +40 -0
- package/browser/editor/page/links/index.mjs +866 -0
- package/browser/editor/page/links/pages.mjs +131 -0
- package/browser/editor/page/links/views.mjs +369 -0
- package/browser/editor/page/long-runs.mjs +75 -0
- package/browser/editor/page/look.mjs +77 -0
- package/browser/editor/page/made.mjs +24 -0
- package/browser/editor/page/margin.mjs +373 -0
- package/browser/editor/page/markdown/index.mjs +88 -0
- package/browser/editor/page/markdown/rules.mjs +33 -0
- package/browser/editor/page/marks.mjs +377 -0
- package/browser/editor/page/media-menu/index.mjs +158 -0
- package/browser/editor/page/menu.mjs +544 -0
- package/browser/editor/page/merge.mjs +124 -0
- package/browser/editor/page/notices.mjs +142 -0
- package/browser/editor/page/offered.mjs +32 -0
- package/browser/editor/page/outline/folds.mjs +53 -0
- package/browser/editor/page/outline/index.mjs +783 -0
- package/browser/editor/page/outline/list.mjs +184 -0
- package/browser/editor/page/outline/read.mjs +201 -0
- package/browser/editor/page/outline/strip.mjs +287 -0
- package/browser/editor/page/outline/tree.mjs +248 -0
- package/browser/editor/page/overlay-layer.mjs +227 -0
- package/browser/editor/page/overlays.mjs +205 -0
- package/browser/editor/page/own.mjs +28 -0
- package/browser/editor/page/pads.mjs +71 -0
- package/browser/editor/page/page-objects.mjs +105 -0
- package/browser/editor/page/panel.mjs +65 -0
- package/browser/editor/page/placement.mjs +58 -0
- package/browser/editor/page/post.mjs +41 -0
- package/browser/editor/page/present-links.mjs +50 -0
- package/browser/editor/page/quiet.mjs +48 -0
- package/browser/editor/page/resize/index.mjs +327 -0
- package/browser/editor/page/select-all/index.mjs +262 -0
- package/browser/editor/page/selection/delete.mjs +61 -0
- package/browser/editor/page/selection/index.mjs +164 -0
- package/browser/editor/page/selection/marquee.mjs +174 -0
- package/browser/editor/page/session.mjs +168 -0
- package/browser/editor/page/slash-menu/index.mjs +291 -0
- package/browser/editor/page/storage.mjs +48 -0
- package/browser/editor/page/sync-state.mjs +267 -0
- package/browser/editor/page/table/aligns.mjs +29 -0
- package/browser/editor/page/table/cell-bar.mjs +141 -0
- package/browser/editor/page/table/cells.mjs +527 -0
- package/browser/editor/page/table/icons.mjs +40 -0
- package/browser/editor/page/table/index.mjs +990 -0
- package/browser/editor/page/table/lists.mjs +187 -0
- package/browser/editor/page/table/widths.mjs +313 -0
- package/browser/editor/page/tex.mjs +32 -0
- package/browser/editor/page/text-select/index.mjs +671 -0
- package/browser/editor/page/tooltip.mjs +98 -0
- package/browser/editor/page/type-grid.mjs +83 -0
- package/browser/editor/page/typing/code-edges.mjs +274 -0
- package/browser/editor/page/typing/index.mjs +282 -0
- package/browser/editor/page/typing/leave.mjs +68 -0
- package/browser/editor/page/ui.mjs +160 -0
- package/browser/shared/annotations.mjs +569 -0
- package/browser/shared/code-folds.mjs +14 -0
- package/browser/shared/code-languages.mjs +70 -0
- package/browser/shared/code-lines.mjs +30 -0
- package/browser/shared/colors.mjs +30 -0
- package/browser/shared/component-catalog.mjs +573 -0
- package/browser/shared/components/bookmark.mjs +26 -0
- package/browser/shared/components/callout.mjs +9 -0
- package/browser/shared/components/chart.mjs +20 -0
- package/browser/shared/components/code.mjs +37 -0
- package/browser/shared/components/columns.mjs +16 -0
- package/browser/shared/components/details.mjs +15 -0
- package/browser/shared/components/dialog.mjs +28 -0
- package/browser/shared/components/diff.mjs +18 -0
- package/browser/shared/components/divider.mjs +6 -0
- package/browser/shared/components/embed.mjs +25 -0
- package/browser/shared/components/figure.mjs +14 -0
- package/browser/shared/components/file.mjs +23 -0
- package/browser/shared/components/heading.mjs +6 -0
- package/browser/shared/components/highlight.mjs +9 -0
- package/browser/shared/components/icon.mjs +18 -0
- package/browser/shared/components/image.mjs +39 -0
- package/browser/shared/components/index.mjs +396 -0
- package/browser/shared/components/installed.mjs +232 -0
- package/browser/shared/components/list.mjs +146 -0
- package/browser/shared/components/math.mjs +49 -0
- package/browser/shared/components/mention.mjs +33 -0
- package/browser/shared/components/page.mjs +46 -0
- package/browser/shared/components/paragraph.mjs +9 -0
- package/browser/shared/components/quote.mjs +6 -0
- package/browser/shared/components/section.mjs +8 -0
- package/browser/shared/components/sheets.mjs +80 -0
- package/browser/shared/components/state.mjs +20 -0
- package/browser/shared/components/table.mjs +49 -0
- package/browser/shared/components/text.mjs +14 -0
- package/browser/shared/components/widget.mjs +10 -0
- package/browser/shared/copy-ids.mjs +72 -0
- package/browser/shared/css-references.mjs +110 -0
- package/browser/shared/document-look.mjs +178 -0
- package/browser/shared/emoji/custom.mjs +91 -0
- package/browser/shared/emoji/data/LICENSE-lucide.txt +43 -0
- package/browser/shared/emoji/data/LICENSE-mingcute.txt +202 -0
- package/browser/shared/emoji/data/LICENSE-tabler.txt +21 -0
- package/browser/shared/emoji/data/README.md +28 -0
- package/browser/shared/emoji/data/categories.json +1 -0
- package/browser/shared/emoji/data/icons.json +1 -0
- package/browser/shared/emoji/data/keywords-en.json +1 -0
- package/browser/shared/emoji/data/keywords-zh.json +1 -0
- package/browser/shared/emoji/data/names.json +1 -0
- package/browser/shared/emoji/data/positions.json +1 -0
- package/browser/shared/emoji/data/twemoji-index.json +1 -0
- package/browser/shared/emoji/data/twemoji-svg.bin +0 -0
- package/browser/shared/emoji/data.mjs +194 -0
- package/browser/shared/emoji/emoji.mjs +38 -0
- package/browser/shared/emoji/glyphs.mjs +134 -0
- package/browser/shared/emoji/icon-value.mjs +91 -0
- package/browser/shared/escape.mjs +20 -0
- package/browser/shared/export-wrap.mjs +89 -0
- package/browser/shared/files.mjs +33 -0
- package/browser/shared/html-tree.mjs +59 -0
- package/browser/shared/http.mjs +22 -0
- package/browser/shared/i18n/en.mjs +1223 -0
- package/browser/shared/i18n/index.mjs +132 -0
- package/browser/shared/ids.mjs +24 -0
- package/browser/shared/import-types.mjs +23 -0
- package/browser/shared/inline-spacing.mjs +97 -0
- package/browser/shared/layers.mjs +42 -0
- package/browser/shared/long-runs.mjs +39 -0
- package/browser/shared/media.mjs +162 -0
- package/browser/shared/new-names.mjs +67 -0
- package/browser/shared/number-reading.mjs +92 -0
- package/browser/shared/old-names.mjs +143 -0
- package/browser/shared/outline.mjs +194 -0
- package/browser/shared/page-address.mjs +140 -0
- package/browser/shared/page-links.mjs +86 -0
- package/browser/shared/paths.mjs +73 -0
- package/browser/shared/preferences.mjs +116 -0
- package/browser/shared/preview-server.mjs +247 -0
- package/browser/shared/qa-levels.mjs +93 -0
- package/browser/shared/reading-place.mjs +91 -0
- package/browser/shared/renamed-storage.mjs +220 -0
- package/browser/shared/reports.mjs +46 -0
- package/browser/shared/search.mjs +85 -0
- package/browser/shared/session.mjs +77 -0
- package/browser/shared/table-chart.mjs +113 -0
- package/browser/shared/table-hides.mjs +120 -0
- package/browser/shared/table-slots.mjs +75 -0
- package/browser/shared/words.mjs +23 -0
- package/browser/shared/workspace-look.mjs +91 -0
- package/browser/shared/workspace.mjs +535 -0
- package/browser/shared/writing-preferences.mjs +68 -0
- package/browser/shared/zoom.mjs +57 -0
- package/dist/chunk-2B5E4CDJ.mjs +2 -0
- package/dist/chunk-342HXE3Q.mjs +2 -0
- package/dist/chunk-3HIRPVLU.mjs +2 -0
- package/dist/chunk-43B75J5T.mjs +2 -0
- package/dist/chunk-4FS7Z7WR.mjs +2 -0
- package/dist/chunk-4K5KC6V2.mjs +2 -0
- package/dist/chunk-5L7RYZCL.mjs +2 -0
- package/dist/chunk-5MHMDLZD.mjs +4 -0
- package/dist/chunk-5ZKJ3H4P.mjs +8 -0
- package/dist/chunk-64K7IPLO.mjs +255 -0
- package/dist/chunk-6QXGZM36.mjs +8 -0
- package/dist/chunk-6RGJOMJP.mjs +16 -0
- package/dist/chunk-742D2WWJ.mjs +19 -0
- package/dist/chunk-7DTINW6U.mjs +48 -0
- package/dist/chunk-A55HN5OK.mjs +2 -0
- package/dist/chunk-AGDILNWB.mjs +2 -0
- package/dist/chunk-AJ73XJF3.mjs +2 -0
- package/dist/chunk-AUZGSZJH.mjs +13 -0
- package/dist/chunk-BFE45AKL.mjs +2 -0
- package/dist/chunk-BGGDRNYQ.mjs +10 -0
- package/dist/chunk-BXO2ZY5P.mjs +2 -0
- package/dist/chunk-C564NU2H.mjs +77 -0
- package/dist/chunk-CEH4MRCC.mjs +2 -0
- package/dist/chunk-CY2FNNAB.mjs +16 -0
- package/dist/chunk-DFUDV4LX.mjs +2 -0
- package/dist/chunk-DKXG4XDG.mjs +2 -0
- package/dist/chunk-E7LWZRXY.mjs +4 -0
- package/dist/chunk-EZQ34M3F.mjs +124 -0
- package/dist/chunk-EZY3WC6Z.mjs +15 -0
- package/dist/chunk-FDLXYYG4.mjs +4 -0
- package/dist/chunk-FUKQNOQS.mjs +9 -0
- package/dist/chunk-GB5SOYQJ.mjs +7 -0
- package/dist/chunk-GRAXKKG4.mjs +2 -0
- package/dist/chunk-HYMEEXKN.mjs +4 -0
- package/dist/chunk-IVDLMMBD.mjs +2 -0
- package/dist/chunk-JPOSLGOC.mjs +6 -0
- package/dist/chunk-JVHHHGEA.mjs +3 -0
- package/dist/chunk-L3QKH4OK.mjs +26 -0
- package/dist/chunk-LAE5NQ4B.mjs +2 -0
- package/dist/chunk-LCTHTZIL.mjs +960 -0
- package/dist/chunk-LEF6DRCK.mjs +59 -0
- package/dist/chunk-LKX55H76.mjs +2 -0
- package/dist/chunk-LS4F7JUM.mjs +2 -0
- package/dist/chunk-MAFIGVXY.mjs +2 -0
- package/dist/chunk-NO5NJCHO.mjs +2 -0
- package/dist/chunk-NQPVAU63.mjs +2 -0
- package/dist/chunk-NSKUTQ5J.mjs +5 -0
- package/dist/chunk-O35FIXRB.mjs +2 -0
- package/dist/chunk-P2CAZPDP.mjs +3 -0
- package/dist/chunk-PL6GHLGD.mjs +15 -0
- package/dist/chunk-QAIHRH3I.mjs +13 -0
- package/dist/chunk-QJIR2BLP.mjs +6 -0
- package/dist/chunk-QR6A54KJ.mjs +3 -0
- package/dist/chunk-QUPLVPB2.mjs +7 -0
- package/dist/chunk-R7BNENLY.mjs +4 -0
- package/dist/chunk-S6O4UHLC.mjs +2 -0
- package/dist/chunk-SGJWQKEI.mjs +2 -0
- package/dist/chunk-SYGN7GLU.mjs +2 -0
- package/dist/chunk-TMYZB6AV.mjs +2 -0
- package/dist/chunk-TX6JH7TR.mjs +2 -0
- package/dist/chunk-TYK6VNAB.mjs +10 -0
- package/dist/chunk-U3SSPL4K.mjs +8 -0
- package/dist/chunk-U6KNPJPR.mjs +2 -0
- package/dist/chunk-UALRNVSE.mjs +4 -0
- package/dist/chunk-UH4SIXTR.mjs +2 -0
- package/dist/chunk-UMHUSOPJ.mjs +2 -0
- package/dist/chunk-V3HXVQEM.mjs +2 -0
- package/dist/chunk-V5JTW2LH.mjs +27 -0
- package/dist/chunk-V5VXUJKG.mjs +2 -0
- package/dist/chunk-V6XZ4VIR.mjs +2 -0
- package/dist/chunk-VBXMADMP.mjs +2 -0
- package/dist/chunk-VNV55RUA.mjs +2 -0
- package/dist/chunk-VPD2PS35.mjs +2 -0
- package/dist/chunk-W3BGBJQW.mjs +2 -0
- package/dist/chunk-W4VKN3GF.mjs +7 -0
- package/dist/chunk-W5BXXPDJ.mjs +3 -0
- package/dist/chunk-W7XHE4CT.mjs +2 -0
- package/dist/chunk-XNROSH2T.mjs +4 -0
- package/dist/chunk-XUNHRCOG.mjs +6 -0
- package/dist/chunk-Y34NR5JL.mjs +2 -0
- package/dist/chunk-Y6RLRPG3.mjs +3 -0
- package/dist/chunk-YEY3RSFQ.mjs +2 -0
- package/dist/cli.mjs +2 -0
- package/dist/server.mjs +2 -0
- package/dist/worker.mjs +5 -0
- package/kit/charts.js +355 -0
- package/kit/code.js +164 -0
- package/kit/dialogs.js +157 -0
- package/kit/math.js +2004 -0
- package/kit/report.css +2932 -0
- package/kit/runtime.js +1782 -0
- package/kit/sheets.js +123 -0
- package/kit/state.js +217 -0
- package/kit/tables.js +1499 -0
- package/kit/tokens.js +29 -0
- package/kit/ui.js +658 -0
- package/package.json +41 -4
- package/release.json +25 -0
- package/sdk/column-widths.d.ts +56 -0
- package/sdk/doc-charts.d.ts +82 -0
- package/sdk/doc-code.d.ts +28 -0
- package/sdk/doc-dialogs.d.ts +4 -0
- package/sdk/doc-kit.d.ts +147 -0
- package/sdk/doc-math.d.ts +3 -0
- package/sdk/doc-sheets.d.ts +15 -0
- package/sdk/doc-state.d.ts +41 -0
- package/sdk/doc-tables.d.ts +24 -0
- package/sdk/doc-tokens.d.ts +22 -0
- package/sdk/index.d.ts +30 -0
- package/skill/SKILL.md +150 -0
- package/skill/agents/openai.yaml +5 -0
- package/skill/references/building-components.md +367 -0
- package/skill/references/example-report.html +356 -0
- package/skill/references/writing-html.md +187 -0
- package/skill/sdk/column-widths.d.ts +56 -0
- package/skill/sdk/doc-charts.d.ts +82 -0
- package/skill/sdk/doc-code.d.ts +28 -0
- package/skill/sdk/doc-dialogs.d.ts +4 -0
- package/skill/sdk/doc-kit.d.ts +147 -0
- package/skill/sdk/doc-math.d.ts +3 -0
- package/skill/sdk/doc-sheets.d.ts +15 -0
- package/skill/sdk/doc-state.d.ts +41 -0
- package/skill/sdk/doc-tables.d.ts +24 -0
- package/skill/sdk/doc-tokens.d.ts +22 -0
- package/skill/sdk/index.d.ts +30 -0
- package/starter/doc.html +21 -0
- package/starter/doc.json +5 -0
- package/vendor/d3.v7.9.0.min.js +2 -0
- package/vendor/katex/auto-render.min.js +1 -0
- package/vendor/katex/contrib/mhchem.min.js +1 -0
- package/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/vendor/katex/katex.min.css +1 -0
- package/vendor/katex/katex.min.js +1 -0
- package/vendor/pdfjs/LICENSE +177 -0
- package/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/vendor/pdfjs/cmaps/LICENSE +36 -0
- package/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/V.bcmap +0 -0
- package/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/vendor/pdfjs/legacy/build/pdf.min.mjs +27 -0
- package/vendor/pdfjs/legacy/build/pdf.worker.min.mjs +27 -0
- package/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/vendor/types/@types/d3/LICENSE +21 -0
- package/vendor/types/@types/d3/index.d.ts +39 -0
- package/vendor/types/@types/d3/package.json +81 -0
- package/vendor/types/@types/d3-array/LICENSE +21 -0
- package/vendor/types/@types/d3-array/index.d.ts +1118 -0
- package/vendor/types/@types/d3-array/package.json +56 -0
- package/vendor/types/@types/d3-axis/LICENSE +21 -0
- package/vendor/types/@types/d3-axis/index.d.ts +293 -0
- package/vendor/types/@types/d3-axis/package.json +47 -0
- package/vendor/types/@types/d3-brush/LICENSE +21 -0
- package/vendor/types/@types/d3-brush/index.d.ts +255 -0
- package/vendor/types/@types/d3-brush/package.json +42 -0
- package/vendor/types/@types/d3-chord/LICENSE +21 -0
- package/vendor/types/@types/d3-chord/index.d.ts +471 -0
- package/vendor/types/@types/d3-chord/package.json +40 -0
- package/vendor/types/@types/d3-color/LICENSE +21 -0
- package/vendor/types/@types/d3-color/index.d.ts +669 -0
- package/vendor/types/@types/d3-color/package.json +55 -0
- package/vendor/types/@types/d3-contour/LICENSE +21 -0
- package/vendor/types/@types/d3-contour/index.d.ts +222 -0
- package/vendor/types/@types/d3-contour/package.json +38 -0
- package/vendor/types/@types/d3-delaunay/LICENSE +21 -0
- package/vendor/types/@types/d3-delaunay/index.d.ts +316 -0
- package/vendor/types/@types/d3-delaunay/package.json +30 -0
- package/vendor/types/@types/d3-dispatch/LICENSE +21 -0
- package/vendor/types/@types/d3-dispatch/index.d.ts +96 -0
- package/vendor/types/@types/d3-dispatch/package.json +51 -0
- package/vendor/types/@types/d3-drag/LICENSE +21 -0
- package/vendor/types/@types/d3-drag/index.d.ts +395 -0
- package/vendor/types/@types/d3-drag/package.json +42 -0
- package/vendor/types/@types/d3-dsv/LICENSE +21 -0
- package/vendor/types/@types/d3-dsv/index.d.ts +482 -0
- package/vendor/types/@types/d3-dsv/package.json +45 -0
- package/vendor/types/@types/d3-ease/LICENSE +21 -0
- package/vendor/types/@types/d3-ease/index.d.ts +316 -0
- package/vendor/types/@types/d3-ease/package.json +40 -0
- package/vendor/types/@types/d3-fetch/LICENSE +21 -0
- package/vendor/types/@types/d3-fetch/index.d.ts +282 -0
- package/vendor/types/@types/d3-fetch/package.json +37 -0
- package/vendor/types/@types/d3-force/LICENSE +21 -0
- package/vendor/types/@types/d3-force/index.d.ts +899 -0
- package/vendor/types/@types/d3-force/package.json +45 -0
- package/vendor/types/@types/d3-format/LICENSE +21 -0
- package/vendor/types/@types/d3-format/index.d.ts +337 -0
- package/vendor/types/@types/d3-format/package.json +45 -0
- package/vendor/types/@types/d3-geo/LICENSE +21 -0
- package/vendor/types/@types/d3-geo/index.d.ts +1371 -0
- package/vendor/types/@types/d3-geo/package.json +48 -0
- package/vendor/types/@types/d3-hierarchy/LICENSE +21 -0
- package/vendor/types/@types/d3-hierarchy/index.d.ts +928 -0
- package/vendor/types/@types/d3-hierarchy/package.json +50 -0
- package/vendor/types/@types/d3-interpolate/LICENSE +21 -0
- package/vendor/types/@types/d3-interpolate/index.d.ts +387 -0
- package/vendor/types/@types/d3-interpolate/package.json +47 -0
- package/vendor/types/@types/d3-path/LICENSE +21 -0
- package/vendor/types/@types/d3-path/index.d.ts +108 -0
- package/vendor/types/@types/d3-path/package.json +41 -0
- package/vendor/types/@types/d3-polygon/LICENSE +21 -0
- package/vendor/types/@types/d3-polygon/index.d.ts +41 -0
- package/vendor/types/@types/d3-polygon/package.json +40 -0
- package/vendor/types/@types/d3-quadtree/LICENSE +21 -0
- package/vendor/types/@types/d3-quadtree/index.d.ts +204 -0
- package/vendor/types/@types/d3-quadtree/package.json +45 -0
- package/vendor/types/@types/d3-random/LICENSE +21 -0
- package/vendor/types/@types/d3-random/index.d.ts +313 -0
- package/vendor/types/@types/d3-random/package.json +41 -0
- package/vendor/types/@types/d3-scale/LICENSE +21 -0
- package/vendor/types/@types/d3-scale/index.d.ts +2669 -0
- package/vendor/types/@types/d3-scale/package.json +53 -0
- package/vendor/types/@types/d3-scale-chromatic/LICENSE +21 -0
- package/vendor/types/@types/d3-scale-chromatic/index.d.ts +520 -0
- package/vendor/types/@types/d3-scale-chromatic/package.json +46 -0
- package/vendor/types/@types/d3-selection/LICENSE +21 -0
- package/vendor/types/@types/d3-selection/index.d.ts +1210 -0
- package/vendor/types/@types/d3-selection/package.json +56 -0
- package/vendor/types/@types/d3-shape/LICENSE +21 -0
- package/vendor/types/@types/d3-shape/index.d.ts +2792 -0
- package/vendor/types/@types/d3-shape/package.json +53 -0
- package/vendor/types/@types/d3-time/LICENSE +21 -0
- package/vendor/types/@types/d3-time/index.d.ts +697 -0
- package/vendor/types/@types/d3-time/package.json +46 -0
- package/vendor/types/@types/d3-time-format/LICENSE +21 -0
- package/vendor/types/@types/d3-time-format/index.d.ts +202 -0
- package/vendor/types/@types/d3-time-format/package.json +40 -0
- package/vendor/types/@types/d3-timer/LICENSE +21 -0
- package/vendor/types/@types/d3-timer/index.d.ts +68 -0
- package/vendor/types/@types/d3-timer/package.json +45 -0
- package/vendor/types/@types/d3-transition/LICENSE +21 -0
- package/vendor/types/@types/d3-transition/index.d.ts +664 -0
- package/vendor/types/@types/d3-transition/package.json +47 -0
- package/vendor/types/@types/d3-zoom/LICENSE +21 -0
- package/vendor/types/@types/d3-zoom/index.d.ts +611 -0
- package/vendor/types/@types/d3-zoom/package.json +48 -0
- package/vendor/types/@types/geojson/LICENSE +21 -0
- package/vendor/types/@types/geojson/index.d.ts +202 -0
- package/vendor/types/@types/geojson/package.json +46 -0
- package/vendor/typescript/LICENSE.txt +55 -0
- package/vendor/typescript/lib.decorators.d.ts +384 -0
- package/vendor/typescript/lib.decorators.legacy.d.ts +22 -0
- package/vendor/typescript/lib.dom.d.ts +39429 -0
- package/vendor/typescript/lib.dom.iterable.d.ts +571 -0
- package/vendor/typescript/lib.es2015.collection.d.ts +147 -0
- package/vendor/typescript/lib.es2015.core.d.ts +597 -0
- package/vendor/typescript/lib.es2015.d.ts +28 -0
- package/vendor/typescript/lib.es2015.generator.d.ts +77 -0
- package/vendor/typescript/lib.es2015.iterable.d.ts +605 -0
- package/vendor/typescript/lib.es2015.promise.d.ts +81 -0
- package/vendor/typescript/lib.es2015.proxy.d.ts +128 -0
- package/vendor/typescript/lib.es2015.reflect.d.ts +144 -0
- package/vendor/typescript/lib.es2015.symbol.d.ts +46 -0
- package/vendor/typescript/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/vendor/typescript/lib.es2016.array.include.d.ts +116 -0
- package/vendor/typescript/lib.es2016.d.ts +21 -0
- package/vendor/typescript/lib.es2016.intl.d.ts +31 -0
- package/vendor/typescript/lib.es2017.arraybuffer.d.ts +21 -0
- package/vendor/typescript/lib.es2017.d.ts +26 -0
- package/vendor/typescript/lib.es2017.date.d.ts +31 -0
- package/vendor/typescript/lib.es2017.intl.d.ts +44 -0
- package/vendor/typescript/lib.es2017.object.d.ts +49 -0
- package/vendor/typescript/lib.es2017.sharedmemory.d.ts +135 -0
- package/vendor/typescript/lib.es2017.string.d.ts +45 -0
- package/vendor/typescript/lib.es2017.typedarrays.d.ts +53 -0
- package/vendor/typescript/lib.es2018.asyncgenerator.d.ts +77 -0
- package/vendor/typescript/lib.es2018.asynciterable.d.ts +53 -0
- package/vendor/typescript/lib.es2018.d.ts +24 -0
- package/vendor/typescript/lib.es2018.intl.d.ts +83 -0
- package/vendor/typescript/lib.es2018.promise.d.ts +30 -0
- package/vendor/typescript/lib.es2018.regexp.d.ts +37 -0
- package/vendor/typescript/lib.es2019.array.d.ts +79 -0
- package/vendor/typescript/lib.es2019.d.ts +24 -0
- package/vendor/typescript/lib.es2019.intl.d.ts +23 -0
- package/vendor/typescript/lib.es2019.object.d.ts +33 -0
- package/vendor/typescript/lib.es2019.string.d.ts +37 -0
- package/vendor/typescript/lib.es2019.symbol.d.ts +24 -0
- package/vendor/typescript/lib.es2020.bigint.d.ts +765 -0
- package/vendor/typescript/lib.es2020.d.ts +27 -0
- package/vendor/typescript/lib.es2020.date.d.ts +42 -0
- package/vendor/typescript/lib.es2020.intl.d.ts +474 -0
- package/vendor/typescript/lib.es2020.number.d.ts +28 -0
- package/vendor/typescript/lib.es2020.promise.d.ts +47 -0
- package/vendor/typescript/lib.es2020.sharedmemory.d.ts +99 -0
- package/vendor/typescript/lib.es2020.string.d.ts +44 -0
- package/vendor/typescript/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/vendor/typescript/lib.es2021.d.ts +23 -0
- package/vendor/typescript/lib.es2021.intl.d.ts +166 -0
- package/vendor/typescript/lib.es2021.promise.d.ts +48 -0
- package/vendor/typescript/lib.es2021.string.d.ts +33 -0
- package/vendor/typescript/lib.es2021.weakref.d.ts +78 -0
- package/vendor/typescript/lib.es2022.array.d.ts +121 -0
- package/vendor/typescript/lib.es2022.d.ts +25 -0
- package/vendor/typescript/lib.es2022.error.d.ts +75 -0
- package/vendor/typescript/lib.es2022.intl.d.ts +145 -0
- package/vendor/typescript/lib.es2022.object.d.ts +26 -0
- package/vendor/typescript/lib.es2022.regexp.d.ts +39 -0
- package/vendor/typescript/lib.es2022.string.d.ts +25 -0
- package/vendor/typescript/lib.es5.d.ts +4601 -0
- package/vendor/typescript/package.json +4 -0
- package/vendor/typescript/typescript.js +446 -0
- package/web/assets/index-Bh74DfsV.css +1 -0
- package/web/assets/index-UW0RyFFt.js +13 -0
- package/web/index.html +14 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { IN_LAYER } from "../../../shared/layers.mjs";
|
|
2
|
+
import { gestureLock } from "../gesture.mjs";
|
|
3
|
+
import { nestedBlocks, newContainer, placeBefore, removalTarget, unitsOf, withLeads } from "../core.mjs";
|
|
4
|
+
import { accepts, isLead } from "../../components/registry.mjs";
|
|
5
|
+
import { columnOps } from "../page-objects.mjs";
|
|
6
|
+
import { DIALOG, SHEETS } from "../../components/kit.mjs";
|
|
7
|
+
import { heldListType, listType } from "../../components/list/index.mjs";
|
|
8
|
+
import { extentOf, measure } from "../geometry.mjs";
|
|
9
|
+
import { edgeScroll } from "../edge-scroll.mjs";
|
|
10
|
+
import { alive, ordered } from "../block-info.mjs";
|
|
11
|
+
import { resolveDrop } from "./drop.mjs";
|
|
12
|
+
import { describe, note, own } from "../overlays.mjs";
|
|
13
|
+
import { drawBox, layerOf } from "../overlay-layer.mjs";
|
|
14
|
+
import { createPreview } from "./preview.mjs";
|
|
15
|
+
import { addStyle, element } from "../ui.mjs";
|
|
16
|
+
import { t } from "../../../shared/i18n/index.mjs";
|
|
17
|
+
|
|
18
|
+
// Moving blocks (docs/editor.md, "Moving blocks"). Dragging a block's handle (handle/ starts it once
|
|
19
|
+
// the press has moved a few pixels) moves it, with the others selected when it is one of them,
|
|
20
|
+
// anywhere it may go (accepts(): any flow of the document, a column, a list, the chapters): where
|
|
21
|
+
// is drop.mjs resolveDrop (containers by their edges, a step out per 12px past edges that coincide;
|
|
22
|
+
// lists by indentation, a step right of the item above going under it; beside a block, side by side
|
|
23
|
+
// with it in a new row of columns, and at a column's edge, a new column: 分栏), shown by a blue line and
|
|
24
|
+
// the container tinted (no label: the line and the tint say where); a faded copy of the blocks
|
|
25
|
+
// follows the pointer (preview.mjs, as Notion's). Resting on a Sheet tab switches
|
|
26
|
+
// to its Sheet, resting on a closed disclosure's title opens it; near the window's edges the page
|
|
27
|
+
// scrolls. Releasing moves the very same nodes there as one undo step that keeps them selected; Esc
|
|
28
|
+
// cancels, and so does anything that ends the press another way (the handle losing the pointer
|
|
29
|
+
// capture, the window losing the focus, the page hidden): never a drop. Ending is idempotent, and
|
|
30
|
+
// the line, tint and copy belong to their drag (overlays.mjs). Ctrl+Shift+arrows move selected blocks standing next to each other by one place (moveBy).
|
|
31
|
+
// A folded heading goes with what it hides, or as the section it covers whole (fold/ takenWith); its
|
|
32
|
+
// copy shows what is in sight, and Ctrl+Shift+↑/↓ take it a section of its level at a time.
|
|
33
|
+
|
|
34
|
+
const STYLE = `
|
|
35
|
+
${gestureLock("data-ge-drag", { cursor: "grabbing", select: true })}
|
|
36
|
+
[data-ge-dragging] { opacity: .5; }
|
|
37
|
+
.ge-drop-line { position: absolute; left: 0; top: 0; z-index: ${IN_LAYER.drop}; border-radius: 2px; background: rgb(151 197 241); pointer-events: none; }
|
|
38
|
+
/* The container the dragged blocks would go into (not the page itself). */
|
|
39
|
+
.ge-drop-tint { position: absolute; left: 0; top: 0; z-index: ${IN_LAYER.tint}; border-radius: 6px; background: color-mix(in srgb, var(--ge-halo) 50%, transparent); pointer-events: none; }
|
|
40
|
+
.ge-drop-tint[hidden], .ge-drop-line[hidden] { display: none; }
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* info: block-info.mjs. selection: selection/index.mjs. struct(parents, touched, mutate): the
|
|
46
|
+
* editor's undoable structural change (history.mjs). say: the status line. closeMenu(): the block
|
|
47
|
+
* menu closes. schedule(): the block tools' next frame (blocks.mjs), which calls step() while a
|
|
48
|
+
* drag lasts. folds: the headings' folds (fold/).
|
|
49
|
+
*/
|
|
50
|
+
export function createDrag({ info, selection, struct, say, closeMenu, schedule, folds }) {
|
|
51
|
+
addStyle(STYLE);
|
|
52
|
+
const { addColumn, columnsOf, rowAround } = columnOps() ?? {};
|
|
53
|
+
const { kindOf, nameOf, named, fixedText, boxKindOf } = info;
|
|
54
|
+
let drag = null; // blocks being dragged: { targets, target (the one pressed), from (their container), x, y, line, tint, preview, drop: { container, slot } | null, rest, opened, tree, measured }
|
|
55
|
+
|
|
56
|
+
// The containers moving `targets` out leaves empty, which go with them (as when the last block of one
|
|
57
|
+
// is deleted), except those holding `place` (where they go) or being targets themselves.
|
|
58
|
+
function leftoversOf(targets, place) {
|
|
59
|
+
const gone = new Set(targets.flatMap(withLeads));
|
|
60
|
+
return [...new Set(targets.map((target) => removalTarget(target, gone)))].filter((node) => !targets.includes(node) && !node.contains(place));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Put blocks (with their leads, in their order) into `container` before `reference`, as one undo
|
|
64
|
+
// step that keeps them selected. A container they leave empty goes too, as when its last block
|
|
65
|
+
// is deleted. Returns whether an emptied
|
|
66
|
+
// container went. `container` may be a list item: list items go to the end of its last list (when
|
|
67
|
+
// it is the last block it holds), or of a new list (of the kind their own list is) put at the end
|
|
68
|
+
// of the item; other blocks among the blocks it holds, before `reference` (at the end without one).
|
|
69
|
+
// A flowchart's nodes go among blocks as list items do: into the flowchart they land right beside,
|
|
70
|
+
// else a flowchart of their own (their list's type, "flowchart"); dropAt never puts them under an item.
|
|
71
|
+
function moveTo(targets, container, reference) {
|
|
72
|
+
const parts = targets.flatMap(withLeads);
|
|
73
|
+
const leftovers = leftoversOf(targets, container);
|
|
74
|
+
const item = container.tagName === "LI" && targets.every((target) => kindOf(target) === "item") ? container : null;
|
|
75
|
+
const last = item ? nestedBlocks(item).at(-1) : null;
|
|
76
|
+
const list = last?.matches("ul, ol") && last.hasAttribute("data-ge-box") ? last : null;
|
|
77
|
+
// List items dropped among blocks (Feishu's and Notion's: an item goes anywhere): they join a list
|
|
78
|
+
// of their kind right before or after the place, else they make one there.
|
|
79
|
+
const kind = listType(targets[0].parentElement); // items join a list of their own type
|
|
80
|
+
const sameKind = (node) => Boolean(node?.matches?.("ul, ol")) && listType(node) === kind;
|
|
81
|
+
const loose = !item && targets.every((target) => target.tagName === "LI") && !container.matches("ul, ol");
|
|
82
|
+
const before = loose ? (reference ? reference.previousElementSibling : container.lastElementChild) : null;
|
|
83
|
+
// Never the list they leave empty, which goes (it would take them with it).
|
|
84
|
+
const joins = (node) => sameKind(node) && node.hasAttribute("data-ge-box") && !targets.includes(node) && !leftovers.includes(node);
|
|
85
|
+
const join = !loose ? null : joins(before) ? { list: before, at: null }
|
|
86
|
+
: joins(reference) ? { list: reference, at: reference.firstChild } : null;
|
|
87
|
+
const parents = [...new Set([...targets.map((target) => target.parentNode), list ?? container, join?.list, ...leftovers.map((node) => node.parentNode)].filter(Boolean))];
|
|
88
|
+
struct(parents, [], () => {
|
|
89
|
+
let into = list ?? container;
|
|
90
|
+
const created = [];
|
|
91
|
+
if (item && !list) {
|
|
92
|
+
into = newContainer(document, heldListType(listType(targets[0].parentElement))); // a 流程图's steps a numbered list there
|
|
93
|
+
item.append(into);
|
|
94
|
+
created.push(into);
|
|
95
|
+
}
|
|
96
|
+
if (loose && join) placeBefore(join.list, parts, join.at);
|
|
97
|
+
else if (loose) {
|
|
98
|
+
const wrapper = newContainer(document, kind);
|
|
99
|
+
container.insertBefore(wrapper, reference);
|
|
100
|
+
created.push(wrapper);
|
|
101
|
+
placeBefore(wrapper, parts, null);
|
|
102
|
+
} else placeBefore(into, parts, item ? null : reference);
|
|
103
|
+
leftovers.forEach((node) => node.remove());
|
|
104
|
+
return { touched: [], focus: null, select: targets, reselect: true, created };
|
|
105
|
+
});
|
|
106
|
+
return leftovers.length > 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Put blocks beside a block (drop.mjs `aside`): { target, side }, the two side by side in a new
|
|
110
|
+
// row of columns (a folded heading's column taking what it hides: fold/ withHidden); { row, index,
|
|
111
|
+
// whole }, a new column of that row at `index` holding them, or,
|
|
112
|
+
// when they are all of one column of it (`whole`), that column moved there. One undo step that
|
|
113
|
+
// keeps them selected; a container they leave empty goes, as when they move (and a row left
|
|
114
|
+
// with one column gives its blocks back: history.mjs).
|
|
115
|
+
function besideTo(targets, aside) {
|
|
116
|
+
if (aside.whole) {
|
|
117
|
+
const row = aside.row;
|
|
118
|
+
struct([row], [], () => {
|
|
119
|
+
row.insertBefore(aside.whole, columnsOf(row)[aside.index] ?? null);
|
|
120
|
+
return { touched: [], focus: null, select: targets, reselect: true };
|
|
121
|
+
});
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const parts = targets.flatMap(withLeads);
|
|
125
|
+
const leftovers = leftoversOf(targets, aside.row ?? aside.target);
|
|
126
|
+
const parents = [...new Set([...targets.map((target) => target.parentNode), aside.row ?? aside.target.parentElement, ...leftovers.map((node) => node.parentNode)].filter(Boolean))];
|
|
127
|
+
struct(parents, [], () => {
|
|
128
|
+
const { created } = aside.row ? addColumn(aside.row, aside.index, parts) : rowAround(folds.withHidden(aside.target), [parts], aside.side);
|
|
129
|
+
leftovers.forEach((node) => node.remove());
|
|
130
|
+
return { touched: [], focus: null, select: targets, reselect: true, created };
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Move a block, or selected blocks standing next to each other, one place back (-1) or on (+1)
|
|
136
|
+
* among their container's blocks. Returns whether they moved.
|
|
137
|
+
*/
|
|
138
|
+
function moveBy(targets, delta, { keepFocus = false } = {}) {
|
|
139
|
+
closeMenu();
|
|
140
|
+
const picked = ordered([targets].flat().filter(alive));
|
|
141
|
+
targets = folds.takenWith(picked);
|
|
142
|
+
if (targets.length === 0) return false;
|
|
143
|
+
const reason = targets.map(fixedText).find(Boolean);
|
|
144
|
+
if (reason) {
|
|
145
|
+
say(reason);
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
const name = folds.namedWith(picked, targets, named);
|
|
149
|
+
// The blocks to move among: not a box's lead (a highlight block's icon stays first in it), as the
|
|
150
|
+
// reader sees them: a folded heading and what it hides one (fold/ groupsOf).
|
|
151
|
+
const boxKind = boxKindOf(targets[0].parentElement);
|
|
152
|
+
const list = unitsOf(targets[0].parentElement).filter((unit) => !isLead(boxKind, kindOf(unit)));
|
|
153
|
+
const groups = folds.groupsOf(list);
|
|
154
|
+
const first = groups.findIndex((group) => group[0] === targets[0]);
|
|
155
|
+
let last = first;
|
|
156
|
+
let count = first < 0 ? 0 : groups[first].length;
|
|
157
|
+
while (first >= 0 && count < targets.length && last + 1 < groups.length) count += groups[++last].length;
|
|
158
|
+
if (first < 0 || !groups.slice(first, last + 1).flat().every((unit, index) => targets[index] === unit) || count !== targets.length) {
|
|
159
|
+
say(t("选中的块不相邻,不能一起上下移动;可以拖动其中一块的手柄,把它们一起移到别处。"));
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
// A folded heading alone goes a section of its level at a time (fold/ stepOver); others a block in sight at a time.
|
|
163
|
+
const alone = first === last && folds.isFolded(targets[0]);
|
|
164
|
+
const step = alone ? folds.stepOver(targets[0], delta, list) : null;
|
|
165
|
+
const over = alone ? step && [step.first, step.last] : groups[delta < 0 ? first - 1 : last + 1];
|
|
166
|
+
if (!over) {
|
|
167
|
+
say(groups.length === last - first + 1 ? t("这里只有{0};可以拖动手柄移到别处。", targets.length === 1 ? t("这一个{0}", nameOf(targets[0])) : t("这几块")) : t("{0}已经在{1}。", name, delta < 0 ? t("最前面") : t("最后面")));
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
moveTo(targets, targets[0].parentElement, delta < 0 ? withLeads(over[0])[0] : over.at(-1).nextSibling);
|
|
171
|
+
if (!keepFocus) selection.select(targets, { quiet: true });
|
|
172
|
+
targets[delta < 0 ? 0 : targets.length - 1].scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
173
|
+
say(t("已移动{0} · Ctrl+Z 撤销", name));
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Dragging the handle of `target`: it goes with the others selected, or alone. Returns whether
|
|
178
|
+
// the drag started (a block that cannot move says why).
|
|
179
|
+
function start(target, x, y) {
|
|
180
|
+
const picked = selection.picked;
|
|
181
|
+
const chosen = picked.length > 1 && picked.includes(target) ? [...picked] : [target];
|
|
182
|
+
const targets = folds.takenWith(chosen); // a folded heading with what it hides (fold/)
|
|
183
|
+
const reason = targets.map(fixedText).find(Boolean);
|
|
184
|
+
if (reason) {
|
|
185
|
+
say(reason);
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
closeMenu();
|
|
189
|
+
selection.select(targets, { quiet: true });
|
|
190
|
+
const session = {
|
|
191
|
+
targets, target, from: target.parentElement, x, y, drop: null, rest: null, opened: new Set(), name: folds.namedWith(chosen, targets, named),
|
|
192
|
+
line: element("div", { class: "ge-drop-line", hidden: "" }),
|
|
193
|
+
tint: element("div", { class: "ge-drop-tint", hidden: "" }),
|
|
194
|
+
preview: null,
|
|
195
|
+
tree: null, measured: 0,
|
|
196
|
+
};
|
|
197
|
+
const alive = () => drag === session;
|
|
198
|
+
// The line and the tint go in the layer of where the blocks would go
|
|
199
|
+
// (overlay-layer.mjs), when there is one; the copy follows the pointer in the window.
|
|
200
|
+
for (const kind of ["line", "tint"]) own(session[kind], `drag ${kind}`, { owner: target, alive });
|
|
201
|
+
session.preview = createPreview(targets.filter((node) => !folds.hidden(node)), x, y, { owner: target, alive }); // what is in sight
|
|
202
|
+
drag = session;
|
|
203
|
+
note("drag", `start ${targets.map(describe).join(", ")}`);
|
|
204
|
+
targets.flatMap(withLeads).forEach((part) => part.setAttribute("data-ge-dragging", ""));
|
|
205
|
+
document.documentElement.setAttribute("data-ge-drag", "");
|
|
206
|
+
say(t("正在移动{0} · 拖到要放的位置后松开 · 停在选项卡上切换,停在折叠块标题上展开 · Esc 取消", session.name), "prompt");
|
|
207
|
+
update();
|
|
208
|
+
schedule();
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Where dragged blocks go (drop.mjs resolveDrop), from the page's boxes as they are: measured
|
|
213
|
+
// again at most every 100ms (resting on a tab or a disclosure's title changes them), in an open
|
|
214
|
+
// modal dialog from its content. The tree is in page coordinates, so scrolling leaves it valid.
|
|
215
|
+
function dropAt(x, y) {
|
|
216
|
+
const now = performance.now();
|
|
217
|
+
if (!drag.tree || now - drag.measured > 100) {
|
|
218
|
+
const root = drag.target.closest(`${DIALOG.openContent}[data-ge-box]`) ?? document.querySelector(`${DIALOG.openContent}[data-ge-box]`) ?? document.querySelector("main");
|
|
219
|
+
drag.tree = root && measure(root);
|
|
220
|
+
drag.measured = now;
|
|
221
|
+
}
|
|
222
|
+
if (!drag.tree) return null;
|
|
223
|
+
const { targets } = drag;
|
|
224
|
+
const kinds = new Set(targets.map(kindOf));
|
|
225
|
+
const tabs = kinds.has("tab");
|
|
226
|
+
// Tabs stay in their row; list items go wherever a list may (among blocks, in a list of their kind
|
|
227
|
+
// or a new one); a flowchart's nodes into a flowchart, or wherever a flowchart may go outside any
|
|
228
|
+
// (among blocks: a flowchart of their own there, or the one they land beside: moveTo), never into a
|
|
229
|
+
// node or under an item (nodes never nest); anything else goes where its box takes every one of them.
|
|
230
|
+
const items = [...kinds].every((kind) => kind === "item");
|
|
231
|
+
const steps = [...kinds].every((kind) => kind === "step");
|
|
232
|
+
const takes = (box) => (tabs ? kinds.size === 1 && targets.every((target) => target.parentElement === box.el)
|
|
233
|
+
: items ? accepts(box.kind, "item") || accepts(box.kind, "list")
|
|
234
|
+
: steps ? accepts(box.kind, "step") || (accepts(box.kind, "flowchart") && box.kind !== "nest" && !box.el.closest("ol.doc-flow"))
|
|
235
|
+
: [...kinds].every((kind) => accepts(box.kind, kind)));
|
|
236
|
+
// Blocks a column takes may go beside a block, into a column (分栏); beside a folded heading when a
|
|
237
|
+
// column takes what it hides too, which goes into its column with it (besideTo).
|
|
238
|
+
const aside = !tabs && [...kinds].every((kind) => accepts("column", kind)) && ((unit) => folds.withHidden(unit.el).every((node) => accepts("column", kindOf(node))));
|
|
239
|
+
return resolveDrop(drag.tree, x + scrollX, y + scrollY, { takes, dragged: (unit) => targets.includes(unit.el), count: targets.length, items, aside, edge: scrollX });
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Resting on a Sheet tab while dragging switches to that Sheet; resting on the title of a
|
|
243
|
+
// closed disclosure opens it, so the block can go in (end() closes it again if it did not).
|
|
244
|
+
function restOn(x, y) {
|
|
245
|
+
const hit = document.elementFromPoint(x, y);
|
|
246
|
+
const tab = drag.targets.some((target) => kindOf(target) === "tab") ? null : hit?.closest(SHEETS.tabIn) ?? null;
|
|
247
|
+
const closed = tab ? null : hit?.closest("details:not([open]) > summary")?.parentElement ?? null;
|
|
248
|
+
const node = tab ?? (closed && !drag.targets.some((target) => target.contains(closed)) ? closed : null);
|
|
249
|
+
if (node === (drag.rest?.node ?? null)) return;
|
|
250
|
+
clearTimeout(drag.rest?.timer);
|
|
251
|
+
if (!node || (tab && tab.getAttribute("aria-selected") === "true")) {
|
|
252
|
+
drag.rest = node ? { node, timer: 0 } : null;
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
drag.rest = {
|
|
256
|
+
node,
|
|
257
|
+
timer: setTimeout(() => {
|
|
258
|
+
if (tab) tab.click();
|
|
259
|
+
else {
|
|
260
|
+
node.open = true;
|
|
261
|
+
drag.opened.add(node);
|
|
262
|
+
}
|
|
263
|
+
}, 450),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Where the dragged blocks would go (drag.drop), shown as a line (none where they already are or
|
|
268
|
+
// where nothing takes them) and the container they would go into tinted (not the page itself).
|
|
269
|
+
function update() {
|
|
270
|
+
const { x, y, line, tint } = drag;
|
|
271
|
+
drag.preview.move(x, y);
|
|
272
|
+
restOn(x, y);
|
|
273
|
+
const found = dropAt(x, y);
|
|
274
|
+
drag.drop = found && { container: found.box, slot: found.slot, nest: found.nest, same: found.same, aside: found.aside ?? null };
|
|
275
|
+
line.hidden = !found || found.same;
|
|
276
|
+
tint.hidden = line.hidden || !found.halo;
|
|
277
|
+
if (line.hidden) return;
|
|
278
|
+
// The drop's rectangles are in page coordinates (drop.mjs), drawn in the layer of the container
|
|
279
|
+
// the blocks would go into (overlay-layer.mjs).
|
|
280
|
+
const layer = layerOf(found.box);
|
|
281
|
+
const client = (rect) => ({ left: rect.left - scrollX, top: rect.top - scrollY, right: rect.right - scrollX, bottom: rect.bottom - scrollY });
|
|
282
|
+
const at = client(found.line);
|
|
283
|
+
drawBox(line, layer, at);
|
|
284
|
+
if (found.halo) drawBox(tint, layer, client(found.halo), 2);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Releasing (commit) or cancelling: the blocks go where the line showed, or stay.
|
|
288
|
+
function end(commit) {
|
|
289
|
+
if (!drag) return;
|
|
290
|
+
const { targets, target, drop, line, tint, preview, opened, name } = drag;
|
|
291
|
+
clearTimeout(drag.rest?.timer);
|
|
292
|
+
drag = null;
|
|
293
|
+
line.remove();
|
|
294
|
+
tint.remove();
|
|
295
|
+
preview.node.remove();
|
|
296
|
+
targets.flatMap(withLeads).forEach((part) => part.removeAttribute("data-ge-dragging"));
|
|
297
|
+
document.documentElement.removeAttribute("data-ge-drag");
|
|
298
|
+
const lands = commit && drop && !drop.same && targets.every(alive) && drop.container.isConnected && (!drop.aside || (drop.aside.row ?? drop.aside.target).isConnected);
|
|
299
|
+
note("drag", lands ? "dropped" : commit ? "released in place" : "cancelled");
|
|
300
|
+
// Disclosures opened on the way close again, unless the blocks went into one of them.
|
|
301
|
+
for (const details of opened) if (!(lands && details.contains(drop.container))) details.open = false;
|
|
302
|
+
if (!lands) {
|
|
303
|
+
selection.select(targets.filter(alive), { quiet: true });
|
|
304
|
+
say(!commit ? t("已取消移动。") : t("位置没有变化。"));
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (drop.aside) {
|
|
308
|
+
besideTo(targets, drop.aside);
|
|
309
|
+
selection.select(targets, { quiet: true });
|
|
310
|
+
target.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
311
|
+
say(t("{0} · 拖动栏间的竖线调宽度 · Ctrl+Z 撤销", drop.aside.whole ? t("已移动这一栏") : drop.aside.row ? t("已把{0}放进新的一栏", name) : t("已把{0}并排分栏", name)));
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const others = unitsOf(drop.container).filter((unit) => !targets.includes(unit) && extentOf(unit));
|
|
315
|
+
// The place is never before a box's lead (a highlight block's icon): drop.mjs. At the end, after
|
|
316
|
+
// what the last block in sight hides too (a folded heading's section: fold/), never between them.
|
|
317
|
+
const reference = drop.slot < others.length ? withLeads(others[drop.slot])[0] : others.length > 0 ? folds.lastOf(others.at(-1)).nextSibling : null;
|
|
318
|
+
const emptied = moveTo(targets, drop.nest ?? drop.container, drop.nest ? null : reference);
|
|
319
|
+
selection.select(targets, { quiet: true });
|
|
320
|
+
target.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
321
|
+
say(t("已移动{0}{1}{2} · Ctrl+Z 撤销", name, drop.nest ? t("到上一项下面") : "", emptied ? t("(原来的外层已空,一并去掉)") : ""));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// The window losing the focus, or the page going out of sight, ends a drag: cancelled.
|
|
325
|
+
addEventListener("blur", () => end(false));
|
|
326
|
+
document.addEventListener("visibilitychange", () => { if (document.hidden) end(false); });
|
|
327
|
+
|
|
328
|
+
return {
|
|
329
|
+
start,
|
|
330
|
+
/** The pointer moved while dragging. */
|
|
331
|
+
move(x, y) {
|
|
332
|
+
if (!drag) return;
|
|
333
|
+
drag.x = x;
|
|
334
|
+
drag.y = y;
|
|
335
|
+
update();
|
|
336
|
+
},
|
|
337
|
+
end,
|
|
338
|
+
/** A frame while dragging: the page scrolls near the window's edges, the drop follows. */
|
|
339
|
+
step() {
|
|
340
|
+
if (!drag) return;
|
|
341
|
+
edgeScroll(drag.x, drag.y, drag.target.closest(DIALOG.openContent)); // the card it started in, else the window
|
|
342
|
+
update();
|
|
343
|
+
},
|
|
344
|
+
moveBy,
|
|
345
|
+
/** Blocks are being dragged. */
|
|
346
|
+
get active() { return Boolean(drag); },
|
|
347
|
+
/** The block whose handle was pressed (its handle stays), while dragging. */
|
|
348
|
+
get target() { return drag?.target ?? null; },
|
|
349
|
+
get nodes() { return drag ? [drag.preview.node] : []; },
|
|
350
|
+
};
|
|
351
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Z } from "../../../shared/layers.mjs";
|
|
2
|
+
import { DIALOG } from "../../components/kit.mjs";
|
|
3
|
+
import { withLeads } from "../core.mjs";
|
|
4
|
+
import { own } from "../overlays.mjs";
|
|
5
|
+
import { element, mount } from "../ui.mjs";
|
|
6
|
+
|
|
7
|
+
// The picture of the blocks being dragged (docs/editor.md, "Moving blocks"), as Notion's: a copy of
|
|
8
|
+
// each, faded, where it stands on the page when the drag starts, moving with the pointer by as much
|
|
9
|
+
// as the pointer moves. The copies live in a shadow root of their own, so nothing of the page ever
|
|
10
|
+
// meets them: not the editor's map and the commit's scans, not the kit's scripts, not the page's ids
|
|
11
|
+
// (theirs stay theirs, a chart's gradients among them). The page's own rules are brought in as one
|
|
12
|
+
// stylesheet (made once, applied at once: no unstyled first frame), and each copy stands in a frame
|
|
13
|
+
// of its ancestors as the page has them (shallow copies, display: contents), so a list item keeps its
|
|
14
|
+
// marker and its number, and a section's paragraph its section's look. A frame draws nothing of its
|
|
15
|
+
// own (visibility: hidden, the copy visible): display: contents leaves an element's ::before and
|
|
16
|
+
// ::after and a <details>'s own summary drawn (Chrome's "▶ 详细信息" for one without a summary, an
|
|
17
|
+
// ancestor item's marker, a flowchart step's number, each at the window's left or top), which would
|
|
18
|
+
// follow the pointer (the user's report of 2026-11-06). At most MAX blocks, each at most TALL of the
|
|
19
|
+
// window (cut, fading out at the bottom).
|
|
20
|
+
|
|
21
|
+
const MAX = 12;
|
|
22
|
+
const TALL = 0.6;
|
|
23
|
+
const INSIDE = `
|
|
24
|
+
.ge-copy { box-sizing: border-box; pointer-events: none; }
|
|
25
|
+
.ge-copy.ge-cut { overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); }
|
|
26
|
+
`;
|
|
27
|
+
const OUTSIDE = `
|
|
28
|
+
.ge-drag-preview { position: fixed; inset: 0; overflow: visible; z-index: ${Z.preview}; opacity: .4; pointer-events: none; }
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
// The page's rules as one stylesheet, made again only when the page has more or fewer sheets (the
|
|
32
|
+
// editor adds its own as its tools start). Rules that cannot go into a shadow root's sheet are left
|
|
33
|
+
// out: @import (none in the kit) and @font-face (the page's fonts are the page's already).
|
|
34
|
+
let rules = null; // { count, sheet }
|
|
35
|
+
function pageSheet() {
|
|
36
|
+
const count = document.styleSheets.length;
|
|
37
|
+
if (rules?.count === count) return rules.sheet;
|
|
38
|
+
const text = [];
|
|
39
|
+
for (const sheet of document.styleSheets) {
|
|
40
|
+
let list;
|
|
41
|
+
try {
|
|
42
|
+
list = sheet.cssRules;
|
|
43
|
+
} catch {
|
|
44
|
+
continue; // another origin's
|
|
45
|
+
}
|
|
46
|
+
for (const rule of list) if (!(rule instanceof CSSImportRule) && !(rule instanceof CSSFontFaceRule)) text.push(rule.cssText);
|
|
47
|
+
}
|
|
48
|
+
text.push(INSIDE);
|
|
49
|
+
const sheet = new CSSStyleSheet();
|
|
50
|
+
sheet.replaceSync(text.join("\n"));
|
|
51
|
+
rules = { count, sheet };
|
|
52
|
+
return sheet;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// What a copy must not carry: the drag's own marks, a caret to take, media that would play.
|
|
56
|
+
function clean(node) {
|
|
57
|
+
for (const each of [node, ...node.querySelectorAll("*")]) {
|
|
58
|
+
each.removeAttribute("data-ge-dragging");
|
|
59
|
+
each.removeAttribute("contenteditable");
|
|
60
|
+
each.removeAttribute("autofocus");
|
|
61
|
+
}
|
|
62
|
+
node.querySelectorAll("iframe, video, audio, object, embed").forEach((media) => media.remove());
|
|
63
|
+
return node;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// `part` copied, standing in shallow copies of its ancestors up to the page (or the dialog's
|
|
67
|
+
// content), at `rect` (window coordinates, where it is now).
|
|
68
|
+
function copyOf(part, rect, top) {
|
|
69
|
+
const copy = clean(part.cloneNode(true));
|
|
70
|
+
copy.classList.add("ge-copy");
|
|
71
|
+
// An ordered list's item keeps its number.
|
|
72
|
+
const list = part.parentElement;
|
|
73
|
+
if (part.localName === "li" && list?.localName === "ol") {
|
|
74
|
+
const items = [...list.children].filter((child) => child.localName === "li");
|
|
75
|
+
copy.setAttribute("value", String((Number(list.getAttribute("start")) || 1) + items.indexOf(part)));
|
|
76
|
+
}
|
|
77
|
+
const cut = rect.height > innerHeight * TALL;
|
|
78
|
+
if (cut) copy.classList.add("ge-cut");
|
|
79
|
+
// Its own size, as it was on the page: no share of a row or of its box (the window is the box here); inline, so the page's rules for the block cannot undo it. Visible, in frames that are not.
|
|
80
|
+
Object.assign(copy.style, {
|
|
81
|
+
position: "absolute", margin: "0", maxWidth: "none", minWidth: "0", maxHeight: "none", flex: "none", visibility: "visible",
|
|
82
|
+
left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`,
|
|
83
|
+
height: `${cut ? Math.round(innerHeight * TALL) : rect.height}px`,
|
|
84
|
+
});
|
|
85
|
+
let outer = copy;
|
|
86
|
+
for (let node = part.parentElement; node && node !== top.parentElement; node = node.parentElement) {
|
|
87
|
+
const shell = clean(node.cloneNode(false));
|
|
88
|
+
shell.style.display = "contents";
|
|
89
|
+
shell.style.visibility = "hidden"; // a frame lends the copy its rules and draws nothing of its own
|
|
90
|
+
shell.append(outer);
|
|
91
|
+
outer = shell;
|
|
92
|
+
}
|
|
93
|
+
outer.setAttribute("data-ge-editing", ""); // the editor's own rules for blocks being edited apply
|
|
94
|
+
return outer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The picture of `targets` (blocks, in page order) for a drag starting at the pointer (`x`, `y`):
|
|
99
|
+
* { node, move(x, y) }; it belongs to the drag (`alive`, overlays.mjs) and goes with node.remove().
|
|
100
|
+
*/
|
|
101
|
+
export function createPreview(targets, x, y, { owner, alive }) {
|
|
102
|
+
if (!document.querySelector("style[data-ge-drag-preview]")) {
|
|
103
|
+
const style = element("style", { text: OUTSIDE, "data-ge-drag-preview": "" });
|
|
104
|
+
style.dataset.docDev = "";
|
|
105
|
+
document.head.append(style);
|
|
106
|
+
}
|
|
107
|
+
const node = own(element("div", { class: "ge-drag-preview" }), "drag preview", { owner, alive });
|
|
108
|
+
const root = node.attachShadow({ mode: "open" });
|
|
109
|
+
root.adoptedStyleSheets = [pageSheet()];
|
|
110
|
+
for (const target of targets.slice(0, MAX)) {
|
|
111
|
+
const top = target.closest(DIALOG.openContent) ?? target.closest("main") ?? target.parentElement;
|
|
112
|
+
for (const part of withLeads(target)) {
|
|
113
|
+
const rect = part.getBoundingClientRect();
|
|
114
|
+
if (rect.width === 0 && rect.height === 0) continue;
|
|
115
|
+
root.append(copyOf(part, rect, top));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
mount(node);
|
|
119
|
+
return {
|
|
120
|
+
node,
|
|
121
|
+
/** The pointer is at `left`, `top`: the copies go with it. */
|
|
122
|
+
move(left, top) {
|
|
123
|
+
node.style.transform = `translate(${Math.round(left - x)}px, ${Math.round(top - y)}px)`;
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { task } from "./frames.mjs";
|
|
2
|
+
|
|
3
|
+
// What scrolls when the pointer of a press gesture nears the top or bottom edge of what it works in
|
|
4
|
+
// (docs/editor.md, "Selecting blocks"): dragging blocks, drawing a box selection, selecting text across
|
|
5
|
+
// blocks. One rule for the three, and one driver: edgeScroll() scrolls once and says whether
|
|
6
|
+
// anything moved; the box selection and the text selection are tasks of the editor's frames
|
|
7
|
+
// (edgeFollower, frames.mjs: no loop of their own), and a drag calls edgeScroll from the block
|
|
8
|
+
// tools' task, which already runs on every frame of a drag. What scrolls is the gesture's: the
|
|
9
|
+
// content of the detail card it started in (the one on top when one was opened from another, never
|
|
10
|
+
// the card under it), else the window.
|
|
11
|
+
|
|
12
|
+
const EDGE = 56; // how near the edge of what scrolls the pointer is when it starts to
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Scroll `scroller` (a detail card's content; null: the window) when the pointer at (x, y) is
|
|
16
|
+
* within EDGE of its top or bottom edge, faster the nearer the edge. Returns whether it moved.
|
|
17
|
+
*/
|
|
18
|
+
export function edgeScroll(x, y, scroller = null) {
|
|
19
|
+
const content = scroller?.isConnected ? scroller : null;
|
|
20
|
+
const rect = content ? content.getBoundingClientRect() : { top: 0, bottom: innerHeight };
|
|
21
|
+
const step = Math.round(y < rect.top + EDGE ? -(rect.top + EDGE - y) / 3 : y > rect.bottom - EDGE ? (y - rect.bottom + EDGE) / 3 : 0);
|
|
22
|
+
if (!step) return false;
|
|
23
|
+
if (content) {
|
|
24
|
+
const was = content.scrollTop;
|
|
25
|
+
content.scrollTop += step;
|
|
26
|
+
return content.scrollTop !== was;
|
|
27
|
+
}
|
|
28
|
+
const was = scrollY;
|
|
29
|
+
scrollBy(0, step);
|
|
30
|
+
return scrollY !== was;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A task of the editor's frames that scrolls near the edge for a gesture, on each frame from its
|
|
35
|
+
* wake() until `pointer()` gives null (the gesture is over). pointer(): where the pointer is, { x, y };
|
|
36
|
+
* scroller(): what the gesture scrolls (a card's content, null: the window); scrolled(): what to do
|
|
37
|
+
* once a frame has scrolled (the box or the selection follows what came into view); fail(): the
|
|
38
|
+
* gesture goes when the task throws (frames.mjs).
|
|
39
|
+
*/
|
|
40
|
+
export function edgeFollower(name, { pointer, scroller, scrolled, fail }) {
|
|
41
|
+
return task(name, {
|
|
42
|
+
run() {
|
|
43
|
+
const at = pointer();
|
|
44
|
+
if (!at) return false;
|
|
45
|
+
if (edgeScroll(at.x, at.y, scroller())) scrolled();
|
|
46
|
+
return true;
|
|
47
|
+
},
|
|
48
|
+
fail,
|
|
49
|
+
});
|
|
50
|
+
}
|