@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,352 @@
|
|
|
1
|
+
import { OLD_OUTLINE_OPEN_KEY, OLD_PREFERENCES_KEY, OUTLINE_OPEN_KEY, PREFERENCES_KEY } from "../../shared/preferences.mjs";
|
|
2
|
+
|
|
3
|
+
// The right side of the page while it is edited (docs/editor.md, "The outline and the right side"): the
|
|
4
|
+
// outline (目录, outline/) docked at the window's right edge, the cards of 批注 (annotate/) between it and
|
|
5
|
+
// the column, and where the body column goes beside them. The outline is a panel at the window's right
|
|
6
|
+
// edge, in full (its list, 200px unless the reader dragged its guide wider or narrower: `outlineWidth`;
|
|
7
|
+
// the guide 8px in) or as its strip (36px: a short line a heading, its card shown while the pointer is
|
|
8
|
+
// on it), as the room allows.
|
|
9
|
+
//
|
|
10
|
+
// One rule places the column: in the middle of what the outline leaves of the page, as far from the
|
|
11
|
+
// window's left edge as from the outline (its guide, or its strip). With the outline the rooms at the
|
|
12
|
+
// column's two sides are the same, and they stay the same as the guide is dragged (each gives or takes
|
|
13
|
+
// half of what the list takes or gives) and as the window is resized; without it the column is
|
|
14
|
+
// centered in the page as ever. Each room is the edge room at least (64: the block handle at the left,
|
|
15
|
+
// a section's bar and the annotation markers at the right). The list keeps the width the reader gave it
|
|
16
|
+
// whatever the page's width does (the window resized, the workbench's sidebar dragged or sliding: its
|
|
17
|
+
// guide stays where it is); where the page is short of room for it, the two rooms give (down to the
|
|
18
|
+
// block handle's, 52), and below that the outline takes its strip, the column in the middle of what
|
|
19
|
+
// the strip leaves; only then does the column narrow, as the page narrows on a small window
|
|
20
|
+
// (MARGIN_STYLE, a rule of the page's width, so it holds while the window is resized). A report read
|
|
21
|
+
// full width keeps the rooms at its two sides and gives the outline its own, the list in full only
|
|
22
|
+
// while the column keeps 560px.
|
|
23
|
+
//
|
|
24
|
+
// A form laid out is kept for 16px under the width it needs (a scrollbar coming or a pixel of a
|
|
25
|
+
// resize never flips it back and forth: a full-width report's column, narrower beside the list, can
|
|
26
|
+
// grow taller and bring a scrollbar), the column narrower by what is short (16px at most). A form
|
|
27
|
+
// changes as soon as the width says, while it moves too (the sidebar dragged or sliding): the list
|
|
28
|
+
// comes the moment it fits and goes the moment it does not, never at the end of a drag. Nothing of it
|
|
29
|
+
// depends on the headings, so typing the first heading moves nothing.
|
|
30
|
+
//
|
|
31
|
+
// 批注 take what the outline leaves, never what it has: the outline's form depends on them in nothing.
|
|
32
|
+
// While the page has one (`notes`), their cards stand right of the column where that holds them, as
|
|
33
|
+
// notion-lite's (298292 Vn: a page of 1150 and up, the page going left by max(0, (1500 − width) / 2)),
|
|
34
|
+
// on its numbers read for ours. A card's room right of the column is 388: 60 to the card (clear of the
|
|
35
|
+
// button beside a block), 308 of card, 20 past it. So on what the outline leaves, the column goes left
|
|
36
|
+
// of its middle by max(0, (1488 − width) / 2) (712 + 2 × 388), down to the 52 of the handle's room, at
|
|
37
|
+
// 1152; below that the card gives what is short, down to 240, at 1084 (52 + 712 + 60 + 240 + 20), and
|
|
38
|
+
// below that, or beside a column read full width, which leaves no room at its right, they fold back
|
|
39
|
+
// into markers in the column's right room and move nothing. The move is a page's rule of its width as
|
|
40
|
+
// the rest (`--ge-card-room`, `--ge-floor`), so a window resized holds it; it slides over 200ms only
|
|
41
|
+
// when the page comes to have an annotation or has none left, and each width lays it out at once.
|
|
42
|
+
//
|
|
43
|
+
// Its numbers are custom properties in a sheet of their own (`--ge-outline-room`, what the outline
|
|
44
|
+
// takes of the page's width beside the column's rooms, `--ge-side`, the least room either side of the
|
|
45
|
+
// column keeps, `--ge-card-room` and `--ge-floor` as above), set from the start by the page's head
|
|
46
|
+
// (EARLY_MARGIN, which the edit service puts in it, saying whether the document has 批注: the page's
|
|
47
|
+
// width read again once its content is in, its scrollbar with it, before the kit shows it), so the
|
|
48
|
+
// column stands where it will stay from the first paint, and by setMargin() after that.
|
|
49
|
+
// When they move the column, the page hears a resize, so what stands over the text (the format bar, a
|
|
50
|
+
// selection's strips, a card) is placed again.
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The numbers: the edge room (the least room either side of the column keeps), the least it gives up
|
|
54
|
+
* to (the block handle's: its 38px, its 12px gap, 2px), the column, the least a full-width column
|
|
55
|
+
* keeps, the outline in full (its default width, the least and the most it is dragged to), its
|
|
56
|
+
* guide's inset in its panel (the column's right room ends there), how far left of the guide its grip
|
|
57
|
+
* reaches, its strip, the hysteresis; how far right of the column a card of 批注 stands (the button beside
|
|
58
|
+
* a block, past a section's strip, ends 52px out, and a card under the pointer comes 5px left: 3px
|
|
59
|
+
* clear; one focused comes 20px left, and no button shows then), a card's width, the least it gives up
|
|
60
|
+
* to, and the room past it (clear of the outline's guide and grip).
|
|
61
|
+
*/
|
|
62
|
+
export const MARGIN = Object.freeze({ edge: 64, start: 52, column: 712, least: 560, full: 200, fullMin: 160, fullMax: 360, guide: 8, grip: 4, strip: 36, hysteresis: 16, lane: 60, card: 308, cardLeast: 240, cardEnd: 20 });
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The outline's width in full for the reader's choice `chosen` (px; 0 or none: the default), within
|
|
66
|
+
* its least and most. Written with no outside name, so the page's head can carry it (EARLY_MARGIN).
|
|
67
|
+
*/
|
|
68
|
+
export function outlineWidth(chosen, { full = 200, fullMin = 160, fullMax = 360 } = {}) {
|
|
69
|
+
return Number.isFinite(chosen) && chosen > 0 ? Math.round(Math.min(fullMax, Math.max(fullMin, chosen))) : full;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Where the right side's parts go on a page `width` px wide (its window less its scrollbar): `outline`,
|
|
74
|
+
* whether the outline is on, `notes`, whether the page has 批注, `full`, its width in full
|
|
75
|
+
* (outlineWidth), `wide`, a report read full width, `was`, the layout given last for the same request
|
|
76
|
+
* (a form it laid out is kept for `hysteresis` px under the width it needs).
|
|
77
|
+
* Returns { dock: the outline's width at the window's right edge (0, its strip's or its list's),
|
|
78
|
+
* outline: its form, "full" | "strip" | null, room: what the outline takes of the page's width beside
|
|
79
|
+
* the column's rooms (the list's less its guide's inset, the strip's, 0), side: the least room either
|
|
80
|
+
* side of the column keeps, left: the room at the column's left on this page, right: the room right of
|
|
81
|
+
* it to the window's edge (its own and the outline's), column: its width, cards: the width of a card
|
|
82
|
+
* of 批注 standing right of it (0: they fold into markers), cardRoom: what the page's rule keeps right of
|
|
83
|
+
* the column for them (0: none), floor: the least room at its left }. Written with no outside name, so
|
|
84
|
+
* the page's head can carry it as it is (EARLY_MARGIN).
|
|
85
|
+
*/
|
|
86
|
+
export function marginLayout({ width, outline = false, notes = false, wide = false, was = null, edge = 64, start = 52, column = 712, least = 560, full = 200, guide = 8, strip = 36, hysteresis = 16, lane = 60, card = 308, cardLeast = 240, cardEnd = 20 }) {
|
|
87
|
+
const body = wide ? least : column;
|
|
88
|
+
// The column in the middle of what the outline leaves, its rooms `side` at least (narrower only below
|
|
89
|
+
// that), and left of there as far as a card's room asks, down to `start`, the card giving what is short.
|
|
90
|
+
const placed = (form, dock, room, side) => {
|
|
91
|
+
const across = wide ? width - room - 2 * side : Math.min(body, width - room - 2 * side);
|
|
92
|
+
const middle = wide ? side : Math.max(side, (width - room - across) / 2);
|
|
93
|
+
const spare = width - room - across - start - lane - cardEnd;
|
|
94
|
+
const cards = notes && !wide && spare + (was?.cards ? hysteresis : 0) >= cardLeast ? Math.min(card, spare) : 0;
|
|
95
|
+
const cardRoom = cards ? lane + card + cardEnd : 0;
|
|
96
|
+
const left = cards ? Math.max(start, Math.min(middle, width - room - across - cardRoom)) : middle;
|
|
97
|
+
return { dock, outline: form, room, side, left, right: width - left - across, column: across, cards, cardRoom, floor: cards ? start : side };
|
|
98
|
+
};
|
|
99
|
+
if (!outline) return placed(null, 0, 0, edge);
|
|
100
|
+
// In full while the list, as wide as the reader gave it, leaves the column the handle's room at both
|
|
101
|
+
// sides (its rooms the edge room, less down to the handle's where the page is short); a form kept
|
|
102
|
+
// under the width it needs (the hysteresis) narrows the column by what is short. Else its strip.
|
|
103
|
+
const spare = width + guide - body; // the page beside the column, the list's room counted from its guide
|
|
104
|
+
const kept = was?.outline === "full" ? hysteresis : 0;
|
|
105
|
+
if (spare + kept >= 2 * start + full) return placed("full", full, full - guide, Math.max(start, Math.min(edge, (spare - full) / 2)));
|
|
106
|
+
return placed("strip", strip, strip, edge);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const SLIDE = 200; // ms: the column's slide as the page comes to have 批注 or has none left
|
|
110
|
+
|
|
111
|
+
/** The page's rules for the room: the column placed (and narrowed only when it must), screen only. */
|
|
112
|
+
export const MARGIN_STYLE = `
|
|
113
|
+
@media screen {
|
|
114
|
+
:root[data-ge-margin] {
|
|
115
|
+
/* The least room either side of the column keeps (marginLayout's side: the edge room, less where the page is short of it, down to the handle's). */
|
|
116
|
+
--ge-margin-side: var(--ge-side, var(--ge-edge-room, 64px));
|
|
117
|
+
/* The column as wide as the page gives it beside the outline's room and its own two (100% resolves where it is used: the page's width). */
|
|
118
|
+
--ge-margin-column: min(var(--doc-content-max-width, 712px), calc(100% - var(--ge-outline-room, 0px) - 2 * var(--ge-margin-side)));
|
|
119
|
+
}
|
|
120
|
+
:root[data-ge-margin] .doc-page {
|
|
121
|
+
width: var(--ge-margin-column);
|
|
122
|
+
/* In the middle of what the outline leaves: as far from the window's left edge as from the outline; left of there as far as the cards of 批注 ask (--ge-card-room), never past --ge-floor. */
|
|
123
|
+
margin-left: max(var(--ge-floor, var(--ge-margin-side)), min(calc((100% - var(--ge-outline-room, 0px) - var(--ge-margin-column)) / 2), calc(100% - var(--ge-outline-room, 0px) - var(--ge-margin-column) - var(--ge-card-room, 0px))));
|
|
124
|
+
margin-right: 0;
|
|
125
|
+
transition: margin-left var(--ge-slide, 0s) ease;
|
|
126
|
+
}
|
|
127
|
+
:root[data-ge-margin][data-doc-width="full"] .doc-page {
|
|
128
|
+
width: calc(100% - var(--ge-outline-room, 0px) - 2 * var(--ge-margin-side));
|
|
129
|
+
max-width: none;
|
|
130
|
+
margin-left: var(--ge-margin-side);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/* The column sliding as the page comes to have 批注 or has none left (setMargin's notes). */
|
|
134
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
135
|
+
:root[data-ge-margin-sliding] { --ge-slide: ${SLIDE}ms; }
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
const ROOM = "data-ge-margin-room"; // the sheet holding the numbers
|
|
140
|
+
const EARLY = "data-ge-margin-early"; // on that sheet while the head's script holds it: what it was asked and gave (JSON)
|
|
141
|
+
const SLIDING = "data-ge-margin-sliding"; // on the root while the column slides
|
|
142
|
+
const roomCss = ({ room, side, cardRoom = 0, floor = side }) => `:root[data-ge-margin] { --ge-outline-room: ${room}px; --ge-side: ${side}px; --ge-card-room: ${cardRoom}px; --ge-floor: ${floor}px; }`;
|
|
143
|
+
|
|
144
|
+
// The head's script (EARLY_MARGIN): the outline's room before the page shows, when the report has it
|
|
145
|
+
// on (`keys.open`: the reports that have it on, shared/preferences.mjs outlineOpen; `slug`: this page's), as
|
|
146
|
+
// wide as the reader's preferences say (`keys.preferences`: outlineWidth, the same for every report),
|
|
147
|
+
// and the cards' room, when it has 批注 (`notes`, the edit service's word).
|
|
148
|
+
// Never on a page opened on its own in a frame (?solo, the 写作偏好 dialog), which has none.
|
|
149
|
+
// In the head the page has no content yet, so no scrollbar: its width is read again at
|
|
150
|
+
// DOMContentLoaded, when the content is in and the kit has not shown it yet (a frame later), unless the
|
|
151
|
+
// editor has taken the room over by then.
|
|
152
|
+
function earlyMargin(layout, widthOf, numbers, keys, slug, notes, room, early, css) {
|
|
153
|
+
try {
|
|
154
|
+
if (new URLSearchParams(location.search).has("solo")) return;
|
|
155
|
+
const read = (key, old) => localStorage.getItem(key) ?? localStorage.getItem(old); // before 2026-10-26 under its old name, not carried yet
|
|
156
|
+
const open = JSON.parse(read(keys.open, keys.oldOpen) || "[]");
|
|
157
|
+
const outline = Array.isArray(open) && open.includes(slug);
|
|
158
|
+
if (!outline && !notes) return;
|
|
159
|
+
const prefs = JSON.parse(read(keys.preferences, keys.oldPreferences) || "{}") || {};
|
|
160
|
+
const asked = { outline, notes, outlineWidth: Number(prefs.outlineWidth) || 0 };
|
|
161
|
+
const root = document.documentElement;
|
|
162
|
+
const sheet = document.createElement("style");
|
|
163
|
+
sheet.setAttribute("data-doc-dev", "");
|
|
164
|
+
sheet.setAttribute(room, "");
|
|
165
|
+
const lay = () => {
|
|
166
|
+
const given = layout({ ...numbers, width: root.clientWidth, outline, notes, full: widthOf(asked.outlineWidth, numbers), wide: root.getAttribute("data-doc-width") === "full" });
|
|
167
|
+
sheet.textContent = css(given);
|
|
168
|
+
sheet.setAttribute(early, JSON.stringify({ given, asked }));
|
|
169
|
+
};
|
|
170
|
+
lay();
|
|
171
|
+
document.head.append(sheet);
|
|
172
|
+
root.setAttribute("data-ge-margin", "");
|
|
173
|
+
document.addEventListener("DOMContentLoaded", () => { if (sheet.hasAttribute(early)) lay(); }, { once: true });
|
|
174
|
+
} catch {}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The script the edit service puts in the head of report `slug`'s page (the outline's room when that
|
|
179
|
+
* report has it on: the keys it reads are shared/preferences.mjs's; the cards' room when it has 批注: `notes`).
|
|
180
|
+
*/
|
|
181
|
+
export const earlyMarginScript = (slug, { notes = false } = {}) => {
|
|
182
|
+
const keys = JSON.stringify({ open: OUTLINE_OPEN_KEY, preferences: PREFERENCES_KEY, oldOpen: OLD_OUTLINE_OPEN_KEY, oldPreferences: OLD_PREFERENCES_KEY });
|
|
183
|
+
const name = JSON.stringify(String(slug)).replace(/</g, "\\u003c"); // in a <script>: never a tag
|
|
184
|
+
return `(${earlyMargin})(${marginLayout}, ${outlineWidth}, ${JSON.stringify(MARGIN)}, ${keys}, ${name}, ${JSON.stringify(notes)}, ${JSON.stringify(ROOM)}, ${JSON.stringify(EARLY)}, ${roomCss})`;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
// ---------- on the page ----------
|
|
188
|
+
|
|
189
|
+
const asked = { outline: false, notes: false, outlineWidth: 0 }; // what the outline and 批注 ask for
|
|
190
|
+
const listeners = new Set();
|
|
191
|
+
let now = null; // the layout given last
|
|
192
|
+
let request = null; // what it was given for: { outline, wide } (the outline's width keeps the form laid out)
|
|
193
|
+
let started = false;
|
|
194
|
+
let lastWidth = null;
|
|
195
|
+
let ownResize = false; // the resize this module sends (the column moved) is no width changing
|
|
196
|
+
let sliding = 0; // the timer of the column's slide, while it goes
|
|
197
|
+
|
|
198
|
+
function pageWidth() {
|
|
199
|
+
const root = document.documentElement;
|
|
200
|
+
return root.clientWidth || innerWidth;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const isWide = () => document.documentElement.getAttribute("data-doc-width") === "full";
|
|
204
|
+
|
|
205
|
+
function numbers() {
|
|
206
|
+
const style = getComputedStyle(document.documentElement);
|
|
207
|
+
const edge = parseFloat(style.getPropertyValue("--ge-edge-room")) || MARGIN.edge;
|
|
208
|
+
const column = parseFloat(style.getPropertyValue("--doc-content-max-width")) || MARGIN.column;
|
|
209
|
+
return { edge, column };
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const layoutFor = (wide, was) => marginLayout({ ...MARGIN, width: pageWidth(), ...numbers(), ...asked, full: outlineWidth(asked.outlineWidth, MARGIN), wide, was });
|
|
213
|
+
|
|
214
|
+
// The column moved without the window changing: what is placed over the page's text is placed
|
|
215
|
+
// again, as after a resize (this module hears it too, and finds nothing more to change).
|
|
216
|
+
function tell() {
|
|
217
|
+
ownResize = true;
|
|
218
|
+
try {
|
|
219
|
+
dispatchEvent(new Event("resize"));
|
|
220
|
+
} finally {
|
|
221
|
+
ownResize = false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// `slide`: the column goes over SLIDE, frames.mjs's followers keeping what stands over the text with it
|
|
226
|
+
// (it goes as a transition, so they hear it); else at once, one under way ending there.
|
|
227
|
+
function apply({ slide = false } = {}) {
|
|
228
|
+
const wide = isWide();
|
|
229
|
+
const same = request && request.outline === asked.outline && request.wide === wide;
|
|
230
|
+
const next = layoutFor(wide, same ? now : null);
|
|
231
|
+
request = { outline: asked.outline, wide };
|
|
232
|
+
const root = document.documentElement;
|
|
233
|
+
let sheet = document.head.querySelector(`style[${ROOM}]`);
|
|
234
|
+
sheet?.removeAttribute(EARLY); // the editor's from now on
|
|
235
|
+
// The page's rule on, with these numbers: whether that changed anything.
|
|
236
|
+
const rule = (layout) => {
|
|
237
|
+
if (!sheet) {
|
|
238
|
+
sheet = document.createElement("style");
|
|
239
|
+
sheet.setAttribute("data-doc-dev", "");
|
|
240
|
+
sheet.setAttribute(ROOM, "");
|
|
241
|
+
document.head.append(sheet);
|
|
242
|
+
}
|
|
243
|
+
const css = roomCss(layout);
|
|
244
|
+
const written = sheet.textContent !== css;
|
|
245
|
+
if (written) sheet.textContent = css;
|
|
246
|
+
const on = root.hasAttribute("data-ge-margin");
|
|
247
|
+
if (!on) root.setAttribute("data-ge-margin", "");
|
|
248
|
+
return written || !on;
|
|
249
|
+
};
|
|
250
|
+
const page = document.querySelector("main");
|
|
251
|
+
if (slide && now && page && now.left !== next.left) {
|
|
252
|
+
// What it slides from is a length, the page's rule on as it stands (a margin of `auto` slides nowhere).
|
|
253
|
+
rule(now);
|
|
254
|
+
getComputedStyle(page).marginLeft;
|
|
255
|
+
root.setAttribute(SLIDING, "");
|
|
256
|
+
clearTimeout(sliding);
|
|
257
|
+
sliding = setTimeout(() => {
|
|
258
|
+
sliding = 0;
|
|
259
|
+
root.removeAttribute(SLIDING);
|
|
260
|
+
apply();
|
|
261
|
+
tell();
|
|
262
|
+
}, SLIDE + 40);
|
|
263
|
+
} else if (!slide && sliding) {
|
|
264
|
+
clearTimeout(sliding);
|
|
265
|
+
sliding = 0;
|
|
266
|
+
root.removeAttribute(SLIDING);
|
|
267
|
+
}
|
|
268
|
+
let moved = false;
|
|
269
|
+
if (next.dock || next.cards || sliding) moved = rule(next);
|
|
270
|
+
else if (sheet || root.hasAttribute("data-ge-margin")) {
|
|
271
|
+
sheet?.remove();
|
|
272
|
+
root.removeAttribute("data-ge-margin");
|
|
273
|
+
moved = true;
|
|
274
|
+
}
|
|
275
|
+
const changed = !now || ["dock", "outline", "room", "side", "cards"].some((name) => now[name] !== next[name]);
|
|
276
|
+
now = next;
|
|
277
|
+
if (changed) for (const listener of listeners) listener(next);
|
|
278
|
+
if (moved) tell();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// The page's width changed (the window, or its scrollbar; the workbench's sidebar dragged or sliding):
|
|
282
|
+
// laid out again at once.
|
|
283
|
+
function resized() {
|
|
284
|
+
if (ownResize) return;
|
|
285
|
+
const width = pageWidth();
|
|
286
|
+
if (width === lastWidth) return; // the page grew taller or shorter (the observer sees that too), or the same width told twice: nothing moves
|
|
287
|
+
lastWidth = width;
|
|
288
|
+
apply();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function start() {
|
|
292
|
+
if (started) return;
|
|
293
|
+
started = true;
|
|
294
|
+
if (!document.head.querySelector("style[data-ge-margin-style]")) { // the edit service's head has it from the start
|
|
295
|
+
const style = document.createElement("style");
|
|
296
|
+
style.setAttribute("data-doc-dev", "");
|
|
297
|
+
style.setAttribute("data-ge-margin-style", "");
|
|
298
|
+
style.textContent = MARGIN_STYLE;
|
|
299
|
+
document.head.append(style);
|
|
300
|
+
}
|
|
301
|
+
// What the head gave the page (the outline's form and width), kept as the
|
|
302
|
+
// layout given last and as what is asked until the tools say otherwise, so the editor keeps it within
|
|
303
|
+
// the hysteresis: the column does not move as the editor starts.
|
|
304
|
+
let early = null;
|
|
305
|
+
try { early = JSON.parse(document.head.querySelector(`style[${ROOM}][${EARLY}]`)?.getAttribute(EARLY) ?? "null"); } catch {}
|
|
306
|
+
if (early?.given && early.asked) {
|
|
307
|
+
now = early.given;
|
|
308
|
+
Object.assign(asked, early.asked);
|
|
309
|
+
request = { outline: asked.outline, wide: isWide() };
|
|
310
|
+
}
|
|
311
|
+
addEventListener("resize", resized);
|
|
312
|
+
// The page's width changes without the window's too: its scrollbar comes or goes.
|
|
313
|
+
new ResizeObserver(resized).observe(document.documentElement);
|
|
314
|
+
// A report read full width, or no longer.
|
|
315
|
+
new MutationObserver(() => apply()).observe(document.documentElement, { attributes: true, attributeFilter: ["data-doc-width"] });
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Ask for room: { outline } (whether it shows), { outlineWidth } (its width in full as the reader
|
|
320
|
+
* chose it, px; 0: the default), { notes } (whether the page has 批注: the column slides when that
|
|
321
|
+
* changes it). The layout is given at once and again whenever the page's width changes it.
|
|
322
|
+
*/
|
|
323
|
+
export function setMargin(part) {
|
|
324
|
+
start();
|
|
325
|
+
const slide = part.notes !== undefined && part.notes !== asked.notes;
|
|
326
|
+
Object.assign(asked, part);
|
|
327
|
+
apply({ slide });
|
|
328
|
+
return now;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** The layout given last ({ dock, outline, room, side, left, right, column, cards, cardRoom, floor }; see marginLayout). */
|
|
332
|
+
export const margin = () => now ?? layoutFor(isWide(), null);
|
|
333
|
+
|
|
334
|
+
/** How far right of the column what stands in its right room may reach, by `layout` (marginLayout): short of the outline's guide and its grip, or of its strip, or of the window's edge. */
|
|
335
|
+
export const rightRoom = ({ right, room } = margin()) => right - room - MARGIN.grip;
|
|
336
|
+
|
|
337
|
+
/** Call `listener(layout)` whenever the layout changes (the outline's form or width, the column's least rooms, the cards' width). */
|
|
338
|
+
export function onMargin(listener) {
|
|
339
|
+
listeners.add(listener);
|
|
340
|
+
return () => listeners.delete(listener);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* The widest the outline's list can be dragged to on this page now: as wide as leaves the column its
|
|
345
|
+
* edge room at both sides (the two rooms giving it half each, never the column narrowed), within its
|
|
346
|
+
* least and most.
|
|
347
|
+
*/
|
|
348
|
+
export function outlineMost() {
|
|
349
|
+
const { edge, column } = numbers();
|
|
350
|
+
const body = isWide() ? MARGIN.least : column;
|
|
351
|
+
return Math.max(MARGIN.fullMin, Math.min(MARGIN.fullMax, pageWidth() + MARGIN.guide - body - 2 * edge));
|
|
352
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { can, ownHTML } from "../core.mjs";
|
|
2
|
+
import { select } from "../caret.mjs";
|
|
3
|
+
import { typeOf, typedTargets } from "../convert.mjs";
|
|
4
|
+
import { formatRange } from "../marks.mjs";
|
|
5
|
+
import { spaceAround } from "../../../shared/inline-spacing.mjs";
|
|
6
|
+
import { padCaret } from "../pads.mjs";
|
|
7
|
+
import { pageOf, pageOfType } from "../page-objects.mjs";
|
|
8
|
+
import { inlineMark, markdownShortcut } from "./rules.mjs";
|
|
9
|
+
|
|
10
|
+
// Shortcuts as the reader types (docs/editor.md, "New blocks and conversions"): the Markdown of a
|
|
11
|
+
// type (its `markdown`, tried in rules.mjs) at a block's start converts it at once, what was typed
|
|
12
|
+
// being removed in the same undo step; "**text**" or "`text`" closed at the caret becomes bold or code through
|
|
13
|
+
// marks.mjs formatRange, and what is typed next goes after the new element. A "/" typed into an
|
|
14
|
+
// empty block opens the "/" menu (slash-menu/), and an "@" the "@" menu (at-menu/), each of which then
|
|
15
|
+
// follows what is typed.
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* slash: the "/" menu (slash-menu/); at: the "@" menu (at-menu/). convert(host, type, typed): turn a text block into another
|
|
19
|
+
* type as one undo step, `typed` (a range of what was typed) taken away first (editor.mjs
|
|
20
|
+
* convertHost; a fourth argument, what else that step does to the converted block). recordStep(host,
|
|
21
|
+
* before): a change of a block's text as its own undo step (history.mjs).
|
|
22
|
+
*/
|
|
23
|
+
export function createMarkdown({ slash, at, convert, recordStep }) {
|
|
24
|
+
/** Text was typed (or composed) into `host`; `data`: what arrived. */
|
|
25
|
+
function typed(host, data) {
|
|
26
|
+
if (slash.host) return slash.update();
|
|
27
|
+
if (at.host) return at.update();
|
|
28
|
+
if (pageOf(host)?.shortcut?.(host, data)) return;
|
|
29
|
+
const selection = getSelection();
|
|
30
|
+
if (!selection.rangeCount || !selection.isCollapsed || !host.contains(selection.anchorNode)) return;
|
|
31
|
+
const head = document.createRange();
|
|
32
|
+
head.setStart(host, 0);
|
|
33
|
+
head.setEnd(selection.anchorNode, selection.anchorOffset);
|
|
34
|
+
const before = head.toString();
|
|
35
|
+
const whole = host.textContent.replace(/ /g, " ").trim();
|
|
36
|
+
if (slash.typed(host, before, whole) || at.typed(host, before, data)) return;
|
|
37
|
+
if (head.cloneContents().querySelector("[data-ge-atom]")) return; // Markdown begins a block: no formula before it
|
|
38
|
+
const alone = before === whole;
|
|
39
|
+
const shortcut = markdownShortcut(before, { alone, takes: (type) => typeOf(host) !== type && typedTargets(host, alone).includes(type) });
|
|
40
|
+
if (shortcut) {
|
|
41
|
+
const { type, props } = shortcut;
|
|
42
|
+
// A space put between the marker and the text after it (autoSpace: "3" next to Chinese) goes with the marker.
|
|
43
|
+
const node = selection.anchorNode;
|
|
44
|
+
let end = selection.anchorOffset;
|
|
45
|
+
if (node.nodeType === 3 && !shortcut.alone) {
|
|
46
|
+
while (node.data[end] === " ") end++;
|
|
47
|
+
head.setEnd(node, end);
|
|
48
|
+
}
|
|
49
|
+
// What the shortcut sets (a numbered list's first number, a to-do checked): on the block it made, in the same step.
|
|
50
|
+
const then = Object.keys(props).length > 0 ? (block) => pageOfType(type).setProps(block, props) : null;
|
|
51
|
+
return convert(host, type, head, then);
|
|
52
|
+
}
|
|
53
|
+
if (data && /[*`]$/.test(data) && !can(host, "plain")) inlineShortcut(host, selection);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// "**text**" or "`text`" just closed at the caret, within one run of text: the markers go and
|
|
57
|
+
// the text between is bold or code; the caret goes on after it, outside the new element.
|
|
58
|
+
function inlineShortcut(host, selection) {
|
|
59
|
+
const node = selection.anchorNode;
|
|
60
|
+
if (node.nodeType !== 3 || node.parentElement.closest("code")) return;
|
|
61
|
+
const offset = selection.anchorOffset;
|
|
62
|
+
const found = inlineMark(node.data.slice(0, offset));
|
|
63
|
+
if (!found) return;
|
|
64
|
+
const before = ownHTML(host);
|
|
65
|
+
const marker = found.name === "bold" ? 2 : 1;
|
|
66
|
+
node.deleteData(offset - marker, marker);
|
|
67
|
+
node.deleteData(found.start, marker);
|
|
68
|
+
const range = document.createRange();
|
|
69
|
+
range.setStart(node, found.start);
|
|
70
|
+
range.setEnd(node, offset - 2 * marker);
|
|
71
|
+
const result = formatRange(host, range, found.name, true);
|
|
72
|
+
const end = result.endContainer.nodeType === 3 ? result.endContainer.parentElement : result.endContainer;
|
|
73
|
+
const mark = end.closest(found.name === "bold" ? "strong, b" : "code");
|
|
74
|
+
// Inline code stands a space apart from the words beside it (shared/inline-spacing.mjs spaceAround).
|
|
75
|
+
const spaces = found.name === "code" && mark && host.contains(mark) ? spaceAround(mark) : { after: null };
|
|
76
|
+
recordStep(host, before);
|
|
77
|
+
// The browser puts text typed at the end of an element into it, so what follows would be bold
|
|
78
|
+
// or code too: the caret goes into a pad after the element (pads.mjs), or after the space put
|
|
79
|
+
// there.
|
|
80
|
+
if (!mark || !host.contains(mark)) return select(result);
|
|
81
|
+
if (!spaces.after) return void padCaret(mark, "after");
|
|
82
|
+
const caret = document.createRange();
|
|
83
|
+
caret.setStart(spaces.after, 1);
|
|
84
|
+
select(caret);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return { typed };
|
|
88
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MARKDOWN } from "../../components/registry.mjs";
|
|
2
|
+
|
|
3
|
+
// What typed Markdown turns into (docs/editor.md, "New blocks and conversions"): pure functions of
|
|
4
|
+
// the text, tested without a browser (tests/unit/editor.mjs). index.mjs applies them as the reader
|
|
5
|
+
// types. A shortcut at a block's start is its type's (`markdown`), the inline marks are no block's.
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The shortcut `text`, all that stands before the caret in a block, is, the first in the order of the
|
|
9
|
+
* definitions (notion-lite's blockShortcut): its rule with what it sets (`props`), or null. alone:
|
|
10
|
+
* nothing else is written in the block, as a rule that says `alone` asks. takes(type): whether the
|
|
11
|
+
* block may become the type.
|
|
12
|
+
*/
|
|
13
|
+
export function markdownShortcut(text, { alone = false, takes = () => true } = {}) {
|
|
14
|
+
for (const rule of MARKDOWN) {
|
|
15
|
+
const match = rule.match.exec(text);
|
|
16
|
+
if (!match || (rule.alone && !alone) || !takes(rule.type)) continue;
|
|
17
|
+
const props = rule.props ? rule.props(match) : {};
|
|
18
|
+
if (props !== null) return { ...rule, props };
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Inline Markdown closed at the end of `text`: **bold** or `code`. Returns { name, start, end,
|
|
25
|
+
* inner } (offsets into text; inner excludes the markers), or null.
|
|
26
|
+
*/
|
|
27
|
+
export function inlineMark(text) {
|
|
28
|
+
const bold = /\*\*([^*\s](?:[^*]*[^*\s])?)\*\*$/.exec(text);
|
|
29
|
+
if (bold) return { name: "bold", start: bold.index, end: text.length, inner: [bold.index + 2, text.length - 2] };
|
|
30
|
+
const code = /`([^`\s](?:[^`]*[^`\s])?)`$/.exec(text);
|
|
31
|
+
if (code) return { name: "code", start: code.index, end: text.length, inner: [code.index + 1, text.length - 1] };
|
|
32
|
+
return null;
|
|
33
|
+
}
|