allyhub 0.6.0 → 0.7.1
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/dist/audio-text.js +1 -1
- package/dist/commands/add.js +2 -2
- package/dist/commands/cloud-tools.js +5 -5
- package/dist/commands/dev.js +1 -1
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/sheet.js +1 -1
- package/dist/commands/frames.js +8 -8
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/common.js +1 -1
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/render.js +1 -1
- package/dist/commands/sheet.js +5 -5
- package/dist/commands/site.js +3 -2
- package/dist/commands/skills.js +3 -3
- package/dist/commands/slides.js +2 -2
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
- package/dist/node_modules/@allyhub-next/browser/dist/html.js +1 -1
- package/dist/node_modules/@allyhub-next/browser/package.json +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/build/dist/content.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +3 -3
- package/dist/node_modules/@allyhub-next/build/dist/move-refs.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/move-refs.js +1 -1
- package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +12 -3
- package/dist/node_modules/@allyhub-next/build/dist/plugin.js +7 -6
- package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +9 -5
- package/dist/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
- package/dist/node_modules/@allyhub-next/build/dist/vite.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/build/dist/vite.js +2 -2
- package/dist/node_modules/@allyhub-next/build/package.json +1 -1
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
- package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
- package/dist/node_modules/@allyhub-next/check/dist/check.js +3 -3
- package/dist/node_modules/@allyhub-next/check/package.json +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/call.js +4 -2
- package/dist/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/hashes.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
- package/dist/node_modules/@allyhub-next/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub-next/components/package.json +1 -1
- package/dist/node_modules/@allyhub-next/components/r/caption-subtitle.json +1 -1
- package/dist/node_modules/@allyhub-next/components/src/caption-subtitle.ts +54 -16
- package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/fonts.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +2 -0
- package/dist/node_modules/@allyhub-next/dev-server/dist/writer.js +2 -2
- package/dist/node_modules/@allyhub-next/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub-next/doc/package.json +1 -1
- package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +1 -1
- package/dist/node_modules/@allyhub-next/export/dist/export.js +5 -5
- package/dist/node_modules/@allyhub-next/export/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/export/package.json +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +69 -18
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +847 -116
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +501 -38
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
- package/dist/node_modules/@allyhub-next/measure/package.json +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/media/dist/sheet.js +7 -7
- package/dist/node_modules/@allyhub-next/media/package.json +1 -1
- package/dist/node_modules/@allyhub-next/model/package.json +1 -1
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-measure.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +2 -0
- package/dist/node_modules/@allyhub-next/project/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/project/dist/session.js +1 -1
- package/dist/node_modules/@allyhub-next/project/dist/stills.js +2 -0
- package/dist/node_modules/@allyhub-next/project/package.json +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +79 -5
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +21 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +396 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
- package/dist/node_modules/@allyhub-next/registry/package.json +1 -1
- package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.js +3 -2
- package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
- package/dist/node_modules/@allyhub-next/render/dist/doc/pdf.js +34 -0
- package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +4 -4
- package/dist/node_modules/@allyhub-next/render/dist/exports.js +2 -2
- package/dist/node_modules/@allyhub-next/render/dist/pdf.js +2 -0
- package/dist/node_modules/@allyhub-next/render/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtime/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
- package/dist/node_modules/@allyhub-next/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/download.d.ts +19 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/download.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +19 -2
- package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +3 -3
- package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -3
- package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
- package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +4 -4
- package/dist/node_modules/@allyhub-next/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
- package/dist/node_modules/@allyhub-next/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
- package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
- package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +3 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +42 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +59 -39
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +27 -13
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +179 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +2 -4
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +17 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +21 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +4 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +3 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +4 -0
- package/dist/{site.js → node_modules/@allyhub-next/slides-pptx/dist/read/model.js} +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/table.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +5 -5
- package/dist/node_modules/@allyhub-next/slides-runtime/package.json +5 -1
- package/dist/node_modules/@allyhub-next/stage/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/stage/dist/page.js +22 -12
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +5 -5
- package/dist/node_modules/@allyhub-next/stage/dist/server.js +1 -1
- package/dist/node_modules/@allyhub-next/stage/package.json +1 -1
- package/dist/node_modules/@allyhub-next/stage-page/dist/host.js +1 -20
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/probe.html +8 -0
- package/dist/{astro.js → node_modules/@allyhub-next/stage-page/dist/runtime/probe.js} +1 -1
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +79 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.html +21 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +3 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.html +9 -0
- package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.js +3 -0
- package/dist/node_modules/@allyhub-next/stage-page/package.json +2 -3
- package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
- package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/website/LICENSE +241 -0
- package/dist/node_modules/@allyhub-next/website/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/website/dist/publish.js +3 -0
- package/dist/node_modules/@allyhub-next/website/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub-next/website/dist/website.js +4 -0
- package/dist/node_modules/@allyhub-next/website/package.json +13 -0
- package/dist/text/facts-text.js +4 -4
- package/dist/works.js +1 -1
- package/editor-web/assets/calc-worker-Bz9r26p1.js +158 -0
- package/editor-web/assets/dist-B-BI8jma.js +37 -0
- package/editor-web/assets/dist-CS-Z5JSF.js +224 -0
- package/editor-web/assets/dist-ClE1xUdI.js +10 -0
- package/editor-web/assets/dist-Cqu9f1N5.js +1 -0
- package/editor-web/assets/dist-CsDICOqP.js +36 -0
- package/editor-web/assets/dist-DegNYCaB.js +10 -0
- package/editor-web/assets/dist-EotuIcA_.js +2 -0
- package/editor-web/assets/index-CwDs3z43.js +69 -0
- package/editor-web/assets/index-ujKjdu_s.css +2 -0
- package/editor-web/assets/minus-DLhpe7h_.js +1 -0
- package/editor-web/assets/react-CT8OUeCe.js +101 -0
- package/editor-web/assets/tabs-BEPTOFm5.js +105 -0
- package/editor-web/assets/text-align-start-CfqIQSWH.js +1 -0
- package/editor-web/index.html +5 -5
- package/package.json +8 -14
- package/dist/astro.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +0 -52
- package/dist/node_modules/@allyhub-next/audio/dist/decode.d.ts +0 -33
- package/dist/node_modules/@allyhub-next/audio/dist/envelope.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/audio/dist/index.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/audio/dist/levels.d.ts +0 -97
- package/dist/node_modules/@allyhub-next/audio/dist/master.d.ts +0 -29
- package/dist/node_modules/@allyhub-next/audio/dist/music.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -25
- package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -31
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +0 -8
- package/dist/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +0 -60
- package/dist/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +0 -31
- package/dist/node_modules/@allyhub-next/audio/dist/plan.d.ts +0 -143
- package/dist/node_modules/@allyhub-next/audio/dist/recorded.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +0 -89
- package/dist/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -64
- package/dist/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +0 -56
- package/dist/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +0 -64
- package/dist/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/audio/dist/render.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/audio/dist/sfx.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/audio/dist/shape.d.ts +0 -118
- package/dist/node_modules/@allyhub-next/audio/dist/voice.d.ts +0 -45
- package/dist/node_modules/@allyhub-next/browser/dist/browser.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/browser/dist/capture.d.ts +0 -61
- package/dist/node_modules/@allyhub-next/browser/dist/cdp.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/browser/dist/flags.d.ts +0 -13
- package/dist/node_modules/@allyhub-next/browser/dist/frames.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/browser/dist/html.d.ts +0 -19
- package/dist/node_modules/@allyhub-next/browser/dist/index.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/browser/dist/launch.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/browser/dist/page.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/browser/dist/server.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/check/dist/cache.d.ts +0 -46
- package/dist/node_modules/@allyhub-next/check/dist/check.d.ts +0 -142
- package/dist/node_modules/@allyhub-next/check/dist/generated.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/check/dist/index.d.ts +0 -7
- package/dist/node_modules/@allyhub-next/check/dist/plans.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/check/dist/result.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/check/dist/scenery.d.ts +0 -23
- package/dist/node_modules/@allyhub-next/dev-server/dist/background.d.ts +0 -50
- package/dist/node_modules/@allyhub-next/dev-server/dist/card.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/dev-server/dist/index.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -77
- package/dist/node_modules/@allyhub-next/dev-server/dist/mime.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/mime.js +0 -2
- package/dist/node_modules/@allyhub-next/dev-server/dist/paths.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/dev-server/dist/project.d.ts +0 -153
- package/dist/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/dev-server/dist/server.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/dev-server/dist/sound.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +0 -82
- package/dist/node_modules/@allyhub-next/dev-server/dist/stage.js +0 -121
- package/dist/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/dev-server/dist/validate.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.d.ts +0 -47
- package/dist/node_modules/@allyhub-next/dev-server/dist/writer.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/export/dist/batch.d.ts +0 -70
- package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +0 -123
- package/dist/node_modules/@allyhub-next/export/dist/index.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
- package/dist/node_modules/@allyhub-next/measure/dist/compare.d.ts +0 -195
- package/dist/node_modules/@allyhub-next/measure/dist/contrast.d.ts +0 -14
- package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -90
- package/dist/node_modules/@allyhub-next/measure/dist/cuts.d.ts +0 -108
- package/dist/node_modules/@allyhub-next/measure/dist/facts.d.ts +0 -60
- package/dist/node_modules/@allyhub-next/measure/dist/fidelity.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/measure/dist/flat.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/measure/dist/loop.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/measure/dist/overlay.d.ts +0 -57
- package/dist/node_modules/@allyhub-next/measure/dist/recording-report.d.ts +0 -66
- package/dist/node_modules/@allyhub-next/measure/dist/reference/compare.d.ts +0 -118
- package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -75
- package/dist/node_modules/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.d.ts +0 -53
- package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.d.ts +0 -53
- package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.d.ts +0 -84
- package/dist/node_modules/@allyhub-next/measure/dist/reference/text.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -55
- package/dist/node_modules/@allyhub-next/measure/dist/seams.d.ts +0 -46
- package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.d.ts +0 -74
- package/dist/node_modules/@allyhub-next/measure/dist/sound-report.d.ts +0 -156
- package/dist/node_modules/@allyhub-next/measure/dist/still.d.ts +0 -58
- package/dist/node_modules/@allyhub-next/measure/dist/version-voice.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/project/dist/console.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/project/dist/digest.d.ts +0 -9
- package/dist/node_modules/@allyhub-next/project/dist/index.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/project/dist/ledger.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/project/dist/media-index.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/project/dist/page.d.ts +0 -119
- package/dist/node_modules/@allyhub-next/project/dist/says.d.ts +0 -15
- package/dist/node_modules/@allyhub-next/project/dist/scenery.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/project/dist/session.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/project/dist/stretch.d.ts +0 -38
- package/dist/node_modules/@allyhub-next/project/dist/version.d.ts +0 -114
- package/dist/node_modules/@allyhub-next/render/dist/cap.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/render/dist/capture.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/render/dist/clip.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/composite.d.ts +0 -106
- package/dist/node_modules/@allyhub-next/render/dist/delivery.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
- package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -51
- package/dist/node_modules/@allyhub-next/render/dist/encode.d.ts +0 -111
- package/dist/node_modules/@allyhub-next/render/dist/errors.d.ts +0 -15
- package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -67
- package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.d.ts +0 -75
- package/dist/node_modules/@allyhub-next/render/dist/footage.d.ts +0 -169
- package/dist/node_modules/@allyhub-next/render/dist/image.d.ts +0 -16
- package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/render/dist/junction.d.ts +0 -70
- package/dist/node_modules/@allyhub-next/render/dist/look.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +0 -178
- package/dist/node_modules/@allyhub-next/render/dist/parts.d.ts +0 -140
- package/dist/node_modules/@allyhub-next/render/dist/png.d.ts +0 -37
- package/dist/node_modules/@allyhub-next/render/dist/pool.d.ts +0 -54
- package/dist/node_modules/@allyhub-next/render/dist/post-probe.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/post.d.ts +0 -27
- package/dist/node_modules/@allyhub-next/render/dist/render.d.ts +0 -151
- package/dist/node_modules/@allyhub-next/render/dist/segments.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/render/dist/sound.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/render/dist/stills.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/render/dist/tools.d.ts +0 -25
- package/dist/node_modules/@allyhub-next/render/dist/webp.d.ts +0 -17
- package/dist/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +0 -211
- package/dist/node_modules/@allyhub-next/runtime/dist/captions.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/runtime/dist/clock.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/runtime/dist/compose.d.ts +0 -149
- package/dist/node_modules/@allyhub-next/runtime/dist/console.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/runtime/dist/contrast.d.ts +0 -13
- package/dist/node_modules/@allyhub-next/runtime/dist/embed.d.ts +0 -50
- package/dist/node_modules/@allyhub-next/runtime/dist/env.d.ts +0 -101
- package/dist/node_modules/@allyhub-next/runtime/dist/errors.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/runtime/dist/facade.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/runtime/dist/fonts.d.ts +0 -110
- package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -52
- package/dist/node_modules/@allyhub-next/runtime/dist/frame.d.ts +0 -61
- package/dist/node_modules/@allyhub-next/runtime/dist/guards.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/runtime/dist/index.d.ts +0 -14
- package/dist/node_modules/@allyhub-next/runtime/dist/inspect.d.ts +0 -112
- package/dist/node_modules/@allyhub-next/runtime/dist/locate.d.ts +0 -11
- package/dist/node_modules/@allyhub-next/runtime/dist/measure.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/runtime/dist/music.d.ts +0 -29
- package/dist/node_modules/@allyhub-next/runtime/dist/output.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/runtime/dist/pictures.d.ts +0 -39
- package/dist/node_modules/@allyhub-next/runtime/dist/piece.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.d.ts +0 -41
- package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -57
- package/dist/node_modules/@allyhub-next/runtime/dist/player/player.d.ts +0 -78
- package/dist/node_modules/@allyhub-next/runtime/dist/reads.d.ts +0 -132
- package/dist/node_modules/@allyhub-next/runtime/dist/sound.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/runtime/dist/speech.d.ts +0 -107
- package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -12
- package/dist/node_modules/@allyhub-next/runtime/dist/stage.d.ts +0 -34
- package/dist/node_modules/@allyhub-next/runtime/dist/styles.d.ts +0 -35
- package/dist/node_modules/@allyhub-next/runtime/dist/takes.d.ts +0 -72
- package/dist/node_modules/@allyhub-next/runtime/dist/titles.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/runtime/dist/transitions.d.ts +0 -26
- package/dist/node_modules/@allyhub-next/site/dist/assets.d.ts +0 -59
- package/dist/node_modules/@allyhub-next/site/dist/assets.js +0 -2
- package/dist/node_modules/@allyhub-next/site/dist/astro.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/site/dist/astro.js +0 -3
- package/dist/node_modules/@allyhub-next/site/dist/lockfile.d.ts +0 -40
- package/dist/node_modules/@allyhub-next/site/dist/lockfile.js +0 -3
- package/dist/node_modules/@allyhub-next/site/dist/media.d.ts +0 -24
- package/dist/node_modules/@allyhub-next/site/dist/media.js +0 -4
- package/dist/node_modules/@allyhub-next/site/package.json +0 -25
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +0 -2
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -45
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +0 -18
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -56
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -72
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -32
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -43
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +0 -4
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -10
- package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +0 -6
- package/dist/node_modules/@allyhub-next/stage/dist/bakes.d.ts +0 -42
- package/dist/node_modules/@allyhub-next/stage/dist/graphics.d.ts +0 -7
- package/dist/node_modules/@allyhub-next/stage/dist/identity.d.ts +0 -2
- package/dist/node_modules/@allyhub-next/stage/dist/index.d.ts +0 -9
- package/dist/node_modules/@allyhub-next/stage/dist/page.d.ts +0 -87
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.d.ts +0 -69
- package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -49
- package/dist/node_modules/@allyhub-next/stage/dist/scenery.d.ts +0 -8
- package/dist/node_modules/@allyhub-next/stage/dist/server.d.ts +0 -21
- package/dist/node_modules/@allyhub-next/stage-page/dist/host.d.ts +0 -22
- package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
- package/dist/site.d.ts +0 -2
- package/editor-web/assets/dist-BW2s9FMO.js +0 -4
- package/editor-web/assets/dist-C-6JmebI.js +0 -233
- package/editor-web/assets/dist-CCYMLMKN.js +0 -6
- package/editor-web/assets/dist-CHzurjMx.js +0 -33
- package/editor-web/assets/dist-DF7H1dxw.js +0 -1
- package/editor-web/assets/dist-Da5AUSKX.js +0 -2
- package/editor-web/assets/index-B7S9RZhL.css +0 -2
- package/editor-web/assets/index-CovQYWvD.js +0 -69
- package/editor-web/assets/minus-BrvjaJyO.js +0 -1
- package/editor-web/assets/react-DV5fPdiH.js +0 -101
- package/editor-web/assets/textarea-B0vCGdZI.js +0 -105
- package/editor-web/assets/trash-2-B0dvc1cZ.js +0 -1
- package/editor-web/assets/undo-2-A1EPubPO.js +0 -1
- /package/dist/node_modules/@allyhub-next/{site → ooxml}/LICENSE +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ScriptFile, type SlidesFile } from "@allyhub-next/formats";
|
|
2
|
+
/** Where a person's change met another hand's in slides.yaml. */
|
|
3
|
+
export interface SlidesConflict {
|
|
4
|
+
slide: string;
|
|
5
|
+
shape?: string;
|
|
6
|
+
/**
|
|
7
|
+
* What both changed, by its path in the slide or shape (`layout`,
|
|
8
|
+
* `frame.x`, `text.size`, `animations.title:fade.duration`; `order`: both
|
|
9
|
+
* moved the slide, or the item); absent when one hand removed the slide or
|
|
10
|
+
* shape the other changed.
|
|
11
|
+
*/
|
|
12
|
+
field?: string;
|
|
13
|
+
/** Each hand's value; absent where that hand removed it. */
|
|
14
|
+
mine?: unknown;
|
|
15
|
+
theirs?: unknown;
|
|
16
|
+
/** Whose stands: the person's, unless the person removed what the other hand changed. */
|
|
17
|
+
kept: "mine" | "theirs";
|
|
18
|
+
}
|
|
19
|
+
/** Where a person's words met another hand's in a deck's script. */
|
|
20
|
+
export interface DeckScriptConflict {
|
|
21
|
+
slide: string;
|
|
22
|
+
/** The shape whose words both changed. */
|
|
23
|
+
shape?: string;
|
|
24
|
+
/** `notes`, or what of the shape's words both changed; absent when one hand removed the row the other changed. */
|
|
25
|
+
field?: string;
|
|
26
|
+
mine?: unknown;
|
|
27
|
+
theirs?: unknown;
|
|
28
|
+
kept: "mine" | "theirs";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A person's slides.yaml (`mine`, what the editor holds, made from
|
|
32
|
+
* `base`) merged with the file as another hand left it (`theirs`), written
|
|
33
|
+
* over theirs. Undefined when theirs is not a slides.yaml a merge can
|
|
34
|
+
* read: the person mends it, or the other hand does.
|
|
35
|
+
*/
|
|
36
|
+
export declare function mergeSlides(base: string, mine: SlidesFile, theirs: string): {
|
|
37
|
+
text: string;
|
|
38
|
+
conflicts: SlidesConflict[];
|
|
39
|
+
} | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* A person's script (`mine`, made from `base`) merged with the script as
|
|
42
|
+
* another hand left it (`theirs`): its slides' rows, as mergeSlides
|
|
43
|
+
* merges slides.yaml. Undefined when theirs is not a script.
|
|
44
|
+
*/
|
|
45
|
+
export declare function mergeDeckScript(base: string, mine: ScriptFile, theirs: string): {
|
|
46
|
+
text: string;
|
|
47
|
+
conflicts: DeckScriptConflict[];
|
|
48
|
+
} | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* An id for a slide a person adds or duplicates in the editor: its stem
|
|
51
|
+
* and four random letters (`slide-k3f9`), none a slide has yet. The
|
|
52
|
+
* agent writes slides.yaml while the person edits it, so an id counted up
|
|
53
|
+
* from what the editor sees (`slide-2`) could be one the agent is adding
|
|
54
|
+
* too; one of 32⁴ (about a million) is not, as PowerPoint gives a new
|
|
55
|
+
* slide an id no other slide has (`p:sldId/@id`).
|
|
56
|
+
*/
|
|
57
|
+
export declare function newSlideId(taken: Iterable<string>, stem?: string, random?: () => number): string;
|
|
58
|
+
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{readDataFile as T}from"@allyhub-next/formats";import{editSlidesFile as I,readSlidesFile as v,slidesEdits as O}from"./file.js";import{deckScriptEdits as _,editDeckScript as C,readScript as A}from"./script.js";import{commonPairs as $,isRecord as M,sameValue as y,valueKey as F}from"./values.js";const N="order";function E(e,n,o,t,i,c){if(y(t,i))return t;if(y(o,t))return i;if(y(o,i))return t;if(t===void 0||i===void 0)return c.push({path:n,mine:t,theirs:i,kept:t===void 0?"theirs":"mine"}),t??i;if(M(t)&&M(i)&&(o===void 0||M(o))&&!e.whole(n)){const s={};for(const d of new Set([...Object.keys(i),...Object.keys(t)])){const f=E(e,[...n,d],o?.[d],t[d],i[d],c);f!==void 0&&(s[d]=f)}return s}if(Array.isArray(t)&&Array.isArray(i)&&(o===void 0||Array.isArray(o))){const s=e.list(n),d=o??[];if(s==="lines")return B(n,d,t,i,c);if(s)return z(e,n,d,t,i,s,c)}return c.push({path:n,mine:t,theirs:i,kept:"mine"}),t}function R(e,n){const o=[],t=new Map,i=new Map;for(const c of e){const s=n(c),d=(i.get(s)??0)+1;i.set(s,d);const f=d===1?s:`${s}#${String(d)}`;o.push(f),t.set(f,c)}return{order:o,byKey:t}}function K(e,n){const o=new Set(n),t=new Set(e),i=e.filter(s=>o.has(s)),c=n.filter(s=>t.has(s));return new Set($(i,c).map(([s])=>i[s]??""))}function z(e,n,o,t,i,c,s){const d=R(o,c),f=R(t,c),a=R(i,c),g=new Map;for(const r of new Set([...a.order,...f.order,...d.order])){const m=E(e,[...n,r],d.byKey.get(r),f.byKey.get(r),a.byKey.get(r),s);m!==void 0&&g.set(r,m)}const S=new Set(d.order),u=K(d.order,f.order),l=K(d.order,a.order),p=a.order.filter(r=>g.has(r));return f.order.forEach((r,m)=>{if(!g.has(r))return;const h=p.indexOf(r);if(h>=0&&S.has(r)&&u.has(r))return;h>=0&&p.splice(h,1);let x=0;for(let w=m-1;w>=0;w--){const k=p.indexOf(f.order[w]??"");if(k>=0){x=k+1;break}}if(p.splice(x,0,r),S.has(r)&&h>=0&&!l.has(r)){const w=(k,L)=>k[k.indexOf(L)-1]??null;w(a.order,r)!==w(f.order,r)&&s.push({path:[...n,r,N],mine:{after:w(f.order,r)},theirs:{after:w(a.order,r)},kept:"mine"})}}),p.map(r=>g.get(r))}function B(e,n,o,t,i){const c=u=>u.map(F),s=new Map($(c(n),c(o))),d=new Map($(c(n),c(t))),f=[];let a=0,g=0,S=0;for(;;){let u=a;for(;u<n.length&&!(s.has(u)&&d.has(u));)u++;const l=u<n.length?s.get(u)??o.length:o.length,p=u<n.length?d.get(u)??t.length:t.length;if(u===a&&l===g&&p===S){if(u>=n.length)break;f.push(o[g]),a++,g++,S++;continue}const r=n.slice(a,u),m=o.slice(g,l),h=t.slice(S,p);y(r,m)?f.push(...h):y(r,h)||y(m,h)?f.push(...m):r.length===0?f.push(...m,...h):(i.push({path:e,mine:m,theirs:h,kept:"mine"}),f.push(...m)),a=u,g=l,S=p}return f}function b(e,n,o){let t=[...e],i=[...n],c=[...o];const s=d=>({...d,id:""});for(const d of["theirs","mine"]){const f=d==="theirs"?c:i,a=d==="theirs"?i:c,g=new Set(f.map(l=>l.id)),S=new Set(t.map(l=>l.id)),u=f.filter(l=>!S.has(l.id));for(const l of t.filter(p=>!g.has(p.id))){const p=u.filter(h=>y(s(h),s(l))),[r]=p;if(p.length!==1||!r||!a.some(h=>h.id===l.id)||a.some(h=>h.id===r.id))continue;const m=h=>h.map(x=>x.id===l.id?{...x,id:r.id}:x);t=m(t),d==="theirs"?i=m(i):c=m(c)}}return[t,i,c]}const P=e=>{const n=e;return`${n.shape??""}${n.paragraph===void 0?"":`[${String(n.paragraph)}]`}:${n.effect??""}`},U={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length===3&&e[2]==="animations")return P;if(e.length===3&&e[2]==="hidden")return n=>String(n)},whole:e=>e.length===5&&e[4]==="path"||e.length===3&&e[2]==="background"},q={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length>=4&&e[2]==="text")return"lines"},whole:()=>!1},j=e=>({...e.mine===void 0?{}:{mine:e.mine},...e.theirs===void 0?{}:{theirs:e.theirs},kept:e.kept});function V(e){const[,n="",...o]=e.path,t=o[0]==="shapes"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}function Z(e){const[,n="",...o]=e.path,t=o[0]==="text"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}export function mergeSlides(e,n,o){const t=v(e).file??{slides:[]},i=v(o).file;if(!i)return;const[c,s,d]=b(t.slides,n.slides,i.slides),f=[],a=E(U,["slides"],c,s,d,f)??[],g=T("slides",{slides:a});if(!g.ok)for(const u of new Set(g.problems.flatMap(l=>{const[p,r]=l.path.split(".");return p==="slides"&&r!==void 0?[Number(r)]:[]}))){const l=a[u]?.id,p=s.find(r=>r.id===l)??d.find(r=>r.id===l);l===void 0||!p||(a[u]=p,f.push({path:["slides",l],mine:s.find(r=>r.id===l),theirs:d.find(r=>r.id===l),kept:s.some(r=>r.id===l)?"mine":"theirs"}))}return{text:O(i,{slides:a}).reduce((u,l)=>I(u,l),o),conflicts:f.map(V)}}export function mergeDeckScript(e,n,o){const t=A(e)??{parts:[],slides:[]},i=A(o);if(!i)return;const[c,s,d]=b(t.slides,n.slides,i.slides),f=[],a=E(q,["slides"],c,s,d,f)??[];return{text:_(i,{...i,slides:a}).reduce((S,u)=>C(S,u),o),conflicts:f.map(Z)}}const D="abcdefghijkmnpqrstuvwxyz23456789";export function newSlideId(e,n="slide",o=Math.random){const t=new Set(e),i=n.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";for(;;){let c="";for(let d=0;d<4;d++)c+=D[Math.floor(o()*D.length)]??"a";const s=`${i}-${c}`;if(!t.has(s))return s}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnimationFile, LineDash, Numbering, TransitionFile, LineEnd, ShapeGeometry, TextAlign
|
|
1
|
+
import type { AnimationFile, LineDash, Numbering, TransitionFile, LineEnd, ShapeGeometry, TextAlign } from "@allyhub-next/formats";
|
|
2
2
|
import type { ChartDef, Color } from "@allyhub-next/chart";
|
|
3
3
|
import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
|
|
4
4
|
import type { ThemeInput } from "./theme.js";
|
|
@@ -18,9 +18,7 @@ export interface FontDef {
|
|
|
18
18
|
bold?: boolean;
|
|
19
19
|
italic?: boolean;
|
|
20
20
|
underline?: boolean;
|
|
21
|
-
color?:
|
|
22
|
-
/** A colour that is not the theme's, `#RRGGBB`. */
|
|
23
|
-
rgb?: string;
|
|
21
|
+
color?: Color;
|
|
24
22
|
/** Space added between letters (negative tightens), EMU (`a:rPr` spc). */
|
|
25
23
|
spacing?: Length;
|
|
26
24
|
/** A line through it (`@strike`). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
|
|
2
|
-
import type { Color, FontDef, ParagraphFormatDef, TextStylesDef } from "./model.js";
|
|
2
|
+
import type { Color, FontDef, LevelsDef, ParagraphFormatDef, TextStylesDef } from "./model.js";
|
|
3
3
|
import { type Length } from "./units.js";
|
|
4
4
|
/** A master's text styles, as Office's master has them (`p:txStyles`). */
|
|
5
5
|
export declare const OFFICE_TEXT_STYLES: TextStylesDef;
|
|
@@ -22,6 +22,13 @@ export declare function placeholderFrame(type: PlaceholderType): {
|
|
|
22
22
|
auto_size: AutoSize;
|
|
23
23
|
word_wrap: boolean;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* A new placeholder's own list style, as Office's layouts have it: a
|
|
27
|
+
* subtitle's levels have no bullet and no hanging indent, each half an
|
|
28
|
+
* inch in from the last (Title Slide's `a:buNone`, `marL`, `indent="0"`),
|
|
29
|
+
* over the master's body style; every other type sets nothing.
|
|
30
|
+
*/
|
|
31
|
+
export declare const placeholderLevels: (type: PlaceholderType) => LevelsDef;
|
|
25
32
|
/** The idx a placeholder of a type has when it is not the only one (PowerPoint's: title 0, a layout's footers 10, 11, 12). */
|
|
26
33
|
export declare const FOOTER_IDX: Partial<Record<PlaceholderType, number>>;
|
|
27
34
|
/** A text box as python-pptx's `add_textbox` makes it: no wrapping, the shape fitted to its text. */
|
|
@@ -55,6 +62,15 @@ export declare const CONNECTOR_STYLE: {
|
|
|
55
62
|
readonly line: "accent1";
|
|
56
63
|
readonly line_width: number;
|
|
57
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* The presets that are a connector (`p:cxnSp`, PowerPoint's Lines): ECMA's
|
|
67
|
+
* `line` and its straight, bent and curved connectors. Each runs from its
|
|
68
|
+
* frame's top left to its bottom right unless flipped, has the connector's
|
|
69
|
+
* style, ends that may carry arrowheads, and no fill and no text.
|
|
70
|
+
*/
|
|
71
|
+
export declare const CONNECTOR_GEOMETRIES: readonly ["line", "straightConnector1", "bentConnector2", "bentConnector3", "bentConnector4", "bentConnector5", "curvedConnector2", "curvedConnector3", "curvedConnector4", "curvedConnector5"];
|
|
72
|
+
/** Whether a geometry is a connector's (CONNECTOR_GEOMETRIES). */
|
|
73
|
+
export declare const isConnectorGeometry: (geometry: string | undefined) => boolean;
|
|
58
74
|
/** A shadow where it says nothing, as PowerPoint's Offset preset: lengths in EMU, the colour black. */
|
|
59
75
|
export declare const SHADOW_DEFAULTS: {
|
|
60
76
|
readonly color: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{Emu as
|
|
2
|
+
import{Emu as o,Inches as r,Pt as e}from"./units.js";const i=9,l=t=>Array.from({length:i},(n,c)=>t(c));export const OFFICE_TEXT_STYLES={title:l(()=>({alignment:"l",line_spacing:{lines:.9},space_before:0,bullet:null,font:{name:"+mj-lt",size:e(44),color:"dk1"}})),body:l(t=>({alignment:"l",line_spacing:{lines:.9},space_before:t===0?e(10):e(5),bullet:"•",bullet_font:"Arial",margin_left:o(228600+t*457200),indent:o(-228600),font:{name:"+mn-lt",size:e([28,24,20][t]??18),color:"dk1"}})),other:l(t=>({alignment:"l",margin_left:o(t*457200),font:{name:"+mn-lt",size:e(18),color:"dk1"}}))},TEXT_FALLBACK={alignment:"l",line_spacing:{lines:1},space_before:0,space_after:0,indent:0,font:{name:"+mn-lt",size:e(18),color:"dk1"}},TEXT_INSETS={left:r(.1),top:r(.05),right:r(.1),bottom:r(.05)},styleKindOf=t=>t===void 0||t==="dt"||t==="ftr"||t==="sldNum"?"other":t==="title"||t==="ctrTitle"?"title":"body";export function placeholderFrame(t){const n=t==="dt"||t==="ftr"||t==="sldNum";return{vertical_anchor:t==="title"||t==="ctrTitle"||n?"ctr":"t",auto_size:n?"none":"text",word_wrap:!0}}export const placeholderLevels=t=>l(t==="subTitle"?n=>({bullet:null,margin_left:r(.5*n),indent:0}):()=>({})),FOOTER_IDX={dt:10,ftr:11,sldNum:12},TEXTBOX_FRAME={word_wrap:!1,auto_size:"shape"},DRAWN_TEXTBOX_FRAME={word_wrap:!0,auto_size:"shape"},AUTOSHAPE_STYLE={fill:"accent1",line:"accent1",line_width:o(6350),font_color:"lt1",vertical_anchor:"ctr",alignment:"ctr"},CONNECTOR_STYLE={line:"accent1",line_width:o(12700)},CONNECTOR_GEOMETRIES=["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"];const s=new Set(CONNECTOR_GEOMETRIES);export const isConnectorGeometry=t=>t!==void 0&&s.has(t),SHADOW_DEFAULTS={color:{rgb:"#000000"},blur:e(4),distance:e(3),angle:45,transparency:.6};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ShapeFile, type SlidesFile, type Numbering, type TextAlign } from "@allyhub-next/formats";
|
|
2
2
|
import type { ChartDef } from "@allyhub-next/chart";
|
|
3
|
+
import type { DeckCode } from "./code.js";
|
|
3
4
|
import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
|
|
4
|
-
import type { Color,
|
|
5
|
+
import type { Color, FontDef, Frame, LevelsDef, LineSpacing, MasterDef, ParagraphDef, GradientDef, ShadowDef, ShapeDef, ShapeKind, TableCellDef, TableDef, TextFrameDef } from "./model.js";
|
|
5
6
|
import { type ResolvedAnimation, type ResolvedTransition } from "./animation.js";
|
|
6
7
|
import { type Theme } from "./theme.js";
|
|
7
8
|
import { type Length } from "./units.js";
|
|
@@ -60,6 +61,8 @@ export interface ResolvedShape {
|
|
|
60
61
|
};
|
|
61
62
|
/** Degrees clockwise about its centre. */
|
|
62
63
|
rotation?: number;
|
|
64
|
+
/** Its alternative text, the script's: what a screen reader says (`p:cNvPr/@descr`). */
|
|
65
|
+
alt?: string;
|
|
63
66
|
/** The level it belongs to: the master's and the layout's own shapes are on every slide of them, not the slide's to change. */
|
|
64
67
|
level: "master" | "layout" | "slide";
|
|
65
68
|
placeholder?: {
|
|
@@ -80,6 +83,8 @@ export interface ResolvedShape {
|
|
|
80
83
|
table?: ResolvedTable;
|
|
81
84
|
chart?: ChartDef;
|
|
82
85
|
group?: string;
|
|
86
|
+
/** PowerPoint's Lock: not moved, sized or turned by hand. */
|
|
87
|
+
locked?: boolean;
|
|
83
88
|
geometry?: ShapeDef["geometry"];
|
|
84
89
|
adjustments?: number[];
|
|
85
90
|
/** A picture or a movie: its project path, its poster, its crop. */
|
|
@@ -104,6 +109,8 @@ export interface ResolvedShape {
|
|
|
104
109
|
text?: ValueSource;
|
|
105
110
|
fill?: ValueSource;
|
|
106
111
|
line?: ValueSource;
|
|
112
|
+
/** A picture's or a movie's file. */
|
|
113
|
+
media?: ValueSource;
|
|
107
114
|
};
|
|
108
115
|
}
|
|
109
116
|
export interface ResolvedSlide {
|
|
@@ -112,13 +119,19 @@ export interface ResolvedSlide {
|
|
|
112
119
|
layout: string;
|
|
113
120
|
master: string;
|
|
114
121
|
hidden: boolean;
|
|
122
|
+
/** Its background's colour: its own, or its layout's or master's. */
|
|
115
123
|
background: Color;
|
|
124
|
+
/** Its own background, a gradient or a picture (a project path), over the colour. */
|
|
125
|
+
background_gradient?: GradientDef;
|
|
126
|
+
background_picture?: string;
|
|
116
127
|
/** Back to front. */
|
|
117
128
|
shapes: ResolvedShape[];
|
|
118
129
|
/** Its Animation Pane, in order. */
|
|
119
130
|
animations: ResolvedAnimation[];
|
|
120
131
|
/** How it comes on from the slide before. */
|
|
121
132
|
transition?: ResolvedTransition;
|
|
133
|
+
/** Seconds after it comes on that a show goes on by itself (`advance_after`). */
|
|
134
|
+
advance?: number;
|
|
122
135
|
notes?: string;
|
|
123
136
|
/** Its place in slides.yaml's `slides`, and its block's generator for a generated slide. */
|
|
124
137
|
file: {
|
|
@@ -139,6 +152,8 @@ export interface DeckProblem {
|
|
|
139
152
|
shape?: string;
|
|
140
153
|
/** slides.yaml's path, when the problem is there. */
|
|
141
154
|
path?: string;
|
|
155
|
+
/** The stack of an exception slides.ts's code threw: its line is the problem's place. */
|
|
156
|
+
stack?: string;
|
|
142
157
|
}
|
|
143
158
|
/** Words of the script: a text, a list of them (paragraphs, nested a level deeper), or none. */
|
|
144
159
|
export type Words = string | readonly Words[] | undefined;
|
|
@@ -156,7 +171,8 @@ export type ResolvedTable = Omit<TableDef, "rows"> & {
|
|
|
156
171
|
}[];
|
|
157
172
|
};
|
|
158
173
|
export interface ResolveInput {
|
|
159
|
-
|
|
174
|
+
/** What the deck's code made, as data (code.ts). */
|
|
175
|
+
code: DeckCode;
|
|
160
176
|
file: SlidesFile;
|
|
161
177
|
/** The script's words of a key, `<prefix>.<slide>.<shape>` or `.notes`. */
|
|
162
178
|
words: (key: string) => Words;
|
|
@@ -165,7 +181,7 @@ export interface ResolveInput {
|
|
|
165
181
|
base: string;
|
|
166
182
|
/** The theme under the deck's own: the project's look as a theme. */
|
|
167
183
|
theme?: Theme;
|
|
168
|
-
/** A
|
|
184
|
+
/** A data file's content, from the deck's folder (a chart's `data`). */
|
|
169
185
|
data?: (path: string) => unknown;
|
|
170
186
|
}
|
|
171
187
|
/** A project path from a folder and a path relative to it. */
|
|
@@ -174,7 +190,7 @@ export declare function joinPath(base: string, rel: string): string;
|
|
|
174
190
|
export declare function levelsOver(base: readonly LevelStyle[], ...over: (LevelsDef | undefined)[]): LevelStyle[];
|
|
175
191
|
/** What the text of a shape that is not a placeholder starts from under a master: PowerPoint's own, then the master's other style. */
|
|
176
192
|
export declare const plainLevels: (master: MasterDef) => LevelStyle[];
|
|
177
|
-
/** A colour slides.yaml names: the theme's, or `#RRGGBB`. */
|
|
193
|
+
/** A colour slides.yaml names (its format has checked it): the theme's, lighter or darker, or `#RRGGBB`. */
|
|
178
194
|
export declare const colorOfFile: (c: string) => Color;
|
|
179
195
|
/** Paragraphs from the script's words: a line each; a list's items each a paragraph, a nested list a level deeper; `**bold**`, `*italic*`, `` `code` `` (in the font `code` names) and spans (WORDS_SPAN) as runs. */
|
|
180
196
|
export declare function paragraphsOfWords(words: Words, level?: number, code?: string): ParagraphDef[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readMarks as fe,markRuns as ce}from"@allyhub-next/video-core";import{chartOfFile as ue}from"./chart-file.js";import{AUTOSHAPE_STYLE as j,SHADOW_DEFAULTS as C,CONNECTOR_STYLE as V,DRAWN_TEXTBOX_FRAME as Z,TEXT_FALLBACK as q,TEXT_INSETS as P,placeholderFrame as pe,styleKindOf as he}from"./office.js";import{resolveAnimation as me,resolveTransition as J}from"./animation.js";import{pathSteps as ge}from"./path.js";import{masterPlaceholder as _e}from"./placeholders.js";import{DECK_FONTS as ye,OFFICE_THEME as be,themeOver as xe}from"./theme.js";import{Pt as v}from"./units.js";export function joinPath(i,t){if(t.startsWith("/"))return t.slice(1);const c=i===""?[]:i.split("/");for(const a of t.split("/"))a===""||a==="."||(a===".."?c.pop():c.push(a));return c.join("/")}const Q={left:0,top:0,width:0,height:0},L=()=>Array.from({length:9},()=>({...q,font:{...q.font},margin_left:0}));export function levelsOver(i,...t){return i.map((c,a)=>{let d={...c,font:{...c.font}};for(const y of t){const o=y?.[a];o&&(d={...d,...o.alignment===void 0?{}:{alignment:o.alignment},...o.line_spacing===void 0?{}:{line_spacing:o.line_spacing},...o.space_before===void 0?{}:{space_before:o.space_before},...o.space_after===void 0?{}:{space_after:o.space_after},...o.margin_left===void 0?{}:{margin_left:o.margin_left},...o.indent===void 0?{}:{indent:o.indent},font:{...d.font,...o.font}},o.font?.color!==void 0&&delete d.font.rgb,o.font?.rgb!==void 0&&delete d.font.color,o.numbered!==void 0&&(d.numbered=o.numbered,delete d.bullet),o.bullet===null?(delete d.bullet,delete d.numbered):o.bullet!==void 0?(delete d.numbered,d.bullet={char:o.bullet,...o.bullet_font===void 0?{}:{font:o.bullet_font}}):o.bullet_font!==void 0&&d.bullet&&(d.bullet={...d.bullet,font:o.bullet_font}))}return d})}function B(i,...t){const c=t.filter(d=>d!==void 0),a=d=>{for(let y=c.length-1;y>=0;y--){const o=c[y]?.[d];if(o!==void 0)return o}};return{vertical_anchor:a("vertical_anchor")??i.vertical_anchor,auto_size:a("auto_size")??i.auto_size,word_wrap:a("word_wrap")??i.word_wrap,margins:{left:a("margin_left")??P.left,top:a("margin_top")??P.top,right:a("margin_right")??P.right,bottom:a("margin_bottom")??P.bottom}}}const ee={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=i=>levelsOver(L(),i.text_styles.other);function G(i,t){return{...B(ee,t),levels:levelsOver(L(),i.text_styles.other,t.levels)}}function $e(i,t,...c){return{...B(pe(t),...c),levels:levelsOver(L(),i.text_styles[he(t)],...c.map(a=>a?.levels))}}const we=Array.from({length:9},()=>({font:{color:j.font_color}})),ne={vertical_anchor:j.vertical_anchor};function te(i,t){return{...B(ee,t),levels:levelsOver(L(),i.text_styles.other,we,t.levels)}}const R=i=>{const t={...i};return delete t.paragraphs,t},D=i=>({paragraphs:[],levels:[],...i}),W=i=>i==="none"?null:colorOfFile(i),ke=/<span((?:\s+(?:color|font|link|highlight|baseline|strike)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,Se=/(color|font|link|highlight|baseline|strike)="([^"\n]*)"/gu,U=57344,ve=256,ie="",Ae=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=i=>i.startsWith("#")?{rgb:i.toUpperCase()}:i;function oe(i){const{shadow:t,gradient:c}=i;return{...i.fill_transparency===void 0?{}:{fill_transparency:i.fill_transparency},...c?{gradient:{angle:c.angle??0,stops:c.stops.map(a=>({at:a.at,color:colorOfFile(a.color),...a.transparency===void 0?{}:{transparency:a.transparency}}))}}:{},...t?{shadow:{color:t.color===void 0?C.color:colorOfFile(t.color),blur:t.blur===void 0?C.blur:v(t.blur),distance:t.distance===void 0?C.distance:v(t.distance),angle:t.angle??C.angle,transparency:t.transparency??C.transparency}}:{}}}function re(i,t,c=[]){return{...i,rows:i.rows.map((a,d)=>({height:a.height,cells:a.cells.map(y=>{const o=c[d];return{...y,text:{paragraphs:y.text.paragraphs,style:H({...G(t,y.text),auto_size:"shape"},o),own:R(y.text),empty:!1},...o?{fileText:o}:{}}})}))}}function H(i,t){return t?{...i,levels:i.levels.map(c=>{const a={...c.font,...t.size===void 0?{}:{size:v(t.size)},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.font===void 0?{}:{name:t.font}};if(t.color!==void 0){const o=colorOfFile(t.color);typeof o=="string"?(a.color=o,delete a.rgb):(a.rgb=o.rgb,delete a.color)}const{bullet:d,...y}=c;return t.numbered?{...y,font:a,numbered:t.numbered,...c.margin_left===0?{margin_left:ae,indent:-ae}:{},...t.align===void 0?{}:{alignment:t.align}}:{...y,...d?{bullet:d}:{},font:a,...t.align===void 0?{}:{alignment:t.align}}})}:i}function Oe(i){const t={};for(const[,c,a=""]of i.matchAll(Se))if(c==="font")t.name=a.trim();else if(c==="link")t.link=a.trim();else if(c==="highlight")t.highlight=a.trim().toUpperCase();else if(c==="strike")t.strike=a.trim()!=="false";else if(c==="baseline"){const d=Number(a);Number.isFinite(d)&&(t.baseline=d)}else{const d=colorOfFile(a);typeof d=="string"?t.color=d:t.rgb=d.rgb}return t}const ae=342900;export function paragraphsOfWords(i,t=0,c=ye.code){return i===void 0?[]:typeof i=="string"?i.split(/\r?\n/u).map(a=>{const d=[],y=a.replace(ke,(A,T,N)=>(d.push(Oe(T)),`${String.fromCharCode(U+d.length-1)}${N}${ie}`)),o=fe(y);let O;const E=ce(o.text,o.marks).flatMap(A=>{const T=A.kinds.includes("code"),N={...A.kinds.includes("strong")?{bold:!0}:{},...A.kinds.includes("em")?{italic:!0}:{},...T?{name:c}:{}};return[...A.text.matchAll(Ae)].flatMap(X=>{const F=X[0],z=F.charCodeAt(0);if(F===ie)return O=void 0,[];if(z>=U&&z<U+ve)return O=d[z-U],[];const M={...O,...N};return[{text:F,...Object.keys(M).length>0?{font:M}:{},...T?{code:!0}:{}}]})});return{runs:E.length>0?E:[{text:""}],level:t}}):i.flatMap(a=>paragraphsOfWords(a,Array.isArray(a)?Math.min(t+1,8):t,c))}const le=i=>({left:v(i.x),top:v(i.y),width:v(i.w),height:v(i.h)}),de=i=>i===void 0?void 0:{left:i.left??0,top:i.top??0,right:i.right??0,bottom:i.bottom??0};export function resolveDeck(i){const{def:t,file:c,words:a,prefix:d,base:y}=i,o=[],O=xe(i.theme??be,t.theme),E=new Map;for(const e of t.masters)for(const n of e.layouts)E.set(n.name,{layout:n,master:e});const A=[],T=(e,n,s)=>({name:e.name,kind:e.kind,frame:{...e.frame??Q},...e.flip?{flip:{...e.flip}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?te(s,e.text):G(s,e.text),own:R(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.fill_transparency===void 0?{}:{fill_transparency:e.fill_transparency},...e.gradient?{gradient:e.gradient}:{},...e.shadow?{shadow:e.shadow}:{},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.path?{path:e.path}:{},...e.table?{table:re(e.table,s)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),N=(e,n)=>{const s=e.placeholder?.type??"body",h=_e(n,s),x=e.frame??h?.frame??Q;return{name:e.name,kind:"placeholder",frame:{...x},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:$e(n,s,h?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!h?"layout":"master"},text:{from:"layout"}}}},X=(e,n,s)=>{const h=t.components[e];if(!h){o.push({...s,message:`There is no component ${e} in slides.ts (it has ${Object.keys(t.components).join(", ")||"none"}).`});return}for(const x of Object.keys(n??{}))Object.hasOwn(h.props,x)||o.push({...s,message:`Component ${e} has no prop ${x} a person sets (it has ${Object.keys(h.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}}}},F=(e,n,s,h,x)=>{const $={slide:h,shape:e,path:s};if(!n.frame){o.push({...$,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const S=le(n.frame),l={frame:{from:"slide",path:`${s}.frame`}},_={name:e,frame:S,level:"slide",...n.fill===void 0?{}:{fill:colorOfFile(n.fill)},...oe(n),...n.line===void 0?{}:{line:W(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.group===void 0?{}:{group:n.group}};if(n.textbox)return{..._,kind:"textbox",text:{paragraphs:paragraphsOfWords(a(`${d}.${h}.${e}`),0,O.fonts.code),style:H(G(x,D(Z)),n.text),own:R(D(Z)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...l,text:{from:"slide",path:`${s}.text`}}};if(n.picture!==void 0){const f=de(n.crop);return{..._,kind:"picture",media:{path:joinPath(y,n.picture),...f?{crop:f}:{}},sources:l}}if(n.movie!==void 0)return{..._,kind:"movie",media:{path:joinPath(y,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:l};if(n.chart){const f=a(`${d}.${h}.${e}`),m=ue(n.chart,{title:typeof f=="string"?f:void 0,base:y,rows:r=>i.data?.(r),problem:r=>{o.push({...$,message:`Chart ${e}: ${r}`})}});return m?{..._,kind:"chart",chart:m,sources:l}:void 0}if(n.table){const f=n.table,m=S.width/f.columns.reduce((g,w)=>g+w,0),r=S.height/f.rows.reduce((g,w)=>g+w.height,0),u=a(`${d}.${h}.${e}`),b=Array.isArray(u)?u:[];return b.length>f.rows.length&&o.push({...$,message:`Table ${e} has ${String(f.rows.length)} rows and its words ${String(b.length)}.`}),{..._,kind:"table",table:re({columns:f.columns.map(g=>Math.round(g*m)),rows:f.rows.map((g,w)=>{const k=b[w],K=Array.isArray(k)?k:k===void 0?[]:[k];return{height:Math.round(g.height*r),cells:f.columns.map((Te,se)=>({text:{levels:[],paragraphs:paragraphsOfWords(K[se],0,O.fonts.code)},...g.fill===void 0?{}:{fill:colorOfFile(g.fill)},...g.line===void 0?{}:{borders:{bottom:{color:colorOfFile(g.line),width:v(1)}}}}))}})},x,f.rows.map(g=>g.text)),sources:l}}const p=n.path&&ge(n.path.d);if(n.path&&!p){o.push({...$,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&p)return{..._,kind:"autoshape",...n.path&&p?{path:{w:n.path.w,h:n.path.h,steps:p}}:n.geometry===void 0?{}:{geometry:n.geometry},...n.geometry==="line"?{line:n.line===void 0?V.line:W(n.line),line_width:n.line_width===void 0?V.line_width:v(n.line_width)}:{fill:n.fill===void 0?j.fill:colorOfFile(n.fill),line:n.line===void 0?j.line:W(n.line),line_width:n.line_width===void 0?j.line_width:v(n.line_width)},...n.text&&n.geometry!=="line"?{fileText:{...n.text}}:{},...n.geometry==="line"?{}:{text:{paragraphs:paragraphsOfWords(a(`${d}.${h}.${e}`)).map(f=>n.text?.align===void 0?{alignment:j.alignment,...f}:f),style:H(te(x,D(ne)),n.text),own:R(D(ne)),empty:!1}},sources:{...l,fill:{from:"slide",path:`${s}.fill`}}};if(n.component!==void 0){const f=X(n.component,n.props,$);return f?{..._,kind:"component",component:f,sources:l}:void 0}},z=(e,n,s)=>{if(n.frame&&(e.frame=le(n.frame),e.sources.frame={from:"slide",path:`${s}.frame`}),n.text&&e.text&&(e.text.style=H(e.text.style,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${s}.text`}),n.line!==void 0&&(e.line=W(n.line),e.sources.line={from:"slide",path:`${s}.line`}),n.line_width!==void 0&&(e.line_width=v(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.fill!==void 0&&(e.fill=colorOfFile(n.fill),e.sources.fill={from:"slide",path:`${s}.fill`}),Object.assign(e,oe(n)),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const h=de(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath(y,n.picture??n.movie??""),...h?{crop:h}:{},...n.poster===void 0?{}:{poster:n.poster}},delete e.text}},M=(e,n,s,h,x)=>{const $=E.get(n);if(!$){o.push({slide:e,path:`slides.${String(s)}.layout`,message:`Slide ${e} is on the layout "${n}", which slides.ts does not have (it has ${[...E.keys()].join(", ")||"none"}).`});return}const{layout:S,master:l}=$,_=[...(S.display_master_shapes===!1?[]:l.shapes).filter(f=>f.kind!=="placeholder").map(f=>T(f,"master",l)),...S.shapes.filter(f=>f.kind!=="placeholder").map(f=>T(f,"layout",l))],p=S.shapes.filter(f=>f.kind==="placeholder").map((f,m)=>({shape:N(f,l),order:m}));return{slide:{id:e,layout:S.name,master:l.name,hidden:h,background:S.background??l.background,shapes:_,animations:[],file:{index:s,...x===void 0?{}:{generate:x}}},placed:p,master:l}},Y=(e,n,s,h,x,$,S,l,_)=>{const p=new Set(s.map(m=>m.shape.name));let f=s.length;for(const[m,r]of Object.entries(h??{})){const u=$(m);if(u===void 0)continue;const b=`${x}.shapes.${m}`,g=r.textbox!==void 0||r.geometry!==void 0||r.path!==void 0||r.table!==void 0||r.chart!==void 0||r.component!==void 0||(r.picture!==void 0||r.movie!==void 0)&&!p.has(u),w=s.find(K=>K.shape.name===u);if(w&&!g){z(w.shape,r,b),r.z!==void 0&&(w.z=r.z);continue}if(w){o.push({slide:e.id,shape:u,path:b,message:`Slide ${e.id} has a ${w.shape.kind} ${u} already: a shape of its own needs another name.`});continue}if(!g){o.push({slide:e.id,shape:u,path:b,message:`Slide ${e.id} has no shape ${u} to change (its layout's placeholders and its own shapes are ${[...p].join(", ")||"none"}).`});continue}const k=F(u,r,b,e.id,n);k&&(s.push({shape:k,order:f++,...r.z===void 0?{}:{z:r.z}}),p.add(u))}s.sort((m,r)=>(m.z??0)-(r.z??0)||m.order-r.order);for(const m of s){const r=m.shape.text;if(m.shape.kind==="placeholder"&&r){const u=S(m.shape);r.paragraphs=paragraphsOfWords(u,0,O.fonts.code),r.empty=r.paragraphs.length===0||r.paragraphs.every(b=>b.runs.every(g=>g.text===""))}}e.shapes.push(...s.map(m=>m.shape)),l!==void 0&&l.trim()!==""&&(e.notes=l);for(const[m,r]of(_??[]).entries()){const u=$(r.shape);if(u===void 0)continue;const b={slide:e.id,shape:u,path:`${x}.animations.${String(m)}`},g=e.shapes.find(k=>k.name===u&&k.level==="slide");if(!g){o.push({...b,message:`Slide ${e.id} has no shape ${u} to animate (it has ${e.shapes.filter(k=>k.level==="slide").map(k=>k.name).join(", ")}).`});continue}if(r.paragraph!==void 0&&r.paragraph>=(g.text?.paragraphs.length??0)){o.push({...b,message:`Shape ${u} has no paragraph ${String(r.paragraph)} to animate (it has ${String(g.text?.paragraphs.length??0)}).`});continue}const w=me({...r,shape:u});w?e.animations.push(w):o.push({...b,message:`The animation of ${u} needs a path that starts with M and says only M, L and C, absolute.`})}},I=new Set;return c.slides.forEach((e,n)=>{const s=`slides.${String(n)}`;if(e.layout!==void 0){const l=M(e.id,e.layout,n,e.hidden===!0);if(!l)return;const _=a(`${d}.${e.id}.notes`);e.transition&&(l.slide.transition=J(e.transition)),Y(l.slide,l.master,l.placed,e.shapes,s,p=>p,p=>a(`${d}.${e.id}.${p.name}`),typeof _=="string"?_:void 0,e.animations),A.push(l.slide),I.add(e.id);return}const h=e.generate??"",x=t.generators[h];if(!x){o.push({slide:e.id,path:`${s}.generate`,message:`There is no generator ${h} in slides.ts (it has ${Object.keys(t.generators).join(", ")||"none"}).`});return}let $;try{$=x.make({data:i.data??(()=>{throw new Error("No data here.")})})}catch(l){o.push({slide:e.id,path:`${s}.generate`,message:`Generator ${h} failed: ${l instanceof Error?l.message:String(l)}`});return}const S=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const l of $){const _=`${e.id}/${l.id}`,p=M(_,l.layout,n,S.has(l.id),h);if(!p)continue;for(const r of l.shapes){const u=r.placeholder?p.placed.find(b=>b.shape.placeholder?.idx===r.placeholder?.idx):void 0;if(u)r.frame&&(u.shape.frame={...r.frame}),u.shape.sources.frame={from:"code"};else{const b=T(r,"layout",p.master);p.placed.push({shape:{...b,level:"slide",sources:{frame:{from:"code"}}},order:p.placed.length})}}const f=`${l.id}/`,m=l.transition??(l===$[0]?e.transition:void 0);m&&(p.slide.transition=J(m)),Y(p.slide,p.master,p.placed,e.shapes,s,r=>r.startsWith(f)?r.slice(f.length):void 0,r=>{const u=r.placeholder===void 0?void 0:l.text[r.placeholder.idx];return u===void 0?void 0:u.map(b=>b.runs.map(g=>g.text).join(""))},l.notes,[...(l.animations??[]).map(r=>({...r,shape:`${f}${r.shape}`})),...e.animations??[]]);for(const r of p.slide.shapes){const u=r.placeholder===void 0?void 0:l.text[r.placeholder.idx];u&&r.text&&(r.text.paragraphs=u,r.text.empty=!1)}A.push(p.slide),I.add(_)}for(const l of Object.keys(e.shapes??{})){const[_]=l.split("/");_!==void 0&&!$.some(p=>p.id===_)&&o.push({slide:e.id,path:`${s}.shapes.${l}`,message:`Generator ${h} makes no slide ${_}: ${l} changes nothing.`})}}),A.forEach((e,n)=>{for(const s of e.shapes)s.placeholder?.type==="sldNum"&&s.text&&(s.text.paragraphs=[{level:0,runs:[{text:String(n+1),field:"slidenum"}]}],s.text.empty=!1)}),{deck:{width:t.slide_width,height:t.slide_height,theme:O,slides:A},problems:o}}
|
|
2
|
+
import{colorOfFile as Q}from"@allyhub-next/formats";import{readMarks as ge,markRuns as _e}from"@allyhub-next/video-core";import{chartOfFile as be}from"./chart-file.js";import{AUTOSHAPE_STYLE as C,SHADOW_DEFAULTS as H,CONNECTOR_STYLE as ee,DRAWN_TEXTBOX_FRAME as ne,TEXT_FALLBACK as te,TEXT_INSETS as W,isConnectorGeometry as ye,placeholderFrame as $e,styleKindOf as xe}from"./office.js";import{resolveAnimation as we,resolveTransition as ie}from"./animation.js";import{pathSteps as ke}from"./path.js";import{masterPlaceholder as ve}from"./placeholders.js";import{DECK_FONTS as Se,OFFICE_THEME as Ae,themeOver as Oe}from"./theme.js";import{Pt as S}from"./units.js";export function joinPath(i,t){if(t.startsWith("/"))return t.slice(1);const u=i===""?[]:i.split("/");for(const o of t.split("/"))o===""||o==="."||(o===".."?u.pop():u.push(o));return u.join("/")}const re={left:0,top:0,width:0,height:0},U=()=>Array.from({length:9},()=>({...te,font:{...te.font},margin_left:0}));export function levelsOver(i,...t){return i.map((u,o)=>{let r={...u,font:{...u.font}};for(const y of t){const l=y?.[o];l&&(r={...r,...l.alignment===void 0?{}:{alignment:l.alignment},...l.line_spacing===void 0?{}:{line_spacing:l.line_spacing},...l.space_before===void 0?{}:{space_before:l.space_before},...l.space_after===void 0?{}:{space_after:l.space_after},...l.margin_left===void 0?{}:{margin_left:l.margin_left},...l.indent===void 0?{}:{indent:l.indent},font:{...r.font,...l.font}},l.numbered!==void 0&&(r.numbered=l.numbered,delete r.bullet),l.bullet===null?(delete r.bullet,delete r.numbered):l.bullet!==void 0?(delete r.numbered,r.bullet={char:l.bullet,...l.bullet_font===void 0?{}:{font:l.bullet_font}}):l.bullet_font!==void 0&&r.bullet&&(r.bullet={...r.bullet,font:l.bullet_font}))}return r})}function I(i,...t){const u=t.filter(r=>r!==void 0),o=r=>{for(let y=u.length-1;y>=0;y--){const l=u[y]?.[r];if(l!==void 0)return l}};return{vertical_anchor:o("vertical_anchor")??i.vertical_anchor,auto_size:o("auto_size")??i.auto_size,word_wrap:o("word_wrap")??i.word_wrap,margins:{left:o("margin_left")??W.left,top:o("margin_top")??W.top,right:o("margin_right")??W.right,bottom:o("margin_bottom")??W.bottom}}}const oe={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=i=>levelsOver(U(),i.text_styles.other);function V(i,t){return{...I(oe,t),levels:levelsOver(U(),i.text_styles.other,t.levels)}}function Te(i,t,...u){return{...I($e(t),...u),levels:levelsOver(U(),i.text_styles[xe(t)],...u.map(o=>o?.levels))}}const Ee=Array.from({length:9},()=>({font:{color:C.font_color}})),ae={vertical_anchor:C.vertical_anchor};function le(i,t){return{...I(oe,t),levels:levelsOver(U(),i.text_styles.other,Ee,t.levels)}}const X=i=>{const t={...i};return delete t.paragraphs,t},G=i=>({paragraphs:[],levels:[],...i}),z=i=>i==="none"?null:colorOfFile(i),je=/<span((?:\s+(?:color|font|size|bold|italic|underline|link|highlight|baseline|strike)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,Fe=/(color|font|size|bold|italic|underline|link|highlight|baseline|strike)="([^"\n]*)"/gu,K=57344,Ne=256,de="",ze=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=i=>Q(i)??"dk1";function Z(i){const{shadow:t,gradient:u}=i;return{...i.fill_transparency===void 0?{}:{fill_transparency:i.fill_transparency},...u?{gradient:{angle:u.angle??0,stops:u.stops.map(o=>({at:o.at,color:colorOfFile(o.color),...o.transparency===void 0?{}:{transparency:o.transparency}}))}}:{},...t?{shadow:{color:t.color===void 0?H.color:colorOfFile(t.color),blur:t.blur===void 0?H.blur:S(t.blur),distance:t.distance===void 0?H.distance:S(t.distance),angle:t.angle??H.angle,transparency:t.transparency??H.transparency}}:{}}}function se(i,t,u=[]){return{...i,rows:i.rows.map((o,r)=>({height:o.height,cells:o.cells.map(y=>{const l=u[r];return{...y,text:{paragraphs:y.text.paragraphs,style:B({...V(t,y.text),auto_size:"shape"},l),own:X(y.text),empty:!1},...l?{fileText:l}:{}}})}))}}function B(i,t){return t?{...i,...t.anchor===void 0?{}:{vertical_anchor:t.anchor},levels:i.levels.map(u=>{const o={...u.font,...t.size===void 0?{}:{size:S(t.size)},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.underline===void 0?{}:{underline:t.underline},...t.strike===void 0?{}:{strike:t.strike},...t.font===void 0?{}:{name:t.font}};t.color!==void 0&&(o.color=colorOfFile(t.color));const r={...u,font:o,...t.align===void 0?{}:{alignment:t.align},...t.line_spacing===void 0?{}:{line_spacing:{lines:t.line_spacing}},...t.space_before===void 0?{}:{space_before:S(t.space_before)},...t.space_after===void 0?{}:{space_after:S(t.space_after)}};return t.numbered!==void 0?(r.numbered=t.numbered,delete r.bullet):t.bullet===!1?(delete r.bullet,delete r.numbered):t.bullet!==void 0&&(r.bullet={char:t.bullet},delete r.numbered),(t.numbered!==void 0||t.bullet!==void 0&&t.bullet!==!1)&&u.margin_left===0?{...r,margin_left:fe,indent:-fe}:r})}:i}function Me(i,t){if(!t)return[...i];const u=t.numbered!==void 0||t.bullet!==void 0;return i.map(o=>{const r={...o};return t.align!==void 0&&delete r.alignment,t.line_spacing!==void 0&&delete r.line_spacing,t.space_before!==void 0&&delete r.space_before,t.space_after!==void 0&&delete r.space_after,u&&(delete r.bullet,delete r.bullet_font,delete r.numbered),r})}function Ce(i){const t={};for(const[,u,o=""]of i.matchAll(Fe))if(u==="font")t.name=o.trim();else if(u==="link")t.link=o.trim();else if(u==="highlight")t.highlight=o.trim().toUpperCase();else if(u==="bold")t.bold=o.trim()!=="false";else if(u==="italic")t.italic=o.trim()!=="false";else if(u==="strike")t.strike=o.trim()!=="false";else if(u==="underline")t.underline=o.trim()!=="false";else if(u==="size"){const r=Number(o);Number.isFinite(r)&&r>0&&(t.size=S(r))}else if(u==="baseline"){const r=Number(o);Number.isFinite(r)&&(t.baseline=r)}else{const r=Q(o.trim());r!==void 0&&(t.color=r)}return t}const fe=342900;export function paragraphsOfWords(i,t=0,u=Se.code){return i===void 0?[]:typeof i=="string"?i.split(/\r?\n/u).map(o=>{const r=[],y=o.replace(je,(T,N,P)=>(r.push(Ce(N)),`${String.fromCharCode(K+r.length-1)}${P}${de}`)),l=ge(y);let F;const M=_e(l.text,l.marks).flatMap(T=>{const N=T.kinds.includes("code"),P={...T.kinds.includes("strong")?{bold:!0}:{},...T.kinds.includes("em")?{italic:!0}:{},...N?{name:u}:{}};return[...T.text.matchAll(ze)].flatMap(Y=>{const L=Y[0],R=L.charCodeAt(0);if(L===de)return F=void 0,[];if(R>=K&&R<K+Ne)return F=r[R-K],[];const D={...F,...P};return[{text:L,...Object.keys(D).length>0?{font:D}:{},...N?{code:!0}:{}}]})});return{runs:M.length>0?M:[{text:""}],level:t}}):i.flatMap(o=>paragraphsOfWords(o,Array.isArray(o)?Math.min(t+1,8):t,u))}const ue=i=>({left:S(i.x),top:S(i.y),width:S(i.w),height:S(i.h)}),Pe=new Set(["dt","ftr","sldNum"]),ce=i=>({...i.locked?{locked:!0}:{},...i.rotation===void 0||i.rotation===0?{}:{rotation:i.rotation},...i.flip_h||i.flip_v?{flip:{...i.flip_h?{h:!0}:{},...i.flip_v?{v:!0}:{}}}:{}});function pe(i,t,u){if(!t)return;t.fill!==void 0&&(i.background=colorOfFile(t.fill));const o=t.gradient&&Z({gradient:t.gradient}).gradient;o&&(i.background_gradient=o),t.picture!==void 0&&(i.background_picture=joinPath(u,t.picture))}const he=i=>i===void 0?void 0:{left:i.left??0,top:i.top??0,right:i.right??0,bottom:i.bottom??0};export function resolveDeck(i){const{code:t,file:u,words:o,prefix:r,base:y}=i,l=[],F=Oe(i.theme??Ae,t.theme),M=new Map;for(const e of t.masters)for(const n of e.layouts)M.set(n.name,{layout:n,master:e});const T=[],N=(e,n,a)=>({name:e.name,kind:e.kind,frame:{...e.frame??re},...e.flip?{flip:{...e.flip}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?le(a,e.text):V(a,e.text),own:X(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.fill_transparency===void 0?{}:{fill_transparency:e.fill_transparency},...e.gradient?{gradient:e.gradient}:{},...e.shadow?{shadow:e.shadow}:{},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.path?{path:e.path}:{},...e.table?{table:se(e.table,a)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),P=(e,n)=>{const a=e.placeholder?.type??"body",g=ve(n,a),_=e.frame??g?.frame??re;return{name:e.name,kind:"placeholder",frame:{..._},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:Te(n,a,g?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!g?"layout":"master"},text:{from:"layout"}}}},Y=(e,n,a)=>{const g=t.components[e];if(!g){l.push({...a,message:`There is no component ${e} in slides.ts (it has ${Object.keys(t.components).join(", ")||"none"}).`});return}for(const _ of Object.keys(n??{}))Object.hasOwn(g.props,_)||l.push({...a,message:`Component ${e} has no prop ${_} a person sets (it has ${Object.keys(g.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}}}},L=(e,n,a,g,_)=>{const $={slide:g,shape:e,path:a};if(!n.frame){l.push({...$,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const w=ue(n.frame),d={frame:{from:"slide",path:`${a}.frame`}},b={name:e,frame:w,level:"slide",...n.fill===void 0?{}:{fill:z(n.fill)},...Z(n),...n.line===void 0?{}:{line:z(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.group===void 0?{}:{group:n.group},...ce(n)};if(n.textbox)return{...b,kind:"textbox",text:{paragraphs:paragraphsOfWords(o(`${r}.${g}.${e}`),0,F.fonts.code),style:B(V(_,G(ne)),n.text),own:X(G(ne)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...d,text:{from:"slide",path:`${a}.text`}}};if(n.picture!==void 0){const s=he(n.crop);return{...b,kind:"picture",media:{path:joinPath(y,n.picture),...s?{crop:s}:{}},sources:{...d,media:{from:"slide",path:`${a}.picture`}}}}if(n.movie!==void 0)return{...b,kind:"movie",media:{path:joinPath(y,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:{...d,media:{from:"slide",path:`${a}.movie`}}};if(n.chart){const s=o(`${r}.${g}.${e}`),k=be(n.chart,{title:typeof s=="string"?s:void 0,base:y,rows:m=>i.data?.(m),problem:m=>{l.push({...$,message:`Chart ${e}: ${m}`})}});return k?{...b,kind:"chart",chart:k,sources:d}:void 0}if(n.table){const s=n.table,k=w.width/s.columns.reduce((f,c)=>f+c,0),m=w.height/s.rows.reduce((f,c)=>f+c.height,0),x=o(`${r}.${g}.${e}`),O=Array.isArray(x)?x:[];return O.length>s.rows.length&&l.push({...$,message:`Table ${e} has ${String(s.rows.length)} rows and its words ${String(O.length)}.`}),{...b,kind:"table",table:se({columns:s.columns.map(f=>Math.round(f*k)),rows:s.rows.map((f,c)=>{const p=O[c],v=Array.isArray(p)?p:p===void 0?[]:[p];return{height:Math.round(f.height*m),cells:s.columns.map((E,A)=>({text:{levels:[],paragraphs:paragraphsOfWords(v[A],0,F.fonts.code)},...f.fill===void 0?{}:{fill:colorOfFile(f.fill)},...f.line===void 0?{}:{borders:{bottom:{color:colorOfFile(f.line),width:S(1)}}}}))}})},_,s.rows.map(f=>f.text)),sources:d}}const h=n.path&&ke(n.path.d);if(n.path&&!h){l.push({...$,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&h){const s=!n.path&&ye(n.geometry);return{...b,kind:"autoshape",...n.path&&h?{path:{w:n.path.w,h:n.path.h,steps:h}}:n.geometry===void 0?{}:{geometry:n.geometry,...n.adjustments?{adjustments:[...n.adjustments]}:{}},...s?{line:n.line===void 0?ee.line:z(n.line),line_width:n.line_width===void 0?ee.line_width:S(n.line_width)}:{fill:n.fill===void 0?C.fill:z(n.fill),line:n.line===void 0?C.line:z(n.line),line_width:n.line_width===void 0?C.line_width:S(n.line_width)},...n.text&&!s?{fileText:{...n.text}}:{},...s?{}:{text:{paragraphs:paragraphsOfWords(o(`${r}.${g}.${e}`)).map(k=>n.text?.align===void 0?{alignment:C.alignment,...k}:k),style:B(le(_,G(ae)),n.text),own:X(G(ae)),empty:!1}},sources:{...d,fill:{from:"slide",path:`${a}.fill`}}}}if(n.component!==void 0){const s=Y(n.component,n.props,$);return s?{...b,kind:"component",component:s,sources:d}:void 0}},R=(e,n,a)=>{if(n.frame&&(e.frame=ue(n.frame),e.sources.frame={from:"slide",path:`${a}.frame`}),Object.assign(e,ce(n)),n.text&&e.text&&(e.text.style=B(e.text.style,n.text),e.text.paragraphs=Me(e.text.paragraphs,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${a}.text`}),n.line!==void 0&&(e.line=z(n.line),e.sources.line={from:"slide",path:`${a}.line`}),n.line_width!==void 0&&(e.line_width=S(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.fill!==void 0&&(e.fill=z(n.fill),e.sources.fill={from:"slide",path:`${a}.fill`}),Object.assign(e,Z(n)),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const g=he(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath(y,n.picture??n.movie??""),...g?{crop:g}:{},...n.poster===void 0?{}:{poster:n.poster}},e.sources.media={from:"slide",path:`${a}.${n.picture!==void 0?"picture":"movie"}`},delete e.text}},D=(e,n,a,g,_)=>{const $=M.get(n);if(!$){l.push({slide:e,path:`slides.${String(a)}.layout`,message:`Slide ${e} is on the layout "${n}", which slides.ts does not have (it has ${[...M.keys()].join(", ")||"none"}).`});return}const{layout:w,master:d}=$,b=[...(w.display_master_shapes===!1?[]:d.shapes).filter(s=>s.kind!=="placeholder").map(s=>N(s,"master",d)),...w.shapes.filter(s=>s.kind!=="placeholder").map(s=>N(s,"layout",d))],h=w.shapes.filter(s=>s.kind==="placeholder").map((s,k)=>({shape:P(s,d),order:k}));return{slide:{id:e,layout:w.name,master:d.name,hidden:g,background:w.background??d.background,shapes:b,animations:[],file:{index:a,..._===void 0?{}:{generate:_}}},placed:h,master:d}},q=(e,n,a,g,_,$,w,d,b,h=()=>{})=>{const s=new Set(a.map(f=>f.shape.name));let k=a.length;for(const[f,c]of Object.entries(g??{})){const p=$(f);if(p===void 0)continue;const v=`${_}.shapes.${f}`,E=c.textbox!==void 0||c.geometry!==void 0||c.path!==void 0||c.table!==void 0||c.chart!==void 0||c.component!==void 0||(c.picture!==void 0||c.movie!==void 0)&&!s.has(p),A=a.find(me=>me.shape.name===p);if(A&&!E){R(A.shape,c,v),A.shown=!0,c.z!==void 0&&(A.z=c.z);continue}if(A){l.push({slide:e.id,shape:p,path:v,message:`Slide ${e.id} has a ${A.shape.kind} ${p} already: a shape of its own needs another name.`});continue}if(!E){l.push({slide:e.id,shape:p,path:v,message:`Slide ${e.id} has no shape ${p} to change (its layout's placeholders and its own shapes are ${[...s].join(", ")||"none"}).`});continue}const j=L(p,c,v,e.id,n);j&&(a.push({shape:j,order:k++,...c.z===void 0?{}:{z:c.z}}),s.add(p))}const m=a.filter(f=>f.shown===!0||!Pe.has(f.shape.placeholder?.type??"")||w(f.shape)!==void 0);a.splice(0,a.length,...m),a.sort((f,c)=>(f.z??0)-(c.z??0)||f.order-c.order);const x=new Map(a.flatMap((f,c)=>f.shape.group===void 0?[]:[[f.shape.group,c]])),O=a.flatMap((f,c)=>{const p=f.shape.group;return p===void 0?[f]:x.get(p)===c?a.filter(v=>v.shape.group===p):[]});a.splice(0,a.length,...O);for(const f of a){const c=h(f.shape);c!==void 0&&(f.shape.alt=c);const p=f.shape.text;if(f.shape.kind==="placeholder"&&p){const v=w(f.shape);p.paragraphs=paragraphsOfWords(v,0,F.fonts.code),p.empty=p.paragraphs.length===0||p.paragraphs.every(E=>E.runs.every(A=>A.text===""))}}e.shapes.push(...a.map(f=>f.shape)),d!==void 0&&d.trim()!==""&&(e.notes=d);for(const[f,c]of(b??[]).entries()){const p=$(c.shape);if(p===void 0)continue;const v={slide:e.id,shape:p,path:`${_}.animations.${String(f)}`},E=e.shapes.find(j=>j.name===p&&j.level==="slide");if(!E){l.push({...v,message:`Slide ${e.id} has no shape ${p} to animate (it has ${e.shapes.filter(j=>j.level==="slide").map(j=>j.name).join(", ")}).`});continue}if(c.paragraph!==void 0&&c.paragraph>=(E.text?.paragraphs.length??0)){l.push({...v,message:`Shape ${p} has no paragraph ${String(c.paragraph)} to animate (it has ${String(E.text?.paragraphs.length??0)}).`});continue}const A=we({...c,shape:p});A?e.animations.push(A):l.push({...v,message:`The animation of ${p} needs a path that starts with M and says only M, L and C, absolute.`})}},J=new Set;return u.slides.forEach((e,n)=>{const a=`slides.${String(n)}`;if(e.layout!==void 0){const d=D(e.id,e.layout,n,e.hidden===!0);if(!d)return;const b=o(`${r}.${e.id}.notes`);e.transition&&(d.slide.transition=ie(e.transition)),e.advance_after!==void 0&&(d.slide.advance=e.advance_after),pe(d.slide,e.background,y),q(d.slide,d.master,d.placed,e.shapes,a,h=>h,h=>o(`${r}.${e.id}.${h.name}`),typeof b=="string"?b:void 0,e.animations,h=>{const s=o(`${r}.${e.id}.alt.${h.name}`);return typeof s=="string"?s:void 0}),T.push(d.slide),J.add(e.id);return}const g=e.generate??"",_=t.generators[g];if(_===void 0){l.push({slide:e.id,path:`${a}.generate`,message:`There is no generator ${g} in slides.ts (it has ${Object.keys(t.generators).join(", ")||"none"}).`});return}if(!Array.isArray(_)){l.push({slide:e.id,path:`${a}.generate`,message:`Generator ${g} threw: ${_.error}`,..._.stack===void 0?{}:{stack:_.stack}});return}const $=_,w=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const d of $){const b=`${e.id}/${d.id}`,h=D(b,d.layout,n,w.has(d.id),g);if(!h)continue;for(const m of d.shapes){const x=m.placeholder?h.placed.find(O=>O.shape.placeholder?.idx===m.placeholder?.idx):void 0;if(x)m.frame&&(x.shape.frame={...m.frame}),x.shape.sources.frame={from:"code"},x.shown=!0;else{const O=N(m,"layout",h.master);h.placed.push({shape:{...O,level:"slide",sources:{frame:{from:"code"}}},order:h.placed.length})}}const s=`${d.id}/`,k=d.transition??(d===$[0]?e.transition:void 0);pe(h.slide,e.background,y),k&&(h.slide.transition=ie(k)),q(h.slide,h.master,h.placed,e.shapes,a,m=>m.startsWith(s)?m.slice(s.length):void 0,m=>{const x=m.placeholder===void 0?void 0:d.text[m.placeholder.idx];return x===void 0?void 0:x.map(O=>O.runs.map(f=>f.text).join(""))},d.notes,[...(d.animations??[]).map(m=>({...m,shape:`${s}${m.shape}`})),...e.animations??[]]);for(const m of h.slide.shapes){const x=m.placeholder===void 0?void 0:d.text[m.placeholder.idx];x&&m.text&&(m.text.paragraphs=x,m.text.empty=!1)}T.push(h.slide),J.add(b)}for(const d of Object.keys(e.shapes??{})){const[b]=d.split("/");b!==void 0&&!$.some(h=>h.id===b)&&l.push({slide:e.id,path:`${a}.shapes.${d}`,message:`Generator ${g} makes no slide ${b}: ${d} changes nothing.`})}}),T.forEach((e,n)=>{for(const a of e.shapes)a.placeholder?.type==="sldNum"&&a.text&&(a.text.paragraphs=[{level:0,runs:[{text:String(n+1),field:"slidenum"}]}],a.text.empty=!1)}),{deck:{width:t.slide_width,height:t.slide_height,theme:F,slides:T},problems:l}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ScriptFile, type ScriptText } from "@allyhub-next/formats";
|
|
2
|
+
import { type Document } from "yaml";
|
|
3
|
+
import type { Words } from "./resolve.js";
|
|
2
4
|
/** A slide's speaker notes: a line, or a plural. */
|
|
3
5
|
type Notes = NonNullable<ScriptFile["slides"][number]["notes"]>;
|
|
4
6
|
export type DeckScriptEdit =
|
|
@@ -8,6 +10,13 @@ export type DeckScriptEdit =
|
|
|
8
10
|
slide: string;
|
|
9
11
|
shape: string;
|
|
10
12
|
words: ScriptText | undefined;
|
|
13
|
+
}
|
|
14
|
+
/** A picture's or a shape's alternative text (`p:cNvPr/@descr`); undefined takes it away. */
|
|
15
|
+
| {
|
|
16
|
+
op: "alt";
|
|
17
|
+
slide: string;
|
|
18
|
+
shape: string;
|
|
19
|
+
alt: string | undefined;
|
|
11
20
|
} | {
|
|
12
21
|
op: "notes";
|
|
13
22
|
slide: string;
|
|
@@ -18,26 +27,19 @@ export type DeckScriptEdit =
|
|
|
18
27
|
op: "remove";
|
|
19
28
|
slide: string;
|
|
20
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* A script's words of a key, as resolveDeck asks them
|
|
32
|
+
* (`<prefix>.<slide>.<shape>`, or `.notes`): what the editor and a
|
|
33
|
+
* snapshot's recorder resolve a deck's slides with.
|
|
34
|
+
*/
|
|
35
|
+
export declare function scriptWords(script: ScriptFile, prefix: string): (key: string) => Words;
|
|
21
36
|
/** A script's text read; undefined when it is not a script. */
|
|
22
37
|
export declare function readScript(text: string): ScriptFile | undefined;
|
|
23
38
|
/** The script's text after an edit. */
|
|
24
39
|
export declare function editDeckScript(text: string | undefined, edit: DeckScriptEdit): string;
|
|
25
|
-
/**
|
|
40
|
+
/** An edit made on the script's parsed document, in place: only the nodes it changes are touched. */
|
|
41
|
+
export declare function editDeckScriptDocument(doc: Document, edit: DeckScriptEdit): void;
|
|
42
|
+
/** What `b` changes of `a`'s slides' words, alternative text and notes, as edits. */
|
|
26
43
|
export declare function deckScriptEdits(a: ScriptFile, b: ScriptFile): DeckScriptEdit[];
|
|
27
|
-
/** Where a person's words met another hand's: the person's stand. */
|
|
28
|
-
export interface DeckScriptConflict {
|
|
29
|
-
slide: string;
|
|
30
|
-
/** The shape whose words both changed; absent for the notes. */
|
|
31
|
-
shape?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A person's script (`mine`, made from `base`) merged into the script as
|
|
35
|
-
* another hand left it (`theirs`), as mergeSlides merges slides.yaml.
|
|
36
|
-
* Undefined when theirs is not a script.
|
|
37
|
-
*/
|
|
38
|
-
export declare function mergeDeckScript(base: string, mine: ScriptFile, theirs: string): {
|
|
39
|
-
text: string;
|
|
40
|
-
conflicts: DeckScriptConflict[];
|
|
41
|
-
} | undefined;
|
|
42
44
|
export {};
|
|
43
45
|
//# sourceMappingURL=script.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readDataFile as
|
|
3
|
-
`:
|
|
2
|
+
import{readDataFile as S}from"@allyhub-next/formats";import{isCollection as m,isMap as c,isSeq as w,parseDocument as g}from"yaml";export function scriptWords(s,e){const n=new Map(s.slides.map(r=>[r.id,r]));return r=>{if(!r.startsWith(`${e}.`))return;const f=r.slice(e.length+1),t=f.lastIndexOf(".");if(t<0)return;const o=n.get(f.slice(0,t)),l=f.slice(t+1);return l==="notes"?typeof o?.notes=="string"?o.notes:void 0:o?.text?.[l]}}export function readScript(s){const e=g(s);if(e.errors.length>0)return;const n=S("script",e.toJS()??{});return n.ok?n.value:void 0}function k(s){let e=s.get("slides",!0);if(w(e)||(c(s.contents)?s.set("slides",s.createNode([])):s.contents=s.createNode({slides:[]}),e=s.get("slides",!0)),!w(e))throw new Error("The script has no slides list.");return e.flow===!0&&(e.flow=!1),e}function x(s,e){!m(s)||!m(e)||(e.flow===!0&&(s.flow=!0),s.items.forEach((n,r)=>{x(n,e.items[r])}))}export function editDeckScript(s,e){const n=g(s===void 0||s.trim()===""?`slides: []
|
|
3
|
+
`:s);if(n.errors.length>0)throw new Error("The script is not YAML: it is mended by hand first.");return editDeckScriptDocument(n,e),n.toString()}export function editDeckScriptDocument(s,e){const n=k(s),r=n.items.findIndex(o=>c(o)&&o.get("id")===e.slide);if(e.op==="remove"){r>=0&&n.items.splice(r,1);return}const f=e.op==="text"?e.words===void 0:e.op==="alt"?e.alt===void 0:e.notes===void 0;if(r<0&&f)return;let t=n.items[r];if(c(t)||(n.items.push(s.createNode({id:e.slide})),t=n.items.at(-1)),!!c(t)){if(e.op==="notes")e.notes===void 0?t.delete("notes"):t.set("notes",s.createNode(e.notes));else if(e.op==="alt")if(e.alt===void 0){t.deleteIn(["alt",e.shape]);const o=t.get("alt",!0);c(o)&&o.items.length===0&&t.delete("alt")}else t.setIn(["alt",e.shape],e.alt);else if(e.words===void 0){t.deleteIn(["text",e.shape]);const o=t.get("text",!0);c(o)&&o.items.length===0&&t.delete("text")}else{const o=s.createNode(e.words);x(o,t.getIn(["text",e.shape],!0)),t.setIn(["text",e.shape],o)}t.items.length===1&&n.items.splice(n.items.indexOf(t),1)}}const a=s=>JSON.stringify(s);export function deckScriptEdits(s,e){const n=[],r=new Map(s.slides.map(t=>[t.id,t])),f=new Map(e.slides.map(t=>[t.id,t]));for(const t of r.keys())f.has(t)||n.push({op:"remove",slide:t});for(const[t,o]of f){const l=r.get(t),p=l?.text??{},u=o.text??{};for(const i of new Set([...Object.keys(p),...Object.keys(u)]))a(p[i])!==a(u[i])&&n.push({op:"text",slide:t,shape:i,words:u[i]});const h=l?.alt??{},d=o.alt??{};for(const i of new Set([...Object.keys(h),...Object.keys(d)]))h[i]!==d[i]&&n.push({op:"alt",slide:t,shape:i,alt:d[i]});a(l?.notes)!==a(o.notes)&&n.push({op:"notes",slide:t,notes:o.notes})}return n}
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { DeckCode } from "./code.js";
|
|
2
|
+
import type { ResolvedDeck } from "./resolve.js";
|
|
3
|
+
import type { Theme } from "./theme.js";
|
|
4
|
+
/** A component drawn alone, on a transparent page of its frame's size. */
|
|
5
|
+
export interface ComponentAt {
|
|
6
|
+
name: string;
|
|
7
|
+
props: Record<string, unknown>;
|
|
8
|
+
/** Its frame, in the stage's pixels. */
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
/** Seconds since it came on: what moves in it has settled by its slide's still. */
|
|
12
|
+
t: number;
|
|
6
13
|
}
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
/** The editor to a frame. */
|
|
15
|
+
export type DeckHostCommand =
|
|
16
|
+
/** The code host: the deck's code as data (asked any time after the frame is made). */
|
|
9
17
|
{
|
|
10
|
-
type: "deck-
|
|
11
|
-
shape: string;
|
|
12
|
-
frame: Frame | null;
|
|
18
|
+
type: "deck-code";
|
|
13
19
|
}
|
|
14
|
-
/**
|
|
20
|
+
/** A component frame: draw this (asked any time after the frame is made; each draw replaces the last). */
|
|
21
|
+
| ({
|
|
22
|
+
type: "component";
|
|
23
|
+
} & ComponentAt)
|
|
24
|
+
/** The player: the deck as the editor resolved it now, for the same code; media it shows that the stage was not given, by project path. */
|
|
15
25
|
| {
|
|
16
|
-
type: "deck-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
/** The word at the point selected, as a double click does. */
|
|
23
|
-
word?: boolean;
|
|
24
|
-
/** Words typed on arrival, past what it says: the key that started it. */
|
|
25
|
-
text?: string;
|
|
26
|
-
cell?: readonly [row: number, col: number];
|
|
27
|
-
}
|
|
28
|
-
/** Typing goes on though the focus leaves: the editor's bar is about to act on the selected words. */
|
|
29
|
-
| {
|
|
30
|
-
type: "deck-hold";
|
|
31
|
-
}
|
|
32
|
-
/** The selected words made bold or not, or a colour (a theme colour or `#RRGGBB`). */
|
|
33
|
-
| {
|
|
34
|
-
type: "deck-format";
|
|
35
|
-
bold?: boolean;
|
|
36
|
-
italic?: boolean;
|
|
37
|
-
color?: string;
|
|
38
|
-
}
|
|
39
|
-
/** Stop typing. */
|
|
40
|
-
| {
|
|
41
|
-
type: "deck-stop";
|
|
26
|
+
type: "deck-update";
|
|
27
|
+
deck: ResolvedDeck;
|
|
28
|
+
media?: Record<string, {
|
|
29
|
+
url: string;
|
|
30
|
+
duration?: number;
|
|
31
|
+
}>;
|
|
42
32
|
};
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
/** A frame to the editor. */
|
|
34
|
+
export type DeckHostMessage =
|
|
35
|
+
/**
|
|
36
|
+
* The deck's code as data, and the theme under the deck's own that the
|
|
37
|
+
* stage resolves it with (the project's look): resolveDeck's `code` and
|
|
38
|
+
* `theme`. Said once unasked as soon as it is run, and to each ask.
|
|
39
|
+
*/
|
|
45
40
|
{
|
|
46
|
-
type: "deck-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
bold: boolean;
|
|
50
|
-
italic: boolean;
|
|
41
|
+
type: "deck-code";
|
|
42
|
+
code: DeckCode;
|
|
43
|
+
theme: Theme;
|
|
51
44
|
} | {
|
|
52
|
-
type: "
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
type: "component-ready";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The player drew the update in place: the slides it drew again.
|
|
49
|
+
* `reload`: the slides' timing changed (an animation, a transition, a
|
|
50
|
+
* movie, a slide added or moved), which a player cannot take in place:
|
|
51
|
+
* the editor loads a new stage.
|
|
52
|
+
*/
|
|
53
|
+
| {
|
|
54
|
+
type: "deck-updated";
|
|
55
|
+
redrawn: string[];
|
|
56
|
+
reload?: true;
|
|
57
57
|
} | {
|
|
58
|
-
type: "
|
|
59
|
-
|
|
60
|
-
paragraphs: TypedParagraph[];
|
|
61
|
-
cell?: readonly [row: number, col: number];
|
|
58
|
+
type: "error";
|
|
59
|
+
message: string;
|
|
62
60
|
};
|
|
63
61
|
//# sourceMappingURL=stage.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{closest as e,publicNames as
|
|
2
|
+
import{closest as e,publicNames as o,strict as c,strictEnum as n}from"@allyhub-next/formats";import{held as l}from"./units.js";const r="allyhub slides capabilities lists what of python-pptx the API holds and where it differs.";export{e as closest,o as publicNames};export function strict(t,i,s={}){return c(t,i,r,{value:l,...s})}export function strictEnum(t,i){return n(t,i,r)}
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
export type Length = number;
|
|
2
|
+
/** What python-pptx's `Length` says of itself. */
|
|
3
|
+
export interface LengthUnits {
|
|
4
|
+
readonly emu: number;
|
|
5
|
+
readonly inches: number;
|
|
6
|
+
readonly cm: number;
|
|
7
|
+
readonly mm: number;
|
|
8
|
+
readonly pt: number;
|
|
9
|
+
readonly centipoints: number;
|
|
10
|
+
readonly twips: number;
|
|
11
|
+
}
|
|
12
|
+
/** python-pptx's `Length`: a number of EMU, in other units too. */
|
|
13
|
+
export type LengthValue = Length & LengthUnits;
|
|
14
|
+
/** A number of EMU as python-pptx's Length. */
|
|
15
|
+
export declare function length(emu: number): LengthValue;
|
|
16
|
+
/** A Length, or nothing. */
|
|
17
|
+
export declare const lengthOr: (emu: number | undefined) => LengthValue | undefined;
|
|
18
|
+
/** What the API is given, as it holds it: a Length as its number, a String (`new RGBColor(…)`) as its text; anything else as it is. */
|
|
19
|
+
export declare const held: (v: unknown) => unknown;
|
|
20
|
+
/** python-pptx's length functions as a deck's code has them: each gives a Length. */
|
|
21
|
+
export declare const LENGTH_UNITS: {
|
|
22
|
+
Emu: (n: number) => LengthValue;
|
|
23
|
+
Inches: (n: number) => LengthValue;
|
|
24
|
+
Pt: (n: number) => LengthValue;
|
|
25
|
+
Cm: (n: number) => LengthValue;
|
|
26
|
+
Mm: (n: number) => LengthValue;
|
|
27
|
+
Centipoints: (n: number) => LengthValue;
|
|
28
|
+
};
|
|
2
29
|
export declare const EMU_PER_INCH = 914400;
|
|
3
30
|
export declare const EMU_PER_PT = 12700;
|
|
4
31
|
export declare const EMU_PER_CM = 360000;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export const EMU_PER_INCH=914400,EMU_PER_PT=12700,EMU_PER_CM=36e4,EMU_PER_MM=36e3,EMU_PER_CENTIPOINT=127,Emu=t=>Math.trunc(t),Inches=t=>Math.trunc(t*
|
|
2
|
+
class o extends Number{get emu(){return this.valueOf()}get inches(){return this.valueOf()/EMU_PER_INCH}get cm(){return this.valueOf()/EMU_PER_CM}get mm(){return this.valueOf()/EMU_PER_MM}get pt(){return this.valueOf()/EMU_PER_PT}get centipoints(){return Math.trunc(this.valueOf()/EMU_PER_CENTIPOINT)}get twips(){return Math.trunc(this.valueOf()/(EMU_PER_PT/20))}}const r=new Map;export function length(t){const n=Math.trunc(t);let e=r.get(n);return e||(e=new o(n),r.set(n,e)),e}export const lengthOr=t=>t===void 0?void 0:length(t),held=t=>t instanceof Number||t instanceof String?t.valueOf():t,LENGTH_UNITS={Emu:t=>length(t),Inches:t=>length(t*EMU_PER_INCH),Pt:t=>length(t*EMU_PER_PT),Cm:t=>length(t*EMU_PER_CM),Mm:t=>length(t*EMU_PER_MM),Centipoints:t=>length(t*EMU_PER_CENTIPOINT)},EMU_PER_INCH=914400,EMU_PER_PT=12700,EMU_PER_CM=36e4,EMU_PER_MM=36e3,EMU_PER_CENTIPOINT=127,Emu=t=>Math.trunc(t),Inches=t=>Math.trunc(t*EMU_PER_INCH),Pt=t=>Math.trunc(t*EMU_PER_PT),Cm=t=>Math.trunc(t*EMU_PER_CM),Mm=t=>Math.trunc(t*EMU_PER_MM),Centipoints=t=>Math.trunc(t*EMU_PER_CENTIPOINT),toPt=t=>Math.round(t/EMU_PER_PT*100)/100,SLIDE_SIZES={"16:9":[Emu(12192e3),Emu(6858e3)],"16:10":[Emu(9144e3),Emu(5715e3)],"4:3":[Emu(9144e3),Emu(6858e3)],a4:[Mm(297),Mm(210)],"a4-portrait":[Mm(210),Mm(297)],letter:[Inches(11),Inches(8.5)],"letter-portrait":[Inches(8.5),Inches(11)],"1:1":[Emu(6858e3),Emu(6858e3)],"4:5":[Emu(6858e3),Emu(8572500)],"9:16":[Emu(6858e3),Emu(12192e3)]};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const isRecord: (v: unknown) => v is Record<string, unknown>;
|
|
2
|
+
/** A value's JSON, its keys in order: two values are the same when theirs are. */
|
|
3
|
+
export declare const valueKey: (v: unknown) => string;
|
|
4
|
+
export declare const sameValue: (a: unknown, b: unknown) => boolean;
|
|
5
|
+
/** The pairs of places, `a`'s and `b`'s, where the two hold the same key: a longest common subsequence, in order. */
|
|
6
|
+
export declare function commonPairs(a: readonly string[], b: readonly string[]): [number, number][];
|
|
7
|
+
//# sourceMappingURL=values.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{diffArrays as f}from"diff";export const isRecord=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);const n=e=>Array.isArray(e)?e.map(n):isRecord(e)?Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0).sort(([o],[r])=>o<r?-1:o>r?1:0).map(([o,r])=>[o,n(r)])):e;export const valueKey=e=>e===void 0?"":JSON.stringify(n(e)),sameValue=(e,o)=>valueKey(e)===valueKey(o);export function commonPairs(e,o){const r=[];let s=0,c=0;for(const t of f([...e],[...o]))if(t.added)c+=t.count;else if(t.removed)s+=t.count;else for(let i=0;i<t.count;i++)r.push([s++,c++]);return r}
|