@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
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import type { Box } from "@allyhub/diagnostics";
|
|
2
|
+
import type { SafeZone } from "./formats.js";
|
|
3
|
+
import type { PixelRect } from "./layer.js";
|
|
4
|
+
/** A block of text on screen at a moment: one layer's line or paragraph. */
|
|
5
|
+
export interface MeasuredText {
|
|
6
|
+
/** The layer's component name ("custom" for custom()). */
|
|
7
|
+
layer: string;
|
|
8
|
+
/** The layer's own name (its `key`), when it has one: an image's every layer. */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** The plane it is drawn in. */
|
|
11
|
+
z: "front" | "behind-person" | "overlay";
|
|
12
|
+
text: string;
|
|
13
|
+
/** Its box in the frame's pixels, rounded. */
|
|
14
|
+
box: Box;
|
|
15
|
+
/** Inside a page viewport (a site demo): the page's own text. */
|
|
16
|
+
viewport?: true;
|
|
17
|
+
/**
|
|
18
|
+
* How opaque it is drawn, the lowest of its text nodes' (each the product
|
|
19
|
+
* of its element's and its ancestors'), when under 1.
|
|
20
|
+
*/
|
|
21
|
+
opacity?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The box of what shows of its glyphs, when not `box`: the rows they
|
|
24
|
+
* cover (a line's box is the font's whole ascent and descent, taller
|
|
25
|
+
* than what is drawn), cut where an ancestor clips its content. Blocks of
|
|
26
|
+
* one layer, and a block and the boxes it is drawn inside, are compared
|
|
27
|
+
* by it.
|
|
28
|
+
*/
|
|
29
|
+
ink?: Box;
|
|
30
|
+
/**
|
|
31
|
+
* The font families its characters are drawn in, in the order they first
|
|
32
|
+
* draw one: by the faces the page declares and their ranges, as the
|
|
33
|
+
* browser picks them (the runtime's drawnFamilies).
|
|
34
|
+
*/
|
|
35
|
+
fonts?: string[];
|
|
36
|
+
}
|
|
37
|
+
/** What makes an element a box one can see: a background, a border, a shadow. */
|
|
38
|
+
export type BoxPaint = "background" | "border" | "shadow";
|
|
39
|
+
/**
|
|
40
|
+
* A box a text block is drawn inside: an element between the block and its
|
|
41
|
+
* layer with a background, a border or a shadow (the block's own element
|
|
42
|
+
* too), nearest first.
|
|
43
|
+
*/
|
|
44
|
+
export interface TextContainer {
|
|
45
|
+
/** In the frame's pixels, rounded. */
|
|
46
|
+
box: Box;
|
|
47
|
+
paint: BoxPaint[];
|
|
48
|
+
}
|
|
49
|
+
/** A text block reaching outside a box it is drawn inside. */
|
|
50
|
+
export interface TextOutside {
|
|
51
|
+
text: number;
|
|
52
|
+
/** The nearest box it reaches out of. */
|
|
53
|
+
container: TextContainer;
|
|
54
|
+
/** Per edge of that box it crosses: pixels past the edge. */
|
|
55
|
+
edges: {
|
|
56
|
+
side: "top" | "bottom" | "left" | "right";
|
|
57
|
+
px: number;
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
/** Two text blocks drawn over each other. */
|
|
61
|
+
export interface TextOverlap {
|
|
62
|
+
/** Indices into the moment's texts. */
|
|
63
|
+
a: number;
|
|
64
|
+
b: number;
|
|
65
|
+
/** Pixels both cover. */
|
|
66
|
+
area: number;
|
|
67
|
+
/** That area as a share of the smaller block's box (0–1). */
|
|
68
|
+
share: number;
|
|
69
|
+
}
|
|
70
|
+
/** A text block over the speaker's face. */
|
|
71
|
+
export interface FaceOverlap {
|
|
72
|
+
text: number;
|
|
73
|
+
area: number;
|
|
74
|
+
/** Share of the text block's box. */
|
|
75
|
+
ofText: number;
|
|
76
|
+
/** Share of the face's box. */
|
|
77
|
+
ofFace: number;
|
|
78
|
+
}
|
|
79
|
+
/** A text block reaching into the format's covered edges (not a page viewport's own text). */
|
|
80
|
+
export interface SafeOverlap {
|
|
81
|
+
text: number;
|
|
82
|
+
/** Per covered edge it reaches into: pixels in from that edge's line. */
|
|
83
|
+
edges: {
|
|
84
|
+
side: "top" | "bottom" | "left" | "right";
|
|
85
|
+
px: number;
|
|
86
|
+
}[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A text block the frame's edges cut: what shows of its glyphs (the rows
|
|
90
|
+
* each line's glyphs cover, the columns of its letters, after the boxes it
|
|
91
|
+
* is drawn inside clip it) that lies outside the frame.
|
|
92
|
+
*/
|
|
93
|
+
export interface TextOffFrame {
|
|
94
|
+
text: number;
|
|
95
|
+
/** Pixels of its glyphs outside the frame. */
|
|
96
|
+
outside: number;
|
|
97
|
+
/** That as a share of its glyphs' pixels (0–1; 1: none of them inside). */
|
|
98
|
+
share: number;
|
|
99
|
+
/** Per edge of the frame it crosses: pixels past the edge. */
|
|
100
|
+
edges: {
|
|
101
|
+
side: "top" | "bottom" | "left" | "right";
|
|
102
|
+
px: number;
|
|
103
|
+
}[];
|
|
104
|
+
/** The box round its glyphs, whole pixels, the frame not cutting it. */
|
|
105
|
+
glyphs: Box;
|
|
106
|
+
}
|
|
107
|
+
export interface LayoutMoment {
|
|
108
|
+
/** Film seconds, on the frame grid. */
|
|
109
|
+
t: number;
|
|
110
|
+
part: string;
|
|
111
|
+
texts: MeasuredText[];
|
|
112
|
+
/** The speaker's face, when the footage showing has a face track. */
|
|
113
|
+
face?: Box;
|
|
114
|
+
/** Blocks of different layers over each other. */
|
|
115
|
+
overlaps: TextOverlap[];
|
|
116
|
+
/** Blocks of the same layer over each other. */
|
|
117
|
+
ownOverlaps: TextOverlap[];
|
|
118
|
+
/** Blocks reaching outside a box they are drawn inside. */
|
|
119
|
+
outside: TextOutside[];
|
|
120
|
+
faceOverlaps: FaceOverlap[];
|
|
121
|
+
safeOverlaps: SafeOverlap[];
|
|
122
|
+
/** Blocks the frame's edges cut. */
|
|
123
|
+
offFrame: TextOffFrame[];
|
|
124
|
+
}
|
|
125
|
+
/** A footage layer's enlargement at one moment. */
|
|
126
|
+
export interface ScaleAt {
|
|
127
|
+
/** Output pixels per source pixel (1: its own pixels; 2: each source pixel drawn 2 × 2). */
|
|
128
|
+
scale: number;
|
|
129
|
+
/** Film seconds. */
|
|
130
|
+
t: number;
|
|
131
|
+
/** What makes up the scale then: the fit, and a zoom (punch-in or pullback) or box key. */
|
|
132
|
+
from: string[];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* How much a footage layer is enlarged over its window: drawn pixels per
|
|
136
|
+
* source pixel at its largest and at its smallest.
|
|
137
|
+
*/
|
|
138
|
+
export interface FootageScale {
|
|
139
|
+
part: string;
|
|
140
|
+
file: string;
|
|
141
|
+
/** The source's pixels, as displayed. */
|
|
142
|
+
source: [width: number, height: number];
|
|
143
|
+
/** The part of the source drawn (crop, reframe window), in its pixels. */
|
|
144
|
+
shown: [width: number, height: number];
|
|
145
|
+
/** The largest enlargement, at its first moment. */
|
|
146
|
+
max: ScaleAt;
|
|
147
|
+
/** The smallest enlargement, at its first moment. */
|
|
148
|
+
min: ScaleAt;
|
|
149
|
+
}
|
|
150
|
+
/** How the time a text can be read is measured (the text-time fact). */
|
|
151
|
+
export interface ReadOptions {
|
|
152
|
+
/** Seconds between the moments each part is looked at. */
|
|
153
|
+
every: number;
|
|
154
|
+
/** A block is whole while every text node of it is drawn at this opacity or more… */
|
|
155
|
+
opacity: number;
|
|
156
|
+
/** …and at least this share of each node's glyphs' box shows (an ancestor's overflow clips the rest). */
|
|
157
|
+
shown: number;
|
|
158
|
+
/**
|
|
159
|
+
* The phone a text's size is given on: its screen in points, held
|
|
160
|
+
* upright, the frame fitted inside it whole (a 16:9 frame across its
|
|
161
|
+
* width, a 9:16 one up its height).
|
|
162
|
+
*/
|
|
163
|
+
phone: [width: number, height: number];
|
|
164
|
+
}
|
|
165
|
+
export declare const READ_DEFAULTS: ReadOptions;
|
|
166
|
+
/** How many of the phone's points a pixel of a frame is (`ReadOptions.phone`). */
|
|
167
|
+
export declare function phoneScale(frame: readonly [width: number, height: number], phone: readonly [width: number, height: number]): number;
|
|
168
|
+
/** A text block at one of the moments a part is looked at. */
|
|
169
|
+
export interface TextSample {
|
|
170
|
+
/** Film seconds. */
|
|
171
|
+
t: number;
|
|
172
|
+
text: string;
|
|
173
|
+
box: Box;
|
|
174
|
+
/** The lowest opacity of its text nodes. */
|
|
175
|
+
opacity: number;
|
|
176
|
+
/** The share of its glyphs' box that shows, the lowest of its text nodes' (an ancestor's overflow clips the rest). */
|
|
177
|
+
shown: number;
|
|
178
|
+
/** Its font size as drawn, in the frame's pixels (a transform's scale counted), the smallest of its text nodes'. */
|
|
179
|
+
size?: number;
|
|
180
|
+
/** Its font's lowercase x as drawn, in the frame's pixels, the smallest of its text nodes' with lowercase Latin letters. */
|
|
181
|
+
xHeight?: number;
|
|
182
|
+
}
|
|
183
|
+
/** How long one text block can be read. */
|
|
184
|
+
export interface TextTime {
|
|
185
|
+
part: string;
|
|
186
|
+
/** The text the block shows longest, where it is first whole (else first on screen). */
|
|
187
|
+
text: MeasuredText;
|
|
188
|
+
words: number;
|
|
189
|
+
chars: number;
|
|
190
|
+
/** Seconds that text shows whole. */
|
|
191
|
+
seconds: number;
|
|
192
|
+
/** When, in film seconds: [from, until]. */
|
|
193
|
+
spans: [from: number, until: number][];
|
|
194
|
+
/** Seconds that text is on screen at all. */
|
|
195
|
+
onScreen: number;
|
|
196
|
+
/** Film seconds it is first whole, else first on screen. */
|
|
197
|
+
first: number;
|
|
198
|
+
/**
|
|
199
|
+
* Its font size: the smallest it is drawn at while whole (else while on
|
|
200
|
+
* screen), in the frame's pixels and in points on the phone of
|
|
201
|
+
* `ReadOptions.phone`. Missing when it was not measured. `lowercase` is
|
|
202
|
+
* the height of its font's lowercase x the same way, for text with
|
|
203
|
+
* lowercase Latin letters: two faces at one size can draw their letters
|
|
204
|
+
* at very different heights (a handwriting face's are much smaller).
|
|
205
|
+
*/
|
|
206
|
+
size?: TextSize;
|
|
207
|
+
}
|
|
208
|
+
/** A text's size in the frame's pixels and in points on a phone, with its lowercase letters' height. */
|
|
209
|
+
export interface TextSize {
|
|
210
|
+
px: number;
|
|
211
|
+
phone: number;
|
|
212
|
+
lowercase?: {
|
|
213
|
+
px: number;
|
|
214
|
+
phone: number;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/** A text of a deck's shape as drawn. */
|
|
218
|
+
export interface DeckTextLayout {
|
|
219
|
+
text: string;
|
|
220
|
+
words: number;
|
|
221
|
+
/** Its lines as drawn, a box of each one's glyphs, in the slide's pixels. */
|
|
222
|
+
lines: Box[];
|
|
223
|
+
/** All of its glyphs; null when none shows. */
|
|
224
|
+
glyphs: Box | null;
|
|
225
|
+
/** The sizes and weights it is drawn at, each once: size and lowercase x's height in points. */
|
|
226
|
+
type: {
|
|
227
|
+
size: number;
|
|
228
|
+
weight: number;
|
|
229
|
+
xHeight?: number;
|
|
230
|
+
}[];
|
|
231
|
+
/** The share autofit shrank it to, when it did. */
|
|
232
|
+
scale?: number;
|
|
233
|
+
/** Its first paragraph's alignment: the line it is aligned by. */
|
|
234
|
+
align?: "l" | "ctr" | "r" | "just";
|
|
235
|
+
/** A turned shape's box, glyphs and lines measured unturned, in its own frame: what its text overflowing is judged by. */
|
|
236
|
+
own?: {
|
|
237
|
+
box: Box;
|
|
238
|
+
glyphs: Box | null;
|
|
239
|
+
lines: Box[];
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/** A deck's shape as drawn on its slide. */
|
|
243
|
+
export interface DeckShapeLayout {
|
|
244
|
+
name: string;
|
|
245
|
+
/** placeholder, textbox, picture, movie, autoshape, line, component. */
|
|
246
|
+
kind: string;
|
|
247
|
+
/** Where it comes from: its master's or layout's own, or the slide's (placeholders are the slide's). */
|
|
248
|
+
level: "master" | "layout" | "slide";
|
|
249
|
+
placeholder?: string;
|
|
250
|
+
/** Its frame as set, in the slide's pixels. */
|
|
251
|
+
frame: Box;
|
|
252
|
+
/** Its box as drawn (a shape that fits its text has grown to it). */
|
|
253
|
+
box: Box;
|
|
254
|
+
/** It hides what is under it: filled, a picture, a movie. */
|
|
255
|
+
opaque: boolean;
|
|
256
|
+
/** Not drawn at this moment: its entrance is to come, or its exit has been. */
|
|
257
|
+
hidden?: boolean;
|
|
258
|
+
text?: DeckTextLayout;
|
|
259
|
+
/** A table's rows, each as tall as it is set and as it is drawn, in the slide's pixels. */
|
|
260
|
+
rows?: {
|
|
261
|
+
set: number;
|
|
262
|
+
drawn: number;
|
|
263
|
+
}[];
|
|
264
|
+
/** A chart's numbers: how many, how far they run, and the project file they came from. */
|
|
265
|
+
chart?: {
|
|
266
|
+
type: string;
|
|
267
|
+
categories: number;
|
|
268
|
+
series: number;
|
|
269
|
+
low?: number;
|
|
270
|
+
high?: number;
|
|
271
|
+
source?: string;
|
|
272
|
+
};
|
|
273
|
+
picture?: {
|
|
274
|
+
/** The file's own pixels. */
|
|
275
|
+
source: [width: number, height: number];
|
|
276
|
+
/** The part of them shown (its crop). */
|
|
277
|
+
shown: [width: number, height: number];
|
|
278
|
+
};
|
|
279
|
+
/** A line's two ends, where it begins and where it ends: a connector's, or a freeform's whose outline is left open. */
|
|
280
|
+
ends?: [DeckLineEnd, DeckLineEnd];
|
|
281
|
+
}
|
|
282
|
+
/** An end of a deck's line, in the slide's pixels. */
|
|
283
|
+
export interface DeckLineEnd {
|
|
284
|
+
at: [x: number, y: number];
|
|
285
|
+
/** What it has: `none`, `triangle`, `arrow`, `stealth`, `diamond`, `oval`. */
|
|
286
|
+
head: string;
|
|
287
|
+
/** The shape it is glued to, by name. */
|
|
288
|
+
glued?: string;
|
|
289
|
+
}
|
|
290
|
+
/** A deck's slide as drawn at a still: one of its steps'. */
|
|
291
|
+
export interface DeckSlideLayout {
|
|
292
|
+
slide: string;
|
|
293
|
+
/** How many steps the slide has, so that all of them measured can be told. */
|
|
294
|
+
steps?: number;
|
|
295
|
+
/** Its still, in the deck's seconds. */
|
|
296
|
+
t: number;
|
|
297
|
+
layout: string;
|
|
298
|
+
hidden: boolean;
|
|
299
|
+
notes?: string;
|
|
300
|
+
/** Back to front, as drawn; an empty placeholder is not drawn. */
|
|
301
|
+
shapes: DeckShapeLayout[];
|
|
302
|
+
}
|
|
303
|
+
/** A deck as drawn, measured for its facts. */
|
|
304
|
+
export interface DeckLayout {
|
|
305
|
+
/** The slide's pixels per point. */
|
|
306
|
+
pxPerPt: number;
|
|
307
|
+
/**
|
|
308
|
+
* The fonts its PowerPoint file names: its theme's, and those its text
|
|
309
|
+
* names itself; `drawn`, whether the stage has the font (a face the page
|
|
310
|
+
* declares, or one on this computer) or draws its text in another.
|
|
311
|
+
*/
|
|
312
|
+
fonts?: {
|
|
313
|
+
name: string;
|
|
314
|
+
where: "theme" | "text";
|
|
315
|
+
drawn?: boolean;
|
|
316
|
+
}[];
|
|
317
|
+
slides: DeckSlideLayout[];
|
|
318
|
+
}
|
|
319
|
+
/** A picture of the graphics (an `<img>`) at its largest enlargement in a part. */
|
|
320
|
+
export interface PictureScale {
|
|
321
|
+
part: string;
|
|
322
|
+
/** The layer it is in (its component's name). */
|
|
323
|
+
layer: string;
|
|
324
|
+
/** Its file as the page loads it: a path, or "inline" for a data URL. */
|
|
325
|
+
source: string;
|
|
326
|
+
/** Its own pixels. */
|
|
327
|
+
natural: [width: number, height: number];
|
|
328
|
+
/** The output pixels its picture covers then (by its object-fit), and output pixels per its pixel, the larger of the two ways. */
|
|
329
|
+
drawn: [width: number, height: number];
|
|
330
|
+
scale: number;
|
|
331
|
+
/** Film seconds of its largest. */
|
|
332
|
+
t: number;
|
|
333
|
+
}
|
|
334
|
+
export interface LayoutReport {
|
|
335
|
+
width: number;
|
|
336
|
+
height: number;
|
|
337
|
+
/** A deck's slides as drawn (a deck's measure() only). */
|
|
338
|
+
deck?: DeckLayout;
|
|
339
|
+
/** The format's covered edges, in pixels. */
|
|
340
|
+
safe: SafeZone;
|
|
341
|
+
moments: LayoutMoment[];
|
|
342
|
+
footage: FootageScale[];
|
|
343
|
+
/** Each graphics picture's largest enlargement, by part (a video's measure()). */
|
|
344
|
+
pictures?: PictureScale[];
|
|
345
|
+
/** How long each text block can be read (a video measured at its default moments). */
|
|
346
|
+
reading?: {
|
|
347
|
+
options: ReadOptions;
|
|
348
|
+
texts: TextTime[];
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/** The words and characters of a text: word-like segments as the language breaks them, and characters that are not spaces. */
|
|
352
|
+
export declare function countWords(text: string): {
|
|
353
|
+
words: number;
|
|
354
|
+
chars: number;
|
|
355
|
+
};
|
|
356
|
+
/** The pixels two boxes both cover. */
|
|
357
|
+
export declare function overlapArea(a: Box | PixelRect, b: Box | PixelRect): number;
|
|
358
|
+
/** How two boxes overlap: the area, and its share of the smaller box. */
|
|
359
|
+
export declare function boxOverlap(a: Box | PixelRect, b: Box | PixelRect): {
|
|
360
|
+
area: number;
|
|
361
|
+
share: number;
|
|
362
|
+
} | undefined;
|
|
363
|
+
/**
|
|
364
|
+
* How far a box reaches into the covered edges of a frame W × H: pixels
|
|
365
|
+
* in from each covered edge's line, for the edges it crosses.
|
|
366
|
+
*/
|
|
367
|
+
export declare function safeEdges(b: Box | PixelRect, safe: SafeZone, W: number, H: number): SafeOverlap["edges"];
|
|
368
|
+
/**
|
|
369
|
+
* How far a box reaches past the edges of another: pixels out per edge it
|
|
370
|
+
* crosses, whole pixels (under one is none).
|
|
371
|
+
*/
|
|
372
|
+
export declare function outsideEdges(b: Box | PixelRect, inside: Box | PixelRect): TextOutside["edges"];
|
|
373
|
+
/**
|
|
374
|
+
* How much of a text's glyphs lies outside a frame W × H: `glyphs` are the
|
|
375
|
+
* boxes of what shows of them (a box per line), in the frame's pixels. The
|
|
376
|
+
* pixels outside, their share of all the glyphs' pixels, and per edge of
|
|
377
|
+
* the frame they cross, how far past it they reach (whole pixels: under
|
|
378
|
+
* one is none). Undefined when they cross no edge, or have no pixels.
|
|
379
|
+
*/
|
|
380
|
+
export declare function offFrame(glyphs: readonly (Box | PixelRect)[], W: number, H: number): Omit<TextOffFrame, "text"> | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* The facts of one moment: overlaps between text blocks (of different
|
|
383
|
+
* layers, and of the same layer), blocks reaching outside a box they are
|
|
384
|
+
* drawn inside, text over the face and in the covered edges.
|
|
385
|
+
*/
|
|
386
|
+
export declare function measureMoment(o: {
|
|
387
|
+
t: number;
|
|
388
|
+
part: string;
|
|
389
|
+
texts: MeasuredText[];
|
|
390
|
+
face?: Box;
|
|
391
|
+
safe: SafeZone;
|
|
392
|
+
width: number;
|
|
393
|
+
height: number;
|
|
394
|
+
/** Which layer each text belongs to (an index): blocks of one layer and of two are told apart. */
|
|
395
|
+
owner: number[];
|
|
396
|
+
/**
|
|
397
|
+
* Per text, the boxes it is drawn inside, nearest first (absent: none
|
|
398
|
+
* measured). A block is compared with each in turn, and the nearest it
|
|
399
|
+
* reaches out of is reported.
|
|
400
|
+
*/
|
|
401
|
+
containers?: (readonly TextContainer[] | undefined)[];
|
|
402
|
+
/**
|
|
403
|
+
* Per text, the box of what shows of its glyphs (MeasuredText.ink; absent:
|
|
404
|
+
* its box). Blocks of one layer are compared by it, and so is a block
|
|
405
|
+
* with the boxes it is drawn inside.
|
|
406
|
+
*/
|
|
407
|
+
seen?: (Box | undefined)[];
|
|
408
|
+
/**
|
|
409
|
+
* Per text, the boxes of what shows of its glyphs, one per line, the
|
|
410
|
+
* frame's own edges not clipping them (absent: its `seen` box, else its
|
|
411
|
+
* box). The frame's edges are measured against them.
|
|
412
|
+
*/
|
|
413
|
+
glyphs?: (readonly Box[] | undefined)[];
|
|
414
|
+
}): LayoutMoment;
|
|
415
|
+
/** One thing on screen at one frame: a text block, a painted box, a picture. */
|
|
416
|
+
export interface TrackSample {
|
|
417
|
+
/** Film seconds. */
|
|
418
|
+
t: number;
|
|
419
|
+
/** Its box in the frame's pixels; absent while it does not show. */
|
|
420
|
+
box?: Box;
|
|
421
|
+
/** 0 while it does not show. */
|
|
422
|
+
opacity: number;
|
|
423
|
+
}
|
|
424
|
+
/** A thing followed frame by frame through a part. */
|
|
425
|
+
export interface Track {
|
|
426
|
+
part: string;
|
|
427
|
+
layer: string;
|
|
428
|
+
/** What it is: `text "…"`, `box`, or its tag for a picture (`img`, `svg`, `canvas`, `video`). */
|
|
429
|
+
what: string;
|
|
430
|
+
/** Where it is in the layer, as a selector. */
|
|
431
|
+
selector: string;
|
|
432
|
+
/** Its own `data-ak` name, when it has one (`named(el, name)`). */
|
|
433
|
+
name?: string;
|
|
434
|
+
/** One per frame looked at, in order. */
|
|
435
|
+
samples: TrackSample[];
|
|
436
|
+
}
|
|
437
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
const l=t=>Math.max(0,t[2])*Math.max(0,t[3]),d=t=>Math.round(t*1e3)/1e3;export const READ_DEFAULTS={every:.2,opacity:.9,shown:.9,phone:[390,844]};export function phoneScale(t,e){return Math.min(e[0]/t[0],e[1]/t[1])}export function countWords(t){let e=0;for(const o of new Intl.Segmenter(void 0,{granularity:"word"}).segment(t))o.isWordLike&&e++;let i=0;for(const o of new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t))o.segment.trim()!==""&&i++;return{words:e,chars:i}}export function overlapArea(t,e){const i=Math.min(t[0]+t[2],e[0]+e[2])-Math.max(t[0],e[0]),o=Math.min(t[1]+t[3],e[1]+e[3])-Math.max(t[1],e[1]);return i>0&&o>0?i*o:0}export function boxOverlap(t,e){const i=overlapArea(t,e);if(i<=0)return;const o=Math.min(l(t),l(e));return{area:Math.round(i),share:o>0?d(i/o):0}}export function safeEdges(t,e,i,o){const[u,h,c,x]=t;return[["top",e.top>0?e.top-h:0],["bottom",e.bottom>0?h+x-(o-e.bottom):0],["left",e.left>0?e.left-u:0],["right",e.right>0?u+c-(i-e.right):0]].filter(([,n])=>n>=1).map(([n,r])=>({side:n,px:Math.round(r)}))}export function outsideEdges(t,e){return[["top",e[1]-t[1]],["bottom",t[1]+t[3]-(e[1]+e[3])],["left",e[0]-t[0]],["right",t[0]+t[2]-(e[0]+e[2])]].filter(([,o])=>o>=1).map(([o,u])=>({side:o,px:Math.round(u)}))}export function offFrame(t,e,i){let o=0,u=0;const h={top:0,bottom:0,left:0,right:0};let[c,x,m,n]=[1/0,1/0,-1/0,-1/0];for(const s of t)s[2]<=0||s[3]<=0||(c=Math.min(c,s[0]),x=Math.min(x,s[1]),m=Math.max(m,s[0]+s[2]),n=Math.max(n,s[1]+s[3]),o+=l(s),u+=overlapArea(s,[0,0,e,i]),h.top=Math.max(h.top,-s[1]),h.bottom=Math.max(h.bottom,s[1]+s[3]-i),h.left=Math.max(h.left,-s[0]),h.right=Math.max(h.right,s[0]+s[2]-e));if(o<=0)return;const r=["top","bottom","left","right"].filter(s=>h[s]>=1).map(s=>({side:s,px:Math.round(h[s])}));if(r.length===0)return;const a=Math.max(0,o-u),f=Math.round(c),p=Math.round(x);return{outside:Math.round(a),share:d(a/o),edges:r,glyphs:[f,p,Math.round(m)-f,Math.round(n)-p]}}export function measureMoment(t){const e=[],i=[],o=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 a=t.texts[n],f=t.texts[r];if(!a||!f)continue;if(t.owner[n]===t.owner[r]){const s=o(n),g=o(r),M=s&&g?boxOverlap(s,g):void 0;M&&i.push({a:n,b:r,...M});continue}const p=boxOverlap(a.box,f.box);p&&e.push({a:n,b:r,...p})}const u=[];t.texts.forEach((n,r)=>{const a=o(r);if(!(!a||n.viewport))for(const f of t.containers?.[r]??[]){const p=outsideEdges(a,f.box);if(p.length!==0){u.push({text:r,container:f,edges:p});break}}});const h=[],c=t.face;c&&t.texts.forEach((n,r)=>{const a=overlapArea(n.box,c);a<=0||h.push({text:r,area:Math.round(a),ofText:d(a/Math.max(1,l(n.box))),ofFace:d(a/Math.max(1,l(c)))})});const x=[];t.texts.forEach((n,r)=>{if(n.viewport)return;const a=safeEdges(n.box,t.safe,t.width,t.height);a.length>0&&x.push({text:r,edges:a})});const m=[];return t.texts.forEach((n,r)=>{if(n.viewport)return;const a=o(r),f=offFrame(t.glyphs?.[r]??(a?[a]:[]),t.width,t.height);f&&m.push({text:r,...f})}),{t:t.t,part:t.part,texts:t.texts,...c?{face:c}:{},overlaps:e,ownOverlaps:i,outside:u,faceOverlaps:h,safeOverlaps:x,offFrame:m}}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { MediaGen } from "./gen.js";
|
|
2
|
-
import type { Box } from "
|
|
3
|
-
import type { Envelope, UnheardSound } from "./voice.js";
|
|
2
|
+
import type { Box } from "@allyhub/diagnostics";
|
|
4
3
|
export type MediaKind = "image" | "audio" | "video" | "font"
|
|
5
4
|
/** A 3D model and its parts: glTF, GLB, a glTF's buffers, KTX2 textures. */
|
|
6
5
|
| "model"
|
|
@@ -11,11 +10,9 @@ export interface Word {
|
|
|
11
10
|
start: number;
|
|
12
11
|
end: number;
|
|
13
12
|
/**
|
|
14
|
-
* How sure the recognizer was of the word, 0 to 1
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* exponentiated). Absent when the recognizer gave none, or the file was
|
|
18
|
-
* written another way.
|
|
13
|
+
* How sure the recognizer was of the word, 0 to 1, when it says.
|
|
14
|
+
* Absent when the recognizer gave none (AllyHub's cloud gives none), or
|
|
15
|
+
* the file was written another way.
|
|
19
16
|
*/
|
|
20
17
|
confidence?: number;
|
|
21
18
|
}
|
|
@@ -68,13 +65,13 @@ export interface MediaInfo {
|
|
|
68
65
|
matte?: boolean;
|
|
69
66
|
/**
|
|
70
67
|
* A take (audio or video with words): its level every 10 ms, which cut
|
|
71
|
-
* points snap to
|
|
68
|
+
* points snap to, measured by the build and kept in the media
|
|
72
69
|
* index.
|
|
73
70
|
*/
|
|
74
71
|
envelope?: Envelope;
|
|
75
72
|
/** A take: the median level of its words, dBFS. */
|
|
76
73
|
speechDb?: number;
|
|
77
|
-
/** A take: what is heard between its words
|
|
74
|
+
/** A take: what is heard between its words, reported, never removed on its own. */
|
|
78
75
|
sounds?: UnheardSound[];
|
|
79
76
|
/**
|
|
80
77
|
* The file's provenance, from the `<file>.gen.json` beside it (gen.ts):
|
|
@@ -223,4 +220,37 @@ export interface ModelInfo {
|
|
|
223
220
|
/** Why the contents (bounds, counts, materials, textures, animations) were not measured. */
|
|
224
221
|
contentsMissing?: string;
|
|
225
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* A media file the media index should learn about: each analysis asked of
|
|
225
|
+
* it (a `mediaAnalyses` contribution's id: `faces` for its face track,
|
|
226
|
+
* `matte` for its person matte) a key of its own, set to true.
|
|
227
|
+
*/
|
|
228
|
+
export interface IndexNeed {
|
|
229
|
+
/** The file, from the project's folder. */
|
|
230
|
+
file: string;
|
|
231
|
+
[analysis: string]: string | true;
|
|
232
|
+
}
|
|
233
|
+
/** A take's level per frame as the media value carries it: base64 of −dB per 10 ms. */
|
|
234
|
+
export type Envelope = string;
|
|
235
|
+
/**
|
|
236
|
+
* A stretch between words where the take is not silent: something said
|
|
237
|
+
* that is not a word (a filler, a hum, a false start's sound) or a breath.
|
|
238
|
+
* Seconds of the file.
|
|
239
|
+
*/
|
|
240
|
+
export interface UnheardSound {
|
|
241
|
+
start: number;
|
|
242
|
+
end: number;
|
|
243
|
+
/** Its loudest frame, dB against the take's speech level (the median frame inside words). */
|
|
244
|
+
peak: number;
|
|
245
|
+
/** Its mean frame level, dB against the speech level. */
|
|
246
|
+
mean: number;
|
|
247
|
+
/** The share of its frames that are voiced (periodic, like a vowel or a hum), 0 to 1. */
|
|
248
|
+
voiced: number;
|
|
249
|
+
/** The index of the word before it (−1: before the first word). */
|
|
250
|
+
after: number;
|
|
251
|
+
}
|
|
252
|
+
/** Marks a media value (an import or ctx.asset), whose url the runtime resolves. */
|
|
253
|
+
export declare const MEDIA_BRAND = "__allyhubMedia";
|
|
254
|
+
/** The audio file of a stem among the project's media (any audio extension). */
|
|
255
|
+
export declare function mediaByStem(media: Readonly<Record<string, MediaInfo>>, stem: string): MediaInfo | undefined;
|
|
226
256
|
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{CACHE_DIR as m}from"@allyhub/formats";export function asUrlString(e){return Object.prototype.hasOwnProperty.call(e,"toString")||Object.defineProperty(e,"toString",{value(){return this.url},enumerable:!1,configurable:!0,writable:!0}),e}export const INDEX_DIR=`${m}/index`;export function indexPath(e,n){return`${INDEX_DIR}/${e}/${n}`}function c(e,n,t){const o=e[0],i=e.at(-1);if(!o||!i)return;const s=1/Math.max(1,n);if(t<o.t-s||t>i.t+s)return;if(t<=o.t)return o.box;if(t>=i.t)return i.box;let a=0,u=e.length-1;for(;u-a>1;){const r=a+u>>1;(e[r]?.t??0)<=t?a=r:u=r}const f=e[a]??o,d=e[u]??i,l=d.t===f.t?0:(t-f.t)/(d.t-f.t);return[0,1,2,3].map(r=>(f.box[r]??0)+((d.box[r]??0)-(f.box[r]??0))*l)}export function faceAt(e,n,t=e.speaker){if(t===void 0)return;const o=e.faces.find(i=>i.id===t);return o?c(o.samples,e.fps,n):void 0}export function facesAt(e,n){return e.faces.flatMap(t=>{const o=c(t.samples,e.fps,n);return o?[{id:t.id,box:o}]:[]})}export function hasFace(e,n){return e.faces.some(t=>t.id===n)}const p={png:"image",jpg:"image",jpeg:"image",webp:"image",gif:"image",svg:"image",avif:"image",mp3:"audio",wav:"audio",m4a:"audio",ogg:"audio",aac:"audio",flac:"audio",mp4:"video",webm:"video",mov:"video",m4v:"video",qt:"video",woff2:"font",woff:"font",ttf:"font",otf:"font",glb:"model",gltf:"model",bin:"model",ktx2:"model",hdr:"environment",exr:"environment"};export function mediaKindOf(e){const n=/\.([A-Za-z0-9]+)$/.exec(e)?.[1]?.toLowerCase();return n===void 0?void 0:p[n]}export const MEDIA_EXTENSIONS=Object.keys(p);export function repoPath(e,n){return pathIn(e.split("/").slice(0,-1).join("/"),n)}export function pathIn(e,n){const t=n.startsWith("/")||e===""?[]:e.split("/");for(const o of n.split("/"))if(!(o==="."||o===""))if(o===".."){if(t.length===0)return;t.pop()}else t.push(o);return t.join("/")}
|
|
2
|
+
import{CACHE_DIR as m}from"@allyhub/formats";export function asUrlString(e){return Object.prototype.hasOwnProperty.call(e,"toString")||Object.defineProperty(e,"toString",{value(){return this.url},enumerable:!1,configurable:!0,writable:!0}),e}export const INDEX_DIR=`${m}/index`;export function indexPath(e,n){return`${INDEX_DIR}/${e}/${n}`}function c(e,n,t){const o=e[0],i=e.at(-1);if(!o||!i)return;const s=1/Math.max(1,n);if(t<o.t-s||t>i.t+s)return;if(t<=o.t)return o.box;if(t>=i.t)return i.box;let a=0,u=e.length-1;for(;u-a>1;){const r=a+u>>1;(e[r]?.t??0)<=t?a=r:u=r}const f=e[a]??o,d=e[u]??i,l=d.t===f.t?0:(t-f.t)/(d.t-f.t);return[0,1,2,3].map(r=>(f.box[r]??0)+((d.box[r]??0)-(f.box[r]??0))*l)}export function faceAt(e,n,t=e.speaker){if(t===void 0)return;const o=e.faces.find(i=>i.id===t);return o?c(o.samples,e.fps,n):void 0}export function facesAt(e,n){return e.faces.flatMap(t=>{const o=c(t.samples,e.fps,n);return o?[{id:t.id,box:o}]:[]})}export function hasFace(e,n){return e.faces.some(t=>t.id===n)}const p={png:"image",jpg:"image",jpeg:"image",webp:"image",gif:"image",svg:"image",avif:"image",mp3:"audio",wav:"audio",m4a:"audio",ogg:"audio",aac:"audio",flac:"audio",mp4:"video",webm:"video",mov:"video",m4v:"video",qt:"video",woff2:"font",woff:"font",ttf:"font",otf:"font",glb:"model",gltf:"model",bin:"model",ktx2:"model",hdr:"environment",exr:"environment"};export function mediaKindOf(e){const n=/\.([A-Za-z0-9]+)$/.exec(e)?.[1]?.toLowerCase();return n===void 0?void 0:p[n]}export const MEDIA_EXTENSIONS=Object.keys(p);export function repoPath(e,n){return pathIn(e.split("/").slice(0,-1).join("/"),n)}export function pathIn(e,n){const t=n.startsWith("/")||e===""?[]:e.split("/");for(const o of n.split("/"))if(!(o==="."||o===""))if(o===".."){if(t.length===0)return;t.pop()}else t.push(o);return t.join("/")}export const MEDIA_BRAND="__allyhubMedia";export function mediaByStem(e,n){for(const[t,o]of Object.entries(e))if(o.kind==="audio"&&t.startsWith(`${n}.`)){const i=t.slice(n.length+1);if(!i.includes("/")&&!i.includes("."))return o}}
|
|
@@ -84,5 +84,11 @@ export declare function messageList(read: (key: string) => string | undefined, a
|
|
|
84
84
|
export declare function orderLocales(locales: Iterable<string>, preferred?: readonly string[]): string[];
|
|
85
85
|
/** A language's own name ("简体中文"); the code itself when we have none. */
|
|
86
86
|
export declare function languageName(lang: string): string;
|
|
87
|
+
export interface MessageHint {
|
|
88
|
+
/** Length budget in characters; a hint for whoever writes the text. */
|
|
89
|
+
max?: number;
|
|
90
|
+
/** A note for whoever edits the text. */
|
|
91
|
+
note?: string;
|
|
92
|
+
}
|
|
87
93
|
export {};
|
|
88
94
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a piece is the one a command names, or under it as a folder of
|
|
3
|
+
* items: `tr` takes `tr` and `tr/fade`, not `trailer`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const pieceIn: (id: string, name: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* What a command's item names, as an item's id: written as one, or as a
|
|
8
|
+
* path to the item's file from the project (./launch/teaser.ts), its
|
|
9
|
+
* extension left out (`@allyhub/formats`' itemIdOf).
|
|
10
|
+
*/
|
|
11
|
+
export declare function pieceName(name: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether a command's item names a piece, by its id or by its item's id
|
|
14
|
+
* (an id of its own does not hide its item's), as a path to the item's
|
|
15
|
+
* file, or as a folder of items above any of these.
|
|
16
|
+
*/
|
|
17
|
+
export declare const pieceNamed: (p: {
|
|
18
|
+
id: string;
|
|
19
|
+
path?: string;
|
|
20
|
+
}, name: string) => boolean;
|
|
21
|
+
/** Whether a command's item names exactly this piece, by its id, its item's id or a path to its file. */
|
|
22
|
+
export declare const pieceIs: (p: {
|
|
23
|
+
id: string;
|
|
24
|
+
path?: string;
|
|
25
|
+
}, name: string) => boolean;
|
|
26
|
+
//# sourceMappingURL=names.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{itemIdOf as o}from"@allyhub/formats";export const pieceIn=(e,t)=>e===t||e.startsWith(`${t}/`);export function pieceName(e){return o(e.replaceAll("\\","/").replace(/^\.\//u,"").replace(/\/+$/u,""))}function c(e){const t=e.replaceAll("\\","/").replace(/^\.\//u,"").replace(/\/+$/u,""),r=pieceName(t);return r===t?[t]:[t,r]}export const pieceNamed=(e,t)=>c(t).some(r=>pieceIn(e.id,r)||e.path!==void 0&&pieceIn(e.path,r)),pieceIs=(e,t)=>c(t).some(r=>e.id===r||e.path===r);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ConsoleLog, type ConsoleWhere } from "../console.js";
|
|
2
|
+
/** Wraps the console's methods, once per page, before piece code loads. */
|
|
3
|
+
export declare function installConsole(): void;
|
|
4
|
+
/**
|
|
5
|
+
* Starts recording for one output: earlier messages go. `limit` messages
|
|
6
|
+
* are kept at most; `passThrough` also prints to the browser's own console
|
|
7
|
+
* (the preview page, where a person may open the developer tools).
|
|
8
|
+
*/
|
|
9
|
+
export declare function resetConsole(opts: {
|
|
10
|
+
limit?: number;
|
|
11
|
+
passThrough: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
/** The parts in order, for sorting the messages. */
|
|
14
|
+
export declare function consoleParts(keys: readonly string[]): void;
|
|
15
|
+
/** Runs piece code with its place: what it prints is recorded there. */
|
|
16
|
+
export declare function consoleAt<T>(at: ConsoleWhere, fn: () => T): T;
|
|
17
|
+
/** consoleAt for piece code that is awaited (a module, an output's function). */
|
|
18
|
+
export declare function consoleAtAsync<T>(at: ConsoleWhere, fn: () => Promise<T>): Promise<T>;
|
|
19
|
+
/** What was printed since the output started loading. */
|
|
20
|
+
export declare function consoleLog(): ConsoleLog;
|
|
21
|
+
//# sourceMappingURL=console.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{CONSOLE_LEVELS as f,CONSOLE_LIMIT as u,ConsoleCollector as c,consoleText as p}from"../console.js";let e={phase:"other"},r=new c,i=!0,l=[],a=!1;export function installConsole(){if(a)return;a=!0;const o=console;for(const t of f){const n=o[t]?.bind(console);o[t]=(...s)=>{try{r.add({level:t,text:p(s),...e})}catch{}i&&n?.(...s)}}}export function resetConsole(o){r=new c(o.limit??u),i=o.passThrough,l=[],e={phase:"other"}}export function consoleParts(o){l=o}export function consoleAt(o,t){const n=e;e=o;try{return t()}finally{e=n}}export async function consoleAtAsync(o,t){const n=e;e=o;try{return await t()}finally{e=n}}export function consoleLog(){return r.log(l)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{touches as T}from"@allyhub/formats";import{LAYER_NAME as C}from"../layer.js";const A=3,E=120,m=e=>e.width*e.height;function S(e){if(e instanceof HTMLImageElement||e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGElement||d(e)!=="")return!0;const o=getComputedStyle(e);return o.backgroundColor!=="transparent"&&!/^rgba\(.*,\s*0\)$/u.test(o.backgroundColor)||o.backgroundImage!=="none"||parseFloat(o.borderTopWidth)+parseFloat(o.borderRightWidth)+parseFloat(o.borderBottomWidth)+parseFloat(o.borderLeftWidth)>0}const b=e=>e.closest("[data-ak-piece]")?.dataset.akPiece;function d(e){return[...e.childNodes].filter(o=>o.nodeType===Node.TEXT_NODE).map(o=>o.textContent).join("").trim()}export function locateLayers(e,o){const c=t=>t.width>0&&t.height>0&&T(o,t),u=[],l=[];for(const t of e.querySelectorAll(".ak-layer")){if(!t.checkVisibility({opacityProperty:!0,visibilityProperty:!0})||!c(t.getBoundingClientRect())||![t,...t.querySelectorAll("*")].filter(i=>c(i.getBoundingClientRect())).some(S))continue;const r=t.getAttribute(C)??void 0,a=b(t),p={part:t.closest(".ak-part")?.dataset.key??"",layer:t.dataset.component??"",...r===void 0||r===""?{}:{key:r},...a===void 0?{}:{piece:a}};let n;for(const i of[t,...t.querySelectorAll("*")]){const h=i.getBoundingClientRect();!c(h)||d(i)===""&&!i.hasAttribute("data-ak")||(!n||m(h)<m(n.getBoundingClientRect()))&&(n=i)}if(!n){l.push(p);continue}const g=n.closest("[data-ak]")?.getAttribute("data-ak"),y=d(n).slice(0,E);u.push({...p,...g?{name:g}:{},...y===""?{}:{text:y}})}const f=[];for(const t of e.querySelectorAll(".ak-footage")){const s=t.dataset.akFile,r=(t.querySelector("video")??t).checkVisibility({opacityProperty:!0,visibilityProperty:!0});if(s===void 0||!r||!c(t.getBoundingClientRect()))continue;const a=b(t);f.push({part:t.dataset.akPart??"",layer:"footage",file:s,...a===void 0?{}:{piece:a}})}return[...u,...f,...l].slice(0,A)}
|