allyhub 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio-text.js +1 -1
- package/dist/commands/add.js +2 -2
- package/dist/commands/cloud-tools.js +5 -5
- package/dist/commands/dev.js +1 -1
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/sheet.js +1 -1
- package/dist/commands/frames.js +8 -8
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/common.js +1 -1
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/render.js +1 -1
- package/dist/commands/sheet.js +5 -5
- package/dist/commands/site.js +3 -2
- package/dist/commands/skills.js +3 -3
- package/dist/commands/slides.js +2 -2
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
- package/dist/node_modules/@allyhub-next/browser/dist/html.js +1 -1
- package/dist/node_modules/@allyhub-next/browser/package.json +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/build/dist/content.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +3 -3
- package/dist/node_modules/@allyhub-next/build/dist/move-refs.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/move-refs.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +12 -3
- package/dist/node_modules/@allyhub-next/build/dist/plugin.js +7 -6
- package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +9 -5
- package/dist/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/vite.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/build/dist/vite.js +2 -2
- package/dist/node_modules/@allyhub-next/build/package.json +1 -1
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
- package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
- package/dist/node_modules/@allyhub-next/check/dist/check.js +3 -3
- package/dist/node_modules/@allyhub-next/check/package.json +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/call.js +4 -2
- package/dist/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/hashes.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub-next/components/package.json +1 -1
- package/dist/node_modules/@allyhub-next/components/r/caption-subtitle.json +1 -1
- package/dist/node_modules/@allyhub-next/components/src/caption-subtitle.ts +54 -16
- package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/fonts.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/writer.js +2 -2
- package/dist/node_modules/@allyhub-next/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub-next/doc/package.json +1 -1
- package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +1 -1
- package/dist/node_modules/@allyhub-next/export/dist/export.js +5 -5
- package/dist/node_modules/@allyhub-next/export/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/export/package.json +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +69 -18
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +847 -116
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +501 -38
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
- package/dist/node_modules/@allyhub-next/measure/package.json +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/media/dist/sheet.js +7 -7
- package/dist/node_modules/@allyhub-next/media/package.json +1 -1
- package/dist/node_modules/@allyhub-next/model/package.json +1 -1
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-measure.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/project/dist/session.js +1 -1
- package/dist/node_modules/@allyhub-next/project/dist/stills.js +2 -0
- package/dist/node_modules/@allyhub-next/project/package.json +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +79 -5
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +21 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +396 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
- package/dist/node_modules/@allyhub-next/registry/package.json +1 -1
- package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.js +3 -2
- package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
- package/dist/node_modules/@allyhub-next/render/dist/doc/pdf.js +34 -0
- package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +4 -4
- package/dist/node_modules/@allyhub-next/render/dist/exports.js +2 -2
- package/dist/node_modules/@allyhub-next/render/dist/pdf.js +2 -0
- package/dist/node_modules/@allyhub-next/render/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtime/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
- package/dist/node_modules/@allyhub-next/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/download.d.ts +19 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/download.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +19 -2
- package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +3 -3
- package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -3
- package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
- package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +4 -4
- package/dist/node_modules/@allyhub-next/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
- package/dist/node_modules/@allyhub-next/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
- package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
- package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +3 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +42 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +59 -39
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +27 -13
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +179 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +2 -4
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +17 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +21 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +4 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +3 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +4 -0
- package/dist/{site.js → node_modules/@allyhub-next/slides-pptx/dist/read/model.js} +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/table.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +5 -5
- package/dist/node_modules/@allyhub-next/slides-runtime/package.json +5 -1
- package/dist/node_modules/@allyhub-next/stage/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/stage/dist/page.js +22 -12
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +5 -5
- package/dist/node_modules/@allyhub-next/stage/dist/server.js +1 -1
- package/dist/node_modules/@allyhub-next/stage/package.json +1 -1
- package/dist/node_modules/@allyhub-next/stage-page/dist/host.js +1 -20
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/probe.html +8 -0
- package/dist/{astro.js → node_modules/@allyhub-next/stage-page/dist/runtime/probe.js} +1 -1
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +79 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.html +21 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +3 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.html +9 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.js +3 -0
- package/dist/node_modules/@allyhub-next/stage-page/package.json +2 -3
- package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
- package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/website/LICENSE +241 -0
- package/dist/node_modules/@allyhub-next/website/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/website/dist/publish.js +3 -0
- package/dist/node_modules/@allyhub-next/website/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub-next/website/dist/website.js +4 -0
- package/dist/node_modules/@allyhub-next/website/package.json +13 -0
- package/dist/text/facts-text.js +4 -4
- package/dist/works.js +1 -1
- package/editor-web/assets/calc-worker-Bz9r26p1.js +158 -0
- package/editor-web/assets/dist-B-BI8jma.js +37 -0
- package/editor-web/assets/dist-CS-Z5JSF.js +224 -0
- package/editor-web/assets/dist-ClE1xUdI.js +10 -0
- package/editor-web/assets/dist-Cqu9f1N5.js +1 -0
- package/editor-web/assets/dist-CsDICOqP.js +36 -0
- package/editor-web/assets/dist-DegNYCaB.js +10 -0
- package/editor-web/assets/dist-EotuIcA_.js +2 -0
- package/editor-web/assets/index-CwDs3z43.js +69 -0
- package/editor-web/assets/index-ujKjdu_s.css +2 -0
- package/editor-web/assets/minus-DLhpe7h_.js +1 -0
- package/editor-web/assets/react-CT8OUeCe.js +101 -0
- package/editor-web/assets/tabs-BEPTOFm5.js +105 -0
- package/editor-web/assets/text-align-start-CfqIQSWH.js +1 -0
- package/editor-web/index.html +5 -5
- package/package.json +8 -14
- package/dist/astro.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +0 -52
- package/dist/node_modules/@allyhub-next/audio/dist/decode.d.ts +0 -33
- package/dist/node_modules/@allyhub-next/audio/dist/envelope.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/audio/dist/index.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/audio/dist/levels.d.ts +0 -97
- package/dist/node_modules/@allyhub-next/audio/dist/master.d.ts +0 -29
- package/dist/node_modules/@allyhub-next/audio/dist/music.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -25
- package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -31
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +0 -8
- package/dist/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +0 -60
- package/dist/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +0 -31
- package/dist/node_modules/@allyhub-next/audio/dist/plan.d.ts +0 -143
- package/dist/node_modules/@allyhub-next/audio/dist/recorded.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +0 -89
- package/dist/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -64
- package/dist/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +0 -56
- package/dist/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +0 -64
- package/dist/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/audio/dist/render.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/sfx.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/audio/dist/shape.d.ts +0 -118
- package/dist/node_modules/@allyhub-next/audio/dist/voice.d.ts +0 -45
- package/dist/node_modules/@allyhub-next/browser/dist/browser.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/browser/dist/capture.d.ts +0 -61
- package/dist/node_modules/@allyhub-next/browser/dist/cdp.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/browser/dist/flags.d.ts +0 -13
- package/dist/node_modules/@allyhub-next/browser/dist/frames.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/browser/dist/html.d.ts +0 -19
- package/dist/node_modules/@allyhub-next/browser/dist/index.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/browser/dist/launch.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/browser/dist/page.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/browser/dist/server.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/check/dist/cache.d.ts +0 -46
- package/dist/node_modules/@allyhub-next/check/dist/check.d.ts +0 -142
- package/dist/node_modules/@allyhub-next/check/dist/generated.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/check/dist/index.d.ts +0 -7
- package/dist/node_modules/@allyhub-next/check/dist/plans.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/check/dist/result.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/check/dist/scenery.d.ts +0 -23
- package/dist/node_modules/@allyhub-next/dev-server/dist/background.d.ts +0 -50
- package/dist/node_modules/@allyhub-next/dev-server/dist/card.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/dev-server/dist/index.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -77
- package/dist/node_modules/@allyhub-next/dev-server/dist/mime.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/mime.js +0 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/paths.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/dev-server/dist/project.d.ts +0 -153
- package/dist/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/dev-server/dist/server.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/dev-server/dist/sound.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +0 -82
- package/dist/node_modules/@allyhub-next/dev-server/dist/stage.js +0 -121
- package/dist/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/dev-server/dist/validate.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/dev-server/dist/writer.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/export/dist/batch.d.ts +0 -70
- package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +0 -123
- package/dist/node_modules/@allyhub-next/export/dist/index.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
- package/dist/node_modules/@allyhub-next/measure/dist/compare.d.ts +0 -195
- package/dist/node_modules/@allyhub-next/measure/dist/contrast.d.ts +0 -14
- package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -90
- package/dist/node_modules/@allyhub-next/measure/dist/cuts.d.ts +0 -108
- package/dist/node_modules/@allyhub-next/measure/dist/facts.d.ts +0 -60
- package/dist/node_modules/@allyhub-next/measure/dist/fidelity.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/measure/dist/flat.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/measure/dist/loop.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/measure/dist/overlay.d.ts +0 -57
- package/dist/node_modules/@allyhub-next/measure/dist/recording-report.d.ts +0 -66
- package/dist/node_modules/@allyhub-next/measure/dist/reference/compare.d.ts +0 -118
- package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -75
- package/dist/node_modules/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.d.ts +0 -53
- package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.d.ts +0 -53
- package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.d.ts +0 -84
- package/dist/node_modules/@allyhub-next/measure/dist/reference/text.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -55
- package/dist/node_modules/@allyhub-next/measure/dist/seams.d.ts +0 -46
- package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.d.ts +0 -74
- package/dist/node_modules/@allyhub-next/measure/dist/sound-report.d.ts +0 -156
- package/dist/node_modules/@allyhub-next/measure/dist/still.d.ts +0 -58
- package/dist/node_modules/@allyhub-next/measure/dist/version-voice.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/project/dist/console.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/project/dist/digest.d.ts +0 -9
- package/dist/node_modules/@allyhub-next/project/dist/index.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/project/dist/ledger.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/project/dist/media-index.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/project/dist/page.d.ts +0 -119
- package/dist/node_modules/@allyhub-next/project/dist/says.d.ts +0 -15
- package/dist/node_modules/@allyhub-next/project/dist/scenery.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/project/dist/session.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/project/dist/stretch.d.ts +0 -38
- package/dist/node_modules/@allyhub-next/project/dist/version.d.ts +0 -114
- package/dist/node_modules/@allyhub-next/render/dist/cap.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/render/dist/capture.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/render/dist/clip.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/composite.d.ts +0 -106
- package/dist/node_modules/@allyhub-next/render/dist/delivery.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/render/dist/encode.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/render/dist/errors.d.ts +0 -15
- package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.d.ts +0 -75
- package/dist/node_modules/@allyhub-next/render/dist/footage.d.ts +0 -169
- package/dist/node_modules/@allyhub-next/render/dist/image.d.ts +0 -16
- package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/render/dist/junction.d.ts +0 -70
- package/dist/node_modules/@allyhub-next/render/dist/look.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +0 -178
- package/dist/node_modules/@allyhub-next/render/dist/parts.d.ts +0 -140
- package/dist/node_modules/@allyhub-next/render/dist/png.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/render/dist/pool.d.ts +0 -54
- package/dist/node_modules/@allyhub-next/render/dist/post-probe.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/post.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/render.d.ts +0 -151
- package/dist/node_modules/@allyhub-next/render/dist/segments.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/render/dist/sound.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/render/dist/stills.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/render/dist/tools.d.ts +0 -25
- package/dist/node_modules/@allyhub-next/render/dist/webp.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +0 -211
- package/dist/node_modules/@allyhub-next/runtime/dist/captions.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/runtime/dist/clock.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/runtime/dist/compose.d.ts +0 -149
- package/dist/node_modules/@allyhub-next/runtime/dist/console.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/runtime/dist/contrast.d.ts +0 -13
- package/dist/node_modules/@allyhub-next/runtime/dist/embed.d.ts +0 -50
- package/dist/node_modules/@allyhub-next/runtime/dist/env.d.ts +0 -101
- package/dist/node_modules/@allyhub-next/runtime/dist/errors.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/runtime/dist/facade.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/runtime/dist/fonts.d.ts +0 -110
- package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -52
- package/dist/node_modules/@allyhub-next/runtime/dist/frame.d.ts +0 -61
- package/dist/node_modules/@allyhub-next/runtime/dist/guards.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/runtime/dist/index.d.ts +0 -14
- package/dist/node_modules/@allyhub-next/runtime/dist/inspect.d.ts +0 -112
- package/dist/node_modules/@allyhub-next/runtime/dist/locate.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/runtime/dist/measure.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/runtime/dist/music.d.ts +0 -29
- package/dist/node_modules/@allyhub-next/runtime/dist/output.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/runtime/dist/pictures.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/runtime/dist/piece.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -57
- package/dist/node_modules/@allyhub-next/runtime/dist/player/player.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/runtime/dist/reads.d.ts +0 -132
- package/dist/node_modules/@allyhub-next/runtime/dist/sound.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/runtime/dist/speech.d.ts +0 -107
- package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/runtime/dist/stage.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/runtime/dist/styles.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/runtime/dist/takes.d.ts +0 -72
- package/dist/node_modules/@allyhub-next/runtime/dist/titles.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/runtime/dist/transitions.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/site/dist/assets.d.ts +0 -59
- package/dist/node_modules/@allyhub-next/site/dist/assets.js +0 -2
- package/dist/node_modules/@allyhub-next/site/dist/astro.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/site/dist/astro.js +0 -3
- package/dist/node_modules/@allyhub-next/site/dist/lockfile.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/site/dist/lockfile.js +0 -3
- package/dist/node_modules/@allyhub-next/site/dist/media.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/site/dist/media.js +0 -4
- package/dist/node_modules/@allyhub-next/site/package.json +0 -25
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +0 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -45
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -56
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -72
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -43
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/stage/dist/bakes.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/stage/dist/graphics.d.ts +0 -7
- package/dist/node_modules/@allyhub-next/stage/dist/identity.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/stage/dist/index.d.ts +0 -9
- package/dist/node_modules/@allyhub-next/stage/dist/page.d.ts +0 -87
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.d.ts +0 -69
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -49
- package/dist/node_modules/@allyhub-next/stage/dist/scenery.d.ts +0 -8
- package/dist/node_modules/@allyhub-next/stage/dist/server.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/stage-page/dist/host.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
- package/dist/site.d.ts +0 -2
- package/editor-web/assets/dist-BW2s9FMO.js +0 -4
- package/editor-web/assets/dist-C-6JmebI.js +0 -233
- package/editor-web/assets/dist-CCYMLMKN.js +0 -6
- package/editor-web/assets/dist-CHzurjMx.js +0 -33
- package/editor-web/assets/dist-DF7H1dxw.js +0 -1
- package/editor-web/assets/dist-Da5AUSKX.js +0 -2
- package/editor-web/assets/index-B7S9RZhL.css +0 -2
- package/editor-web/assets/index-CovQYWvD.js +0 -69
- package/editor-web/assets/minus-BrvjaJyO.js +0 -1
- package/editor-web/assets/react-DV5fPdiH.js +0 -101
- package/editor-web/assets/textarea-B0vCGdZI.js +0 -105
- package/editor-web/assets/trash-2-B0dvc1cZ.js +0 -1
- package/editor-web/assets/undo-2-A1EPubPO.js +0 -1
- /package/dist/node_modules/@allyhub-next/{site → ooxml}/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
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 m}from"node:crypto";import{resolve as v}from"node:path";import{FILE_METHODS as y,HOST_METHODS as w,JSONRPC as c,PROJECT_TOOLS as h,RPC_ERROR as l,RequestSchema as g,RpcError as d,answer as f}from"@allyhub-next/protocol";import{Checker as O,Indexer as x}from"./background.js";import{Exports as S}from"./exports.js";import{hasFileManager as k,revealFile as R}from"./reveal.js";import{Live as E}from"./live.js";import{fileIn as u}from"./paths.js";import{toolHandlers as p}from"./tools.js";import{Watcher as T}from"./watcher.js";import{Writer as N}from"./writer.js";export const SERVER_METHODS={...y,"tools/call":w["tools/call"]};export class ProjectServer{root;writer;watcher;live;exports;reveal;checker;serving;indexer;clients=new Map;constructor(r){this.root=v(r.root),this.live=new E(this.root,r.gpu===void 0?{}:{gpu:r.gpu}),this.watcher=new T(this.root,(e,s)=>{this.sendTo(this.watchOwner(e),"files/changed",{watch:e,changes:s})},e=>{this.live.moved(e),this.notify("project/changed",{revision:e}),this.checker?.schedule()}),this.writer=new N(this.root,(e,s)=>{this.watcher.wrote(e,s)},r.writable),this.reveal=r.reveal===!1?void 0:r.reveal??(k()?R:void 0),this.exports=new S(this.root,e=>{this.notify("export/changed",{job:e})});const i=r.index??process.env.ALLYHUB_NO_INDEX!=="1";if(r.check!==!1){const e=i?new x({root:this.root,emit:s=>{this.notify("index/changed",{jobs:s})},made:()=>{this.checker?.schedule(!0)}}):void 0;this.indexer=e,this.checker=new O({live:this.live,emit:s=>{this.notify("check/changed",s)},...e?{needs:s=>{e.want(s)}}:{},...r.settle===void 0?{}:{settle:r.settle}})}}static open(r){const i=new ProjectServer(r);return i.watcher.start(),i.checker?.schedule(),Promise.resolve(i)}owners=new Map;watchOwner(r){return this.owners.get(r)}connect(r,i={}){const e=`c${m(6).toString("hex")}`;this.clients.set(e,r);const s=this.handlersFor(e,i.origin);return{id:e,receive:async o=>{const t=await this.answerOne(s,o);t&&r(t)},close:()=>{this.clients.delete(e),this.watcher.forget(e);for(const[o,t]of this.owners)t===e&&this.owners.delete(o)}}}channel(){const r=new Set,i=this.connect(e=>{const s=JSON.parse(JSON.stringify(e));queueMicrotask(()=>{for(const o of r)o(s)})});return{send:e=>{i.receive(JSON.parse(JSON.stringify(e)))},listen:e=>(r.add(e),()=>r.delete(e)),close:()=>{i.close()}}}notify(r,i){for(const e of this.clients.values())e({jsonrpc:c,method:r,params:i})}sendTo(r,i,e){r!==void 0&&this.clients.get(r)?.({jsonrpc:c,method:i,params:e})}async answerOne(r,i){const e=g.safeParse(i);if(!e.success){const o=i?.id;return typeof o!="string"&&typeof o!="number"?void 0:{jsonrpc:c,id:o,error:{code:l.invalidRequest,message:"Not a JSON-RPC request."}}}const s=e.data;return Object.hasOwn(w,s.method)&&s.method!=="tools/call"?{jsonrpc:c,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,r,s)}handlersFor(r,i){const{writer:e,watcher:s}=this,o=p({live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,tree:()=>this.serving?.tree(i)});return{"files/read":({path:t})=>e.read(t),"files/write":async({path:t,text:a,over:n})=>({version:await e.write(t,a,n,r)}),"files/upload":async({dir:t,name:a,data:n})=>({path:await e.upload(t,a,Buffer.from(n,"base64"),r)}),"files/url":async({path:t})=>{if(await u(this.root,t),!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,t)}},"files/list":({dir:t})=>e.list(t),"files/move":async({from:t,to:a})=>({rewritten:await e.move(t,a,r)}),"files/remove":async({path:t})=>({trash:await e.remove(t,r)}),"files/trash":async()=>({entries:await e.trash()}),"files/restore":async({id:t})=>({path:await e.restore(t,r)}),"files/watch":async({paths:t})=>{for(const n of t)await u(this.root,n);const a=await s.watch(r,t);return this.owners.set(a,r),{watch:a}},"files/unwatch":({watch:t})=>(this.owners.get(t)===r&&(s.unwatch(t),this.owners.delete(t)),Promise.resolve({})),"tools/call":async({name:t,arguments:a})=>{const n=await f(h,o,{jsonrpc:c,id:0,method:t,params:a});if("error"in n)throw new d(n.error.code,n.error.message,n.error.data);return{result:n.result}}}}async tool(r,i,e={}){const s=await f(h,p({live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,tree:()=>e.tree??this.serving?.tree(void 0)}),{jsonrpc:c,id:0,method:r,params:i});if("error"in s)throw new d(s.error.code,s.error.message,s.error.data);return h[r].result.parse(s.result)}async close(){this.watcher.close(),this.clients.clear(),await this.checker?.close(),await this.indexer?.close(),await this.exports.close(),await this.live.close()}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{isAbsolute as h,relative as p,sep as m}from"node:path";import{within as l}from"@allyhub-next/formats";import{SHARED_KINDS as u,SNAPSHOT_TREE as d}from"@allyhub-next/protocol";import{THREE_LIBS as w}from"@allyhub-next/scenery-host/bundle";export const REACH_SHARED=[d.editor,d.runtime,`${d.build}${w}/`];const O="comments.json",S=t=>u.includes(t);export class Reach{reaching=new Map;dirs;files;constructor(r,n){this.files=n,this.dirs=r.map(s=>s.dir).sort((s,i)=>i.split("/").length-s.split("/").length);for(const s of r)S(s.kind)&&this.reaching.set(s.dir,{tree:new Set,files:new Set,own:[]})}get items(){return[...this.reaching.keys()]}itemOf(r){return this.dirs.find(n=>n!==""&&l(r,n))??(this.dirs.includes("")?"":void 0)}of(r){return this.reaching.get(r)}done(r){for(const s of this.files)if(s.split("/").pop()!==O){const i=this.itemOf(s);i!==void 0&&this.reaching.get(i)?.files.add(s)}const n={};for(const[s,i]of this.reaching)n[s]={tree:[...i.tree].filter(a=>r.has(a)).sort(),files:[...i.files].sort(),own:i.own};return{shared:[...REACH_SHARED],items:n}}}export function pieceBundle(t,r){const n=new Set,s=new Set,i=new Set,a=c=>{if(i.has(c))return;i.add(c);const e=t?.chunks[c];if(e){n.add(e.file);for(const f of[...e.css,...e.assets])n.add(f);for(const f of e.modules)s.add(f);for(const f of[...e.imports,...e.dynamicImports])a(f)}},o=t?.entries[r.replaceAll("/","__")];return o&&a(o.file),{files:n,modules:s}}export function projectPathOf(t,r){const n=t.replace(/[?#].*$/u,"");if(h(n))for(const s of r){const i=p(s,n);if(i!==""&&!i.startsWith("..")&&!h(i))return i.split(m).join("/")}}export function pieceNames(t){const{prepared:r,piece:n,reach:s}=t,i=e=>s.itemOf(e)===n.dir,a=new Set,o=new Set,c=e=>Object.hasOwn(r.media,e);for(const e of t.modules){const f=projectPathOf(e,t.roots);f!==void 0&&c(f)&&a.add(f)}for(const e of Object.keys(r.media))(i(e)||e.startsWith(".allyhub/"))&&a.add(e);for(const e of[...t.reads?.media??[],...t.shows?.media??[]])c(e)&&a.add(e);for(const e of Object.keys(r.data))i(e.split("#")[0]??e)&&o.add(e);for(const e of[...t.reads?.data??[],...t.shows?.data??[]])Object.hasOwn(r.data,e)&&o.add(e);return{media:a,data:o}}export function reachedSource(t,r,n){const s=(o,c)=>Object.fromEntries(Object.entries(o).filter(([e])=>c(e))),i=o=>!n.some(c=>o.startsWith(`${c}.`)),a=o=>Object.fromEntries(Object.entries(o).map(([c,e])=>[c,s(e,i)]));return{...t,media:s(t.media,o=>r.media.has(o)),...t.data?{data:s(t.data,o=>r.data.has(o))}:{},messages:a(t.messages),...t.anchors?{anchors:a(t.anchors)}:{}}}export function reachedCheck(t,r,n){const s=i=>{const a=i.where?.file;return typeof i.piece=="string"&&r.has(i.piece)||typeof a=="string"&&n(a)};return{...t,problems:t.problems.filter(s),facts:t.facts.filter(s)}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{readFile as Q,readdir as U,realpath as V,stat as Y}from"node:fs/promises";import{join as l,sep as Z}from"node:path";import{THREE_LIBS as _}from"@allyhub-next/scenery-host/bundle";import{BAKE_DIR as ee}from"@allyhub-next/scenery-host";import{KeyedStore as te}from"@allyhub-next/project";import{COMPONENT_STILLS_MAX as W,RpcError as ie,SNAPSHOT_TREE as p,pieceSourcePath as se,scenerySourcePath as oe,snapshotAnswerPath as P,snapshotPreviewPath as ne,stillPath as J,stillsIndexKey as re,stillsIndexPath as ce}from"@allyhub-next/protocol";import{deckComponents as ae,isDeckCode as de,readScript as fe,readSlidesFile as le,resolveDeck as pe,scriptWords as me}from"@allyhub-next/slides-core";import{bakesOnDisk as ue}from"@allyhub-next/stage";import{runtimeFiles as he}from"@allyhub-next/stage-page";import{itemPreview as we}from"./card.js";import{mediaTypeOf as H}from"@allyhub-next/formats";import{Reach as ye,pieceBundle as ke,pieceNames as $e,reachedCheck as ge,reachedSource as be}from"./reach.js";import{matteFile as Se}from"./tree.js";const T="https://tree.invalid/";function R(s){return typeof s=="string"?s.startsWith(T)?s.slice(T.length):s:Array.isArray(s)?s.map(R):s!==null&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([y,d])=>[y,R(d)])):s}const b=s=>new TextEncoder().encode(JSON.stringify(s));async function A(s){return(await U(s,{recursive:!0,withFileTypes:!0}).catch(()=>[])).filter(d=>d.isFile()).map(d=>l(d.parentPath,d.name).slice(s.length+1).split(Z).join("/"))}const je=s=>Y(s).then(y=>y.isFile(),()=>!1);export async function recordTree(s,y={}){const{project:d}=s,{live:f,root:w}=d;await d.watcher.settled();const O=new Map,u=(e,t,i=H(e))=>{O.set(e,{path:e,type:i,file:t})},S=(e,t,i=H(e))=>{O.set(e,{path:e,type:i,bytes:t})},z=f.revision,m=await f.prepared(),x=new Map;if(s.ui!==void 0)for(const e of await A(s.ui))u(`${p.editor}${e}`,l(s.ui,e));for(const[e,t]of await he())u(`${p.runtime}${e}`,t);const k=async(e,t)=>{let i;try{i={result:R(await d.tool(e,t,{tree:T}))}}catch(c){i={error:c instanceof ie?{code:c.code,message:c.message}:{code:-32603,message:c instanceof Error?c.message:""}}}const r=P(e,t);S(r,b(i));const o=t.item;return typeof o=="string"&&x.set(o,[...x.get(o)??[],r]),i.result},X=async(e,t,i)=>{if(!de(i.code))return;const r=D=>Q(l(w,D),"utf8").catch(()=>{}),o=await r(i.file),c=o===void 0?void 0:le(o).file;if(!c)return;const a=t.lang??Object.keys(i.scripts)[0],n=a===void 0?void 0:await r(i.scripts[a]??`${e}/script.${a}.yaml`),v=(n===void 0?void 0:fe(n))??{parts:[],slides:[]};return pe({code:i.code,file:c,words:me(v,i.prefix),prefix:i.prefix,base:i.file.split("/").slice(0,-1).join("/"),theme:i.theme}).deck},q=async(e,t,i,r)=>{const o=new Map;for(const $ of ae(r,i))o.set(re($.at),$.at);if(o.size===0)return;const c=te.of(w,"stills"),a={stills:{}},n=h.of(e),v=[...o];for(let $=0;$<v.length;$+=W){const K=v.slice($,$+W);(await d.tool("slides/component-stills",{item:e,version:t.key,components:K.map(([,g])=>g)},{tree:T}).catch(()=>{}))?.stills.forEach((g,G)=>{const L=K[G]?.[0];!g||L===void 0||(a.stills[L]=g.key,u(J(g.key),c.path(`${g.key}.webp`),"image/webp"),n?.tree.add(J(g.key)))})}const D=ce(e,t.key);S(D,b(a),"application/json"),n?.tree.add(D)},F=await k("project/items",{}),E=F?.items??[],h=new ye(E,m.files),j=d.checker?.state,M=j===void 0||j.status==="waiting"||j.status==="running"?{status:"off",revision:f.revision,problems:j?.problems??[],facts:j?.facts??[]}:j;S(P("check/results",{}),b({result:M}));for(const e of h.items){const t=h.of(e),i=new Set(m.pieces.filter(o=>o.dir===e).map(o=>o.id)),r=o=>h.itemOf(o)===e;t?.own.push({path:P("project/items",{}),type:"application/json",bytes:b({result:{...F,items:E.filter(o=>o.dir===e)}})},{path:P("check/results",{}),type:"application/json",bytes:b({result:ge(M,i,r)})})}for(const e of m.bundle?.chunks.files??[])u(`${p.build}${e}`,l(f.pieceDir,e));for(const e of await A(l(f.pieceDir,_)))u(`${p.build}${_}/${e}`,l(f.pieceDir,_,e));const N=new Set(Object.keys(m.media));for(const e of Object.keys(m.media)){const t=Se(w,m.media[e]);t!==void 0&&await je(t)&&u(`${p.matte}${e}`,t,"video/mp4")}const C=new Map;for(const e of E)if(e.kind==="video"||e.kind==="slides"){const t=await k("video/versions",{item:e.dir});await k("video/stage",{item:e.dir});for(const i of t?.versions??[])await k("video/stage",{item:e.dir,version:i.key});if(e.kind==="slides"){const i=await k("slides/deck",{item:e.dir});await k("slides/fonts",{item:e.dir});const r={media:new Set,data:new Set};if(C.set(e.dir,r),i&&t)for(const o of t.versions){const c=await X(e.dir,o,i);if(c){for(const a of c.slides){a.background_picture!==void 0&&r.media.add(a.background_picture);for(const n of a.shapes)n.media&&r.media.add(n.media.path),n.chart?.source!==void 0&&r.data.add(n.chart.source)}await q(e.dir,o,t.width,c)}}}}else if(e.kind==="sheet")await k("sheet/generated",{item:e.dir});else if(e.kind==="scenery"||e.kind==="model"){const t=await f.scenery(e.entry).catch(()=>{});if(!t)continue;for(const i of t.output)u(`${p.scenery}${i}`,l(f.sceneryDir,i));for(const i of await A(l(f.sceneryDir,t.decoders)))u(`${p.scenery}${t.decoders}${i}`,l(f.sceneryDir,t.decoders,i));u(`${p.scenery}${t.manifoldWasm}`,l(f.sceneryDir,t.manifoldWasm)),S(oe(e.entry),b(await f.scenerySource(e.entry)));for(const i of t.media)N.add(i)}for(const e of N)u(`${p.media}${e}`,l(w,e));for(const e of await ue(w))u(`${p.bakes}${e}.bin`,l(w,ee,`${e}.bin`));const I=[w,await V(w).catch(()=>w)];for(const e of m.pieces){const t=await f.source(e.id).catch(()=>{});if(!t)continue;const i=ke(m.bundle?.chunks,e.id),r=$e({prepared:m,piece:e,reach:h,modules:i.modules,roots:I,reads:d.checker?.reads.get(e.id),shows:C.get(e.dir)}),o=m.pieces.filter(n=>n.id!==e.id&&!I.some(v=>i.modules.has(l(v,n.file)))).map(n=>n.id),c=se(e.id);S(c,b(be(t,r,o)));const a=h.of(e.dir);if(a){a.tree.add(c);for(const n of i.files)a.tree.add(`${p.build}${n}`);for(const n of r.media)a.tree.add(`${p.media}${n}`),a.tree.add(`${p.matte}${n}`),a.files.add(n)}}for(const[e,t]of x)for(const i of t)h.of(e)?.tree.add(i);for(const e of m.docs)for(const t of e.shows)h.of(e.dir)?.files.add(t);for(const e of m.sheets)for(const t of e.files)h.of(e.dir)?.files.add(t);const B=y.preview===!1?void 0:y.preview??(e=>we(s,e));if(B)for(const e of E){const t=await B(e).catch(()=>{});if(t===void 0)continue;const i=ne(e.dir);S(i,Buffer.from(JSON.stringify(t)),"application/json"),h.of(e.dir)?.tree.add(i)}return{revision:z,files:[...O.values()],reach:h.done(new Set(O.keys()))}}
|
|
@@ -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 E}from"node:crypto";import{createReadStream as z}from"node:fs";import{readFile as M,stat as W}from"node:fs/promises";import{createServer as J}from"node:http";import{Readable as K}from"node:stream";import{join as P,normalize as G,resolve as q,sep as C}from"node:path";import{getRequestListener as Y}from"@hono/node-server";import{Hono as Q}from"hono";import{WebSocketServer as V}from"ws";import{KeyedStore as X}from"@allyhub-next/project";import{SNAPSHOT_TREE as w,SOUND_FOLDER as Z,TREE_PAGES as ee,stageCsp as te}from"@allyhub-next/protocol";import{BAKE_DIR as ne}from"@allyhub-next/scenery-host";import{runtimeFile as re}from"@allyhub-next/stage-page";import{mediaTypeOf as oe}from"@allyhub-next/formats";import{pathProblem as U}from"./paths.js";import{ProjectServer as se}from"./project.js";import{MadeSounds as ie,decodeAsOf as ae}from"./sound.js";import{BAKE_NAME as ce,STILL_NAME as de,matteFile as ue,sourceName as H}from"./tree.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const d={"access-control-allow-origin":"*"};function y(t,a){const f=G(P(t,a));return f.startsWith(t.endsWith(C)?t:`${t}${C}`)?f:void 0}async function h(t,a,f){const S=await W(t).catch(()=>{});if(!S?.isFile())return new Response("not found",{status:404,headers:f});const l={"content-type":oe(t),"cache-control":"no-cache","accept-ranges":"bytes",...f},r=S.size,c=a?/^bytes=(\d*)-(\d*)$/u.exec(a.trim()):null,v=(N,A)=>K.toWeb(z(t,{start:N,end:A}));if(!c||c[1]===""&&c[2]===""||r===0)return new Response(r===0?null:v(0,r-1),{status:200,headers:{...l,"content-length":String(r)}});let m,g;return c[1]===""?(m=Math.max(0,r-Number(c[2])),g=r-1):(m=Number(c[1]),g=c[2]===""?r-1:Math.min(Number(c[2]),r-1)),m>=r||m>g?new Response(null,{status:416,headers:{...l,"content-range":`bytes */${String(r)}`}}):new Response(v(m,g),{status:206,headers:{...l,"content-length":String(g-m+1),"content-range":`bytes ${String(m)}-${String(g)}/${String(r)}`}})}const I=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(t){const a=t[ALLYHUB_FORWARDED],S=(t.forwarded??(Array.isArray(a)?a[0]:a))?.split(",")[0]?.split(";").map(r=>r.trim().split("=")).find(([r])=>r?.toLowerCase()==="host")?.[1];if(S!==void 0)return S.replace(/^"(.*)"$/u,"$1");const l=t["x-forwarded-host"];return(Array.isArray(l)?l[0]:l)?.split(",")[0]?.trim()}export async function startDevServer(t){const a=q(t.root);if(t.embedder!==void 0&&!I.test(t.embedder))throw new Error(`Not an origin: ${t.embedder}`);if(t.publicOrigin!==void 0&&!I.test(t.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${t.publicOrigin}`);const f=t.token??E(18).toString("base64url"),l=`/s/${E(18).toString("base64url")}/`,r=await se.open({...t,root:a,...t.publicOrigin===void 0?{}:{reveal:!1}});let c=0;const v=()=>c===0?void 0:t.publicOrigin?.replace("{port}",String(c)),m=()=>{const e=v();return e===void 0?void 0:new URL(e).host},g=()=>{const e=m();return new Set([`127.0.0.1:${String(c)}`,`localhost:${String(c)}`,...e===void 0?[]:[e]])},N=e=>e===m()?v()??"":`http://${e}`,A=e=>N(e.req.header("host")??""),k=e=>{const n=m();n!==void 0&&forwardedHost(e.headers)===n&&(e.headers.host=n)},T=e=>e??`http://127.0.0.1:${String(c)}`;r.serving={file:(e,n)=>`${T(e)}${RAW_PATH}${n.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(f)}`,tree:e=>`${T(e)}${l}`};const j=new Set,L=new ie(a),R=new Q,_=async e=>{if(!t.ui)return e.text("allyhub dev serves its editors here.",200);const n=await M(P(t.ui,"index.html"),"utf8").catch(()=>{});if(n===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub-next/editor-web build).",500);const u=E(16).toString("base64");return e.html(n.replace(/<script/gu,`<script nonce="${u}"`).replace("</head>",`<meta name="allyhub-token" content="${f}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${u}'`,"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 'self'",`frame-ancestors ${t.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};R.get("/",_),R.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==f)return e.text("forbidden",403);const n=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(U(n)!==void 0)return e.text("forbidden",403);const u=y(a,n);return u?h(u,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)}),R.get(`${l}*`,async e=>{let n;try{n=decodeURIComponent(e.req.path.slice(l.length))}catch{return e.notFound()}const u=e.req.header("range"),p=A(e),b=n.slice(0,n.indexOf("/")+1),i=n.slice(b.length);switch(b){case w.runtime:{const o=re(i);if(!o)return e.notFound();const s=Object.values(ee).includes(n);return h(o,void 0,{...d,...s?{"content-security-policy":te(`${p}${l}`,[p,...t.embedder?[t.embedder]:[]])}:{}})}case w.build:{const o=H(i);if(o===void 0){const s=y(r.live.pieceDir,i);return s?h(s,void 0,d):e.notFound()}try{return e.json(await r.live.source(o),200,{...d,"cache-control":"no-store"})}catch(s){return e.json({error:{message:s instanceof Error?s.message:String(s)}},404,d)}}case w.scenery:{const o=H(i);if(o===void 0){const s=y(r.live.sceneryDir,i);return s?h(s,void 0,d):e.notFound()}if(U(o)!==void 0||!y(a,o))return e.text("No such scenery.",404,d);try{const s=await r.live.scenery(o);for(const O of s.media)j.add(O);return e.json(await r.live.scenerySource(o),200,{...d,"cache-control":"no-store"})}catch(s){return e.text(s instanceof Error?s.message:String(s),500,d)}}case w.media:{const s=Object.hasOwn(r.live.latest()?.media??{},i)||j.has(i)?y(a,i):void 0;return s?h(s,u,d):e.notFound()}case Z:{const o=r.live.latest()?.media[i],s=o?y(a,i):void 0;if(!o||!s)return e.notFound();const O=ae({db:e.req.query("db"),speed:e.req.query("speed"),filter:e.req.query("filter")});if(typeof O=="string")return e.text(O,400,d);try{const x=await L.made(s,o.sha256,O,e.req.query("wait")!=="0");return x===void 0?e.body(null,202,d):await h(x,u,{...d,"content-type":"audio/flac"})}catch(x){return e.text(x instanceof Error?x.message:String(x),500,d)}}case w.matte:{const o=ue(a,r.live.latest()?.media[i]);return o?h(o,u,{...d,"content-type":"video/mp4"}):e.notFound()}case w.bakes:{if(!ce.test(i))return e.notFound();const o=y(P(a,ne),i);return o?h(o,void 0,d):e.notFound()}case w.stills:return de.test(i)?h(X.of(a,"stills").path(i),void 0,{...d,"cache-control":"public, max-age=31536000, immutable"}):e.notFound();default:return e.notFound()}}),R.get("/*",async e=>{if(!t.ui)return e.notFound();const n=y(q(t.ui),decodeURIComponent(e.req.path.slice(1)));return n?h(n,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const F=new V({noServer:!0,maxPayload:512*1024*1024});F.on("connection",(e,n)=>{const u=r.connect(p=>{e.readyState===e.OPEN&&e.send(JSON.stringify(p))},{origin:`http://${n.headers.host??""}`});e.on("message",(p,b)=>{if(b||!Buffer.isBuffer(p))return;let i;try{i=JSON.parse(p.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}u.receive(i)}),e.on("close",()=>{u.close()})});const D=Y(R.fetch),B=(e,n)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(n)},$=J((e,n)=>{if(k(e),!g().has(e.headers.host??"")){B(n,"forbidden host");return}D(e,n)});$.on("upgrade",(e,n,u)=>{const p=new URL(e.url??"/","http://x"),b=(o,s)=>{n.end(`HTTP/1.1 ${String(o)} ${s}\r
|
|
3
3
|
connection: close\r
|
|
4
4
|
content-length: 0\r
|
|
5
5
|
\r
|
|
6
|
-
`)};
|
|
6
|
+
`)};k(e);const i=e.headers.host??"";if(!g().has(i)){b(403,"Forbidden");return}if(p.pathname!==RPC_PATH){b(404,"Not Found");return}if(e.headers.origin!==N(i)){b(403,"Forbidden");return}if(p.searchParams.get("token")!==f){b(403,"Forbidden");return}F.handleUpgrade(e,n,u,o=>{F.emit("connection",o,e)})});try{await new Promise((e,n)=>{$.once("error",n),$.listen(t.port??0,"127.0.0.1",()=>{e()})})}catch(e){throw await r.close(),e}return c=$.address().port,{url:`http://127.0.0.1:${String(c)}/`,port:c,token:f,tree:`http://127.0.0.1:${String(c)}${l}`,ui:t.ui,project:r,async close(){for(const e of F.clients)e.terminate();F.close(),await new Promise(e=>{$.closeAllConnections(),$.close(()=>{e()})}),await r.close()}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{access as
|
|
2
|
+
import{createHash as j}from"node:crypto";import{access as C,readFile as T}from"node:fs/promises";import{basename as I,join as $}from"node:path";import{listFiles as F,sourceOf as A}from"@allyhub-next/build";import{splitTitle as U,parseDoc as H,titleText as q}from"@allyhub-next/doc";import{ITEM_KINDS as R,OUT_DIR as W,scanItems as E,scriptFileFor as z,slidesFileFor as G}from"@allyhub-next/formats";import{KeyedStore as J,OpenedVersion as V,componentKey as B,deckDigests as Q,parseCombo as X}from"@allyhub-next/project";import{runtimeFile as Y,stageFiles as Z}from"@allyhub-next/stage-page";import{RPC_ERROR as f,RpcError as p,SNAPSHOT_TREE as O,TREE_PAGES as P,stillPath as ee}from"@allyhub-next/protocol";import{readSheetFile as te}from"@allyhub-next/sheet";import{themeOfLook as oe}from"@allyhub-next/slides-core";import{CLEAN_LOOK as re,comboKey as S,formatInfo as M,looksOf as ie,messagePrefix as se}from"@allyhub-next/video-core";import{fontFaces as ne}from"./fonts.js";import{rpcErrorOf as D}from"./live.js";import{loose as ae}from"./paths.js";const ce=n=>j("sha256").update(n).digest("base64url").slice(0,16),k=(n,r)=>{const d=n.tree();if(d===void 0)throw new p(f.unavailable,"This server serves no pages: only allyhub dev's does.");return new URL(r,d).href},_=(n,r,d)=>({url:k(n,`${r}?${d.toString()}`),probe:k(n,P.probe)}),K=n=>({mime:"image/webp",data:n.toString("base64")});async function le(n,r,d){try{if(r.kind==="doc"){const h=await T($(n,r.entry),"utf8");return q(U(H(h).blocks).title)||void 0}if(r.kind==="sheet"){const h=await T($(n,r.entry),"utf8");return te(h).file?.title}}catch{return}return d.get(r.dir)}const de=512;export function toolHandlers(n){const{live:r}=n,d=new Map,h=async(e,t,o,i)=>{try{return await r.withSession(async a=>{const s=await V.open({root:r.root,item:e,...t===void 0?{}:{combos:[X(t)]},purpose:o,session:a});try{return await i(s)}finally{await s.close()}})}catch(a){throw D(a)}};return{"project/items":async()=>{const e=await F(r.root),t=E(e),i=t.items.some(s=>s.kind==="video"||s.kind==="slides")?await r.prepared().catch(()=>r.latest()):void 0,a=new Map;for(const s of i?.pieces??[]){const c=typeof s.title=="string"?s.title:void 0;c&&a.set(s.dir,c)}return{items:await Promise.all(t.items.map(async s=>{const c=await le(r.root,s,a);return{...s,...c?{title:c}:{}}})),name:I(r.root),scope:ce(r.root),revision:r.revision}},"sheet/generated":async({item:e})=>{const t=await r.sheetCode(e);return{failed:t.failed,...t.generated?{generated:t.generated}:{}}},"video/versions":async({item:e})=>{const{piece:t}=await r.target(e),o=[...new Set(t.combos.map(i=>i.lang))];return{piece:t.id,kind:t.kind,...typeof t.title=="string"?{title:t.title}:{},width:M(t.formatEntry)?.width??0,height:M(t.formatEntry)?.height??0,versions:o.map(i=>i===void 0?{key:S({})}:{key:S({lang:i}),lang:i})}},"slides/deck":async({item:e})=>{const{prepared:t,piece:o}=await r.target(e);if(o.kind!=="slides"||!o.deck)throw new Error(`${e} is a video, not a deck.`);const i=ie(t.config).looks;return{piece:o.id,file:G(o.dir),prefix:se(o.id),layouts:o.deck.layouts,components:o.deck.components,generators:o.deck.generators,code:o.deck.code,theme:oe(i?.clean??re),scripts:Object.fromEntries(t.messages.locales.map(a=>[a,z(o.dir,a)]))}},"video/stage":async({item:e,version:t,start:o,play:i,chrome:a,mode:s})=>{const{piece:c,combo:m}=await r.target(e,t),l=new URLSearchParams({piece:c.id,combo:S(m)});for(const[y,g]of Object.entries(o??{}))l.set(y,String(g));return i&&l.set("play","1"),a===!1&&l.set("chrome","0"),s!==void 0&&l.set("mode",s),_(n,P.stage,l)},"video/timeline":async({item:e,version:t})=>h(e,t,"play",o=>Promise.resolve({timeline:ae(o.timeline),text:o.version.summary?.text??[]})),"video/still":async({item:e,version:t,t:o})=>h(e,t,"render",async i=>{const a=o??i.timeline.parts[0]?.still??0;return{t:a,image:K(await i.still(a,{format:"webp"})),width:i.timeline.width,height:i.timeline.height,duration:i.timeline.duration}}),"video/stills":async({item:e,version:t,moments:o})=>h(e,t,"render",async i=>{const a=[];for(const s of o){const c=await i.version.sign(s),m=`${e}\0${t??""}\0${c??""}`,l=c===void 0?void 0:d.get(m),y=l??K(await i.still(s,{format:"webp"}));c!==void 0&&!l&&(d.size>=de&&d.clear(),d.set(m,y)),a.push({t:s,image:y})}return{stills:a}}),"slides/fonts":async({item:e})=>{const{prepared:t,piece:o}=await r.target(e);if(o.kind!=="slides")throw new Error(`${e} is a video, not a deck.`);const i=Z().fontCss.flatMap(c=>{const m=Y(c);return m===void 0?[]:[{file:m,url:k(n,`${O.runtime}${c}`)}]}),a=A(t,o).styles??[],s=[...i,...a.map(c=>({file:$(r.pieceDir,c.slice(O.build.length)),url:k(n,c)}))];return{faces:(await Promise.all(s.map(c=>ne(c)))).flat()}},"slides/component-stills":async({item:e,version:t,components:o})=>{k(n,O.stills);try{const{prepared:i,piece:a,combo:s}=await r.target(e,t);if(a.kind!=="slides")throw new p(f.notFound,`${e} is not a deck.`);const c=await Q(i,a),{gpu:m}=await r.browser(),l=J.of(r.root,"stills"),y=o.map(w=>B(w,{digests:c,gpu:m})),g=[];for(const[w,v]of o.entries()){const u=y[w]??"";await l.get(`${u}.webp`)===void 0&&!g.some(x=>x.key===u)&&g.push({at:v,key:u})}return g.length>0&&await r.withSession(async w=>{const v=w.prepared.pieces.find(b=>b.id===a.id);if(v?.kind!=="slides")throw new p(f.notFound,`${e} is not a deck.`);const{stage:u,source:x}=await w.stage(v);try{for(const{at:b,key:L}of g){await u.component(x,{combo:s,purpose:"render"},b);const N=await u.drawing.frame({format:"webp",alpha:!0,clip:{x:0,y:0,width:Math.min(Math.ceil(b.width),u.page.width),height:Math.min(Math.ceil(b.height),u.page.height)}});await l.put(`${L}.webp`,N)}}finally{await u.close()}await l.sweep()}),{stills:y.map(w=>({key:w,url:k(n,ee(w))}))}}catch(i){throw D(i)}},"check/results":()=>Promise.resolve(n.checker?.state??{status:"off",revision:r.revision,problems:[],facts:[]}),"check/run":()=>{if(!n.checker)throw new p(f.unavailable,"This server runs no check.");return n.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:e,versions:t,types:o,options:i})=>{const a=await F(r.root);if(!E(a).items.some(s=>s.dir===e))throw new p(f.notFound,`There is no item ${e}.`);return{job:n.exports.start(e,t??[],o??[],i)}},"export/cancel":({job:e})=>{if(!n.exports.cancel(e))throw new p(f.notFound,`No export ${e} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:n.exports.list(),reveal:n.reveal!==void 0}),"export/reveal":async({path:e})=>{if(!n.reveal)throw new p(f.unavailable,"This server is not on the person's computer: download the file.");if(!e.startsWith(`${W}/`))throw new p(f.notFound,`${e} is no exported file.`);const t=$(r.root,e);return await C(t).catch(()=>{throw new p(f.notFound,`There is no file ${e}.`)}),await n.reveal(t),{}},"scenery/viewer":async({item:e,camera:t})=>{const o=await F(r.root),i=E(o).items.find(s=>s.dir===e&&(s.kind==="scenery"||s.kind==="model"));if(!i)throw new p(f.notFound,`There is no scenery or 3D model ${e}: a scenery is a folder with a ${R.scenery.entries[0]??"scenery.ts"}, a model one with a ${R.model.entries[0]??"model.ts"}.`);const a=new URLSearchParams({file:i.entry});return t&&a.set("camera",JSON.stringify(t)),_(n,P.viewer,a)}}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{join as n}from"node:path";import{indexPath as o}from"@allyhub-next/video-core";export const BAKE_NAME=/^[0-9a-f]+\.[a-z0-9-]+\.bin$/u,STILL_NAME=/^[0-9a-f]{64}\.webp$/u;export function sourceName(t){const e=/^sources\/([^/]+)\.json$/u.exec(t);if(e?.[1])try{return decodeURIComponent(e[1])}catch{return}}export function matteFile(t,e){return e?.matte===!0?n(t,o(e.sha256,"matte.mp4")):void 0}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{randomBytes as A}from"node:crypto";import{mkdir as v,readFile as E,readdir as
|
|
3
|
-
`),this.wrote(o.map(a=>({path:a,version:null})),e),
|
|
2
|
+
import{randomBytes as A}from"node:crypto";import{mkdir as v,readFile as E,readdir as b,rename as x,rm as T,stat as S,writeFile as k}from"node:fs/promises";import{dirname as g,extname as _,join as w,posix as D}from"node:path";import R from"write-file-atomic";import{moveEdits as C,movedPath as F}from"@allyhub-next/build";import{CACHE_DIR as N,TRASH_DIR as d}from"@allyhub-next/formats";import{RPC_ERROR as l,RpcError as f}from"@allyhub-next/protocol";import{current as y,fileIn as p,pathProblem as I,versionOf as j}from"./paths.js";import{writeProblems as O}from"./validate.js";export const UPLOAD_MAX_BYTES=200*1024*1024,LIST_LIMIT=5e3;const L=[N,d];function M(m){const e=(m.split(/[/\\]/u).pop()??"").replace(/\p{Cc}/gu,"").replace(/^\.+/u,"").trim();return e===""?"file":e}export class Writer{root;wrote;writable;queue=Promise.resolve();constructor(t,e=()=>{},i=()=>Promise.resolve()){this.root=t,this.wrote=e,this.writable=i}serial(t){const e=async()=>(await this.writable(),t()),i=this.queue.then(e,e);return this.queue=i.catch(()=>{}),i}async read(t){const e=await y(await p(this.root,t));return e?{text:e.bytes.toString("utf8"),version:e.version}:{text:"",version:null}}write(t,e,i,o){return this.serial(async()=>{const r=await p(this.root,t,{write:!0}),s=await y(r),c=s?.version??null;if(c!==i)throw new f(l.conflict,`${t} changed since it was read.`,{text:s?.bytes.toString("utf8")??"",version:c});const a=O(t,e);if(a.length>0)throw new f(l.invalid,`${t} would not be a file AllyHub can read: ${a[0]??""}`,{problems:a});const u=j(e);return u===c||(await v(g(r),{recursive:!0}),await R(r,e),this.wrote([{path:t,version:u}],o)),u})}upload(t,e,i,o){return i.length>UPLOAD_MAX_BYTES?Promise.reject(new f(l.invalid,`${e} is larger than ${String(UPLOAD_MAX_BYTES/1024/1024)} MB.`)):this.serial(async()=>{const r=M(e),s=_(r),c=r.slice(0,r.length-s.length);for(let a=1;;a++){const u=a===1?r:`${c}-${String(a)}${s}`,n=t===""?u:`${t}/${u}`,h=await p(this.root,n,{write:!0});if(!await $(h))return await v(g(h),{recursive:!0}),await k(h,i,{flag:"wx"}),this.wrote([{path:n,version:j(i)}],o),n}})}move(t,e,i){return this.serial(async()=>{const o=await p(this.root,t,{write:!0}),r=await p(this.root,e,{write:!0});if(e===t||e.startsWith(`${t}/`))throw new f(l.invalid,`${t} cannot move into itself.`);if(!await $(o))throw new f(l.notFound,`There is no ${t}.`);if(await $(r))throw new f(l.conflict,`${e} is taken.`,{text:"",version:null});const s=await C(this.root,t,e);for(const n of s)await R(w(this.root,n.path),n.text);const c=await P(t,o);await v(g(r),{recursive:!0}),await x(o,r);const a=c.map(n=>({path:n,version:null}));for(const n of c){const h=F(n,t,e);a.push({path:h,version:(await y(w(this.root,h)))?.version??null})}const u=s.map(n=>F(n.path,t,e));for(const n of s)F(n.path,t,e)===n.path&&a.push({path:n.path,version:j(n.text)});return this.wrote(a,i),u})}remove(t,e){return this.serial(async()=>{const i=await p(this.root,t,{write:!0});if(!await $(i))throw new f(l.notFound,`There is no ${t}.`);const o=await P(t,i),r=`${String(Date.now())}-${A(4).toString("hex")}`,s=w(this.root,d,r,...t.split("/"));await v(g(s),{recursive:!0}),await x(i,s);const c={path:t,removed:Date.now()};return await k(w(this.root,d,`${r}.json`),`${JSON.stringify(c)}
|
|
3
|
+
`),this.wrote(o.map(a=>({path:a,version:null})),e),r})}async trash(){const t=w(this.root,d),e=await b(t).catch(()=>[]),i=[];for(const o of e){if(!o.endsWith(".json"))continue;const r=await E(w(t,o),"utf8").then(s=>JSON.parse(s)).catch(()=>{});typeof r?.path!="string"||typeof r.removed!="number"||I(r.path)!==void 0||i.push({id:o.slice(0,-5),path:r.path,removed:r.removed})}return i.sort((o,r)=>r.removed-o.removed)}restore(t,e){return this.serial(async()=>{const i=(await this.trash()).find(a=>a.id===t);if(!i)throw new f(l.notFound,`Nothing in the bin is ${t}.`);const o=await p(this.root,i.path,{write:!0});if(await $(o))throw new f(l.conflict,`${i.path} is there again: move it before putting this back.`,{text:"",version:null});const r=w(this.root,d,t,...i.path.split("/"));await v(g(o),{recursive:!0}),await x(r,o),await T(w(this.root,d,t),{recursive:!0,force:!0}),await T(w(this.root,d,`${t}.json`),{force:!0});const s=await P(i.path,o),c=[];for(const a of s)c.push({path:a,version:(await y(w(this.root,a)))?.version??null});return this.wrote(c,e),i.path})}async list(t){const e=t===""?this.root:await p(this.root,t),i=[],o=[],r=async(s,c)=>{const a=await b(s,{withFileTypes:!0}).catch(()=>[]);for(const u of a.sort((n,h)=>n.name.localeCompare(h.name))){if(i.length>=LIST_LIMIT)return;const n=c===""?u.name:`${c}/${u.name}`;if(I(n)===void 0&&!(L.some(h=>n===h)&&!(t===n||t.startsWith(`${n}/`)))){if(u.isDirectory())o.push(n),await r(w(s,u.name),n);else if(u.isFile()){const h=await S(w(s,u.name)).catch(()=>{});h&&i.push({path:n,size:h.size,modified:h.mtimeMs})}}}};return await r(e,t),{files:i,dirs:o}}}const $=m=>S(m).then(()=>!0,()=>!1);async function P(m,t){const e=await S(t).catch(()=>{});if(!e)return[];if(!e.isDirectory())return[m];const i=[],o=await b(t,{recursive:!0,withFileTypes:!0});for(const r of o)r.isFile()&&i.push(D.join(m,D.relative(t.split("\\").join("/"),w(r.parentPath,r.name).split("\\").join("/"))));return i}
|
|
@@ -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
|
|
2
|
+
import{execFile as U}from"node:child_process";import{mkdir as V,mkdtemp as q,readFile as D,rm as G,writeFile as C}from"node:fs/promises";import{tmpdir as H}from"node:os";import{dirname as J,join as p}from"node:path";import{promisify as Q}from"node:util";import{cropImage as v,ffmpegOf as R,ffprobeOf as W,finalStill as I,readPng as z,writePng as L}from"@allyhub-next/render";import{clockOf as X,DECK_FPS as Y,SLIDE_SECONDS as Z}from"@allyhub-next/slides-core";import{filesOf as ee,picturedShapes as te,writePptx as ie}from"@allyhub-next/slides-pptx";import{deckFonts as oe}from"./deck-fonts.js";const $=Q(U),ne=Z,y=Y/2;async function re(t){const a=await q(p(H(),"allyhub-deck-movie-"));try{await Promise.all(t.map((c,u)=>C(p(a,`${String(u).padStart(5,"0")}.png`),c)));const d=p(a,"movie.mp4");return await $(await R(),["-y","-loglevel","error","-framerate",String(y),"-i",p(a,"%05d.png"),"-vf","pad=ceil(iw/2)*2:ceil(ih/2)*2","-c:v","libx264","-crf","18","-pix_fmt","yuv420p","-movflags","+faststart",d]),new Uint8Array(await D(d))}finally{await G(a,{recursive:!0,force:!0})}}async function ae(t){return await t.graphics().deck?.()}export async function renderDeckPptx(t,a,d={}){const c=await ae(t);if(!c)return;const u=d.only===void 0?void 0:c.slides[d.only];if(d.only!==void 0&&!u)return;const f=u?{...c,slides:[{...u,hidden:!1}]}:c,l=t.graphics(),s=l.timeline.width/f.width,w=new Map,k=te(f);for(const e of new Set(k.map(i=>i.slide))){const i=l.timeline.parts.find(r=>r.key===e);if(!i)continue;const n=z(await I(l,i.still,{target:t.target,look:t.look,media:t.media}));for(const r of k.filter(m=>m.slide===e)){const m=v(n,[r.frame.left*s,r.frame.top*s,r.frame.width*s,r.frame.height*s]);m&&w.set(r.key,L(m))}}const S=new Map;for(const e of k){const i=f.slides.find(o=>o.id===e.slide),n=i?.shapes.find(o=>o.name===e.shape),r=l.timeline.parts.find(o=>o.key===e.slide);if(!i||!r||!n?.component)continue;const m=[e.frame.left*s,e.frame.top*s,e.frame.width*s,e.frame.height*s],K=X(i,c.slides[0]?.id===i.id),F=r.start+K.comesOn(n.name),E=async o=>{const g=z(await I(l,o,{target:t.target,look:t.look,media:t.media})),x=v(g,m);return x?L(x):void 0},h=await E(F),_=w.get(e.key);if(!h||!_||Buffer.compare(h,_)===0)continue;const b=[h],T=Math.ceil(ne*y);for(let o=1;o<T;o++){const g=await E(F+o/y);g&&b.push(g)}S.set(e.key,{bytes:await re(b),seconds:b.length/y}),w.set(e.key,h)}const M=new Map;for(const e of ee(f))try{M.set(e,await D(p(t.prepared.root,e)))}catch{}const O=new Map,P=[],j=await W();for(const e of new Set(f.slides.flatMap(i=>i.shapes.flatMap(n=>n.kind==="movie"&&n.media?[n.media.path]:[])))){const i=await $(j,["-v","error","-show_entries","format=duration","-of","csv=p=0",p(t.prepared.root,e)]).then(n=>Number(n.stdout.trim()),()=>Number.NaN);Number.isFinite(i)&&i>0?O.set(e,i):P.push(`${e}: its length could not be measured, so it plays on a click in PowerPoint`)}const N=l.timeline.parts[0]?.title,{fonts:A,left:B}=await oe(f,t.prepared.root,t.prepared.config);return await V(J(a),{recursive:!0}),await C(a,ie({deck:f,file:e=>M.get(e),pictures:w,...S.size>0?{movies:S}:{},...O.size>0?{lengths:O}:{},fonts:A,...N===void 0?{}:{title:N}})),{files:[a],fontsLeft:B,missing:P}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{renderDeckPptx as be}from"./deck-pptx.js";import{readFileSync as xe}from"node:fs";import{mkdir as D,readFile as $e,stat as ne,writeFile as R}from"node:fs/promises";import{cpus as ke}from"node:os";import{basename as G,dirname as se,isAbsolute as ye,join as w,posix as oe,relative as ie,sep as Pe}from"node:path";import{parseDoc as Se,markdownOf as je}from"@allyhub-next/doc";import{createPackages as Oe}from"@allyhub-next/runtimes";import{codeOf as Ce,fontsDigest as Ee,readSheetSource as Me,workbookFiles as Ne}from"@allyhub-next/build";import{RenderError as Fe,VIDEO_TYPES as ve,renderCaptions as Te,renderCover as Ae,renderPdf as Ie,renderPng as Le,renderPptx as _e,renderVideo as De,mixSound as Re,requireEncoder as We,requireFfmpeg as Ve}from"@allyhub-next/render";import{docFontsCss as Ye,printPage as ze,renderDoc as Ge,renderWord as He}from"@allyhub-next/render/doc";import{checkWorkbook as Ue,csvOf as qe,jsonOf as Je,markdownOf as re,seededRandom as Be,sheetHtml as Ke}from"@allyhub-next/sheet";import{writeXlsx as Xe}from"@allyhub-next/sheet/xlsx";import{CACHE_DIR as Qe}from"@allyhub-next/formats";import{buildModule as Ze}from"@allyhub-next/model/build";import{graphicsPage as et,stageIdentity as tt}from"@allyhub-next/stage";import{DEFAULT_TYPES as nt,FILE_TYPES as ae,comboKey as H,exportProblem as st,pieceIs as U,pieceNamed as ce}from"@allyhub-next/video-core";import{runCheck as ot}from"@allyhub-next/check";import{batchCsv as it,batchRows as rt}from"./batch.js";import{batchName as at,checkName as ct,exportName as le,exportNames as lt}from"./names.js";import{ConsolePool as dt,mergeConsole as ft,dedupe as de,indexNeeds as pt,makeIndex as mt,CheckSession as ut,OpenedVersion as ht,ProjectError as I,versionLabel as fe}from"@allyhub-next/project";const pe=e=>ve.includes(e);async function gt(e){const o=Oe(),c=()=>e?.("Getting docx, once, to write Word documents…"),[n,p]=await Promise.all([o.load("docx",{onFetch:c}),o.load("docx",{module:"fflate",onFetch:c})]);return{docx:n,zip:p}}export async function exportVersion(e,o,c,n={}){await D(se(c),{recursive:!0});const p={page:e.graphics(),target:e.target,look:e.look,media:e.media,out:c,...n.steps===!0?{steps:!0}:{}};if(o==="pptx"&&e.piece.kind==="slides"&&(n.pptx??"native")==="native"){const d=await be(e,c);if(d)return n.onProgress?.(1),d}if(o==="wav"){const d=await Re({timeline:e.timeline,sound:await e.sound(),out:c});return n.onProgress?.(1),{files:[c],duration:Math.round(e.timeline.duration*e.timeline.fps)/e.timeline.fps,...d.loudness?{loudness:d.loudness}:{},master:{...d}}}if(pe(o)&&(o!=="png"||e.piece.kind==="video")){const d=e.prepared,i=await Ee(d.root,d.files,d.fonts),a=await De({target:e.target,look:e.look,media:e.media,pages:[e.graphics()],openPage:async()=>{const m=await e.session.open(e.piece,e.target,"render");return et(m.stage,{gpu:e.session.gpu})},...o==="gif"?{}:{sound:await e.sound()},out:c,type:o,...n.encode?{encode:n.encode}:{},...n.workers===void 0?{}:{workers:n.workers},...n.onProgress?{onProgress:n.onProgress}:{},code:await Ce(d,e.piece,tt(i)),...n.partCache===!1?{partCache:!1}:{},...n.signal?{signal:n.signal}:{}});return{files:a.files??[a.out],duration:a.duration,parts:a.parts,...a.junctions?{junctions:a.junctions}:{},...a.loudness?{loudness:a.loudness}:{},...a.master?{master:{...a.master}}:{},timings:a.timings}}const u=o==="srt"||o==="vtt"?await Te({...p,type:o,...n.captions?{captions:n.captions}:{}}):o==="pdf"?await Ie(p):o==="pptx"?await _e(p):o==="png"?await Le(p):await Ae(p);return n.onProgress?.(1),{files:u.files??[u.out]}}export const exportsAtOnce=e=>Math.max(1,Math.min(e,Math.floor(ke().length/4))),DOC_TYPES=["pdf","docx","png","md"],SHEET_TYPES=["xlsx","pdf","png","csv","md","json"],MODEL_TYPES=["glb"];const q=(e,o)=>`${String(e)} ${o}${e===1?"":"s"}`,J=(e,o)=>U({id:e,path:e},o)||U({id:e,path:e},`content/${o}`);function wt(e){if(e===void 0)return;const o=new Set([...Object.keys(ae),...DOC_TYPES,...SHEET_TYPES,...MODEL_TYPES]);for(const c of e)if(!o.has(c))throw new I("bad-type",`Cannot render ${c}.`,"usage",`Types: ${[...o].join(", ")}.`);return[...e]}export async function exportProject(e){const o=wt(e.types);e.name!==void 0&&ct(e.name);const c=e.items??[],n=c.length>0,p=f=>c.some(P=>J(f,P)),u=[],d=[],i=[],a=()=>ut.open({root:e.root,...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit}});let m=await a();try{const f=m.prepared,P=f.docs.filter(t=>!n||p(t.place)),x=f.sheets.filter(t=>!n||p(t.place)),L=f.items.filter(t=>t.kind==="model"&&(!n||p(t.dir))),b=c.filter(t=>!f.items.some(s=>s.kind==="model"&&U({id:s.dir,path:s.dir},t))&&!f.docs.some(s=>J(s.place,t))&&!f.sheets.some(s=>J(s.place,t)));for(const t of b)if(!f.pieces.some(s=>ce({id:s.id,path:s.place},t)))throw new I("no-item",`No item ${t}.`,"not-found",`Items: ${[...f.pieces.map(s=>s.id),...f.docs.map(s=>s.place),...f.sheets.map(s=>s.place),...f.items.filter(s=>s.kind==="model").map(s=>s.dir)].join(", ")||"none"}.`);const T=n&&b.length===0,_=o?.filter(t=>t in ae),$=T?[]:f.pieces.filter(t=>b.length===0||b.some(s=>ce({id:t.id,path:t.place},s))),S=o?.includes("csv")===!0?$.filter(t=>t.matrix!==void 0):[];if(o?.includes("csv")===!0&&b.length>0&&S.length===0)throw new I("bad-type",`${b.join(", ")} has no slots (matrix.slots), so there is no table of ads to write as csv.`,"usage","csv is a batch's table of ads, or a sheet's rows.");let g=[...f.problems];const N=new dt(m.consoleLimit),W=new Set([...f.docs.map(t=>t.file),...f.sheets.flatMap(t=>t.files)]),ue=t=>t.where?.file!==void 0&&W.has(t.where.file),B=t=>t.filter(s=>s.level==="error"&&!ue(s)).length;if(!T&&(_?.length!==0||S.length>0)&&(f.pieces.length>0||B(f.problems)>0)){e.log?.("Checking…");const t=()=>xt(m,e.root,b,e.combos);let s=await t();const A=e.index===!1?[]:pt(s.results);if(A.length>0){const r=await mt(f.root,A,$t(e.log),e.signal);i.push(...r.failed.map(l=>({file:l.need.file,error:l.error}))),r.done.length>0&&(await m.close(),m=await a(),s=await t())}g=s.problems,N.addReport(s.console);const v=B(s.problems);if(v>0)throw new I("check-failed",`The check found ${q(v,"must-fix problem")}, so nothing is rendered.`,"failed","allyhub check lists them; fix them, then render.");for(const r of S){const l=performance.now(),j=at(r.id),C=rt(r,s.plans,m.prepared.media,bt(e.root,e.out),e.name);await D(se(w(e.out,j)),{recursive:!0}),await R(w(e.out,j),it(C));const E=s.targets.filter(k=>k.piece===r.id).length;C.length<E&&e.log?.(`${j}: ${q(E-C.length,"ad")} not listed, which did not load (allyhub check says why).`),u.push(await M(e.out,j,r.id,"csv",l))}const O=[],V=new Set;for(const r of s.targets){const l=m.prepared.pieces.find(h=>h.id===r.piece);if(!l)continue;if(!n&&l.options.deliverable===!1){V.add(r.piece);continue}const j=l.kind,C=s.results.find(h=>h.piece===r.piece&&H(h.combo)===r.key&&h.format===r.format),E=s.plans.find(h=>h.piece===r.piece&&H(h.combo)===r.key&&h.format===r.format),k=C?.timeline?(C.timeline.audio.speech?.length??0)>0:E?.parts.some(h=>h.speech!==void 0)??!1,F={piece:r.piece,output:r.output,combo:r.combo,format:r.format,...r.id===void 0?{}:{id:r.id}};for(const h of _??nt[j]){const y=st({kind:j,speech:k},h);if(!(y?.code==="bad_type"&&!n)){if(y&&y.code!=="no_speech")throw new I("bad-type",`${fe(F)}: ${y.message}`,"usage",y.hint);O.push({target:F,type:h,...y?{refused:{name:le(F,h,e),piece:F.piece,type:h,code:"no-speech",message:`${fe(F)}: ${y.message}`,...y.hint?{hint:y.hint}:{}}}:{}})}}}if(V.size>0&&e.log?.(`Not rendered, shown only inside another video (deliverable: false): ${[...V].join(", ")}. Name one to render it.`),O.some(r=>pe(r.type)||r.type==="wav")){await Ve();for(const r of new Set(O.map(l=>l.type)))await We(r,e.encode?.codec)}const Q=lt(O,e.name,e);O.forEach((r,l)=>{r.refused&&(r.refused.name=Q[l]??r.refused.name)});const Z=[],Y=new Array(O.length).fill(0),z=(r,l)=>{Y[r]=Math.max(Y[r]??0,l),e.onProgress?.(Y.reduce((j,C)=>j+C,0)/O.length)};let ee=0,he=0;const ge=async()=>{for(let r=ee++;r<O.length;r=ee++){e.signal?.throwIfAborted();const l=O[r];if(!l)continue;const j=Q[r]??le(l.target,l.type,e);if(l.refused){d.push(l.refused),z(r,1);continue}const C=performance.now(),E=await ht.open({root:e.root,session:m,item:l.target.piece,combos:[l.target.combo],purpose:"render"});try{const k=await exportVersion(E,l.type,w(e.out,j),{...e,onProgress:y=>{z(r,y)}}),F=(await Promise.all(k.files.map(y=>ne(y)))).reduce((y,we)=>y+we.size,0),h=Math.round((performance.now()-C)/10)/100;u.push({...k,name:me(ie(e.out,k.files[0]??"")),path:k.files[0]??w(e.out,j),piece:l.target.piece,type:l.type,combo:l.target.combo,key:H(l.target.combo),format:l.target.format,bytes:F,seconds:h}),e.log?.(`[${String(++he)}/${String(O.length)}] ${j} (${h.toFixed(1)} s)`)}catch(k){if(e.signal?.aborted||!(k instanceof Fe))throw k;d.push({name:j,piece:l.target.piece,type:l.type,code:k.code,message:k.message,...k.hint?{hint:k.hint}:{}})}finally{Z.push(...await E.problems()),N.add(l.target,await E.console()),await E.close(),z(r,1)}}};O.length>0&&e.log?.(`Rendering ${q(O.length,"file")}…`);const te=(await Promise.allSettled(Array.from({length:exportsAtOnce(O.length)},ge))).find(r=>r.status==="rejected");if(te)throw te.reason;g=de([...g,...Z])}const K=t=>f.problems.find(s=>s.level==="error"&&s.where?.file!==void 0&&t.includes(s.where.file));for(const t of[...P,...x]){const s=K("files"in t?t.files:[t.file]);s&&d.push({name:t.place,piece:t.place,type:"files"in t?"xlsx":"pdf",code:"check-failed",message:`${s.where?.file??t.place}: ${s.message}`,hint:"Fix it, then render again."})}e.signal?.throwIfAborted();const X=t=>t.filter(s=>K("files"in s?s.files:[s.file])===void 0);if(u.push(...await kt(e.root,X(P),o,e.out,e.log),...await yt(e.root,X(x),o,e.out,e.log)),o===void 0||o.includes("glb"))for(const t of L){e.log?.(`Building ${t.entry}…`);const s=performance.now(),A=`${t.dir}/${G(t.dir)}.glb`;try{await Ze(w(e.root,t.entry),{root:e.root,out:w(e.out,A),cache:w(e.root,Qe,"model"),log:()=>{}}),u.push(await M(e.out,A,t.dir,"glb",s))}catch(v){d.push({name:t.dir,piece:t.dir,type:"glb",code:"model-failed",message:`${t.entry}: ${v instanceof Error?v.message:String(v)}`,hint:"Fix it, then render again."})}}return{out:e.out,files:u,failed:d,problems:g,console:N.report(),unindexed:i}}finally{await m.close()}}const me=e=>e.split(Pe).join("/");function bt(e,o){const c=ie(e,o);return c===""?".":c.startsWith("..")||ye(c)?o:me(c)}async function xt(e,o,c,n){const p=[];for(const a of c.length>0?c:[void 0])p.push(await ot({dir:o,session:e,facts:!1,...a===void 0?{}:{piece:a},...n?{combos:[...n]}:{}}));const u=new Set,d=p.flatMap(a=>a.targets).filter(a=>{const m=`${a.piece}\0${a.key}\0${a.format}`;return u.has(m)?!1:(u.add(m),!0)}),i=de(p.flatMap(a=>a.problems));return{targets:d,results:p.flatMap(a=>a.results),plans:p.flatMap(a=>a.plans),problems:i,errors:i.filter(a=>a.level==="error").length,console:ft(e.consoleLimit,...p.map(a=>a.console))}}function $t(e){let o="";return c=>{const n=c.status==="failed"?`Could not index ${c.file}: ${c.message}`:c.message;c.status==="running"&&c.share!==void 0||n!==o&&(o=n,e?.(n))}}async function M(e,o,c,n,p){const u=w(e,o);return{files:[u],name:o,path:u,piece:c,type:n,bytes:(await ne(u)).size,seconds:Math.round((performance.now()-p)/10)/100}}async function kt(e,o,c,n,p){const u=(c??["pdf"]).filter(i=>DOC_TYPES.includes(i)),d=[];for(const i of o){if(u.length===0)break;p?.(`Rendering ${i.file}…`);const a=performance.now(),m=G(i.place);if(u.includes("md")){const x=await $e(w(e,i.file),"utf8");await D(w(n,i.place),{recursive:!0}),await R(w(n,i.place,`${m}.md`),je(Se(x).blocks)),d.push(await M(n,`${i.place}/${m}.md`,i.place,"md",a))}if(u.includes("docx")){const x=`${i.place}/${m}.docx`;await He({root:e,doc:{file:i.file,dir:i.dir,path:i.place,title:i.title},out:w(n,x),...await gt(p)}),d.push(await M(n,x,i.place,"docx",a))}const f=u.filter(x=>x==="pdf"||x==="png");if(f.length===0)continue;const P=await Ge({root:e,doc:{file:i.file,dir:i.dir,path:i.place,title:i.title},out:w(n,i.place),name:m,types:f});for(const x of P)d.push(await M(n,`${i.place}/${x}`,i.place,x.endsWith(".png")?"png":"pdf",a))}return d}export const PNG_ROWS=700,PNG_COLUMNS=200;async function yt(e,o,c,n,p){const u=(c??["xlsx"]).filter(i=>SHEET_TYPES.includes(i)),d=[];for(const i of o){if(u.length===0)break;p?.(`Writing ${i.file}…`);const a=performance.now(),m=await Me(e,i.dir);if(m.failed){p?.(`${i.file}: its sheet.ts does not run. allyhub check says why.`);continue}const{workbook:f,calc:P}=Ue(Ne(e,m),{random:Be([m.text,...m.csv.values(),m.generated?JSON.stringify(m.generated):""].join(`
|
|
3
|
-
`))});if(!
|
|
2
|
+
import{renderDeckPptx as ye}from"./deck-pptx.js";import{readFileSync as $e}from"node:fs";import{mkdir as L,readFile as ke,stat as se,writeFile as W}from"node:fs/promises";import{cpus as Pe}from"node:os";import{basename as G,dirname as oe,isAbsolute as Se,join as x,posix as ie,relative as re,sep as Ee}from"node:path";import{parseDoc as je,markdownOf as Oe}from"@allyhub-next/doc";import{createPackages as Ce}from"@allyhub-next/runtimes";import{codeOf as Ne,fontsDigest as Me,readSheetSource as Te,workbookFiles as _e}from"@allyhub-next/build";import{RenderError as Fe,VIDEO_TYPES as Ae,renderCaptions as De,renderCover as Re,renderPdf as Ie,renderPng as Le,renderPptx as We,renderVideo as ze,mixSound as Ye,requireEncoder as ve,requireFfmpeg as He}from"@allyhub-next/render";import{printPage as Ve,printPdf as Ge,renderDoc as Ue,renderWord as qe,SHEET_FONT as ae,sheetFontsCss as ce}from"@allyhub-next/render/doc";import{checkWorkbook as Je,csvOf as Be,jsonOf as Ke,markdownOf as le,seededRandom as Xe,sheetHtml as Qe,SheetPrint as Ze}from"@allyhub-next/sheet";import{writeXlsx as et}from"@allyhub-next/sheet/xlsx";import{CACHE_DIR as tt}from"@allyhub-next/formats";import{buildModule as nt}from"@allyhub-next/model/build";import{graphicsPage as st,stageIdentity as ot}from"@allyhub-next/stage";import{DEFAULT_TYPES as it,FILE_TYPES as de,comboKey as U,exportProblem as rt,pieceIs as q,pieceNamed as fe}from"@allyhub-next/video-core";import{runCheck as at}from"@allyhub-next/check";import{batchCsv as ct,batchRows as lt}from"./batch.js";import{batchName as dt,checkName as ft,exportName as pe,exportNames as pt}from"./names.js";import{ConsolePool as mt,mergeConsole as ut,dedupe as me,indexNeeds as ht,makeIndex as gt,CheckSession as wt,DeckPool as bt,OpenedVersion as xt,ProjectError as I,versionLabel as ue}from"@allyhub-next/project";const he=e=>Ae.includes(e);async function yt(e){const t=Ce(),i=()=>e?.("Getting docx, once, to write Word documents…"),[n,f]=await Promise.all([t.load("docx",{onFetch:i}),t.load("docx",{module:"fflate",onFetch:i})]);return{docx:n,zip:f}}export async function exportVersion(e,t,i,n={}){await L(oe(i),{recursive:!0});const f=e.piece.kind==="slides"&&(t==="png"||t==="pptx")?await bt.on(e.session,e.piece,e.target,e.version.stage):void 0,p=e.piece.title,g=typeof p=="string"?p:p===void 0?void 0:p[e.target.combo.lang??""]??Object.values(p)[0],c={page:e.graphics(),target:e.target,look:e.look,media:e.media,out:i,...n.steps===!0?{steps:!0}:{},...f?{stills:l=>f.stills(l.map(d=>({slide:d.part.key,step:d.step,width:f.timeline.width,format:"png"})))}:{},...g===void 0?{}:{title:g}};if(t==="pptx"&&e.piece.kind==="slides"&&(n.pptx??"native")==="native"){const l=await ye(e,i);if(l)return n.onProgress?.(1),l}if(t==="wav"){const l=await Ye({timeline:e.timeline,sound:await e.sound(),out:i});return n.onProgress?.(1),{files:[i],duration:Math.round(e.timeline.duration*e.timeline.fps)/e.timeline.fps,...l.loudness?{loudness:l.loudness}:{},master:{...l}}}if(he(t)&&(t!=="png"||e.piece.kind==="video")){const l=e.prepared,d=await Me(l.root,l.files,l.fonts),u=await ze({target:e.target,look:e.look,media:e.media,pages:[e.graphics()],openPage:async()=>{const h=await e.session.open(e.piece,e.target,"render");return st(h.stage,{gpu:e.session.gpu})},...t==="gif"?{}:{sound:await e.sound()},out:i,type:t,...n.encode?{encode:n.encode}:{},...n.workers===void 0?{}:{workers:n.workers},...n.onProgress?{onProgress:n.onProgress}:{},code:await Ne(l,e.piece,ot(d)),...n.partCache===!1?{partCache:!1}:{},...n.signal?{signal:n.signal}:{}});return{files:u.files??[u.out],duration:u.duration,parts:u.parts,...u.junctions?{junctions:u.junctions}:{},...u.loudness?{loudness:u.loudness}:{},...u.master?{master:{...u.master}}:{},timings:u.timings}}const r=t==="srt"||t==="vtt"?await De({...c,type:t,...n.captions?{captions:n.captions}:{}}):t==="pdf"?await Ie(c):t==="pptx"?await We(c):t==="png"?await Le(c):await Re(c);return n.onProgress?.(1),{files:r.files??[r.out]}}export const exportsAtOnce=e=>Math.max(1,Math.min(e,Math.floor(Pe().length/4))),DOC_TYPES=["pdf","docx","png","md"],SHEET_TYPES=["xlsx","pdf","png","csv","md","json"],MODEL_TYPES=["glb"];const J=(e,t)=>`${String(e)} ${t}${e===1?"":"s"}`,B=(e,t)=>q({id:e,path:e},t)||q({id:e,path:e},`content/${t}`);function $t(e){if(e===void 0)return;const t=new Set([...Object.keys(de),...DOC_TYPES,...SHEET_TYPES,...MODEL_TYPES]);for(const i of e)if(!t.has(i))throw new I("bad-type",`Cannot render ${i}.`,"usage",`Types: ${[...t].join(", ")}.`);return[...e]}export async function exportProject(e){const t=$t(e.types);e.name!==void 0&&ft(e.name);const i=e.items??[],n=i.length>0,f=d=>i.some(u=>B(d,u)),p=[],g=[],c=[],r=()=>wt.open({root:e.root,...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit}});let l=await r();try{const d=l.prepared,u=d.docs.filter(s=>!n||f(s.place)),h=d.sheets.filter(s=>!n||f(s.place)),A=d.items.filter(s=>s.kind==="model"&&(!n||f(s.dir))),E=i.filter(s=>!d.items.some(o=>o.kind==="model"&&q({id:o.dir,path:o.dir},s))&&!d.docs.some(o=>B(o.place,s))&&!d.sheets.some(o=>B(o.place,s)));for(const s of E)if(!d.pieces.some(o=>fe({id:o.id,path:o.place},s)))throw new I("no-item",`No item ${s}.`,"not-found",`Items: ${[...d.pieces.map(o=>o.id),...d.docs.map(o=>o.place),...d.sheets.map(o=>o.place),...d.items.filter(o=>o.kind==="model").map(o=>o.dir)].join(", ")||"none"}.`);const k=n&&E.length===0,D=t?.filter(s=>s in de),z=k?[]:d.pieces.filter(s=>E.length===0||E.some(o=>fe({id:s.id,path:s.place},o))),j=t?.includes("csv")===!0?z.filter(s=>s.matrix!==void 0):[];if(t?.includes("csv")===!0&&E.length>0&&j.length===0)throw new I("bad-type",`${E.join(", ")} has no slots (matrix.slots), so there is no table of ads to write as csv.`,"usage","csv is a batch's table of ads, or a sheet's rows.");let O=[...d.problems];const w=new mt(l.consoleLimit),T=new Set([...d.docs.map(s=>s.file),...d.sheets.flatMap(s=>s.files)]),Y=s=>s.where?.file!==void 0&&T.has(s.where.file),K=s=>s.filter(o=>o.level==="error"&&!Y(o)).length;if(!k&&(D?.length!==0||j.length>0)&&(d.pieces.length>0||K(d.problems)>0)){e.log?.("Checking…");const s=()=>Pt(l,e.root,E,e.combos);let o=await s();const R=e.index===!1?[]:ht(o.results);if(R.length>0){const a=await gt(d.root,R,St(e.log),e.signal);c.push(...a.failed.map(m=>({file:m.need.file,error:m.error}))),a.done.length>0&&(await l.close(),l=await r(),o=await s())}O=o.problems,w.addReport(o.console);const F=K(o.problems);if(F>0)throw new I("check-failed",`The check found ${J(F,"must-fix problem")}, so nothing is rendered.`,"failed","allyhub check lists them; fix them, then render.");for(const a of j){const m=performance.now(),P=dt(a.id),C=lt(a,o.plans,l.prepared.media,kt(e.root,e.out),e.name);await L(oe(x(e.out,P)),{recursive:!0}),await W(x(e.out,P),ct(C));const N=o.targets.filter(y=>y.piece===a.id).length;C.length<N&&e.log?.(`${P}: ${J(N-C.length,"ad")} not listed, which did not load (allyhub check says why).`),p.push(await M(e.out,P,a.id,"csv",m))}const S=[],v=new Set;for(const a of o.targets){const m=l.prepared.pieces.find(b=>b.id===a.piece);if(!m)continue;if(!n&&m.options.deliverable===!1){v.add(a.piece);continue}const P=m.kind,C=o.results.find(b=>b.piece===a.piece&&U(b.combo)===a.key&&b.format===a.format),N=o.plans.find(b=>b.piece===a.piece&&U(b.combo)===a.key&&b.format===a.format),y=C?.timeline?(C.timeline.audio.speech?.length??0)>0:N?.parts.some(b=>b.speech!==void 0)??!1,_={piece:a.piece,output:a.output,combo:a.combo,format:a.format,...a.id===void 0?{}:{id:a.id}};for(const b of D??it[P]){const $=rt({kind:P,speech:y},b);if(!($?.code==="bad_type"&&!n)){if($&&$.code!=="no_speech")throw new I("bad-type",`${ue(_)}: ${$.message}`,"usage",$.hint);S.push({target:_,type:b,...$?{refused:{name:pe(_,b,e),piece:_.piece,type:b,code:"no-speech",message:`${ue(_)}: ${$.message}`,...$.hint?{hint:$.hint}:{}}}:{}})}}}if(v.size>0&&e.log?.(`Not rendered, shown only inside another video (deliverable: false): ${[...v].join(", ")}. Name one to render it.`),S.some(a=>he(a.type)||a.type==="wav")){await He();for(const a of new Set(S.map(m=>m.type)))await ve(a,e.encode?.codec)}const Z=pt(S,e.name,e);S.forEach((a,m)=>{a.refused&&(a.refused.name=Z[m]??a.refused.name)});const ee=[],H=new Array(S.length).fill(0),V=(a,m)=>{H[a]=Math.max(H[a]??0,m),e.onProgress?.(H.reduce((P,C)=>P+C,0)/S.length)};let te=0,we=0;const be=async()=>{for(let a=te++;a<S.length;a=te++){e.signal?.throwIfAborted();const m=S[a];if(!m)continue;const P=Z[a]??pe(m.target,m.type,e);if(m.refused){g.push(m.refused),V(a,1);continue}const C=performance.now(),N=await xt.open({root:e.root,session:l,item:m.target.piece,combos:[m.target.combo],purpose:"render"});try{const y=await exportVersion(N,m.type,x(e.out,P),{...e,onProgress:$=>{V(a,$)}}),_=(await Promise.all(y.files.map($=>se($)))).reduce(($,xe)=>$+xe.size,0),b=Math.round((performance.now()-C)/10)/100;p.push({...y,name:ge(re(e.out,y.files[0]??"")),path:y.files[0]??x(e.out,P),piece:m.target.piece,type:m.type,combo:m.target.combo,key:U(m.target.combo),format:m.target.format,bytes:_,seconds:b}),e.log?.(`[${String(++we)}/${String(S.length)}] ${P} (${b.toFixed(1)} s)`)}catch(y){if(e.signal?.aborted||!(y instanceof Fe))throw y;g.push({name:P,piece:m.target.piece,type:m.type,code:y.code,message:y.message,...y.hint?{hint:y.hint}:{}})}finally{ee.push(...await N.problems()),w.add(m.target,await N.console()),await N.close(),V(a,1)}}};S.length>0&&e.log?.(`Rendering ${J(S.length,"file")}…`);const ne=(await Promise.allSettled(Array.from({length:exportsAtOnce(S.length)},be))).find(a=>a.status==="rejected");if(ne)throw ne.reason;O=me([...O,...ee])}const X=s=>d.problems.find(o=>o.level==="error"&&o.where?.file!==void 0&&s.includes(o.where.file));for(const s of[...u,...h]){const o=X("files"in s?s.files:[s.file]);o&&g.push({name:s.place,piece:s.place,type:"files"in s?"xlsx":"pdf",code:"check-failed",message:`${o.where?.file??s.place}: ${o.message}`,hint:"Fix it, then render again."})}e.signal?.throwIfAborted();const Q=s=>s.filter(o=>X("files"in o?o.files:[o.file])===void 0);if(p.push(...await Et(e.root,Q(u),t,e.out,e.log),...await Mt(e.root,Q(h),t,e.out,e.sheet??{},e.log)),t===void 0||t.includes("glb"))for(const s of A){e.log?.(`Building ${s.entry}…`);const o=performance.now(),R=`${s.dir}/${G(s.dir)}.glb`;try{await nt(x(e.root,s.entry),{root:e.root,out:x(e.out,R),cache:x(e.root,tt,"model"),log:()=>{}}),p.push(await M(e.out,R,s.dir,"glb",o))}catch(F){g.push({name:s.dir,piece:s.dir,type:"glb",code:"model-failed",message:`${s.entry}: ${F instanceof Error?F.message:String(F)}`,hint:"Fix it, then render again."})}}return{out:e.out,files:p,failed:g,problems:O,console:w.report(),unindexed:c}}finally{await l.close()}}const ge=e=>e.split(Ee).join("/");function kt(e,t){const i=re(e,t);return i===""?".":i.startsWith("..")||Se(i)?t:ge(i)}async function Pt(e,t,i,n){const f=[];for(const r of i.length>0?i:[void 0])f.push(await at({dir:t,session:e,facts:!1,...r===void 0?{}:{piece:r},...n?{combos:[...n]}:{}}));const p=new Set,g=f.flatMap(r=>r.targets).filter(r=>{const l=`${r.piece}\0${r.key}\0${r.format}`;return p.has(l)?!1:(p.add(l),!0)}),c=me(f.flatMap(r=>r.problems));return{targets:g,results:f.flatMap(r=>r.results),plans:f.flatMap(r=>r.plans),problems:c,errors:c.filter(r=>r.level==="error").length,console:ut(e.consoleLimit,...f.map(r=>r.console))}}function St(e){let t="";return i=>{const n=i.status==="failed"?`Could not index ${i.file}: ${i.message}`:i.message;i.status==="running"&&i.share!==void 0||n!==t&&(t=n,e?.(n))}}async function M(e,t,i,n,f){const p=x(e,t);return{files:[p],name:t,path:p,piece:i,type:n,bytes:(await se(p)).size,seconds:Math.round((performance.now()-f)/10)/100}}async function Et(e,t,i,n,f){const p=(i??["pdf"]).filter(c=>DOC_TYPES.includes(c)),g=[];for(const c of t){if(p.length===0)break;f?.(`Rendering ${c.file}…`);const r=performance.now(),l=G(c.place);if(p.includes("md")){const h=await ke(x(e,c.file),"utf8");await L(x(n,c.place),{recursive:!0}),await W(x(n,c.place,`${l}.md`),Oe(je(h).blocks)),g.push(await M(n,`${c.place}/${l}.md`,c.place,"md",r))}if(p.includes("docx")){const h=`${c.place}/${l}.docx`;await qe({root:e,doc:{file:c.file,dir:c.dir,path:c.place,title:c.title},out:x(n,h),...await yt(f)}),g.push(await M(n,h,c.place,"docx",r))}const d=p.filter(h=>h==="pdf"||h==="png");if(d.length===0)continue;const u=await Ue({root:e,doc:{file:c.file,dir:c.dir,path:c.place,title:c.title},out:x(n,c.place),name:l,types:d});for(const h of u)g.push(await M(n,`${c.place}/${h}`,c.place,h.endsWith(".png")?"png":"pdf",r))}return g}export const PNG_ROWS=700,PNG_COLUMNS=200;const jt=1e4,Ot=40;function Ct(e){const t=[];let i=0,n=0;return e.job.pages.forEach((f,p)=>{const g=(f.down.to-f.down.from+f.of.titleRows.length)*(f.across.to-f.across.from+f.of.titleCols.length);p>i&&(n+g>jt||p-i>=Ot)&&(t.push([i,p]),i=p,n=0),n+=g}),i<e.job.pages.length&&t.push([i,e.job.pages.length]),t}function Nt(){const e=Number(process.env.SOURCE_DATE_EPOCH);return Number.isFinite(e)&&e>0?new Date(e*1e3):new Date}export async function printSheet(e,t){const i=new Ze(e,t.picture===void 0?{}:{file:t.picture}),n=Ct(i),f=t.date??Nt();return await Ge({file:t.file,title:t.title,tagged:!1,...t.signal===void 0?{}:{signal:t.signal},parts:{count:Math.max(1,n.length),html:async p=>{const[g,c]=n[p]??[0,0],r=i.html(g,c,{name:t.name,date:f,font:ae});return r.replace("<style>",`<style>${await ce(r)}`)}}}),i.job.pages.length}async function Mt(e,t,i,n,f,p){const g=(i??["xlsx"]).filter(r=>SHEET_TYPES.includes(r)),c=[];for(const r of t){if(g.length===0)break;p?.(`Rendering ${r.file}…`);const l=performance.now(),d=await Te(e,r.dir);if(d.failed){p?.(`${r.file}: its sheet.ts does not run. allyhub check says why.`);continue}const{workbook:u,calc:h}=Je(_e(e,d),{random:Xe([d.text,...d.csv.values(),d.generated?JSON.stringify(d.generated):""].join(`
|
|
3
|
+
`))});if(!u||!h)continue;const A=j=>{const O=ie.normalize(ie.join(r.dir,j));try{return O.startsWith("..")?void 0:new Uint8Array($e(x(e,O)))}catch{return}};await L(x(n,r.place),{recursive:!0});const E=G(r.place),k=`${r.place}/${E}`,D=u.sheets.length>1,z=u.title??r.title??E;for(const j of g){if(j==="pdf"){await printSheet(h,{file:x(n,`${k}.pdf`),name:E,title:z,picture:A}),c.push(await M(n,`${k}.pdf`,r.place,"pdf",l));continue}if(j==="png"){const w=Qe(h,{font:ae,file:A,rows:PNG_ROWS,columns:PNG_COLUMNS,headings:!1});for(const T of w.cut)p?.(`${k}.png: ${T}`);await Ve({html:w.html.replace("<style>",`<style>${await ce(w.html)}`),out:x(n,r.place),name:E,types:["png"],width:w.width+48,pictureCss:"body{padding:24px}"}),c.push(await M(n,`${k}.png`,r.place,"png",l));continue}if(j==="xlsx"){const{bytes:w,left:T}=et(h,{file:A});await W(x(n,`${k}.xlsx`),w);for(const Y of T)p?.(`${k}.xlsx does not hold ${Y}.`);c.push(await M(n,`${k}.xlsx`,r.place,"xlsx",l));continue}const O=[];if(j==="csv")for(const w of u.sheets)O.push([D?`${k}-${w.name.replace(/\W+/gu,"-")}.csv`:`${k}.csv`,Be(h,w,f)]);else j==="md"?O.push([`${k}.md`,u.sheets.map(w=>D?`## ${w.name}
|
|
4
4
|
|
|
5
|
-
${
|
|
6
|
-
`)]):
|
|
7
|
-
`]);for(const[
|
|
5
|
+
${le(h,w,f)}`:le(h,w,f)).join(`
|
|
6
|
+
`)]):O.push([`${k}.json`,`${JSON.stringify(Ke(h,f),null,2)}
|
|
7
|
+
`]);for(const[w,T]of O)await W(x(n,w),T),c.push(await M(n,w,r.place,j,l))}}return c}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export{DOC_TYPES,SHEET_TYPES,exportProject,exportVersion,exportsAtOnce}from"./export.js";export{batchName,checkName,exportName,exportNames,versionSuffixes}from"./names.js";export{batchCsv,batchOf,batchRows}from"./batch.js";export{renderDeckPptx}from"./deck-pptx.js";
|
|
2
|
+
export{DOC_TYPES,SHEET_TYPES,exportProject,exportVersion,exportsAtOnce,printSheet}from"./export.js";export{batchName,checkName,exportName,exportNames,versionSuffixes}from"./names.js";export{batchCsv,batchOf,batchRows}from"./batch.js";export{renderDeckPptx}from"./deck-pptx.js";
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DeckCodeSchema: z.ZodObject<{
|
|
3
|
+
slide_width: z.ZodNumber;
|
|
4
|
+
slide_height: z.ZodNumber;
|
|
5
|
+
theme: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
name: z.ZodOptional<z.ZodString>;
|
|
7
|
+
colors: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
8
|
+
dk1: "dk1";
|
|
9
|
+
lt1: "lt1";
|
|
10
|
+
dk2: "dk2";
|
|
11
|
+
lt2: "lt2";
|
|
12
|
+
accent1: "accent1";
|
|
13
|
+
accent2: "accent2";
|
|
14
|
+
accent3: "accent3";
|
|
15
|
+
accent4: "accent4";
|
|
16
|
+
accent5: "accent5";
|
|
17
|
+
accent6: "accent6";
|
|
18
|
+
hlink: "hlink";
|
|
19
|
+
folHlink: "folHlink";
|
|
20
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
21
|
+
fonts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
masters: z.ZodArray<z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
background: z.ZodUnion<readonly [z.ZodEnum<{
|
|
26
|
+
dk1: "dk1";
|
|
27
|
+
lt1: "lt1";
|
|
28
|
+
dk2: "dk2";
|
|
29
|
+
lt2: "lt2";
|
|
30
|
+
accent1: "accent1";
|
|
31
|
+
accent2: "accent2";
|
|
32
|
+
accent3: "accent3";
|
|
33
|
+
accent4: "accent4";
|
|
34
|
+
accent5: "accent5";
|
|
35
|
+
accent6: "accent6";
|
|
36
|
+
hlink: "hlink";
|
|
37
|
+
folHlink: "folHlink";
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
theme_color: z.ZodEnum<{
|
|
40
|
+
dk1: "dk1";
|
|
41
|
+
lt1: "lt1";
|
|
42
|
+
dk2: "dk2";
|
|
43
|
+
lt2: "lt2";
|
|
44
|
+
accent1: "accent1";
|
|
45
|
+
accent2: "accent2";
|
|
46
|
+
accent3: "accent3";
|
|
47
|
+
accent4: "accent4";
|
|
48
|
+
accent5: "accent5";
|
|
49
|
+
accent6: "accent6";
|
|
50
|
+
hlink: "hlink";
|
|
51
|
+
folHlink: "folHlink";
|
|
52
|
+
}>;
|
|
53
|
+
brightness: z.ZodNumber;
|
|
54
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
55
|
+
rgb: z.ZodString;
|
|
56
|
+
}, z.core.$strict>]>;
|
|
57
|
+
text_styles: z.ZodObject<{
|
|
58
|
+
title: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
59
|
+
body: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
60
|
+
other: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
kind: z.ZodEnum<{
|
|
65
|
+
picture: "picture";
|
|
66
|
+
textbox: "textbox";
|
|
67
|
+
movie: "movie";
|
|
68
|
+
table: "table";
|
|
69
|
+
chart: "chart";
|
|
70
|
+
component: "component";
|
|
71
|
+
placeholder: "placeholder";
|
|
72
|
+
autoshape: "autoshape";
|
|
73
|
+
}>;
|
|
74
|
+
frame: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
left: z.ZodNumber;
|
|
76
|
+
top: z.ZodNumber;
|
|
77
|
+
width: z.ZodNumber;
|
|
78
|
+
height: z.ZodNumber;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
placeholder: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
type: z.ZodString;
|
|
82
|
+
idx: z.ZodNumber;
|
|
83
|
+
}, z.core.$strict>>;
|
|
84
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
86
|
+
level: z.ZodNumber;
|
|
87
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
88
|
+
text: z.ZodString;
|
|
89
|
+
}, z.core.$loose>>;
|
|
90
|
+
}, z.core.$loose>>;
|
|
91
|
+
levels: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
path: z.ZodString;
|
|
95
|
+
base: z.ZodString;
|
|
96
|
+
}, z.core.$loose>>;
|
|
97
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
}, z.core.$loose>>;
|
|
102
|
+
layouts: z.ZodArray<z.ZodObject<{
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
master: z.ZodString;
|
|
105
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
kind: z.ZodEnum<{
|
|
108
|
+
picture: "picture";
|
|
109
|
+
textbox: "textbox";
|
|
110
|
+
movie: "movie";
|
|
111
|
+
table: "table";
|
|
112
|
+
chart: "chart";
|
|
113
|
+
component: "component";
|
|
114
|
+
placeholder: "placeholder";
|
|
115
|
+
autoshape: "autoshape";
|
|
116
|
+
}>;
|
|
117
|
+
frame: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
left: z.ZodNumber;
|
|
119
|
+
top: z.ZodNumber;
|
|
120
|
+
width: z.ZodNumber;
|
|
121
|
+
height: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
placeholder: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
type: z.ZodString;
|
|
125
|
+
idx: z.ZodNumber;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
129
|
+
level: z.ZodNumber;
|
|
130
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
131
|
+
text: z.ZodString;
|
|
132
|
+
}, z.core.$loose>>;
|
|
133
|
+
}, z.core.$loose>>;
|
|
134
|
+
levels: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
135
|
+
}, z.core.$loose>>;
|
|
136
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
path: z.ZodString;
|
|
138
|
+
base: z.ZodString;
|
|
139
|
+
}, z.core.$loose>>;
|
|
140
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
143
|
+
}, z.core.$strict>>;
|
|
144
|
+
}, z.core.$loose>>;
|
|
145
|
+
}, z.core.$loose>>;
|
|
146
|
+
}, z.core.$loose>>;
|
|
147
|
+
components: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
148
|
+
props: z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
149
|
+
}, z.core.$strict>>;
|
|
150
|
+
generators: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
layout: z.ZodString;
|
|
153
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
154
|
+
name: z.ZodString;
|
|
155
|
+
kind: z.ZodEnum<{
|
|
156
|
+
picture: "picture";
|
|
157
|
+
textbox: "textbox";
|
|
158
|
+
movie: "movie";
|
|
159
|
+
table: "table";
|
|
160
|
+
chart: "chart";
|
|
161
|
+
component: "component";
|
|
162
|
+
placeholder: "placeholder";
|
|
163
|
+
autoshape: "autoshape";
|
|
164
|
+
}>;
|
|
165
|
+
frame: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
left: z.ZodNumber;
|
|
167
|
+
top: z.ZodNumber;
|
|
168
|
+
width: z.ZodNumber;
|
|
169
|
+
height: z.ZodNumber;
|
|
170
|
+
}, z.core.$strict>>;
|
|
171
|
+
placeholder: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
type: z.ZodString;
|
|
173
|
+
idx: z.ZodNumber;
|
|
174
|
+
}, z.core.$strict>>;
|
|
175
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
177
|
+
level: z.ZodNumber;
|
|
178
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
179
|
+
text: z.ZodString;
|
|
180
|
+
}, z.core.$loose>>;
|
|
181
|
+
}, z.core.$loose>>;
|
|
182
|
+
levels: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
|
|
183
|
+
}, z.core.$loose>>;
|
|
184
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
path: z.ZodString;
|
|
186
|
+
base: z.ZodString;
|
|
187
|
+
}, z.core.$loose>>;
|
|
188
|
+
component: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
name: z.ZodString;
|
|
190
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
191
|
+
}, z.core.$strict>>;
|
|
192
|
+
}, z.core.$loose>>;
|
|
193
|
+
text: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
194
|
+
level: z.ZodNumber;
|
|
195
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
196
|
+
text: z.ZodString;
|
|
197
|
+
}, z.core.$loose>>;
|
|
198
|
+
}, z.core.$loose>>>;
|
|
199
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$loose>>, z.ZodObject<{
|
|
201
|
+
error: z.ZodString;
|
|
202
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>]>>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
//# sourceMappingURL=deck-code.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as t}from"zod";import{THEME_COLORS as o}from"./slides.js";const e=t.number(),s=t.union([t.enum(o),t.strictObject({theme_color:t.enum(o),brightness:t.number().min(-1).max(1)}),t.strictObject({rgb:t.string().regex(/^#?[0-9A-Fa-f]{6}$/u)})]),i=t.strictObject({left:e,top:e,width:e,height:e}),c=t.looseObject({text:t.string()}),n=t.looseObject({level:t.number().int().min(0).max(8),runs:t.array(c)}),l=t.looseObject({paragraphs:t.array(n),levels:t.array(t.looseObject({}))}),r=t.looseObject({name:t.string(),kind:t.enum(["placeholder","textbox","picture","movie","autoshape","table","chart","component"]),frame:i.optional(),placeholder:t.strictObject({type:t.string(),idx:t.number().int()}).optional(),text:l.optional(),media:t.looseObject({path:t.string(),base:t.string()}).optional(),component:t.strictObject({name:t.string(),props:t.record(t.string(),t.unknown())}).optional()}),p=t.looseObject({name:t.string(),master:t.string(),shapes:t.array(r)}),m=t.looseObject({name:t.string(),background:s,text_styles:t.strictObject({title:t.array(t.looseObject({})),body:t.array(t.looseObject({})),other:t.array(t.looseObject({}))}),shapes:t.array(r),layouts:t.array(p)}),a=t.lazy(()=>t.looseObject({type:t.string(),optional:t.boolean().optional(),of:a.optional(),fields:t.record(t.string(),a).optional(),kind:t.string().optional()})),g=t.looseObject({id:t.string(),layout:t.string(),shapes:t.array(r),text:t.record(t.string(),t.array(n)),notes:t.string().optional()});export const DeckCodeSchema=t.strictObject({slide_width:e.positive(),slide_height:e.positive(),theme:t.strictObject({name:t.string().optional(),colors:t.partialRecord(t.enum(o),t.string()).optional(),fonts:t.record(t.string(),t.string()).optional()}).optional(),masters:t.array(m),components:t.record(t.string(),t.strictObject({props:t.record(t.string(),a)})),generators:t.record(t.string(),t.union([t.array(g),t.strictObject({error:t.string(),stack:t.string().optional()})]))});
|