@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,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as e}from"zod";import{MEDIA_BRAND as v}from"./media.js";export const BLEND_MODES=["normal","dissolve","darken","multiply","colorBurn","linearBurn","darkerColor","lighten","screen","colorDodge","linearDodge","lighterColor","overlay","softLight","hardLight","vividLight","linearLight","pinLight","hardMix","difference","exclusion","subtract","divide","hue","saturation","color","luminosity","passThrough"];const m="is not among CSS's blend modes, and a layer's filter cannot read what lies under it in Chrome, so it cannot be drawn exactly";export const BLEND_DRAWN={normal:{css:"normal"},dissolve:{refused:"scatters the layer's pixels at random by their opacity, which no CSS compositing does"},darken:{css:"darken"},multiply:{css:"multiply"},colorBurn:{css:"color-burn"},linearBurn:{refused:m},darkerColor:{refused:"keeps the whole colour of the darker pixel by its luminance, which no CSS compositing does"},lighten:{css:"lighten"},screen:{css:"screen"},colorDodge:{css:"color-dodge"},linearDodge:{refused:"is a sum blended by the layer's opacity; CSS's plus-lighter adds the layer's colour and opacity together, which differs wherever the layer is not opaque"},lighterColor:{refused:"keeps the whole colour of the lighter pixel by its luminance, which no CSS compositing does"},overlay:{css:"overlay"},softLight:{css:"soft-light"},hardLight:{css:"hard-light"},vividLight:{refused:m},linearLight:{refused:m},pinLight:{refused:m},hardMix:{refused:m},difference:{css:"difference"},exclusion:{css:"exclusion"},subtract:{refused:m},divide:{refused:m},hue:{css:"hue"},saturation:{css:"saturation"},color:{css:"color"},luminosity:{css:"luminosity"},passThrough:{css:"normal"}},FILL_INSIDE_BLEND=["colorBurn","colorDodge","difference"];const k=o=>typeof o=="object"&&o!==null&&(v in o||"sha256"in o),b=e.number().min(0).max(1);export const ShareBoxSchema=e.tuple([b,b,b,b]).refine(([o,t,n,i])=>n>0&&i>0&&o+n<=1+1e-9&&t+i<=1+1e-9,"[x, y, w, h] as shares of the frame, inside it, its sides more than 0");const g=e.union([e.string().min(1),e.custom(k,"an imported picture")]),r=e.number().min(0).max(100).refine(Number.isFinite,"a percent from 0 to 100"),c=e.number().min(0).max(1e3).refine(Number.isFinite),y=e.number().min(-360).max(360),x=e.enum(BLEND_MODES),j=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/iu,M=/^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color)\([^()]*\)$/iu;export function isColor(o){if(typeof o!="string")return!1;const t=o.trim();if(j.test(t)||M.test(t))return!0;if(!/^[a-z]+$/iu.test(t))return!1;const n=globalThis.CSS;return n?n.supports("color",t):t.length>2}export const ColorSchema=e.string().refine(isColor,"a CSS colour (#rrggbb, rgb(…), hsl(…) or a colour's name)"),ColorStopSchema=e.object({color:ColorSchema,location:r,midpoint:r.optional()}),GRADIENT_STYLES=["linear","radial","angle","reflected","diamond"],GradientSchema=e.object({stops:e.array(ColorStopSchema).min(2),style:e.enum(GRADIENT_STYLES).optional(),angle:y.optional(),scale:e.number().min(10).max(1e3).optional(),reverse:e.boolean().optional()}),FillSchema=e.union([e.object({color:ColorSchema}),e.object({gradient:GradientSchema}),e.object({pattern:g,scale:e.number().min(1).max(1e3).optional()})]),MaskObjectSchema=e.object({src:g.optional(),path:e.string().min(1).optional(),box:ShareBoxSchema.optional(),mode:e.enum(["alpha","luminance"]).optional(),density:r.optional(),feather:c.optional(),invert:e.boolean().optional(),enabled:e.boolean().optional()}),LayerMaskSchema=e.union([g,MaskObjectSchema]);const u={enabled:e.boolean().optional(),blendMode:x.optional(),opacity:r.optional()},S={...u,color:ColorSchema.optional(),angle:y.optional(),distance:c.optional(),size:c.optional()};export const EffectsSchema=e.object({dropShadow:e.object({...S,spread:r.optional()}).optional(),innerShadow:e.object({...S,choke:r.optional()}).optional(),outerGlow:e.object({...u,color:ColorSchema.optional(),spread:r.optional(),size:c.optional()}).optional(),innerGlow:e.object({...u,color:ColorSchema.optional(),choke:r.optional(),size:c.optional(),source:e.enum(["edge","center"]).optional()}).optional(),stroke:e.object({...u,color:ColorSchema.optional(),size:c.optional(),position:e.enum(["outside","inside","center"]).optional()}).optional(),colorOverlay:e.object({...u,color:ColorSchema.optional()}).optional(),gradientOverlay:e.object({...u,gradient:GradientSchema.optional()}).optional(),patternOverlay:e.object({...u,pattern:g,scale:e.number().min(1).max(1e3).optional()}).optional(),satin:e.object({...u,color:ColorSchema.optional(),angle:y.optional(),distance:c.optional(),size:c.optional(),invert:e.boolean().optional()}).optional(),bevelEmboss:e.object({...u,style:e.enum(["innerBevel","outerBevel","emboss","pillowEmboss","strokeEmboss"]).optional(),technique:e.enum(["smooth","chiselHard","chiselSoft"]).optional(),depth:e.number().min(1).max(1e3).optional(),direction:e.enum(["up","down"]).optional(),size:c.optional(),soften:c.optional(),angle:y.optional(),altitude:e.number().min(0).max(90).optional(),highlightMode:x.optional(),highlightColor:ColorSchema.optional(),highlightOpacity:r.optional(),shadowMode:x.optional(),shadowColor:ColorSchema.optional(),shadowOpacity:r.optional()}).optional()}),EFFECT_NAMES=["dropShadow","innerShadow","outerGlow","innerGlow","bevelEmboss","satin","colorOverlay","gradientOverlay","patternOverlay","stroke"],EFFECT_ORDER=["dropShadow","outerGlow","patternOverlay","gradientOverlay","colorOverlay","satin","innerGlow","innerShadow","bevelEmboss","stroke"],EFFECT_DEFAULTS={dropShadow:{blendMode:"multiply",color:"#000000",opacity:75,angle:120,distance:5,spread:0,size:5},innerShadow:{blendMode:"multiply",color:"#000000",opacity:75,angle:120,distance:5,choke:0,size:5},outerGlow:{blendMode:"screen",color:"#ffffbe",opacity:75,spread:0,size:5},innerGlow:{blendMode:"screen",color:"#ffffbe",opacity:75,choke:0,size:5,source:"edge"},stroke:{blendMode:"normal",color:"#000000",opacity:100,size:3,position:"outside"},colorOverlay:{blendMode:"normal",color:"#ff0000",opacity:100},gradientOverlay:{blendMode:"normal",opacity:100,gradient:{stops:[{color:"#000000",location:0},{color:"#ffffff",location:100}],style:"linear",angle:90,scale:100,reverse:!1}},patternOverlay:{blendMode:"normal",opacity:100,scale:100},satin:{blendMode:"multiply",color:"#000000",opacity:50,angle:19,distance:11,size:14,invert:!0},bevelEmboss:{style:"innerBevel",technique:"smooth",depth:100,direction:"up",size:5,soften:0,angle:120,altitude:30,highlightMode:"screen",highlightColor:"#ffffff",highlightOpacity:75,shadowMode:"multiply",shadowColor:"#000000",shadowOpacity:75}},TransformSchema=e.object({rotation:e.number().min(-360).max(360).optional(),flipH:e.boolean().optional(),flipV:e.boolean().optional()}),LayerStyleSchema=e.object({blendMode:x.optional(),opacity:r.optional(),fillOpacity:r.optional(),clipping:e.boolean().optional(),mask:LayerMaskSchema.optional(),effects:EffectsSchema.optional(),transform:TransformSchema.optional(),visible:e.boolean().optional()}),LAYER_STYLE_FIELDS=["blendMode","opacity","fillOpacity","clipping","mask","effects","transform","visible"],LAYER_STYLE_DEFAULTS={blendMode:"normal",groupBlendMode:"passThrough",opacity:100,fillOpacity:100,clipping:!1,visible:!0,mask:{mode:"alpha",density:100,feather:0,invert:!1}};const h=e.number().min(0).max(255);export const LevelsChannelSchema=e.object({inputBlack:h.optional(),inputWhite:h.optional(),gamma:e.number().min(.1).max(9.99).optional(),outputBlack:h.optional(),outputWhite:h.optional()});const E=e.tuple([h,h]);export const CurveSchema=e.array(E).min(2).max(16),AdjustmentSchema=e.discriminatedUnion("kind",[e.object({kind:e.literal("levels"),rgb:LevelsChannelSchema.optional(),red:LevelsChannelSchema.optional(),green:LevelsChannelSchema.optional(),blue:LevelsChannelSchema.optional()}),e.object({kind:e.literal("curves"),rgb:CurveSchema.optional(),red:CurveSchema.optional(),green:CurveSchema.optional(),blue:CurveSchema.optional()}),e.object({kind:e.literal("brightnessContrast"),brightness:e.number().min(-150).max(150).optional(),contrast:e.number().min(-50).max(100).optional(),useLegacy:e.boolean().optional()}),e.object({kind:e.literal("hueSaturation"),hue:e.number().min(-180).max(180).optional(),saturation:e.number().min(-100).max(100).optional(),lightness:e.number().min(-100).max(100).optional(),colorize:e.boolean().optional()}),e.object({kind:e.literal("vibrance"),vibrance:e.number().min(-100).max(100).optional(),saturation:e.number().min(-100).max(100).optional()}),e.object({kind:e.literal("colorBalance"),shadows:e.tuple([e.number(),e.number(),e.number()]).optional(),midtones:e.tuple([e.number(),e.number(),e.number()]).optional(),highlights:e.tuple([e.number(),e.number(),e.number()]).optional(),preserveLuminosity:e.boolean().optional()}),e.object({kind:e.literal("blackAndWhite"),reds:e.number().min(-200).max(300).optional(),yellows:e.number().min(-200).max(300).optional(),greens:e.number().min(-200).max(300).optional(),cyans:e.number().min(-200).max(300).optional(),blues:e.number().min(-200).max(300).optional(),magentas:e.number().min(-200).max(300).optional()}),e.object({kind:e.literal("photoFilter"),color:ColorSchema.optional(),density:r.optional(),preserveLuminosity:e.boolean().optional()}),e.object({kind:e.literal("invert")}),e.object({kind:e.literal("threshold"),level:e.number().int().min(1).max(255).optional()}),e.object({kind:e.literal("gradientMap"),gradient:GradientSchema.optional(),reverse:e.boolean().optional()}),e.object({kind:e.literal("exposure"),exposure:e.number().min(-20).max(20).optional(),offset:e.number().min(-.5).max(.5).optional(),gammaCorrection:e.number().min(.01).max(9.99).optional()})]),ADJUSTMENT_KINDS=["brightnessContrast","levels","curves","exposure","vibrance","hueSaturation","colorBalance","blackAndWhite","photoFilter","invert","threshold","gradientMap"],ADJUSTMENT_DEFAULTS={levels:{inputBlack:0,inputWhite:255,gamma:1,outputBlack:0,outputWhite:255},curves:{rgb:[[0,0],[255,255]]},brightnessContrast:{brightness:0,contrast:0,useLegacy:!0},hueSaturation:{hue:0,saturation:0,lightness:0,colorize:!1},vibrance:{vibrance:0,saturation:0},colorBalance:{shadows:[0,0,0],midtones:[0,0,0],highlights:[0,0,0],preserveLuminosity:!0},blackAndWhite:{reds:40,yellows:60,greens:40,cyans:60,blues:20,magentas:80},photoFilter:{color:"#ec8a00",density:25,preserveLuminosity:!0},invert:{},threshold:{level:128},gradientMap:{gradient:{stops:[{color:"#000000",location:0},{color:"#ffffff",location:100}]},reverse:!1},exposure:{exposure:0,offset:0,gammaCorrection:1}},LUMA=[.299,.587,.114],ShapeStrokeSchema=e.object({color:ColorSchema.optional(),width:c.optional(),alignment:e.enum(["inside","center","outside"]).optional(),dashes:e.array(e.number().min(0).max(1e3)).max(8).optional(),cap:e.enum(["butt","round","square"]).optional(),join:e.enum(["miter","round","bevel"]).optional(),opacity:r.optional()}),SHAPE_DEFAULTS={fill:{color:"#000000"},stroke:{color:"#000000",width:1,alignment:"center",cap:"butt",join:"miter",opacity:100},radius:0,sides:5},SHAPE_KINDS=["rectangle","ellipse","triangle","polygon","line","path"],CharacterStyleSchema=e.object({font:e.string().min(1).optional(),weight:e.number().int().min(100).max(900).optional(),italic:e.boolean().optional(),size:e.number().min(1).max(4096).optional(),color:ColorSchema.optional(),tracking:e.number().min(-1e3).max(1e4).optional(),leading:e.union([e.number().min(0).max(5e3),e.literal("auto")]).optional(),capitalization:e.enum(["normal","allCaps","smallCaps"]).optional(),underline:e.boolean().optional(),strikeThrough:e.boolean().optional()}),JUSTIFICATIONS=["left","center","right","justifyLeft","justifyCenter","justifyRight","justifyAll"],ParagraphStyleSchema=e.object({justification:e.enum(JUSTIFICATIONS).optional(),firstLineIndent:e.number().min(-1296).max(1296).optional(),leftIndent:e.number().min(0).max(1296).optional(),rightIndent:e.number().min(0).max(1296).optional(),spaceBefore:e.number().min(0).max(1296).optional(),spaceAfter:e.number().min(0).max(1296).optional()}),TEXT_DEFAULTS={size:48,weight:400,color:"#000000",tracking:0,leading:"auto",autoLeading:1.2,justification:"left"};export function refusalOf(o,t){const n=o.blendMode;if(n!==void 0){if(n==="passThrough"&&t!=="group")return"blendMode passThrough is a group's: a layer of its own blends as normal or another mode";const a=BLEND_DRAWN[n];if("refused"in a)return`blendMode ${n} ${a.refused}`;if(t==="adjustment"&&n!=="normal")return`an adjustment's blendMode ${n}: Chrome draws what an adjustment makes of what lies under it without a blend mode, so an adjustment blends as normal`;if((o.fillOpacity??100)<100&&FILL_INSIDE_BLEND.includes(n))return`fillOpacity under 100 with blendMode ${n}: Photoshop applies it inside the blend, which Chrome cannot`}if(t==="adjustment"&&o.effects!==void 0)return"an adjustment has no effects (as in Photoshop)";const i=o.effects;if(i){for(const[l,s]of[["dropShadow",i.dropShadow],["outerGlow",i.outerGlow]]){if(!s||s.enabled===!1)continue;const d=s.blendMode??EFFECT_DEFAULTS[l].blendMode,f=s.color??EFFECT_DEFAULTS[l].color;if(!L(d,f))return`effects.${l}.blendMode ${d}: an effect under the layer mixes with what lies under it, which a layer's filter cannot read in Chrome; it is drawn as normal, or as multiply or darken in black, or screen or lighten in white, which are the same`}for(const l of EFFECT_NAMES){const s=i[l];if(!(!s||s.enabled===!1))for(const d of[s.blendMode,...l==="bevelEmboss"?[i.bevelEmboss?.highlightMode,i.bevelEmboss?.shadowMode]:[]]){if(d===void 0)continue;const f=BLEND_DRAWN[d];if(d==="passThrough")return`effects.${l}: passThrough is a group's`;if("refused"in f)return`effects.${l} blendMode ${d} ${f.refused}`}}const a=i.stroke;if(a&&a.enabled!==!1){if(t!=="type"&&t!=="shape")return"effects.stroke follows a type layer's glyphs or a shape's path: around other pixels it needs a distance from their edge that Chrome does not draw (feMorphology's is square)";if(t==="type"&&a.position==="inside")return"effects.stroke inside a type layer's glyphs: CSS strokes a glyph about its outline or outside it, not inside alone";if((a.blendMode??"normal")!=="normal")return"effects.stroke blends as normal: a stroke around a layer lies partly over what is under it";if((o.fillOpacity??100)<100)return"fillOpacity under 100 with a stroke: the stroke is drawn with the glyphs or the path, so it would fade with their fill";const l=["innerShadow","innerGlow","bevelEmboss","satin","colorOverlay","gradientOverlay","patternOverlay"].find(s=>i[s]!==void 0&&i[s].enabled!==!1);if(l!==void 0)return`effects.stroke with effects.${l}: the stroke is drawn with the glyphs or the path, so ${l} would cover it, where Photoshop draws the stroke over it`}const p=i.bevelEmboss;if(p&&p.enabled!==!1){if((p.style??"innerBevel")!=="innerBevel")return`effects.bevelEmboss.style ${String(p.style)}: AllyHub draws the inner bevel alone`;if((p.technique??"smooth")!=="smooth")return`effects.bevelEmboss.technique ${String(p.technique)}: AllyHub draws the smooth technique alone`}const w=i.gradientOverlay?.gradient?.style;if(w==="angle"||w==="diamond")return`effects.gradientOverlay.gradient.style ${w}: an SVG gradient is linear or radial (reflected is drawn as a linear one mirrored)`}}function L(o,t){if(o==="normal")return!0;const n=t.toLowerCase().replace(/[\s,]+/gu," ").trim(),i=["#000","#000000","#000000ff","black","rgb(0 0 0)"].includes(n),a=["#fff","#ffffff","#ffffffff","white","rgb(255 255 255)"].includes(n);return(o==="multiply"||o==="darken")&&i||(o==="screen"||o==="lighten")&&a}export function adjustmentRefusal(o){if(o.kind==="brightnessContrast"&&o.useLegacy===!1)return"brightnessContrast with useLegacy false: Photoshop's current Brightness/Contrast is not published, so AllyHub draws the legacy one alone (useLegacy: true)";if(o.kind==="hueSaturation"&&o.colorize===!0)return"hueSaturation with colorize: not drawn yet";if(o.kind==="gradientMap"){const t=o.gradient?.style;if(t!==void 0&&t!=="linear")return`gradientMap's gradient style ${t}: a gradient map reads its gradient along its length alone`}if(o.kind==="curves")for(const t of["rgb","red","green","blue"]){const n=o[t];if(n?.some((i,a)=>a>0&&i[0]<=(n[a-1]?.[0]??-1)))return`curves.${t}: its points are in order of input, each input once`}if(o.kind==="levels")for(const t of["rgb","red","green","blue"]){const n=o[t];if(n&&(n.inputBlack??0)>=(n.inputWhite??255))return`levels.${t}: inputBlack is less than inputWhite`}}export const LAYER_KINDS=["pixel","type","shape","smartObject","adjustment","fill","group"];export function issueOf(o,t=""){const n=o.issues[0];return n?`${[t,...n.path.map(String)].filter(a=>a!=="").join(".")||"it"}: ${n.message}`:`${t} is not what it takes`}export function readLayerStyle(o,t){const n={};for(const p of LAYER_STYLE_FIELDS)o[p]!==void 0&&(n[p]=o[p]);const i=LayerStyleSchema.safeParse(n);if(!i.success)return{problem:issueOf(i.error),why:"invalid"};const a=refusalOf(i.data,t);return a===void 0?{style:i.data}:{problem:a,why:"refused"}}export function styled(o){return o?LAYER_STYLE_FIELDS.some(t=>o[t]!==void 0):!1}
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import type { LayerKind, LayerStyle } from "./layer-style.js";
|
|
2
|
+
import type { Format, SizeInfo } from "./formats.js";
|
|
3
|
+
import type { Look } from "./look.js";
|
|
4
|
+
import type { Combo } from "./matrix.js";
|
|
5
|
+
import type { MediaInfo, Word } from "./media.js";
|
|
6
|
+
/** A rectangle in pixels: x, y, width, height. */
|
|
7
|
+
export type PixelRect = [x: number, y: number, w: number, h: number];
|
|
8
|
+
/** Marks a layer made by footage(), a component or custom(). */
|
|
9
|
+
export declare const LAYER_BRAND = "__allyhubLayer";
|
|
10
|
+
/**
|
|
11
|
+
* A moment in a part: a word of its speech ("inbox"), the nth time it is
|
|
12
|
+
* said ("inbox@2"), shifted by seconds ("inbox+0.2", "inbox@2-0.3"), or
|
|
13
|
+
* seconds from the part's start (a number, or a string that is only one).
|
|
14
|
+
*/
|
|
15
|
+
export type WordRef = string | number;
|
|
16
|
+
/**
|
|
17
|
+
* Where an outer video shows a video item: its film seconds from `from`
|
|
18
|
+
* to `to` play in the outer's part `part`, from the outer's film time
|
|
19
|
+
* `start`, the part starting at `partStart`.
|
|
20
|
+
*/
|
|
21
|
+
export interface ShownIn {
|
|
22
|
+
from: number;
|
|
23
|
+
to: number;
|
|
24
|
+
part: string;
|
|
25
|
+
start: number;
|
|
26
|
+
partStart: number;
|
|
27
|
+
/** Its seconds per outer second; default 1. */
|
|
28
|
+
speed?: number;
|
|
29
|
+
}
|
|
30
|
+
/** What mount and render receive besides the element and props. */
|
|
31
|
+
/** A video drawn inside a layer (StageContext.video). */
|
|
32
|
+
export interface EmbeddedVideo {
|
|
33
|
+
/** Its piece's id. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Seconds. */
|
|
36
|
+
duration: number;
|
|
37
|
+
/** The pixels it is drawn in. */
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
/** Draws its moment t (seconds from its start), settled when it returns; `layout`: for its layout alone. */
|
|
41
|
+
seek(t: number, layout?: boolean): Promise<void>;
|
|
42
|
+
/** Its moment by a reference of its own (an anchor, "@click", or a part's key), in its seconds (momentOf). */
|
|
43
|
+
at(ref: string): number;
|
|
44
|
+
}
|
|
45
|
+
export interface StageContext {
|
|
46
|
+
look: Look;
|
|
47
|
+
/** The format being drawn, e.g. "9x16". */
|
|
48
|
+
format: Format;
|
|
49
|
+
/** Its pixels, orientation and covered edges (safe zone). */
|
|
50
|
+
dims: SizeInfo;
|
|
51
|
+
/**
|
|
52
|
+
* The combo. A layer may read the dimensions and its own part's slot,
|
|
53
|
+
* never another slot's pick (AK-X005): a part is rendered once and
|
|
54
|
+
* reused in every combo that has it.
|
|
55
|
+
*/
|
|
56
|
+
combo: Combo;
|
|
57
|
+
/** The part's length in seconds. */
|
|
58
|
+
dur: number;
|
|
59
|
+
asset(path: string): MediaInfo;
|
|
60
|
+
/**
|
|
61
|
+
* A project file that may not be there (a scenery's bake): its media when
|
|
62
|
+
* it is, undefined when not, with no problem either way. The read is
|
|
63
|
+
* recorded, so the part is drawn again once the file is made.
|
|
64
|
+
*/
|
|
65
|
+
optionalAsset?(path: string): MediaInfo | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* The part's words on its own clock (seconds from the part's start), for
|
|
68
|
+
* captions and karaoke-style layers; empty when the part has no speech.
|
|
69
|
+
*/
|
|
70
|
+
words(): readonly Word[];
|
|
71
|
+
/** Seconds from the part's start of a word reference. */
|
|
72
|
+
at(ref: WordRef): number;
|
|
73
|
+
/** This layer's own window, in seconds from the part's start. */
|
|
74
|
+
layer: {
|
|
75
|
+
start: number;
|
|
76
|
+
end: number;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Where the part shares the screen with the one before it (`enter`) or
|
|
80
|
+
* after it (`exit`), as a transition draws both: in seconds from the
|
|
81
|
+
* part's start, `enter` running from before 0 to where the part shows
|
|
82
|
+
* alone, `exit` from where it stops showing alone to past its end.
|
|
83
|
+
* Absent at a join with nothing shared (a cut).
|
|
84
|
+
*/
|
|
85
|
+
enter?: {
|
|
86
|
+
start: number;
|
|
87
|
+
end: number;
|
|
88
|
+
};
|
|
89
|
+
exit?: {
|
|
90
|
+
start: number;
|
|
91
|
+
end: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Work this layer must finish before anything is drawn, such as a 3D
|
|
95
|
+
* scenery building: the runtime awaits it before the output is ready and
|
|
96
|
+
* before a frame is drawn, whatever the moment. A rejection is reported
|
|
97
|
+
* with the layer, its part and the moment (an error carrying a rule
|
|
98
|
+
* `code`, such as AK-W001, under that rule; else AK-R001); work that
|
|
99
|
+
* does not settle within the piece's seekLimit is AK-P003.
|
|
100
|
+
*/
|
|
101
|
+
wait(work: Promise<unknown>): void;
|
|
102
|
+
/**
|
|
103
|
+
* Reports what went wrong drawing this layer, at any moment (a 3D
|
|
104
|
+
* scenery's shader that does not compile, a screen it cannot draw): the
|
|
105
|
+
* output's problems carry it, with the layer's part, and every command
|
|
106
|
+
* prints it. `code` is a rule's (AK-W006); a code that is not one is
|
|
107
|
+
* AK-R001.
|
|
108
|
+
*/
|
|
109
|
+
report?(p: {
|
|
110
|
+
code: string;
|
|
111
|
+
message: string;
|
|
112
|
+
level?: "error" | "warn";
|
|
113
|
+
}): void;
|
|
114
|
+
/**
|
|
115
|
+
* The caption cues shown in this part, on its own clock (seconds from
|
|
116
|
+
* the part's start), each with its words: built from the speech heard
|
|
117
|
+
* during the part's picture, spelled as the script when there is one.
|
|
118
|
+
* `maxChars` (default 32, 16 for Chinese, Japanese and Korean) and
|
|
119
|
+
* `maxWords` (default none) cap a cue; `keep` lists phrases a cue never
|
|
120
|
+
* breaks inside; a cue never spans two parts.
|
|
121
|
+
* Empty when nothing is said during the part.
|
|
122
|
+
*/
|
|
123
|
+
captions(opts?: CaptionOptions): readonly CaptionTrackCue[];
|
|
124
|
+
/**
|
|
125
|
+
* Where a face is at part time t, in the frame's pixels: from the face
|
|
126
|
+
* track of the topmost footage showing then that has one (check and
|
|
127
|
+
* render make it). Face `id` of that track; by default that layer's speaker
|
|
128
|
+
* (its `speaker` option, else the track's default speaker). Undefined
|
|
129
|
+
* when no footage with a face track shows, or that face is not seen then.
|
|
130
|
+
*/
|
|
131
|
+
face(t: number, id?: number): PixelRect | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Every face at part time t with its id and box, in the frame's pixels:
|
|
134
|
+
* from the face track of the topmost footage showing then that has one.
|
|
135
|
+
* Empty when there is none.
|
|
136
|
+
*/
|
|
137
|
+
faces(t: number): readonly FaceOnFrame[];
|
|
138
|
+
/**
|
|
139
|
+
* The text of the part's layers listed before this one at part time t:
|
|
140
|
+
* each block of text (a line, a paragraph) as that layer draws it then,
|
|
141
|
+
* in the frame's pixels. Layers not showing at t give none. Measures by
|
|
142
|
+
* drawing those layers at t, so call it in mount (list a layer after
|
|
143
|
+
* the ones it should see).
|
|
144
|
+
*/
|
|
145
|
+
texts(t: number): readonly TextBox[];
|
|
146
|
+
/**
|
|
147
|
+
* The areas the format's covered edges take, in the frame's
|
|
148
|
+
* pixels: a strip per covered edge (none for a custom format).
|
|
149
|
+
*/
|
|
150
|
+
covered: readonly PixelRect[];
|
|
151
|
+
/**
|
|
152
|
+
* The content box, [x, y, w, h] in the frame's pixels: clear of the
|
|
153
|
+
* covered areas with a gap, and at least a margin from every side. The
|
|
154
|
+
* same box layout(ctx) gives as left, top, right and bottom with its
|
|
155
|
+
* default options (see contentEdges for how it is computed).
|
|
156
|
+
*/
|
|
157
|
+
content: PixelRect;
|
|
158
|
+
/**
|
|
159
|
+
* The output this layer is in, on its film clock: the part's start, and
|
|
160
|
+
* the film seconds of a reference anywhere in the output (an anchor of
|
|
161
|
+
* any part, "@turn", or a part's key). Reading it makes the part's
|
|
162
|
+
* place in the film part of its identity.
|
|
163
|
+
*/
|
|
164
|
+
readonly film?: {
|
|
165
|
+
readonly start: number;
|
|
166
|
+
/** The part's key. */
|
|
167
|
+
readonly part: string;
|
|
168
|
+
at(ref: string): number;
|
|
169
|
+
/** Where an outer video shows this one (a part's video take, a footage of it); absent at the top. */
|
|
170
|
+
readonly outer?: ShownIn;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* The camera an outer video asks a scenery layer of this name to be drawn
|
|
174
|
+
* from (footage({ camera }) of a video item); undefined: its own.
|
|
175
|
+
*/
|
|
176
|
+
cameraFor?(name: string): unknown;
|
|
177
|
+
/** The drawing scale an outer video asks scenery layers for (footage({ quality })); undefined: their own. */
|
|
178
|
+
readonly sceneryScale?: number;
|
|
179
|
+
/** True in a video drawn inside another (a screen, a part's video take, a footage of a video item). */
|
|
180
|
+
readonly embedded?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* True while the runtime draws a moment only to measure its layout (the
|
|
183
|
+
* check's text and box measurements, ctx.texts): nothing reads this
|
|
184
|
+
* frame's pixels. A layer that paints a canvas no layout depends on (a
|
|
185
|
+
* 3D scenery) may skip painting then; whatever it places in the DOM it
|
|
186
|
+
* still places. False for every frame that is shown or captured.
|
|
187
|
+
*/
|
|
188
|
+
readonly layoutOnly?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Another video of the project, drawn in an element of this layer's (a
|
|
191
|
+
* scenery's screen): the piece this one imported (`import demo from
|
|
192
|
+
* "../demo/video"`), in its own format, in this video's language where
|
|
193
|
+
* it has it. Its parts, speech, anchors and components are its own; it
|
|
194
|
+
* draws its graphic layers over its background (no footage yet), and
|
|
195
|
+
* what it reads counts as this video's. Absent where the host cannot
|
|
196
|
+
* embed.
|
|
197
|
+
*/
|
|
198
|
+
video?(piece: unknown, el: HTMLElement): Promise<EmbeddedVideo>;
|
|
199
|
+
/**
|
|
200
|
+
* Answers a question the host asks every layer of the output by name
|
|
201
|
+
* (`LoadedOutput.ask`): a scenery's cuts, the world times of references,
|
|
202
|
+
* its facts. A layer answers only the questions it registers; the host
|
|
203
|
+
* gets each answer with the layer and part it came from. Absent where
|
|
204
|
+
* the host asks nothing.
|
|
205
|
+
*/
|
|
206
|
+
answer?<K extends keyof LayerQueries>(name: K, handler: (args: LayerQueries[K]["args"]) => LayerQueries[K]["answer"] | Promise<LayerQueries[K]["answer"]>): void;
|
|
207
|
+
/**
|
|
208
|
+
* The page's real clock and timers, which the runtime replaces with the
|
|
209
|
+
* moment's for piece code: for work that must wait on the wall clock (a
|
|
210
|
+
* scenery's model loaders, a decoder's worker), never for what a frame
|
|
211
|
+
* shows.
|
|
212
|
+
*/
|
|
213
|
+
readonly realTimers?: RealTimers;
|
|
214
|
+
}
|
|
215
|
+
/** The page's own clock and timers (StageContext.realTimers). */
|
|
216
|
+
export interface RealTimers {
|
|
217
|
+
now(): number;
|
|
218
|
+
setTimeout(callback: () => void, ms: number): unknown;
|
|
219
|
+
clearTimeout(id: unknown): void;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The questions a layer may answer (StageContext.answer), by name: each
|
|
223
|
+
* its arguments and its answer. Empty here: a package that draws a kind of
|
|
224
|
+
* layer adds its own by declaration merging, e.g.
|
|
225
|
+
*
|
|
226
|
+
* declare module "@allyhub/piece" {
|
|
227
|
+
* interface LayerQueries { "scenery.cuts": { args: undefined; answer: readonly number[] } }
|
|
228
|
+
* }
|
|
229
|
+
*/
|
|
230
|
+
export interface LayerQueries {
|
|
231
|
+
}
|
|
232
|
+
/** An answer to a question, with where it came from (LoadedOutput.ask). */
|
|
233
|
+
export interface LayerAnswer<A> {
|
|
234
|
+
part: string;
|
|
235
|
+
/** The layer's component name, and its index in the part. */
|
|
236
|
+
layer: string;
|
|
237
|
+
index: number;
|
|
238
|
+
answer: A;
|
|
239
|
+
}
|
|
240
|
+
/** A face on the frame (StageContext.faces): its id in the face track, and its box in the frame's pixels. */
|
|
241
|
+
export interface FaceOnFrame {
|
|
242
|
+
id: number;
|
|
243
|
+
box: PixelRect;
|
|
244
|
+
}
|
|
245
|
+
/** A block of another layer's text at a moment (StageContext.texts). */
|
|
246
|
+
export interface TextBox {
|
|
247
|
+
/** The layer's component name. */
|
|
248
|
+
layer: string;
|
|
249
|
+
/** The text. */
|
|
250
|
+
text: string;
|
|
251
|
+
/** Where it is, in the frame's pixels. */
|
|
252
|
+
box: PixelRect;
|
|
253
|
+
}
|
|
254
|
+
/** How a captions layer wants its cues cut (StageContext.captions). */
|
|
255
|
+
export interface CaptionOptions {
|
|
256
|
+
/** Most characters in a cue; default 32 (16 for Chinese, Japanese and Korean). */
|
|
257
|
+
maxChars?: number;
|
|
258
|
+
/** Most words in a cue; default no limit. */
|
|
259
|
+
maxWords?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Phrases a cue never breaks inside (["work harder"]), matched as said
|
|
262
|
+
* (case, accents and punctuation ignored, whole words): the cue around
|
|
263
|
+
* one may run over maxChars or maxWords.
|
|
264
|
+
*/
|
|
265
|
+
keep?: readonly string[];
|
|
266
|
+
/**
|
|
267
|
+
* Seconds: a gap between two cues of a part shorter than this closes,
|
|
268
|
+
* the first held until the next (no flicker); default 0.4.
|
|
269
|
+
*/
|
|
270
|
+
close?: number;
|
|
271
|
+
/**
|
|
272
|
+
* The part's first cue from the part's start and its last to its end,
|
|
273
|
+
* so a caption shows across the part's whole picture and a cut leaves
|
|
274
|
+
* no frame without one; default false (from the first word to the last).
|
|
275
|
+
*/
|
|
276
|
+
edges?: boolean;
|
|
277
|
+
}
|
|
278
|
+
/** A word of a caption cue, as the script spells it, on the part's clock. */
|
|
279
|
+
export interface CaptionWord {
|
|
280
|
+
text: string;
|
|
281
|
+
start: number;
|
|
282
|
+
end: number;
|
|
283
|
+
}
|
|
284
|
+
/** A caption cue on the part's clock, with its words. */
|
|
285
|
+
export interface CaptionTrackCue {
|
|
286
|
+
start: number;
|
|
287
|
+
end: number;
|
|
288
|
+
text: string;
|
|
289
|
+
words: CaptionWord[];
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* A layer's still moment, where what draws it has no time (an image's
|
|
293
|
+
* board): the layer drawn `t` seconds into a window `dur` long, by which
|
|
294
|
+
* an entrance has settled and before an exit begins. A video's part with
|
|
295
|
+
* no still of its own rests at the same distance before its end.
|
|
296
|
+
*/
|
|
297
|
+
export declare const LAYER_STILL: {
|
|
298
|
+
readonly dur: 1;
|
|
299
|
+
readonly t: 0.6;
|
|
300
|
+
};
|
|
301
|
+
/** When a layer starts and stops in its part. Default: the whole part. */
|
|
302
|
+
export interface LayerTiming {
|
|
303
|
+
/** A word reference or seconds from the part's start; default 0. */
|
|
304
|
+
at?: WordRef;
|
|
305
|
+
/** A word reference or seconds from the part's start; default the part's end. */
|
|
306
|
+
until?: WordRef;
|
|
307
|
+
/** Seconds from `at`, when there is no `until`. */
|
|
308
|
+
dur?: number;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Where a component's props hold times (its time() props): `true` for a
|
|
312
|
+
* time or a list of times, an object for the fields of an object (or of
|
|
313
|
+
* each item of a list of objects).
|
|
314
|
+
*/
|
|
315
|
+
export interface TimeShape {
|
|
316
|
+
[prop: string]: true | TimeShape;
|
|
317
|
+
}
|
|
318
|
+
export interface GraphicLayer<P extends object = object> extends LayerTiming, LayerStyle {
|
|
319
|
+
[LAYER_BRAND]: "graphic";
|
|
320
|
+
/**
|
|
321
|
+
* What it is, as psd-tools' classes are: a picture ("pixel"), a type
|
|
322
|
+
* layer, a shape, an adjustment, a fill, a group; default a component
|
|
323
|
+
* ("smartObject", code that draws).
|
|
324
|
+
*/
|
|
325
|
+
kind?: LayerKind;
|
|
326
|
+
/**
|
|
327
|
+
* The layer's name in its part, when it has one: the stage marks its
|
|
328
|
+
* element with it (LAYER_NAME), and what is measured of it is reported
|
|
329
|
+
* by it. An image's boards name every layer.
|
|
330
|
+
*/
|
|
331
|
+
key?: string;
|
|
332
|
+
/** Component name: 'titleCard', 'custom' or a project component's name. */
|
|
333
|
+
component: string;
|
|
334
|
+
props: P;
|
|
335
|
+
/** The props a component exposes, by name, with their semantic types (defineComponent's `props`): what an editor lets a person change. */
|
|
336
|
+
schema?: Readonly<Record<string, unknown>>;
|
|
337
|
+
/** The props that are times: their word references become seconds. */
|
|
338
|
+
times?: TimeShape;
|
|
339
|
+
/**
|
|
340
|
+
* "front" (default): at its place in the part's layers, over those
|
|
341
|
+
* listed before it. "behind-person": with the part's own footage (the
|
|
342
|
+
* footage layer without a file) wherever it is listed, drawn right over
|
|
343
|
+
* its picture and under its speaker, who is cut out with the person
|
|
344
|
+
* matte of the part's take (which check and render make). "overlay": over
|
|
345
|
+
* the finished picture, as an app lays its captions and stickers over a
|
|
346
|
+
* video after it is filmed: over every other layer, and not marked by
|
|
347
|
+
* the camera (`capture`), motion blur, `post` or the LUT.
|
|
348
|
+
*/
|
|
349
|
+
z?: "front" | "behind-person" | "overlay";
|
|
350
|
+
mount(el: HTMLElement, props: P, ctx: StageContext): void;
|
|
351
|
+
render(el: HTMLElement, t: number, props: P, ctx: StageContext): void;
|
|
352
|
+
/**
|
|
353
|
+
* Lets go of what mount made that the page does not free with `el` (a
|
|
354
|
+
* WebGL context, a worker, a timer): a deck mounts a slide's components
|
|
355
|
+
* when it is shown and unmounts them when it is let go, and mounts them
|
|
356
|
+
* again on a new element if it is shown again. State a layer carries from
|
|
357
|
+
* slide to slide is props, never what it kept from a mount.
|
|
358
|
+
*/
|
|
359
|
+
unmount?(el: HTMLElement, props: P, ctx: StageContext): void;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* How the runtime shows and hides a layer's element, and a part's: an
|
|
363
|
+
* attribute a rule of the document's hides (`display: none !important`),
|
|
364
|
+
* never the element's own `display`, which is the layer's (a layer that
|
|
365
|
+
* centres its content with `display: grid` keeps it when shown).
|
|
366
|
+
*/
|
|
367
|
+
export declare const LAYER_OFF = "data-ak-off";
|
|
368
|
+
/** The attribute the stage marks a named layer's element with: its `key`. */
|
|
369
|
+
export declare const LAYER_NAME = "data-ak-layer";
|
|
370
|
+
/** Shows or hides a layer's (or a part's) element. */
|
|
371
|
+
export declare function showLayer(el: HTMLElement, on: boolean): void;
|
|
372
|
+
/** Whether a layer's (or a part's) element is shown. */
|
|
373
|
+
export declare function layerShown(el: HTMLElement): boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Adds the rule that hides what is marked off, once per document, as an
|
|
376
|
+
* adopted style sheet: no element is added, so nothing watching the
|
|
377
|
+
* document's elements sees a change.
|
|
378
|
+
*/
|
|
379
|
+
export declare function addLayerRule(doc: Document): void;
|
|
380
|
+
/** A part's line for captions: as shown and as said, with its words. */
|
|
381
|
+
export interface CaptionLine {
|
|
382
|
+
part: string;
|
|
383
|
+
/** The line as shown, and as spoken. */
|
|
384
|
+
shown: string;
|
|
385
|
+
spoken: string;
|
|
386
|
+
/** The part's words on the film's clock. */
|
|
387
|
+
words: readonly Word[];
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=layer.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 LAYER_BRAND="__allyhubLayer",LAYER_STILL={dur:1,t:.6},LAYER_OFF="data-ak-off",LAYER_NAME="data-ak-layer";export function showLayer(e,t){e.toggleAttribute(LAYER_OFF,!t)}export function layerShown(e){return!e.hasAttribute(LAYER_OFF)}export function addLayerRule(e){if(e.adoptedStyleSheets.some(a=>a.allyhubLayers))return;const t=new CSSStyleSheet;t.replaceSync(`[${LAYER_OFF}] { display: none !important; }`),Object.assign(t,{allyhubLayers:!0}),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}
|