@allyhub/sdk 0.3.0 → 0.4.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.
Files changed (143) hide show
  1. package/dist/free.d.ts +2 -2
  2. package/dist/index.d.ts +2 -9
  3. package/dist/index.js +1 -1
  4. package/dist/module.d.ts +2 -3
  5. package/dist/module.js +1 -1
  6. package/dist/parts.d.ts +2 -2
  7. package/dist/piece.d.ts +7 -32
  8. package/dist/piece.js +1 -1
  9. package/dist/props.d.ts +53 -10
  10. package/dist/slides.d.ts +8 -0
  11. package/dist/slides.js +2 -0
  12. package/docs/README.md +1 -1
  13. package/docs/batches.md +2 -2
  14. package/docs/defaults.md +106 -3
  15. package/docs/docs.md +1 -1
  16. package/docs/project.md +5 -5
  17. package/docs/sheets.md +1 -1
  18. package/docs/slides.md +182 -80
  19. package/node_modules/@allyhub-next/audio/package.json +1 -1
  20. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +22 -0
  21. package/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  22. package/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1494 -0
  23. package/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
  24. package/node_modules/@allyhub-next/formats/dist/index.d.ts +2 -0
  25. package/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  26. package/node_modules/@allyhub-next/formats/dist/items.d.ts +21 -0
  27. package/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  28. package/node_modules/@allyhub-next/formats/dist/note-shape.d.ts +39 -0
  29. package/node_modules/@allyhub-next/formats/dist/note-shape.js +2 -0
  30. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +418 -0
  31. package/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  32. package/node_modules/@allyhub-next/formats/package.json +1 -1
  33. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +0 -64
  34. package/node_modules/@allyhub-next/protocol/dist/app.js +1 -1
  35. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +0 -17
  36. package/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  37. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +0 -4
  38. package/node_modules/@allyhub-next/protocol/dist/cli.js +1 -1
  39. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +9 -26
  40. package/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  41. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
  42. package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  43. package/node_modules/@allyhub-next/protocol/dist/notes.d.ts +163 -0
  44. package/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
  45. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +1 -1
  46. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +3 -0
  47. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +1 -1
  48. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +37 -0
  49. package/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  50. package/node_modules/@allyhub-next/protocol/package.json +1 -1
  51. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +5 -1
  52. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +1 -0
  53. package/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
  54. package/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +3 -0
  55. package/node_modules/@allyhub-next/runtimes/dist/node-program.js +2 -0
  56. package/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +65 -0
  57. package/node_modules/@allyhub-next/runtimes/dist/packages.js +4 -0
  58. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +2 -2
  59. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  60. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +1 -1
  61. package/node_modules/@allyhub-next/runtimes/package.json +5 -1
  62. package/node_modules/@allyhub-next/runtimes/pins/docx/package-lock.json +67 -0
  63. package/node_modules/@allyhub-next/runtimes/pins/docx/package.json +9 -0
  64. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +2533 -0
  65. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +8 -0
  66. package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +753 -0
  67. package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package.json +14 -0
  68. package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +950 -0
  69. package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package.json +8 -0
  70. package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +227 -0
  71. package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +8 -0
  72. package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +105 -0
  73. package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +8 -0
  74. package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +128 -0
  75. package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package.json +9 -0
  76. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +5 -24
  77. package/node_modules/@allyhub-next/scenery/package.json +1 -1
  78. package/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
  79. package/node_modules/@allyhub-next/slides-core/dist/animation.d.ts +129 -0
  80. package/node_modules/@allyhub-next/slides-core/dist/animation.js +2 -0
  81. package/node_modules/@allyhub-next/slides-core/dist/api.d.ts +649 -0
  82. package/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
  83. package/node_modules/@allyhub-next/slides-core/dist/capabilities.d.ts +18 -0
  84. package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
  85. package/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +165 -0
  86. package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
  87. package/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +11 -0
  88. package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
  89. package/node_modules/@allyhub-next/slides-core/dist/chart.d.ts +184 -0
  90. package/node_modules/@allyhub-next/slides-core/dist/chart.js +2 -0
  91. package/node_modules/@allyhub-next/slides-core/dist/check.d.ts +7 -0
  92. package/node_modules/@allyhub-next/slides-core/dist/check.js +2 -0
  93. package/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +146 -0
  94. package/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
  95. package/node_modules/@allyhub-next/slides-core/dist/file.d.ts +109 -0
  96. package/node_modules/@allyhub-next/slides-core/dist/file.js +4 -0
  97. package/node_modules/@allyhub-next/slides-core/dist/index.d.ts +21 -0
  98. package/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
  99. package/node_modules/@allyhub-next/slides-core/dist/measure.d.ts +34 -0
  100. package/node_modules/@allyhub-next/slides-core/dist/measure.js +2 -0
  101. package/node_modules/@allyhub-next/slides-core/dist/model.d.ts +278 -0
  102. package/node_modules/@allyhub-next/slides-core/dist/model.js +2 -0
  103. package/node_modules/@allyhub-next/slides-core/dist/office.d.ts +58 -0
  104. package/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
  105. package/node_modules/@allyhub-next/slides-core/dist/path.d.ts +6 -0
  106. package/node_modules/@allyhub-next/slides-core/dist/path.js +2 -0
  107. package/node_modules/@allyhub-next/slides-core/dist/placeholders.d.ts +7 -0
  108. package/node_modules/@allyhub-next/slides-core/dist/placeholders.js +2 -0
  109. package/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +181 -0
  110. package/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
  111. package/node_modules/@allyhub-next/slides-core/dist/script.d.ts +43 -0
  112. package/node_modules/@allyhub-next/slides-core/dist/script.js +3 -0
  113. package/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +63 -0
  114. package/node_modules/@allyhub-next/slides-core/dist/stage.js +2 -0
  115. package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +23 -0
  116. package/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
  117. package/node_modules/@allyhub-next/slides-core/dist/theme.d.ts +72 -0
  118. package/node_modules/@allyhub-next/slides-core/dist/theme.js +2 -0
  119. package/node_modules/@allyhub-next/slides-core/dist/units.d.ts +35 -0
  120. package/node_modules/@allyhub-next/slides-core/dist/units.js +2 -0
  121. package/node_modules/@allyhub-next/slides-core/package.json +14 -0
  122. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +6 -5
  123. package/node_modules/@allyhub-next/video-core/dist/export.js +1 -1
  124. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +173 -4
  125. package/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  126. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +6 -13
  127. package/node_modules/@allyhub-next/video-core/dist/formats.js +1 -1
  128. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +0 -1
  129. package/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  130. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +83 -0
  131. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +8 -9
  132. package/node_modules/@allyhub-next/video-core/dist/piece.js +1 -1
  133. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +5 -1
  134. package/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  135. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +0 -2
  136. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +4 -0
  137. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +8 -0
  138. package/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  139. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +34 -1
  140. package/node_modules/@allyhub-next/video-core/package.json +1 -1
  141. package/package.json +15 -8
  142. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +0 -37
  143. package/node_modules/@allyhub-next/video-core/dist/slides.js +0 -2
