@allyhub/sdk 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{node_modules → dist/node_modules}/@allyhub-next/audio/package.json +1 -1
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +3 -0
- package/{node_modules/@allyhub-next/slides-core → dist/node_modules/@allyhub-next/chart}/dist/chart.d.ts +26 -15
- package/dist/node_modules/@allyhub-next/chart/dist/chart.js +2 -0
- package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/chart/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/chart/package.json +14 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/reference.d.ts +0 -86
- package/dist/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +5087 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/slides.d.ts +306 -11
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/items.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +2278 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/formats/package.json +1 -1
- package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/editor.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/notes.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/tools.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/protocol/package.json +1 -1
- package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/lock.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/runtimes.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +4 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/package.json +1 -1
- package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.d.ts +7 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/phone.d.ts +3 -1
- package/dist/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/address.d.ts +32 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/address.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.d.ts +204 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/code.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/code.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +8 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.d.ts +170 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.d.ts +117 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +362 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/arrange.d.ts +68 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/arrange.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +21 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +152 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +69 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.d.ts +29 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +50 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.d.ts +58 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/check.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/check.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/csv.d.ts +62 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/csv.js +12 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +64 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/edit.d.ts +154 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/edit.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +11 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/export.js +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/file.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/file.js +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/files.d.ts +24 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/files.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/fill.d.ts +30 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/fill.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/filter.d.ts +29 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/filter.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +9 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/format.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.d.ts +113 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.d.ts +65 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/generated.d.ts +46 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +34 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/html.js +20 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/import.d.ts +11 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/import.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.d.ts +25 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/patch.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/patch.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/profile.d.ts +30 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/profile.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/rules.d.ts +56 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/scenario.d.ts +42 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/scenario.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/series.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/series.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/sort.d.ts +24 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/sort.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/validate.d.ts +26 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.d.ts +67 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +315 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/write.d.ts +5 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/write.js +21 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +44 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +21 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +5 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +17 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +47 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.d.ts +5 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.d.ts +8 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +118 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.js +3 -0
- package/dist/node_modules/@allyhub-next/sheet/package.json +21 -0
- package/dist/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/api.d.ts +64 -7
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/chart-api.d.ts +24 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/chart-file.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/enums.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/index.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/model.d.ts +39 -6
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/office.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +5 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/resolve.d.ts +8 -3
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/video-core/LICENSE +241 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/fact.d.ts +8 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/formats.d.ts +0 -28
- package/dist/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/measure.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/problem.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
- package/{node_modules → dist/node_modules}/@allyhub-next/video-core/package.json +1 -1
- package/dist/phone.js +1 -1
- package/dist/sheets.d.ts +2 -0
- package/dist/sheets.js +2 -0
- package/docs/README.md +2 -2
- package/docs/defaults.md +24 -0
- package/docs/project.md +1 -1
- package/docs/scenery.md +1 -1
- package/docs/sheets.md +402 -84
- package/docs/slides.md +5 -5
- package/docs/speech.md +1 -1
- package/package.json +11 -19
- package/node_modules/@allyhub-next/formats/dist/data/reference.js +0 -2
- package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +0 -214
- package/node_modules/@allyhub-next/formats/dist/data/sheet.js +0 -2
- package/node_modules/@allyhub-next/formats/dist/data/slides.js +0 -2
- package/node_modules/@allyhub-next/formats/dist/index.js +0 -2
- package/node_modules/@allyhub-next/formats/dist/items.js +0 -2
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +0 -719
- package/node_modules/@allyhub-next/formats/dist/schemas.js +0 -2
- package/node_modules/@allyhub-next/protocol/dist/editor.js +0 -2
- package/node_modules/@allyhub-next/protocol/dist/notes.js +0 -2
- package/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
- package/node_modules/@allyhub-next/runtimes/dist/lock.js +0 -2
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -3
- package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +0 -2533
- package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +0 -8
- package/node_modules/@allyhub-next/scenery/dist/phone.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/api.js +0 -4
- package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/chart.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/enums.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/index.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/office.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/resolve.js +0 -2
- package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +0 -23
- package/node_modules/@allyhub-next/slides-core/dist/strict.js +0 -2
- package/node_modules/@allyhub-next/video-core/dist/fact.js +0 -2
- package/node_modules/@allyhub-next/video-core/dist/formats.js +0 -2
- package/node_modules/@allyhub-next/video-core/dist/measure.js +0 -5
- package/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.js +0 -0
- /package/{node_modules/@allyhub-next/formats → dist/node_modules/@allyhub-next/chart}/LICENSE +0 -0
- /package/{node_modules/@allyhub-next/protocol → dist/node_modules/@allyhub-next/formats}/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.js +0 -0
- /package/{node_modules/@allyhub-next/runtimes → dist/node_modules/@allyhub-next/protocol}/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.js +0 -0
- /package/{node_modules/@allyhub-next/scenery → dist/node_modules/@allyhub-next/runtimes}/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/manifest.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package.json +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/schemas/runtimes.schema.json +0 -0
- /package/{node_modules/@allyhub-next/slides-core → dist/node_modules/@allyhub-next/scenery}/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/NOTICE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.js +0 -0
- /package/{node_modules/@allyhub-next/video-core → dist/node_modules/@allyhub-next/sheet}/LICENSE +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/capabilities.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/model.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.js +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.d.ts +0 -0
- /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.js +0 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import type { SheetChart, SheetConditional, SheetFile, SheetFilesColumn, SheetFilterColumn, SheetFormatEntry, SheetTable, SheetTableColumn, SheetValidation, SheetWorksheet } from "@allyhub-next/formats";
|
|
2
|
+
import { rangeName, type Area, type Place } from "./address.js";
|
|
3
|
+
import { type SheetProblem, type YamlPath } from "./file.js";
|
|
4
|
+
import { type GeneratedSheets } from "./generated.js";
|
|
5
|
+
import type { Node, ParseError } from "./formula/ast.js";
|
|
6
|
+
import { CellError, type Matrix, type Scalar } from "./values.js";
|
|
7
|
+
/** Where a value is written. */
|
|
8
|
+
export interface Source {
|
|
9
|
+
/** sheet.yaml or a CSV file, from the sheet's folder. */
|
|
10
|
+
file: string;
|
|
11
|
+
/** In a CSV file. */
|
|
12
|
+
line?: number;
|
|
13
|
+
/** In sheet.yaml. */
|
|
14
|
+
path?: YamlPath;
|
|
15
|
+
}
|
|
16
|
+
/** One formula's text and tree, for every cell that holds it. */
|
|
17
|
+
export declare class SharedFormula {
|
|
18
|
+
readonly node: Node | undefined;
|
|
19
|
+
readonly error: ParseError | undefined;
|
|
20
|
+
/** What the engine learned of it: filled in once. */
|
|
21
|
+
analysis: unknown;
|
|
22
|
+
readonly text: string;
|
|
23
|
+
/** The cell it is written for. */
|
|
24
|
+
readonly row: number;
|
|
25
|
+
readonly col: number;
|
|
26
|
+
readonly source: Source;
|
|
27
|
+
constructor(text: string, row: number, col: number, source: Source);
|
|
28
|
+
}
|
|
29
|
+
/** The state of a formula cell's value: 0 fresh, 1 to compute, 2 being computed. */
|
|
30
|
+
export type CellState = 0 | 1 | 2;
|
|
31
|
+
export declare class FormulaCell {
|
|
32
|
+
value: Scalar;
|
|
33
|
+
/** Every value of an array result, the first of which is `value`. */
|
|
34
|
+
array: Matrix | undefined;
|
|
35
|
+
/** The cells its array result covers, itself first, when that is more than one. */
|
|
36
|
+
spill: Area | undefined;
|
|
37
|
+
/** The cells its array result would cover, when something stands in them: its value is #SPILL!. */
|
|
38
|
+
blocked: Area | undefined;
|
|
39
|
+
state: CellState;
|
|
40
|
+
/** The last pass that ordered it. */
|
|
41
|
+
mark: number;
|
|
42
|
+
readonly shared: SharedFormula;
|
|
43
|
+
readonly sheet: Worksheet;
|
|
44
|
+
readonly row: number;
|
|
45
|
+
readonly col: number;
|
|
46
|
+
constructor(shared: SharedFormula, sheet: Worksheet, row: number, col: number);
|
|
47
|
+
/** Its formula's tree as this cell reads it, moved from where it was written. */
|
|
48
|
+
get moved(): Node;
|
|
49
|
+
/** Its formula as this cell reads it, moved from where it was written. */
|
|
50
|
+
get text(): string;
|
|
51
|
+
}
|
|
52
|
+
export type Slot = number | string | boolean | CellError | FormulaCell;
|
|
53
|
+
export interface TableColumn {
|
|
54
|
+
name: string;
|
|
55
|
+
/** Its place in the table, from 0. */
|
|
56
|
+
index: number;
|
|
57
|
+
/** Its place in the CSV file; absent when the file has no such column. */
|
|
58
|
+
csv?: number;
|
|
59
|
+
/** A calculated column's formula. */
|
|
60
|
+
formula?: SharedFormula;
|
|
61
|
+
spec?: SheetTableColumn;
|
|
62
|
+
}
|
|
63
|
+
export declare class Table {
|
|
64
|
+
columns: TableColumn[];
|
|
65
|
+
/** The rows under its header. */
|
|
66
|
+
rows: number;
|
|
67
|
+
/** Each row's line in its CSV file. */
|
|
68
|
+
lines: number[];
|
|
69
|
+
/** Each row's record in its CSV file, the header being 0: blank lines are no rows. */
|
|
70
|
+
places: number[];
|
|
71
|
+
/** Each column's values as the CSV file writes them, by row. */
|
|
72
|
+
records: string[][];
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly sheet: Worksheet;
|
|
75
|
+
readonly at: Place;
|
|
76
|
+
readonly file: string;
|
|
77
|
+
readonly spec: SheetTable;
|
|
78
|
+
constructor(name: string, sheet: Worksheet, at: Place, file: string, spec: SheetTable);
|
|
79
|
+
/** Its header and rows. */
|
|
80
|
+
get area(): Area;
|
|
81
|
+
/** Its rows, without its header; bottom is above top when it has none. */
|
|
82
|
+
get data(): Area;
|
|
83
|
+
column(name: string): TableColumn | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface Block {
|
|
86
|
+
area: Area;
|
|
87
|
+
file: string;
|
|
88
|
+
lines: number[];
|
|
89
|
+
}
|
|
90
|
+
/** A conditional format as the sheet holds it: its cells, and its formulas parsed. */
|
|
91
|
+
export interface Condition {
|
|
92
|
+
spec: SheetConditional;
|
|
93
|
+
areas: Area[];
|
|
94
|
+
/** Its bounds or its rule, each written for the first cell. */
|
|
95
|
+
formulas: SharedFormula[];
|
|
96
|
+
}
|
|
97
|
+
/** A data validation as the sheet holds it. */
|
|
98
|
+
export interface Validation {
|
|
99
|
+
spec: SheetValidation;
|
|
100
|
+
areas: Area[];
|
|
101
|
+
/** Its bounds that are formulas, by their place in `spec.formula`. */
|
|
102
|
+
formulas: (SharedFormula | undefined)[];
|
|
103
|
+
}
|
|
104
|
+
/** A chart's series, with where it reads from parsed. */
|
|
105
|
+
export interface ChartSeriesRefs {
|
|
106
|
+
values: SharedFormula;
|
|
107
|
+
x?: SharedFormula;
|
|
108
|
+
/** When it is named by a cell. */
|
|
109
|
+
name?: SharedFormula;
|
|
110
|
+
}
|
|
111
|
+
/** A chart as the sheet holds it: its place, and each reference parsed. */
|
|
112
|
+
export interface Chart {
|
|
113
|
+
spec: SheetChart;
|
|
114
|
+
at: Place;
|
|
115
|
+
/** Its place in `charts`. */
|
|
116
|
+
index: number;
|
|
117
|
+
categories?: SharedFormula;
|
|
118
|
+
/** When its title is a cell's. */
|
|
119
|
+
title?: SharedFormula;
|
|
120
|
+
series: ChartSeriesRefs[];
|
|
121
|
+
}
|
|
122
|
+
/** A filter of a sheet, whichever holds it. */
|
|
123
|
+
export interface Filter {
|
|
124
|
+
/** Its header row and its rows. */
|
|
125
|
+
area: Area;
|
|
126
|
+
table?: Table;
|
|
127
|
+
/** What each column keeps, by its place on the sheet. */
|
|
128
|
+
columns: Map<number, SheetFilterColumn>;
|
|
129
|
+
}
|
|
130
|
+
/** A CSV file as rows, each its fields; a line with nothing on it is a row of none. */
|
|
131
|
+
export type CsvRows = readonly (readonly string[])[];
|
|
132
|
+
interface Fill {
|
|
133
|
+
area: Area;
|
|
134
|
+
/** Its formula, or its value. */
|
|
135
|
+
shared?: SharedFormula;
|
|
136
|
+
value?: Scalar;
|
|
137
|
+
format?: string;
|
|
138
|
+
}
|
|
139
|
+
export declare const placeKey: (row: number, col: number) => number;
|
|
140
|
+
export declare class Worksheet {
|
|
141
|
+
readonly tables: Table[];
|
|
142
|
+
readonly blocks: Block[];
|
|
143
|
+
readonly merges: Area[];
|
|
144
|
+
/** The formula cells of the sheet, once its cells are made. */
|
|
145
|
+
readonly formulas: Set<FormulaCell>;
|
|
146
|
+
/** The format a typed value implies, by place: a date, a percent. */
|
|
147
|
+
readonly implied: Map<number, string>;
|
|
148
|
+
/** Single cells written in sheet.yaml, by place, with their keys. */
|
|
149
|
+
readonly keys: Map<number, string>;
|
|
150
|
+
readonly fills: Fill[];
|
|
151
|
+
/** Cells a key keeps empty inside a fill. */
|
|
152
|
+
readonly blanks: Set<number>;
|
|
153
|
+
/** Its conditional formats, the first the strongest. */
|
|
154
|
+
readonly conditions: Condition[];
|
|
155
|
+
readonly validations: Validation[];
|
|
156
|
+
/** Its AutoFilter and its tables', those with their buttons. */
|
|
157
|
+
readonly filters: Filter[];
|
|
158
|
+
/** Its charts, the last on top. */
|
|
159
|
+
readonly charts: Chart[];
|
|
160
|
+
freeze: Place | undefined;
|
|
161
|
+
/** sheet.ts makes it: what is on it is not changed by hand. */
|
|
162
|
+
generated: boolean;
|
|
163
|
+
private readonly grid;
|
|
164
|
+
private expanded;
|
|
165
|
+
private lowest;
|
|
166
|
+
/** Cells an array result spills into, by place: the formula cell each is of. */
|
|
167
|
+
private readonly ghosts;
|
|
168
|
+
/** Formula cells that spill. */
|
|
169
|
+
private readonly spills;
|
|
170
|
+
/** Formula cells that would spill, and something stands in the way. */
|
|
171
|
+
private readonly stopped;
|
|
172
|
+
private reach;
|
|
173
|
+
private lookAreas;
|
|
174
|
+
readonly name: string;
|
|
175
|
+
readonly index: number;
|
|
176
|
+
spec: SheetWorksheet;
|
|
177
|
+
constructor(name: string, index: number, spec: SheetWorksheet);
|
|
178
|
+
/** What sheet.yaml says of it after an edit that moved nothing: a look, a cell's key. */
|
|
179
|
+
respec(spec: SheetWorksheet): void;
|
|
180
|
+
/** Sets a cell, as reading the files does. */
|
|
181
|
+
put(row: number, col: number, slot: Slot): void;
|
|
182
|
+
/** Changes a cell after the sheet is read. */
|
|
183
|
+
replace(row: number, col: number, slot: Slot | undefined): void;
|
|
184
|
+
/** Makes the cells its fills cover: an earlier fill never takes a cell a later one has. */
|
|
185
|
+
expand(): void;
|
|
186
|
+
at(row: number, col: number): Slot | undefined;
|
|
187
|
+
/** The formula cell a place's value spilled from; undefined at the formula cell itself. */
|
|
188
|
+
spillAt(row: number, col: number): FormulaCell | undefined;
|
|
189
|
+
/** Whether anything in an area stops a spill from `cell`: a cell of the file, another's spill aside. */
|
|
190
|
+
holds(area: Area, cell: FormulaCell): boolean;
|
|
191
|
+
/** The spills in an area. */
|
|
192
|
+
spillsIn(area: Area): FormulaCell[];
|
|
193
|
+
/** The formula cells whose spill something stands in, and that wanted cells of an area. */
|
|
194
|
+
blockedBy(area: Area): FormulaCell[];
|
|
195
|
+
/** Puts an array result on the sheet. */
|
|
196
|
+
placeSpill(cell: FormulaCell, area: Area): void;
|
|
197
|
+
/** Says a result could not be put on the sheet. */
|
|
198
|
+
blockSpill(cell: FormulaCell, area: Area): void;
|
|
199
|
+
/** Takes an array result off the sheet. How far spills reach is worked out again by `tighten`. */
|
|
200
|
+
clearSpill(cell: FormulaCell): void;
|
|
201
|
+
/** Forgets every spill, for a pass over the whole workbook. */
|
|
202
|
+
clearSpills(): void;
|
|
203
|
+
/** After a pass: how far spills reach is what they cover now. */
|
|
204
|
+
tighten(): void;
|
|
205
|
+
private spillReach;
|
|
206
|
+
/** Whether a column holds a formula. */
|
|
207
|
+
hasFormulas(col: number): boolean;
|
|
208
|
+
/** The rows of a column to read in an area: nothing below or above what it holds, or a spill reaches, is read. */
|
|
209
|
+
span(col: number, top: number, bottom: number): [number, number];
|
|
210
|
+
get columnsUsed(): number;
|
|
211
|
+
/** The last row anything is on. */
|
|
212
|
+
get lastRow(): number;
|
|
213
|
+
/** What holds anything, from A1; undefined when it holds nothing. */
|
|
214
|
+
get used(): Area | undefined;
|
|
215
|
+
tableAt(row: number, col: number): Table | undefined;
|
|
216
|
+
blockAt(row: number, col: number): Block | undefined;
|
|
217
|
+
/** What applies to areas: `format`'s entries and range keys with a look, read once. */
|
|
218
|
+
private looks;
|
|
219
|
+
/** The areas `format` and range keys give a look: cells of them have it, whatever they hold. */
|
|
220
|
+
styledAreas(): readonly {
|
|
221
|
+
area: Area;
|
|
222
|
+
entry: object;
|
|
223
|
+
}[];
|
|
224
|
+
/** The format and look that hold for a cell, from the file's less specific places to its own. */
|
|
225
|
+
lookAt(row: number, col: number): CellLook;
|
|
226
|
+
/** The merge a place is in. */
|
|
227
|
+
mergeAt(row: number, col: number): Area | undefined;
|
|
228
|
+
/** The data validation that holds for a place. */
|
|
229
|
+
validationAt(row: number, col: number): Validation | undefined;
|
|
230
|
+
/** The filter whose header a place is in. */
|
|
231
|
+
filterHeadAt(row: number, col: number): Filter | undefined;
|
|
232
|
+
/** The filter a place is in. */
|
|
233
|
+
filterAt(row: number, col: number): Filter | undefined;
|
|
234
|
+
/** A `files` column a place is in, under a table's header or a sheet's column: how it joins and draws them. */
|
|
235
|
+
filesAt(row: number, col: number): SheetFilesColumn | undefined;
|
|
236
|
+
}
|
|
237
|
+
/** What joins a `files` column's files in a cell. */
|
|
238
|
+
export declare const filesSeparator: (column: SheetFilesColumn) => string;
|
|
239
|
+
/** What a cell of a `files` column names: its text apart at the column's separator. */
|
|
240
|
+
export declare function filesIn(text: string, column: SheetFilesColumn): string[];
|
|
241
|
+
/** Every field of a cell's look, and its number format. */
|
|
242
|
+
export type CellLook = Omit<SheetFormatEntry, "range">;
|
|
243
|
+
/** A defined name: a constant, or a formula that may be a place. */
|
|
244
|
+
export interface DefinedName {
|
|
245
|
+
name: string;
|
|
246
|
+
value?: Scalar;
|
|
247
|
+
formula?: SharedFormula;
|
|
248
|
+
source: Source;
|
|
249
|
+
}
|
|
250
|
+
export interface Check {
|
|
251
|
+
name: string;
|
|
252
|
+
formula: SharedFormula;
|
|
253
|
+
source: Source;
|
|
254
|
+
}
|
|
255
|
+
export declare class Workbook {
|
|
256
|
+
title: string | undefined;
|
|
257
|
+
readonly sheets: Worksheet[];
|
|
258
|
+
readonly names: Map<string, DefinedName>;
|
|
259
|
+
readonly checks: Check[];
|
|
260
|
+
private readonly bySheet;
|
|
261
|
+
private readonly byTable;
|
|
262
|
+
file: SheetFile;
|
|
263
|
+
/** What sheet.ts makes: `file` holds it too. */
|
|
264
|
+
readonly generated: GeneratedSheets | undefined;
|
|
265
|
+
/** Sheets sheet.ts makes that sheet.yaml holds: sheet.yaml's stand. */
|
|
266
|
+
ordinary: readonly string[];
|
|
267
|
+
constructor(file: SheetFile, generated?: GeneratedSheets);
|
|
268
|
+
/** sheet.yaml after an edit that changed no sheet, table or fill: the looks and the keys. */
|
|
269
|
+
respec(file: SheetFile): void;
|
|
270
|
+
sheet(name: string): Worksheet | undefined;
|
|
271
|
+
table(name: string): Table | undefined;
|
|
272
|
+
name(name: string): DefinedName | undefined;
|
|
273
|
+
get tables(): Table[];
|
|
274
|
+
addSheet(sheet: Worksheet): void;
|
|
275
|
+
addTable(table: Table): void;
|
|
276
|
+
/** Where a cell's value is written. */
|
|
277
|
+
sourceOf(sheet: Worksheet, row: number, col: number): Source | undefined;
|
|
278
|
+
}
|
|
279
|
+
/** What a workbook's files are, as a reader of them needs them. */
|
|
280
|
+
export interface WorkbookFiles {
|
|
281
|
+
/** sheet.yaml's text. */
|
|
282
|
+
text: string;
|
|
283
|
+
/** A file's text, from the sheet's folder; undefined when it is not there. */
|
|
284
|
+
read: (path: string) => string | undefined;
|
|
285
|
+
/** What its sheet.ts makes. */
|
|
286
|
+
generated?: GeneratedSheets | undefined;
|
|
287
|
+
/** Whether a file is there, from the sheet's folder: what a `files` column names is looked for. */
|
|
288
|
+
exists?: ((path: string) => boolean) | undefined;
|
|
289
|
+
}
|
|
290
|
+
/** A workbook's files as values: what an editor holds, with nothing to read again. */
|
|
291
|
+
export interface WorkbookValues {
|
|
292
|
+
file: SheetFile;
|
|
293
|
+
/** A CSV file's rows, from the sheet's folder; undefined when it is not there. */
|
|
294
|
+
rows: (path: string) => CsvRows | undefined;
|
|
295
|
+
/** What its sheet.ts makes. */
|
|
296
|
+
generated?: GeneratedSheets | undefined;
|
|
297
|
+
}
|
|
298
|
+
export interface ReadWorkbook {
|
|
299
|
+
/** Undefined when sheet.yaml cannot be read as the format. */
|
|
300
|
+
workbook?: Workbook;
|
|
301
|
+
problems: SheetProblem[];
|
|
302
|
+
lineOf: (path: YamlPath) => number | undefined;
|
|
303
|
+
}
|
|
304
|
+
/** A fill's cells at most: more is a mistake, not a sheet. */
|
|
305
|
+
export declare const MAX_FILL_CELLS = 5000000;
|
|
306
|
+
/** Whether a text can be a defined name or a table's: not an address, nor TRUE. */
|
|
307
|
+
export declare function validName(name: string): boolean;
|
|
308
|
+
/** A chart's reference as a formula. */
|
|
309
|
+
export declare const chartFormula: (text: string) => string;
|
|
310
|
+
/** A workbook from its files, and what is wrong with them that reading can tell. */
|
|
311
|
+
export declare function readWorkbook(files: WorkbookFiles): ReadWorkbook;
|
|
312
|
+
/** A workbook from what an editor holds, with no file to read: its CSV rows as they stand. */
|
|
313
|
+
export declare function workbookOf(values: WorkbookValues): Workbook;
|
|
314
|
+
export { rangeName };
|
|
315
|
+
//# sourceMappingURL=workbook.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{SHEET_CODE as C,SHEET_SEPARATOR as P}from"@allyhub-next/formats";import{MAX_ROWS as B,cellName as H,columnIndex as j,columnLetter as z,contains as y,overlaps as v,rangeName as U,readAddress as x,readArea as $,readAreas as _}from"./address.js";import{readCsv as R}from"./csv.js";import{ENTRY as E,readSheetFile as D}from"./file.js";import{withGenerated as O}from"./generated.js";import{moveFormula as G}from"./formula/move.js";import{parseFormula as X}from"./formula/parse.js";import{printFormula as Y}from"./formula/print.js";import{readTyped as A}from"./values.js";export class SharedFormula{node;error;analysis;text;row;col;source;constructor(e,t,s,n){this.text=e,this.row=t,this.col=s,this.source=n;const i=X(e);i.ok?this.node=i.node:this.error=i.error}}export class FormulaCell{value=null;array;spill;blocked;state=1;mark=0;shared;sheet;row;col;constructor(e,t,s,n){this.shared=e,this.sheet=t,this.row=s,this.col=n}get moved(){const{node:e,row:t,col:s}=this.shared;if(!e)throw new Error(`${this.shared.text} does not parse.`);return G(e,this.row-t,this.col-s)}get text(){const{node:e,text:t,row:s,col:n}=this.shared;return!e||s===this.row&&n===this.col?t:Y(this.moved)}}class Z{columns=[];firsts=[];lasts=[];formulas=[];get(e,t){return this.columns[t]?.[e]}set(e,t,s){let n=this.columns[t];n||(n=[],this.columns[t]=n,this.firsts[t]=e,this.lasts[t]=e),n[e]instanceof FormulaCell&&(this.formulas[t]=(this.formulas[t]??1)-1),s instanceof FormulaCell&&(this.formulas[t]=(this.formulas[t]??0)+1),n[e]=s,e<(this.firsts[t]??e)&&(this.firsts[t]=e),e>(this.lasts[t]??e)&&(this.lasts[t]=e)}get width(){return this.columns.length}holds(e,t,s){const n=Math.min(e.right,this.columns.length-1);for(let i=e.left;i<=n;i++){const r=this.columns[i];if(!r)continue;const l=Math.min(e.bottom,this.last(i));for(let o=Math.max(e.top,this.first(i));o<=l;o++)if(r[o]!==void 0&&!(o===t&&i===s))return!0}return!1}first(e){return this.firsts[e]??1/0}last(e){return this.lasts[e]??-1}hasFormulas(e){return(this.formulas[e]??0)>0}}export class Table{columns=[];rows=0;lines=[];places=[];records=[];name;sheet;at;file;spec;constructor(e,t,s,n,i){this.name=e,this.sheet=t,this.at=s,this.file=n,this.spec=i}get area(){return{top:this.at.row,left:this.at.col,bottom:this.at.row+this.rows,right:this.at.col+Math.max(this.columns.length,1)-1}}get data(){const e=this.area;return{...e,top:e.top+1}}column(e){const t=e.toLowerCase();return this.columns.find(s=>s.name.toLowerCase()===t)}}export const placeKey=(a,e)=>a*16384+e;function T(a,e){a.bottom=Math.max(a.bottom,e.bottom),a.right=Math.max(a.right,e.right);for(let t=e.left;t<=e.right;t++){const s=a.columns.get(t);a.columns.set(t,[Math.min(s?.[0]??e.top,e.top),Math.max(s?.[1]??e.bottom,e.bottom)])}}export class Worksheet{tables=[];blocks=[];merges=[];formulas=new Set;implied=new Map;keys=new Map;fills=[];blanks=new Set;conditions=[];validations=[];filters=[];charts=[];freeze;generated=!1;grid=new Z;expanded=!1;lowest=-1;ghosts=new Map;spills=new Set;stopped=new Set;reach;lookAreas;name;index;spec;constructor(e,t,s){this.name=e,this.index=t,this.spec=s}respec(e){const t=e.charts!==this.spec.charts;this.spec=e,this.lookAreas=void 0,t&&(this.charts.length=0,e.charts?.forEach((s,n)=>{const i=W(s,n,[],()=>{});i&&this.charts.push(i)}))}put(e,t,s){s instanceof FormulaCell&&this.formulas.add(s),this.grid.set(e,t,s),e>this.lowest&&(this.lowest=e)}replace(e,t,s){this.expand();const n=this.grid.get(e,t);n instanceof FormulaCell&&this.formulas.delete(n),s instanceof FormulaCell&&this.formulas.add(s),this.grid.set(e,t,s),e>this.lowest&&(this.lowest=e)}expand(){if(!this.expanded){this.expanded=!0;for(let e=this.fills.length-1;e>=0;e--){const t=this.fills[e];if(!t)continue;const{area:s,shared:n,value:i,format:r}=t;for(let l=s.top;l<=s.bottom;l++)for(let o=s.left;o<=s.right;o++)this.grid.get(l,o)===void 0&&(this.blanks.has(placeKey(l,o))||(n?this.put(l,o,new FormulaCell(n,this,l,o)):i!=null&&(this.put(l,o,i),r!==void 0&&this.implied.set(placeKey(l,o),r))))}}}at(e,t){return this.expand(),this.grid.get(e,t)}spillAt(e,t){return this.ghosts.size===0?void 0:this.ghosts.get(placeKey(e,t))}holds(e,t){return this.expand(),this.grid.holds(e,t.row,t.col)}spillsIn(e){if(this.spills.size===0)return[];if((e.bottom-e.top+1)*(e.right-e.left+1)>=this.spills.size)return[...this.spills].filter(n=>n.spill!==void 0&&v(n.spill,e));const s=new Set;for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++){const r=this.ghosts.get(placeKey(n,i));r&&s.add(r)}return[...s]}blockedBy(e){if(this.stopped.size===0)return[];const t=[];for(const s of this.stopped)s.blocked&&v(s.blocked,e)&&t.push(s);return t}placeSpill(e,t){e.spill=t,this.spills.add(e);for(let s=t.top;s<=t.bottom;s++)for(let n=t.left;n<=t.right;n++)(s!==e.row||n!==e.col)&&this.ghosts.set(placeKey(s,n),e);this.reach&&T(this.reach,t)}blockSpill(e,t){e.blocked=t,this.stopped.add(e)}clearSpill(e){const t=e.spill;if(t)for(let s=t.top;s<=t.bottom;s++)for(let n=t.left;n<=t.right;n++)this.ghosts.get(placeKey(s,n))===e&&this.ghosts.delete(placeKey(s,n));e.spill=void 0,e.blocked=void 0,this.spills.delete(e),this.stopped.delete(e)}clearSpills(){for(const e of[...this.spills,...this.stopped])e.spill=void 0,e.blocked=void 0;this.spills.clear(),this.stopped.clear(),this.ghosts.clear(),this.reach=void 0}tighten(){this.reach=void 0}spillReach(){if(this.reach)return this.reach;const e={columns:new Map,bottom:-1,right:-1};for(const{spill:t}of this.spills)t&&T(e,t);return this.reach=e,e}hasFormulas(e){return this.expand(),this.grid.hasFormulas(e)}span(e,t,s){this.expand();const n=this.grid.first(e),i=this.grid.last(e);if(this.spills.size===0)return[Math.max(t,n),Math.min(s,i)];const[r,l]=this.spillReach().columns.get(e)??[1/0,-1];return[Math.max(t,Math.min(n,r)),Math.min(s,Math.max(i,l))]}get columnsUsed(){return this.expand(),this.spills.size===0?this.grid.width:Math.max(this.grid.width,this.spillReach().right+1)}get lastRow(){return this.expand(),this.spills.size===0?this.lowest:Math.max(this.lowest,this.spillReach().bottom)}get used(){const e=this.lastRow,t=this.columnsUsed-1;return e<0||t<0?void 0:{top:0,left:0,bottom:e,right:t}}tableAt(e,t){return this.tables.find(s=>y(s.area,e,t))}blockAt(e,t){return this.blocks.find(s=>y(s.area,e,t))}looks(){if(this.lookAreas)return this.lookAreas;const e=[];for(const s of this.spec.format??[]){const n=$(s.range);n&&e.push({area:n,entry:s})}const t=[];for(const[s,n]of Object.entries(this.spec.cells??{})){if(!s.includes(":")||n===null||typeof n!="object")continue;const i=$(s);i&&t.push({area:i,entry:n})}return this.lookAreas={formats:e,ranges:t},this.lookAreas}styledAreas(){const{formats:e,ranges:t}=this.looks();return[...e,...t.filter(s=>Object.keys(s.entry).some(n=>F.has(n)))]}lookAt(e,t){const s={},n=c=>{if(c)for(const[b,w]of Object.entries(c))F.has(b)&&w!==void 0&&(s[b]=b==="border"?{...s.border,...w}:w)},i=this.implied.get(placeKey(e,t));i!==void 0&&(s.format=i);const r=this.ghosts.size===0?void 0:this.spillAt(e,t),l=r&&this.lookAt(r.row,r.col).format;l!==void 0&&(s.format=l),this.spec.columns&&n(this.spec.columns[z(t)]),this.spec.rows&&n(this.spec.rows[String(e+1)]);const o=this.tableAt(e,t);o&&e>o.at.row&&n(o.columns[t-o.at.col]?.spec);const{formats:f,ranges:h}=this.looks();for(const c of f)y(c.area,e,t)&&n(c.entry);for(const c of h)y(c.area,e,t)&&n(c.entry);const m=this.keys.get(placeKey(e,t)),g=m===void 0?void 0:this.spec.cells?.[m];if(g!==null&&typeof g=="object"&&n(g),s.border){const c=Object.entries(s.border).filter(([,b])=>b?.style!=="none");c.length===0?delete s.border:s.border=Object.fromEntries(c)}return s}mergeAt(e,t){return this.merges.find(s=>y(s,e,t))}validationAt(e,t){return this.validations.find(s=>s.areas.some(n=>y(n,e,t)))}filterHeadAt(e,t){return this.filters.find(s=>e===s.area.top&&t>=s.area.left&&t<=s.area.right)}filterAt(e,t){return this.filters.find(s=>y(s.area,e,t))}filesAt(e,t){const s=this.tableAt(e,t);if(s&&e>s.at.row){const n=s.columns[t-s.at.col]?.spec?.files;if(n!==void 0)return n}return s?.at.row===e?void 0:this.spec.columns?.[z(t)]?.files}}export const filesSeparator=a=>(typeof a=="object"?a.separator:void 0)??P;export function filesIn(a,e){const t=filesSeparator(e);return a.split(t.trim()===""?t:t.trim()).map(s=>s.trim()).filter(s=>s!=="")}const F=new Set(["bold","italic","underline","strike","font","size","color","fill","align","valign","wrap","shrink","indent","rotation","border","format"]);export class Workbook{title;sheets=[];names=new Map;checks=[];bySheet=new Map;byTable=new Map;file;generated;ordinary=[];constructor(e,t){this.file=e,this.title=e.title,this.generated=t}respec(e){this.file=O(e,this.generated).file,this.title=e.title,this.sheets.forEach(t=>{const s=e.sheets.find(n=>n.name===t.name);s&&t.respec(s)})}sheet(e){return this.bySheet.get(e.toLowerCase())}table(e){return this.byTable.get(e.toLowerCase())}name(e){return this.names.get(e.toLowerCase())}get tables(){return[...this.byTable.values()]}addSheet(e){this.sheets.push(e),this.bySheet.set(e.name.toLowerCase(),e)}addTable(e){e.sheet.tables.push(e),this.byTable.set(e.name.toLowerCase(),e)}sourceOf(e,t,s){if(e.generated)return{file:C};const n=this.sheets.indexOf(e),i=e.tableAt(t,s);if(i){const o=i.columns[s-i.at.col],f=t-i.at.row-1,h=o?.csv!==void 0&&(i.records[f]?.[o.csv]??"")!=="";return f>=0&&o?.formula&&!h?o.formula.source:{file:i.file,line:f<0?1:i.lines[f]??1}}const r=e.blockAt(t,s);if(r)return{file:r.file,line:r.lines[t-r.area.top]??1};const l=e.keys.get(placeKey(t,s));if(l!==void 0)return{file:E,path:["sheets",n,"cells",l]};for(const o of Object.keys(e.spec.cells??{})){if(!o.includes(":"))continue;const f=$(o);if(f&&y(f,t,s))return{file:E,path:["sheets",n,"cells",o]}}}}export const MAX_FILL_CELLS=5e6;const q=/^[\p{L}_\\][\p{L}\p{N}_.\\?]*$/u;export function validName(a){return q.test(a)&&x(a)===void 0&&!/^(?:TRUE|FALSE)$/iu.test(a)&&!/^[Rr](?:\d+)?(?:[Cc]\d*)?$/u.test(a)&&!/^[Cc]\d*$/u.test(a)}const M="made",k=a=>a[0]===M?C:E;class N{problems=[];wb;read_;lineOf;own;madeNames;constructor(e,t,s,n,i){this.wb=e,this.read_=t,this.lineOf=s,this.own=n,this.madeNames=i}yaml(e,t){const s=this.lineOf(e);this.problems.push({file:k(e),...s===void 0?{}:{line:s},message:t})}sheetPath(e){return e<this.own?["sheets",e]:[M,"sheets",e-this.own]}read(){const{file:e}=this.wb;e.sheets.forEach((t,s)=>{const n=this.sheetPath(s);if(this.wb.sheet(t.name)){this.yaml([...n,"name"],`two sheets are named ${t.name}`);return}(/[\\/?*[\]:]/u.test(t.name)||t.name.length>31)&&this.yaml([...n,"name"],`${t.name} cannot be a sheet's name: at most 31 characters, none of \\ / ? * [ ] :`);const i=new Worksheet(t.name,this.wb.sheets.length,t);i.generated=s>=this.own,this.wb.addSheet(i)}),this.names();for(const[t,s]of e.sheets.entries()){const n=this.wb.sheets[t];n?.spec===s&&this.sheet(n,this.sheetPath(t))}e.checks?.forEach((t,s)=>{const n={file:E,path:["checks",s,"formula"]};this.wb.checks.push({name:t.name,formula:new SharedFormula(t.formula,0,0,n),source:n})})}names(){for(const[e,t]of Object.entries(this.wb.file.names??{})){const s=this.madeNames.has(e)?[M,"names",e]:["names",e];if(!validName(e)){this.yaml(s,`${e} cannot be a name`);continue}const n={file:k(s),path:s},i=typeof t=="string"&&t.startsWith("=")?{name:e,formula:new SharedFormula(t,0,0,n),source:n}:{name:e,value:typeof t=="string"?A(t).value:t,source:n};this.wb.names.set(e.toLowerCase(),i)}}sheet(e,t){const{spec:s}=e;if(s.freeze!==void 0){const n=x(s.freeze);n?e.freeze=n:this.yaml([...t,"freeze"],`${s.freeze} is not a cell`)}s.tables?.forEach((n,i)=>{this.table(e,n,[...t,"tables",i])});for(const[n,i]of e.tables.entries())for(const r of e.tables.slice(n+1))v(i.area,r.area)&&this.problems.push({file:E,message:`tables ${i.name} and ${r.name} overlap on ${e.name}`});s.blocks?.forEach((n,i)=>{this.block(e,n.at,n.rows,[...t,"blocks",i])}),this.cells(e,s.cells??{},[...t,"cells"]),s.merges?.forEach((n,i)=>{const r=$(n);r?e.merges.push(r):this.yaml([...t,"merges",i],`${n} is not a range`)}),s.format?.forEach((n,i)=>{$(n.range)||this.yaml([...t,"format",i,"range"],`${n.range} is not a range`)}),s.conditional?.forEach((n,i)=>{this.condition(e,n,[...t,"conditional",i])}),s.validations?.forEach((n,i)=>{this.validation(e,n,[...t,"validations",i])}),this.filters(e,t),s.charts?.forEach((n,i)=>{this.chart(e,n,i,[...t,"charts",i])});for(const n of Object.keys(s.columns??{}))j(n)===void 0&&this.yaml([...t,"columns",n],`${n} is not a column`);for(const n of Object.keys(s.rows??{}))(!/^[1-9]\d*$/u.test(n)||Number(n)>B)&&this.yaml([...t,"rows",n],`${n} is not a row`)}chart(e,t,s,n){const i=W(t,s,n,(r,l)=>{this.yaml(r,l)});i&&e.charts.push(i)}bound(e,t,s){if(!(typeof e!="string"||!e.startsWith("=")||e.length<2))return new SharedFormula(e,t?.top??0,t?.left??0,{file:k(s),path:s})}condition(e,t,s){const n=_(t.range);if(!n){this.yaml([...s,"range"],`${t.range} is not a range`);return}const[i]=n,r=[],l=(o,f)=>{const h=this.bound(o,i,f);h&&r.push(h)};if(t.type==="expression"){const o=t.formula.startsWith("=")?t.formula:`=${t.formula}`;l(o,[...s,"formula"])}if(t.type==="cellIs"&&t.formula.forEach((o,f)=>{l(o,[...s,"formula",f])}),t.type==="dataBar")for(const o of["min","max"])l(t[o]?.value,[...s,o,"value"]);(t.type==="colorScale"||t.type==="iconSet")&&t.stops?.forEach((o,f)=>{l(o.value,[...s,"stops",f,"value"])}),e.conditions.push({spec:t,areas:n,formulas:r})}validation(e,t,s){const n=_(t.range);if(!n){this.yaml([...s,"range"],`${t.range} is not a range`);return}const i=(t.formula??[]).map((o,f)=>this.bound(o,n[0],[...s,"formula",f])),r=t.formula?.length??0,l=t.type!=="list"&&t.type!=="custom"&&(t.operator===void 0||t.operator==="between"||t.operator==="notBetween");!(t.type==="list"&&t.values!==void 0)&&r<(l?2:1)&&this.yaml(s,`a ${t.type} validation needs its bounds`),e.validations.push({spec:t,areas:n,formulas:i})}filters(e,t){const{spec:s}=e;if(s.filter){const n=[...t,"filter"],i=$(s.filter.range);if(!i)this.yaml([...n,"range"],`${s.filter.range} is not a range`);else{const r=new Map;for(const[o,f]of Object.entries(s.filter.columns??{})){const h=j(o);h===void 0||h<i.left||h>i.right?this.yaml([...n,"columns",o],`${o} is not a column of ${s.filter.range}`):r.set(h,f)}const l=e.tables.find(o=>v(o.area,i));l&&this.yaml(n,`a filter over table ${l.name}: a table has its own`),e.filters.push({area:i,columns:r})}}e.tables.forEach((n,i)=>{const{filter:r}=n.spec;if(r===!1)return;const l=new Map;for(const[o,f]of Object.entries(r?.columns??{})){const h=n.column(o);h?l.set(n.at.col+h.index,f):this.yaml([...t,"tables",i,"filter","columns",o],`table ${n.name} has no column ${o}`)}e.filters.push({area:n.area,table:n,columns:l})})}csv(e,t,s){const n=this.read_(e);return n||this.yaml(t,`${s}: ${e} is not there`),n}overlapping(e,t){const s=e.tables.find(i=>v(i.area,t));if(s)return`table ${s.name}`;const n=e.blocks.find(i=>v(i.area,t));return n?`the block of ${n.file}`:void 0}typed(e,t,s,n,i){if(n.formula!==void 0){const r=new SharedFormula(n.formula,t,s,i);e.put(t,s,new FormulaCell(r,e,t,s));return}n.value!==null&&(e.put(t,s,n.value),n.format!==void 0&&e.implied.set(placeKey(t,s),n.format))}table(e,t,s){const n=x(t.at);if(!n){this.yaml([...s,"at"],`${t.at} is not a cell`);return}if(!validName(t.name)){this.yaml([...s,"name"],`${t.name} cannot be a table's name`);return}if(this.wb.table(t.name)){this.yaml([...s,"name"],`two tables are named ${t.name}`);return}this.wb.name(t.name)&&this.yaml([...s,"name"],`${t.name} is a defined name and a table's`);const i=new Table(t.name,e,n,t.rows,t),r=this.csv(t.rows,[...s,"rows"],`table ${t.name}`),l=r?.rows??[],o=r?.lines??[],f=l[0],h=o[0]??1,m=new Set,g=f?.length===0?[""]:f??[];g.forEach((u,d)=>{const p=u.trim();p===""&&this.problems.push({file:t.rows,line:h,message:`column ${String(d+1)} has no name`}),m.has(p.toLowerCase())&&this.problems.push({file:t.rows,line:h,message:`two columns are named ${p}`}),m.add(p.toLowerCase()),i.columns.push({name:p,index:i.columns.length,csv:d})});for(const[u,d]of Object.entries(t.columns??{})){const p=i.column(u),S=p??{name:u,index:i.columns.length};p||(d.formula===void 0&&this.yaml([...s,"columns",u],`table ${t.name} has no column ${u}`),i.columns.push(S)),S.spec=d}const c=g.length;for(let u=1;u<l.length;u++){const d=l[u];if(!d||d.length===0)continue;const p=o[u]??u+1;i.places.push(u),i.records.push(d),i.lines.push(p),d.length>c&&this.problems.push({file:t.rows,line:p,message:`this row has ${String(d.length)} fields and the header ${String(c)}`})}i.rows=i.records.length;const b=this.overlapping(e,i.area);b&&this.yaml(s,`table ${t.name} overlaps ${b} on ${e.name}`),this.wb.addTable(i),this.tableKey(i,s);const w=n.row+1;i.columns.forEach(u=>{const d=n.col+u.index;e.put(n.row,d,u.name);const p=u.spec?.formula;p!==void 0&&(u.formula=new SharedFormula(p,w,d,{file:k(s),path:[...s,"columns",u.name,"formula"]}),i.rows>0&&e.fills.push({area:{top:w,left:d,bottom:w+i.rows-1,right:d},shared:u.formula})),u.csv!==void 0&&i.records.forEach((S,L)=>{this.typed(e,w+L,d,A(S[u.csv??0]??""),{file:t.rows,line:i.lines[L]??1})})})}tableKey(e,t){const{key:s}=e.spec;if(s===void 0)return;const n=e.column(s);if(n?.csv===void 0){this.yaml([...t,"key"],`table ${e.name} has no column ${s} in ${e.file}`);return}const i=new Set;e.records.forEach((r,l)=>{const o=r[n.csv??0]??"",f=e.lines[l]??1;o===""?this.problems.push({file:e.file,line:f,message:`this row has no ${s}, table ${e.name}'s key`}):i.has(o)&&this.problems.push({file:e.file,line:f,message:`two rows have the key ${o}`}),i.add(o)})}block(e,t,s,n){const i=x(t);if(!i){this.yaml([...n,"at"],`${t} is not a cell`);return}const r=this.csv(s,[...n,"rows"],"a block");if(!r)return;const l=r.rows,o=l.map((g,c)=>r.lines[c]??c+1),f=l.reduce((g,c)=>Math.max(g,c.length),1),h={top:i.row,left:i.col,bottom:i.row+Math.max(l.length,1)-1,right:i.col+f-1},m=this.overlapping(e,h);m&&this.yaml(n,`the block of ${s} overlaps ${m} on ${e.name}`),e.blocks.push({area:h,file:s,lines:o}),l.forEach((g,c)=>{g.forEach((b,w)=>{this.typed(e,i.row+c,i.col+w,A(b),{file:s,line:o[c]??c+1})})})}cells(e,t,s){const n=[];for(const[i,r]of Object.entries(t)){const l=[...s,i],o=$(i);if(!o){this.yaml(l,`${i} is not a cell or a range`);continue}const f=this.overlapping(e,o);if(f&&this.yaml(l,`${i} overlaps ${f}`),i.includes(":")){const h=(o.bottom-o.top+1)*(o.right-o.left+1);h>MAX_FILL_CELLS?this.yaml(l,`${i} is ${String(h)} cells`):this.fill(e,o,r,l)}else n.push([i,r,{row:o.top,col:o.left}])}for(const[i,r,l]of n){const o=[...s,i],f=K(r),h=placeKey(l.row,l.col);e.keys.set(h,i),f.value===null&&f.formula===void 0&&e.blanks.add(h),this.typed(e,l.row,l.col,f,{file:k(o),path:o});const m=r!==null&&typeof r=="object"?r.name:void 0;m!==void 0&&this.cellName(e,l,m,o)}}cellName(e,t,s,n){if(!validName(s)){this.yaml(n,`${s} cannot be a name`);return}if(this.wb.name(s)){this.yaml(n,`two places are named ${s}`);return}const i={file:k(n),path:n},r=H(t).replace(/^([A-Z]+)(\d+)$/u,"$$$1$$$2"),l=`='${e.name.replaceAll("'","''")}'!${r}`;this.wb.names.set(s.toLowerCase(),{name:s,formula:new SharedFormula(l,0,0,i),source:i})}fill(e,t,s,n){const i=K(s),r={file:k(n),path:n};e.fills.push(i.formula===void 0?{area:t,value:i.value,...i.format===void 0?{}:{format:i.format}}:{area:t,shared:new SharedFormula(i.formula,t.top,t.left,r)})}}function W(a,e,t,s){const n=x(a.at);if(!n){s([...t,"at"],`${a.at} is not a cell`);return}const i=(o,f)=>{const h=new SharedFormula(chartFormula(o),0,0,{file:k(f),path:f});return h.node&&!I(h.node)&&s(f,`${o} is not a range or a table's column`),h},r=(o,f)=>o?.startsWith("=")===!0?i(o,f):void 0,l=r(a.title,[...t,"title"]);return{spec:a,at:n,index:e,...a.categories===void 0?{}:{categories:i(a.categories,[...t,"categories"])},...l?{title:l}:{},series:a.series.map((o,f)=>{const h=[...t,"series",f],m=r(o.name,[...h,"name"]);return{values:i(o.values,[...h,"values"]),...o.x===void 0?{}:{x:i(o.x,[...h,"x"])},...m?{name:m}:{}}})}}export const chartFormula=a=>a.startsWith("=")?a:`=${a}`;function I(a){switch(a.kind){case"error":case"ref":case"structured":case"name":return!0;case"paren":case"postfix":return I(a.arg);case"binary":return a.op===":"||a.op===",";default:return!1}}function K(a){if(a===null)return{value:null};if(typeof a=="string")return A(a);if(typeof a!="object")return{value:a};if(a.formula!==void 0)return{value:null,formula:a.formula.startsWith("=")?a.formula:`=${a.formula}`};const{value:e}=a;return typeof e=="string"?A(e):{value:e??null}}export function readWorkbook(a){const e=D(a.text),t=l=>l[0]===M?void 0:e.lineOf(l);if(!e.file)return{problems:e.problems,lineOf:t};const s=O(e.file,a.generated),n=new Workbook(s.file,a.generated);n.ordinary=s.ordinary;const i=[],r=new N(n,l=>{const o=a.generated?.csv[l]??a.read(l);if(o===void 0)return;const f=R(o);for(const h of f.problems)i.push({file:l,line:h.line,message:h.message});return{rows:f.records.map(h=>h.end===h.start?[]:h.fields),lines:f.records.map(h=>h.line)}},t,s.own,s.names);return r.read(),{workbook:n,problems:[...i,...r.problems],lineOf:t}}export function workbookOf(a){const e=O(a.file,a.generated),t=new Workbook(e.file,a.generated);return t.ordinary=e.ordinary,new N(t,s=>{const n=a.generated?.csv[s];if(n!==void 0)return{rows:R(n).records.map(r=>r.end===r.start?[]:r.fields),lines:[]};const i=a.rows(s);return i&&{rows:i,lines:[]}},()=>{},e.own,e.names).read(),t}export{U as rangeName};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A value as a whole file. */
|
|
2
|
+
export declare function writeYaml(value: unknown): string;
|
|
3
|
+
/** `text` saying `next`, with what did not change kept as it was written. */
|
|
4
|
+
export declare function patchYaml(text: string, next: unknown): string;
|
|
5
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{Document as D,isMap as a,isScalar as I,isSeq as d,parseDocument as L}from"yaml";const M=n=>I(n.key)?String(n.key.value):void 0,B=96,F=n=>I(n)||d(n)&&n.items.every(I),G=new Set(["","sheets[]","tables[]","cells","columns","rows","names","scenarios"]);function v(n,r){if(d(n)){for(const e of n.items)v(e,`${r}[]`);n.flow=n.items.every(I)}else if(a(n)){for(const e of n.items)v(e.value,M(e)??"");n.flow=!G.has(r)&&n.items.length>0&&n.items.every(e=>F(e.value)||a(e.value)&&e.value.flow===!0),n.flow&&new D(n).toString({lineWidth:0,flowCollectionPadding:!0}).length>B&&(n.flow=!1)}}const P={lineWidth:0,flowCollectionPadding:!0};export function writeYaml(n){const r=new D(n,{aliasDuplicateObjects:!1});v(r.contents,"");const e=r.toString(P);return e===`{}
|
|
3
|
+
`?"":b(e)}const b=n=>n.replace(/\[ ([^[\]{}"'\n]*) \]/g,"[$1]").replace(/\[ \{/g,"[{").replace(/\} \]/g,"}]"),T=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);function h(n,r){if(n===r)return!0;if(Array.isArray(n)&&Array.isArray(r))return n.length===r.length&&n.every((t,c)=>h(t,r[c]));if(!T(n)||!T(r))return!1;const e=t=>Object.keys(t).filter(c=>t[c]!==void 0),i=e(n);return i.length===e(r).length&&i.every(t=>t in r&&h(n[t],r[t]))}function R(n,r,e,i,t){if(!h(r,e)){if(a(n)&&!n.flow&&T(r)&&T(e)){for(const c of new Set([...Object.keys(r),...Object.keys(e)])){const s=n.items.find(o=>M(o)===c)?.value;h(r[c],e[c])||R(s,r[c],e[c],[...i,c],t)}return}if(d(n)&&!n.flow&&Array.isArray(r)&&Array.isArray(e)&&e.length>0){const c=Math.min(r.length,e.length);let s=0;for(;s<c&&h(r[s],e[s]);)s++;let o=0;for(;o<c-s&&h(r[r.length-1-o],e[e.length-1-o]);)o++;const m=r.length-s-o,y=e.length-s-o,g=Math.min(m,y);for(let l=s;l<s+g;l++)R(n.items[l],r[l],e[l],[...i,l],t);for(let l=s+m-1;l>=s+g;l--)t.push({path:[...i,l],value:void 0});for(let l=s+g;l<s+y;l++)t.push({path:[...i,l],value:e[l],...o>0?{insert:!0}:{}});return}t.push({path:i,value:e})}}const A=(n,r)=>n.lastIndexOf(`
|
|
4
|
+
`,r-1)+1,C=(n,r)=>{const e=n.indexOf(`
|
|
5
|
+
`,r);return e<0?n.length:e+1},U=(n,r)=>n.split(`
|
|
6
|
+
`).map((e,i)=>i===0||e===""?e:" ".repeat(r)+e).join(`
|
|
7
|
+
`);function Y(n,r,e,i){const t=new D({[n]:r},{aliasDuplicateObjects:!1}),c=t.contents;v(c,"");const s=c.items[0];return(a(i)||d(i))&&(a(s?.value)||d(s?.value))&&(s.value.flow=i.flow??!1),U(b(t.toString(P).replace(/\n$/,"")),e)}function E(n,r,e){const i=new D([n],{aliasDuplicateObjects:!1}),t=i.contents;return v(t,e),t.flow=!1,U(b(i.toString(P).replace(/\n$/,"")),r)}function H(n,r){let e=n.contents;for(const i of r.slice(0,-1))if(a(e)){if(e.flow)return;e=e.items.find(t=>M(t)===String(i))?.value}else if(d(e)){if(e.flow)return;e=e.items[Number(i)]}else return;return a(e)||d(e)?e:void 0}function K(n,r){const e=r.items[0]?.range?.[0];if(e===void 0)return;const i=A(n,e),t=n.indexOf("-",i);return t>=0&&t<e?t-i:void 0}function Q(n,r){const e=L(n);if(e.errors.length>0)return;const{path:i,value:t}=r,c=i[i.length-1],s=H(e,i);if(c===void 0||!s||s.flow)return;if(d(s)){const u=Number(c),f=K(n,s);if(f===void 0)return;const p=s.items[u];if(t===void 0){const S=p?.range?.[0],$=p?.range?.[1];return S===void 0||$===void 0?void 0:n.slice(0,A(n,S))+n.slice(C(n,$-1))}if(r.insert===!0){const S=p?.range?.[0];if(S===void 0)return;const $=A(n,S);return`${n.slice(0,$)}${" ".repeat(f)}${E(t,f,String(i[i.length-2]))}
|
|
8
|
+
${n.slice($)}`}if(p)return;const N=s.items[s.items.length-1]?.range?.[1];if(N===void 0)return;const j=n.charAt(N-1)===`
|
|
9
|
+
`?N:C(n,N),z=j>0&&n.charAt(j-1)!==`
|
|
10
|
+
`?`
|
|
11
|
+
`:"";return`${n.slice(0,j)}${z}${" ".repeat(f)}${E(t,f,String(i[i.length-2]??""))}
|
|
12
|
+
${n.slice(j)}`}const o=String(c),m=s.items.find(u=>M(u)===o),y=m?.key,g=m?.value??void 0,J=s.items[0]?.key?.range?.[0],O=J===void 0?2*(i.length-1):J-A(n,J);if(m&&y?.range){const u=y.range[0],f=g?.range?g.range[1]:y.range[1];if(t===void 0)return n.slice(0,A(n,u))+n.slice(C(n,f-1));const p=n.charAt(f-1)===`
|
|
13
|
+
`?`
|
|
14
|
+
`:"";return n.slice(0,u)+Y(o,t,O,g)+p+n.slice(f)}if(t===void 0)return n;const W=Y(o,t,O,void 0),q=s.items[s.items.length-1],w=(q?.value??q?.key)?.range?.[1];if(w===void 0){const u=n===""||n.endsWith(`
|
|
15
|
+
`)?"":`
|
|
16
|
+
`;return`${n}${u}${" ".repeat(O)}${W}
|
|
17
|
+
`}const k=n.charAt(w-1)===`
|
|
18
|
+
`?w:C(n,w),_=k>0&&n.charAt(k-1)!==`
|
|
19
|
+
`?`
|
|
20
|
+
`:"";return`${n.slice(0,k)}${_}${" ".repeat(O)}${W}
|
|
21
|
+
${n.slice(k)}`}const V=400;export function patchYaml(n,r){const e=L(n);if(e.errors.length>0||n.trim()!==""&&!a(e.contents)||n.trim()==="")return writeYaml(r);const i=[];if(R(e.contents,e.toJS(),r,[],i),i.length===0)return n;if(i.length>V)return writeYaml(r);let t=n;for(const s of i){const o=Q(t,s);if(o===void 0)return writeYaml(r);t=o}const c=L(t);return c.errors.length===0&&h(c.toJS(),X(r))?t:writeYaml(r)}const X=n=>JSON.parse(JSON.stringify(n));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SheetChart } from "@allyhub-next/formats";
|
|
2
|
+
import type { Calc } from "../calc/engine.js";
|
|
3
|
+
import type { Chart, Worksheet } from "../workbook.js";
|
|
4
|
+
import { type Tag } from "./xml.js";
|
|
5
|
+
/** A chart's part. */
|
|
6
|
+
export declare function chartPart(calc: Calc, sheet: Worksheet, chart: Chart): string;
|
|
7
|
+
/** A picture of a `files` cell in a sheet's drawing: `file` is its media part. */
|
|
8
|
+
export interface DrawnPicture {
|
|
9
|
+
row: number;
|
|
10
|
+
col: number;
|
|
11
|
+
/** How far into its cell, px. */
|
|
12
|
+
x: number;
|
|
13
|
+
/** Down it: a picture over the cells; one in a cell has none, and its row grows to hold it. */
|
|
14
|
+
y?: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
name: string;
|
|
18
|
+
file: string;
|
|
19
|
+
bytes: Uint8Array;
|
|
20
|
+
}
|
|
21
|
+
/** A sheet's drawing: each chart at its anchor, then each picture, by their relationships' numbers. */
|
|
22
|
+
export declare function drawingPart(charts: readonly Chart[], pictures?: readonly DrawnPicture[]): string;
|
|
23
|
+
/** What a chart reads as, before its references are named as the sheet names them. */
|
|
24
|
+
export type ReadChart = SheetChart;
|
|
25
|
+
/** A chart part as sheet.yaml writes one, or why it cannot be. */
|
|
26
|
+
export declare function readChart(root: Tag | undefined): ReadChart | string;
|
|
27
|
+
export interface Anchored {
|
|
28
|
+
/** Its relationship in the drawing's part. */
|
|
29
|
+
id: string;
|
|
30
|
+
at: {
|
|
31
|
+
row: number;
|
|
32
|
+
col: number;
|
|
33
|
+
};
|
|
34
|
+
x?: number;
|
|
35
|
+
y?: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}
|
|
39
|
+
/** Each chart of a drawing where it sits, sizes in pixels. */
|
|
40
|
+
export declare function chartAnchors(root: Tag | undefined, columnWidth: (col: number) => number, rowHeight: (row: number) => number): {
|
|
41
|
+
anchors: Anchored[];
|
|
42
|
+
others: number;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=charts.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{CHART_DEFAULTS as Q,chartSpaceXml as ce}from"@allyhub-next/chart";import{columnLetter as Y}from"../address.js";import{Reference as Z,Union as ae}from"../calc/types.js";import{chartDef as fe,chartSize as de}from"../chart.js";import{sheetPrefix as le}from"../formula/print.js";import{HEAD as ue,attr as C,el as s,flag as ee,numberAttr as P,tag as o,tags as S,textOf as y}from"./xml.js";const he="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",me="http://schemas.openxmlformats.org/drawingml/2006/main",te="http://schemas.openxmlformats.org/drawingml/2006/chart",re="http://schemas.openxmlformats.org/officeDocument/2006/relationships",p=9525,xe=(e,t)=>`${le(e.sheet.name)}$${Y(e.left)}$${String(e.top+1)}${e.single?"":`:$${Y(e.right)}$${String(t+1)}`}`;function k(e,t,r){if(!r?.node)return;const n=e.eval(r.node,{sheet:t,row:0,col:0,dr:0,dc:0}),i=a=>xe(a,Math.min(a.bottom,Math.max(a.top,a.sheet.lastRow)));if(n instanceof Z)return i(n);if(n instanceof ae)return`(${n.parts.map(i).join(",")})`}function ge(e,t,r){if(!r?.node)return!1;const n=e.eval(r.node,{sheet:t,row:0,col:0,dr:0,dc:0});return n instanceof Z&&typeof e.value(n.sheet,n.top,n.left)=="number"}export function chartPart(e,t,r){const n=fe(e,t,r),i={name:f=>k(e,t,r.series[f]?.name),categories:k(e,t,r.categories),numeric:ge(e,t,r.categories),values:f=>k(e,t,r.series[f]?.values)??"",x:f=>k(e,t,r.series[f]?.x??r.categories)},a=k(e,t,r.title);return ce(n,{refs:i,...a===void 0?{}:{titleRef:a}})}const pe=(e,t,r)=>s("xdr:oneCellAnchor",{},s("xdr:from",{},`<xdr:col>${String(e.col)}</xdr:col>`,`<xdr:colOff>${String(Math.round(e.x*p))}</xdr:colOff>`,`<xdr:row>${String(e.row)}</xdr:row>`,`<xdr:rowOff>${String(Math.round((e.y??0)*p))}</xdr:rowOff>`),s("xdr:ext",{cx:Math.round(e.width*p),cy:Math.round(e.height*p)}),s("xdr:pic",{},s("xdr:nvPicPr",{},s("xdr:cNvPr",{id:t,name:e.name}),s("xdr:cNvPicPr",{},s("a:picLocks",{noChangeAspect:!0}))),s("xdr:blipFill",{},s("a:blip",{"xmlns:r":re,"r:embed":`rId${String(r)}`}),s("a:stretch",{},s("a:fillRect"))),s("xdr:spPr",{},s("a:xfrm",{},s("a:off",{x:0,y:0}),s("a:ext",{cx:Math.round(e.width*p),cy:Math.round(e.height*p)})),s("a:prstGeom",{prst:"rect"},s("a:avLst")))),s("xdr:clientData"));export function drawingPart(e,t=[]){const r=(n,i)=>{const{width:a,height:f}=de(n.spec);return s("xdr:oneCellAnchor",{},s("xdr:from",{},`<xdr:col>${String(n.at.col)}</xdr:col>`,`<xdr:colOff>${String(Math.round((n.spec.x??0)*p))}</xdr:colOff>`,`<xdr:row>${String(n.at.row)}</xdr:row>`,`<xdr:rowOff>${String(Math.round((n.spec.y??0)*p))}</xdr:rowOff>`),s("xdr:ext",{cx:Math.round(a*p),cy:Math.round(f*p)}),s("xdr:graphicFrame",{macro:""},s("xdr:nvGraphicFramePr",{},s("xdr:cNvPr",{id:i+2,name:`Chart ${String(i+1)}`}),s("xdr:cNvGraphicFramePr")),s("xdr:xfrm",{},s("a:off",{x:0,y:0}),s("a:ext",{cx:0,cy:0})),s("a:graphic",{},s("a:graphicData",{uri:te},s("c:chart",{"xmlns:c":te,"xmlns:r":re,"r:id":`rId${String(i+1)}`})))),s("xdr:clientData"))};return ue+s("xdr:wsDr",{"xmlns:xdr":he,"xmlns:a":me},...e.map(r),...t.map((n,i)=>pe(n,e.length+i+2,e.length+i+1)))}function G(e){if(Array.isArray(e))return e.map(G).join("");if(typeof e!="object"||e===null)return"";const t=e,r=[];for(const[n,i]of Object.entries(t))n==="t"?r.push(y(i)):typeof i=="object"&&r.push(G(i));return r.join("")}const T=e=>{const t=o(e?.solidFill),r=C(o(t?.srgbClr),"val");return r!==void 0?`#${r.toUpperCase()}`:we[C(o(t?.schemeClr),"val")??""]},we={accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47"},O=(e,t)=>C(o(e?.[t]),"val"),$=(e,t)=>P(o(e?.[t]),"val"),D=(e,t)=>ee(o(e?.[t]),"val");function ne(e){if(!e)return;const t=o(e.tx),r=o(t?.strRef);if(r)return`=${y(r.f)}`;const n=G(t?.rich);return n===""?void 0:n}function oe(e){if(!e)return;const t=o(e.scaling),r=o(e.numFmt),n=C(r,"formatCode"),i={},a=ne(o(e.title));a!==void 0&&(i.title=a);const f=$(t,"min"),w=$(t,"max"),l=$(e,"majorUnit");return f!==void 0&&(i.min=f),w!==void 0&&(i.max=w),l!==void 0&&l>0&&(i.major=l),D(e,"delete")===!0&&(i.visible=!1),O(t,"orientation")==="maxMin"&&(i.reverse=!0),n!==void 0&&n!=="General"&&ee(r,"sourceLinked")!==!0&&(i.format=n),i}const R=e=>{const t=o(e?.numRef)??o(e?.strRef),r=t?y(t.f):"";return r===""?void 0:r};function be(e,t){const r=R(o(e[t?"yVal":"val"]));if(r===void 0)return"its numbers are written in the chart";const n={values:r},i=o(e.tx),a=R(i);if(a!==void 0)n.name=`=${a}`;else{const g=y(i?.v);g!==""&&(n.name=g)}const f=o(e.spPr),w=o(f?.ln),l=o(e.marker),c=t||l!==void 0,d=T(f)??(c?T(w)??T(o(l?.spPr)):void 0);d!==void 0&&(n.color=d);const h=P(w,"w");if(c&&h!==void 0&&w?.noFill===void 0){const g=Number((h/12700).toFixed(2));g!==Q.lineWidth&&(n.line_width=g)}D(e,"smooth")===!0&&(n.smooth=!0);const m=$(l,"size");m!==void 0&&m!==Q.marker&&(n.marker_size=m);const b=t?R(o(e.xVal)):void 0;b!==void 0&&(n.x=b);const x=t?void 0:R(o(e.cat));return{series:n,...x===void 0?{}:{categories:x}}}function ve(e){const t=O(e,"barDir")==="bar"?"bar":"column",r=O(e,"grouping");return r==="stacked"?`${t}-stacked`:r==="percentStacked"?`${t}-stacked-100`:`${t}-clustered`}function ye(e){const t=O(e,"grouping");return t==="stacked"?"area-stacked":t==="percentStacked"?"area-stacked-100":"area"}export function readChart(e){const t=o(e?.chartSpace),r=o(t?.chart),n=o(r?.plotArea);if(!r||!n)return"it has no plot";const i=Object.entries(n).filter(([u])=>u.endsWith("Chart")),[a]=i;if(!a)return"it has no plot";if(i.length>1||Array.isArray(a[1])&&a[1].length>1)return"it combines several kinds of chart";const[f,w]=a,l=o(w);if(!l)return"it has no plot";const c=S(l.ser),d=f==="scatterChart",h=[];let m;for(const u of c){const A=be(u,d);if(typeof A=="string")return A;h.push(A.series),m??=A.categories}if(h.length===0)return"it has no series";const b=u=>o(o(u.spPr)?.ln)?.noFill!==void 0,x=u=>O(o(u.marker),"symbol")==="none",g=(()=>{switch(f){case"barChart":return ve(l);case"lineChart":return c.every(x)?"line":"line-markers";case"areaChart":return ye(l);case"pieChart":return"pie";case"doughnutChart":return"doughnut";case"scatterChart":return c.every(b)?"scatter":c.some(u=>D(u,"smooth")===!0)?"scatter-smooth":"scatter-lines";default:return}})();if(!g)return`a sheet has no ${f.replace(/Chart$/u,"")} chart`;const U=ne(o(r.title)),I=o(r.legend),j=O(I,"legendPos"),V=o(l.dLbls),v=u=>D(V,u)===!0,se=v("showVal")||v("showPercent")||v("showCatName")||v("showSerName"),H=O(V,"dLblPos"),F=$(l,"gapWidth"),W=$(l,"overlap"),N=$(l,"holeSize"),X=D(l,"varyColors"),B=g==="pie"||g==="doughnut",M={value:S(n.valAx).find((u,A,ie)=>d?A===ie.length-1:!0),category:d?S(n.valAx)[0]:o(n.catAx)??o(n.dateAx)},L=oe(M.value),z=oe(M.category);L&&M.value?.majorGridlines===void 0&&(L.gridlines=!1),z&&M.category?.majorGridlines!==void 0&&(z.gridlines=!0);const E=P(o(o(o(o(t?.txPr)?.p)?.pPr)?.defRPr),"sz"),q=u=>u&&Object.keys(u).length>0?u:void 0,J=q(L),K=q(z);return{type:g,at:"A1",...U===void 0?{}:{title:U},...m===void 0?{}:{categories:m},series:B?h.slice(0,1):h,...I?{legend:j==="b"?"bottom":j==="t"?"top":j==="l"?"left":"right"}:{},...se?{labels:{...v("showVal")?{value:!0}:{},...v("showPercent")?{percentage:!0}:{},...v("showCatName")?{category:!0}:{},...v("showSerName")?{series:!0}:{},...H===void 0?{}:{position:H}}}:{},...F===void 0||F===150?{}:{gap_width:F},...W===void 0||g.includes("stacked")?{}:{overlap:W},...N===void 0||N===50?{}:{hole_size:N},...X===!0&&f==="barChart"?{vary_by_categories:!0}:{},...X===!1&&B?{vary_by_categories:!1}:{},...J?{value_axis:J}:{},...K?{category_axis:K}:{},...E===void 0||E===900?{}:{size:E/100}}}const _=e=>Math.round(e/p);export function chartAnchors(e,t,r){const n=o(e?.wsDr),i=[];let a=0;const f=c=>({col:Number(y(c?.col)),row:Number(y(c?.row)),colOff:_(Number(y(c?.colOff))),rowOff:_(Number(y(c?.rowOff)))}),w=c=>C(o(o(o(o(c.graphicFrame)?.graphic)?.graphicData)?.chart),"id"),l=(c,d,h,m)=>{const b=w(c);if(b===void 0){a+=1;return}i.push({id:b,at:{row:d.row,col:d.col},...d.colOff>0?{x:d.colOff}:{},...d.rowOff>0?{y:d.rowOff}:{},width:h,height:m})};for(const c of S(n?.oneCellAnchor)){const d=o(c.ext);l(c,f(o(c.from)),_(P(d,"cx")??0),_(P(d,"cy")??0))}for(const c of S(n?.twoCellAnchor)){const d=f(o(c.from)),h=f(o(c.to));let m=h.colOff-d.colOff;for(let x=d.col;x<h.col;x++)m+=t(x);let b=h.rowOff-d.rowOff;for(let x=d.row;x<h.row;x++)b+=r(x);l(c,d,m,b)}return{anchors:i,others:a}}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Tag } from "./xml.js";
|
|
2
|
+
/** The Office theme's colours, for a file with no theme part. */
|
|
3
|
+
export declare const OFFICE_THEME: readonly string[];
|
|
4
|
+
/** A theme part's colours in the order a colour's `theme` counts them: light before dark. */
|
|
5
|
+
export declare function themeColors(text: string): string[];
|
|
6
|
+
/** A colour tinted as ECMA-376 says: towards black below 0, towards white above. */
|
|
7
|
+
export declare function tinted(hex: string, tint: number): string;
|
|
8
|
+
export interface Palette {
|
|
9
|
+
theme: readonly string[];
|
|
10
|
+
/** A file's own palette, when styles.xml has one. */
|
|
11
|
+
indexed: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
export declare const paletteOf: (theme: readonly string[], styles: Tag | undefined) => {
|
|
14
|
+
theme: readonly string[];
|
|
15
|
+
indexed: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
/** A `<color>`-shaped element as #RRGGBB; undefined when it says automatic or nothing. */
|
|
18
|
+
export declare function colorOf(t: Tag | undefined, p: Palette): string | undefined;
|
|
19
|
+
//# sourceMappingURL=colors.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{readXml as d,tag as c,tags as l,attr as i}from"./xml.js";const f="000000 FFFFFF FF0000 00FF00 0000FF FFFF00 FF00FF 00FFFF 000000 FFFFFF FF0000 00FF00 0000FF FFFF00 FF00FF 00FFFF 800000 008000 000080 808000 800080 008080 C0C0C0 808080 9999FF 993366 FFFFCC CCFFFF 660066 FF8080 0066CC CCCCFF 000080 FF00FF FFFF00 00FFFF 800080 800000 008080 0000FF 00CCFF CCFFFF CCFFCC FFFF99 99CCFF FF99CC CC99FF FFCC99 3366FF 33CCCC 99CC00 FFCC00 FF9900 FF6600 666699 969696 003366 339966 003300 333300 993300 993366 333399 333333".split(" ");export const OFFICE_THEME=["FFFFFF","000000","E7E6E6","44546A","4472C4","ED7D31","A5A5A5","FFC000","5B9BD5","70AD47","0563C1","954F72"];export function themeColors(r){const t=d(r),e=c(c(c(t.theme)?.themeElements)?.clrScheme);if(!e)return[...OFFICE_THEME];const n=(F,s)=>{const C=c(e[F]),o=c(C?.srgbClr),u=c(C?.sysClr);return(i(o,"val")??i(u,"lastClr")??OFFICE_THEME[s]??"000000").toUpperCase()};return[n("lt1",0),n("dk1",1),n("lt2",2),n("dk2",3),...[1,2,3,4,5,6].map(F=>n(`accent${String(F)}`,F+3)),n("hlink",10),n("folHlink",11)]}function m(r){const t=Number.parseInt(r.slice(0,2),16)/255,e=Number.parseInt(r.slice(2,4),16)/255,n=Number.parseInt(r.slice(4,6),16)/255,F=Math.max(t,e,n),s=Math.min(t,e,n),C=(F+s)/2;if(F===s)return[0,0,C];const o=F-s,u=C>.5?o/(2-F-s):o/(F+s);return[(F===t?(e-n)/o+(e<n?6:0):F===e?(n-t)/o+2:(t-e)/o+4)/6,u,C]}function a(r,t,e){const n=e<.5?e*(1+t):e+t-e*t,F=2*e-n,s=C=>{const o=C<0?C+1:C>1?C-1:C,u=t===0?e:o<1/6?F+(n-F)*6*o:o<1/2?n:o<2/3?F+(n-F)*(2/3-o)*6:F;return Math.round(u*255).toString(16).toUpperCase().padStart(2,"0")};return`${s(r+1/3)}${s(r)}${s(r-1/3)}`}export function tinted(r,t){if(t===0)return r;const[e,n,F]=m(r),s=t<0?F*(1+t):F*(1-t)+t;return a(e,n,Math.min(1,Math.max(0,s)))}export const paletteOf=(r,t)=>{const e=l(c(c(t?.colors)?.indexedColors)?.rgbColor);return{theme:r,indexed:e.length>0?e.map(n=>(i(n,"rgb")??"00000000").slice(-6).toUpperCase()):f}};export function colorOf(r,t){if(!r||i(r,"auto")==="1")return;const e=i(r,"rgb"),n=Number(i(r,"tint")??0);let F;e!==void 0&&(F=e.slice(-6).toUpperCase());const s=i(r,"theme");F===void 0&&s!==void 0&&(F=t.theme[Number(s)]);const C=i(r,"indexed");if(F===void 0&&C!==void 0){const o=Number(C);o===64?F="000000":o===65?F="FFFFFF":F=t.indexed[o]}return F===void 0?void 0:`#${tinted(F,n)}`}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Node, Parsed } from "../formula/ast.js";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a formula needs array evaluation: ranges or arrays where one value
|
|
4
|
+
* is expected. `isRangeName` says whether a name stands for several cells.
|
|
5
|
+
*/
|
|
6
|
+
export declare function needsArray(node: Node, isRangeName?: (name: string) => boolean): boolean;
|
|
7
|
+
/** A formula with the narrowing an ordinary <f> does written out with @. */
|
|
8
|
+
export declare function narrowed(n: Node): Node;
|
|
9
|
+
export interface FileFormulaContext {
|
|
10
|
+
/** The table the formula is in: the name a bare [@x] leaves out. */
|
|
11
|
+
table?: string | undefined;
|
|
12
|
+
/** Whether a name is a table's. */
|
|
13
|
+
isTable: (name: string) => boolean;
|
|
14
|
+
/** It is written as an array formula: nothing narrows, so @ is spelled. */
|
|
15
|
+
array: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** A formula's text as a file stores it: no =. */
|
|
18
|
+
export declare const fileFormula: (node: Node, c: FileFormulaContext) => string;
|
|
19
|
+
/** A formula as a file stores it, parsed. `array`: it is an array formula, so nothing narrows. */
|
|
20
|
+
export declare function readFileFormula(text: string, array: boolean): Parsed;
|
|
21
|
+
//# sourceMappingURL=formula.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{parseFormula as h}from"../formula/parse.js";import{printFormula as w}from"../formula/print.js";import{FUNCTIONS as S}from"../calc/functions/index.js";import{fileName as O,plainName as k}from"./functions.js";function g(r){switch(r.kind){case"ref":return r.col2!==void 0||r.row2!==void 0;case"structured":return!r.thisRow||r.columns.length>1;case"paren":return g(r.arg);case"binary":return r.op===":"||r.op===",";default:return!1}}const n=new Set(["+","-","*","/","^","&","=","<>","<","<=",">",">="]),E=new Set(`BYCOL BYROW CHOOSECOLS CHOOSEROWS DROP EXPAND FILTER HSTACK MAKEARRAY MAP
|
|
3
|
+
RANDARRAY SCAN SEQUENCE SORT SORTBY TAKE TEXTSPLIT TOCOL TOROW UNIQUE VSTACK
|
|
4
|
+
WRAPCOLS WRAPROWS`.split(/\s+/u)),p=new Set(["IF","IFERROR","IFNA"]),d=r=>S.get(r)?.kind==="scalar";export function needsArray(r,t=()=>!1){const a=e=>g(e)||e.kind==="array"||e.kind==="name"&&t(e.name)||e.kind==="paren"&&a(e.arg),s=e=>{switch(e.kind){case"unary":return e.op==="@"?!1:a(e.arg)||s(e.arg);case"postfix":return e.op==="%"?a(e.arg)||s(e.arg):!1;case"paren":return s(e.arg);case"binary":return n.has(e.op)&&(a(e.left)||a(e.right))?!0:s(e.left)||s(e.right);case"call":return e.name==="LET"||e.name==="LAMBDA"||E.has(e.name)||d(e.name)&&e.args.some(a)||p.has(e.name)&&e.args[0]&&a(e.args[0])?!0:e.args.some(s);case"invoke":return s(e.callee)||e.args.some(s);default:return!1}};return s(r)}export function narrowed(r){const t=a=>a.kind!=="array"&&g(a)?{kind:"unary",op:"@",arg:a}:narrowed(a);switch(r.kind){case"unary":return r.op==="@"?r:{...r,arg:t(r.arg)};case"postfix":return r.op==="%"?{...r,arg:t(r.arg)}:r;case"paren":return{...r,arg:narrowed(r.arg)};case"binary":return n.has(r.op)?{...r,left:t(r.left),right:t(r.right)}:r;case"call":{if(d(r.name))return{...r,args:r.args.map(t)};const[a,...s]=r.args;return p.has(r.name)&&a?{...r,args:[t(a),...s]}:r}default:return r}}const R=(r,t)=>({kind:"call",name:r,written:r,args:t});function y(r,t){return{...r,...r.table===void 0&&t!==void 0?{table:t}:{},sections:r.thisRow?["#This Row"]:r.sections,thisRow:!1}}function f(r,t,a,s){const e=(u,o=!1)=>f(u,t,a,o&&s);switch(r.kind){case"name":{const u=r.name.toLowerCase();return a.has(u)?{...r,name:`_xlpm.${r.name}`}:t.isTable(r.name)?{...r,name:`${r.name}[]`}:r}case"structured":return y(r,t.table);case"unary":return r.op==="@"?s?e(r.arg,!0):R("_xlfn.SINGLE",[e(r.arg)]):{...r,arg:e(r.arg,!0)};case"postfix":return r.op==="#"?R("_xlfn.ANCHORARRAY",[e(r.arg)]):{...r,arg:e(r.arg,!0)};case"paren":return{...r,arg:e(r.arg,!0)};case"binary":return{...r,left:e(r.left,n.has(r.op)),right:e(r.right,n.has(r.op))};case"call":{const u=O(r.name);if(r.name==="LET"||r.name==="LAMBDA"){const o=new Set(a),m=r.args.length-1,A=r.args.map((c,l)=>(r.name==="LAMBDA"||l%2===0)&&l<m&&c.kind==="name"?(o.add(c.name.toLowerCase()),{...c,name:`_xlpm.${c.name}`}):f(c,t,o,!1));return{...r,written:u,args:A}}return{...r,written:u,args:r.args.map(o=>e(o))}}case"invoke":return{...r,callee:e(r.callee),args:r.args.map(u=>e(u))};case"array":return{...r,rows:r.rows.map(u=>u.map(o=>e(o)))};default:return r}}export const fileFormula=(r,t)=>w(f(r,t,new Set,!t.array)).slice(1);function i(r){switch(r.kind){case"name":return r.name.toLowerCase().startsWith("_xlpm.")?{...r,name:r.name.slice(6)}:r;case"structured":return r;case"unary":case"postfix":case"paren":return{...r,arg:i(r.arg)};case"binary":return{...r,left:i(r.left),right:i(r.right)};case"call":{const a=k(r.written).toUpperCase(),s=r.args.map(i),[e]=s;return a==="ANCHORARRAY"&&e&&s.length===1?{kind:"postfix",op:"#",arg:e}:a==="SINGLE"&&e&&s.length===1?{kind:"unary",op:"@",arg:e}:{...r,name:a,written:a,args:s}}case"invoke":return{...r,callee:i(r.callee),args:r.args.map(i)};case"array":return{...r,rows:r.rows.map(t=>t.map(i))};default:return r}}export function readFileFormula(r,t){const a=h(`=${r}`);if(!a.ok)return a;const s=i(a.node);return{ok:!0,node:t?s:narrowed(s)}}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A function's name as a file stores it. */
|
|
2
|
+
export declare function fileName(name: string): string;
|
|
3
|
+
/** A name as a formula writes it, whatever prefix a file stored it under. */
|
|
4
|
+
export declare const plainName: (name: string) => string;
|
|
5
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
const E=`ACOT ACOTH AGGREGATE ARABIC ARRAYTOTEXT BASE BETA.DIST BETA.INV BINOM.DIST
|
|
3
|
+
BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR BYCOL BYROW CEILING.MATH
|
|
4
|
+
CEILING.PRECISE CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSECOLS
|
|
5
|
+
CHOOSEROWS COMBINA CONCAT CONFIDENCE.NORM CONFIDENCE.T COT COTH COVARIANCE.P COVARIANCE.S
|
|
6
|
+
CSC CSCH DAYS DECIMAL DROP ERF.PRECISE ERFC.PRECISE EXPAND EXPON.DIST F.DIST F.DIST.RT F.INV
|
|
7
|
+
F.INV.RT F.TEST FILTERXML FLOOR.MATH FLOOR.PRECISE FORECAST.ETS FORECAST.ETS.CONFINT
|
|
8
|
+
FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT GAMMA GAMMA.DIST
|
|
9
|
+
GAMMA.INV GAMMALN.PRECISE GAUSS HSTACK HYPGEOM.DIST IFNA IFS IMAGE IMCOSH IMCOT IMCSC IMCSCH
|
|
10
|
+
IMSEC IMSECH IMSINH IMTAN ISFORMULA ISOMITTED ISOWEEKNUM LAMBDA LET LOGNORM.DIST LOGNORM.INV
|
|
11
|
+
MAKEARRAY MAP MAXIFS MINIFS MODE.MULT MODE.SNGL MUNIT NEGBINOM.DIST NORM.DIST NORM.INV
|
|
12
|
+
NORM.S.DIST NORM.S.INV NUMBERVALUE PDURATION PERCENTILE.EXC PERCENTILE.INC PERCENTRANK.EXC
|
|
13
|
+
PERCENTRANK.INC PERMUTATIONA PHI POISSON.DIST QUARTILE.EXC QUARTILE.INC QUERYSTRING RANDARRAY
|
|
14
|
+
RANK.AVG RANK.EQ REDUCE REGEXEXTRACT REGEXREPLACE REGEXTEST RRI SCAN SEC SECH SEQUENCE SHEET
|
|
15
|
+
SHEETS SKEW.P SORTBY STDEV.P STDEV.S SWITCH T.DIST T.DIST.2T T.DIST.RT T.INV T.INV.2T T.TEST
|
|
16
|
+
TAKE TEXTAFTER TEXTBEFORE TEXTJOIN TEXTSPLIT TOCOL TOROW UNICHAR UNICODE UNIQUE VALUETOTEXT
|
|
17
|
+
VAR.P VAR.S VSTACK WEBSERVICE WEIBULL.DIST WRAPCOLS WRAPROWS XLOOKUP XMATCH XOR Z.TEST`,I=new Set(E.split(/\s+/u)),S=new Set(["FILTER","SORT"]);export function fileName(T){return S.has(T)?`_xlfn._xlws.${T}`:I.has(T)?`_xlfn.${T}`:T}export const plainName=T=>T.replace(/^(?:_xlfn\.|_xlws\.|_xludf\.)+/iu,"");
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ZipLimits } from "@allyhub-next/formats";
|
|
2
|
+
import type { SheetProblem } from "../file.js";
|
|
3
|
+
import { type Scalar } from "../values.js";
|
|
4
|
+
/** How far apart two numbers may be, as a share of the larger, and be the same. */
|
|
5
|
+
export declare const COMPARE_TOLERANCE = 1e-9;
|
|
6
|
+
export interface Difference {
|
|
7
|
+
sheet: string;
|
|
8
|
+
cell: string;
|
|
9
|
+
formula: string;
|
|
10
|
+
/** What the file cached. */
|
|
11
|
+
file: string | number | boolean | null;
|
|
12
|
+
engine: string | number | boolean | null;
|
|
13
|
+
}
|
|
14
|
+
export interface Compared {
|
|
15
|
+
/** Formulas carried over. */
|
|
16
|
+
formulas: number;
|
|
17
|
+
same: number;
|
|
18
|
+
/** Formulas the file holds no value for. */
|
|
19
|
+
uncached: number;
|
|
20
|
+
/** Formulas that read the clock or a random number, or what does: not compared. */
|
|
21
|
+
moving: number;
|
|
22
|
+
differences: Difference[];
|
|
23
|
+
}
|
|
24
|
+
export interface ImportedXlsx {
|
|
25
|
+
/** Paths from the sheet's folder, sheet.yaml first, and their text. */
|
|
26
|
+
files: Map<string, string>;
|
|
27
|
+
/** What was not carried over, a line each. */
|
|
28
|
+
lost: string[];
|
|
29
|
+
/** What is wrong with the workbook as it now is. */
|
|
30
|
+
problems: SheetProblem[];
|
|
31
|
+
compared: Compared;
|
|
32
|
+
sheets: number;
|
|
33
|
+
tables: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ImportOptions {
|
|
36
|
+
/** The workbook's title. */
|
|
37
|
+
name: string;
|
|
38
|
+
/** See COMPARE_TOLERANCE. */
|
|
39
|
+
tolerance?: number;
|
|
40
|
+
/** What the file may unzip to; ZIP_LIMITS unless it says. */
|
|
41
|
+
zip?: Partial<ZipLimits>;
|
|
42
|
+
}
|
|
43
|
+
/** Whether a value the engine gives is what a file cached. */
|
|
44
|
+
export declare function sameValue(a: Scalar, b: Scalar, tolerance: number): boolean;
|
|
45
|
+
/** The files of a sheet made of an Excel file's bytes, what could not be carried over and how the engine agrees with it. */
|
|
46
|
+
export declare function importXlsx(bytes: Uint8Array, o: ImportOptions): ImportedXlsx;
|
|
47
|
+
//# sourceMappingURL=import.d.ts.map
|