@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,187 @@
|
|
|
1
|
+
import { ZWSP } from "../../../shared/inline-spacing.mjs";
|
|
2
|
+
// Lists in a table's cells (单元格里的列表; the plan's T6 as the reader settled it): a cell stays one
|
|
3
|
+
// text block, a list is part of its text (<td>…<ul><li>…</li></ul>…</td>: core.mjs serializeInner,
|
|
4
|
+
// source/blocks.mjs inlineProblem), the cell's lines its own lines (<br> between them) and its
|
|
5
|
+
// lists'. "- " (or "* ") typed at the start of a line makes it a bulleted list's item, "1. " a
|
|
6
|
+
// numbered one's (into the list right above or below it of that kind); in an item, Enter makes the
|
|
7
|
+
// next one with what follows the caret, Enter in an empty one leaves the list (an empty line where it
|
|
8
|
+
// was, the items after it a list of their own), Backspace at an item's start makes it a line again.
|
|
9
|
+
// Each is one undo step of the cell's text.
|
|
10
|
+
|
|
11
|
+
const isList = (node) => node?.nodeType === 1 && (node.tagName === "UL" || node.tagName === "OL");
|
|
12
|
+
const isBreak = (node) => node?.nodeType === 1 && node.tagName === "BR";
|
|
13
|
+
// What stands on a line of the cell with others: neither a line break nor a list.
|
|
14
|
+
const inline = (node) => Boolean(node) && !isBreak(node) && !isList(node);
|
|
15
|
+
const empty = (node) => !node.textContent.replaceAll(ZWSP, "").trim() && !node.querySelector("[data-ge-atom], img");
|
|
16
|
+
// A line break holding the caret on an empty line or in an empty item (left out when written).
|
|
17
|
+
const holder = () => document.createElement("br");
|
|
18
|
+
|
|
19
|
+
/** t: the table tools (index.mjs): struct, say. */
|
|
20
|
+
export function createCellLists(t) {
|
|
21
|
+
// The cell's child holding a node (the node itself at the cell's level).
|
|
22
|
+
const topOf = (cell, node) => {
|
|
23
|
+
while (node && node.parentNode !== cell) node = node.parentNode;
|
|
24
|
+
return node;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// The caret, put after a change of the cell's text.
|
|
28
|
+
function caret(node, offset) {
|
|
29
|
+
const range = document.createRange();
|
|
30
|
+
range.setStart(node, offset);
|
|
31
|
+
range.collapse(true);
|
|
32
|
+
getSelection().removeAllRanges();
|
|
33
|
+
getSelection().addRange(range);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// One undo step of the cell's text.
|
|
37
|
+
const change = (cell, mutate, said) => {
|
|
38
|
+
let after = null;
|
|
39
|
+
t.struct([], [cell], () => {
|
|
40
|
+
after = mutate();
|
|
41
|
+
return { touched: [cell], focus: null };
|
|
42
|
+
});
|
|
43
|
+
after?.();
|
|
44
|
+
if (said) t.say(said);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** A space typed into a cell: "- ", "* " or "1. " at the start of a line makes it a list's item. Returns whether it did. */
|
|
48
|
+
function typed(cell, data) {
|
|
49
|
+
if (data !== " ") return false;
|
|
50
|
+
const selection = getSelection();
|
|
51
|
+
if (!selection.rangeCount || !selection.isCollapsed) return false;
|
|
52
|
+
const at = selection.getRangeAt(0);
|
|
53
|
+
if (!cell.contains(at.startContainer)) return false;
|
|
54
|
+
const inside = at.startContainer.nodeType === 1 ? at.startContainer : at.startContainer.parentElement;
|
|
55
|
+
if (inside?.closest("li") && cell.contains(inside.closest("li"))) return false;
|
|
56
|
+
// The line: the cell's children between the break or list before the caret and the one after it.
|
|
57
|
+
const top = at.startContainer === cell ? cell.childNodes[at.startOffset - 1] : topOf(cell, at.startContainer);
|
|
58
|
+
if (!inline(top)) return false;
|
|
59
|
+
let first = top;
|
|
60
|
+
while (inline(first.previousSibling)) first = first.previousSibling;
|
|
61
|
+
let last = top;
|
|
62
|
+
while (inline(last.nextSibling)) last = last.nextSibling;
|
|
63
|
+
const head = document.createRange();
|
|
64
|
+
head.setStartBefore(first);
|
|
65
|
+
head.setEnd(at.startContainer, at.startOffset);
|
|
66
|
+
const typedText = head.toString().replace(/ /g, " ");
|
|
67
|
+
const tag = /^[-*] $/.test(typedText) ? "UL" : /^1\. $/.test(typedText) ? "OL" : null;
|
|
68
|
+
if (!tag || head.cloneContents().querySelector("[data-ge-atom]")) return false;
|
|
69
|
+
// The whole line (a live range: it follows the marker's removal).
|
|
70
|
+
const line = document.createRange();
|
|
71
|
+
line.setStartBefore(first);
|
|
72
|
+
line.setEndAfter(last);
|
|
73
|
+
change(cell, () => {
|
|
74
|
+
head.deleteContents(); // the marker
|
|
75
|
+
const item = document.createElement("li");
|
|
76
|
+
item.append(line.extractContents());
|
|
77
|
+
if (empty(item)) item.replaceChildren(holder());
|
|
78
|
+
// Where the line was; a list stands on lines of its own: the breaks around it go.
|
|
79
|
+
let before = cell.childNodes[line.startOffset - 1] ?? null;
|
|
80
|
+
let after = cell.childNodes[line.startOffset] ?? null;
|
|
81
|
+
if (isBreak(after)) {
|
|
82
|
+
const next = after.nextSibling;
|
|
83
|
+
after.remove();
|
|
84
|
+
after = next;
|
|
85
|
+
}
|
|
86
|
+
if (isBreak(before)) {
|
|
87
|
+
const previous = before.previousSibling;
|
|
88
|
+
before.remove();
|
|
89
|
+
before = previous;
|
|
90
|
+
}
|
|
91
|
+
// Into the list of its kind right above it (and the one right below it joins), else a new one.
|
|
92
|
+
let list = before?.tagName === tag ? before : null;
|
|
93
|
+
if (list) list.append(item);
|
|
94
|
+
else {
|
|
95
|
+
list = document.createElement(tag.toLowerCase());
|
|
96
|
+
list.append(item);
|
|
97
|
+
cell.insertBefore(list, after);
|
|
98
|
+
}
|
|
99
|
+
if (after?.tagName === tag) {
|
|
100
|
+
list.append(...after.children);
|
|
101
|
+
after.remove();
|
|
102
|
+
}
|
|
103
|
+
return () => caret(item, 0);
|
|
104
|
+
});
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** A key in a cell (no modifier): Enter in an item, Backspace at an item's start. Returns whether it was the list's. */
|
|
109
|
+
function key(event, cell) {
|
|
110
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey || (event.key !== "Enter" && event.key !== "Backspace")) return false;
|
|
111
|
+
const selection = getSelection();
|
|
112
|
+
if (!selection.rangeCount) return false;
|
|
113
|
+
const at = selection.getRangeAt(0);
|
|
114
|
+
const inside = at.startContainer.nodeType === 1 ? at.startContainer : at.startContainer.parentElement;
|
|
115
|
+
const item = inside?.closest("li");
|
|
116
|
+
if (!item || !cell.contains(item) || item.parentElement?.parentElement !== cell) return false;
|
|
117
|
+
if (event.key === "Enter") {
|
|
118
|
+
enter(cell, item, at);
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
const start = document.createRange();
|
|
122
|
+
start.setStart(item, 0);
|
|
123
|
+
start.setEnd(at.startContainer, at.startOffset);
|
|
124
|
+
if (!selection.isCollapsed || start.toString() !== "" || start.cloneContents().querySelector("[data-ge-atom]")) return false;
|
|
125
|
+
unlist(cell, item);
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Enter in an item: the next item with what follows the caret; in an empty one, out of the list.
|
|
130
|
+
function enter(cell, item, at) {
|
|
131
|
+
change(cell, () => {
|
|
132
|
+
if (!at.collapsed) at.deleteContents();
|
|
133
|
+
const list = item.parentElement;
|
|
134
|
+
if (empty(item)) {
|
|
135
|
+
const after = [...list.children].slice([...list.children].indexOf(item) + 1);
|
|
136
|
+
item.remove();
|
|
137
|
+
const line = holder();
|
|
138
|
+
list.after(line);
|
|
139
|
+
if (after.length > 0) {
|
|
140
|
+
const rest = document.createElement(list.tagName.toLowerCase());
|
|
141
|
+
rest.append(...after);
|
|
142
|
+
line.after(rest);
|
|
143
|
+
}
|
|
144
|
+
if (list.children.length === 0) list.remove();
|
|
145
|
+
return () => caret(cell, [...cell.childNodes].indexOf(line));
|
|
146
|
+
}
|
|
147
|
+
const tail = document.createRange();
|
|
148
|
+
tail.setStart(at.startContainer, at.startOffset);
|
|
149
|
+
tail.setEnd(item, item.childNodes.length);
|
|
150
|
+
const next = document.createElement("li");
|
|
151
|
+
next.append(tail.extractContents());
|
|
152
|
+
if (empty(next)) next.replaceChildren(holder());
|
|
153
|
+
if (empty(item)) item.replaceChildren(holder());
|
|
154
|
+
item.after(next);
|
|
155
|
+
return () => caret(next, 0);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Backspace at an item's start: a line where it was (the items before it stay in the list, those
|
|
160
|
+
// after it a list of their own), on a line of its own.
|
|
161
|
+
function unlist(cell, item) {
|
|
162
|
+
change(cell, () => {
|
|
163
|
+
const list = item.parentElement;
|
|
164
|
+
const items = [...list.children];
|
|
165
|
+
const index = items.indexOf(item);
|
|
166
|
+
const after = items.slice(index + 1);
|
|
167
|
+
const nodes = empty(item) ? [holder()] : [...item.childNodes].filter((node, i, all) => !(isBreak(node) && i === all.length - 1));
|
|
168
|
+
item.remove();
|
|
169
|
+
const reference = index === 0 ? list : list.nextSibling;
|
|
170
|
+
if (index === 0 ? inline(list.previousSibling) : false) cell.insertBefore(document.createElement("br"), reference);
|
|
171
|
+
for (const node of nodes) cell.insertBefore(node, reference);
|
|
172
|
+
if (index > 0 && after.length > 0) {
|
|
173
|
+
const rest = document.createElement(list.tagName.toLowerCase());
|
|
174
|
+
rest.append(...after);
|
|
175
|
+
cell.insertBefore(rest, reference);
|
|
176
|
+
}
|
|
177
|
+
if (list.children.length === 0) list.remove();
|
|
178
|
+
// A line followed by words of the cell's: a break between them.
|
|
179
|
+
const end = nodes.at(-1);
|
|
180
|
+
if (inline(end.nextSibling) && !isBreak(end)) end.after(document.createElement("br"));
|
|
181
|
+
const first = nodes[0];
|
|
182
|
+
return () => caret(cell, [...cell.childNodes].indexOf(first));
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return { typed, key };
|
|
187
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { SPAN } from "../../../shared/media.mjs";
|
|
2
|
+
import { COLUMN_WIDTH, MIN_COLUMN_WIDTH, widthOf } from "../../components/table/index.mjs";
|
|
3
|
+
import { relayout, tableParts, tableState } from "../../components/table/page.mjs";
|
|
4
|
+
import { widthHolder } from "../../../shared/table-slots.mjs";
|
|
5
|
+
import { GONE_WORDS } from "../core.mjs";
|
|
6
|
+
import { gestureLock } from "../gesture.mjs";
|
|
7
|
+
import { drawBox } from "../overlay-layer.mjs";
|
|
8
|
+
import { hideTooltip, tooltip } from "../tooltip.mjs";
|
|
9
|
+
import { addStyle, element } from "../ui.mjs";
|
|
10
|
+
import { t } from "../../../shared/i18n/index.mjs";
|
|
11
|
+
|
|
12
|
+
// A table's column widths (notion-lite's: a 3px strip on each column's right edge; the plan's D4:
|
|
13
|
+
// the kit's own widths until the reader sizes a column). Dragging a strip sizes its column (35px at
|
|
14
|
+
// least, nothing snapped), shown as it goes (Esc puts it back), written when let go as one undo
|
|
15
|
+
// step: every column's width on the topmost cell of that column alone (--doc-column-width,
|
|
16
|
+
// index.mjs COLUMN_WIDTH; shared/table-slots.mjs widthHolder: a merged cell holds none), the kit laying the table
|
|
17
|
+
// out at them (tables/layout.js manualLayout); the first
|
|
18
|
+
// drag of a table the kit lays out gives every column the width it has then. A double click fits
|
|
19
|
+
// the column to its widest cell, unwrapped. The menus' 自动调整列宽 takes the widths off (the kit's
|
|
20
|
+
// again) or gives each column its width as it is; 均分列宽 shares the columns' room out equally.
|
|
21
|
+
// Sizing columns takes the table's own width off (--doc-span: the table is as wide as its
|
|
22
|
+
// columns again).
|
|
23
|
+
//
|
|
24
|
+
// The table's edges: the last column's strip covers its right edge too, a strip along its bottom
|
|
25
|
+
// edge is its bottom one. A click on either arms it (a thicker line, ↔ or ↕ on it), and a drag then
|
|
26
|
+
// sizes the whole table, the resize tool's drag (resize/, its snapping and its label): its width
|
|
27
|
+
// (原宽度, 铺满正文; --doc-span, the kit filling the frame with every column in proportion:
|
|
28
|
+
// tables/layout.js) or its scroll height (原高度, 显示全部行; TABLE_HEIGHT, the rows past it
|
|
29
|
+
// scrolling under the header). Once dragged, with the pointer off it, on a press elsewhere or Esc,
|
|
30
|
+
// it is plain again.
|
|
31
|
+
|
|
32
|
+
const STYLE = `
|
|
33
|
+
.ge-tcol { pointer-events: auto; cursor: col-resize; }
|
|
34
|
+
.ge-tcol > i { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; border-radius: 1.5px; transition: background 150ms, width 120ms, left 120ms; }
|
|
35
|
+
.ge-tcol:hover > i, .ge-tcol[data-on] > i { background: var(--ge-accent); }
|
|
36
|
+
.ge-tcol[data-mode="table"] { cursor: ew-resize; }
|
|
37
|
+
.ge-tcol[data-mode="table"] > i { left: -0.5px; width: 4px; background: var(--ge-accent); }
|
|
38
|
+
.ge-tcol > b { display: none; }
|
|
39
|
+
.ge-tcol[data-mode="table"] > b { position: absolute; top: 50%; left: -6px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 16px; height: 28px; margin-top: -14px; border: 1.5px solid var(--ge-accent); border-radius: 8px; background: var(--ge-bg); color: var(--ge-accent); }
|
|
40
|
+
.ge-tcol[data-in] > b, .ge-trows[data-in] > b { animation: ge-tcol-in 120ms ease-out; }
|
|
41
|
+
.ge-tcol > b > svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
|
|
42
|
+
@keyframes ge-tcol-in { from { opacity: 0; transform: scale(.7); } }
|
|
43
|
+
.ge-trows { pointer-events: auto; cursor: pointer; }
|
|
44
|
+
.ge-trows > i { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 1.5px; transition: background 150ms, height 120ms, top 120ms; }
|
|
45
|
+
.ge-trows:hover > i { background: var(--ge-accent); }
|
|
46
|
+
.ge-trows[data-mode="table"] { cursor: ns-resize; }
|
|
47
|
+
.ge-trows[data-mode="table"] > i { top: -0.5px; height: 4px; background: var(--ge-accent); }
|
|
48
|
+
.ge-trows > b { display: none; }
|
|
49
|
+
.ge-trows[data-mode="table"] > b { position: absolute; left: 50%; top: -6px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 28px; height: 16px; margin-left: -14px; border: 1.5px solid var(--ge-accent); border-radius: 8px; background: var(--ge-bg); color: var(--ge-accent); }
|
|
50
|
+
.ge-trows > b > svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
|
|
51
|
+
${gestureLock("data-ge-tresize", { cursor: "col-resize", select: true })}
|
|
52
|
+
`;
|
|
53
|
+
const DOUBLE = 500; // two presses on a strip within this many ms are a double click (a press on the armed edge after its click too)
|
|
54
|
+
const EDGE = 8; // the edges' strips reach this far past the table (the resize tool's grab)
|
|
55
|
+
const ARROWS = '<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M1.5 6h9M3.5 4 1.5 6l2 2M8.5 4l2 2-2 2"/></svg>';
|
|
56
|
+
|
|
57
|
+
/** t: the table tools (index.mjs); t.resizeTable(event, unit, axis) starts a drag of the table's width ("x") or height ("y") (resize/). */
|
|
58
|
+
export function createColumnWidths(tools) {
|
|
59
|
+
addStyle(STYLE);
|
|
60
|
+
let drag = null; // { unit, index, x, last, start: [px], before: Map(cell -> width), widths }
|
|
61
|
+
let pressed = null; // the last press on a strip: { unit, index, time } (a second one soon after is a double click)
|
|
62
|
+
let armed = null; // an edge clicked: { unit, axis: "x" (right) | "y" (bottom), at: when, shown }, the next drag of it the table's size
|
|
63
|
+
let quick = null; // the armed right edge pressed soon after its click: { unit, index, x } (let go there, a double click)
|
|
64
|
+
|
|
65
|
+
/** Each column's width as the table shows it now, px. */
|
|
66
|
+
const shown = (unit) => tools.geometry(unit).columns.map((column) => Math.round((column.right - column.left) * 100) / 100);
|
|
67
|
+
/** The cells holding the columns' widths: per column, its topmost cell alone, or null. */
|
|
68
|
+
const holders = (unit) => {
|
|
69
|
+
const { slots } = tableState(unit);
|
|
70
|
+
return Array.from({ length: slots.columns }, (_, c) => widthHolder(slots, c));
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// The table's cells that carry a width or are to: each column's holder (the widths), and any
|
|
74
|
+
// other with one (a row moved down from the top keeps its widths: taken off); widths given, the
|
|
75
|
+
// table's own width goes (it is as wide as its columns).
|
|
76
|
+
function changesFor(unit, widths) {
|
|
77
|
+
const { slots } = tableState(unit);
|
|
78
|
+
const cells = [];
|
|
79
|
+
const changes = [];
|
|
80
|
+
if (widths && unit.style.getPropertyValue(SPAN).trim()) {
|
|
81
|
+
cells.push(unit);
|
|
82
|
+
changes.push({ sizes: { [SPAN]: null } });
|
|
83
|
+
}
|
|
84
|
+
const held = new Map(holders(unit).map((cell, c) => [cell, c]).filter(([cell]) => cell));
|
|
85
|
+
for (const cell of slots.places.keys()) {
|
|
86
|
+
const width = widths && held.has(cell) ? `${Math.max(MIN_COLUMN_WIDTH, Math.round(widths[held.get(cell)] * 100) / 100)}px` : null;
|
|
87
|
+
if (widthOf(cell) === width) continue;
|
|
88
|
+
cells.push(cell);
|
|
89
|
+
changes.push({ sizes: { [COLUMN_WIDTH]: width } });
|
|
90
|
+
}
|
|
91
|
+
return { cells, changes };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The columns at `widths` (px each; null: the kit's own), one undo step. */
|
|
95
|
+
function set(unit, widths, said) {
|
|
96
|
+
const { cells, changes } = changesFor(unit, widths);
|
|
97
|
+
if (cells.length === 0) return false;
|
|
98
|
+
const done = tools.look(cells, changes);
|
|
99
|
+
if (done && said) tools.say(t("{0} · Ctrl+Z 撤销", said));
|
|
100
|
+
relayout(unit);
|
|
101
|
+
return done;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Shown as it goes: the holders' widths set straight (taken back before the undo step).
|
|
105
|
+
function preview(unit, widths) {
|
|
106
|
+
holders(unit).forEach((cell, c) => cell?.style.setProperty(COLUMN_WIDTH, `${widths[c]}px`));
|
|
107
|
+
relayout(unit);
|
|
108
|
+
}
|
|
109
|
+
function putBack({ unit, before }) {
|
|
110
|
+
for (const [cell, width] of before) {
|
|
111
|
+
if (width) cell.style.setProperty(COLUMN_WIDTH, width);
|
|
112
|
+
else cell.style.removeProperty(COLUMN_WIDTH);
|
|
113
|
+
if (cell.getAttribute("style") === "") cell.removeAttribute("style");
|
|
114
|
+
}
|
|
115
|
+
relayout(unit);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// A column fitted to its widest cell of it alone, unwrapped (+1px): by its words, not the words an
|
|
119
|
+
// Agent took out that the page shows in it (changes/: out of the layout while it is measured).
|
|
120
|
+
function fit(unit, index) {
|
|
121
|
+
const { slots } = tableState(unit);
|
|
122
|
+
const widest = Math.max(0, ...[...slots.places].filter(([, place]) => place.c === index && place.cols === 1).map(([cell]) => {
|
|
123
|
+
const style = getComputedStyle(cell);
|
|
124
|
+
const was = cell.style.whiteSpace;
|
|
125
|
+
const gone = [...cell.querySelectorAll(GONE_WORDS)];
|
|
126
|
+
for (const mark of gone) mark.hidden = true;
|
|
127
|
+
cell.style.whiteSpace = "nowrap";
|
|
128
|
+
const range = document.createRange();
|
|
129
|
+
range.selectNodeContents(cell);
|
|
130
|
+
const width = range.getBoundingClientRect().width + parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
131
|
+
cell.style.whiteSpace = was;
|
|
132
|
+
if (cell.getAttribute("style") === "") cell.removeAttribute("style");
|
|
133
|
+
for (const mark of gone) mark.hidden = false;
|
|
134
|
+
return width;
|
|
135
|
+
}));
|
|
136
|
+
const widths = shown(unit);
|
|
137
|
+
widths[index] = Math.ceil(widest) + 1;
|
|
138
|
+
set(unit, widths, t("已按内容调整列宽"));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// ---------- the strips ----------
|
|
142
|
+
|
|
143
|
+
const isArmed = (unit, axis) => armed?.unit === unit && armed.axis === axis;
|
|
144
|
+
// An armed edge's strip: its pill comes in once, not again each time the strips are drawn anew.
|
|
145
|
+
function shownArmed(node) {
|
|
146
|
+
node.setAttribute("data-mode", "table");
|
|
147
|
+
node.toggleAttribute("data-in", !armed.shown);
|
|
148
|
+
armed.shown = true;
|
|
149
|
+
}
|
|
150
|
+
// Plain again: the pointer off the armed edge (not pressed), or a press elsewhere.
|
|
151
|
+
const offEdge = (event) => !event.target?.closest?.('.ge-tcol[data-mode="table"], .ge-trows[data-mode="table"]');
|
|
152
|
+
document.addEventListener("pointermove", (event) => {
|
|
153
|
+
if (!armed || drag || event.buttons || !offEdge(event)) return;
|
|
154
|
+
armed = null;
|
|
155
|
+
tools.draw();
|
|
156
|
+
}, true);
|
|
157
|
+
document.addEventListener("pointerdown", (event) => {
|
|
158
|
+
if (!armed || !offEdge(event)) return;
|
|
159
|
+
armed = null;
|
|
160
|
+
tools.draw();
|
|
161
|
+
}, true);
|
|
162
|
+
function arm(unit, axis) {
|
|
163
|
+
armed = { unit, axis, at: performance.now() };
|
|
164
|
+
hideTooltip();
|
|
165
|
+
tools.draw();
|
|
166
|
+
}
|
|
167
|
+
// An armed edge pressed: the resize tool's drag of the table's size; plain again. The right edge
|
|
168
|
+
// pressed again soon after the click that armed it and let go where it was pressed is a double
|
|
169
|
+
// click on the last column's strip: that column fitted.
|
|
170
|
+
function sizeTable(event, unit, axis, index = null) {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
quick = axis === "x" && performance.now() - armed.at < DOUBLE ? { unit, index, x: event.clientX } : null;
|
|
173
|
+
armed = null;
|
|
174
|
+
tools.resizeTable(event, unit, axis);
|
|
175
|
+
tools.draw();
|
|
176
|
+
}
|
|
177
|
+
document.addEventListener("pointerup", (event) => {
|
|
178
|
+
const done = quick;
|
|
179
|
+
quick = null;
|
|
180
|
+
if (done && Math.abs(event.clientX - done.x) < 2) fit(done.unit, done.index);
|
|
181
|
+
}, true);
|
|
182
|
+
|
|
183
|
+
// The stretches of rows along which column `index`'s right edge is a cell's edge (not inside a
|
|
184
|
+
// merged cell), [top, bottom] each; the last column's, the whole table's.
|
|
185
|
+
function edgeRuns(slots, g, index, last) {
|
|
186
|
+
if (last || !slots) return [[g.box.top, g.box.bottom]];
|
|
187
|
+
const runs = [];
|
|
188
|
+
slots.matrix.forEach((row, r) => {
|
|
189
|
+
if (row[index] === row[index + 1]) return;
|
|
190
|
+
if (runs.at(-1)?.end === r - 1) runs.at(-1).end = r;
|
|
191
|
+
else runs.push({ start: r, end: r });
|
|
192
|
+
});
|
|
193
|
+
return runs.map(({ start, end }) => [g.rows[start].top, g.rows[end].bottom]);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** The strips of the table's columns whose right edge is in sight and of its bottom edge, in the tools' layer (index.mjs draw). */
|
|
197
|
+
function draw(layer, unit, g, drawn) {
|
|
198
|
+
const { slots } = tableState(unit);
|
|
199
|
+
g.columns.forEach((column, index) => {
|
|
200
|
+
if (column.right < g.view.left || column.right > g.view.right + 1) return;
|
|
201
|
+
const last = index === g.columns.length - 1;
|
|
202
|
+
// Along the rows where its right edge is a cell's (not inside a merged cell).
|
|
203
|
+
for (const [top, bottom] of edgeRuns(slots, g, index, last)) {
|
|
204
|
+
if (bottom <= g.view.top || top >= g.view.bottom) continue;
|
|
205
|
+
const node = drawn(element("div", { class: "ge-tcol", "data-doc-dev": "", role: "separator", "aria-label": last ? t("拖动调整列宽;点击后拖动调整整个表格的宽度") : t("拖动调整列宽,双击按内容调整"), html: `<i></i>${last ? `<b>${ARROWS}</b>` : ""}` }));
|
|
206
|
+
if (drag?.unit === unit && drag.index === index) node.setAttribute("data-on", "");
|
|
207
|
+
// The last one reaches past the table: its right edge is there too.
|
|
208
|
+
drawBox(node, layer, { left: column.right - 1.5, top: Math.max(top, g.view.top), right: column.right + (last ? EDGE : 1.5), bottom: Math.min(bottom, g.view.bottom) });
|
|
209
|
+
if (last && isArmed(unit, "x")) shownArmed(node);
|
|
210
|
+
tooltip(node, () => (node.getAttribute("data-mode") === "table" ? t("拖动调整整个表格的宽度") : last ? t("拖动调整列宽 · 点击后可拖动调整整个表格的宽度") : t("拖动调整列宽,双击按内容调整")));
|
|
211
|
+
node.addEventListener("pointerdown", (event) => {
|
|
212
|
+
if (event.button !== 0) return;
|
|
213
|
+
event.stopImmediatePropagation();
|
|
214
|
+
if (last && isArmed(unit, "x")) return sizeTable(event, unit, "x", index);
|
|
215
|
+
// A second press on the strip soon after the first: a double click (the strips are drawn anew between them).
|
|
216
|
+
const again = pressed?.unit === unit && pressed.index === index && event.timeStamp - pressed.time < DOUBLE;
|
|
217
|
+
pressed = again ? null : { unit, index, time: event.timeStamp };
|
|
218
|
+
if (again) {
|
|
219
|
+
event.preventDefault(); // nor its mousedown: no selection, no focus moved
|
|
220
|
+
armed = null;
|
|
221
|
+
return fit(unit, index);
|
|
222
|
+
}
|
|
223
|
+
const { rows } = tableParts(unit);
|
|
224
|
+
drag = { unit, index, x: event.clientX, last, fresh: true, start: shown(unit), before: new Map(rows.flatMap((row) => [...row.cells]).map((cell) => [cell, widthOf(cell)])) };
|
|
225
|
+
document.documentElement.setAttribute("data-ge-tresize", "");
|
|
226
|
+
document.documentElement.setPointerCapture?.(event.pointerId);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
// The bottom edge, in sight: a click arms it, a drag then sizes the table's scroll height.
|
|
231
|
+
const node = drawn(element("div", { class: "ge-trows", "data-doc-dev": "", role: "separator", "aria-label": t("点击后拖动调整表格的高度"), html: `<i></i><b>${ARROWS}</b>` }));
|
|
232
|
+
if (isArmed(unit, "y")) shownArmed(node);
|
|
233
|
+
drawBox(node, layer, { left: g.view.left, top: g.view.bottom - 1.5, right: g.view.right, bottom: g.view.bottom + EDGE });
|
|
234
|
+
tooltip(node, () => (isArmed(unit, "y") ? t("拖动调整表格的高度,超出的行上下滚动") : t("点击后可拖动调整表格的高度")));
|
|
235
|
+
node.addEventListener("pointerdown", (event) => {
|
|
236
|
+
if (event.button !== 0) return;
|
|
237
|
+
event.stopImmediatePropagation();
|
|
238
|
+
if (isArmed(unit, "y")) return sizeTable(event, unit, "y");
|
|
239
|
+
event.preventDefault();
|
|
240
|
+
arm(unit, "y");
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// The press's mousedown (the pointerdown is not cancelled, so that it comes): no selection, no
|
|
245
|
+
// focus moved; one that counts two clicks (a double click sent as one press) is a fit, not a drag.
|
|
246
|
+
document.addEventListener("mousedown", (event) => {
|
|
247
|
+
if (!drag || drag.fresh !== true) return;
|
|
248
|
+
drag.fresh = false;
|
|
249
|
+
event.preventDefault();
|
|
250
|
+
if (event.detail < 2) return;
|
|
251
|
+
const { unit, index } = drag;
|
|
252
|
+
drag = null;
|
|
253
|
+
pressed = null;
|
|
254
|
+
document.documentElement.removeAttribute("data-ge-tresize");
|
|
255
|
+
fit(unit, index);
|
|
256
|
+
}, true);
|
|
257
|
+
|
|
258
|
+
document.addEventListener("pointermove", (event) => {
|
|
259
|
+
if (!drag) return;
|
|
260
|
+
// A press is a click until it moves (the last strip clicked arms the right edge).
|
|
261
|
+
if (!drag.moved && Math.abs(event.clientX - drag.x) < 2) return;
|
|
262
|
+
drag.moved = true;
|
|
263
|
+
const widths = [...drag.start];
|
|
264
|
+
widths[drag.index] = Math.max(MIN_COLUMN_WIDTH, Math.round(drag.start[drag.index] + event.clientX - drag.x));
|
|
265
|
+
drag.widths = widths;
|
|
266
|
+
preview(drag.unit, widths);
|
|
267
|
+
tools.draw();
|
|
268
|
+
}, true);
|
|
269
|
+
|
|
270
|
+
function end(cancel) {
|
|
271
|
+
const done = drag;
|
|
272
|
+
drag = null;
|
|
273
|
+
document.documentElement.removeAttribute("data-ge-tresize");
|
|
274
|
+
if (!done) return;
|
|
275
|
+
putBack(done);
|
|
276
|
+
if (!cancel && done.widths) set(done.unit, done.widths);
|
|
277
|
+
// The last strip clicked (pressed, not moved): the table's right edge armed.
|
|
278
|
+
else if (!cancel && done.last) return arm(done.unit, "x");
|
|
279
|
+
tools.draw();
|
|
280
|
+
}
|
|
281
|
+
document.addEventListener("pointerup", () => end(false), true);
|
|
282
|
+
document.addEventListener("pointercancel", () => end(true), true);
|
|
283
|
+
document.addEventListener("keydown", (event) => {
|
|
284
|
+
if ((!drag && !armed) || event.key !== "Escape") return;
|
|
285
|
+
event.preventDefault();
|
|
286
|
+
event.stopImmediatePropagation();
|
|
287
|
+
if (drag) end(true);
|
|
288
|
+
else {
|
|
289
|
+
armed = null;
|
|
290
|
+
tools.draw();
|
|
291
|
+
}
|
|
292
|
+
}, true);
|
|
293
|
+
|
|
294
|
+
return {
|
|
295
|
+
draw,
|
|
296
|
+
/** The edges plain again (the tools no longer stand by the table). */
|
|
297
|
+
disarm() { armed = null; },
|
|
298
|
+
get dragging() { return drag !== null; },
|
|
299
|
+
/** 自动调整列宽: the kit's widths, from the columns' words (the reader's taken off; sizing a column fixes them again). */
|
|
300
|
+
fit(unit) {
|
|
301
|
+
if (set(unit, null, t("已自动调整列宽"))) return true;
|
|
302
|
+
tools.say(t("列宽已按内容调整,无需再调。"));
|
|
303
|
+
return false;
|
|
304
|
+
},
|
|
305
|
+
/** 均分列宽: columns `from` … `to` (every column without them) share their room equally. */
|
|
306
|
+
even(unit, from = 0, to = tableState(unit).columns - 1) {
|
|
307
|
+
const widths = shown(unit);
|
|
308
|
+
const share = widths.slice(from, to + 1).reduce((sum, width) => sum + width, 0) / (to - from + 1);
|
|
309
|
+
for (let c = from; c <= to; c++) widths[c] = share;
|
|
310
|
+
return set(unit, widths, t("已均分列宽"));
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MATH_MACROS } from "../../shared/components/math.mjs";
|
|
2
|
+
import { t } from "../../shared/i18n/index.mjs";
|
|
3
|
+
|
|
4
|
+
// What the page asks of KaTeX: a formula of the text (core.mjs, formula/), a formula block
|
|
5
|
+
// (components/math/page.mjs), the import (src/transfer/import.mjs) and the formula editor all read TeX
|
|
6
|
+
// the same way, and none of them is another's, so it stands here. It runs with no page too.
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* KaTeX's markup of `tex` ({ html }) or why it does not read ({ error }); the kit's macros too (the
|
|
10
|
+
* page's, else the components' own where the page has no math.js, or in the import's worker).
|
|
11
|
+
*/
|
|
12
|
+
export function renderTex(tex, display = false) {
|
|
13
|
+
const katex = globalThis.katex;
|
|
14
|
+
if (!katex) return { html: "", error: t("公式功能没有加载。") };
|
|
15
|
+
try {
|
|
16
|
+
return { html: katex.renderToString(tex, { displayMode: display, throwOnError: true, strict: "ignore", trust: false, macros: { ...(globalThis.DocMath?.macros ?? MATH_MACROS) } }), error: null };
|
|
17
|
+
} catch (error) {
|
|
18
|
+
return { html: "", error: String(error?.message ?? error).replace(/^KaTeX parse error:\s*/, "") };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Whether KaTeX does not read `tex`, which the kit left in `node` as it could: drawn with its errors
|
|
24
|
+
* in red, as it wrote them or as words beside a drawing where it took a part of it for a formula
|
|
25
|
+
* of its own. A drawing with nothing of this is read as it is, with no second reading of the page's
|
|
26
|
+
* formulas as it opens; with KaTeX not on the page, nothing can be told.
|
|
27
|
+
*/
|
|
28
|
+
export function unread(node, tex, display = false) {
|
|
29
|
+
if (!globalThis.katex) return false;
|
|
30
|
+
const whole = node.querySelector(".katex") && !node.querySelector('.katex-error, .katex-html [style*="204, 0, 0"]') && ![...node.childNodes].some((child) => child.nodeType === 3 && child.data.trim());
|
|
31
|
+
return !whole && Boolean(renderTex(tex, display).error);
|
|
32
|
+
}
|