volito 0.1.0 → 0.3.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/README.md +200 -9
- package/dist/browser.d.ts +50 -1
- package/dist/browser.js +352 -43
- package/dist/chunks/{chunk-CFDFWZAC.js → chunk-CUQY6YI3.js} +1032 -404
- package/dist/chunks/chunk-PM3PLI3X.js +71 -0
- package/dist/chunks/chunk-QA4SEJCZ.js +601 -0
- package/dist/chunks/chunk-ZFG3X3DU.js +67 -0
- package/dist/chunks/chunk-ZHMWEZ4C.js +186 -0
- package/dist/chunks/init-JX2BYRKT.js +189 -0
- package/dist/chunks/review-RBH5EUZN.js +18 -0
- package/dist/cli.js +232 -32
- package/dist/index.d.ts +314 -2
- package/dist/index.js +75 -21
- package/dist/mcp.js +129 -22
- package/dist/player.d.ts +643 -0
- package/dist/player.js +6320 -0
- package/dist/registry.json +1 -1
- package/examples/player.html +93 -0
- package/examples/states.html +73 -0
- package/examples/volito-intro/DESIGN.md +23 -0
- package/examples/volito-intro/frame.js +187 -0
- package/examples/volito-intro/item.json +43 -0
- package/package.json +15 -7
- package/packs/3d/pack.json +1 -1
- package/packs/annotate/emphasis/frame.js +8 -0
- package/packs/annotate/pack.json +1 -1
- package/packs/annotate/reactions/frame.js +12 -0
- package/packs/backdrops/gradient/frame.js +5 -0
- package/packs/backdrops/pack.json +1 -1
- package/packs/broadcast/pack.json +1 -1
- package/packs/data/pack.json +1 -1
- package/packs/effects/chromatic/frame.js +17 -0
- package/packs/effects/chromatic/item.json +15 -0
- package/packs/effects/glass/frame.js +44 -0
- package/packs/effects/glass/item.json +16 -0
- package/packs/effects/grain/frame.js +20 -0
- package/packs/effects/grain/item.json +16 -0
- package/packs/effects/light-leak/frame.js +24 -0
- package/packs/effects/light-leak/item.json +15 -0
- package/packs/effects/neon/frame.js +28 -0
- package/packs/effects/neon/item.json +15 -0
- package/packs/effects/pack.json +13 -0
- package/packs/effects/shared.js +23 -0
- package/packs/effects/warp/frame.js +13 -0
- package/packs/effects/warp/item.json +15 -0
- package/packs/essentials/pack.json +1 -1
- package/packs/essentials/wipe/frame.js +13 -0
- package/packs/promo/pack.json +1 -1
- package/packs/social/pack.json +1 -1
- package/packs/transitions/glitch/frame.js +14 -0
- package/packs/transitions/pack.json +1 -1
- package/packs/transitions/shared.js +12 -0
- package/packs/type/pack.json +1 -1
- package/packs/type/word-by-word/frame.js +10 -0
- package/packs/ui/bell/frame.js +24 -0
- package/packs/ui/bell/item.json +21 -0
- package/packs/ui/button/frame.js +55 -0
- package/packs/ui/button/item.json +26 -0
- package/packs/ui/like/frame.js +34 -0
- package/packs/ui/like/item.json +21 -0
- package/packs/ui/loader/frame.js +34 -0
- package/packs/ui/loader/item.json +23 -0
- package/packs/ui/pack.json +13 -0
- package/packs/ui/shared.js +54 -0
- package/packs/ui/toggle/frame.js +30 -0
- package/packs/ui/toggle/item.json +22 -0
- package/{skill → skills/volito}/SKILL.md +43 -3
- package/skills/volito/references/art-direction.md +58 -0
- package/skills/volito/references/brand.md +59 -0
- package/skills/volito/references/delivery.md +40 -0
- package/skills/volito/references/matching-a-reference.md +39 -0
- package/skills/volito/references/motion-craft.md +56 -0
- package/skills/volito/references/self-review.md +44 -0
- package/skills/volito/references/type-and-layout.md +44 -0
- package/skills/volito/references/voice-and-timing.md +37 -0
- package/skills/volito/references/writing-items.md +44 -0
- /package/{skill/template → templates/item}/frame.js +0 -0
- /package/{skill/template → templates/item}/item.json +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
1
3
|
/** The pixel sprites the runtime has built in ($.sprite(name, …)), read from its source. */
|
|
2
4
|
declare const MG_SPRITE_NAMES: string[];
|
|
3
5
|
/** The icon names the runtime draws ($.icon(name, …)), read from its source so the two never drift. */
|
|
@@ -260,6 +262,33 @@ declare function normalizeMotion(cfg: {
|
|
|
260
262
|
/** "name.in=pop", "in=pop" (every part), "*.ease=bouncy", or a JSON object → overrides. */
|
|
261
263
|
declare function parseMotionArgs(args: string[]): MotionInput;
|
|
262
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Interactive states for <volito-player>: a graphic's timeline cut into named stretches — idle, hover,
|
|
267
|
+
* press, loading, success — that page events and code switch between. Each state plays its stretch once
|
|
268
|
+
* (then stays on its last frame, or moves on to `next`), loops it, or holds one frame. Times are seconds or
|
|
269
|
+
* the item's beat names, so an item that names its beats ("hover", "press") declares its states in
|
|
270
|
+
* item.json and works with no setup:
|
|
271
|
+
*
|
|
272
|
+
* "states": { "idle": { "from": "idle", "to": "hover", "play": "loop" },
|
|
273
|
+
* "hover": { "from": "hover", "to": "press", "play": "once" },
|
|
274
|
+
* "press": { "from": "press", "to": "loading", "play": "once", "next": "loading" } },
|
|
275
|
+
* "on": "pointerenter(idle): hover; pointerleave(hover): idle; click: press"
|
|
276
|
+
*
|
|
277
|
+
* Pure functions: parsed and resolved here, played by the element.
|
|
278
|
+
*/
|
|
279
|
+
declare const STATE_PLAYS: readonly ["once", "loop", "hold"];
|
|
280
|
+
type StatePlay = (typeof STATE_PLAYS)[number];
|
|
281
|
+
interface StateDef {
|
|
282
|
+
/** Where the stretch starts: seconds, a beat name, "start" or "end". Default: the start. */
|
|
283
|
+
from?: number | string;
|
|
284
|
+
/** Where it ends: seconds, a beat name, "start" or "end". Default: the end. */
|
|
285
|
+
to?: number | string;
|
|
286
|
+
/** once: play it and stay on its last frame (or go to `next`); loop: repeat it; hold: show `from` and stay. */
|
|
287
|
+
play?: StatePlay;
|
|
288
|
+
/** The state to go to when a `once` stretch finishes. */
|
|
289
|
+
next?: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
263
292
|
/**
|
|
264
293
|
* Packs and items: the library format. A pack is a folder of items that share a look and a
|
|
265
294
|
* helper file; an item is one motion graphic — `item.json` (what it is, the props it takes,
|
|
@@ -338,6 +367,13 @@ interface ItemManifest {
|
|
|
338
367
|
libs?: LibraryName[];
|
|
339
368
|
/** Faces whose glyphs 3D text is built from: brand roles ("display") or specs ("Anton:400"). Default: display. */
|
|
340
369
|
faces3d?: string[];
|
|
370
|
+
/**
|
|
371
|
+
* Interactive states for <volito-player>: named stretches of the timeline (beat names or seconds), each
|
|
372
|
+
* played once, looped or held — { "idle": { "from": "idle", "to": "hover", "play": "loop" }, … }.
|
|
373
|
+
*/
|
|
374
|
+
states?: Record<string, StateDef>;
|
|
375
|
+
/** The page events that switch states by default: "pointerenter(idle): hover; click: press". */
|
|
376
|
+
on?: string;
|
|
341
377
|
}
|
|
342
378
|
interface PackManifest {
|
|
343
379
|
format: number;
|
|
@@ -483,6 +519,102 @@ interface ItemQuery {
|
|
|
483
519
|
}
|
|
484
520
|
declare function searchItems(q?: ItemQuery, lib?: Library): MotionItem[];
|
|
485
521
|
|
|
522
|
+
/**
|
|
523
|
+
* The Graphic spec: one JSON document that says everything about one graphic — which item (or program),
|
|
524
|
+
* its words, brand, shape, timing, motion and sound. The CLI, the Node API and the MCP server read it, and
|
|
525
|
+
* the same spec renders the same frames anywhere. A recipe you can keep in a repo, diff, review and hand
|
|
526
|
+
* to an agent or a teammate.
|
|
527
|
+
*
|
|
528
|
+
* { "volito": 1, "item": "essentials/lower-third", "props": { "name": "Priya Sharma" }, "style": "ember", "aspect": "9:16" }
|
|
529
|
+
*
|
|
530
|
+
* "volito" is the format's major version: a new major only comes with a migration, and minor changes only
|
|
531
|
+
* add optional fields. This module is pure (no Node APIs) so the browser player and editors can use it.
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
declare const SPEC_VERSION = 1;
|
|
535
|
+
declare const SPEC_SCHEMA_URL = "https://volito.dev/schema/graphic.v1.json";
|
|
536
|
+
declare const GraphicSpecSchema: z.ZodObject<{
|
|
537
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
538
|
+
volito: z.ZodLiteral<1>;
|
|
539
|
+
name: z.ZodOptional<z.ZodString>;
|
|
540
|
+
item: z.ZodOptional<z.ZodString>;
|
|
541
|
+
program: z.ZodOptional<z.ZodString>;
|
|
542
|
+
code: z.ZodOptional<z.ZodString>;
|
|
543
|
+
placement: z.ZodOptional<z.ZodEnum<{
|
|
544
|
+
overlay: "overlay";
|
|
545
|
+
full: "full";
|
|
546
|
+
}>>;
|
|
547
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
548
|
+
style: z.ZodOptional<z.ZodString>;
|
|
549
|
+
colors: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
551
|
+
accent2: z.ZodOptional<z.ZodString>;
|
|
552
|
+
ink: z.ZodOptional<z.ZodString>;
|
|
553
|
+
paper: z.ZodOptional<z.ZodString>;
|
|
554
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
555
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
556
|
+
dark: "dark";
|
|
557
|
+
light: "light";
|
|
558
|
+
}>>;
|
|
559
|
+
display: z.ZodOptional<z.ZodString>;
|
|
560
|
+
text: z.ZodOptional<z.ZodString>;
|
|
561
|
+
mono: z.ZodOptional<z.ZodString>;
|
|
562
|
+
}, z.core.$strict>>;
|
|
563
|
+
aspect: z.ZodOptional<z.ZodString>;
|
|
564
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
fps: z.ZodOptional<z.ZodNumber>;
|
|
566
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
567
|
+
background: z.ZodOptional<z.ZodString>;
|
|
568
|
+
words: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
569
|
+
w: z.ZodString;
|
|
570
|
+
s: z.ZodNumber;
|
|
571
|
+
e: z.ZodNumber;
|
|
572
|
+
}, z.core.$strict>>, z.ZodString]>>;
|
|
573
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
574
|
+
beats: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
575
|
+
motion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
576
|
+
mood: z.ZodOptional<z.ZodEnum<{
|
|
577
|
+
retro: "retro";
|
|
578
|
+
energetic: "energetic";
|
|
579
|
+
elegant: "elegant";
|
|
580
|
+
playful: "playful";
|
|
581
|
+
cinematic: "cinematic";
|
|
582
|
+
glitchy: "glitchy";
|
|
583
|
+
minimal: "minimal";
|
|
584
|
+
kinetic: "kinetic";
|
|
585
|
+
}>>;
|
|
586
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
sound: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
589
|
+
bed: z.ZodOptional<z.ZodString>;
|
|
590
|
+
level: z.ZodOptional<z.ZodNumber>;
|
|
591
|
+
}, z.core.$strict>]>>;
|
|
592
|
+
render: z.ZodOptional<z.ZodObject<{
|
|
593
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
594
|
+
mov: "mov";
|
|
595
|
+
webm: "webm";
|
|
596
|
+
mp4: "mp4";
|
|
597
|
+
hevc: "hevc";
|
|
598
|
+
gif: "gif";
|
|
599
|
+
png: "png";
|
|
600
|
+
}>>;
|
|
601
|
+
out: z.ZodOptional<z.ZodString>;
|
|
602
|
+
}, z.core.$strict>>;
|
|
603
|
+
}, z.core.$strict>;
|
|
604
|
+
type GraphicSpec = z.infer<typeof GraphicSpecSchema>;
|
|
605
|
+
interface SpecIssue {
|
|
606
|
+
/** Where in the spec, as a JSON path ("props.name", "motion.plate.in"); "" for the whole document. */
|
|
607
|
+
path: string;
|
|
608
|
+
message: string;
|
|
609
|
+
}
|
|
610
|
+
/** Parse and check the shape of a spec (not the item it names). */
|
|
611
|
+
declare function parseSpec(input: unknown): {
|
|
612
|
+
spec: GraphicSpec | null;
|
|
613
|
+
errors: SpecIssue[];
|
|
614
|
+
};
|
|
615
|
+
/** The spec format as a JSON Schema (draft 2020-12), for editors and other languages. */
|
|
616
|
+
declare function specJsonSchema(): Record<string, unknown>;
|
|
617
|
+
|
|
486
618
|
interface ProgramFrame {
|
|
487
619
|
svg: string;
|
|
488
620
|
defs: string;
|
|
@@ -494,6 +626,8 @@ declare class ProgramError extends Error {
|
|
|
494
626
|
readonly line?: number;
|
|
495
627
|
constructor(message: string, line?: number | null);
|
|
496
628
|
}
|
|
629
|
+
/** Whether this engine's worker source still has the line the sound hook patches (a test keeps it true). */
|
|
630
|
+
declare function soundHookAvailable(): boolean;
|
|
497
631
|
declare class ProgramRunner {
|
|
498
632
|
private readonly ctx;
|
|
499
633
|
private readonly codeLine;
|
|
@@ -515,6 +649,14 @@ declare class ProgramRunner {
|
|
|
515
649
|
private sendSync;
|
|
516
650
|
/** The SVG body of the frame at clip time `t`. Throws a ProgramError when the program fails. */
|
|
517
651
|
frame(t: number, timeoutMs?: number): ProgramFrame;
|
|
652
|
+
/**
|
|
653
|
+
* The program's own sound design: what `function sound($)` returns, read once with `$` at t = 0 ($.dur,
|
|
654
|
+
* $.beat, $.at and $.data are there). `spec` is null when the program defines none; `error` when it threw.
|
|
655
|
+
*/
|
|
656
|
+
sound(timeoutMs?: number): {
|
|
657
|
+
spec: unknown;
|
|
658
|
+
error?: string;
|
|
659
|
+
};
|
|
518
660
|
/** Every frame run once with the runtime's trace on: when each element pops, slides, stamps or types in. */
|
|
519
661
|
trace(fps: number, timeoutMs?: number): {
|
|
520
662
|
marks: unknown[];
|
|
@@ -523,6 +665,107 @@ declare class ProgramRunner {
|
|
|
523
665
|
};
|
|
524
666
|
}
|
|
525
667
|
|
|
668
|
+
/**
|
|
669
|
+
* Sound design for Volito graphics — synthesised here, from nothing: no samples, no dependencies.
|
|
670
|
+
*
|
|
671
|
+
* A render carries sound two ways. Any program may define `function sound($)` and return cues
|
|
672
|
+
* (`{ at, kind, dur, level, pitch, pan }`) and, if it wants one, a tonal bed in a key; and every
|
|
673
|
+
* graphic is read through the runtime's motion trace (when each part pops, slides, stamps, types
|
|
674
|
+
* or bursts in), so `--sound` gives the right whoosh, pop or tick to an item nobody wrote cues for.
|
|
675
|
+
* Both end in `renderSound`: cues become stereo PCM through small synths (filtered noise for air
|
|
676
|
+
* and sweeps, sine drops for impacts, inharmonic partials for bells, detuned saws for a pad), a
|
|
677
|
+
* room (a Schroeder reverb), ducking of the bed under hits, a limiter, and a WAV ffmpeg muxes.
|
|
678
|
+
*
|
|
679
|
+
* Pure TypeScript, deterministic: the same cues render the same bytes every time.
|
|
680
|
+
*/
|
|
681
|
+
declare const SOUND_KINDS: readonly ["whoosh", "hit", "stamp", "pop", "tick", "click", "riser", "fall", "sub", "shimmer", "ding", "swell", "zap", "type", "scratch", "tone", "chord"];
|
|
682
|
+
type SoundKind = (typeof SOUND_KINDS)[number];
|
|
683
|
+
/** One line per kind, for help text and agents. */
|
|
684
|
+
declare const SOUND_NOTES: Record<SoundKind, string>;
|
|
685
|
+
interface SoundCue {
|
|
686
|
+
/** Clip seconds. */
|
|
687
|
+
at: number;
|
|
688
|
+
kind: SoundKind;
|
|
689
|
+
/** Seconds, for the kinds that last. */
|
|
690
|
+
dur?: number;
|
|
691
|
+
/** 0–2; 1 is the kind's own level. */
|
|
692
|
+
level?: number;
|
|
693
|
+
/** Semitones up or down from the kind's own pitch. */
|
|
694
|
+
pitch?: number;
|
|
695
|
+
/** A note for tone / chord ("A4", "D#3", "Bb2"). */
|
|
696
|
+
note?: string;
|
|
697
|
+
/** -1 left … 1 right (0 centre). */
|
|
698
|
+
pan?: number;
|
|
699
|
+
/** A different take of the same sound. */
|
|
700
|
+
seed?: number;
|
|
701
|
+
}
|
|
702
|
+
interface SoundBed {
|
|
703
|
+
/** "D", "F#", "Bb" — the key (A by default). */
|
|
704
|
+
key?: string;
|
|
705
|
+
mode?: "major" | "minor";
|
|
706
|
+
/** Clip seconds it plays between (the whole clip by default). */
|
|
707
|
+
from?: number;
|
|
708
|
+
to?: number;
|
|
709
|
+
/** 0–1 (0.5). */
|
|
710
|
+
level?: number;
|
|
711
|
+
/** 0 dark … 1 open (0.4). */
|
|
712
|
+
tone?: number;
|
|
713
|
+
}
|
|
714
|
+
interface SoundSpec {
|
|
715
|
+
cues?: SoundCue[];
|
|
716
|
+
/** A pad under everything: a bed object, true for one in A minor, or a key ("Dm", "F major"). */
|
|
717
|
+
bed?: SoundBed | boolean | string;
|
|
718
|
+
/** Also take cues from the graphic's own motion (true when the program gives no cues). */
|
|
719
|
+
auto?: boolean;
|
|
720
|
+
/** Master level, 0–2 (1). */
|
|
721
|
+
level?: number;
|
|
722
|
+
/** The room: 0 dry … 1 wet (0.25). */
|
|
723
|
+
room?: number;
|
|
724
|
+
}
|
|
725
|
+
/** A mark the runtime's trace left: [kind, seconds, a, b, count]. */
|
|
726
|
+
type TraceMark = [string, number, number | null, number | null, number];
|
|
727
|
+
interface RenderedSound {
|
|
728
|
+
left: Float32Array;
|
|
729
|
+
right: Float32Array;
|
|
730
|
+
sampleRate: number;
|
|
731
|
+
/** The cues that were rendered (after clamping and thinning). */
|
|
732
|
+
cues: SoundCue[];
|
|
733
|
+
/** Peak sample after the limiter, 0–1. */
|
|
734
|
+
peak: number;
|
|
735
|
+
bed: SoundBed | null;
|
|
736
|
+
warnings: string[];
|
|
737
|
+
}
|
|
738
|
+
/** "A4" → 440, "D#3", "Bb2"; null when it is not a note. */
|
|
739
|
+
declare function noteHz(note: string): number | null;
|
|
740
|
+
/** "Dm", "F# minor", "Bb", "C major" → the root as semitones from A and the mode. */
|
|
741
|
+
declare function parseKey(key: string | undefined): {
|
|
742
|
+
root: number;
|
|
743
|
+
mode: "major" | "minor";
|
|
744
|
+
};
|
|
745
|
+
/** A spec as a program (or an agent) returned it, cleaned: unknown kinds dropped with a warning, numbers read. */
|
|
746
|
+
declare function normalizeSoundSpec(raw: unknown, duration: number): {
|
|
747
|
+
spec: SoundSpec;
|
|
748
|
+
warnings: string[];
|
|
749
|
+
};
|
|
750
|
+
/** The bed a spec asks for, in full, or null. */
|
|
751
|
+
declare function bedOf(b: SoundSpec["bed"], duration: number): SoundBed | null;
|
|
752
|
+
/**
|
|
753
|
+
* Cues for a graphic nobody wrote sound for, from the runtime's trace: a pop for each spring, a
|
|
754
|
+
* whoosh for each move across the frame (louder the further it travels), ticks for letters and
|
|
755
|
+
* words, typing for a typewriter, an impact for a slam or a stamp, a zap for a glitch, sparkle for a
|
|
756
|
+
* burst. Dense runs (letters staggering in, bars growing one after another) become one soft run of
|
|
757
|
+
* ticks instead of a dozen pops.
|
|
758
|
+
*/
|
|
759
|
+
declare function cuesFromMarks(marks: TraceMark[], duration: number): SoundCue[];
|
|
760
|
+
/** Mix cues and a bed into stereo PCM, duration seconds long, at 48 kHz. */
|
|
761
|
+
declare function renderSound(spec: SoundSpec, duration: number, opts?: {
|
|
762
|
+
sampleRate?: number;
|
|
763
|
+
}): RenderedSound;
|
|
764
|
+
/** 16-bit stereo PCM WAV. */
|
|
765
|
+
declare function wavEncode(left: Float32Array, right: Float32Array, sampleRate: number): Uint8Array;
|
|
766
|
+
/** One line per cue, for a terminal or an agent. */
|
|
767
|
+
declare function describeCues(cues: SoundCue[]): string;
|
|
768
|
+
|
|
526
769
|
declare const VIDEO_FORMATS: readonly ["mov", "webm", "mp4", "hevc", "gif", "png"];
|
|
527
770
|
type VideoFormat = (typeof VIDEO_FORMATS)[number];
|
|
528
771
|
type StillFormat = "png" | "svg";
|
|
@@ -540,6 +783,26 @@ interface RenderOptions extends BuildOptions {
|
|
|
540
783
|
/** Bound on one frame's program run, ms. */
|
|
541
784
|
frameTimeoutMs?: number;
|
|
542
785
|
onProgress?: (done: number, total: number) => void;
|
|
786
|
+
/**
|
|
787
|
+
* Sound, synthesised by Volito and muxed into the video: true for the program's own sound($) (or, when it has
|
|
788
|
+
* none, cues read from its motion); a SoundSpec adds cues and sets the bed, level and room on top.
|
|
789
|
+
*/
|
|
790
|
+
sound?: boolean | SoundSpec;
|
|
791
|
+
/** A pad under everything in a key ("Dm", "F major"), a bed object, or false for none — over what the program asks. */
|
|
792
|
+
bed?: string | SoundBed | false;
|
|
793
|
+
/** Also write the sound alone to this .wav (an editor's timeline wants it next to a ProRes overlay). */
|
|
794
|
+
soundOut?: string;
|
|
795
|
+
}
|
|
796
|
+
interface SoundResult {
|
|
797
|
+
/** The cues rendered, in time order. */
|
|
798
|
+
cues: SoundCue[];
|
|
799
|
+
bed: SoundBed | null;
|
|
800
|
+
/** Peak after the limiter, 0–1. */
|
|
801
|
+
peak: number;
|
|
802
|
+
duration: number;
|
|
803
|
+
/** The .wav written, when one was asked for. */
|
|
804
|
+
file?: string;
|
|
805
|
+
warnings: string[];
|
|
543
806
|
}
|
|
544
807
|
interface Session {
|
|
545
808
|
item: MotionItem;
|
|
@@ -609,7 +872,22 @@ interface VideoResult {
|
|
|
609
872
|
bytes: number;
|
|
610
873
|
ms: number;
|
|
611
874
|
warnings: string[];
|
|
875
|
+
/** The sound track, when one was rendered. */
|
|
876
|
+
sound?: SoundResult;
|
|
612
877
|
}
|
|
878
|
+
/**
|
|
879
|
+
* The sound of a graphic: the program's own sound($) when it defines one, cues read from its motion trace
|
|
880
|
+
* (always when it defines none, or when it asks with auto: true), and the bed, level and room the caller sets.
|
|
881
|
+
*/
|
|
882
|
+
declare function designSound(s: Session, opts: Pick<RenderOptions, "sound" | "bed">, duration?: number): {
|
|
883
|
+
spec: SoundSpec;
|
|
884
|
+
warnings: string[];
|
|
885
|
+
};
|
|
886
|
+
/** Render a graphic's sound alone, to a .wav (no ffmpeg needed). */
|
|
887
|
+
declare function renderSoundFile(item: MotionItem, opts?: RenderOptions & {
|
|
888
|
+
out?: string;
|
|
889
|
+
outDir?: string;
|
|
890
|
+
}): Promise<SoundResult>;
|
|
613
891
|
/** The format a file name asks for (".mov" → ProRes, ".webm", ".mp4", ".gif", a folder → PNG frames). */
|
|
614
892
|
declare function formatFromPath(path: string): VideoFormat | null;
|
|
615
893
|
declare function defaultOutput(item: MotionItem, format: VideoFormat, s: {
|
|
@@ -626,6 +904,38 @@ declare function renderVideo(item: MotionItem, opts?: RenderOptions & {
|
|
|
626
904
|
outDir?: string;
|
|
627
905
|
}): Promise<VideoResult>;
|
|
628
906
|
|
|
907
|
+
interface LoadedSpec {
|
|
908
|
+
spec: GraphicSpec;
|
|
909
|
+
/** The folder its paths are relative to. */
|
|
910
|
+
dir: string;
|
|
911
|
+
file?: string;
|
|
912
|
+
}
|
|
913
|
+
/** A path that holds a Volito spec: a .json file whose top level has "volito". */
|
|
914
|
+
declare function isSpecFile(path: string): boolean;
|
|
915
|
+
/** Read and shape-check a spec file; throws with every problem listed. */
|
|
916
|
+
declare function loadSpecFile(path: string): LoadedSpec;
|
|
917
|
+
/** The item a spec draws: a pack item, a program file or inline code. */
|
|
918
|
+
declare function itemOfSpec(loaded: LoadedSpec, lib?: Library): MotionItem;
|
|
919
|
+
/** Render options from a spec (media not loaded yet: image props are resolved to absolute paths or URLs). */
|
|
920
|
+
declare function specToOptions(loaded: LoadedSpec, item: MotionItem): RenderOptions;
|
|
921
|
+
interface SpecReport {
|
|
922
|
+
ok: boolean;
|
|
923
|
+
errors: SpecIssue[];
|
|
924
|
+
warnings: SpecIssue[];
|
|
925
|
+
item?: string;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Everything wrong with a spec, before anything renders: its shape, the item it names, files it points at,
|
|
929
|
+
* props against the item's manifest, motion parts, the aspect and the length. Errors stop a render;
|
|
930
|
+
* warnings would render but not as written (a name cut to fit, a part that does not exist).
|
|
931
|
+
*/
|
|
932
|
+
declare function validateSpec(input: unknown, opts?: {
|
|
933
|
+
dir?: string;
|
|
934
|
+
lib?: Library;
|
|
935
|
+
}): SpecReport;
|
|
936
|
+
/** A spec from the options a command line gave (the reverse of specToOptions), for `volito spec`. */
|
|
937
|
+
declare function specFrom(fields: Omit<GraphicSpec, "volito" | "$schema">): GraphicSpec;
|
|
938
|
+
|
|
629
939
|
interface AspectReport {
|
|
630
940
|
aspect: string;
|
|
631
941
|
ok: boolean;
|
|
@@ -716,8 +1026,10 @@ declare const PATTERN_NAMES: PatternName[];
|
|
|
716
1026
|
declare const MOTION_GUIDE = "Motion: any part, any move\n\nEvery graphic is made of named parts (volito info <item> lists them). Each part enters, may idle\nwhile it holds, may take emphasis hits, and leaves \u2014 and every one of those is yours to change:\n\n in / out any move (volito moves): rise, slam, wipe, iris, glitch, scramble, typewriter,\n spin, swing, stretch, smear, blur, flip, bounce \u2026 An exit plays the move backwards.\n ease brand, out, inOut, expo, back, elastic, bounce, snappy, punchy, bouncy, calm, wobbly,\n spring(freq, damping), steps(n), cubic(x1,y1,x2,y2)\n from the side a move comes from (left, right, up, down, up-left \u2026); outFrom for the exit\n dur, delay seconds; at / outAt replace the item's own times (outAt negative = from the end)\n distance how far it travels (px at 1080) \u00B7 intensity 0\u20132 scales distance, size and rotation\n blur true: motion blur on the way in and out \u00B7 origin: the pivot (center, top-left, bottom \u2026)\n idle a loop while it holds: float, bob, pulse, breathe, wiggle, sway, drift, jitter, spin, heartbeat, shimmer\n emphasis hits: \"pulse@1.2, shake@now, jump@beatName\" (a time, a beat, or a spoken word)\n split text by lines, words or letters \u00B7 order forward | reverse | center | edges | random \u00B7 stagger s\n keys your own keyframes: [{\"t\":0,\"x\":-300,\"op\":0},{\"t\":0.8,\"x\":0,\"op\":1,\"ease\":\"bouncy\"}]\n (t in clip seconds, x/y px at 1080, s scale, r degrees, skx, op, blur) \u2014 any path you like\n\nSet them per part, or for every part with \"*\":\n CLI --motion name.in=typewriter --motion \"*.ease=bouncy\" --motion plate.out=wipe --motion role.emphasis=pulse@2\n API { motion: { \"*\": { ease: \"bouncy\" }, name: { in: \"typewriter\" } } }\n\nOr let a mood choreograph it: --mood energetic | elegant | playful | cinematic | glitchy | minimal | retro | kinetic,\nand --seed <n> for a new take every number (a seed alone picks a mood too). Your own settings still win.\n--speed 2 plays every move twice as fast.\n\nIn your own code the same kit is there: const M = motion($, t);\n M.part(name, { at, box: {x,y,w,h}, in, out, \u2026 }, ...markup) a part, posed by its motion\n M.text(name, { ...$.text options, at, in, split, \u2026 }, text) text, whole or by unit\n M.layout(text, textOptions, split) \u2192 { units: [{text, x, y, w, h, line, index, box}], box }\n M.progress(name, { at, in, dur, ease }) \u2192 { in, out, at, end, outAt } for things you draw yourself\nGive every part a box when you can: wipes, iris, shutter and blinds need it, and moods pick from more moves.";
|
|
717
1027
|
/** The libraries and helpers every program can use besides the $ runtime. */
|
|
718
1028
|
declare const LIBRARY_GUIDE = "Libraries: layout, patterns, 3D and maps\n\nLayout (always there)\n safeArea($) \u2192 {x, y, w, h, tall, square, wide}: the title-safe box (on 9:16 it clears the platforms' buttons)\n fitFont($, str, role, size, maxW, extra) \u2192 a font in the brand's role, shrunk until str fits maxW\n fitLines($, str, font, maxW, maxSize, minSize, maxLines) \u2192 {size, lines, font}: the biggest size that sets in \u2264 maxLines\n landOn($, str, fallback, after) \u2192 when the first spoken word of str starts (0.08 s early), else fallback\n widest($, lines, font) \u00B7 avatar($, imageProp, cx, cy, r, {name, fill, ring}) \u00B7 appIcon($, icon, x, y, size, {fill}) \u00B7 initials(name)\n\nPatterns (always there) \u2014 sixteen animated grounds in the brand's colours, pure functions of t:\n $.pattern(t, kind, {box, color, color2, a (strength), scale, speed, angle, at: [x, y], count, seed, r}) \u2192 markup\n kinds: dots \u00B7 plus \u00B7 graph \u00B7 hatch \u00B7 stripes \u00B7 checker \u00B7 halftone \u00B7 dither \u00B7 waves \u00B7 rings \u00B7 mesh \u00B7 confetti \u00B7 bauhaus \u00B7 tiles \u00B7 pills \u00B7 sunburst\n A style whose texture names one draws it on every $.panel / $.texture ground. confetti, bauhaus and pills keep to the edges.\n\nFaces: Inter, Space Grotesk, Space Mono, Poppins, Playfair Display, Montserrat, Anton, Outfit, Gabarito, Caveat, Press Start 2P,\n Permanent Marker, Patrick Hand, Fredoka, IM Fell English, Bebas Neue, DM Serif Display, Archivo Black, Syne, Unbounded,\n Righteous, Orbitron, Pacifico, Fraunces, Bricolage Grotesque \u2014 name them \"Family:weight\" (e.g. \"Fraunces:900\", \"Syne:800\").\n\n3D \u2014 real depth, light and a camera, drawn as SVG paths (no GPU). Call it and the library comes with your program:\n const S = scene3d($, { camera: { fov: 35, distance, yaw, pitch, roll, target: [x, y, z], x, y }, light: { dir: [x, y, z], ambient, spec, shine } });\n Coordinates: x right, y down, z away from you, px at the target's depth (z = 0 draws at 1 px per unit by default).\n Meshes: S.text(str, {face: $.font(\"display\"), size, depth, color, side, back, anchor, ls, each: (i, n, ch) => ({rotate, offset, scale, hide})})\n S.box(w, h, d, {color, side, back, radius}) \u00B7 S.card(w, h, {depth, radius, color, back}) \u00B7 S.disc(r, d, {...})\n S.shape(loops | \"M\u2026 path data\", depth, {scale, color, side}) \u00B7 S.sphere(r, {color}) (smooth) or {colorAt(lat, lon)}\n Place: S.add(mesh, {position, rotate: [x\u00B0, y\u00B0, z\u00B0], scale, parent: {position, rotate, parent}, opacity, flat, decal, twoSided})\n \u2014 parent moves text with the card it is printed on; decal draws it over that card's face.\n Also: S.line(points3d, {stroke, width}) \u00B7 S.at(point3d, (x, y, scale) => markup) flat labels at 3D points \u00B7 S.project(p) \u2192 {x, y, z, s}\n S.measure(str, {face, size}) \u00B7 S.clip(poly, normal, point)\n Finish with: return S.render(); 3D text uses the brand's display face (an item lists others in \"faces3d\").\n\nMaps (Natural Earth, 177 countries). Call one and the library comes with your program:\n worldFind(\"India\" | \"UK\" | \"USA\" | 356) \u2192 {name, id, c: [lon, lat], rings}\n const m = worldMap($, { x, y, w, h, center: [lon, lat], zoom }); m.path(country | name) \u2192 path data \u00B7 m.project(lon, lat) \u2192 [x, y]\n m.countries \u00B7 m.outline (the map's edge) \u00B7 m.clipId() (clip to it) \u00B7 m.ring(points)\n worldGlobe(S, { r, spin, tilt, colorOf: (country) => colour }) countries on a 3D globe \u00B7 worldOnSphere(lon, lat, r, spin, tilt) \u2192 a 3D point";
|
|
1029
|
+
/** Sound design: what a program may return from sound($), and what --sound does to a graphic that returns none. */
|
|
1030
|
+
declare const SOUND_GUIDE = "Sound: every graphic can carry its own\n\nA render with --sound (API: sound: true, MCP: sound) gets a stereo track synthesised by Volito itself \u2014 no\nsamples, no files to find \u2014 muxed into the .mp4 / .mov / .webm (PNG frames and GIF carry none; --sound-out\nfile.wav writes the track alone, for an editor's timeline). Two sources, both deterministic:\n\n 1. The graphic's own motion. Every part's move leaves a mark the sound design reads: a spring pops, a move\n across the frame whooshes (louder the further it travels), a slam hits, letters tick, a typewriter types,\n a glitch zaps, a burst sparkles. Items nobody wrote sound for sound right out of the box.\n 2. A program's sound($). Beside frame(t, $) a program may define\n\n function sound($) {\n return {\n cues: [\n { at: 0.2, kind: \"riser\", dur: 1.1 }, // seconds into the clip; -1 counts from the end\n { at: $.beat(\"in\", 1.3), kind: \"hit\", level: 1.1 }, // lands with the motion: use the same times\n { at: 1.5, kind: \"shimmer\", dur: 1.2, pan: 0.3 },\n { at: 2.0, kind: \"ding\", note: \"A5\", level: 0.6 },\n ],\n bed: { key: \"D\", mode: \"minor\", from: 0.8, to: -0.4, level: 0.5, tone: 0.4 }, // a pad under it all (true, \"Dm\", or none)\n auto: false, // true adds the cues read from the motion on top (the default only when no cues are given)\n level: 1, // master, 0\u20132\n room: 0.25, // the reverb, 0 dry \u2026 1 wet\n };\n }\n\n It runs once with $ at t = 0, so $.dur, $.beat(name), $.at(word), $.data and $.words are all there \u2014 time\n the sound off the same beats the picture uses. Returning just an array of cues is fine too.\n\nCues: { at, kind, dur, level (0\u20132, 1 = the kind's own), pitch (semitones), note (\"A4\", tone/chord/ding), pan (-1\u20261), seed }\nKinds: whoosh (air past, dur .45) \u00B7 hit (impact) \u00B7 stamp (heavy slam) \u00B7 pop (bubble) \u00B7 tick (tiny click) \u00B7 click (UI)\n riser (climbs into a moment, dur 1) \u00B7 fall (downlifter, dur .8) \u00B7 sub (low drop) \u00B7 shimmer (sparkle, dur 1.2)\n ding (bell) \u00B7 swell (soft air, dur .8) \u00B7 zap (glitch, dur .28) \u00B7 type (keys for dur) \u00B7 scratch (pencil for dur)\n tone (a note for dur) \u00B7 chord (the bed's chord for dur)\nThe bed steps back under every hit, stamp, sub and pop and comes back on its own. Keep a graphic's sound honest:\none riser into its biggest moment, a hit or a sub when it lands, ticks for the small things, silence between.\n\nCLI volito render <item> --sound [--bed Dm] [--sound-level 1.2] [--sound-out track.wav]\n volito sound <item> --out track.wav the track alone, with its cue list\nAPI renderVideo(item, { sound: true, bed: \"Dm\" }) \u00B7 renderSoundFile(item, { out: \"track.wav\" })";
|
|
719
1031
|
/** How Volito items and packs are written — what `volito guide` and the MCP motion_api tool print after the API. */
|
|
720
1032
|
declare const AUTHORING_GUIDE = "Writing Volito graphics\n\nA graphic is a program: plain JavaScript that defines function frame(t, $) and returns the SVG markup of\none frame (no <svg> root). It is a pure function of t \u2014 any frame can be drawn alone, in any order \u2014 so it\nrenders the same in MONARC PRO, in a browser and from this CLI.\n\nProps and moments\n An item's props arrive as $.data (const p = $.data; p.name, p.role \u2026). Never hard-code text a creator\n would change: make it a prop with a default and a maxLength the design can hold.\n Named moments come from $.beat(name, fallback). Pack items read \"in\" (when the entrance starts) and\n \"out\" (when the exit starts) so a creator can move them: --beat in=0.4 --beat out=-0.6.\n When words are given (a transcript), land each element 0.04\u20130.12 s before the word that says it:\n $.words.length ? $.atOr(firstWord, fallback) : fallback. Without words, use the beats.\n\nParts\n Draw each element through the motion kit (const M = motion($, t)) as a named part, with the item's own\n motion as defaults: M.part(\"plate\", { at, in: \"wipe\", box }, markup), M.text(\"name\", { ...font, at, in: \"rise\" }, text).\n List the parts in item.json (\"parts\": { \"plate\": \"the card\" }) so creators know what they can move.\n Backgrounds (scrims, panels) pass vary: false so a mood leaves them still.\n\nShape of a good item\n - Enter in the first ~0.8 s, hold, leave in the last ~0.4 s (or hold to the end when out \u2265 duration).\n - Lay out from $.W, $.H and scale every size by $.k (= min(W, H) / 1080): one design fits 16:9, 9:16, 1:1, 4:5.\n - Keep text inside the title-safe area: ~5% of the width at the sides on 16:9; on 9:16 leave ~13% at the\n top and ~22% at the bottom for platform UI (captions, buttons).\n - Size text to fit: measure it ($.measure) and shrink the size until it fits the box it owns; wrap long\n text with maxW. The check reports any line that runs off the frame.\n - Colour comes from the brand: $.c.bg / $.c.fg for ground and text, $.c.accent for the one thing that\n matters, $.c.accent2 for markers, $.c.surface for cards. Faces from $.font(\"display\" | \"text\" | \"mono\").\n $.case(str) applies the brand's case. Never invent colours \u2014 a creator's DESIGN.md re-skins the item.\n - overlay items draw nothing behind themselves (footage shows through); put a $.scrim under text that sits\n on footage. full items draw their own ground with $.panel(t, { box: { x: 0, y: 0, w: $.W, h: $.H } }).\n - Escape any text you put in raw markup with $.esc(); $.text, $.chip and friends escape for you.\n\nAn item on disk\n my-item/item.json { \"id\": \"my-item\", \"name\": \"\u2026\", \"description\": \"\u2026\", \"category\": \"title\",\n \"placement\": \"overlay\" | \"full\", \"duration\": { \"default\": 5, \"min\": 2, \"max\": 20 },\n \"aspects\": [\"16:9\", \"9:16\", \"1:1\", \"4:5\"],\n \"props\": { \"title\": { \"type\": \"text\", \"default\": \"Hello\", \"maxLength\": 28 } },\n \"beats\": { \"in\": 0.15, \"out\": -0.45 } }\n my-item/frame.js function frame(t, $) { const p = $.data; \u2026 return svg; }\n Prop types: text, longtext (line breaks kept), number (min, max, step), boolean, choice (options),\n color (#hex, \"\" = the brand's), list (rows of text, or of {field: \"text\" | \"number\"}; maxItems),\n image (a path or URL the caller loads; draw it with $.image(propName, x, y, w, h)), icon (an icon name).\n\nA pack\n my-pack/pack.json { \"format\": 1, \"id\": \"my-pack\", \"name\": \"\u2026\", \"version\": \"1.0.0\", \"description\": \"\u2026\",\n \"author\": \"\u2026\", \"license\": \"\u2026\", \"style\": \"ember\", \"shared\": \"shared.js\",\n \"items\": [\"my-item\", \u2026] }\n my-pack/shared.js helpers prepended to every item's code (function declarations only).\n Load extra packs with --packs <dir> or VOLITO_PACKS=<dir>.\n\nThe loop\n volito new my-item a template to start from\n volito check ./my-item errors and warnings at every aspect\n volito sheet ./my-item frames across time in one PNG \u2014 look at it\n volito render ./my-item --format mov\n Agents: motion_check, then motion_preview, fix what you see, then motion_render.";
|
|
721
1033
|
|
|
722
|
-
export { ASPECTS, ASPECT_NAMES, AUTHORING_GUIDE, BUILTIN_STYLES, CATEGORIES, DIRECTIONS, EASES, EDITOR_STYLES, FORMAT_NOTES, FfmpegMissing, HITS, IDLES, LIBRARY_GUIDE, MG_API_REFERENCE, MG_ICON_NAMES, MG_SPRITE_NAMES, MOODS, MOTION_FORMAT, MOTION_GUIDE, MOVES, MOVE_NOTES, MotionError, ORDERS, ORIGINS, PATTERN_NAMES, PATTERN_WORDS, ProgramError, ProgramRunner, SPLITS, VIDEO_FORMATS, buildProgram, builtinPacks, canvasFor, checkItem, composeDesignMd, customItem, defaultOutput, describeItem, describeReport, findItem, fontsDir, formatFromPath, frameDocument, library, loadImage, loadMedia, loadPack, makeItem, manifestProblems, normalizeMotion, normalizeWords, openSession, packageVersion, packsIn, parseAspect, parseDesignMd, parseMotionArgs, probeFfmpeg, readStyleArg, readWords, renderSheet, renderStill, renderVideo, resolveProps, resolveStyle, searchItems, sheetTimes };
|
|
723
|
-
export type { Aspect, AspectReport, BuildOptions, BuiltProgram, Category, CheckReport, ItemManifest, ItemQuery, Library, MotionConfig, MotionInput, MotionItem, MotionOverrides, MotionPack, MotionSpec, PackManifest, PatternName, Placement, PropSpec, PropType, RenderOptions, StillFormat, StillResult, StyleInput, StyleOverrides, VideoFormat, VideoResult };
|
|
1034
|
+
export { ASPECTS, ASPECT_NAMES, AUTHORING_GUIDE, BUILTIN_STYLES, CATEGORIES, DIRECTIONS, EASES, EDITOR_STYLES, FORMAT_NOTES, FfmpegMissing, GraphicSpecSchema, HITS, IDLES, LIBRARY_GUIDE, MG_API_REFERENCE, MG_ICON_NAMES, MG_SPRITE_NAMES, MOODS, MOTION_FORMAT, MOTION_GUIDE, MOVES, MOVE_NOTES, MotionError, ORDERS, ORIGINS, PATTERN_NAMES, PATTERN_WORDS, ProgramError, ProgramRunner, SOUND_GUIDE, SOUND_KINDS, SOUND_NOTES, SPEC_SCHEMA_URL, SPEC_VERSION, SPLITS, VIDEO_FORMATS, bedOf, buildProgram, builtinPacks, canvasFor, checkItem, composeDesignMd, cuesFromMarks, customItem, defaultOutput, describeCues, describeItem, describeReport, designSound, findItem, fontsDir, formatFromPath, frameDocument, isSpecFile, itemOfSpec, library, loadImage, loadMedia, loadPack, loadSpecFile, makeItem, manifestProblems, normalizeMotion, normalizeSoundSpec, normalizeWords, noteHz, openSession, packageVersion, packsIn, parseAspect, parseDesignMd, parseKey, parseMotionArgs, parseSpec, probeFfmpeg, readStyleArg, readWords, renderSheet, renderSound, renderSoundFile, renderStill, renderVideo, resolveProps, resolveStyle, searchItems, sheetTimes, soundHookAvailable, specFrom, specJsonSchema, specToOptions, validateSpec, wavEncode };
|
|
1035
|
+
export type { Aspect, AspectReport, BuildOptions, BuiltProgram, Category, CheckReport, GraphicSpec, ItemManifest, ItemQuery, Library, LoadedSpec, MotionConfig, MotionInput, MotionItem, MotionOverrides, MotionPack, MotionSpec, PackManifest, PatternName, Placement, PropSpec, PropType, RenderOptions, RenderedSound, SoundBed, SoundCue, SoundKind, SoundResult, SoundSpec, SpecIssue, SpecReport, StillFormat, StillResult, StyleInput, StyleOverrides, TraceMark, VideoFormat, VideoResult };
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUTHORING_GUIDE,
|
|
3
|
+
GraphicSpecSchema,
|
|
4
|
+
LIBRARY_GUIDE,
|
|
5
|
+
MOTION_GUIDE,
|
|
6
|
+
SOUND_GUIDE,
|
|
7
|
+
SPEC_SCHEMA_URL,
|
|
8
|
+
SPEC_VERSION,
|
|
9
|
+
builtinPacks,
|
|
10
|
+
findItem,
|
|
11
|
+
isSpecFile,
|
|
12
|
+
itemOfSpec,
|
|
13
|
+
library,
|
|
14
|
+
loadImage,
|
|
15
|
+
loadMedia,
|
|
16
|
+
loadPack,
|
|
17
|
+
loadSpecFile,
|
|
18
|
+
normalizeWords,
|
|
19
|
+
packsIn,
|
|
20
|
+
parseSpec,
|
|
21
|
+
readStyleArg,
|
|
22
|
+
readWords,
|
|
23
|
+
searchItems,
|
|
24
|
+
specFrom,
|
|
25
|
+
specJsonSchema,
|
|
26
|
+
specToOptions,
|
|
27
|
+
validateSpec
|
|
28
|
+
} from "./chunks/chunk-QA4SEJCZ.js";
|
|
1
29
|
import {
|
|
2
30
|
ASPECTS,
|
|
3
31
|
ASPECT_NAMES,
|
|
4
|
-
AUTHORING_GUIDE,
|
|
5
32
|
BUILTIN_STYLES,
|
|
6
33
|
CATEGORIES,
|
|
7
34
|
DIRECTIONS,
|
|
8
35
|
EASES,
|
|
9
36
|
EDITOR_STYLES,
|
|
10
37
|
FORMAT_NOTES,
|
|
11
|
-
FfmpegMissing,
|
|
12
38
|
HITS,
|
|
13
39
|
IDLES,
|
|
14
|
-
LIBRARY_GUIDE,
|
|
15
40
|
MG_API_REFERENCE,
|
|
16
41
|
MG_ICON_NAMES,
|
|
17
42
|
MG_SPRITE_NAMES,
|
|
18
43
|
MOODS,
|
|
19
44
|
MOTION_FORMAT,
|
|
20
|
-
MOTION_GUIDE,
|
|
21
45
|
MOVES,
|
|
22
46
|
MOVE_NOTES,
|
|
23
47
|
MotionError,
|
|
@@ -27,46 +51,51 @@ import {
|
|
|
27
51
|
PATTERN_WORDS,
|
|
28
52
|
ProgramError,
|
|
29
53
|
ProgramRunner,
|
|
54
|
+
SOUND_KINDS,
|
|
55
|
+
SOUND_NOTES,
|
|
30
56
|
SPLITS,
|
|
31
57
|
VIDEO_FORMATS,
|
|
58
|
+
bedOf,
|
|
32
59
|
buildProgram,
|
|
33
|
-
builtinPacks,
|
|
34
60
|
canvasFor,
|
|
35
61
|
checkItem,
|
|
36
62
|
composeDesignMd,
|
|
63
|
+
cuesFromMarks,
|
|
37
64
|
customItem,
|
|
38
65
|
defaultOutput,
|
|
66
|
+
describeCues,
|
|
39
67
|
describeItem,
|
|
40
68
|
describeReport,
|
|
41
|
-
|
|
42
|
-
fontsDir,
|
|
69
|
+
designSound,
|
|
43
70
|
formatFromPath,
|
|
44
71
|
frameDocument,
|
|
45
|
-
library,
|
|
46
|
-
loadImage,
|
|
47
|
-
loadMedia,
|
|
48
|
-
loadPack,
|
|
49
72
|
makeItem,
|
|
50
73
|
manifestProblems,
|
|
51
74
|
normalizeMotion,
|
|
52
|
-
|
|
75
|
+
normalizeSoundSpec,
|
|
76
|
+
noteHz,
|
|
53
77
|
openSession,
|
|
54
|
-
packageVersion,
|
|
55
|
-
packsIn,
|
|
56
78
|
parseAspect,
|
|
57
79
|
parseDesignMd,
|
|
80
|
+
parseKey,
|
|
58
81
|
parseMotionArgs,
|
|
59
|
-
probeFfmpeg,
|
|
60
|
-
readStyleArg,
|
|
61
|
-
readWords,
|
|
62
82
|
renderSheet,
|
|
83
|
+
renderSound,
|
|
84
|
+
renderSoundFile,
|
|
63
85
|
renderStill,
|
|
64
86
|
renderVideo,
|
|
65
87
|
resolveProps,
|
|
66
88
|
resolveStyle,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
sheetTimes,
|
|
90
|
+
soundHookAvailable,
|
|
91
|
+
wavEncode
|
|
92
|
+
} from "./chunks/chunk-CUQY6YI3.js";
|
|
93
|
+
import {
|
|
94
|
+
FfmpegMissing,
|
|
95
|
+
fontsDir,
|
|
96
|
+
packageVersion,
|
|
97
|
+
probeFfmpeg
|
|
98
|
+
} from "./chunks/chunk-ZFG3X3DU.js";
|
|
70
99
|
export {
|
|
71
100
|
ASPECTS,
|
|
72
101
|
ASPECT_NAMES,
|
|
@@ -78,6 +107,7 @@ export {
|
|
|
78
107
|
EDITOR_STYLES,
|
|
79
108
|
FORMAT_NOTES,
|
|
80
109
|
FfmpegMissing,
|
|
110
|
+
GraphicSpecSchema,
|
|
81
111
|
HITS,
|
|
82
112
|
IDLES,
|
|
83
113
|
LIBRARY_GUIDE,
|
|
@@ -96,43 +126,67 @@ export {
|
|
|
96
126
|
PATTERN_WORDS,
|
|
97
127
|
ProgramError,
|
|
98
128
|
ProgramRunner,
|
|
129
|
+
SOUND_GUIDE,
|
|
130
|
+
SOUND_KINDS,
|
|
131
|
+
SOUND_NOTES,
|
|
132
|
+
SPEC_SCHEMA_URL,
|
|
133
|
+
SPEC_VERSION,
|
|
99
134
|
SPLITS,
|
|
100
135
|
VIDEO_FORMATS,
|
|
136
|
+
bedOf,
|
|
101
137
|
buildProgram,
|
|
102
138
|
builtinPacks,
|
|
103
139
|
canvasFor,
|
|
104
140
|
checkItem,
|
|
105
141
|
composeDesignMd,
|
|
142
|
+
cuesFromMarks,
|
|
106
143
|
customItem,
|
|
107
144
|
defaultOutput,
|
|
145
|
+
describeCues,
|
|
108
146
|
describeItem,
|
|
109
147
|
describeReport,
|
|
148
|
+
designSound,
|
|
110
149
|
findItem,
|
|
111
150
|
fontsDir,
|
|
112
151
|
formatFromPath,
|
|
113
152
|
frameDocument,
|
|
153
|
+
isSpecFile,
|
|
154
|
+
itemOfSpec,
|
|
114
155
|
library,
|
|
115
156
|
loadImage,
|
|
116
157
|
loadMedia,
|
|
117
158
|
loadPack,
|
|
159
|
+
loadSpecFile,
|
|
118
160
|
makeItem,
|
|
119
161
|
manifestProblems,
|
|
120
162
|
normalizeMotion,
|
|
163
|
+
normalizeSoundSpec,
|
|
121
164
|
normalizeWords,
|
|
165
|
+
noteHz,
|
|
122
166
|
openSession,
|
|
123
167
|
packageVersion,
|
|
124
168
|
packsIn,
|
|
125
169
|
parseAspect,
|
|
126
170
|
parseDesignMd,
|
|
171
|
+
parseKey,
|
|
127
172
|
parseMotionArgs,
|
|
173
|
+
parseSpec,
|
|
128
174
|
probeFfmpeg,
|
|
129
175
|
readStyleArg,
|
|
130
176
|
readWords,
|
|
131
177
|
renderSheet,
|
|
178
|
+
renderSound,
|
|
179
|
+
renderSoundFile,
|
|
132
180
|
renderStill,
|
|
133
181
|
renderVideo,
|
|
134
182
|
resolveProps,
|
|
135
183
|
resolveStyle,
|
|
136
184
|
searchItems,
|
|
137
|
-
sheetTimes
|
|
185
|
+
sheetTimes,
|
|
186
|
+
soundHookAvailable,
|
|
187
|
+
specFrom,
|
|
188
|
+
specJsonSchema,
|
|
189
|
+
specToOptions,
|
|
190
|
+
validateSpec,
|
|
191
|
+
wavEncode
|
|
138
192
|
};
|