@heycys/gallery 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -2
- package/THIRD-PARTY-NOTICES.md +3253 -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 +39 -0
- package/browser/editor/components/callout/page.mjs +13 -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 +297 -0
- package/browser/editor/components/details/index.mjs +72 -0
- package/browser/editor/components/details/page.mjs +86 -0
- package/browser/editor/components/dialog/index.mjs +83 -0
- package/browser/editor/components/dialog/page.mjs +219 -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 +33 -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 +51 -0
- package/browser/editor/components/highlight/index.mjs +79 -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 +45 -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 +133 -0
- package/browser/editor/components/installed/page.mjs +422 -0
- package/browser/editor/components/installed/served.mjs +35 -0
- package/browser/editor/components/kit.mjs +64 -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 +162 -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 +833 -0
- package/browser/editor/components/rows.mjs +16 -0
- package/browser/editor/components/section/index.mjs +41 -0
- package/browser/editor/components/section/page.mjs +141 -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 +306 -0
- package/browser/editor/components/table/page.mjs +672 -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 +229 -0
- package/browser/editor/page/annotate/card.mjs +102 -0
- package/browser/editor/page/annotate/index.mjs +1629 -0
- package/browser/editor/page/at-menu/index.mjs +317 -0
- package/browser/editor/page/autosave.mjs +977 -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 +82 -0
- package/browser/editor/page/block-menu/index.mjs +215 -0
- package/browser/editor/page/blocks.mjs +246 -0
- package/browser/editor/page/caret.mjs +679 -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 +797 -0
- package/browser/editor/page/clipboard/own/blocks.mjs +202 -0
- package/browser/editor/page/clipboard/own/chart-keys.mjs +58 -0
- package/browser/editor/page/clipboard/own/describe.mjs +115 -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 +326 -0
- package/browser/editor/page/columns/index.mjs +360 -0
- package/browser/editor/page/commit.mjs +1798 -0
- package/browser/editor/page/conflicts.mjs +269 -0
- package/browser/editor/page/convert.mjs +830 -0
- package/browser/editor/page/core.mjs +1655 -0
- package/browser/editor/page/drag/drop.mjs +307 -0
- package/browser/editor/page/drag/index.mjs +335 -0
- package/browser/editor/page/drag/preview.mjs +121 -0
- package/browser/editor/page/edge-scroll.mjs +50 -0
- package/browser/editor/page/editor.mjs +1725 -0
- package/browser/editor/page/emoji-picker/emoji-tab.mjs +278 -0
- package/browser/editor/page/emoji-picker/glyph-html.mjs +26 -0
- package/browser/editor/page/emoji-picker/grid.mjs +79 -0
- package/browser/editor/page/emoji-picker/icon-tab.mjs +217 -0
- package/browser/editor/page/emoji-picker/icons.mjs +32 -0
- package/browser/editor/page/emoji-picker/index.mjs +164 -0
- package/browser/editor/page/emoji-picker/styles.mjs +2 -0
- package/browser/editor/page/emoji-picker/support.mjs +202 -0
- package/browser/editor/page/emoji-picker/upload.mjs +235 -0
- package/browser/editor/page/export-report.mjs +23 -0
- package/browser/editor/page/fills.mjs +60 -0
- package/browser/editor/page/find/index.mjs +107 -0
- package/browser/editor/page/flags.mjs +70 -0
- package/browser/editor/page/format-bar/bar.mjs +448 -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 +400 -0
- package/browser/editor/page/gesture.mjs +45 -0
- package/browser/editor/page/handle/index.mjs +639 -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 +243 -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/look.mjs +65 -0
- package/browser/editor/page/made.mjs +24 -0
- package/browser/editor/page/margin.mjs +352 -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 +500 -0
- package/browser/editor/page/merge.mjs +100 -0
- package/browser/editor/page/notices.mjs +142 -0
- package/browser/editor/page/offered.mjs +32 -0
- package/browser/editor/page/outline/folds.mjs +52 -0
- package/browser/editor/page/outline/index.mjs +697 -0
- package/browser/editor/page/outline/list.mjs +172 -0
- package/browser/editor/page/outline/read.mjs +201 -0
- package/browser/editor/page/outline/strip.mjs +281 -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 +64 -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 +59 -0
- package/browser/editor/page/selection/index.mjs +157 -0
- package/browser/editor/page/selection/marquee.mjs +174 -0
- package/browser/editor/page/session.mjs +117 -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 +138 -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 +985 -0
- package/browser/editor/page/table/lists.mjs +187 -0
- package/browser/editor/page/table/widths.mjs +308 -0
- package/browser/editor/page/tex.mjs +32 -0
- package/browser/editor/page/text-select/index.mjs +656 -0
- package/browser/editor/page/tooltip.mjs +98 -0
- package/browser/editor/page/type-grid.mjs +82 -0
- package/browser/editor/page/typing/code-edges.mjs +228 -0
- package/browser/editor/page/typing/index.mjs +276 -0
- package/browser/editor/page/typing/leave.mjs +68 -0
- package/browser/editor/page/ui.mjs +160 -0
- package/browser/shared/annotations.mjs +571 -0
- package/browser/shared/code-folds.mjs +10 -0
- package/browser/shared/code-languages.mjs +70 -0
- package/browser/shared/code-lines.mjs +30 -0
- package/browser/shared/colors.mjs +28 -0
- package/browser/shared/component-catalog.mjs +559 -0
- package/browser/shared/components/bookmark.mjs +26 -0
- package/browser/shared/components/callout.mjs +7 -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 +342 -0
- package/browser/shared/components/installed.mjs +162 -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 +37 -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/emoji/custom.mjs +91 -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 +26 -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 +196 -0
- package/browser/shared/emoji/emoji.mjs +37 -0
- package/browser/shared/emoji/glyphs.mjs +134 -0
- package/browser/shared/emoji/icon-value.mjs +90 -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 +53 -0
- package/browser/shared/http.mjs +22 -0
- package/browser/shared/i18n/en.mjs +1164 -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/media.mjs +162 -0
- package/browser/shared/new-names.mjs +64 -0
- package/browser/shared/number-reading.mjs +92 -0
- package/browser/shared/old-names.mjs +143 -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 +110 -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 +76 -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.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-2PBALTR3.mjs +57 -0
- package/dist/chunk-342HXE3Q.mjs +2 -0
- package/dist/chunk-3LA3EMDE.mjs +15 -0
- package/dist/chunk-43B75J5T.mjs +2 -0
- package/dist/chunk-4K5KC6V2.mjs +2 -0
- package/dist/chunk-5FRMCDPY.mjs +16 -0
- package/dist/chunk-5L7RYZCL.mjs +2 -0
- package/dist/chunk-5LEK2CBS.mjs +2 -0
- package/dist/chunk-5OFN5AHC.mjs +2 -0
- package/dist/chunk-5SIYS5HN.mjs +2 -0
- package/dist/chunk-5TEK3RAD.mjs +2 -0
- package/dist/chunk-6CYG3Z4V.mjs +2 -0
- package/dist/chunk-6U2SLSDN.mjs +3 -0
- package/dist/chunk-742D2WWJ.mjs +19 -0
- package/dist/chunk-7GHT2UCA.mjs +15 -0
- package/dist/chunk-7QQBR7PB.mjs +2 -0
- package/dist/chunk-A55HN5OK.mjs +2 -0
- package/dist/chunk-ACOPDCNB.mjs +2 -0
- package/dist/chunk-AGDILNWB.mjs +2 -0
- package/dist/chunk-ATCJYAR4.mjs +2 -0
- package/dist/chunk-B3VTYBYR.mjs +960 -0
- package/dist/chunk-C564NU2H.mjs +77 -0
- package/dist/chunk-C7HWOBIF.mjs +2 -0
- package/dist/chunk-DB4WKGYF.mjs +7 -0
- package/dist/chunk-E7VYDG2X.mjs +2 -0
- package/dist/chunk-EUX7IC5J.mjs +48 -0
- package/dist/chunk-EVJ3BX3M.mjs +2 -0
- package/dist/chunk-EZY3WC6Z.mjs +15 -0
- package/dist/chunk-FQGQH4KM.mjs +2 -0
- package/dist/chunk-G7TOXONE.mjs +6 -0
- package/dist/chunk-GPF4YWWB.mjs +9 -0
- package/dist/chunk-GRAXKKG4.mjs +2 -0
- package/dist/chunk-GYQV7Y4J.mjs +120 -0
- package/dist/chunk-HMHK3EQ6.mjs +2 -0
- package/dist/chunk-HQQMJCQJ.mjs +10 -0
- package/dist/chunk-HYMEEXKN.mjs +4 -0
- package/dist/chunk-IERUOGC3.mjs +6 -0
- package/dist/chunk-ITNLYXXV.mjs +3 -0
- package/dist/chunk-L4DVONOG.mjs +2 -0
- package/dist/chunk-LAE5NQ4B.mjs +2 -0
- package/dist/chunk-LC7YNQFG.mjs +2 -0
- package/dist/chunk-LHTFLRB6.mjs +4 -0
- package/dist/chunk-LKX55H76.mjs +2 -0
- package/dist/chunk-MAFIGVXY.mjs +2 -0
- package/dist/chunk-NFIBI4IP.mjs +26 -0
- package/dist/chunk-NSKUTQ5J.mjs +5 -0
- package/dist/chunk-O52JMOCZ.mjs +2 -0
- package/dist/chunk-P2CAZPDP.mjs +3 -0
- package/dist/chunk-QAIHRH3I.mjs +13 -0
- package/dist/chunk-QMQUXTU4.mjs +12 -0
- package/dist/chunk-QR6A54KJ.mjs +3 -0
- package/dist/chunk-QVWVFC5K.mjs +6 -0
- package/dist/chunk-QYKCJ7FG.mjs +8 -0
- package/dist/chunk-QZY6Q64C.mjs +2 -0
- package/dist/chunk-TDQP3DKQ.mjs +10 -0
- package/dist/chunk-TMYZB6AV.mjs +2 -0
- package/dist/chunk-TX6JH7TR.mjs +2 -0
- package/dist/chunk-U3SSPL4K.mjs +8 -0
- package/dist/chunk-UH4SIXTR.mjs +2 -0
- package/dist/chunk-UNUEWH4S.mjs +2 -0
- package/dist/chunk-UXUK4PMC.mjs +27 -0
- package/dist/chunk-V4CPWKMZ.mjs +2 -0
- package/dist/chunk-V6XZ4VIR.mjs +2 -0
- package/dist/chunk-VACRB2NE.mjs +3 -0
- package/dist/chunk-W63L7367.mjs +7 -0
- package/dist/chunk-W7CXPCRV.mjs +6 -0
- package/dist/chunk-W7XHE4CT.mjs +2 -0
- package/dist/chunk-XINNG4F2.mjs +4 -0
- package/dist/chunk-Y34NR5JL.mjs +2 -0
- package/dist/chunk-YEY3RSFQ.mjs +2 -0
- package/dist/chunk-YL2DPWVS.mjs +4 -0
- package/dist/chunk-YXAUQPVK.mjs +8 -0
- package/dist/chunk-YZ5Z6H4W.mjs +4 -0
- package/dist/chunk-Z52HTUW7.mjs +4 -0
- package/dist/chunk-ZBIM6ARY.mjs +216 -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 +1988 -0
- package/kit/report.css +2821 -0
- package/kit/runtime.js +1707 -0
- package/kit/sheets.js +123 -0
- package/kit/state.js +217 -0
- package/kit/tables.js +1449 -0
- package/kit/tokens.js +29 -0
- package/kit/ui.js +561 -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 +141 -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 +138 -0
- package/skill/agents/openai.yaml +5 -0
- package/skill/references/building-components.md +327 -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 +141 -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-B6Ai3wsa.js +13 -0
- package/web/assets/index-SYPC3EZy.css +1 -0
- package/web/index.html +14 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Z } from "../../shared/layers.mjs";
|
|
2
|
+
import { UNIT, unitElement, withLeads } from "./core.mjs";
|
|
3
|
+
import { frameNumber, inFrame } from "./frames.mjs";
|
|
4
|
+
import { clipOf, fillExtentOf } from "./geometry.mjs";
|
|
5
|
+
import { provide } from "./overlays.mjs";
|
|
6
|
+
import { addStyle, element } from "./ui.mjs";
|
|
7
|
+
|
|
8
|
+
// Where the editor draws over the report's blocks (docs/editor.md, "Overlays"): a selected block's
|
|
9
|
+
// fill, the dashed frame of the text being edited, the handle and a section's bar, a drag's line
|
|
10
|
+
// and tint. Each goes into the layer of the coordinate system its block moves in:
|
|
11
|
+
//
|
|
12
|
+
// page the document's own scrolling (a block in the report's flow): a layer at the
|
|
13
|
+
// document's origin (absolute, in the body), so scrolling the page moves the drawing
|
|
14
|
+
// with its block natively, without waiting for a frame;
|
|
15
|
+
// viewport the window (a block that is fixed or sticky, or inside one: a table's sticky header
|
|
16
|
+
// cell): a fixed layer;
|
|
17
|
+
// dialog the open modal dialog holding the block (it is in the top layer, where nothing of
|
|
18
|
+
// the body shows): a fixed layer inside that dialog, never inside another one.
|
|
19
|
+
//
|
|
20
|
+
// Positions are measured against the layer's own rectangle, never worked out from scrollX/scrollY,
|
|
21
|
+
// so they hold whatever the layer's containing block. A box of the page that scrolls by itself (a
|
|
22
|
+
// dialog's content, a table wider than its frame, a code block's frame) moves its blocks without
|
|
23
|
+
// the layer: the frames that keep the drawings on their blocks put them back (frames.mjs, the same
|
|
24
|
+
// frame as the scroll). A block is measured once per frame (shapeOf): its fill, its frame and its
|
|
25
|
+
// handle drawn in one frame use the same numbers, kept relative to the layer, which scrolling the
|
|
26
|
+
// page leaves as they are; outside the frames (a selection made, a block converted) it is measured
|
|
27
|
+
// afresh.
|
|
28
|
+
|
|
29
|
+
const STYLE = `
|
|
30
|
+
.ge-layer { left: 0; top: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: ${Z.layer}; }
|
|
31
|
+
.ge-layer[data-context="page"] { position: absolute; }
|
|
32
|
+
.ge-layer[data-context="viewport"], .ge-layer[data-context="dialog"] { position: fixed; }
|
|
33
|
+
/* Whatever the tools put in a layer stands where they say; those that declared a position of their own (a relative box) would not, and the layer cannot know which rule a tool wrote them with: !important keeps it one rule. */
|
|
34
|
+
.ge-layer > * { position: absolute !important; }
|
|
35
|
+
.ge-layer > .ge-handle, .ge-layer > .ge-section-bar { pointer-events: auto; }
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
// The coordinate system a block moves in, and the element its layer goes into.
|
|
39
|
+
function contextOf(target) {
|
|
40
|
+
const dialog = target.closest("dialog[open]");
|
|
41
|
+
if (dialog?.matches(":modal")) return { kind: "dialog", host: dialog };
|
|
42
|
+
for (let node = target; node && node !== document.body && node !== document.documentElement; node = node.parentElement) {
|
|
43
|
+
const { position } = getComputedStyle(node);
|
|
44
|
+
if (position === "fixed" || position === "sticky") return { kind: "viewport", host: document.body };
|
|
45
|
+
}
|
|
46
|
+
return { kind: "page", host: document.body };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The layer the editor draws in over `target` (made when first needed). */
|
|
50
|
+
export function layerOf(target) {
|
|
51
|
+
addStyle(STYLE);
|
|
52
|
+
const { kind, host } = contextOf(target);
|
|
53
|
+
let layer = [...host.children].find((child) => child.classList.contains("ge-layer") && child.dataset.context === kind);
|
|
54
|
+
if (!layer) {
|
|
55
|
+
layer = element("div", { class: "ge-layer", "data-context": kind, "data-doc-dev": "" });
|
|
56
|
+
host.append(layer);
|
|
57
|
+
}
|
|
58
|
+
return layer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const shapes = new WeakMap(); // block -> { at: the frame measured in, shape }
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Where `target` shows, as the editor draws over it: { layer, origin: the layer's corner in the
|
|
65
|
+
* window, rect and clip relative to the layer, radius: its corners, reach: how far its fill reaches
|
|
66
|
+
* when it says so, room: how far it may reach above and below it (roomOf, measured when first read:
|
|
67
|
+
* only a selected block's fill and the frame of what is edited read it, so the handle, the flags and
|
|
68
|
+
* the others never measure the neighbours) }, or null when it does not show. Measured once per
|
|
69
|
+
* frame; outside the frames, afresh.
|
|
70
|
+
*/
|
|
71
|
+
export function shapeOf(target) {
|
|
72
|
+
const at = inFrame() ? frameNumber() : -1;
|
|
73
|
+
const cached = shapes.get(target);
|
|
74
|
+
if (at >= 0 && cached?.at === at) return cached.shape;
|
|
75
|
+
const box = fillExtentOf(target);
|
|
76
|
+
let shape = null;
|
|
77
|
+
if (box) {
|
|
78
|
+
const layer = layerOf(target);
|
|
79
|
+
const origin = layer.getBoundingClientRect();
|
|
80
|
+
const relative = (rect) => rect && { left: rect.left - origin.left, top: rect.top - origin.top, right: rect.right - origin.left, bottom: rect.bottom - origin.top };
|
|
81
|
+
let room = null;
|
|
82
|
+
shape = {
|
|
83
|
+
layer, origin: { left: origin.left, top: origin.top }, rect: relative(box), clip: relative(clipOf(target)), radius: boxRadius(target), reach: boxReach(target),
|
|
84
|
+
get room() { return (room ??= roomOf(target, box)); },
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (at >= 0) shapes.set(target, { at, shape });
|
|
88
|
+
return shape;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* How far what the editor draws over a block reaches past it (a selected block's fill, the frame
|
|
93
|
+
* of what is being edited), as Notion's fill: a block of its own rounded box (a code block, a
|
|
94
|
+
* highlight block, a card) 6px, or what the block says (`reach`: a file's row 4px, as notion-lite's;
|
|
95
|
+
* a callout's square box 6px), its corners its own and that much more, so the two are concentric; a
|
|
96
|
+
* block of text 2px, 4px round. `radius`: the block's (boxRadius). Above and below it, never more
|
|
97
|
+
* than its `room` (roomOf): two neighbours' fills, however close the blocks stand (disclosures and
|
|
98
|
+
* code blocks 8px apart, list items 5px), never overlap; where the room is less, a block of its own
|
|
99
|
+
* box reaches that much less at its sides too and its corners are round by that much less (the fill
|
|
100
|
+
* as even around it as its box is: never wide at the sides and narrow above and below, never an
|
|
101
|
+
* ellipse); a block of text keeps its 2px at its sides. { x: at its sides, y: its own reach, top,
|
|
102
|
+
* bottom: above and below it, the same, radius, corners: null }.
|
|
103
|
+
*/
|
|
104
|
+
export const reachOf = (radius, reach = null, room = null) => {
|
|
105
|
+
const text = radius <= 0 && reach === null;
|
|
106
|
+
const out = text ? 2 : reach ?? 6;
|
|
107
|
+
// The same above and below, the smaller room of the two: a block's fill is even, so in a run of
|
|
108
|
+
// blocks the first and the last look as the ones between (not wider toward the text around them).
|
|
109
|
+
const top = Math.min(out, room?.above ?? out, room?.below ?? out);
|
|
110
|
+
const bottom = top;
|
|
111
|
+
if (text) return { x: out, y: out, top, bottom, radius: 4, corners: null };
|
|
112
|
+
// A box filled evenly on every side: where its room keeps the fill closer above and below, it is as
|
|
113
|
+
// close at the sides (3px all round for disclosures 8px apart, not 6 at the sides and 3 above), and its
|
|
114
|
+
// corners are the block's own and that reach (a circle, as the block's).
|
|
115
|
+
return { x: top, y: out, top, bottom, radius: Math.max(0, radius) + top, corners: null };
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* How far a block's fill may reach above and below it ({ above, below }, Infinity where nothing
|
|
120
|
+
* limits it; reachOf takes the smaller of the two for both sides), one rule for every kind of block: half the gap to the block next to it that way
|
|
121
|
+
* (neighbourOf) with a pixel left between them ((gap - 1) / 2, rounded down), or what that block's
|
|
122
|
+
* own reach leaves of the gap less a pixel when that is more (a disclosure 12px under a paragraph,
|
|
123
|
+
* whose fill reaches 2px, keeps its 6px), so two neighbours' fills never overlap: they keep a
|
|
124
|
+
* hairline apart, or just meet where the blocks touch. `box`: its fillExtentOf.
|
|
125
|
+
*/
|
|
126
|
+
export function roomOf(target, box = fillExtentOf(target)) {
|
|
127
|
+
if (!box) return null;
|
|
128
|
+
const room = (neighbour, gap) => {
|
|
129
|
+
if (!neighbour) return Infinity;
|
|
130
|
+
const { x: reach } = reachOf(boxRadius(neighbour.unit), boxReach(neighbour.unit)); // its own, on every side
|
|
131
|
+
return Math.max(0, Math.floor((gap - 1) / 2), Math.floor(gap - 1 - reach));
|
|
132
|
+
};
|
|
133
|
+
const above = neighbourOf(target, box, false);
|
|
134
|
+
const below = neighbourOf(target, box, true);
|
|
135
|
+
return { above: room(above, above && box.top - above.rect.bottom), below: room(below, below && below.rect.top - box.bottom) };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// The block next to `target` above it (`forward`: below it) and where it shows (fillExtentOf),
|
|
139
|
+
// { unit, rect }, or null: the nearest unit of its container that way that shows and stands over or
|
|
140
|
+
// under it (a column beside it, a step of a flowchart's row, does not); none, its container's (a
|
|
141
|
+
// disclosure's first block: the block before the disclosure). Any of them may be filled with it (a
|
|
142
|
+
// selection, the blocks a text selection takes whole), so its fill keeps clear of all of them.
|
|
143
|
+
function neighbourOf(target, box, forward) {
|
|
144
|
+
for (let at = target; at; at = at.parentElement?.closest(UNIT) ?? null) {
|
|
145
|
+
for (let next = forward ? at.nextElementSibling : withLeads(at)[0].previousElementSibling; next; next = forward ? next.nextElementSibling : next.previousElementSibling) {
|
|
146
|
+
const unit = unitElement(next);
|
|
147
|
+
if (!unit || unit === at || unit.parentElement !== at.parentElement) continue;
|
|
148
|
+
const rect = fillExtentOf(unit);
|
|
149
|
+
if (rect && rect.right > box.left && rect.left < box.right) return { unit, rect };
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Where a block's fill lies (client coordinates): its fillExtentOf and its reach past it (reachOf, roomOf), or null. */
|
|
156
|
+
export function fillRectOf(target) {
|
|
157
|
+
const box = fillExtentOf(target);
|
|
158
|
+
if (!box) return null;
|
|
159
|
+
const { x, top, bottom } = reachOf(boxRadius(target), boxReach(target), roomOf(target, box));
|
|
160
|
+
return { left: box.left - x, top: box.top - top, right: box.right + x, bottom: box.bottom + bottom };
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** How far a boxed block's fill reaches past it when it says so (--doc-box-reach; a square box too, a callout's), else null. */
|
|
164
|
+
export function boxReach(element) {
|
|
165
|
+
const declared = parseFloat(getComputedStyle(element).getPropertyValue("--doc-box-reach"));
|
|
166
|
+
return declared > 0 ? declared : null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The corner radius of a block that shows a box of its own (a background or a border: a code
|
|
171
|
+
* block, a highlight block, a card), else 0 (text, however its element is rounded: a paragraph or
|
|
172
|
+
* heading given a background color too, whose fill the kit lays where a text block's selection is).
|
|
173
|
+
* The editor's own tints over a block (a formula block's under the pointer or while its box is open)
|
|
174
|
+
* are inset shadows, never its background, so they never count: a block's fill is the same
|
|
175
|
+
* whatever the pointer does.
|
|
176
|
+
*/
|
|
177
|
+
export function boxRadius(element) {
|
|
178
|
+
const style = getComputedStyle(element);
|
|
179
|
+
// A block whose box is drawn inside it (a file's row, a bookmark's card, an embed's frame), a list
|
|
180
|
+
// item drawn as a box (a flowchart's step) or a list drawn as its items' boxes (a flowchart, whose
|
|
181
|
+
// fill has its cards' corners: styles/flowchart.css), says so.
|
|
182
|
+
const declared = parseFloat(style.getPropertyValue("--doc-box-radius"));
|
|
183
|
+
if (declared > 0) return declared;
|
|
184
|
+
if (/^(P|H[1-4]|LI|HR)$/.test(element.tagName)) return 0; // a divider is a line, no box either
|
|
185
|
+
const radius = parseFloat(style.borderTopLeftRadius) || 0;
|
|
186
|
+
if (radius === 0) return 0;
|
|
187
|
+
const painted = !/^(transparent|rgba\(0, 0, 0, 0\))$/.test(style.backgroundColor) || style.backgroundImage !== "none";
|
|
188
|
+
const bordered = ["Top", "Right", "Bottom", "Left"].some((side) => parseFloat(style[`border${side}Width`]) > 0 && style[`border${side}Style`] !== "none");
|
|
189
|
+
return painted || bordered ? radius : 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Lay `node` over a block measured as `shape` (shapeOf): `x` past it at its sides, `above` and
|
|
194
|
+
* `below` it (`y` both, unless said), with corners of `radius` (or `corners`, a border-radius: reachOf's),
|
|
195
|
+
* cut where the block is cut. Each edge is rounded on its own, so two drawings kept apart stay apart.
|
|
196
|
+
*/
|
|
197
|
+
export function drawOver(node, { layer, rect, clip }, { x, y, top: above = y, bottom: below = y, radius, corners = null }) {
|
|
198
|
+
if (node.parentNode !== layer) layer.append(node);
|
|
199
|
+
const left = Math.round(rect.left - x);
|
|
200
|
+
const top = Math.round(rect.top - above);
|
|
201
|
+
const width = Math.round(rect.right + x) - left;
|
|
202
|
+
const height = Math.round(rect.bottom + below) - top;
|
|
203
|
+
const cut = clip && [clip.top - top, left + width - clip.right, top + height - clip.bottom, clip.left - left].map((side) => `${Math.max(0, Math.round(side))}px`).join(" ");
|
|
204
|
+
Object.assign(node.style, {
|
|
205
|
+
transform: `translate(${left}px, ${top}px)`, width: `${width}px`, height: `${height}px`, borderRadius: corners ?? `${radius}px`,
|
|
206
|
+
clipPath: cut && cut !== "0px 0px 0px 0px" ? `inset(${cut})` : "",
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** Put `node` in `layer` at `left`, `top` (relative to the layer). */
|
|
211
|
+
export function drawAt(node, layer, left, top) {
|
|
212
|
+
if (node.parentNode !== layer) layer.append(node);
|
|
213
|
+
node.style.transform = `translate(${Math.round(left)}px, ${Math.round(top)}px)`;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Lay `node` in `layer` over `rect` (window coordinates), `outset` past it. */
|
|
217
|
+
export function drawBox(node, layer, rect, outset = 0) {
|
|
218
|
+
if (node.parentNode !== layer) layer.append(node);
|
|
219
|
+
const origin = layer.getBoundingClientRect();
|
|
220
|
+
Object.assign(node.style, {
|
|
221
|
+
transform: `translate(${Math.round(rect.left - origin.left - outset)}px, ${Math.round(rect.top - origin.top - outset)}px)`,
|
|
222
|
+
width: `${Math.round(rect.right - rect.left + 2 * outset)}px`,
|
|
223
|
+
height: `${Math.round(rect.bottom - rect.top + 2 * outset)}px`,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
provide("layers", () => [...document.querySelectorAll(".ge-layer")].map((layer) => ({ context: layer.dataset.context, in: layer.parentElement?.localName ?? null, drawings: layer.children.length })));
|