@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
package/docs/layers.md
CHANGED
|
@@ -42,7 +42,7 @@ export const year = part({
|
|
|
42
42
|
const x = tween(t, {
|
|
43
43
|
start: ctx.layer.start,
|
|
44
44
|
dur: 0.4,
|
|
45
|
-
ease: ease.
|
|
45
|
+
ease: ease.out,
|
|
46
46
|
});
|
|
47
47
|
label.style.opacity = String(x);
|
|
48
48
|
label.style.transform = `scale(${String(1.4 - 0.4 * x)})`;
|
|
@@ -194,10 +194,11 @@ A prop declared `time()` (also inside `list()` and `object()`) is typed `Time` i
|
|
|
194
194
|
| --- | --- |
|
|
195
195
|
| `ctx.look` | The look (also the CSS variables `--ak-color-*`, `--ak-font-*`, `--ak-motion-beat`) |
|
|
196
196
|
| `ctx.format` | The format's name: `"9x16"`, `"1280x720"`; a deck's may be `"a4"` |
|
|
197
|
-
| `ctx.dims` | `{ width, height, orient, safe
|
|
197
|
+
| `ctx.dims` | `{ width, height, orient, safe }` ([video.md](video.md#formats)) |
|
|
198
198
|
| `ctx.combo` | The combo. A layer may read the dimensions and its own part's slot, never another slot's pick (AK-X005): a part is rendered once for every combo that has it |
|
|
199
199
|
| `ctx.dur` | The part's length, seconds |
|
|
200
200
|
| `ctx.layer` | `{ start, end }`: this layer's window, seconds from the part's start |
|
|
201
|
+
| `ctx.enter`, `ctx.exit` | `{ start, end }`: where a transition shares the screen with the part before (`enter`, from before 0) or after (`exit`, to past `ctx.dur`), seconds from the part's start; absent at a cut. An entrance that starts at `ctx.enter.end` plays once the part shows alone |
|
|
201
202
|
| `ctx.asset(path)` | Media at a path relative to the piece's file |
|
|
202
203
|
| `ctx.optionalAsset?.(path)` | Media that may not be there (a scenery's bake): `undefined` when it is not, with no problem; the part is drawn again once it is made |
|
|
203
204
|
| `ctx.words()` | The part's words on its own clock, `[{ text, start, end }]`; empty without speech |
|
|
@@ -220,7 +221,7 @@ A prop declared `time()` (also inside `list()` and `object()`) is typed `Time` i
|
|
|
220
221
|
`layout(ctx, opts?)` gives `{ W, H, k, orient, pad, top, bottom, left, right }`; `ctx.content` is the same box as `[x, y, w, h]`. In pixels:
|
|
221
222
|
|
|
222
223
|
```
|
|
223
|
-
k = min(W, H) / 1080 the type scale: 1 in every preset
|
|
224
|
+
k = min(W, H) / 1080 the type scale: 1 in every preset
|
|
224
225
|
margin = 120 × k (landscape), 84 × k (portrait, square)
|
|
225
226
|
pad = max(margin, safe.left, safe.right)
|
|
226
227
|
top = max(pad, safe.top + 30 × k)
|
|
@@ -275,18 +276,23 @@ From `@allyhub/sdk`; pure functions.
|
|
|
275
276
|
| `pathLength(d)`, `pointAtLength(d, l)`, `tangentAtLength(d, l)` | An SVG path measured without the browser |
|
|
276
277
|
| `drawOn(d, progress)` | `{ strokeDasharray, strokeDashoffset }` showing the first `progress` of a stroke |
|
|
277
278
|
| `trimPath(d, from, to)`, `interpolatePath(a, b, x)`, `normalizePath(d)` | A stretch of a path (fractions of its length); the path between two with the same commands (it throws otherwise); absolute commands |
|
|
279
|
+
| `routeConnections(boxes, connections, { margin?, bend?, spread?, cross?, bounds? })` | Routes at right angles from a side of one box to a side of another, round every other box: an orthogonal grid round the boxes grown by `margin` (default 16), the cheapest way with each bend costed as `bend` of length (48) and each crossing of another line as `cross` (120), each line then routed again round the others while that crosses fewer (rip-up and reroute), lines sharing a channel set `spread` apart (8) in the order that crosses fewest (each pair followed on to where it parts, and set on the side it turns to there); within `bounds` when given; each route's corners and the sides it uses (`ROUTE_DEFAULTS`). Crossings left are the boxes' placement's: `routeCrossings(routes)` counts them |
|
|
278
280
|
| `noise2D(seed, x, y)`, `noise3D(seed, x, y, z)`, `noise4D(seed, x, y, z, w)` | Seeded simplex noise in [−1, 1], changing over about one unit |
|
|
279
281
|
|
|
280
282
|
## A person's input
|
|
281
283
|
|
|
282
|
-
A cursor, a
|
|
284
|
+
A mouse's cursor, a hand (a finger hovering a screen, or a thing held to it), a finger's tap, a drag, a scrolled list or a field typed into, as functions of time. They place nothing: the piece says where and when, and draws what they return. Defaults: `INPUT_DEFAULTS` ([defaults.md](defaults.md)).
|
|
285
|
+
|
|
286
|
+
- **A cursor** glides: an aimed movement timed by Fitts' law, landing exactly where it is aimed, with none of a hand's errors; it rests before a click and after it. A hand's errors are options (`overshoot`, `scatter`, `bow`, `tremor`), none by default.
|
|
287
|
+
- **A hand** errs as hands do: past its target and back, a little off, its path bowed, trembling, each move drawn differently by `seed` and `index`. For what a hand holds or touches.
|
|
283
288
|
|
|
284
289
|
| Function | Returns |
|
|
285
290
|
| --- | --- |
|
|
286
|
-
| `
|
|
291
|
+
| `cursor({ from, steps: [{ at, to, size?, press?, duration?, dwell?, hold?, after? }], dwell?, hold?, after?, …reach })` | `{ at(t) → { x, y, down }, moves, presses }` |
|
|
292
|
+
| `handPath({ from, steps: [{ at, to, size?, press?, duration?, dwell?, hold? }], dwell?, hold?, …reach })` | The same, moved by a hand |
|
|
287
293
|
| `reach(from, to, { end, duration?, size?, index? }, reach?)` | One movement: `{ start, end, from, to, at(t), progress(u), bow }` |
|
|
288
|
-
| `tap({ at, to, hold?, slide?, grow?, size?, scatter?, seed?, index? })` | `{ down, up, at(t) → { x, y, down, contact } }` |
|
|
289
|
-
| `drag({ from, to, at, duration?, size?, settle?, release?, index?, …reach })` | `{ down, start, end, up, to, at(t) → { x, y, down } }` |
|
|
294
|
+
| `tap({ at, to, hold?, slide?, grow?, size?, scatter?, seed?, index? })` | A finger's: `{ down, up, at(t) → { x, y, down, contact } }` |
|
|
295
|
+
| `drag({ by?, from, to, at, duration?, size?, settle?, release?, index?, …reach })` | `{ down, start, end, up, to, at(t) → { x, y, down } }`: `by: "mouse"` (default) glides and holds still while down, `"finger"` moves as a hand and trembles |
|
|
290
296
|
| `scroll({ at, by, kind?, limit?, wheel?, flick?, seed?, index? })` | `{ start, end, at(t) → px }`: `"flick"` (default) with momentum, or `"wheel"` notches |
|
|
291
297
|
| `typing(text, { at, cps?, spread?, word?, mark?, think?, mistakes?, notice?, backspace?, seed? })` | `{ keys, times, end, text(t) }`; `mistakes: [{ at, typed }]` types one and corrects it (none unless asked) |
|
|
292
298
|
| `fittsTime(distance, size, fitts?)` | `a + b · log2(1 + distance / size)` seconds |
|
|
@@ -294,11 +300,13 @@ A cursor, a fingertip, a scrolled list or a field typed into, as functions of ti
|
|
|
294
300
|
|
|
295
301
|
The reach options are `overshoot`, `peak`, `vary`, `fitts: { a, b }`, `scatter`, `jitter`, `bow`, `tremor: { px, frequency }` and `seed`.
|
|
296
302
|
|
|
303
|
+
A cursor on an interface the piece draws is best `uiDemo`'s (below): it finds each element where it is when it is acted on. A cursor of a layer's own goes to the points the piece gives it:
|
|
304
|
+
|
|
297
305
|
```ts
|
|
298
|
-
import {
|
|
306
|
+
import { cursor, custom } from "@allyhub/sdk";
|
|
299
307
|
import { h, one, tag } from "@allyhub/sdk/dom";
|
|
300
308
|
|
|
301
|
-
const
|
|
309
|
+
const path = cursor({
|
|
302
310
|
from: [200, 900],
|
|
303
311
|
steps: [
|
|
304
312
|
{ at: 1, to: [960, 540], size: 120, press: true },
|
|
@@ -306,7 +314,7 @@ const hand = pointer({
|
|
|
306
314
|
],
|
|
307
315
|
});
|
|
308
316
|
|
|
309
|
-
export const
|
|
317
|
+
export const arrow = custom({
|
|
310
318
|
mount(el) {
|
|
311
319
|
el.append(
|
|
312
320
|
tag(
|
|
@@ -324,7 +332,7 @@ export const cursor = custom({
|
|
|
324
332
|
render(el, t) {
|
|
325
333
|
const dot = one(el, "cursor");
|
|
326
334
|
if (!dot) return;
|
|
327
|
-
const p =
|
|
335
|
+
const p = path.at(t);
|
|
328
336
|
dot.style.transform = `translate(${String(p.x - 12)}px, ${String(p.y - 12)}px) scale(${p.down ? "0.8" : "1"})`;
|
|
329
337
|
},
|
|
330
338
|
});
|
|
@@ -336,8 +344,9 @@ The SDK has no components of its own. `allyhub add component/<name>` (`component
|
|
|
336
344
|
|
|
337
345
|
| Component | What it does |
|
|
338
346
|
| --- | --- |
|
|
339
|
-
| `
|
|
347
|
+
| `uiDemo` (and `screenDemo`, same file) | A product's interface acted on: `uiDemo` draws it from the project's own UI components (`build(page)`), `screenDemo` from a screenshot with its elements file (`allyhub frames web`). Each step names what it acts on (a CSS selector in the page), found where it is at that moment: the camera goes in on it, the cursor lands inside it (`cursor.aim`, a share of its box) and clicks, types into it or presses it |
|
|
340
348
|
| `codePanel` | Code, data or a terminal in a panel: coloured, typed or revealed, lines and spans highlighted in time |
|
|
341
|
-
| `callout` | Marks places
|
|
349
|
+
| `callout` | Marks places, labels them and draws lines between them. A place is another layer's element (a CSS selector), measured every frame, so a mark stays on it through a change of layout or a camera move. `fit: "text"` pads from the text as it reads (capitals' tops to baseline, ink to ink), so equal pads look equal |
|
|
350
|
+
| `connector` | Lines between named elements (CSS selectors of the frame's other layers) at right angles, round every other box and what `avoid` names, an arrow at the end; lines sharing a channel set apart. `allyhub inspect pages` reports how many times its lines cross. List it last in a component's `layers` |
|
|
342
351
|
| `chart` | Bars, horizontal bars, a line or a ring, with its scale, labels fitted and the draw-on |
|
|
343
352
|
| `captionWord`, `captionLine`, `captionSubtitle` | Captions from `ctx.captions()`: a word at a time; a line with the word being said marked; a quiet subtitle |
|
package/docs/modeling.md
CHANGED
|
@@ -4,7 +4,7 @@ A prop no library has is modelled in code with `@allyhub/model`: a subset of Ble
|
|
|
4
4
|
|
|
5
5
|
## A model module
|
|
6
6
|
|
|
7
|
-
A model module's default export is `defineModel(build)
|
|
7
|
+
A model module's default export is `defineModel(build)`, or `defineModel({ title, build })`: `title` is the item's name where `allyhub.yaml` gives it none, read from the module as written (a string, not computed); without either, its file's name. A model made to be used again is an item of its own, listed in `allyhub.yaml` as `kind: model` ([project.md](project.md#items)) (`models/desk/desk.ts`), made once and put in any scenery that imports it, each with its own parameters (a size, a finish). It opens alone in the scenery's viewer (`allyhub dev`, Studio), `allyhub check` builds it (one that does not build is AK-B010), and `allyhub render` writes its GLB, by its id. AllyHub's registry has products as model pieces to start from (`allyhub add 3d-model/monitor` adds `models/monitor/monitor.ts` and the kit it is built with; `allyhub add search --type 3d-model` lists them). A part only one scenery uses may stay a module beside it (`room/stick.ts`) that the list does not name: the scenery's alone. `@allyhub/model` is lent by the CLI, with no `package.json` entry.
|
|
8
8
|
|
|
9
9
|
```ts file=room/stick.ts
|
|
10
10
|
import { defineModel } from "@allyhub/model";
|
|
@@ -100,16 +100,16 @@ The surface's detail is about one `cell`.
|
|
|
100
100
|
## Build and measure
|
|
101
101
|
|
|
102
102
|
- `allyhub 3d-model <file> --inspect` evaluates it without writing anything: each object's parent, matrix, bounds after its modifiers (Blender's Z-up metres), triangles, materials as glTF reads them, UV layers, a curve's splines, and the objects left with no triangles.
|
|
103
|
-
- `allyhub 3d-model <file>` writes a GLB (Y up), by default `.allyhub/out/<module>.glb
|
|
103
|
+
- `allyhub 3d-model <file>` writes a GLB (Y up), by default `.allyhub/out/<module>.glb`; `--out` names another (`assets/media/models/<name>.glb` to load it as media). A failed build leaves the last GLB in place.
|
|
104
104
|
- A build is kept in `.allyhub/cache/model/` while the module, the files it read, its folder's files, its parameters and seed are unchanged; `--fresh` builds anew.
|
|
105
105
|
- The program is trusted project code, run in a child process; its logs go to stderr. An error names the call and the place in the project's files it failed at.
|
|
106
106
|
- A subdivision surface lies inside its cage: measure the surface (`--inspect`), not the cage.
|
|
107
107
|
|
|
108
108
|
## In a scenery
|
|
109
109
|
|
|
110
|
-
`modelObject(w, model, parameters?, options?)` from `@allyhub/model/three` builds the model in the scenery's page (a model item is imported by its path, `import desk from "../../models/desk/
|
|
110
|
+
`modelObject(w, model, parameters?, options?)` from `@allyhub/model/three` builds the model in the scenery's page (a model item is imported by its path, `import desk from "../../models/desk/desk.ts"`, as any module), drawn as its GLB is, its images read through `w.texture`. It returns a `Group` not yet in the scene, whose own rotation turns Z up to Y up: place and turn it inside a group of the scenery's own. A model built once into a GLB loads as any model instead (`import`, `w.load`), and stays as built until built again.
|
|
111
111
|
|
|
112
|
-
```ts file=room/
|
|
112
|
+
```ts file=room/room.ts
|
|
113
113
|
import { Group, Mesh, MeshPhysicalMaterial } from "three";
|
|
114
114
|
import { defineScenery } from "@allyhub/scenery-host/layer";
|
|
115
115
|
import { modelObject } from "@allyhub/model/three";
|
package/docs/pictures.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Pictures
|
|
2
|
+
|
|
3
|
+
`picture()` is a layer that shows a still (PNG, JPEG, WebP, AVIF, GIF or SVG) in CSS's terms. It is a graphic layer of the layer contract ([layers.md](layers.md)), so a video's part, a deck's component and a doc's component draw it alike. `footage()` of a still is the same layer ([below](#footage-of-a-still)). A deck's own pictures keep PowerPoint's crop ([slides.md](slides.md)), worked out from the same geometry.
|
|
4
|
+
|
|
5
|
+
```ts file=launch/film/film.ts
|
|
6
|
+
import { part, picture, video } from "@allyhub/sdk";
|
|
7
|
+
|
|
8
|
+
import plate from "../../assets/media/plates/desk.webp";
|
|
9
|
+
|
|
10
|
+
export default video({
|
|
11
|
+
format: "9x16",
|
|
12
|
+
parts: () => [
|
|
13
|
+
part({
|
|
14
|
+
key: "open",
|
|
15
|
+
dur: 3,
|
|
16
|
+
layers: [
|
|
17
|
+
picture({ src: plate, fit: "cover", position: [0.62, 0.4] }),
|
|
18
|
+
picture({
|
|
19
|
+
src: "./product.png",
|
|
20
|
+
box: [0.1, 0.55, 0.8, 0.35],
|
|
21
|
+
fit: "contain",
|
|
22
|
+
radius: 32,
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Option | Type | Default | What it is |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| `src` | an import, or a path from the module | (required) | The still |
|
|
33
|
+
| `box` | `[x, y, w, h]`, fractions of the layer's frame | the whole frame | Where it shows; nothing outside it |
|
|
34
|
+
| `fit` | `"cover"`, `"contain"`, `"fill"`, `"none"` | `"cover"` | CSS's `object-fit` |
|
|
35
|
+
| `position` | `[x, y]`, shares of the picture | `[0.5, 0.5]` | CSS's `object-position` in percentages: the point at `x`, `y` of the picture lies at `x`, `y` of the box |
|
|
36
|
+
| `crop` | `[x, y, w, h]`, fractions of the source | none | The part of the source fitted, as the whole picture would be; nothing outside it shows |
|
|
37
|
+
| `mask` | `"ellipse"`, a picture, or a CSS `mask-image` | none | `"ellipse"`: the ellipse inscribed in the box. A picture (an import, or a path with an image's extension): its alpha masks the box. Anything else is CSS: `"linear-gradient(black 60%, transparent)"`. Or a mask's object, every layer's ([image.md](image.md)): its density, feather, inversion, or a path; laid over the box |
|
|
38
|
+
| `radius` | px of the frame, or a CSS `border-radius` | none | The box's corners |
|
|
39
|
+
| `blendMode` | Photoshop's names ([image.md](image.md)) | `normal` | Every layer's: how it mixes with what is drawn under it, drawn on what shows of it |
|
|
40
|
+
| `filter` | a CSS `filter` | none | `"blur(8px) saturate(0.8)"` |
|
|
41
|
+
| `alt` | string | none | What a screen reader says |
|
|
42
|
+
|
|
43
|
+
Besides these, the layer options of any graphic layer: `at`, `until`, `dur`, `z` ([video.md](video.md#layers)).
|
|
44
|
+
|
|
45
|
+
- **The geometry** is `placePicture` of `@allyhub/piece`, the numbers in [defaults.md](defaults.md) (`PICTURE_DEFAULTS`). `none` draws a pixel of the source on a pixel of the frame.
|
|
46
|
+
- **Lengths** (`radius`, a `filter`'s blur) are the frame's pixels, as CSS's, not px at 1080p as footage's.
|
|
47
|
+
- **A blend mode** mixes with what the stage draws under it: graphic layers and other pictures. A video file's footage is not drawn by the stage in a render (it is composited after), so a picture over footage blends there with the graphics alone; the live preview blends it with the footage too.
|
|
48
|
+
- **Chrome draws it**, from the file alone: the same moment draws the same in order and out of order (AK-D002). A file that is not there is AK-A001; one that does not load AK-A005.
|
|
49
|
+
|
|
50
|
+
## Changing a picture's pixels
|
|
51
|
+
|
|
52
|
+
A picture's pixels are changed by AllyHub's cloud tools, each its own command (`allyhub ai-media <tool>`; `allyhub help ai-media <tool>` gives its input, its limits and its price): `generate-image`, `edit-image` (where a `mask` or a `markup` says, when given), `extend-image` and `cut-out-image` (the cut-out and its matte). A picture's parts as layers are the agent's to make: a part cut out (`cut-out-image`) and the picture without it (`edit-image` with a mask). No tool takes a model: what serves each is the cloud's to choose.
|
|
53
|
+
|
|
54
|
+
- **A picture on this computer** goes in by the address `allyhub upload` gives it.
|
|
55
|
+
- **What a call makes** is a new file, never the picture given changed, with its record beside it (`<file>.gen.json`: the tool, the whole input, what it returned, the credits). The same call to the same `--file` finds that file and calls nothing. Files the output names deeper (a matte, the layers) are downloaded beside it, each listed in the result.
|
|
56
|
+
- **Outside a mask** the model may redraw a little: what is kept exactly, and how, is the code's.
|
|
57
|
+
- **A Mark up note's region** is SVG path data in the pixels of the picture whose file it names.
|
|
58
|
+
|
|
59
|
+
## `footage()` of a still
|
|
60
|
+
|
|
61
|
+
`footage(still, opts)` is `picture()` with footage's options read as its: `at`, `until`, `dur`, `box` (one rectangle, or `"full"`), `fit`, `crop` (one rectangle), `reframe` (`"center"` or `{ x, y }`: its position; `"face"` throws, since a still has no face track yet), `shape: "circle"` (an ellipse mask) and `radius` (px at 1080p). A still has no time or sound of its own: any other option throws, and so do box keyframes and a box or crop per frame shape.
|
|
62
|
+
|
|
63
|
+
## A deck's pictures
|
|
64
|
+
|
|
65
|
+
A deck's picture keeps PowerPoint's model: its file stretched over its frame after `crop` (`a:srcRect`, the share cut from each side; a negative share is space left beside it). The editor's Crop menu has PowerPoint's Fill and Fit: Fill crops the picture to fill its frame, Fit fits it inside, each centred, the frame kept. Both are `placePicture`'s cover and contain written as `crop`, so a deck's picture and a `picture()` at the same point of the same plate, in frames of one shape, show the same part of it.
|
package/docs/project.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# A project
|
|
2
2
|
|
|
3
|
-
An AllyHub project is a folder, laid out as its people like, and a TypeScript (Node) project. AllyHub finds what it holds by two things only:
|
|
3
|
+
An AllyHub project is a folder, laid out as its people like, and a TypeScript (Node) project. AllyHub finds what it holds by two things only: its list of work, `allyhub.yaml`, and imports. This file covers the folders, the items, how a piece imports the SDK and other files, the words it reads, `allyhub.config.ts` and fonts.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
package.json depends on allyhub and @allyhub/sdk
|
|
7
7
|
tsconfig.json the compiler's settings: the SDK's types
|
|
8
|
+
allyhub.yaml the work a person sees: each piece's kind, file and title
|
|
8
9
|
allyhub.config.ts the project's settings, the look, fonts (optional)
|
|
9
10
|
AGENTS.md, CLAUDE.md the project's standing instructions (CLAUDE.md is @AGENTS.md)
|
|
10
11
|
.gitignore node_modules/ and .allyhub/
|
|
@@ -54,31 +55,48 @@ This computer's own: never shared, rebuilt as needed. Nothing a piece imports ma
|
|
|
54
55
|
| Folder | What is in it |
|
|
55
56
|
| --- | --- |
|
|
56
57
|
| `.allyhub/work/` | The agent's working files, free to throw away: frame sheets, cut sheets, references (`reference/`) |
|
|
57
|
-
| `.allyhub/out/` | Renders and exports, by the item's
|
|
58
|
+
| `.allyhub/out/` | Renders and exports, by the item's id |
|
|
58
59
|
| `.allyhub/cache/` | What the tools rebuild: builds, the media index (face tracks, mattes, levels), the part cache, types |
|
|
59
60
|
| `.allyhub/trash/` | What a person deleted in an editor, kept until they empty it |
|
|
60
61
|
|
|
61
62
|
## Items
|
|
62
63
|
|
|
63
|
-
An item is a
|
|
64
|
+
An item is a piece of work a person sees: a file of a kind, named by the project's list, `allyhub.yaml` at its root. Files are yours to name and place; the list says what a person sees in Studio and `allyhub dev`, in its order, under its headings:
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- An item's **place** is its folder's path from the project's root (`launch/film`). A piece's `id` is its place unless it sets `id` (lowercase letters, digits, `.`, `_` and `-`, with `/` between levels). Two pieces with one id are AK-B001. The id names its message keys (`launch/film` reads keys under `launch.film.`) and seeds its randomness.
|
|
66
|
+
```yaml
|
|
67
|
+
work:
|
|
68
|
+
- group: Launch
|
|
69
|
+
items:
|
|
70
|
+
- kind: video
|
|
71
|
+
file: launch/film.ts
|
|
72
|
+
title: Launch film, 30 s
|
|
73
|
+
- kind: video
|
|
74
|
+
file: launch/vertical/film.ts
|
|
75
|
+
- kind: slides
|
|
76
|
+
file: decks/seed.ts
|
|
77
|
+
- kind: doc
|
|
78
|
+
file: notes/brief.mdx
|
|
79
|
+
```
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
| Kind | Item | Its file holds |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| `video` | A video | `export default video({ … })` ([video.md](video.md)) |
|
|
84
|
+
| `slides` | A deck | `export default presentation({ slides, script, size }, (prs) => { … })` from `@allyhub/sdk/slides`, naming its slides file and its script ([slides.md](slides.md)) |
|
|
85
|
+
| `image` | An image | `export default image({ script, boards })` from `@allyhub/sdk/image`, naming its script ([image.md](image.md)) |
|
|
86
|
+
| `scenery` | A 3D scenery | `export default defineScenery({ … })` ([scenery.md](scenery.md)) |
|
|
87
|
+
| `model` | A 3D model | `export default defineModel(build)` ([modeling.md](modeling.md)) |
|
|
88
|
+
| `doc` | A doc | The doc itself, MDX ([docs.md](docs.md)) |
|
|
89
|
+
| `sheet` | A sheet | The workbook, YAML: its sheets, cells, formulas, formats, names and checks; the CSV files it names hold its tables' rows, and the module its `code` names makes sheets ([sheets.md](sheets.md)) |
|
|
90
|
+
| `website` | A website | JSON: how the web project in its folder is served, built and where the built site is ([websites.md](websites.md)) |
|
|
91
|
+
| (none) | A canvas | A `.canvas` file, JSON Canvas: its editor opens it by its name, so its entry names no `kind` (`- file: boards/launch.canvas`) |
|
|
92
|
+
|
|
93
|
+
- Each piece has its `kind`, its `file` from the project's root and, if you want, a `title`: its name where people see it; without one, the title its file says, else the file's name. A `group` is a heading over its `items`, and groups nest. A new project's list is `work: []`; an item a person makes in Studio or `allyhub dev` is added at its end.
|
|
94
|
+
- A file the list does not name is yours alone: a scenery a video imports, a part, a helper, a draft. Nothing shows it to a person; the build still follows imports to it.
|
|
95
|
+
- An item's **id** is its file without its extension (`launch/film`), one in the project: it names the item in commands (`allyhub check launch/film`, `--piece launch/film`), in `.allyhub/out/` and in a share. A piece's `id` is its item's unless it sets `id` (lowercase letters, digits, `.`, `_` and `-`, with `/` between levels). Two pieces with one id are AK-B001. The id names its message keys (`launch/film` reads keys under `launch.film.`) and seeds its randomness.
|
|
96
|
+
- An item names the other files it uses, each from its own file's folder: a piece's script (`script: "./film.{locale}.yaml"`), a deck's slides file (`slides: "./deck.yaml"`), a sheet's code (`code: ./forecast.ts`) and its tables' CSV files. Nothing is found by a fixed name, so items share a folder freely, and two share a file only when both name it.
|
|
97
|
+
- `allyhub check` reports what is wrong with the list: a list it cannot read, a kind not loaded, a file listed with no kind that no editor opens by its name, or a file not there (AK-M002), one id twice (`a.ts` and `a.mdx`, or one file listed twice, AK-M003). Moving or renaming a listed file in Studio writes the list again, with the imports.
|
|
98
|
+
|
|
99
|
+
### The item's file
|
|
82
100
|
|
|
83
101
|
- The default export is `video({ … })` or `presentation(…)` written in the file, or a constant holding one (`const film = video({ … }); export default film`). A re-export, a factory function or a conditional is not followed (AK-M001).
|
|
84
102
|
- The module's top level runs in Node when the build reads the piece: what needs `window` or `document` goes in `parts` (or `pages`) or in a layer's `mount` and `render`. The top level may not use the network (AK-B003) and must finish (AK-B004).
|
|
@@ -90,7 +108,7 @@ A project file imports `@allyhub/sdk`; the build gives it the SDK with `video`,
|
|
|
90
108
|
|
|
91
109
|
An item uses another by an ordinary relative import. A piece in another format is an item of its own:
|
|
92
110
|
|
|
93
|
-
```ts file=launch/film
|
|
111
|
+
```ts file=launch/film.ts
|
|
94
112
|
import { part, say, video } from "@allyhub/sdk";
|
|
95
113
|
|
|
96
114
|
export default video({
|
|
@@ -102,13 +120,13 @@ export default video({
|
|
|
102
120
|
});
|
|
103
121
|
```
|
|
104
122
|
|
|
105
|
-
```ts file=launch/
|
|
123
|
+
```ts file=launch/vertical/film.ts
|
|
106
124
|
import { video } from "@allyhub/sdk";
|
|
107
125
|
|
|
108
|
-
import film from "../film
|
|
126
|
+
import film from "../film.ts";
|
|
109
127
|
|
|
110
|
-
// Its music is still launch/
|
|
111
|
-
export default video({ ...film,
|
|
128
|
+
// Its music is still launch/music/bed.mp3; its id is launch/vertical/film.
|
|
129
|
+
export default video({ ...film, format: "9x16" });
|
|
112
130
|
```
|
|
113
131
|
|
|
114
132
|
- `video()` returns its fields as written, so a piece can spread another. A copy of a piece that sets `id` needs an `id` of its own.
|
|
@@ -118,9 +136,9 @@ export default video({ ...film, id: "launch/film-vertical", format: "9x16" });
|
|
|
118
136
|
|
|
119
137
|
All the text people see or hear is read with `s(key)` (the parts function's `ctx.s`). An item's own words are its **script**; words several items share are in `assets/text/<lang>.json`.
|
|
120
138
|
|
|
121
|
-
###
|
|
139
|
+
### Scripts
|
|
122
140
|
|
|
123
|
-
|
|
141
|
+
An item's script is one file per language, which the item names from its module's folder, with `{locale}` once in the file's name standing for each: `video({ script: "./film.{locale}.yaml", … })` reads `film.en.yaml`, `film.zh-cn.yaml`; a deck names its own in `presentation({ script })` ([slides.md](slides.md#the-script)). A video without `script` has no words of its own.
|
|
124
142
|
|
|
125
143
|
```yaml
|
|
126
144
|
title: Tidyform launch
|
|
@@ -148,10 +166,12 @@ The script becomes messages under the piece's prefix (its id with `/` as `.`):
|
|
|
148
166
|
| `text.<name>` | `<prefix>.<name>` |
|
|
149
167
|
| `parts[].say` | `<prefix>.<part>.say` |
|
|
150
168
|
| `parts[].screen.<name>` | `<prefix>.<part>.<name>`; names nest, a list is numbered (`<prefix>.how.steps.0`) |
|
|
169
|
+
| `slides[].text.<name>` | `<prefix>.<slide>.<name>`, a deck's shape's words ([slides.md](slides.md)) |
|
|
170
|
+
| `boards[].text.<name>` | `<prefix>.<board>.<name>`, an image's layer's words ([image.md](image.md)) |
|
|
151
171
|
|
|
152
|
-
- A row's `id` is a part's `key`; a row has `id`, `say` and `screen`, nothing else. A row for a part the video does not have yet is allowed.
|
|
172
|
+
- A row's `id` is a part's `key`; a row has `id`, `say` and `screen`, nothing else. A row for a part the video does not have yet is allowed. A video's words are under `parts`, a deck's under `slides`, an image's under `boards` (`id` and `text`), each by its kind's own name for what it is made of.
|
|
153
173
|
- A `say` is one line, or a plural: it may hold anchors (`@{name}`) and text shown one way and said another (`<12|twelve>`) ([speech.md](speech.md)). A text on screen is a string, `{ display, speak }`, a plural, a list, or texts by name.
|
|
154
|
-
- A file that is not YAML or not a script, and a key made twice, are AK-M007. A script
|
|
174
|
+
- A file that is not YAML or not a script, and a key made twice, are AK-M007. A script no item names is not read.
|
|
155
175
|
|
|
156
176
|
### `assets/text/<lang>.json`
|
|
157
177
|
|
|
@@ -188,7 +208,7 @@ A key is segments of letters, digits, `_` and `-` joined by dots. A value is a s
|
|
|
188
208
|
|
|
189
209
|
- `hint` is `{ max?, note? }`: a length budget and a note for whoever writes the text. It changes nothing.
|
|
190
210
|
- A key missing in the combo's language falls back to the default language (AK-S002, a warning); missing there too, it is `""` (AK-S001).
|
|
191
|
-
-
|
|
211
|
+
- A piece's languages are its script's and `assets/text/`'s, ordered with `allyhub.config.ts`'s `locales` first, else `en`; a piece's `matrix.dims.lang` narrows them ([batches.md](batches.md)). Each language is a combo of the piece.
|
|
192
212
|
- A line may mark stretches: `**strong**`, `*em*`, `~~struck~~`, `` `code` ``. `s()` returns the line as written; `readMarks`, `markRuns` and `withoutMarks` read it, and `marked()` from `@allyhub/sdk/dom` draws it ([layers.md](layers.md)).
|
|
193
213
|
- Text written in code is drawn as written, in every language.
|
|
194
214
|
|
|
@@ -196,9 +216,9 @@ A key is segments of letters, digits, `_` and `-` joined by dots. A value is a s
|
|
|
196
216
|
|
|
197
217
|
A file is used by importing it, by a string path relative to the module that names it, or by `ctx.asset(path)` and `ctx.data(path)` for a path made at run time (relative to the piece's file).
|
|
198
218
|
|
|
199
|
-
A share of one item serves only what the item reaches: the files
|
|
219
|
+
A share of one item serves only what the item reaches: the files its kind's build lists for it (its file, its script, a deck's slides file, a sheet's code and tables, a doc's pictures and sources), what its code imports, what its slides show, and what a path named at run time read when the check last loaded it, never its folder's other files. A file named only at run time is in its share once the check has run since.
|
|
200
220
|
|
|
201
|
-
```ts file=launch/plans/
|
|
221
|
+
```ts file=launch/plans/plans.ts
|
|
202
222
|
import { custom, part, video } from "@allyhub/sdk";
|
|
203
223
|
|
|
204
224
|
import logo from "../../assets/media/logo.svg";
|
package/docs/scenery.md
CHANGED
|
@@ -4,9 +4,9 @@ A scenery is three.js the agent writes, in a module whose default export is `def
|
|
|
4
4
|
|
|
5
5
|
## A scenery is an item
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A scenery a person sees is listed in `allyhub.yaml` as `kind: scenery` ([project.md](project.md#items)). A person looks round it in Studio and `allyhub dev`'s page at scenery time 0, selecting a placed object (the outermost named one) and its named `cameras`, never editing it; a note on it names the object, its size, the point clicked and the view as an `allyhub scenery view` command. A scenery module the list does not name (one a video imports, a setting several share) is code, yours alone; the stage knows a scenery module by what it is (it calls `defineScenery`), not by its name.
|
|
8
8
|
|
|
9
|
-
- A video imports a scenery item by its path, as any module: `import room from "../room/
|
|
9
|
+
- A video imports a scenery item by its path, as any module: `import room from "../room/room.ts"`.
|
|
10
10
|
- A path a scenery reads that starts with `./` or `../` (`w.texture("./wood.jpg")`, `w.load("./desk.glb")`, a model's image) is from the scenery's own module; any other is from the project's root. An import (`import desk from "./desk.glb"`) is the same. Kept in its folder and named from there, a scenery works wherever the folder goes.
|
|
11
11
|
- `three` (r186, 0.186.1), `three/addons/…`, `three/webgpu` and `three/tsl` are imported by name with no `package.json`: the CLI lends them, unless the project declares its own `three`. So are `@allyhub/scenery-host/layer` (everything in this file) and `@allyhub/model` ([modeling.md](modeling.md)). Their types come with the project's `allyhub` once `allyhub/client` is in tsconfig.json's `types`, beside `@allyhub/sdk/client`; three.js's are `@types/three`, which the project installs at the version lent (`npm install -D @types/three@0.186.0`).
|
|
12
12
|
- glTF and GLB load (`.glb`, `.gltf`, `.bin`, `.ktx2`), environments are `.hdr` or `.exr`; all are media imports. CC0 models, HDRIs and textures: `allyhub add search --type @polyhaven`, `allyhub add @polyhaven/<id>`. AllyHub's own 3D models and sceneries: `allyhub add search --type 3d-model` (or `scenery`), `allyhub add 3d-model/<name>`.
|
|
@@ -15,7 +15,7 @@ An item is a folder with a `scenery.ts` (or tsx, mts, js, jsx, mjs). A person lo
|
|
|
15
15
|
|
|
16
16
|
## `defineScenery`
|
|
17
17
|
|
|
18
|
-
```ts file=room/
|
|
18
|
+
```ts file=room/room.ts
|
|
19
19
|
import * as THREE from "three";
|
|
20
20
|
import { defineScenery, path } from "@allyhub/scenery-host/layer";
|
|
21
21
|
import sofaModel from "./sofa.glb";
|
|
@@ -47,7 +47,7 @@ export default defineScenery({
|
|
|
47
47
|
});
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
`build(w)` runs once, awaited with every load it starts (60 s at most; in a video it counts in the piece's `loadLimit`, AK-P002); what it returns is `made`. `update(made, t, w)` poses it at `t`, seconds of scenery time. `cameras` (checked when defined, AK-W004) and `moves` are by name, for the commands and for layers. `bake` is in [Baked light](#baked-light).
|
|
50
|
+
`build(w)` runs once, awaited with every load it starts (60 s at most; in a video it counts in the piece's `loadLimit`, AK-P002); what it returns is `made`. `update(made, t, w)` poses it at `t`, seconds of scenery time. `cameras` (checked when defined, AK-W004) and `moves` are by name, for the commands and for layers. `bake` is in [Baked light](#baked-light). `title` is the item's name where `allyhub.yaml` gives it none, read from the module as written (a string, not computed); without either, its file's name.
|
|
51
51
|
|
|
52
52
|
**From `t` alone.** The same moment must draw the same pixels in any order (AK-D002). `Date`, `performance.now`, `Math.random`, `crypto.getRandomValues` and `requestAnimationFrame` follow the moment drawn; timers run only while it builds. Pose an `AnimationMixer` with `w.seek(mixer, t)` (every action reset, then `setTime(t)`), not a bare `setTime`. Name what is referred to (`Object3D.name`): cameras, moves, measurements and `projectScenery` take names, and a name no object has, or two have, is AK-W005.
|
|
53
53
|
|
|
@@ -156,11 +156,11 @@ camera: shots([
|
|
|
156
156
|
|
|
157
157
|
`PHONE_CAMERA` (`@allyhub/sdk/scenery`) names a phone's main camera as the options of each mechanism; `phoneCamera(over)` changes any value and keeps the rest. `lens` goes into a camera state, `sensor` into `scenery({ sensor })`, `hand` into `handheld()`, and the marks it leaves on its picture (grain, softness, sharpening, motion blur) into `video()`'s `capture` and `motionBlur` ([video.md](video.md)). Each is a starting point, not a look.
|
|
158
158
|
|
|
159
|
-
```ts file=phone/
|
|
159
|
+
```ts file=phone/phone.ts
|
|
160
160
|
import { part, video } from "@allyhub/sdk";
|
|
161
161
|
import { phoneCamera } from "@allyhub/sdk/scenery";
|
|
162
162
|
import { handheld, scenery, shots } from "@allyhub/scenery-host/layer";
|
|
163
|
-
import room from "../room/
|
|
163
|
+
import room from "../room/room.ts";
|
|
164
164
|
|
|
165
165
|
const phone = phoneCamera({ hand: { tremor: { angle: 0.15 } } });
|
|
166
166
|
const camera = handheld(
|
|
@@ -197,15 +197,15 @@ export default video({
|
|
|
197
197
|
|
|
198
198
|
`scenery(scenery, opts)` is a graphic layer. The scenery is built once when the output loads and posed at each frame's scenery time.
|
|
199
199
|
|
|
200
|
-
```ts file=tour/
|
|
200
|
+
```ts file=tour/tour.ts
|
|
201
201
|
import { custom, part, video } from "@allyhub/sdk";
|
|
202
202
|
import {
|
|
203
203
|
projectScenery,
|
|
204
204
|
scenery,
|
|
205
205
|
screen,
|
|
206
206
|
} from "@allyhub/scenery-host/layer";
|
|
207
|
-
import room from "../room/
|
|
208
|
-
import demo from "../demo/
|
|
207
|
+
import room from "../room/room.ts";
|
|
208
|
+
import demo from "../demo/demo.ts";
|
|
209
209
|
|
|
210
210
|
export default video({
|
|
211
211
|
format: "16x9",
|
|
@@ -247,7 +247,7 @@ export default video({
|
|
|
247
247
|
|
|
248
248
|
`projectScenery(layer, target, t, el)`, called in a layer's `render` with its own element, gives where a point or a named object of the scenery layer called `layer` in the same part is at part time `t`: `{ x, y }` in frame px, `inView`, `depth` (m); undefined when no such layer shows then.
|
|
249
249
|
|
|
250
|
-
**Props** (`SceneryProp`: `{ name, build(w), update?(object, t, w) }`) are things a layer brings in (a stand-in, a
|
|
250
|
+
**Props** (`SceneryProp`: `{ name, build(w), update?(object, t, w) }`) are things a layer brings in (a stand-in, a pointing rod): built after the scenery and its bake (never in it), posed from t after the scenery's update, shown only in the layers that add them. One a hand moves takes its path from the SDK's `handPath`, `tap` or `drag` ([layers.md](layers.md), "A person's input"), as the registry's `pointing-prop` does.
|
|
251
251
|
|
|
252
252
|
**A scenery inside another video.** A video item whose picture is a scenery can be shown in a film: `take(scene).range(from, to)` plays a stretch of it and `footage({ camera })` draws its scenery layers from a camera of the film's (`cameras` by layer name for several, `quality: { scale }` for this film only), on the item's clock. See [footage.md](footage.md) and [speech.md](speech.md).
|
|
253
253
|
|
|
@@ -268,7 +268,7 @@ export default video({
|
|
|
268
268
|
| `glass` | none | `{ reflectance?, roughness?, scale? }`: what its glass reflects of the scenery over its picture, by Fresnel; `{}` the defaults (`GLASS_DEFAULTS`) |
|
|
269
269
|
| `inScenery` | `true` | Drawn in the scenery: `{ brightness?, light? }` (below); `false`: laid over the scenery |
|
|
270
270
|
|
|
271
|
-
```ts file=demo/
|
|
271
|
+
```ts file=demo/demo.ts
|
|
272
272
|
import { custom, part, video } from "@allyhub/sdk";
|
|
273
273
|
|
|
274
274
|
// Made only to be shown on a screen.
|
package/docs/sheets.md
CHANGED
|
@@ -4,22 +4,23 @@ A sheet is a workbook: what a person sees is Excel, and its source is text. A fo
|
|
|
4
4
|
|
|
5
5
|
## A sheet item
|
|
6
6
|
|
|
7
|
-
A sheet is
|
|
7
|
+
A sheet is its workbook file, a YAML file named as you like and listed in `allyhub.yaml` as `kind: sheet` ([project.md](project.md#items)), and the files it names, each from its folder:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
finance/budget/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
budget.yaml the workbook: sheets, cells, formulas, formats, names, checks
|
|
12
|
+
orders.csv a table's rows, or a large block of typed cells: what its `rows` name
|
|
13
|
+
forecast.ts optional: code that makes sheets from data: what its `code` names
|
|
14
|
+
logo.png what cells name: pictures and other files
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Its id is its file without its extension (`finance/budget/budget`). Nothing is found by a fixed name: its tables are the CSV files their `rows` name, and its code is the module its `code` names. Files go wherever you put them, and the workbook names each by its path from its folder, as an import would. A table or a file the editor, the SDK or an import adds goes beside the workbook's file under a name no file there has (`orders.csv`, else `orders-2.csv`), and the workbook names it; move it, and write its new path.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## The workbook file
|
|
20
20
|
|
|
21
21
|
```yaml
|
|
22
22
|
title: Budget
|
|
23
|
+
code: ./forecast.ts # optional: the module that makes sheets, from this file's folder
|
|
23
24
|
names:
|
|
24
25
|
growth: 0.08 # a constant
|
|
25
26
|
revenue: =Summary!$B$1 # a place, or a formula
|
|
@@ -143,7 +144,7 @@ sheets:
|
|
|
143
144
|
D2: files/ada.pdf; files/cv.docx
|
|
144
145
|
```
|
|
145
146
|
|
|
146
|
-
`columns` of a table take it too, by the column's name. A person drops, pastes or chooses files on a cell: they are kept
|
|
147
|
+
`columns` of a table take it too, by the column's name. A person drops, pastes or chooses files on a cell: they are kept beside the sheet's file, under names no file there has. A picture is drawn in its cell, its row as tall, any other file by its name. A file that is not there is a problem (AK-M009). In an `.xlsx` a PNG, JPEG or GIF goes in its cell and any other file is its name, which the render says.
|
|
147
148
|
|
|
148
149
|
### Scenarios
|
|
149
150
|
|
|
@@ -216,9 +217,9 @@ const total = summary.cell(1, 2, "=SUM(orders[total])");
|
|
|
216
217
|
total.number_format = "$#,##0.00";
|
|
217
218
|
total.font = new Font({ bold: true });
|
|
218
219
|
total.fill = new PatternFill({ fill_type: "solid", fgColor: "FFEECC" });
|
|
219
|
-
wb.save("finance/budget");
|
|
220
|
+
wb.save("finance/budget.yaml");
|
|
220
221
|
|
|
221
|
-
const again = load_workbook("finance/budget");
|
|
222
|
+
const again = load_workbook("finance/budget.yaml");
|
|
222
223
|
console.log(again.get_sheet_by_name("Summary")?.cell(1, 2).computed);
|
|
223
224
|
console.log(again.check());
|
|
224
225
|
```
|
|
@@ -264,7 +265,7 @@ ws.auto_filter.add_filter_column(5, ["Open"]);
|
|
|
264
265
|
|
|
265
266
|
## Charts
|
|
266
267
|
|
|
267
|
-
A chart floats over the cells at its anchor and reads them live: it holds references, never numbers, so it follows what its cells compute. In
|
|
268
|
+
A chart floats over the cells at its anchor and reads them live: it holds references, never numbers, so it follows what its cells compute. In the workbook file:
|
|
268
269
|
|
|
269
270
|
```yaml
|
|
270
271
|
charts:
|
|
@@ -337,9 +338,9 @@ wb.save();
|
|
|
337
338
|
|
|
338
339
|
`LineChart`, `AreaChart` and `DoughnutChart` are held as well, and `chart.legend` (`null` for none, else its `position`), `chart.dataLabels`, `chart.x_axis` and `y_axis` (`title`, `scaling`, `majorUnit`, `number_format`, `delete`, `majorGridlines`), `series.marker`, `series.smooth` and `series.graphicalProperties`. `ws._charts` lists a sheet's charts.
|
|
339
340
|
|
|
340
|
-
##
|
|
341
|
+
## Its code
|
|
341
342
|
|
|
342
|
-
`
|
|
343
|
+
The module the workbook file's `code` names (`code: ./forecast.ts`, from the file's folder) makes sheets from data and code: a sheet per region, a sheet per month, a schedule from a parameter. It uses the same classes as a script, on a workbook of its own that starts with no sheets:
|
|
343
344
|
|
|
344
345
|
```ts
|
|
345
346
|
import { Font, workbook } from "@allyhub/sdk/sheets";
|
|
@@ -361,11 +362,11 @@ export default workbook((wb, { data }) => {
|
|
|
361
362
|
```
|
|
362
363
|
|
|
363
364
|
- It holds logic, never a number it computed: what it writes are inputs, formulas and references, so a change of an input computes again here and in Excel. A number it typed that neither its data nor its code holds is a fact, `sheet-typed`.
|
|
364
|
-
- `data(path)` reads a file of the project, from the
|
|
365
|
+
- `data(path)` reads a file of the project, from the code's folder: CSV as an object per row, numbers as numbers where a whole column is; YAML and JSON as they are. It reads files, never what a formula computes.
|
|
365
366
|
- It runs with no clock, randomness or network. `Date.now()`, `new Date()`, `Math.random()`, `crypto`, `performance.now()` and Node's own modules are AK-M012, with their line, and `fetch` AK-B003; it runs twice and what it makes must be the same (AK-M012). One that hangs is stopped (AK-B004), one that throws is AK-R001. A date or a random number belongs in the data, or in a formula (`TODAY`, `RAND`).
|
|
366
|
-
- What it makes is never written. Every command reads it with
|
|
367
|
-
- Its sheets come after
|
|
368
|
-
- A person sees them locked. A change is refused as on a protected sheet, offering to ask you or Make Ordinary Sheet, which writes that sheet to
|
|
367
|
+
- What it makes is never written. Every command reads it with the workbook file: `check`, `render`, `sheet calc`, `sheet trace`, `sheet diff`, `inspect`, `frames`, and the editor, which shows a change to it as another hand's. Its formulas read the workbook file's names and tables, and the workbook file's read its sheets. `wb.defined_names` adds names; one the workbook file has stands. A problem on a generated sheet names the code's file.
|
|
368
|
+
- Its sheets come after the workbook file's, and the workbook file holds at least one.
|
|
369
|
+
- A person sees them locked. A change is refused as on a protected sheet, offering to ask you or Make Ordinary Sheet, which writes that sheet to the workbook file and its rows to CSV files. **A sheet the workbook file holds by a name is the workbook file's: what the code makes of that name is left out**, which `allyhub inspect` says (`sheet-ordinary`). Take it out of the workbook file to give it back to the code.
|
|
369
370
|
- An `.xlsx` holds them as plain sheets.
|
|
370
371
|
- Since a generated formula is not rewritten when a person inserts a row or renames a sheet, it reads names and tables (`=growth`, `=orders[total]`), not addresses, wherever it can.
|
|
371
372
|
|
|
@@ -375,16 +376,16 @@ A name of openpyxl's that is not held throws where it is used, naming what the c
|
|
|
375
376
|
|
|
376
377
|
## Commands
|
|
377
378
|
|
|
378
|
-
- `allyhub check` reports AK-M009, each with its file and line: YAML that is not, a field the format does not have, a cell or range that is not one, two sheets, tables or names of one name, a table's rows that are not there, a CSV quote never closed, a header with an empty or repeated name, a row with more fields than its header, a repeated or empty key, tables and cells that overlap, a formula that does not parse, an unknown function, name, sheet, table or column, a function given the wrong number of arguments, a circular reference, a `checks` entry that does not hold, a scenario's name that is not there, a file a cell names that is not there; and AK-M012 for
|
|
379
|
-
- A
|
|
379
|
+
- `allyhub check` reports AK-M009, each with its file and line: YAML that is not, a field the format does not have, a cell or range that is not one, two sheets, tables or names of one name, a table's rows that are not there, a CSV quote never closed, a header with an empty or repeated name, a row with more fields than its header, a repeated or empty key, tables and cells that overlap, a formula that does not parse, an unknown function, name, sheet, table or column, a function given the wrong number of arguments, a circular reference, a `checks` entry that does not hold, a scenario's name that is not there, a file a cell names that is not there; and AK-M012 for its code. An error value in a cell is not a problem: `=1/0` says what it says.
|
|
380
|
+
- A command names a sheet by its id or its file.
|
|
380
381
|
- `allyhub sheet calc <sheet> [what]` prints what a workbook computes, as an aligned table: a sheet (`Summary`, its used range), a range (`Summary!B3:M3`), a table, a name, or every sheet. `--scenario high` computes it with a scenario's inputs; `--scenarios` compares them.
|
|
381
382
|
- `allyhub sheet trace <sheet> <cell>` prints a cell's formula, where it is written, what it reads and what reads it.
|
|
382
383
|
- `allyhub sheet <sheet>` measures each table's columns: counts, empty cells, distinct values, errors, smallest and largest, sum and mean, lengths, the most frequent values.
|
|
383
|
-
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts, never problems: `sheet-error`, each cell whose value is an error and whether it starts there; `sheet-number`, numbers written into a formula and what takes each, once for a formula a range holds; `sheet-unlike`, a cell between neighbours that read alike, unlike them; `sheet-exception`, a cell set apart from its calculated column's formula; `sheet-unused`, names and typed numbers nothing reads (no formula, chart, rule, check or name); `sheet-invalid`, a value under a validation that breaks it; `sheet-typed`, a number
|
|
384
|
+
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts, never problems: `sheet-error`, each cell whose value is an error and whether it starts there; `sheet-number`, numbers written into a formula and what takes each, once for a formula a range holds; `sheet-unlike`, a cell between neighbours that read alike, unlike them; `sheet-exception`, a cell set apart from its calculated column's formula; `sheet-unused`, names and typed numbers nothing reads (no formula, chart, rule, check or name); `sheet-invalid`, a value under a validation that breaks it; `sheet-typed`, a number its code typed that neither its data nor its code holds; `sheet-ordinary`, a sheet its code makes and the workbook file holds too. `allyhub inspect sheet <sheet>` has their options: `--plain 0,1,-1` the numbers not said, `--around 1` how many neighbours each side must agree, `--kind`, `--all` for every finding, every number and a table's columns nothing reads.
|
|
384
385
|
- `allyhub sheet diff <was> <now>` compares two versions, two folders or a folder and an `.xlsx`: what changed value under a formula that did not, what changed formula with its value the same, both, what came and went, names, a table's rows lined up by its `key`, else by their place. `--tolerance`, `--all`, `--json`.
|
|
385
386
|
- `allyhub sheet capabilities` says what the SDK holds of openpyxl's.
|
|
386
|
-
- `allyhub sheet import <file
|
|
387
|
-
- `allyhub render` writes each sheet to `.allyhub/out/<
|
|
387
|
+
- `allyhub sheet import <file> --to finance/forecast.yaml` makes a sheet of an Excel, CSV or TSV file, its tables' rows in `finance/data/`, never over a place that is taken (see [Excel](#excel)).
|
|
388
|
+
- `allyhub render` writes each sheet to `.allyhub/out/<id>/`: `--type xlsx` (the default), `pdf`, `png`, `csv` (a file a sheet), `md`, `json`. A sheet with a problem is not written.
|
|
388
389
|
- `allyhub frames <sheet>` draws a picture of a sheet as a person sees it, letters and numbers on its edges; `--range` names a sheet (`Summary`), a range (`Summary!B3:D9`), columns (`A:C`) or rows (`1:20`). Without a range it draws the first 200 rows and 60 columns of each sheet, and says what it left out.
|
|
389
390
|
|
|
390
391
|
`allyhub help sheet` and `allyhub help render` give every option.
|
|
@@ -396,7 +397,7 @@ A name of openpyxl's that is not held throws where it is used, naming what the c
|
|
|
396
397
|
**In.** `allyhub sheet import <file.xlsx>` reads a file whatever wrote it and writes what it means as short text: neighbours with one formula as one range key, a table as a table, a column of one formula as a calculated column, a large rectangle of typed cells as a CSV file, looks as rectangles. It prints:
|
|
397
398
|
|
|
398
399
|
- Excel's scenarios come in by the names of the cells they set; a cell with no name is said, and a `Base case` that holds what the cells hold is left out.
|
|
399
|
-
- `Not carried over:` VBA, pivot tables, a chart of a kind a sheet has none of (radar, stock, surface, bubble, 3-D, several kinds in one) or whose numbers are written in it, shapes, links to other workbooks, a protection's password, page breaks, rich text (kept as text), filters by condition, kinds of rule the format has no place for, and so on, with where. Notes, links, pictures (
|
|
400
|
+
- `Not carried over:` VBA, pivot tables, a chart of a kind a sheet has none of (radar, stock, surface, bubble, 3-D, several kinds in one) or whose numbers are written in it, shapes, links to other workbooks, a protection's password, page breaks, rich text (kept as text), filters by condition, kinds of rule the format has no place for, and so on, with where. Notes, links, pictures (beside the workbook file), outlines, Page Layout, protection, a sheet's own names and hidden names come in.
|
|
400
401
|
- A formula that cannot be computed here (a function the engine does not have, another workbook) keeps its value, listed with its cell and why. An array formula over several cells is its first cell's, and the others spill from it.
|
|
401
402
|
- `Computed here against the file:` every formula's result compared with the value the file holds, each difference with its cell (`--tolerance` is how close numbers must be, `--all` lists every one; a formula that reads the clock or a random number is not compared). JSON has every difference.
|
|
402
403
|
|
|
@@ -404,7 +405,7 @@ An ordinary formula from a file that narrows a range to its row is written with
|
|
|
404
405
|
|
|
405
406
|
## A sheet in a piece
|
|
406
407
|
|
|
407
|
-
A piece reads a table's computed rows with `ctx.data("<sheet>#<table>")`, by the sheet's
|
|
408
|
+
A piece reads a table's computed rows with `ctx.data("<sheet>#<table>")`, by the sheet's file, relative to the file that names it. Each row is an object by header: numbers, text, TRUE and FALSE as they are, a date as ISO text, an error as its code, an empty cell as `null`. A plain CSV file still reads as it is, with `ctx.data(path)` or by import: a column whose every non-empty value is a number becomes numbers, everything else stays text.
|
|
408
409
|
|
|
409
410
|
```ts
|
|
410
411
|
import { custom, part, video } from "@allyhub/sdk";
|
|
@@ -435,4 +436,4 @@ export default video({
|
|
|
435
436
|
});
|
|
436
437
|
```
|
|
437
438
|
|
|
438
|
-
A deck's chart reads one the same way: `data: ../budget#orders` in
|
|
439
|
+
A deck's chart reads one the same way: `data: ../budget#orders` in its slides file. A data file over 5 MB is not read by `ctx.data`.
|