allyhub 0.9.0 → 0.11.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/CHANGELOG.md +16 -0
- package/dist/commands/auth.js +4 -4
- package/dist/commands/cloud-tools.js +11 -11
- package/dist/commands/dev.js +2 -2
- package/dist/commands/frames/compare.js +2 -2
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/report.js +2 -0
- package/dist/commands/frames.js +11 -9
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/common.js +4 -2
- package/dist/commands/inspect/facts.js +3 -3
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/orgs.js +2 -2
- package/dist/commands/render.js +2 -2
- package/dist/help.js +4 -4
- package/dist/main.js +8 -7
- package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
- package/dist/node_modules/@allyhub/3d-extension/package.json +34 -2
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
- package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
- package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
- package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
- package/dist/node_modules/@allyhub/browser/package.json +9 -1
- package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
- package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
- package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
- package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +2 -1
- package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +4 -24
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +10 -0
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +9 -0
- package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +4 -4
- package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +12 -0
- package/dist/node_modules/@allyhub/cloud/dist/device.js +2 -0
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/components/r/callout.json +1 -1
- package/dist/node_modules/@allyhub/components/src/callout.ts +98 -13
- package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/dist/captions.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
- package/dist/node_modules/@allyhub/doc/dist/html.js +51 -92
- package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/write.js +22 -22
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +19 -6
- package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
- package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
- package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +16 -6
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +7 -39
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
- package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
- package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
- package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
- package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
- package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +7 -4
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/look.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
- package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
- package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
- package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
- package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
- package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
- package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +7 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.js +2 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +8 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
- package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
- package/dist/node_modules/@allyhub/sheet-extension/package.json +24 -9
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +22 -16
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +19 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +76 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +316 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +79 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +316 -0
- package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +3 -0
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +18 -18
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +17 -4
- package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/dist/held.js +2 -0
- package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
- package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +24 -1
- package/dist/node_modules/@allyhub/website-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +49 -2
- package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
- package/dist/node_modules/@allyhub/x-extension/package.json +43 -15
- package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +7 -62
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/article.js +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/post.js +2 -2
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +12 -10
- package/dist/text/facts-text.js +5 -5
- package/dist/text/index.js +1 -1
- package/dist/text/long-text.js +4 -0
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-CN5PiJYY.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-BnvZtQYk.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-tkcEcFQ8.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
- package/editor-web/assets/{arrow-up-DTP2yVSU.js → arrow-up-B5rJbBv0.js} +1 -1
- package/editor-web/assets/article-BUmD3xtR.js +8 -0
- package/editor-web/assets/article-DNioBb3p.js +7 -0
- package/editor-web/assets/{audio-lines-Ti8-m7H2.js → audio-lines-CzuzsGjI.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-DhqEIpie.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
- package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
- package/editor-web/assets/button-eGxLxbv9.js +41 -0
- package/editor-web/assets/{c4Diagram-XDPPPE54-Bg9G95tl.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
- package/editor-web/assets/calc-worker-D2pGis6e.js +45 -0
- package/editor-web/assets/channel-TNPgFDrw.js +1 -0
- package/editor-web/assets/chart-C37xvZT2.js +1 -0
- package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-C8Ve9lAa.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-BDWwPUnT.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-BQiNPKgx.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-QoEt-6jf.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BeuwIv0-.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-BHW7sLAz.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-bbGED0hu.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-FltWp8yo.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-NeQzr6kH.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-eA4-WUhn.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-BPPv325z.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-DOCIz7Te.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-Dc_ihQJi.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CoqwCPSm.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-CZUQPkJx.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-DUh9c50k.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
- package/editor-web/assets/collaborator-B1u2td9m.js +1 -0
- package/editor-web/assets/createLucideIcon-GFZ_fxLc.js +1 -0
- package/editor-web/assets/{cynefin-EF2NZ3EQ-DUTZiog0.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-oAjpfbrU.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-BrKvKCvb.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-GekVRnmm.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-CDd1VFRT.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-535RISTn.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-MXzzKCGG.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-vKVwkQxY.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-UwGAiQLx.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
- package/editor-web/assets/dist-BGRwhCQO.js +1 -0
- package/editor-web/assets/{dist-9ymlIMhr.js → dist-BW4X7BrF.js} +1 -1
- package/editor-web/assets/dist-BgDRE85b.js +2 -0
- package/editor-web/assets/dist-Blq5nJnU.js +24 -0
- package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
- package/editor-web/assets/dist-C1emZ9wX.js +37 -0
- package/editor-web/assets/dist-CC7OeU1e.js +6 -0
- package/editor-web/assets/dist-CX-fiPSn.js +38 -0
- package/editor-web/assets/dist-C_VvG-_9.js +5 -0
- package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
- package/editor-web/assets/dist-D2k6w-_a.js +1 -0
- package/editor-web/assets/dist-DDv_SbKw.js +84 -0
- package/editor-web/assets/dist-DEoEO4zs.js +1 -0
- package/editor-web/assets/dist-DlDxxPIP.js +16 -0
- package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-73yGokYa.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-BW6V9y6a.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-BPqIJ22h.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-_VZ8jvuy.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-DZ157JN2.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-fmcNL9bq.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DiZDyksR.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
- package/editor-web/assets/hint-B8JpEypy.js +1 -0
- package/editor-web/assets/index-CgB5osVc.js +28 -0
- package/editor-web/assets/index-Daytem9N.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-V06620kN.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-CbIgheWX.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-D5oJQPkG.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
- package/editor-web/assets/{italic-CDhZKo_q.js → italic-D10w8n6C.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BZEv6JI4.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-CLG1R8y_.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
- package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
- package/editor-web/assets/link-BC5xK1-1.js +1 -0
- package/editor-web/assets/{mermaid-parser.core-DxDwXM7z.js → mermaid-parser.core-req5LE0X.js} +3 -3
- package/editor-web/assets/{mermaid.core-tU55ZwVG.js → mermaid.core-zFwZug4C.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-CYf4zzAh.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
- package/editor-web/assets/minus-DaWs5i8B.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-DsHeKYNL.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
- package/editor-web/assets/palette-BIOudGkm.js +1 -0
- package/editor-web/assets/{pegDiagram-ECIUJNBX-CQyh6TTa.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-3vCIvpNB.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-DF5yGBLn.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
- package/editor-web/assets/play-CrMmPghG.js +1 -0
- package/editor-web/assets/progress-DE4C5_3x.js +6 -0
- package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-B7pxlDYP.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-cpEA41mL.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BLyy5R2c.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-Y-oyol19.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-o58wHZsr.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-CcD3PXZ8.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-BuCC4eyy.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
- package/editor-web/assets/react-WA6wlt8S.js +1 -0
- package/editor-web/assets/{repeat-2-C5PCbNsg.js → repeat-2-VQP1EVOZ.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dp-JFGn4.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
- package/editor-web/assets/row-BRlEWRrK.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-rYuCqEvw.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
- package/editor-web/assets/schemas-VikZYZIK.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DryW8x6d.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
- package/editor-web/assets/session-Do9AqS38.js +1 -0
- package/editor-web/assets/slides-diTEQ3C5.js +1 -0
- package/editor-web/assets/snapshots-BUGlKQIB.js +56 -0
- package/editor-web/assets/sound-Bj3o9_Fa.js +1 -0
- package/editor-web/assets/split-CNU1RHcX.js +3 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-Bnp0XfpT.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
- package/editor-web/assets/{strikethrough-DJckA35o.js → strikethrough-CfXx6IYH.js} +1 -1
- package/editor-web/assets/{svg-BjM9RazX.js → svg-Cx50MpxK.js} +1 -1
- package/editor-web/assets/swatch-WeJD41aW.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-BiRRhhbd.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
- package/editor-web/assets/switch-N0G_sbqt.js +1 -0
- package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
- package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
- package/editor-web/assets/table-B6hVZAMi.js +1 -0
- package/editor-web/assets/tabs-DIFDqj-l.js +1 -0
- package/editor-web/assets/{textarea-BGtPqZdB.js → textarea-tEWvBY9p.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-D-Q5ZtDF.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
- package/editor-web/assets/{trash-2-Bjj6cWzP.js → trash-2-BP6nqpg2.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-B6DDatXq.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-D7j5ZhiI.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
- package/editor-web/assets/{undo-2-yOSG766T.js → undo-2-CHR0nvWL.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-tkrdKUJB.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-Ch4XbSnD.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
- package/editor-web/assets/video-BlvmR8BK.js +1 -0
- package/editor-web/assets/{wardley-7MLQ67FV-Bynt7qNQ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DRuSgm_L.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
- package/editor-web/assets/words-D_4T9Adq.js +3 -0
- package/editor-web/assets/words-WgdEQdYP.js +2 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DctpvfkL.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
- package/editor-web/index.html +6 -5
- package/package.json +8 -2
- package/editor-web/assets/alt-BOVao_9S.js +0 -4
- package/editor-web/assets/article-B6YCzhj8.js +0 -73
- package/editor-web/assets/calc-worker-B5-fDWnb.js +0 -45
- package/editor-web/assets/channel-C26aBI4o.js +0 -1
- package/editor-web/assets/chart-BOnxneyw.js +0 -1
- package/editor-web/assets/choice-O5nwc2N0.js +0 -1
- package/editor-web/assets/collaborator-BJU5qwHd.js +0 -1
- package/editor-web/assets/createLucideIcon-B3B95oX5.js +0 -1
- package/editor-web/assets/dist-C6NqUEG4.js +0 -16
- package/editor-web/assets/dist-C9UGmCG9.js +0 -6
- package/editor-web/assets/dist-CAk5bjBm.js +0 -1
- package/editor-web/assets/dist-CKyfo5RM.js +0 -340
- package/editor-web/assets/dist-CRaWqNwq.js +0 -37
- package/editor-web/assets/dist-CwIBc7HQ.js +0 -1
- package/editor-web/assets/dist-DXRmkezB.js +0 -38
- package/editor-web/assets/dist-EKK5i0dG.js +0 -219
- package/editor-web/assets/dist-hHJlpLWo.js +0 -5
- package/editor-web/assets/dist-oYKcwWUj.js +0 -4
- package/editor-web/assets/dist-shKo7XVN.js +0 -2
- package/editor-web/assets/dist-wrKxBrVu.js +0 -24
- package/editor-web/assets/flowDiagram-IUGLLWBU-ouDQYiTr.js +0 -1
- package/editor-web/assets/hint-_AQWCDMj.js +0 -1
- package/editor-web/assets/index-BsstP-cI.js +0 -28
- package/editor-web/assets/index-DQRcmxBO.css +0 -2
- package/editor-web/assets/minus-Cgmm6ncD.js +0 -1
- package/editor-web/assets/progress-0B_TVsPi.js +0 -6
- package/editor-web/assets/react-BP46yLMB.js +0 -1
- package/editor-web/assets/react-pgBZqVxJ.js +0 -96
- package/editor-web/assets/schemas-Ewwjtbf4.js +0 -1
- package/editor-web/assets/session-DiI9KYRI.js +0 -1
- package/editor-web/assets/slides-CCwgBcGH.js +0 -1
- package/editor-web/assets/sound-CqryteNl.js +0 -1
- package/editor-web/assets/swatch-DL3HqIjW.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BkOls8Tv.js +0 -8
- package/editor-web/assets/switch-DltnKqN-.js +0 -1
- package/editor-web/assets/syntax-CC6QYhCz.js +0 -1
- package/editor-web/assets/tabs-C-re0Kxn.js +0 -1
- package/editor-web/assets/video-DXFiCNGc.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{itemNameOf as
|
|
2
|
+
import{itemNameOf as v,listsFile as g}from"@allyhub/formats";import{randomBytes as y}from"node:crypto";import{isAbsolute as u,relative as x,resolve as O,sep as b}from"node:path";import{AGENT_NAME as T,FILE_METHODS as S,HOST_METHODS as p,JSONRPC as h,PRESENCE_METHODS as k,PROJECT_TOOLS as c,RPC_ERROR as l,RequestSchema as E,RpcError as d,answer as f}from"@allyhub/protocol";import{Checker as j,Indexer as P}from"./background.js";import{Exports as N}from"./exports.js";import{downloadsFolder as I,hasFileManager as R,revealFile as M}from"./reveal.js";import{Live as C}from"./live.js";import{Inputs as J}from"./inputs.js";import{Pages as _}from"./pages.js";import{fileIn as w}from"./paths.js";import{kindContext as F}from"./kinds.js";import{Presence as H}from"./presence.js";import{Texts as q}from"./texts.js";import{contributedTool as A,contributedTools as D,projectToolContext as L,toolHandlers as W}from"./tools.js";import{Watcher as B}from"./watcher.js";import{Writer as $}from"./writer.js";export const SERVER_METHODS={...S,"tools/call":p["tools/call"],...k};const G=5e3;export class ProjectServer{root;writer;watcher;live;exports;presence;inputs=new J;pages;texts;placing=Promise.resolve();telling=Promise.resolve();listed;extensions;reveal;checker;serving;indexer;clients=new Map;contributed;services;held=new Map;unhearJobs;constructor(e){this.root=O(e.root),this.services={...e.jobs===void 0?{}:{jobs:e.jobs},...e.cloud===void 0?{}:{cloud:e.cloud},...e.env===void 0?{}:{env:e.env},...e.ports===void 0?{}:{ports:e.ports}},this.unhearJobs=e.jobs?.on(t=>{if(!u(t.about.id))return;const s=x(this.root,t.about.id);s===""||s.startsWith("..")||u(s)||this.notify("jobs/changed",{job:t,item:s.split(b).join("/")})})??(()=>{}),this.contributed=D(e.kinds),this.extensions=e.extensions,this.live=new C(this.root,{kinds:e.kinds,...e.gpu===void 0?{}:{gpu:e.gpu},recordInputs:(t,s,n)=>{const r=[...n];this.listedItems().then(o=>{const a=o.find(m=>m.entry===t);a&&this.inputs.set(a.id,s,r)})}}),this.pages=new _({root:this.root,ports:e.ports,inputs:this.inputs}),this.presence=new H(t=>{this.notify("presence/changed",{collaborators:t})}),this.texts=new q(this.root),this.watcher=new B(this.root,(t,s)=>{this.sendTo(this.watchOwner(t),"files/changed",{watch:t,changes:s})},(t,s)=>{this.live.moved(t),this.notify("project/changed",{revision:t}),this.checker?.schedule(),this.telling=this.telling.then(()=>this.tellItems(s))},{by:{kind:"agent",name:T},moved:t=>{this.placing=this.placing.then(()=>this.wroteOutside(t))}}),this.writer=new $(this.root,e.kinds,(t,s)=>{for(const n of t)this.texts.set(n.path,n.text);this.watcher.wrote(t.map(({path:n,version:r})=>({path:n,version:r})),s)},e.writable),this.reveal=e.reveal===!1?void 0:e.reveal??(R()?M:void 0),this.exports=new N(this.root,e.kinds,t=>{this.notify("export/changed",{job:t})},e.jobs===void 0?void 0:{jobs:e.jobs,nameOf:async t=>{const{items:s}=await this.tool("project/items",{}),n=s.find(r=>r.id===t);return v(n??{id:t})}},{...e.extensions?{processors:e.extensions.exportProcessors(),analyses:e.extensions.mediaAnalyses()}:{},...this.reveal===void 0||e.exportsTo===!1?{}:{saveTo:e.exportsTo??I}});const i=e.index??process.env.ALLYHUB_NO_INDEX!=="1";if(e.check!==!1){const t=i?new P({root:this.root,analyses:e.extensions?.mediaAnalyses()??[],env:e.env??process.env,emit:n=>{this.notify("index/changed",{jobs:n})},made:()=>{this.checker?.schedule(!0)}}):void 0;this.indexer=t;const s=e.extensions?.fileEditors();this.checker=new j({live:this.live,...s===void 0?{}:{files:s},emit:n=>{this.notify("check/changed",n)},...t?{needs:n=>{t.want(n)}}:{},...e.settle===void 0?{}:{settle:e.settle}})}}static open(e){const i=new ProjectServer(e);return i.watcher.start(),i.checker?.schedule(),i.texts.warm(),Promise.resolve(i)}async settled(){await this.watcher.settled(),await this.placing,await this.telling}async tellItems(e){if(e.length===0)return;const i=await this.listedItems();for(const[t,s]of this.inputs.affected(i,e))this.notify("items/changed",{item:t,paths:s})}async wroteOutside(e){let i;for(const s of e){const{changed:n,lines:r}=await this.texts.changed(s).catch(()=>({changed:!1,lines:void 0}));n&&(i={path:s,...r})}if(i===void 0)return;const t=await this.itemOf(i.path);this.presence.agent({doing:"editing",...t===void 0?{}:{item:t},source:i})}async itemOf(e){const i=await this.listedItems(),t=i.filter(s=>s.dir!==""&&e.startsWith(`${s.dir}/`)).sort((s,n)=>n.dir.length-s.dir.length);return(i.find(s=>s.entry===e)??i.find(s=>s.files!==void 0&&g(s.files,e))??t[0])?.id}async listedItems(){const e=Date.now();return this.listed!==void 0&&e-this.listed.at<G||(this.listed={at:e,items:this.tool("project/items",{}).then(t=>t.items,()=>[])}),await this.listed?.items??[]}owners=new Map;watchOwner(e){return this.owners.get(e)}connect(e,i={}){const t=`c${y(6).toString("hex")}`;this.clients.set(t,e);const s=this.handlersFor(t,i.origin);return{id:t,receive:async n=>{const r=await this.answerOne(s,n);r&&e(r)},close:()=>{this.clients.delete(t),this.watcher.forget(t);for(const[n,r]of this.owners)r===t&&this.owners.delete(n)}}}channel(){const e=new Set,i=this.connect(t=>{const s=JSON.parse(JSON.stringify(t));queueMicrotask(()=>{for(const n of e)n(s)})});return{send:t=>{i.receive(JSON.parse(JSON.stringify(t)))},listen:t=>(e.add(t),()=>e.delete(t)),close:()=>{i.close()}}}notify(e,i){for(const t of this.clients.values())t({jsonrpc:h,method:e,params:i})}sendTo(e,i,t){e!==void 0&&this.clients.get(e)?.({jsonrpc:h,method:i,params:t})}async answerOne(e,i){const t=E.safeParse(i);if(!t.success){const n=i?.id;return typeof n!="string"&&typeof n!="number"?void 0:{jsonrpc:h,id:n,error:{code:l.invalidRequest,message:"Not a JSON-RPC request."}}}const s=t.data;return Object.hasOwn(p,s.method)&&s.method!=="tools/call"?{jsonrpc:h,id:s.id,error:{code:l.methodNotFound,message:`${s.method} is answered by the page that hosts the editor, not by allyhub dev's server.`}}:f(SERVER_METHODS,e,s)}handlersFor(e,i){const{writer:t,watcher:s}=this,n=this.toolSet(()=>this.serving?.tree(i));return{"files/read":({path:r})=>t.read(r),"files/write":async({path:r,text:o,over:a})=>({version:await t.write(r,o,a,e)}),"files/upload":async({dir:r,name:o,data:a})=>({path:await t.upload(r,o,Buffer.from(a,"base64"),e)}),"files/url":async({path:r})=>{if(await w(this.root,r),!this.serving)throw new d(l.unavailable,"This server serves no files over HTTP: only allyhub dev's does.");return{url:this.serving.file(i,r)}},"files/list":({dir:r})=>t.list(r),"files/move":async({from:r,to:o})=>({rewritten:await t.move(r,o,e)}),"files/remove":async({path:r})=>({trash:await t.remove(r,e)}),"files/trash":async()=>({entries:await t.trash()}),"files/restore":async({id:r})=>({path:await t.restore(r,e)}),"files/watch":async({paths:r})=>{for(const a of r)await w(this.root,a);const o=await s.watch(e,r);return this.owners.set(o,e),{watch:o}},"files/unwatch":({watch:r})=>(this.owners.get(r)===e&&(s.unwatch(r),this.owners.delete(r)),Promise.resolve({})),"tools/call":async({name:r,arguments:o})=>({result:await this.runTool(n,r,o)}),"presence/get":()=>Promise.resolve({collaborators:this.presence.list()})}}toolSet(e){const i=this.toolContext(e);return{core:W(i),context:L(i)}}async runTool(e,i,t){const s={jsonrpc:h,id:0,method:i,params:t},n=Object.hasOwn(c,i)?void 0:this.contributed.get(i);let r;if(n===void 0)r=await f(c,e.core,s);else{const o=await A(n).catch(a=>{throw new d(l.internal,a instanceof Error?a.message:String(a))});r=await f({[i]:o},{[i]:a=>o.run(a,e.context)},s)}if("error"in r)throw new d(r.error.code,r.error.message,r.error.data);return r.result}hasTool(e){return Object.hasOwn(c,e)||this.contributed.has(e)}toolContext(e){return{live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,tree:e,extensions:this.extensions,services:this.services,held:this.held,kindContext:F(this.root,i=>this.hasTool(i),(i,t)=>this.tool(i,t)),inputs:this.inputs,pages:this.pages}}async tool(e,i,t={}){const s=await this.runTool(this.toolSet(()=>t.tree??this.serving?.tree(void 0)),e,i);return Object.hasOwn(c,e)?c[e].result.parse(s):s}async close(){this.unhearJobs(),this.presence.close(),this.watcher.close(),this.clients.clear();for(const e of[...this.held.values()].reverse())await Promise.resolve(e.dispose()).catch(()=>{});this.held.clear(),await this.pages.close(),await this.checker?.close(),await this.indexer?.close(),await this.exports.close(),await this.live.close()}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readdir as
|
|
2
|
+
import{readdir as Z,realpath as ee,stat as te}from"node:fs/promises";import{setTimeout as oe}from"node:timers/promises";import{join as b,relative as se,sep as ie}from"node:path";import{openPage as ne}from"@allyhub/browser";import{KeyedStore as re}from"@allyhub/project";import{NEVER_CANCELLED as ae}from"@allyhub/extension-api";import{COMPONENT_STILLS_MAX as J,KindSnapshotSchema as ce,RpcError as K,SNAPSHOT_TREE as m,pieceSourcePath as fe,snapshotAnswerPath as x,snapshotPreviewPath as de,stillPath as z,stillsIndexKey as le,stillsIndexPath as ue}from"@allyhub/protocol";import{runtimeFiles as pe}from"@allyhub/stage-page";import{itemPreview as me}from"./card.js";import{kindContext as he,kindItem as we}from"./kinds.js";import{mediaTypeOf as H}from"@allyhub/formats";import{Reach as ge,pieceBundle as ye,pieceNames as $e,reachedCheck as be,reachedSource as ke}from"./reach.js";import{matteFile as Se}from"./tree.js";export const PAGE_RECORDING={width:1440,height:900,timeout:3e4,settle:1500};const M="https://tree.invalid/";function v(n){return typeof n=="string"?n.startsWith(M)?n.slice(M.length):n:Array.isArray(n)?n.map(v):n!==null&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([g,a])=>[g,v(a)])):n}const E=n=>new TextEncoder().encode(JSON.stringify(n));async function U(n){return(await Z(n,{recursive:!0,withFileTypes:!0}).catch(()=>[])).filter(a=>a.isFile()).map(a=>se(n,b(a.parentPath,a.name)).split(ie).join("/"))}const je=n=>te(n).then(g=>g.isFile(),()=>!1);export async function recordTree(n,g={}){const{project:a}=n,{live:l,root:y}=a;await a.watcher.settled();const O=new Map,w=(e,t,o=H(e))=>{O.set(e,{path:e,type:o,file:t})},k=(e,t,o=H(e))=>{O.set(e,{path:e,type:o,bytes:t})},N=async(e,t)=>{for(const o of await U(t))w(`${e}${o}`,b(t,o))},V=l.revision,c=await l.prepared(),T=new Map;if(n.ui!==void 0)for(const e of await U(n.ui))w(`${m.editor}${e}`,b(n.ui,e));for(const[e,t]of await pe())w(`${m.runtime}${e}`,t);const R=async(e,t)=>{let o;try{o={result:v(await a.tool(e,t,{tree:M}))}}catch(s){o={error:s instanceof K?{code:s.code,message:s.message}:{code:-32603,message:s instanceof Error?s.message:""}}}const i=x(e,t);k(i,E(o));const f=t.item;return typeof f=="string"&&T.set(f,[...T.get(f)??[],i]),o},X=he(y,e=>a.hasTool(e),async(e,t)=>{const o=await R(e,t);if(o.error)throw new K(o.error.code,o.error.message);return o.result}),q=async(e,t,o)=>{const i=new Map;for(const h of o)i.set(le(h),h);if(i.size===0)return;const f=re.of(y,"stills"),s={stills:{}},u=d.of(e),r=[...i];for(let h=0;h<r.length;h+=J){const j=r.slice(h,h+J);(await a.tool("components/stills",{item:e,...t===""?{}:{version:t},components:j.map(([,$])=>$)},{tree:M}).catch(()=>{}))?.stills.forEach(($,Y)=>{const G=j[Y]?.[0];!$||G===void 0||(s.stills[G]=$.key,w(z($.key),f.path(`${$.key}.webp`),"image/webp"),u?.tree.add(z($.key)))})}const p=ue(e,t);k(p,E(s),"application/json"),u?.tree.add(p)},A=(await R("project/items",{})).result,P=(A?.items??[]).filter(e=>e.kind!==void 0),Q=new Map(c.items.map(e=>[e.id,e.files])),d=new ge(P.map(e=>({...e,files:Q.get(e.id)??e.files})),c.files,(c.bundle?.beside??[]).map(e=>`${m.build}${e}`)),S=a.checker?.state,I=S===void 0||S.status==="waiting"||S.status==="running"?{status:"off",revision:l.revision,problems:S?.problems??[],facts:S?.facts??[]}:S;k(x("check/results",{}),E({result:I}));for(const e of d.items){const t=d.of(e),o=new Set(c.pieces.filter(s=>s.place===e).map(s=>s.id)),i=P.find(s=>s.id===e)?.entry,f=s=>s===i||d.itemsOf(s).includes(e);t?.own.push({path:x("project/items",{}),type:"application/json",bytes:E({result:{...A,items:P.filter(s=>s.id===e)}})},{path:x("check/results",{}),type:"application/json",bytes:E({result:be(I,o,f)})})}for(const e of c.bundle?.chunks.files??[])w(`${m.build}${e}`,b(l.pieceDir,e));for(const e of c.bundle?.beside??[])await N(`${m.build}${e}`,b(l.pieceDir,e));const _=new Set(Object.keys(c.media));for(const e of Object.keys(c.media)){const t=Se(y,c.media[e]);t!==void 0&&await je(t)&&w(`${m.matte}${e}`,t,"video/mp4")}const C=new Map,D=new Map,F=e=>({file:(t,o,i)=>{w(`${e}${t}`,o,i)},folder:(t,o)=>N(`${e}${t}`,o),bytes:(t,o,i)=>{k(`${e}${t}`,o,i)},media:t=>{_.add(t)}});for(const e of P){const t=await a.extensions?.kindProvider(e.kind);if(!t?.snapshot)continue;const o=await Promise.resolve(t.snapshot(we(e),X,ae)).catch(()=>{}),i=ce.safeParse(o??{});if(!i.success)continue;const{stills:f,shows:s,routes:u,page:r}=i.data;r&&C.set(e.id,{...r.folder===void 0?{}:{folder:r.folder},...r.file===void 0?{}:{file:r.file}}),s&&D.set(e.id,{media:new Set(s.media),data:new Set(s.data)});for(const p of f??[])await q(e.id,p.version,p.components);for(const[p,h]of Object.entries(u??{})){const j=await l.routes.route(p).catch(()=>{});if(j?.route.recordItem)for(const B of h)await j.route.recordItem(B,F(p),j.context).catch(()=>{})}}for(const e of _)w(`${m.media}${e}`,b(y,e));for(const[e,t]of C){const o=await a.tool("items/page",{item:e,...t}).catch(()=>{});if(!o)continue;const i=new URL(o.url).origin,f=await ne(await l.browser(),{width:PAGE_RECORDING.width,height:PAGE_RECORDING.height,allow:s=>s===i||s.startsWith(`${i}/`)}).catch(()=>{});if(f)try{await f.goto(o.url,{timeoutMs:PAGE_RECORDING.timeout}),await f.evaluate("document.fonts.ready.then(() => true)",{timeoutMs:PAGE_RECORDING.timeout}),await oe(PAGE_RECORDING.settle)}catch{}finally{await f.close()}}for(const e of d.items){const t=d.of(e);if(t)for(const o of a.inputs.of(e))if(o===""||o.endsWith("/"))for(const i of c.files)i.startsWith(o)&&t.files.add(i);else c.files.includes(o)&&t.files.add(o)}for(const e of l.routes.specs.keys()){const t=await l.routes.route(e).catch(()=>{});t?.route.record&&await t.route.record(F(e),t.context).catch(()=>{})}const L=[y,await ee(y).catch(()=>y)];for(const e of c.pieces){const t=await l.source(e.id).catch(()=>{});if(!t)continue;const o=ye(c.bundle?.chunks,e.id),i=$e({prepared:c,piece:e,reach:d,modules:o.modules,roots:L,reads:a.checker?.reads.get(e.id),shows:D.get(e.place)}),f=c.pieces.filter(r=>r.id!==e.id&&!L.some(p=>o.modules.has(b(p,r.file)))).map(r=>r.id),s=fe(e.id);k(s,E(ke(t,i,f)));const u=d.of(e.place);if(u){u.tree.add(s);for(const r of o.files)u.tree.add(`${m.build}${r}`);for(const r of i.media)u.tree.add(`${m.media}${r}`),u.tree.add(`${m.matte}${r}`),u.files.add(r)}}for(const[e,t]of T)for(const o of t)d.of(e)?.tree.add(o);for(const e of c.docs)for(const t of e.shows)d.of(e.place)?.files.add(t);for(const e of c.sheets)for(const t of e.files)d.of(e.place)?.files.add(t);const W=g.preview===!1?void 0:g.preview??(e=>me(n,e));if(W)for(const e of P){const t=await W(e).catch(()=>{});if(t===void 0)continue;const o=de(e.id);k(o,Buffer.from(JSON.stringify(t)),"application/json"),d.of(e.id)?.tree.add(o)}return{revision:V,files:[...O.values()],reach:d.done(new Set(O.keys())),routes:l.routes.loads()}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{createReadStream as f}from"node:fs";import{stat as p}from"node:fs/promises";import{Readable as d}from"node:stream";import{mediaTypeOf as g}from"@allyhub/formats";export async function fileResponse(r,a,i){const c=await p(r).catch(()=>{});if(!c?.isFile())return new Response("not found",{status:404,headers:{...i}});const o={"content-type":g(r),"cache-control":"no-cache","accept-ranges":"bytes",...i},e=c.size,t=a?/^bytes=(\d*)-(\d*)$/u.exec(a.trim()):null,m=(u,l)=>d.toWeb(f(r,{start:u,end:l}));if(!t||t[1]===""&&t[2]===""||e===0)return new Response(e===0?null:m(0,e-1),{status:200,headers:{...o,"content-length":String(e)}});let n,s;return t[1]===""?(n=Math.max(0,e-Number(t[2])),s=e-1):(n=Number(t[1]),s=t[2]===""?e-1:Math.min(Number(t[2]),e-1)),n>=e||n>s?new Response(null,{status:416,headers:{...o,"content-range":`bytes */${String(e)}`}}):new Response(m(n,s),{status:206,headers:{...o,"content-length":String(s-n+1),"content-range":`bytes ${String(n)}-${String(s)}/${String(e)}`}})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{execFile as s}from"node:child_process";import{
|
|
2
|
+
import{execFile as s}from"node:child_process";import{homedir as a}from"node:os";import{dirname as m,join as p}from"node:path";export function hasFileManager(r=process.env,e=process.platform){return r.SSH_CONNECTION||r.SSH_TTY||r.CI?!1:e==="darwin"||e==="win32"?!0:[r.DISPLAY,r.WAYLAND_DISPLAY].some(Boolean)}export function downloadsFolder(){return p(a(),"Downloads")}export function revealCommand(r,e=process.platform){return e==="darwin"?["open",["-R",r]]:e==="win32"?["explorer",[`/select,${r}`]]:["xdg-open",[m(r)]]}export function revealFile(r){const[e,n]=revealCommand(r);return new Promise((t,i)=>{s(e,n,o=>{o&&!(process.platform==="win32"&&o.code===1)?i(new Error(o.message)):t()})})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{join as f}from"node:path";import{pathToFileURL as c}from"node:url";import{pathProblem as l}from"./paths.js";import{inside as h}from"./tree.js";export function contributedRoutes(r){const t=new Map;for(const o of r)for(const e of o.stageRoutes??[])t.has(e.folder)||t.set(e.folder,e);return t}const
|
|
2
|
+
import{join as f}from"node:path";import{pathToFileURL as c}from"node:url";import{pathProblem as l}from"./paths.js";import{inside as h}from"./tree.js";export function contributedRoutes(r){const t=new Map;for(const o of r)for(const e of o.stageRoutes??[])t.has(e.folder)||t.set(e.folder,e);return t}const a=new Map;async function m(r){let t=a.get(r.module);t||(t=import(c(r.module).href).then(e=>{if(typeof e.default!="object"||e.default===null)throw new Error(`${r.extension}'s stage routes (${r.module}) have no default export.`);return e.default}),a.set(r.module,t),t.catch(()=>{a.get(r.module)===t&&a.delete(r.module)}));const o=(await t)[r.folder];if(!o)throw new Error(`${r.extension} serves the stage's ${r.folder} but its module (${r.module}) has no route for it.`);return o}export class Routes{specs;kept=new Map;media=new Set;contexts=new Map;o;constructor(t){this.o=t,this.specs=contributedRoutes(t.kinds)}loads(){return Object.fromEntries([...this.specs].map(([t,o])=>[t,[...o.loads]]))}allowed(t){return this.media.has(t)}async route(t){const o=this.specs.get(t);if(o)return{route:await m(o),context:this.of(t)}}async mediaOf(t,o){let e=o;for(const s of this.specs.keys()){const d=await this.route(s).catch(()=>{}),n=d?.route.media?await d.route.media(t,e,d.context).catch(()=>{}):void 0;n!==void 0&&(e=n)}return e}of(t){let o=this.contexts.get(t);if(o)return o;const{o:e,kept:s,media:d}=this;return o={root:e.root,kinds:e.kinds,get revision(){return e.revision()},prepared:()=>e.prepared(),latest:()=>e.latest(),dir:f(e.buildDir,t.slice(0,-1)),kept(n,i){const u=`${t}\0${n}`;return s.has(u)||s.set(u,i()),s.get(u)},allowMedia(n){for(const i of n)d.add(i)},recordInputs:(n,i,u)=>{e.recordInputs(n,i,u)},inProject:n=>l(n)===void 0?h(e.root,n):void 0,view:(n,i)=>e.view(n,i)},this.contexts.set(t,o),o}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{randomBytes as
|
|
2
|
+
import{randomBytes as F}from"node:crypto";import{readFile as z}from"node:fs/promises";import{createServer as D}from"node:http";import{join as J,resolve as C}from"node:path";import{getRequestListener as M}from"@hono/node-server";import{Hono as W}from"hono";import{WebSocketServer as G}from"ws";import{KeyedStore as K}from"@allyhub/project";import{CollaboratorStateSchema as Y,PRESENCE_PATH as Q,SNAPSHOT_TREE as $,TREE_PAGES as V,stageCsp as X}from"@allyhub/protocol";import{runtimeFile as Z}from"@allyhub/stage-page";import{pathProblem as ee}from"./paths.js";import{fileResponse as g}from"./respond.js";import{ProjectServer as te}from"./project.js";import{STILL_NAME as ne,inside as x,matteFile as re,sourceName as oe}from"./tree.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const p={"access-control-allow-origin":"*"},T=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const PING_MS=3e4,ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(n){const d=n[ALLYHUB_FORWARDED],y=(n.forwarded??(Array.isArray(d)?d[0]:d))?.split(",")[0]?.split(";").map(i=>i.trim().split("=")).find(([i])=>i?.toLowerCase()==="host")?.[1];if(y!==void 0)return y.replace(/^"(.*)"$/u,"$1");const u=n["x-forwarded-host"];return(Array.isArray(u)?u[0]:u)?.split(",")[0]?.trim()}export function frameSources(n){const d=["'self'","http://127.0.0.1:*","http://localhost:*"];if(n===void 0)return d;const a=new URL(n.replace("{port}","1")),y=new URL(n.replace("{port}","2"));if(a.port!==y.port)return[...d,`${a.protocol}//${a.hostname}:*`];const u=a.hostname.slice(a.hostname.indexOf(".")+1);return[...d,`${a.protocol}//*.${u}`]}export async function startDevServer(n){const d=C(n.root);if(n.embedder!==void 0&&!T.test(n.embedder))throw new Error(`Not an origin: ${n.embedder}`);if(n.publicOrigin!==void 0&&!T.test(n.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${n.publicOrigin}`);const a=n.token??F(18).toString("base64url"),u=`/s/${F(18).toString("base64url")}/`,i=await te.open({...n,root:d,...n.publicOrigin===void 0?{}:{reveal:!1}});let f=0;const P=()=>f===0?void 0:n.publicOrigin?.replace("{port}",String(f)),v=()=>{const e=P();return e===void 0?void 0:new URL(e).host},E=()=>{const e=v();return new Set([`127.0.0.1:${String(f)}`,`localhost:${String(f)}`,...e===void 0?[]:[e]])},R=e=>e===v()?P()??"":`http://${e}`,U=e=>R(e.req.header("host")??""),N=e=>{const t=v();t!==void 0&&forwardedHost(e.headers)===t&&(e.headers.host=t)},A=e=>e??`http://127.0.0.1:${String(f)}`;i.serving={file:(e,t)=>`${A(e)}${RAW_PATH}${t.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(a)}`,tree:e=>`${A(e)}${u}`};const{routes:O}=i.live,b=new W,I=async e=>{if(!n.ui)return e.text("allyhub dev serves its editors here.",200);const t=await z(J(n.ui,"index.html"),"utf8").catch(()=>{});if(t===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub/editor-web build).",500);const c=F(16).toString("base64");return e.html(t.replace(/<script/gu,`<script nonce="${c}"`).replace("</head>",`<meta name="allyhub-token" content="${a}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${c}'`,"style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","media-src 'self' blob:","font-src 'self' data:",`connect-src 'self' ws://${e.req.header("host")??""}`,`frame-src ${frameSources(n.publicOrigin).join(" ")}`,`frame-ancestors ${n.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};b.get("/",I),b.post(Q,async e=>{if(e.req.header("authorization")!==`Bearer ${a}`)return e.text("forbidden",403);const t=Y.safeParse(await e.req.json().catch(()=>{}));return t.success?(i.presence.agent(t.data),e.body(null,204)):e.text(t.error.message,400)}),b.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==a)return e.text("forbidden",403);const t=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(ee(t)!==void 0)return e.text("forbidden",403);const c=x(d,t);return c?g(c,e.req.header("range"),{"x-content-type-options":"nosniff","content-security-policy":"sandbox; default-src 'none'; img-src 'self'; media-src 'self'; style-src 'unsafe-inline'"}):e.text("forbidden",403)}),b.get(`${u}*`,async e=>{let t;try{t=decodeURIComponent(e.req.path.slice(u.length))}catch{return e.notFound()}const c=e.req.header("range"),m=U(e),l=t.slice(0,t.indexOf("/")+1),s=t.slice(l.length);switch(l){case $.runtime:{const r=Z(s);if(!r)return e.notFound();const o=Object.values(V).includes(t);return g(r,void 0,{...p,...o?{"content-security-policy":X(`${m}${u}`,[m,...n.embedder?[n.embedder]:[]],O.loads())}:{}})}case $.build:{const r=oe(s);if(r===void 0){const o=x(i.live.pieceDir,s);return o?g(o,void 0,p):e.notFound()}try{return e.json(await i.live.source(r),200,{...p,"cache-control":"no-store"})}catch(o){return e.json({error:{message:o instanceof Error?o.message:String(o)}},404,p)}}case $.media:{const o=Object.hasOwn(i.live.latest()?.media??{},s)||O.allowed(s)?x(d,s):void 0;return o?g(o,c,p):e.notFound()}case $.matte:{const r=re(d,i.live.latest()?.media[s]);return r?g(r,c,{...p,"content-type":"video/mp4"}):e.notFound()}case $.stills:return ne.test(s)?g(K.of(d,"stills").path(s),void 0,{...p,"cache-control":"public, max-age=31536000, immutable"}):e.notFound();default:try{const r=await O.route(l);if(!r)return await e.notFound();const o=new WeakSet,h=await r.route.serve({path:s,query:new URL(e.req.url).searchParams,file:async(_,q,B)=>{const j=x(_,q);if(!j)return;const k=await g(j,c,{...p,...B});return o.add(k),k}},r.context);return h?(!o.has(h)&&!h.headers.has("access-control-allow-origin")&&h.headers.set("access-control-allow-origin","*"),h):await e.notFound()}catch(r){return e.text(r instanceof Error?r.message:String(r),500,{...p})}}}),b.get("/*",async e=>{if(!n.ui)return e.notFound();const t=x(C(n.ui),decodeURIComponent(e.req.path.slice(1)));return t?g(t,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const S=new G({noServer:!0,maxPayload:512*1024*1024});S.on("connection",(e,t)=>{const c=i.connect(r=>{e.readyState===e.OPEN&&e.send(JSON.stringify(r))},{origin:R(t.headers.host??"")});e.on("message",(r,o)=>{if(o||!Buffer.isBuffer(r))return;let h;try{h=JSON.parse(r.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}c.receive(h)});const m=n.pingMs??PING_MS;let l=!0;e.on("pong",()=>{l=!0});const s=m>0?setInterval(()=>{if(!l){e.terminate();return}l=!1,e.ping()},m):void 0;s?.unref(),e.on("close",()=>{clearInterval(s),c.close()})});const L=M(b.fetch),H=(e,t)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(t)},w=D((e,t)=>{if(N(e),!E().has(e.headers.host??"")){H(t,"forbidden host");return}L(e,t)});w.on("upgrade",(e,t,c)=>{const m=new URL(e.url??"/","http://x"),l=(r,o)=>{t.end(`HTTP/1.1 ${String(r)} ${o}\r
|
|
3
3
|
connection: close\r
|
|
4
4
|
content-length: 0\r
|
|
5
5
|
\r
|
|
6
|
-
`)};
|
|
6
|
+
`)};N(e);const s=e.headers.host??"";if(!E().has(s)){l(403,"Forbidden");return}if(m.pathname!==RPC_PATH){l(404,"Not Found");return}if(e.headers.origin!==R(s)){l(403,"Forbidden");return}if(m.searchParams.get("token")!==a){l(403,"Forbidden");return}S.handleUpgrade(e,t,c,r=>{S.emit("connection",r,e)})});try{await new Promise((e,t)=>{w.once("error",t),w.listen(n.port??0,"127.0.0.1",()=>{e()})})}catch(e){throw await i.close(),e}return f=w.address().port,{url:`http://127.0.0.1:${String(f)}/`,port:f,token:a,tree:`http://127.0.0.1:${String(f)}${u}`,ui:n.ui,project:i,async close(){for(const e of S.clients)e.terminate();S.close(),await new Promise(e=>{w.closeAllConnections(),w.close(()=>{e()})}),await i.close()}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{createHash as
|
|
2
|
+
import{createHash as j}from"node:crypto";import{access as y}from"node:fs/promises";import{basename as P,join as g,posix as O}from"node:path";import{pathToFileURL as C}from"node:url";import{inTime as $,listWork as I,projectItems as w,stageId as L}from"@allyhub/build";import{NEVER_CANCELLED as M}from"@allyhub/extension-api";import{OUT_DIR as _,isListedFile as D,WORK_FILE as H}from"@allyhub/formats";import{OpenedVersion as N,componentStills as W,itemDigests as U,keyedStills as A,parseCombo as K}from"@allyhub/project";import{runtimeFile as V,stageFiles as q}from"@allyhub/stage-page";import{RPC_ERROR as l,RpcError as c,SNAPSHOT_TREE as x,TREE_PAGES as T,listedFileEditor as G,listedKind as E,stillPath as z}from"@allyhub/protocol";import{comboKey as B,componentRefText as J}from"@allyhub/piece";import{providedPreview as Q}from"./card.js";import{kindItem as X}from"./kinds.js";import{rpcErrorOf as b}from"./live.js";import{forwarded as Y}from"./ports.js";const Z=t=>j("sha256").update(t).digest("base64url").slice(0,16);async function F(t,o,n){const e=o.replace(/^\.\//u,""),r=(await w(t.live.root,t.live.kinds)).items.find(d=>d.id===e||d.entry===e);if(!r)throw new c(l.notFound,`There is no item ${o} in the project's list.`);const s=(n.folder??"").replace(/\/+$/u,""),a=n.file??r.entry;if(s!==""&&!a.startsWith(`${s}/`))throw new c(l.invalid,`${a} is not in the folder ${s} the page is served from.`);return t.pages.url(r.id,s,a)}const u=(t,o)=>{const n=t.tree();if(n===void 0)throw new c(l.unavailable,"This server serves no pages: only allyhub dev's does.");return new URL(o,n).href},R=(t,o,n)=>({url:u(t,`${o}?${n.toString()}`),probe:u(t,T.probe)});async function ee(t,o,n){if(o.title!==void 0)return o.title;const e=await t.extensions?.kindProvider(o.kind);if(!e?.title)return(await n()).get(o.id);try{const r=await e.title(X(o),t.kindContext,M);return typeof r=="string"?r:void 0}catch{return}}export function contributedTools(t){const o=new Map;for(const n of t)for(const e of n.projectTools??[])o.has(e.name)||o.set(e.name,e);return o}const v=new Map;export async function contributedTool(t){let o=v.get(t.module);o||(o=import(C(t.module).href).then(e=>{if(typeof e.default!="object"||e.default===null)throw new Error(`${t.extension}'s project tools (${t.module}) have no default export.`);return e.default}),v.set(t.module,o),o.catch(()=>{v.get(t.module)===o&&v.delete(t.module)}));const n=(await o)[t.name];if(!n)throw new Error(`${t.extension} contributes the project tool "${t.name}" but its module (${t.module}) has none of that name.`);return n}export function projectToolContext(t){const{live:o}=t,n=new Map;return{root:o.root,kinds:o.kinds,prepared:()=>o.prepared(),target:(e,r)=>o.target(e,r),itemCode:e=>o.itemCode(e),items:async()=>(await w(o.root,o.kinds)).items,async version(e,r,s,a){try{return await o.withSession(async d=>{const i=await N.open({root:o.root,item:e,...r===void 0?{}:{combos:[K(r)]},purpose:s,session:d});try{return await a(i)}finally{await i.close()}})}catch(d){throw b(d)}},async componentStills(e,r,s){try{const a=await o.prepared(),{gpu:d}=await o.browser();return await A(r,{prepared:a,item:e,combo:s,gpu:d,withSession:i=>o.withSession(i)})}catch(a){throw b(a)}},served:e=>u(t,e),page:(e,r)=>R(t,e,r),buildDir:o.pieceDir,stageStyles:()=>q().fontCss.flatMap(e=>{const r=V(e);return r===void 0?[]:[{file:r,url:u(t,`${x.runtime}${e}`)}]}),kept(e,r){return n.has(e)||n.set(e,r()),n.get(e)},held(e,r){return t.held.has(e)||t.held.set(e,r()),t.held.get(e)},jobs:t.services.jobs,cloud:t.services.cloud,env:t.services.env??process.env,forward:e=>Y(t.services.ports,e),pageOf:(e,r={})=>F(t,e,r),recordInputs:(e,r,s)=>{t.inputs.set(e,r,s)}}}export function toolHandlers(t){const{live:o}=t;return{"project/items":async()=>{const n=await w(o.root,o.kinds,void 0,t.extensions?.fileEditors()??[]);let e;const r=()=>e??=(async()=>{const i=await o.prepared().catch(()=>o.latest()),f=new Map;for(const p of i?.pieces??[]){const m=typeof p.title=="string"?p.title:void 0;m&&f.set(p.place,m)}return f})(),s=new Map((o.latest()?.items??[]).map(i=>[i.id,i.files])),a=t.extensions?.fileEditors()??[];return{items:await Promise.all(n.listed.map(async i=>{const f={id:i.id,dir:i.dir,entry:i.entry,...i.title===void 0?{}:{title:i.title},groups:i.groups};if(D(i)){const h=a.find(S=>S.id===i.editor);return{...f,...h?{kindInfo:G(h)}:{}}}const p=await ee(t,i,r),m=o.kinds.find(h=>h.id===i.kind),k=s.get(i.id);return{...f,kind:i.kind,...p?{title:p}:{},...k?{files:k}:{},...m?{kindInfo:E(m)}:{}}})),kinds:o.kinds.map(i=>({id:i.id,...E(i)})),name:P(o.root),scope:Z(o.root),revision:o.revision}},"items/preview":async({item:n})=>{const e=n.replace(/^\.\//u,""),r=(await w(o.root,o.kinds)).items.find(a=>a.id===e||a.entry===e);if(!r)throw new c(l.notFound,`There is no item ${n} in the project's list.`);const s=await Q(t.extensions,r,t.kindContext);return s===void 0?{}:{preview:s}},"items/page":async({item:n,folder:e,file:r})=>({url:await F(t,n,{folder:e,file:r})}),"work/add":async({kind:n,file:e,title:r})=>{if(!o.kinds.some(s=>s.id===n))throw new c(l.invalid,`No extension here contributes the kind ${n}.`);return await y(g(o.root,e)).catch(()=>{throw new c(l.notFound,`There is no file ${e} to list in ${H}.`)}),await I(o.root,{kind:n,file:e,...r===void 0?{}:{title:r}}),{}},"components/list":async({item:n})=>{const e=await o.prepared(),r=e.items.find(s=>s.id===n||s.entry===n)?.dir??n;return{components:e.components.map(s=>{const a=O.relative(r,s.file);return{of:J({path:a.startsWith(".")?a:`./${a}`,name:s.export}),name:s.name,...s.label===void 0?{}:{label:s.label}}})}},"components/stage":async({item:n,version:e})=>{const{prepared:r,host:s,combo:a}=await o.componentHost(n,e);if(!("components"in s)&&$(s,r.kinds))throw new c(l.notFound,`${n} has no components to draw alone: a deck's or a doc's are.`);const{code:d}=await U(r,s),i=new URLSearchParams({piece:L(s),combo:B(a),mode:"component",code:d.slice(0,16)});return R(t,T.stage,i)},"components/stills":async({item:n,version:e,components:r})=>{u(t,x.stills);try{const{prepared:s,host:a,combo:d}=await o.componentHost(n,e);if(!("components"in a)&&$(a,s.kinds))throw new c(l.notFound,`${n} has no components to draw alone: a deck's or a doc's are.`);const{gpu:i}=await o.browser();return{stills:(await W(r,{prepared:s,item:a,combo:d,gpu:i,withSession:p=>o.withSession(p)})).map(({key:p})=>({key:p,url:u(t,z(p))}))}}catch(s){throw b(s)}},"check/results":()=>Promise.resolve(t.checker?.state??{status:"off",revision:o.revision,problems:[],facts:[]}),"check/run":()=>{if(!t.checker)throw new c(l.unavailable,"This server runs no check.");return t.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:n,versions:e,types:r,options:s})=>{const{items:a}=await w(o.root,o.kinds);if(!a.some(d=>d.id===n))throw new c(l.notFound,`There is no item ${n}.`);return{job:t.exports.start(n,e??[],r??[],s)}},"export/cancel":({job:n})=>{if(!t.exports.cancel(n))throw new c(l.notFound,`No export ${n} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:t.exports.list(),reveal:t.reveal!==void 0}),"export/reveal":async({path:n})=>{if(!t.reveal)throw new c(l.unavailable,"This server is not on the person's computer: download the file.");if(!n.startsWith(`${_}/`))throw new c(l.notFound,`${n} is no exported file.`);const e=t.exports.savedOf(n),r=e!==void 0&&await y(e).then(()=>!0,()=>!1)?e:g(o.root,n);return await y(r).catch(()=>{throw new c(l.notFound,`There is no file ${n}.`)}),await t.reveal(r),{}}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{watch as y}from"node:fs";import{readdir as T,stat as d}from"node:fs/promises";import{join as a,posix as l}from"node:path";import{LOCAL_DIR as w,within as u}from"@allyhub/formats";import{current as m,pathProblem as k}from"./paths.js";const p=40,v=2e3,O=c=>/^(.+)\.\d+$/u.exec(c)?.[1],b=["node_modules",".git"],g=c=>c===w||c.startsWith(`${w}/`)||c.split("/").some(t=>b.includes(t));export class Watcher{revision=0;root;tell;moved;outside;watches=new Map;known=new Map;written=new Map;saved=new Map;fs;pending=new Set;timer;next=1;running=Promise.resolve();constructor(t,s,e=()=>{},i={}){this.root=t,this.tell=s,this.moved=e,this.outside=i}start(){this.fs=y(this.root,{recursive:!0},(t,s)=>{if(s===null)return;const e=s.split("\\").join("/");this.pending.add(e),clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},p)}),this.fs.on("error",()=>{})}async watch(t,s){const e=`w${String(this.next++)}`;this.watches.set(e,{client:t,paths:[...s]});for(const i of s)await this.hash(i,!0);return e}unwatch(t){this.watches.delete(t)}forget(t){for(const[s,e]of this.watches)e.client===t&&this.watches.delete(s)}wrote(t,s){const e=Date.now();for(const[i,r]of this.saved)e-r>v&&this.saved.delete(i);for(const i of t)this.known.set(i.path,i.version),this.written.set(i.path,i.version),this.saved.set(i.path,e);this.fanOut(t,s),this.bump()}async settled(){await new Promise(t=>setTimeout(t,p*2)),await this.running}close(){clearTimeout(this.timer),this.fs?.close(),this.watches.clear()}bump(){this.revision++,this.moved(this.revision)}covered(t){for(const s of this.watches.values())if(s.paths.some(e=>u(t,e)||u(e,t)))return!0;return!1}flush(){const t=[...this.pending];this.pending=new Set,this.running=this.running.then(async()=>{const s=t.filter(n=>!g(n)),e=[];for(const n of s){if(!this.written.has(n)){await this.temporary(n)||e.push(n);continue}((await m(a(this.root,n)))?.version??null)!==this.written.get(n)&&e.push(n),this.written.delete(n)}e.length>0&&this.bump();const i=this.outside.by,r=[];for(const n of s)if(this.covered(n))for(const o of await this.hash(n,!1))r.push(i===void 0?o:{...o,by:i});r.length>0&&this.fanOut(r,void 0),e.length>0&&this.outside.moved?.(e)})}async temporary(t){const s=O(t);if(s===void 0)return!1;const e=this.saved.get(s);return e===void 0||Date.now()-e>v?!1:await d(a(this.root,t)).catch(()=>{})===void 0}async hash(t,s){const e=[],i=async o=>{const h=(await m(a(this.root,o)))?.version??null,f=this.known.get(o);f===h&&this.known.has(o)||(this.known.set(o,h),!s&&!(f===void 0&&h===null)&&e.push({path:o,version:h}))},r=await d(a(this.root,t)).catch(()=>{}),n=new Set;if(r?.isDirectory()){const o=await T(a(this.root,t),{recursive:!0,withFileTypes:!0}).catch(()=>[]);for(const h of o){if(!h.isFile())continue;const f=l.join(t,l.relative(a(this.root,t).split("\\").join("/"),a(h.parentPath,h.name).split("\\").join("/")));k(f)===void 0&&!g(f)&&n.add(f)}}else n.add(t);for(const o of this.known.keys())u(o,t)&&n.add(o);for(const o of n)await i(o);return e}fanOut(t,s){for(const[e,i]of this.watches){if(i.client===s)continue;const r=t.filter(n=>i.paths.some(o=>u(n.path,o)));r.length>0&&this.tell(e,r)}}}
|
|
2
|
+
import{watch as y}from"node:fs";import{readdir as T,stat as d}from"node:fs/promises";import{join as a,posix as l}from"node:path";import{LOCAL_DIR as w,within as u}from"@allyhub/formats";import{current as m,pathProblem as k}from"./paths.js";const p=40,v=2e3,O=c=>/^(.+)\.\d+$/u.exec(c)?.[1],b=["node_modules",".git"],g=c=>c===w||c.startsWith(`${w}/`)||c.split("/").some(t=>b.includes(t));export class Watcher{revision=0;root;tell;moved;outside;watches=new Map;known=new Map;written=new Map;saved=new Map;fs;pending=new Set;timer;next=1;running=Promise.resolve();constructor(t,s,e=()=>{},i={}){this.root=t,this.tell=s,this.moved=e,this.outside=i}start(){this.fs=y(this.root,{recursive:!0},(t,s)=>{if(s===null)return;const e=s.split("\\").join("/");this.pending.add(e),clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},p)}),this.fs.on("error",()=>{})}async watch(t,s){const e=`w${String(this.next++)}`;this.watches.set(e,{client:t,paths:[...s]});for(const i of s)await this.hash(i,!0);return e}unwatch(t){this.watches.delete(t)}forget(t){for(const[s,e]of this.watches)e.client===t&&this.watches.delete(s)}wrote(t,s){const e=Date.now();for(const[i,r]of this.saved)e-r>v&&this.saved.delete(i);for(const i of t)this.known.set(i.path,i.version),this.written.set(i.path,i.version),this.saved.set(i.path,e);this.fanOut(t,s),this.bump(t.map(i=>i.path))}async settled(){await new Promise(t=>setTimeout(t,p*2)),await this.running}close(){clearTimeout(this.timer),this.fs?.close(),this.watches.clear()}bump(t){this.revision++,this.moved(this.revision,t)}covered(t){for(const s of this.watches.values())if(s.paths.some(e=>u(t,e)||u(e,t)))return!0;return!1}flush(){const t=[...this.pending];this.pending=new Set,this.running=this.running.then(async()=>{const s=t.filter(n=>!g(n)),e=[];for(const n of s){if(!this.written.has(n)){await this.temporary(n)||e.push(n);continue}((await m(a(this.root,n)))?.version??null)!==this.written.get(n)&&e.push(n),this.written.delete(n)}e.length>0&&this.bump(e);const i=this.outside.by,r=[];for(const n of s)if(this.covered(n))for(const o of await this.hash(n,!1))r.push(i===void 0?o:{...o,by:i});r.length>0&&this.fanOut(r,void 0),e.length>0&&this.outside.moved?.(e)})}async temporary(t){const s=O(t);if(s===void 0)return!1;const e=this.saved.get(s);return e===void 0||Date.now()-e>v?!1:await d(a(this.root,t)).catch(()=>{})===void 0}async hash(t,s){const e=[],i=async o=>{const h=(await m(a(this.root,o)))?.version??null,f=this.known.get(o);f===h&&this.known.has(o)||(this.known.set(o,h),!s&&!(f===void 0&&h===null)&&e.push({path:o,version:h}))},r=await d(a(this.root,t)).catch(()=>{}),n=new Set;if(r?.isDirectory()){const o=await T(a(this.root,t),{recursive:!0,withFileTypes:!0}).catch(()=>[]);for(const h of o){if(!h.isFile())continue;const f=l.join(t,l.relative(a(this.root,t).split("\\").join("/"),a(h.parentPath,h.name).split("\\").join("/")));k(f)===void 0&&!g(f)&&n.add(f)}}else n.add(t);for(const o of this.known.keys())u(o,t)&&n.add(o);for(const o of n)await i(o);return e}fanOut(t,s){for(const[e,i]of this.watches){if(i.client===s)continue;const r=t.filter(n=>i.paths.some(o=>u(n.path,o)));r.length>0&&this.tell(e,r)}}}
|
|
@@ -26,6 +26,13 @@ export interface Problem {
|
|
|
26
26
|
selector?: string;
|
|
27
27
|
bbox?: Box;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* A fact of the page that drew it (its browser), not of the piece: where
|
|
31
|
+
* that page renders (frames, check, an export) it is the export's; where
|
|
32
|
+
* it is an editor's preview, the export is not affected, so it is not a
|
|
33
|
+
* problem of the version (allykit#502).
|
|
34
|
+
*/
|
|
35
|
+
ofPage?: true;
|
|
29
36
|
}
|
|
30
37
|
/** A code no rule this process knows has: a mistake in the code that reports it, or in its extension's manifest. */
|
|
31
38
|
export declare class UnknownRuleError extends Error {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{everyBlock as c}from"./model.js";import{effectiveLook as
|
|
2
|
+
import{everyBlock as c}from"./model.js";import{effectiveLook as a}from"./page.js";export function captionWords(t){return t?{figure:"图",table:"表"}:{figure:"Figure",table:"Table"}}export function contentsTitle(t,e){return t.title??(e?"目录":"Contents")}export function captionOf(t){switch(t.type){case"image":case"component":case"table":return t.caption;case"chart":return t.title;default:return}}export function blockId(t){return t.type==="image"||t.type==="component"||t.type==="table"||t.type==="chart"?t.id:void 0}export function writtenInChinese(t){let e=0,n=0;for(const i of c(t))if("content"in i)for(const r of i.content)e+=(r.text.match(/[㐀-鿿-ヿ]/gu)??[]).length,n+=(r.text.match(/[A-Za-z]+/gu)??[]).length;return e>n}export function captionNumbers(t,e={}){const n=new Map;if(a(e).captions==="plain")return n;const i=captionWords(writtenInChinese(t)),r={figure:0,table:0};for(const u of c(t)){if(captionOf(u)===void 0)continue;const o=u.type==="table"?"table":"figure";r[o]+=1,n.set(u,{kind:o,n:r[o],label:`${i[o]} ${String(r[o])}`})}return n}export function numberedCaption(t,e){return e===void 0?t:/^[图表]/u.test(e.label)?`${e.label} ${t}`:`${e.label}. ${t}`}export const withoutTitle=t=>{const e={...t};return delete e.title,e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{chartBook as
|
|
3
|
-
`).map((s,
|
|
4
|
-
`).map((
|
|
5
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${
|
|
2
|
+
import{chartBook as Qe,embeddedChartXml as Je}from"@allyhub/chart";import{chartFrame as et,chartWords as tt,docChart as nt}from"./chart.js";import{BACKGROUNDS as Ie,TEXT_COLORS as Se,hex as ee}from"./color.js";import{columnWidths as it}from"./columns.js";import{COMPONENT_WIDTH as rt,componentName as ot}from"./component.js";import{blockId as $e,captionNumbers as st,contentsTitle as at,numberedCaption as Oe,writtenInChinese as dt,withoutTitle as ct}from"./captions.js";import{sourceList as lt,withSources as ht}from"./cite.js";import{HEADING_RULE_SPACE as ut,cardKept as pt,columnsKept as ft,docParts as gt,headingAnchors as mt,pageAccent as wt,trendSvg as yt}from"./html.js";import{effectiveLook as Fe,LIST_STEP as At,lineHeightPt as Tt,resolvePage as Et,sizePt as He}from"./page.js";import{splitTitle as Rt}from"./title.js";import{markdownOf as St}from"./markdown.js";import{charsAcross as Xe,columnShares as zt,emptyHead as Lt,numberColumns as Mt}from"./table.js";import{DRAWN_CODE as ve}from"./math.js";import{PAPER as te,TONE_COLORS as Ue,tagColors as Ct}from"./paper.js";import{COVER_ASPECT as Nt,everyBlock as ze,firstNoteMarks as bt,noteNumbers as xt,statTone as Dt}from"./model.js";const ue=15,It=1440/25.4,Y=n=>Math.round(n*It),Ge="ListParagraph",Be="bullets",Ot=1.8,pe=At*20,We={sans:{latin:"Calibri"},serif:{latin:"Cambria"},mono:{latin:"Courier New"},times:{latin:"Times New Roman"},song:{latin:"Times New Roman",eastAsia:"宋体"},hei:{latin:"Arial",eastAsia:"黑体"},fangsong:{latin:"Times New Roman",eastAsia:"仿宋"},kai:{latin:"Times New Roman",eastAsia:"楷体"},xiaobiaosong:{latin:"Times New Roman",eastAsia:"方正小标宋简体"}},Pe="Courier New",W=n=>n.slice(1).toUpperCase(),le=W(te.ink),fe=W(te.lead),vt=Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=","base64"),Le=W(te.rule),ge=W(te.ruleStrong),Me=W(te.ruleMid),Ce=W(te.stone),Pt=W(te.stone3),de=W(te.leadSoft),je="ALLYHUB-CHART-";function _t(n){return/[\u3040-\u30ff]/u.test(n)?"Yu Gothic":/[\uac00-\ud7af]/u.test(n)?"Malgun Gothic":"Microsoft YaHei"}const $t=/^(https?:|mailto:)/i,Ne=n=>({indent:0,level:0,room:n,frame:rt}),Ke=n=>({...n,indent:n.indent+pe,level:Math.min(n.level+1,8)}),Ft=400,Ht=n=>n.type==="bullet"||n.type==="numbered"||n.type==="check";function Xt(n,u,w){const l=w/ue,S=Math.floor(Math.min(u??n.width,l));return{width:S,height:Math.round(S*n.height/n.width)}}const qe="TOCHeading";function Ut(n,u,w,l,S,z,r){const{AlignmentType:m,BorderStyle:y,ExternalHyperlink:c,ImageRun:x,Paragraph:h,ShadingType:Z,Table:F,TableCell:_,TableLayoutType:H,TableRow:G,TextRun:M,WidthType:p}=n,N=e=>{const t=e.filter(i=>!(i instanceof n.TableOfContents));return t.at(-1)instanceof h?t:[...t,Q(0)]},X={ascii:Pe,hAnsi:Pe,cs:Pe,eastAsia:w},$=new Set([1]);let ne=0;const k=[],B=e=>({type:Z.CLEAR,color:"auto",fill:e}),he=(e,t,i=4)=>({style:e,color:t,size:i,space:4}),o=r.page.spacing,E=e=>Math.round(e*20),Q=e=>new h({spacing:{before:0,after:E(e),line:14,lineRule:n.LineRuleType.EXACT}}),J=()=>o.after>0?[Q(o.after)]:[],j=e=>e==="center"?m.CENTER:e==="right"?m.RIGHT:e==="justify"?m.JUSTIFIED:void 0,ie=(e,t,i,f={})=>{if(t.tag!==void 0){const s=Ct(t.tag),R={...f,color:W(s.fg),size:Math.round((i.size??r.page.size*2)*.85),shading:B(W(s.bg)),...t.bold||i.bold?{bold:!0}:{},...t.italic?{italics:!0}:{}};return[new M({...R,text:` ${e.replace(/\n/gu," ")} `})]}const g=ee(t.color,Se)??i.color,a=ee(t.background,Ie),d={...f,...t.bold||i.bold?{bold:!0}:{},...t.italic?{italics:!0}:{},...t.underline?{underline:{}}:{},...t.strike?{strike:!0}:{},...g===void 0?{}:{color:g},...i.size===void 0?{}:{size:i.size},...t.code?{font:X,shading:B(a??Ce)}:a===void 0?{}:{shading:B(a)}};return e.split(`
|
|
3
|
+
`).map((s,R)=>new M({...d,text:s,...R>0?{break:1}:{}}))},U=(e,t={})=>e.flatMap(i=>i.note!==void 0?S.has(i.note.toLowerCase())?z.has(i)?[new n.FootnoteReferenceRun(S.get(i.note.toLowerCase())??1)]:[new M({text:String(S.get(i.note.toLowerCase())??1),style:"FootnoteReference"})]:[]:i.text===""&&i.href?.startsWith("#")===!0?xe(i.href.slice(1),i.styles,t):i.href!==void 0&&$t.test(i.href)?[new c({link:i.href,children:ie(i.text,i.styles,t,{style:"Hyperlink"})})]:ie(i.text,i.styles,t)),xe=(e,t,i)=>{const f=decodeURIComponent(e),g=r.refs.get(f)??"",a=r.bookmarks.get(f);return g===""?[]:a===void 0?ie(g,t,i):[new n.InternalHyperlink({anchor:a,children:ie(g,t,i,{style:"Hyperlink"})})]},T=(e,t)=>{const i=e===void 0?void 0:r.bookmarks.get(e);return i===void 0?t:[new n.Bookmark({id:i,children:t})]},D=e=>{const t=j(e?.align),i=ee(e?.background,Ie);return{...t===void 0?{}:{alignment:t},...i===void 0?{}:{shading:B(i)}}},L=e=>e.indent===0?{}:{indent:{left:e.indent}},re=e=>{const t={style:y.SINGLE,color:e,size:4};return{top:t,bottom:t,left:t,right:t}},me=(e,t)=>{const i=ee(e.look?.background,Ie)??Ce,f=ee(e.look?.color,Se),g=t.room-t.indent,a=e.icon===void 0?0:E(r.page.size*Ot)+E(o.box.side),d=g-a,s=(R,C)=>({top:E(o.box.top),bottom:E(Math.max(o.box.top-o.after,0)),left:R,right:C,marginUnitType:p.DXA});return new F({layout:H.FIXED,width:{size:g,type:p.DXA},columnWidths:a===0?[d]:[a,d],...t.indent===0?{}:{indent:{size:t.indent,type:p.DXA}},rows:[new G({cantSplit:!0,children:[...e.icon===void 0?[]:[new _({width:{size:a,type:p.DXA},shading:B(i),borders:re(i),margins:s(E(o.box.side),0),children:[new h({children:[new M({text:e.icon})]})]})],new _({width:{size:d,type:p.DXA},shading:B(i),borders:re(i),margins:s(a===0?E(o.box.side):0,E(o.box.side)),children:[new h({children:U(e.content,{color:f})}),...N(V(e.children??[],Ne(d-E(o.box.side))))]})]})]})},we=(e,t)=>{const i=t.room-t.indent,f=E(o.card.side),g=[...e.title===void 0?[]:[new h({spacing:{after:e.subtitle===void 0?E(o.after):0},children:U([{text:e.title,styles:{bold:!0}}])})],...e.subtitle===void 0?[]:[new h({spacing:{after:E(o.after)},children:[new M({text:e.subtitle,color:fe,size:o.small*2})]})]];return new F({layout:H.FIXED,width:{size:i,type:p.DXA},columnWidths:[i],...t.indent===0?{}:{indent:{size:t.indent,type:p.DXA}},rows:[new G({cantSplit:pt(e,r.page),children:[new _({width:{size:i,type:p.DXA},borders:re(Le),margins:{top:E(o.card.top),bottom:E(Math.max(o.card.top-o.after,0)),left:f,right:f,marginUnitType:p.DXA},children:N([...g,...V(e.children??[],Ne(i-2*f))])})]})]})},oe=(e,t)=>{const i=t.room-t.indent,f=E(o.gap),g=e.stats.length,a=Math.floor((i-f*(g-1))/g),d=e.stats.flatMap((b,P)=>P===0?[a]:[f,a]),s={style:y.NONE,size:0,color:"auto"},R={top:s,bottom:s,left:s,right:s},C=E(o.card.side),A=o.small*2,v=e.stats.flatMap((b,P)=>{const q=Dt(b),ce=[...b.delta===void 0?[]:[new M({text:b.delta,color:W(Ue[q]),size:A})],...b.note===void 0?[]:[new M({text:`${b.delta===void 0?"":" "}${b.note}`,color:fe,size:A})]],Ae=a-2*C,Te=b.trend===void 0?[]:[new h({spacing:{before:60,after:0,line:240},children:[new x({type:"svg",data:Buffer.from(yt(b.trend,Ue[q]).replace("<svg ",`<svg xmlns="http://www.w3.org/2000/svg" width="${String(Math.round(Ae/15))}" height="24" `)),fallback:{type:"png",data:vt},transformation:{width:Math.round(Ae/15),height:24}})]})],I=new _({width:{size:a,type:p.DXA},borders:re(Le),margins:{top:E(o.card.top),bottom:E(o.card.top),left:C,right:C,marginUnitType:p.DXA},children:[new h({spacing:{after:0},children:[new M({text:b.label,color:fe,size:A})]}),new h({spacing:{after:0,line:240,lineRule:n.LineRuleType.AUTO},children:U([{text:b.value,styles:{bold:!0}}],{size:o.figure*2})}),...ce.length===0?[]:[new h({spacing:{after:0},children:ce})],...Te]}),O=new _({width:{size:f,type:p.DXA},borders:R,children:[new h({children:[]})]});return P===0?[I]:[O,I]});return new F({layout:H.FIXED,width:{size:i,type:p.DXA},columnWidths:d,...t.indent===0?{}:{indent:{size:t.indent,type:p.DXA}},rows:[new G({cantSplit:!0,children:v})]})},se=(e,t)=>{const i=t.room-t.indent,f=Math.max(1,...e.rows.map(I=>I.length)),g=Array.from({length:f},(I,O)=>e.widths?.[O]?(e.widths[O]??0)*ue:void 0),a=g.reduce((I,O)=>I+(O??0),0),d=zt(e,{across:Xe(Math.max(i-a,0)/ue,o.small),margins:Xe(2*o.cell.side*96/72,o.small)}),s=g.reduce((I,O,_e)=>I+(O===void 0?d[_e]??1:0),0)||1,R=Math.max(i-a,0),C=g.map((I,O)=>I??R*(d[O]??1)/s),A=C.reduce((I,O)=>I+O,0)||1,v=Math.min(1,i/A),b=C.map(I=>Math.round(I*v)),P=Lt(e),q=(e.head===void 0||e.head==="both")&&!P,ce=e.head==="column"||e.head==="both",Ae=Mt(e),Te=P?e.rows.slice(1):e.rows;return new F({layout:H.FIXED,width:{size:b.reduce((I,O)=>I+O,0),type:p.DXA},columnWidths:b,...t.indent===0?{}:{indent:{size:t.indent,type:p.DXA}},rows:Te.map((I,O)=>new G({tableHeader:q&&O===0,cantSplit:!0,children:Array.from({length:f},(_e,Ee)=>{const Re=q&&O===0,ke=ce&&Ee===0&&!Re;return new _({width:{size:b[Ee]??0,type:p.DXA},...Re?{shading:B(Pt)}:{},borders:{top:O===0?{style:y.SINGLE,size:8,color:ge}:{style:y.NONE,size:0,color:"auto"},left:{style:y.NONE,size:0,color:"auto"},right:{style:y.NONE,size:0,color:"auto"},bottom:O===Te.length-1?{style:y.SINGLE,size:8,color:ge}:Re?{style:y.SINGLE,size:6,color:ge}:{style:y.SINGLE,size:4,color:Me}},margins:{top:E(o.cell.top),bottom:E(o.cell.top),left:E(o.cell.side),right:E(o.cell.side),marginUnitType:p.DXA},children:[new h({spacing:{after:0},...Ae.has(Ee)?{alignment:m.RIGHT}:{},children:U(I[Ee]??[],{bold:ke||Re,size:o.small*2})})]})})}))})},ae=(e,t,i,f,g,a)=>{const d=j(e.align),s={...L(t),...d===void 0?{}:{alignment:d}},R=i===void 0?void 0:e.caption,C=R!==void 0,A=[new h({...s,keepNext:C,...i?{spacing:{line:240,lineRule:n.LineRuleType.AUTO,...C?{after:E(o.caption)}:{}}}:{},children:i?[new x({type:i.type,data:i.data,transformation:Xt(i,e.width,t.room-t.indent),altText:{name:e.alt??"",title:e.caption??e.alt??"",description:e.alt??""}})]:[new M({text:f,color:de})]})];return R!==void 0&&A.push(new h({...s,style:"Caption",children:T(a,[new M({text:Oe(R,g)})])})),A},ye=(e,t)=>{const i=t.room-t.indent,f=e.columns.map(A=>A.width??1),g=f.reduce((A,v)=>A+v,0)||1,a=f.map(A=>Math.round(i*A/g)),d=it(e,t.frame),s={style:y.NONE,size:0,color:"auto"},R={top:s,bottom:s,left:s,right:s,insideHorizontal:s,insideVertical:s},C=Ft/2;return new F({layout:H.FIXED,width:{size:i,type:p.DXA},columnWidths:a,borders:R,...t.indent===0?{}:{indent:{size:t.indent,type:p.DXA}},rows:[new G({cantSplit:ft(e,r.page),children:e.columns.map((A,v)=>{const b=a[v]??0,P=v===0?0:C,q=v===e.columns.length-1?0:C,ce=N(V(A.blocks,{indent:0,level:0,room:b-P-q,frame:d[v]??t.frame}));return new _({width:{size:b,type:p.DXA},borders:R,margins:{top:0,bottom:0,left:P,right:q,marginUnitType:p.DXA},children:ce})})})]})},K=(e,t,i)=>{const f=ee(e.look?.color,Se),g=V(e.children??[],Ke(t)),a=D(e.look),d=Ge;return e.type==="check"?[new h({...a,...L(t),style:d,children:[new M({text:e.checked?"☑ ":"☐ "}),...U(e.content,{color:f})]}),...g]:[new h({...a,style:d,numbering:e.type==="bullet"?{reference:Be,level:t.level}:{reference:`start-${String(i.start)}`,level:t.level,instance:i.id},children:U(e.content,{color:f})}),...g]},De=(e,t)=>{const i="look"in e?e.look:void 0,f=ee(i?.color,Se),g=D(i),a=()=>"children"in e?V(e.children??[],Ke(t)):[];switch(e.type){case"paragraph":case"toggle":return[new h({...r.sets.align&&e.look?.align===void 0?{alignment:m.JUSTIFIED}:{},...g,...r.sets.indent&&e.type==="paragraph"?{indent:{left:t.indent,firstLine:Math.round(r.page.textIndent*r.page.size*20)}}:L(t),children:U(e.content,{color:f})}),...a()];case"heading":return[new h({...g,...L(t),...e===r.title?{heading:n.HeadingLevel.TITLE}:{heading:n.HeadingLevel[`HEADING_${String(e.level)}`]},children:T(r.anchors.get(e),U(e.content,{color:f}))}),...a()];case"quote":return[new h({...g,indent:{left:t.indent+E(o.quote)},border:{left:{style:y.SINGLE,color:l??ge,size:l?12:6,space:Math.floor(o.quote-(l?1.5:.75))}},children:U(e.content,{color:f??fe})}),...a()];case"callout":return[me(e,t),...J()];case"card":return[we(e,t),...J()];case"stats":return[oe(e,t),...J()];case"code":{if(e.language===ve.math||e.language===ve.mermaid){const R=u.drawn?.(e);if(R)return ae({...e.language===ve.math?{}:{align:"center"}},t,R,"")}const d=R=>({style:y.SINGLE,color:Ce,size:4,space:R}),s=E(o.box.side+.5);return[new h({indent:{left:t.indent+s,right:s},shading:B(Ce),border:{top:d(o.box.top),bottom:d(o.box.top),left:d(o.box.side),right:d(o.box.side)},keepLines:!0,children:e.code.split(`
|
|
4
|
+
`).map((R,C)=>new M({text:R,font:X,size:o.small*2,...C>0?{break:1}:{}}))})]}case"columns":return[ye(e,t)];case"chart":{const d=r.numbers.get(e),s=d===void 0?void 0:e.title,{chart:R,problems:C}=nt(s===void 0?e:ct(e),u),A=he(y.DASHED,Me);if(!R)return[new h({...L(t),alignment:m.CENTER,border:{top:A,bottom:A,left:A,right:A},children:[new M({text:[e.title??"Chart",...C].join(": "),color:de})]})];const v=et(e,t.frame),b=(t.room-t.indent)/ue,P=Math.min(1,b/v.width);return k.push({chart:R,width:Math.round(v.width*P),height:Math.round(v.height*P),words:tt(e,R)}),[new h({...L(t),alignment:m.CENTER,keepNext:s!==void 0,spacing:{line:240,lineRule:n.LineRuleType.AUTO},children:[new M({text:`${je}${String(k.length)}`})]}),...s===void 0?[]:[new h({...L(t),alignment:m.CENTER,style:"Caption",children:T(e.id,[new M({text:Oe(s,d)})])})]]}case"image":return ae(e,t,u.picture?.(e.src),e.alt??e.caption??e.src,r.numbers.get(e),e.id);case"component":{const d=u.component?.(e);if(d)return ae(e,t,d,"",r.numbers.get(e),e.id);const s=he(y.DASHED,Me);return[new h({...L(t),alignment:m.CENTER,border:{top:s,bottom:s,left:s,right:s},children:[new M({text:ot(e),color:de})]})]}case"table":return[...e.caption===void 0?[]:[new h({...L(t),style:"Caption",keepNext:!0,spacing:{after:E(o.caption)},children:T(e.id,[new M({text:Oe(e.caption,r.numbers.get(e))})])})],se(e,t),...J()];case"pagebreak":return[new h({spacing:{before:0,after:0,line:20,lineRule:n.LineRuleType.EXACT},children:[new n.PageBreak]})];case"bibliography":{const{page:d}=r,s=d.textIndent>0?Math.round(d.textIndent*d.size*20):480;return r.sources.map(R=>new h({...L(t),alignment:m.LEFT,indent:{left:t.indent+s,hanging:s},spacing:{after:E(o.after)},children:R.pieces.map(C=>{const A=C.italic?{italics:!0}:{};return new M({text:C.text,...A})})}))}case"toc":{const d=e.levels??3,s=r.headings.filter(A=>A.level<=d).map(A=>{const v=r.anchors.get(A)??"",b=u.headingPage?.(v),P=r.bookmarks.get(v);return{title:A.content.map(q=>q.text).join(""),level:A.level,...b===void 0?{}:{page:b},...P===void 0?{}:{href:P}}}),R=Math.min(...s.map(A=>A.level)),C=at(e,r.chinese);return[...C===""?[]:[new h({style:qe,text:C})],new n.TableOfContents(void 0,{hyperlink:!0,headingStyleRange:`1-${String(d)}`,beginDirty:!1,cachedEntries:s.map(A=>({...A,level:A.level-R+1}))})]}case"note":return[];case"divider":return[new h({...L(t),spacing:{before:E(o.divider),after:E(o.divider),line:20,lineRule:n.LineRuleType.EXACT},border:{bottom:{style:y.SINGLE,color:Le,size:4,space:0}}})];case"embed":{const d=/^<\s*([A-Za-z][\w.]*)/.exec(e.source.trim())?.[1],s=he(y.DASHED,Me);return[new h({...L(t),alignment:m.CENTER,border:{top:s,bottom:s,left:s,right:s},children:[new M({text:d??"",color:de})]})]}case"source":return[];case"bullet":case"numbered":case"check":return[]}};function V(e,t){const i=[];let f,g;for(const a of e){if(!Ht(a)){f=void 0,g=void 0,i.push(...De(a,t));continue}if(f===void 0||g===void 0||g.type==="numbered"!=(a.type==="numbered")){const d=a.type==="numbered"?a.start??1:1;$.add(d),f={id:++ne,start:d}}g=a,i.push(...K(a,t,f))}return i.flatMap((a,d)=>a instanceof F&&i[d+1]instanceof F?[a,Q(0)]:[a])}return{charts:k,body:(e,t)=>V(e,Ne(t)),footnotes:e=>Object.fromEntries([...ze(e)].flatMap(t=>{if(t.type!=="note")return[];const i=S.get(t.label.toLowerCase());if(i===void 0)return[];const f=V(t.children??[],Ne(Y(r.page.width)-Y(r.page.margins.left+r.page.margins.right))).filter(g=>g instanceof h);return[[String(i),{children:[new h({spacing:{after:40},children:U(t.content,{size:18,color:fe})}),...f]}]]})),numbering:()=>[{reference:Be,levels:Array.from({length:9},(e,t)=>({level:t,format:n.LevelFormat.BULLET,text:["•","◦","▪"][t%3]??"•",alignment:m.LEFT,style:{paragraph:{indent:{left:(t+1)*pe,hanging:pe}}}}))},...[...$].sort((e,t)=>e-t).map(e=>({reference:`start-${String(e)}`,levels:Array.from({length:9},(t,i)=>({level:i,format:[n.LevelFormat.DECIMAL,n.LevelFormat.LOWER_LETTER,n.LevelFormat.LOWER_ROMAN][i%3]??n.LevelFormat.DECIMAL,text:`%${String(i+1)}.`,alignment:m.LEFT,...i===0?{start:e}:{},style:{paragraph:{indent:{left:(i+1)*pe,hanging:pe}}}}))}))]}}const Gt="1980-01-01T00:00:00Z",Ye=9525,Ve="http://schemas.openxmlformats.org/officeDocument/2006/relationships",Bt=n=>n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function Wt(n,u,w,l,S){return n.forEach((z,r)=>{const m=String(r+1),y=`rIdChart${m}`,c=`Microsoft_Excel_Worksheet${m}.xlsx`;S(`word/charts/chart${m}.xml`,Je(z.chart,{width:z.width*.75,height:z.height*.75},"rId1",{frameless:!0})),S(`word/charts/_rels/chart${m}.xml.rels`,`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
5
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${Ve}/package" Target="../embeddings/${c}"/></Relationships>`),S(`word/embeddings/${c}`,Qe(z.chart)),w=w.replace("</Relationships>",`<Relationship Id="${y}" Type="${Ve}/chart" Target="charts/chart${m}.xml"/></Relationships>`),l=l.replace("</Types>",`<Override ContentType="application/vnd.openxmlformats-officedocument.drawingml.chart+xml" PartName="/word/charts/chart${m}.xml"/></Types>`);const x=String(z.width*Ye),h=String(z.height*Ye),Z=`<w:r><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${x}" cy="${h}"/><wp:effectExtent l="0" t="0" r="0" b="0"/><wp:docPr id="0" name="Chart ${m}" descr="${Bt(z.words)}"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart"><c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" r:id="${y}"/></a:graphicData></a:graphic></wp:inline></w:drawing></w:r>`;u=u.replace(new RegExp(`<w:r>(?:(?!<w:r>).)*?<w:t[^>]*>${je}${m}</w:t></w:r>`,"su"),Z)}),n.length>0&&!l.includes('Extension="xlsx"')&&(l=l.replace("</Types>",'<Default ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" Extension="xlsx"/></Types>')),{document:u,rels:w,types:l}}function jt(n,u,w){const l=u.unzipSync(n),S=p=>{const N=l[p];return N&&new TextDecoder().decode(N)},z=(p,N)=>{l[p]=typeof N=="string"?new TextEncoder().encode(N):N},r="word/document.xml",m="word/_rels/document.xml.rels",y="[Content_Types].xml",c=Wt(w,S(r)??"",S(m)??"",S(y)??"",z);z(y,c.types);let x=c.document,h=c.rels;[...new Set([...x.matchAll(/w:hyperlink [^>]*r:id="([^"]+)"/g)].map(p=>p[1]??""))].forEach((p,N)=>{const X=`rIdLink${String(N+1)}`;x=x.split(`"${p}"`).join(`"${X}"`),h=h.split(`"${p}"`).join(`"${X}"`)});let F=0;x=x.replace(/<wp:docPr id="\d+"/g,()=>`<wp:docPr id="${String(++F)}"`);const _=new Map;x=x.replace(/<w:bookmarkStart w:name="([^"]*)" w:id="(\d+)"/g,(p,N,X)=>{const $=String(_.size+1);return _.set(X,$),`<w:bookmarkStart w:name="${N}" w:id="${$}"`}),x=x.replace(/<w:bookmarkEnd w:id="(\d+)"/g,(p,N)=>{const X=_.get(N);return X===void 0?p:`<w:bookmarkEnd w:id="${X}"`}),z(r,x),z(m,h);const H="docProps/core.xml",G=S(H);G!==void 0&&z(H,G.replace(/(<dcterms:(?:created|modified)[^>]*>)[^<]*/g,`$1${Gt}`));const M=Object.fromEntries(Object.entries(l).sort(([p],[N])=>p<N?-1:1));return u.zipSync(M,{mtime:new Date(1980,0,1)})}const be=(n,u)=>{const w=We[n];return{ascii:w.latin,hAnsi:w.latin,cs:w.latin,eastAsia:w.eastAsia??u}};function Kt(n,u,w){const l={left:[],center:[],right:[]};u.left!==void 0&&l.left.push(u.left),u.center!==void 0&&l.center.push(u.center),u.right!==void 0&&l.right.push(u.right),u.outside!==void 0&&l[w.odd?"right":"left"].push(u.outside),u.inside!==void 0&&l[w.odd?"left":"right"].push(u.inside);const S={size:Math.round(w.size*2),color:w.color,font:be(w.face,w.eastAsia)},z=r=>r.split(/(\{title\}|\{section\}|\{page\}|\{pages\})/u).filter(m=>m!=="").map(m=>m==="{page}"?new n.TextRun({...S,children:[n.PageNumber.CURRENT]}):m==="{pages}"?new n.TextRun({...S,children:[n.PageNumber.TOTAL_PAGES]}):m==="{section}"?new n.SimpleField(`STYLEREF "heading ${String(w.section)}"`,""):new n.TextRun({...S,text:m==="{title}"?w.title:m}));return new n.Paragraph({style:w.style,tabStops:[{type:n.TabStopType.CENTER,position:Math.round(w.width/2)},{type:n.TabStopType.RIGHT,position:w.width}],children:[...z(l.left.join(" ")),new n.TextRun({...S,children:[new n.Tab]}),...z(l.center.join(" ")),new n.TextRun({...S,children:[new n.Tab]}),...z(l.right.join(" "))]})}const Ze=(n,u,w,l)=>({run:{...u?.font===void 0?{}:{font:be(n.font,w)},...u?.size===void 0?{}:{size:Math.round(n.size*2)},...u?.weight===void 0?{}:{bold:n.weight==="bold"},...u?.italic===void 0?{}:{italics:n.italic}},paragraph:u?.align===void 0?{}:{alignment:n.align==="center"?l.AlignmentType.CENTER:n.align==="right"?l.AlignmentType.RIGHT:l.AlignmentType.LEFT}});function qt(n){const u=new Map,w=new Set;return n.forEach((l,S)=>{const z=l.replace(/[^A-Za-z0-9_]/gu,"_").replace(/^[^A-Za-z]+/u,"");let r=`b_${z}`.slice(0,32);(w.has(r)||z==="")&&(r=`b_${String(S)}_${z}`.slice(0,40)),w.add(r),u.set(l,r)}),u}export async function docxOf(n,u,w,l={}){const S=l.page??{},z=Fe(S).citationStyle??"apa",r=ht(w,l.sources??[],z,"block"),m=lt(w,l.sources??[],z),y=Fe(S),c=Et(S),x=We[c.font].eastAsia??_t(St(r)),h=be(c.font,x),Z=ee(wt(l.page),{}),F=mt(r),_=st(r,S),H=new Map;for(const T of ze(r)){const D=$e(T),L=_.get(T);D!==void 0&&L!==void 0&&H.set(D,L.label)}for(const[T,D]of F)T.type==="heading"&&H.set(D,T.content.map(L=>L.text).join(""));const{title:G}=Rt(r),M=[...ze(r)].filter(T=>T.type==="heading"&&T!==G),p=qt([...F.values(),...[...ze(r)].flatMap(T=>{const D=$e(T);return D===void 0?[]:[D]})]),N=Ut(n,l,x,Z,xt(r),bt(r),{page:c,sets:{indent:y.textIndent!==void 0&&y.textIndent>0,align:y.textAlign==="justify"},numbers:_,refs:H,bookmarks:p,anchors:F,title:G,headings:M,chinese:dt(r),sources:m}),X=gt(r),$={width:Y(c.width),height:Y(c.height)},ne={top:Y(c.margins.top),bottom:Y(c.margins.bottom),left:Y(c.margins.left),right:Y(c.margins.right)},k=l.cover,B=[c.header,c.footer].some(T=>T!==void 0&&(T.outside!==void 0||T.inside!==void 0)),he=X.map((T,D)=>{const L=T.landscape?$.height:$.width,re=L-ne.left-ne.right,me=N.body(T.blocks,re);if(D===0&&k){const K=Math.round(L/ue);me.unshift(new n.Paragraph({spacing:{before:0,after:0},children:[new n.ImageRun({type:k.type,data:k.data,transformation:{width:K,height:Math.round(K*Nt)},floating:{horizontalPosition:{relative:n.HorizontalPositionRelativeFrom.PAGE,offset:0},verticalPosition:{relative:n.VerticalPositionRelativeFrom.PAGE,offset:0},allowOverlap:!1,margins:{bottom:324e3},wrap:{type:n.TextWrappingType.TOP_AND_BOTTOM}},altText:{name:"Cover",title:"Cover",description:""}})]}))}const we=(K,De,V)=>{if(K===void 0)return;const e=t=>Kt(n,K,{style:V,odd:t,width:re,title:l.title??"",section:Math.min(...M.map(i=>i.level),6),face:K.font??c.font,eastAsia:x,size:K.size===void 0?Math.max(7.5,c.size*.75):He(K.size),color:De?de:le});return{default:e(!0),...B?{even:e(!1)}:{}}},oe=we(c.header,y.header===void 0,"Header"),se=we(c.footer,y.footer===void 0,"Footer"),ae=D===0&&k!==void 0&&oe!==void 0,ye=y.grid===void 0?void 0:{type:n.DocumentGridType.LINES_AND_CHARS,linePitch:Math.round(Tt(c)*20),charSpace:Math.round(c.textWidth/25.4*72/y.grid.chars-c.size)*4096};return{properties:{page:{size:{width:Math.min($.width,$.height),height:Math.max($.width,$.height),...T.landscape||$.width>$.height?{orientation:n.PageOrientation.LANDSCAPE}:{}},margin:{...ne,header:Math.max(0,ne.top-Y(7)-Math.round(c.size*20*1.2)),footer:Math.max(0,ne.bottom-Y(7)-Math.round(c.size*20*1.2))}},...ye===void 0?{}:{grid:ye},...ae?{titlePage:!0}:{}},...oe===void 0?{}:{headers:{default:new n.Header({children:[oe.default]}),...oe.even?{even:new n.Header({children:[oe.even]})}:{},...ae?{first:new n.Header({children:[]})}:{}}},...se===void 0?{}:{footers:{default:new n.Footer({children:[se.default]}),...se.even?{even:new n.Footer({children:[se.even]})}:{},...ae?{first:new n.Footer({children:[se.default]})}:{}}},children:me}}),o=c.lineHeight,E={spacing:{after:Math.round(c.paragraphSpacing*c.size*20),..."pt"in o?{line:Math.round(o.pt*20),lineRule:n.LineRuleType.EXACT}:{line:Math.round(o.multiple*240),lineRule:n.LineRuleType.AUTO}}},Q=c.spacing,J=T=>Math.round(T*20),j=T=>{const D=y.headings?.[T],L=Ze(c.headings[T],D,x,n);return{run:{size:Math.round(c.headings[T].size*2),bold:!0,font:h,color:le,...L.run},paragraph:{spacing:{before:J(Q.heading.before),after:J(Q.heading.after)},keepNext:!0,keepLines:!0,...c.headings[T].rule?{border:{bottom:{style:n.BorderStyle.SINGLE,size:4,color:Le,space:ut}}}:{},...L.paragraph}}},ie=Ze(c.title,y.title,x,n),U=new n.Document({creator:"AllyHub",lastModifiedBy:"AllyHub",...l.title===void 0?{}:{title:l.title},...B?{evenAndOddHeaderAndFooters:!0}:{},numbering:{config:N.numbering()},styles:{default:{document:{run:{font:h,size:Math.round(c.size*2),color:le},paragraph:E},hyperlink:{run:{color:Z??le,underline:{color:Z??ge}}},title:{run:{size:Math.round(c.title.size*2),bold:!0,font:h,color:le,...ie.run},paragraph:{spacing:{before:0,after:J(Q.title)},keepNext:!0,...ie.paragraph}},heading1:j(1),heading2:j(2),heading3:j(3),heading4:j(4),heading5:j(5),heading6:j(6)},paragraphStyles:[{id:qe,name:"TOC Heading",basedOn:"Normal",next:"Normal",quickFormat:!0,...j(1)},{id:"Caption",name:"caption",basedOn:"Normal",next:"Normal",quickFormat:!0,run:{size:Q.small*2,color:de},paragraph:{spacing:{before:0}}},{id:Ge,name:"List Paragraph",basedOn:"Normal",quickFormat:!0,paragraph:{contextualSpacing:!0}},...[["Header",c.header,y.header===void 0],["Footer",c.footer,y.footer===void 0]].flatMap(([T,D,L])=>D===void 0?[]:[{id:T,name:T.toLowerCase(),basedOn:"Normal",run:{size:Math.round((D.size===void 0?Math.max(7.5,c.size*.75):He(D.size))*2),color:L?de:le,font:be(D.font??c.font,x)},paragraph:{spacing:{before:0,after:0,line:240}}}])]},sections:he,footnotes:N.footnotes(r)}),xe=await n.Packer.toBuffer(U);return jt(new Uint8Array(xe),u,N.charts)}
|