@allyhub/sdk 0.8.0 → 0.9.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 +11 -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 +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/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 +20 -82
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -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 +46 -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 +421 -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 +285 -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 +139 -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/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 +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
- 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 +22 -9
- 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 +5 -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 +273 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
- 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 +1 -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/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/server.d.ts +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/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 +3 -4
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -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/sdk.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- 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 +44 -4
- 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/fact.d.ts +208 -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 +19 -2
- 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 +17 -10
- 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 +22 -430
- 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 +6 -12
- 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/{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 +8 -6
- package/docs/batches.md +5 -5
- package/docs/contract.md +2 -2
- package/docs/defaults.md +278 -20
- package/docs/docs.md +77 -63
- 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 +11 -11
- package/docs/sheets.md +26 -25
- package/docs/slides.md +73 -65
- 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/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/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
- /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
- /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** How a picture fills its box: CSS's `object-fit`. */
|
|
2
|
+
export type PictureFit = "cover" | "contain" | "fill" | "none";
|
|
3
|
+
/** A point of a picture as shares of it, x then y: CSS's `object-position` in percentages. */
|
|
4
|
+
export type PicturePoint = readonly [x: number, y: number];
|
|
5
|
+
/** A rectangle as shares of what it is in: x, y, width, height. */
|
|
6
|
+
export type ShareRect = readonly [x: number, y: number, w: number, h: number];
|
|
7
|
+
/** A rectangle in a box's pixels, not rounded: x, y, width, height. */
|
|
8
|
+
export type BoxRect = [x: number, y: number, w: number, h: number];
|
|
9
|
+
/** The defaults of a picture's geometry, each an option of picture(). */
|
|
10
|
+
export declare const PICTURE_DEFAULTS: {
|
|
11
|
+
/** How it fills its box: `fit`. */
|
|
12
|
+
readonly fit: PictureFit;
|
|
13
|
+
/** The point of the picture at the same point of the box: `position` (CSS's `50% 50%`). */
|
|
14
|
+
readonly position: PicturePoint;
|
|
15
|
+
};
|
|
16
|
+
export interface PictureGeometry {
|
|
17
|
+
/** The source picture's pixels. */
|
|
18
|
+
source: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
/** The box it is drawn in, in its pixels. */
|
|
23
|
+
box: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
fit?: PictureFit | undefined;
|
|
28
|
+
position?: PicturePoint | undefined;
|
|
29
|
+
/** The part of the source fitted to the box (shares of the source); default all of it. */
|
|
30
|
+
crop?: ShareRect | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface PicturePlacement {
|
|
33
|
+
/** Where the whole source is drawn, in the box's pixels: it may reach past the box. */
|
|
34
|
+
whole: BoxRect;
|
|
35
|
+
/** What shows: the crop as drawn, cut at the box, in the box's pixels. */
|
|
36
|
+
shown: BoxRect;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Places a picture in its box as CSS does an `<img>` with `object-fit` and
|
|
40
|
+
* `object-position`, its crop fitted as if it were the whole picture.
|
|
41
|
+
*/
|
|
42
|
+
export declare function placePicture(g: PictureGeometry): PicturePlacement;
|
|
43
|
+
/**
|
|
44
|
+
* A picture's crop as PowerPoint keeps it (`a:srcRect`): the shares cut
|
|
45
|
+
* from each side of the source so that what is left, stretched to the
|
|
46
|
+
* frame, is the picture placed in it. A negative share is space beside the
|
|
47
|
+
* picture inside the frame, as Crop to Fit leaves.
|
|
48
|
+
*/
|
|
49
|
+
export interface SourceRect {
|
|
50
|
+
left: number;
|
|
51
|
+
top: number;
|
|
52
|
+
right: number;
|
|
53
|
+
bottom: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The `a:srcRect` that draws a picture as placePicture places it in a
|
|
57
|
+
* frame (`box`): Crop to Fill is `fit: "cover"`, Crop to Fit
|
|
58
|
+
* `fit: "contain"`, each at `position`. A crop given is the part of the
|
|
59
|
+
* source fitted. Shares to a ten-thousandth.
|
|
60
|
+
*/
|
|
61
|
+
export declare function sourceRectOf(g: PictureGeometry): SourceRect;
|
|
62
|
+
//# sourceMappingURL=picture.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const PICTURE_DEFAULTS={fit:"cover",position:[.5,.5]};const k=t=>Math.min(Math.max(t,0),1);function O(t){if(!t)return[0,0,1,1];const o=k(t[0]),n=k(t[1]);return[o,n,Math.max(1e-4,Math.min(t[2],1-o)),Math.max(1e-4,Math.min(t[3],1-n))]}export function placePicture(t){const o=t.fit??PICTURE_DEFAULTS.fit,[n,x]=t.position??PICTURE_DEFAULTS.position,c=Math.max(1,t.source.width),h=Math.max(1,t.source.height),s=Math.max(0,t.box.width),a=Math.max(0,t.box.height),m=O(t.crop),r=m[2]*c,M=m[3]*h;let e,i;if(o==="fill")e=s/r,i=a/M;else if(o==="none")e=1,i=1;else{const y=o==="cover"?Math.max(s/r,a/M):Math.min(s/r,a/M);e=y,i=y}const w=r*e,l=M*i,p=(s-w)*n+0,u=(a-l)*x+0,_=[p-m[0]*c*e+0,u-m[1]*h*i+0,c*e,h*i],b=Math.max(0,p),d=Math.max(0,u),v=Math.min(s,p+w),E=Math.min(a,u+l);return{whole:_,shown:[b,d,Math.max(0,v-b),Math.max(0,E-d)]}}const f=t=>Math.round(t*1e4)/1e4||0;export function sourceRectOf(t){const{whole:o}=placePicture(t),[n,x,c,h]=o,s=Math.max(0,t.box.width),a=Math.max(0,t.box.height);return{left:f(-n/c),top:f(-x/h),right:f((n+c-s)/c),bottom:f((x+h-a)/h)}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Marks a piece made by video() or slides(). */
|
|
2
|
+
export declare const PIECE_BRAND = "__allyhubPiece";
|
|
3
|
+
/**
|
|
4
|
+
* An item's piece, as its entry module exports it (video(), slides()): its
|
|
5
|
+
* brand and its kind; the rest is its kind's own.
|
|
6
|
+
*/
|
|
7
|
+
export interface Piece {
|
|
8
|
+
readonly [PIECE_BRAND]: true;
|
|
9
|
+
readonly kind: string;
|
|
10
|
+
}
|
|
11
|
+
/** Whether a value is a piece (it carries PIECE_BRAND). */
|
|
12
|
+
export declare function isPiece(v: unknown): v is Piece;
|
|
13
|
+
/** The default message prefix of a piece id: `launch/film` → `launch.film`. */
|
|
14
|
+
export declare function messagePrefix(pieceId: string): string;
|
|
15
|
+
//# sourceMappingURL=piece.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const PIECE_BRAND="__allyhubPiece";export function isPiece(e){return typeof e=="object"&&e!==null&&PIECE_BRAND in e}export function messagePrefix(e){return e.replace(/\//g,".")}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type TextAnchor } from "./anchors.js";
|
|
2
1
|
import { type MessageValue, type MessagesFile, type VariantsMessage } from "./messages.js";
|
|
2
|
+
import type { TextAnchor } from "./source.js";
|
|
3
3
|
/** A text, a list of texts, or a group of them by name. */
|
|
4
4
|
export type ScriptText = MessageValue | ScriptText[] | {
|
|
5
5
|
[name: string]: ScriptText;
|
|
@@ -15,6 +15,11 @@ export interface ScriptPart {
|
|
|
15
15
|
/** What it shows, by name. */
|
|
16
16
|
screen?: Record<string, ScriptText>;
|
|
17
17
|
}
|
|
18
|
+
/** An image's board in its script: its layers' words by name. */
|
|
19
|
+
export interface ScriptBoard {
|
|
20
|
+
id: string;
|
|
21
|
+
text?: Record<string, ScriptText>;
|
|
22
|
+
}
|
|
18
23
|
/** A deck's slide in its script: its shapes' words by name, their alternative text, and its notes. */
|
|
19
24
|
export interface ScriptSlide {
|
|
20
25
|
id: string;
|
|
@@ -28,8 +33,10 @@ export interface ScriptFile {
|
|
|
28
33
|
text?: Record<string, ScriptText>;
|
|
29
34
|
/** In the order they are told; the piece's code decides the video's. */
|
|
30
35
|
parts: ScriptPart[];
|
|
31
|
-
/** A deck's slides; its slides
|
|
36
|
+
/** A deck's slides; its slides file decides their order. */
|
|
32
37
|
slides?: ScriptSlide[];
|
|
38
|
+
/** An image's boards; its code decides their order. */
|
|
39
|
+
boards?: ScriptBoard[];
|
|
33
40
|
}
|
|
34
41
|
/** Where a value sits in the script's document: ["parts", 0, "screen", "line1"]. */
|
|
35
42
|
export type ScriptPath = (string | number)[];
|
|
@@ -41,8 +48,6 @@ export interface ScriptKey {
|
|
|
41
48
|
/** The anchors of what a part says, by their place in the line as spoken. */
|
|
42
49
|
anchors?: TextAnchor[];
|
|
43
50
|
}
|
|
44
|
-
/** A script file's name: script.<locale>.yaml (or .yml). */
|
|
45
|
-
export declare const SCRIPT_FILE: RegExp;
|
|
46
51
|
/**
|
|
47
52
|
* A script from the value its YAML holds, or what is wrong with it, each
|
|
48
53
|
* with where. Numbers and booleans are not text: a line that is only
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{isSpoken as g}from"./messages.js";import{hasAnchors as O,hasSpans as S,readAnchors as j,spokenLine as w}from"./anchors.js";const k=/^[A-Za-z0-9_-]+$/,$=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),E=t=>t.length===0?"(root)":t.map((r,s)=>typeof r=="number"?`[${String(r)}]`:`${s?".":""}${r}`).join("");function _(t){const r=c=>Array.isArray(c)&&c.every(i=>typeof i=="string"),s=t.match;if(!$(s)||!Object.values(s).every(c=>typeof c=="string"))return"match must map each case to its text";const h=t.declarations??[],b=t.selectors??[];if(!r(h)||!r(b))return"declarations and selectors must be lists of strings";const x=Object.keys(t).filter(c=>!["declarations","selectors","match"].includes(c));return x.length>0?`unknown key ${x.join(", ")}`:{declarations:h,selectors:b,match:s}}function M(t){if(typeof t=="string")return t;if(g(t))return Object.keys(t).length===2?t:"has more than display and speak";if($(t)&&"match"in t)return _(t)}export function parseScript(t){const r=[],s=(e,n)=>{r.push(`${E(e)}: ${n}`)},h=(e,n)=>{const o=M(e);if(o===void 0||typeof o=="string"&&o!==e){s(n,typeof o=="string"?o:typeof e=="number"||typeof e=="boolean"?`${String(e)} is not text: put it in quotes`:"must be text, { display, speak }, or a plural or selection");return}return o},b=(e,n)=>{if(!$(e)){s(n,"must be names with their text");return}const o={};for(const[f,a]of Object.entries(e)){const u=x(a,[...n,f]);k.test(f)?u!==void 0&&(o[f]=u):s([...n,f],"a name has only letters, digits, _ and -")}return o},x=(e,n)=>{if(Array.isArray(e)){const o=e.map((f,a)=>x(f,[...n,a]));return o.every(f=>f!==void 0)?o:void 0}return $(e)&&!g(e)&&!("match"in e)?b(e,n):h(e,n)};if(t==null)return{script:{parts:[]}};if(!$(t))return{problems:["(root): must be title, text, parts, slides or boards"]};const c={parts:[]};for(const e of Object.keys(t))["title","text","parts","slides","boards"].includes(e)||s([e],"unknown key: a script has title, text, parts, slides and boards");if(t.title!==void 0&&(typeof t.title=="string"?c.title=t.title:s(["title"],"must be text")),t.text!==void 0){const e=b(t.text,["text"]);e&&(c.text=e)}const i=t.parts??[];if(!Array.isArray(i))s(["parts"],"must be a list of parts");else{const e=new Set;i.forEach((n,o)=>{const f=["parts",o];if(!$(n)){s(f,"must be a part: id, say, screen");return}for(const l of Object.keys(n))["id","say","screen"].includes(l)||s([...f,l],"unknown key: a part has id, say and screen");const a=n.id;if(typeof a!="string"||!k.test(a)){s([...f,"id"],"a part needs an id of letters, digits, _ and -");return}if(e.has(a)){s([...f,"id"],`two parts have the id ${a}`);return}e.add(a);const u={id:a};if(n.say!==void 0){const l=h(n.say,[...f,"say"]);if(g(l))s([...f,"say"],"is one line: write a piece that is shown one way and said another inside it, as <shown|said>");else if(l!==void 0){u.say=l;for(const m of L(l))s([...f,"say"],m)}}if(n.screen!==void 0){const l=b(n.screen,[...f,"screen"]);l&&(u.screen=l)}c.parts.push(u)})}const d=t.slides??[];if(!Array.isArray(d))s(["slides"],"must be a list of slides");else{const e=new Set,n=[];d.forEach((o,f)=>{const a=["slides",f];if(!$(o)){s(a,"must be a slide: id, text, alt, notes");return}for(const p of Object.keys(o))["id","text","alt","notes"].includes(p)||s([...a,p],"unknown key: a slide has id, text, alt and notes");const u=o.id;if(typeof u!="string"||!k.test(u)){s([...a,"id"],"a slide needs an id of letters, digits, _ and -");return}if(e.has(u)){s([...a,"id"],`two slides have the id ${u}`);return}e.add(u);const l={id:u};if(o.text!==void 0){const p=b(o.text,[...a,"text"]);p&&(l.text=p)}const m=o.alt;if(m!==void 0&&($(m)&&Object.entries(m).every(([p,A])=>k.test(p)&&typeof A=="string")?l.alt=m:s([...a,"alt"],"is each shape's alternative text, by name")),o.notes!==void 0){const p=h(o.notes,[...a,"notes"]);typeof p=="string"||p!==void 0&&!g(p)?l.notes=p:p!==void 0&&s([...a,"notes"],"is text")}n.push(l)}),n.length>0&&(c.slides=n)}const y=t.boards??[];if(!Array.isArray(y))s(["boards"],"must be a list of boards");else{const e=new Set,n=[];y.forEach((o,f)=>{const a=["boards",f];if(!$(o)){s(a,"must be a board: id, text");return}for(const m of Object.keys(o))["id","text"].includes(m)||s([...a,m],"unknown key: a board has id and text");const u=o.id;if(typeof u!="string"||!k.test(u)){s([...a,"id"],"a board needs an id of letters, digits, _ and -");return}if(e.has(u)){s([...a,"id"],`two boards have the id ${u}`);return}e.add(u);const l={id:u};if(o.text!==void 0){const m=b(o.text,[...a,"text"]);m&&(l.text=m)}n.push(l)}),n.length>0&&(c.boards=n)}return r.length>0?{problems:r}:{script:c}}function L(t){return typeof t=="string"?j(t).problems:g(t)?[]:Object.values(t.match).some(r=>O(r)||S(r))?["a plural or a selection cannot have anchors or <shown|said>"]:[]}export function saidOf(t){if(typeof t!="string")return{value:t,anchors:[]};const r=j(t);if(r.spans.length===0)return{value:r.text,anchors:r.anchors};const s=w(r);return{value:{display:r.text,speak:s.text},anchors:r.anchors.map(h=>({name:h.name,at:s.at(h.at,!1),...h.end===void 0?{}:{end:s.at(h.end,!0)}}))}}const q=t=>typeof t=="string"||!Array.isArray(t)&&(g(t)||"match"in t);export function scriptKeys(t,r){const s=[],h=new Set,b=[],x=(i,d,y,e=[])=>{h.has(i)?b.push(i):(h.add(i),s.push({key:i,value:d,path:y,...e.length>0?{anchors:e}:{}}))},c=(i,d,y)=>{if(q(d))x(i,d,y);else if(Array.isArray(d))d.forEach((e,n)=>{c(`${i}.${String(n)}`,e,[...y,n])});else for(const[e,n]of Object.entries(d))c(`${i}.${e}`,n,[...y,e])};r.title!==void 0&&x(`${t}.title`,r.title,["title"]);for(const[i,d]of Object.entries(r.text??{}))c(`${t}.${i}`,d,["text",i]);return r.parts.forEach((i,d)=>{const y=`${t}.${i.id}`;if(i.say!==void 0){const e=saidOf(i.say);x(`${y}.say`,e.value,["parts",d,"say"],e.anchors)}for(const[e,n]of Object.entries(i.screen??{}))c(`${y}.${e}`,n,["parts",d,"screen",e])}),(r.slides??[]).forEach((i,d)=>{const y=`${t}.${i.id}`;for(const[e,n]of Object.entries(i.text??{}))c(`${y}.${e}`,n,["slides",d,"text",e]);i.notes!==void 0&&x(`${y}.notes`,i.notes,["slides",d,"notes"]);for(const[e,n]of Object.entries(i.alt??{}))x(`${y}.alt.${e}`,n,["slides",d,"alt",e])}),(r.boards??[]).forEach((i,d)=>{const y=`${t}.${i.id}`;for(const[e,n]of Object.entries(i.text??{}))c(`${y}.${e}`,n,["boards",d,"text",e])}),{keys:s,twice:b}}export function scriptMessages(t,r){return Object.fromEntries(scriptKeys(t,r).keys.map(s=>[s.key,s.value]))}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { Look } from "./look.js";
|
|
2
|
+
import type { Combo, Dims, MatrixRule, MatrixSpace } from "./matrix.js";
|
|
3
|
+
import type { MediaInfo } from "./media.js";
|
|
4
|
+
import type { MessagesFile } from "./messages.js";
|
|
5
|
+
/** A file's media, its addresses absolute against the tree's root. */
|
|
6
|
+
export declare function resolveMedia(media: Readonly<Record<string, MediaInfo>>, root: string | URL): Record<string, MediaInfo>;
|
|
7
|
+
/** A piece's source, its bundle's, styles' and media's addresses absolute against the tree's root. */
|
|
8
|
+
export declare function resolveSource(source: BuildSource, root: string | URL): BuildSource;
|
|
9
|
+
export interface LoadOptions {
|
|
10
|
+
/** The combo: one value per dimension, e.g. { lang: "zh-cn" }. */
|
|
11
|
+
combo: Combo;
|
|
12
|
+
purpose: "play" | "render" | "check";
|
|
13
|
+
/**
|
|
14
|
+
* The most different console messages kept from piece code (see
|
|
15
|
+
* console.ts); default CONSOLE_LIMIT.
|
|
16
|
+
*/
|
|
17
|
+
consoleLimit?: number;
|
|
18
|
+
}
|
|
19
|
+
/** A data file ctx.data(path) can read: parsed, or why it could not be. */
|
|
20
|
+
export interface DataFile {
|
|
21
|
+
sha256: string;
|
|
22
|
+
value?: unknown;
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
/** What the host hands load(): one piece, as the build made it. */
|
|
26
|
+
export interface BuildSource {
|
|
27
|
+
/**
|
|
28
|
+
* Its item's kind, as contributed: the stage loads it with the runtime
|
|
29
|
+
* its kind's extension lends the stage (`video`, `slides`), or, for a
|
|
30
|
+
* doc that shows components, whose module exports their table
|
|
31
|
+
* (`components`: reference → component), draws one component at a time.
|
|
32
|
+
*/
|
|
33
|
+
kind?: string;
|
|
34
|
+
/** The piece's id: seeds and problems use it. */
|
|
35
|
+
piece: string;
|
|
36
|
+
/**
|
|
37
|
+
* The piece's file, relative to the project root: a path its own options
|
|
38
|
+
* name (music, a LUT) and ctx.asset() are relative to it, unless the
|
|
39
|
+
* piece says where it was written (`base`).
|
|
40
|
+
*/
|
|
41
|
+
file: string;
|
|
42
|
+
/**
|
|
43
|
+
* The bundled piece module's address. A build writes it, and every
|
|
44
|
+
* address below, relative to the root of the tree the stage is served
|
|
45
|
+
* in (`build/pieces/…`, `media/…`); the stage resolves them
|
|
46
|
+
* (resolveSource), so one build is served anywhere.
|
|
47
|
+
*/
|
|
48
|
+
module: string;
|
|
49
|
+
/** The stylesheets the bundle imports. */
|
|
50
|
+
styles?: string[];
|
|
51
|
+
/** The piece's dimensions, as the build resolved them (lang filled in). */
|
|
52
|
+
dims: Dims;
|
|
53
|
+
/** Its slots, structures and rules, when it has slots (pools resolved). */
|
|
54
|
+
matrix?: {
|
|
55
|
+
space: MatrixSpace;
|
|
56
|
+
rules: MatrixRule[];
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The piece's one format, as the build resolved it (the project's
|
|
60
|
+
* default filled in), e.g. "9x16". A piece has one output, its kind's.
|
|
61
|
+
*/
|
|
62
|
+
format: string;
|
|
63
|
+
/** Locales, the default first. */
|
|
64
|
+
locales: string[];
|
|
65
|
+
/** Every message by locale: the messages files' and the items' scripts'. */
|
|
66
|
+
messages: Record<string, MessagesFile>;
|
|
67
|
+
/**
|
|
68
|
+
* locale → key → the anchors a script wrote in that line (@{name}), by
|
|
69
|
+
* their place in the line as spoken.
|
|
70
|
+
*/
|
|
71
|
+
anchors?: Record<string, Record<string, TextAnchor[]>>;
|
|
72
|
+
/** The folder of the shared words (allyhub.config.ts's text); default assets/text. */
|
|
73
|
+
text?: string;
|
|
74
|
+
/** The piece's script, a project path with `{locale}` for each language, where it has words of its own: where its keys are written. */
|
|
75
|
+
script?: string;
|
|
76
|
+
/** Repo path → media, with its address. */
|
|
77
|
+
media: Record<string, MediaInfo>;
|
|
78
|
+
/** Repo path → data files (CSV, YAML, JSON) that ctx.data(path) reads. */
|
|
79
|
+
data?: Record<string, DataFile>;
|
|
80
|
+
/** Looks by name; the built-in clean is always there. */
|
|
81
|
+
looks?: Record<string, Look>;
|
|
82
|
+
/** The project's part defaults (allyhub.config.ts `defaults.part`). */
|
|
83
|
+
partDefaults?: PartDefaults;
|
|
84
|
+
/**
|
|
85
|
+
* The entries of the points its kind's extension declares that its
|
|
86
|
+
* runtime reads, by point id, as the build read them: plain data.
|
|
87
|
+
*/
|
|
88
|
+
points?: Record<string, readonly unknown[]>;
|
|
89
|
+
/**
|
|
90
|
+
* What its kind's build read for its runtime besides its module, as
|
|
91
|
+
* plain data in the kind's own terms (a deck's slides file and its code
|
|
92
|
+
* as data, an image's changes file, what a person changed by hand): the
|
|
93
|
+
* core carries it unread.
|
|
94
|
+
*/
|
|
95
|
+
kindData?: unknown;
|
|
96
|
+
/**
|
|
97
|
+
* Every piece of the build by id, for a piece that shows another inside
|
|
98
|
+
* it (a scenery's screen): its file, dimensions, format and matrix.
|
|
99
|
+
*/
|
|
100
|
+
pieces?: Record<string, {
|
|
101
|
+
file: string;
|
|
102
|
+
dims: Dims;
|
|
103
|
+
format: string;
|
|
104
|
+
matrix?: {
|
|
105
|
+
space: MatrixSpace;
|
|
106
|
+
rules: MatrixRule[];
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Part defaults a project (`defineConfig({ defaults: { part } })`) or a
|
|
112
|
+
* video (`video({ defaults: { part } })`) sets over the built-in ones.
|
|
113
|
+
*/
|
|
114
|
+
export interface PartDefaults {
|
|
115
|
+
/** Seconds of a part without speech. */
|
|
116
|
+
dur?: number;
|
|
117
|
+
/** Seconds before a part's first word. */
|
|
118
|
+
lead?: number;
|
|
119
|
+
/** Seconds after a part's last word. */
|
|
120
|
+
tail?: number;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* A named place in a line, in characters of the line as shown: a point at
|
|
124
|
+
* `at`, or the stretch from `at` to `end`.
|
|
125
|
+
*/
|
|
126
|
+
export interface TextAnchor {
|
|
127
|
+
name: string;
|
|
128
|
+
at: number;
|
|
129
|
+
end?: number;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=source.d.ts.map
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import type { Fact, Problem } from "@allyhub/diagnostics";
|
|
2
|
+
import type { NoteShape } from "@allyhub/formats";
|
|
3
|
+
import type { PropType } from "./component.js";
|
|
4
|
+
import type { TextInk } from "./contrast.js";
|
|
5
|
+
import type { ConsoleLog } from "./console.js";
|
|
6
|
+
import type { LayerAnswer, LayerQueries } from "./layer.js";
|
|
7
|
+
import type { LayoutReport, Track } from "./layout.js";
|
|
8
|
+
import type { IndexNeed, MediaInfo, MediaKind } from "./media.js";
|
|
9
|
+
import type { MessageHint } from "./messages.js";
|
|
10
|
+
import type { BuildSource, LoadOptions } from "./source.js";
|
|
11
|
+
/** How a moment is drawn: for its picture, or for its layout alone (nothing reads its pixels). */
|
|
12
|
+
export type DrawMode = "picture" | "layout";
|
|
13
|
+
export interface DrawOptions {
|
|
14
|
+
/** Default "picture". `ctx.layoutOnly` is true for a "layout" draw. */
|
|
15
|
+
mode?: DrawMode;
|
|
16
|
+
/**
|
|
17
|
+
* Seconds after the frame's moment, under one frame: the sub-frame
|
|
18
|
+
* samples of motion blur. The frame's seed is kept.
|
|
19
|
+
*/
|
|
20
|
+
offset?: number;
|
|
21
|
+
/** Only the graphic layers of this plane of the part (Part.planes). */
|
|
22
|
+
plane?: number;
|
|
23
|
+
/**
|
|
24
|
+
* This part alone, as a cut would show it, held at its first or last
|
|
25
|
+
* frame outside its own time: a render composites the two parts of a
|
|
26
|
+
* transition itself. Without it, inside a transition's window both
|
|
27
|
+
* parts are drawn, placed as the transition has them.
|
|
28
|
+
*/
|
|
29
|
+
part?: string;
|
|
30
|
+
}
|
|
31
|
+
/** StageOutput.partSignature's answer. */
|
|
32
|
+
export type PartSignature = {
|
|
33
|
+
sign: string;
|
|
34
|
+
owners: string[];
|
|
35
|
+
unknown?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
unknown: string;
|
|
38
|
+
};
|
|
39
|
+
/** A message between a stage's frame and the page that embeds it: its type, and what it carries. */
|
|
40
|
+
export interface StageMessage {
|
|
41
|
+
type: string;
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}
|
|
44
|
+
/** A message a version read: its key, the part that read it, as a text or a list, and whether it fell back to the default language. */
|
|
45
|
+
export interface MessageRead {
|
|
46
|
+
key: string;
|
|
47
|
+
part?: string;
|
|
48
|
+
kind: "text" | "list";
|
|
49
|
+
hint?: MessageHint;
|
|
50
|
+
fallback: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** What a version read while it loaded and drew its stills: what its digest is made from, so what it did not read does not count. */
|
|
53
|
+
export interface Reads {
|
|
54
|
+
messages: MessageRead[];
|
|
55
|
+
media: {
|
|
56
|
+
path: string;
|
|
57
|
+
sha256: string;
|
|
58
|
+
part?: string;
|
|
59
|
+
kind: MediaKind;
|
|
60
|
+
}[];
|
|
61
|
+
/** Data files read with ctx.data (imported data is in the bundle). */
|
|
62
|
+
data: {
|
|
63
|
+
path: string;
|
|
64
|
+
sha256: string;
|
|
65
|
+
}[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A version's clock as every host reads it: its frame, its length and its
|
|
69
|
+
* parts in order, each with its span, the moment it is still at and, for a
|
|
70
|
+
* page drawn a step at a time (a deck's slide), each step's; and what the
|
|
71
|
+
* media index lacks to draw it. Every output on the stage is drawn moment
|
|
72
|
+
* by moment on it (seek, a part alone, its signs by part); a kind's own plan
|
|
73
|
+
* has more (a film's Timeline: its tracks, sound, footage and captions).
|
|
74
|
+
*/
|
|
75
|
+
export interface StageClock {
|
|
76
|
+
readonly fps: number;
|
|
77
|
+
readonly width: number;
|
|
78
|
+
readonly height: number;
|
|
79
|
+
readonly duration: number;
|
|
80
|
+
readonly parts: readonly {
|
|
81
|
+
readonly key: string;
|
|
82
|
+
readonly start: number;
|
|
83
|
+
readonly end: number;
|
|
84
|
+
readonly still: number;
|
|
85
|
+
readonly steps?: readonly number[] | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* A part drawn at a frame of its own (an image's board), in pixels:
|
|
88
|
+
* a host draws and captures it at this size, not the clock's.
|
|
89
|
+
*/
|
|
90
|
+
readonly frame?: PartFrame | undefined;
|
|
91
|
+
}[];
|
|
92
|
+
/** Media whose face track or person matte it draws with and the media index has not got yet. */
|
|
93
|
+
readonly index?: readonly IndexNeed[] | undefined;
|
|
94
|
+
}
|
|
95
|
+
/** A part's own frame, in pixels (StageClock's parts). */
|
|
96
|
+
export interface PartFrame {
|
|
97
|
+
readonly width: number;
|
|
98
|
+
readonly height: number;
|
|
99
|
+
}
|
|
100
|
+
/** The frame a host draws moment t of a clock at: its part's own, else the clock's. */
|
|
101
|
+
export declare function frameAt(clock: StageClock, t: number): PartFrame;
|
|
102
|
+
/** What a host reads once, after a load and its ready(): every kind's, and what its kind adds. */
|
|
103
|
+
export interface StageSummary {
|
|
104
|
+
/** The kind that loaded it. */
|
|
105
|
+
kind: string;
|
|
106
|
+
/** Its clock: its parts, each drawn at its still. */
|
|
107
|
+
timeline: StageClock;
|
|
108
|
+
/** What it read while it loaded and drew its stills. */
|
|
109
|
+
reads: Reads;
|
|
110
|
+
problems: Problem[];
|
|
111
|
+
facts: Fact[];
|
|
112
|
+
/** Each part's identity, by key (StageOutput.signs). */
|
|
113
|
+
signs: Record<string, string>;
|
|
114
|
+
/** Seconds (StageOutput.seekLimit). */
|
|
115
|
+
seekLimit: number;
|
|
116
|
+
}
|
|
117
|
+
/** One output of one piece in one combo, loaded by its kind's runtime, ready to draw moment by moment. */
|
|
118
|
+
export interface StageOutput<S extends StageSummary = StageSummary> {
|
|
119
|
+
/** The kind whose runtime loaded it. */
|
|
120
|
+
readonly kind: string;
|
|
121
|
+
/** Fonts and media loaded and decoded; every layer mounted; every still drawn. */
|
|
122
|
+
ready(): Promise<void>;
|
|
123
|
+
/** What a host reads once it is ready, in its kind's terms. */
|
|
124
|
+
summary(): S;
|
|
125
|
+
/** Draws moment t (seconds on its clock), on its frame grid; the picture is settled when it returns. */
|
|
126
|
+
seek(t: number, options?: DrawOptions): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Every problem so far, for the page's whole life: loading's, and what
|
|
129
|
+
* went wrong at any moment drawn since (a layer that throws, work that
|
|
130
|
+
* fails or never settles, a picture that does not load).
|
|
131
|
+
*/
|
|
132
|
+
problems(): Problem[];
|
|
133
|
+
/** The AK-P003 of the last seek, when that moment did not finish drawing. */
|
|
134
|
+
stuck(): string | undefined;
|
|
135
|
+
/** The longest one moment may take to draw, seconds. */
|
|
136
|
+
readonly seekLimit: number;
|
|
137
|
+
/** What loading found that is a fact, not a problem. The layout's facts come from measure(). */
|
|
138
|
+
facts(): Fact[];
|
|
139
|
+
/**
|
|
140
|
+
* Each part's identity, by key: what its graphics are drawn from, as
|
|
141
|
+
* JSON. The host adds the footage and the code, and renders a part once
|
|
142
|
+
* per identity.
|
|
143
|
+
*/
|
|
144
|
+
signs(): Record<string, string>;
|
|
145
|
+
/** Measurements for the check's facts and allyhub inspect, at each moment (default: the kind's own). Facts, no judgement. */
|
|
146
|
+
measure(times?: readonly number[]): Promise<LayoutReport>;
|
|
147
|
+
/** Everything on screen followed frame by frame from `from` to `to` (seconds). */
|
|
148
|
+
tracks(from: number, to: number): Promise<Track[]>;
|
|
149
|
+
/** The text blocks on screen at `t`, each line's glyph box with the colour its glyphs are filled with. */
|
|
150
|
+
inks(t: number): Promise<TextInk[]>;
|
|
151
|
+
/**
|
|
152
|
+
* What the stage shows after the last seek, as a short string: two
|
|
153
|
+
* moments with the same signature draw the same pixels, so a render
|
|
154
|
+
* captures the frame once. Undefined when what shows holds something the
|
|
155
|
+
* DOM does not describe (a canvas, a video, an iframe, a GIF).
|
|
156
|
+
*/
|
|
157
|
+
signature(): string | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* The signature of moment t, drawn for its layout alone: what
|
|
160
|
+
* signature() would say after seek(t), without painting what no
|
|
161
|
+
* signature reads. The stage's pixels are then not t's until the next
|
|
162
|
+
* seek.
|
|
163
|
+
*/
|
|
164
|
+
signatureAt(t: number): Promise<string | undefined>;
|
|
165
|
+
/**
|
|
166
|
+
* What part `key` draws at each of `times`, for the part cache: each
|
|
167
|
+
* moment drawn for its layout alone, the part alone, and what shows of
|
|
168
|
+
* the stage's DOM hashed, a hash of them all, with the code that drew
|
|
169
|
+
* what the DOM does not say in `owners`. `unknown` says why there is no
|
|
170
|
+
* signature.
|
|
171
|
+
*/
|
|
172
|
+
partSignature(key: string, times: readonly number[]): Promise<PartSignature>;
|
|
173
|
+
/**
|
|
174
|
+
* Asks every layer that answers `name` (StageContext.answer), in order:
|
|
175
|
+
* each answer with the part and layer it came from.
|
|
176
|
+
*/
|
|
177
|
+
ask<K extends keyof LayerQueries>(name: K, args: LayerQueries[K]["args"]): Promise<LayerAnswer<LayerQueries[K]["answer"]>[]>;
|
|
178
|
+
/** After a seek, the element a print sheet copies (a deck's slide on show), inside the stage. Absent: the whole stage. */
|
|
179
|
+
sheet?(): HTMLElement | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Plays it in real time in this page (a preview's stage); the page that
|
|
182
|
+
* embeds it drives it with the control's commands. Absent: its kind
|
|
183
|
+
* does not play.
|
|
184
|
+
*/
|
|
185
|
+
play?(stage: HTMLElement, options: PlayOptions): Promise<PlayControl>;
|
|
186
|
+
/**
|
|
187
|
+
* What its kind's editor asks of it through the frame (a moment's
|
|
188
|
+
* objects, a deck resolved again), answered with the message to post
|
|
189
|
+
* back; undefined for a message its kind does not take.
|
|
190
|
+
*/
|
|
191
|
+
answer?(message: StageMessage): Promise<StageMessage> | undefined;
|
|
192
|
+
dispose(): void;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Why a piece cannot load at all. The page rejects with an Error named
|
|
196
|
+
* "LoadFailure" whose message is `<code>: <text>`.
|
|
197
|
+
*/
|
|
198
|
+
export interface LoadFailureInfo {
|
|
199
|
+
code: string;
|
|
200
|
+
text: string;
|
|
201
|
+
}
|
|
202
|
+
/** What a component drawn alone is: its name for people and its props' types. */
|
|
203
|
+
export interface DrawnComponent {
|
|
204
|
+
label?: string | Readonly<Record<string, string>>;
|
|
205
|
+
props: Readonly<Record<string, PropType>>;
|
|
206
|
+
}
|
|
207
|
+
/** A component of an item drawn alone, on a transparent page of its frame's size. */
|
|
208
|
+
export interface ComponentAt {
|
|
209
|
+
name: string;
|
|
210
|
+
props: Record<string, unknown>;
|
|
211
|
+
/** Its frame, in the stage's pixels. */
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
/** Seconds since it came on: what moves in it has settled by its slide's still. */
|
|
215
|
+
t: number;
|
|
216
|
+
}
|
|
217
|
+
/** A layer a person's mark is on (docs/design/notes.md): its part, its component, the `data-ak` name of what was marked and its words. */
|
|
218
|
+
export interface LocatedLayer {
|
|
219
|
+
part: string;
|
|
220
|
+
/** Its component. */
|
|
221
|
+
layer: string;
|
|
222
|
+
/** Its `data-ak` name, when what is under the place has one. */
|
|
223
|
+
name?: string;
|
|
224
|
+
text?: string;
|
|
225
|
+
}
|
|
226
|
+
/** Where a player starts: a moment, or a part and how far into it (the same share of it when its length is no longer `dur`). */
|
|
227
|
+
export interface PlayAt {
|
|
228
|
+
/** Seconds. */
|
|
229
|
+
t?: number;
|
|
230
|
+
part?: string;
|
|
231
|
+
/** Seconds into the part. */
|
|
232
|
+
offset?: number;
|
|
233
|
+
/** The part's length when the offset was taken. */
|
|
234
|
+
dur?: number;
|
|
235
|
+
}
|
|
236
|
+
/** What `play` takes: the player's options but the output and the stage, which are the page's. */
|
|
237
|
+
export interface PlayOptions {
|
|
238
|
+
/** The project's media by path, as the stage sees them (with loudness). */
|
|
239
|
+
media?: Readonly<Record<string, MediaInfo>>;
|
|
240
|
+
/** Seeds the synthesized sounds like the export: piece:output:seed key. */
|
|
241
|
+
seed?: string;
|
|
242
|
+
/** Where to start. */
|
|
243
|
+
at?: PlayAt;
|
|
244
|
+
/** Tells the embedding page what happens (what it loaded, the player's events), as JSON. */
|
|
245
|
+
post?: (event: StageMessage) => void;
|
|
246
|
+
/** false: no control bar (the embedding page draws its own). */
|
|
247
|
+
chrome?: boolean;
|
|
248
|
+
}
|
|
249
|
+
/** A playing output, driven by the page that embeds it. */
|
|
250
|
+
export interface PlayControl {
|
|
251
|
+
/** What the embedding page asks of the player (play, pause, seek…), in its kind's terms. */
|
|
252
|
+
command(command: StageMessage): void;
|
|
253
|
+
}
|
|
254
|
+
/** The one global a stage page installs. */
|
|
255
|
+
export interface StageBridge {
|
|
256
|
+
/** Loads one piece with its kind's runtime and readies it. Rejects with a LoadFailure when the piece cannot load at all. */
|
|
257
|
+
load(source: BuildSource, options: LoadOptions): Promise<StageSummary>;
|
|
258
|
+
/** The output loaded last; every call below is on it. */
|
|
259
|
+
readonly output: StageOutput | undefined;
|
|
260
|
+
/** What piece code printed since the last load began. */
|
|
261
|
+
console(): ConsoleLog;
|
|
262
|
+
/** Plays the output loaded last in real time, in this page (its `play`). */
|
|
263
|
+
play(options: PlayOptions): Promise<PlayControl>;
|
|
264
|
+
/** What a person's mark is on, in shares of the stage. */
|
|
265
|
+
locate(mark: NoteShape): LocatedLayer[];
|
|
266
|
+
/**
|
|
267
|
+
* An item's code as data, its module run and nothing drawn, as the
|
|
268
|
+
* message its editor hears (a deck's DeckCode and theme), from the
|
|
269
|
+
* extension that lends it.
|
|
270
|
+
*/
|
|
271
|
+
code(source: BuildSource, options: LoadOptions): Promise<StageMessage>;
|
|
272
|
+
/**
|
|
273
|
+
* One component of an item (a deck's, a doc's) drawn alone on the stage,
|
|
274
|
+
* transparent, at a size and a time: resolves once its fonts, pictures
|
|
275
|
+
* and work are done, with what the component is. Another call draws
|
|
276
|
+
* another.
|
|
277
|
+
*/
|
|
278
|
+
component(source: BuildSource, options: LoadOptions, at: ComponentAt): Promise<DrawnComponent>;
|
|
279
|
+
}
|
|
280
|
+
declare global {
|
|
281
|
+
interface Window {
|
|
282
|
+
allyhub: StageBridge;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=stage.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Combo } from "./matrix.js";
|
|
2
|
+
/** One version: what to load. */
|
|
3
|
+
export interface Target {
|
|
4
|
+
piece: string;
|
|
5
|
+
/** Its output, named by its kind: `video` or `slides`. */
|
|
6
|
+
output: string;
|
|
7
|
+
combo: Combo;
|
|
8
|
+
/** The piece's one format. */
|
|
9
|
+
format: string;
|
|
10
|
+
/** The combo's id (c01), when the piece has slots and chose it. */
|
|
11
|
+
id?: string;
|
|
12
|
+
}
|
|
13
|
+
/** "launch/film · lang=en · 9x16". */
|
|
14
|
+
export declare const versionLabel: (t: Target) => string;
|
|
15
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Word } from "./media.js";
|
|
1
|
+
import type { Envelope, UnheardSound, Word } from "./media.js";
|
|
2
2
|
/** Seconds between two frames. */
|
|
3
3
|
export declare const VOICE_HOP = 0.01;
|
|
4
4
|
/**
|
|
@@ -19,8 +19,6 @@ export declare function frameDb(frames: Pick<VoiceFrames, "db">, f: number): num
|
|
|
19
19
|
* lags of a 70–400 Hz pitch.
|
|
20
20
|
*/
|
|
21
21
|
export declare function measureVoice(samples: Float32Array, rate: number): VoiceFrames;
|
|
22
|
-
/** A take's level per frame as the media value carries it: base64 of −dB per 10 ms. */
|
|
23
|
-
export type Envelope = string;
|
|
24
22
|
/** The level frames of an envelope. */
|
|
25
23
|
export declare function envelopeFrames(envelope: Envelope): Pick<VoiceFrames, "db" | "hop">;
|
|
26
24
|
/**
|
|
@@ -29,23 +27,6 @@ export declare function envelopeFrames(envelope: Envelope): Pick<VoiceFrames, "d
|
|
|
29
27
|
* itself (clamped) when no frame's centre is inside.
|
|
30
28
|
*/
|
|
31
29
|
export declare function quietest(frames: Pick<VoiceFrames, "db" | "hop">, t: number, lo: number, hi: number): number;
|
|
32
|
-
/**
|
|
33
|
-
* A stretch between words where the take is not silent: something said
|
|
34
|
-
* that is not a word (a filler, a hum, a false start's sound) or a breath.
|
|
35
|
-
* Seconds of the file.
|
|
36
|
-
*/
|
|
37
|
-
export interface UnheardSound {
|
|
38
|
-
start: number;
|
|
39
|
-
end: number;
|
|
40
|
-
/** Its loudest frame, dB against the take's speech level (the median frame inside words). */
|
|
41
|
-
peak: number;
|
|
42
|
-
/** Its mean frame level, dB against the speech level. */
|
|
43
|
-
mean: number;
|
|
44
|
-
/** The share of its frames that are voiced (periodic, like a vowel or a hum), 0 to 1. */
|
|
45
|
-
voiced: number;
|
|
46
|
-
/** The index of the word before it (−1: before the first word). */
|
|
47
|
-
after: number;
|
|
48
|
-
}
|
|
49
30
|
/**
|
|
50
31
|
* A stretch between words above the take's noise floor (`all`), measured
|
|
51
32
|
* whether or not the thresholds report a sound in it.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@allyhub/piece",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./page": {
|
|
11
|
+
"types": "./dist/page/index.d.ts",
|
|
12
|
+
"default": "./dist/page/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"private": true,
|
|
17
|
+
"license": "SEE LICENSE IN LICENSE.md"
|
|
18
|
+
}
|