@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,145 @@
|
|
|
1
|
+
import { type Problem } from "@allyhub/diagnostics";
|
|
2
|
+
import { type DataFile, type MediaInfo, type MessagesFile, type MessageTree, type MessageValue, type TextAnchor } from "@allyhub/piece";
|
|
3
|
+
import { type LineAnchor, type MessageHint, type Reads } from "@allyhub/piece";
|
|
4
|
+
export interface ReadLogOptions {
|
|
5
|
+
lang: string | undefined;
|
|
6
|
+
defaultLang: string | undefined;
|
|
7
|
+
own: MessagesFile;
|
|
8
|
+
fallback: MessagesFile;
|
|
9
|
+
/** Key → the anchors of a line a script wrote them in, for each of the two. */
|
|
10
|
+
anchors?: {
|
|
11
|
+
own?: Readonly<Record<string, readonly TextAnchor[]>>;
|
|
12
|
+
fallback?: Readonly<Record<string, readonly TextAnchor[]>>;
|
|
13
|
+
};
|
|
14
|
+
/** Repo path → media, with URLs valid in this page. */
|
|
15
|
+
media: Record<string, MediaInfo>;
|
|
16
|
+
/** The piece's file: ctx.asset and ctx.data paths are relative to it. */
|
|
17
|
+
file: string;
|
|
18
|
+
/** Repo path → data files ctx.data can read. */
|
|
19
|
+
data?: Record<string, DataFile>;
|
|
20
|
+
/** The folder of the shared words, where a missing key is to be added. */
|
|
21
|
+
text?: string;
|
|
22
|
+
/** The piece's script, with `{locale}` for each language: where the keys under its id are written. */
|
|
23
|
+
script?: string;
|
|
24
|
+
/** What its keys start with (`messagePrefix` of the piece's id). */
|
|
25
|
+
prefix?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class ReadLog {
|
|
28
|
+
private readonly messages;
|
|
29
|
+
private readonly media;
|
|
30
|
+
private readonly data;
|
|
31
|
+
/** Text that s() or s.with() returned → the key it came from (the latest). */
|
|
32
|
+
private readonly keyByText;
|
|
33
|
+
/** Media looked for that is not there yet (a say's stem): read as missing. */
|
|
34
|
+
private readonly missingReads;
|
|
35
|
+
private readonly missingMedia;
|
|
36
|
+
readonly problems: Problem[];
|
|
37
|
+
/** Every display text read, for matching against the screen. */
|
|
38
|
+
readonly texts: Set<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Hears every read as it happens (a message's value, a medium's or data
|
|
41
|
+
* file's sha256): the runtime records what each part reads while it
|
|
42
|
+
* mounts and draws, for the part's identity.
|
|
43
|
+
*/
|
|
44
|
+
tap: ((what: string, value: string) => void) | undefined;
|
|
45
|
+
private readonly opts;
|
|
46
|
+
private readonly fileOf;
|
|
47
|
+
constructor(opts: ReadLogOptions);
|
|
48
|
+
private value;
|
|
49
|
+
private record;
|
|
50
|
+
/** The locale a key's value comes from, for plural rules. */
|
|
51
|
+
private locale;
|
|
52
|
+
/** The text of a key for these inputs, recorded. */
|
|
53
|
+
private text;
|
|
54
|
+
/** s(key, hint): this language's text, else the default language's. */
|
|
55
|
+
s(key: string, hint?: MessageHint): string;
|
|
56
|
+
/**
|
|
57
|
+
* s.with(key, inputs, hint): the variant these inputs select (plurals,
|
|
58
|
+
* selectors), with its {name} variables filled.
|
|
59
|
+
*/
|
|
60
|
+
with(key: string, inputs: Readonly<Record<string, string | number>>, hint?: MessageHint): string;
|
|
61
|
+
/**
|
|
62
|
+
* The message a text came from (the latest s() or s.with() that returned
|
|
63
|
+
* it), and how it reads aloud: its `speak` when it has one.
|
|
64
|
+
*/
|
|
65
|
+
spokenOf(text: string): {
|
|
66
|
+
key: string;
|
|
67
|
+
speak: string;
|
|
68
|
+
anchors?: LineAnchor[];
|
|
69
|
+
} | undefined;
|
|
70
|
+
/** s.list(prefix): numbered keys under the prefix, in order. */
|
|
71
|
+
list(prefix: string, hint?: MessageHint): MessageTree[];
|
|
72
|
+
/** The keys under a prefix (`<prefix>.…`), in either language, without recording a read. */
|
|
73
|
+
keysUnder(prefix: string): string[];
|
|
74
|
+
/** The raw value of a key without recording a read. */
|
|
75
|
+
peek(key: string): MessageValue | undefined;
|
|
76
|
+
/** Marks a key as read (e.g. a page's "<prefix>.<page>.notes"). */
|
|
77
|
+
touch(key: string): MessageValue | undefined;
|
|
78
|
+
/** Media by repo path, recorded as read. undefined when it is not in the project. */
|
|
79
|
+
mediaAt(path: string): MediaInfo | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Media looked for by a path that is not there yet (a say's file, by its
|
|
82
|
+
* stem): recorded, so the digest changes once it is made.
|
|
83
|
+
*/
|
|
84
|
+
missing(path: string): void;
|
|
85
|
+
/** A problem found while reading (once per message). */
|
|
86
|
+
report(p: Problem): void;
|
|
87
|
+
/**
|
|
88
|
+
* Paths are relative to the file that wrote the output read (another
|
|
89
|
+
* piece's, for a piece that reuses its outputs), else the piece's.
|
|
90
|
+
*/
|
|
91
|
+
relativeTo(file: string): void;
|
|
92
|
+
private base;
|
|
93
|
+
/** The file paths are relative to. */
|
|
94
|
+
private get pathBase();
|
|
95
|
+
/** Where a path named in `base` (the folder of the module that wrote it; none: the piece's) is from, for a message. */
|
|
96
|
+
baseOf(base?: string): string;
|
|
97
|
+
/** A path named in `base` (a folder; none: the piece's file's), as a project path. */
|
|
98
|
+
private resolve;
|
|
99
|
+
/**
|
|
100
|
+
* ctx.asset(path): media relative to the piece's file, or to `base`, the
|
|
101
|
+
* file the code that named it was written in (pathBase).
|
|
102
|
+
*/
|
|
103
|
+
asset(path: string, base?: string): MediaInfo;
|
|
104
|
+
/** A media file that may not be there: found and recorded, or recorded as missing; never a problem. */
|
|
105
|
+
optionalAsset(path: string): MediaInfo | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* A data file the piece may not have yet (a take's edits file, which the
|
|
108
|
+
* preview's transcript editor creates): read and recorded when it is
|
|
109
|
+
* there; recorded as missing (so the digest changes once it is made)
|
|
110
|
+
* when not, without a problem.
|
|
111
|
+
*/
|
|
112
|
+
optionalData(path: string, base?: string): {
|
|
113
|
+
full?: string;
|
|
114
|
+
found: boolean;
|
|
115
|
+
value?: unknown;
|
|
116
|
+
error?: string;
|
|
117
|
+
};
|
|
118
|
+
/** ctx.data(path): a data file relative to the piece's file, parsed. */
|
|
119
|
+
readData(path: string): unknown;
|
|
120
|
+
/** reads(), with each message attributed to the part its key names. */
|
|
121
|
+
reads(prefix: string, partKeys: readonly string[]): Reads;
|
|
122
|
+
/** Translation problems: keys that fell back to the default language (S002). */
|
|
123
|
+
translationProblems(): Problem[];
|
|
124
|
+
/**
|
|
125
|
+
* The keys a text on screen came from: the keys whose display text is
|
|
126
|
+
* exactly `text` when there are any, else the keys whose display text
|
|
127
|
+
* contains it (a word of a split line, a line being typed), and then only
|
|
128
|
+
* for a text with at least `KEY_PART_MIN` letters or digits. A comma or a
|
|
129
|
+
* single digit is in many messages and came from none of them: naming a
|
|
130
|
+
* key for it would send its reader to the wrong line. Spaces do not
|
|
131
|
+
* count: a block's text is its text nodes joined with a space, which a
|
|
132
|
+
* line drawn as several spans did not have between them.
|
|
133
|
+
*/
|
|
134
|
+
keysShowing(text: string): string[];
|
|
135
|
+
/** The messages file of this language, for problem locations. */
|
|
136
|
+
get file(): string;
|
|
137
|
+
/**
|
|
138
|
+
* The file the keys a text shows are written in, for its problem's
|
|
139
|
+
* location: the piece's script where they are all its own (in this
|
|
140
|
+
* language where it has them, else the default's), else the shared
|
|
141
|
+
* words of this language.
|
|
142
|
+
*/
|
|
143
|
+
fileOfKeys(keys: readonly string[]): string;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=reads.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{problem as l}from"@allyhub/diagnostics";import{pathIn as m,asUrlString as d,displayOf as c,fillMessage as f,messageList as g,repoPath as u,speakOf as A,textsOf as p,hasMarks as w,withoutMarks as O}from"@allyhub/piece";import{lineAnchors as $}from"@allyhub/piece";import{TEXT_DIR as v}from"@allyhub/formats";const b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",k=3;export class ReadLog{messages=new Map;media=new Map;data=new Map;keyByText=new Map;missingReads=new Set;missingMedia=new Set;problems=[];texts=new Set;tap;opts;fileOf;constructor(e){this.opts=e,this.fileOf=t=>`${e.text??v}/${t??"en"}.json`}value(e){const{own:t,fallback:i,lang:s,defaultLang:n}=this.opts;return Object.hasOwn(t,e)?{value:t[e],fellBack:!1}:Object.hasOwn(i,e)?{value:i[e],fellBack:s!==n}:{value:void 0,fellBack:!1}}record(e,t,i){if(this.messages.has(e))return;const{value:s,fellBack:n}=this.value(e);if(this.messages.set(e,{key:e,kind:t,fallback:n,...i?{hint:i}:{}}),t!=="list"&&s===void 0){const a=e.slice(e.indexOf(".")+1),o=Object.keys(this.opts.fallback).find(h=>h.endsWith(`.${a}`));this.problems.push(l("AK-S001",`The code reads ${e}, but the default language ${this.opts.defaultLang??"(no messages)"} does not have it. ${o===void 0?`Add it to ${this.fileOfKeys([e])}.`:`It has ${o}: read that, or give the piece the id "${e.slice(0,e.indexOf("."))}".`}`,{where:{file:this.fileOfKeys([e])}}))}}locale(e){return Object.hasOwn(this.opts.own,e)?this.opts.lang:this.opts.defaultLang}text(e,t,i){this.record(e,"text",t);const{value:s}=this.value(e);this.tap?.(`m:${e}`,JSON.stringify(s??null));for(const n of p(s))this.texts.add(n);return c(s,i,this.locale(e))??""}s(e,t){const i=this.text(e,t,{});return i&&this.keyByText.set(i,{key:e,inputs:{}}),i}with(e,t,i){const s=f(this.text(e,i,t),t);return this.texts.add(s),s&&this.keyByText.set(s,{key:e,inputs:t}),s}spokenOf(e){const t=this.keyByText.get(e);if(!t)return;const i=A(this.value(t.key).value,t.inputs,this.locale(t.key)),s=(Object.hasOwn(this.opts.own,t.key)?this.opts.anchors?.own:this.opts.anchors?.fallback)?.[t.key];return{key:t.key,speak:i===void 0?e:f(i,t.inputs),...s&&i!==void 0?{anchors:$(i,s,n=>f(n,t.inputs))}:{}}}list(e,t){const i=[],s=new Set([...Object.keys(this.opts.own),...Object.keys(this.opts.fallback)]),n=g(a=>c(this.value(a).value,{},this.locale(a)),s,e,i);this.record(e,"list",t),i.length===0&&this.problems.push(l("AK-S001",`The code reads the list ${e}, but the default language has no keys like ${e}.0, ${e}.1. Add them to ${this.fileOfKeys([`${e}.0`])}.`,{where:{file:this.fileOfKeys([`${e}.0`])}}));for(const a of i)this.text(a,void 0,{});return n}keysUnder(e){const t=`${e}.`;return[...new Set([...Object.keys(this.opts.own),...Object.keys(this.opts.fallback)])].filter(i=>i.startsWith(t))}peek(e){return this.value(e).value}touch(e){const{value:t,fellBack:i}=this.value(e);return this.tap?.(`m:${e}`,JSON.stringify(t??null)),t!==void 0&&!this.messages.has(e)&&this.messages.set(e,{key:e,kind:"text",fallback:i}),t}mediaAt(e){const t=this.opts.media[e];return t&&this.media.set(e,d(t)),this.tap?.(`f:${e}`,t?.sha256??""),t}missing(e){this.missingReads.add(e)}report(e){this.problems.some(t=>t.code===e.code&&t.message===e.message)||this.problems.push(e)}relativeTo(e){this.base=e}base;get pathBase(){return this.base??this.opts.file}baseOf(e){return e===void 0?this.pathBase:e===""?"the project's root":e}resolve(e,t){return t===void 0?u(this.pathBase,e):m(t,e)}asset(e,t){const i=this.baseOf(t),s=this.resolve(e,t),n=s===void 0?void 0:this.mediaAt(s);if(n)return n;const a=s??e;return this.missingMedia.has(a)||(this.missingMedia.add(a),this.problems.push(l("AK-A001",s===void 0?`"${e}" points outside the project. Put media in the project, with a path relative to ${i}.`:`"${e}" (named in ${i}) cannot find ${s}: the path is wrong, or the file is not in the project yet.`,{where:{file:i}}))),d({path:s??e,sha256:"",kind:"image",url:b,width:1,height:1})}optionalAsset(e){const t=u(this.pathBase,e);if(t===void 0)return;const i=this.mediaAt(t);return i||this.missing(t),i?d(i):void 0}optionalData(e,t){const i=this.resolve(e,t);if(i===void 0)return{found:!1};const s=this.opts.data?.[i];return this.data.set(i,s?.sha256??""),s?s.error===void 0?{full:i,found:!0,value:s.value}:{full:i,found:!0,error:s.error}:{full:i,found:!1}}readData(e){const t=u(this.pathBase,e),i=t===void 0?void 0:this.opts.data?.[t];if(t!==void 0&&i){if(this.data.set(t,i.sha256),this.tap?.(`d:${t}`,i.sha256),i.error===void 0)return i.value;this.missingMedia.has(t)||(this.missingMedia.add(t),this.problems.push(l("AK-R001",`Cannot read the data file ${t}: ${i.error}`,{where:{file:t}})));return}this.missingMedia.has(e)||(this.missingMedia.add(e),this.problems.push(l("AK-A001",t===void 0?`ctx.data("${e}") points outside the project. Put data files in the project, with a path relative to ${this.pathBase}.`:`ctx.data("${e}") cannot find ${t}: the path is wrong, or the file is not CSV, YAML or JSON.`,{where:{file:this.pathBase}})))}reads(e,t){const i=s=>{if(!s.startsWith(`${e}.`))return;const n=s.slice(e.length+1).split(".")[0]??"";return t.includes(n)?n:void 0};return{messages:[...this.messages.values()].map(s=>{const n=i(s.key);return n===void 0?s:{...s,part:n}}).sort((s,n)=>s.key<n.key?-1:s.key>n.key?1:0),media:[...[...this.media.values()].map(s=>({path:s.path,sha256:s.sha256,kind:s.kind})),...[...this.missingReads].filter(s=>!this.media.has(s)).map(s=>({path:s,sha256:"",kind:"audio"}))].sort((s,n)=>s.path<n.path?-1:1),data:[...this.data.entries()].map(([s,n])=>({path:s,sha256:n})).sort((s,n)=>s.path<n.path?-1:1)}}translationProblems(){const e=[];for(const t of this.messages.values())t.fallback&&t.kind==="text"&&e.push(l("AK-S002",`${this.opts.lang??""} is missing a translation: ${t.key}. The ${this.opts.defaultLang??""} text was used.`,{where:{file:this.fileOf(this.opts.lang)}}));return e}keysShowing(e){const t=o=>o.replace(/[\s\p{Cf}]+/gu,""),i=t(e);if(i==="")return[];const s=[],n=[];for(const o of this.messages.values()){const h=p(this.peek(o.key)).flatMap(r=>w(r)?[r,O(r)]:[r]).map(t);h.includes(i)?s.push(o.key):h.some(r=>r.includes(i))&&n.push(o.key)}return s.length>0?s:(i.match(/[\p{L}\p{N}]/gu)?.length??0)>=k?n:[]}get file(){return this.fileOf(this.opts.lang)}fileOfKeys(e){const{script:t,prefix:i,own:s,lang:n,defaultLang:a}=this.opts;if(t===void 0||i===void 0||e.length===0||!e.every(h=>h.startsWith(i)))return this.file;const o=e.every(h=>Object.hasOwn(s,h));return t.replace("{locale}",(o?n:a)??"en")}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ShapeKind } from "@allyhub/piece";
|
|
2
|
+
/** What a shape's path is made from. */
|
|
3
|
+
export interface ShapeGeometry {
|
|
4
|
+
readonly shape: ShapeKind;
|
|
5
|
+
/** [x, y, w, h], shares of the frame; default all of it. */
|
|
6
|
+
readonly box?: readonly [number, number, number, number];
|
|
7
|
+
/** A path's data, the board's pixels (shape "path"). */
|
|
8
|
+
readonly path?: string;
|
|
9
|
+
/** A rectangle's corners, px. */
|
|
10
|
+
readonly radius?: number;
|
|
11
|
+
/** A polygon's sides (3 to 100). */
|
|
12
|
+
readonly sides?: number;
|
|
13
|
+
/** A polygon as a star: its inner points' distance, percent of its outer (100: a polygon). */
|
|
14
|
+
readonly starRatio?: number;
|
|
15
|
+
}
|
|
16
|
+
/** The shape's box in the frame's pixels. */
|
|
17
|
+
export declare function shapeBox(g: ShapeGeometry, frame: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}): [number, number, number, number];
|
|
21
|
+
/** The shape's path data, the frame's pixels. */
|
|
22
|
+
export declare function shapePath(g: ShapeGeometry, frame: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}): string;
|
|
26
|
+
//# sourceMappingURL=shape-path.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{SHAPE_DEFAULTS as x}from"@allyhub/piece";const t=c=>String(Math.round(c*1e3)/1e3);export function shapeBox(c,i){const[n,s,o,r]=c.box??[0,0,1,1];return[n*i.width,s*i.height,o*i.width,r*i.height]}export function shapePath(c,i){if(c.shape==="path")return c.path??"";const[n,s,o,r]=shapeBox(c,i);switch(c.shape){case"ellipse":{const $=o/2,e=r/2,h=n+$;return`M${t(h-$)} ${t(s+e)}A${t($)} ${t(e)} 0 1 0 ${t(h+$)} ${t(s+e)}A${t($)} ${t(e)} 0 1 0 ${t(h-$)} ${t(s+e)}Z`}case"triangle":return`M${t(n+o/2)} ${t(s)}L${t(n+o)} ${t(s+r)}L${t(n)} ${t(s+r)}Z`;case"line":{const $=s+r/2;return`M${t(n)} ${t($)}L${t(n+o)} ${t($)}`}case"polygon":{const $=Math.round(c.sides??x.sides),e=(c.starRatio??100)/100,h=n+o/2,A=s+r/2,u=[],p=e<1?$*2:$;for(let a=0;a<p;a++){const M=-Math.PI/2+a*2*Math.PI/p,d=e<1&&a%2===1?e:1;u.push(`${t(h+Math.cos(M)*o*d/2)} ${t(A+Math.sin(M)*r*d/2)}`)}return`M${u.join("L")}Z`}default:{const $=Math.min(c.radius??x.radius,o/2,r/2);return $<=0?`M${t(n)} ${t(s)}H${t(n+o)}V${t(s+r)}H${t(n)}Z`:`M${t(n+$)} ${t(s)}H${t(n+o-$)}A${t($)} ${t($)} 0 0 1 ${t(n+o)} ${t(s+$)}V${t(s+r-$)}A${t($)} ${t($)} 0 0 1 ${t(n+o-$)} ${t(s+r)}H${t(n+$)}A${t($)} ${t($)} 0 0 1 ${t(n)} ${t(s+r-$)}V${t(s+$)}A${t($)} ${t($)} 0 0 1 ${t(n+$)} ${t(s)}Z`}}}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type Problem } from "@allyhub/diagnostics";
|
|
2
|
+
import { type Format, type Look, type SizeInfo } from "@allyhub/piece";
|
|
3
|
+
import type { Env } from "./env.js";
|
|
4
|
+
import { type StyleWatch } from "./styles.js";
|
|
5
|
+
/** What the stage is laid out for: a piece's frame, format, look and whether it is transparent. */
|
|
6
|
+
export interface DressedPiece {
|
|
7
|
+
readonly dims: SizeInfo;
|
|
8
|
+
readonly look: Look;
|
|
9
|
+
readonly format: Format;
|
|
10
|
+
readonly options: {
|
|
11
|
+
readonly transparent?: boolean | undefined;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** What a stage's watchers say a problem was drawn by: a part (a board), its element and its layers'. */
|
|
15
|
+
export interface MountedOn {
|
|
16
|
+
readonly el: HTMLElement;
|
|
17
|
+
readonly part: {
|
|
18
|
+
readonly key: string;
|
|
19
|
+
};
|
|
20
|
+
readonly layers: readonly {
|
|
21
|
+
readonly el: HTMLElement;
|
|
22
|
+
readonly spec: {
|
|
23
|
+
readonly component: string;
|
|
24
|
+
};
|
|
25
|
+
readonly index: number;
|
|
26
|
+
}[];
|
|
27
|
+
}
|
|
28
|
+
export interface StageHost {
|
|
29
|
+
readonly el: HTMLElement;
|
|
30
|
+
/** Style values the browser drops, watched while checking (the outer output's, for an embedded one). */
|
|
31
|
+
readonly styles: StyleWatch | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Waits for the pictures a moment shows to decode, at most `limitMs`;
|
|
34
|
+
* the sources still not decoded then.
|
|
35
|
+
*/
|
|
36
|
+
readonly picturesDrawn: (limitMs: number) => Promise<string[]>;
|
|
37
|
+
/** Decodes every picture on the stage now (a check's watch). */
|
|
38
|
+
sweep(): Promise<void>;
|
|
39
|
+
/** Lays the stage out for the piece: size, look, background. Its background colour as the footage plane draws it. */
|
|
40
|
+
dress(piece: DressedPiece): string;
|
|
41
|
+
/** Whether the stage draws over nothing (a render's graphics, a transparent video). */
|
|
42
|
+
readonly clear: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* A CSS colour as "#rrggbb" (or "#rrggbbaa"), for the host's footage
|
|
45
|
+
* plane: whatever colour the look or the piece gives, as the browser
|
|
46
|
+
* draws it in sRGB on this stage (its variables resolve here).
|
|
47
|
+
*/
|
|
48
|
+
readonly cssColor: (color: string) => string;
|
|
49
|
+
/** Takes the records of changes outside the stage while what changed is still there. */
|
|
50
|
+
takeOutside(): void;
|
|
51
|
+
/** What the watchers found, each with the part whose element holds it. */
|
|
52
|
+
problems(mounted: readonly MountedOn[]): Problem[];
|
|
53
|
+
dispose(): void;
|
|
54
|
+
}
|
|
55
|
+
export declare function createStage(env: Env, el: HTMLElement): StageHost;
|
|
56
|
+
//# sourceMappingURL=stage.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{problem as $}from"@allyhub/diagnostics";import{addLayerRule as L,lookCss as P}from"@allyhub/piece";import{selectorOf as E}from"./inspect.js";import{pictureHint as x,pictureWaiter as A,watchPictures as H}from"./pictures.js";import{rejectedMessage as K,watchStyles as M}from"./styles.js";const p=c=>c.toString(16).padStart(2,"0");export function createStage(c,n){const{options:m,embed:g}=c,f=m.purpose==="check"&&!g,b=f?M():void 0,v=f?H(n):void 0,h=[],R=A(n,t=>{h.some(o=>o.el===t.el&&o.src===t.src)||h.push(t)}),y=new Set,S=t=>!n.contains(t.target)&&!(t.target instanceof HTMLElement&&t.target.dataset.akHolder===""),w=f?new MutationObserver(t=>{for(const o of t)S(o)&&y.add(o.target.nodeName.toLowerCase())}):void 0;let u=!1;const C=t=>{const o=document.createElement("div");o.style.color=t,n.append(o);const i=getComputedStyle(o).color;o.remove();const s=document.createElement("canvas");s.width=1,s.height=1;const a=s.getContext("2d",{willReadFrequently:!0});if(!a)return"#000000";a.fillStyle=i,a.fillRect(0,0,1,1);const[e=0,r=0,d=0,l=255]=a.getImageData(0,0,1,1).data;return`#${p(e)}${p(r)}${p(d)}${l===255?"":p(l)}`},O=()=>{w?.takeRecords().forEach(t=>{S(t)&&y.add(t.target.nodeName.toLowerCase())})};return{el:n,styles:b,picturesDrawn:R,get clear(){return u},async sweep(){await v?.sweep()},cssColor:C,takeOutside:O,dress(t){const{dims:o,look:i}=t;u=m.purpose==="render"&&!g||t.options.transparent===!0,n.replaceChildren(),L(n.ownerDocument),n.dataset.format=t.format,c.lang!==void 0&&(n.lang=c.lang),Object.assign(n.style,{position:"relative",width:`${String(o.width)}px`,height:`${String(o.height)}px`,overflow:"hidden",background:u?"transparent":"var(--ak-color-bg)",color:"var(--ak-color-fg)",fontFamily:"var(--ak-font-body)"});for(const[e,r]of Object.entries(P(i)))n.style.setProperty(e,r);const a=t.options.transparent===!0?"transparent":C("var(--ak-color-bg)");return u&&m.purpose!=="play"&&!g&&(document.documentElement.style.background="transparent",document.body.style.background="transparent"),w?.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),a},problems(t){O();const o=[...y].map(e=>$("AK-R003",`Piece code changed <${e}> outside the stage. Draw only inside each layer's own element.`)),i=(b?.rejected()??[]).map(e=>{const r=e.el&&n.contains(e.el)?E(e.el,n):void 0;return $("AK-R004",K(e,r?` on ${r}`:""),{part:e.part,...r?{where:{selector:r}}:{}})}),s=v?.broken()??[],a=[...s,...h.filter(e=>!s.some(r=>r.el===e.el&&r.src===e.src))].map(e=>{const r=t.find(k=>k.el.contains(e.el)),d=r?.layers.find(k=>k.el.contains(e.el)),l=n.contains(e.el)?E(e.el,n):void 0,j=d?`${d.spec.component} (layer ${String(d.index+1)}) in part ${r?.part.key??""}`:r?`Part ${r.part.key}`:"The stage",D=e.via==="img"?`<img src="${e.src}">`:`a background image, url("${e.src}")`;return $("AK-A005",`${j} draws a picture that does not load: ${D}. ${x(e.src)}`,{...r?{part:r.part.key}:{},...l?{where:{selector:l}}:{}})});return[...o,...i,...a]},dispose(){w?.disconnect(),n.replaceChildren()}}}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** A style value the browser did not take. */
|
|
2
|
+
export interface RejectedStyle {
|
|
3
|
+
/** The part being mounted or drawn when it was set. */
|
|
4
|
+
part: string;
|
|
5
|
+
/** The name as written: `fontWeight`, `font-weight`, or a setProperty name. */
|
|
6
|
+
prop: string;
|
|
7
|
+
value: string;
|
|
8
|
+
/** The value was a number, not a string. */
|
|
9
|
+
number?: true;
|
|
10
|
+
/** The element whose inline style it was, when it can be found. */
|
|
11
|
+
el?: Element;
|
|
12
|
+
via: "property" | "setProperty" | "cssText";
|
|
13
|
+
}
|
|
14
|
+
export interface StyleWatch {
|
|
15
|
+
/** The part whose code runs now (mount or render), or undefined. */
|
|
16
|
+
part: string | undefined;
|
|
17
|
+
/** What was rejected so far, at most `perPart` distinct values per part. */
|
|
18
|
+
rejected(): RejectedStyle[];
|
|
19
|
+
}
|
|
20
|
+
type Supports = (prop: string, value: string) => boolean;
|
|
21
|
+
/** `fontWeight` → `font-weight`, `webkitTransform` → `-webkit-transform`, `cssFloat` → `float`. */
|
|
22
|
+
export declare function cssName(prop: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* The declarations of a cssText, split at semicolons outside parentheses
|
|
25
|
+
* and quotes (url(data:…;…) and content: ";" stay whole).
|
|
26
|
+
*/
|
|
27
|
+
export declare function declarations(css: string): [prop: string, value: string][];
|
|
28
|
+
/** How to fix a rejected value, in one sentence. */
|
|
29
|
+
export declare function styleHint(r: Pick<RejectedStyle, "prop" | "value" | "via">, supports: Supports): string;
|
|
30
|
+
/** Wraps the inline style setters of this page (once per page). */
|
|
31
|
+
export declare function watchStyles(perPart?: number): StyleWatch;
|
|
32
|
+
/** The message of an AK-R004 problem. */
|
|
33
|
+
export declare function rejectedMessage(r: RejectedStyle, where: string): string;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=styles.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 function cssName(e){if(e==="cssFloat")return"float";if(e.includes("-"))return e;const u=e.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`);return/^(webkit|moz|ms|o)-/.test(u)?`-${u}`:u}export function declarations(e){const u=[];let r=0,c="",f=0;const d=l=>{const p=e.slice(f,l),y=p.indexOf(":");if(y>0){const h=p.slice(0,y).trim(),$=p.slice(y+1).replace(/!\s*important\s*$/i,"").trim();h&&$&&u.push([h,$])}f=l+1};for(let l=0;l<e.length;l++){const p=e[l];c?p==="\\"?l++:p===c&&(c=""):p==='"'||p==="'"?c=p:p==="("?r++:p===")"?r=Math.max(0,r-1):p===";"&&r===0&&d(l)}return d(e.length),u}const v=/^(-?(?:\d+\.?\d*|\.\d+))([a-z%]+)$/i,C=/^-?(?:\d+\.?\d*|\.\d+)$/;export function styleHint(e,u){const r=cssName(e.prop),c=e.value.trim();if(e.via==="setProperty"&&r!==e.prop.toLowerCase())return`setProperty takes the CSS name "${r}", not "${e.prop}".`;if(!u(r,"initial"))return`Chrome has no style property "${e.prop}"; check its name.`;if(/!\s*important\s*$/i.test(c))return e.via==="cssText"?"Check the value's spelling and units.":`A style property does not take !important in its value: use style.setProperty("${r}", value, "important").`;const f=v.exec(c);return f?.[1]!==void 0&&u(r,f[1])?`${e.prop} takes a number such as ${f[1]}, not ${c}.`:C.test(c)&&u(r,`${c}px`)?`${e.prop} needs a unit: ${c}px, not ${c}.`:"Check the value's spelling and units: the browser drops a value it cannot read."}let w;export function watchStyles(e=3){if(w)return w;const u=[],r=new Set,c=new Map,f=new WeakMap,d=(t,n)=>CSS.supports(t,n),l={part:void 0,rejected:()=>u},p=(t,n,o,s,i=!1)=>{const a=l.part;if(a===void 0)return;const P=`${a}|${n}|${s}`;if(r.has(P))return;r.add(P);const m=c.get(a)??0;if(m>=e)return;c.set(a,m+1);const S=f.get(t);u.push({part:a,prop:n,value:o,via:s,...i?{number:!0}:{},...S?{el:S}:{}})},y=t=>{if(t==null||typeof t!="string"&&typeof t!="number")return;const n=String(t).trim();return n===""?void 0:n},h=CSSStyleDeclaration.prototype,$=Object.getOwnPropertyDescriptor(h,"cssText");if($?.set){const t=$;Object.defineProperty(h,"cssText",{...t,set(n){t.set?.call(this,n);const o=y(n);if(o!==void 0)for(const[s,i]of declarations(o))s.startsWith("--")||d(s,i)||p(this,s,i,"cssText")}})}const g=new WeakMap,x=new WeakMap,O={get(t,n){const o=Reflect.get(t,n,t);if(typeof o!="function")return o;let s=x.get(t);s||(s=new Map,x.set(t,s));let i=s.get(n);return i||(i=o.bind(t),s.set(n,i)),i},set(t,n,o){if(typeof n!="string"||n in h||/^\d+$/.test(n)||!(n in t))return Reflect.set(t,n,o,t);const s=y(o),i=s===void 0?"":t.getPropertyValue(cssName(n)),a=Reflect.set(t,n,o,t);if(s===void 0)return a;const P=cssName(n);return t.getPropertyValue(P)!==i||d(P,s)||p(t,n,s,"property",typeof o=="number"),a}};for(const t of[HTMLElement.prototype,SVGElement.prototype]){const n=Object.getOwnPropertyDescriptor(t,"style");if(!n?.get)continue;const o=n;Object.defineProperty(t,"style",{...o,get(){const s=o.get?.call(this);f.set(s,this);let i=g.get(s);return i||(i=new Proxy(s,O),g.set(s,i)),i}})}const b=h.setProperty;return h.setProperty=function(t,n,o){const s=y(n);if(s===void 0||t.startsWith("--")){b.call(this,t,n,o);return}const i=this.getPropertyValue(t),a=this.getPropertyPriority(t);b.call(this,t,n,o),!(this.getPropertyValue(t)!==i||this.getPropertyPriority(t)!==a)&&(d(t,s)||p(this,t,s,"setProperty"))},w=l,l}export function rejectedMessage(e,u){const r=(f,d)=>CSS.supports(f,d),c=e.via==="cssText"?`its cssText sets ${e.prop}: ${e.value}`:e.via==="setProperty"?`setProperty("${e.prop}", ${JSON.stringify(e.value)})`:`${/^[a-z]+$/i.test(e.prop)?e.prop:JSON.stringify(e.prop)} = ${e.number?e.value:JSON.stringify(e.value)}`;return`Part ${e.part} sets ${c}${u}, which the browser ignores: this style does not apply. ${styleHint(e,r)}`}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ColorStop, type Gradient, type LevelsChannel } from "@allyhub/piece";
|
|
2
|
+
/** A channel's function as 256 values, 0 to 1, for values 0/255 to 255/255. */
|
|
3
|
+
export type Table = number[];
|
|
4
|
+
/** The identity. */
|
|
5
|
+
export declare const identity: () => Table;
|
|
6
|
+
/** f after g, as tables. */
|
|
7
|
+
export declare function compose(f: Table, g: Table): Table;
|
|
8
|
+
/** Photoshop's Levels on one channel: inputs to [0, 1], the midtones' gamma, then the outputs' range. */
|
|
9
|
+
export declare function levelsTable(l: LevelsChannel | undefined): Table;
|
|
10
|
+
/**
|
|
11
|
+
* A curve through its points, as Photoshop draws one: a natural cubic
|
|
12
|
+
* spline through them, flat before the first and after the last, clamped
|
|
13
|
+
* to 0–255.
|
|
14
|
+
*/
|
|
15
|
+
export declare function curveTable(points: readonly (readonly [number, number])[] | undefined): Table;
|
|
16
|
+
/** Photoshop's Exposure in linear light: `(v · 2^exposure + offset)^(1/gamma)`, each value from sRGB and back. */
|
|
17
|
+
export declare function exposureTable(exposure: number, offset: number, gamma: number): Table;
|
|
18
|
+
/**
|
|
19
|
+
* Brightness/Contrast, the legacy one: the brightness added (of 255), then
|
|
20
|
+
* the values spread about the middle by tan((contrast / 100 + 1) · π/4).
|
|
21
|
+
*/
|
|
22
|
+
export declare function brightnessContrastTable(brightness: number, contrast: number): Table;
|
|
23
|
+
/**
|
|
24
|
+
* Color Balance on one channel: its amounts for the shadows, midtones and
|
|
25
|
+
* highlights (−100 to 100) added by how far the channel's value is in each
|
|
26
|
+
* range (GIMP's weights: a = 0.25, b = 0.333, scale 0.7).
|
|
27
|
+
*/
|
|
28
|
+
export declare function colorBalanceTable(shadows: number, midtones: number, highlights: number): Table;
|
|
29
|
+
/** Hue/Saturation's lightness: towards white by it when more than 0, towards black when less. */
|
|
30
|
+
export declare function lightnessTable(lightness: number): Table;
|
|
31
|
+
/** Threshold: 1 from `level` (of 255) up, else 0; a `discrete` table. */
|
|
32
|
+
export declare function thresholdTable(level: number): Table;
|
|
33
|
+
/** Invert. */
|
|
34
|
+
export declare const invertTable: () => Table;
|
|
35
|
+
/** A CSS colour's sRGB channels and alpha, 0 to 1, from hex or rgb(); undefined for any other notation. */
|
|
36
|
+
export declare function rgbOf(color: string): [number, number, number, number] | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* A gradient's stops in order, its locations shares, reversed when asked:
|
|
39
|
+
* what a table and an SVG gradient are drawn from.
|
|
40
|
+
*/
|
|
41
|
+
export declare function stopsOf(g: Gradient, reverse?: boolean): ColorStop[];
|
|
42
|
+
/**
|
|
43
|
+
* A gradient's colour at a share along it, each channel: CSS's
|
|
44
|
+
* interpolation with a colour hint (the midpoint, where the two colours are
|
|
45
|
+
* mixed half and half), in sRGB. Only hex and rgb() colours can be read
|
|
46
|
+
* here; another notation is undefined.
|
|
47
|
+
*/
|
|
48
|
+
export declare function gradientAt(stops: readonly ColorStop[], t: number): [number, number, number, number] | undefined;
|
|
49
|
+
/** A gradient as three tables (red, green, blue) along its length; undefined where a stop's colour is not hex or rgb(). */
|
|
50
|
+
export declare function gradientTables(g: Gradient, reverse?: boolean): [Table, Table, Table] | undefined;
|
|
51
|
+
/** A table as feComponentTransfer's `tableValues`. */
|
|
52
|
+
export declare const tableValues: (t: Table) => string;
|
|
53
|
+
//# sourceMappingURL=tone.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{ADJUSTMENT_DEFAULTS as b}from"@allyhub/piece";const h=t=>Math.min(Math.max(t,0),1),m=t=>Math.round(t*1e6)/1e6;export const identity=()=>Array.from({length:256},(t,o)=>o/255);export function compose(t,o){return o.map(e=>t[Math.round(h(e)*255)]??e)}export function levelsTable(t){const o=b.levels,e=(t?.inputBlack??o.inputBlack)/255,a=(t?.inputWhite??o.inputWhite)/255,s=t?.gamma??o.gamma,i=(t?.outputBlack??o.outputBlack)/255,r=(t?.outputWhite??o.outputWhite)/255;return identity().map(c=>{const l=h((c-e)/Math.max(a-e,1e-9));return m(h(i+Math.pow(l,1/s)*(r-i)))})}export function curveTable(t){if(!t||t.length<2)return identity();const o=t.map(r=>r[0]/255),e=t.map(r=>r[1]/255),a=o.length,s=new Array(a).fill(0);if(a>2){const r=new Array(a).fill(0),c=new Array(a).fill(0),l=new Array(a).fill(0),f=new Array(a).fill(0);for(let n=1;n<a-1;n++){const u=(o[n]??0)-(o[n-1]??0),p=(o[n+1]??0)-(o[n]??0);r[n]=u,c[n]=2*(u+p),l[n]=p,f[n]=6*(((e[n+1]??0)-(e[n]??0))/p-((e[n]??0)-(e[n-1]??0))/u)}for(let n=2;n<a-1;n++){const u=(r[n]??0)/(c[n-1]??1);c[n]=(c[n]??0)-u*(l[n-1]??0),f[n]=(f[n]??0)-u*(f[n-1]??0)}for(let n=a-2;n>=1;n--)s[n]=((f[n]??0)-(l[n]??0)*(s[n+1]??0))/(c[n]??1)}const i=r=>{if(r<=(o[0]??0))return e[0]??0;if(r>=(o[a-1]??1))return e[a-1]??1;let c=0;for(;c<a-2&&r>(o[c+1]??1);)c++;const l=o[c]??0,f=o[c+1]??1,n=f-l,u=(f-r)/n,p=(r-l)/n;return u*(e[c]??0)+p*(e[c+1]??0)+((u*u*u-u)*(s[c]??0)+(p*p*p-p)*(s[c+1]??0))*n*n/6};return identity().map(r=>m(h(i(r))))}const x=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4),g=t=>t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055;export function exposureTable(t,o,e){return identity().map(a=>{const s=x(a)*Math.pow(2,t)+o;return m(h(g(Math.pow(Math.max(s,0),1/e))))})}export function brightnessContrastTable(t,o){const e=Math.min(Math.tan((o/100+1)*Math.PI/4),1e4);return identity().map(a=>m(h((a+t/255-.5)*e+.5)))}export function colorBalanceTable(t,o,e){return identity().map(r=>{const c=h((r-.333)/-.25+.5)*.7,l=h((r-.333)/.25+.5)*h((r+.333-1)/-.25+.5)*.7,f=h((r+.333-1)/.25+.5)*.7;return m(h(r+t/100*c+o/100*l+e/100*f))})}export function lightnessTable(t){const o=t/100;return identity().map(e=>m(o>=0?e+(1-e)*o:e*(1+o)))}export function thresholdTable(t){return identity().map((o,e)=>e>=t?1:0)}export const invertTable=()=>identity().map(t=>m(1-t));export function rgbOf(t){const o=t.trim().toLowerCase(),e=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/u.exec(o)?.[1];if(e!==void 0){const i=e.length<=4?e.split("").map(c=>c+c).join(""):e,r=c=>parseInt(i.slice(c,c+2),16)/255;return[r(0),r(2),r(4),i.length===8?r(6):1]}const a=/^rgba?\(([^)]*)\)$/u.exec(o)?.[1];if(a!==void 0){const i=a.split(/[\s,/]+/u).filter(u=>u!==""),r=(u,p)=>u===void 0?void 0:u.endsWith("%")?Number(u.slice(0,-1))/100:Number(u)/p,[c,l,f]=[r(i[0],255),r(i[1],255),r(i[2],255)],n=r(i[3],1)??1;return c===void 0||l===void 0||f===void 0||![c,l,f,n].every(Number.isFinite)?void 0:[h(c),h(l),h(f),h(n)]}return{black:[0,0,0,1],white:[1,1,1,1],transparent:[0,0,0,0]}[o]}export function stopsOf(t,o=!1){const e=[...t.stops].sort((s,i)=>s.location-i.location);return o!==(t.reverse??!1)?e.map((s,i)=>({color:s.color,location:100-s.location,midpoint:100-(e[i-1]?.midpoint??50)})).reverse():e}export function gradientAt(t,o){const e=o*100,a=t[0],s=t[t.length-1];if(!(!a||!s)){if(e<=a.location)return rgbOf(a.color);if(e>=s.location)return rgbOf(s.color);for(let i=0;i<t.length-1;i++){const r=t[i],c=t[i+1];if(!r||!c||e>c.location)continue;const l=rgbOf(r.color),f=rgbOf(c.color);if(!l||!f)return;const n=c.location-r.location;let u=n<=0?1:(e-r.location)/n;const p=(r.midpoint??50)/100;return p>0&&p<1&&p!==.5&&(u=Math.pow(u,Math.log(.5)/Math.log(p))),[0,1,2,3].map(d=>(l[d]??0)+((f[d]??0)-(l[d]??0))*u)}return rgbOf(s.color)}}export function gradientTables(t,o=!1){const e=stopsOf(t,o),a=[],s=[],i=[];for(let r=0;r<256;r++){const c=gradientAt(e,r/255);if(!c)return;a.push(m(c[0])),s.push(m(c[1])),i.push(m(c[2]))}return[a,s,i]}export const tableValues=t=>t.map(o=>String(m(o))).join(" ");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@allyhub/image-draw",
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./*": {
|
|
7
|
+
"types": "./dist/*.d.ts",
|
|
8
|
+
"default": "./dist/*.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"private": true,
|
|
13
|
+
"license": "SEE LICENSE IN LICENSE.md"
|
|
14
|
+
}
|
|
@@ -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.
|