@allyhub/sdk 0.6.0 → 0.7.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/dist/define.d.ts +4 -0
- package/dist/define.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
- package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +69 -18
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +847 -116
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +501 -38
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
- package/dist/node_modules/@allyhub-next/ooxml/LICENSE +241 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +79 -5
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +21 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +377 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
- package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
- package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
- package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
- package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +3 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +42 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +59 -39
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +27 -13
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +179 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +2 -4
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +17 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +21 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
- package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/dist/slides.d.ts +3 -1
- package/dist/slides.js +1 -1
- package/docs/README.md +1 -0
- package/docs/contract.md +1 -1
- package/docs/defaults.md +2 -2
- package/docs/layers.md +1 -1
- package/docs/project.md +3 -1
- package/docs/sheets.md +7 -6
- package/docs/slides.md +16 -12
- package/docs/sound.md +1 -1
- package/docs/websites.md +57 -0
- package/package.json +3 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +0 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as e}from"zod";import{BlobSchema as f,Sha256Schema as l,TreeFileSchema as h,TreePathSchema as p}from"./blobs.js";import{placeParams as x}from"./editor.js";import{openEnum as S,readable as b}from"./open.js";export const SNAPSHOT_FORMAT=1,ConversationEntrySchema=e.object({sessionId:e.string().min(1),agent:e.string().min(1),title:e.string().optional(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),transcript:l}),TranscriptSchema=e.object({sessionId:e.string().min(1),messages:e.array(e.object({method:e.string().min(1),params:e.unknown()}))}),SNAPSHOT_KINDS=["project","home"];const $=e.string().refine(t=>t.endsWith("/")&&p.safeParse(t.slice(0,-1)).success,"a folder of the tree, ending in /");export const ItemReachSchema=e.object({tree:e.array(p),files:e.array(p),own:e.record(p,h)}),SnapshotReachSchema=e.object({shared:e.array($),items:e.record(e.string(),ItemReachSchema)}),SnapshotManifestSchema=e.object({format:e.literal(SNAPSHOT_FORMAT),kind:e.enum(SNAPSHOT_KINDS),project:e.object({name:e.string().min(1).max(255)}),host:e.object({version:e.string().min(1)}),madeAt:e.iso.datetime(),files:e.record(p,f),tree:e.record(p,h),conversations:e.array(ConversationEntrySchema),reach:SnapshotReachSchema.optional()});export function scopedManifest(t,s){const o=t.reach,c=o!==void 0&&Object.hasOwn(o.items,s)?o.items[s]:void 0;if(o===void 0||c===void 0)return;const r={};for(const[n,i]of Object.entries(t.tree))o.shared.some(m=>n.startsWith(m))&&(r[n]=i);for(const n of c.tree){const i=Object.hasOwn(t.tree,n)?t.tree[n]:void 0;i!==void 0&&(r[n]=i)}Object.assign(r,c.own);const a={};for(const n of c.files){const i=Object.hasOwn(t.files,n)?t.files[n]:void 0;i!==void 0&&(a[n]=i)}return{format:t.format,kind:t.kind,project:t.project,host:t.host,madeAt:t.madeAt,files:a,tree:r,conversations:[]}}export const SNAPSHOT_SKIPPED=["node_modules",".allyhub/cache",".allyhub/out"],SNAPSHOT_TREE={editor:"editor/",runtime:"runtime/",build:"build/",media:"media/",matte:"matte/",scenery:"scenery/",bakes:"bakes/",stills:"stills/",answers:"answers/",previews:"previews/"};function d(t){return Array.isArray(t)?t.map(d):t!==null&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().map(s=>[s,d(t[s])])):t}export const snapshotAnswerPath=(t,s)=>`${SNAPSHOT_TREE.answers}${t}/${encodeURIComponent(JSON.stringify(d(s??{})))}.json`,stillPath=t=>`${SNAPSHOT_TREE.stills}${t}.webp`,stillsIndexPath=(t,s)=>`${SNAPSHOT_TREE.stills}index/${encodeURIComponent(t)}/${encodeURIComponent(s)}.json`,StillsIndexSchema=e.object({stills:e.record(e.string(),e.string().regex(/^[0-9a-f]{64}$/u))}),stillsIndexKey=t=>JSON.stringify(d(t)),snapshotPreviewPath=t=>`${SNAPSHOT_TREE.previews}${encodeURIComponent(t===""?".":t)}.json`,TREE_PAGES={stage:`${SNAPSHOT_TREE.runtime}stage.html`,viewer:`${SNAPSHOT_TREE.runtime}viewer.html`,probe:`${SNAPSHOT_TREE.runtime}probe.html`},pieceSourcePath=t=>`${SNAPSHOT_TREE.build}sources/${encodeURIComponent(t)}.json`,scenerySourcePath=t=>`${SNAPSHOT_TREE.scenery}sources/${encodeURIComponent(t)}.json`,treeHref=t=>t.split("/").map(encodeURIComponent).join("/"),SOUND_FOLDER="sound/";export function stageCsp(t,s){const o=u=>`${t}${u}`,c=o(SNAPSHOT_TREE.runtime),r=o(SNAPSHOT_TREE.build),a=o(SNAPSHOT_TREE.scenery),n=o(SNAPSHOT_TREE.media),i=o(SNAPSHOT_TREE.matte),m=o(SOUND_FOLDER);return["default-src 'none'",`script-src 'unsafe-eval' 'wasm-unsafe-eval' ${c} ${r} ${a}`,"worker-src blob:",`style-src 'unsafe-inline' ${c} ${r} ${a}`,`font-src ${c} ${r} ${n} data:`,`img-src ${n} ${r} ${a} data: blob:`,`media-src ${n} ${i} ${m} blob:`,`connect-src ${n} ${i} ${m} ${r} ${a} ${o(SNAPSHOT_TREE.bakes)} ${c} blob: data:`,`frame-ancestors ${s.length>0?s.join(" "):"'none'"}`].join("; ")}export function snapshotEditorUrl(t,s,o={}){const c=Object.entries({item:s,embed:"studio",snapshot:"1",...o.viewer===!0?{viewer:"1"}:{},...o.theme===void 0?{}:{theme:o.theme},...x(o.place)}).map(([r,a])=>`${r}=${encodeURIComponent(a)}`);return`${t.replace(/\/$/u,"")}/${SNAPSHOT_TREE.editor}?${c.join("&")}`}export const EXECUTOR_KINDS=["cloud","computer"],COMPUTER_HEADER="x-allyhub-computer",ComputerIdSchema=e.string().regex(/^[A-Za-z0-9_-]{16,64}$/u),WORKED_ELSEWHERE="worked_elsewhere",ExecutorSchema=e.object({kind:S(EXECUTOR_KINDS),here:e.boolean()}),SNAPSHOT_BLOBS_PATH="/api/snapshots/blobs",SNAPSHOTS_PATH="/api/snapshots",SnapshotCreateSchema=e.strictObject({project:e.strictObject({id:e.string().min(1).optional(),kind:e.enum(SNAPSHOT_KINDS),name:e.string().min(1).max(255)}),manifest:l}),SnapshotCreatedSchema=e.object({id:e.string().min(1),projectId:e.string().min(1)}),SnapshotMissingSchema=e.object({missing:e.array(l)}),PROJECTS_PATH="/api/projects",SnapshotInfoSchema=e.object({id:e.string().min(1),madeAt:e.iso.datetime(),hostVersion:e.string()}),ProjectInfoSchema=e.object({id:e.string().min(1),kind:e.enum(SNAPSHOT_KINDS),name:e.string(),latest:SnapshotInfoSchema.nullable(),executor:ExecutorSchema}),ProjectsResponseSchema=e.object({projects:b(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,projectExecutorPath=t=>`${projectPath(t)}/executor`,ExecutorMoveSchema=e.strictObject({kind:e.enum(EXECUTOR_KINDS)}),snapshotViewPath=t=>`${SNAPSHOTS_PATH}/${encodeURIComponent(t)}/view`,SnapshotViewSchema=e.object({origin:e.url(),expiresAt:e.iso.datetime()}),SNAPSHOT_VIEW={manifest:"manifest.json",files:"files/",conversations:"conversations/"},NEEDS_MACHINE=-32010;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** `GET`: the organizations the person is in, the one a request acts in unless it names another first. */
|
|
2
|
+
/** `GET`: the organizations the person is in, the one a request acts in unless it names another first; `POST { name }`: a new team. */
|
|
3
3
|
export declare const ORGANIZATIONS_PATH = "/api/organizations";
|
|
4
4
|
export declare const OrganizationsSchema: z.ZodObject<{
|
|
5
5
|
organizations: z.ZodArray<z.ZodObject<{
|
|
@@ -24,30 +24,48 @@ export declare const MembersSchema: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strip>>;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
export type Members = z.infer<typeof MembersSchema>;
|
|
27
|
-
/**
|
|
28
|
-
export declare const memberLimitPath: (userId: string) => string;
|
|
27
|
+
/** A member's limit in credits a month, null for none (`members/limit`, account.ts). */
|
|
29
28
|
export declare const MemberLimitSchema: z.ZodObject<{
|
|
30
29
|
monthly: z.ZodNullable<z.ZodNumber>;
|
|
31
30
|
}, z.core.$strict>;
|
|
32
|
-
/** `DELETE`, its owner's: the team the request acts in dissolved. */
|
|
31
|
+
/** `DELETE`, its owner's: the team the request acts in dissolved; `PUT { name }`, an owner's or an admin's: renamed. */
|
|
33
32
|
export declare const ORGANIZATION_PATH = "/api/organization";
|
|
34
|
-
/** `POST`, its owner's: a dissolved team restored, within 30 days. */
|
|
35
|
-
export declare const restorePath: (id: string) => string;
|
|
36
33
|
/** `GET`: the person's cloud Studio, if any, and what an hour of it costs; `DELETE`: it gone. */
|
|
37
34
|
export declare const STUDIO_PATH = "/api/studio";
|
|
35
|
+
/** Whether a cloud Studio is running or asleep. */
|
|
36
|
+
export declare const STUDIO_STATES: readonly ["running", "paused"];
|
|
38
37
|
export declare const StudioSchema: z.ZodObject<{
|
|
39
38
|
studio: z.ZodNullable<z.ZodObject<{
|
|
40
|
-
state: z.ZodEnum<{
|
|
39
|
+
state: z.ZodUnion<readonly [z.ZodEnum<{
|
|
41
40
|
running: "running";
|
|
42
41
|
paused: "paused";
|
|
43
|
-
}>;
|
|
42
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
44
43
|
organizationId: z.ZodString;
|
|
45
44
|
}, z.core.$strip>>;
|
|
46
45
|
creditsPerHour: z.ZodNumber;
|
|
47
46
|
}, z.core.$strip>;
|
|
48
47
|
export type StudioInfo = z.infer<typeof StudioSchema>;
|
|
49
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* `POST`, a browser's: the Studio made or woken, answered with its Host's
|
|
50
|
+
* origin on the gateway and a ticket. The window connects to
|
|
51
|
+
* `<origin as ws(s)>/studio?ticket=<ticket>`; the gateway takes a ticket
|
|
52
|
+
* once.
|
|
53
|
+
*/
|
|
50
54
|
export declare const STUDIO_OPEN_PATH = "/api/studio/open";
|
|
55
|
+
export declare const StudioOpenedSchema: z.ZodObject<{
|
|
56
|
+
origin: z.ZodURL;
|
|
57
|
+
ticket: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type StudioOpened = z.infer<typeof StudioOpenedSchema>;
|
|
60
|
+
/**
|
|
61
|
+
* `POST`, a browser's: a ticket for the person's running Studio (to
|
|
62
|
+
* connect again, or for one upload: `POST <origin>/upload?…&ticket=`);
|
|
63
|
+
* 409 when it is not running.
|
|
64
|
+
*/
|
|
65
|
+
export declare const STUDIO_TICKET_PATH = "/api/studio/ticket";
|
|
66
|
+
export declare const StudioTicketSchema: z.ZodObject<{
|
|
67
|
+
ticket: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
51
69
|
/**
|
|
52
70
|
* `PUT { at }`, a cloud Studio's own Host's (its API key): when its next
|
|
53
71
|
* scheduled task is due, null for none. A paused Studio is woken then, its
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),
|
|
2
|
+
import{z as t}from"zod";import{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number()}),STUDIO_OPEN_PATH="/api/studio/open",StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1)}),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
|
|
@@ -35,11 +35,11 @@ export declare const CHECK_STATES: readonly ["off", "waiting", "running", "done"
|
|
|
35
35
|
/** The check the server runs after edits, as it stands. */
|
|
36
36
|
export declare const CheckStateSchema: z.ZodObject<{
|
|
37
37
|
status: z.ZodEnum<{
|
|
38
|
+
failed: "failed";
|
|
39
|
+
running: "running";
|
|
38
40
|
off: "off";
|
|
39
41
|
waiting: "waiting";
|
|
40
|
-
running: "running";
|
|
41
42
|
done: "done";
|
|
42
|
-
failed: "failed";
|
|
43
43
|
}>;
|
|
44
44
|
revision: z.ZodInt;
|
|
45
45
|
problems: z.ZodArray<z.ZodObject<{
|
|
@@ -77,9 +77,9 @@ export declare const ExportJobSchema: z.ZodObject<{
|
|
|
77
77
|
types: z.ZodArray<z.ZodString>;
|
|
78
78
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
79
79
|
state: z.ZodEnum<{
|
|
80
|
+
failed: "failed";
|
|
80
81
|
running: "running";
|
|
81
82
|
done: "done";
|
|
82
|
-
failed: "failed";
|
|
83
83
|
queued: "queued";
|
|
84
84
|
cancelled: "cancelled";
|
|
85
85
|
}>;
|
|
@@ -92,14 +92,16 @@ export type ExportJob = z.infer<typeof ExportJobSchema>;
|
|
|
92
92
|
export declare const IndexJobSchema: z.ZodObject<{
|
|
93
93
|
file: z.ZodString;
|
|
94
94
|
status: z.ZodEnum<{
|
|
95
|
+
failed: "failed";
|
|
95
96
|
running: "running";
|
|
96
97
|
done: "done";
|
|
97
|
-
failed: "failed";
|
|
98
98
|
}>;
|
|
99
99
|
message: z.ZodString;
|
|
100
100
|
share: z.ZodOptional<z.ZodNumber>;
|
|
101
101
|
}, z.core.$strict>;
|
|
102
102
|
export type IndexJob = z.infer<typeof IndexJobSchema>;
|
|
103
|
+
/** Most components `slides/component-stills` draws in one call. */
|
|
104
|
+
export declare const COMPONENT_STILLS_MAX = 64;
|
|
103
105
|
export declare const PROJECT_TOOLS: {
|
|
104
106
|
readonly "project/items": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
105
107
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -116,8 +118,8 @@ export declare const PROJECT_TOOLS: {
|
|
|
116
118
|
entry: z.ZodString;
|
|
117
119
|
title: z.ZodOptional<z.ZodString>;
|
|
118
120
|
}, z.core.$strict>>;
|
|
119
|
-
folder: z.ZodString;
|
|
120
121
|
name: z.ZodString;
|
|
122
|
+
scope: z.ZodString;
|
|
121
123
|
revision: z.ZodInt;
|
|
122
124
|
}, z.core.$strict>>;
|
|
123
125
|
readonly "sheet/generated": MethodSpec<z.ZodObject<{
|
|
@@ -152,6 +154,12 @@ export declare const PROJECT_TOOLS: {
|
|
|
152
154
|
components: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
153
155
|
generators: z.ZodArray<z.ZodString>;
|
|
154
156
|
scripts: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
157
|
+
code: z.ZodUnknown;
|
|
158
|
+
theme: z.ZodObject<{
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
colors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
161
|
+
fonts: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
162
|
+
}, z.core.$strict>;
|
|
155
163
|
}, z.core.$strict>>;
|
|
156
164
|
readonly "video/stage": MethodSpec<z.ZodObject<{
|
|
157
165
|
start: z.ZodOptional<z.ZodObject<{
|
|
@@ -162,7 +170,10 @@ export declare const PROJECT_TOOLS: {
|
|
|
162
170
|
}, z.core.$strict>>;
|
|
163
171
|
play: z.ZodOptional<z.ZodBoolean>;
|
|
164
172
|
chrome: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
-
|
|
173
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
code: "code";
|
|
175
|
+
component: "component";
|
|
176
|
+
}>>;
|
|
166
177
|
item: z.ZodString;
|
|
167
178
|
version: z.ZodOptional<z.ZodString>;
|
|
168
179
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -209,13 +220,41 @@ export declare const PROJECT_TOOLS: {
|
|
|
209
220
|
}, z.core.$strict>;
|
|
210
221
|
}, z.core.$strict>>;
|
|
211
222
|
}, z.core.$strict>>;
|
|
223
|
+
readonly "slides/fonts": MethodSpec<z.ZodObject<{
|
|
224
|
+
item: z.ZodString;
|
|
225
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
226
|
+
faces: z.ZodArray<z.ZodObject<{
|
|
227
|
+
family: z.ZodString;
|
|
228
|
+
url: z.ZodURL;
|
|
229
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
230
|
+
style: z.ZodOptional<z.ZodString>;
|
|
231
|
+
stretch: z.ZodOptional<z.ZodString>;
|
|
232
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strict>>;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
readonly "slides/component-stills": MethodSpec<z.ZodObject<{
|
|
236
|
+
components: z.ZodArray<z.ZodObject<{
|
|
237
|
+
name: z.ZodString;
|
|
238
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
239
|
+
width: z.ZodNumber;
|
|
240
|
+
height: z.ZodNumber;
|
|
241
|
+
t: z.ZodNumber;
|
|
242
|
+
}, z.core.$strict>>;
|
|
243
|
+
item: z.ZodString;
|
|
244
|
+
version: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
246
|
+
stills: z.ZodArray<z.ZodNullable<z.ZodObject<{
|
|
247
|
+
key: z.ZodString;
|
|
248
|
+
url: z.ZodURL;
|
|
249
|
+
}, z.core.$strict>>>;
|
|
250
|
+
}, z.core.$strict>>;
|
|
212
251
|
readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
213
252
|
status: z.ZodEnum<{
|
|
253
|
+
failed: "failed";
|
|
254
|
+
running: "running";
|
|
214
255
|
off: "off";
|
|
215
256
|
waiting: "waiting";
|
|
216
|
-
running: "running";
|
|
217
257
|
done: "done";
|
|
218
|
-
failed: "failed";
|
|
219
258
|
}>;
|
|
220
259
|
revision: z.ZodInt;
|
|
221
260
|
problems: z.ZodArray<z.ZodObject<{
|
|
@@ -254,9 +293,9 @@ export declare const PROJECT_TOOLS: {
|
|
|
254
293
|
types: z.ZodArray<z.ZodString>;
|
|
255
294
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
256
295
|
state: z.ZodEnum<{
|
|
296
|
+
failed: "failed";
|
|
257
297
|
running: "running";
|
|
258
298
|
done: "done";
|
|
259
|
-
failed: "failed";
|
|
260
299
|
queued: "queued";
|
|
261
300
|
cancelled: "cancelled";
|
|
262
301
|
}>;
|
|
@@ -276,9 +315,9 @@ export declare const PROJECT_TOOLS: {
|
|
|
276
315
|
types: z.ZodArray<z.ZodString>;
|
|
277
316
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
278
317
|
state: z.ZodEnum<{
|
|
318
|
+
failed: "failed";
|
|
279
319
|
running: "running";
|
|
280
320
|
done: "done";
|
|
281
|
-
failed: "failed";
|
|
282
321
|
queued: "queued";
|
|
283
322
|
cancelled: "cancelled";
|
|
284
323
|
}>;
|
|
@@ -325,11 +364,11 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
325
364
|
}, z.core.$strict>>;
|
|
326
365
|
readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
327
366
|
status: z.ZodEnum<{
|
|
367
|
+
failed: "failed";
|
|
368
|
+
running: "running";
|
|
328
369
|
off: "off";
|
|
329
370
|
waiting: "waiting";
|
|
330
|
-
running: "running";
|
|
331
371
|
done: "done";
|
|
332
|
-
failed: "failed";
|
|
333
372
|
}>;
|
|
334
373
|
revision: z.ZodInt;
|
|
335
374
|
problems: z.ZodArray<z.ZodObject<{
|
|
@@ -362,9 +401,9 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
362
401
|
types: z.ZodArray<z.ZodString>;
|
|
363
402
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
364
403
|
state: z.ZodEnum<{
|
|
404
|
+
failed: "failed";
|
|
365
405
|
running: "running";
|
|
366
406
|
done: "done";
|
|
367
|
-
failed: "failed";
|
|
368
407
|
queued: "queued";
|
|
369
408
|
cancelled: "cancelled";
|
|
370
409
|
}>;
|
|
@@ -377,9 +416,9 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
377
416
|
jobs: z.ZodArray<z.ZodObject<{
|
|
378
417
|
file: z.ZodString;
|
|
379
418
|
status: z.ZodEnum<{
|
|
419
|
+
failed: "failed";
|
|
380
420
|
running: "running";
|
|
381
421
|
done: "done";
|
|
382
|
-
failed: "failed";
|
|
383
422
|
}>;
|
|
384
423
|
message: z.ZodString;
|
|
385
424
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as
|
|
2
|
+
import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as s}from"./files.js";import{method as t,notification as r}from"./jsonrpc.js";const n={item:s,version:e.string().optional()};export const ImageSchema=e.strictObject({mime:e.string().regex(/^image\//u),data:e.base64()}),ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),TimelineSchema=e.looseObject({fps:e.number(),width:e.number(),height:e.number(),duration:e.number(),parts:e.array(e.unknown())}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:s,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(s),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:s,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()});const o=e.tuple([e.number(),e.number(),e.number()]),a=e.strictObject({url:e.string(),probe:e.string()});export const COMPONENT_STILLS_MAX=64,PROJECT_TOOLS={"project/items":t(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({kind:e.enum(c),dir:s,entry:s,title:e.string().optional()})),name:e.string(),scope:e.string(),revision:e.int().nonnegative()}),"The project's items, as the build finds them."),"sheet/generated":t(e.strictObject({item:s}),e.strictObject({generated:e.unknown().optional(),failed:e.boolean()}),"What a sheet's sheet.ts makes now: sheets as sheet.yaml would hold them. Never written to a file."),"video/versions":t(e.strictObject({item:s}),e.strictObject({piece:e.string(),kind:e.enum(["video","slides"]),title:e.string().optional(),width:e.number(),height:e.number(),versions:e.array(e.strictObject({key:e.string(),lang:e.string().optional()}))}),"A video's or a deck's versions, one per language: what its stage, its timeline and its exports are asked for."),"slides/deck":t(e.strictObject({item:s}),e.strictObject({piece:e.string(),file:s,prefix:e.string(),layouts:e.array(e.string()),components:e.record(e.string(),e.unknown()),generators:e.array(e.string()),scripts:e.record(e.string(),s),code:e.unknown(),theme:e.strictObject({name:e.string(),colors:e.record(e.string(),e.string()),fonts:e.record(e.string(),e.string())})}),"A deck's layouts, components and generators, and its files: slides.yaml (its slides) and its script in each language (their words and notes), which the deck's editor edits."),"video/stage":t(e.strictObject({...n,start:e.strictObject({t:e.number().nonnegative().optional(),part:e.string().optional(),offset:e.number().nonnegative().optional(),dur:e.number().positive().optional()}).optional(),play:e.boolean().optional(),chrome:e.boolean().optional(),mode:e.enum(["code","component"]).optional()}),a,"The address of a version's stage page, for a sandboxed frame: it plays the piece and talks to its parent by postMessage."),"video/timeline":t(e.strictObject(n),e.strictObject({timeline:TimelineSchema,text:e.array(e.unknown())}),"A version's timeline, drawn nowhere."),"video/still":t(e.strictObject({...n,t:e.number().nonnegative().optional()}),e.strictObject({t:e.number(),image:ImageSchema,width:e.int().positive(),height:e.int().positive(),duration:e.number().nonnegative()}),"A moment of a version as the render draws it, as a picture."),"video/stills":t(e.strictObject({...n,moments:e.array(e.number().nonnegative()).min(1).max(32)}),e.strictObject({stills:e.array(e.strictObject({t:e.number(),image:ImageSchema}))}),"Several moments of a version as the render draws them: what `video/still` gives, on one page."),"slides/fonts":t(e.strictObject({item:s}),e.strictObject({faces:e.array(e.strictObject({family:e.string(),url:e.url(),weight:e.string().optional(),style:e.string().optional(),stretch:e.string().optional(),unicodeRange:e.string().optional()}))}),"The font faces a deck's slides draw with: the stage's own (the theme's standard fonts), allyhub.config.ts's fonts and what the deck's code imports, for a document that draws its slides without the project's stylesheets."),"slides/component-stills":t(e.strictObject({...n,components:e.array(e.strictObject({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()})).min(1).max(COMPONENT_STILLS_MAX)}),e.strictObject({stills:e.array(e.strictObject({key:e.string(),url:e.url()}).nullable())}),"Components of a deck drawn alone, transparent, as the render draws them: pictures kept by what they show, given as addresses."),"check/results":t(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":t(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":t(e.strictObject({item:s,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":t(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":t(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":t(e.strictObject({path:s}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`)."),"scenery/viewer":t(e.strictObject({item:s,camera:e.strictObject({position:o,target:o}).optional()}),a,"The address of a scenery's viewer page, for a sandboxed frame: it tells what the person does by postMessage.")},AGENT_DOES={"project/items":{files:"the project's folder"},"sheet/generated":{files:"the item's sheet.ts and sheet.yaml"},"video/versions":{command:"inspect combos"},"slides/deck":{files:"slides.ts, slides.yaml and the item's script.<locale>.yaml"},"video/stage":{command:"frames"},"video/timeline":{command:"inspect timeline"},"video/still":{command:"frames"},"video/stills":{command:"frames"},"slides/fonts":{files:"allyhub.config.ts's fonts and the stylesheets slides.ts imports"},"slides/component-stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"},"scenery/viewer":{command:"scenery view"}};export function toolSpec(i){return Object.hasOwn(PROJECT_TOOLS,i)?PROJECT_TOOLS[i]:void 0}export const TOOL_NOTIFICATIONS={"project/changed":r(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"check/changed":r(CheckStateSchema,"The check started, ended or failed."),"export/changed":r(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":r(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on.")};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub-next/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"default": "./dist/index.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
+
"sideEffects": false,
|
|
11
12
|
"private": true,
|
|
12
13
|
"license": "SEE LICENSE IN LICENSE.md"
|
|
13
14
|
}
|
|
@@ -76,7 +76,12 @@
|
|
|
76
76
|
"unpack": {
|
|
77
77
|
"default": "none",
|
|
78
78
|
"type": "string",
|
|
79
|
-
"enum": [
|
|
79
|
+
"enum": [
|
|
80
|
+
"none",
|
|
81
|
+
"zip",
|
|
82
|
+
"tgz",
|
|
83
|
+
"dmg"
|
|
84
|
+
]
|
|
80
85
|
},
|
|
81
86
|
"name": {
|
|
82
87
|
"type": "string",
|
|
@@ -97,7 +102,10 @@
|
|
|
97
102
|
"pattern": "^[0-9a-f]{64}$"
|
|
98
103
|
}
|
|
99
104
|
},
|
|
100
|
-
"required": [
|
|
105
|
+
"required": [
|
|
106
|
+
"path",
|
|
107
|
+
"sha256"
|
|
108
|
+
],
|
|
101
109
|
"additionalProperties": false
|
|
102
110
|
}
|
|
103
111
|
},
|
|
@@ -118,17 +126,29 @@
|
|
|
118
126
|
}
|
|
119
127
|
}
|
|
120
128
|
},
|
|
121
|
-
"required": [
|
|
129
|
+
"required": [
|
|
130
|
+
"url",
|
|
131
|
+
"sha256",
|
|
132
|
+
"size"
|
|
133
|
+
],
|
|
122
134
|
"additionalProperties": false
|
|
123
135
|
}
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
138
|
},
|
|
127
|
-
"required": [
|
|
139
|
+
"required": [
|
|
140
|
+
"about",
|
|
141
|
+
"version",
|
|
142
|
+
"license",
|
|
143
|
+
"platforms"
|
|
144
|
+
],
|
|
128
145
|
"additionalProperties": false
|
|
129
146
|
}
|
|
130
147
|
}
|
|
131
148
|
},
|
|
132
|
-
"required": [
|
|
149
|
+
"required": [
|
|
150
|
+
"version",
|
|
151
|
+
"runtimes"
|
|
152
|
+
],
|
|
133
153
|
"additionalProperties": false
|
|
134
154
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefNode, StructuredNode } from "../formula/ast.js";
|
|
2
|
-
import type { SharedFormula, Workbook } from "../workbook.js";
|
|
2
|
+
import type { SharedFormula, Workbook, Worksheet } from "../workbook.js";
|
|
3
3
|
export interface Analysis {
|
|
4
4
|
reads: (RefNode | StructuredNode)[];
|
|
5
5
|
/** Defined names, in lower case. */
|
|
@@ -9,13 +9,19 @@ export interface Analysis {
|
|
|
9
9
|
unknownNames: string[];
|
|
10
10
|
/** Functions that are nothing here. */
|
|
11
11
|
unknownFunctions: string[];
|
|
12
|
-
/** Functions given too few or too many arguments. */
|
|
12
|
+
/** Functions given too few or too many arguments, or a repeating group of them left short (`group`, its size). */
|
|
13
13
|
arguments: {
|
|
14
14
|
name: string;
|
|
15
15
|
given: number;
|
|
16
16
|
min: number;
|
|
17
17
|
max: number;
|
|
18
|
+
group?: number;
|
|
18
19
|
}[];
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* A formula's analysis. `sheet`: the sheet it is on, whose own names come
|
|
23
|
+
* before the workbook's; without it every sheet's name of a spelling counts,
|
|
24
|
+
* so what a formula can read is never less than it reads.
|
|
25
|
+
*/
|
|
26
|
+
export declare function analyse(wb: Workbook, shared: SharedFormula, sheet?: Worksheet): Analysis;
|
|
21
27
|
//# sourceMappingURL=analyse.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{FUNCTIONS as
|
|
2
|
+
import{FUNCTIONS as p}from"./functions/index.js";import{fillsGroup as w}from"./functions/define.js";export function analyse(i,c,l){const a={reads:[],names:new Set,volatile:!1,unknownNames:[],unknownFunctions:[],arguments:[]},d=new Set,g=(e,t,n)=>{const r=e.toLowerCase();if(n===void 0&&t.has(r))return!0;const u=n===void 0?l:i.sheet(n),o=u?[i.name(r,u)]:i.definitions(r);if(o.some(m=>m!==void 0)){a.names.add(r);const m=`${n??""}!${r}`;if(!d.has(m)){d.add(m);for(const h of o)h?.formula?.node&&s(h.formula.node,new Set)}return!0}if(p.has(e.toUpperCase()))return!0;const f=i.table(r);return f?(a.reads.push({kind:"structured",table:f.name,sections:[],columns:[],thisRow:!1}),!0):!1},s=(e,t)=>{switch(e.kind){case"ref":case"structured":a.reads.push(e);return;case"name":g(e.name,t,e.sheet)||a.unknownNames.push(e.name);return;case"unary":case"postfix":case"paren":s(e.arg,t);return;case"binary":s(e.left,t),s(e.right,t);return;case"array":return;case"invoke":s(e.callee,t);for(const n of e.args)s(n,t);return;case"call":{const n=p.get(e.name);if(e.name==="LET"||e.name==="LAMBDA"){const r=new Set(t),u=e.args[e.args.length-1];e.args.forEach((o,f)=>{if(o!==u){if(e.name==="LET"&&f%2===1){s(o,r);return}o.kind==="name"&&r.add(o.name.toLowerCase())}}),u&&s(u,r);return}if(!n)g(e.written,t)||a.unknownFunctions.push(e.name);else{n.volatile===!0&&(a.volatile=!0);const r=n.kind==="raw"&&!w(n.params,e.args.length);(e.args.length<n.min||e.args.length>n.max||r)&&a.arguments.push({name:e.name,given:e.args.length,min:n.min,max:n.max,...r?{group:n.params.group.length}:{}})}for(const r of e.args)s(r,t);return}default:return}};return c.node&&s(c.node,new Set),a}
|
|
@@ -4,7 +4,11 @@ export declare function numberOfText(text: string): number | undefined;
|
|
|
4
4
|
export declare function toNumber(v: Scalar | undefined): number | CellError;
|
|
5
5
|
export declare function toText(v: Scalar | undefined): string | CellError;
|
|
6
6
|
export declare function toBool(v: Scalar | undefined): boolean | CellError;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Equal to 15 significant digits, as Excel compares numbers. Two numbers that
|
|
9
|
+
* round to the same 15 digits are within 1e-13 of each other relatively, so
|
|
10
|
+
* any further apart are told apart without rounding either.
|
|
11
|
+
*/
|
|
8
12
|
export declare const sameNumber: (a: number, b: number) => boolean;
|
|
9
13
|
/** Excel's order of two values that are not errors: numbers, then text, then TRUE and FALSE. */
|
|
10
14
|
export declare function compare(a: Scalar, b: Scalar): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{parseValue as d}from"numfmt";import{CellError as f,ERR as s,Matrix as x,numberText as h,readTyped as
|
|
2
|
+
import{parseValue as d}from"numfmt";import{CellError as f,ERR as s,Matrix as x,numberText as h,readTyped as M}from"../values.js";export function numberOfText(e){if(!/\d/u.test(e))return;const r=M(e.trim());if(typeof r.value=="number")return r.value;if(e.trim()==="")return;const t=d(e);return typeof t?.value=="number"?t.value:void 0}export function toNumber(e){return typeof e=="number"?e:e==null?0:typeof e=="boolean"?e?1:0:e instanceof f?e:numberOfText(e)??s.VALUE}export function toText(e){return typeof e=="string"?e:e==null?"":typeof e=="number"?h(e):typeof e=="boolean"?e?"TRUE":"FALSE":e}export function toBool(e){if(typeof e=="boolean")return e;if(e==null)return!1;if(typeof e=="number")return e!==0;if(e instanceof f)return e;const r=e.trim().toUpperCase();return r==="TRUE"?!0:r==="FALSE"?!1:s.VALUE}const m=e=>typeof e=="number"?0:typeof e=="string"?1:2;export const sameNumber=(e,r)=>e===r?!0:Math.abs(e-r)>1e-13*Math.max(Math.abs(e),Math.abs(r))?!1:Number(e.toPrecision(15))===Number(r.toPrecision(15));export function compare(e,r){const t=e??(typeof r=="string"?"":typeof r=="boolean"?!1:0),n=r??(typeof e=="string"?"":typeof e=="boolean"?!1:0),o=m(t),c=m(n);if(o!==c)return o<c?-1:1;if(typeof t=="number"&&typeof n=="number")return sameNumber(t,n)?0:t<n?-1:1;if(typeof t=="string"&&typeof n=="string"){const a=t.toUpperCase(),u=n.toUpperCase();return a===u?0:a<u?-1:1}return t===n?0:t===!1?-1:1}export const finite=e=>Number.isFinite(e)?e:s.NUM;export function snap(e,r,t){return Math.abs(e)<=Math.max(Math.abs(r),Math.abs(t))*89e-17?0:e}export function arithmetic(e,r,t){const n=toNumber(r);if(n instanceof f)return n;const o=toNumber(t);if(o instanceof f)return o;switch(e){case"+":return finite(snap(n+o,n,o));case"-":return finite(snap(n-o,n,o));case"*":return finite(n*o);case"/":return o===0?s.DIV0:finite(n/o);default:return n===0&&o===0?s.NUM:n===0&&o<0?s.DIV0:finite(n**o)}}export function binary(e,r,t){if(r instanceof f)return r;if(t instanceof f)return t;switch(e){case"&":{const n=toText(r);if(n instanceof f)return n;const o=toText(t);return o instanceof f?o:`${n}${o}`}case"=":return compare(r,t)===0;case"<>":return compare(r,t)!==0;case"<":return compare(r,t)<0;case"<=":return compare(r,t)<=0;case">":return compare(r,t)>0;case">=":return compare(r,t)>=0;default:return arithmetic(e,r,t)}}export function mapBoth(e,r,t){const n=Math.max(e.rows,r.rows),o=Math.max(e.cols,r.cols),c=new Array(n*o),a=(u,i,l)=>{const p=u.rows===1?0:i,y=u.cols===1?0:l;return p<u.rows&&y<u.cols?u.at(p,y):void 0};for(let u=0;u<n;u++)for(let i=0;i<o;i++){const l=a(e,u,i),p=a(r,u,i);c[u*o+i]=l===void 0||p===void 0?s.NA:t(l,p)}return new x(n,o,c)}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { Node, RefNode, StructuredNode } from "../formula/ast.js";
|
|
2
2
|
import { CellError, Matrix, type Scalar } from "../values.js";
|
|
3
3
|
import { FormulaCell, SharedFormula, type Slot, type Workbook, type Worksheet } from "../workbook.js";
|
|
4
|
+
import { type Computed } from "./remote.js";
|
|
5
|
+
import { RangeCache, type Index } from "./indexes.js";
|
|
6
|
+
import { type FunctionDef } from "./functions/index.js";
|
|
4
7
|
import { Lambda, Reference, Union, type Frame, type Value } from "./types.js";
|
|
5
8
|
export interface CalcOptions {
|
|
6
9
|
/** The moment NOW and TODAY read. Default: the clock. */
|
|
7
10
|
now?: Date;
|
|
8
11
|
/** What RAND reads, values from 0 up to 1. Default: Math.random. */
|
|
9
12
|
random?: () => number;
|
|
13
|
+
/**
|
|
14
|
+
* Keeps what each pass settles for `takeComputed`: a calculation in a
|
|
15
|
+
* worker, which sends it to the model the page reads.
|
|
16
|
+
*/
|
|
17
|
+
report?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Computes nothing: a model the page reads while a calculation elsewhere
|
|
20
|
+
* works. What is typed shows at once; what formulas give arrives by
|
|
21
|
+
* `receive`, and a formula reads as it last did until then. A formula
|
|
22
|
+
* given to `evaluate` (a rule's, a validation's) is worked out over that.
|
|
23
|
+
*/
|
|
24
|
+
replica?: boolean;
|
|
10
25
|
}
|
|
11
26
|
/**
|
|
12
27
|
* Random numbers that are the same for the same seed, for a result that must
|
|
@@ -31,12 +46,15 @@ export declare class Calc {
|
|
|
31
46
|
private readonly stack;
|
|
32
47
|
private readonly inCycle;
|
|
33
48
|
private readonly namesAt;
|
|
34
|
-
|
|
35
|
-
private readonly
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
private readonly
|
|
39
|
-
|
|
49
|
+
/** Who reads whom: made the first time something changes. */
|
|
50
|
+
private readonly graph;
|
|
51
|
+
private graphMade;
|
|
52
|
+
/** Keeps what each pass settles, for `takeComputed`. */
|
|
53
|
+
private readonly reports;
|
|
54
|
+
/** Computes nothing; results arrive by `receive`. */
|
|
55
|
+
readonly replica: boolean;
|
|
56
|
+
/** What passes settled since `takeComputed` was last asked. */
|
|
57
|
+
private readonly settled;
|
|
40
58
|
/** What spills changed since it was last looked at. */
|
|
41
59
|
private moved;
|
|
42
60
|
/** Formula cells whose spill's size turned out to depend on itself. */
|
|
@@ -44,8 +62,10 @@ export declare class Calc {
|
|
|
44
62
|
private readonly hiddenBy;
|
|
45
63
|
/** What reads what no reference shows (OFFSET, INDIRECT) or changes by itself (NOW, RAND): computed with every change, as Excel's are. */
|
|
46
64
|
private volatiles;
|
|
47
|
-
/** Lookup indexes of ranges,
|
|
48
|
-
readonly indexes:
|
|
65
|
+
/** Lookup and criteria indexes of ranges, each kept until its range changes. */
|
|
66
|
+
readonly indexes: RangeCache<Index>;
|
|
67
|
+
/** Criteria functions' results over ranges, each kept until a range it read changes. */
|
|
68
|
+
readonly results: RangeCache<Scalar>;
|
|
49
69
|
readonly wb: Workbook;
|
|
50
70
|
constructor(wb: Workbook, o?: CalcOptions);
|
|
51
71
|
private allCells;
|
|
@@ -65,6 +85,8 @@ export declare class Calc {
|
|
|
65
85
|
/** What an empty place reads: nothing, or the value a formula spilled into it. */
|
|
66
86
|
private ghost;
|
|
67
87
|
private circular;
|
|
88
|
+
/** What was worked out over ranges that hold changed cells is worked out again. */
|
|
89
|
+
private forget;
|
|
68
90
|
private run;
|
|
69
91
|
/**
|
|
70
92
|
* What reads a spill's cells computed again until nothing moves: who reads
|
|
@@ -79,6 +101,8 @@ export declare class Calc {
|
|
|
79
101
|
private analysisOf;
|
|
80
102
|
/** What a formula cell reads, by what evaluating its references gives. */
|
|
81
103
|
private readsOf;
|
|
104
|
+
/** What a formula reads evaluated at a place, an entry a reference (each place of a union its own); undefined where one gives no place. */
|
|
105
|
+
private readsAt;
|
|
82
106
|
/** What a formula that is in no cell reads: a chart's, a rule's, a check's. */
|
|
83
107
|
readsOfFormula(shared: SharedFormula, sheet: Worksheet): Reference[];
|
|
84
108
|
/** `seeds`, and what they read that is to be computed, each after what it reads. */
|
|
@@ -103,6 +127,7 @@ export declare class Calc {
|
|
|
103
127
|
private bound;
|
|
104
128
|
resolveRef(n: RefNode, f: Frame): Reference | Union | CellError;
|
|
105
129
|
structured(n: StructuredNode, f: Frame): Reference | Union | CellError;
|
|
130
|
+
/** A name's value: a LET's or a LAMBDA's, else the sheet's own (`sheet` when it is written Sheet1!name), else the workbook's. */
|
|
106
131
|
private nameValue;
|
|
107
132
|
private intersect;
|
|
108
133
|
private unary;
|
|
@@ -115,17 +140,31 @@ export declare class Calc {
|
|
|
115
140
|
/** A LAMBDA given its arguments' values. */
|
|
116
141
|
apply(l: Lambda, args: readonly Value[]): Value;
|
|
117
142
|
private call;
|
|
118
|
-
/**
|
|
119
|
-
|
|
143
|
+
/**
|
|
144
|
+
* A function given its arguments' values: every function call goes through
|
|
145
|
+
* here, a function's own call of another (AGGREGATE's) too, so each is
|
|
146
|
+
* lifted over arrays as its parameters say.
|
|
147
|
+
*/
|
|
148
|
+
applyFunction(def: FunctionDef, values: readonly Value[], f: Frame): Value;
|
|
149
|
+
/**
|
|
150
|
+
* A function over its arguments, as Excel lifts one: where a single value
|
|
151
|
+
* goes and an array or a range of several cells is given, the function is
|
|
152
|
+
* applied over each of its cells and the results are an array. Arrays of
|
|
153
|
+
* different sizes are stretched along a side of one, and give #N/A past the
|
|
154
|
+
* end of a shorter one. Every argument taken as a single value is given as
|
|
155
|
+
* one (a Scalar, or Missing when left empty).
|
|
156
|
+
*/
|
|
157
|
+
private over;
|
|
158
|
+
/** One cell of a lifted function's array: what one call gave, as a single value. */
|
|
159
|
+
private element;
|
|
120
160
|
/** One scalar from a value: a range in a place for one gives the cell in the formula's row or column. */
|
|
121
161
|
scalar(v: Value, f: Frame): Scalar;
|
|
122
162
|
/** Lets NOW, TODAY, RAND and whatever else is volatile change on the next pass. */
|
|
123
163
|
recalculate(): this;
|
|
124
|
-
private key;
|
|
125
|
-
private addEdges;
|
|
126
|
-
private removeEdges;
|
|
127
164
|
/** The graph of who reads whom: made the first time something changes. */
|
|
128
165
|
private build;
|
|
166
|
+
private addEdges;
|
|
167
|
+
private removeEdges;
|
|
129
168
|
/** Who reads any place of an area. */
|
|
130
169
|
private readersIn;
|
|
131
170
|
/** Who reads a place. */
|
|
@@ -146,6 +185,14 @@ export declare class Calc {
|
|
|
146
185
|
change(cells: readonly CellChange[]): void;
|
|
147
186
|
/** Sets a defined name's constant (a scenario's) and computes what reads it. */
|
|
148
187
|
setName(name: string, value: Scalar): void;
|
|
188
|
+
/** What passes settled since this was last asked, for the model the page reads (`receive`). */
|
|
189
|
+
takeComputed(): Computed;
|
|
190
|
+
/**
|
|
191
|
+
* What a calculation elsewhere computed, put in this model: each formula
|
|
192
|
+
* cell's value and spill. A cell no longer a formula, or another formula
|
|
193
|
+
* now, is left as it is: what was typed there since is newer.
|
|
194
|
+
*/
|
|
195
|
+
receive(computed: Computed): void;
|
|
149
196
|
/** Numbers of a value, for code outside a formula. */
|
|
150
197
|
numberOf(v: Scalar): number | CellError;
|
|
151
198
|
}
|