@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,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of the table column allocator (`DocTables.allocateColumnWidths`), kept here so that the
|
|
3
|
+
* SDK stands alone: the kit's own code takes them from this file.
|
|
4
|
+
*/
|
|
5
|
+
export type ColumnKind = 'compact' | 'narrative' | 'token-heavy';
|
|
6
|
+
export interface ColumnInput {
|
|
7
|
+
key: string;
|
|
8
|
+
header: string;
|
|
9
|
+
cells: Array<string | number | null | undefined>;
|
|
10
|
+
kind?: ColumnKind;
|
|
11
|
+
minWidth?: number;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
/** A column of numbers (the kit's numeric columns): its readable floor is never lowered by maxReadableFloor. */
|
|
14
|
+
numeric?: boolean;
|
|
15
|
+
/** Optional measured header width including padding/controls; supplied by the DOM adapter. */
|
|
16
|
+
headerWidth?: number;
|
|
17
|
+
/** Optional unwrapped widths including padding, aligned with cells; supplied by the DOM adapter. */
|
|
18
|
+
cellWidths?: number[];
|
|
19
|
+
/** Optional widths of the header's and each cell's longest word (WORD_BREAKS) including padding; supplied by the DOM adapter. */
|
|
20
|
+
headerWordWidth?: number;
|
|
21
|
+
cellWordWidths?: number[];
|
|
22
|
+
/** Optional widths of each cell's widest piece no line breaks in (PIECE_BREAKS, a number range) including padding; supplied by the DOM adapter. */
|
|
23
|
+
cellPieceWidths?: number[];
|
|
24
|
+
}
|
|
25
|
+
export interface ColumnLayout {
|
|
26
|
+
key: string;
|
|
27
|
+
kind: ColumnKind;
|
|
28
|
+
preferredWidth: number;
|
|
29
|
+
/** Readable floor: when their sum exceeds the viewport, scroll instead of compressing further. */
|
|
30
|
+
softMinWidth: number;
|
|
31
|
+
hardMinWidth: number;
|
|
32
|
+
width: number;
|
|
33
|
+
/** Relative to the allocated columns, which may exceed totalWidth at their readable floors. */
|
|
34
|
+
ratio: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ColumnWidthOptions {
|
|
37
|
+
/** Available table width, including cell padding. */
|
|
38
|
+
totalWidth: number;
|
|
39
|
+
percentile?: number;
|
|
40
|
+
hardMinWidth?: number;
|
|
41
|
+
narrativeMinWidth?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The most a column's readable floor may be, whatever its kind (a prose column's baseline and its
|
|
44
|
+
* three lines of P90 text, a path's, a short field's protected width alike), but a numeric
|
|
45
|
+
* column's; unset, no limit. On a narrow screen the kit passes a third of the table's room, so that
|
|
46
|
+
* a table of two or three columns wraps their text before it scrolls sideways.
|
|
47
|
+
*/
|
|
48
|
+
maxReadableFloor?: number;
|
|
49
|
+
tokenHeavyMinWidth?: number;
|
|
50
|
+
compactMaxProtectedWidth?: number;
|
|
51
|
+
cellPadding?: number;
|
|
52
|
+
columnOverhead?: number;
|
|
53
|
+
font?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Column widths from the cells' text: deterministic P90 + water filling, with scrolling at readable floors. */
|
|
56
|
+
export type AllocateColumnWidths = (columns: ColumnInput[], options: ColumnWidthOptions) => ColumnLayout[];
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cell of a table a chart is drawn from: null for an empty or missing cell, a dash or n/a; a number
|
|
3
|
+
* when it writes one number (12.5%, 3.6亿, 约 20; its data-sort-value first); else its words (a range,
|
|
4
|
+
* 3 / 4, a column whose header has data-sort-type "text" or "date"). references/writing-html.md says it in full.
|
|
5
|
+
*/
|
|
6
|
+
export type DocTableValue = number | string | null;
|
|
7
|
+
|
|
8
|
+
/** A row of that table: each value by its column's header words. */
|
|
9
|
+
export type DocTableRow = Record<string, DocTableValue>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The rows a chart drawn from a table (`data-doc-chart-data`) gets as `data`: its body rows in the
|
|
13
|
+
* file's order (<tfoot> left out), and its header's words in order (`columns`, as d3.csvParse gives).
|
|
14
|
+
*/
|
|
15
|
+
export interface DocTableRows extends Array<DocTableRow> {
|
|
16
|
+
columns: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** What a document's own chart type draws with (see `DocChartsApi.define`). */
|
|
20
|
+
export interface DocChartDrawContext<Data = any> {
|
|
21
|
+
/** The declared chart's host, emptied before each call (its data script stays). */
|
|
22
|
+
host: HTMLElement;
|
|
23
|
+
/** The declared JSON of this chart; for a chart drawn from a table (data-doc-chart-data), its rows (DocTableRows). */
|
|
24
|
+
data: Data;
|
|
25
|
+
/** Colors of the current theme. */
|
|
26
|
+
tokens: import("./doc-tokens.js").DocTokenSnapshot;
|
|
27
|
+
/** The host's width in px. */
|
|
28
|
+
width: number;
|
|
29
|
+
/** The card's plot height in px when it sets one (`--doc-chart-height`, e.g. from the preview); otherwise null. */
|
|
30
|
+
height: number | null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A chart of a document's own type. */
|
|
34
|
+
export interface DocDrawnChartHandle<Data = any> {
|
|
35
|
+
/** Draw again, with new data if given (a chart drawn from a table takes none: it draws its table). */
|
|
36
|
+
redraw(nextData?: Data): void;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** What a part of a document's own type is started with: the drawing context and its lifetime. */
|
|
41
|
+
export interface DocChartPartContext<Data = any> extends DocChartDrawContext<Data> {
|
|
42
|
+
/** Aborted when the part is destroyed (its host left the page): give it to addEventListener. */
|
|
43
|
+
signal: AbortSignal;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A part of a document's own type: something that keeps what it needs (listeners, timers, an
|
|
48
|
+
* animation) between drawings. `mount` starts it in the emptied host; `update` is called when its
|
|
49
|
+
* width, the theme or its card's height change (or a script redraws it, or the rows of its table
|
|
50
|
+
* change), `destroy` when its host leaves the page.
|
|
51
|
+
*/
|
|
52
|
+
export interface DocChartPart<Data = any> {
|
|
53
|
+
mount(context: DocChartPartContext<Data>): { update?(context: DocChartPartContext<Data>): void; destroy?(): void } | void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Charts are declared in their cards, each of a type the document's script defines:
|
|
58
|
+
* `<div data-doc-chart="slope"><script type="application/json">…its data…</script></div>`, or
|
|
59
|
+
* `<div data-doc-chart="slope" data-doc-chart-data="t1"></div>`, drawn from the rows of the table
|
|
60
|
+
* whose frame carries `data-doc-chart-source="t1"`.
|
|
61
|
+
*/
|
|
62
|
+
export interface DocChartsApi {
|
|
63
|
+
/**
|
|
64
|
+
* Define a chart type of the document's own, drawn from the data of each chart declared with it
|
|
65
|
+
* (its JSON, or its table's rows: DocTableRows). `type` is lowercase letters, digits and hyphens,
|
|
66
|
+
* a letter first (`interval`, `ci-plot`). `draw` is called again when a chart's width, the theme
|
|
67
|
+
* or its card's height change, and when its table's rows do; a part (`{ mount }`) keeps what it
|
|
68
|
+
* starts until its host leaves the page.
|
|
69
|
+
*/
|
|
70
|
+
define<Data = any>(type: string, draw: ((context: DocChartDrawContext<Data>) => void) | DocChartPart<Data>): void;
|
|
71
|
+
/** The chart drawn in a host; null if none. */
|
|
72
|
+
get(target: string | Element): DocDrawnChartHandle | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare global {
|
|
76
|
+
/** The rows a chart drawn from a table gets as `data`, for a document's script to type it with (JSDoc's `@type {DocTableRows}`). */
|
|
77
|
+
type DocTableRows = import("./doc-charts.js").DocTableRows;
|
|
78
|
+
/** A row of a table a chart is drawn from. */
|
|
79
|
+
type DocTableRow = import("./doc-charts.js").DocTableRow;
|
|
80
|
+
/** A cell's value of a table a chart is drawn from. */
|
|
81
|
+
type DocTableValue = import("./doc-charts.js").DocTableValue;
|
|
82
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Code blocks are <div class="doc-code"> holding their title and a <pre><code> (highlighted on
|
|
2
|
+
// their own); a diff is declared as <div class="doc-diff"> holding its title and these options as
|
|
3
|
+
// JSON, its header showing the lines added and removed.
|
|
4
|
+
export interface CodeViewOptions {
|
|
5
|
+
code: string;
|
|
6
|
+
/** Overrides path inference; unknown languages render as plain text. */
|
|
7
|
+
language?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
/** Default true. Copying excludes the gutter. */
|
|
10
|
+
showLineNumbers?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface DiffLineData {
|
|
13
|
+
type: 'added' | 'removed' | 'unchanged';
|
|
14
|
+
content: string;
|
|
15
|
+
/** Optional positive integer; omitted numbers leave a blank gutter. */
|
|
16
|
+
lineNumber?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DiffViewOptions extends Omit<CodeViewOptions, 'code'> {
|
|
19
|
+
lines: DiffLineData[];
|
|
20
|
+
/** Default true. */
|
|
21
|
+
coloredLineNumbers?: boolean;
|
|
22
|
+
/** Default true. */
|
|
23
|
+
showAccentStrip?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
/** gallery check's alone (no such function on the page): a declared diff's JSON (`<div class="doc-diff">`) as its options. */
|
|
27
|
+
function __declaredDiff(options: DiffViewOptions): void;
|
|
28
|
+
}
|
package/sdk/doc-kit.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { DocState } from "./doc-state.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What an instance can hear (`on`). `editable`: `context.canEdit()` has just become true, for one mounted before the page came to edit.
|
|
5
|
+
* `content`: a change inside the instance, heard only with `owns: false`, as what a component owns the
|
|
6
|
+
* kit does not watch; a change of what the file says of it is `source`, whatever it owns.
|
|
7
|
+
*/
|
|
8
|
+
export type DocComponentSignal = "source" | "resize" | "theme" | "layout" | "viewport" | "fonts" | "content" | "reveal" | "editable";
|
|
9
|
+
|
|
10
|
+
/** What a component's `mount` returns, all of it optional. */
|
|
11
|
+
export interface DocComponentHandle {
|
|
12
|
+
/**
|
|
13
|
+
* A signal it asked for (`on`). `detail`: the mutation records of `source` and `content`; the faces of a
|
|
14
|
+
* later `fonts`. `options.quiet`: on `content`, a change that leaves the page looking as it was.
|
|
15
|
+
*/
|
|
16
|
+
update?(reason: DocComponentSignal, detail?: unknown, options?: { quiet?: boolean }): void;
|
|
17
|
+
/** The host left the page. What listens on `context.signal` goes by itself. */
|
|
18
|
+
destroy?(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface DocComponentStateOptions<T extends Record<string, unknown>> {
|
|
22
|
+
/** Positive integer. A state of another version, or defaults of another shape, under this instance's name throws: see `DocStateFactory.getOrCreate`. */
|
|
23
|
+
version: number;
|
|
24
|
+
/** JSON-serializable default state. */
|
|
25
|
+
defaults: T;
|
|
26
|
+
/** Default: []; excluded from browser restoration and exported snapshots. */
|
|
27
|
+
transientKeys?: Array<keyof T & string>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** What `mount` is given for a package's instance. */
|
|
31
|
+
export interface DocComponentContext {
|
|
32
|
+
/** The instance's element. */
|
|
33
|
+
readonly host: HTMLElement;
|
|
34
|
+
/** Aborts when the instance ends: give it to what the component listens to. */
|
|
35
|
+
readonly signal: AbortSignal;
|
|
36
|
+
/**
|
|
37
|
+
* Run `draw` in the frame the kit draws in, once: of what is asked before that frame, the last `draw`
|
|
38
|
+
* runs. Asked from inside a `draw` it runs in the next frame; a chain of those is an animation, which
|
|
39
|
+
* the page does not wait for to count as drawn. Nothing runs once the instance has failed.
|
|
40
|
+
*/
|
|
41
|
+
frame(draw: () => void): void;
|
|
42
|
+
/** Say this instance failed: it ends there, even as `mount` runs, and shows what it holds, read-only. */
|
|
43
|
+
fail(error: unknown): void;
|
|
44
|
+
/** The first element of a part of the manifest, or null. A name the manifest does not have throws. */
|
|
45
|
+
part(name: string): HTMLElement | null;
|
|
46
|
+
/** This instance's reading state, of no other instance of the package: the same object at every mount. */
|
|
47
|
+
state<T extends Record<string, unknown>>(options: DocComponentStateOptions<T>): DocState<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Whether `edit` writes to the file now. False until the page comes to edit (the `editable` signal
|
|
50
|
+
* says when, for one that asked), and for good in an exported file and its PDF, in 演示视图, for an
|
|
51
|
+
* instance that failed and for one whose `data-doc-schema` is past its manifest's `schema`.
|
|
52
|
+
*/
|
|
53
|
+
canEdit(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Change a part edited as data, whose name its manifest gives: `change` is handed a draft of the part
|
|
56
|
+
* (its first element, off the page) and changes what it holds, at once. Returns whether that was taken:
|
|
57
|
+
* then it stands on the page, one undo step, and the file follows by itself, as for any edit. False
|
|
58
|
+
* while `canEdit()` is false, and where `change` throws, writes the part on the page instead of the
|
|
59
|
+
* draft, or leaves what a file cannot hold (a script, a handler, an element that does not read back as
|
|
60
|
+
* itself, its own tag changed): nothing has happened then, and the console says why. Undo puts the
|
|
61
|
+
* part back and `source` tells you, like any change of it. A name the manifest does not have, or a
|
|
62
|
+
* part not edited as data, throws. A list of names changes those parts in one write, one undo step (a
|
|
63
|
+
* gesture that moves a card and counts the move): `change` is handed a draft of each, by its name, and
|
|
64
|
+
* two that are one element, or one in the other, throw.
|
|
65
|
+
*/
|
|
66
|
+
edit<P extends string | string[]>(part: P, change: (draft: P extends string[] ? Record<string, HTMLElement> : HTMLElement) => void): boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** What a package's kit.js registers. */
|
|
70
|
+
export interface DocComponent {
|
|
71
|
+
/** The package's id, as its manifest writes it: <scope>/<name>. */
|
|
72
|
+
id: string;
|
|
73
|
+
/** The signals `update` is to hear. */
|
|
74
|
+
on?: DocComponentSignal[];
|
|
75
|
+
/** Default: true. The kit watches nothing the component draws in its instance, but what its parts edit as text or data. */
|
|
76
|
+
owns?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Starts an instance, a thrown error or a promise rejected being that instance's failure alone: it
|
|
79
|
+
* shows what it holds, read-only, and the page goes on. Called again on a node an undo puts back and
|
|
80
|
+
* in an exported file: the kit takes off `dehydrate`'s and the manifest's `runtime`'s first.
|
|
81
|
+
*/
|
|
82
|
+
mount(host: HTMLElement, context: DocComponentContext): DocComponentHandle | void | Promise<DocComponentHandle | void>;
|
|
83
|
+
/**
|
|
84
|
+
* Takes off of `host` what `mount` left and the manifest's `runtime` does not name. It may be given a
|
|
85
|
+
* host with none of it: an error it throws is told on the console, and `mount` goes on.
|
|
86
|
+
*/
|
|
87
|
+
dehydrate?(host: HTMLElement): void;
|
|
88
|
+
/**
|
|
89
|
+
* A small edit, as a reader's gesture would make it, by `context.edit`: what `gallery component check`
|
|
90
|
+
* calls to try the way back to the file. Nothing else calls it.
|
|
91
|
+
*/
|
|
92
|
+
example?(host: HTMLElement, context: DocComponentContext): void;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare global {
|
|
96
|
+
/** What `mount` is given, for a package's kit.js to name it with (JSDoc's `@param {DocComponentContext} context`), with no import. */
|
|
97
|
+
type DocComponentContext = import("./doc-kit.js").DocComponentContext;
|
|
98
|
+
/** What `mount` returns. */
|
|
99
|
+
type DocComponentHandle = import("./doc-kit.js").DocComponentHandle;
|
|
100
|
+
/** A signal `update` hears. */
|
|
101
|
+
type DocComponentSignal = import("./doc-kit.js").DocComponentSignal;
|
|
102
|
+
/** What kit.js registers. */
|
|
103
|
+
type DocComponent = import("./doc-kit.js").DocComponent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** How much the kit runs now. */
|
|
107
|
+
export interface DocKitStats {
|
|
108
|
+
/** Instances alive, by component. */
|
|
109
|
+
live: Record<string, number>;
|
|
110
|
+
mounted: number;
|
|
111
|
+
destroyed: number;
|
|
112
|
+
failed: number;
|
|
113
|
+
components: string[];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** The kit's runtime: every component instance on the page. */
|
|
117
|
+
export interface DocKitApi {
|
|
118
|
+
/** Register a component. An id registered already throws. */
|
|
119
|
+
component(definition: DocComponent): unknown;
|
|
120
|
+
/** What Gallery says of a package; generated, never written by hand. */
|
|
121
|
+
describe(description: { id: string; [field: string]: unknown }): void;
|
|
122
|
+
/** What is known of a component: where its instances are and its parts, or null. */
|
|
123
|
+
description(id: string): { id: string; [field: string]: unknown } | null;
|
|
124
|
+
/** Start what `root` holds now, as if it had been added. */
|
|
125
|
+
mount(root?: ParentNode): void;
|
|
126
|
+
/** End the instance on `host`. */
|
|
127
|
+
destroy(host: Element): void;
|
|
128
|
+
/** Run a change that leaves the page looking as it was. */
|
|
129
|
+
quietly<T>(change: () => T): T;
|
|
130
|
+
/** Take what the kit and its components left off `root`, a copy of the page. */
|
|
131
|
+
dehydrate<T extends Element>(root: T): T;
|
|
132
|
+
/** The component on `host` makes its `example` of an edit, as `gallery component check` asks it. Whether it has one. */
|
|
133
|
+
example(host: Element): boolean;
|
|
134
|
+
/** Open what hides an element, and bring it into view. */
|
|
135
|
+
reveal(element: Element): void;
|
|
136
|
+
stats(): DocKitStats;
|
|
137
|
+
/** The keys of the page's bound controls. */
|
|
138
|
+
readonly bindings: unknown;
|
|
139
|
+
/** The selectors of the elements blocks stand in. */
|
|
140
|
+
readonly flows: readonly string[];
|
|
141
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A Sheet area: the tab it shows. */
|
|
2
|
+
export interface DocSheetsHandle {
|
|
3
|
+
get(): string;
|
|
4
|
+
set(tab: string): void;
|
|
5
|
+
destroy(): void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Sheet areas start on their own (`<section class="doc-sheet-shell" data-doc-sheets="name">`,
|
|
10
|
+
* its tab kept under its name); a script may ask one which tab it shows, or show another.
|
|
11
|
+
*/
|
|
12
|
+
export interface DocSheetsApi {
|
|
13
|
+
/** The area a selector or element finds; null before it has started. */
|
|
14
|
+
get(target: string | Element): DocSheetsHandle | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type DocStateChange =
|
|
2
|
+
| { type: "set"; key: string }
|
|
3
|
+
| { type: "update"; keys: string[] }
|
|
4
|
+
| { type: "reset" }
|
|
5
|
+
| { type: "hydrate" };
|
|
6
|
+
|
|
7
|
+
export interface DocState<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly version: number;
|
|
10
|
+
get<K extends keyof T>(key: K, fallback?: T[K]): T[K];
|
|
11
|
+
snapshot(): T;
|
|
12
|
+
set<K extends keyof T>(key: K, value: T[K]): void;
|
|
13
|
+
update(values: Partial<T>): void;
|
|
14
|
+
/** Restore defaults and save them, so an older embedded snapshot cannot reappear. */
|
|
15
|
+
reset(): void;
|
|
16
|
+
subscribe(listener: (snapshot: T, change: DocStateChange) => void): () => void;
|
|
17
|
+
serialize(): string;
|
|
18
|
+
hydrate(serialized: string): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface DocStateOptions<T extends Record<string, unknown>> {
|
|
22
|
+
/** The state's name within this document, such as "view". Storage is kept per document (its data-doc-id), so "view" and "<slug>:view" name the same state. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Positive integer checked against stored/embedded snapshots. */
|
|
25
|
+
version: number;
|
|
26
|
+
/** JSON-serializable default state; reuse one instance per id/version. */
|
|
27
|
+
defaults: T;
|
|
28
|
+
/** Overrides the browser storage key; normally left out. */
|
|
29
|
+
storageKey?: string;
|
|
30
|
+
/** Default: []; excluded from browser restoration and exported snapshots. */
|
|
31
|
+
transientKeys?: Array<keyof T & string>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DocStateFactory {
|
|
35
|
+
readonly schemaVersion: 1;
|
|
36
|
+
/** Throws when the state exists already: one id and version is one state. */
|
|
37
|
+
create<T extends Record<string, unknown>>(options: DocStateOptions<T>): DocState<T>;
|
|
38
|
+
/** The state of this id: the one made already when its version and the shape of its defaults are these, a new one when there is none, and an error otherwise. */
|
|
39
|
+
getOrCreate<T extends Record<string, unknown>>(options: DocStateOptions<T>): DocState<T>;
|
|
40
|
+
serializeAll(): string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AllocateColumnWidths, ColumnLayout } from "./column-widths.js";
|
|
2
|
+
export type { AllocateColumnWidths, ColumnInput, ColumnKind, ColumnLayout, ColumnWidthOptions } from "./column-widths.js";
|
|
3
|
+
export type DocSortDirection = "asc" | "desc";
|
|
4
|
+
export type DocSortType = "number" | "text" | "date";
|
|
5
|
+
|
|
6
|
+
export interface DocTableSortDetail {
|
|
7
|
+
column: number;
|
|
8
|
+
key: string | null;
|
|
9
|
+
direction: DocSortDirection;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface DocTableState {
|
|
13
|
+
/** null restores original row order. */
|
|
14
|
+
sort: { column: number; direction: DocSortDirection; key?: string | null } | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DocTablesApi {
|
|
18
|
+
allocateColumnWidths: AllocateColumnWidths;
|
|
19
|
+
/** Remeasure a table now. Hidden tables wait until visible; returns the last layout or []. */
|
|
20
|
+
layout(target: string | HTMLTableElement): ColumnLayout[];
|
|
21
|
+
getState(target: string | HTMLTableElement): DocTableState;
|
|
22
|
+
setState(target: string | HTMLTableElement, state: DocTableState): void;
|
|
23
|
+
subscribe(target: string | HTMLTableElement, listener: (state: DocTableState) => void): () => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DocTokenSnapshot {
|
|
2
|
+
readonly tone: (name: "success" | "danger" | "warning" | "info" | "neutral" | "accent" | "muted" | "text" | "border") => string;
|
|
3
|
+
readonly css: (name: string, fallback?: string) => string;
|
|
4
|
+
readonly bg: string;
|
|
5
|
+
readonly surface: string;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly muted: string;
|
|
8
|
+
readonly border: string;
|
|
9
|
+
readonly grid: string;
|
|
10
|
+
readonly accent: string;
|
|
11
|
+
readonly accentSoft: string;
|
|
12
|
+
readonly success: string;
|
|
13
|
+
readonly warning: string;
|
|
14
|
+
readonly danger: string;
|
|
15
|
+
readonly series: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface DocTokensApi {
|
|
19
|
+
readonly read: (element?: Element) => DocTokenSnapshot;
|
|
20
|
+
readonly seriesNames: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
|
package/sdk/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DocChartsApi } from "./doc-charts.js";
|
|
2
|
+
import type { DocDialogsApi } from "./doc-dialogs.js";
|
|
3
|
+
import type { DocKitApi } from "./doc-kit.js";
|
|
4
|
+
import type { DocMathApi } from "./doc-math.js";
|
|
5
|
+
import type { DocStateFactory } from "./doc-state.js";
|
|
6
|
+
import type { DocSheetsApi } from "./doc-sheets.js";
|
|
7
|
+
import type { DocTablesApi } from "./doc-tables.js";
|
|
8
|
+
import type { DocTokensApi } from "./doc-tokens.js";
|
|
9
|
+
|
|
10
|
+
declare global {
|
|
11
|
+
var DocCharts: DocChartsApi;
|
|
12
|
+
var DocDialogs: DocDialogsApi;
|
|
13
|
+
var DocKit: DocKitApi;
|
|
14
|
+
var DocMath: DocMathApi;
|
|
15
|
+
var DocState: DocStateFactory;
|
|
16
|
+
var DocSheets: DocSheetsApi;
|
|
17
|
+
var DocTables: DocTablesApi;
|
|
18
|
+
var DocTokens: DocTokensApi;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export * from "./doc-charts.js";
|
|
22
|
+
export * from "./doc-dialogs.js";
|
|
23
|
+
export * from "./doc-kit.js";
|
|
24
|
+
export * from "./doc-math.js";
|
|
25
|
+
export * from "./doc-state.js";
|
|
26
|
+
export * from "./doc-sheets.js";
|
|
27
|
+
export * from "./doc-tables.js";
|
|
28
|
+
export * from "./doc-tokens.js";
|
|
29
|
+
|
|
30
|
+
export * from "./doc-code.js";
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gallery
|
|
3
|
+
description: "Gallery: turn supplied materials into a polished, interactive HTML document whose claims and numbers trace back to them (experiment and project write-ups, research findings, meeting summaries, explainers, comparisons), with charts, tables and formulas where they help. The user edits it in the browser as you write it and gets one offline HTML file. Use when the user asks for Gallery (or $gallery); not for general front-end development."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Gallery
|
|
7
|
+
|
|
8
|
+
Create a self-contained HTML document whose claims, numbers, and visual encodings can be traced back to the supplied materials. You write it as an ordinary web page. Gallery's command, `gallery`, turns it into the kit's blocks, checks it and exports it as one offline file; meanwhile the user can watch and edit it in the browser.
|
|
9
|
+
|
|
10
|
+
## Before anything: the gallery command
|
|
11
|
+
|
|
12
|
+
This skill holds the instructions; the tools are the npm package `@heycys/gallery`, the `gallery` command. This skill needs `@heycys/gallery` ^0.1.0: a version npm's range `^0.1.0` takes, 0.1.0 or a later 0.1.x.
|
|
13
|
+
|
|
14
|
+
1. Run `gallery --version`. When it prints such a version, go on to step 3.
|
|
15
|
+
2. When `gallery` is not found, or prints a version older than `^0.1.0` takes, install it with `npm i -g @heycys/gallery@^0.1.0`, then run `gallery --version` again. When the user has already said to install it (in this request or earlier in the conversation), run it without asking again; otherwise ask the user before you install anything: say that Gallery's command is missing (or which version it is) and that you would run that command, and run it once they agree.
|
|
16
|
+
- When it prints a version newer than `^0.1.0` takes, install nothing (that would take Gallery back to an older version): tell the user this skill is older than their Gallery and ask them to run `gallery skill install` (with `--project` when the skill is the project's, in its `.claude/skills/`), then to start a new Agent session, which reads the new skill.
|
|
17
|
+
- No Node, or `node --version` older than 22.13: tell the user to install the current LTS from https://nodejs.org (or with their system's package manager), then start again.
|
|
18
|
+
- npm says `EACCES` (macOS and Linux, where npm's global folder belongs to the system): never use `sudo`. Tell the user, and offer either of these: give npm a folder of their own (`npm config set prefix ~/.npm-global`, add `~/.npm-global/bin` to `PATH` in their shell profile, open a new terminal, install again); or run every command as `npx -y @heycys/gallery@^0.1.0 <command> …` instead of `gallery <command> …`.
|
|
19
|
+
- Use `npx -y @heycys/gallery@^0.1.0 <command> …` likewise wherever a global install is not allowed (a sandbox, CI). It is slower: a few seconds more per command.
|
|
20
|
+
- On Windows, `gallery` works in PowerShell right after the install, in the same terminal. Only when PowerShell says running scripts is disabled (`gallery.ps1`): run `gallery.cmd` with the same arguments, or ask the user to run `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` once.
|
|
21
|
+
- After an upgrade, run `gallery open --no-browser` once: the server of the version before stops by itself, and this starts the new one. Tell the user that `gallery skill install` brings this skill to the new version too (an Agent session started after it reads it).
|
|
22
|
+
3. The documents live in a workspace, a folder: `--workspace <dir>` (every command takes it), else `GALLERY_WORKSPACE`, else the nearest folder up from the current one holding `gallery.json`, else `Gallery` in the user's Documents folder, `~/Documents/Gallery` (made on first use; on Windows the Documents folder Explorer shows, OneDrive's when OneDrive backs it up). `gallery new`, `gallery import`, `gallery list` and `gallery open` print it as `工作区:<path>`. When a command prints `Cannot write the workspace <path> (…)` (a sandbox that allows writes only in the project, or a system that has not let the terminal into Documents), ask the user to allow Gallery to write there, or pass `--workspace <a folder in the project>` to every command.
|
|
23
|
+
4. The browser service: `gallery new` and `gallery import` start the workspace's local server (or use the one running) and open the user's browser at the document, `gallery open [<slug>]` starts or reuses it and opens the user's browser (each takes `--no-browser`: the address without a tab), and each prints the address on its `交给用户` line: give it to the user all the same (the browser opened may not be Chrome or Edge, or not in front of them). Editing in the browser and `gallery qa` need Chrome or Edge. In a cloud sandbox the user cannot reach (`127.0.0.1` there is not their computer), skip the address: hand over the exported file instead. `gallery stop` stops the server (`Stopped the server on port …`, or `No Gallery server runs for <workspace>.`).
|
|
24
|
+
5. Every command but `gallery serve` returns by itself, the server's included (it runs on after the command; `gallery serve` runs it in the foreground, for the user's own terminal: you start it with `gallery open --no-browser`): run each in the foreground, with no `timeout` wrapper, background job or `Start-Process`. When you ask the user to allow commands, `gallery *` covers them all (`gallery.cmd *` in PowerShell). In Windows PowerShell 5.1, give a command no `2>&1` (it makes its warnings errors) and read files with the file tool or `Get-Content -Encoding UTF8`. Resolve `references/` and `sdk/` from the folder holding this `SKILL.md`.
|
|
25
|
+
|
|
26
|
+
**写作偏好** (`<workspace>/preferences.md`) holds the user's rules for writing a document: what to write and in what order, the opening summary, titles, fidelity to the materials, evidence and data. Read it before you write and follow it. When instructions differ, the user's request comes first, then 写作偏好, then this skill. Only the user changes 写作偏好: never edit it unless asked, and never write `"instructions": true` in a document's `doc.json` (it marks the page holding 写作偏好). Where 写作偏好 says `report.json`, a document made by Gallery 0.1 or later has `doc.json`; an older one keeps `report.json`.
|
|
27
|
+
|
|
28
|
+
A document has one writer at a time: never let two Agents, or an Agent and a script, write the same `doc.html` at once. The user may edit it in the browser meanwhile; Gallery merges their edits with yours.
|
|
29
|
+
|
|
30
|
+
A document is the folder `<workspace>/<slug>/`: `doc.html`, the page you write, and `doc.json`, its title and description. Documents link to each other by ordinary relative links between these files (`../<slug>/doc.html`: writing-html.md). A document made before Gallery 0.1 has `report.html` and `report.json` instead: write those (Gallery reads and writes them under their names; never rename them). Below, `doc.html` and `doc.json` stand for either.
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
1. Read 写作偏好 before anything else. When `<workspace>/preferences.md` is not there yet, `gallery new` (step 2) makes it from Gallery's defaults and prints its path (`gallery import` and `gallery list` print it too; `gallery open` does not): read it then, before you write. When `gallery new` prints `写作偏好:空`, the user emptied it: write from the request, this skill and the materials, and leave the file as it is.
|
|
35
|
+
2. Create the document as soon as you know its title: `gallery new <slug> "<title>" "<description>"` (a lowercase kebab-case slug).
|
|
36
|
+
- It prints where it wrote, the workspace, the path of 写作偏好 and the next steps, starts the browser service (or uses the one running), and ends with its `交给用户` line: the address where the user watches and edits the document (step 3). The line before it, the page alone, is yours.
|
|
37
|
+
- If the server could not start, it says why; once that is fixed, `gallery open <slug>` starts it and prints the address.
|
|
38
|
+
- The page renders straight from `doc.html`, reloads on every save, notes failing checks at its bottom left, and lets the user edit the document in place ([Revising a document](#revising-a-document)).
|
|
39
|
+
- When 写作偏好 asks for another title or description than the ones you gave, change them (the `h1` in `doc.html`, the description in `doc.json`).
|
|
40
|
+
- When the material is a file to be turned into the document (Markdown, HTML, Word, PDF, CSV, EPUB, or a ZIP of pages), create it with `gallery import <file> [<slug> ["<title>"]]` instead (it says the same, and what of the file it could not bring, by line), then edit what it made.
|
|
41
|
+
3. Now, before you read further, send the user the address from the `交给用户` line in a message of its own, in the user's language: they watch the document being written there. In a cloud sandbox they cannot reach, skip it.
|
|
42
|
+
4. Write `<workspace>/<slug>/doc.html` as ordinary HTML, replacing the starter section.
|
|
43
|
+
- Read [references/example-report.html](references/example-report.html) first: a catalogue of every block once, each written the way the tools read it, its words saying what the block is; take the blocks you need. Then read [references/writing-html.md](references/writing-html.md), whole.
|
|
44
|
+
- Write so that the user watches the document grow: as soon as you can outline it, replace the starter section with its skeleton (the opening summary's place and each section's heading), then write it a section at a time, one edit each. The page shows each save; one write of the whole document at the end leaves the user looking at the starter page until then.
|
|
45
|
+
- Materials can be large: list a folder before you read in it, and read what the document needs; no `du` or glob over a whole disk or tree.
|
|
46
|
+
- Take numbers and conclusions from the materials themselves: a summary of them, a subagent's too, is a lead to check, not a source.
|
|
47
|
+
- The document's data stays in `doc.html`. Its pictures and files go right in `<workspace>/<slug>/assets/` (writing-html.md's [Pictures](references/writing-html.md#pictures) says how to name and size them). Raw inputs that should travel with it go in `<workspace>/<slug>/materials/`.
|
|
48
|
+
5. Export, check and look:
|
|
49
|
+
- `gallery export <slug>` makes the plain HTML of `doc.html` the kit's markup, gives every block its `data-block-id`, checks the document and writes the deliverable `<workspace>/exports/<slug>.html` ([what its lines mean](#what-the-commands-print)).
|
|
50
|
+
- `gallery qa <slug>` exports first when needed, opens the export in Chrome or Edge at 1024, 736 and 360px (every disclosure, Sheet panel and detail card in turn), prints each failure and warning with its place in the document's file (`doc.html:<line>`, `report.html:<line>` in an older document), and pictures what it flags and, in a plain run, up to 12 blocks (what you changed first, then the cards; a `--blocks` run pictures every block it names) in the folder its `Pictures of this run in <path>` line names (a run with nothing to picture, no block changed and no card, says so in its verdict and names the `--tiles` run to make instead). Read its whole output (the verdict comes last, then the deliverable's line) and look at the pictures: `changed/` holds what you changed or moved; `cards/` the cards no look has pictured yet, your own drawings, charts and components first, tables last (not your edits); `blocks/` and `tiles/` what you ask for with `gallery qa <slug> --blocks a,b` or `--tiles` (the whole page, each panel and card). A picture shows all an element draws: a mark cut at its edge is cut on the page too.
|
|
51
|
+
- Open at least every picture of `flagged/` and of `changed/`, at each width, then those of `cards/` that show what you drew yourself (your charts, drawings and flowcharts); open the rest as the document needs. In the handoff name the pictures you opened: a width or a block whose pictures you did not open is not one you looked at.
|
|
52
|
+
- Each run empties only its own folders before it pictures: `flagged/` every run; `changed/` and `cards/` a plain run; `blocks/` a `--blocks` run; `tiles/` a `--tiles` run. Open a run's pictures before you run the same kind again.
|
|
53
|
+
- After your last edit, run a plain `gallery qa <slug>`; then, when a line of it says `not pictured` and gives a `gallery qa <slug> --blocks …` command (blocks past a run's twelve, at a list's end; or blocks a tall moved block holds that none of its pictures showed at a width, `N of them not pictured at 360px: …`), run that command too, not instead of it. A `--blocks` run pictures the blocks named alone: its `Not pictured by this run …` line, before the verdict, names the changed blocks and the cards it left, which a plain run pictures.
|
|
54
|
+
- In the pictures, fix what reads badly though nothing flagged it, such as a single character alone on a line (a heading's or a label's last character wrapped), a line or a mark drawn through text, or one cell or metric left alone on a row of a grid.
|
|
55
|
+
- To fix what either finds, re-read what the `Re-read` line names, change `doc.html` (never a generated file) and run `gallery qa` again until nothing fails.
|
|
56
|
+
- Exit 3 is one of two things. `UNVERIFIED <why>: nothing was looked at`: there is no Chrome or Edge, or the one installed did not start (qa tries it twice, with a fresh profile each time). When a browser is installed, run `gallery qa` once more; if it says `UNVERIFIED` again, or there is none, look at the export at those widths yourself, its disclosures and detail cards opened (the page does not scroll sideways, only tables and formula blocks do; no label of a chart or a drawing is clipped, overlaps another or reads under 11px; leave the controls at its top right alone unless the user asks), and say so in the handoff. Or a verdict `nothing failed …; not verified at N places`, with an `UNVERIFIED` line for each place (a wait that ran out, a detail card that did not open, a Sheet panel that stayed hidden, a picture not taken): the rest was looked at; run `gallery qa` once more, then look yourself only at the places those lines name, and say so in the handoff.
|
|
57
|
+
- `gallery check <slug>` runs the checks alone and changes nothing.
|
|
58
|
+
|
|
59
|
+
## What the commands print
|
|
60
|
+
|
|
61
|
+
Paths are absolute, as this system writes them: use them as they are.
|
|
62
|
+
|
|
63
|
+
| Line | Means |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `工作区:<path>` | the workspace the command worked in (`gallery new`, `gallery import`, `gallery list`, `gallery open`, `gallery init`) |
|
|
66
|
+
| `写作偏好:…(<path>)` | where 写作偏好 is (`gallery new`, `gallery import`, `gallery list`): read it before you write (`空`: the user emptied it) |
|
|
67
|
+
| `交给用户(…):<address>` | the address where the user watches and edits the document: send it to them now, in a message of its own (`gallery new`, `gallery import`, `gallery open`), and again in the handoff |
|
|
68
|
+
| `Agent 自用(…):<address>` | the document's page alone, editable, with no frame: yours (to try a component in), not for the user |
|
|
69
|
+
| `Wrote: …`, `Undone: …`, `Kept (--keep): …` | `gallery component try`'s: what the gesture wrote to `doc.html`, each part of the instance with the lines it took out and put in, and that one Ctrl+Z gave the file back (`--keep`: the write left); `Picture of the instance after the …` names a picture to open; a `note` line asks what the check's do. In the handoff name each gesture tried and what it wrote |
|
|
70
|
+
| `gallery component try`'s exit code | 0 the gesture wrote and one Ctrl+Z took it back · 1 a problem of the package's (a gesture that wrote nothing, said with what came of it; an undo that left part of the write): fix it, check it, try again; or a `FAIL` saying `doc.html` holds what the gesture wrote, the trial cut off after it: put that back yourself, `doc.html` read again first · 2 a mistake in the command (a selector that finds nothing: the line lists the classes the instance shows) · 3 `UNVERIFIED`, the trial not seen through (no browser or server, a card waiting for the reader, someone else's write meanwhile) and nothing of the gesture left in `doc.html`, its line saying what the file holds: run it once more |
|
|
71
|
+
| `This workspace's Gallery server runs on port …` | the server started or reused: nothing to wait for or keep running |
|
|
72
|
+
| `Preview: not started …` | no server, so no `交给用户` address: run `gallery open <slug> --no-browser` and give the user the address it prints (not in a cloud sandbox they cannot reach) |
|
|
73
|
+
| `Next: …`, `Hand in: …` | the steps after `gallery new` or `gallery import`: follow them |
|
|
74
|
+
| `Cannot write the workspace <path> (…)` | ask the user to allow it, or pass `--workspace <a folder you may write>` |
|
|
75
|
+
| `FAIL <slug>: N problems` | the checks failed, nothing exported (exit 1): fix each |
|
|
76
|
+
| `OK <slug>`, `Checked N documents: …` | `gallery check`'s tally: those passed |
|
|
77
|
+
| `fix …` | act on it (a path of this machine, a heavy picture) |
|
|
78
|
+
| `note …` | advice, never a failure |
|
|
79
|
+
| `note … kept by the script: .x` | your script selects that block by these names, so the user cannot delete or convert it: rename a class or id the script does not select it by |
|
|
80
|
+
| `icon … the page's header none` | write the icon in the header, or take `icon` out of `doc.json` |
|
|
81
|
+
| `Re-read <files> …` | the tools wrote these: re-read exactly them before editing |
|
|
82
|
+
| `preview …`, `annotations …` | said once: which of your plain HTML the browser page made the kit's markup (never the user's edits); 批注 Gallery's server deleted, their words gone from the blocks they are on (`gallery export`, `gallery check` and `gallery qa` say it right after the write) |
|
|
83
|
+
| `交给用户(离线文件):<path>` | the deliverable (the export's last line; qa's last lines, after its verdict) |
|
|
84
|
+
| `natural <file>: … rewritten in this file as the kit's markup` | the export rewrote those elements of `doc.html`, by line, into the kit's markup (a `<pre>` became `div.doc-code`, its `language-x` moved to `data-language`): nothing to fix, but the file is not what you wrote: re-read it, as the `Re-read` line names it, before you edit it (from `gallery check`: `not rewritten yet`, the export will). The indented lines under it say, by line, what the conversion did with an element (`line 12, code: tabindex kept on its <pre>`): nothing to fix, unless a line says what to write |
|
|
85
|
+
| `Exported <path> …` and other `title`, `icon`, `ids` lines | what the export did (or, from `gallery check`, will do): nothing to do |
|
|
86
|
+
| `chart …` | how a chart drawn from a table reads it (its rows, each column numbers or words): nothing to do |
|
|
87
|
+
| qa `FAIL` · `WARN` · `INFO` | fix it · look at its picture and fix what reads badly, never cutting words or columns · nothing to do |
|
|
88
|
+
| qa `UNVERIFIED <why>: nothing was looked at` · an `UNVERIFIED` line among the findings | nothing looked at: run qa once more, then look at the export yourself and say so · that place alone not looked at (the rest was): run qa once more, then look yourself at that place and say so |
|
|
89
|
+
| `Not pictured by this run …` | a `--blocks` run's: blocks changed and cards it did not picture (with `no earlier look`, every card outside those named); the plain `gallery qa <slug>` it names pictures them |
|
|
90
|
+
| `gallery qa`'s exit code | 0 nothing failed (warnings may remain) · 1 a failure, or the export it ran first failed · 2 an export missing or stale with `--no-export`, or `--blocks` naming an id the document has not (nothing looked at, no picture removed: name ids as qa printed them) · 3 something not verified: nothing at all (`UNVERIFIED <why>`: no Chrome or Edge, or one that did not start), or the places its `UNVERIFIED` lines name |
|
|
91
|
+
| qa's lines per width (`1024px fail 0 · …`) | what that look found; `1024×768` is the 1024px page in a shorter window |
|
|
92
|
+
|
|
93
|
+
## Revising a document
|
|
94
|
+
|
|
95
|
+
When the user names a document by its title or topic, find it with `gallery list <words>` (words of its title or topic; `gallery list` alone lists every document, the one edited last first): it prints each document's slug, title, description, address, last edit and file. An address the user gives (`http://127.0.0.1:<port>/#<title words>-<page id>`, the workbench's address bar or 复制块链接, `/<block id>` after it for a block) names its document by the id at its end, and the words before it may be out of date: `gallery list <address>` prints that document, or says it is in the trash, and every command that takes a slug takes the address, or the link after its `#`, as well. The id comes from the folder's name, so an address from another workspace can name this workspace's folder of that name: before you change anything, compare the title `gallery list <address>` prints, and its `工作区:` line, with what the user means. A path the user gives (the workbench's 复制底稿路径 copies one) is that document's `doc.html`; its folder's name is its slug, the folder holding it the workspace (pass it as `--workspace` when it is not the one the commands find).
|
|
96
|
+
|
|
97
|
+
Before you change anything, run `gallery open <slug> --no-browser` and give the user the address on its `交给用户` line, even when they say the page is open: it reuses the running server without opening another tab, and it keeps the document as it stands so that the first `gallery qa` pictures what you change. It prints no `写作偏好` line: read `<workspace>/preferences.md` before you change anything.
|
|
98
|
+
|
|
99
|
+
A long `doc.html` may not fit one read: map it first with a search of its headings and ids (`<h2`, `<h3`, `data-block-id`, with line numbers), then read the part you change by its lines. Right before each change, re-read the part you change and replace only it; never rewrite the whole file from an earlier read or regenerate it with a script. A script may read the file at that moment, replace several exact spans, each found once in it, and write it once (its read is the re-read); it stops without writing when a span is missing or repeated. Write it for Node (`node`), which Gallery runs on and so is always there: `python` may be missing, or a stub that runs nothing and says nothing (Windows' app alias). Keep the start tag of each block you change: its `data-block-id`, `style` and classes may be the user's edits.
|
|
100
|
+
|
|
101
|
+
Write a block you add or convert as [the example](references/example-report.html) and [writing-html.md](references/writing-html.md) write it: read its part in both first.
|
|
102
|
+
|
|
103
|
+
- `data-block-id` is a block's identity: never invent one or put one on another element. A moved block, or one wrapped in a new container, keeps its id (cut and paste the element as it is; the container gets none). An added or copied block has none: strip a copy's ids. A split keeps the id on the first part, a merge the first block's; a deleted id is never reused.
|
|
104
|
+
- Words that stay a block's own through a change of type keep its id on the element holding them (a paragraph made an `h3` or `li`: on it); words that become part of another component (a table's numbers moved into a chart's JSON, items a disclosure's title) are a new block, without one. A table given `data-doc-chart` stays its block; its chart card is new. A list made a flowchart, or a flowchart a list, is new as the browser page makes it: no id on it, its nodes or items, or their titles; the blocks its items held keep theirs. Never move an id from an item or a container onto a paragraph in it.
|
|
105
|
+
- When unsure, drop the id: a missing one costs the user at most a choice card, a misplaced one can send their undo to the wrong block. When a check says an id repeats, remove it from the copy.
|
|
106
|
+
- A block made another (a table made Sheet tabs, a list a flowchart) carries every fact of the old one: its numbers, units, scope line and colors, the specific values where the document has them, not a vaguer word. Say in the handoff what could not go.
|
|
107
|
+
- After `gallery export` or the user's first edit in the browser, the file holds the kit's markup and ids: re-read it. The user's edits are in the file itself; no command lists them.
|
|
108
|
+
- A change that takes several edits (blocks wrapped in a disclosure, a section moved, a Sheet area's tabs and panels): make them one right after another. The browser page waits until the file is whole again before it shows it or merges the user's edits into it. A script as above may make a move in one write, cutting and pasting, when every span it cuts and every anchor it pastes at appears once in the file.
|
|
109
|
+
- A revision may need changes the user did not name: a term defined where it now first appears, a reference to what was renamed. You may make them; name each in the handoff.
|
|
110
|
+
- When the change touches data, recheck the summary, charts, units and denominators using it. A summary made simpler still rests each comparison on a number the document shows, and keeps what each number is (a range, a basin, one seed's value, a mean), not only the number. Then export and run `gallery qa`; name the changed blocks in the handoff.
|
|
111
|
+
- The user's 批注 on a document are in `<workspace>/<slug>/annotations.json` (also what the workbench's 复制批注 hands over): `items`, each `{ id, text, anchor: { blocks, quote, … } }`, `text` the user's suggestion (empty: it only marks that place, nothing asked), `quote` the words it is on. When the user asks you to work through them, carry out each `text` where it is anchored; leave one that does not fit its words and ask about it in the handoff; where one conflicts with the request, the request wins: name it. Never edit `annotations.json`. Gallery's server deletes a 批注 whose words are gone, whether the page is open or not: its words must stay in the blocks it is on (`anchor.blocks`), and words moved into another block, a new callout for one, are gone for it (only a 批注 whose blocks are all gone, a block replaced whole, follows its words to where they appear once in the document). `gallery export`, `gallery check` and `gallery qa` list each deleted, once, right after the write that deleted it; run `gallery check <slug>` once more right before the handoff. One you carried out whose words remain stays until the user deletes it. In the handoff, say which you carried out (those still shown, for the user to delete), which you left and which went with their words.
|
|
112
|
+
|
|
113
|
+
## Output contract
|
|
114
|
+
|
|
115
|
+
- `<workspace>/<slug>/doc.html` and `doc.json` are the editable sources; what Gallery keeps of its own is under `<workspace>/.gallery/`, never yours to edit; `<workspace>/components/` holds component packages, no document, and is no slug a new document can take; `<workspace>/exports/<slug>.html` is the offline, single-file deliverable. Re-export after the last source edit. In the handoff the clickable HTML is the export or a verified byte-identical copy of it, never a source or a page of the local server.
|
|
116
|
+
- Everything document-specific (data, visuals, styles, scripts) stays in `doc.html` and its `assets/`. Gallery's shared kit (its blocks, styles and `sdk/` types) is not yours to change; the workspace's component packages are. A document uses the kit's blocks and whole blocks. Make a package only when the user clearly wants a block to use again, never one per document: run `gallery component list` first, then read [references/building-components.md](references/building-components.md). When the user wants a document that uses it too, create that document first, even when they say to make the block first: Workflow steps 1–3 (`gallery new`, the address sent), then its skeleton with the heading of the section the instance goes in. Then make the package, and write the instance into its section last. An instance of a package `gallery component list` gives is written as `gallery component show <id>` prints.
|
|
117
|
+
|
|
118
|
+
## Handoff
|
|
119
|
+
|
|
120
|
+
In the handoff, give:
|
|
121
|
+
|
|
122
|
+
- the deliverable: the path on the `交给用户(离线文件):` line that `gallery export` prints last and `gallery qa` prints after its verdict, copied whole (no `…`, never rebuilt in another folder); and the address on the `交给用户` line of `gallery new` or `gallery open` again (you sent it at the start), where the user edits the document (not in a cloud sandbox they cannot reach). The export holds the document as of your last export: an edit after it, the user's in the browser included, needs another export;
|
|
123
|
+
- what `gallery qa` flagged and what you fixed, and the pictures you opened, by name (never a width or a block whose pictures you did not open); or that it could not run;
|
|
124
|
+
- the sentences that are your own inference and not stated by the materials, with where they are;
|
|
125
|
+
- for a revision, the blocks you changed, the changes the user did not name, what a conversion dropped, and what a change of structure left side by side (two headings of one name, one right after the other, after a move).
|
|
126
|
+
|
|
127
|
+
Before you hand over, do the review 写作偏好 asks for before handing in (a reading by a subagent, a check of the numbers), when it asks for one.
|
|
128
|
+
|
|
129
|
+
## References
|
|
130
|
+
|
|
131
|
+
| Need | Read |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| The user's rules for writing: what to write, the opening summary, titles, fidelity, evidence and data | 写作偏好, `<workspace>/preferences.md` |
|
|
134
|
+
| How a block is written | [references/example-report.html](references/example-report.html) |
|
|
135
|
+
| The rules behind the blocks: the page, what plain HTML becomes, figures and charts you draw yourself | [references/writing-html.md](references/writing-html.md) |
|
|
136
|
+
| A block to use again, when the user asks for one | [references/building-components.md](references/building-components.md) |
|
|
137
|
+
| Exact API types | `sdk/*.d.ts`, from [`sdk/index.d.ts`](sdk/index.d.ts) |
|
|
138
|
+
| What each command does and prints | `gallery help`, `gallery <command> --help` |
|