@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{spawn as l}from"node:child_process";import{createRuntimes as h}from"./runtimes.js";const u=2e5;let d;export function ffmpegOf(o={}){if(o.ffmpeg!==void 0)return Promise.resolve(o.ffmpeg);const i=d??h().bin("ffmpeg","ffmpeg").catch(f=>{throw d=void 0,f});return d=i,i}export function runFfmpegWith(o,i,f,a=!1,t){return new Promise((m,s)=>{if(t?.aborted){s(t.reason instanceof Error?t.reason:new Error("aborted"));return}const e=l(o,i,{stdio:["pipe","pipe","pipe"]}),p=()=>{e.stdin.destroy(),e.kill("SIGKILL")};t?.addEventListener("abort",p,{once:!0}),e.on("close",()=>{t?.removeEventListener("abort",p)});const c=[];let n="";e.stdout.on("data",r=>{a&&c.push(r)}),e.stderr.on("data",r=>{n+=r.toString(),n.length>u&&(n=n.slice(-u/2))}),e.stdin.on("error",()=>{}),e.on("error",s),e.on("close",r=>{r===0?m({out:Buffer.concat(c),err:n}):s(new Error(`ffmpeg failed (${String(r)}): ${n.slice(-2e3)}`))}),f?f(e.stdin).then(()=>e.stdin.end()).catch(r=>{e.stdin.destroy(),e.kill("SIGKILL"),s(r instanceof Error?r:new Error(String(r)))}):e.stdin.end()})}
|
|
@@ -4,7 +4,9 @@ export { bundledEnv, type BundledOptions } from "./bundled.js";
|
|
|
4
4
|
export { RuntimeError, type RuntimeErrorCode } from "./errors.js";
|
|
5
5
|
export { cacheHome } from "./home.js";
|
|
6
6
|
export { shippedManifest } from "./manifest.js";
|
|
7
|
+
export { declareRuntimes, declaredRuntimes, knownManifest, runtimeExtension, } from "./declared.js";
|
|
7
8
|
export { download, sha256Of, DOWNLOAD_RETRIES, DOWNLOAD_RETRY_DELAY_MS, DOWNLOAD_STALL_MS, type DownloadOptions, type DownloadTimings, } from "./download.js";
|
|
8
9
|
export { withLock } from "./lock.js";
|
|
9
10
|
export { unzip, untgz } from "./unpack.js";
|
|
11
|
+
export { ffmpegOf, runFfmpegWith, type FfmpegOptions } from "./ffmpeg.js";
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export{binVariable,createRuntimes}from"./runtimes.js";export{createPackages,npmCi,NPM_FETCH_TIMEOUT_MS,NPM_STALL_MS}from"./packages.js";export{bundledEnv}from"./bundled.js";export{RuntimeError}from"./errors.js";export{cacheHome}from"./home.js";export{shippedManifest}from"./manifest.js";export{download,sha256Of,DOWNLOAD_RETRIES,DOWNLOAD_RETRY_DELAY_MS,DOWNLOAD_STALL_MS}from"./download.js";export{withLock}from"./lock.js";export{unzip,untgz}from"./unpack.js";
|
|
2
|
+
export{binVariable,createRuntimes}from"./runtimes.js";export{createPackages,npmCi,NPM_FETCH_TIMEOUT_MS,NPM_STALL_MS}from"./packages.js";export{bundledEnv}from"./bundled.js";export{RuntimeError}from"./errors.js";export{cacheHome}from"./home.js";export{shippedManifest}from"./manifest.js";export{declareRuntimes,declaredRuntimes,knownManifest,runtimeExtension}from"./declared.js";export{download,sha256Of,DOWNLOAD_RETRIES,DOWNLOAD_RETRY_DELAY_MS,DOWNLOAD_STALL_MS}from"./download.js";export{withLock}from"./lock.js";export{unzip,untgz}from"./unpack.js";export{ffmpegOf,runFfmpegWith}from"./ffmpeg.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{spawn as
|
|
3
|
-
`).map(
|
|
4
|
-
`),await
|
|
2
|
+
import{spawn as I}from"node:child_process";import{createHash as R}from"node:crypto";import{existsSync as A,readFileSync as x}from"node:fs";import{copyFile as P,mkdir as j,readdir as T,readFile as M,rename as D,rm as b,stat as H,writeFile as C}from"node:fs/promises";import{createRequire as F}from"node:module";import{delimiter as z,join as n}from"node:path";import{fileURLToPath as U,pathToFileURL as J}from"node:url";import{DOWNLOAD_STALL_MS as W}from"./download.js";import{RuntimeError as _}from"./errors.js";import{cacheHome as G}from"./home.js";import{partialOf as q,sweepPartials as B,withLock as K}from"./lock.js";import{nodeCommand as V}from"./node-program.js";import{createRuntimes as X}from"./runtimes.js";const E=".allyhub-package.json",Y=U(new URL("../pins/",import.meta.url));export const NPM_FETCH_TIMEOUT_MS=W,NPM_STALL_MS=12e4,NPX_SETTING=/^npm_config_(global|prefix|location|cache|.*_prefix)/iu;export function npmProblem(o,a){return o.split(`
|
|
3
|
+
`).map(c=>c.replace(/^npm (error|ERR!)\s*/u,"").trim()).find(c=>c!==""&&!/^(code|errno|syscall|path|type|A complete log|Exit handler|This is an error with npm|<https)/u.test(c))??`npm ended with code ${String(a)}`}const Q=(o,a)=>(a.PATH??"").split(z).some(s=>s!==""&&A(n(s,o)));export async function findNpm(o,a){const s=o.ALLYHUB_NPM??o.npm_execpath;if(s?.endsWith(".js"))return{command:V(o),script:[s]};if(Q("npm",o))return{command:"npm",script:[]};const c=await a(),{node:p,npm:d}=c;if(!p||!d)throw new Error("AllyHub's Node has no npm");return{command:p,script:[d]}}async function Z(o,a){const s=await T(o,{recursive:!0}).catch(()=>[]);let c=0;for(const p of await T(a).catch(()=>[]))c+=await H(n(a,p)).then(d=>d.size,()=>0);return`${String(s.length)}:${String(c)}`}export const npmCi=async(o,{home:a,signal:s,fetchTimeoutMs:c=NPM_FETCH_TIMEOUT_MS,stallMs:p=NPM_STALL_MS,omit:d})=>{const O=await findNpm(process.env,async()=>(await X({home:a}).ensure("node",{signal:s})).bins),m=Object.fromEntries(Object.entries(process.env).filter(([f])=>!NPX_SETTING.test(f))),h=n(a,"packages",".npm"),w=["ci","--ignore-scripts","--omit=dev","--no-audit","--no-fund","--omit=peer",...(d??[]).map(f=>`--omit=${f}`),"--loglevel=error","--fetch-retries=1",`--fetch-timeout=${String(c)}`];await new Promise((f,g)=>{const v=I(O.command,[...O.script,...w],{cwd:o,env:{...m,npm_config_cache:h},stdio:["ignore","ignore","pipe"],...s?{signal:s}:{}});let k="",y=Date.now(),$="",S=!1,t=!1;const e=setInterval(()=>{S||t||(S=!0,Z(o,n(h,"_cacache","tmp")).then(r=>{r!==$?($=r,y=Date.now()):Date.now()-y>=p&&(t=!0,v.kill(),setTimeout(()=>v.kill("SIGKILL"),5e3).unref())}).finally(()=>{S=!1}))},Math.max(20,Math.min(5e3,p/4)));v.stderr.on("data",r=>{y=Date.now(),k=`${k}${r.toString()}`.slice(-1e3)}),v.on("error",r=>{clearInterval(e),g(r)}),v.on("close",r=>{clearInterval(e),t?g(new _("install",`npm made no progress for ${String(p/1e3)} s and was stopped${k.trim()?`; it said: ${npmProblem(k,r)}`:""}`)):r===0?f():g(new Error(npmProblem(k,r)))})})};export function createPackages(o={}){const a=o.env??process.env,s=o.home??G(a),c=o.pins??Y,p=o.install??npmCi,{fetchTimeoutMs:d,stallMs:O}=o,m=n(s,"packages"),h=t=>{const e=n(c,t);let r,i;try{r=JSON.parse(x(n(e,"package.json"),"utf8")),i=x(n(e,"package-lock.json"),"utf8")}catch{throw new _("unknown-package",`AllyHub has no package "${t}".`)}const l=r.dependencies??{},u=l[t]??r.version;if(!u)throw new _("unknown-package",`The pin of "${t}" does not name it.`);return{version:u,holds:l,lock:R("sha256").update(i).digest("hex"),dir:e,size:r.allyhubSize??0,omit:r.allyhubOmit??[]}},w=(t,e)=>n(m,`${t}@${e.version}`),f=(t,e)=>{try{const r=JSON.parse(x(n(w(t,e),E),"utf8"));return r.version===e.version&&r.lock===e.lock}catch{return!1}},g=(t,e)=>({name:t,version:e.version,dir:w(t,e)}),v=async(t,e,r)=>{const i=w(t,e),l=q(i);await j(l,{recursive:!0});try{await P(n(e.dir,"package.json"),n(l,"package.json")),await P(n(e.dir,"package-lock.json"),n(l,"package-lock.json")),await p(l,{home:s,signal:r,fetchTimeoutMs:d,stallMs:O,omit:e.omit});for(const[u,L]of Object.entries(e.holds)){const N=JSON.parse(await M(n(l,"node_modules",u,"package.json"),"utf8"));if(N.version!==L)throw new Error(`it holds ${u} ${String(N.version)}, not ${L}`)}await C(n(l,E),`${JSON.stringify({version:e.version,lock:e.lock,at:new Date().toISOString()})}
|
|
4
|
+
`),await b(i,{recursive:!0,force:!0}),await D(l,i),await k(t,e)}catch(u){throw await b(l,{recursive:!0,force:!0}),r?.aborted?new _("cancelled",`Stopped getting ${t}.`,{cause:u}):new _("install",`Could not get ${t} ${e.version} (${u instanceof Error?u.message:String(u)}). Check the connection and run it again.`,{cause:u})}},k=async(t,e)=>{const r=`${t}@${e.version}`;for(const i of await T(m))i.startsWith(`${t}@`)&&i!==r&&!i.startsWith(`${r}.`)&&await b(n(m,i),{recursive:!0,force:!0})},y=t=>{const e=h(t);return f(t,e)?g(t,e):void 0},$=(t,e)=>F(n(t,"package.json")).resolve(e),S=async(t,e={})=>{const r=h(t);return f(t,r)||(await j(m,{recursive:!0}).catch(i=>{throw new _("install",`Could not get ${t} ${r.version}: AllyHub cannot write to ${m}.`,{cause:i})}),await K(`${w(t,r)}.lock`,async()=>{f(t,r)||(await B(m,t),e.onFetch?.(t),await v(t,r,e.signal))},{signal:e.signal})),g(t,r)};return{home:s,locate:y,ensure:S,size:t=>h(t).size,entry(t){const e=y(t);return e?$(e.dir,t):void 0},resolve(t,e){const r=y(t);return r?$(r.dir,e):void 0},async load(t,e){const{dir:r}=await S(t,e),i=$(r,e?.module??t);return await import(J(i).href)},async remove(t){await b(w(t,h(t)),{recursive:!0,force:!0})}}}
|
|
@@ -3,6 +3,7 @@ import { type DownloadTimings } from "./download.js";
|
|
|
3
3
|
export interface RuntimesOptions {
|
|
4
4
|
/** The cache folder (default: the system's, `cacheHome`). */
|
|
5
5
|
home?: string;
|
|
6
|
+
/** The pins it knows (default: the core's, then those the extensions in this process declared). */
|
|
6
7
|
manifest?: RuntimeManifest;
|
|
7
8
|
/** The platform (default: this process's). */
|
|
8
9
|
platform?: Platform | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{chmod as T,mkdir as E,readFile as W,rename as J,rm as z,writeFile as _}from"node:fs/promises";import{dirname as U,join as d}from"node:path";import{binsOf as A,filesFor as C,platformOf as V}from"@allyhub/protocol";import{download as Y,sha256Of as q}from"./download.js";import{RuntimeError as g}from"./errors.js";import{cacheHome as G}from"./home.js";import{partialOf as K,sweepPartials as Q,withLock as X}from"./lock.js";import{
|
|
2
|
+
import{chmod as T,mkdir as E,readFile as W,rename as J,rm as z,writeFile as _}from"node:fs/promises";import{dirname as U,join as d}from"node:path";import{binsOf as A,filesFor as C,platformOf as V}from"@allyhub/protocol";import{download as Y,sha256Of as q}from"./download.js";import{RuntimeError as g}from"./errors.js";import{cacheHome as G}from"./home.js";import{partialOf as K,sweepPartials as Q,withLock as X}from"./lock.js";import{knownManifest as Z}from"./declared.js";import{inside as D,native as tt,undmg as et,untgz as rt,unzip as nt}from"./unpack.js";const F=".allyhub-runtime.json";export const binVariable=o=>`ALLYHUB_${o.toUpperCase().replaceAll("-","_")}`;const L=o=>`${String(Math.max(1,Math.round(o/1e6)))} MB`;function st(o,$,w,v){v(`Downloading ${o} ${$} (${L(w)}), once…`);let h=0;return u=>{const b=Math.floor(u/w*10)*10;b!==h&&(h=b,v(` ${String(b)}% (${L(u)} of ${L(w)})`))}}export function createRuntimes(o={}){const $=o.log??(t=>{process.stderr.write(`${t}
|
|
3
3
|
`)}),w=o.env??process.env,v=o.home??G(w),h=o.manifest??Z(),u="platform"in o?o.platform:V(process.platform,process.arch),b=o.fetch??globalThis.fetch,y=d(v,"runtimes"),j=t=>{const e=Object.hasOwn(h.runtimes,t)?h.runtimes[t]:void 0;if(!e)throw new g("unknown-runtime",`AllyHub has no runtime "${t}".`);return e},p=(t,e)=>d(y,`${t}@${e.version}`),k=(t,e)=>{const r=u?C(e,u):void 0;if(!r)throw new g("unsupported",`${t} ${e.version} has no build for ${u??`${process.platform}-${process.arch}`}.`);return r},H=(t,e,r)=>Object.fromEntries(Object.entries(A(k(t,e))).map(([n,s])=>[n,d(r,tt(s))])),N=(t,e)=>{const r=[...new Set(Object.values(e.platforms).flatMap(f=>Object.keys(A(f))))];if(r.length===0)return;const n=r.map(f=>[f,w[binVariable(f)]]);if(n.some(([,f])=>!f))return;const s=Object.fromEntries(n),c=n[0]?.[1]??"";return{name:t,version:void 0,dir:U(c),bins:s,from:"env"}},R=async(t,e)=>{try{const r=JSON.parse(await W(d(p(t,e),F),"utf8")),n=k(t,e).map(s=>s.sha256);return r.version===e.version&&JSON.stringify(r.files)===JSON.stringify(n)}catch{return!1}},M=async t=>{const e=j(t),r=N(t,e);if(r)return r;if(!await R(t,e))return;const n=p(t,e);return{name:t,version:e.version,dir:n,bins:H(t,e,n),from:"cache"}},I=async(t,e,r)=>{const n=k(t,e),s=p(t,e),c=K(s),f=d(c,".downloads");await E(f,{recursive:!0});const B=r.onProgress?void 0:st(t,e.version,n.reduce((l,i)=>l+i.size,0),$);let x=0;try{for(const[l,i]of n.entries()){const O=d(f,String(l));if(await Y(i.url,O,{size:i.size,sha256:i.sha256,fetch:b,signal:r.signal,...o.downloads,onRetry:(a,m,S)=>{$(` ${a.message} Trying again (${String(m+1)} of ${String(S)})…`)},onProgress:(a,m)=>{B?.(x+a),r.onProgress?.({runtime:t,url:i.url,received:a,total:m})}}),x+=i.size,i.unpack==="zip")await nt(O,c);else if(i.unpack==="tgz")await rt(O,c);else if(i.unpack==="dmg")await et(O,c);else{const a=D(c,i.name??ot(i.url));if(!a)throw new g("unpack",`${i.url} would be kept outside its folder.`);await E(U(a),{recursive:!0}),await J(O,a),i.executable&&await T(a,493)}for(const a of i.check){const m=D(c,a.path),S=m?await q(m).catch(()=>"missing"):"missing";if(S!==a.sha256)throw new g("checksum",`${a.path} from ${i.url} has sha256 ${S}; its pin is ${a.sha256}.`)}}await z(f,{recursive:!0,force:!0}),await _(d(c,F),`${JSON.stringify({version:e.version,files:n.map(l=>l.sha256),at:new Date().toISOString()})}
|
|
4
4
|
`),await z(s,{recursive:!0,force:!0}),await J(c,s)}catch(l){throw await z(c,{recursive:!0,force:!0}),l}},P=async(t,e={})=>{const r=j(t),n=await M(t);if(n)return n;k(t,r),await E(y,{recursive:!0}),await X(`${p(t,r)}.lock`,async()=>{await R(t,r)||(await Q(y,t),await I(t,r,e))},{signal:e.signal,onWait:()=>{$(`Waiting for ${t}, which another command is getting…`)}});const s=await M(t);if(!s)throw new g("download",`${t} was installed but cannot be found in ${y}.`);return s};return{home:v,platform:u,locate:M,ensure:P,async bin(t,e,r){const s=(await P(t,r)).bins[e];if(!s)throw new g("unknown-runtime",`${t} holds no program "${e}".`);return s},async remove(t){const e=j(t);await z(p(t,e),{recursive:!0,force:!0})},async status(){return Promise.all(Object.entries(h.runtimes).map(async([t,e])=>{const r=u?C(e,u):void 0,n=p(t,e),s=N(t,e)!==void 0?"env":r!==void 0&&await R(t,e)?"cache":void 0;return{name:t,about:e.about,version:e.version,license:e.license,available:r!==void 0,installed:s!==void 0,...s?{from:s}:{},size:(r??[]).reduce((c,f)=>c+f.size,0),dir:n}}))}}}const ot=o=>decodeURIComponent(new URL(o).pathname.split("/").pop()??"file");
|
|
@@ -267,88 +267,6 @@
|
|
|
267
267
|
]
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
"parakeet": {
|
|
271
|
-
"about": "Parakeet TDT 0.6B v3, int8 ONNX: speech recognition in 25 languages",
|
|
272
|
-
"version": "tdt-0.6b-v3-int8@2bda32ec",
|
|
273
|
-
"license": "CC-BY-4.0",
|
|
274
|
-
"homepage": "https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3",
|
|
275
|
-
"platforms": {
|
|
276
|
-
"any": [
|
|
277
|
-
{
|
|
278
|
-
"url": "https://huggingface.co/csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8/resolve/2bda32ec70b097a55adaa07d9a7173915b43cc78/encoder.int8.onnx",
|
|
279
|
-
"sha256": "acfc2b4456377e15d04f0243af540b7fe7c992f8d898d751cf134c3a55fd2247",
|
|
280
|
-
"size": 652184281,
|
|
281
|
-
"name": "encoder.int8.onnx"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"url": "https://huggingface.co/csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8/resolve/2bda32ec70b097a55adaa07d9a7173915b43cc78/decoder.int8.onnx",
|
|
285
|
-
"sha256": "179e50c43d1a9de79c8a24149a2f9bac6eb5981823f2a2ed88d655b24248db4e",
|
|
286
|
-
"size": 11845275,
|
|
287
|
-
"name": "decoder.int8.onnx"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"url": "https://huggingface.co/csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8/resolve/2bda32ec70b097a55adaa07d9a7173915b43cc78/joiner.int8.onnx",
|
|
291
|
-
"sha256": "3164c13fc2821009440d20fcb5fdc78bff28b4db2f8d0f0b329101719c0948b3",
|
|
292
|
-
"size": 6355277,
|
|
293
|
-
"name": "joiner.int8.onnx"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"url": "https://huggingface.co/csukuangfj/sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8/resolve/2bda32ec70b097a55adaa07d9a7173915b43cc78/tokens.txt",
|
|
297
|
-
"sha256": "d58544679ea4bc6ac563d1f545eb7d474bd6cfa467f0a6e2c1dc1c7d37e3c35d",
|
|
298
|
-
"size": 93939,
|
|
299
|
-
"name": "tokens.txt"
|
|
300
|
-
}
|
|
301
|
-
]
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
"yunet": {
|
|
305
|
-
"about": "YuNet face detector, 2023mar",
|
|
306
|
-
"version": "2023mar@3cc26e7f",
|
|
307
|
-
"license": "MIT",
|
|
308
|
-
"homepage": "https://github.com/opencv/opencv_zoo",
|
|
309
|
-
"platforms": {
|
|
310
|
-
"any": [
|
|
311
|
-
{
|
|
312
|
-
"url": "https://huggingface.co/opencv/face_detection_yunet/resolve/3cc26e7f1014a5ee5d74a42acee58bafc9d0a310/face_detection_yunet_2023mar.onnx",
|
|
313
|
-
"sha256": "8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4",
|
|
314
|
-
"size": 232589,
|
|
315
|
-
"name": "face_detection_yunet_2023mar.onnx"
|
|
316
|
-
}
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
"u2net-human-seg": {
|
|
321
|
-
"about": "U²-Net human segmentation, for person mattes",
|
|
322
|
-
"version": "rembg-v0.0.0",
|
|
323
|
-
"license": "Apache-2.0",
|
|
324
|
-
"homepage": "https://github.com/xuebinqin/U-2-Net",
|
|
325
|
-
"platforms": {
|
|
326
|
-
"any": [
|
|
327
|
-
{
|
|
328
|
-
"url": "https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net_human_seg.onnx",
|
|
329
|
-
"sha256": "01eb6a29a5c4d8edb30b56adad9bb3a2a0535338e480724a213e0acfd2d1c73c",
|
|
330
|
-
"size": 175997641,
|
|
331
|
-
"name": "u2net_human_seg.onnx"
|
|
332
|
-
}
|
|
333
|
-
]
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
"tesseract-eng": {
|
|
337
|
-
"about": "Tesseract's English model, best int",
|
|
338
|
-
"version": "4.0.0-best-int",
|
|
339
|
-
"license": "Apache-2.0",
|
|
340
|
-
"homepage": "https://github.com/tesseract-ocr/tessdata_best",
|
|
341
|
-
"platforms": {
|
|
342
|
-
"any": [
|
|
343
|
-
{
|
|
344
|
-
"url": "https://cdn.jsdelivr.net/npm/@tesseract.js-data/eng@1.0.0/4.0.0_best_int/eng.traineddata.gz",
|
|
345
|
-
"sha256": "45b4cb346724ac1774f1c36f42f182b887bcdb28ebe63e6fff90ac41f3fcff91",
|
|
346
|
-
"size": 2952873,
|
|
347
|
-
"name": "eng.traineddata.gz"
|
|
348
|
-
}
|
|
349
|
-
]
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
270
|
"node": {
|
|
353
271
|
"about": "Node.js and its npm, the official builds: what a Studio Host package runs on, and Studio's agents on the desktop",
|
|
354
272
|
"version": "24.22.2",
|
|
@@ -134,6 +134,8 @@ export interface SceneryProp<O extends Object3D = Object3D> {
|
|
|
134
134
|
}
|
|
135
135
|
/** A scenery as an agent writes it. M is what build returns and update receives. */
|
|
136
136
|
export interface SceneryDefinition<M = unknown> {
|
|
137
|
+
/** Its title, for people: what Studio and `allyhub dev` list it by (none: its name). */
|
|
138
|
+
title?: string;
|
|
137
139
|
renderer?: SceneryRendererOptions;
|
|
138
140
|
/** Once, before anything is drawn. Awaited, with every load it starts. */
|
|
139
141
|
build(w: SceneryHost): M | Promise<M>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{bakeProblems as c}from"./bake.js";import{cameraProblems as
|
|
2
|
+
import{bakeProblems as c}from"./bake.js";import{cameraProblems as a}from"./camera.js";export const SCENERY_RENDERER_DEFAULTS={antialias:!1,transmissionScale:.25,focus:{samples:64,maxRadius:64}};export function isScenery(e){if(typeof e!="object"||e===null)return!1;const n=e;return n.kind==="scenery"&&typeof n.build=="function"}export function defineScenery(e){if(typeof e.build!="function")throw new Error("defineScenery needs build(w), the function that builds the scenery.");const n=e.renderer?.kind;if(n!==void 0&&n!=="webgl"&&n!=="webgpu")throw new Error(`defineScenery's renderer.kind is "webgl" or "webgpu", not ${JSON.stringify(n)}.`);const i=e.renderer?.transmissionScale;if(i!==void 0&&!(Number.isFinite(i)&&i>0&&i<=2))throw new Error(`defineScenery's renderer.transmissionScale is a share of the frame's size in (0, 2], not ${String(i)}.`);const r=[],t=e.title;t!==void 0&&typeof t!="string"&&r.push(`title is a string, not ${JSON.stringify(t)}`);for(const[o,s]of Object.entries(e.cameras??{}))for(const f of a(s))r.push(`camera "${o}": ${f}`);for(const[o,s]of Object.entries(e.moves??{}))typeof s!="function"&&r.push(`move "${o}" is not a function of time`);if(e.bake!==void 0&&r.push(...c(e.bake)),r.length>0)throw new Error(`defineScenery: ${r.join("; ")}.`);return Object.freeze({...e,kind:"scenery"})}
|
|
@@ -11,9 +11,9 @@ export { AUTO_EXPOSURE_DEFAULTS, AUTOFOCUS_DEFAULTS, handheld, HANDHELD_DEFAULTS
|
|
|
11
11
|
export { bandNoise, gauss3, hash3, powerNoise, swellOf, unit3, type Band, type Slope, } from "./noise.js";
|
|
12
12
|
export { convexHull, floorRect, type Floor, type FloorRect } from "./hull.js";
|
|
13
13
|
export { solveCamera, SOLVE_DEFAULTS, SOLVE_PARAMS, type SolveLine, type SolveOptions, type SolveParam, type SolvePoint, type SolveResidual, type SolveResult, } from "./solve.js";
|
|
14
|
-
export { invert3, moireAt, moireBand, moireCamera, moireProblems, moireScreen, MOIRE_GLSL, MOIRE_SCREENS, PANEL_DEFAULTS, SENSOR_DEFAULTS, STRIPE_DEPTH, type MoireCamera, type MoireScreen, type PanelOptions, type SensorOptions, } from "./moire.js";
|
|
14
|
+
export { invert3, moireAt, moireBand, moireCamera, moireProblems, screenGradeWeight, moireScreen, MOIRE_GLSL, MOIRE_SCREENS, PANEL_DEFAULTS, SENSOR_DEFAULTS, STRIPE_DEPTH, type MoireCamera, type MoireScreen, type PanelOptions, type Grade, type SensorGrade, type SensorOptions, } from "./moire.js";
|
|
15
15
|
export { screenFocus, SCREEN_FOCUS_DEFAULTS, type ScreenFocus, type ScreenFocusOptions, } from "./screen-focus.js";
|
|
16
|
-
export { apply, homography, matrix3d, screenOnFrame, shownCentre, SCREEN_LIGHT_DEFAULTS, screenLightBaseProblem, type Px, type ScreenLightBase, type ScreenOnFrame, } from "./screen.js";
|
|
16
|
+
export { apply, homography, matrix3d, clipToFrame, screenOnFrame, shownCentre, SCREEN_LIGHT_DEFAULTS, screenLightBaseProblem, type Px, type ScreenLightBase, type ScreenOnFrame, } from "./screen.js";
|
|
17
17
|
export { AROUND_DEFAULTS, FLOOR_DEFAULTS, INVENTORY_FRAME, MAP_DEFAULTS, MAP_VIEWS, MEASURE_DEFAULTS, MOTION_DEFAULTS, SIDES, type AxisBox, type CameraClearance, type CameraSource, type Channel, type ClearAhead, type Contact, type FreeFloor, type Levels, type MeasureRequest, type MeasureResult, type MeshHealth, type Motion, type MotionRequest, type SeeRequest, type SeeResult, type SeeTile, type Sight, type Support, type DrawnCamera, type Footprint, type MapPath, type MapRequest, type MapResult, type MapView, type MapViewResult, type OwnBox, type PointRef, type PointsRequest, type Seen, type Side, type UprightBox, type ViewRequest, type ViewResult, type ViewTile, type ViewTileResult, type SceneryInventory, type SceneryLight, type SceneryObject, topObjects, } from "./report.js";
|
|
18
18
|
export { channel, motionOf, type CameraSample, type MotionNumbers, } from "./motion.js";
|
|
19
19
|
export { easeValue, timedNumber, type Ease, type NumberKey } from "./timing.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export{blurDiameter,CAMERA_DEFAULTS,CameraError,cameraProblems,directionOf,exposureOf,project,resolveCamera,yawPitchOf}from"./camera.js";export{BAKE_CPU,BAKE_DEFAULTS,BAKE_MIN_SIZE,bakeProblems,bakeRenderer,resolveBake}from"./bake.js";export{Curve,SAME_POINT}from"./curve.js";export{defineScenery,isScenery,SCENERY_RENDERER_DEFAULTS}from"./define.js";export{FIT_DEFAULTS,fitCamera}from"./fit.js";export{diagonalLens,fieldOfView,fieldOfViewFromVertical,FULL_FRAME_DIAGONAL,lensForVertical,lensFrameProblem}from"./lens.js";export{blend,cutsOf,focusScreen,keys,mixCameras,momentOf,orbit,path,PATH_DEFAULTS,pathCurve,shots,stateOf,withCuts,NeedsTimeError}from"./move.js";export{GLASS_DEFAULTS,glassIor,glassProblems}from"./glass.js";export{aimAt,aimed,AIM_DEFAULTS,aimProblem,aimShape,rise}from"./aim.js";export{AUTO_EXPOSURE_DEFAULTS,AUTOFOCUS_DEFAULTS,handheld,HANDHELD_DEFAULTS,handheldProblem,STABILIZER_DEFAULTS}from"./handheld.js";export{bandNoise,gauss3,hash3,powerNoise,swellOf,unit3}from"./noise.js";export{convexHull,floorRect}from"./hull.js";export{solveCamera,SOLVE_DEFAULTS,SOLVE_PARAMS}from"./solve.js";export{invert3,moireAt,moireBand,moireCamera,moireProblems,moireScreen,MOIRE_GLSL,MOIRE_SCREENS,PANEL_DEFAULTS,SENSOR_DEFAULTS,STRIPE_DEPTH}from"./moire.js";export{screenFocus,SCREEN_FOCUS_DEFAULTS}from"./screen-focus.js";export{apply,homography,matrix3d,screenOnFrame,shownCentre,SCREEN_LIGHT_DEFAULTS,screenLightBaseProblem}from"./screen.js";export{AROUND_DEFAULTS,FLOOR_DEFAULTS,INVENTORY_FRAME,MAP_DEFAULTS,MAP_VIEWS,MEASURE_DEFAULTS,MOTION_DEFAULTS,SIDES,topObjects}from"./report.js";export{channel,motionOf}from"./motion.js";export{easeValue,timedNumber}from"./timing.js";export{PHONE_CAMERA,phoneCamera}from"./phone.js";
|
|
2
|
+
export{blurDiameter,CAMERA_DEFAULTS,CameraError,cameraProblems,directionOf,exposureOf,project,resolveCamera,yawPitchOf}from"./camera.js";export{BAKE_CPU,BAKE_DEFAULTS,BAKE_MIN_SIZE,bakeProblems,bakeRenderer,resolveBake}from"./bake.js";export{Curve,SAME_POINT}from"./curve.js";export{defineScenery,isScenery,SCENERY_RENDERER_DEFAULTS}from"./define.js";export{FIT_DEFAULTS,fitCamera}from"./fit.js";export{diagonalLens,fieldOfView,fieldOfViewFromVertical,FULL_FRAME_DIAGONAL,lensForVertical,lensFrameProblem}from"./lens.js";export{blend,cutsOf,focusScreen,keys,mixCameras,momentOf,orbit,path,PATH_DEFAULTS,pathCurve,shots,stateOf,withCuts,NeedsTimeError}from"./move.js";export{GLASS_DEFAULTS,glassIor,glassProblems}from"./glass.js";export{aimAt,aimed,AIM_DEFAULTS,aimProblem,aimShape,rise}from"./aim.js";export{AUTO_EXPOSURE_DEFAULTS,AUTOFOCUS_DEFAULTS,handheld,HANDHELD_DEFAULTS,handheldProblem,STABILIZER_DEFAULTS}from"./handheld.js";export{bandNoise,gauss3,hash3,powerNoise,swellOf,unit3}from"./noise.js";export{convexHull,floorRect}from"./hull.js";export{solveCamera,SOLVE_DEFAULTS,SOLVE_PARAMS}from"./solve.js";export{invert3,moireAt,moireBand,moireCamera,moireProblems,screenGradeWeight,moireScreen,MOIRE_GLSL,MOIRE_SCREENS,PANEL_DEFAULTS,SENSOR_DEFAULTS,STRIPE_DEPTH}from"./moire.js";export{screenFocus,SCREEN_FOCUS_DEFAULTS}from"./screen-focus.js";export{apply,homography,matrix3d,clipToFrame,screenOnFrame,shownCentre,SCREEN_LIGHT_DEFAULTS,screenLightBaseProblem}from"./screen.js";export{AROUND_DEFAULTS,FLOOR_DEFAULTS,INVENTORY_FRAME,MAP_DEFAULTS,MAP_VIEWS,MEASURE_DEFAULTS,MOTION_DEFAULTS,SIDES,topObjects}from"./report.js";export{channel,motionOf}from"./motion.js";export{easeValue,timedNumber}from"./timing.js";export{PHONE_CAMERA,phoneCamera}from"./phone.js";
|
|
@@ -22,19 +22,58 @@ export interface SensorOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
distortion?: number;
|
|
24
24
|
/**
|
|
25
|
-
* How the phone grades what it films: the
|
|
26
|
-
*
|
|
25
|
+
* How the phone grades what it films, by what fills its frame: the room's
|
|
26
|
+
* grade, and as a screen comes to fill the frame, the grade it gives a lit
|
|
27
|
+
* screen (it exposes for the screen's light), eased between them frame by
|
|
28
|
+
* frame. On the scenery layer's picture alone, not on what is laid over
|
|
29
|
+
* it. null for no grade.
|
|
27
30
|
*/
|
|
28
|
-
grade?:
|
|
29
|
-
filter: string;
|
|
30
|
-
} | null;
|
|
31
|
+
grade?: SensorGrade | null;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A grade: the picture's brightness through a curve, every colour moved
|
|
35
|
+
* with it so hues stay (a grade of luma alone), then the colours' strength,
|
|
36
|
+
* a turn of their hue, and a white balance.
|
|
37
|
+
*/
|
|
38
|
+
export interface Grade {
|
|
39
|
+
/** [brightness in, brightness out] points, 0–1, from in 0 to in 1 in order, joined by straight lines. */
|
|
40
|
+
curve: [number, number][];
|
|
41
|
+
/** How strong the colours are after it (1: as they were; 0: grey). */
|
|
42
|
+
saturation?: number;
|
|
43
|
+
/** The colours' hue turned this many degrees. */
|
|
44
|
+
hue?: number;
|
|
45
|
+
/** Each channel's gain last, red, green and blue (a white balance; [1, 1, 1] none). */
|
|
46
|
+
balance?: [number, number, number];
|
|
47
|
+
}
|
|
48
|
+
/** How a phone grades what it films, by how much of its frame a screen fills (SensorOptions.grade). */
|
|
49
|
+
export interface SensorGrade {
|
|
50
|
+
/** What it films when no screen fills much of the frame: the room, a person. */
|
|
51
|
+
room: Grade;
|
|
52
|
+
/** A lit screen filmed close: the phone exposes for its light. */
|
|
53
|
+
screen: Grade;
|
|
54
|
+
/**
|
|
55
|
+
* The nearest screen's share of the frame where the room's grade starts
|
|
56
|
+
* to give way to the screen's, and where the screen's is whole (0–1).
|
|
57
|
+
*/
|
|
58
|
+
share: [number, number];
|
|
59
|
+
}
|
|
60
|
+
/** How much of the screen's grade a frame takes (0–1): eased between share[0] and share[1] of the frame filled. */
|
|
61
|
+
export declare function screenGradeWeight(share: number, [from, to]: readonly [number, number]): number;
|
|
32
62
|
/** A screen's physical pixels (screen({ pixels })). */
|
|
33
63
|
export interface PanelOptions {
|
|
34
64
|
/** Physical pixels per content pixel each way (a Retina laptop: 2). */
|
|
35
65
|
density?: number;
|
|
36
66
|
/** How much the dark lines between rows of pixels darken them (0–1). */
|
|
37
67
|
rows?: number;
|
|
68
|
+
/**
|
|
69
|
+
* The pixel mesh a phone's camera close to a screen shows (0–1, 0: none):
|
|
70
|
+
* a fine grid of faint dark lines, every three of the panel's pixels,
|
|
71
|
+
* drawn on the screen's picture. At a video's resolution the panel's own
|
|
72
|
+
* pixels are too fine to resolve (the moiré above is what is left of
|
|
73
|
+
* them), yet phone footage of a screen close up is never clean: this is
|
|
74
|
+
* that texture, as phone photos of a laptop's screen show it.
|
|
75
|
+
*/
|
|
76
|
+
mesh?: number;
|
|
38
77
|
}
|
|
39
78
|
export declare const SENSOR_DEFAULTS: {
|
|
40
79
|
photosites: number;
|
|
@@ -46,6 +85,7 @@ export declare const SENSOR_DEFAULTS: {
|
|
|
46
85
|
export declare const PANEL_DEFAULTS: {
|
|
47
86
|
density: number;
|
|
48
87
|
rows: number;
|
|
88
|
+
mesh: number;
|
|
49
89
|
};
|
|
50
90
|
/**
|
|
51
91
|
* The depth a stripe a third of a pixel wide gives its fundamental,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{blurDiameter as
|
|
2
|
+
import{blurDiameter as $}from"./camera.js";import{homography as z}from"./screen.js";export function screenGradeWeight(o,[e,s]){if(o<=e)return 0;if(o>=s)return 1;const t=(o-e)/(s-e);return t*t*(3-2*t)}function I(o,e){if(!o)return[`${e} is missing.`];const s=[],t=o.curve,u=n=>Number.isFinite(n)&&n>=0&&n<=1;(!Array.isArray(t)||t.length<2||t.some(n=>!u(n[0])||!u(n[1]))||t.some((n,i)=>i>0&&n[0]<=(t[i-1]?.[0]??-1))||t[0]?.[0]!==0||t[t.length-1]?.[0]!==1)&&s.push(`${e}.curve is [in, out] points from 0 to 1, in order, from in 0 to in 1.`),o.saturation!==void 0&&!(Number.isFinite(o.saturation)&&o.saturation>=0)&&s.push(`${e}.saturation is 0 or more, not ${String(o.saturation)}.`);const r=o.balance;return r!==void 0&&!(Array.isArray(r)&&r.length===3&&r.every(n=>Number.isFinite(n)&&n>=0&&n<=2))&&s.push(`${e}.balance is three gains from 0 to 2, red, green and blue.`),o.hue!==void 0&&!Number.isFinite(o.hue)&&s.push(`${e}.hue is a number of degrees, not ${String(o.hue)}.`),s}export const SENSOR_DEFAULTS={photosites:4032,lens:.35,moire:1,chroma:.3,distortion:-.03},PANEL_DEFAULTS={density:2,rows:.15,mesh:.09},STRIPE_DEPTH=2*Math.sin(Math.PI/3)/(Math.PI/3)/2;const M=2*Math.PI,P=o=>Math.abs(o)<1e-6?1:Math.sin(Math.PI*o)/(Math.PI*o);function C(o,e){if(e===1){const s=Math.round(o[0]+o[1]),t=Math.round(o[0]-o[1]);return[(s+t)/2,(s-t)/2]}return[Math.round(2*o[0])/2,Math.round(2*o[1])/2]}const R={0:[0,0],1:[1,0],2:[1,1]};function A(o,e,s,t,u,r,n){return N(o,e,s,t,u,r,n).factor}function N(o,e,s,t,u,r,n){const i=r.pitch,c=[s[0]*i,s[1]*i],d=T(t,r),l=[d[0]/i,d[1]/i],f=C(c,o),p=R[o],a=[(c[0]-f[0])/i,(c[1]-f[1])/i],m=Math.hypot(a[0],a[1]);if(m>=.5)return{factor:1,depth:0,period:1/0};const S=c[0]*c[0]+c[1]*c[1],k=Math.exp(-2*Math.PI**2*r.lens**2*S),v=n/4,x=Math.exp(-2*Math.PI**2*v**2*(s[0]*s[0]+s[1]*s[1])),y=Math.abs(P(c[0])*P(c[1])),g=Math.abs(P(a[0])*P(a[1]))*(1-2*m),h=Math.min(1,r.strength*u*k*x*y*g),b=e-M*(f[0]*l[0]+f[1]*l[1])+M*(f[0]*p[0]+f[1]*p[1]);return{factor:1-h*(1-Math.cos(b))/2,depth:h,period:m>0?1/m:1/0}}function T(o,e){const{k1:s,centre:t,radius:u}=e.distortion,r=o[0]-t[0],n=o[1]-t[1],i=(r*r+n*n)/(u*u),c=1+s*i;return[t[0]+r*c,t[1]+n*c]}const E=[.299,.587,.114];export function moireAt(o,e,s){const t=o.inverse,[u,r]=s,n=(t[6]??0)*u+(t[7]??0)*r+(t[8]??1);if(n<=0)return;const i=((t[0]??0)*u+(t[1]??0)*r+(t[2]??0))/n,c=((t[3]??0)*u+(t[4]??0)*r+(t[5]??0))/n,[d,l]=o.size;if(i<0||c<0||i>d||c>l)return;const f=[((t[0]??0)-(t[6]??0)*i)/n,((t[1]??0)-(t[7]??0)*i)/n],p=[((t[3]??0)-(t[6]??0)*c)/n,((t[4]??0)-(t[7]??0)*c)/n],a=o.density,[m,S,k]=o.depth,v=m+S*i+k*c,x=e.blur?e.blur.k*Math.abs(v-e.blur.focus)/Math.max(v,e.blur.near):0,y=[a*f[0],a*f[1]],g=[a*p[0],a*p[1]],h=[1,1,1];for(const w of[0,1,2]){const D=A(w,M*(a*i-w/3),y,s,STRIPE_DEPTH,e,x),F=A(w,M*a*c,g,s,o.rows*STRIPE_DEPTH,e,x);h[w]=D*F}const b=E[0]*h[0]+E[1]*h[1]+E[2]*h[2];return[b+e.chroma*(h[0]-b),b+e.chroma*(h[1]-b),b+e.chroma*(h[2]-b)]}export function moireBand(o,e,s){const t=o.inverse,[u,r]=s,n=(t[6]??0)*u+(t[7]??0)*r+(t[8]??1);if(n<=0)return;const i=((t[0]??0)*u+(t[1]??0)*r+(t[2]??0))/n,c=((t[3]??0)*u+(t[4]??0)*r+(t[5]??0))/n,[d,l]=o.size;if(i<0||c<0||i>d||c>l)return;const f=[((t[0]??0)-(t[6]??0)*i)/n,((t[1]??0)-(t[7]??0)*i)/n],p=[((t[3]??0)-(t[6]??0)*c)/n,((t[4]??0)-(t[7]??0)*c)/n],a=o.density,[m,S,k]=o.depth,v=m+S*i+k*c,x=e.blur?e.blur.k*Math.abs(v-e.blur.focus)/Math.max(v,e.blur.near):0;let y={depth:0,period:1/0};for(const g of[0,1,2])for(const h of[N(g,M*(a*i-g/3),[a*f[0],a*f[1]],s,STRIPE_DEPTH,e,x),N(g,M*a*c,[a*p[0],a*p[1]],s,o.rows*STRIPE_DEPTH,e,x)])h.depth>y.depth&&(y={depth:h.depth,period:h.period});return y}export const MOIRE_SCREENS=4,MOIRE_GLSL=`#version 300 es
|
|
3
3
|
precision highp float;
|
|
4
4
|
#define SCREENS ${String(MOIRE_SCREENS)}
|
|
5
5
|
uniform int count;
|
|
@@ -90,4 +90,4 @@ void main() {
|
|
|
90
90
|
}
|
|
91
91
|
// Off every screen: nothing (premultiplied).
|
|
92
92
|
colour = on ? vec4(factor, 1.0) : vec4(0.0);
|
|
93
|
-
}`;export function invert3(o){const[
|
|
93
|
+
}`;export function invert3(o){const[e=0,s=0,t=0,u=0,r=0,n=0,i=0,c=0,d=1]=o,l=r*d-n*c,f=-(u*d-n*i),p=u*c-r*i,a=e*l+s*f+t*p;if(!(Math.abs(a)<1e-18))return[l/a,-(s*d-t*c)/a,(s*n-t*r)/a,f/a,(e*d-t*i)/a,-(e*n-t*u)/a,p/a,-(e*c-s*i)/a,(e*r-s*u)/a]}export function moireScreen(o){const[e,s]=o.size,t=z(e,s,o.quad),u=t?invert3(t):void 0;if(!u)return;const r=o.camera,n=f=>(f[0]-r.position[0])*r.forward[0]+(f[1]-r.position[1])*r.forward[1]+(f[2]-r.position[2])*r.forward[2],[i,c,,d]=o.corners,l=n(i);return{inverse:u,size:[e,s],density:o.panel?.density??PANEL_DEFAULTS.density,rows:o.panel?.rows??PANEL_DEFAULTS.rows,depth:[l,(n(c)-l)/e,(n(d)-l)/s]}}export function moireCamera(o,e,s,t={},u=[0,0]){const r=t.photosites??SENSOR_DEFAULTS.photosites,n={pitch:Math.max(e[0],e[1])/r,lens:t.lens??SENSOR_DEFAULTS.lens,strength:t.moire??SENSOR_DEFAULTS.moire,chroma:t.chroma??SENSOR_DEFAULTS.chroma,distortion:{k1:t.distortion??SENSOR_DEFAULTS.distortion,centre:[e[0]/2-u[0],e[1]/2-u[1]],radius:Math.hypot(e[0],e[1])/2}},i=o.dof;if(i){const c=2*i.focus,d=$(o,c,s)*Math.max(c,o.near)/Math.abs(c-i.focus);n.blur={k:d,focus:i.focus,near:o.near}}return n}export function moireProblems(o,e){const s=[],t=(n,i)=>{n!==void 0&&!(Number.isFinite(n)&&n>0)&&s.push(`${i} is a positive number, not ${String(n)}.`)};t(o?.photosites,"sensor.photosites"),t(o?.lens,"sensor.lens"),t(e?.density,"pixels.density");const u=(n,i,c)=>{n!==void 0&&!(Number.isFinite(n)&&n>=0&&n<=c)&&s.push(`${i} is from 0 to ${String(c)}, not ${String(n)}.`)};u(o?.moire,"sensor.moire",4),u(o?.chroma,"sensor.chroma",1),o?.distortion!==void 0&&!(Number.isFinite(o.distortion)&&Math.abs(o.distortion)<=.5)&&s.push(`sensor.distortion is from -0.5 to 0.5, not ${String(o.distortion)}.`),u(e?.rows,"pixels.rows",1),u(e?.mesh,"pixels.mesh",1);const r=o?.grade;if(r){s.push(...I(r.room,"sensor.grade.room")),s.push(...I(r.screen,"sensor.grade.screen"));const[n=Number.NaN,i=Number.NaN]=r.share;Number.isFinite(n)&&Number.isFinite(i)&&n>=0&&n<i&&i<=1||s.push("sensor.grade.share is [from, to], 0 ≤ from < to ≤ 1.")}return s}
|
|
@@ -19,9 +19,10 @@ export interface PhoneCamera {
|
|
|
19
19
|
* hand: a 26 mm lens on its 4:3 frame at f/8 equivalent (f/1.8 on its
|
|
20
20
|
* small sensor), a 12 MP sensor, a hand whose tremor its stabiliser mostly
|
|
21
21
|
* takes out, focus that hunts after a cut, a reframe or a jolt, exposure
|
|
22
|
-
* that follows a new framing late, and a grade
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* that follows a new framing late, and a grade by what fills the frame:
|
|
23
|
+
* a phone's gentle contrast and colour on a room, and as a screen comes to
|
|
24
|
+
* fill the frame, the phone exposing for its light (its white a neutral
|
|
25
|
+
* light grey, its middle tones much darker, its colours deep).
|
|
25
26
|
*/
|
|
26
27
|
export declare const PHONE_CAMERA: PhoneCamera;
|
|
27
28
|
/** Something with every field optional, all the way down. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export const PHONE_CAMERA={lens:{lens:26,lensFrame:"phone",aperture:8},sensor:{photosites:4032,lens:.35,moire:1,chroma:.3,distortion:-.03,grade:{
|
|
2
|
+
export const PHONE_CAMERA={lens:{lens:26,lensFrame:"phone",aperture:8},sensor:{photosites:4032,lens:.35,moire:1,chroma:.3,distortion:-.03,grade:{room:{curve:[[0,0],[.25,.21],[.5,.47],[.75,.78],[1,1]],saturation:1.08},screen:{curve:[[0,0],[.36,.1],[.51,.16],[.67,.46],[.8,.84],[1,1]],saturation:1.25,hue:5,balance:[1,.97,1]},share:[.5,.8]}},hand:{angle:.25,roll:.6,shift:.001,sway:.65,tremor:{angle:.1,frequency:8.5},drift:{angle:.15,shift:.001,period:8},stabilizer:{strength:.7,cutoff:1.5},autofocus:{},exposure:{}}};const s=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function i(e,r){if(!s(e)||!s(r))return r===void 0?e:r;const t={...e};for(const[n,o]of Object.entries(r))t[n]=o===void 0?e[n]:i(e[n],o);return t}export function phoneCamera(e={}){return i(PHONE_CAMERA,e)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{publicNames as n}from"@allyhub/formats";import{FUNCTIONS as h}from"../calc/functions/index.js";import{AreaChart as d,BarChart as p,DataLabelList as m,DoughnutChart as c,GraphicalProperties as w,Legend as f,LineChart as u,LineProperties as y,Marker as g,NumericAxis as b,PieChart as k,Reference as _,ScatterChart as x,Scaling as C,Series as A,TextAxis as S}from"./charts.js";import{AutoFilter as v,ConditionalFormattingList as D,DataValidation as P,DataValidationList as F,DifferentialStyle as L,Rule as T}from"./rules.js";import{Alignment as R,Border as I,Color as N,Font as E,PatternFill as V,Side as B}from"./styles.js";import{Cell as W,ColumnDimension as j,DefinedName as G,DefinedNameDict as H,RowDimension as M,Table as O,TableList as U,Workbook as z,Worksheet as q}from"./workbook.js";import{Comment as X,HeaderFooter as J,HeaderFooterPart as K,Image as Q,PageMargins as Y,PageSetup as Z,SheetProtection as $}from"./page.js";const a={Series:{title:"A series' name in words, openpyxl's SeriesFactory argument, kept here as a field."},Workbook:{open:"Workbook.open(dir): a workbook's folder read (load_workbook(dir) is the same).",block_cells:"How many typed cells together go in a CSV file of their own: 100 unless set.",title:"The workbook's title, sheet.yaml's.",check:"wb.check(): what allyhub check would say of the workbook as it stands: a list of { file, line, message }."},Cell:{computed:"What the cell computes to, the workbook as it stands, saved or not."},Table:{key:"The column that lines rows up when two hands' changes merge."},DataValidation:{multiple:"A list's cell may hold several of its values, joined by separator: an .xlsx keeps them as text.",separator:"What joins a cell's choices: a comma and a space unless set."},PageSetup:{fitToWidth:"Pages wide; setting it or fitToHeight fits the sheet, with no pageSetUpPr to set."},ColumnDimension:{files:"Its cells name files, from the sheet's folder: true, or { separator, height }."}},ee=["add_data","set_categories","append","title","legend","width","height","style","anchor","series","dataLabels","x_axis","y_axis"],te={BarChart:["type","grouping","overlap","gapWidth","varyColors"],LineChart:["grouping"],AreaChart:["grouping"],PieChart:["varyColors"],DoughnutChart:["holeSize"],ScatterChart:[]},oe={Workbook:z.prototype,Worksheet:q.prototype,Cell:W.prototype,Font:E.prototype,PatternFill:V.prototype,Border:I.prototype,Side:B.prototype,Alignment:R.prototype,Color:N.prototype,Table:O.prototype,TableList:U.prototype,DefinedName:G.prototype,DefinedNameDict:H.prototype,ColumnDimension:j.prototype,RowDimension:M.prototype,ConditionalFormattingList:D.prototype,Rule:T.prototype,DifferentialStyle:L.prototype,DataValidation:P.prototype,DataValidationList:F.prototype,AutoFilter:v.prototype,BarChart:p.prototype,LineChart:u.prototype,AreaChart:d.prototype,PieChart:k.prototype,DoughnutChart:c.prototype,ScatterChart:x.prototype,Reference:_.prototype,Series:A.prototype,Legend:f.prototype,Scaling:C.prototype,TextAxis:S.prototype,NumericAxis:b.prototype,DataLabelList:m.prototype,Marker:g.prototype,GraphicalProperties:w.prototype,LineProperties:y.prototype,PageSetup:Z.prototype,PageMargins:Y.prototype,_HeaderFooterItem:J.prototype,_HeaderFooterPart:K.prototype,SheetProtection:$.prototype,Comment:X.prototype,Image:Q.prototype},r=["title","scaling","majorUnit","number_format","delete","majorGridlines"],ae={_HeaderFooterItem:["left","center","right"],Comment:["text","author"],Image:["path","width","height","anchor"],Workbook:["worksheets","defined_names","data_only","path","title","block_cells"],Cell:["row","column"],Worksheet:["min_row","min_column"],Font:["name","size","bold","italic","underline","strike","color"],PatternFill:["fill_type","fgColor","bgColor"],Border:["left","right","top","bottom"],Side:["style","color"],Alignment:["horizontal","vertical","wrap_text","shrink_to_fit","indent","text_rotation"],Color:["rgb"],Table:["displayName","ref","key","autoFilter"],DefinedName:["name","attr_text"],ColumnDimension:["index"],RowDimension:["index"],Rule:["type","operator","formula","stopIfTrue","rank","percent","bottom","aboveAverage","equalAverage","text","dxf"],DifferentialStyle:["font","fill","border"],DataValidation:["type","formula1","formula2","operator","allow_blank","showDropDown","showErrorMessage","showInputMessage","errorStyle","errorTitle","error","promptTitle","prompt","sqref"],DataValidationList:["dataValidation"],AutoFilter:["ref"],...Object.fromEntries(Object.entries(te).map(([e,t])=>[e,[...ee.filter(o=>!(/^(?:Pie|Doughnut)/u.test(e)&&o.endsWith("_axis"))),...t]])),Reference:["worksheet","min_col","min_row","max_col","max_row"],Series:["val","xVal","title","smooth","marker","graphicalProperties"],Legend:["position"],Scaling:["min","max","orientation"],TextAxis:r.filter(e=>e!=="majorUnit"),NumericAxis:r,DataLabelList:["showVal","showPercent","showCatName","showSerName","dLblPos"],Marker:["symbol","size"],GraphicalProperties:["solidFill","noFill","line"],LineProperties:["width","solidFill","noFill"]};export const HELPERS=["CellIsRule","ColorScaleRule","DataBarRule","FormulaRule","IconSetRule","column_index_from_string","coordinate_to_tuple","get_column_letter","range_boundaries"];const re=()=>{const e={};for(const[t,o]of Object.entries(oe)){const i=a[t]??{};e[t]=[...n(o),...ae[t]??[]].filter(l=>!Object.hasOwn(i,l)).sort()}return e},s=e=>[...h.values()].filter(t=>t.from===e).map(t=>t.name).sort();export const CAPABILITIES={reference:{library:"openpyxl",version:"3.1.5",docs:"https://openpyxl.readthedocs.io/"},holds:re(),functions:HELPERS,differs:["A workbook is a folder, not a file: load_workbook(dir) reads sheet.yaml and its CSV files, wb.save(dir) writes them, and only what changed is written. This API does not read or write .xlsx: allyhub sheet import and allyhub render --type xlsx do.","A keyword argument of openpyxl's is a field of an object: new Font({ bold: true }), new Table({ displayName, ref }), new DefinedName(name, { attr_text }). Classes are made with new.","A name openpyxl has that is not held throws where it is used, naming what the class holds. ws['A1'], ws['A1:B2'], ws['A'], ws[1], wb['Sheet'], ws.tables['t'], wb.defined_names['n'], ws.column_dimensions['A'] and ws.row_dimensions[1] are held; in TypeScript ws['A1'] is typed as a Cell, so write ws['A1'].value = v (ws['A1'] = v works at run time), and wb.get_sheet_by_name(name) is typed where wb[name] is not.","Rows and columns count from 1, as openpyxl's. iter_rows, rows, columns and values give arrays, not generators.","A colour is #RRGGBB; RRGGBB and AARRGGBB are taken, the alpha left out. Theme colours are not held.","cell.value of a date is a Date (read in UTC), a formula's its text, and with load_workbook(dir, { data_only: true }) what it computes to, which openpyxl reads from a file's cache and this computes.","column_dimensions' width is Excel's unit and row_dimensions' height points, as openpyxl's; the file holds pixels.","ws.merged_cells is an array of each merged range's text.","A table's rows are its CSV file, so ws.add_table(new Table({ displayName, ref })) moves the cells of ref there; its header row names its columns. A column whose every row has one formula, moved, is written as a calculated column.","A run of cells with one formula, moved, is written as one range key, and at least wb.block_cells typed cells together in a CSV file of their own (a block).","ws.title = 'New' renames the sheet in every formula, which openpyxl leaves to you.","ws.insert_rows, delete_rows, insert_cols and delete_cols rewrite every formula of the workbook as Excel does (a reference moves, a range grows or shrinks, one to what went is #REF!), move tables, blocks, merges and looks, and take rows and columns in or out of a table's CSV file. openpyxl moves cells and leaves formulas as they were. A table's header row is not deleted unless all of the table is.","A string that reads as another value (=, 12%, 2026-01-01) stays text, as openpyxl's does: its cell is written with a leading ' unless it starts with =, which makes it a formula.","A DataValidation refuses what breaks it and shows its prompt unless showErrorMessage or showInputMessage is false, as Excel's dialog starts: openpyxl's leave both off. A list's cell keeps its blank unless allow_blank is false.","ws.auto_filter.ref and add_filter_column say what a filter keeps, and the rows it leaves out are worked out from that, never written: a file made by openpyxl hides nothing until Excel reapplies it. A table has its own, table.autoFilter. add_sort_condition is not held: sorting is the rows of the files in order.","A chart reads its cells live, whatever else is in the file: there is no cache to refresh. chart.add_data and set_categories, and Series, take a Reference or a formula's text for a table's column or a spill, as add_data('orders[total]', { title: 'Total' }) or set_categories('orders[month]'), since a Reference cannot name one.","Series is made with new Series(values, { xvalues, title, title_from_data }); openpyxl's is the SeriesFactory function.","A chart's width and height are centimetres, as openpyxl's; the file holds pixels, and anchor a cell: ws.add_chart(chart, 'E2').","A LineChart's grouping is standard; a stacked area is an AreaChart. Chart styles are kept but draw nothing, as sheet.yaml has no place for them: chart.style is only read.","ws._charts lists a sheet's charts, those read from sheet.yaml among them, as the classes above.","In a rule, a fill's bgColor paints, or its fgColor where it has none. A rule's font holds bold, italic, underline, strike and a colour; alignment and number formats in a rule are not held.","workbook((wb, { data }) => { … }), the default export of an item's sheet.ts, makes sheets with these classes, on a workbook of its own that starts with none. They are made again from the code wherever the workbook is read, never saved: wb.save throws there."],adds:a,formulas:{own:s("allyhub"),formulajs:s("formulajs")}};
|
|
2
|
+
import{publicNames as n}from"@allyhub/formats";import{FUNCTIONS as h}from"../calc/functions/index.js";import{AreaChart as p,BarChart as d,DataLabelList as m,DoughnutChart as c,GraphicalProperties as w,Legend as f,LineChart as u,LineProperties as y,Marker as g,NumericAxis as b,PieChart as k,Reference as _,ScatterChart as x,Scaling as C,Series as A,TextAxis as S}from"./charts.js";import{AutoFilter as v,ConditionalFormattingList as D,DataValidation as L,DataValidationList as P,DifferentialStyle as F,Rule as T}from"./rules.js";import{Alignment as R,Border as I,Color as N,Font as E,PatternFill as V,Side as B}from"./styles.js";import{Cell as W,ColumnDimension as j,DefinedName as M,DefinedNameDict as G,RowDimension as H,Table as O,TableList as U,Workbook as z,Worksheet as q}from"./workbook.js";import{Comment as X,HeaderFooter as Y,HeaderFooterPart as J,Image as K,PageMargins as Q,PageSetup as Z,SheetProtection as $}from"./page.js";const a={Series:{title:"A series' name in words, openpyxl's SeriesFactory argument, kept here as a field."},Workbook:{open:"Workbook.open(path): a workbook read, by its file or a folder's sheet.yaml (load_workbook(path) is the same).",block_cells:"How many typed cells together go in a CSV file of their own: 100 unless set.",title:"The workbook's title, sheet.yaml's.",check:"wb.check(): what allyhub check would say of the workbook as it stands: a list of { file, line, message }."},Cell:{computed:"What the cell computes to, the workbook as it stands, saved or not."},Table:{key:"The column that lines rows up when two hands' changes merge."},DataValidation:{multiple:"A list's cell may hold several of its values, joined by separator: an .xlsx keeps them as text.",separator:"What joins a cell's choices: a comma and a space unless set."},PageSetup:{fitToWidth:"Pages wide; setting it or fitToHeight fits the sheet, with no pageSetUpPr to set."},ColumnDimension:{files:"Its cells name files, from the sheet's folder: true, or { separator, height }."}},ee=["add_data","set_categories","append","title","legend","width","height","style","anchor","series","dataLabels","x_axis","y_axis"],te={BarChart:["type","grouping","overlap","gapWidth","varyColors"],LineChart:["grouping"],AreaChart:["grouping"],PieChart:["varyColors"],DoughnutChart:["holeSize"],ScatterChart:[]},oe={Workbook:z.prototype,Worksheet:q.prototype,Cell:W.prototype,Font:E.prototype,PatternFill:V.prototype,Border:I.prototype,Side:B.prototype,Alignment:R.prototype,Color:N.prototype,Table:O.prototype,TableList:U.prototype,DefinedName:M.prototype,DefinedNameDict:G.prototype,ColumnDimension:j.prototype,RowDimension:H.prototype,ConditionalFormattingList:D.prototype,Rule:T.prototype,DifferentialStyle:F.prototype,DataValidation:L.prototype,DataValidationList:P.prototype,AutoFilter:v.prototype,BarChart:d.prototype,LineChart:u.prototype,AreaChart:p.prototype,PieChart:k.prototype,DoughnutChart:c.prototype,ScatterChart:x.prototype,Reference:_.prototype,Series:A.prototype,Legend:f.prototype,Scaling:C.prototype,TextAxis:S.prototype,NumericAxis:b.prototype,DataLabelList:m.prototype,Marker:g.prototype,GraphicalProperties:w.prototype,LineProperties:y.prototype,PageSetup:Z.prototype,PageMargins:Q.prototype,_HeaderFooterItem:Y.prototype,_HeaderFooterPart:J.prototype,SheetProtection:$.prototype,Comment:X.prototype,Image:K.prototype},r=["title","scaling","majorUnit","number_format","delete","majorGridlines"],ae={_HeaderFooterItem:["left","center","right"],Comment:["text","author"],Image:["path","width","height","anchor"],Workbook:["worksheets","defined_names","data_only","path","title","block_cells"],Cell:["row","column"],Worksheet:["min_row","min_column"],Font:["name","size","bold","italic","underline","strike","color"],PatternFill:["fill_type","fgColor","bgColor"],Border:["left","right","top","bottom"],Side:["style","color"],Alignment:["horizontal","vertical","wrap_text","shrink_to_fit","indent","text_rotation"],Color:["rgb"],Table:["displayName","ref","key","autoFilter"],DefinedName:["name","attr_text"],ColumnDimension:["index"],RowDimension:["index"],Rule:["type","operator","formula","stopIfTrue","rank","percent","bottom","aboveAverage","equalAverage","text","dxf"],DifferentialStyle:["font","fill","border"],DataValidation:["type","formula1","formula2","operator","allow_blank","showDropDown","showErrorMessage","showInputMessage","errorStyle","errorTitle","error","promptTitle","prompt","sqref"],DataValidationList:["dataValidation"],AutoFilter:["ref"],...Object.fromEntries(Object.entries(te).map(([e,t])=>[e,[...ee.filter(o=>!(/^(?:Pie|Doughnut)/u.test(e)&&o.endsWith("_axis"))),...t]])),Reference:["worksheet","min_col","min_row","max_col","max_row"],Series:["val","xVal","title","smooth","marker","graphicalProperties"],Legend:["position"],Scaling:["min","max","orientation"],TextAxis:r.filter(e=>e!=="majorUnit"),NumericAxis:r,DataLabelList:["showVal","showPercent","showCatName","showSerName","dLblPos"],Marker:["symbol","size"],GraphicalProperties:["solidFill","noFill","line"],LineProperties:["width","solidFill","noFill"]};export const HELPERS=["CellIsRule","ColorScaleRule","DataBarRule","FormulaRule","IconSetRule","column_index_from_string","coordinate_to_tuple","get_column_letter","range_boundaries"];const re=()=>{const e={};for(const[t,o]of Object.entries(oe)){const i=a[t]??{};e[t]=[...n(o),...ae[t]??[]].filter(l=>!Object.hasOwn(i,l)).sort()}return e},s=e=>[...h.values()].filter(t=>t.from===e).map(t=>t.name).sort();export const CAPABILITIES={reference:{library:"openpyxl",version:"3.1.5",docs:"https://openpyxl.readthedocs.io/"},holds:re(),functions:HELPERS,differs:["A workbook is a YAML file and the CSV files beside it: load_workbook(path) reads them, by the file or a folder's sheet.yaml, wb.save(path) writes them, and only what changed is written. This API does not read or write .xlsx: allyhub sheet import and allyhub render --type xlsx do.","A keyword argument of openpyxl's is a field of an object: new Font({ bold: true }), new Table({ displayName, ref }), new DefinedName(name, { attr_text }). Classes are made with new.","A name openpyxl has that is not held throws where it is used, naming what the class holds. ws['A1'], ws['A1:B2'], ws['A'], ws[1], wb['Sheet'], ws.tables['t'], wb.defined_names['n'], ws.column_dimensions['A'] and ws.row_dimensions[1] are held; in TypeScript ws['A1'] is typed as a Cell, so write ws['A1'].value = v (ws['A1'] = v works at run time), and wb.get_sheet_by_name(name) is typed where wb[name] is not.","Rows and columns count from 1, as openpyxl's. iter_rows, rows, columns and values give arrays, not generators.","A colour is #RRGGBB; RRGGBB and AARRGGBB are taken, the alpha left out. Theme colours are not held.","cell.value of a date is a Date (read in UTC), a formula's its text, and with load_workbook(path, { data_only: true }) what it computes to, which openpyxl reads from a file's cache and this computes.","column_dimensions' width is Excel's unit and row_dimensions' height points, as openpyxl's; the file holds pixels.","ws.merged_cells is an array of each merged range's text.","A table's rows are its CSV file, so ws.add_table(new Table({ displayName, ref })) moves the cells of ref there; its header row names its columns. A column whose every row has one formula, moved, is written as a calculated column.","A run of cells with one formula, moved, is written as one range key, and at least wb.block_cells typed cells together in a CSV file of their own (a block).","ws.title = 'New' renames the sheet in every formula, which openpyxl leaves to you.","ws.insert_rows, delete_rows, insert_cols and delete_cols rewrite every formula of the workbook as Excel does (a reference moves, a range grows or shrinks, one to what went is #REF!), move tables, blocks, merges and looks, and take rows and columns in or out of a table's CSV file. openpyxl moves cells and leaves formulas as they were. A table's header row is not deleted unless all of the table is.","A string that reads as another value (=, 12%, 2026-01-01) stays text, as openpyxl's does: its cell is written with a leading ' unless it starts with =, which makes it a formula.","A DataValidation refuses what breaks it and shows its prompt unless showErrorMessage or showInputMessage is false, as Excel's dialog starts: openpyxl's leave both off. A list's cell keeps its blank unless allow_blank is false.","ws.auto_filter.ref and add_filter_column say what a filter keeps, and the rows it leaves out are worked out from that, never written: a file made by openpyxl hides nothing until Excel reapplies it. A table has its own, table.autoFilter. add_sort_condition is not held: sorting is the rows of the files in order.","A chart reads its cells live, whatever else is in the file: there is no cache to refresh. chart.add_data and set_categories, and Series, take a Reference or a formula's text for a table's column or a spill, as add_data('orders[total]', { title: 'Total' }) or set_categories('orders[month]'), since a Reference cannot name one.","Series is made with new Series(values, { xvalues, title, title_from_data }); openpyxl's is the SeriesFactory function.","A chart's width and height are centimetres, as openpyxl's; the file holds pixels, and anchor a cell: ws.add_chart(chart, 'E2').","A LineChart's grouping is standard; a stacked area is an AreaChart. Chart styles are kept but draw nothing, as sheet.yaml has no place for them: chart.style is only read.","ws._charts lists a sheet's charts, those read from sheet.yaml among them, as the classes above.","In a rule, a fill's bgColor paints, or its fgColor where it has none. A rule's font holds bold, italic, underline, strike and a colour; alignment and number formats in a rule are not held.","workbook((wb, { data }) => { … }), the default export of the code a sheet's file names (code: ./forecast.ts), makes sheets with these classes, on a workbook of its own that starts with none. They are made again from the code wherever the workbook is read, never saved: wb.save throws there."],adds:a,formulas:{own:s("allyhub"),formulajs:s("formulajs")}};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Workbook } from "./workbook.js";
|
|
2
|
-
import type { GeneratedSheets } from "
|
|
2
|
+
import type { GeneratedSheets } from "@allyhub/formats";
|
|
3
3
|
/** Marks what workbook() makes. */
|
|
4
4
|
export declare const WORKBOOK_BRAND = "__allyhubWorkbook";
|
|
5
5
|
export interface SheetCodeContext {
|
|
6
|
-
/** A project file, from the
|
|
6
|
+
/** A project file, from the code's folder: CSV as a row object each, YAML and JSON as they are. */
|
|
7
7
|
data: (path: string) => unknown;
|
|
8
8
|
}
|
|
9
9
|
export type SheetCodeBuild = (wb: Workbook, ctx: SheetCodeContext) => unknown;
|
|
10
|
-
/** The default export of
|
|
10
|
+
/** The default export of a sheet's code. */
|
|
11
11
|
export interface SheetCode {
|
|
12
12
|
readonly [WORKBOOK_BRAND]: true;
|
|
13
13
|
/** Runs it. Here, in the module its classes are from, whoever calls. */
|
|
14
14
|
readonly generate: (ctx: SheetCodeContext) => GeneratedSheets;
|
|
15
15
|
}
|
|
16
16
|
export declare function isSheetCode(v: unknown): v is SheetCode;
|
|
17
|
-
/** What
|
|
17
|
+
/** What a sheet's code exports: export default workbook((wb, { data }) => { … }). */
|
|
18
18
|
export declare function workbook(build: SheetCodeBuild): SheetCode;
|
|
19
19
|
//# sourceMappingURL=code.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{Workbook as
|
|
2
|
+
import{Workbook as r}from"./workbook.js";export const WORKBOOK_BRAND="__allyhubWorkbook";export function isSheetCode(o){return typeof o=="object"&&o!==null&&WORKBOOK_BRAND in o}export function workbook(o){if(typeof o!="function")throw new TypeError("A sheet's code exports one function: export default workbook((wb, { data }) => { … }).");return{[WORKBOOK_BRAND]:!0,generate:e=>{const t=new r;if(t.worksheets=[],t._making=!0,o(t,e)instanceof Promise)throw new TypeError("A sheet's code waits for nothing: it is not async, as it has no network and reads with data().");return t._generated()}}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type SheetNote, type SheetPicture, type SheetPrint, type SheetConditional, type SheetFile, type SheetFilesColumn, type SheetTable, type SheetWorksheet } from "@allyhub/formats";
|
|
2
2
|
import { Comment, HeaderFooter, PageMargins, PageSetup, SheetProtection, type Image } from "./page.js";
|
|
3
3
|
import { Calc } from "../calc/engine.js";
|
|
4
|
-
import { type ParsedCsv } from "
|
|
4
|
+
import { type ParsedCsv } from "@allyhub/formats";
|
|
5
5
|
import type { SheetProblem } from "../file.js";
|
|
6
|
-
import { type GeneratedSheets } from "
|
|
6
|
+
import { type GeneratedSheets } from "@allyhub/formats";
|
|
7
7
|
import { type StructureEdit } from "../formula/rewrite.js";
|
|
8
8
|
import { type Scalar } from "../values.js";
|
|
9
9
|
import { type CellLook, type Workbook as Model, type Worksheet as ModelSheet } from "../workbook.js";
|
|
@@ -263,7 +263,7 @@ export declare class Workbook {
|
|
|
263
263
|
readonly data_only: boolean;
|
|
264
264
|
/** The workbook's title, sheet.yaml's. */
|
|
265
265
|
title: string | undefined;
|
|
266
|
-
/**
|
|
266
|
+
/** Its file, where it was opened or last saved. */
|
|
267
267
|
path: string | undefined;
|
|
268
268
|
/** How many typed cells together go in a CSV file of their own. */
|
|
269
269
|
block_cells: number;
|
|
@@ -280,12 +280,12 @@ export declare class Workbook {
|
|
|
280
280
|
_active: number;
|
|
281
281
|
/** Something changed since the files were last made. */
|
|
282
282
|
_pending: boolean;
|
|
283
|
-
/** It is sheet
|
|
283
|
+
/** It is a sheet's code's: what it makes is never saved. */
|
|
284
284
|
_making: boolean;
|
|
285
285
|
private _calc;
|
|
286
286
|
constructor(o?: LoadOptions);
|
|
287
|
-
/** A workbook
|
|
288
|
-
static open(
|
|
287
|
+
/** A workbook read from its file. */
|
|
288
|
+
static open(path: string, o?: LoadOptions): Workbook;
|
|
289
289
|
private _read;
|
|
290
290
|
private _keepCsv;
|
|
291
291
|
private _load;
|
|
@@ -306,6 +306,7 @@ export declare class Workbook {
|
|
|
306
306
|
private _rewrite;
|
|
307
307
|
private _rewriteCsv;
|
|
308
308
|
private _sheetEntry;
|
|
309
|
+
/** A new table's CSV file, beside the workbook's file, under a name no file there has. */
|
|
309
310
|
private _dataPath;
|
|
310
311
|
/** A table added since the files were read: its cells become its CSV file. */
|
|
311
312
|
private _writeNewTable;
|
|
@@ -345,13 +346,16 @@ export declare class Workbook {
|
|
|
345
346
|
};
|
|
346
347
|
/** What allyhub check would say of it as it stands, added to openpyxl's. */
|
|
347
348
|
check(): SheetProblem[];
|
|
348
|
-
/** What sheet
|
|
349
|
+
/** What the sheet's code made on it: each CSV file named where it stands for no file on disk. */
|
|
349
350
|
_generated(): GeneratedSheets;
|
|
350
|
-
/**
|
|
351
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Writes its file and its CSV files beside it: where it came from, or to
|
|
353
|
+
* the file named (`finance/budget.yaml`).
|
|
354
|
+
*/
|
|
355
|
+
save(path?: string): void;
|
|
352
356
|
}
|
|
353
|
-
/** A workbook's
|
|
354
|
-
export declare function load_workbook(
|
|
357
|
+
/** A workbook read, by its file or a folder's sheet.yaml: openpyxl's load_workbook. */
|
|
358
|
+
export declare function load_workbook(path: string, o?: LoadOptions): Workbook;
|
|
355
359
|
/** openpyxl's helpers for addresses. */
|
|
356
360
|
export declare const get_column_letter: (column: number) => string;
|
|
357
361
|
export declare function column_index_from_string(letters: string): number;
|