@allyhub/sdk 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +30 -4
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -5
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
- package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +15 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
- package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
- package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +20 -20
- package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
- package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/docs/batches.md +4 -4
- package/docs/contract.md +5 -5
- package/docs/defaults.md +2 -2
- package/docs/docs.md +5 -5
- package/docs/footage.md +8 -8
- package/docs/image.md +5 -5
- package/docs/layers.md +10 -10
- package/docs/linkedin.md +1 -1
- package/docs/modeling.md +3 -3
- package/docs/pictures.md +4 -4
- package/docs/project.md +11 -7
- package/docs/scenery.md +3 -3
- package/docs/sheets.md +5 -5
- package/docs/slides.md +2 -2
- package/docs/sound.md +7 -7
- package/docs/speech.md +7 -7
- package/docs/video.md +3 -3
- package/docs/websites.md +3 -3
- package/docs/x.md +2 -2
- package/package.json +1 -1
package/docs/layers.md
CHANGED
|
@@ -128,7 +128,7 @@ export const teams = part({
|
|
|
128
128
|
| `mount(el, props, ctx)` | Lays the layer out once: builds its elements, may measure text |
|
|
129
129
|
| `render(el, t, props, ctx)` | Sets everything that moves from `t` alone |
|
|
130
130
|
|
|
131
|
-
`at`, `until`, `dur` and `z` are the layer's options (`LAYER_OPTIONS`)
|
|
131
|
+
`at`, `until`, `dur` and `z` are the layer's options (`LAYER_OPTIONS`), so props take other names (`defineComponent` throws on these). A layer's length and still belong to its part.
|
|
132
132
|
|
|
133
133
|
### Layers in a frame
|
|
134
134
|
|
|
@@ -175,16 +175,16 @@ A prop declared `time()` (also inside `list()` and `object()`) is typed `Time` i
|
|
|
175
175
|
|
|
176
176
|
### `mount` and `render`
|
|
177
177
|
|
|
178
|
-
- `mount` runs once for each element a layer is drawn into, before any `render` of it: once per part that lists it, and again for a cover. Keep what `render` needs on the element (find it again with `one`, or a `WeakMap` keyed by `el`)
|
|
179
|
-
- `render(el, t, …)` gets `t`, seconds from the part's start, and runs only between the layer's `at` and `until`: an entrance counts from `ctx.layer.start`. It sets every moving property from `t` alone,
|
|
178
|
+
- `mount` runs once for each element a layer is drawn into, before any `render` of it: once per part that lists it, and again for a cover. Keep what `render` needs on the element itself (find it again with `one`, or a `WeakMap` keyed by `el`). The fonts the look and the text need have loaded by then, so it may measure.
|
|
179
|
+
- `render(el, t, …)` gets `t`, seconds from the part's start, and runs only between the layer's `at` and `until`: an entrance counts from `ctx.layer.start`. It sets every moving property from `t` alone, so the same moment draws the same frame in any order (AK-D002). What keeps a layer deterministic is in [contract.md](contract.md).
|
|
180
180
|
- A style value the browser does not accept (`fontWeight: "900px"`, `width: "760"`) is dropped by the browser; while checking, every inline style set is watched and such a value is AK-R004.
|
|
181
181
|
- Text inside an element marked `data-ak-picture` is part of a picture (a mocked interface the frame crops on purpose): the frame's text checks leave it out.
|
|
182
182
|
|
|
183
183
|
### What the contract relies on
|
|
184
184
|
|
|
185
|
-
- **The look by its variables**: colours and fonts as `var(--ak-color-*)` and `var(--ak-font-*)` ([video.md](video.md#the-look)) follow the project's look
|
|
185
|
+
- **The look by its variables**: colours and fonts as `var(--ak-color-*)` and `var(--ak-font-*)` ([video.md](video.md#the-look)) follow the project's look. A `color()` prop holds a look variable. A deck's component follows the deck's theme with `var(--ak-theme-*)` ([slides.md](slides.md#components)).
|
|
186
186
|
- **Text as text**: the helpers set text as text nodes (`textContent`), so a string never becomes markup.
|
|
187
|
-
- **Every format**: lay out from `ctx.dims`, `ctx.content` or `layout(ctx)`,
|
|
187
|
+
- **Every format**: lay out from `ctx.dims`, `ctx.content` or `layout(ctx)`, which hold every format: a custom `WxH` and a changed `safe` too.
|
|
188
188
|
|
|
189
189
|
## The layer's `ctx`
|
|
190
190
|
|
|
@@ -195,7 +195,7 @@ A prop declared `time()` (also inside `list()` and `object()`) is typed `Time` i
|
|
|
195
195
|
| `ctx.look` | The look (also the CSS variables `--ak-color-*`, `--ak-font-*`, `--ak-motion-beat`) |
|
|
196
196
|
| `ctx.format` | The format's name: `"9x16"`, `"1280x720"`; a deck's may be `"a4"` |
|
|
197
197
|
| `ctx.dims` | `{ width, height, orient, safe }` ([video.md](video.md#formats)) |
|
|
198
|
-
| `ctx.combo` | The combo. A layer
|
|
198
|
+
| `ctx.combo` | The combo. A layer reads the dimensions and its own part's slot (another slot's pick is AK-X005): a part is rendered once for every combo that has it |
|
|
199
199
|
| `ctx.dur` | The part's length, seconds |
|
|
200
200
|
| `ctx.layer` | `{ start, end }`: this layer's window, seconds from the part's start |
|
|
201
201
|
| `ctx.enter`, `ctx.exit` | `{ start, end }`: where a transition shares the screen with the part before (`enter`, from before 0) or after (`exit`, to past `ctx.dur`), seconds from the part's start; absent at a cut. An entrance that starts at `ctx.enter.end` plays once the part shows alone |
|
|
@@ -214,7 +214,7 @@ A prop declared `time()` (also inside `list()` and `object()`) is typed `Time` i
|
|
|
214
214
|
| `ctx.video?.(piece, el)` | Another video item drawn in an element of this layer's ([below](#a-video-inside-a-layer)) |
|
|
215
215
|
| `ctx.embedded` | True in a video drawn inside another |
|
|
216
216
|
| `ctx.layoutOnly` | True while a moment is drawn only to measure its layout: nothing reads its pixels. A layer that paints a canvas no layout depends on may skip painting then; it still places its elements |
|
|
217
|
-
| `ctx.realTimers?` | The page's own clock and timers (`now`, `setTimeout`, `clearTimeout`), for work that waits on the wall clock (a loader, a worker)
|
|
217
|
+
| `ctx.realTimers?` | The page's own clock and timers (`now`, `setTimeout`, `clearTimeout`), for work that waits on the wall clock (a loader, a worker); what a frame shows comes from `t` |
|
|
218
218
|
|
|
219
219
|
### The content box
|
|
220
220
|
|
|
@@ -256,7 +256,7 @@ left = pad, right = W − pad
|
|
|
256
256
|
| `emojiEl(value, style?)` | A span for an emoji in `var(--ak-font-emoji)` |
|
|
257
257
|
| `lightDark(el)` | The look's background and text colours as `{ light, dark }`. Call it in `mount` |
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
These are measurements and builders a layer calls: where things go, what is stressed and how it looks are the layer's.
|
|
260
260
|
|
|
261
261
|
## Animation, text, paths and noise
|
|
262
262
|
|
|
@@ -281,7 +281,7 @@ From `@allyhub/sdk`; pure functions.
|
|
|
281
281
|
|
|
282
282
|
## A person's input
|
|
283
283
|
|
|
284
|
-
A mouse's cursor, a hand (a finger hovering a screen, or a thing held to it), a finger's tap, a drag, a scrolled list or a field typed into, as functions of time.
|
|
284
|
+
A mouse's cursor, a hand (a finger hovering a screen, or a thing held to it), a finger's tap, a drag, a scrolled list or a field typed into, as functions of time. The piece says where and when, and draws what they return. Defaults: `INPUT_DEFAULTS` ([defaults.md](defaults.md)).
|
|
285
285
|
|
|
286
286
|
- **A cursor** glides: an aimed movement timed by Fitts' law, landing exactly where it is aimed, with none of a hand's errors; it rests before a click and after it. A hand's errors are options (`overshoot`, `scatter`, `bow`, `tremor`), none by default.
|
|
287
287
|
- **A hand** errs as hands do: past its target and back, a little off, its path bowed, trembling, each move drawn differently by `seed` and `index`. For what a hand holds or touches.
|
|
@@ -340,7 +340,7 @@ export const arrow = custom({
|
|
|
340
340
|
|
|
341
341
|
## Starter components
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
Components come as starter source: `allyhub add component/<name>` (`component/caption-line`) copies a starter component's source into the project's `components/`, where it is the project's code; `allyhub add` alone lists them. Each documents its props in its source, every value a prop with a default (its `*_DEFAULTS` constant where it has one): read it after adding. Import it by a relative path. Starters are mechanisms; a title, a list or an end card is the piece's own `custom()` or component.
|
|
344
344
|
|
|
345
345
|
| Component | What it does |
|
|
346
346
|
| --- | --- |
|
package/docs/linkedin.md
CHANGED
|
@@ -93,4 +93,4 @@ https://www.youtube.com/watch?v=…
|
|
|
93
93
|
|
|
94
94
|
`allyhub check` reports what LinkedIn refuses under `allyhub.linkedin/…`, at its line. `allyhub inspect <post>` gives the commentary's characters beside 3,000, its lines, hashtags and links, and its media's bytes and alt text; `allyhub inspect <article>` its title, words, headings, pictures and embeds. `allyhub frames` draws a post as the feed shows it (`feed`, folded; `open`) and an article as its page does (`article`), in Inter in place of the system face LinkedIn draws in; an embed and a link's card are drawn by their address.
|
|
95
95
|
|
|
96
|
-
`allyhub render <post>` writes the Posts API's request (`post.json`: the commentary in LinkedIn's little text, each medium beside it with the API it goes up by and the placeholder its id fills), or what a person posts by hand (`--type txt`: `post.txt`, the commentary as written, each medium beside it and its alt text in `<name>.alt.txt`). `allyhub render <article>` writes `article.html` with its pictures beside it. The editor's
|
|
96
|
+
`allyhub render <post>` writes the Posts API's request (`post.json`: the commentary in LinkedIn's little text, each medium beside it with the API it goes up by and the placeholder its id fills), or what a person posts by hand (`--type txt`: `post.txt`, the commentary as written, each medium beside it and its alt text in `<name>.alt.txt`). `allyhub render <article>` writes `article.html` with its pictures beside it. The editor's Download offers `txt` and a picture of the post (`png`); the request waits for publishing. Publishing to LinkedIn is not built.
|
package/docs/modeling.md
CHANGED
|
@@ -40,8 +40,8 @@ export default defineModel((bpy, parameters) => {
|
|
|
40
40
|
});
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
- `build(bpy, parameters)` may be async. `parameters` is plain JSON (`--args`, or a scenery's call). `bpy.random()` is seeded (`--param seed=`, default 0)
|
|
44
|
-
-
|
|
43
|
+
- `build(bpy, parameters)` may be async. `parameters` is plain JSON (`--args`, or a scenery's call). `bpy.random()` is the seeded random number (`--param seed=`, default 0): use it for randomness.
|
|
44
|
+
- Work on data: `bmesh.ops.*` take the geometry they act on and return the new geometry, as in Blender's Python, in place of `bpy.ops`, edit mode, selection and the active object. `applyModifier(bpy, object, { modifier })` applies one named modifier to its base mesh (Blender's `modifier_apply`).
|
|
45
45
|
- Relative imports name their extension (`./parts.ts`); only erasable TypeScript.
|
|
46
46
|
- An object's name is what the scenery commands and measurements call it; a taken name gets Blender's suffix (`Part.001`).
|
|
47
47
|
|
|
@@ -103,7 +103,7 @@ The surface's detail is about one `cell`.
|
|
|
103
103
|
- `allyhub 3d-model <file>` writes a GLB (Y up), by default `.allyhub/out/<module>.glb`; `--out` names another (`assets/media/models/<name>.glb` to load it as media). A failed build leaves the last GLB in place.
|
|
104
104
|
- A build is kept in `.allyhub/cache/model/` while the module, the files it read, its folder's files, its parameters and seed are unchanged; `--fresh` builds anew.
|
|
105
105
|
- The program is trusted project code, run in a child process; its logs go to stderr. An error names the call and the place in the project's files it failed at.
|
|
106
|
-
- A subdivision surface lies inside its cage: measure the surface (`--inspect`)
|
|
106
|
+
- A subdivision surface lies inside its cage: measure the surface (`--inspect`).
|
|
107
107
|
|
|
108
108
|
## In a scenery
|
|
109
109
|
|
package/docs/pictures.md
CHANGED
|
@@ -44,21 +44,21 @@ Besides these, the layer options of any graphic layer: `at`, `until`, `dur`, `z`
|
|
|
44
44
|
|
|
45
45
|
- **The geometry** is `placePicture` of `@allyhub/piece`, the numbers in [defaults.md](defaults.md) (`PICTURE_DEFAULTS`). `none` draws a pixel of the source on a pixel of the frame.
|
|
46
46
|
- **Lengths** (`radius`, a `filter`'s blur) are the frame's pixels, as CSS's, not px at 1080p as footage's.
|
|
47
|
-
- **A blend mode** mixes with what the stage draws under it: graphic layers and other pictures.
|
|
47
|
+
- **A blend mode** mixes with what the stage draws under it: graphic layers and other pictures. In a render, a video file's footage is composited after the stage draws, so a picture over footage blends with the graphic layers and pictures under it; the live preview blends it with the footage too.
|
|
48
48
|
- **Chrome draws it**, from the file alone: the same moment draws the same in order and out of order (AK-D002). A file that is not there is AK-A001; one that does not load AK-A005.
|
|
49
49
|
|
|
50
50
|
## Changing a picture's pixels
|
|
51
51
|
|
|
52
|
-
A picture's pixels are changed by AllyHub's cloud tools, each its own command (`allyhub ai-media <tool>`; `allyhub help ai-media <tool>` gives its input, its limits and its price): `generate-image`, `edit-image` (where a `mask` or a `markup` says, when given), `extend-image` and `cut-out-image` (the cut-out and its matte). A picture's parts as layers are the agent's to make: a part cut out (`cut-out-image`) and the picture without it (`edit-image` with a mask).
|
|
52
|
+
A picture's pixels are changed by AllyHub's cloud tools, each its own command (`allyhub ai-media <tool>`; `allyhub help ai-media <tool>` gives its input, its limits and its price): `generate-image`, `edit-image` (where a `mask` or a `markup` says, when given), `extend-image` and `cut-out-image` (the cut-out and its matte). A picture's parts as layers are the agent's to make: a part cut out (`cut-out-image`) and the picture without it (`edit-image` with a mask). The cloud chooses the model that serves each tool.
|
|
53
53
|
|
|
54
54
|
- **A picture on this computer** goes in by the address `allyhub upload` gives it.
|
|
55
55
|
- **What a call makes** is a new file, never the picture given changed, with its record beside it (`<file>.provenance`: the tool, the whole input, what it returned, the credits). The same call to the same `--file` finds that file and calls nothing. Files the output names deeper (a matte, the layers) are downloaded beside it, each listed in the result.
|
|
56
|
-
- **
|
|
56
|
+
- **A mask** says where the picture changes; the file returned is the whole picture, ready to show.
|
|
57
57
|
- **A Mark up note's region** is SVG path data in the pixels of the picture whose file it names.
|
|
58
58
|
|
|
59
59
|
## `footage()` of a still
|
|
60
60
|
|
|
61
|
-
`footage(still, opts)` is `picture()` with footage's options read as its: `at`, `until`, `dur`, `box` (one rectangle, or `"full"`), `fit`, `crop` (one rectangle), `reframe` (`"center"` or `{ x, y }`: its position
|
|
61
|
+
`footage(still, opts)` is `picture()` with footage's options read as its: `at`, `until`, `dur`, `box` (one rectangle, or `"full"`), `fit`, `crop` (one rectangle), `reframe` (`"center"` or `{ x, y }`: its position), `shape: "circle"` (an ellipse mask) and `radius` (px at 1080p). A still is one picture with no sound, so it takes these options, with one box and one crop for its whole time (any other throws).
|
|
62
62
|
|
|
63
63
|
## A deck's pictures
|
|
64
64
|
|
package/docs/project.md
CHANGED
|
@@ -50,14 +50,17 @@ Only the dot folders and Node's own files are fixed places. `assets/` and `compo
|
|
|
50
50
|
|
|
51
51
|
## `.allyhub/`
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Made again as needed: never saved with the project, never in Git. What a piece imports lives in the project's other folders, and what must outlive a machine goes in `.agents/`.
|
|
54
54
|
|
|
55
55
|
| Folder | What is in it |
|
|
56
56
|
| --- | --- |
|
|
57
57
|
| `.allyhub/work/` | The agent's working files, free to throw away: frame sheets, cut sheets, references (`reference/`) |
|
|
58
58
|
| `.allyhub/out/` | Renders and exports, by the item's id |
|
|
59
59
|
| `.allyhub/cache/` | What the tools rebuild: builds, the media index (face tracks, mattes, levels), the part cache, types |
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
## `.agents/`
|
|
62
|
+
|
|
63
|
+
The agents' folder, saved with the project: skills (`skills/`), AllyHub's agent's notes (`memory/`), and what a person deleted (`trash/`: in an editor, kept until they empty it; from Studio's sidebar, a folder each with its `deleted.json`, kept 30 days).
|
|
61
64
|
|
|
62
65
|
## Items
|
|
63
66
|
|
|
@@ -91,15 +94,16 @@ work:
|
|
|
91
94
|
| (none) | A canvas | A `.canvas` file, JSON Canvas: its editor opens it by its name, so its entry names no `kind` (`- file: boards/launch.canvas`) |
|
|
92
95
|
|
|
93
96
|
- Each piece has its `kind`, its `file` from the project's root and, if you want, a `title`: its name where people see it; without one, the title its file says, else the file's name. A `group` is a heading over its `items`, and groups nest. A new project's list is `work: []`; an item a person makes in Studio or `allyhub dev` is added at its end.
|
|
94
|
-
- A file the list does not name is yours alone: a scenery a video imports, a part, a helper, a draft.
|
|
97
|
+
- A file the list does not name is yours alone: a scenery a video imports, a part, a helper, a draft. A person sees it once the list names it: a file of no kind, such as a Word document they gave you, is listed with no `kind` (`- file: contracts/offer.docx`) and shown as it is. The build still follows imports to a file the list does not name.
|
|
98
|
+
- A file listed with no `kind` is named by its file's name, extension and all (`offer.docx`), unless its entry gives a `title`, and its id is its path (`contracts/offer.docx`); so `report.mdx` (a doc) and `report.pdf`, or `data.csv` and `data.xlsx`, are listed and opened side by side.
|
|
95
99
|
- An item's **id** is its file without its extension (`launch/film`), one in the project: it names the item in commands (`allyhub check launch/film`, `--piece launch/film`), in `.allyhub/out/` and in a share. A piece's `id` is its item's unless it sets `id` (lowercase letters, digits, `.`, `_` and `-`, with `/` between levels). Two pieces with one id are AK-B001. The id names its message keys (`launch/film` reads keys under `launch.film.`) and seeds its randomness.
|
|
96
100
|
- An item names the other files it uses, each from its own file's folder: a piece's script (`script: "./film.{locale}.yaml"`), a deck's slides file (`slides: "./deck.yaml"`), a sheet's code (`code: ./forecast.ts`) and its tables' CSV files. Nothing is found by a fixed name, so items share a folder freely, and two share a file only when both name it.
|
|
97
|
-
- `allyhub check` reports what is wrong with the list: a list it cannot read, a kind not loaded, a file listed with no kind that no editor opens by its name, or a file not there (AK-M002), one id twice (`a.ts` and `a.mdx`, or one file listed twice, AK-M003). Moving or renaming a listed file in Studio writes the list again, with the imports.
|
|
101
|
+
- `allyhub check` reports what is wrong with the list: a list it cannot read, a kind not loaded, a file listed with no kind that no editor opens by its name, or a file not there (AK-M002), one id twice (`a.ts` and `a.mdx`, both of a kind, or one file listed twice, AK-M003: the first is shown). Moving or renaming a listed file in Studio writes the list again, with the imports.
|
|
98
102
|
|
|
99
103
|
### The item's file
|
|
100
104
|
|
|
101
|
-
- The default export is `video({ … })` or `presentation(…)` written in the file, or a constant holding one (`const film = video({ … }); export default film`).
|
|
102
|
-
- 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
|
|
105
|
+
- The default export is `video({ … })` or `presentation(…)` written in the file, or a constant holding one (`const film = video({ … }); export default film`). The build reads it as written: a re-export, a factory function or a conditional there is AK-M001.
|
|
106
|
+
- 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 works offline (a network request is AK-B003) and finishes (AK-B004).
|
|
103
107
|
- Every field of the piece but its functions (`parts`, `pages`, `covers`) is plain data (AK-M001).
|
|
104
108
|
|
|
105
109
|
## The SDK, bound to its module
|
|
@@ -283,6 +287,6 @@ export default defineConfig({
|
|
|
283
287
|
The stage draws offline, so it draws only fonts that are files: its own, and the stylesheets a project brings.
|
|
284
288
|
|
|
285
289
|
- **Built in**: `"Inter Variable"` (Latin, Greek, Cyrillic, Vietnamese), `"Noto Sans SC"` (Chinese, 400 and 700) and `"Noto Color Emoji"` (the look's `font.emoji`). The `clean` look's `mono` is the computer's own monospace font, which differs between computers: bring one for code.
|
|
286
|
-
- **Imported by code**: install a font package and import its stylesheet in a piece or a module its pieces share (`import "@fontsource/space-grotesk/400.css"`), or import a stylesheet of `@font-face` rules beside the font files by a relative path.
|
|
290
|
+
- **Imported by code**: install a font package and import its stylesheet in a piece or a module its pieces share (`import "@fontsource/space-grotesk/400.css"`), or import a stylesheet of `@font-face` rules beside the font files by a relative path. Declare the package in `package.json` (AK-B005).
|
|
287
291
|
- **Listed in `allyhub.config.ts`**: `fonts` loads stylesheets on every stage, so the look can name a family no piece imports. An entry that names no file is AK-A001.
|
|
288
292
|
- A declared face costs nothing until text needs it: before the layers mount, the stage loads the faces of the families the look, the stylesheets and the layers' props name that cover a character of the piece's text; after mount, what the text on the stage asks for. A family that is not loaded falls to the next one, and a weight or style its faces lack is faked by the browser: both are AK-L006. A character no loaded font has is AK-L003.
|
package/docs/scenery.md
CHANGED
|
@@ -49,7 +49,7 @@ export default defineScenery({
|
|
|
49
49
|
|
|
50
50
|
`build(w)` runs once, awaited with every load it starts (60 s at most; in a video it counts in the piece's `loadLimit`, AK-P002); what it returns is `made`. `update(made, t, w)` poses it at `t`, seconds of scenery time. `cameras` (checked when defined, AK-W004) and `moves` are by name, for the commands and for layers. `bake` is in [Baked light](#baked-light). `title` is the item's name where `allyhub.yaml` gives it none, read from the module as written (a string, not computed); without either, its file's name.
|
|
51
51
|
|
|
52
|
-
**From `t` alone.** The same moment must draw the same pixels in any order (AK-D002). `Date`, `performance.now`, `Math.random`, `crypto.getRandomValues` and `requestAnimationFrame` follow the moment drawn; timers run only while it builds. Pose an `AnimationMixer` with `w.seek(mixer, t)` (every action reset, then `setTime(t)`)
|
|
52
|
+
**From `t` alone.** The same moment must draw the same pixels in any order (AK-D002). `Date`, `performance.now`, `Math.random`, `crypto.getRandomValues` and `requestAnimationFrame` follow the moment drawn; timers run only while it builds. Pose an `AnimationMixer` with `w.seek(mixer, t)` (every action reset, then `setTime(t)`). Name what is referred to (`Object3D.name`): cameras, moves, measurements and `projectScenery` take names, and a name no object has, or two have, is AK-W005.
|
|
53
53
|
|
|
54
54
|
`renderer` (all optional; `SCENERY_RENDERER_DEFAULTS`, the fastest drawing):
|
|
55
55
|
|
|
@@ -97,7 +97,7 @@ A `CameraState` points one of three ways, or looks down −Z, level:
|
|
|
97
97
|
| --- | --- | --- |
|
|
98
98
|
| `position` | required | Metres |
|
|
99
99
|
| `target`, `direction`, or `yaw`/`pitch` | down −Z | `yaw` about +Y (90 looks down −X); `pitch` above the horizon |
|
|
100
|
-
| `up` | `[0, 1, 0]` |
|
|
100
|
+
| `up` | `[0, 1, 0]` | Aim a view off `up` (one straight along it is AK-W004) |
|
|
101
101
|
| `roll` | 0 | Degrees about the view, counterclockwise |
|
|
102
102
|
| `lens` | 26 | 35 mm-equivalent focal length, mm |
|
|
103
103
|
| `lensFrame` | `"diagonal"` | What the lens is measured on: the frame's diagonal (CIPA), `"long"`, `"short"`, `"phone"` (`{ aspect: 4/3, keep: "long" }`, a phone's "26 mm"), or `{ aspect, keep }` |
|
|
@@ -252,7 +252,7 @@ export default video({
|
|
|
252
252
|
|
|
253
253
|
## Screens
|
|
254
254
|
|
|
255
|
-
`screen(content, opts)` puts content on a named object of the scenery (its first mesh's +Z face, the content's top left at the geometry's −x, +y). The content is a video item of the project (its piece, imported: its parts, timing, anchors and components its own;
|
|
255
|
+
`screen(content, opts)` puts content on a named object of the scenery (its first mesh's +Z face, the content's top left at the geometry's −x, +y). The content is a video item of the project (its piece, imported: its parts, timing, anchors and components its own; its picture, from its graphic layers) or graphic layers drawn on `size` px, whose windows and time props are seconds of the screen's time or references of the part.
|
|
256
256
|
|
|
257
257
|
| Option | Default | What it does |
|
|
258
258
|
| --- | --- | --- |
|
package/docs/sheets.md
CHANGED
|
@@ -202,7 +202,7 @@ The language is Excel's: `A1` and `$` references, ranges, `Sheet!A1`, `'My Sheet
|
|
|
202
202
|
- A formula that reads itself is a problem, and its cells and what reads them show `#CYCLE!`: Excel says so in a dialog. A cycle through a branch `IF` does not take is none, as in Excel. With `iteration` on it is no problem: as Excel's iterative calculation does, its cells and what reads them are computed again, each reading the latest value of the others (a cell not computed yet reads its `start`, or 0), until no value moves by `max_change` or `max_iterations` rounds have run. `allyhub inspect sheet` says how many rounds ran and how far a value moved in the last.
|
|
203
203
|
- An array result spills, as in Excel: the formula's cell shows the first value and the cells beside it the rest. They hold nothing in any file, read like any others, and `A1#` is the range the spill covers now. `#SPILL!` says something stands in the way (a cell that holds anything, a merge, a table, the edge of the sheet), and what stands there going lets it spill. A calculated column cannot spill. `=@A1:A9` is the value in the formula's own row. `FILTER`, `SORT`, `SORTBY`, `UNIQUE`, `SEQUENCE`, `RANDARRAY` (seeded as `RAND` is), `TEXTSPLIT`, `TAKE`, `DROP`, `VSTACK`, `HSTACK`, `TOCOL`, `TOROW`, `CHOOSEROWS`, `CHOOSECOLS`, `EXPAND`, `WRAPROWS` and `WRAPCOLS` give arrays; `MAP`, `REDUCE`, `SCAN`, `BYROW`, `BYCOL` and `MAKEARRAY` take a `LAMBDA`.
|
|
204
204
|
- A **data table** is Excel's What-If Analysis table, `=TABLE(row input, column input)` over its cells as a range key (`B5:F9: =TABLE($B$1,$B$2)`), its references absolute: each cell is the table's formula with the inputs set to the value atop its column and the value left of its row. A two-way table's formula is the cell above its left column, `A4` here; with a column input alone (`=TABLE(,$B$2)`) the formulas are the row above it, one a column, and with a row input alone (`=TABLE($B$1,)`) the column left of it, one a row. It is worked out after what it reads, iterating where the model does, and again with every change; an `.xlsx` holds it as Excel's own.
|
|
205
|
-
- A formula
|
|
205
|
+
- A formula reads its own workbook.
|
|
206
206
|
|
|
207
207
|
## In a script
|
|
208
208
|
|
|
@@ -395,7 +395,7 @@ export default workbook((wb, { data }) => {
|
|
|
395
395
|
- Its sheets come after the workbook file's, and the workbook file holds at least one.
|
|
396
396
|
- A person sees them locked. A change is refused as on a protected sheet, offering to ask you or Make Ordinary Sheet, which writes that sheet to the workbook file and its rows to CSV files. **A sheet the workbook file holds by a name is the workbook file's: what the code makes of that name is left out**, which `allyhub inspect` says (`sheet-ordinary`). Take it out of the workbook file to give it back to the code.
|
|
397
397
|
- An `.xlsx` holds them as plain sheets.
|
|
398
|
-
-
|
|
398
|
+
- A generated formula reads names and tables (`=growth`, `=orders[total]`) wherever it can, so it holds when a person inserts a row or renames a sheet.
|
|
399
399
|
|
|
400
400
|
`ws["A1"]` is a cell in TypeScript's types, so a value is written `ws["A1"].value = 5` or `ws.cell(1, 1, 5)`. TypeScript has no way to type openpyxl's `ws["A1"] = 5`, though it runs.
|
|
401
401
|
|
|
@@ -408,11 +408,11 @@ A name of openpyxl's that is not held throws where it is used, naming what the c
|
|
|
408
408
|
- `allyhub sheet calc <sheet> [what]` prints what a workbook computes, as an aligned table: a sheet (`Summary`, its used range), a range (`Summary!B3:M3`), a table, a name, or every sheet. `--scenario high` computes it with a scenario's inputs; `--scenarios` compares them.
|
|
409
409
|
- `allyhub sheet trace <sheet> <cell>` prints a cell's formula, where it is written, what it reads and what reads it.
|
|
410
410
|
- `allyhub sheet <sheet>` measures each table's columns: counts, empty cells, distinct values, errors, smallest and largest, sum and mean, lengths, the most frequent values.
|
|
411
|
-
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts
|
|
411
|
+
- `allyhub inspect <sheet>`, and `allyhub inspect` for a whole project, says what a workbook's formulas and cells are like, as facts for you to judge: `sheet-error`, each cell whose value is an error and whether it starts there; `sheet-number`, numbers written into a formula and what takes each, once for a formula a range holds; `sheet-unlike`, a cell between neighbours that read alike, unlike them; `sheet-exception`, a cell set apart from its calculated column's formula; `sheet-unused`, names and typed numbers nothing reads (no formula, chart, rule, check or name); `sheet-invalid`, a value under a validation that breaks it; `sheet-typed`, a number its code typed that neither its data nor its code holds; `sheet-ordinary`, a sheet its code makes and the workbook file holds too; `sheet-iteration`, with `iteration` on, the rounds iterative calculation ran over how many cells and how far a value moved in the last. `allyhub inspect sheet <sheet>` has their options: `--plain 0,1,-1` the numbers not said, `--around 1` how many neighbours each side must agree, `--kind`, `--all` for every finding, every number and a table's columns nothing reads.
|
|
412
412
|
- `allyhub sheet diff <was> <now>` compares two versions, two folders or a folder and an `.xlsx`: what changed value under a formula that did not, what changed formula with its value the same, both, what came and went, names, a table's rows lined up by its `key`, else by their place. `--tolerance`, `--all`, `--json`.
|
|
413
413
|
- `allyhub sheet capabilities` says what the SDK holds of openpyxl's.
|
|
414
414
|
- `allyhub sheet import <file> --to finance/forecast.yaml` makes a sheet of an Excel, CSV or TSV file, its tables' rows in `finance/data/`, never over a place that is taken (see [Excel](#excel)).
|
|
415
|
-
- `allyhub render` writes each sheet to `.allyhub/out/<id>/`: `--type xlsx` (the default), `pdf`, `png`, `csv` (a file a sheet, named after it). An agent reads a sheet's values with `allyhub sheet calc
|
|
415
|
+
- `allyhub render` writes each sheet to `.allyhub/out/<id>/`: `--type xlsx` (the default), `pdf`, `png`, `csv` (a file a sheet, named after it). An agent reads a sheet's values with `allyhub sheet calc`. A sheet with a problem is not written.
|
|
416
416
|
- `allyhub frames <sheet>` draws a picture of a sheet as a person sees it, letters and numbers on its edges; `--range` names a sheet (`Summary`), a range (`Summary!B3:D9`), columns (`A:C`) or rows (`1:20`). Without a range it draws the first 200 rows and 60 columns of each sheet, and says what it left out.
|
|
417
417
|
|
|
418
418
|
`allyhub help sheet` and `allyhub help render` give every option.
|
|
@@ -463,4 +463,4 @@ export default video({
|
|
|
463
463
|
});
|
|
464
464
|
```
|
|
465
465
|
|
|
466
|
-
A deck's chart reads one the same way: `data: ../budget#orders` in its slides file.
|
|
466
|
+
A deck's chart reads one the same way: `data: ../budget#orders` in its slides file. `ctx.data` reads data files up to 5 MB.
|
package/docs/slides.md
CHANGED
|
@@ -101,7 +101,7 @@ slides:
|
|
|
101
101
|
| `script` | none | Its script, from the module's folder, with `{locale}` once in its name for each language (`./deck.{locale}.yaml`) |
|
|
102
102
|
| `size` | `"16:9"` | A slide size by name (`16:9`, `16:10`, `4:3` as PowerPoint's; `a4`, `a4-portrait`, `letter`, `letter-portrait` the paper's own; a carousel is an image, [image.md](image.md)) or `{ width, height }` in EMU |
|
|
103
103
|
| `title` | none | Its name for people, what lists show it by |
|
|
104
|
-
| `theme` | the project's look's colours, standard fonts | `{ colors, fonts }`: theme colours by PresentationML's names (`dk1`, `lt1`, `dk2`, `lt2`, `accent1`…`accent6`, `hlink`, `folHlink`), over the project's look (`dk1` its foreground, `lt1` its background, `accent1` its accent); fonts (`major`, `minor`, `major_east_asian`, `minor_east_asian`, and `code`, Courier New unless set, which the script's `` `code` `` is set in: PowerPoint's theme has no such font, so in the file it is a run's own), Arial and Microsoft YaHei unless set: fonts every PowerPoint, Keynote and Google Slides has. These and Calibri, Times New Roman, Cambria and Courier New are drawn here by fonts of the same metrics (Arimo, Noto Sans SC, Carlito, Tinos, Caladea, Cousine), so a line breaks in the file where it breaks here. Any other font the config's `fonts` lists goes in the PowerPoint file, a face each for regular, bold, italic and bold italic, unless its own licence bits (`fsType`) forbid it or it is a variable font; `allyhub render` says what did not go in.
|
|
104
|
+
| `theme` | the project's look's colours, standard fonts | `{ colors, fonts }`: theme colours by PresentationML's names (`dk1`, `lt1`, `dk2`, `lt2`, `accent1`…`accent6`, `hlink`, `folHlink`), over the project's look (`dk1` its foreground, `lt1` its background, `accent1` its accent); fonts (`major`, `minor`, `major_east_asian`, `minor_east_asian`, and `code`, Courier New unless set, which the script's `` `code` `` is set in: PowerPoint's theme has no such font, so in the file it is a run's own), Arial and Microsoft YaHei unless set: fonts every PowerPoint, Keynote and Google Slides has. These and Calibri, Times New Roman, Cambria and Courier New are drawn here by fonts of the same metrics (Arimo, Noto Sans SC, Carlito, Tinos, Caladea, Cousine), so a line breaks in the file where it breaks here. Any other font the config's `fonts` lists goes in the PowerPoint file, a face each for regular, bold, italic and bold italic, unless its own licence bits (`fsType`) forbid it or it is a variable font; `allyhub render` says what did not go in. A font named with no file the stage has is AK-L006 |
|
|
105
105
|
|
|
106
106
|
## Masters, layouts and placeholders
|
|
107
107
|
|
|
@@ -260,7 +260,7 @@ Everything the file holds that the deck does not carry over as it is is reported
|
|
|
260
260
|
|
|
261
261
|
## Measuring a deck
|
|
262
262
|
|
|
263
|
-
The check measures every slide as the stage draws it, and `allyhub inspect` lists what it found as facts: numbers for you to judge,
|
|
263
|
+
The check measures every slide as the stage draws it, and `allyhub inspect` lists what it found as facts: numbers for you to judge, every length in points as the slides file writes them. Text the slide's edge cuts at every build that shows it is AK-L002, an error that stops a render. A deck has:
|
|
264
264
|
|
|
265
265
|
- `text-overflow`: a shape's text past its box, by its lines' glyphs.
|
|
266
266
|
- `text-off-slide`: a shape's text the slide's edge cuts, how far and the share outside.
|
package/docs/sound.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sound
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A piece sounds with what it puts there: each part's speech ([speech.md](speech.md)), the music, footage with `audio: true` and the sound effects a part places. Each stem is shaped, levelled to a loudness, the music dips under speech, and the sum is mastered. The render's mix and the preview's are the same computation, sample by sample. This file covers music, sound effects, the mix, the master and how the voice was recorded.
|
|
4
4
|
|
|
5
5
|
```ts file=launch/film.ts
|
|
6
6
|
import { part, take, video } from "@allyhub/sdk";
|
|
@@ -77,13 +77,13 @@ A path written as a string (the music's file, a sound's) is relative to the modu
|
|
|
77
77
|
- `end`: where it stops, `"film"` (the video's end, the default), `"bar"` or `"beat"` (the last bar line or beat before it); its fade out ends there.
|
|
78
78
|
- `snap`: parts without speech end on the music's beats as the stretches lay them; default false.
|
|
79
79
|
- `gain`: its level over the film, `[{ at, db }]`, dB over its mix level, linear in dB between points and held outside them, added to its dip under speech.
|
|
80
|
-
- `filter`: an ffmpeg audio filter chain run on the file as it is decoded, on the file's clock. One chain
|
|
80
|
+
- `filter`: an ffmpeg audio filter chain run on the file as it is decoded, on the file's clock. One chain of filters that shape the file's own sound in place, keeping its timing.
|
|
81
81
|
- `eq`: bands, in order, `{ type, hz, db?, q?, keys? }`: `highpass`, `lowpass`, `bandpass` (`q` default 0.707), `peak` (`q` default 1), `lowshelf`, `highshelf` (`q` the slope, default 1). `keys: [{ at, hz?, db?, q? }]` move a band over the film.
|
|
82
82
|
- `compress`: a compressor after the bands, `{ threshold, ratio?, knee?, attack?, release?, window? }`, its threshold dB over the music's own loudness; the rest `COMPRESS_DEFAULTS` (ratio 2, knee 6 dB, attack 0.01 s, release 0.15 s, window 0.01 s).
|
|
83
83
|
|
|
84
84
|
- A moment of `gain` and `keys` (`at`) is film seconds, an anchor of any part (`"@drop"`, `"@drop-0.2"`, `"@/drop"`), a part's key (its start), or `{ part, at }`, a word reference or seconds in that part ([speech.md](speech.md#word-references)). One that is not there is AK-T004.
|
|
85
|
-
-
|
|
86
|
-
-
|
|
85
|
+
- Beats, bars, `snap` and `end` count on the tempo: `bpm`, or the one the build measured. Give `bpm` for a file with none measured (a fact says so); until then the file plays once and ends with the film.
|
|
86
|
+
- `loop` carries music shorter than the film to its end; the `music-length` fact gives both lengths.
|
|
87
87
|
- The music is levelled as shaped: `filter`, `eq` and `compress` change how it sounds, `mix` and `gain` how loud. The values are `MUSIC_DEFAULTS` ([defaults.md](defaults.md)).
|
|
88
88
|
|
|
89
89
|
## Sound effects
|
|
@@ -102,7 +102,7 @@ A file is levelled by its integrated loudness to `mix.sfx`; a sound too short or
|
|
|
102
102
|
|
|
103
103
|
## Footage sound
|
|
104
104
|
|
|
105
|
-
A footage layer's own sound is mixed
|
|
105
|
+
A footage layer's own sound is mixed in with `footage(file, { audio: true })`; `gainDb` (default 0) changes its level over the mix's footage level. A take's own footage (`footage()` without a file) sounds as the part's speech ([footage.md](footage.md)).
|
|
106
106
|
|
|
107
107
|
## The mix
|
|
108
108
|
|
|
@@ -125,7 +125,7 @@ The values are `MIX_DEFAULTS`. A part's own speech level is `speechGainDb` ([spe
|
|
|
125
125
|
|
|
126
126
|
`video({ master })`: a loudness in LUFS (−70 to 0), `{ lufs?, truePeak? }` (`truePeak` −9 to 0 dBTP), or `false`. The default is −14 LUFS, with a −3 dBTP true peak (`MASTER_DEFAULTS`).
|
|
127
127
|
|
|
128
|
-
The mix's integrated loudness is measured and one gain brings it to `lufs`; a limiter at 4 times the sample rate holds the true peak; what came out is measured again and the gain corrected by what the limiter took, at most 4 times, until within 0.1 LU (`MASTER_MECHANICS`).
|
|
128
|
+
The mix's integrated loudness is measured and one gain brings it to `lufs`; a limiter at 4 times the sample rate holds the true peak; what came out is measured again and the gain corrected by what the limiter took, at most 4 times, until within 0.1 LU (`MASTER_MECHANICS`). One gain serves the whole mix, so it keeps its loudness range. `false` (or `lufs: false`) keeps the mix's own level and only limits its peaks.
|
|
129
129
|
|
|
130
130
|
`allyhub audio` measures a video's mix as the render makes it: its loudness, range and true peak, what the master did, silences, onsets against cuts, each part's speech. `allyhub render --type wav` writes the mastered mix.
|
|
131
131
|
|
|
@@ -133,7 +133,7 @@ The mix's integrated loudness is measured and one gain brings it to `lufs`; a li
|
|
|
133
133
|
|
|
134
134
|
`video({ mic })` and `part({ mic })` say what heard the voice: a microphone of some pattern and distance, in a room, over the room's own sound, through what a device does by itself, then the finishing done to it after. The speech is played through it in the mix, the same every time. A part's `mic` replaces the video's for that part; parts with the same setting are one recording, with one room tone under them while they play.
|
|
135
135
|
|
|
136
|
-
-
|
|
136
|
+
- Without `mic`, it is `"studio"`: a cardioid 0.2 m away, no room, no room tone, finished (`"finish"`: a high-pass, a gentle de-esser and compressor). `mic: false` plays the files as they are.
|
|
137
137
|
- A setup by name: `"studio"`, `"phone"` (a phone held in front, a little below the face: two omni microphones, its band, its automatic gain, a small dead room and its room tone), `"lav"` (a clip-on on the chest, in a dead room, finished). Their values are `SETUP_PRESETS`, the rooms' `ROOM_PRESETS` and the finishing's `POST_PRESETS` ([defaults.md](defaults.md)).
|
|
138
138
|
- Any value of a setup changes:
|
|
139
139
|
|
package/docs/speech.md
CHANGED
|
@@ -48,7 +48,7 @@ Alone, a take is the whole recording, from its first word to its last. Each meth
|
|
|
48
48
|
- `.edits(path)`: a cut list, a `.json` file ([Edits files](#edits-files)). One that is not there, or does not match the format, is AK-T005: the take would play uncut.
|
|
49
49
|
- `.denoise(db?)`: reduces its noise by `db` (over 0, up to 97; default 12) with ffmpeg's FFT denoiser, in the render and the preview.
|
|
50
50
|
- `.roomTone(tone)`: how the part's lead and tail are filled where the take has no silence of its own round the part's words ([Room tone](#room-tone)).
|
|
51
|
-
- `.speed(times)`: plays it `times` as fast, its pitch kept (0.5 to 2); its words, the part's length and everything timed by them follow. The file
|
|
51
|
+
- `.speed(times)`: plays it `times` as fast, its pitch kept (0.5 to 2); its words, the part's length and everything timed by them follow. The file stays as it is. A part that shows the take's own picture plays it at speed 1 (`part()` throws for another speed).
|
|
52
52
|
|
|
53
53
|
With `.edits()`, `range` and `saying` look only at the words the edits keep: a phrase or line said only in removed words is AK-T006. A take a voice tool generated keeps the text it was made from in its `.provenance`: a part whose line is not in that text is AK-T007.
|
|
54
54
|
|
|
@@ -105,10 +105,10 @@ Text to speech. `allyhub voice` makes the missing files with the cloud voice too
|
|
|
105
105
|
|
|
106
106
|
- `voice`: the voice tool's voice id (`allyhub ai-media find-voices` finds them); default the tool's own.
|
|
107
107
|
- `tool`: the voice tool; default `"speak"` (`"clone-voice"` speaks in the voice of a recording you give in `params`; `allyhub help ai-media <tool>` lists its input).
|
|
108
|
-
- `params`: more input for the tool, plain JSON: fields its schema has besides the text and voice
|
|
109
|
-
- `speed`: 0.5 to 2, default 1: plays the file faster or slower, pitch kept, as `.speed()` does.
|
|
108
|
+
- `params`: more input for the tool, plain JSON: fields its schema has besides the text and voice, which `say` sends itself.
|
|
109
|
+
- `speed`: 0.5 to 2, default 1: plays the file faster or slower, pitch kept, as `.speed()` does. It is applied in playback, so one file serves every speed.
|
|
110
110
|
|
|
111
|
-
The file is named by a hash of the text read aloud, the voice, the tool and the params: a changed line
|
|
111
|
+
The file is named by a hash of the text read aloud, the voice, the tool and the params: a changed line gets a new file (`allyhub voice`). Text from `s(key)` is read aloud as its said side ([Shown and said](#shown-and-said)).
|
|
112
112
|
|
|
113
113
|
## Word references
|
|
114
114
|
|
|
@@ -163,7 +163,7 @@ export const how = (s: MessageReader) =>
|
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
- An anchor is looked up in the line the part says, so the speech comes from that script line: `say(s("<prefix>.<part>.say"))` or `take(…).saying(s(…))`. A name the line does not have is AK-T004.
|
|
166
|
-
- A name is letters, digits, `_` and `-`, once in a line; stretches may overlap. A name written twice, an end without a start, a stretch with no words and an anchor in a plural are AK-M007.
|
|
166
|
+
- A name is letters, digits, `_` and `-`, once in a line; stretches may overlap. A name written twice, an end without a start, a stretch with no words and an anchor in a plural are AK-M007. Put an anchor before a `<shown|said>` piece.
|
|
167
167
|
- An anchor lands by the line's letters matched to the words of its sound.
|
|
168
168
|
- `ctx.at("@name")` is seconds from the part's start; `ctx.film.at("@name")` is film seconds and takes an anchor of any part. `allyhub inspect timeline` prints where each landed.
|
|
169
169
|
|
|
@@ -195,11 +195,11 @@ type CaptionTrackCue = {
|
|
|
195
195
|
| --- | --- | --- |
|
|
196
196
|
| `maxChars` | 32 (16 for Chinese, Japanese and Korean) | Most characters in a cue |
|
|
197
197
|
| `maxWords` | none | Most words in a cue |
|
|
198
|
-
| `keep` | none | Phrases a cue
|
|
198
|
+
| `keep` | none | Phrases a cue keeps whole, matched as said; the cue round one may run over the limits |
|
|
199
199
|
| `close` | 0.4 | A gap between two cues shorter than this many seconds closes |
|
|
200
200
|
| `edges` | false | `true`: the first cue from the part's start, the last to its end |
|
|
201
201
|
|
|
202
|
-
Cues come from the part's speech (a cut take's kept words, spelled as the script when there is one), break at sentence and clause ends, then by length,
|
|
202
|
+
Cues come from the part's speech (a cut take's kept words, spelled as the script when there is one), break at sentence and clause ends, then by length, each within one part. In a J or L cut, the words heard under a neighbour's picture are there too. Where they go and which words they stress is the layer's code:
|
|
203
203
|
|
|
204
204
|
```ts file=launch/captions.ts
|
|
205
205
|
import { custom } from "@allyhub/sdk";
|
package/docs/video.md
CHANGED
|
@@ -97,7 +97,7 @@ format: { format: "9x16", safe: { bottom: 520 } }
|
|
|
97
97
|
|
|
98
98
|
`safe` is whole pixels per edge; edges not given keep the format's.
|
|
99
99
|
|
|
100
|
-
A layer reads `ctx.format` (the name) and `ctx.dims`: `{ width, height, orient, safe }`, `orient` `"landscape"`, `"portrait"` or `"square"`, `safe` the covered edges in pixels. Lay out by `ctx.dims` or `layout(ctx)` ([layers.md](layers.md#the-content-box)),
|
|
100
|
+
A layer reads `ctx.format` (the name) and `ctx.dims`: `{ width, height, orient, safe }`, `orient` `"landscape"`, `"portrait"` or `"square"`, `safe` the covered edges in pixels. Lay out by `ctx.dims` or `layout(ctx)` ([layers.md](layers.md#the-content-box)), which hold every format: a custom `WxH` and a changed `safe` too.
|
|
101
101
|
|
|
102
102
|
## Parts
|
|
103
103
|
|
|
@@ -241,7 +241,7 @@ Each frame's marks are a function of its frame number in the film: a still is th
|
|
|
241
241
|
|
|
242
242
|
- One chain: no `;`, no `[labels]`, no filter that reads or writes files.
|
|
243
243
|
- It gets the picture opaque as 8-bit planar RGB (`gbrp`), its `t` the film's time, and what it gives back is made opaque `gbrp` again.
|
|
244
|
-
-
|
|
244
|
+
- Time a chain by `t`, the film's time (`n` counts from each segment's first frame). A chain whose frames depend on where a segment starts (`n`, a seed drawn per frame, neighbouring frames) is AK-D002; one that does not run is AK-M001.
|
|
245
245
|
|
|
246
246
|
A part's `post: { filter }` is the same contract on that part's picture alone, before the camera's marks and the video's `post`: a clip's white balance or exposure.
|
|
247
247
|
|
|
@@ -265,4 +265,4 @@ export default video({
|
|
|
265
265
|
|
|
266
266
|
## Motion blur
|
|
267
267
|
|
|
268
|
-
`motionBlur: { samples, shutter? }`: each frame blends `samples` (2 to 16) moments of the graphic layers across `shutter` of the frame's time (over 0, up to 1; default 0.5, a 180° shutter). Footage
|
|
268
|
+
`motionBlur: { samples, shutter? }`: each frame blends `samples` (2 to 16) moments of the graphic layers across `shutter` of the frame's time (over 0, up to 1; default 0.5, a 180° shutter). Footage keeps the blur it was filmed with, and `z: "overlay"` layers stay sharp.
|
package/docs/websites.md
CHANGED
|
@@ -14,7 +14,7 @@ A website is any web project in a folder, made with the tools the agent chooses
|
|
|
14
14
|
| Field | Required | What |
|
|
15
15
|
| --- | --- | --- |
|
|
16
16
|
| `dev` | no | The command that serves the website while it is made, run by a shell in the website's folder. None: `output` is served as it is |
|
|
17
|
-
| `build` | no | The command that builds it into `output`. None:
|
|
17
|
+
| `build` | no | The command that builds it into `output`. None: `output` is used as it is |
|
|
18
18
|
| `output` | yes | The built website's folder, from the website's folder; `.` for a site of plain files |
|
|
19
19
|
|
|
20
20
|
## Previewing
|
|
@@ -23,7 +23,7 @@ Studio runs `dev` by a shell in the website's folder, with its `node_modules/.bi
|
|
|
23
23
|
|
|
24
24
|
| Variable | What |
|
|
25
25
|
| --- | --- |
|
|
26
|
-
| `PORT` | The port to listen on
|
|
26
|
+
| `PORT` | The port to listen on, where Studio reaches the dev server |
|
|
27
27
|
| `HOST` | `127.0.0.1`, the address to listen on (a server on `localhost` may listen on `::1` alone) |
|
|
28
28
|
| `ALLYHUB_PREVIEW_HOSTS` | The hosts a request may name, comma-separated: in a cloud Studio, the sandbox's and the gateway's for that port. A dev server that checks the `Host` header must allow them (Next.js: `allowedDevOrigins`) |
|
|
29
29
|
| `__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS` | The same hosts, as Vite reads them: Vite's and every framework on it (Astro, SvelteKit, Nuxt, VitePress) allow them with no configuration |
|
|
@@ -49,7 +49,7 @@ A hosted site is static files, `index.html` at the root of `output`:
|
|
|
49
49
|
|
|
50
50
|
- `/about` serves `about.html`, `/pricing/` serves `pricing/index.html`, and each page's other addresses redirect to that one. The nearest `404.html` answers a page not found, with status 404: nothing to configure.
|
|
51
51
|
- `_redirects` and `_headers` at the root of `output` work as on Netlify: a real file wins over a rule that does not end in `!`, the default status is 301, `/* /index.html 200` makes a single-page app, and a 200 rule stays inside the site. A site cannot set cookies, or the headers that are the platform's.
|
|
52
|
-
-
|
|
52
|
+
- Kept out of the site: dotfiles other than `.well-known/`, `node_modules`, the website's file, `package.json` and lockfiles. A link in `output` is refused.
|
|
53
53
|
- A file is at most 1 GiB, a version 20,000 files and 5 GiB. `Range` works, so video plays from a page, Safari's included.
|
|
54
54
|
- Every file is revalidated by its digest. Files a framework names by their bytes are kept by browsers only if `_headers` says so: `/_astro/*` then ` Cache-Control: public, max-age=31536000, immutable` (or `/assets/*` for Vite, `/_next/static/*` for Next.js).
|
|
55
55
|
- A site stays out of search engines until the person allows it.
|
package/docs/x.md
CHANGED
|
@@ -23,7 +23,7 @@ posts:
|
|
|
23
23
|
- **A long post** is a post over 280, which an X Premium account publishes up to 25,000. `allyhub.config.ts`'s `x: { premium: true }` says the account is Premium; it also takes videos up to 4 hours and 16 GB. X's timeline folds a long post at "Show more": at most 280 characters, back to a word's end (measured on x.com; `allyhub frames` draws the fold).
|
|
24
24
|
- **Plain text.** The API publishes no bold or italics. A link is its address.
|
|
25
25
|
- **A post's text as a block (`|`) or in quotes** when it holds ` #` (YAML reads the rest of the line as a comment), starts with `@`, `#` or a quote, or holds `: `. The line break a block ends in is not posted.
|
|
26
|
-
- **Media**: up to 4 pictures (JPEG, PNG or WebP, 5 MB each), or 1 GIF (15 MB), or 1 video (MP4 or MOV),
|
|
26
|
+
- **Media**: up to 4 pictures (JPEG, PNG or WebP, 5 MB each), or 1 GIF (15 MB), or 1 video (MP4 or MOV), one kind a post. Alt text up to 1,000 characters. X publishes no picture size, crop or safe area. A video is checked against the widest of what X publishes: 0.5 s to 20 minutes (4 hours with Premium), 8 GB (16 GB), sides 32 px to 1920 on the long side and 1200 on the short, 1:3 to 3:1. X's ways of posting take less: its web upload 1:2.39 to 2.39:1 at 40 frames a second and 25 Mbps, and without Premium 140 seconds and 512 MB; its API's media guide 1280×1024 and 60 frames a second. A 1280×720 or 720×1280 H.264 MP4 at 30 frames a second under 140 seconds suits every way.
|
|
27
27
|
- **Another item's made file**: `./shots.ts#hero` is the image `shots`'s board `hero`, made first when the post is rendered; a video item's file is its first version. Its bytes are checked when it is made.
|
|
28
28
|
|
|
29
29
|
## An X article
|
|
@@ -70,4 +70,4 @@ $$
|
|
|
70
70
|
|
|
71
71
|
`allyhub check` reports what X refuses under `allyhub.x/…`, at its line. `allyhub inspect <post>` gives each post's weighted length beside 280 and 25,000, its links, mentions, hashtags and cashtags, and its media's bytes; `allyhub inspect <article>` its words, its weighted length, its headings, its media, its embedded posts and links' cards, and its code's weight against 10,000. `allyhub frames` draws a post or an article as X shows it once published (a thread as the timeline does, an article in X's column), in Inter in place of X's own face; an embedded post and a link's card are drawn by their address, as their content is X's to fetch.
|
|
72
72
|
|
|
73
|
-
`allyhub render <post>` writes POST /2/tweets's request for each post (`posts.json`, the media beside it), or what a person posts by hand (`--type txt`: each post's text as written, `1.txt`, `2.txt`…, each medium beside it as `<post>-<place>` and its alt text in `<post>-<place>.alt.txt`). `allyhub render <article>` writes POST /2/articles/draft's request (`article.json`, its media beside it with `media.json`). The editor's
|
|
73
|
+
`allyhub render <post>` writes POST /2/tweets's request for each post (`posts.json`, the media beside it), or what a person posts by hand (`--type txt`: each post's text as written, `1.txt`, `2.txt`…, each medium beside it as `<post>-<place>` and its alt text in `<post>-<place>.alt.txt`). `allyhub render <article>` writes POST /2/articles/draft's request (`article.json`, its media beside it with `media.json`). The editor's Download offers `txt` and a picture (`png`) of a post, and a picture of an article; the requests wait for publishing. Publishing to X is not built.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "What an agent writes videos, decks and workbooks with: each built-in kind's authoring API, re-exported from its extension. The root, /dom, /media and /scenery are the video's: video(), parts with their speech, footage and sounds, defineComponent() and custom() layers, the layout, motion and input helpers, the scenery() layer's options; /slides is the deck's, python-pptx's API; /image is the image's, its boards each its own size; /sheets is the sheet's, openpyxl's API. Nothing a host needs.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://allyhub.com",
|