package/dist/free.d.ts CHANGED
@@ -9,9 +9,9 @@ export { say, type BoxKey, type FootageBackground, type FootageBox, type PerOrie
9
9
  export type { InlineMark, MarkedText } from "@allyhub-next/video-core";
10
10
  /** What ctx.video(piece, el) gives: another video item, drawn inside an element. */
11
11
  export type { EmbeddedVideo } from "@allyhub-next/video-core";
12
- export { defineConfig, definePiece, paged, type Combo, type Dims, type Format, type FormatEntry, type FormatSpec, type ItemPiece, type Matrix, type MediaRef, type MessageHint, type MotionBlur, type MusicOptions, type PagedBuild, type PagedOptions, type PagedPiece, type PieceContext, type PieceDefinition, type PieceOptions, type PieceWritten, type PostProcess, type CaptureOptions, type ProjectConfig, type Slides, type SlidesOptions, type Video, type VideoBuild, type VideoItem, type VideoOptions, type VideoPiece, type VideoPieceOptions, } from "./piece.js";
12
+ export { defineConfig, definePiece, paged, type Combo, type Dims, type Format, type FormatEntry, type FormatSpec, type ItemPiece, type Matrix, type MediaRef, type MessageHint, type MotionBlur, type MusicOptions, type PieceContext, type PieceDefinition, type PieceOptions, type PieceWritten, type PostProcess, type CaptureOptions, type ProjectConfig, type Video, type VideoBuild, type VideoItem, type VideoOptions, type VideoPiece, type VideoPieceOptions, } from "./piece.js";
13
13
  export type { ListItem, ListPrefix, MessageInputs, MessageKey, MessageLists, MessageReader, Messages, } from "./messages.js";
14
- export { asset, boolean, color, list, number, object, text, time, type PropSchema, type Time, type Timed, } from "./props.js";
14
+ export { asset, boolean, color, list, number, object, text, time, type PropSchema, type PropsOf, type PropValue, type Time, type Timed, type VideoValue, } from "./props.js";
15
15
  export { countText, splitText } from "./text.js";
16
16
  export { markRuns, readMarks, withoutMarks, type MarkRun, } from "@allyhub-next/video-core";
17
17
  export type { Box, CaptionOptions, CaptionTrackCue, CaptionWord, EditList, EditRange, FaceOnFrame, FaceTrack, MediaInfo, MediaKind, PixelRect, TrackedFace, Word, } from "@allyhub-next/video-core";
package/dist/index.d.ts CHANGED
@@ -1,20 +1,13 @@
1
1
  export * from "./free.js";
2
2
  export { BOUND, sdkFor, type BoundSdk, type Sdk, type SdkModule, } from "./module.js";
3
3
  export type { FootageFn, PartFn, TakeFn } from "./parts.js";
4
- export type { SlidesFn, VideoFn } from "./piece.js";
4
+ export type { VideoFn } from "./piece.js";
5
5
  /**
6
6
  * A video: the default export of an item's video.ts. The function returns
7
7
  * its parts, in order.
8
8
  */
9
9
  export declare const video: import("./piece.js").VideoFn;
10
- /**
11
- * Pages of one format, each one still frame: a single image, a carousel,
12
- * slides, a PDF document; the default export of an item's slides.ts.
13
- * `notes: true` reads each page's speaker notes from
14
- * `<prefix>.<page>.notes`.
15
- */
16
- export declare const slides: import("./piece.js").SlidesFn;
17
- /** A part of a video, or a page of a paged output. */
10
+ /** A part of a video. */
18
11
  export declare const part: import("./parts.js").PartFn;
19
12
  /**
20
13
  * Speech from a recording (an import, or a path) with its word times
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{footageFor as r,partFor as t,takeFor as e}from"./parts.js";import{slidesFor as p,videoFor as s}from"./piece.js";import{writtenIn as i}from"./written.js";export*from"./free.js";export{BOUND,sdkFor}from"./module.js";const o=i({file:""});export const video=s(o),slides=p(o),part=t(o),take=e(o),footage=r(o);
2
+ import{footageFor as r,partFor as t,takeFor as e}from"./parts.js";import{videoFor as p}from"./piece.js";import{writtenIn as f}from"./written.js";export*from"./free.js";export{BOUND,sdkFor}from"./module.js";const o=f({file:""});export const video=p(o),part=t(o),take=e(o),footage=r(o);
package/dist/module.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import * as free from "./free.js";
2
2
  import { type FootageFn, type PartFn, type TakeFn } from "./parts.js";
3
- import { type SlidesFn, type VideoFn } from "./piece.js";
3
+ import { type VideoFn } from "./piece.js";
4
4
  import { type SdkModule } from "./written.js";
5
5
  export type { SdkModule } from "./written.js";
6
6
  /** The functions that name files, and so are made for a module. */
7
- export declare const BOUND: readonly ["video", "slides", "part", "take", "footage"];
7
+ export declare const BOUND: readonly ["video", "part", "take", "footage"];
8
8
  /** The functions sdkFor makes for a module. */
9
9
  export interface BoundSdk {
10
10
  video: VideoFn;
11
- slides: SlidesFn;
12
11
  part: PartFn;
13
12
  take: TakeFn;
14
13
  footage: FootageFn;
package/dist/module.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import*as e from"./free.js";import{footageFor as i,partFor as a,takeFor as s}from"./parts.js";import{slidesFor as f,videoFor as n}from"./piece.js";import{writtenIn as p}from"./written.js";export const BOUND=["video","slides","part","take","footage"];export function sdkFor(r){const o=p(r),t={video:n(o),slides:f(o),part:a(o),take:s(o),footage:i(o)};return{...e,...t}}
2
+ import*as e from"./free.js";import{footageFor as a,partFor as f,takeFor as i}from"./parts.js";import{videoFor as n}from"./piece.js";import{writtenIn as p}from"./written.js";export const BOUND=["video","part","take","footage"];export function sdkFor(t){const o=p(t),r={video:n(o),part:f(o),take:i(o),footage:a(o)};return{...e,...r}}
package/dist/parts.d.ts CHANGED
@@ -74,7 +74,7 @@ export interface PartOptions {
74
74
  * directly. The window (`dur`, default 0.4 s) lies across the join,
75
75
  * `split` of it (default half) before; the parts keep their lengths.
76
76
  * Outside its own time a part's graphics hold and its footage runs on.
77
- * The first part's is ignored, and so is a paged output's. Pictures
77
+ * The first part's is ignored. Pictures
78
78
  * only: place a sound with `sounds`.
79
79
  */
80
80
  transition?: TransitionInput;
@@ -100,7 +100,7 @@ export interface PartOptions {
100
100
  */
101
101
  speechGainDb?: number;
102
102
  }
103
- /** A part of a video, or a page of a paged output. */
103
+ /** A part of a video. */
104
104
  export type PartFn = (opts: PartOptions) => PartSpec;
105
105
  /** part() for the module `at` names: its sounds' paths are from its folder. */
106
106
  export declare const partFor: (at: Written) => PartFn;
package/dist/piece.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { PIECE_BRAND, type PieceDefinition, type PagedOptions, type PartSpec, type PieceContext as StagePieceContext, type PieceWritten, type VideoOptions as StageVideoOptions } from "@allyhub-next/video-core";
1
+ import { PIECE_BRAND, type PieceDefinition, type PartSpec, type PieceContext as StagePieceContext, type PieceWritten, type VideoOptions as StageVideoOptions } from "@allyhub-next/video-core";
2
2
  import type { FormatEntry, Matrix } from "@allyhub-next/video-core";
3
3
  import type { ConfigSchema } from "@allyhub-next/formats";
4
4
  import type { VideoConfigSchema } from "@allyhub-next/video-core";
5
5
  import type { z } from "zod";
6
6
  import type { MessageReader } from "./messages.js";
7
7
  import type { Written } from "./written.js";
8
- export type { Combo, Dims, Format, FormatEntry, FormatSpec, Matrix, MediaRef, MessageHint, MotionBlur, MusicOptions, PagedOptions, PagedPiece, PostProcess, CaptureOptions, PieceDefinition, PieceWritten, VideoPiece, } from "@allyhub-next/video-core";
8
+ export type { Combo, Dims, Format, FormatEntry, FormatSpec, Matrix, MediaRef, MessageHint, MotionBlur, MusicOptions, PostProcess, CaptureOptions, PieceDefinition, PieceWritten, VideoPiece, } from "@allyhub-next/video-core";
9
9
  /**
10
10
  * allyhub.config.ts as a project writes it: the project's settings
11
11
  * (@allyhub-next/formats) with the look and the defaults every video
@@ -21,8 +21,6 @@ export interface PieceContext extends Omit<StagePieceContext, "s"> {
21
21
  }
22
22
  /** A video's parts function: the parts, in order. */
23
23
  export type VideoBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
24
- /** A deck's pages function: the pages, in order. */
25
- export type PagedBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
26
24
  export interface VideoOptions extends Omit<StageVideoOptions, "covers"> {
27
25
  /** Cover parts (optional): drawn for the cover image. */
28
26
  covers?(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
@@ -36,7 +34,7 @@ export interface PieceOptions {
36
34
  /**
37
35
  * What it is rendered as, one format: a preset (16x9, 9x16, 1x1, 4x5),
38
36
  * a platform profile (tiktok, reels…) or WIDTHxHEIGHT pixels; a4 and
39
- * letter for slides only. It may be { format, safe, maxDuration,
37
+ * letter are not a video's. It may be { format, safe, maxDuration,
40
38
  * loudness }: that format with its covered edges (any format), longest
41
39
  * length and loudness (a platform profile) changed; its name is still
42
40
  * the format's. Another format is a piece of its own, which imports what
@@ -63,14 +61,6 @@ export interface VideoPieceOptions extends PieceOptions, VideoOptions {
63
61
  */
64
62
  parts(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
65
63
  }
66
- export interface SlidesOptions extends PieceOptions, PagedOptions {
67
- /**
68
- * The pages, in order. Pages are made like a video's parts (part() with
69
- * layers), each with a key unique in the deck; a page is drawn at its
70
- * still moment. A method, as a video's parts is.
71
- */
72
- pages(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
73
- }
74
64
  /**
75
65
  * A video as video() makes it: its fields as written, so another piece can
76
66
  * spread it into its own (`video({ ...film, format: "9x16" })`), and where
@@ -81,22 +71,16 @@ export type Video = VideoPieceOptions & {
81
71
  readonly kind: "video";
82
72
  readonly written: PieceWritten;
83
73
  };
84
- /** A deck as slides() makes it. */
85
- export type Slides = SlidesOptions & {
86
- readonly [PIECE_BRAND]: true;
87
- readonly kind: "paged";
88
- readonly written: PieceWritten;
89
- };
90
74
  /**
91
75
  * Another item's piece, as what shows or plays it takes it: the SDK's own
92
76
  * video() or slides(), whose ctx reads the project's typed messages, or the
93
77
  * engine's piece. The engine's ctx is wider than the typed one, so a piece
94
78
  * video() made is not the engine's type, though it is the same object.
95
79
  */
96
- export type ItemPiece = PieceDefinition | Video | Slides;
80
+ export type ItemPiece = PieceDefinition | Video;
97
81
  /** A video item's piece: the SDK's video(), or the engine's piece. */
98
82
  export type VideoItem = PieceDefinition | Video;
99
- /** Whether a value is a piece video() or slides() made. */
83
+ /** Whether a value is a piece video() made. */
100
84
  export declare function isItemPiece(v: unknown): v is ItemPiece;
101
85
  /**
102
86
  * The same piece as the engine reads it: the ctx its parts get is the
@@ -105,28 +89,19 @@ export declare function isItemPiece(v: unknown): v is ItemPiece;
105
89
  export declare function enginePiece(p: ItemPiece): PieceDefinition;
106
90
  /** A video: the default export of an item's video.ts. Its function returns its parts, in order. */
107
91
  export type VideoFn = (opts: VideoPieceOptions) => Video;
108
- /** A deck: the default export of an item's slides.ts. */
109
- export type SlidesFn = (opts: SlidesOptions) => Slides;
110
92
  /**
111
93
  * video() for the module `at` names. Its music's and its LUT's paths are
112
94
  * from that module's folder, also once spread into another piece: a field
113
95
  * keeps the folder it was written in while its value is the same.
114
96
  */
115
97
  export declare const videoFor: (at: Written) => VideoFn;
116
- /**
117
- * slides() for the module `at` names: pages of one format, each one still
118
- * frame: a single image, a carousel, slides, a PDF document; the default
119
- * export of an item's slides.ts. `notes: true` reads each page's speaker
120
- * notes from `<prefix>.<page>.notes`.
121
- */
122
- export declare const slidesFor: (at: Written) => SlidesFn;
123
98
  /**
124
99
  * Gone: an item's entry file exports one video (`video({ … })`) or one
125
- * deck (`slides({ … })`). Calling it says so.
100
+ * deck (`presentation()`). Calling it says so.
126
101
  */
127
102
  export declare const definePiece: (opts: unknown) => never;
128
103
  /**
129
- * Gone: a deck is `slides({ format, pages })`, an item's slides.ts.
104
+ * Gone: a deck is `presentation()` from `@allyhub/sdk/slides`, an item's slides.ts.
130
105
  * Calling it says so.
131
106
  */
132
107
  export declare const paged: (build: unknown, opts?: unknown) => never;
package/dist/piece.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{PIECE_BRAND as c,isPieceDefinition as a}from"@allyhub-next/video-core";import{shapeProblem as p,voiceProblem as u}from"@allyhub-next/audio";const s=e=>{throw new Error(e)},m="An item's video.ts exports one video: export default video({ format, parts: (ctx) => [ part(…), … ] }). A second video (a cut-down, another format) is an item of its own, which imports what it shares.";export function isItemPiece(e){return a(e)}export function enginePiece(e){return e}const h=["music","post"];export const videoFor=e=>t=>{if((typeof t=="function"||typeof t.parts!="function")&&s(m),t.mic!==void 0){const i=u(t.mic);if(i!==void 0)throw new Error(`video: ${i}`)}const r=t.music;if(r!==void 0&&typeof r!="string"&&!("path"in r)){const i=Object.fromEntries(["filter","eq","compress"].filter(o=>r[o]!==void 0).map(o=>[o,r[o]])),n=p(i,!0);if(n!==void 0)throw new Error(`video: music: ${n}`)}const d=t.written?.paths,f={};for(const i of h){const n=t[i];if(n===void 0)continue;const o=d?.[i];f[i]=[n,o?.[0]===n?o[1]:e.base]}return{...t,[c]:!0,kind:"video",written:{file:e.file,...Object.keys(f).length>0?{paths:f}:{}}}},slidesFor=e=>t=>((typeof t=="function"||typeof t.pages!="function")&&s("An item's slides.ts exports one deck: export default slides({ format, pages: (ctx) => [ part(…), … ] }). Another deck (a handout in a4) is an item of its own, which imports what it shares."),{...t,[c]:!0,kind:"paged",written:{file:e.file}}),definePiece=()=>s("definePiece is gone: an item's entry file exports one piece, export default video({ format, parts: (ctx) => [ … ] }) in video.ts or slides({ format, pages: (ctx) => [ … ] }) in slides.ts, with what definePiece and its output had (id, format, matrix, music, mix…). Each of its other outputs is an item of its own, which imports what it shares."),paged=()=>s("paged() is gone: an item's slides.ts exports one deck, export default slides({ format, notes, pages: (ctx) => [ … ] }).");export function defineConfig(e){return e}
2
+ import{PIECE_BRAND as c,isPieceDefinition as a}from"@allyhub-next/video-core";import{shapeProblem as u,voiceProblem as m}from"@allyhub-next/audio";const d=e=>{throw new Error(e)},p="An item's video.ts exports one video: export default video({ format, parts: (ctx) => [ part(…), … ] }). A second video (a cut-down, another format) is an item of its own, which imports what it shares.";export function isItemPiece(e){return a(e)}export function enginePiece(e){return e}const h=["music","post"];export const videoFor=e=>t=>{if((typeof t=="function"||typeof t.parts!="function")&&d(p),t.mic!==void 0){const i=m(t.mic);if(i!==void 0)throw new Error(`video: ${i}`)}const s=t.music;if(s!==void 0&&typeof s!="string"&&!("path"in s)){const i=Object.fromEntries(["filter","eq","compress"].filter(o=>s[o]!==void 0).map(o=>[o,s[o]])),n=u(i,!0);if(n!==void 0)throw new Error(`video: music: ${n}`)}const f=t.written?.paths,r={};for(const i of h){const n=t[i];if(n===void 0)continue;const o=f?.[i];r[i]=[n,o?.[0]===n?o[1]:e.base]}return{...t,[c]:!0,kind:"video",written:{file:e.file,...Object.keys(r).length>0?{paths:r}:{}}}},definePiece=()=>d("definePiece is gone: an item's video.ts exports one video, export default video({ format, parts: (ctx) => [ … ] }), with what definePiece and its output had (id, format, matrix, music, mix…); a deck is slides.ts's export default presentation((prs) => { … }) from @allyhub/sdk/slides. Each other output is an item of its own, which imports what it shares."),paged=()=>d("paged() is gone: a deck is an item's slides.ts, export default presentation((prs) => { … }) from @allyhub/sdk/slides, with its slides in slides.yaml.");export function defineConfig(e){return e}
package/dist/props.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MediaKind, Preset, WordRef } from "@allyhub-next/video-core";
1
+ import type { MediaInfo, MediaKind, PieceDefinition, Preset, WordRef } from "@allyhub-next/video-core";
2
2
  declare const TIME: unique symbol;
3
3
  /**
4
4
  * A prop that is a moment (declared time()): seconds from the part's start
@@ -62,20 +62,63 @@ export interface ObjectProp extends Common {
62
62
  export type PropSchema = TextProp | TimeProp | AssetProp | ColorProp | NumberProp | BooleanProp | ListProp | ObjectProp;
63
63
  type Opts<T> = Omit<T, "type">;
64
64
  /** Text shown on screen: edited sentence by sentence, checked against its budget. */
65
- export declare const text: (o?: Opts<TextProp>) => TextProp;
65
+ export declare const text: <const O extends Opts<TextProp> = object>(o?: O) => TextProp & O;
66
66
  /**
67
67
  * A moment: given as a word reference ("inbox", "inbox@2", "inbox+0.2") or
68
68
  * seconds from the part's start; the component receives seconds. Type the
69
69
  * prop as `Time`.
70
70
  */
71
- export declare const time: (o?: Opts<TimeProp>) => TimeProp;
72
- /** Media: an import or ctx.asset(path). */
73
- export declare const asset: (o?: Opts<AssetProp>) => AssetProp;
71
+ export declare const time: <const O extends Opts<TimeProp> = object>(o?: O) => TimeProp & O;
72
+ /**
73
+ * Media: an import or ctx.asset(path). In a deck's slides.yaml, a path from
74
+ * the deck's folder; with `kind: "video"` it may also be a video item of
75
+ * the project (its folder), which a layout shows with footage().
76
+ */
77
+ export declare const asset: <const O extends Opts<AssetProp> = object>(o?: O) => AssetProp & O;
74
78
  /** A look variable such as var(--ak-color-accent); never a literal color. */
75
- export declare const color: (o?: Opts<ColorProp>) => ColorProp;
76
- export declare const number: (o?: Opts<NumberProp>) => NumberProp;
77
- export declare const boolean: (o?: Opts<BooleanProp>) => BooleanProp;
78
- export declare const list: (of: PropSchema, o?: Omit<Opts<ListProp>, "of">) => ListProp;
79
- export declare const object: (fields: Record<string, PropSchema>, o?: Omit<Opts<ObjectProp>, "fields">) => ObjectProp;
79
+ export declare const color: <const O extends Opts<ColorProp> = object>(o?: O) => ColorProp & O;
80
+ export declare const number: <const O extends Opts<NumberProp> = object>(o?: O) => NumberProp & O;
81
+ export declare const boolean: <const O extends Opts<BooleanProp> = object>(o?: O) => BooleanProp & O;
82
+ export declare const list: <const S extends PropSchema, const O extends Omit<Opts<ListProp>, "of"> = object>(of: S, o?: O) => ListProp & {
83
+ of: S;
84
+ } & O;
85
+ export declare const object: <const F extends Record<string, PropSchema>, const O extends Omit<Opts<ObjectProp>, "fields"> = object>(fields: F, o?: O) => ObjectProp & {
86
+ fields: F;
87
+ } & O;
88
+ /** A video a layout shows: a file's media, or a video item of the project. */
89
+ export type VideoValue = MediaInfo | PieceDefinition;
90
+ /** The value a layout receives for a prop of this schema. */
91
+ export type PropValue<S> = S extends {
92
+ type: "text";
93
+ } ? string : S extends {
94
+ type: "time";
95
+ } ? number : S extends {
96
+ type: "asset";
97
+ kind: "video";
98
+ } ? VideoValue : S extends {
99
+ type: "asset";
100
+ } ? MediaInfo : S extends {
101
+ type: "color";
102
+ } ? string : S extends {
103
+ type: "number";
104
+ } ? number : S extends {
105
+ type: "boolean";
106
+ } ? boolean : S extends {
107
+ type: "list";
108
+ of: infer I;
109
+ } ? PropValue<I>[] : S extends {
110
+ type: "object";
111
+ fields: infer F extends Record<string, unknown>;
112
+ } ? PropsOf<F> : unknown;
113
+ /** The props a layout receives for these schemas: the optional ones may be left out. */
114
+ export type PropsOf<P extends Record<string, unknown>> = {
115
+ [K in keyof P as P[K] extends {
116
+ optional: true;
117
+ } ? never : K]: PropValue<P[K]>;
118
+ } & {
119
+ [K in keyof P as P[K] extends {
120
+ optional: true;
121
+ } ? K : never]?: PropValue<P[K]>;
122
+ };
80
123
  export {};
81
124
  //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1,8 @@
1
+ export { Centipoints, Cm, Emu, Inches, Mm, Pt, RGBColor, MSO_ANCHOR, CategoryChartData, MSO_ARROWHEAD, XL_CHART_TYPE, XL_LABEL_POSITION, XL_LEGEND_POSITION, MSO_AUTO_SIZE, MSO_CONNECTOR, MSO_FILL, MSO_LINE, MSO_SHAPE, MSO_SHAPE_TYPE, MSO_THEME_COLOR, PP_ALIGN, PP_PLACEHOLDER, THEME_FONT, SLIDE_SIZES, presentationFor, isDeck, type Anchor, type AutoSize, type Background, type ColorFormat, type ComponentContext, type ComponentInput, type Deck, type FillFormat, type Font, type GeneratedSlide, type Generator, type Length, type LineFormat, type ListLevel, type ListStyle, type Paragraph, type Placeholders, type PlaceholderType, type Presentation, type PresentationOptions, type PropSpec, type Run, type Shape, type ShapeCollection, type ShapeType, type SlideLayout, type SlideLayouts, type SlideMaster, type SlideMasters, type SlideSizeName, type TextFrame, type TextStyles, type ThemeInput, } from "@allyhub-next/slides-core";
2
+ /**
3
+ * A deck: the default export of an item's slides.ts. Its function makes
4
+ * the presentation's slide masters, layouts, components and generators;
5
+ * its slides are slides.yaml beside it.
6
+ */
7
+ export declare const presentation: (options: import("@allyhub-next/slides-core").PresentationOptions | ((prs: import("@allyhub-next/slides-core").Presentation) => void), build?: (prs: import("@allyhub-next/slides-core").Presentation) => void) => import("@allyhub-next/slides-core").Deck;
8
+ //# sourceMappingURL=slides.d.ts.map
package/dist/slides.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{presentationFor as O}from"@allyhub-next/slides-core";export{Centipoints,Cm,Emu,Inches,Mm,Pt,RGBColor,MSO_ANCHOR,CategoryChartData,MSO_ARROWHEAD,XL_CHART_TYPE,XL_LABEL_POSITION,XL_LEGEND_POSITION,MSO_AUTO_SIZE,MSO_CONNECTOR,MSO_FILL,MSO_LINE,MSO_SHAPE,MSO_SHAPE_TYPE,MSO_THEME_COLOR,PP_ALIGN,PP_PLACEHOLDER,THEME_FONT,SLIDE_SIZES,presentationFor,isDeck}from"@allyhub-next/slides-core";export const presentation=O("");
package/docs/README.md CHANGED
@@ -9,7 +9,7 @@ What a piece is written with, for the version of the SDK installed beside them.
9
9
  - [speech.md](speech.md): `take()`, `say()`, word references, anchors, shown and said text, captions, edits files.
10
10
  - [sound.md](sound.md): music, sound effects, the mix, the master, how the voice was recorded.
11
11
  - [footage.md](footage.md): `footage()` layers: placing, cropping, reframing, punch-ins, faces and mattes, the background behind the person, a video item inside another.
12
- - [slides.md](slides.md): `slides()`, pages, speaker notes, what a deck renders to.
12
+ - [slides.md](slides.md): `presentation()`, masters, layouts and shapes, `slides.yaml`, a deck's script, what a deck renders to.
13
13
  - [batches.md](batches.md): the matrix: dimensions, slots, pools, structures, rules, combos.
14
14
  - [scenery.md](scenery.md): 3D sceneries: `defineScenery()`, cameras and their moves, the hand that holds one, the `scenery()` layer and its screens.
15
15
  - [modeling.md](modeling.md): a prop modelled in code with `@allyhub-next/model` and put in a scenery.
package/docs/batches.md CHANGED
@@ -9,7 +9,7 @@ A piece's `matrix` says which versions of it are made. Each version is a **combo
9
9
  - `lang` is the one dimension AllyHub reads: it picks each item's `script.<lang>.yaml` and `assets/text/<lang>.json`, the first value being the default language. Its values are lowercase language tags (`en`, `zh-cn`). Without `lang`, a piece's languages are the project's: the languages its scripts and shared text have, `allyhub.config.ts`'s `locales` first.
10
10
  - Other dimensions are the piece's: its parts function reads them from `ctx.combo`.
11
11
  - A name starts with a lowercase letter (then letters, digits, `_`, `-`); a value is letters, digits, `.`, `_`, `-`, each listed once. `size`, `format`, `piece`, `output`, `token`, `structure` and `id` name no dimension or slot. A wrong name or value is AK-M001.
12
- - A combo's **key** is its names sorted, each `name=value`, joined with commas: `audience=dev,lang=en` (`default` when there are none). It names the rendered files (`.allyhub/out/<piece>/video.<key>.mp4`) and filters commands' `--combo` (`--combo lang=zh-cn`).
12
+ - A combo's **key** is its names sorted, each `name=value`, joined with commas: `audience=dev,lang=en` (`default` when there are none). It filters commands' `--combo` (`--combo lang=zh-cn`); the rendered files carry its values, after the name of the piece's folder (`.allyhub/out/launch/launch.dev.en.mp4`).
13
13
 
14
14
  ## Slots
15
15
 
@@ -118,7 +118,7 @@ This makes `c01-en`, `c01-zh-cn`, `c02-en` and `c02-zh-cn`. Each combo is checke
118
118
  ## Combo ids
119
119
 
120
120
  - The chosen slot combinations are `c01`, `c02`, … in order (with as many digits as the count needs: `c001` when there are 100 or more). With more than one combo of the dimensions, an id adds their values: `c01-en`, `c01-zh-cn`.
121
- - A piece with slots names its files by id (`.allyhub/out/<piece>/video.c01-en.mp4`), and `--combo c03` names one.
121
+ - A piece with slots names its files by id (`.allyhub/out/launch/launch.c01-en.mp4`), and `--combo c03` names one.
122
122
  - A piece with dimensions only has no ids: its combos are named by their keys.
123
123
 
124
124
  ## In the parts function
package/docs/defaults.md CHANGED
@@ -6,7 +6,7 @@ Every default of the piece API that is a constant in the code, with what it hold
6
6
 
7
7
  ### Formats
8
8
 
9
- The presets (`PRESETS`) and page formats (`PAGE_FORMATS`, at 150 dpi): pixels, and the edges a platform's interface covers (`ctx.dims.safe`), changed by `format: { format, safe }`. A `WIDTHxHEIGHT` format covers none.
9
+ The presets (`PRESETS`): pixels, and the edges a platform's interface covers (`ctx.dims.safe`), changed by `format: { format, safe }`. A `WIDTHxHEIGHT` format covers none.
10
10
 
11
11
  | Format | Pixels | Covered: top, bottom, left, right |
12
12
  | --- | --- | --- |
@@ -14,8 +14,6 @@ The presets (`PRESETS`) and page formats (`PAGE_FORMATS`, at 150 dpi): pixels, a
14
14
  | `9x16` | 1080 × 1920 | 150, 400, 40, 140 |
15
15
  | `1x1` | 1080 × 1080 | 50, 90, 40, 40 |
16
16
  | `4x5` | 1080 × 1350 | 60, 120, 40, 40 |
17
- | `a4` (slides only) | 1240 × 1754 | none |
18
- | `letter` (slides only) | 1275 × 1650 | none |
19
17
 
20
18
  The platform profiles (`PROFILES`): the frame, the edges the platform's interface covers, the longest video in seconds (AK-F001; `format: { format, maxDuration }`), the loudness its sound is mastered to in LUFS (`format: { format, loudness }`, `video({ master })`), and the crf and most video bitrate in kbit/s `allyhub render` encodes its mp4 at.
21
19
 
@@ -71,6 +69,111 @@ The built-in look, `clean`, which `allyhub.config.ts`'s `look` is laid over. Its
71
69
  | `motion.beat` | `0.5` |
72
70
  | `sfx` | `{}` |
73
71
 
72
+ ## Decks
73
+
74
+ ### `CHART_DEFAULTS`
75
+
76
+ What a chart is drawn with unless it says otherwise (each key's option is in [slides.md](slides.md)). `margin` and `letter` are how the stage lays it out, and not in the file.
77
+
78
+ | Key | Value |
79
+ | --- | --- |
80
+ | `fontSize` | `12` |
81
+ | `titleScale` | `1.2` |
82
+ | `gapWidth` | `150` |
83
+ | `holeSize` | `50` |
84
+ | `margin` | `6` |
85
+ | `gridline` | `"#D9D9D9"` |
86
+ | `axisLine` | `"#BFBFBF"` |
87
+ | `letter` | `0.55` |
88
+ | `lineWidth` | `2.25` |
89
+ | `gridWidth` | `0.75` |
90
+ | `marker` | `5` |
91
+
92
+ ### `DECK_FONTS`
93
+
94
+ A deck's theme fonts where its code sets none (`prs.theme.fonts`): standard fonts every PowerPoint, Keynote and Google Slides has, drawn by fonts of the same metrics.
95
+
96
+ | Key | Value |
97
+ | --- | --- |
98
+ | `major` | `"Arial"` |
99
+ | `minor` | `"Arial"` |
100
+ | `major_east_asian` | `"Microsoft YaHei"` |
101
+ | `minor_east_asian` | `"Microsoft YaHei"` |
102
+ | `code` | `"Courier New"` |
103
+
104
+ ### `OFFICE_TEXT_STYLES`
105
+
106
+ A new master's text styles (`master.text_styles`: `title_style`, `body_style`, `other_style`, nine levels each), as PowerPoint's Office master has them: a title's 44 pt in the theme's major font at 0.9 lines, a body's bulleted levels at 28, 24, 20 and 18 pt with their indents, other text 18 pt. Lengths are EMU (`Pt(44)` is 558800). A master's, a layout's or a placeholder's `list_style` sets its own.
107
+
108
+ | Key | Value |
109
+ | --- | --- |
110
+ | `title` | `[{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":0,"bullet":null,"font":{"name":"+mj-lt","size":558800,"color":"dk1"}}]` |
111
+ | `body` | `[{"alignment":"l","line_spacing":{"lines":0.9},"space_before":127000,"bullet":"•","bullet_font":"Arial","margin_left":228600,"indent":-228600,"font":{"name":"+mn-lt","size":355600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":685800,"indent":-228600,"font":{"name":"+mn-lt","size":304800,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":1143000,"indent":-228600,"font":{"name":"+mn-lt","size":254000,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":1600200,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":2057400,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":2514600,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":2971800,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":3429000,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","line_spacing":{"lines":0.9},"space_before":63500,"bullet":"•","bullet_font":"Arial","margin_left":3886200,"indent":-228600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}}]` |
112
+ | `other` | `[{"alignment":"l","margin_left":0,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":457200,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":914400,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":1371600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":1828800,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":2286000,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":2743200,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":3200400,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}},{"alignment":"l","margin_left":3657600,"font":{"name":"+mn-lt","size":228600,"color":"dk1"}}]` |
113
+
114
+ ### `TEXT_FALLBACK`
115
+
116
+ What text has where not even a master's text styles say: 18 pt in the theme's minor font, single spacing.
117
+
118
+ | Key | Value |
119
+ | --- | --- |
120
+ | `alignment` | `"l"` |
121
+ | `line_spacing.lines` | `1` |
122
+ | `space_before` | `0` |
123
+ | `space_after` | `0` |
124
+ | `indent` | `0` |
125
+ | `font.name` | `"+mn-lt"` |
126
+ | `font.size` | `228600` |
127
+ | `font.color` | `"dk1"` |
128
+
129
+ ### `TEXT_INSETS`
130
+
131
+ A text frame's insets where none are set (`margin_left`…), as python-pptx and PowerPoint have them.
132
+
133
+ | Key | Value |
134
+ | --- | --- |
135
+ | `left` | `91440` |
136
+ | `top` | `45720` |
137
+ | `right` | `91440` |
138
+ | `bottom` | `45720` |
139
+
140
+ ### `TEXTBOX_FRAME`
141
+
142
+ A text box `add_textbox` makes, as python-pptx makes it: no wrapping, the shape fitted to its text. Set `word_wrap` and `auto_size` to change it.
143
+
144
+ | Key | Value |
145
+ | --- | --- |
146
+ | `word_wrap` | `false` |
147
+ | `auto_size` | `"shape"` |
148
+
149
+ ### `AUTOSHAPE_STYLE`
150
+
151
+ A shape `add_shape` makes, as python-pptx makes it (the theme's styles it is drawn by): filled and outlined in accent 1 (0.5 pt), its text light 1 in its middle, its one empty paragraph centred (text set with `text` replaces it, and is not). Its `fill`, `line` and `text_frame` change it.
152
+
153
+ | Key | Value |
154
+ | --- | --- |
155
+ | `fill` | `"accent1"` |
156
+ | `line` | `"accent1"` |
157
+ | `line_width` | `6350` |
158
+ | `font_color` | `"lt1"` |
159
+ | `vertical_anchor` | `"ctr"` |
160
+ | `alignment` | `"ctr"` |
161
+
162
+ ### `CONNECTOR_STYLE`
163
+
164
+ A line `add_connector` makes, as python-pptx makes it: the theme's second line, 1 pt, in accent 1. Its `line` changes it.
165
+
166
+ | Key | Value |
167
+ | --- | --- |
168
+ | `line` | `"accent1"` |
169
+ | `line_width` | `12700` |
170
+
171
+ ### `SLIDE_SECONDS`
172
+
173
+ A slide's window on the stage's clock, seconds: a still of it is drawn at its end, when what moves in its components has settled.
174
+
175
+ Value: `4`
176
+
74
177
  ## Parts and transitions
75
178
 
76
179
  ### `PART_DEFAULTS`
package/docs/docs.md CHANGED
@@ -145,4 +145,4 @@ A thread without an `id` or a `text` is left out when the file is read.
145
145
  ## Check and render
146
146
 
147
147
  - `allyhub check` reports AK-M008 for a doc whose file is not MDX, that holds what a doc does not draw (`{…}`, a tag inside a line other than the marks above, a wrong attribute or value), that shows a picture which is not in the project, or that is inside another item's folder; each problem has its file and line.
148
- - `allyhub render` prints each doc to `.allyhub/out/<place>/doc.pdf`; `--type png` writes a picture of the whole page (`doc.png`), `--type md` plain Markdown (`doc.md`: what the doc says without what only a doc can say), and `--type pdf,png,md` all three. A doc with a problem is not rendered: the command fails and says why. `allyhub help render` has every option.
148
+ - `allyhub render` prints each doc to a file named for its folder, `.allyhub/out/plan/plan.pdf`; `--type png` writes a picture of the whole page (`plan.png`), `--type docx` a Word document (`plan.docx`: its text editable, a picture Word cannot show as a JPEG), `--type md` plain Markdown (`plan.md`: what the doc says without what only a doc can say), and `--type pdf,docx,png,md` all of them. A doc with a problem is not rendered: the command fails and says why. `allyhub help render` has every option.
package/docs/project.md CHANGED
@@ -17,7 +17,7 @@ Only the dot folders and Node's own files are fixed places. `assets/` and `compo
17
17
 
18
18
  ## `package.json`
19
19
 
20
- - A folder is a project when its `package.json` depends on `allyhub` or `@allyhub/sdk`, or it has an `allyhub.config.*`. A command works on the nearest one at or above where it runs.
20
+ - A folder is a project when its `package.json` depends on `allyhub` or `@allyhub/sdk`, or it has an `allyhub.config.*`. A command works on the nearest one at or above where it runs. The smallest project is a folder with an `allyhub.config.ts` and no `package.json`: the CLI brings `@allyhub/sdk` (and its subpaths) to a project that does not install it.
21
21
  - The SDK and the CLI are one version. A project whose SDK is another version than the CLI that builds it is AK-B008; a `package.json` that declares AllyHub's packages before `npm install` has installed them is AK-B009, and nothing is built.
22
22
  - A piece may import any package `package.json` declares and `npm install` installed. An import of an undeclared package, a file outside the project or a URL is AK-B005. `three` (with `three/addons/…`), `@allyhub-next/model` and `@allyhub-next/scenery-host/layer` are lent by the CLI unless the project declares its own.
23
23
  - `npm create allyhub@latest <folder>` starts a project with these files.
@@ -65,7 +65,7 @@ An item is a folder with its entry file. The entry file's name says what the ite
65
65
  | Entry file | Item | Its entry file holds |
66
66
  | --- | --- | --- |
67
67
  | `video.ts` | A video | `export default video({ … })` ([video.md](video.md)) |
68
- | `slides.ts` | A deck | `export default slides({ … })` ([slides.md](slides.md)) |
68
+ | `slides.ts` | A deck | `export default presentation({ size }, (prs) => { … })` from `@allyhub/sdk/slides`, with `slides.yaml` beside it ([slides.md](slides.md)) |
69
69
  | `scenery.ts` | A 3D scenery | `export default defineScenery({ … })` ([scenery.md](scenery.md)) |
70
70
  | `model.ts` | A 3D model | `export default defineModel(build)` ([modeling.md](modeling.md)) |
71
71
  | `doc.mdx` | A doc | The doc itself, MDX |
@@ -80,13 +80,13 @@ An item is a folder with its entry file. The entry file's name says what the ite
80
80
 
81
81
  ### The entry file
82
82
 
83
- - The default export is `video({ … })` or `slides({ … })` written in the file, or a constant holding one (`const film = video({ … }); export default film`). A re-export, a factory function or a conditional is not followed (AK-M001).
83
+ - The default export is `video({ … })` or `presentation(…)` written in the file, or a constant holding one (`const film = video({ … }); export default film`). A re-export, a factory function or a conditional is not followed (AK-M001).
84
84
  - The module's top level runs in Node when the build reads the piece: what needs `window` or `document` goes in `parts` (or `pages`) or in a layer's `mount` and `render`. The top level may not use the network (AK-B003) and must finish (AK-B004).
85
85
  - Every field of the piece but its functions (`parts`, `pages`, `covers`) is plain data (AK-M001).
86
86
 
87
87
  ## The SDK, bound to its module
88
88
 
89
- A project file imports `@allyhub/sdk`; the build gives it the SDK with `video`, `slides`, `part`, `take` and `footage` made for that file (`sdkFor({ file })`). So a path a module writes as a string is relative to that module's own folder: `take("./vo/en.mp3")`, `footage("./broll.mp4")`, a part's `sounds`, `music`, `post.lut`, `.edits("./edits/host.json")`. A field keeps the folder it was written in when another piece spreads it. Nothing is a global.
89
+ A project file imports `@allyhub/sdk`; the build gives it the SDK with `video`, `part`, `take` and `footage` made for that file (`sdkFor({ file })`), and `@allyhub/sdk/slides` with `presentation` made for it. So a path a module writes as a string is relative to that module's own folder: `take("./vo/en.mp3")`, `footage("./broll.mp4")`, a part's `sounds`, `music`, `post.lut`, `.edits("./edits/host.json")`. A field keeps the folder it was written in when another piece spreads it. Nothing is a global.
90
90
 
91
91
  An item uses another by an ordinary relative import. A piece in another format is an item of its own:
92
92
 
@@ -111,7 +111,7 @@ import film from "../film/video.ts";
111
111
  export default video({ ...film, id: "launch/film-vertical", format: "9x16" });
112
112
  ```
113
113
 
114
- - `video()` and `slides()` return their fields as written, so a piece can spread another. A copy of a piece that sets `id` needs an `id` of its own.
114
+ - `video()` returns its fields as written, so a piece can spread another. A copy of a piece that sets `id` needs an `id` of its own.
115
115
  - A video item can be shown inside another: `take(piece)`, `footage(piece)` and `ctx.video(piece, el)` ([footage.md](footage.md), [speech.md](speech.md)). A chain of videos that reaches itself is AK-M010.
116
116
 
117
117
  ## Words: scripts and shared text
package/docs/sheets.md CHANGED
@@ -112,7 +112,7 @@ Threads about a sheet's cells are kept beside it in `comments.json`, as a doc's
112
112
  - `allyhub check` reports AK-M009, each with its file and line: rows that are not CSV, a header with an empty or repeated name, a row with more fields than the header; a value its column's type cannot read (five per column, then a count); a `file` cell naming no file of the project; a key with an empty or repeated value; a `sheet.yaml` that is not YAML, an unknown field or one of the wrong kind, a column, key or primary the sheet does not have; a sheet inside another item's folder. A mistake in `sheet.yaml` leaves the rest of it read.
113
113
  - `allyhub sheet <sheet>` measures each column of a sheet too long to read whole: count, empty cells, distinct values, values its type cannot read, smallest and largest, the most frequent values.
114
114
  - `allyhub sheet import <file> --to <folder>` makes a sheet of a CSV, a TSV or an Excel workbook (a sheet per worksheet), never over a place that is taken.
115
- - `allyhub render` writes each sheet as an Excel workbook, `.allyhub/out/<place>/sheet.xlsx`; `--type` takes any of `xlsx`, `csv`, `md`, `json`, and an item's place names one sheet (`allyhub render research/leads --type csv,md`). A sheet with a problem is not written: the command fails and says why.
115
+ - `allyhub render` writes each sheet as an Excel workbook named for its folder, `.allyhub/out/research/leads/leads.xlsx`; `--type` takes any of `xlsx`, `csv`, `md`, `json`, and an item's place names one sheet (`allyhub render research/leads --type csv,md`). A sheet with a problem is not written: the command fails and says why.
116
116
 
117
117
  ## A sheet in a piece
118
118