@allyhub/sdk 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/NOTICE +46 -49
- package/dist/dom.d.ts +1 -209
- package/dist/dom.js +1 -1
- package/dist/image.d.ts +2 -0
- package/dist/image.js +2 -0
- package/dist/index.d.ts +1 -21
- package/dist/index.js +1 -1
- package/dist/media.d.ts +1 -5
- package/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
- package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +4 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +22 -0
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
- package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +107 -83
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +185 -8
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
- package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +96 -42
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
- package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
- package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
- package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
- package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
- package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
- package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
- package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
- package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
- package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/measure/package.json +13 -0
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
- package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
- package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
- package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
- package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +437 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
- package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +291 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
- package/dist/node_modules/@allyhub/piece/package.json +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +271 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
- package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +337 -0
- package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +155 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +235 -133
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +65 -197
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +6 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +274 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +77 -91
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
- package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
- package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +5 -1
- package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
- package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
- package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
- package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
- package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +70 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.d.ts +9 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +9 -0
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
- package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/ast.d.ts +12 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.d.ts +5 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
- package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +5 -5
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +88 -3
- package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.d.ts +19 -0
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +8 -6
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +6 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.d.ts +7 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.d.ts +12 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
- package/dist/node_modules/@allyhub/sheet/package.json +5 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +101 -11
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
- package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +24 -0
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +223 -0
- package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +25 -4
- package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +20 -11
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
- package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
- package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
- package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
- package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
- package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
- package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
- package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
- package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
- package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +24 -432
- package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +8 -14
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
- package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
- package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
- package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
- package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
- package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
- package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
- package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
- package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
- package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
- package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
- package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
- package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +12 -5
- package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +2 -0
- package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
- package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
- package/dist/scenery.d.ts +1 -1
- package/dist/scenery.js +1 -1
- package/dist/sheets.d.ts +1 -1
- package/dist/sheets.js +1 -1
- package/dist/slides.d.ts +1 -9
- package/dist/slides.js +1 -1
- package/docs/README.md +10 -6
- package/docs/batches.md +5 -5
- package/docs/canvas.md +28 -0
- package/docs/contract.md +2 -2
- package/docs/defaults.md +298 -22
- package/docs/docs.md +80 -66
- package/docs/footage.md +7 -7
- package/docs/image.md +165 -0
- package/docs/layers.md +22 -13
- package/docs/modeling.md +4 -4
- package/docs/pictures.md +65 -0
- package/docs/project.md +51 -31
- package/docs/scenery.md +14 -15
- package/docs/sheets.md +46 -28
- package/docs/slides.md +121 -67
- package/docs/sound.md +3 -3
- package/docs/speech.md +8 -8
- package/docs/video.md +16 -13
- package/docs/websites.md +4 -4
- package/docs/x.md +73 -0
- package/package.json +7 -2
- package/dist/define.js +0 -2
- package/dist/free.js +0 -2
- package/dist/input.js +0 -2
- package/dist/module.js +0 -2
- package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
- package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
- package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
- package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
- package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
- package/dist/parts.js +0 -2
- package/dist/phone.js +0 -2
- package/dist/piece.js +0 -2
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
- /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
- /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
- /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
- /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
- /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
- /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
- /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
- /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
- /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
- /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
- /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
- /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
- /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{
|
|
3
|
-
${h.layer}
|
|
4
|
-
${h.z}
|
|
5
|
-
${h.text}`;if(u.has(n))return;u.add(n);let r=o.get(n);if(r||(r={part:e.part,shown:0,cut:void 0},o.set(n,r)),r.shown++,!i)return;const p={outside:i.outside,share:i.share,edges:i.edges,glyphs:i.glyphs};if(!r.cut){r.cut={part:e.part,text:h,moments:[e.t],t:e.t,worst:p};return}r.cut.moments.push(e.t),i.share>r.cut.worst.share&&(r.cut.text=h,r.cut.t=e.t,r.cut.worst=p)})}const a=[];for(const e of o.values())e.cut?.moments.length===e.shown&&a.push(e.cut);return a}export function measureMoment(t){const o=[],a=[],e=n=>t.seen?.[n]??t.texts[n]?.box;for(let n=0;n<t.texts.length;n++)for(let r=n+1;r<t.texts.length;r++){const p=t.texts[n],l=t.texts[r];if(!p||!l)continue;if(t.owner[n]===t.owner[r]){const s=e(n),d=e(r),M=s&&d?boxOverlap(s,d):void 0;M&&a.push({a:n,b:r,...M});continue}const m=boxOverlap(p.box,l.box);m&&o.push({a:n,b:r,...m})}const c=[];t.texts.forEach((n,r)=>{const p=e(r);if(!(!p||n.viewport))for(const l of t.containers?.[r]??[]){const m=outsideEdges(p,l.box);if(m.length!==0){c.push({text:r,container:l,edges:m});break}}});const u=[],h=t.face;h&&t.texts.forEach((n,r)=>{const p=overlapArea(n.box,h);p<=0||u.push({text:r,area:Math.round(p),ofText:g(p/Math.max(1,b(n.box))),ofFace:g(p/Math.max(1,b(h)))})});const f=[];t.texts.forEach((n,r)=>{if(n.viewport)return;const p=safeEdges(n.box,t.safe,t.width,t.height);p.length>0&&f.push({text:r,edges:p})});const i=[];return t.texts.forEach((n,r)=>{if(n.viewport)return;const p=e(r),l=offFrame(t.glyphs?.[r]??(p?[p]:[]),t.width,t.height);l&&i.push({text:r,...l})}),{t:t.t,part:t.part,texts:t.texts,...h?{face:h}:{},overlaps:o,ownOverlaps:a,outside:c,faceOverlaps:u,safeOverlaps:f,offFrame:i}}export function footageScale(t,o=1,a){const e=t.crop;if(!e||!t.source||e[2]<=0||e[3]<=0)return;const c=t.picture,u=t.zoom&&t.zoom.length>0?I(t.zoom,"z"):[],h=t.boxes&&t.boxes.length>1?t.boxes:void 0,f=h?.[0]?.box,i=h?.map(s=>({t:s.t,rect:s.box,...s.ease?{ease:s.ease}:{}})),n=Math.max(t.start,a?t.end-1/a:t.end),r=[t.start,...u.map(s=>s.t),...(h??[]).map(s=>s.t),n].map(s=>Math.min(Math.max(s,t.start),n)).sort((s,d)=>s-d),p=s=>{const d=u.length>0?$(u,s):1,M=i&&f?F(t,f,L(i,s)):1,v=Math.max(c[2]*M/e[2],c[3]*M/e[3])*d*o,y=[t.fit];return Math.abs(d-1)>1e-6&&y.push(`zoom ${String(g(d))}×`),i&&Math.abs(M-1)>1e-6&&y.push(`box key ${String(g(M))}×`),{scale:g(v),t:g(s),from:y}};let l=p(t.start),m=l;for(const s of r){const d=p(s);d.scale>l.scale&&(l=d),d.scale<m.scale&&(m=d)}return{part:t.part,file:t.file,source:[t.source.width,t.source.height],shown:[Math.round(e[2]),Math.round(e[3])],max:l,min:m}}export function contentBox(t,o,a){return{x:[a.left,Math.max(a.left,t-a.right)],y:[a.top,Math.max(a.top,o-a.bottom)]}}export function unionSpans(t){const o=t.filter(([e,c])=>c>e).map(([e,c])=>[e,c]).sort((e,c)=>e[0]-c[0]),a=[];for(const e of o){const c=a.at(-1);c&&e[0]<=c[1]?c[1]=Math.max(c[1],e[1]):a.push(e)}return a}export function freeBands(t,o){const[a,e]=t.y,c=[];let u=a;const h=(f,i)=>{i>f&&c.push({y:[f,i],x:[t.x[0],t.x[1]],height:i-f})};for(const[f,i]of unionSpans(o))if(!(i<=u)){if(f>=e)break;h(u,Math.min(f,e)),u=Math.max(u,i)}return h(u,e),c}export function boxRows(t,o){if(!(t[2]<=0||t[3]<=0)&&!(t[0]>=o[1]||t[0]+t[2]<=o[0]))return[Math.floor(t[1]),Math.ceil(t[1]+t[3])]}const E=t=>[t[0]+t[2]/2,t[1]+t[3]/2];function k(t,o){if(!t.box||!o.box)return{px:0,grew:0};const[a,e]=E(t.box),[c,u]=E(o.box);return{px:Math.hypot(c-a,u-e),grew:Math.max(Math.abs(o.box[2]-t.box[2]),Math.abs(o.box[3]-t.box[3]))}}export function largestSteps(t){const o=[];for(const e of t){const c=e.samples.length,u=[],h=[];for(let f=1;f<c;f++){const i=e.samples[f-1],n=e.samples[f];if(!i||!n)continue;const r=k(i,n);u[f]=Math.max(r.px,r.grew),h[f]=Math.abs(n.opacity-i.opacity)}for(const[f,i]of[["move",u],["fade",h]]){let n=-1,r=0;for(let s=1;s<c;s++){const M=(i[s]??0)-Math.max(i[s-1]??0,i[s+1]??0);M>r+1e-9&&(n=s,r=M)}const p=e.samples[n-1],l=e.samples[n];if(n<1||!p||!l)continue;const m=k(p,l);o.push({part:e.part,layer:e.layer,what:e.what,selector:e.selector,kind:f,t:g(l.t),...p.box?{from:p.box}:{},...l.box?{to:l.box}:{},px:g(m.px),grew:g(m.grew),opacity:[g(p.opacity),g(l.opacity)],around:g(Math.max(i[n-1]??0,i[n+1]??0)),over:g(r)})}}const a=e=>e.kind==="move"?0:1;return o.sort((e,c)=>a(e)-a(c)||c.over-e.over)}
|
|
2
|
+
import{READ_DEFAULTS as G,countWords as I,phoneScale as K}from"@allyhub/piece";import{boxFit as V,zoomChannel as W}from"./footage-motion.js";import{keyAt as J,rectAt as Q}from"./motion.js";export function textTime(t,r,i=G){const o=new Map;for(const h of t)o.set(h.text,(o.get(h.text)??0)+1);let a,p=0;for(const h of t){const w=o.get(h.text)??0;w>=p&&(p=w,a=h.text)}if(a===void 0)return;const x=t.filter(h=>h.text===a),e=h=>h.opacity>=i.opacity-1e-9&&h.shown>=i.shown-1e-9,n=i.every,c=h=>d(Math.min(h+n,r.end)),m=[];for(const h of x){if(!e(h))continue;const w=m.at(-1);w&&h.t-w[1]<n*.5?w[1]=c(h.t):m.push([d(h.t),c(h.t)])}const u=x.find(e)??x[0];if(!u)return;const f=(x.some(e)?x.filter(e):x).flatMap(h=>h.size===void 0?[]:[h.size]),b=f.length>0?Math.min(...f):void 0,s=(x.some(e)?x.filter(e):x).flatMap(h=>h.xHeight===void 0?[]:[h.xHeight]),l=s.length>0?Math.min(...s):void 0,g=K(r.frame,i.phone),z=h=>d(h.reduce((w,[S,F])=>w+Math.max(0,F-S),0)),y=[];for(const h of x){const w=y.at(-1);w&&h.t-w[1]<n*.5?w[1]=c(h.t):y.push([d(h.t),c(h.t)])}return{part:r.part,text:{layer:r.layer,z:r.z,text:a,box:u.box},...I(a),seconds:z(m),spans:m,onScreen:z(y),first:d(u.t),...b===void 0?{}:{size:{px:T(b),phone:T(b*g),...l===void 0?{}:{lowercase:{px:T(l),phone:T(l*g)}}}}}}const L=t=>t.toLowerCase().replace(/[^\p{L}\p{N}]/gu,"");export function speechShown(t,r){const i=new Set(r.flatMap(p=>p.split(/\s+/u).map(L))),o=t.split(/\s+/u).filter(p=>L(p)!==""),a=o.filter(p=>!i.has(L(p)));return{words:o.length,shown:o.length-a.length,unshown:[...new Set(a.map(L))]}}export function wordsAtOnce(t){const r=new Map;for(const o of t){if(o.spans.length===0)continue;const a=r.get(o.part)??[];a.push(o),r.set(o.part,a)}const i=[];for(const[o,a]of r){const p=[...new Set(a.flatMap(n=>n.spans.flat()))].sort((n,c)=>n-c),x=[];let e;for(const[n,c]of p.entries()){const m=a.filter(b=>b.spans.some(([s,l])=>c>=s&&c<l)),u=m.reduce((b,s)=>b+s.words,0),f=x.at(-1);(f?.words!==u||f.texts!==m.length)&&x.push({t:c,words:u,texts:m.length}),m.length>0&&(!e||u>e.words)?e={words:u,chars:m.reduce((b,s)=>b+s.chars,0),texts:m.length,from:c,until:p[n+1]??c}:e?.until===c&&u===e.words&&(e.until=p[n+1]??c)}e&&i.push({part:o,...e,steps:x})}return i}const d=t=>Math.round(t*1e3)/1e3,T=t=>Math.round(t*10)/10;export{cutThroughout}from"@allyhub/image-measure/layout";export function footageScale(t,r=1,i){const o=t.crop;if(!o||!t.source||o[2]<=0||o[3]<=0)return;const a=t.picture,p=t.zoom&&t.zoom.length>0?W(t.zoom,"z"):[],x=t.boxes&&t.boxes.length>1?t.boxes:void 0,e=x?.[0]?.box,n=x?.map(s=>({t:s.t,rect:s.box,...s.ease?{ease:s.ease}:{}})),c=Math.max(t.start,i?t.end-1/i:t.end),m=[t.start,...p.map(s=>s.t),...(x??[]).map(s=>s.t),c].map(s=>Math.min(Math.max(s,t.start),c)).sort((s,l)=>s-l),u=s=>{const l=p.length>0?J(p,s):1,g=n&&e?V(t,e,Q(n,s)):1,z=Math.max(a[2]*g/o[2],a[3]*g/o[3])*l*r,y=[t.fit];return Math.abs(l-1)>1e-6&&y.push(`zoom ${String(d(l))}×`),n&&Math.abs(g-1)>1e-6&&y.push(`box key ${String(d(g))}×`),{scale:d(z),t:d(s),from:y}};let f=u(t.start),b=f;for(const s of m){const l=u(s);l.scale>f.scale&&(f=l),l.scale<b.scale&&(b=l)}return{part:t.part,file:t.file,source:[t.source.width,t.source.height],shown:[Math.round(o[2]),Math.round(o[3])],max:f,min:b}}export function contentBox(t,r,i){return{x:[i.left,Math.max(i.left,t-i.right)],y:[i.top,Math.max(i.top,r-i.bottom)]}}export function unionSpans(t){const r=t.filter(([o,a])=>a>o).map(([o,a])=>[o,a]).sort((o,a)=>o[0]-a[0]),i=[];for(const o of r){const a=i.at(-1);a&&o[0]<=a[1]?a[1]=Math.max(a[1],o[1]):i.push(o)}return i}export function freeBands(t,r){const[i,o]=t.y,a=[];let p=i;const x=(e,n)=>{n>e&&a.push({y:[e,n],x:[t.x[0],t.x[1]],height:n-e})};for(const[e,n]of unionSpans(r))if(!(n<=p)){if(e>=o)break;x(p,Math.min(e,o)),p=Math.max(p,n)}return x(p,o),a}export function boxRows(t,r){if(!(t[2]<=0||t[3]<=0)&&!(t[0]>=r[1]||t[0]+t[2]<=r[0]))return[Math.floor(t[1]),Math.ceil(t[1]+t[3])]}const A=t=>[t[0]+t[2]/2,t[1]+t[3]/2];function N(t,r){if(!t.box||!r.box)return{px:0,grew:0};const[i,o]=A(t.box),[a,p]=A(r.box);return{px:Math.hypot(a-i,p-o),grew:Math.max(Math.abs(r.box[2]-t.box[2]),Math.abs(r.box[3]-t.box[3]))}}export function largestSteps(t){const r=[];for(const o of t){const a=o.samples.length,p=[],x=[];for(let e=1;e<a;e++){const n=o.samples[e-1],c=o.samples[e];if(!n||!c)continue;const m=N(n,c);p[e]=Math.max(m.px,m.grew),x[e]=Math.abs(c.opacity-n.opacity)}for(const[e,n]of[["move",p],["fade",x]]){let c=-1,m=0;for(let s=1;s<a;s++){const g=(n[s]??0)-Math.max(n[s-1]??0,n[s+1]??0);g>m+1e-9&&(c=s,m=g)}const u=o.samples[c-1],f=o.samples[c];if(c<1||!u||!f)continue;const b=N(u,f);r.push({part:o.part,layer:o.layer,what:o.what,selector:o.selector,kind:e,t:d(f.t),...u.box?{from:u.box}:{},...f.box?{to:f.box}:{},px:d(b.px),grew:d(b.grew),opacity:[d(u.opacity),d(f.opacity)],around:d(Math.max(n[c-1]??0,n[c+1]??0)),over:d(m)})}}const i=o=>o.kind==="move"?0:1;return r.sort((o,a)=>i(o)-i(a)||a.over-o.over)}export const MOVING_DEFAULTS={hold:1,slow:8,window:.25};const P=(t,r)=>t===r||t!==void 0&&r!==void 0&&t.every((i,o)=>i===r[o]);export function movingStretches(t,r){const i=r.hold??MOVING_DEFAULTS.hold,o=(r.slow??MOVING_DEFAULTS.slow)*((r.height??1080)/1080),a=r.window??MOVING_DEFAULTS.window,p=Math.max(1,Math.round(i*r.fps)),x=new Map;for(const e of t){const n=e.samples;let c=1;for(;c<n.length;){if(P(n[c-1]?.box,n[c]?.box)||!n[c-1]?.box||!n[c]?.box){c++;continue}const m=c-1;let u=c,f=c+1;for(;f<n.length&&f-u<=p;){const M=n[f-1]?.box,v=n[f]?.box;if(!M||!v)break;P(M,v)||(u=f),f++}c=u+1;const b=f>=n.length,s=n[m],l=n[u];if(!s?.box||!l?.box)continue;const[g,z]=A(s.box),[y,h]=A(l.box),w=Math.hypot(y-g,h-z),S=[s.box[2]>0?l.box[2]/s.box[2]:1,s.box[3]>0?l.box[3]/s.box[3]:1],F=l.t-s.t,D=Math.max(1,Math.round(a*r.fps));let j=0;for(let M=m;M<u;M+=D){const v=n[M],k=n[Math.min(u,M+D)];if(!v?.box||!k?.box||k.t<=v.t)continue;const[U,_]=A(v.box),[$,q]=A(k.box);Math.max(Math.hypot($-U,q-_),Math.abs(k.box[2]-v.box[2])/2,Math.abs(k.box[3]-v.box[3])/2)/(k.t-v.t)<o&&(j+=k.t-v.t)}const R=Math.abs(S[0]-1)>.001||Math.abs(S[1]-1)>.001,B=[e.part,d(s.t),d(l.t),S[0].toFixed(2),S[1].toFixed(2),...R?[]:[Math.round(y-g),Math.round(h-z)]].join("|"),C={layer:e.layer,what:e.what,...e.name===void 0?{}:{name:e.name}},O=x.get(B);if(O){O.things++,O.names.length<3&&O.names.push(C);continue}const E=r.transitions?.find(M=>(M.part===e.part||M.from===e.part)&&s.t<M.end&&l.t>M.start),H=r.parts?.find(M=>M.key===e.part)?.end;x.set(B,{part:e.part,start:d(s.t),end:d(l.t),things:1,names:[C],px:d(w),scale:[d(S[0]),d(S[1])],speed:F>0?d(w/F):0,slow:d(j),...E?{transition:{type:E.type,start:E.start,end:E.end}}:{},...H!==void 0&&b&&(n.at(-1)?.t??0)>=H-1.5/r.fps?{toEnd:!0}:{}})}}return[...x.values()].sort((e,n)=>e.start-n.start||n.things-e.things)}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type GainPoint, type MixPlan, type MusicSegment, type Segment } from "@allyhub/audio";
|
|
2
|
+
import type { MediaInfo, Word } from "@allyhub/piece";
|
|
3
|
+
import type { VoiceSetting } from "./audio-types.js";
|
|
4
|
+
import type { AudioPlan, MusicPlan, Timeline } from "./timeline.js";
|
|
5
|
+
type Mic = NonNullable<AudioPlan["mic"]>;
|
|
6
|
+
/**
|
|
7
|
+
* How the speech was recorded, for the timeline: the video's setting (a
|
|
8
|
+
* studio's finishing where it gives none) and each part's own, resolved
|
|
9
|
+
* over their presets. The settings were checked when the piece was made
|
|
10
|
+
* (the SDK's and the build's voiceProblem).
|
|
11
|
+
*/
|
|
12
|
+
export declare function voicePlan(video: VoiceSetting | undefined, specs: readonly {
|
|
13
|
+
key: string;
|
|
14
|
+
mic?: VoiceSetting | undefined;
|
|
15
|
+
}[]): {
|
|
16
|
+
mic: Mic;
|
|
17
|
+
};
|
|
18
|
+
/** Where each spoken word falls on the film's clock, over every segment. */
|
|
19
|
+
export declare function wordsOnFilm(segments: readonly (Segment & {
|
|
20
|
+
file: string;
|
|
21
|
+
})[], wordsOf: (file: string) => readonly Word[] | undefined): {
|
|
22
|
+
start: number;
|
|
23
|
+
end: number;
|
|
24
|
+
}[];
|
|
25
|
+
/**
|
|
26
|
+
* The film seconds and file seconds the music plays: its stretches with
|
|
27
|
+
* their seams' fades, from the file's length `len`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function musicPlayed(m: MusicPlan, len: number, duration: number): MusicSegment[];
|
|
30
|
+
export interface MixPlanOptions {
|
|
31
|
+
/** Seeds the synthesized sounds and the voice's rooms: piece id, output, combo key with the format. */
|
|
32
|
+
seed: string;
|
|
33
|
+
}
|
|
34
|
+
/** The plan for a timeline, given the project's media by path (with loudness). */
|
|
35
|
+
export declare function mixPlan(timeline: Timeline, media: Readonly<Record<string, MediaInfo>>, opts: MixPlanOptions): MixPlan;
|
|
36
|
+
/**
|
|
37
|
+
* Each part's speechGainDb on the film's clock, as a gain envelope: where
|
|
38
|
+
* its speech plays (its clips, room tone included) or else where its
|
|
39
|
+
* picture is, ramped over 10 ms at each change. Empty when no part sets
|
|
40
|
+
* one.
|
|
41
|
+
*/
|
|
42
|
+
export declare function speechGains(timeline: Timeline): GainPoint[];
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=mix-plan.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{addEnvelopes as v,duckEnvelope as I,hashSeed as w,MIX_DEFAULTS as D,resolveVoice as E,SFX_HIT as F,speechEnvelope as S,speechSpans as O}from"@allyhub/audio";import{MUSIC_DEFAULTS as M,musicSegments as k,placeStretches as A,wholeLoop as G}from"./music.js";import{wordsIn as U}from"./speech.js";export function voicePlan(t,s){const a=o=>E(o),c=s.filter(o=>o.mic!==void 0);return{mic:{video:a(t),...c.length>0?{parts:Object.fromEntries(c.map(o=>[o.key,a(o.mic)]))}:{}}}}export function wordsOnFilm(t,s){return t.flatMap(a=>U(s(a.file)??[],a.from,a.dur,a.at,a.speed??1)).map(a=>({start:a.start,end:a.end})).sort((a,c)=>a.start-c.start)}const g=(t,s)=>s===void 0||!Number.isFinite(s)?0:t-s,L=t=>[...t].sort((s,a)=>s.t-a.t);export function musicPlayed(t,s,a){return t.play?k(t.play,t.seam??M.seam,s,"before",!t.loop):t.loop?k(G(t.from,s,a,t.seam),s>1?t.seam??M.loopSeam:0,s,"after",!1):k(A([{from:t.from,to:s}],void 0,s,a),0,s)}export function mixPlan(t,s,a){const c=t.duration,o=t.audio.mix??D,i={duration:c,speech:[],footage:[],sfx:[]};for(const e of[...t.audio.speech??[],...t.audio.room??[]]){const f=s[e.file];!f||e.dur<=0||i.speech.push({file:e.file,...e.part===void 0?{}:{part:e.part},at:e.at,from:e.from,dur:e.dur,gainDb:g(o.speech,f.loudness)+(e.gainDb??0),...e.speed!==void 0&&e.speed!==1?{speed:e.speed}:{},...e.denoise?{denoise:e.denoise}:{},...e.fadeIn?{fadeIn:e.fadeIn}:{},...e.fadeOut?{fadeOut:e.fadeOut}:{}})}const m=O(i.speech,o.duck),h=S(m,o.footageUnderSpeech-o.footage,o.duck);for(const e of t.footage??[]){const f=s[e.file];if(!e.audio||e.take===!0||!f)continue;const d=e.speed>0?e.speed:1,u=Math.max(0,e.from),b=e.start+(u-e.from)/d,y=f.duration===void 0?1/0:f.duration-u,x=Math.min(e.end-b,y/d);x<=0||i.footage.push({file:e.file,at:b,from:u,dur:x,...d===1?{}:{speed:d},gainDb:g(o.footage,f.loudness)+e.gainDb,...h.length>0?{envelope:h}:{}})}const n=t.audio.music,r=n?.file===void 0?void 0:s[n.file];if(n?.file!==void 0&&r){const e=(n.gain??[]).map(u=>({t:u.t,db:u.db})),f=r.duration??n.from+c,d={file:n.file,segments:musicPlayed(n,f,c),gainDb:g(o.musicAlone,r.loudness),alone:o.musicAlone,fadeIn:o.musicFade.in,fadeOut:Math.min(o.musicFade.out,c/4),...n.until===void 0?{}:{until:n.until},duck:v(v(S(m,o.music-o.musicAlone,o.duck),I(wordsOnFilm(i.speech,u=>s[u]?.words),o.duck)),L(e)),...n.shape?{shape:n.shape}:{}};i.music=d}const l=speechGains(t);l.length>0&&(i.speechGain=l);const p=t.audio.mic;return p&&(i.voice={video:p.video,...p.parts?{parts:p.parts}:{},spans:t.parts.map(e=>({part:e.key,start:e.start,end:e.end})),seed:a.seed}),t.cues.forEach((e,f)=>{const d=e.gainDb??0;if(e.file!==void 0){const b=s[e.file];if(!b)return;i.sfx.push({sound:e.sound,file:e.file,at:e.t,gainDb:g(o.sfx,b.loudness)+d,seed:0,...e.shape?{shape:e.shape,level:{target:o.sfx,gainDb:d}}:{}});return}const u=F[e.sound];u!==void 0&&i.sfx.push({sound:e.sound,at:Math.max(0,e.t-u),gainDb:o.sfx-D.sfx+d,seed:w(`${a.seed}:${e.sound}:${String(f)}`),...e.shape?{shape:e.shape}:{}})}),i}export function speechGains(t){const s=new Map;for(const n of t.parts)n.speechGainDb!==void 0&&n.speechGainDb!==0&&s.set(n.key,n.speechGainDb);if(s.size===0)return[];const a=[];for(const n of t.parts)a.push({start:n.start,end:n.end,db:s.get(n.key)??0,rank:0});const c=[...(t.audio.speech??[]).map(n=>({c:n,rank:2})),...(t.audio.room??[]).map(n=>({c:n,rank:1}))];for(const{c:n,rank:r}of c)n.part===void 0||n.dur<=0||a.push({start:n.at,end:n.at+n.dur,db:s.get(n.part)??0,rank:r});const o=[...new Set(a.flatMap(n=>[n.start,n.end]))].sort((n,r)=>n-r),i=[];for(let n=0;n+1<o.length;n++){const r=o[n]??0,l=o[n+1]??r,p=(r+l)/2;let e;for(const d of a)p<d.start||p>=d.end||(!e||d.rank>e.rank||d.rank===e.rank&&d.start>=e.start)&&(e=d);const f=e?.db??0;i.at(-1)?.db!==f&&i.push({t:r,db:f})}if(i.every(n=>n.db===0))return[];const m=.005,h=[];for(const[n,r]of i.entries()){if(n===0){h.push({t:r.t,db:r.db});continue}const l=i[n-1]?.db??0;h.push({t:Math.max(0,r.t-m),db:l},{t:r.t+m,db:r.db})}return h}
|