@allyhub/sdk 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/NOTICE +46 -49
- package/dist/dom.d.ts +1 -209
- package/dist/dom.js +1 -1
- package/dist/image.d.ts +2 -0
- package/dist/image.js +2 -0
- package/dist/index.d.ts +1 -21
- package/dist/index.js +1 -1
- package/dist/media.d.ts +1 -5
- package/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
- package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
- package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +20 -82
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -8
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
- package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +46 -42
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
- package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
- package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
- package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
- package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
- package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
- package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
- package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
- package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
- package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/measure/package.json +13 -0
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
- package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
- package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
- package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
- package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +421 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
- package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +285 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
- package/dist/node_modules/@allyhub/piece/package.json +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +139 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
- package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +22 -9
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +5 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +273 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
- package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
- package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
- package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
- package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
- package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
- package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
- package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -4
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +5 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +44 -4
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
- package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +208 -0
- package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +19 -2
- package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +17 -10
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
- package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
- package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
- package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
- package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
- package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
- package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
- package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
- package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
- package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +22 -430
- package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +6 -12
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
- package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
- package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
- package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
- package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
- package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
- package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
- package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
- package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
- package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
- package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
- package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
- package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
- package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
- package/dist/scenery.d.ts +1 -1
- package/dist/scenery.js +1 -1
- package/dist/sheets.d.ts +1 -1
- package/dist/sheets.js +1 -1
- package/dist/slides.d.ts +1 -9
- package/dist/slides.js +1 -1
- package/docs/README.md +8 -6
- package/docs/batches.md +5 -5
- package/docs/contract.md +2 -2
- package/docs/defaults.md +278 -20
- package/docs/docs.md +77 -63
- package/docs/footage.md +7 -7
- package/docs/image.md +165 -0
- package/docs/layers.md +22 -13
- package/docs/modeling.md +4 -4
- package/docs/pictures.md +65 -0
- package/docs/project.md +51 -31
- package/docs/scenery.md +11 -11
- package/docs/sheets.md +26 -25
- package/docs/slides.md +73 -65
- package/docs/sound.md +3 -3
- package/docs/speech.md +8 -8
- package/docs/video.md +16 -13
- package/docs/websites.md +4 -4
- package/package.json +7 -2
- package/dist/define.js +0 -2
- package/dist/free.js +0 -2
- package/dist/input.js +0 -2
- package/dist/module.js +0 -2
- package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
- package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
- package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
- package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
- package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
- package/dist/parts.js +0 -2
- package/dist/piece.js +0 -2
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
- /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
- /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
- /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
- /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
- /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
- /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
- /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
- /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
- /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
- /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
- /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
- /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
- /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
- /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
- /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
AllyHub Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AllyHub, Inc. ("AllyHub"). All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software (the AllyHub command-line tool, its SDK, runtime and the
|
|
6
|
+
packages they depend on) is proprietary. It is not open source.
|
|
7
|
+
|
|
8
|
+
1. Permitted use. You may install and run the software, unmodified, to make,
|
|
9
|
+
check, preview and render videos and decks, including for commercial
|
|
10
|
+
purposes. What you make with it is yours.
|
|
11
|
+
|
|
12
|
+
2. Restrictions. Except as this license permits or applicable law requires,
|
|
13
|
+
you may not copy, modify, adapt, translate, sublicense, sell, rent, lease,
|
|
14
|
+
publish or otherwise distribute the software, create derivative works of
|
|
15
|
+
it, or reverse engineer, decompile or disassemble it.
|
|
16
|
+
|
|
17
|
+
3. Cloud services. AllyHub's cloud tools (sign-in, research, images, voice,
|
|
18
|
+
video) are separate services governed by AllyHub's terms of service.
|
|
19
|
+
|
|
20
|
+
4. Trademarks. This license grants no right to use the name "AllyHub" or its
|
|
21
|
+
logos.
|
|
22
|
+
|
|
23
|
+
5. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
24
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
|
26
|
+
ALLYHUB BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
|
|
28
|
+
|
|
29
|
+
6. Third-party code. Parts of the software are adapted from HyperFrames,
|
|
30
|
+
licensed under the Apache License, Version 2.0 (see NOTICE). Those parts
|
|
31
|
+
remain under that license, reproduced below, and nothing in this license
|
|
32
|
+
limits your rights under it.
|
|
33
|
+
|
|
34
|
+
7. Starter components. The starter components in the "components" folder,
|
|
35
|
+
which "allyhub add" copies into your workspace, are licensed under the MIT
|
|
36
|
+
License (see components/LICENSE): once copied, you may change, use and
|
|
37
|
+
share them freely.
|
|
38
|
+
|
|
39
|
+
--------------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
Apache License
|
|
42
|
+
Version 2.0, January 2004
|
|
43
|
+
http://www.apache.org/licenses/
|
|
44
|
+
|
|
45
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
46
|
+
|
|
47
|
+
1. Definitions.
|
|
48
|
+
|
|
49
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
50
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
51
|
+
|
|
52
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
53
|
+
the copyright owner that is granting the License.
|
|
54
|
+
|
|
55
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
56
|
+
other entities that control, are controlled by, or are under common
|
|
57
|
+
control with that entity. For the purposes of this definition,
|
|
58
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
59
|
+
direction or management of such entity, whether by contract or
|
|
60
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
61
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
62
|
+
|
|
63
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
64
|
+
exercising permissions granted by this License.
|
|
65
|
+
|
|
66
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
67
|
+
including but not limited to software source code, documentation
|
|
68
|
+
source, and configuration files.
|
|
69
|
+
|
|
70
|
+
"Object" form shall mean any form resulting from mechanical
|
|
71
|
+
transformation or translation of a Source form, including but
|
|
72
|
+
not limited to compiled object code, generated documentation,
|
|
73
|
+
and conversions to other media types.
|
|
74
|
+
|
|
75
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
76
|
+
Object form, made available under the License, as indicated by a
|
|
77
|
+
copyright notice that is included in or attached to the work
|
|
78
|
+
(an example is provided in the Appendix below).
|
|
79
|
+
|
|
80
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
81
|
+
form, that is based on (or derived from) the Work and for which the
|
|
82
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
83
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
84
|
+
of this License, Derivative Works shall not include works that remain
|
|
85
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
86
|
+
the Work and Derivative Works thereof.
|
|
87
|
+
|
|
88
|
+
"Contribution" shall mean any work of authorship, including
|
|
89
|
+
the original version of the Work and any modifications or additions
|
|
90
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
91
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
92
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
93
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
94
|
+
means any form of electronic, verbal, or written communication sent
|
|
95
|
+
to the Licensor or its representatives, including but not limited to
|
|
96
|
+
communication on electronic mailing lists, source code control systems,
|
|
97
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
98
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
99
|
+
excluding communication that is conspicuously marked or otherwise
|
|
100
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
101
|
+
|
|
102
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
103
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
104
|
+
subsequently incorporated within the Work.
|
|
105
|
+
|
|
106
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
107
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
108
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
109
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
110
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
111
|
+
Work and such Derivative Works in Source or Object form.
|
|
112
|
+
|
|
113
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
114
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
115
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
116
|
+
(except as stated in this section) patent license to make, have made,
|
|
117
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
118
|
+
where such license applies only to those patent claims licensable
|
|
119
|
+
by such Contributor that are necessarily infringed by their
|
|
120
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
121
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
122
|
+
institute patent litigation against any entity (including a
|
|
123
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
124
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
125
|
+
or contributory patent infringement, then any patent licenses
|
|
126
|
+
granted to You under this License for that Work shall terminate
|
|
127
|
+
as of the date such litigation is filed.
|
|
128
|
+
|
|
129
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
130
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
131
|
+
modifications, and in Source or Object form, provided that You
|
|
132
|
+
meet the following conditions:
|
|
133
|
+
|
|
134
|
+
(a) You must give any other recipients of the Work or
|
|
135
|
+
Derivative Works a copy of this License; and
|
|
136
|
+
|
|
137
|
+
(b) You must cause any modified files to carry prominent notices
|
|
138
|
+
stating that You changed the files; and
|
|
139
|
+
|
|
140
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
141
|
+
that You distribute, all copyright, patent, trademark, and
|
|
142
|
+
attribution notices from the Source form of the Work,
|
|
143
|
+
excluding those notices that do not pertain to any part of
|
|
144
|
+
the Derivative Works; and
|
|
145
|
+
|
|
146
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
147
|
+
distribution, then any Derivative Works that You distribute must
|
|
148
|
+
include a readable copy of the attribution notices contained
|
|
149
|
+
within such NOTICE file, excluding those notices that do not
|
|
150
|
+
pertain to any part of the Derivative Works, in at least one
|
|
151
|
+
of the following places: within a NOTICE text file distributed
|
|
152
|
+
as part of the Derivative Works; within the Source form or
|
|
153
|
+
documentation, if provided along with the Derivative Works; or,
|
|
154
|
+
within a display generated by the Derivative Works, if and
|
|
155
|
+
wherever such third-party notices normally appear. The contents
|
|
156
|
+
of the NOTICE file are for informational purposes only and
|
|
157
|
+
do not modify the License. You may add Your own attribution
|
|
158
|
+
notices within Derivative Works that You distribute, alongside
|
|
159
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
160
|
+
that such additional attribution notices cannot be construed
|
|
161
|
+
as modifying the License.
|
|
162
|
+
|
|
163
|
+
You may add Your own copyright statement to Your modifications and
|
|
164
|
+
may provide additional or different license terms and conditions
|
|
165
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
166
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
167
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
168
|
+
the conditions stated in this License.
|
|
169
|
+
|
|
170
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
171
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
172
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
173
|
+
this License, without any additional terms or conditions.
|
|
174
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
175
|
+
the terms of any separate license agreement you may have executed
|
|
176
|
+
with Licensor regarding such Contributions.
|
|
177
|
+
|
|
178
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
179
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
180
|
+
except as required for reasonable and customary use in describing the
|
|
181
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
182
|
+
|
|
183
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
184
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
185
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
186
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
187
|
+
implied, including, without limitation, any warranties or conditions
|
|
188
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
189
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
190
|
+
appropriateness of using or redistributing the Work and assume any
|
|
191
|
+
risks associated with Your exercise of permissions under this License.
|
|
192
|
+
|
|
193
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
194
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
195
|
+
unless required by applicable law (such as deliberate and grossly
|
|
196
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
197
|
+
liable to You for damages, including any direct, indirect, special,
|
|
198
|
+
incidental, or consequential damages of any character arising as a
|
|
199
|
+
result of this License or out of the use or inability to use the
|
|
200
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
201
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
202
|
+
other commercial damages or losses), even if such Contributor
|
|
203
|
+
has been advised of the possibility of such damages.
|
|
204
|
+
|
|
205
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
206
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
207
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
208
|
+
or other liability obligations and/or rights consistent with this
|
|
209
|
+
License. However, in accepting such obligations, You may act only
|
|
210
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
211
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
212
|
+
defend, and hold each Contributor harmless for any liability
|
|
213
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
214
|
+
of your accepting any such warranty or additional liability.
|
|
215
|
+
|
|
216
|
+
END OF TERMS AND CONDITIONS
|
|
217
|
+
|
|
218
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
219
|
+
|
|
220
|
+
To apply the Apache License to your work, attach the following
|
|
221
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
222
|
+
replaced with your own identifying information. (Don't include
|
|
223
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
224
|
+
comment syntax for the file format. We also recommend that a
|
|
225
|
+
file or class name and description of purpose be included on the
|
|
226
|
+
same "printed page" as the copyright notice for easier
|
|
227
|
+
identification within third-party archives.
|
|
228
|
+
|
|
229
|
+
Copyright [yyyy] [name of copyright owner]
|
|
230
|
+
|
|
231
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
232
|
+
you may not use this file except in compliance with the License.
|
|
233
|
+
You may obtain a copy of the License at
|
|
234
|
+
|
|
235
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
236
|
+
|
|
237
|
+
Unless required by applicable law or agreed to in writing, software
|
|
238
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
239
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
240
|
+
See the License for the specific language governing permissions and
|
|
241
|
+
limitations under the License.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { type Img } from "./image.js";
|
|
2
|
+
/** Every threshold and choice of a comparison; COMPARE_DEFAULTS has their values. */
|
|
3
|
+
export interface CompareOptions {
|
|
4
|
+
/** A pixel differs when its ΔE*ab exceeds this (2.3 is about the smallest difference people see). */
|
|
5
|
+
tolerance: number;
|
|
6
|
+
/** What transparent pixels are seen over, as RGB. */
|
|
7
|
+
background: [number, number, number];
|
|
8
|
+
/** Differing pixels this many pixels apart or closer are one region. */
|
|
9
|
+
gap: number;
|
|
10
|
+
/** Look for the best offset within this many pixels each way (0: none). */
|
|
11
|
+
shift: number;
|
|
12
|
+
/** When the sizes differ: stretch the candidate to the reference's size, scale it to the reference's width, or neither (compare the common area). */
|
|
13
|
+
resize: "stretch" | "width" | "none";
|
|
14
|
+
/** The ΔE*ab at which the heatmap is fully red. */
|
|
15
|
+
heatMax: number;
|
|
16
|
+
/** SSIM's window, in pixels. */
|
|
17
|
+
ssimWindow: number;
|
|
18
|
+
/** An edge is a step of luma by more than this many levels (of 255) within `edgeSpan` pixels along a row or a column. */
|
|
19
|
+
edgeStep: number;
|
|
20
|
+
edgeSpan: number;
|
|
21
|
+
/**
|
|
22
|
+
* Grain is measured in blocks of this many pixels each way, on the
|
|
23
|
+
* share of them whose content is flattest (and not clipped).
|
|
24
|
+
*/
|
|
25
|
+
grainBlock: number;
|
|
26
|
+
grainShare: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const COMPARE_DEFAULTS: CompareOptions;
|
|
29
|
+
export interface DiffRegion {
|
|
30
|
+
/** x, y, width, height in the reference's pixels. */
|
|
31
|
+
box: [number, number, number, number];
|
|
32
|
+
/** Differing pixels in it. */
|
|
33
|
+
pixels: number;
|
|
34
|
+
meanDeltaE: number;
|
|
35
|
+
maxDeltaE: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ChannelStats {
|
|
38
|
+
/** Mean absolute difference, 0 to 255. */
|
|
39
|
+
mean: number;
|
|
40
|
+
max: number;
|
|
41
|
+
}
|
|
42
|
+
/** A picture's levels over the area compared, as encoded (0–255), over the background. */
|
|
43
|
+
export interface Levels {
|
|
44
|
+
/** Each channel's mean. */
|
|
45
|
+
rgb: [number, number, number];
|
|
46
|
+
/** Luma's (Rec. 709 weights) mean and its 5th, 50th and 95th percentiles. */
|
|
47
|
+
luma: {
|
|
48
|
+
mean: number;
|
|
49
|
+
p5: number;
|
|
50
|
+
p50: number;
|
|
51
|
+
p95: number;
|
|
52
|
+
};
|
|
53
|
+
/** The mean L* (0–100), a* (green to red) and b* (blue to yellow). */
|
|
54
|
+
lab: [number, number, number];
|
|
55
|
+
}
|
|
56
|
+
export interface CompareResult {
|
|
57
|
+
reference: {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
};
|
|
61
|
+
candidate: {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
};
|
|
65
|
+
/** How the candidate was resized to be compared, when its size differed. */
|
|
66
|
+
resized?: {
|
|
67
|
+
mode: CompareOptions["resize"];
|
|
68
|
+
from: [number, number];
|
|
69
|
+
to: [number, number];
|
|
70
|
+
scale: [number, number];
|
|
71
|
+
};
|
|
72
|
+
/** The area compared, in the reference's pixels. */
|
|
73
|
+
compared: [number, number, number, number];
|
|
74
|
+
/** The candidate was compared moved by x, y pixels (right and down). */
|
|
75
|
+
offset: {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
};
|
|
79
|
+
/** The offset search: the mean ΔE*ab at no offset and at the best one. */
|
|
80
|
+
search?: {
|
|
81
|
+
range: number;
|
|
82
|
+
unshifted: number;
|
|
83
|
+
best: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
meanDeltaE: number;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
pixels: number;
|
|
90
|
+
tolerance: number;
|
|
91
|
+
/** Pixels whose ΔE*ab is over the tolerance, and their share of `pixels`. */
|
|
92
|
+
differing: number;
|
|
93
|
+
share: number;
|
|
94
|
+
deltaE: {
|
|
95
|
+
mean: number;
|
|
96
|
+
max: number;
|
|
97
|
+
p95: number;
|
|
98
|
+
};
|
|
99
|
+
channels: {
|
|
100
|
+
r: ChannelStats;
|
|
101
|
+
g: ChannelStats;
|
|
102
|
+
b: ChannelStats;
|
|
103
|
+
alpha: ChannelStats;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Each picture's levels, and the candidate's less the reference's:
|
|
107
|
+
* positive where the candidate is brighter, redder (a*), yellower (b*).
|
|
108
|
+
*/
|
|
109
|
+
levels: {
|
|
110
|
+
reference: Levels;
|
|
111
|
+
candidate: Levels;
|
|
112
|
+
difference: Levels;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Each picture's grain where it is flat (grainOf; undefined where no
|
|
116
|
+
* block is flat), and the capture.grain.amount whose grain, added to the
|
|
117
|
+
* candidate's, gives the reference's (variances add; 0 when the
|
|
118
|
+
* candidate's is the stronger).
|
|
119
|
+
*/
|
|
120
|
+
grain: {
|
|
121
|
+
block: number;
|
|
122
|
+
share: number;
|
|
123
|
+
reference?: Grain;
|
|
124
|
+
candidate?: Grain;
|
|
125
|
+
amount?: number;
|
|
126
|
+
};
|
|
127
|
+
/** Mean SSIM of luma over windows (1: the same structure). */
|
|
128
|
+
ssim: number;
|
|
129
|
+
/** Every region, largest first. */
|
|
130
|
+
regions: DiffRegion[];
|
|
131
|
+
/**
|
|
132
|
+
* How soft each draws a fine edge: the 10–90 % rise of every strong step
|
|
133
|
+
* along the rows and columns compared, px of the reference. A Gaussian's
|
|
134
|
+
* is 2.563 sigmas. `soften` is the blur that widens the candidate's
|
|
135
|
+
* sharper quarter (p25) to the reference's, as capture.soften takes it
|
|
136
|
+
* (a sigma at 1080 lines); 0 when the candidate is the softer.
|
|
137
|
+
*/
|
|
138
|
+
edges: {
|
|
139
|
+
step: number;
|
|
140
|
+
span: number;
|
|
141
|
+
reference: EdgeWidths;
|
|
142
|
+
candidate: EdgeWidths;
|
|
143
|
+
soften?: number;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/** A picture's grain, measured where it is flat. */
|
|
147
|
+
export interface Grain {
|
|
148
|
+
/** The blocks measured: the flattest share of those not clipped (`of`). */
|
|
149
|
+
blocks: number;
|
|
150
|
+
of: number;
|
|
151
|
+
/** Luma's standard deviation in them after each block's slope is taken out, levels of 255, and as a share of full scale (capture.grain.amount's unit). */
|
|
152
|
+
sd: number;
|
|
153
|
+
amount: number;
|
|
154
|
+
/** How alike neighbouring pixels' grain is (0: a pixel each; below 0, as sharpening leaves it), and the capture.grain.size whose grain is that alike (px at 1080 lines). */
|
|
155
|
+
correlation: number;
|
|
156
|
+
size: number;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Grain where a picture is flat: blocks of `block` px each way whose mean
|
|
160
|
+
* is not near black or white, the `share` of them whose content (the
|
|
161
|
+
* means of their sixths, with their slope taken out) varies least, and in
|
|
162
|
+
* those, what is left of each pixel after the block's slope: its standard
|
|
163
|
+
* deviation and how alike neighbours are. Undefined with no such block.
|
|
164
|
+
*/
|
|
165
|
+
export declare function grainOf(luma: Float32Array, w: number, h: number, block?: number, share?: number): Grain | undefined;
|
|
166
|
+
/** The 10–90 % rises of a picture's strong steps: how many, the sharper quarter's and the median's. */
|
|
167
|
+
export interface EdgeWidths {
|
|
168
|
+
edges: number;
|
|
169
|
+
p25?: number;
|
|
170
|
+
median?: number;
|
|
171
|
+
}
|
|
172
|
+
export interface CompareImages {
|
|
173
|
+
result: CompareResult;
|
|
174
|
+
/** The reference, faded to grey, with the difference over it in yellow to red and the regions outlined. */
|
|
175
|
+
heatmap: Img;
|
|
176
|
+
/** Reference | candidate (as compared) | heatmap. */
|
|
177
|
+
side: Img;
|
|
178
|
+
/** The candidate as compared: resized, moved, on the reference's canvas. */
|
|
179
|
+
aligned: Img;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Compares a candidate with a reference. The candidate is resized to the
|
|
183
|
+
* reference's size first when they differ (`resize`), then moved by the
|
|
184
|
+
* best offset found within `shift` pixels, if asked.
|
|
185
|
+
*/
|
|
186
|
+
/**
|
|
187
|
+
* The 10–90 % rises of a luma picture's steps of more than `step` levels
|
|
188
|
+
* within `span` pixels, along its rows and its columns.
|
|
189
|
+
*/
|
|
190
|
+
export declare function edgeWidths(luma: Float32Array, w: number, h: number, o: {
|
|
191
|
+
step: number;
|
|
192
|
+
span: number;
|
|
193
|
+
}): EdgeWidths;
|
|
194
|
+
export declare function compareImages(reference: Img, candidate: Img, options?: Partial<CompareOptions>): CompareImages;
|
|
195
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{grainSize as yt}from"./grain.js";import{blankImage as nt,pasteImage as et,resizeImage as ut}from"./image.js";const E=h=>Math.round(h*1e3)/1e3;export const COMPARE_DEFAULTS={tolerance:2.3,background:[255,255,255],gap:4,shift:0,resize:"stretch",heatMax:20,ssimWindow:8,edgeStep:90,edgeSpan:12,grainBlock:48,grainShare:.1};export function grainOf(h,b,k,o=COMPARE_DEFAULTS.grainBlock,r=COMPARE_DEFAULTS.grainShare){const s=Math.max(6,Math.round(o)),e=Math.max(1,Math.floor(s/6)),l=(s-1)/2;let A=0;for(let d=0;d<s;d++)A+=(d-l)**2;A*=s;const t=[];for(let d=0;d+s<=k;d+=s)for(let S=0;S+s<=b;S+=s){let z=0,v=0,B=0;for(let M=0;M<s;M++)for(let y=0;y<s;y++){const U=h[(d+M)*b+S+y]??0;z+=U,v+=(y-l)*U,B+=(M-l)*U}if(z/=s*s,z<12||z>243)continue;const R=v/A,P=B/A,W=new Float32Array(s*s);let J=0;for(let M=0;M<s;M++)for(let y=0;y<s;y++){const U=(h[(d+M)*b+S+y]??0)-z-R*(y-l)-P*(M-l);W[M*s+y]=U,J+=U*U}let N=0;for(let M=0;M+e<=s;M+=e)for(let y=0;y+e<=s;y+=e){let U=0;for(let Q=0;Q<e;Q++)for(let j=0;j<e;j++)U+=W[(M+Q)*s+y+j]??0;N+=(U/(e*e))**2}let D=0;for(let M=0;M<s;M++)for(let y=0;y<s;y++){const U=W[M*s+y]??0;y+1<s&&(D+=U*(W[M*s+y+1]??0)),M+1<s&&(D+=U*(W[(M+1)*s+y]??0))}t.push({content:N,sse:J,across:D})}if(t.length===0)return;t.sort((d,S)=>d.content-S.content);const i=t.slice(0,Math.max(1,Math.round(t.length*Math.min(1,Math.max(0,r))))),f=i.reduce((d,S)=>d+S.sse,0),g=i.reduce((d,S)=>d+S.across,0),I=f/(i.length*(s*s-3)),p=f>0?g/(2*s*(s-1))/(f/(s*s)):0,m=Math.sqrt(I);return{blocks:i.length,of:t.length,sd:E(m),amount:E(m/255),correlation:E(p),size:E(yt(p,Math.min(b,k)))}}function wt(h,b,k){const o=p=>{const m=p/255;return m<=.04045?m/12.92:((m+.055)/1.055)**2.4},r=o(h),s=o(b),e=o(k),l=(.4124564*r+.3575761*s+.1804375*e)/.95047,A=.2126729*r+.7151522*s+.072175*e,t=(.0193339*r+.119192*s+.9503041*e)/1.08883,i=p=>p>216/24389?Math.cbrt(p):(24389/27*p+16)/116,f=i(l),g=i(A),I=i(t);return[116*g-16,500*(f-g),200*(g-I)]}function ft(h,b){const k=h.width*h.height,o=new Float32Array(k*3),r=new Float32Array(k*3),s=new Map;for(let e=0;e<k;e++){const l=(h.data[e*4+3]??0)/255,A=Math.round((h.data[e*4]??0)*l+b[0]*(1-l)),t=Math.round((h.data[e*4+1]??0)*l+b[1]*(1-l)),i=Math.round((h.data[e*4+2]??0)*l+b[2]*(1-l));o[e*3]=A,o[e*3+1]=t,o[e*3+2]=i;const f=A<<16|t<<8|i;let g=s.get(f);g||(g=wt(A,t,i),s.size<1<<20&&s.set(f,g)),r[e*3]=g[0],r[e*3+1]=g[1],r[e*3+2]=g[2]}return{rgb:o,lab:r}}function rt(h,b,k,o,r,s,e){let l=0,A=0;for(let t=Math.max(0,s);t<Math.min(o,o+s);t+=e)for(let i=Math.max(0,r);i<Math.min(k,k+r);i+=e){const f=(t*k+i)*3,g=((t-s)*k+(i-r))*3,I=(h[f]??0)-(b[g]??0),p=(h[f+1]??0)-(b[g+1]??0),m=(h[f+2]??0)-(b[g+2]??0);l+=Math.sqrt(I*I+p*p+m*m),A++}return A?l/A:1/0}function kt(h,b,k,o,r){const s=6.502500000000001,e=(.03*255)**2,l=Math.min(r,k),A=Math.min(r,o),t=Math.max(1,Math.floor(r/2));let i=0,f=0;for(let g=0;g+A<=o;g+=t)for(let I=0;I+l<=k;I+=t){let p=0,m=0;for(let B=g;B<g+A;B++)for(let R=I;R<I+l;R++)p+=h[B*k+R]??0,m+=b[B*k+R]??0;const d=l*A;p/=d,m/=d;let S=0,z=0,v=0;for(let B=g;B<g+A;B++)for(let R=I;R<I+l;R++){const P=(h[B*k+R]??0)-p,W=(b[B*k+R]??0)-m;S+=P*P,z+=W*W,v+=P*W}S/=d-1||1,z/=d-1||1,v/=d-1||1,i+=(2*p*m+s)*(2*v+e)/((p*p+m*m+s)*(S+z+e)),f++}return f?i/f:1}function vt(h,b,k){const o=Math.min(1,Math.max(0,(h-b)/Math.max(1e-6,k-b)));return[255,Math.round(220*(1-o)),0,.55+.45*o]}export function edgeWidths(h,b,k,o){const r=[],s=(t,i)=>{let f=0;for(;f<i-o.span;){if(Math.abs(t(f)-t(f+o.span))<=o.step){f++;continue}let g=f,I=-1;for(let v=f;v<f+o.span;v++){const B=Math.abs(t(v+1)-t(v));B>I&&(I=B,g=v)}const p=t(g+1)>t(g);let m=g;for(;m>0&&g-m<o.span&&(p?t(m-1)<=t(m):t(m-1)>=t(m));)m--;let d=g+1;for(;d<i-1&&d-g-1<o.span&&(p?t(d+1)>=t(d):t(d+1)<=t(d));)d++;const S=t(m),z=t(d);if(Math.abs(z-S)>o.step){const v=[];for(let D=m;D<=d;D++)v.push(p?t(D):-t(D));const B=Math.min(S,z),R=Math.abs(z-S),P=D=>p?B+D*R:-(B+(1-D)*R),W=D=>{for(let M=0;M<v.length-1;M++){const y=v[M]??0,U=v[M+1]??0;if(y<=D&&D<U)return M+(D-y)/(U-y)}},J=W(P(.1)),N=W(P(.9));J!==void 0&&N!==void 0&&N>J&&r.push(N-J)}f=Math.max(f+1,d)}};for(let t=0;t<k;t++)s(i=>h[t*b+i]??0,b);for(let t=0;t<b;t++)s(i=>h[i*b+t]??0,k);r.sort((t,i)=>t-i);const e=t=>r.length===0?void 0:E(r[Math.min(r.length-1,Math.floor(t*r.length))]??0),l=e(.25),A=e(.5);return{edges:r.length,...l===void 0?{}:{p25:l},...A===void 0?{}:{median:A}}}const bt=2.563;export function compareImages(h,b,k={}){const o={...COMPARE_DEFAULTS,...k};let r=b,s;if(r.width!==h.width||r.height!==h.height){if(o.resize==="stretch")r=ut(r,h.width,h.height);else if(o.resize==="width"){const n=Math.max(1,Math.round(r.height*h.width/r.width));r=ut(r,h.width,n)}r!==b&&(s={mode:o.resize,from:[b.width,b.height],to:[r.width,r.height],scale:[E(r.width/b.width),E(r.height/b.height)]})}const e=h.width,l=h.height,A=nt(e,l);et(A,r,0,0);const t=ft(h,o.background);let i=ft(A,o.background),f={x:0,y:0},g;if(o.shift>0){const n=e*l>1e6?2:1,c=rt(t.lab,i.lab,e,l,0,0,1);let a={x:0,y:0,meanDeltaE:rt(t.lab,i.lab,e,l,0,0,n)};for(let x=-o.shift;x<=o.shift;x++)for(let w=-o.shift;w<=o.shift;w++){if(w===0&&x===0)continue;const q=rt(t.lab,i.lab,e,l,w,x,n);q<a.meanDeltaE-1e-9&&(a={x:w,y:x,meanDeltaE:q})}f={x:a.x,y:a.y},g={range:o.shift,unshifted:E(c),best:{...f,meanDeltaE:E(rt(t.lab,i.lab,e,l,a.x,a.y,1))}}}const I=nt(e,l);et(I,r,f.x,f.y),(f.x!==0||f.y!==0)&&(i=ft(I,o.background));const p=Math.max(0,f.x),m=Math.max(0,f.y),d=Math.min(e,r.width+f.x),S=Math.min(l,r.height+f.y),z=Math.max(0,d-p),v=Math.max(0,S-m),B=new Float32Array(e*l),R=(n,c)=>n>=p&&n<d&&c>=m&&c<S;let P=0,W=0,J=0;const N=[0,0,0,0],D=[0,0,0,0],M=new Float32Array(z*v),y=new Float32Array(z*v),U=.05,Q=new Uint32Array(Math.ceil(300/U)+1);for(let n=m;n<S;n++)for(let c=p;c<d;c++){const a=n*e+c,x=(t.lab[a*3]??0)-(i.lab[a*3]??0),w=(t.lab[a*3+1]??0)-(i.lab[a*3+1]??0),q=(t.lab[a*3+2]??0)-(i.lab[a*3+2]??0),u=Math.sqrt(x*x+w*w+q*q);B[a]=u;const O=Math.min(Q.length-1,Math.floor(u/U));Q[O]=(Q[O]??0)+1,P+=u,u>W&&(W=u),u>o.tolerance&&J++;for(let F=0;F<3;F++){const $=Math.abs((t.rgb[a*3+F]??0)-(i.rgb[a*3+F]??0));N[F]=(N[F]??0)+$,$>(D[F]??0)&&(D[F]=$)}const L=Math.abs((h.data[a*4+3]??0)-(I.data[a*4+3]??0));N[3]=(N[3]??0)+L,L>(D[3]??0)&&(D[3]=L);const _=(n-m)*z+(c-p);M[_]=.2126*(t.rgb[a*3]??0)+.7152*(t.rgb[a*3+1]??0)+.0722*(t.rgb[a*3+2]??0),y[_]=.2126*(i.rgb[a*3]??0)+.7152*(i.rgb[a*3+1]??0)+.0722*(i.rgb[a*3+2]??0)}const j=z*v;let dt=0;for(let n=0,c=0;n<Q.length;n++)if(c+=Q[n]??0,c>=j*.95){dt=n*U;break}const X=Math.max(1,Math.round(o.gap)),tt=Math.ceil(e/X),it=Math.ceil(l/X),ot=new Uint8Array(tt*it);for(let n=m;n<S;n++)for(let c=p;c<d;c++)(B[n*e+c]??0)>o.tolerance&&(ot[Math.floor(n/X)*tt+Math.floor(c/X)]=1);const at=new Uint8Array(tt*it),st=[];for(let n=0;n<ot.length;n++){if(!ot[n]||at[n])continue;const c=[n];at[n]=1;let a=1/0,x=1/0,w=-1,q=-1,u=0,O=0,L=0;for(;c.length;){const _=c.pop()??0,F=_%tt,$=Math.floor(_/tt);for(let C=$*X;C<Math.min(l,($+1)*X);C++)for(let G=F*X;G<Math.min(e,(F+1)*X);G++){if(!R(G,C))continue;const V=B[C*e+G]??0;V<=o.tolerance||(u++,O+=V,V>L&&(L=V),G<a&&(a=G),C<x&&(x=C),G>w&&(w=G),C>q&&(q=C))}for(let C=$-1;C<=$+1;C++)for(let G=F-1;G<=F+1;G++){if(G<0||C<0||G>=tt||C>=it)continue;const V=C*tt+G;ot[V]&&!at[V]&&(at[V]=1,c.push(V))}}u>0&&st.push({box:[a,x,w-a+1,q-x+1],pixels:u,meanDeltaE:E(O/u),maxDeltaE:E(L)})}st.sort((n,c)=>c.pixels-n.pixels||n.box[1]-c.box[1]||n.box[0]-c.box[0]);const Y=nt(e,l,[255,255,255,255]);for(let n=0;n<e*l;n++){let a=255-(255-(.2126*(t.rgb[n*3]??0)+.7152*(t.rgb[n*3+1]??0)+.0722*(t.rgb[n*3+2]??0)))*.35,x=a,w=a;const q=B[n]??0;if(q>o.tolerance){const[u,O,L,_]=vt(q,o.tolerance,o.heatMax);a=a*(1-_)+u*_,x=x*(1-_)+O*_,w=w*(1-_)+L*_}Y.data[n*4]=Math.round(a),Y.data[n*4+1]=Math.round(x),Y.data[n*4+2]=Math.round(w)}const mt=n=>{const[c,a,x,w]=n,q=(u,O)=>{if(u<0||O<0||u>=e||O>=l)return;const L=(O*e+u)*4;Y.data[L]=30,Y.data[L+1]=90,Y.data[L+2]=230};for(let u=c-2;u<c+x+2;u++)q(u,a-2),q(u,a+w+1);for(let u=a-2;u<a+w+2;u++)q(c-2,u),q(c+x+1,u)};for(const n of st.slice(0,50))mt(n.box);const Z=Math.max(4,Math.round(Math.min(e,l)/50)),ct=nt(e*3+Z*4,l+Z*2,[128,128,128,255]),ht=n=>{const c=nt(e,l,[...o.background,255]);for(let a=0;a<e*l;a++){const x=(n.data[a*4+3]??0)/255;for(let w=0;w<3;w++)c.data[a*4+w]=Math.round((n.data[a*4+w]??0)*x+(o.background[w]??0)*(1-x))}return c};et(ct,ht(h),Z,Z),et(ct,ht(I),e+Z*2,Z),et(ct,Y,e*2+Z*3,Z);const Mt=()=>{const n={step:o.edgeStep,span:o.edgeSpan},c=edgeWidths(M,z,v,n),a=edgeWidths(y,z,v,n),x=c.p25!==void 0&&a.p25!==void 0?E(Math.sqrt(Math.max(0,(c.p25/bt)**2-(a.p25/bt)**2))*(1080/Math.min(e,l))):void 0;return{...n,reference:c,candidate:a,...x===void 0?{}:{soften:x}}},gt=(n,c)=>{const a=[0,0,0],x=[0,0,0];for(let O=m;O<S;O++)for(let L=p;L<d;L++){const _=O*e+L;for(let F=0;F<3;F++)a[F]=(a[F]??0)+(n.rgb[_*3+F]??0),x[F]=(x[F]??0)+(n.lab[_*3+F]??0)}const w=Float32Array.from(c).sort(),q=O=>w.length?w[Math.min(w.length-1,Math.floor(O*w.length))]??0:0,u=O=>E(j?O/j:0);return{rgb:[u(a[0]??0),u(a[1]??0),u(a[2]??0)],luma:{mean:u(c.reduce((O,L)=>O+L,0)),p5:E(q(.05)),p50:E(q(.5)),p95:E(q(.95))},lab:[u(x[0]??0),u(x[1]??0),u(x[2]??0)]}},T=gt(t,M),H=gt(i,y),K=(n,c)=>E(n-c),xt={reference:T,candidate:H,difference:{rgb:[K(H.rgb[0],T.rgb[0]),K(H.rgb[1],T.rgb[1]),K(H.rgb[2],T.rgb[2])],luma:{mean:K(H.luma.mean,T.luma.mean),p5:K(H.luma.p5,T.luma.p5),p50:K(H.luma.p50,T.luma.p50),p95:K(H.luma.p95,T.luma.p95)},lab:[K(H.lab[0],T.lab[0]),K(H.lab[1],T.lab[1]),K(H.lab[2],T.lab[2])]}},pt=()=>{const n=grainOf(M,z,v,o.grainBlock,o.grainShare),c=grainOf(y,z,v,o.grainBlock,o.grainShare);return{block:o.grainBlock,share:o.grainShare,...n?{reference:n}:{},...c?{candidate:c}:{},...n&&c?{amount:E(Math.sqrt(Math.max(0,n.sd**2-c.sd**2))/255)}:{}}},lt=n=>({mean:E(j?(N[n]??0)/j:0),max:D[n]??0});return{result:{reference:{width:h.width,height:h.height},candidate:{width:b.width,height:b.height},...s?{resized:s}:{},compared:[p,m,z,v],offset:f,...g?{search:g}:{},pixels:j,tolerance:o.tolerance,differing:J,share:j?E(J/j):0,deltaE:{mean:E(j?P/j:0),max:E(W),p95:E(dt)},channels:{r:lt(0),g:lt(1),b:lt(2),alpha:lt(3)},levels:xt,grain:pt(),ssim:E(kt(M,y,z,v,o.ssimWindow)),regions:st,edges:Mt()},heatmap:Y,side:ct,aligned:ht(I)}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The capture.grain.size whose grain has neighbouring pixels this
|
|
3
|
+
* correlated, on a picture `lines` px on its shorter side: 0 for grain a
|
|
4
|
+
* pixel each (or neighbours that differ more than chance, as sharpening
|
|
5
|
+
* makes them).
|
|
6
|
+
*/
|
|
7
|
+
export declare function grainSize(correlation: number, lines: number): number;
|
|
8
|
+
//# sourceMappingURL=grain.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
const e=[[0,0],[.25,.0563],[.4,.1352],[.5,.197],[.6,.2616],[.75,.3569],[1,.4972],[1.25,.6077],[1.5,.691],[2,.8001],[2.5,.8632],[3,.9018],[4,.9435]];export function grainSize(t,l){const s=e[e.length-1]??[4,.9435];let f=0;if(t>=.999)f=30;else if(t>=s[1])f=s[0]*Math.sqrt(-Math.log(s[1]))/Math.sqrt(-Math.log(t));else if(t>0)for(let g=1;g<e.length;g++){const[M,h]=e[g]??s,[n,i]=e[g-1]??s;if(t<=h){f=n+(M-n)*(t-i)/(h-i);break}}return 2*f*1080/l}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** An image as 8-bit RGBA. */
|
|
2
|
+
export interface Img {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
data: Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
export declare const readPng: (buf: Buffer) => Img;
|
|
8
|
+
export declare const writePng: (img: Img) => Buffer;
|
|
9
|
+
export declare const blankImage: (width: number, height: number, rgba?: readonly [number, number, number, number]) => Img;
|
|
10
|
+
/** A box of an image (x, y, width, height), cut to the image; undefined when nothing of it is inside. */
|
|
11
|
+
export declare function cropImage(img: Img, box: readonly [number, number, number, number]): Img | undefined;
|
|
12
|
+
/** Another image drawn into `dst` at x, y (copied, not blended). */
|
|
13
|
+
export declare function pasteImage(dst: Img, src: Img, x: number, y: number): void;
|
|
14
|
+
/** An image resampled to width × height (premultiplied, so transparent edges keep their colour), or by its nearest pixels. */
|
|
15
|
+
export declare function resizeImage(img: Img, width: number, height: number, filter?: "smooth" | "nearest"): Img;
|
|
16
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{PNG as I}from"pngjs";export const readPng=t=>{const a=I.sync.read(t);return{width:a.width,height:a.height,data:new Uint8Array(a.data)}},writePng=t=>{const a=new I({width:t.width,height:t.height});return Buffer.from(t.data.buffer,t.data.byteOffset,t.data.byteLength).copy(a.data),I.sync.write(a)},blankImage=(t,a,r=[0,0,0,0])=>{const h=new Uint8Array(t*a*4);for(let c=0;c<h.length;c+=4)h[c]=r[0],h[c+1]=r[1],h[c+2]=r[2],h[c+3]=r[3];return{width:t,height:a,data:h}};export function cropImage(t,a){const r=Math.max(0,Math.round(a[0])),h=Math.max(0,Math.round(a[1])),c=Math.min(t.width,Math.round(a[0]+a[2])),u=Math.min(t.height,Math.round(a[1]+a[3]));if(c<=r||u<=h)return;const e=c-r,d=new Uint8Array(e*(u-h)*4);for(let n=h;n<u;n++)d.set(t.data.subarray((n*t.width+r)*4,(n*t.width+c)*4),(n-h)*e*4);return{width:e,height:u-h,data:d}}export function pasteImage(t,a,r,h){for(let c=0;c<a.height;c++){const u=h+c;if(!(u<0||u>=t.height))for(let e=0;e<a.width;e++){const d=r+e;if(d<0||d>=t.width)continue;const n=(c*a.width+e)*4,s=(u*t.width+d)*4;t.data[s]=a.data[n]??0,t.data[s+1]=a.data[n+1]??0,t.data[s+2]=a.data[n+2]??0,t.data[s+3]=a.data[n+3]??0}}}function k(t,a){const r=a/t;if(r<1)return Array.from({length:a},(c,u)=>{const e=u/r,d=(u+1)/r,n=Math.floor(e),s=Math.min(t,Math.ceil(d)),l=[];for(let o=n;o<s;o++)l.push((Math.min(d,o+1)-Math.max(e,o))/(d-e));return{start:n,weights:l}});const h=1;return Array.from({length:a},(c,u)=>{const e=(u+.5)/r-.5,d=Math.max(0,Math.floor(e-h)),n=Math.min(t-1,Math.ceil(e+h)),s=[];let l=0;for(let o=d;o<=n;o++){const f=Math.max(0,1-Math.abs(o-e)/h);s.push(f),l+=f}return l===0?{start:Math.min(t-1,Math.max(0,Math.round(e))),weights:[1]}:{start:d,weights:s.map(o=>o/l)}})}export function resizeImage(t,a,r,h="smooth"){if(t.width===a&&t.height===r)return t;if(h==="nearest"){const n=new Uint8Array(a*r*4);for(let s=0;s<r;s++){const l=Math.min(t.height-1,Math.floor((s+.5)*t.height/r));for(let o=0;o<a;o++){const f=Math.min(t.width-1,Math.floor((o+.5)*t.width/a));n.set(t.data.subarray((l*t.width+f)*4,(l*t.width+f)*4+4),(s*a+o)*4)}}return{width:a,height:r,data:n}}const c=k(t.width,a),u=k(t.height,r),e=new Float32Array(a*t.height*4);for(let n=0;n<t.height;n++)for(let s=0;s<a;s++){const{start:l,weights:o}=c[s]??{start:0,weights:[]};let f=0,x=0,A=0,M=0;for(let w=0;w<o.length;w++){const y=o[w]??0,p=(n*t.width+l+w)*4,U=(t.data[p+3]??0)/255;f+=y*(t.data[p]??0)*U,x+=y*(t.data[p+1]??0)*U,A+=y*(t.data[p+2]??0)*U,M+=y*U}const i=(n*a+s)*4;e[i]=f,e[i+1]=x,e[i+2]=A,e[i+3]=M}const d=new Uint8Array(a*r*4);for(let n=0;n<r;n++){const{start:s,weights:l}=u[n]??{start:0,weights:[]};for(let o=0;o<a;o++){let f=0,x=0,A=0,M=0;for(let w=0;w<l.length;w++){const y=l[w]??0,p=((s+w)*a+o)*4;f+=y*(e[p]??0),x+=y*(e[p+1]??0),A+=y*(e[p+2]??0),M+=y*(e[p+3]??0)}const i=(n*a+o)*4;d[i]=M>0?Math.round(f/M):0,d[i+1]=M>0?Math.round(x/M):0,d[i+2]=M>0?Math.round(A/M):0,d[i+3]=Math.round(M*255)}}return{width:a,height:r,data:d}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { blankImage, cropImage, pasteImage, readPng, resizeImage, writePng, type Img, } from "./image.js";
|
|
2
|
+
export { grainSize } from "./grain.js";
|
|
3
|
+
export { COMPARE_DEFAULTS, compareImages, edgeWidths, grainOf, type ChannelStats, type CompareImages, type CompareOptions, type CompareResult, type DiffRegion, type EdgeWidths, type Grain, type Levels, } from "./compare.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export{blankImage,cropImage,pasteImage,readPng,resizeImage,writePng}from"./image.js";export{grainSize}from"./grain.js";export{COMPARE_DEFAULTS,compareImages,edgeWidths,grainOf}from"./compare.js";
|
|
@@ -16,11 +16,14 @@ export interface PresetHandle {
|
|
|
16
16
|
readonly ang?: HandleRef;
|
|
17
17
|
readonly pos: readonly [string, string];
|
|
18
18
|
}
|
|
19
|
-
/** A
|
|
19
|
+
/** A connection site: where it sits and the way a line leaves it, 60 000ths of a degree clockwise from the right (guide names or numbers). */
|
|
20
|
+
export type PresetSite = readonly [x: string, y: string, ang: string];
|
|
21
|
+
/** A preset geometry: its adjustments and guides (name, formula), its adjust handles, its connection sites, its text rectangle and its paths. */
|
|
20
22
|
export interface PresetDef {
|
|
21
23
|
readonly av?: readonly (readonly [string, string])[];
|
|
22
24
|
readonly gd?: readonly (readonly [string, string])[];
|
|
23
25
|
readonly ah?: readonly PresetHandle[];
|
|
26
|
+
readonly cxn?: readonly PresetSite[];
|
|
24
27
|
readonly text?: readonly [string, string, string, string];
|
|
25
28
|
readonly paths: readonly PresetPath[];
|
|
26
29
|
}
|