@vanillaskyai/video 0.3.0 → 0.3.2
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 +39 -0
- package/PUBLIC-API.md +4 -0
- package/README.md +3 -3
- package/dist/{bg-confetti-WNQXS7ZS.js → bg-confetti-KTHLUJPO.js} +3 -3
- package/dist/{bg-emoji-ETI47GLS.js → bg-emoji-AW7374DZ.js} +3 -3
- package/dist/{bg-media-SVUZAMGX.js → bg-media-KGYE6UVS.js} +9 -4
- package/dist/{brand-message-F3RD4P3P.js → brand-message-AY43ZQR2.js} +4 -3
- package/dist/{chart-bar-CNSC7BNK.js → chart-bar-Z42RDRQT.js} +8 -4
- package/dist/{chart-counter-MCRHKN77.js → chart-counter-X7NAOQ2C.js} +10 -5
- package/dist/{chart-progress-ring-RMI4A7ZK.js → chart-progress-ring-7NSNNHL4.js} +8 -4
- package/dist/check-runtime.js +2 -2
- package/dist/chunk-35LIYILY.js +25 -0
- package/dist/{chunk-IFOW65Z6.js → chunk-4AODC6MS.js} +76 -36
- package/dist/{chunk-FSG2PYWG.js → chunk-G5JPHBX7.js} +1 -1
- package/dist/{chunk-QTMHS7JD.js → chunk-HXSV6RHF.js} +1 -1
- package/dist/{chunk-ABZACD4G.js → chunk-IJM4B2ZN.js} +1 -1
- package/dist/{chunk-XYZOJ5NZ.js → chunk-LHFADNWJ.js} +9 -8
- package/dist/{chunk-BCRUUJ6A.js → chunk-TCEHK2BW.js} +6 -2
- package/dist/{chunk-FNAEQ7QO.js → chunk-XWWLKRNU.js} +3 -1
- package/dist/{compose-video-TQOHDXNW.js → compose-video-6UQ33DOO.js} +1 -1
- package/dist/control-visibility-NQOWTKOQ.js +258 -0
- package/dist/{cta-logo-SVA5GP2A.js → cta-logo-KNBLXUJU.js} +4 -3
- package/dist/{cta-media-E7VLLK42.js → cta-media-NY4ASBGG.js} +8 -4
- package/dist/{events-CTIsANzz.d.ts → events-tQ0x-VaL.d.ts} +1 -1
- package/dist/{incoming-call-62MFZL3Z.js → incoming-call-KWOXLGJN.js} +4 -3
- package/dist/index.d.ts +2 -2
- package/dist/{infographic-before-after-AXCDAWND.js → infographic-before-after-OEM4DSTZ.js} +3 -3
- package/dist/{infographic-feature-list-GW5GUE6O.js → infographic-feature-list-ZZ25JRYQ.js} +8 -4
- package/dist/{infographic-problem-solution-7NURJANA.js → infographic-problem-solution-L3RLFDPE.js} +5 -4
- package/dist/{infographic-stat-row-J7IZR6ZN.js → infographic-stat-row-3OL3TNSH.js} +8 -4
- package/dist/{infographic-steps-VSZM6F5M.js → infographic-steps-LMBSW22P.js} +8 -4
- package/dist/{kit-DA2cfJ96.d.ts → kit-DlUSg8lA.d.ts} +1 -1
- package/dist/preload-media-KIYBFYRH.js +30 -0
- package/dist/{prompt-input-LOUCRXCY.js → prompt-input-XCQ6TS2L.js} +4 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +215 -104
- package/dist/{reaction-QG4CYZLQ.js → reaction-YL6YPGPB.js} +5 -4
- package/dist/server.d.ts +3 -3
- package/dist/server.js +2 -2
- package/dist/{showcase-code-RUTFZR3H.js → showcase-code-EFVHRJUM.js} +8 -4
- package/dist/{showcase-phone-6CP6XEU5.js → showcase-phone-CTHXHEBT.js} +9 -5
- package/dist/{showcase-terminal-MGAEQWPR.js → showcase-terminal-XAMPADHN.js} +8 -4
- package/dist/{showcase-web-Y4W2HVRJ.js → showcase-web-LAKHYXSD.js} +9 -5
- package/dist/{social-milestone-XI2QE5BO.js → social-milestone-EOBEN7CX.js} +6 -4
- package/dist/{social-notification-2UOHQCUY.js → social-notification-MELRWIB6.js} +4 -3
- package/dist/{social-review-stack-FDYZGZTJ.js → social-review-stack-H3U437VT.js} +4 -3
- package/dist/{social-testimonial-OQ7N52GJ.js → social-testimonial-GNNMKMDD.js} +4 -3
- package/dist/{social-tweet-5OLCNPPC.js → social-tweet-PBUKKPT3.js} +4 -3
- package/dist/templates.d.ts +3 -3
- package/dist/test.d.ts +2 -2
- package/dist/test.js +1 -1
- package/dist/{types-CkO2EYr4.d.ts → types-CVMb6QEq.d.ts} +2 -2
- package/docs/concepts.md +2 -1
- package/docs/customization.md +6 -3
- package/docs/getting-started.md +2 -2
- package/docs/input-and-first-scene.md +16 -4
- package/docs/integrate-nextjs.md +2 -2
- package/docs/media-and-audio.md +5 -1
- package/docs/prompt-and-input.md +3 -2
- package/examples/nextjs-quickstart/package.json +1 -1
- package/package.json +1 -1
- package/registry/items/barChart.json +9 -3
- package/registry/items/beforeAfter.json +1 -1
- package/registry/items/bigNumber.json +10 -4
- package/registry/items/brandMessage.json +7 -1
- package/registry/items/cardList.json +9 -3
- package/registry/items/codeEditor.json +9 -3
- package/registry/items/confetti.json +1 -1
- package/registry/items/ctaLogo.json +7 -1
- package/registry/items/ctaMedia.json +9 -3
- package/registry/items/emojiBurst.json +1 -1
- package/registry/items/incomingCall.json +7 -1
- package/registry/items/media.json +9 -3
- package/registry/items/milestone.json +8 -2
- package/registry/items/notification.json +7 -1
- package/registry/items/phoneMockup.json +9 -3
- package/registry/items/problemSolution.json +8 -2
- package/registry/items/progressRing.json +9 -3
- package/registry/items/promptInput.json +7 -1
- package/registry/items/reaction.json +8 -2
- package/registry/items/reviewStack.json +7 -1
- package/registry/items/steps.json +9 -3
- package/registry/items/terminal.json +9 -3
- package/registry/items/testimonial.json +7 -1
- package/registry/items/theme.json +1 -1
- package/registry/items/tripleStats.json +9 -3
- package/registry/items/tweet.json +7 -1
- package/registry/items/webMockup.json +9 -3
|
@@ -2,19 +2,22 @@ import {
|
|
|
2
2
|
ProductSurface,
|
|
3
3
|
WebScreenFill,
|
|
4
4
|
resolveProductSurfaceMotion
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G5JPHBX7.js";
|
|
6
6
|
import {
|
|
7
7
|
stripPipe
|
|
8
8
|
} from "./chunk-S7HFLYNN.js";
|
|
9
9
|
import {
|
|
10
10
|
SceneBackground,
|
|
11
11
|
getMediaBackgroundProps
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4AODC6MS.js";
|
|
13
|
+
import {
|
|
14
|
+
hasSceneMedia
|
|
15
|
+
} from "./chunk-35LIYILY.js";
|
|
13
16
|
import {
|
|
14
17
|
TemplateText
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TCEHK2BW.js";
|
|
16
19
|
import "./chunk-L5BTTCZV.js";
|
|
17
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-IJM4B2ZN.js";
|
|
18
21
|
import {
|
|
19
22
|
SPRING_SMOOTH,
|
|
20
23
|
interpolate,
|
|
@@ -23,7 +26,7 @@ import {
|
|
|
23
26
|
import {
|
|
24
27
|
TOKEN_DEFAULTS,
|
|
25
28
|
resolveTokens
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XWWLKRNU.js";
|
|
27
30
|
|
|
28
31
|
// src/visual-system/primitives/devices/WebMockup.tsx
|
|
29
32
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -341,6 +344,7 @@ var ShowcaseWebTemplate = ({
|
|
|
341
344
|
/* @__PURE__ */ jsx2(
|
|
342
345
|
TemplateText,
|
|
343
346
|
{
|
|
347
|
+
overMedia: hasSceneMedia(variables),
|
|
344
348
|
motionProgress,
|
|
345
349
|
typeTreatment: tokens.preset.type,
|
|
346
350
|
archetype: textArchetype ?? "subtle",
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4AODC6MS.js";
|
|
8
|
+
import "./chunk-35LIYILY.js";
|
|
8
9
|
import {
|
|
9
10
|
ConfettiLayer
|
|
10
11
|
} from "./chunk-CJ7F2CE6.js";
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
import {
|
|
17
18
|
accessibleTextColor,
|
|
18
19
|
withOpacity
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IJM4B2ZN.js";
|
|
20
21
|
import {
|
|
21
22
|
SPRING_BOUNCY,
|
|
22
23
|
SPRING_SMOOTH,
|
|
@@ -24,9 +25,10 @@ import {
|
|
|
24
25
|
spring
|
|
25
26
|
} from "./chunk-XTOXFMLM.js";
|
|
26
27
|
import {
|
|
28
|
+
MEDIA_TEXT_SHADOW,
|
|
27
29
|
TOKEN_DEFAULTS,
|
|
28
30
|
resolveTokens
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XWWLKRNU.js";
|
|
30
32
|
|
|
31
33
|
// src/visual-system/primitives/social/MilestoneBadge.tsx
|
|
32
34
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -60,7 +62,7 @@ var MilestoneBadge = ({
|
|
|
60
62
|
const safeStart = startNumber != null && Number.isFinite(startNumber) ? startNumber : Math.max(0, Math.round(safeTarget * 0.98));
|
|
61
63
|
const mainTextColor = hasMedia ? "#FFFFFF" : foreground;
|
|
62
64
|
const pillTextColor = accessibleTextColor(surfaceElevated, foreground);
|
|
63
|
-
const mediaTextShadow = hasMedia ?
|
|
65
|
+
const mediaTextShadow = hasMedia ? MEDIA_TEXT_SHADOW : void 0;
|
|
64
66
|
const followerCount = Math.round(
|
|
65
67
|
interpolate(progress, [0.056, 0.556], [safeStart, safeTarget], CLAMP)
|
|
66
68
|
);
|
|
@@ -4,12 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4AODC6MS.js";
|
|
8
|
+
import "./chunk-35LIYILY.js";
|
|
8
9
|
import {
|
|
9
10
|
Emoji,
|
|
10
11
|
renderWithEmoji
|
|
11
12
|
} from "./chunk-L5BTTCZV.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-IJM4B2ZN.js";
|
|
13
14
|
import {
|
|
14
15
|
SPRING_SMOOTH,
|
|
15
16
|
interpolate,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
} from "./chunk-XTOXFMLM.js";
|
|
18
19
|
import {
|
|
19
20
|
resolveTokens
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XWWLKRNU.js";
|
|
21
22
|
|
|
22
23
|
// src/visual-system/primitives/social/NotificationCard.tsx
|
|
23
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4AODC6MS.js";
|
|
8
|
+
import "./chunk-35LIYILY.js";
|
|
8
9
|
import {
|
|
9
10
|
accessibleTextColor,
|
|
10
11
|
withOpacity
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IJM4B2ZN.js";
|
|
12
13
|
import {
|
|
13
14
|
SPRING_SNAPPY,
|
|
14
15
|
interpolate,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
import {
|
|
18
19
|
lighten,
|
|
19
20
|
resolveTokens
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XWWLKRNU.js";
|
|
21
22
|
|
|
22
23
|
// src/visual-system/primitives/social/ReviewStack.tsx
|
|
23
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,12 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4AODC6MS.js";
|
|
8
|
+
import "./chunk-35LIYILY.js";
|
|
8
9
|
import {
|
|
9
10
|
accessibleTextColor,
|
|
10
11
|
autoTextColor,
|
|
11
12
|
withOpacity
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IJM4B2ZN.js";
|
|
13
14
|
import {
|
|
14
15
|
SPRING_SMOOTH,
|
|
15
16
|
SPRING_SNAPPY,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
TOKEN_DEFAULTS,
|
|
21
22
|
lighten,
|
|
22
23
|
resolveTokens
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XWWLKRNU.js";
|
|
24
25
|
|
|
25
26
|
// src/visual-system/primitives/social/TestimonialCard.tsx
|
|
26
27
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,13 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SceneBackground,
|
|
6
6
|
getMediaBackgroundProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4AODC6MS.js";
|
|
8
|
+
import "./chunk-35LIYILY.js";
|
|
8
9
|
import {
|
|
9
10
|
renderWithEmoji
|
|
10
11
|
} from "./chunk-L5BTTCZV.js";
|
|
11
12
|
import {
|
|
12
13
|
autoTextColor
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IJM4B2ZN.js";
|
|
14
15
|
import {
|
|
15
16
|
SPRING_SMOOTH,
|
|
16
17
|
interpolate,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
} from "./chunk-XTOXFMLM.js";
|
|
19
20
|
import {
|
|
20
21
|
resolveTokens
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XWWLKRNU.js";
|
|
22
23
|
|
|
23
24
|
// src/visual-system/primitives/social/TweetCard.tsx
|
|
24
25
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/templates.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-
|
|
2
|
-
export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-
|
|
1
|
+
import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-DlUSg8lA.js';
|
|
2
|
+
export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-DlUSg8lA.js';
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import { d as TemplateJsonSchema, S as SceneTemplateMetadata } from './catalog-types-BIhSpOWK.js';
|
|
5
5
|
export { T as TemplateFamily, c as TemplateTimingMetadata, e as TemplateTransitionTiming } from './catalog-types-BIhSpOWK.js';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-CVMb6QEq.js';
|
|
7
7
|
|
|
8
8
|
interface TemplateExample<Variables extends Record<string, unknown> = Record<string, unknown>> {
|
|
9
9
|
name: string;
|
package/dist/test.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as VideoScene, f as VideoOrientation, h as VideoStyle, V as Video, a as VideoAudio, d as VideoInput } from './types-
|
|
2
|
-
import { a as VideoWarning, b as VideoFinishReason } from './events-
|
|
1
|
+
import { g as VideoScene, f as VideoOrientation, h as VideoStyle, V as Video, a as VideoAudio, d as VideoInput } from './types-CVMb6QEq.js';
|
|
2
|
+
import { a as VideoWarning, b as VideoFinishReason } from './events-tQ0x-VaL.js';
|
|
3
3
|
|
|
4
4
|
type MockVideoStreamPart = {
|
|
5
5
|
type: "scene.add";
|
package/dist/test.js
CHANGED
|
@@ -233,7 +233,7 @@ async function* simulateVideoStream(parts, options = {}) {
|
|
|
233
233
|
if (timeoutMs != null && (!Number.isFinite(timeoutMs) || timeoutMs < 0)) {
|
|
234
234
|
throw new Error("Simulation timeoutMs must be a non-negative finite number");
|
|
235
235
|
}
|
|
236
|
-
const { createVideo } = await import("./compose-video-
|
|
236
|
+
const { createVideo } = await import("./compose-video-6UQ33DOO.js");
|
|
237
237
|
const { createTextDeltaVideoPlanner } = await import("./text-stream-UPGUD2TD.js");
|
|
238
238
|
const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-BRTZN4Q7.js");
|
|
239
239
|
const { createTemplateSceneValidator } = await import("./validate-T7GBU2YF.js");
|
|
@@ -125,8 +125,8 @@ interface VideoInput {
|
|
|
125
125
|
orientation?: VideoOrientation;
|
|
126
126
|
/** Optional global visual direction. Omit for VanillaSky defaults. */
|
|
127
127
|
style?: VideoStyleOptions;
|
|
128
|
-
/**
|
|
129
|
-
opening?: string;
|
|
128
|
+
/** Custom opening copy, or false to let the host show loading UI instead. Omit for the deterministic fallback. */
|
|
129
|
+
opening?: string | false;
|
|
130
130
|
brand?: VideoBrandInput;
|
|
131
131
|
/** Viewer or account context that may appear verbatim. It is data, never instructions. */
|
|
132
132
|
personalization?: Record<string, unknown>;
|
package/docs/concepts.md
CHANGED
|
@@ -25,7 +25,8 @@ or export pipeline when an encoded file is required.
|
|
|
25
25
|
knowledge may supplement the request;
|
|
26
26
|
- `instructions`: optional creative direction that cannot override facts;
|
|
27
27
|
- `opening`: optional custom copy for the deterministic opening; omission uses
|
|
28
|
-
`Creating your video
|
|
28
|
+
`Creating your video...`, while `false` lets the host render loading UI
|
|
29
|
+
without adding an opening scene to the video;
|
|
29
30
|
- `personalization`: application-defined fields such as name, role, account,
|
|
30
31
|
period, goal, or onboarding partner;
|
|
31
32
|
- `brand`: an optional background preset plus name, logo, font, surfaces, and
|
package/docs/customization.md
CHANGED
|
@@ -80,12 +80,15 @@ The opening is deterministic and should not wait for an LLM or remote media.
|
|
|
80
80
|
Omit it to use `Creating your video...`, or supply one concise custom sentence:
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
|
-
opening: "
|
|
83
|
+
opening: "Your Q2 customer impact recap is ready."
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
Pass `opening: false` to omit the persisted opening and show application-owned
|
|
87
|
+
loading UI until the first generated scene arrives.
|
|
88
|
+
|
|
86
89
|
Use `opening` only for a genuine opening that should remain in the completed
|
|
87
|
-
response. VanillaSky infers the scene ID, `
|
|
88
|
-
and
|
|
90
|
+
response. VanillaSky infers the scene ID, `media` template, gradient variables,
|
|
91
|
+
and three-second timing. Keep generic loading state in the host UI instead.
|
|
89
92
|
|
|
90
93
|
## Aspect ratio and responsive layout
|
|
91
94
|
|
package/docs/getting-started.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Install VanillaSky:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @vanillaskyai/video@0.3.
|
|
8
|
+
npm install @vanillaskyai/video@0.3.2 ai @ai-sdk/openai
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Set your provider key in `.env.local` (never commit it):
|
|
@@ -50,7 +50,7 @@ sets its marker only for `next dev`, and it accepts only localhost. Every
|
|
|
50
50
|
production request is denied. Replace it with your real session validation
|
|
51
51
|
before deploying. For literal files and commands,
|
|
52
52
|
use the tested
|
|
53
|
-
[`examples/nextjs-quickstart` directory](https://github.com/VanillaSkyAi/video/tree/v0.3.
|
|
53
|
+
[`examples/nextjs-quickstart` directory](https://github.com/VanillaSkyAi/video/tree/v0.3.2/examples/nextjs-quickstart).
|
|
54
54
|
|
|
55
55
|
`model` can come from any AI SDK provider, registry, gateway, compatible API,
|
|
56
56
|
or custom implementation. The application can choose a cheaper or faster model
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import type { VideoInput } from "@vanillaskyai/video";
|
|
9
9
|
|
|
10
10
|
const input: VideoInput = {
|
|
11
|
-
input: "
|
|
11
|
+
input: "Maya completed 142 customer conversations in Q2.",
|
|
12
12
|
knowledgeMode: "input-only",
|
|
13
13
|
instructions: "Celebrate the result. Never alter a metric.",
|
|
14
|
-
opening: "
|
|
15
|
-
personalization: { firstName: "
|
|
14
|
+
opening: "Maya, your Q2 customer impact recap is ready.",
|
|
15
|
+
personalization: { firstName: "Maya", period: "Q2", role: "Product leader" },
|
|
16
16
|
brand,
|
|
17
17
|
suppliedMedia,
|
|
18
18
|
audio: { src: "/audio/calm.mp3" },
|
|
@@ -48,5 +48,17 @@ optional custom copy. That copy should:
|
|
|
48
48
|
- be one concise sentence that fits comfortably in both supported orientations;
|
|
49
49
|
- be part of the final story, not a spinner disguised as a scene.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Pass `opening: false` when the application should own the waiting experience:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
opening: false
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The SDK then starts with an empty timeline and emits the first validated,
|
|
58
|
+
generated scene as soon as it is ready. Render a transient loading state in the
|
|
59
|
+
host application until `video.video?.scenes.length` is non-zero. That loading
|
|
60
|
+
state is not persisted in the event stream or completed video. A generated
|
|
61
|
+
scene is still required; a planner that completes without one fails the run.
|
|
62
|
+
|
|
63
|
+
The deterministic opening is runtime-owned, so it remains available even when `templateIds`
|
|
52
64
|
does not let the planner select `media` for generated body scenes.
|
package/docs/integrate-nextjs.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Install VanillaSky and one AI SDK provider:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @vanillaskyai/video@0.3.
|
|
8
|
+
npm install @vanillaskyai/video@0.3.2 ai @ai-sdk/openai
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Create an ignored `.env.local`:
|
|
@@ -74,7 +74,7 @@ requests; replace it with your application's session validation before
|
|
|
74
74
|
deploying.
|
|
75
75
|
|
|
76
76
|
The copy-and-run app is in the
|
|
77
|
-
[`examples/nextjs-quickstart` directory](https://github.com/VanillaSkyAi/video/tree/v0.3.
|
|
77
|
+
[`examples/nextjs-quickstart` directory](https://github.com/VanillaSkyAi/video/tree/v0.3.2/examples/nextjs-quickstart).
|
|
78
78
|
|
|
79
79
|
For another LLM, replace `openai(...)` with the matching AI SDK model. The route
|
|
80
80
|
shape and React code stay the same. See [Provider integration](provider-integration.md)
|
package/docs/media-and-audio.md
CHANGED
|
@@ -81,7 +81,11 @@ Use `playbackMode="manual"` to require the button on every run,
|
|
|
81
81
|
`playbackMode="muted-autoplay"` for browser-safe muted autoplay, or
|
|
82
82
|
`playbackMode="autoplay-with-sound"` to try audible autoplay immediately. The
|
|
83
83
|
lower-level `autoPlay` and `startMuted` props remain available when no playback
|
|
84
|
-
mode is set.
|
|
84
|
+
mode is set. For a chat response that should try audible autoplay without the
|
|
85
|
+
SDK generation intro, pass `opening: false`, wait to mount the player until a
|
|
86
|
+
generated scene exists, and render it with `autoPlay` and `startMuted={false}`.
|
|
87
|
+
If the browser blocks the audible start, the player returns to the first frame
|
|
88
|
+
and exposes its sound-start control.
|
|
85
89
|
|
|
86
90
|
## Media providers
|
|
87
91
|
|
package/docs/prompt-and-input.md
CHANGED
|
@@ -121,7 +121,8 @@ streamText: ({ systemPrompt, userPrompt, signal }) => streamText({
|
|
|
121
121
|
`userPrompt` is assembled by VanillaSky from:
|
|
122
122
|
|
|
123
123
|
- orientation and maximum duration;
|
|
124
|
-
- whether
|
|
124
|
+
- whether a deterministic opening scene already exists or the host is waiting
|
|
125
|
+
for the first generated scene;
|
|
125
126
|
- raw `input`;
|
|
126
127
|
- creative `instructions`;
|
|
127
128
|
- personalization;
|
|
@@ -159,7 +160,7 @@ video.generate({
|
|
|
159
160
|
escalationsResolved: "96%",
|
|
160
161
|
improvementsLaunched: 4,
|
|
161
162
|
}),
|
|
162
|
-
personalization: {
|
|
163
|
+
personalization: { role: "Product leader", focus: "activation" },
|
|
163
164
|
});
|
|
164
165
|
```
|
|
165
166
|
|