allyhub 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/align.js +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/cloud-tools.js +5 -5
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/dev.js +5 -5
- package/dist/commands/export.js +3 -0
- package/dist/commands/frames/doc.js +1 -1
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/sheet.js +1 -1
- package/dist/commands/frames.js +9 -9
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/combos.js +1 -1
- package/dist/commands/inspect/common.js +2 -2
- package/dist/commands/inspect/facts.js +2 -2
- package/dist/commands/migrate.js +3 -0
- package/dist/commands/skills.js +3 -3
- package/dist/commands/upgrade.js +5 -0
- package/dist/commands.json +1 -1
- package/dist/help.js +3 -3
- package/dist/main.js +8 -7
- package/dist/node_modules/@allyhub/3d-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/blocks/LICENSE +241 -0
- package/dist/node_modules/@allyhub/blocks/dist/alt.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/elements.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/flow-resolve.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/flow-table.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/format.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/gantt.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/grids.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/html.js +75 -0
- package/dist/node_modules/@allyhub/blocks/dist/icons.generated.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/icons.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/layout.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/look.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/measure.js +3 -0
- package/dist/node_modules/@allyhub/blocks/dist/model.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/page.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/palette.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/path.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/resolve.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/samples.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/sankey.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/svg.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/tidy.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/trees.js +2 -0
- package/dist/node_modules/@allyhub/blocks/package.json +19 -0
- package/dist/node_modules/@allyhub/browser/dist/html.js +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/fonts.js +9 -3
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/migrate.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
- package/dist/node_modules/@allyhub/build/package.json +5 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +4 -3
- package/dist/node_modules/@allyhub/chart/dist/chart.js +4 -2
- package/dist/node_modules/@allyhub/chart/dist/chartex-xml.js +4 -0
- package/dist/node_modules/@allyhub/chart/dist/classic.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/embedded.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/extended.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/tree.js +2 -0
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/call.js +4 -4
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/storage.js +2 -0
- package/dist/node_modules/@allyhub/cloud/dist/uploads.js +2 -2
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/background.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/item-process.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/item-worker.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/pages.js +20 -1
- package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -3
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/dist/block-shapes.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/blocks.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/color.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/docx-read.js +12 -0
- package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -4
- package/dist/node_modules/@allyhub/doc/dist/html.js +83 -48
- package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/merges.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/numbering.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/omml.js +3 -0
- package/dist/node_modules/@allyhub/doc/dist/page.js +2 -1
- package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -4
- package/dist/node_modules/@allyhub/doc/dist/redline.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/revisions.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/shapes.js +4 -0
- package/dist/node_modules/@allyhub/doc/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/write.js +65 -39
- package/dist/node_modules/@allyhub/doc/package.json +5 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +3 -0
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/index.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/styles.js +4 -0
- package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +22 -2
- package/dist/node_modules/@allyhub/doc-print/dist/drawn.js +4 -4
- package/dist/node_modules/@allyhub/doc-print/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/doc-print/dist/layout.js +8 -7
- package/dist/node_modules/@allyhub/doc-print/dist/print.js +22 -16
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/blocks-flow.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/blocks.d.ts +146 -0
- package/dist/node_modules/@allyhub/formats/dist/data/blocks.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.d.ts +9 -0
- package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +47 -40
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.d.ts +6 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagrams.d.ts +29 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagrams.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +18 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +67 -0
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +698 -258
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +14104 -2167
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/themes.d.ts +82 -0
- package/dist/node_modules/@allyhub/formats/dist/data/themes.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/tokens.d.ts +67 -0
- package/dist/node_modules/@allyhub/formats/dist/data/tokens.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +7 -0
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +12 -3
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +3260 -290
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +45 -0
- package/dist/node_modules/@allyhub/formats/dist/tolerant.js +2 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -9
- package/dist/node_modules/@allyhub/html-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/html-extension/markup/markup.json +14 -4
- package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +22 -1
- package/dist/node_modules/@allyhub/html-extension/package.json +9 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +2 -2
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/build-plugins.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +2 -2
- package/dist/node_modules/@allyhub/image-measure/dist/layout.js +2 -2
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/dist/block.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/blocks.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -3
- package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +3 -3
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/analyses/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/asr/transcribe.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/ocr/text.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/index-media.js +3 -2
- package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/mce.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/node.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ns.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/opc.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/export.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/look.d.ts +10 -2
- package/dist/node_modules/@allyhub/piece/dist/look.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +8 -2
- package/dist/node_modules/@allyhub/piece/dist/script.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +3 -0
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/media-index.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/page-frame.js +2 -0
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/report-extension/dist/build.js +3 -0
- package/dist/node_modules/@allyhub/report-extension/dist/check.js +37 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +4 -0
- package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
- package/dist/node_modules/@allyhub/report-extension/dist/page.js +23 -0
- package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +33 -0
- package/dist/node_modules/@allyhub/report-extension/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/package.json +185 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +180 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +15 -0
- package/dist/node_modules/@allyhub/runtime/dist/footage.js +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/packages.js +2 -2
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +3 -3
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +12 -8
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/server.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/cell-styles.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/heatmap.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/html.js +8 -8
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/paginate.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sparklines.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/theme.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/tiles.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/units.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +14 -14
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/theme.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/tile-shapes.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +7 -7
- package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/evaluate.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/inspect.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/migrations.js +4 -0
- package/dist/node_modules/@allyhub/sheet-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +7 -3
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/blocks.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/code.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/office-layouts.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/styles/brief.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/editorial.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/index.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/kit.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/layouts.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/pitch.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/stage.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/tiles.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/dist/deck-fonts.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +24 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/image-size.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +7 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/mtx.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +3 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chartex.js +3 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +3 -2
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +42 -0
- package/dist/node_modules/@allyhub/stage-page/dist/style-faces.js +2 -0
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +96 -92
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/limit.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
- package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/seams.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/index.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/joins.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/loop.js +3 -0
- package/dist/node_modules/@allyhub/video-extension/package.json +2 -25
- package/dist/node_modules/@allyhub/video-measure/dist/check.js +2 -2
- package/dist/node_modules/@allyhub/video-measure/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/dist/seams.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/free.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/website/dist/website.js +2 -2
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +3 -3
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -3
- package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +3 -3
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +15 -14
- package/dist/self-upgrade.js +2 -0
- package/dist/text/batch-text.js +1 -1
- package/dist/text/facts-text.js +5 -5
- package/dist/text/format.js +2 -2
- package/dist/update-notice.js +3 -0
- package/dist/version.js +1 -1
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-DYaMS_BB.js → abnfDiagram-WEYOIA3C-B4tvwU6C.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-g_Tjfl_y.js → architecture-WOLXFQ4H-V2fA0vY2.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-CqdhofOL.js → architectureDiagram-ZHVYKT53-B6B7XN0M.js} +1 -1
- package/editor-web/assets/arrow-down-D-QZrqcz.js +1 -0
- package/editor-web/assets/arrow-up-B1zjKUHX.js +1 -0
- package/editor-web/assets/article-DW4eD_8K.js +3 -0
- package/editor-web/assets/article-Dm2dIEwc.js +7 -0
- package/editor-web/assets/{audio-lines-PZj77e7t.js → audio-lines-BFoW_IeO.js} +1 -1
- package/editor-web/assets/{bar-button-J9vbfzTx.js → bar-button-CJmpgNg4.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-Bc-28Bci.js → blockDiagram-RJAE7QA3-BizcUGOM.js} +1 -1
- package/editor-web/assets/{browser-C9NP0ZYz.js → browser-DEGNhKTV.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-CTGJb8FB.js → c4Diagram-XDPPPE54-CBHS0dQ0.js} +1 -1
- package/editor-web/assets/calc-worker-Cr4a0xmt.js +168 -0
- package/editor-web/assets/channel-dyUtlVPg.js +1 -0
- package/editor-web/assets/{chart-no-axes-column-Be0lFcGF.js → chart-no-axes-column-Dyy25XZ_.js} +1 -1
- package/editor-web/assets/chip-BdQRH3FL.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-B2MPOVTU.js → chunk-2E7WHVMD-CMPBck_Q.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-BUV1ZHP0.js → chunk-4EMNKR2T-Df22Adpt.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-BZlpspL5.js → chunk-55XCU76K-CYrZ6_Q7.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-CpKeisWE.js → chunk-7S6XSTFO-BfdG9NNW.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BJqwAPyo.js → chunk-AQDTSKZB-BCzZMoTJ.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-D6oPWl_W.js → chunk-DSNLSHJZ-DT0xT8Wf.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-B5pk4MZF.js → chunk-HAGFOTED-Bg3-EotU.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-DHbSPvxQ.js → chunk-HNE4Q36P-BrSym24V.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CcL_GcRA.js → chunk-NQOKRVIF-CMxgkJWF.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-YgiOL6XE.js → chunk-UHW7PFBP-DWEwoyPy.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-p14b4UYc.js → chunk-VQ5W62QI-eTFh5_T9.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-BWW0x-XH.js → chunk-WQQL4CDK-4PTupr9T.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-oG3qd68C.js → chunk-YZO67HFG-D5XAAFWm.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CpcheH0u.js → chunk-ZAUX2LTX-CPsdaisO.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-cWQvLl1w.js → chunk-ZCHMQSOR-ClnuUyfy.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-7PG7YcdU.js → classDiagram-v2-4MYWR3UA-CM21waNF.js} +1 -1
- package/editor-web/assets/code-Ch6AB5bZ.js +1 -0
- package/editor-web/assets/{collaborator-BU4qU7O3.js → collaborator-CbTacvkB.js} +1 -1
- package/editor-web/assets/color-picker-BmKFn2ww.js +1 -0
- package/editor-web/assets/{copy-CuJSs0nI.js → copy-SoaMYqsN.js} +1 -1
- package/editor-web/assets/{createLucideIcon-lm_6n8YT.js → createLucideIcon-euu7Wcd9.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-CtcknEQ_.js → cynefin-EF2NZ3EQ-CJUHTgee.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-Ca7VIsjN.js → cynefinDiagram-WF24UDRP-C9RIfuIV.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-BzcSLtsr.js → dagre-NK4GIZVX-g-01KdpO.js} +1 -1
- package/editor-web/assets/deck-C0VxrlzX.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-DpRmTGlG.js → diagram-CBK3MWTC-CbOjWUu-.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-BTrs_AX8.js → diagram-I5XIIV2D-C6psNS8J.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-CkIVjPqH.js → diagram-ODIL2UCW-C9PUE46P.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-BlFMbAG1.js → diagram-PFBEJUXE-vJ_pnB33.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-D3f8VJ-D.js → diagram-RJA3I4VV-FwYlEfJ-.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-Bbpngj6F.js → diagram-TYUNFSNR-FKpIxeUc.js} +1 -1
- package/editor-web/assets/{dist-DruvDNQe.js → dist-B8_6sJ_V.js} +5 -5
- package/editor-web/assets/dist-BI_BaYhO.js +19 -0
- package/editor-web/assets/dist-BaWFMuvr.js +1 -0
- package/editor-web/assets/dist-BdmMT8fP.js +5 -0
- package/editor-web/assets/dist-BgKyM9U6.js +3 -0
- package/editor-web/assets/dist-BqijryYd.js +1 -0
- package/editor-web/assets/dist-ByguWp3a.js +16 -0
- package/editor-web/assets/dist-CB-_0-X4.js +41 -0
- package/editor-web/assets/dist-CCP24Lel.js +19 -0
- package/editor-web/assets/dist-Cg0Z26Kv.js +6 -0
- package/editor-web/assets/dist-CtYjYJdv.js +1 -0
- package/editor-web/assets/dist-D07Kj8GR.js +1 -0
- package/editor-web/assets/dist-D2rGVz9C.js +1 -0
- package/editor-web/assets/dist-D3DwRF1k.js +547 -0
- package/editor-web/assets/dist-DCI21ljp.js +6 -0
- package/editor-web/assets/dist-DH8oJJw9.js +35 -0
- package/editor-web/assets/dist-DIJnhQFK.js +9 -0
- package/editor-web/assets/dist-DJvfQvM7.js +24 -0
- package/editor-web/assets/{dist-Bd8IxQPP.js → dist-DQ6RpEJD.js} +2 -2
- package/editor-web/assets/dist-DmCDcb2_.js +4 -0
- package/editor-web/assets/dist-H0z_DXDz.js +19 -0
- package/editor-web/assets/dist-QLXI7XGS.js +82 -0
- package/editor-web/assets/{docx-draw-CoK1oqQD.js → docx-draw-Dxb67W2d.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-BaKj-yL6.js → ebnfDiagram-V4P3TTPT-DBymUM-F.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Cn2qv1_U.js → elk-QONTBCTQ-BNYR3OlS.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-Bd7AEIDo.js → erDiagram-KYQIGQAA-cTNyOqW6.js} +1 -1
- package/editor-web/assets/esm-Cl3GKSDd.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-Sfp7_461.js → eventmodeling-K75KTNOO-C6FUZeXP.js} +1 -1
- package/editor-web/assets/eye-DwfE1USj.js +1 -0
- package/editor-web/assets/{file-question-mark-DlIjUK37.js → file-question-mark-PeZgyqkK.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CBqcGdHI.js → ganttDiagram-R7GPNTJY-LD9mqQ1x.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-WTokXKTW.js → gitGraph-VSP46ZUC-CtCBcQFl.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BIWZHD9q.js → gitGraphDiagram-PDYL7XHY-DYQpOozz.js} +1 -1
- package/editor-web/assets/{group-BdrTp7gi.js → group-DwM2yqU8.js} +1 -1
- package/editor-web/assets/{hint-rlht0uxG.js → hint-F4fIBnVU.js} +1 -1
- package/editor-web/assets/index-Cah2zchD.css +2 -0
- package/editor-web/assets/index-omhSywJb.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-COC6G-_J.js → info-OHQRW6UA-IXInKPRO.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-DpaqdKBD.js → infoDiagram-MVDRKAX5-Ds7Cei7T.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Dyn2MAy1.js → ishikawaDiagram-HPEHV2GE-DWs3qtAX.js} +1 -1
- package/editor-web/assets/iso-UwGLGD3F.js +1 -0
- package/editor-web/assets/{italic-zw4_eUNF.js → italic-BV7iHxoP.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DeSVfmm7.js → journeyDiagram-BOSHW7O7-BkNKVYBA.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-Bfg0lj7B.js → kanban-definition-FNSA4HC5-D3dMswnI.js} +1 -1
- package/editor-web/assets/{link-DopSU3aa.js → link-CFOv3nz-.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-CyhovuYE.js → mermaid-parser.core-D_W_0X0N.js} +3 -3
- package/editor-web/assets/{mermaid.core-Dx1fBVUG.js → mermaid.core-Bkirj-s5.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-QEU2HF_m.js → mindmap-definition-6OY57UG3-CMKkAAvI.js} +1 -1
- package/editor-web/assets/minus-ngE8owxs.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-ReJTa_hw.js → packet-JDAUHWVQ-CzCkgCfg.js} +1 -1
- package/editor-web/assets/palette-DchDLJj6.js +1 -0
- package/editor-web/assets/panes-BexRuZd2.js +3 -0
- package/editor-web/assets/{pegDiagram-ECIUJNBX-Bo1jFrvb.js → pegDiagram-ECIUJNBX-C8qHkx7M.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BrtYafNA.js → pie-XZMESJXO-BJqgxMrD.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-Cj0zQqs_.js → pieDiagram-GNMPY74T-DyNntV5y.js} +1 -1
- package/editor-web/assets/{progress-CwKcXARv.js → progress-D1Uv3d1b.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-D5npDAVn.js → quadrantDiagram-D57K4MC3-BHa-69ir.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-C8RDrRqi.js → radar-ABXABTNO-BeRPjBBR.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-ebDrmYTK.js → railroad-I3PHUGI6-BaRQqRsK.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BxKuqg6V.js → railroad-abnf-LNEFI6M7-BZfwomxZ.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DOclnfpr.js → railroad-ebnf-DWYD2UWJ-DbgqpEF5.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-DN0A1fpq.js → railroad-peg-JR7BVNR7-BYOf3PsQ.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-B3PjoVWw.js → railroadDiagram-Y72NRBL7-B5OAzOsD.js} +1 -1
- package/editor-web/assets/react-Byupo4pA.js +1 -0
- package/editor-web/assets/replace-CLLMtF4e.js +1 -0
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-DLdzkQk5.js → requirementDiagram-EQYSW5RA-wqYNoqO0.js} +1 -1
- package/editor-web/assets/ribbon-tabs-B3IC9WOt.js +1 -0
- package/editor-web/assets/row-DqS4-5b1.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Dip4Piv_.js → sankeyDiagram-SY24JHO5-Crf6GRsa.js} +1 -1
- package/editor-web/assets/schemas-C21MyseF.js +1 -0
- package/editor-web/assets/{iso-DoC-ZoBr.js → schemas-DlRAoVtq.js} +1 -1
- package/editor-web/assets/{scissors-B_xOiUhd.js → scissors-m6QcoEf2.js} +1 -1
- package/editor-web/assets/search-D75Bi2GU.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-QnPcoybL.js → sequenceDiagram-BLEHNHQU-DUcHz4_d.js} +1 -1
- package/editor-web/assets/{session-DMlLCFWg.js → session--OJYv_B7.js} +1 -1
- package/editor-web/assets/{sigma-DSUsJhMn.js → sigma-B4AWtnVA.js} +1 -1
- package/editor-web/assets/snapshots-DYooVfOx.js +1 -0
- package/editor-web/assets/sound-DkR3qxSt.js +1 -0
- package/editor-web/assets/{square-arrow-out-up-right-DF5dvsSp.js → square-arrow-out-up-right-1NqFsNDe.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-D103CiMX.js → stateDiagram-v2-A6IESKWZ-DbeLdnpS.js} +1 -1
- package/editor-web/assets/{sticky-note-BdkIu5_D.js → sticky-note-s4QfzaBB.js} +1 -1
- package/editor-web/assets/{surface-DtCjIlrq.js → surface-BUoi7cmR.js} +1 -1
- package/editor-web/assets/swatch-DCmD1gZl.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-y4gCqEoa.js → swimlanes-B3ENRKFQ-BDi6AeJI.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +8 -0
- package/editor-web/assets/{switch-8MU4Nfxe.js → switch-b6GCy_ix.js} +1 -1
- package/editor-web/assets/syntax-Bqyhj0dw.js +1 -0
- package/editor-web/assets/table-BW43XXVd.js +1 -0
- package/editor-web/assets/tablet-C6oePHEW.js +1 -0
- package/editor-web/assets/text-wrap-Baus6l-V.js +1 -0
- package/editor-web/assets/{textarea-D7TnPwv1.js → textarea-Bu6uPEqT.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-BMp76v4V.js → timeline-definition-JXYKGLGB-B0awa2hh.js} +1 -1
- package/editor-web/assets/tolerant-DM9s0Mt1.js +1 -0
- package/editor-web/assets/trash-2-SFReAxVM.js +1 -0
- package/editor-web/assets/{treeView-D4JQ5SDB-Q_GYyk0b.js → treeView-D4JQ5SDB-C91G0IGm.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-B5lRWdQB.js → treemap-SAJKECNS-CiOWiwl2.js} +1 -1
- package/editor-web/assets/{undo-2-C47jrRp5.js → undo-2-DCbMWoug.js} +1 -1
- package/editor-web/assets/updating-D0GEtwnJ.js +1 -0
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX--QRllA-U.js → usecaseDiagram-WPOLBNNX-DMYM1MRe.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CzkATPA3.js → vennDiagram-Q3Y3IDCW-DQIJ5vvN.js} +1 -1
- package/editor-web/assets/video-mMOFXHYK.js +1 -0
- package/editor-web/assets/{wardley-7MLQ67FV-BXzwcdJa.js → wardley-7MLQ67FV-C3H9HG8r.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BQvC8Agx.js → wardleyDiagram-IVAIDKWA-DgsjqY1Y.js} +1 -1
- package/editor-web/assets/{whole-word-D3ZAtnkw.js → whole-word-C9TkGBCY.js} +1 -1
- package/editor-web/assets/{words-CaUHhQHf.js → words-B2jQwWpp.js} +3 -3
- package/editor-web/assets/words-DgMuEmDO.js +3 -0
- package/editor-web/assets/workbook-NtMEyLgf.js +41 -0
- package/editor-web/assets/{x-DlhyIKuu.js → x-BAJilkKD.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-aY-lsD5o.js → xychartDiagram-4URNHDU4-DzsGI527.js} +1 -1
- package/editor-web/assets/{zoom-in-PgsC94hP.js → zoom-in-yAGKspfC.js} +1 -1
- package/editor-web/index.html +9 -9
- package/package.json +6 -3
- package/CHANGELOG.md +0 -251
- package/dist/commands/render.js +0 -3
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/motion.js +0 -4
- package/dist/node_modules/@allyhub/video-measure/dist/still.js +0 -2
- package/editor-web/assets/arrow-down-B8VUPCGi.js +0 -1
- package/editor-web/assets/arrow-up-Ds4juY8X.js +0 -1
- package/editor-web/assets/article-8evPh712.js +0 -3
- package/editor-web/assets/article-BhRtWYMd.js +0 -7
- package/editor-web/assets/calc-worker-oEIqrrTM.js +0 -45
- package/editor-web/assets/channel-wIj_OqDm.js +0 -1
- package/editor-web/assets/chart-amT4lgX3.js +0 -2
- package/editor-web/assets/chart-file-dGiRgFcH.js +0 -1
- package/editor-web/assets/code-CD-CbJG9.js +0 -1
- package/editor-web/assets/deck-C7fN0Qtn.js +0 -1
- package/editor-web/assets/dist-3iovns9K.js +0 -16
- package/editor-web/assets/dist-BkHnbOEj.js +0 -4
- package/editor-web/assets/dist-BvOrNcK-.js +0 -19
- package/editor-web/assets/dist-CEIszq39.js +0 -1
- package/editor-web/assets/dist-CU5RbLNH.js +0 -1
- package/editor-web/assets/dist-CWZj8IAm.js +0 -1
- package/editor-web/assets/dist-C_Mtrnif.js +0 -17
- package/editor-web/assets/dist-CdqpwdCV.js +0 -24
- package/editor-web/assets/dist-CjT76RAw.js +0 -43
- package/editor-web/assets/dist-CpzEn9T8.js +0 -6
- package/editor-web/assets/dist-CrFYWl5-.js +0 -3
- package/editor-web/assets/dist-D3C6FyrO.js +0 -82
- package/editor-web/assets/dist-D4eBFGVL.js +0 -1
- package/editor-web/assets/dist-DTcjb3cP.js +0 -18
- package/editor-web/assets/dist-D_WSM29I.js +0 -17
- package/editor-web/assets/dist-Dp_9ISjP.js +0 -531
- package/editor-web/assets/dist-J-tPYKGS.js +0 -5
- package/editor-web/assets/dist-YW8hS4IM.js +0 -9
- package/editor-web/assets/esm-Cjv8ogpP.js +0 -21
- package/editor-web/assets/file-exclamation-point-_L3ElCJ5.js +0 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-BlVUglzw.js +0 -1
- package/editor-web/assets/index-BQWZnyAQ.js +0 -28
- package/editor-web/assets/index-Dvh1t1om.css +0 -2
- package/editor-web/assets/layout-SWqqA0yV.js +0 -1
- package/editor-web/assets/minus-CbPnUIOy.js +0 -1
- package/editor-web/assets/props-form-BpSXbrSF.js +0 -1
- package/editor-web/assets/react-Edyoga_4.js +0 -1
- package/editor-web/assets/row-C_svyL8o.js +0 -1
- package/editor-web/assets/schemas-CQ_UU8-Z.js +0 -1
- package/editor-web/assets/search-Ba2BbT6T.js +0 -1
- package/editor-web/assets/slides-7xWhREpt.js +0 -1
- package/editor-web/assets/snapshots-BLX4NTQC.js +0 -1
- package/editor-web/assets/sound-bTlco_K3.js +0 -1
- package/editor-web/assets/split-tFGKk-x8.js +0 -3
- package/editor-web/assets/strikethrough-BwXWi4zg.js +0 -1
- package/editor-web/assets/svg-CWIBMIQ9.js +0 -1
- package/editor-web/assets/swatch-DhztHwPU.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DKzB_wSf.js +0 -8
- package/editor-web/assets/syntax-CU_WPKxt.js +0 -1
- package/editor-web/assets/table-DRbddzx0.js +0 -1
- package/editor-web/assets/tabs-CuEawka3.js +0 -1
- package/editor-web/assets/tag-CIfWT8B_.js +0 -1
- package/editor-web/assets/text-align-start-Cic2-TLh.js +0 -1
- package/editor-web/assets/video-D0uTbHWx.js +0 -1
- package/editor-web/assets/words-XlXG79Ur.js +0 -3
- package/editor-web/assets/workbook-CiCXkjmN.js +0 -45
package/dist/commands/align.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{relative as h}from"node:path";import{z as s}from"zod";import{parameters as p}from"../parameters.js";import{SECOND_PEAK_GUARD as u,syncOffset as $}from"@allyhub/media";import{defineCommand as g}from"../command.js";import{existingFile as
|
|
2
|
+
import{relative as h}from"node:path";import{z as s}from"zod";import{parameters as p}from"../parameters.js";import{SECOND_PEAK_GUARD as u,syncOffset as $}from"@allyhub/media";import{defineCommand as g}from"../command.js";import{existingFile as m,media as w,progressLines as b}from"../media.js";import{projectOfFile as x}from"../project.js";const d=(e,t)=>`${e<0?"−":"+"}${Math.abs(e).toFixed(t)}`,l=e=>e<0?`−${(-e).toFixed(1)}`:e.toFixed(1);function F(e){const t=Object.fromEntries(Object.entries(e).filter(([r])=>r!=="reference"&&r!=="rate"&&r!=="other")),o=e.other;return{...o,...t,offset:e.offset,pictureOffset:e.offset===null||o.soundStart===null?null:Math.round((e.offset+o.soundStart)*1e6)/1e6}}function S(e,t){const o=t(e.reference.file),r=t(e.other.file),f=` Sound: ${o} ${l(e.level.reference.rms)} dBFS RMS, ${e.reference.duration.toFixed(2)} s; ${r} ${l(e.level.other.rms)} dBFS RMS, ${e.other.duration.toFixed(2)} s${e.other.soundStart?`; its sound starts ${String(e.other.soundStart)} s into its own clock`:""}.`;if(e.offset===null)return[`${r} against ${o}: not measured: ${e.why??"no offset found"}.`,f];const n=[`${r} against ${o}: offset ${d(e.offset,6)} s: a moment at t s of ${o} is at t ${e.offset<0?"−":"+"} ${Math.abs(e.offset).toFixed(6)} s of ${r}.`];return e.peak&&n.push(` Peak ${e.peak.confidence.toFixed(1)} × the correlation's RMS; ${e.second?`the next peak more than ${String(u)} s away ${e.second.ratio.toFixed(2)} × lower, at ${d(e.second.offset,3)} s`:"no other peak"}; polarity ${e.peak.inverted?"inverted":"the same"}; ${String(e.common??0)} s of common sound.`),e.windows.length&&n.push(` Windows (${String(e.windows[0]?.dur??0)} s each): where, offset, peak, width, correlation:`,...e.windows.map(a=>a.offset===null?` at ${a.at.toFixed(2).padStart(8)} s not measured: no sound on a side`:` at ${a.at.toFixed(2).padStart(8)} s ${d(a.offset,6)} s ${(a.confidence??0).toFixed(1)} × ${((a.width??0)*1e3).toFixed(3)} ms ${(a.correlation??0).toFixed(3)}`)),n.push(e.drift?` Drift ${d(e.drift.ppm,2)} ppm over ${String(e.drift.span)} s: offset(t) = ${e.drift.at0.toFixed(6)} ${e.drift.slope<0?"−":"+"} ${Math.abs(e.drift.slope).toExponential(4)} × t; speed ${(1+e.drift.slope).toFixed(8)} keeps step.`:` Drift not measured: ${e.driftWhy??"no line"}.`,f),n}const y={max:s.number().positive().optional().describe("The largest offset looked for either way, seconds (default any that leaves common sound)")};export const align=g({name:"align",summary:"The offset between recordings of the same moment, from their sound, with how sharply they match and how it drifts; in --json, pictureOffset: a camera's picture offset when its file's sound starts later on its own clock",input:s.strictObject({reference:s.string().describe("The recording the others are measured against"),others:s.array(s.string()).min(1).describe("The recordings to measure: other = reference + offset"),dir:s.string().optional().describe("The project whose media index keeps the result (default the nearest above the reference)"),params:p(y)}),positional:["reference","others"],output:s.looseObject({reference:s.unknown(),files:s.array(s.looseObject({offset:s.number().nullable()}))}),examples:["allyhub align assets/media/mic.wav assets/media/cam.mp4","allyhub align mic.wav cam.mp4 --param max=10"]},async(e,t)=>{const o=await m(t.cwd,e.reference),r=await Promise.all(e.others.map(i=>m(t.cwd,i))),f=await x(e.reference,t.cwd,e.dir);f.warning!==void 0&&t.progress(f.warning);const n=[];for(const i of r)n.push(await w(()=>$(o,i,{root:f.root,...e.params.max===void 0?{}:{max:e.params.max},onProgress:b(t),signal:t.signal})));const a=i=>{const c=h(t.cwd,i);return c===""||c.startsWith("..")?i:c};return{value:{project:f.root,reference:n[0]?.reference??{file:o},rate:n[0]?.rate??null,files:n.map(F)},text:n.flatMap(i=>S(i,a)).join(`
|
|
3
3
|
`)}});
|
package/dist/commands/check.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as o}from"zod";import{EXIT as
|
|
2
|
+
import{z as o}from"zod";import{EXIT as r}from"@allyhub/protocol";import{formatCheck as c}from"../text/index.js";import{defineCommand as m}from"../command.js";import{projectRoot as a}from"../project.js";import{dir as l}from"../fields.js";import{checkProject as n}from"../version.js";export const check=m({name:"check",summary:"Problems: objective errors in the project's items, by rule; exits 1 when there is an error",input:o.strictObject({item:o.string().optional().describe("Only this item: its id (its file without its extension) or its file, or a folder of items"),dir:l,fresh:o.boolean().default(!1).describe("Load every version again, not the last check's results")}),positional:["item"],output:o.looseObject({}),examples:["allyhub check","allyhub check launch/film","allyhub check --json"]},async(t,s)=>{const i=await a(s.cwd,t.dir),e=await n({dir:i,fresh:t.fresh,...t.item===void 0?{}:{piece:t.item}});return{value:{check:e.check,problems:e.problems,stats:e.stats,facts:e.facts.length,console:e.console},text:c(e),exit:e.check.errors>0?r.failed:r.ok}});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readFile as
|
|
3
|
-
`)}}))}const
|
|
2
|
+
import{readFile as I}from"node:fs/promises";import{join as D,resolve as L}from"node:path";import{z as s}from"zod";import{callTool as M,loadCatalog as h,resumeJob as H,uploadFiles as T}from"@allyhub/cloud/tools";import{WORK_DIR as U}from"@allyhub/formats/layout";import{EXIT as m}from"@allyhub/protocol/cli";import{CommandError as g,defineCommand as W}from"../command.js";import{optionName as _}from"../args.js";import{requiredMissing as q,toolInput as B,toolOptions as K,exampleArgs as G,fieldLines as C}from"../tool-options.js";import{cloudOf as f,cloudWork as w,placeFrom as z,plural as $}from"./cloud.js";const j=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),X=8e3,p={input:s.string().optional().describe("The input as JSON, or a file of it: the whole of it, or the fields no option gives; an option given beside it wins"),file:s.string().optional().describe("The path of the file it makes, or for a tool that returns data, of its output as JSON (without an extension it takes the result's, or .json); the same call with the same input then keeps it, calling nothing, and while its call works waits for that call; default a folder under .allyhub/work/"),force:s.boolean().default(!1).describe("With --file: call even when the file was made from this input, and replace a file that has no record"),wait:s.boolean().default(!0).describe("Wait for a long tool (an audit, a video model); --no-wait returns its call at once"),resume:s.string().optional().describe("Wait for a call of this tool this computer made (from --no-wait, or a call that stopped waiting), and download its file")},k=(e,a)=>new g("usage",e,{exit:m.usage,...a===void 0?{}:{hint:a}}),P=e=>{const a=e.reduce((n,o)=>o.map((r,i)=>Math.max(n[i]??0,r.length)),[]);return e.map(n=>` ${n.map((o,r)=>r===n.length-1?o:o.padEnd(a[r]??0)).join(" ")}`.trimEnd())};export const wordOf=e=>e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-|-$/g,"");function Q(e){return W({name:e.id,summary:`${e.title}: ${e.description} Lists the tools, each a command`,input:s.strictObject({fresh:s.boolean().default(!1).describe("Read the catalog from AllyHub again, not the copy kept an hour")}),output:s.looseObject({work:s.string(),tools:s.array(s.looseObject({name:s.string()}))}),examples:[`allyhub ${e.id}`,`allyhub ${e.id} --json`]},(a,n)=>w(async()=>{const r=(await h(f(n),{refresh:a.fresh})).tools.filter(i=>i.work===e.id).sort((i,t)=>i.name.localeCompare(t.name));return{value:{work:e.id,title:e.title,tools:r.map(i=>({name:i.name,title:i.title,...i.shown?{shown:i.shown.name}:{},description:i.description,long:i.long}))},text:[`${e.title} (${$(r.length,"tool")}):`,...P(r.map(i=>[i.name,i.shown?`${i.title} (${i.shown.name} in AllyHub)`:i.title])),"",`Each costs credits when it worked; a failed call is free. allyhub help ${e.id} <tool> shows a tool's options and how its credits are counted.`].join(`
|
|
3
|
+
`)}}))}const F=(e,a)=>a.length>0?["",`${e}:`,...a]:[],V=100;export function readableJson(e,a=""){const n=o=>o===null||typeof o!="object";if(Array.isArray(e)){if(e.length===0)return"[]";if(e.every(n))return`[${e.map(r=>JSON.stringify(r)).join(", ")}]`;const o=`${a} `;return`[
|
|
4
4
|
${e.map(r=>o+readableJson(r,o)).join(`,
|
|
5
5
|
`)}
|
|
6
6
|
${a}]`}if(j(e)){const o=Object.entries(e).filter(([,t])=>t!==void 0);if(o.length===0)return"{}";const r=`{${o.map(([t,l])=>`${JSON.stringify(t)}: ${JSON.stringify(l)}`).join(", ")}}`;if(o.every(([,t])=>n(t))&&r.length<=V)return r;const i=`${a} `;return`{
|
|
7
7
|
${o.map(([t,l])=>`${i}${JSON.stringify(t)}: ${readableJson(l,i)}`).join(`,
|
|
8
8
|
`)}
|
|
9
|
-
${a}}`}return JSON.stringify(e)}function Y(e,a=5,n=160){const o=i=>{const t=i===void 0?"undefined":JSON.stringify(i);return t.length>n?`${t.slice(0,n-1)}…`:t},r=(i,t)=>[`${i?`${i}: `:""}${$(t.length,"item")}${t.length>a?`, the first ${String(a)}:`:":"}`,...t.slice(0,a).map((l,c)=>` [${String(c)}] ${o(l)}`)];return Array.isArray(e)?r("",e):typeof e!="object"||e===null?[o(e)]:Object.entries(e).flatMap(([i,t])=>Array.isArray(t)?r(i,t):[`${i}: ${o(t)}`])}function
|
|
9
|
+
${a}}`}return JSON.stringify(e)}function Y(e,a=5,n=160){const o=i=>{const t=i===void 0?"undefined":JSON.stringify(i);return t.length>n?`${t.slice(0,n-1)}…`:t},r=(i,t)=>[`${i?`${i}: `:""}${$(t.length,"item")}${t.length>a?`, the first ${String(a)}:`:":"}`,...t.slice(0,a).map((l,c)=>` [${String(c)}] ${o(l)}`)];return Array.isArray(e)?r("",e):typeof e!="object"||e===null?[o(e)]:Object.entries(e).flatMap(([i,t])=>Array.isArray(t)?r(i,t):[`${i}: ${o(t)}`])}function R(e,a){if("jobId"in e)return[`${e.tool} is still working (call ${e.jobId}).`,`Wait for it: allyhub ${a} --resume ${e.jobId}${e.file===void 0?"":" (or the same command again: it waits for this call)"}`].join(`
|
|
10
10
|
`);if(e.kept)return[`Kept ${e.file??""}: ${e.tool} made it from this same input on ${e.kept.at} (${e.gen??""}).`,"Nothing was called or charged. --force makes it again."].join(`
|
|
11
11
|
`);const n=readableJson(e.output),o=n.length<=X;return[o?n:[`Output: ${String(Math.round(Buffer.byteLength(n)/1024))} KB of JSON, in short:`,...Y(e.output)].join(`
|
|
12
|
-
`),...!o&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([r,i])=>`Also: ${i} (${r} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}`].join(`
|
|
13
|
-
`)}const Z=e=>{const a=Math.max(0,Math.round(e));return`${String(Math.floor(a/60))}:${String(a%60).padStart(2,"0")}`};async function ee(e,a){const n=e.trim().startsWith("{"),o=n?e:await L(
|
|
12
|
+
`),...!o&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([r,i])=>`Also: ${i} (${r} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}${e.creditsLeft===void 0?"":` · Credits left: ${String(e.creditsLeft)}`}`].join(`
|
|
13
|
+
`)}const Z=e=>{const a=Math.max(0,Math.round(e));return`${String(Math.floor(a/60))}:${String(a%60).padStart(2,"0")}`};async function ee(e,a){const n=e.trim().startsWith("{"),o=n?e:await I(L(a.cwd,e),"utf8").catch(i=>{throw new g("not-found",`--input: cannot read ${e}: ${i.message}`,{exit:m.notFound,hint:"Give a JSON object, or a file of one."})});let r;try{r=JSON.parse(o)}catch{r=void 0}if(!j(r))throw k(`--input: ${n?"the text":e} is not a JSON object.`,`Give '{"field": …}', or a file of it.`);return r}export function toolCommand(e){const a=`${e.work} ${e.name}`,n=K(e.input,Object.keys(p)),o=s.strictObject({...n.shape,...p,input:p.input.describe(n.inputOnly.length?`${p.input.description??""}. Fields only it gives: ${n.inputOnly.join(", ")}`:p.input.description??"")}),r=new Set(n.fields.values()),i=Object.keys(j(e.input.properties)?e.input.properties:{}).filter(l=>!r.has(l)),t=[...n.fields].filter(([,l])=>n.required.includes(l)).map(([l,c])=>`--${_(l)} <${c}>`);return{spec:{name:a,summary:e.description,input:o,output:s.looseObject({tool:s.string(),output:s.record(s.string(),s.unknown()).optional(),outputFile:s.string().optional(),credits:s.number().optional(),creditsLeft:s.number().optional(),file:s.string().optional(),gen:s.string().optional(),more:s.record(s.string(),s.string()).optional(),words:s.string().optional(),jobId:s.string().optional()}),examples:[`allyhub ${[a,...e.example?G(n,e.example):t].join(" ")}`]},about:{lines:[e.title,...e.shown?[wordOf(e.shown.name)===e.name?`Shown to people in AllyHub as "${e.shown.name}".`:`Shown to people in AllyHub as "${e.shown.name}": allyhub ${e.work} ${wordOf(e.shown.name)} finds it too.`]:[],"","A call is charged once, when it worked, as the description says; a failed call is free.",...e.long?["A long tool: the command waits for it (--no-wait returns its call, --resume waits again)."]:[],...F("In --input",C(e.input,{only:i,required:!0})),...F("Output",C(e.output,{depth:3}))],value:{work:e.work,title:e.title,...e.shown?{shown:e.shown.name}:{},long:e.long,inputSchema:e.input,outputSchema:e.output}},run:(l,c)=>w(async()=>{const u=l,b=l,O=f(c),S=await z(c),y=B(n,b,u.input===void 0?{}:await ee(u.input,c));let A=0;const N={base:S,signal:c.signal,onRunning:d=>{Date.now()-A<3e4||(A=Date.now(),c.progress(`${e.name}: working · ${Z((Date.now()-Date.parse(d.createdAt))/1e3)} (call ${d.id})`))},onRetry:(d,v,E)=>{c.progress(`${e.name}: ${v.message}; reading call ${d} again in ${String(E)} s`)}};if(u.resume!==void 0){if(Object.keys(y).length>0||u.file!==void 0)throw k("--resume waits for a call as it was made: give it no input or --file.");const d=await H(O,u.resume,{...N,tool:e.name});return{value:{...d},text:R(d,a)}}const J=q(n,y);if(J.length>0)throw k(`${e.name} needs ${J.join(", ")}.`,`allyhub help ${a} shows its options.`);const x=await M(O,e.name,y,{...N,outDir:D(S,U,e.work,e.name),...u.file===void 0?{}:{file:L(c.cwd,u.file)},force:u.force,wait:u.wait});return{value:{...x},text:R(x,a)}})}}export const CLOUD_SOURCE={entries:[{name:"<work>",summary:"List a work's cloud tools (AllyHub's catalog), a line each; allyhub help lists the works"},{name:"<work> <tool>",summary:"Run a cloud tool with the account's credits, its input as options (allyhub help <work> <tool>, which says how its credits are counted)"}],async nouns(e){return(await h(f(e))).works.map(n=>({name:n.id,summary:`${n.title}: ${n.description}`}))},resolve:(e,a)=>w(async()=>{const[n,o]=e;if(n===void 0||n.startsWith("-"))return;let r;const i=(u,b)=>(r=u,b);let t=await h(f(a)).catch(i),l=t?.works.find(u=>u.id===n);if(l||(t=await h(f(a),{refresh:!0}).catch(u=>i(u,t)),l=t?.works.find(u=>u.id===n)),!t)throw new g("catalog-unreachable",`"${n}" is none of allyhub's own commands, and its cloud tools could not be read: ${r instanceof Error?r.message:String(r)}.`,{exit:m.failed,hint:"They need the network: run allyhub outside a sandbox that blocks it."});if(!l)return;if(o===void 0||o.startsWith("-"))return{command:Q(l),rest:e.slice(1),list:!0};const c=t.tools.find(u=>u.name===o)??t.tools.find(u=>u.work===l.id&&u.shown!==void 0&&wordOf(u.shown.name)===wordOf(o));if(c?.work!==l.id)throw new g("unknown-tool",c?`${o} is not a ${l.id} tool: it is in allyhub ${c.work}.`:`No ${l.id} tool ${o}.`,{exit:m.notFound,hint:c?`allyhub ${c.work} ${o}`:`allyhub ${l.id} lists its tools.`});return{command:toolCommand(c),rest:e.slice(2),list:!1}})},upload=W({name:"upload",summary:"Upload files from this computer for a cloud tool whose input takes a URL (a presenter photo, speech audio, a reference clip), and print a signed URL for each, which works for 24 hours",input:s.strictObject({files:s.array(s.string()).min(1).describe("The files: images (.jpg, .png, .webp, .gif), sound (.mp3, .wav, .m4a, .aac, .ogg, .flac) or video (.mp4, .mov, .webm), 50 MB at most")}),positional:["files"],output:s.looseObject({files:s.array(s.looseObject({file:s.string(),ok:s.boolean(),url:s.string().optional()}))}),examples:["allyhub upload assets/media/presenter.jpg"]},(e,a)=>w(async()=>{const n=await T(f(a),e.files,{base:a.cwd}),o=n.filter(t=>!t.ok),r=n.map(t=>t.ok?`${t.file}
|
|
14
14
|
${t.url}${t.expiresAt===void 0?"":` (works until ${t.expiresAt})`}`:`${t.file}
|
|
15
15
|
failed: ${t.error.message}${t.error.hint?` ${t.error.hint}`:""}`);n.length>1&&r.push(o.length===0?`${$(n.length,"file")} uploaded.`:`${String(n.length-o.length)} of ${$(n.length,"file")} uploaded; ${String(o.length)} failed.`);const i=o[0];return{value:{files:n.map(t=>t.ok?{...t}:{file:t.file,ok:!1,error:{code:t.error.code,message:t.error.message,...t.error.hint?{hint:t.error.hint}:{}}})},text:r.join(`
|
|
16
16
|
`),...i?{exit:i.error.exit,code:i.error.code}:{}}}));
|
package/dist/commands/cloud.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{Cloud as
|
|
2
|
+
import{Cloud as p,cloudConfig as c,cloudWork as e}from"@allyhub/cloud/tools";import{CLI_VERSION as m}from"../cli-version.js";import{projectRoot as d}from"../project.js";import{startUpdateCheck as l}from"../update-notice.js";export const cloudOf=o=>(l(o.env,m),new p(c(o.env)));export{e as cloudWork};export const placeFrom=o=>d(o.cwd).catch(()=>o.cwd),plural=(o,r,t=`${r}s`)=>`${String(o)} ${o===1?r:t}`;
|
package/dist/commands/dev.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{spawn as A}from"node:child_process";import{mkdir as T,open as C,readFile as v,rm as L,writeFile as P}from"node:fs/promises";import{dirname as w,join as f,resolve as _}from"node:path";import{fileURLToPath as $}from"node:url";import{z as l}from"zod";import{projectItems as N}from"@allyhub/build";import{openBrowser as b}from"@allyhub/cloud";import{startDevServer as y}from"@allyhub/dev-server";import{DEV_FILE as E}from"@allyhub/formats";import{EXIT as x}from"@allyhub/protocol";import{nodeCommand as G}from"@allyhub/runtimes/node";import{CommandError as c,defineCommand as M}from"../command.js";import{dir as F
|
|
2
|
+
import{spawn as A}from"node:child_process";import{mkdir as T,open as C,readFile as v,rm as L,writeFile as P}from"node:fs/promises";import{dirname as w,join as f,resolve as _}from"node:path";import{fileURLToPath as $}from"node:url";import{z as l}from"zod";import{projectItems as N}from"@allyhub/build";import{openBrowser as b}from"@allyhub/cloud";import{startDevServer as y}from"@allyhub/dev-server";import{DEV_FILE as E}from"@allyhub/formats";import{EXIT as x}from"@allyhub/protocol";import{nodeCommand as G}from"@allyhub/runtimes/node";import{CommandError as c,defineCommand as M}from"../command.js";import{dir as F}from"../fields.js";import{itemNamed as U,projectRoot as B}from"../project.js";import{extensionsAt as H,fileEditorsAt as J,kindsAt as R}from"./extensions.js";export const PAGE=f(w($(import.meta.url)),"../../editor-web");const h=".allyhub/dev.log",V=f(w($(import.meta.url)),"../../bin/allyhub.js"),j=12e4,k=1e4,g=4340,Y=20;export async function start(t,e,n){const s={root:t,kinds:R(t),extensions:H(t),ui:PAGE,...n===void 0?{}:{exportsTo:()=>n}};if(e!==void 0)return y({...s,port:e}).catch(r=>{throw r.code==="EADDRINUSE"?new c("port-in-use",`Port ${String(e)} is in use.`,{hint:"Choose another with --port, or leave it out."}):r});for(let r=g;r<g+Y;r++)try{return await y({...s,port:r})}catch(o){if(o.code!=="EADDRINUSE")throw o}return y(s)}const D="allyhub dev";async function S(t){try{const e=JSON.parse(await v(f(t,E),"utf8"));return typeof e.url!="string"||typeof e.pid!="number"?void 0:(process.kill(e.pid,0),(await fetch(e.url,{signal:AbortSignal.timeout(2e3)})).ok?{url:e.url,pid:e.pid,mine:e.by===D}:void 0)}catch{return}}async function z(t){return(await S(t))?.url}function W(t){try{return process.kill(t,0),!0}catch{return!1}}const I=t=>new Promise(e=>setTimeout(e,t));async function X(t){return(await v(f(t,h),"utf8").catch(()=>"")).trim().split(`
|
|
3
3
|
`).slice(-20).join(`
|
|
4
|
-
`)}async function
|
|
5
|
-
${await
|
|
6
|
-
It runs until allyhub dev --stop; what it says is in ${h}.`),t.open&&b(
|
|
7
|
-
Press Ctrl+C to stop.`),t.open&&b(i,e.env),await new Promise(
|
|
4
|
+
`)}async function q(t,e,n,s,r){const o=f(t,h);await T(w(o),{recursive:!0});const d=await C(o,"w");let i,a;try{const u=A(G(n),[V,"dev","--foreground","--no-open","--dir",t,...s===void 0?[]:["--port",String(s)],...r===void 0?[]:["--exports",r]],{cwd:e,env:{...n,ALLYHUB_NO_LOCAL:"1"},detached:!0,stdio:["ignore",d.fd,d.fd],windowsHide:!0});u.once("error",m=>{i=m.message}),u.once("exit",(m,O)=>{i=O??`exit code ${String(m)}`}),u.unref(),a=u.pid}finally{await d.close()}const p=Date.now()+j;for(;Date.now()<p&&i===void 0;){const u=await S(t);if(u!==void 0&&u.pid===a)return u.url;await I(150)}throw i===void 0&&a!==void 0&&process.kill(a,"SIGTERM"),new c("dev-failed",i===void 0?`allyhub dev did not answer within ${String(j/1e3)} s.`:`allyhub dev stopped as it started (${i}).`,{hint:`What it said, in ${h}:
|
|
5
|
+
${await X(t)||"(nothing)"}`})}async function K(t){const e=await S(t);if(e===void 0)return;if(!e.mine)throw new c("not-dev",`The server at ${e.url} is not one this allyhub dev started (it is AllyHub Studio's, or an older allyhub's), so it is left running.`,{hint:"Studio's stops with its project; an older allyhub dev stops with Ctrl+C where it runs."});process.kill(e.pid,"SIGTERM");const n=Date.now()+k;for(;W(e.pid);){if(Date.now()>n)throw new c("dev-stuck",`allyhub dev (process ${String(e.pid)}) did not stop within ${String(k/1e3)} s.`,{hint:`Stop it with: kill -9 ${String(e.pid)}`});await I(100)}return e.url}export async function pageOn(t,e,n,s){if(s===void 0)return n;const{listed:r}=await N(t,R(t),void 0,J(t)),o=U(r,t,e,s);if(!o)throw new c("not-found",`There is no item ${s} in the project's list.`,{exit:x.notFound,hint:`Its items: ${r.map(d=>d.id).join(", ")||"none"} (allyhub.yaml lists them).`});return`${n}?${new URLSearchParams({item:o.id}).toString()}`}export const dev=M({name:"dev",summary:"The project's items in the browser, each in its editor (docs, sheets, videos, 3D sceneries; websites listed), as their files change; serves from a process of its own until --stop, which outlives the shell that started it, and run again while it runs, opens its page and ends",input:l.strictObject({item:l.string().optional().describe("Open the page on this item: its id (its file without its extension) or its file; or on a file the list names with no kind, which an editor opens by its name (a canvas)"),dir:F,port:l.number().int().min(1).max(65535).optional().describe(`The port; default the first free one from ${String(g)}`),open:l.boolean().default(!0).describe("Open the page in the browser; --no-open only prints it"),foreground:l.boolean().default(!1).describe(`Serve from this process until Ctrl+C; default a detached process of its own, its output in ${h}`),stop:l.boolean().default(!1).describe("Stop the project's running allyhub dev"),exports:l.string().min(1).optional().describe("The folder an export from the page is saved in; default ~/Downloads (each file is made in .allyhub/out/ first)")}),positional:["item"],output:l.strictObject({url:l.string().optional().describe("The page; with --stop, the one stopped, none when none ran")}),examples:["allyhub dev","allyhub dev launch/plan","allyhub dev --port 4400 --no-open","allyhub dev --stop"]},async(t,e)=>{const n=await B(e.cwd,t.dir);if(t.stop){const i=await K(n);return e.progress(i===void 0?"No allyhub dev runs for this project.":`Stopped allyhub dev at ${i}`),{value:i===void 0?{}:{url:i},text:""}}const s=t.port===void 0?await z(n):void 0;if(s!==void 0){const i=await pageOn(n,e.cwd,s,t.item);return e.progress(`allyhub dev is already running at ${i}`),t.open&&b(i,e.env),{value:{url:i},text:""}}const r=t.exports===void 0?void 0:_(e.cwd,t.exports);if(!t.foreground){const i=await q(n,e.cwd,e.env,t.port,r),a=await pageOn(n,e.cwd,i,t.item);return e.progress(`allyhub dev is at ${a}
|
|
6
|
+
It runs until allyhub dev --stop; what it says is in ${h}.`),t.open&&b(a,e.env),{value:{url:a},text:""}}const o=await start(n,t.port,r),d=f(n,E);try{const i=await pageOn(n,e.cwd,o.url,t.item);return await T(w(d),{recursive:!0}),await P(d,JSON.stringify({url:o.url,pid:process.pid,token:o.token,by:D})),e.progress(`allyhub dev is at ${i}
|
|
7
|
+
Press Ctrl+C to stop.`),t.open&&b(i,e.env),await new Promise(a=>{const p=()=>{process.off("SIGTERM",p),e.signal.removeEventListener("abort",p),a()};e.signal.aborted&&a(),e.signal.addEventListener("abort",p),process.once("SIGTERM",p)}),{value:{url:i},text:""}}finally{(await v(d,"utf8").catch(()=>"")).includes(`"pid":${String(process.pid)}`)&&await L(d,{force:!0}),await o.close(),await o.project.extensions?.deactivate()}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{join as y,resolve as w}from"node:path";import{z as e}from"zod";import{formatConsole as v,formatProblem as k}from"../text/index.js";import{exportProject as P}from"@allyhub/export";import{GIF_ENCODE as p,SHARE_ENCODE as n}from"@allyhub/render/encode";import{consoleJson as m}from"@allyhub/project";import{OUT_DIR as A}from"@allyhub/formats";import{EXIT as c}from"@allyhub/protocol";import{madeNotes as j}from"@allyhub/build";import{defineCommand as $}from"../command.js";import{parameters as O}from"../parameters.js";import{projectRoot as D}from"../project.js";import{combosOf as F,commandError as S}from"../version.js";import{dir as C,indexing as E}from"../fields.js";import{extensionsAt as h,kindsAt as T}from"./extensions.js";const N={codec:e.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:e.number().int().min(0).max(63).optional().describe(`Constant rate factor, lower keeping more detail in a larger file: default ${String(n.crf)} for an mp4, 30 for a webm`),maxBitrate:e.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(n.maxKbps)} at 1080p ${String(n.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30)`),audioBitrate:e.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),gifWidth:e.number().int().min(0).max(16384).optional().describe(`A gif's width in pixels, its height in proportion, up to the video's: default ${String(p.width)}; 0 for the video's own`),gifFps:e.number().min(0).max(120).optional().describe(`A gif's frames a second, up to the video's: default ${String(p.fps)}; 0 for the video's own`),steps:e.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page (default each page's last step)"),values:e.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:e.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that reads plain UTF-8"),quality:e.number().int().min(0).max(100).optional().describe("An image's jpeg and webp, 0–100: default 90 for a jpeg, a webp lossless"),scale:e.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:e.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:e.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:e.number().min(1).optional().describe("An image's jpeg and webp: each board's file at most this many KB, at the best quality under it (said); a png is made when it fits under it"),psd:e.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds. Each layer a Photoshop layer by its key: a picture a pixel layer, a text layer a type layer Photoshop redraws on opening, a shape a shape layer, a fill a fill layer, an adjustment an adjustment layer, a component a smart object of its pixels, a group a group; Photoshop draws blends, masks, effects and text by its own formulas"),since:e.string().optional().describe("A doc's docx: what changed since this file (another doc's .mdx, or the Word file it came from, from the project's root) written as Word's revisions, Track Changes, as Word's Compare Documents sets them: words put in and taken out, whole blocks put in or taken out"),changes:e.boolean().default(!1).describe("A doc's docx: what changed since the Word file allyhub doc import kept beside it (<name>.original.docx), as --since does; the editor's Download offers it"),author:e.string().optional().describe("Whose revisions --since writes, as Word names them: default AllyHub"),alike:e.number().min(0).max(1).optional().describe("With --since: the share of their words two blocks of a type must share to be compared word by word, 0–1, default 0.4; under it the one is taken out and the other put in"),pptx:e.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},z=(s,o)=>`${String(s)} ${o}${s===1?"":"s"}`;export const exportFiles=$({name:"export",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF and Markdown; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:e.strictObject({items:e.array(e.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:e.array(e.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:e.array(e.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the export masters it: 48 kHz, 16 bits, the film's length); csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv (a file a sheet); an image's png, jpeg, webp (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a deck's pdf, png, pptx; a LinkedIn or X post's linkedin-post or x-post (its API request, its media beside), txt (its text as written, its media and their alt text beside), png; an article's linkedin-article or x-article, png; a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, xlsx for a sheet, png for an image, glb for a model; each item makes the types it has"),out:e.string().optional().describe("The folder the files go in; default .allyhub/out"),name:e.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:O(N),dir:C}),positional:["items"],output:e.looseObject({out:e.string(),files:e.array(e.looseObject({name:e.string(),path:e.string(),type:e.string()})),failed:e.array(e.looseObject({name:e.string(),code:e.string()}))}),examples:["allyhub export","allyhub export launch/film --type mp4,srt","allyhub export launch/film --type wav","allyhub export ads/tidyform --type csv","allyhub export launch/plan --type pdf,md","allyhub export legal/contract --type docx --param since=legal/contract.original.mdx --param author=Legal","allyhub export finance/budget --type xlsx,pdf","allyhub export finance/budget --type csv --param bom=false","allyhub export launch/deck --type pptx --param pptx=picture","allyhub export launch/poster --type psd","allyhub export launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub export --combo lang=zh-cn --param crf=16","allyhub export launch/film --name launch-film --param max-bitrate=0"]},async(s,o)=>{const r=await D(o.cwd,s.dir),f=w(o.cwd,s.out??y(r,A)),u=Object.fromEntries(Object.entries(s.params).filter(([,a])=>a!==void 0));let l=0,t;try{t=await P({root:r,kinds:T(r),out:f,...s.items===void 0?{}:{items:s.items},combos:F(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:u,index:E(o.env),analyses:h(r).mediaAnalyses(),env:o.env,processors:h(r).exportProcessors(),log:a=>{o.progress(a)},onProgress:a=>{const i=Math.floor(a*10);i<=l||i>=10||(l=i,o.progress(`${String(i*10)}%`))},signal:o.signal})}catch(a){throw S(a)}const b=a=>a?` (${a.integrated.toFixed(1)} LUFS, true peak ${a.truePeak===void 0?"–":a.truePeak.toFixed(1)} dBTP)`:"",g=t.problems.filter(a=>a.level==="error"),d=t.files.flatMap(a=>a.files.length>1?a.files.map(i=>` ${i}`):[` ${a.path}${b(a.loudness)}`]),x=[`${z(d.length,"file")} in ${t.out}:`,...d,...t.failed.length>0?["Not made:",...t.failed.map(a=>` ${a.name}: ${a.message}${a.hint?` ${a.hint}`:""}`)]:[],...t.unindexed.map(a=>`Not indexed, drawn the fallback way: ${a.file} (${a.error})`),...j(t.files),...g.map(k),...v(m(t.console))];return{value:{out:t.out,files:t.files.map(a=>({...a})),failed:t.failed.map(a=>({...a})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...m(t.console)},text:x.join(`
|
|
3
|
+
`),exit:t.failed.length>0?c.failed:c.ok}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{dirname as m,join as u,relative as a,sep as g}from"node:path";import{fromBuild as l,pagesOf as w}from"@allyhub/doc-extension/cli";import{itemIdOf as h}from"@allyhub/formats";import{EXIT as P}from"@allyhub/protocol";import{DocPageError as j,docPages as k}from"@allyhub/doc-print";import{CommandError as E}from"../../command.js";import{projectSession as $}from"../run-context.js";import{looks as v,picturePath as x,save as y,workPath as F}from"./common.js";export async function docPicture(e){const t=a(e.root,m(e.file)),i=e.page===void 0?void 0:w(e.page),
|
|
2
|
+
import{dirname as m,join as u,relative as a,sep as g}from"node:path";import{fromBuild as l,pagesOf as w}from"@allyhub/doc-extension/cli";import{itemIdOf as h}from"@allyhub/formats";import{EXIT as P}from"@allyhub/protocol";import{DocPageError as j,docPages as k}from"@allyhub/doc-print";import{CommandError as E}from"../../command.js";import{projectSession as $}from"../run-context.js";import{looks as v,picturePath as x,save as y,workPath as F}from"./common.js";export async function docPicture(e){const t=a(e.root,m(e.file)),i=e.page===void 0?void 0:w(e.page),n=h(a(e.root,e.file).split(g).join("/")),{stills:p,data:s,sources:c}=await l(e.file,n,o=>$(e.root,o));let r;try{r=await k({root:e.root,doc:{file:a(e.root,e.file),dir:t,path:t,...s===void 0?{}:{data:s},sources:c},pages:i,stills:p,format:v(),onFetch:()=>{e.progress?.("Getting pdf.js, once, to draw a doc's pages…")}})}catch(o){throw o instanceof j?new E("not-found",o.message,{exit:P.notFound,hint:`Pages are 1 to ${String(o.count)}.`}):o}const d=i===void 0?"pages":`page-${e.page?.replace(/[^\d]+/gu,"-")??""}`,f=await y(x(e.cwd,e.out,u(F(e.root,"frames",n),`${d}.png`)),r.picture);return{mode:"frame",source:"doc",doc:t,out:f,pages:r.count,paper:r.paper,drawn:r.drawn}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{basename as
|
|
2
|
+
import{basename as et,resolve as E}from"node:path";import{DECK_OVERLAY_KEY as nt,OVERLAY_KEY as it,frameOverlay as rt,overlaySvg as st}from"./overlay.js";import{Mattes as ot}from"@allyhub/video-measure";import{filmTimes as at,partOf as dt}from"@allyhub/video-measure";import{GRID_WIDTH as ct,MAX_TILES as N,defaultCols as ft,gridHtml as pt,gridLayout as lt,labelSize as ht,probeVideo as ut,sheetHtml as mt,sheetTile as q,stretchFrames as wt}from"@allyhub/media";import{clipTypeOf as gt,ffmpegOf as $t,hasFinalLook as yt,videoFrame as bt,writeClip as kt}from"@allyhub/render";import{inTime as D}from"@allyhub/build";import{webp as xt}from"@allyhub/image-render/webp";import{EXIT as Mt}from"@allyhub/protocol";import{CommandError as St}from"../../command.js";import{drawPage as J,gridError as Q,isFile as Ft,looks as Z,momentOf as Et,pictureUrl as v,picturePath as H,save as V,secondsName as U,usage as T,withCombo as K,workPath as Tt}from"./common.js";const W=t=>Math.round(t*1e3)/1e3,X=t=>Math.round(t*100)/100,Ot=t=>`${String(X(t))}×`,j=4,B=t=>({source:"piece",piece:t.target.piece,combo:t.target.combo,...t.target.id===void 0?{}:{id:t.target.id},format:t.target.format}),z=(t,e)=>Tt(e,"frames",t.target.piece);function L(t,e){const n=t.at(-1);return t.find(s=>e>=s.start&&e<s.end)??(n&&e>=n.end?n:void 0)}export async function stillsSheet(t,e){const n=t.timeline,s=t.version.summary?.text??[],f=n.parts.flatMap((i,c)=>{const k=i.steps??[i.still];return k.map((I,_)=>({p:i,t:I,slide:c,step:_,of:k.length}))}),l=n.parts.flatMap(i=>i.frame?[i.frame]:[]),a=l.length>0,g=new Set(l.map(i=>(i.width/i.height).toFixed(3))),d=a&&l[0]?g.size===1?l[0].width/l[0].height:1:n.width/n.height,x=!D(t.piece,t.prepared.kinds),o=f.length===1?1:d<1?4:2,M=2e3,P=j,R=t.prepared.kinds.find(i=>i.id===t.piece.kind)?.part??{noun:"part",plural:"parts"},S=[];if(x||a){const i=q({width:M,cols:o});S.push(...await t.partStills(f.map(c=>({part:c.p.key,step:c.step,width:i,format:"webp"}))))}else for(const i of f)S.push(await t.still(i.t));const F=[];for(let i=0;i<f.length;i+=o)F.push({cells:f.slice(i,i+o).map(({p:c,slide:k,step:I,of:_},Y)=>{const A=s.find(G=>G.key===c.key);return{image:S[i+Y]??Buffer.alloc(0),label:x?`${String(k+1)}${_>1?`.${String(I)}`:""} · ${c.key}${c.hidden?" · hidden":""}`:c.frame?`${c.key} · ${String(c.frame.width)}×${String(c.frame.height)}`:`${c.key} · ${c.still.toFixed(2)} s`,text:A?.notes??A?.spoken??A?.onScreen.join(" · ")??""}})});const b=a?void 0:q({width:M,cols:o})/n.width,h=`${x?`${t.target.piece} · ${n.parts.length===1?"1 slide":`${String(n.parts.length)} slides`}`:`${t.target.piece} · ${n.parts.length===1?`1 ${R.noun}`:`${String(n.parts.length)} ${R.plural}`}${a?"":` · ${n.duration.toFixed(2)} s`}`}${b===void 0?"":` · ${Ot(b)}`}`,$=Math.max(1,Math.ceil(P/o)),y=[],u=Math.max(1,Math.ceil(F.length/$));for(let i=0;i<u;i++){const c=await J(t.opened.session.browser,{html:mt({title:u===1?h:`${h} · ${String(i+1)} of ${String(u)}`,rows:F.slice(i*$,(i+1)*$),cols:o,width:M,aspect:d}),width:M}),k=u===1?K("sheet",t.target):`${K("sheet",t.target)}-${String(i+1)}`;y.push(await V(H(e.cwd,u===1?e.out:void 0,E(z(t,e.root),`${k}.png`)),c))}const C=y[0]??"";return{mode:"sheet",...x?{slides:!0}:{},unit:R,...B(t),out:C,...y.length>1?{outs:y}:{},...b===void 0?{}:{scale:X(b)},parts:n.parts.map(i=>({key:i.key,t:W(i.still)}))}}export function clipKind(t){const e=gt(t);if(!e)throw T("bad-clip",`Cannot tell what kind of video ${t} is.`,"End --clip with .gif, .mp4 or .webm.");return e}async function Pt(t,e){if(!await Ft(t))throw new St("not-found",`There is no file ${t} (--beside).`,{exit:Mt.notFound});const n=await ut(t),s=Math.max(1,Math.round(n.duration*n.fps)),f=[];for(const l of e){const a=Math.round(l*n.fps);f.push(l<0||a>s-1?void 0:await bt(t,a,n.fps))}return{info:n,shots:f}}async function Ct(t,e,n){if(n.at!==void 0||n.from!==void 0||n.to!==void 0||n.clip!==void 0||n.overlay||n.beside!==void 0)throw T("bad-option",`${e} is a cover: it has its still alone.`);const s=await t.cover(e),f=await V(H(n.cwd,n.out,E(z(t,n.root),`${K(e,t.target)}.png`)),Z()==="webp"?await xt(s):s);return{mode:"cover",...B(t),out:f,cover:e,width:t.timeline.width,height:t.timeline.height}}export async function pieceMoments(t,e){if(e.at!==void 0&&e.at.length>j&&e.clip===void 0){const n=e.at,s=Math.ceil(n.length/j),f=[];for(let a=0;a<s;a++){const g=await tt(t,{...e,at:n.slice(Math.round(a*n.length/s),Math.round((a+1)*n.length/s)),out:e.out===void 0?void 0:e.out.replace(/(\.[^./]*)?$/u,d=>`-${String(a+1)}${d}`)});if(g.mode!=="grid")throw new Error(`Moments drew a ${g.mode}.`);f.push(g)}const[l]=f;if(l)return{...l,outs:f.map(a=>a.out),tiles:f.flatMap((a,g)=>a.tiles.map(d=>({...d,picture:g})))}}return tt(t,e)}async function tt(t,e){const n=t.timeline;if(e.part!==void 0&&!n.parts.some(r=>r.key===e.part)&&t.coverKeys().includes(e.part))return Ct(t,e.part,e);const s=e.part===void 0?void 0:dt(n,e.part),f=s?.start??0,l=e.from!==void 0||e.to!==void 0;if(l&&e.at!==void 0)throw T("bad-option","Give --at or --from and --to, not both.");if(l&&(e.from===void 0||e.to===void 0))throw T("bad-option","A stretch needs --from and --to.");if(e.clip!==void 0&&!l)throw T("bad-option","--clip needs --from and --to.","For example --from 3.2 --to 4.4 --clip move.gif.");const a=e.clip===void 0?void 0:clipKind(e.clip),g=e.clip===void 0||e.out!==void 0;let d;try{d=e.from!==void 0&&e.to!==void 0?wt({from:f+e.from,to:f+e.to},{fps:n.fps,duration:n.duration,grid:g}):void 0}catch(r){throw Q(r)}const x=(e.at??[]).map(Et),o=d?d.times:x.length===0&&s?[s.still]:at(x,n.parts,s);if(o.length>N&&g)throw T("bad-time",`${String(o.length)} moments; one picture holds at most ${String(N)}.`);for(const r of o)if(r<0||r>n.duration+1/n.fps)throw T("bad-time",`${r.toFixed(2)} s is outside ${t.target.piece}, which is ${n.duration.toFixed(2)} s long.`,s?`With --part, --at counts from the part's start; ${s.key} runs ${s.start.toFixed(2)}–${s.end.toFixed(2)} s.`:`Parts: ${n.parts.map(p=>`${p.key} ${p.start.toFixed(2)}–${p.end.toFixed(2)}`).join(", ")}.`);const M=r=>Math.min(r,n.duration),P={...B(t),final:yt(t.look,n),...d?{stretch:{from:d.from,to:d.to,every:d.every,frames:d.times.length}}:{}};if(o.length===1&&!d&&!e.overlay&&e.beside===void 0){const r=o[0]??0,p=s??L(n.parts,r),m=p?.key??"",w=p?.frame??{width:n.width,height:n.height},O=await V(H(e.cwd,e.out,E(z(t,e.root),`${K(e.at===void 0&&s?s.key:U(r),t.target)}.png`)),await t.still(M(r),{format:Z()}));return{mode:"frame",...P,out:O,t:W(r),timed:D(t.piece,t.prepared.kinds),part:m,width:w.width,height:w.height}}const S=[];for(const r of o)S.push(await t.still(M(r)));const F=e.clip!==void 0&&a?await kt(S,{file:E(e.cwd,e.clip),type:a,fps:n.fps/(d?.every??1)}):void 0;if(!g)return{mode:"clip",...P,clip:F};const b=[];if(e.overlay){const r=n.duration-1/n.fps,p=await t.version.measure(o.map(w=>Math.min(w,r))),m=new ot({root:t.prepared.root,media:t.prepared.media,ffmpeg:await $t()});for(const w of o)b.push(await rt(Math.min(w,r),n,p,t.prepared.media,m))}const h=e.beside===void 0?void 0:await Pt(E(e.cwd,e.beside),o),$=h?2:1,y=n.width/n.height;let u;try{u=lt({count:o.length,cols:d?ft(o.length,y*$):y*$>=2?1:y*$>=1?2:j,width:ct,aspect:y*$})}catch(r){throw Q(r)}const C=(u.tiles[0]?.width??n.width)/$,i=Math.max(11,ht(C)-4),c=[...S],k=h?et(e.beside??""):"",I=o.map((r,p)=>{const m=b[p],w={src:v(p),label:D(t.piece,t.prepared.kinds)?`${r.toFixed(d?3:2)} s · ${L(n.parts,r)?.key??""}`:L(n.parts,r)?.key??"",...m?{over:st(m,n.width,n.height,C/n.width,i)}:{}};if(!h)return{pictures:[w]};const O=h.shots[p];return O&&c.push(O),{pictures:[{src:O?v(c.length-1):void 0,label:`${k} · ${r.toFixed(2)} s${O?"":" · past its end"}`},w]}}),_=await J(t.opened.session.browser,{html:pt({layout:u,cells:I,...e.overlay?{legend:D(t.piece,t.prepared.kinds)?it:nt}:{}}),width:u.width,pictures:c}),Y=o[0]??0,A=o.at(-1)??Y,G=await V(H(e.cwd,e.out,E(z(t,e.root),`${K(`${d?"stretch":"moments"}-${U(Y)}-${U(A)}`,t.target)}.png`)),_);return{mode:"grid",...P,out:G,cols:u.cols,scale:X(C/(L(n.parts,o[0]??0)?.frame?.width??n.width)),tiles:o.map((r,p)=>{const m=u.tiles[p],w=b[p];return{t:W(r),part:L(n.parts,r)?.key??"",...m?{box:[m.x,m.y,m.width,m.height]}:{},...w?{overlay:w}:{},...h?{beside:{t:W(r),shown:h.shots[p]!==void 0}}:{}}}),...h?{beside:{file:E(e.cwd,e.beside??""),video:{duration:h.info.duration,width:h.info.width,height:h.info.height,fps:h.info.fps}}}:{},...F?{clip:F}:{}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readFileSync as
|
|
2
|
+
import{itemIdOf as y}from"@allyhub/formats";import{readFileSync as S}from"node:fs";import{dirname as A,join as p}from"node:path";import{startBrowser as E}from"@allyhub/browser";import{EXIT as N}from"@allyhub/protocol";import{SHEET_FONT as k,sheetFontsCss as M}from"@allyhub/doc-print";import{columnIndex as g,rangeName as I,readArea as O,sheetHtml as T}from"@allyhub/sheet";import{CommandError as C}from"../../command.js";import{openSheet as F}from"@allyhub/sheet-extension/cli";import{kindsAt as H}from"../extensions.js";import{drawPage as P,picturePath as B,save as _,workPath as j}from"./common.js";export const SHEET_ROWS=80,SHEET_COLUMNS=30;const w=12;function v(e,r){const f=e.used;if(!f)return;const c=/^\$?([A-Za-z]{1,3}):\$?([A-Za-z]{1,3})$/u.exec(r);if(c){const n=g(c[1]??""),m=g(c[2]??"");return n===void 0||m===void 0?void 0:{...f,left:Math.min(n,m),right:Math.max(n,m)}}const u=/^\$?(\d+):\$?(\d+)$/u.exec(r);if(!u)return;const h=Number(u[1])-1,a=Number(u[2])-1;return{...f,top:Math.min(h,a),bottom:Math.max(h,a)}}const z=e=>e.replace(/^'|'$/gu,"").replaceAll("''","'");export async function sheetPicture(e){const{workbook:r,calc:f,file:c}=await F(e.root,{cwd:e.cwd,kinds:H},e.item),u=A(c),h=i=>{throw new C("not-found",`${i} is not a sheet or a range of this workbook.`,{exit:N.notFound,hint:`Sheets: ${r.sheets.map(s=>s.name).join(", ")}. A range is Summary!B3:D9, or B3:D9 on the first sheet.`})};let a,n;if(e.range!==void 0){const i=r.sheet(e.range);if(i)a=[i];else{const s=e.range.lastIndexOf("!"),d=s<0?r.sheets[0]:r.sheet(z(e.range.slice(0,s))),o=e.range.slice(s+1);if(!d||(n=O(o)??v(d,o),!n))return h(e.range);a=[d]}}const m=await E({gpu:!1,htmlInCanvas:!1});try{const i=async(t,$)=>{const l=T(f,{...t?{sheets:t}:{},...n?{area:n}:{rows:SHEET_ROWS,columns:SHEET_COLUMNS},headings:!0,css:`body{padding:${String(w)}px}`,font:k,file:b=>{try{return new Uint8Array(S(p(e.root,u,b)))}catch{return}}}),x=await P(m,{html:l.html.replace("<style>",`<style>${await M(l.html)}`),width:l.width+2*w});return{out:await _(B(e.cwd,e.out,p(j(e.root,"frames",y(c)),`${$||"sheet"}.png`)),x),cut:l.cut}},s=t=>t.replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,""),d=e.range===void 0&&e.out===void 0&&r.sheets.length>1?r.sheets:void 0,o=[];if(d)for(const t of d)o.push(await i([t],s(t.name)));else o.push(await i(a,e.range===void 0?"sheet":s(e.range)));return{mode:"frame",source:"sheet",sheet:u,out:o[0]?.out??"",outs:o.map(t=>t.out),...e.range===void 0?{}:{range:e.range},cut:o.flatMap(t=>t.cut),at:{...a?.[0]?{sheet:a[0].name}:{},...n?{range:I(n)}:{}}}}finally{await m.close()}}
|
package/dist/commands/frames.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{relative as
|
|
3
|
-
`)}}if(e.grid!==void 0)throw
|
|
4
|
-
`)}}const
|
|
5
|
-
`)}}if(e.page!==void 0)throw
|
|
6
|
-
`)}}const
|
|
7
|
-
`)}}),framesCuts
|
|
8
|
-
`)}});const
|
|
9
|
-
`)}}),framesWeb
|
|
10
|
-
`),exit:
|
|
2
|
+
import{relative as G,sep as N}from"node:path";import{z as t}from"zod";import{formatConsole as R,formatProblem as U}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as H}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as A,silenceText as q}from"@allyhub/video-measure/cut-sheet";import{consoleJson as C}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as F}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as D}from"@allyhub/protocol";import{defineCommand as v}from"../command.js";import{dir as P}from"../fields.js";import{parameters as z}from"../parameters.js";import{tellPresence as W}from"../presence.js";import{projectRoot as S}from"../project.js";import{VERSION_FIELDS as O,commandError as M,withVersion as x}from"../version.js";import{isPicture as T,isVideo as I,usage as g}from"./frames/common.js";import{findDoc as K}from"@allyhub/doc-extension/cli";import{findSheet as L}from"@allyhub/sheet-extension/cli";function j(e){return[...e.problems.filter(a=>a.level==="error").map(U),...R(C(e.console))]}const k=e=>({problems:e.problems,...C(e.console)}),E=(e,n)=>S(e,n),Q=t.strictObject({...O,item:t.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:t.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default every sheet, a picture each, from A1"),page:t.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:t.array(t.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled four to a picture. Without it, --part's still, or every part's still, four to a picture."),part:t.string().optional().describe("A part by its key (a deck's slide, an image's board): the one --at, --from and --to count from; alone, its still at its own size. A cover's key (video({ covers })): the cover"),from:t.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:t.number().optional().describe("The stretch's last second"),clip:t.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:t.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:t.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:t.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:t.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function Y(e){const n=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function Z(e){const n=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=v({name:"frames",summary:"Pictures of a piece over time, drawn as its exported files are: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; or any video file's frames. Sheet and doc do not need frames to check. Use it only when the person asks",input:Q,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip","cover"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3","allyhub frames research/channels/channels"]},async(e,n)=>{const a=n.cwd;if(e.item!==void 0&&I(e.item)){Y(e);const{fileFrames:i}=await import("./frames/file.js"),r=await i({cwd:a,root:await E(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(h=>{throw M(h)}),s=r.video,f=`${r.file} · ${s.duration.toFixed(2)} s · ${String(s.width)}×${String(s.height)} · ${String(s.fps)} fps`,m="clip"in r&&r.clip?`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`:void 0;return{value:r,text:[f,..."out"in r?[`${r.out}${"tiles"in r?` (${String(r.tiles.length)} moments in ${String(r.cols)} columns)`:""}`]:[],...m?[m]:[]].join(`
|
|
3
|
+
`)}}if(e.grid!==void 0)throw g("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await S(a,e.dir);if(e.item!==void 0&&await L(d,a,e.item)!==void 0){const{sheetPicture:i}=await import("./frames/sheet.js"),r=await i({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),s=await L(d,a,e.item);return s!==void 0&&Object.keys(r.at).length>0&&await W(d,{doing:"looking",item:X(G(d,s).split(N).join("/")),place:r.at}),{value:r,text:[...r.outs,...r.cut].join(`
|
|
4
|
+
`)}}const u=e.item===void 0?void 0:await K(d,a,e.item);if(u!==void 0){Z(e);const{docPicture:i}=await import("./frames/doc.js"),r=await i({cwd:a,root:d,file:u,page:e.page,out:e.out,progress:f=>{n.progress(f)}}),s=r.drawn.length===r.pages?"every page":`page${r.drawn.length===1?"":"s"} ${r.drawn.join(", ")}`;return{value:r,text:[r.out,`${r.doc}: ${String(r.pages)} page${r.pages===1?"":"s"} on ${String(r.paper.width)} × ${String(r.paper.height)} mm paper; ${s} drawn`].join(`
|
|
5
|
+
`)}}if(e.page!==void 0)throw g("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw g("bad-option","--range is a sheet's: name the sheet.");const c=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!c&&(e.clip!==void 0||e.beside!==void 0))throw g("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");const{pieceMoments:l,stillsSheet:y}=await import("./frames/piece.js");if(!c&&!e.overlay){const{result:i,...r}=await x(e,n,"render",m=>y(m,{cwd:a,root:d,out:e.out})),{unit:s,...f}=i;return{value:{...f,...k(r)},text:[`${i.out} (${i.piece} · ${i.format} · ${String(i.parts.length)} ${i.parts.length===1?s.noun:s.plural}${"scale"in i?` · ${String(i.scale)}×`:""})`,..."outs"in i?i.outs.slice(1):[],...j(r)].join(`
|
|
6
|
+
`)}}const b=!c&&e.overlay,{result:o,...w}=await x(e,n,"render",async i=>{const r=await l(i,{cwd:a,root:d,at:b?i.timeline.parts.map(h=>String(h.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside});if(r.mode==="cover")return r;const s="tiles"in r?r.tiles[0]:void 0,f=r.mode==="frame"?r.t:r.stretch?.from??s?.t,m=r.mode==="frame"?r.part:s?.part;return f!==void 0&&!b&&await W(d,{doing:"looking",item:i.piece.place,place:{t:f,...m===void 0?{}:{part:m}}}),r}),p=[];if(o.mode==="cover"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.cover})`),o.mode==="frame"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.part}${o.timed?` · ${o.t.toFixed(2)} s`:""})`),o.mode==="grid"){("outs"in o&&Array.isArray(o.outs)?o.outs.filter(s=>typeof s=="string"):[o.out]).forEach((s,f)=>{const m=o.tiles.filter(h=>("picture"in h?h.picture:0)===f);p.push(`${s} (${o.piece} · ${String(m.length)} moments in ${String(Math.min(o.cols,m.length))} columns · ${String(o.scale)}×)`,` ${m.map(h=>`${h.t.toFixed(o.stretch?3:2)} ${h.part}`).join(" · ")}`)});const r=[...new Set(o.tiles.flatMap(s=>s.overlay?.missing??[]))];r.length>0&&p.push(` Not measured: ${r.join(", ")}.`)}const $=o.mode==="cover"?void 0:o.stretch;return $&&p.push(` Stretch ${$.from.toFixed(3)}–${$.to.toFixed(3)} s, one frame in ${String($.every)}: ${String($.frames)} frames.`),"clip"in o&&o.clip&&p.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...k(w)},text:[...p,...j(w)].join(`
|
|
7
|
+
`)}}),framesCuts=v({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...O,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:z({span:t.number().positive().max(10).default(J.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,n)=>{const a=n.cwd,d=await S(a,e.dir),{cutSheets:u}=await import("./frames/cuts.js"),{result:c,...l}=await x(e,n,"render",o=>u(o,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),y=c.part===void 0?`${String(c.cuts.length)} cut${c.cuts.length===1?"":"s"}`:`${String(c.cuts.length)} of ${String(c.total)} cuts (part ${c.part} and its joins)`,b=[`${c.piece} · ${c.format} · ${y}; silence is sound under ${String(c.threshold)} dBFS`];for(const o of c.cuts){const w=o.sound?`level ${A(o.sound.levelDb)} / around ${A(o.sound.aroundDb)} dBFS, peak ${A(o.sound.peakDb)}, step ${o.sound.jumpDb<0?"−":"+"}${Math.abs(o.sound.jumpDb).toFixed(1)} dB`:"no sound";b.push(`${String(o.index).padStart(3)} ${o.t.toFixed(3).padStart(7)} s ${o.kind.padEnd(6)} ${V(o)}`,` silence at the cut: ${q(o.silence)} · ${w}`,` “${o.said.before}” | “${o.said.after}”${o.across?` · across the cut: “${o.across}”`:""}`,` ${o.sheet}`)}return{value:{...c,...k(l)},text:[...b,...j(l)].join(`
|
|
8
|
+
`)}});const _=H;export const framesCompare=v({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:t.strictObject({reference:t.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:t.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:O.combo,dir:P,at:t.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:t.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:t.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:t.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:t.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:t.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:z({resize:t.enum(["stretch","width","none"]).default(_.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:t.number().int().min(0).max(32).default(_.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:t.looseObject({reference:t.string(),files:t.looseObject({side:t.string(),heatmap:t.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,n)=>{const a=n.cwd,d=e.params;if(!T(e.reference))throw g("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&T(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const u=e.candidate!==void 0&&(T(e.candidate)||I(e.candidate))?e.candidate:void 0,{compareText:c,comparePictures:l}=await import("./frames/compare.js"),y=p=>({cwd:a,root:p,reference:e.reference,file:u,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(u!==void 0){if(e.combo!==void 0||e.part!==void 0)throw g("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await l(y(await E(a,e.dir)),void 0).catch($=>{throw M($)});return{value:p,text:c(p)}}const b=await S(a,e.dir),{result:o,...w}=await x({...e,item:e.candidate},n,"render",p=>l(y(b),p));return{value:{...o,...k(w)},text:[c(o),...j(w)].join(`
|
|
9
|
+
`)}}),framesWeb=v({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:P,size:t.string().default(`${String(F.width)}x${String(F.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(F.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,n)=>{const a=n.cwd,[d,u]=B(e.size),{pageShot:c}=await import("./frames/page.js"),l=await c({cwd:a,root:await E(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:u,scale:e.scale,full:e.full,wait:e.wait});return{value:l,text:[`${l.out}: ${String(l.width)}×${String(l.height)}${l.scale===1?"":` (${String(l.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(l.elements).length)} elements (${Object.keys(l.elements).join(", ")||"none"}) in ${l.elementsFile}`,...l.missing.length>0?[`Not found: ${l.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
|
|
10
|
+
`),exit:l.missing.length>0?D.failed:D.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
|
package/dist/commands/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{CLOUD_SOURCE as l}from"./cloud-tools.js";import{EXTENSIONS_SOURCE as d,builtInCommands as y}from"./contributed.js";import{inspectListingViews as u}from"./inspect/index.js";import{VIEWS_SOURCE as f,builtInViews as S}from"./inspect/views.js";import{extensions as C}from"./found-extensions.js";const a=t=>async()=>((await C()).builtInExtensions(),t());export const COMMAND_MODULES=[a(async()=>[(await import("./check.js")).check]),a(async()=>[(await import("./inspect/facts.js")).inspect]),a(async()=>[(await import("./inspect/layout.js")).inspectLayout]),a(async()=>[(await import("./inspect/combos.js")).inspectCombos]),a(async()=>[(await import("./inspect/uses.js")).inspectUses]),a(async()=>[(await import("./
|
|
2
|
+
import{CLOUD_SOURCE as l}from"./cloud-tools.js";import{EXTENSIONS_SOURCE as d,builtInCommands as y}from"./contributed.js";import{inspectListingViews as u}from"./inspect/index.js";import{VIEWS_SOURCE as f,builtInViews as S}from"./inspect/views.js";import{extensions as C}from"./found-extensions.js";const a=t=>async()=>((await C()).builtInExtensions(),t());export const COMMAND_MODULES=[a(async()=>[(await import("./check.js")).check]),a(async()=>[(await import("./migrate.js")).migrate]),a(async()=>[(await import("./inspect/facts.js")).inspect]),a(async()=>[(await import("./inspect/layout.js")).inspectLayout]),a(async()=>[(await import("./inspect/combos.js")).inspectCombos]),a(async()=>[(await import("./inspect/uses.js")).inspectUses]),a(async()=>[(await import("./export.js")).exportFiles]),a(async()=>(await import("./frames.js")).FRAMES_COMMANDS),a(async()=>[(await import("./dev.js")).dev]),a(async()=>{const{add:t,addSearch:i}=await import("./add.js");return[t,i]}),async()=>{const{skills:t,skillsShow:i}=await import("./skills.js");return[t,i]},a(async()=>[(await import("./align.js")).align]),async()=>{const{authLogin:t,authStatus:i}=await import("./auth.js");return[t,i]},async()=>{const{orgsList:t,orgsUse:i}=await import("./orgs.js");return[t,i]},async()=>[(await import("./cloud-tools.js")).upload],async()=>(await import("./mail.js")).MAIL_COMMANDS,a(async()=>[(await import("./doctor.js")).doctor]),a(async()=>[(await import("./extensions.js")).doctorExtensions]),async()=>[(await import("./upgrade.js")).upgrade]],COMMAND_SOURCES=[l,d,f];let m;export function allCommandsFrom(){return m??=(async()=>{const t=(await Promise.all(COMMAND_MODULES.map(async(n,p)=>(await n()).map(w=>({command:w,from:p}))))).flat(),[i,e]=await Promise.all([S(),y()]),r=t.findIndex(n=>n.command.spec.name==="inspect"),o=t[r],s=t.filter(n=>n.command.spec.name.startsWith("inspect "));if(o===void 0||s.length===0)throw new Error("The CLI's own commands have no inspect.");const c=t.indexOf(s[s.length-1]??o)+1;return[...t.slice(0,r),{...o,command:u(o.command,[...s.map(n=>n.command),...i])},...t.slice(r+1,c),...i.map(n=>({command:n,from:"view"})),...t.slice(c),...e.map(n=>({command:n,from:"contributed"}))]})(),m}export async function allCommands(){return(await allCommandsFrom()).map(t=>t.command)}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as m}from"zod";import{prepare as
|
|
2
|
+
import{z as m}from"zod";import{prepare as a}from"@allyhub/build";import{batchOf as d}from"@allyhub/export";import{EXIT as n}from"@allyhub/protocol";import{pieceNamed as l}from"@allyhub/video-core";import{CommandError as f,defineCommand as h}from"../../command.js";import{dir as b}from"../../fields.js";import{projectRoot as u}from"../../project.js";import{formatBatches as w,formatProblem as x}from"../../text/index.js";import{commandError as y}from"../../version.js";import{kindsAt as j}from"../extensions.js";export const inspectCombos=h({name:"inspect combos",summary:"A batch's matrix, read without a browser: its slots, rules, the combos chosen and why, the export's cost",input:m.strictObject({item:m.string().optional().describe("The piece: its id (its file without its extension) or its file; default every piece with slots"),dir:b}),positional:["item"],output:m.looseObject({}),examples:["allyhub inspect combos","allyhub inspect combos ads/tidyform"]},async(t,p)=>{try{const o=await u(p.cwd,t.dir),i=await a(o,{kinds:j(o)}),c=i.pieces.filter(e=>t.item===void 0?e.matrix!==void 0:l({id:e.id,path:e.place},t.item));if(t.item!==void 0&&c.length===0)throw new f("no-piece",`No piece ${t.item}.`,{exit:n.notFound,hint:`Pieces: ${i.pieces.map(e=>e.id).join(", ")||"none"}.`});const r=c.flatMap(e=>d(e)??[]),s=i.problems.filter(e=>e.code.startsWith("AK-X"));return{value:{batches:r,problems:s},text:[...r.length===0?[t.item===void 0?"No piece has slots (matrix.slots).":`${t.item} has no slots: every combo of its dimensions is made.`]:w(r),...s.map(x)].join(`
|
|
3
3
|
`),exit:s.some(e=>e.level==="error")?n.failed:n.ok}}catch(o){throw y(o)}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{mkdirSync as
|
|
2
|
+
import{mkdirSync as l,writeFileSync as u}from"node:fs";import{dirname as d,join as x}from"node:path";import{z as s}from"zod";import{FACTS_HEAD as $,MOMENTS as h,STRETCH as g,allFindings as b}from"@allyhub/build";import{consoleJson as m}from"@allyhub/project";import{EXIT as w}from"@allyhub/protocol";import{WORK_DIR as E}from"@allyhub/formats";import{countFacts as k}from"@allyhub/diagnostics";import{CommandError as F}from"../../command.js";import{builtInExtensions as T,extensionsAt as c,factKindsOf as f,factOwner as j}from"../extensions.js";import{formatConsole as y,formatFacts as p,formatProblem as O}from"../../text/index.js";export const plural=(n,e)=>`${String(n)} ${e}${n===1?"":"s"}`,sec=n=>n.toFixed(2),boxText=n=>`[${n.join(",")}]`,HEAD=$;export{h as MOMENTS,g as STRETCH};export const kind=s.array(s.string()).optional().describe(`Only facts of these kinds: ${f(T()).map(n=>n.kind).join(", ")}`),all=b;export function kindsOf(n,e){if(n===void 0)return;const t=f(c(e)).map(o=>o.kind);return n.map(o=>{if(!t.includes(o))throw new F("bad-kind",`There is no kind of fact ${o}.`,{exit:w.usage,hint:`Kinds: ${t.join(", ")}.`});return o})}export function pageLines(n){const e=n.problems.filter(t=>t.level==="error");return[...e.length>0?["Errors, which stop facts past them being measured:",...e.map(O)]:[],...y(m(n.console))]}export const pageJson=n=>({problems:n.problems.filter(e=>e.level==="error"),...m(n.console)});export function factLines(n,e,t){const o=p(n,{all:e});if(e||t===void 0)return o;const r=p(n,{all:!0});return o.some(i=>/^ {4}… \d+ more \(/u.test(i))?(l(d(t),{recursive:!0}),u(t,`${r.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`),[...o,`Every finding, a line each: ${t}`]):o}export const factsFile=(n,e)=>x(n,E,"inspect",`${e.replace(/[^\w.-]+/gu,"-")}.txt`);export function factsResult(n,e,t,o=[]){return{value:{facts:n,counts:k(n),total:t.total??n.length,...t.extra,...pageJson(e)},text:[`${plural(n.length,"fact")} measured now: ${HEAD}`,...factLines(n,t.all,t.save),...o,...pageLines(e)].join(`
|
|
5
|
-
`)}}export function unseenKinds(n,e,t){const o=c(t);return(n??[]).flatMap(r=>{if(e.some(
|
|
5
|
+
`)}}export function unseenKinds(n,e,t){const o=c(t);return(n??[]).flatMap(r=>{if(e.some(a=>a.kind===r))return[];const i=j(o,r);return i?[{kind:r,...i}]:[]})}export const unseenLines=n=>n.map(e=>`No ${e.kind} facts here. It is ${e.extension}'s: ${e.about}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as f}from"zod";import{itemKindBuild as S,projectItems as
|
|
3
|
-
`)}}const
|
|
2
|
+
import{z as f}from"zod";import{itemKindBuild as S,projectItems as b}from"@allyhub/build";import{NEVER_CANCELLED as C}from"@allyhub/extension-api";import{consoleJson as A}from"@allyhub/project";import{countFacts as g,filterFacts as j}from"@allyhub/diagnostics";import{defineCommand as F}from"../../command.js";import{dir as N}from"../../fields.js";import{itemNamed as K,projectRoot as P}from"../../project.js";import{checkProject as R,combosOf as T,commandError as z}from"../../version.js";import{factLines as y,factsFile as $,HEAD as O,STRETCH as D,all as H,kind as I,kindsOf as B,pageLines as J,plural as h,unseenKinds as E,unseenLines as v}from"./common.js";import{extensionsAt as V,factKindsOf as _,kindsAt as x}from"../extensions.js";async function w(t,s,n){const e=V(t),o=await e.kindProvider(s.kind);if(!o?.facts)return;const c=new Set(_(e).map(i=>i.kind));return(await o.facts(s,{root:t,tool:i=>Promise.reject(new Error(`No project tool ${i} in the CLI.`))},n,C)??[]).filter(i=>c.has(i.kind))}async function q(t,s){const{items:n}=await b(t,x(t)),e=[];for(const o of n)e.push(...await w(t,o,s)??[]);return e}async function G(t,s,n){const e=x(t),{items:o}=await b(t,e),c=K(o,t,s,n);if(!c)return;const l=await S(e,c);return{item:c,onStage:l?.onStage===!0}}export const inspect=F({name:"inspect",summary:"The check's facts: by kind, part and time",input:f.strictObject({item:f.string().optional().describe("Only this item: its id (its file without its extension) or its file, or a folder of items"),combo:f.array(f.string()).optional().describe("Only combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),kind:I,...D,all:H(),dir:N}),positional:["item"],output:f.looseObject({}),examples:["allyhub inspect","allyhub inspect launch/film --kind text-time,text-covered","allyhub inspect launch/film --part hook --all"]},async(t,s)=>{try{const n=await P(s.cwd,t.dir),e=B(t.kind,n),o=t.item===void 0?void 0:await G(n,s.cwd,t.item),c=o?.onStage===!1?o.item:void 0,l=c&&await w(n,c,{all:t.all});if(l){const d=l,m=j(d,{kinds:e}),p=E(e,m,n);return{value:{facts:m,counts:g(m),total:d.length,problems:[],...p.length>0?{unseen:p}:{}},text:[`${h(m.length,"fact")}: ${O}`,...y(m,t.all,$(n,`${t.item??"project"}.facts${t.kind?`.${t.kind.join("+")}`:""}`)),...v(p)].join(`
|
|
3
|
+
`)}}const i=await R({dir:n,...t.item===void 0?{}:{piece:t.item},combos:T(t)}),a=[...i.facts,...t.item===void 0?await q(n,{all:t.all}):o===void 0?[]:await w(n,o.item,{all:t.all})??[]],r=j(a,{kinds:e,part:t.part,from:t.from,to:t.to}),k=i.problems.filter(d=>d.level==="error"),u=E(e,r,n),L=r.length===a.length?h(a.length,"fact"):`${h(r.length,"fact")} of ${String(a.length)}`;return{value:{facts:r,counts:g(r),total:a.length,problems:k,...u.length>0?{unseen:u}:{},...A(i.console)},text:[`${L}: ${O}`,...y(r,t.all,$(n,`${t.item??"project"}.facts${t.kind?`.${t.kind.join("+")}`:""}`)),...v(u),...J({problems:k,console:i.console})].join(`
|
|
4
4
|
`)}}catch(n){throw z(n)}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as o}from"zod";import{migrateProject as s}from"@allyhub/build/migrate";import{defineCommand as l}from"../command.js";import{dir as c}from"../fields.js";import{projectRoot as d}from"../project.js";import{kindsAt as g}from"./extensions.js";export const migrate=l({name:"migrate",summary:"Brings the project's files to the formats AllyHub writes now, and records them in allyhub.yaml",input:o.strictObject({dir:c}),output:o.looseObject({migrated:o.array(o.unknown())}),examples:["allyhub migrate"]},async(a,n)=>{const e=await d(n.cwd,a.dir),r=await s(e,g(e)),i=r.length===0?["Its files are in the formats AllyHub writes now."]:r.flatMap(t=>[`${t.kind}: format ${String(t.at)} to ${String(t.now)}, ${t.changed.length===0?"no file changed":`changed ${t.changed.join(", ")}`}.`,...t.about.map(m=>` ${m}`)]);return{value:{migrated:r},text:i.join(`
|
|
3
|
+
`)}});
|
package/dist/commands/skills.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as
|
|
3
|
-
`)}}),skillsShow=f({name:"skills show",summary:"Prints one of AllyHub's skills in full, its SKILL.md and the names of its other files, without adding it to the project",input:
|
|
4
|
-
`)}}catch(e){throw e instanceof
|
|
2
|
+
import{readFile as b}from"node:fs/promises";import{join as y}from"node:path";import{z as m}from"zod";import{EXIT as d}from"@allyhub/protocol";import{RegistryError as x}from"@allyhub/registry";import{workSkills as g}from"@allyhub/scaffold";import{CommandError as c,defineCommand as f}from"../command.js";import{resourcesIndex as w}from"../resources.js";import{sdkDocs as $}from"../sdk-docs.js";const k="Check the connection and run the same command again.";async function j(t,l){const s=await $(t).catch(()=>{});if(!(!s||!/^[a-z][a-z-]*$/u.test(l)))for(const a of new Set([l,`${l.replace(/s$/u,"")}s`])){const e=y(s.dir,`${a}.md`),n=await b(e,"utf8").catch(()=>{});if(n!==void 0)return{file:e,text:n}}}function p(t){if(t.index===void 0)throw new c("no-registry",`AllyHub's skills could not be read from ${t.source.name}.`,{exit:d.platform,hint:k})}export const skills=f({name:"skills",summary:"Lists AllyHub's work skills, each how to make one kind of work, with what it is for: allyhub skills show <name> prints one, allyhub add skill/<name> puts it in the project",input:m.strictObject({}),output:m.looseObject({}),examples:["allyhub skills","allyhub skills show web-product-demos"]},async(t,l)=>{const s=await w(l);p(s);const a=g(s.index.items).map(i=>{const r=s.index.items.find(h=>h.name===i.name)?.version;return{...i,...r===void 0?{}:{version:r}}}),e=s.from==="stale",n=Math.max(0,...a.map(i=>i.name.length));return{value:{skills:a,stale:e},text:[`AllyHub's work skills (allyhub skills show <name> prints one; allyhub add skill/<name> puts it in the project, in .agents/skills)${e?", as last read (the registry cannot be read now)":""}:`,...a.length===0?[" none"]:a.map(i=>` ${i.name.padEnd(n)} ${i.description}`)].join(`
|
|
3
|
+
`)}}),skillsShow=f({name:"skills show",summary:"Prints one of AllyHub's skills in full, its SKILL.md and the names of its other files, without adding it to the project",input:m.strictObject({name:m.string().min(1).describe("The skill, as allyhub skills lists it (web-product-demos)")}),positional:["name"],output:m.looseObject({}),examples:["allyhub skills show web-product-demos"]},async(t,l)=>{const s=await w(l);if(p(s),s.index.items.find(e=>e.name===t.name)?.type!=="allyhub:skill"){const e=await j(l.cwd,t.name);if(e)return{value:{name:t.name,guide:e.file,skill:e.text},text:e.text};throw new c("no-item",`AllyHub has no skill ${t.name}.`,{exit:d.notFound,hint:"allyhub skills lists them."})}try{const e=await s.source.item(t.name);if(!e)throw new c("no-item",`AllyHub has no skill ${t.name}.`,{exit:d.notFound,hint:"allyhub skills lists them."});const n=`.agents/skills/${e.name}/`,i=o=>o.startsWith(n)?o.slice(n.length):o,r=e.files.find(o=>i(o.target)==="SKILL.md");if(!r)throw new c("bad-registry",`The registry's ${e.name} has no SKILL.md.`);const h=r.content??new TextDecoder().decode(await s.source.file(r.path)),u=e.files.map(o=>i(o.target)).filter(o=>o!=="SKILL.md");return{value:{name:e.name,...e.version===void 0?{}:{version:e.version},skill:h,files:u},text:[h.trimEnd(),"",u.length===0?`It has no other files. allyhub add skill/${e.name} puts it in ${n}.`:`Its other files, which allyhub add skill/${e.name} puts beside it in ${n}: ${u.join(", ")}.`].join(`
|
|
4
|
+
`)}}catch(e){throw e instanceof x?new c(e.code,e.message,{exit:e.code==="no-registry"?d.platform:d.failed,hint:e.hint??k}):e}});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{spawn as b}from"node:child_process";import{z as a}from"zod";import{EXIT as g}from"@allyhub/protocol/cli";import{CLI_VERSION as w}from"../cli-version.js";import{CommandError as f,defineCommand as $}from"../command.js";import{PACKAGE as h,behind as y,commandLine as i,installCommand as x,installOf as v,latestRelease as k,ownPackage as C}from"../self-upgrade.js";const j=(t,u,o)=>new Promise((n,s)=>{const r=b(t,u,{cwd:o,stdio:["ignore",2,2],shell:process.platform==="win32"});r.once("error",s),r.once("exit",e=>{n(e??1)})}),S=["project","global","npx","studio","source"];function m(t){switch(t.kind){case"project":return`this project's dependency (${t.root}, ${t.manager})`;case"global":return`a global install (${t.manager})`;case"npx":return"run through npx";case"studio":return"the one AllyHub Studio brings";case"source":return`run from ${t.dir}, not installed from npm`}}export function upgradeCommand(t){return $({name:"upgrade",summary:"Upgrades this CLI to its newest release, as it was installed: in the project, globally, or says how (npx, Studio)",input:a.strictObject({check:a.boolean().default(!1).describe("Only say this version and the newest; install nothing")}),output:a.looseObject({version:a.string(),latest:a.string(),install:a.enum(S),status:a.enum(["latest","behind","upgraded","nothing-to-install"]),command:a.string().optional()}),examples:["allyhub upgrade","allyhub upgrade --check"]},async(u,o)=>{const[n,s]=await Promise.all([t.dir().then(v),t.latest(o.env).catch(c=>{throw new f("registry-unreachable",`The newest ${h} could not be read from the npm registry: ${c instanceof Error?c.message:String(c)}`,{exit:g.platform,hint:"Check the connection, or npm's registry setting, and run it again."})})]),r=t.version,e=x(n),l={version:r,latest:s,install:n.kind,...e===void 0?{}:{command:i(e)}},d=`allyhub ${r}, ${m(n)}; the newest is ${s}.`;if(!y(r,s))return{value:{...l,status:"latest"},text:`allyhub ${r} is the newest release (${m(n)}).`};if(e===void 0)return{value:{...l,status:"nothing-to-install"},text:[d,n.kind==="npx"?`npx keeps no install: run it as npx -y ${h}@latest …, which fetches ${s}.`:n.kind==="studio"?"AllyHub Studio updates it with itself: nothing to do here.":`Bring that folder up to date, or install it from npm (npm install -g ${h}@latest).`].join(`
|
|
3
|
+
`)};if(u.check)return{value:{...l,status:"behind"},text:`${d}
|
|
4
|
+
allyhub upgrade installs it: ${i(e)}.`};o.progress(`${d}
|
|
5
|
+
Running ${i(e)}`);const p=await t.run(e.program,e.args,e.cwd??o.cwd);if(p!==0)throw new f("upgrade-failed",`${i(e)} exited with ${String(p)}; allyhub is still ${r}.`,{exit:g.failed,hint:"Its output above says why; run it yourself to see it again."});return{value:{...l,status:"upgraded"},text:`Upgraded allyhub ${r} to ${s} (${m(n)}), by ${i(e)}.`}})}export const upgrade=upgradeCommand({version:w,dir:C,latest:t=>k(t),run:j});
|