@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
package/docs/sheets.md
CHANGED
|
@@ -4,22 +4,23 @@ A sheet is a workbook: what a person sees is Excel, and its source is text. A fo
|
|
|
4
4
|
|
|
5
5
|
## A sheet item
|
|
6
6
|
|
|
7
|
-
A sheet is
|
|
7
|
+
A sheet is its workbook file, a YAML file named as you like and listed in `allyhub.yaml` as `kind: sheet` ([project.md](project.md#items)), and the files it names, each from its folder:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
finance/budget/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
budget.yaml the workbook: sheets, cells, formulas, formats, names, checks
|
|
12
|
+
orders.csv a table's rows, or a large block of typed cells: what its `rows` name
|
|
13
|
+
forecast.ts optional: code that makes sheets from data: what its `code` names
|
|
14
|
+
logo.png what cells name: pictures and other files
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Its id is its file without its extension (`finance/budget/budget`). Nothing is found by a fixed name: its tables are the CSV files their `rows` name, and its code is the module its `code` names. Files go wherever you put them, and the workbook names each by its path from its folder, as an import would. A table or a file the editor, the SDK or an import adds goes beside the workbook's file under a name no file there has (`orders.csv`, else `orders-2.csv`), and the workbook names it; move it, and write its new path.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## The workbook file
|
|
20
20
|
|
|
21
21
|
```yaml
|
|
22
22
|
title: Budget
|
|
23
|
+
code: ./forecast.ts # optional: the module that makes sheets, from this file's folder
|
|
23
24
|
names:
|
|
24
25
|
growth: 0.08 # a constant
|
|
25
26
|
revenue: =Summary!$B$1 # a place, or a formula
|
|
@@ -70,8 +71,9 @@ Its JSON Schema is `https://allyhub.com/schemas/sheet.schema.json`.
|
|
|
70
71
|
| `sheets[].validations` | Data validation: `{ range, type, operator, formula, values, blank, dropdown, prompt, error }`. See below |
|
|
71
72
|
| `checks` | `{ name, formula }`: a formula that must hold. One that is false, 0 or an error is a problem (AK-M009) |
|
|
72
73
|
| `scenarios` | Named sets of inputs, each what names hold instead: see [Scenarios](#scenarios) |
|
|
74
|
+
| `iteration` | Excel's iterative calculation: `true`, or `{ max_iterations, max_change }` (Excel's 100 and 0.001 unless it says). A circular reference is then computed again until it settles |
|
|
73
75
|
|
|
74
|
-
A **cell** is YAML's value: a number, `true`, text; text that starts with `=` is a formula. In a `{ … }` a formula with a comma or a bracket is quoted. Its long form is `{ value | formula, format, name, …look }`: `name` is a defined name for that cell.
|
|
76
|
+
A **cell** is YAML's value: a number, `true`, text; text that starts with `=` is a formula. In a `{ … }` a formula with a comma or a bracket is quoted. Its long form is `{ value | formula, format, name, start, …look }`: `name` is a defined name for that cell; `start` is what a formula's cell holds before it is computed, where [iterative calculation](#formulas) starts, as an Excel cell keeps its last value.
|
|
75
77
|
|
|
76
78
|
A **range key** (`B3:M3`) gives one value or formula to every cell in it. A formula is written for its first cell and moved as a fill moves it: relative references shift, `$` ones stay. A single cell's key wins over a range's, and a later range over an earlier one; `B5: null` keeps a cell of a range empty.
|
|
77
79
|
|
|
@@ -126,6 +128,8 @@ sheets:
|
|
|
126
128
|
protect: true # Protect Sheet, with no password
|
|
127
129
|
```
|
|
128
130
|
|
|
131
|
+
`allyhub render` says, with each Excel file, how each sheet prints (its pages across and down and its scale), the cells whose text its column and the empty cells after it cannot hold (Excel cuts it where the next cell starts), the numbers wider than their column (Excel shows ####), counted in characters of Calibri 11's digit as Excel counts a column's width, and the numbers of 1,000 or more with no number format.
|
|
132
|
+
|
|
129
133
|
In a script: `ws.page_setup.orientation`, `.paperSize`, `.fitToWidth`, `.fitToHeight`, `ws.page_margins.left`, `ws.print_area`, `ws.print_title_rows`, `ws.print_title_cols`, `ws.oddFooter.right.text`, `cell.hyperlink`, `cell.comment = new Comment("Check", "Finance")`, `ws.add_image(new Image("files/logo.png"), "B1")`, `ws.row_dimensions[12].outlineLevel`, `ws.protection.sheet`.
|
|
130
134
|
|
|
131
135
|
### Files in a cell
|
|
@@ -143,7 +147,7 @@ sheets:
|
|
|
143
147
|
D2: files/ada.pdf; files/cv.docx
|
|
144
148
|
```
|
|
145
149
|
|
|
146
|
-
`columns` of a table take it too, by the column's name. A person drops, pastes or chooses files on a cell: they are kept
|
|
150
|
+
`columns` of a table take it too, by the column's name. A person drops, pastes or chooses files on a cell: they are kept beside the sheet's file, under names no file there has. A picture is drawn in its cell, its row as tall, any other file by its name. A file that is not there is a problem (AK-M009). In an `.xlsx` a PNG, JPEG or GIF goes in its cell and any other file is its name, which the render says.
|
|
147
151
|
|
|
148
152
|
### Scenarios
|
|
149
153
|
|
|
@@ -185,8 +189,9 @@ A **calculated column** has its `formula` in `columns` and no column in the CSV,
|
|
|
185
189
|
The language is Excel's: `A1` and `$` references, ranges, `Sheet!A1`, `'My Sheet'!A1`, `Jan:Dec!A1`, whole columns and rows, defined names, structured references (`orders[total]`, `[@price]`, `orders[@total]`, `orders[[#Headers],[a]:[c]]`, `orders` for its rows), operators with Excel's precedence (`-2^2` is 4), array constants, `LET`, `LAMBDA` (a name may hold one, and is then called: `=double(4)`), error values. `allyhub sheet capabilities` lists the functions under `formulas`.
|
|
186
190
|
|
|
187
191
|
- Results are computed in order, each once. `NOW`, `TODAY`, `RAND`, `RANDBETWEEN`, `OFFSET` and `INDIRECT` are volatile. `NOW` and `TODAY` read the clock when the sheet is built or exported; `RAND` in a build and an export is seeded by the sheet's files, so the same files give the same rows.
|
|
188
|
-
- A formula that reads itself is a problem, and its cells and what reads them show `#CYCLE!`: Excel says so in a dialog. A cycle through a branch `IF` does not take is none, as in Excel.
|
|
192
|
+
- A formula that reads itself is a problem, and its cells and what reads them show `#CYCLE!`: Excel says so in a dialog. A cycle through a branch `IF` does not take is none, as in Excel. With `iteration` on it is no problem: as Excel's iterative calculation does, its cells and what reads them are computed again, each reading the latest value of the others (a cell not computed yet reads its `start`, or 0), until no value moves by `max_change` or `max_iterations` rounds have run. `allyhub inspect sheet` says how many rounds ran and how far a value moved in the last.
|
|
189
193
|
- An array result spills, as in Excel: the formula's cell shows the first value and the cells beside it the rest. They hold nothing in any file, read like any others, and `A1#` is the range the spill covers now. `#SPILL!` says something stands in the way (a cell that holds anything, a merge, a table, the edge of the sheet), and what stands there going lets it spill. A calculated column cannot spill. `=@A1:A9` is the value in the formula's own row. `FILTER`, `SORT`, `SORTBY`, `UNIQUE`, `SEQUENCE`, `RANDARRAY` (seeded as `RAND` is), `TEXTSPLIT`, `TAKE`, `DROP`, `VSTACK`, `HSTACK`, `TOCOL`, `TOROW`, `CHOOSEROWS`, `CHOOSECOLS`, `EXPAND`, `WRAPROWS` and `WRAPCOLS` give arrays; `MAP`, `REDUCE`, `SCAN`, `BYROW`, `BYCOL` and `MAKEARRAY` take a `LAMBDA`.
|
|
194
|
+
- A **data table** is Excel's What-If Analysis table, `=TABLE(row input, column input)` over its cells as a range key (`B5:F9: =TABLE($B$1,$B$2)`), its references absolute: each cell is the table's formula with the inputs set to the value atop its column and the value left of its row. A two-way table's formula is the cell above its left column, `A4` here; with a column input alone (`=TABLE(,$B$2)`) the formulas are the row above it, one a column, and with a row input alone (`=TABLE($B$1,)`) the column left of it, one a row. It is worked out after what it reads, iterating where the model does, and again with every change; an `.xlsx` holds it as Excel's own.
|
|
190
195
|
- A formula cannot reach into another workbook.
|
|
191
196
|
|
|
192
197
|
## In a script
|
|
@@ -216,9 +221,9 @@ const total = summary.cell(1, 2, "=SUM(orders[total])");
|
|
|
216
221
|
total.number_format = "$#,##0.00";
|
|
217
222
|
total.font = new Font({ bold: true });
|
|
218
223
|
total.fill = new PatternFill({ fill_type: "solid", fgColor: "FFEECC" });
|
|
219
|
-
wb.save("finance/budget");
|
|
224
|
+
wb.save("finance/budget.yaml");
|
|
220
225
|
|
|
221
|
-
const again = load_workbook("finance/budget");
|
|
226
|
+
const again = load_workbook("finance/budget.yaml");
|
|
222
227
|
console.log(again.get_sheet_by_name("Summary")?.cell(1, 2).computed);
|
|
223
228
|
console.log(again.check());
|
|
224
229
|
```
|
|
@@ -264,7 +269,7 @@ ws.auto_filter.add_filter_column(5, ["Open"]);
|
|
|
264
269
|
|
|
265
270
|
## Charts
|
|
266
271
|
|
|
267
|
-
A chart floats over the cells at its anchor and reads them live: it holds references, never numbers, so it follows what its cells compute. In
|
|
272
|
+
A chart floats over the cells at its anchor and reads them live: it holds references, never numbers, so it follows what its cells compute. In the workbook file:
|
|
268
273
|
|
|
269
274
|
```yaml
|
|
270
275
|
charts:
|
|
@@ -289,7 +294,20 @@ charts:
|
|
|
289
294
|
size: 9 # its text, points; title_size 14 and color #595959 unless it says
|
|
290
295
|
```
|
|
291
296
|
|
|
292
|
-
In a flow map (`{ … }`), quote a reference with `[`. A scatter's `x` names its places across, each series its own, the chart's `categories` unless it says.
|
|
297
|
+
In a flow map (`{ … }`), quote a reference with `[`. A scatter's `x` names its places across, each series its own, the chart's `categories` unless it says.
|
|
298
|
+
|
|
299
|
+
A **combination chart** is Excel's: a column, line or area chart whose series each may be drawn as another of those kinds, `type` (`column-clustered`, `column-stacked`, `column-stacked-100`, `line`, `line-markers`, `area`, `area-stacked`, `area-stacked-100`), and on a second value axis at the right, `secondary: true`, which `secondary_axis` sets as `value_axis` sets the first (`{ title, min, max, major, format, gridlines, visible }`). Areas are drawn first, then columns, then lines, the second axis's over the first's:
|
|
300
|
+
|
|
301
|
+
```yaml
|
|
302
|
+
- type: column-clustered
|
|
303
|
+
at: F3
|
|
304
|
+
categories: orders[month]
|
|
305
|
+
series:
|
|
306
|
+
- { values: "orders[total]" }
|
|
307
|
+
- { values: "orders[margin]", type: line-markers, secondary: true }
|
|
308
|
+
secondary_axis: { min: 0, max: 1, format: "0%" }
|
|
309
|
+
```
|
|
310
|
+
Rows and columns a person or a filter hides are left out, as Excel plots what shows; an empty cell or `#N/A` is a gap, text is 0. An inserted row, a renamed table or column and a cut reach a chart's references as they reach a formula, and `allyhub check` reports one that names nothing.
|
|
293
311
|
|
|
294
312
|
In a script they are openpyxl's classes. A `Reference` is a range; a table's column or a spill, which it cannot name, is a formula's text:
|
|
295
313
|
|
|
@@ -337,9 +355,9 @@ wb.save();
|
|
|
337
355
|
|
|
338
356
|
`LineChart`, `AreaChart` and `DoughnutChart` are held as well, and `chart.legend` (`null` for none, else its `position`), `chart.dataLabels`, `chart.x_axis` and `y_axis` (`title`, `scaling`, `majorUnit`, `number_format`, `delete`, `majorGridlines`), `series.marker`, `series.smooth` and `series.graphicalProperties`. `ws._charts` lists a sheet's charts.
|
|
339
357
|
|
|
340
|
-
##
|
|
358
|
+
## Its code
|
|
341
359
|
|
|
342
|
-
`
|
|
360
|
+
The module the workbook file's `code` names (`code: ./forecast.ts`, from the file's folder) makes sheets from data and code: a sheet per region, a sheet per month, a schedule from a parameter. It uses the same classes as a script, on a workbook of its own that starts with no sheets:
|
|
343
361
|
|
|
344
362
|
```ts
|
|
345
363
|
import { Font, workbook } from "@allyhub/sdk/sheets";
|
|
@@ -361,11 +379,11 @@ export default workbook((wb, { data }) => {
|
|
|
361
379
|
```
|
|
362
380
|
|
|
363
381
|
- It holds logic, never a number it computed: what it writes are inputs, formulas and references, so a change of an input computes again here and in Excel. A number it typed that neither its data nor its code holds is a fact, `sheet-typed`.
|
|
364
|
-
- `data(path)` reads a file of the project, from the
|
|
382
|
+
- `data(path)` reads a file of the project, from the code's folder: CSV as an object per row, numbers as numbers where a whole column is; YAML and JSON as they are. It reads files, never what a formula computes.
|
|
365
383
|
- It runs with no clock, randomness or network. `Date.now()`, `new Date()`, `Math.random()`, `crypto`, `performance.now()` and Node's own modules are AK-M012, with their line, and `fetch` AK-B003; it runs twice and what it makes must be the same (AK-M012). One that hangs is stopped (AK-B004), one that throws is AK-R001. A date or a random number belongs in the data, or in a formula (`TODAY`, `RAND`).
|
|
366
|
-
- What it makes is never written. Every command reads it with
|
|
367
|
-
- Its sheets come after
|
|
368
|
-
- A person sees them locked. A change is refused as on a protected sheet, offering to ask you or Make Ordinary Sheet, which writes that sheet to
|
|
384
|
+
- What it makes is never written. Every command reads it with the workbook file: `check`, `render`, `sheet calc`, `sheet trace`, `sheet diff`, `inspect`, `frames`, and the editor, which shows a change to it as another hand's. Its formulas read the workbook file's names and tables, and the workbook file's read its sheets. `wb.defined_names` adds names; one the workbook file has stands. A problem on a generated sheet names the code's file.
|
|
385
|
+
- Its sheets come after the workbook file's, and the workbook file holds at least one.
|
|
386
|
+
- A person sees them locked. A change is refused as on a protected sheet, offering to ask you or Make Ordinary Sheet, which writes that sheet to the workbook file and its rows to CSV files. **A sheet the workbook file holds by a name is the workbook file's: what the code makes of that name is left out**, which `allyhub inspect` says (`sheet-ordinary`). Take it out of the workbook file to give it back to the code.
|
|
369
387
|
- An `.xlsx` holds them as plain sheets.
|
|
370
388
|
- Since a generated formula is not rewritten when a person inserts a row or renames a sheet, it reads names and tables (`=growth`, `=orders[total]`), not addresses, wherever it can.
|
|
371
389
|
|
|
@@ -375,16 +393,16 @@ A name of openpyxl's that is not held throws where it is used, naming what the c
|
|
|
375
393
|
|
|
376
394
|
## Commands
|
|
377
395
|
|
|
378
|
-
- `allyhub check` reports AK-M009, each with its file and line: YAML that is not, a field the format does not have, a cell or range that is not one, two sheets, tables or names of one name, a table's rows that are not there, a CSV quote never closed, a header with an empty or repeated name, a row with more fields than its header, a repeated or empty key, tables and cells that overlap, a formula that does not parse, an unknown function, name, sheet, table or column, a function given the wrong number of arguments, a circular reference, a `checks` entry that does not hold, a scenario's name that is not there, a file a cell names that is not there; and AK-M012 for
|
|
379
|
-
- A
|
|
396
|
+
- `allyhub check` reports AK-M009, each with its file and line: YAML that is not, a field the format does not have, a cell or range that is not one, two sheets, tables or names of one name, a table's rows that are not there, a CSV quote never closed, a header with an empty or repeated name, a row with more fields than its header, a repeated or empty key, tables and cells that overlap, a formula that does not parse, an unknown function, name, sheet, table or column, a function given the wrong number of arguments, a circular reference, a `checks` entry that does not hold, a scenario's name that is not there, a file a cell names that is not there; and AK-M012 for its code. An error value in a cell is not a problem: `=1/0` says what it says.
|
|
397
|
+
- A command names a sheet by its id or its file.
|
|
380
398
|
- `allyhub sheet calc <sheet> [what]` prints what a workbook computes, as an aligned table: a sheet (`Summary`, its used range), a range (`Summary!B3:M3`), a table, a name, or every sheet. `--scenario high` computes it with a scenario's inputs; `--scenarios` compares them.
|
|
381
399
|
- `allyhub sheet trace <sheet> <cell>` prints a cell's formula, where it is written, what it reads and what reads it.
|
|
382
400
|
- `allyhub sheet <sheet>` measures each table's columns: counts, empty cells, distinct values, errors, smallest and largest, sum and mean, lengths, the most frequent values.
|
|
383
|
-
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts, never problems: `sheet-error`, each cell whose value is an error and whether it starts there; `sheet-number`, numbers written into a formula and what takes each, once for a formula a range holds; `sheet-unlike`, a cell between neighbours that read alike, unlike them; `sheet-exception`, a cell set apart from its calculated column's formula; `sheet-unused`, names and typed numbers nothing reads (no formula, chart, rule, check or name); `sheet-invalid`, a value under a validation that breaks it; `sheet-typed`, a number
|
|
401
|
+
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts, never problems: `sheet-error`, each cell whose value is an error and whether it starts there; `sheet-number`, numbers written into a formula and what takes each, once for a formula a range holds; `sheet-unlike`, a cell between neighbours that read alike, unlike them; `sheet-exception`, a cell set apart from its calculated column's formula; `sheet-unused`, names and typed numbers nothing reads (no formula, chart, rule, check or name); `sheet-invalid`, a value under a validation that breaks it; `sheet-typed`, a number its code typed that neither its data nor its code holds; `sheet-ordinary`, a sheet its code makes and the workbook file holds too; `sheet-iteration`, with `iteration` on, the rounds iterative calculation ran over how many cells and how far a value moved in the last. `allyhub inspect sheet <sheet>` has their options: `--plain 0,1,-1` the numbers not said, `--around 1` how many neighbours each side must agree, `--kind`, `--all` for every finding, every number and a table's columns nothing reads.
|
|
384
402
|
- `allyhub sheet diff <was> <now>` compares two versions, two folders or a folder and an `.xlsx`: what changed value under a formula that did not, what changed formula with its value the same, both, what came and went, names, a table's rows lined up by its `key`, else by their place. `--tolerance`, `--all`, `--json`.
|
|
385
403
|
- `allyhub sheet capabilities` says what the SDK holds of openpyxl's.
|
|
386
|
-
- `allyhub sheet import <file
|
|
387
|
-
- `allyhub render` writes each sheet to `.allyhub/out/<
|
|
404
|
+
- `allyhub sheet import <file> --to finance/forecast.yaml` makes a sheet of an Excel, CSV or TSV file, its tables' rows in `finance/data/`, never over a place that is taken (see [Excel](#excel)).
|
|
405
|
+
- `allyhub render` writes each sheet to `.allyhub/out/<id>/`: `--type xlsx` (the default), `pdf`, `png`, `csv` (a file a sheet), `md`, `json`. A sheet with a problem is not written.
|
|
388
406
|
- `allyhub frames <sheet>` draws a picture of a sheet as a person sees it, letters and numbers on its edges; `--range` names a sheet (`Summary`), a range (`Summary!B3:D9`), columns (`A:C`) or rows (`1:20`). Without a range it draws the first 200 rows and 60 columns of each sheet, and says what it left out.
|
|
389
407
|
|
|
390
408
|
`allyhub help sheet` and `allyhub help render` give every option.
|
|
@@ -396,7 +414,7 @@ A name of openpyxl's that is not held throws where it is used, naming what the c
|
|
|
396
414
|
**In.** `allyhub sheet import <file.xlsx>` reads a file whatever wrote it and writes what it means as short text: neighbours with one formula as one range key, a table as a table, a column of one formula as a calculated column, a large rectangle of typed cells as a CSV file, looks as rectangles. It prints:
|
|
397
415
|
|
|
398
416
|
- Excel's scenarios come in by the names of the cells they set; a cell with no name is said, and a `Base case` that holds what the cells hold is left out.
|
|
399
|
-
- `Not carried over:` VBA, pivot tables, a chart of a kind a sheet has none of (radar, stock, surface, bubble, 3-D,
|
|
417
|
+
- `Not carried over:` VBA, pivot tables, a chart of a kind a sheet has none of (radar, stock, surface, bubble, 3-D, a pie or a scatter among other kinds) or whose numbers are written in it, shapes, links to other workbooks, a protection's password, page breaks, rich text (kept as text), filters by condition, kinds of rule the format has no place for, and so on, with where. Notes, links, pictures (beside the workbook file), outlines, Page Layout, protection, a sheet's own names and hidden names come in.
|
|
400
418
|
- A formula that cannot be computed here (a function the engine does not have, another workbook) keeps its value, listed with its cell and why. An array formula over several cells is its first cell's, and the others spill from it.
|
|
401
419
|
- `Computed here against the file:` every formula's result compared with the value the file holds, each difference with its cell (`--tolerance` is how close numbers must be, `--all` lists every one; a formula that reads the clock or a random number is not compared). JSON has every difference.
|
|
402
420
|
|
|
@@ -404,7 +422,7 @@ An ordinary formula from a file that narrows a range to its row is written with
|
|
|
404
422
|
|
|
405
423
|
## A sheet in a piece
|
|
406
424
|
|
|
407
|
-
A piece reads a table's computed rows with `ctx.data("<sheet>#<table>")`, by the sheet's
|
|
425
|
+
A piece reads a table's computed rows with `ctx.data("<sheet>#<table>")`, by the sheet's file, relative to the file that names it. Each row is an object by header: numbers, text, TRUE and FALSE as they are, a date as ISO text, an error as its code, an empty cell as `null`. A plain CSV file still reads as it is, with `ctx.data(path)` or by import: a column whose every non-empty value is a number becomes numbers, everything else stays text.
|
|
408
426
|
|
|
409
427
|
```ts
|
|
410
428
|
import { custom, part, video } from "@allyhub/sdk";
|
|
@@ -435,4 +453,4 @@ export default video({
|
|
|
435
453
|
});
|
|
436
454
|
```
|
|
437
455
|
|
|
438
|
-
A deck's chart reads one the same way: `data: ../budget#orders` in
|
|
456
|
+
A deck's chart reads one the same way: `data: ../budget#orders` in its slides file. A data file over 5 MB is not read by `ctx.data`.
|
package/docs/slides.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# Slides
|
|
2
2
|
|
|
3
|
-
A deck is PowerPoint's model, made by code with python-pptx's API
|
|
3
|
+
A deck is PowerPoint's model, made by code with python-pptx's API: a module listed in `allyhub.yaml` as `kind: slides` ([project.md](project.md#items)), and the two files it names in `presentation({ slides, script })`, each from the module's folder:
|
|
4
4
|
|
|
5
|
-
- `
|
|
6
|
-
- `slides.yaml
|
|
7
|
-
- `script
|
|
5
|
+
- its module (`deck.ts`): the presentation's slide masters, layouts and placeholders, components and generators.
|
|
6
|
+
- its slides file (`slides: "./deck.yaml"`): the slides in order, each on a layout, and what a person (or you) placed or changed on a slide. A value there overrides the layout's, as a placeholder moved on a slide does in PowerPoint.
|
|
7
|
+
- its script (`script: "./deck.{locale}.yaml"`): each slide's words, by shape name, and its speaker notes, a file per language: `{locale}` once in the file's name stands for each (`deck.en.yaml`, `deck.zh-cn.yaml`).
|
|
8
|
+
|
|
9
|
+
A deck that names no slides file or no script is AK-M011. Two decks in one folder share a file only when both name it.
|
|
8
10
|
|
|
9
11
|
The API is python-pptx 1.0.2's, by its names and behaviour; its documentation (python-pptx.readthedocs.io) is the reference. `allyhub slides capabilities` lists which of its classes, names and enumerations are held, where they differ, and what is added. A name that is not held throws where it is written, naming what its class holds. This page is what is AllyHub's own.
|
|
10
12
|
|
|
11
|
-
```ts file=launch/deck/
|
|
13
|
+
```ts file=launch/deck/deck.ts
|
|
12
14
|
import {
|
|
13
15
|
Inches,
|
|
14
16
|
MSO_ANCHOR,
|
|
@@ -17,51 +19,54 @@ import {
|
|
|
17
19
|
presentation,
|
|
18
20
|
} from "@allyhub/sdk/slides";
|
|
19
21
|
|
|
20
|
-
export default presentation(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
22
|
+
export default presentation(
|
|
23
|
+
{ slides: "./deck.yaml", script: "./deck.{locale}.yaml", size: "16:9" },
|
|
24
|
+
(prs) => {
|
|
25
|
+
prs.theme.colors = { accent1: "#2F5BEA" };
|
|
26
|
+
const master = prs.slide_masters.add("Brand");
|
|
27
|
+
const title = master.placeholders.add(
|
|
28
|
+
PP_PLACEHOLDER.TITLE,
|
|
29
|
+
Inches(0.6),
|
|
30
|
+
Inches(0.4),
|
|
31
|
+
Inches(12),
|
|
32
|
+
Inches(1.2),
|
|
33
|
+
);
|
|
34
|
+
title.text_frame.vertical_anchor = MSO_ANCHOR.MIDDLE;
|
|
35
|
+
title.text_frame.list_style[0].font.size = Pt(40);
|
|
36
|
+
master.placeholders.add(
|
|
37
|
+
PP_PLACEHOLDER.BODY,
|
|
38
|
+
Inches(0.6),
|
|
39
|
+
Inches(1.8),
|
|
40
|
+
Inches(12),
|
|
41
|
+
Inches(5),
|
|
42
|
+
);
|
|
43
|
+
master.shapes.add_picture(
|
|
44
|
+
"../../../assets/media/logo.png",
|
|
45
|
+
Inches(12.2),
|
|
46
|
+
Inches(6.9),
|
|
47
|
+
Inches(0.9),
|
|
48
|
+
Inches(0.4),
|
|
49
|
+
).name = "logo";
|
|
50
|
+
|
|
51
|
+
const cover = master.slide_layouts.add("Title Slide");
|
|
52
|
+
cover.placeholders.add(
|
|
53
|
+
PP_PLACEHOLDER.CENTER_TITLE,
|
|
54
|
+
Inches(1),
|
|
55
|
+
Inches(2.5),
|
|
56
|
+
Inches(11.3),
|
|
57
|
+
Inches(1.5),
|
|
58
|
+
);
|
|
59
|
+
cover.placeholders.add(PP_PLACEHOLDER.SUBTITLE);
|
|
60
|
+
|
|
61
|
+
const content = master.slide_layouts.add("Title and Content");
|
|
62
|
+
content.placeholders.add(PP_PLACEHOLDER.TITLE);
|
|
63
|
+
content.placeholders.add(PP_PLACEHOLDER.BODY);
|
|
64
|
+
},
|
|
65
|
+
);
|
|
61
66
|
```
|
|
62
67
|
|
|
63
68
|
```yaml
|
|
64
|
-
# launch/deck/
|
|
69
|
+
# launch/deck/deck.yaml
|
|
65
70
|
slides:
|
|
66
71
|
- id: cover
|
|
67
72
|
layout: Title Slide
|
|
@@ -74,7 +79,7 @@ slides:
|
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
```yaml
|
|
77
|
-
# launch/deck/
|
|
82
|
+
# launch/deck/deck.en.yaml
|
|
78
83
|
title: Launch deck
|
|
79
84
|
slides:
|
|
80
85
|
- id: cover
|
|
@@ -88,34 +93,82 @@ slides:
|
|
|
88
93
|
|
|
89
94
|
## `presentation()`
|
|
90
95
|
|
|
91
|
-
`presentation(options, (prs) => { … })` is the default export of
|
|
96
|
+
`presentation(options, (prs) => { … })` is the default export of a deck's module; its function is given python-pptx's `Presentation` and makes the deck's masters, layouts, components and generators. Paths are from the module's folder; lengths are EMU (`Inches`, `Pt`, `Cm`, `Mm`, `Emu`), each python-pptx's Length: a number that also says itself in `.emu`, `.inches`, `.cm`, `.mm`, `.pt`, `.centipoints` and `.twips`, as what a length reads does (`shape.width.inches`). Arithmetic on Lengths gives a plain number; two Lengths of one value are `===`, and one is compared with a plain number by its `.emu`.
|
|
92
97
|
|
|
93
98
|
| Option | Default | What it is |
|
|
94
99
|
| ------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
-
| `
|
|
100
|
+
| `slides` | none | Its slides file (YAML), from the module's folder: the slides in order and what was placed or changed on each. Paths in it are from the module's folder too |
|
|
101
|
+
| `script` | none | Its script, from the module's folder, with `{locale}` once in its name for each language (`./deck.{locale}.yaml`) |
|
|
102
|
+
| `size` | `"16:9"` | A slide size by name (`16:9`, `16:10`, `4:3` as PowerPoint's; `a4`, `a4-portrait`, `letter`, `letter-portrait` the paper's own; a carousel is an image, [image.md](image.md)) or `{ width, height }` in EMU |
|
|
96
103
|
| `title` | none | Its name for people, what lists show it by |
|
|
97
|
-
| `theme` | the project's look's colours, standard fonts | `{ colors, fonts }`: theme colours by PresentationML's names (`dk1`, `lt1`, `dk2`, `lt2`, `accent1`…`accent6`, `hlink`, `folHlink`), over the project's look (`dk1` its foreground, `lt1` its background, `accent1` its accent); fonts (`major`, `minor`, `major_east_asian`, `minor_east_asian`, and `code`, Courier New unless set, which the script's `` `code` `` is set in: PowerPoint's theme has no such font, so in the file it is a run's own), Arial and Microsoft YaHei unless set: fonts every PowerPoint, Keynote and Google Slides has, drawn here by fonts of the same metrics (Arimo, Noto Sans SC), so a line breaks in the file where it breaks here. Any other font the config's `fonts` lists goes in the PowerPoint file, a face each for regular, bold, italic and bold italic, unless its own licence bits (`fsType`) forbid it or it is a variable font; `allyhub render` says what did not go in. An app that does not read a file's fonts replaces them, and its lines may break elsewhere. A font named with no file the stage has is AK-L006 |
|
|
104
|
+
| `theme` | the project's look's colours, standard fonts | `{ colors, fonts }`: theme colours by PresentationML's names (`dk1`, `lt1`, `dk2`, `lt2`, `accent1`…`accent6`, `hlink`, `folHlink`), over the project's look (`dk1` its foreground, `lt1` its background, `accent1` its accent); fonts (`major`, `minor`, `major_east_asian`, `minor_east_asian`, and `code`, Courier New unless set, which the script's `` `code` `` is set in: PowerPoint's theme has no such font, so in the file it is a run's own), Arial and Microsoft YaHei unless set: fonts every PowerPoint, Keynote and Google Slides has. These and Calibri, Times New Roman, Cambria and Courier New are drawn here by fonts of the same metrics (Arimo, Noto Sans SC, Carlito, Tinos, Caladea, Cousine), so a line breaks in the file where it breaks here. Any other font the config's `fonts` lists goes in the PowerPoint file, a face each for regular, bold, italic and bold italic, unless its own licence bits (`fsType`) forbid it or it is a variable font; `allyhub render` says what did not go in. An app that does not read a file's fonts replaces them, and its lines may break elsewhere. A font named with no file the stage has is AK-L006 |
|
|
98
105
|
|
|
99
106
|
## Masters, layouts and placeholders
|
|
100
107
|
|
|
101
108
|
python-pptx opens these from a template; here code makes them.
|
|
102
109
|
|
|
103
110
|
- `prs.slide_masters.add(name)`: a master, with PowerPoint's Office text styles (`master.text_styles.title_style`, `body_style`, `other_style`, nine levels each) and no placeholders yet.
|
|
104
|
-
- `master.slide_layouts.add(name)`: a layout; its name is what
|
|
105
|
-
- `placeholders.add(PP_PLACEHOLDER.X, left, top, width, height, { name })` on a master or a layout. A layout's placeholder given no frame takes its master's of its base type, as python-pptx reads it (a centre title the title's, a subtitle, picture, media or object the body's). Its name is its type's (`title`, `subtitle`, `body`, `picture`, `content`…) unless given:
|
|
106
|
-
- Beyond python-pptx's `add_shape` and `add_connector` (`MSO_CONNECTOR.STRAIGHT`, `ELBOW`, `CURVE`, or a connector's preset by name, `straightConnector1`, `bentConnector2` to `5`, `curvedConnector2` to `5`; an elbow's middle is its `adjustments[0]`), `shapes.build_freeform()` draws an outline (`add_line_segments`, `move_to`, `convert_to_shape`, and `add_curve_segment`, a cubic curve python-pptx lacks); `line.dash_style` takes `MSO_LINE`, and `line.begin_arrow` and `end_arrow` take `MSO_ARROWHEAD
|
|
107
|
-
- A placeholder shrinks its text to fit its frame unless told not to (`MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE`, as PowerPoint's Office master's do; `text_frame.auto_size = MSO_AUTO_SIZE.NONE` keeps its sizes), and the type in use shows what it shrank to. A text box `add_textbox` makes does not wrap and grows to its text, as python-pptx's; a shape `add_shape` makes starts with one centred paragraph, and `text_frame.text` replaces it with paragraphs aligned as the text style says (left), as python-pptx's.
|
|
111
|
+
- `master.slide_layouts.add(name)`: a layout; its name is what the slides file's slides name, unique in the deck.
|
|
112
|
+
- `placeholders.add(PP_PLACEHOLDER.X, left, top, width, height, { name })` on a master or a layout. A layout's placeholder given no frame takes its master's of its base type, as python-pptx reads it (a centre title the title's, a subtitle, picture, media or object the body's). Its name is its type's (`title`, `subtitle`, `body`, `picture`, `content`…) unless given: the slides file and the script name it. Its idx is PowerPoint's: a title 0, a date, footer and slide number 10, 11 and 12, the rest from 1.
|
|
113
|
+
- Beyond python-pptx's `add_shape` and `add_connector` (`MSO_CONNECTOR.STRAIGHT`, `ELBOW`, `CURVE`, or a connector's preset by name, `straightConnector1`, `bentConnector2` to `5`, `curvedConnector2` to `5`; an elbow's middle is its `adjustments[0]`; `begin_connect(shape, site)` and `end_connect` glue its ends to a shape of the same slide, layout or master, at a site of the shape's geometry, numbered as its preset's `cxnLst` in ECMA-376 (most count counter-clockwise from the top: a rectangle's, a rounded rectangle's, a diamond's and a freeform's 0 top, 1 left, 2 bottom, 3 right; an ellipse's eight 0 top, 2 left, 4 bottom, 6 right; a hexagon's six start at its right), and its ends then follow the shape; `begin_x`, `begin_y`, `end_x` and `end_y` read and move them), `shapes.build_freeform(start_x, start_y, scale)` draws an outline in local units, `scale` EMU each, its start and every point after in those units (with `scale` 1 they are EMU) (`add_line_segments(vertices, close)`, which closes the outline back to its start unless `close` is `false`, as python-pptx's; `move_to`, `convert_to_shape`, and `add_curve_segment(x1, y1, x2, y2, x, y)`, a cubic curve python-pptx lacks), filled by its style as PowerPoint fills it, an open one too: `fill.background()` leaves a line; `line.dash_style` takes `MSO_LINE`, and `line.begin_arrow` and `end_arrow` take `MSO_ARROWHEAD`, each head's size `line.begin_arrow_width`, `begin_arrow_length`, `end_arrow_width` and `end_arrow_length` `MSO_ARROWHEAD_SIZE` (`SMALL`, `MEDIUM`, `LARGE`: two, three and five times the line's width, never less than 0.7 mm's; a freeform's open ends take heads too); `shapes.add_group_shape()` groups what is added to its `.shapes`, and a group is its shapes, listed and drawn as they are, holding no group; `shapes.add_table(rows, cols, left, top, width, height).table` has `cell(r, c)` with `text`, `text_frame`, `fill`, `borders` (`{ bottom: { color, width } }`), `merge`, margins and `vertical_anchor`. `layout.display_master_shapes = false` hides its master's shapes.
|
|
114
|
+
- A placeholder shrinks its text to fit its frame unless told not to (`MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE`, as PowerPoint's Office master's do; `text_frame.auto_size = MSO_AUTO_SIZE.NONE` keeps its sizes), and the type in use shows what it shrank to. A text box `add_textbox` makes does not wrap and grows to its text, as python-pptx's, so its frame has no room for its `vertical_anchor` to move it (`text_frame.auto_size = MSO_AUTO_SIZE.NONE` keeps the frame it was given); a shape `add_shape` makes starts with one centred paragraph, its text light 1 (white, on its accent 1 fill) by its style as PowerPoint's (a run's `font.color` sets its own), and `text_frame.text` replaces it with paragraphs aligned as the text style says (left), as python-pptx's.
|
|
115
|
+
- A run's `font.baseline` raises it by a share of its size (`0.3`, a superscript) or, below 0, lowers it (`-0.25`, a subscript): PowerPoint's `baseline`, which python-pptx has no name for.
|
|
116
|
+
- `shape.adjustments[i]` is the file's value over 100,000, as python-pptx's: most are a share of the shape's shorter side (`roundRect`'s `[0.16667]`); an angle's is in 60,000ths of a degree, so 0.6 a degree (`blockArc`'s first, 108, is 180°, measured clockwise from 3 o'clock). Reading `adjustments` gives a preset's defaults, each in its own scale.
|
|
117
|
+
- A colour in code is python-pptx's `ColorFormat`: `shape.fill.solid()` then `shape.fill.fore_color.rgb = RGBColor.from_string("1F4E79")` (or `"#1F4E79"`), `.theme_color = MSO_THEME_COLOR.ACCENT_1`, and the same on `line.color` and a run's `font.color`; a gradient's stops are each `color` and `position`, or set whole as `fill.gradient_stops = [{ at, color }, …]`.
|
|
118
|
+
- A shape is named by its kind and a number (`shape-3`) unless code names it; two shapes of one slide by one name are AK-M011, as the slides file and the script find a shape by its name.
|
|
108
119
|
- A text style is a list style's level, `ListLevel`: `alignment`, `line_spacing`, `space_before`, `space_after`, `font` (with `font.spacing`, the space between letters, a length, negative to tighten, which python-pptx has no name for), `bullet` (a character, or `null` for none), `bullet_font`, `margin_left`, `indent`. No bullet keeps the level's `margin_left` and `indent`, as PowerPoint's `a:buNone` does: Office's body levels hang their wrapped lines a quarter inch in, so text with no bullets sets both to `0` to stand flush. A placeholder's `text_frame.list_style[n]` is what the text a slide gives it takes at level n, over its master's placeholder and its master's text style for its type.
|
|
109
120
|
|
|
110
121
|
## Components
|
|
111
122
|
|
|
112
|
-
`prs.components.add(name, { props, layers })` is a shape drawn by code: `layers(props, { width, height, slide })` returns layers of the layer contract ([layers.md](layers.md): `custom()`, a component), laid out in the shape's frame; `width` and `height` are the frame's size in the slide's pixels (a 16:9 slide is drawn 1920 × 1080, 2 px a point). Its `render(t)` is given seconds into the slide; a still of the slide is drawn when what moves has settled. Its colours and fonts follow the deck's theme by the CSS variables the slide sets: `var(--ak-theme-<colour>)` for each theme colour (`--ak-theme-dk1`, `--ak-theme-lt1`, `--ak-theme-accent1`…`--ak-theme-folHlink`), `var(--ak-theme-major)` and `var(--ak-theme-minor)` for its fonts (`--ak-theme-major-ea`, `--ak-theme-minor-ea` for East Asian text). The look's `var(--ak-color-*)` and `var(--ak-font-*)` are the project's, which the theme starts from but does not follow once `prs.theme` sets its own. `props` lists the props a person may change in the editor, by the prop types (`text()`, `number()`…);
|
|
123
|
+
`prs.components.add(name, { props, layers })` is a shape drawn by code: `layers(props, { width, height, slide })` returns layers of the layer contract ([layers.md](layers.md): `custom()`, a component), laid out in the shape's frame; `width` and `height` are the frame's size in the slide's pixels (a 16:9 slide is drawn 1920 × 1080, 2 px a point). Its `render(t)` is given seconds into the slide; a still of the slide is drawn when what moves has settled. Its colours and fonts follow the deck's theme by the CSS variables the slide sets: `var(--ak-theme-<colour>)` for each theme colour (`--ak-theme-dk1`, `--ak-theme-lt1`, `--ak-theme-accent1`…`--ak-theme-folHlink`), `var(--ak-theme-major)` and `var(--ak-theme-minor)` for its fonts (`--ak-theme-major-ea`, `--ak-theme-minor-ea` for East Asian text). The look's `var(--ak-color-*)` and `var(--ak-font-*)` are the project's, which the theme starts from but does not follow once `prs.theme` sets its own. `props` lists the props a person may change in the editor, by the prop types (`text()`, `number()`…); the slides file places it as `{ component: name, props, frame }`, or code with `shapes.add_component(name, left, top, width, height, props)`. It moves for 4 seconds from when it comes on (`SLIDE_SECONDS`) unless its `dur` says how long, in seconds (`{ component: name, dur: 15 }`, or `add_component`'s last argument, `{ dur: 15 }`): its step rests no sooner, its still is drawn once it has, and a PowerPoint file's video of it is that long. `add` also takes what `defineComponent` makes ([layers.md](layers.md#layers-in-a-frame)). A shape may name a component by its module instead, without registering it: `component: ../../components/ui.ts#ShareDialog` (its path from the module's folder and its export; `#default` may be left out). A component shape's props are fields in the editor's Format inspector, a field per prop type; what a person types is written to `props` in the slides file as its type (a number, a list).
|
|
113
124
|
|
|
114
125
|
## Generators
|
|
115
126
|
|
|
116
|
-
`prs.generators.add(name, (g) => { … })` makes slides from data: `g.data(path)` reads a data file (CSV rows, YAML, JSON) from the
|
|
127
|
+
`prs.generators.add(name, (g) => { … })` makes slides from data: `g.data(path)` reads a data file (CSV rows, YAML, JSON) from the module's folder; `g.slides.add_slide(layout, id)` adds a slide on a layout (an object, or a name) with its id in the block, and the slide is python-pptx's (`shapes.title`, `placeholders[idx]`, `shapes.add_*`, `notes_slide.notes_text_frame.text`). A generated slide's words are its code's (from its data), not the script's. The slides file places the block as `- id: stories, generate: name`; its slide is `stories/<id>`, hidden by `hidden: [<id>]`, and a shape on it is changed as `shapes: { <id>/<shape>: … }`.
|
|
128
|
+
|
|
129
|
+
A slide drawn whole by code, a diagram, is one generator's slide. The deck is then three files: its module, its slides file placing the generator's block, and its script, which still has its file (with `{locale}` in its name, one language or many), with no rows (`slides: []`):
|
|
130
|
+
|
|
131
|
+
```ts file=figure/figure.ts
|
|
132
|
+
import {
|
|
133
|
+
MSO_ARROWHEAD,
|
|
134
|
+
MSO_CONNECTOR,
|
|
135
|
+
MSO_SHAPE,
|
|
136
|
+
Pt,
|
|
137
|
+
presentation,
|
|
138
|
+
} from "@allyhub/sdk/slides";
|
|
139
|
+
|
|
140
|
+
export default presentation(
|
|
141
|
+
{ slides: "./figure.yaml", script: "./figure.{locale}.yaml" },
|
|
142
|
+
(prs) => {
|
|
143
|
+
prs.slide_masters.add("Blank").slide_layouts.add("Blank");
|
|
144
|
+
prs.generators.add("figure", (g) => {
|
|
145
|
+
const slide = g.slides.add_slide("Blank", "flow");
|
|
146
|
+
const a = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Pt(60), Pt(120), Pt(160), Pt(60));
|
|
147
|
+
a.text_frame.text = "Encoder";
|
|
148
|
+
const b = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Pt(360), Pt(120), Pt(160), Pt(60));
|
|
149
|
+
b.text_frame.text = "Decoder";
|
|
150
|
+
const c = slide.shapes.add_connector(MSO_CONNECTOR.STRAIGHT, 0, 0, Pt(1), 0);
|
|
151
|
+
c.begin_connect(a, 3);
|
|
152
|
+
c.end_connect(b, 1);
|
|
153
|
+
c.line.end_arrow = MSO_ARROWHEAD.TRIANGLE;
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
# figure/figure.yaml
|
|
161
|
+
slides:
|
|
162
|
+
- id: figure
|
|
163
|
+
generate: figure
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
# figure/figure.en.yaml
|
|
168
|
+
slides: []
|
|
169
|
+
```
|
|
117
170
|
|
|
118
|
-
## slides
|
|
171
|
+
## The slides file
|
|
119
172
|
|
|
120
173
|
| Field | What it is |
|
|
121
174
|
| ------------------- | ------------------------------------------------------------------------------------ |
|
|
@@ -126,7 +179,7 @@ python-pptx opens these from a template; here code makes them.
|
|
|
126
179
|
| `slides[].shapes` | Its shapes by name: what it changes of its layout's placeholders, and its own |
|
|
127
180
|
| `slides[].background` | Its own background over its layout's: one of `fill` (a colour), `gradient` (as a shape's) or `picture` (a file, stretched over the slide) |
|
|
128
181
|
|
|
129
|
-
A shape there changes a placeholder of the slide's layout (or a generated shape) with `frame` (`{ x, y, w, h }` in points), `text` (on all of its text, every level, as PowerPoint sets a selected shape's: `size` in points, `bold`, `italic`, `underline`, `strike`, `color`, `font`, a family, `align`: `l`, `ctr`, `r`, `just`, `line_spacing`, a multiple of single spacing, `1.5`, `space_before` and `space_after` in points, `anchor`, where the text stands in its shape: `t`, `ctr`, `b`, `bullet`, a character, `"•"`, or `false` for none, `numbered`, its paragraphs counted in place of a bullet: `arabicPeriod`, `arabicParenR`, `alphaLcPeriod`, `alphaUcPeriod`, `romanLcPeriod`, `romanUcPeriod`; given both, `numbered` stands; a bullet or a number in text with no indent hangs as PowerPoint's does), `fill` (a colour, or `none`), `fill_transparency` (a share that shows through), `gradient` (`angle`, degrees clockwise from left to right, and `stops`, each `at`, a share of the way, `color` and `transparency`), `shadow` (`blur` and `distance` in points, `angle`, `color`, `transparency`), `line` (its outline: a colour, or `none`), `line_width` in points, `line_dash` (`solid`, `sysDash`, `sysDot`, `dash`, `dashDot`, `lgDash`, `lgDashDot`, `lgDashDotDot`), `line_begin` and `line_end` (`none`, `triangle`, `arrow`, `stealth`, `diamond`, `oval`), `rotation` (degrees clockwise about its centre, 0 up to 360, python-pptx's `rotation`), `flip_h` and `flip_v` (`true`: mirrored left to right, top to bottom; a line runs from its frame's other corner; its text reads as it is), `z`; or is the slide's own with one of `textbox: true` (its words are the script's; it wraps and grows to its text), `picture`, `movie` (a file
|
|
182
|
+
A shape there changes a placeholder of the slide's layout (or a generated shape) with `frame` (`{ x, y, w, h }` in points), `text` (on all of its text, every level, as PowerPoint sets a selected shape's: `size` in points, `bold`, `italic`, `underline`, `strike`, `color`, `font`, a family, `align`: `l`, `ctr`, `r`, `just`, `line_spacing`, a multiple of single spacing, `1.5`, `space_before` and `space_after` in points, `anchor`, where the text stands in its shape: `t`, `ctr`, `b`, `bullet`, a character, `"•"`, or `false` for none, `numbered`, its paragraphs counted in place of a bullet: `arabicPeriod`, `arabicParenR`, `alphaLcPeriod`, `alphaUcPeriod`, `romanLcPeriod`, `romanUcPeriod`; given both, `numbered` stands; a bullet or a number in text with no indent hangs as PowerPoint's does), `fill` (a colour, or `none`), `fill_transparency` (a share that shows through), `gradient` (`angle`, degrees clockwise from left to right, and `stops`, each `at`, a share of the way, `color` and `transparency`), `shadow` (`blur` and `distance` in points, `angle`, `color`, `transparency`), `line` (its outline: a colour, or `none`), `line_width` in points, `line_dash` (`solid`, `sysDash`, `sysDot`, `dash`, `dashDot`, `lgDash`, `lgDashDot`, `lgDashDotDot`), `line_begin` and `line_end` (`none`, `triangle`, `arrow`, `stealth`, `diamond`, `oval`), `line_begin_size` and `line_end_size` (`{ w, len }`, each `sm`, `med` or `lg`: the head's width and length, PowerPoint's Arrow size), `rotation` (degrees clockwise about its centre, 0 up to 360, python-pptx's `rotation`), `flip_h` and `flip_v` (`true`: mirrored left to right, top to bottom; a line runs from its frame's other corner; its text reads as it is), `crop` (a picture's: `left`, `top`, `right` and `bottom`, the share of it cut from each side, PowerPoint's `a:srcRect`; a negative share is space left beside it; the editor's Crop menu writes Fill and Fit, [pictures.md](pictures.md#a-decks-pictures)), `z`; or is the slide's own with one of `textbox: true` (its words are the script's; it wraps, and grows from its frame's `h` to its text, so its frame still has all four of `x`, `y`, `w` and `h`), `picture`, `movie` (a video file of the project; a video item goes on a slide as its render, `allyhub render`), `geometry` (any of PowerPoint's 187 preset shapes by its `prst` name, ECMA-376's `ST_ShapeType`: `rect`, `roundRect`, `ellipse`, `triangle`, `star5`, `chevron`, `rightArrow`, `wedgeRectCallout`, `heart`, `cloud`, `donut`, `flowChartProcess`…, drawn from ECMA-376's preset shape definitions as PowerPoint draws them; a connector, `line`, `straightConnector1`, `bentConnector2` to `5` or `curvedConnector2` to `5`, has the connector's line, no fill and no text, and its `line_begin` and `line_end` face along its path, and `connect: { begin: { shape, site }, end: { shape, site } }` glues its ends to shapes of the slide by name, at sites of their geometries (a rectangle's 0 top, 1 left, 2 bottom, 3 right; PowerPoint's `a:stCxn` and `a:endCxn`): its frame is then where its ends sit, and they follow the shapes; `none` lets go of an end the code glued, as dragging the end off its shape does; with `adjustments`, its handles' values in the definition's order as python-pptx's `adjustments` has them, a share each: `roundRect`'s `[0.1]` is a corner of a tenth of its shorter side), `path` (a freeform: `{ w, h, d }`, its outline in a box of `w` × `h` units stretched to its frame, `d` in SVG's `M`, `L`, `C` and `Z`, absolute, so a logo or a cursor is a real shape), `table` (`columns`, widths in points, and `rows`, each a `height` with its `fill`, `text` and `line`, a rule at its foot; stretched to its frame, its words the script's, a list of rows, each a list of cells) or `component` (with `props`, and `dur`, how long it moves), and a `frame`. `group`, a name a slide's own shapes share, makes them one group in PowerPoint, standing together where the topmost of them stands. A table here has no style of its own, unlike python-pptx's: its look is what its rows and cells say. A picture or a movie put in a picture, media or object placeholder fills it. Colours are the theme's (`accent1`…); the theme's lighter or darker, in PowerPoint's words (`accent1 lighter 40%`, `dk1 darker 25%`, a share over 0 up to 100 %), which follows a change of theme as PowerPoint's picker's tints and shades do; or `#RRGGBB`. In code a colour (`ColorFormat`) has python-pptx's `brightness`, -1 to 1 (`0.4` is lighter 40 %), on a theme colour only. `z` orders a shape among the slide's shapes and placeholders, so a negative `z` puts one under a placeholder's words. Paths are from the deck's module's folder.
|
|
130
183
|
|
|
131
184
|
A slide's `animations` are PowerPoint's Animation Pane, in order, each on one of the slide's own shapes (`shape`, by name; in a block, `<slide>/<shape>`), or one `paragraph` of its text, from 0:
|
|
132
185
|
|
|
@@ -141,7 +194,7 @@ A slide's `animations` are PowerPoint's Animation Pane, in order, each on one of
|
|
|
141
194
|
|
|
142
195
|
Each click is a step: its still, a page of a PDF, is drawn once what it started has ended, and `allyhub frames` has a tile for each. What a shape comes on by an entrance is not drawn before it. A component's `render(t)` is given the seconds since its shape came on, and a step that brings one on rests once it has settled. A PowerPoint file has them as PowerPoint's own. A generated slide adds them with `slide.animations.add(shape, effect, options)`.
|
|
143
196
|
|
|
144
|
-
A video on a slide plays from when its shape comes on, to its end, when presenting. In a PowerPoint file a component that moves is a video of what its code draws, from when its shape comes on, for 4 seconds, which plays as it comes on (as the slide opens, if it has no entrance); one that does not move is a picture.
|
|
197
|
+
A video on a slide plays from when its shape comes on, to its end, when presenting. In a PowerPoint file a component that moves is a video of what its code draws, from when its shape comes on, for as long as it moves (its `dur`, 4 seconds when absent), which plays as it comes on (as the slide opens, if it has no entrance); one that does not move is a picture.
|
|
145
198
|
|
|
146
199
|
A slide's `transition` is how it comes on from the slide before: `type` (`fade`, `push`, `wipe`, or `morph`), `direction` for a push or a wipe (`from-right` unless said), `duration` in seconds (0.7 for a fade, 1 for a push or a wipe, 2 for a morph). What is on the slide starts when it is over, and presenting plays it. A morph moves each shape the two slides share by name from the one's place and size to the other's, as PowerPoint's Morph; what only one has fades. So name a shape the same on both slides to carry it across. A PowerPoint file has them as its own, with a fade for a PowerPoint too old for Morph. A generated slide sets `slide.transition`.
|
|
147
200
|
|
|
@@ -152,7 +205,7 @@ revenue:
|
|
|
152
205
|
frame: { x: 80, y: 120, w: 640, h: 340 }
|
|
153
206
|
chart:
|
|
154
207
|
type: column-clustered
|
|
155
|
-
data: ../sales#revenue # from the
|
|
208
|
+
data: ../sales/sales.yaml#revenue # from the module's folder: a sheet's table (<sheet>#<table>), a CSV, or a data file of rows
|
|
156
209
|
categories: Quarter # the column of names
|
|
157
210
|
series: [Revenue, { name: Cost, color: accent3 }] # the columns of numbers
|
|
158
211
|
legend: bottom
|
|
@@ -167,6 +220,7 @@ Without `data`, `categories` is a list of names and each series has its `values`
|
|
|
167
220
|
| `labels.position` | a clustered bar's `outEnd`, a stacked bar's and a pie's `ctr`, a line's `t` | `outEnd` (clustered bars and pies), `inEnd`, `ctr`, `inBase` (bars), `t`, `b`, `l`, `r` (lines). An area and a doughnut have none: a position a chart's kind cannot have is AK-M011, since PowerPoint would repair the file |
|
|
168
221
|
| `gap_width`, `overlap` | 150; 0 (stacked 100) | Bars: the gap as a share of a bar's width, how far one covers the next, in % |
|
|
169
222
|
| `vary_by_categories` | a pie's and a doughnut's | A colour per category |
|
|
223
|
+
| `category_colors` | the accents in turn | Where it varies by categories, each category's colour in order (a slice's): a theme colour or `#RRGGBB`. In code, a series' `points[i].format.fill`, as python-pptx's |
|
|
170
224
|
| `hole_size` | 50 | A doughnut's, in % |
|
|
171
225
|
| `value_axis`, `category_axis` | automatic | `min`, `max`, `major`, `gridlines` (the value axis's are on), `visible`, `format` (Excel's), `reverse`, `gridline_color`, `line_color` |
|
|
172
226
|
| `size`, `title_size`, `color` | 12, 14.4, `dk1` | Its text's points, its title's, and their colour |
|
|
@@ -174,25 +228,25 @@ Without `data`, `categories` is a list of names and each series has its `values`
|
|
|
174
228
|
|
|
175
229
|
In code, `shapes.add_chart(XL_CHART_TYPE.X, left, top, width, height, chart_data)` makes one from a `CategoryChartData`, or an `XyChartData` (`add_series(name)`, `add_data_point(x, y)`), as python-pptx's does, with its `.chart`. A scale left automatic is PowerPoint's in the file and drawn here by the same rules, so a number a person changes moves it; set `min`, `max` and `major` to fix it. Where the plot sits is written in the file, so every app puts it where the stage does. `allyhub inspect --kind chart-data` lists each chart's numbers and the file they came from.
|
|
176
230
|
|
|
177
|
-
What
|
|
231
|
+
What the slides file names that the deck does not have (a layout, a generator, a component or its prop, a shape to change or animate, a file) is AK-M011, at its line; an exception in a generator, at the line of the deck's module that threw it. A slide that is not the format is left out, so one check finds every problem.
|
|
178
232
|
|
|
179
233
|
## The script
|
|
180
234
|
|
|
181
|
-
A deck's script has a row per slide under `slides`: its `text` by shape name (a placeholder's or a text box's; a list is paragraphs, a list in it a level deeper; `**bold**`, `*italic*`, `` `code` ``, in the theme's `code` font, `<span color="accent1" font="Inter Tight">words</span>`, in a colour as
|
|
235
|
+
A deck's script has a row per slide under `slides`: its `text` by shape name (a placeholder's or a text box's; a list is paragraphs, a list in it a level deeper; `**bold**`, `*italic*`, `` `code` ``, in the theme's `code` font, `<span color="accent1" font="Inter Tight">words</span>`, in a colour as the slides file writes one (`accent1`, `accent1 lighter 40%`, `#RRGGBB`), a font of their own, or both, are runs, as in a doc; a span also takes `size="24"`, in points, `bold="false"` and `italic="false"`, plain words in a bold or italic level, `underline="true"`, `link="https://…"`, `strike="true"`, `highlight="#FFFF00"` and `baseline="0.3"`, raised or, below 0, lowered, a share of the size. A slide number placeholder writes its own text, a number PowerPoint keeps up to date) its `alt`, each picture's or shape's alternative text by name (what a screen reader says, PowerPoint's Alt Text), and its `notes`. A key is `<prefix>.<slide>.<shape>` (the prefix is the deck's id with `/` as `.`), `<prefix>.<slide>.alt.<shape>`, `<prefix>.<slide>.notes`. A placeholder with no words in the script is empty, and an empty placeholder is not drawn. A layout's date, footer and slide number placeholders are on a slide only where it names them in the slides file (`slide-number: {}`), as PowerPoint's Header & Footer and python-pptx's `add_slide` have it. Words are in the script's language, and in Japanese where they have kana, Korean where they have hangul, on the stage and in an exported file: Han characters take that language's forms.
|
|
182
236
|
|
|
183
237
|
## What a person changes in the editor
|
|
184
238
|
|
|
185
|
-
The slides' order, a slide's layout, hidden, added, duplicated or removed; text typed in place and the notes; a shape moved and sized, brought forward or sent back, removed; a text box, picture, video or basic shape placed; a theme colour for a fill or a text, a text's size, bold and alignment; a shape reset to its layout. Every one of these is an edit of
|
|
239
|
+
The slides' order, a slide's layout, hidden, added, duplicated or removed; text typed in place and the notes; a shape moved and sized, brought forward or sent back, removed; a text box, picture, video or basic shape placed; a theme colour for a fill or a text, a text's size, bold and alignment; a shape reset to its layout. Every one of these is an edit of the slides file or the script; everything else (masters, layouts, components, generators, style beyond these) is yours, in the deck's module. When you and the person change these files at once, both changes stand: a frame, a shape and an animation merge field by field, the slides' order and a shape's paragraphs line by line, and where you both changed one value the person's stands; a slide or shape one of you removed while the other changed it stays, changed. The person keeps or undoes each of your changes. A slide the person adds is `slide-` and four letters (`slide-k3f9`), so give yours ids by what they are.
|
|
186
240
|
|
|
187
241
|
## Importing a PowerPoint file
|
|
188
242
|
|
|
189
|
-
`allyhub slides import <file.pptx> --to
|
|
243
|
+
`allyhub slides import <file.pptx> --to reviews/q3.ts` makes a deck of a PowerPoint file: its masters and layouts as the deck's module, `reviews/q3.ts` (python-pptx's calls, only what differs from Office's text styles; by default the file's name, `.ts`), its slides on their layouts as its slides file, `reviews/q3.yaml` (what each moves, its own shapes, pictures, videos, tables, charts and lines, their rotation, flips and groups, its background, animations and transition), each slide's words, alternative text and notes as the script, `reviews/q3.<lang>.yaml` (bold and italic as `**…**` and `*…*`, a run's own bold or italic off as `bold="false"` or `italic="false"`, a link, a highlight, a baseline, a colour, a font, a size, an underline or a strike of their own as spans, what all of a shape's text has as its `text` in the slides file, a deeper level as a list in the list), its pictures and videos beside them, by their files' names (another where a file there has it). A slide's and a shape's name is kept where it is a name (letters, digits, `_`, `-`), so a deck AllyHub wrote reads back with its own. A table's style is resolved into its rows' fills, text and rules; a theme colour lightened or darkened as PowerPoint's picker does it is that theme colour (`accent1 lighter 40%`), one changed otherwise the colour it makes.
|
|
190
244
|
|
|
191
245
|
Everything the file holds that the deck does not carry over as it is is reported, grouped (what, why, how many, where), all of it with `--json`: what nothing read, an extension of Office's, a part, what the deck cannot hold, what is held another way, what is missing from the file. Nothing is dropped without a line. `--lang` names the script's language.
|
|
192
246
|
|
|
193
247
|
## Measuring a deck
|
|
194
248
|
|
|
195
|
-
The check measures every slide as the stage draws it, and `allyhub inspect` lists what it found as facts: numbers for you to judge, never problems, every length in points as
|
|
249
|
+
The check measures every slide as the stage draws it, and `allyhub inspect` lists what it found as facts: numbers for you to judge, never problems, every length in points as the slides file writes them. Text the slide's edge cuts at every build that shows it is AK-L002, an error that stops a render. A deck has:
|
|
196
250
|
|
|
197
251
|
- `text-overflow`: a shape's text past its box, by its lines' glyphs.
|
|
198
252
|
- `text-off-slide`: a shape's text the slide's edge cuts, how far and the share outside.
|
|
@@ -206,7 +260,7 @@ The check measures every slide as the stage draws it, and `allyhub inspect` list
|
|
|
206
260
|
|
|
207
261
|
## What a deck renders to
|
|
208
262
|
|
|
209
|
-
`allyhub render` makes a deck's files in `.allyhub/out
|
|
263
|
+
`allyhub render` makes a deck's files in `.allyhub/out/`, named by its id (`reviews/q3.<combo key>.<ext>`), each slide drawn at its still, hidden ones left out; `allyhub help render` lists the options.
|
|
210
264
|
|
|
211
265
|
| Type | What it is |
|
|
212
266
|
| ------------------- | --------------------------------------------------------- |
|
package/docs/sound.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Nothing makes a sound unless the piece puts it there: each part's speech ([speech.md](speech.md)), the music, footage with `audio: true` and the sound effects a part places. Each stem is shaped, levelled to a loudness, the music dips under speech, and the sum is mastered. The render's mix and the preview's are the same computation, sample by sample. This file covers music, sound effects, the mix, the master and how the voice was recorded.
|
|
4
4
|
|
|
5
|
-
```ts file=launch/film
|
|
5
|
+
```ts file=launch/film.ts
|
|
6
6
|
import { part, take, video } from "@allyhub/sdk";
|
|
7
7
|
|
|
8
8
|
import chime from "./sfx/chime.wav";
|
|
@@ -123,7 +123,7 @@ The values are `MIX_DEFAULTS`. A part's own speech level is `speechGainDb` ([spe
|
|
|
123
123
|
|
|
124
124
|
## The master
|
|
125
125
|
|
|
126
|
-
`video({ master })`: a loudness in LUFS (−70 to 0), `{ lufs?, truePeak? }` (`truePeak` −9 to 0 dBTP), or `false`. The default is
|
|
126
|
+
`video({ master })`: a loudness in LUFS (−70 to 0), `{ lufs?, truePeak? }` (`truePeak` −9 to 0 dBTP), or `false`. The default is −14 LUFS, with a −3 dBTP true peak (`MASTER_DEFAULTS`).
|
|
127
127
|
|
|
128
128
|
The mix's integrated loudness is measured and one gain brings it to `lufs`; a limiter at 4 times the sample rate holds the true peak; what came out is measured again and the gain corrected by what the limiter took, at most 4 times, until within 0.1 LU (`MASTER_MECHANICS`). Nothing rides the level over time: the mix keeps its loudness range. `false` (or `lufs: false`) keeps the mix's own level and only limits its peaks.
|
|
129
129
|
|
|
@@ -137,7 +137,7 @@ The mix's integrated loudness is measured and one gain brings it to `lufs`; a li
|
|
|
137
137
|
- A setup by name: `"studio"`, `"phone"` (a phone held in front, a little below the face: two omni microphones, its band, its automatic gain, a small dead room and its room tone), `"lav"` (a clip-on on the chest, in a dead room, finished). Their values are `SETUP_PRESETS`, the rooms' `ROOM_PRESETS` and the finishing's `POST_PRESETS` ([defaults.md](defaults.md)).
|
|
138
138
|
- Any value of a setup changes:
|
|
139
139
|
|
|
140
|
-
```ts file=talk/
|
|
140
|
+
```ts file=talk/talk.ts
|
|
141
141
|
import { part, video } from "@allyhub/sdk";
|
|
142
142
|
|
|
143
143
|
export default video({
|