@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,287 @@
|
|
|
1
|
+
import { element } from "../ui.mjs";
|
|
2
|
+
import { t } from "../../../shared/i18n/index.mjs";
|
|
3
|
+
import { ROW } from "./list.mjs";
|
|
4
|
+
import { ticksOf } from "./tree.mjs";
|
|
5
|
+
|
|
6
|
+
// The outline's narrow form (outline/index.mjs shows it where the page has no room for the list:
|
|
7
|
+
// margin.mjs): a strip at the window's right edge of short lines, a line a row
|
|
8
|
+
// shown (folds kept), as wide as the row is shallow, the current heading's dark; 240px of lines at the
|
|
9
|
+
// most (tree.mjs ticksOf: a long report's deepest levels left out).
|
|
10
|
+
//
|
|
11
|
+
// The pointer reaching it shows the list as a card beside it at once (faded in, sliding a little from
|
|
12
|
+
// the strip), its top level with the strip's, and each line is a target of its own: the one nearest the
|
|
13
|
+
// pointer turns blue and stands out (longer, thicker), and the card lights its row (index.mjs: filled
|
|
14
|
+
// as under the pointer, a blue segment on the guide), kept in view; moving up and down moves both. The
|
|
15
|
+
// pointer over the card's rows lights their lines the same way. A click on a line goes to its heading
|
|
16
|
+
// (`choose`), as a click on a row does; the card stays while the pointer is on the strip or the card,
|
|
17
|
+
// and goes a moment after it leaves both (faded out), or at a press elsewhere.
|
|
18
|
+
//
|
|
19
|
+
// The keyboard: the strip is one button (Enter or Space opens the card with the focus in its list;
|
|
20
|
+
// again, or Esc in the list, closes it with the focus back on the strip; the focus leaving both (Tab)
|
|
21
|
+
// or a heading chosen by a key closes it too). Esc on the strip itself leaves it as Esc in the list
|
|
22
|
+
// does (escape). Folding in the card keeps it open; it follows the page's scroll (its current row)
|
|
23
|
+
// while open, unless the pointer is on it. With no headings the strip shows the outline's icon.
|
|
24
|
+
//
|
|
25
|
+
// The card's guide (its list's hairline) has a grip of its own (`guide`, a few px either side of it):
|
|
26
|
+
// index.mjs makes a click on it take the reader's collapse back (the list in full where the room allows it).
|
|
27
|
+
|
|
28
|
+
// Three lines, the lower two set in: the 目录 icon (the workbench's 更多 row draws the same, icons.ts outline).
|
|
29
|
+
export const OUTLINE_ICON = '<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.75 5.25h12.5M7.25 10h9M7.25 14.75h9"/></svg>';
|
|
30
|
+
export const STRIP_TOP = 54; // the lines' top in the window, and their card's
|
|
31
|
+
const ROOM = 16 + 16; // their padding and a margin below them
|
|
32
|
+
const HIDE = 280; // ms the card stays after the pointer left the strip and the card
|
|
33
|
+
const SHOW = { ms: 140, slide: 8 }; // the card coming: a fade, sliding this far from the strip
|
|
34
|
+
const FADE = { top: 24, bottom: 32 }; // the card's faded ends (index.mjs STYLE): a lit row kept clear of them
|
|
35
|
+
|
|
36
|
+
const still = () => globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* list: list.mjs (shown in the card). opened(), closed(): the card opened, closed. escape(): Esc on
|
|
40
|
+
* the strip. choose(row): a line clicked, row its index in the rows drawn.
|
|
41
|
+
*/
|
|
42
|
+
export function createStrip({ list, opened, closed, escape, choose }) {
|
|
43
|
+
const button = element("div", { class: "ge-outline-ticks", role: "button", tabindex: "0", "aria-label": t("目录"), "aria-expanded": "false" });
|
|
44
|
+
const strip = element("div", { class: "ge-outline-strip", "data-doc-dev": "", hidden: "" }, button);
|
|
45
|
+
// Its guide's grip in its scroller, before the list, placed by the card (as the dock's: index.mjs).
|
|
46
|
+
const guide = element("div", { class: "ge-outline-card-grip", "aria-hidden": "true" });
|
|
47
|
+
const scroll = element("div", { class: "ge-outline-scroll" }, guide);
|
|
48
|
+
const card = element("nav", { class: "ge-outline-card", "aria-label": t("目录"), "data-doc-dev": "", hidden: "" }, scroll);
|
|
49
|
+
let open = false;
|
|
50
|
+
let keyed = false; // opened by a key (the focus in it), not by the pointer
|
|
51
|
+
let over = false; // the pointer on the strip or the card
|
|
52
|
+
let drawn = "";
|
|
53
|
+
let ticks = []; // the lines drawn: { row, width }
|
|
54
|
+
let lines = []; // and their nodes
|
|
55
|
+
let hot = -1; // the row lit (a line under the pointer, or a row of the card)
|
|
56
|
+
let hideTimer = 0;
|
|
57
|
+
|
|
58
|
+
/** The lines for `rows` (tree.mjs rowsOf), row `marked` the current one. */
|
|
59
|
+
function draw(rows, marked) {
|
|
60
|
+
const height = Math.max(40, innerHeight - STRIP_TOP - ROOM);
|
|
61
|
+
const drawing = ticksOf(rows, height, marked);
|
|
62
|
+
const key = `${height}:${drawing.gap}:${drawing.current}:${drawing.ticks.map((tick) => `${tick.row}.${tick.width}`).join(",")}`;
|
|
63
|
+
if (key === drawn) return;
|
|
64
|
+
drawn = key;
|
|
65
|
+
ticks = drawing.ticks;
|
|
66
|
+
if (!rows.length) {
|
|
67
|
+
lines = [];
|
|
68
|
+
button.style.removeProperty("--ge-tick-gap");
|
|
69
|
+
button.replaceChildren(element("span", { class: "ge-outline-none", html: OUTLINE_ICON }));
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
button.style.setProperty("--ge-tick-gap", `${drawing.gap}px`);
|
|
73
|
+
lines = ticks.map((tick, index) => {
|
|
74
|
+
const line = element("i");
|
|
75
|
+
line.style.setProperty("--ge-tick", `${tick.width}px`);
|
|
76
|
+
if (index === drawing.current) line.dataset.current = "";
|
|
77
|
+
return line;
|
|
78
|
+
});
|
|
79
|
+
button.replaceChildren(...lines);
|
|
80
|
+
paint();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// The line that stands for row `row`: its own, or (left out) the last line before it.
|
|
84
|
+
function lineOf(row) {
|
|
85
|
+
let at = -1;
|
|
86
|
+
if (row >= 0) ticks.forEach((tick, index) => { if (tick.row <= row) at = index; });
|
|
87
|
+
return at;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function paint() {
|
|
91
|
+
const at = lineOf(hot);
|
|
92
|
+
lines.forEach((line, index) => line.toggleAttribute("data-hot", index === at));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The line nearest the pointer's height (the gaps and the strip's ends belong to the nearest).
|
|
96
|
+
function lineAt(y) {
|
|
97
|
+
let best = -1;
|
|
98
|
+
let distance = Infinity;
|
|
99
|
+
lines.forEach((line, index) => {
|
|
100
|
+
const rect = line.getBoundingClientRect();
|
|
101
|
+
const off = Math.abs(y - (rect.top + rect.bottom) / 2);
|
|
102
|
+
if (off < distance) {
|
|
103
|
+
distance = off;
|
|
104
|
+
best = index;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return best;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Row `row` lit, its line and its row in the card; `keep`: the card scrolled to show it (the
|
|
111
|
+
// pointer on the strip, not on the card's rows themselves).
|
|
112
|
+
function light(row, { keep = false } = {}) {
|
|
113
|
+
if (row === hot) return;
|
|
114
|
+
hot = row;
|
|
115
|
+
paint();
|
|
116
|
+
const node = list.light(open ? row : -1);
|
|
117
|
+
if (keep && node) inView(node);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// As little scrolled as shows `node` whole, clear of the card's faded ends.
|
|
121
|
+
function inView(node) {
|
|
122
|
+
const top = node.getBoundingClientRect().top - scroll.getBoundingClientRect().top + scroll.scrollTop;
|
|
123
|
+
const view = scroll.clientHeight;
|
|
124
|
+
if (top - FADE.top < scroll.scrollTop) scroll.scrollTop = Math.max(0, top - FADE.top);
|
|
125
|
+
else if (top + ROW + FADE.bottom > scroll.scrollTop + view) scroll.scrollTop = Math.min(scroll.scrollHeight - view, top + ROW + FADE.bottom - view);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function showCard() {
|
|
129
|
+
for (const animation of card.getAnimations?.() ?? []) animation.cancel();
|
|
130
|
+
card.hidden = false;
|
|
131
|
+
if (!still()) card.animate?.([{ opacity: 0, transform: `translateX(${SHOW.slide}px)` }, { opacity: 1, transform: "none" }], { duration: SHOW.ms, easing: "ease-out" });
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function hideCard() {
|
|
135
|
+
if (card.hidden) return;
|
|
136
|
+
const animation = still() ? null : card.animate?.([{ opacity: 1, transform: "none" }, { opacity: 0, transform: `translateX(${SHOW.slide / 2}px)` }], { duration: 100, easing: "ease-in", fill: "forwards" });
|
|
137
|
+
const finish = () => {
|
|
138
|
+
animation?.cancel();
|
|
139
|
+
if (!open) card.hidden = true;
|
|
140
|
+
};
|
|
141
|
+
if (animation) animation.onfinish = finish;
|
|
142
|
+
else finish();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Open the card; `focus`: by a key, the focus in its list (on its current row). */
|
|
146
|
+
function openCard({ focus = false } = {}) {
|
|
147
|
+
clearTimeout(hideTimer);
|
|
148
|
+
if (open) {
|
|
149
|
+
if (focus) {
|
|
150
|
+
keyed = true;
|
|
151
|
+
list.focus(list.marked >= 0 ? list.marked : 0);
|
|
152
|
+
}
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
open = true;
|
|
156
|
+
keyed = focus;
|
|
157
|
+
button.setAttribute("aria-expanded", "true");
|
|
158
|
+
if (list.node.parentNode !== scroll) scroll.append(list.node);
|
|
159
|
+
showCard();
|
|
160
|
+
// The row lit (else the current one) in the card's middle (as far as the list goes), not at its edge.
|
|
161
|
+
const shown = list.light(hot);
|
|
162
|
+
const row = shown ?? list.rowAt(list.marked);
|
|
163
|
+
if (row) {
|
|
164
|
+
const top = row.getBoundingClientRect().top - scroll.getBoundingClientRect().top + scroll.scrollTop;
|
|
165
|
+
scroll.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, Math.round(top - (scroll.clientHeight - ROW) / 2)));
|
|
166
|
+
}
|
|
167
|
+
if (focus) list.focus(list.marked >= 0 ? list.marked : 0);
|
|
168
|
+
opened?.();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Close the card; `focus`: the focus back on the strip (Esc in it). */
|
|
172
|
+
function closeCard({ focus = false } = {}) {
|
|
173
|
+
clearTimeout(hideTimer);
|
|
174
|
+
if (!open) return;
|
|
175
|
+
open = false;
|
|
176
|
+
keyed = false;
|
|
177
|
+
over = button.matches(":hover"); // (the card going from under a still pointer tells no leaving)
|
|
178
|
+
button.setAttribute("aria-expanded", "false");
|
|
179
|
+
list.light(-1);
|
|
180
|
+
hideCard();
|
|
181
|
+
if (focus) button.focus({ preventScroll: true });
|
|
182
|
+
closed?.();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const inside = (node) => Boolean(node && (card.contains(node) || button.contains(node)));
|
|
186
|
+
const focusIn = () => inside(document.hasFocus() ? document.activeElement : null);
|
|
187
|
+
|
|
188
|
+
// The pointer: on the strip, the card at once and the line nearest it lit; leaving both, the card
|
|
189
|
+
// goes a moment later (crossing the gap to the card keeps it), unless the keys opened it and hold
|
|
190
|
+
// the focus in it. A touch has no leaving: its card stays until a press elsewhere.
|
|
191
|
+
function enter() {
|
|
192
|
+
over = true;
|
|
193
|
+
clearTimeout(hideTimer);
|
|
194
|
+
}
|
|
195
|
+
function leave(event) {
|
|
196
|
+
if (event.pointerType === "touch" || inside(event.relatedTarget)) return;
|
|
197
|
+
over = false;
|
|
198
|
+
light(-1);
|
|
199
|
+
clearTimeout(hideTimer);
|
|
200
|
+
hideTimer = setTimeout(() => {
|
|
201
|
+
if (!over && !(keyed && focusIn())) closeCard();
|
|
202
|
+
}, HIDE);
|
|
203
|
+
}
|
|
204
|
+
button.addEventListener("pointerenter", (event) => {
|
|
205
|
+
enter();
|
|
206
|
+
openCard();
|
|
207
|
+
light(ticks[lineAt(event.clientY)]?.row ?? -1, { keep: true });
|
|
208
|
+
});
|
|
209
|
+
button.addEventListener("pointermove", (event) => light(ticks[lineAt(event.clientY)]?.row ?? -1, { keep: true }));
|
|
210
|
+
button.addEventListener("pointerleave", leave);
|
|
211
|
+
card.addEventListener("pointerenter", enter);
|
|
212
|
+
card.addEventListener("pointerleave", leave);
|
|
213
|
+
// A row of the card under the pointer: its line lit on the strip.
|
|
214
|
+
card.addEventListener("pointerover", (event) => {
|
|
215
|
+
const row = event.target?.closest?.(".ge-outline-row");
|
|
216
|
+
light(row ? Number(row.dataset.index) : -1);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// A click on the strip goes to the heading of the line nearest it (a key's click is the keys' below).
|
|
220
|
+
button.addEventListener("click", (event) => {
|
|
221
|
+
if (event.detail === 0) return;
|
|
222
|
+
const row = ticks[lineAt(event.clientY)]?.row;
|
|
223
|
+
if (row !== undefined) choose?.(row);
|
|
224
|
+
else openCard();
|
|
225
|
+
});
|
|
226
|
+
button.addEventListener("keydown", (event) => {
|
|
227
|
+
if (event.key === "Escape" && !open && !event.isComposing) {
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
escape?.();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
233
|
+
event.preventDefault();
|
|
234
|
+
if (open && keyed) closeCard({ focus: true });
|
|
235
|
+
else openCard({ focus: true });
|
|
236
|
+
});
|
|
237
|
+
// A press anywhere but on the strip and its card closes the card.
|
|
238
|
+
document.addEventListener("pointerdown", (event) => {
|
|
239
|
+
if (open && !inside(event.target)) closeCard();
|
|
240
|
+
}, true);
|
|
241
|
+
// So does the focus leaving both (Tab out of it, to the workbench or another window, as the block
|
|
242
|
+
// menu closes), unless the pointer holds it there: looked at once the focus has settled, since rows
|
|
243
|
+
// drawn again (a fold) take the focus with them and give it back.
|
|
244
|
+
const left = () => setTimeout(() => {
|
|
245
|
+
if (open && !over && !focusIn()) closeCard();
|
|
246
|
+
}, 0);
|
|
247
|
+
card.addEventListener("focusout", left);
|
|
248
|
+
button.addEventListener("focusout", left);
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
strip,
|
|
252
|
+
card,
|
|
253
|
+
scroll,
|
|
254
|
+
guide,
|
|
255
|
+
draw,
|
|
256
|
+
openCard,
|
|
257
|
+
closeCard,
|
|
258
|
+
get open() { return open; },
|
|
259
|
+
/** Whether the keys opened the card (a heading chosen by a key closes it; by the pointer, it stays while the pointer is on it). */
|
|
260
|
+
get keyed() { return keyed; },
|
|
261
|
+
focusButton: () => button.focus({ preventScroll: true }),
|
|
262
|
+
/** Show the strip (or take it away, its card with it). `fade`: it comes faded in. */
|
|
263
|
+
show(on, { fade = false } = {}) {
|
|
264
|
+
clearTimeout(hideTimer);
|
|
265
|
+
if (!on) {
|
|
266
|
+
if (open) {
|
|
267
|
+
open = false;
|
|
268
|
+
keyed = false;
|
|
269
|
+
button.setAttribute("aria-expanded", "false");
|
|
270
|
+
for (const animation of card.getAnimations?.() ?? []) animation.cancel();
|
|
271
|
+
card.hidden = true;
|
|
272
|
+
}
|
|
273
|
+
over = false;
|
|
274
|
+
hot = -1;
|
|
275
|
+
list.light(-1);
|
|
276
|
+
strip.hidden = true;
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (list.node.parentNode !== scroll) scroll.append(list.node);
|
|
280
|
+
drawn = "";
|
|
281
|
+
for (const animation of strip.getAnimations?.() ?? []) animation.cancel();
|
|
282
|
+
strip.hidden = false;
|
|
283
|
+
if (fade && !still()) strip.animate?.([{ opacity: 0 }, { opacity: 1 }], { duration: SHOW.ms, easing: "ease-out" });
|
|
284
|
+
},
|
|
285
|
+
holds: (target) => strip.contains(target) || card.contains(target),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// The outline's model (outline/index.mjs reads the page into entries; this file is pure, so the unit
|
|
2
|
+
// tests hold it: tests/unit/outline.mjs): the tree of headings, the rows it shows with what is folded,
|
|
3
|
+
// the row that marks the current heading, the keys that move through the rows, and the strip's lines.
|
|
4
|
+
//
|
|
5
|
+
// An entry is one of:
|
|
6
|
+
// { kind: "heading", key, level (1-4), text, ref } a heading block
|
|
7
|
+
// { kind: "scope", entries } a box that keeps its headings to itself: a row
|
|
8
|
+
// of columns, a disclosure, a tab's panel
|
|
9
|
+
// { kind: "tabs", key, tabs: [{ key, text, shown, ref, entries }] }
|
|
10
|
+
// a tabs area, its tabs in their row's order
|
|
11
|
+
// A node of the tree: { key, kind: "heading" | "tab", text, ref, shown (a tab), children }.
|
|
12
|
+
|
|
13
|
+
// The highest level (the smallest number) of the headings in `entries`, Infinity for none.
|
|
14
|
+
function topLevel(entries) {
|
|
15
|
+
let level = Infinity;
|
|
16
|
+
for (const entry of entries) {
|
|
17
|
+
if (entry.kind === "heading") level = Math.min(level, entry.level);
|
|
18
|
+
else if (entry.kind === "scope") level = Math.min(level, topLevel(entry.entries));
|
|
19
|
+
else if (entry.kind === "tabs") for (const tab of entry.tabs) level = Math.min(level, topLevel(tab.entries));
|
|
20
|
+
}
|
|
21
|
+
return level;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The tree of `entries`: a heading closes the open ones of its level and deeper and nests under the one
|
|
26
|
+
* left open, so a level the report skips does not indent twice (h2 then h4 is one step) and a report
|
|
27
|
+
* starting at h3 has its h3s at the top. A scope (a row of columns, a disclosure) stands where its
|
|
28
|
+
* highest heading would: it closes the open headings of that level and deeper, and its headings nest
|
|
29
|
+
* under what is left open; when it ends its own headings are closed, so what follows goes on under
|
|
30
|
+
* what was open before it (a column's h3 never takes in the section's next paragraphs' headings), and
|
|
31
|
+
* the outline keeps the page's order. A tabs area too: a node per tab that holds a heading (the others
|
|
32
|
+
* are left out; an area with none adds nothing), in the tab row's order, each tab's headings under it.
|
|
33
|
+
*/
|
|
34
|
+
export function treeOf(entries) {
|
|
35
|
+
const roots = [];
|
|
36
|
+
const stack = []; // { level, node }: the headings open
|
|
37
|
+
const into = () => (stack.length ? stack.at(-1).node.children : roots);
|
|
38
|
+
const close = (level) => { while (stack.length && stack.at(-1).level >= level) stack.pop(); };
|
|
39
|
+
for (const entry of entries) {
|
|
40
|
+
if (entry.kind === "scope") {
|
|
41
|
+
close(topLevel(entry.entries));
|
|
42
|
+
into().push(...treeOf(entry.entries));
|
|
43
|
+
} else if (entry.kind === "heading") {
|
|
44
|
+
close(entry.level);
|
|
45
|
+
const node = { key: entry.key, kind: "heading", text: entry.text, ref: entry.ref ?? null, children: [] };
|
|
46
|
+
into().push(node);
|
|
47
|
+
stack.push({ level: entry.level, node });
|
|
48
|
+
} else if (entry.kind === "tabs") {
|
|
49
|
+
close(topLevel([entry]));
|
|
50
|
+
for (const tab of entry.tabs) {
|
|
51
|
+
const children = treeOf(tab.entries);
|
|
52
|
+
if (children.length) into().push({ key: tab.key, kind: "tab", text: tab.text, shown: Boolean(tab.shown), ref: tab.ref ?? null, children });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return roots;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The tree's nodes in reading order (a node, then what it holds). */
|
|
60
|
+
export function nodesOf(tree, out = []) {
|
|
61
|
+
for (const node of tree) {
|
|
62
|
+
out.push(node);
|
|
63
|
+
nodesOf(node.children, out);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The keys of the tree's nodes. */
|
|
69
|
+
export const keysOf = (tree) => new Set(nodesOf(tree).map((node) => node.key));
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The rows the outline shows: [{ node, depth, parent (the parent's row, -1 at the top) }], what a
|
|
73
|
+
* folded node (its key in `folded`) holds left out.
|
|
74
|
+
*/
|
|
75
|
+
export function rowsOf(tree, folded = new Set(), depth = 0, parent = -1, out = []) {
|
|
76
|
+
for (const node of tree) {
|
|
77
|
+
const index = out.length;
|
|
78
|
+
out.push({ node, depth, parent });
|
|
79
|
+
if (node.children.length && !folded.has(node.key)) rowsOf(node.children, folded, depth + 1, index, out);
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The nodes from the top of the tree down to `node` (null when it is not in it). */
|
|
85
|
+
export function pathTo(tree, node, chain = []) {
|
|
86
|
+
for (const child of tree) {
|
|
87
|
+
const path = [...chain, child];
|
|
88
|
+
if (child === node) return path;
|
|
89
|
+
const found = pathTo(child.children, node, path);
|
|
90
|
+
if (found) return found;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The row that marks the current heading (`path`: pathTo it): the first folded node on the way to it
|
|
97
|
+
* (the heading is out of sight inside it), else the heading's own row; -1 for none.
|
|
98
|
+
*/
|
|
99
|
+
export function markedRow(rows, path, folded = new Set()) {
|
|
100
|
+
if (!path?.length) return -1;
|
|
101
|
+
const shown = path.find((node) => node.children.length && folded.has(node.key) && node !== path.at(-1)) ?? path.at(-1);
|
|
102
|
+
return rows.findIndex((row) => row.node === shown);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** What the outline draws of the tree, to tell whether it changed: keys, kinds, texts, depths, tabs shown. */
|
|
106
|
+
export function signatureOf(tree) {
|
|
107
|
+
const parts = [];
|
|
108
|
+
const walk = (nodes, depth) => {
|
|
109
|
+
for (const node of nodes) {
|
|
110
|
+
parts.push(`${depth}\u0001${node.kind}\u0001${node.key}\u0001${node.text}\u0001${node.shown ? 1 : 0}`);
|
|
111
|
+
walk(node.children, depth + 1);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
walk(tree, 0);
|
|
115
|
+
return parts.join("\u0002");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A key in the outline (a tree of rows: aria's tree view): what it does at row `index` of `rows`.
|
|
120
|
+
* ↑/↓ the row before or after, Home/End the first or last; → unfolds a folded row, else goes to its
|
|
121
|
+
* first child; ← folds an open row, else goes to its parent; Enter or Space jumps there. Returns
|
|
122
|
+
* { focus } (a row's index), { fold }, { unfold } (a node), { jump } (a node), or null (not its key).
|
|
123
|
+
*/
|
|
124
|
+
export function keyAction(rows, index, key, folded = new Set()) {
|
|
125
|
+
if (!rows.length) return null;
|
|
126
|
+
const at = Math.max(0, Math.min(index, rows.length - 1));
|
|
127
|
+
const row = rows[at];
|
|
128
|
+
const parent = row.node.children.length > 0;
|
|
129
|
+
switch (key) {
|
|
130
|
+
case "ArrowDown": return { focus: Math.min(rows.length - 1, at + 1) };
|
|
131
|
+
case "ArrowUp": return { focus: Math.max(0, at - 1) };
|
|
132
|
+
case "Home": return { focus: 0 };
|
|
133
|
+
case "End": return { focus: rows.length - 1 };
|
|
134
|
+
case "ArrowRight":
|
|
135
|
+
if (parent && folded.has(row.node.key)) return { unfold: row.node };
|
|
136
|
+
if (parent && rows[at + 1]?.parent === at) return { focus: at + 1 };
|
|
137
|
+
return { focus: at };
|
|
138
|
+
case "ArrowLeft":
|
|
139
|
+
if (parent && !folded.has(row.node.key)) return { fold: row.node };
|
|
140
|
+
return { focus: row.parent >= 0 ? row.parent : at };
|
|
141
|
+
case "Enter":
|
|
142
|
+
case " ": return { jump: row.node };
|
|
143
|
+
default: return null;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The current heading of `tops` (each heading's top in the window, in the outline's order; null for
|
|
150
|
+
* one with no box: in a hidden tab, a closed disclosure): the one furthest down of those whose top
|
|
151
|
+
* has passed `line`, the first in order of those level with it (headings side by side in columns);
|
|
152
|
+
* -1 for none (above the first).
|
|
153
|
+
*/
|
|
154
|
+
export function currentOf(tops, line) {
|
|
155
|
+
let found = -1;
|
|
156
|
+
tops.forEach((top, index) => {
|
|
157
|
+
if (top === null || top > line) return;
|
|
158
|
+
if (found < 0 || top > tops[found]) found = index;
|
|
159
|
+
});
|
|
160
|
+
return found;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The line (px below the window's top) a heading's top must have passed to be the current one, with
|
|
165
|
+
* the page scrolled to `scrollY` of `maxScroll`, the window `view` high: `base` while the page has
|
|
166
|
+
* more than a window still to go, then coming down with the scroll to the window's bottom at the end
|
|
167
|
+
* (the last window's headings, which can never reach `base`, each get their turn, the last one at the
|
|
168
|
+
* very end). A page that scrolls less than a window comes down over what it scrolls; one that does
|
|
169
|
+
* not scroll keeps `base`.
|
|
170
|
+
*/
|
|
171
|
+
export function spyLine({ scrollY, maxScroll, view, base }) {
|
|
172
|
+
const ramp = Math.min(view, maxScroll);
|
|
173
|
+
const left = Math.max(0, maxScroll - scrollY);
|
|
174
|
+
if (ramp <= 0 || left >= ramp) return base;
|
|
175
|
+
return base + (view - base) * (1 - left / ramp);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Where a list scrolled to `scrollTop` (`view` px of it in view, `full` in all; `fade.top` and
|
|
180
|
+
* `fade.bottom` px at its ends faded while there is more) goes to keep a row at `top` (`row` px high)
|
|
181
|
+
* in its band: at least `least` px below the clear view's top, at most a third of the clear view down,
|
|
182
|
+
* so reading down the rows to come fill two thirds of it, and reading up `least` px of rows stand above
|
|
183
|
+
* it. As little as that takes (a row for each heading passed), centered in what is clear where the
|
|
184
|
+
* view is too short for the band; null where it is in the band already.
|
|
185
|
+
*/
|
|
186
|
+
export function followTop({ top, row, scrollTop, view, full, least, fade = { top: 0, bottom: 0 } }) {
|
|
187
|
+
const clear = view - fade.top - fade.bottom;
|
|
188
|
+
const at = top - scrollTop - fade.top; // the row's top in the clear view
|
|
189
|
+
let to = scrollTop;
|
|
190
|
+
if (clear < row + 2 * least) to = top - fade.top - (clear - row) / 2;
|
|
191
|
+
else {
|
|
192
|
+
const third = Math.max(least, Math.round(clear / 3));
|
|
193
|
+
if (at > third) to = top - fade.top - third;
|
|
194
|
+
else if (at < least) to = top - fade.top - least;
|
|
195
|
+
}
|
|
196
|
+
to = Math.round(Math.max(0, Math.min(full - view, to)));
|
|
197
|
+
return Math.abs(to - scrollTop) < 1 ? null : to;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Where a jump from scrollY `from` to `to` (a window `view` high) starts its smooth scroll: more than
|
|
202
|
+
* two windows away, a window short of `to` (gone to at once: the browser's smooth scroll takes 1.5s
|
|
203
|
+
* over 14000px), else null (the whole way smoothly).
|
|
204
|
+
*/
|
|
205
|
+
export function glideFrom(from, to, view) {
|
|
206
|
+
const distance = to - from;
|
|
207
|
+
return Math.abs(distance) > 2 * view ? to - Math.sign(distance) * view : null;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// The strip's lines: 2px each, 6px apart (4 at the least), as wide as the row is shallow, 240px at the most.
|
|
211
|
+
export const TICK = Object.freeze({ line: 2, gap: 6, least: 4, most: 240, widths: [16, 12, 9, 6] });
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The strip's lines for `rows` in `height` px (TICK.most at the most): { gap, ticks: [{ row, width }] }.
|
|
215
|
+
* More than fit 6px apart: the gap shrinks, down to 4px; then the deepest levels are left out, one at
|
|
216
|
+
* a time, until they fit (the gap as wide again as what is left allows); a run of top-level rows still
|
|
217
|
+
* too long is taken every so many, over the whole list. `marked` (a row's index, -1 for none): the
|
|
218
|
+
* line that marks it, its own or, left out, the last line before it (its nearest ancestor shown):
|
|
219
|
+
* `current`, a tick's index or -1.
|
|
220
|
+
*/
|
|
221
|
+
export function ticksOf(rows, height, marked = -1, { line, gap, least, most, widths } = TICK) {
|
|
222
|
+
const room = Math.min(height, most);
|
|
223
|
+
const span = (count, space) => count * line + Math.max(0, count - 1) * space;
|
|
224
|
+
const spread = (count) => (count > 1 ? Math.max(least, Math.min(gap, Math.floor((room - count * line) / (count - 1)))) : gap);
|
|
225
|
+
let shown = rows.map((row, index) => ({ ...row, index }));
|
|
226
|
+
let space = gap;
|
|
227
|
+
if (span(shown.length, gap) > room) {
|
|
228
|
+
space = spread(shown.length);
|
|
229
|
+
let deepest = Math.max(0, ...shown.map((row) => row.depth));
|
|
230
|
+
while (span(shown.length, space) > room && deepest > 0) {
|
|
231
|
+
deepest--;
|
|
232
|
+
shown = shown.filter((row) => row.depth <= deepest);
|
|
233
|
+
space = spread(shown.length);
|
|
234
|
+
}
|
|
235
|
+
if (span(shown.length, space) > room) {
|
|
236
|
+
const count = Math.max(1, Math.floor((room + space) / (line + space)));
|
|
237
|
+
const step = shown.length / count;
|
|
238
|
+
shown = Array.from({ length: count }, (_, at) => shown[Math.floor(at * step)]);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
let current = -1;
|
|
242
|
+
if (marked >= 0) shown.forEach((row, at) => { if (row.index <= marked) current = at; });
|
|
243
|
+
return {
|
|
244
|
+
gap: space,
|
|
245
|
+
current,
|
|
246
|
+
ticks: shown.map((row) => ({ row: row.index, width: widths[Math.min(row.depth, widths.length - 1)] })),
|
|
247
|
+
};
|
|
248
|
+
}
|