@clipwright/core 0.59.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-actors.d.ts +0 -43
- package/dist/account-actors.js +0 -55
- package/dist/account.d.ts +0 -6
- package/dist/account.js +0 -18
- package/dist/actor-bounds.d.ts +0 -5
- package/dist/actor-bounds.js +0 -6
- package/dist/actor-qualities.d.ts +0 -3
- package/dist/actor-qualities.js +0 -4
- package/dist/actors.d.ts +0 -16
- package/dist/actors.js +0 -21
- package/dist/ad-guide.js +0 -2
- package/dist/ad-pause-trim.d.ts +0 -5
- package/dist/ad-pause-trim.js +0 -8
- package/dist/api-failure.d.ts +0 -44
- package/dist/api-failure.js +0 -62
- package/dist/aspect.d.ts +0 -29
- package/dist/aspect.js +1 -34
- package/dist/asset-identity.d.ts +0 -2
- package/dist/asset-identity.js +0 -3
- package/dist/assets.d.ts +0 -34
- package/dist/assets.js +0 -42
- package/dist/billing-terms.d.ts +6 -3
- package/dist/billing-terms.js +0 -4
- package/dist/brand-styles.d.ts +0 -6
- package/dist/brand-styles.js +0 -13
- package/dist/broll-policy.js +0 -1
- package/dist/canvas-fit.d.ts +0 -2
- package/dist/canvas-fit.js +0 -4
- package/dist/caption-funnel.d.ts +0 -2
- package/dist/caption-funnel.js +0 -15
- package/dist/caption-geometry.d.ts +0 -6
- package/dist/caption-geometry.js +0 -10
- package/dist/caption-language.d.ts +0 -3
- package/dist/caption-language.js +0 -6
- package/dist/contract-dispositions.d.ts +0 -61
- package/dist/contract-dispositions.js +3 -96
- package/dist/contracts/v1/workflow-brief.d.ts +61 -3
- package/dist/contracts/v1/workflow-brief.js +0 -13
- package/dist/contracts/v1/workflow-catalog.d.ts +118 -0
- package/dist/contracts/v1/workflow-catalog.js +0 -3
- package/dist/contracts/v1/workflow-client.d.ts +116 -0
- package/dist/contracts/v1/workflow-client.js +0 -1
- package/dist/contracts/v1/workflow-dto.js +0 -1
- package/dist/contracts/v1/workflow-evidence.js +0 -1
- package/dist/contracts/v1/workflow-execution.d.ts +47 -1
- package/dist/contracts/v1/workflow-execution.js +0 -4
- package/dist/contracts/v1/workflow-next.d.ts +13 -2
- package/dist/contracts/v1/workflow-next.js +0 -3
- package/dist/contracts/v1/workflow-plan.d.ts +177 -0
- package/dist/contracts/v1/workflow-plan.js +0 -1
- package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
- package/dist/contracts/v1/workflow-primitives.js +0 -2
- package/dist/contracts/v1/workflow-run-read.d.ts +15 -1
- package/dist/contracts/v1/workflow-run-read.js +0 -3
- package/dist/creator-profile.d.ts +0 -30
- package/dist/creator-profile.js +0 -45
- package/dist/default-actor.js +0 -2
- package/dist/design.d.ts +0 -17
- package/dist/design.js +0 -18
- package/dist/edit-billing.d.ts +0 -6
- package/dist/edit-billing.js +0 -10
- package/dist/edit-candidate.d.ts +0 -6
- package/dist/edit-candidate.js +0 -9
- package/dist/edit-document.d.ts +0 -12
- package/dist/edit-document.js +0 -15
- package/dist/edit-faceless.d.ts +0 -3
- package/dist/edit-faceless.js +0 -4
- package/dist/edit-long-form.d.ts +0 -13
- package/dist/edit-long-form.js +0 -17
- package/dist/edit-operations.d.ts +0 -1
- package/dist/edit-operations.js +0 -2
- package/dist/edit-primitives.d.ts +0 -3
- package/dist/edit-primitives.js +0 -5
- package/dist/edit-revision.d.ts +0 -4
- package/dist/edit-revision.js +0 -6
- package/dist/edit-rules.d.ts +0 -3
- package/dist/edit-rules.js +0 -9
- package/dist/edit-shots.d.ts +45 -5
- package/dist/edit-shots.js +7 -11
- package/dist/edit-validate.d.ts +0 -10
- package/dist/edit-validate.js +0 -14
- package/dist/edit.js +0 -3
- package/dist/endpoint-notes.d.ts +0 -2
- package/dist/endpoint-notes.js +0 -3
- package/dist/endpoints.d.ts +0 -11
- package/dist/endpoints.js +7 -21
- package/dist/errors.d.ts +0 -42
- package/dist/errors.js +0 -54
- package/dist/explainer-fit.d.ts +0 -7
- package/dist/explainer-fit.js +0 -10
- package/dist/face-billing.d.ts +29 -11
- package/dist/face-billing.js +6 -25
- package/dist/face-delivery.d.ts +0 -1
- package/dist/face-delivery.js +0 -2
- package/dist/faceless-action-shots.d.ts +0 -8
- package/dist/faceless-action-shots.js +0 -8
- package/dist/faceless-customer-anchors.d.ts +0 -1
- package/dist/faceless-customer-anchors.js +0 -2
- package/dist/faceless-cut-style.js +0 -1
- package/dist/faceless-direction-summary.d.ts +27 -0
- package/dist/faceless-direction-summary.js +8 -0
- package/dist/faceless-image-placement.d.ts +0 -2
- package/dist/faceless-image-placement.js +0 -3
- package/dist/faceless-image-qualification.js +0 -2
- package/dist/faceless-media-record.d.ts +0 -6
- package/dist/faceless-media-record.js +0 -11
- package/dist/faceless-price.d.ts +40 -35
- package/dist/faceless-price.js +35 -49
- package/dist/faceless-public-plan.d.ts +0 -13
- package/dist/faceless-public-plan.js +0 -11
- package/dist/faceless-public.d.ts +63 -22
- package/dist/faceless-public.js +23 -58
- package/dist/faceless-short-61.js +0 -1
- package/dist/faceless-storyboard-timing.js +0 -1
- package/dist/faceless-storyboard-v2-plan.js +0 -1
- package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
- package/dist/faceless-storyboard-v2-timing.js +0 -3
- package/dist/faceless-storyboard-v2.js +0 -1
- package/dist/faceless-storyboard.js +0 -1
- package/dist/faceless-voices.d.ts +0 -16
- package/dist/faceless-voices.js +0 -18
- package/dist/feedback.d.ts +0 -4
- package/dist/feedback.js +0 -5
- package/dist/film-directions.d.ts +0 -2
- package/dist/film-directions.js +0 -7
- package/dist/film-drafts.d.ts +0 -8
- package/dist/film-drafts.js +0 -19
- package/dist/film-guide.d.ts +0 -3
- package/dist/film-guide.js +0 -6
- package/dist/film-styles.d.ts +0 -5
- package/dist/film-styles.js +0 -8
- package/dist/generation-shot.d.ts +0 -5
- package/dist/generation-shot.js +0 -8
- package/dist/generations-output.d.ts +0 -2
- package/dist/generations-output.js +0 -5
- package/dist/generations.d.ts +0 -22
- package/dist/generations.js +21 -44
- package/dist/idempotency.d.ts +1 -21
- package/dist/idempotency.js +8 -29
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -28
- package/dist/live-shot-kinds.d.ts +16 -25
- package/dist/live-shot-kinds.js +12 -28
- package/dist/long-form-pricing.d.ts +0 -5
- package/dist/long-form-pricing.js +0 -6
- package/dist/long-form-profile.d.ts +0 -3
- package/dist/long-form-profile.js +0 -4
- package/dist/long-form-revision.d.ts +0 -9
- package/dist/long-form-revision.js +0 -11
- package/dist/markdown-quote.d.ts +0 -2
- package/dist/markdown-quote.js +0 -3
- package/dist/mascots.d.ts +0 -5
- package/dist/mascots.js +0 -10
- package/dist/max-credits.d.ts +0 -1
- package/dist/max-credits.js +0 -2
- package/dist/mcp-ugc-descriptions.d.ts +0 -2
- package/dist/mcp-ugc-descriptions.js +1 -6
- package/dist/media-timebase.d.ts +0 -2
- package/dist/media-timebase.js +0 -6
- package/dist/motion-styles.d.ts +0 -8
- package/dist/motion-styles.js +0 -11
- package/dist/moves.d.ts +0 -7
- package/dist/moves.js +0 -9
- package/dist/music.d.ts +0 -5
- package/dist/music.js +2 -9
- package/dist/naming.d.ts +0 -3
- package/dist/naming.js +0 -19
- package/dist/openapi.d.ts +0 -13
- package/dist/openapi.js +6 -11
- package/dist/output-provenance.d.ts +0 -4
- package/dist/output-provenance.js +0 -5
- package/dist/own-agent-price.d.ts +19 -22
- package/dist/own-agent-price.js +30 -25
- package/dist/own-agent-runs.d.ts +111 -11
- package/dist/own-agent-runs.js +89 -24
- package/dist/pacing.d.ts +3 -15
- package/dist/pacing.js +18 -18
- package/dist/parts-pricing.d.ts +8 -24
- package/dist/parts-pricing.js +19 -30
- package/dist/post-text.d.ts +0 -2
- package/dist/post-text.js +0 -4
- package/dist/presenter-beats.d.ts +0 -10
- package/dist/presenter-beats.js +0 -14
- package/dist/presenter-matte.d.ts +0 -7
- package/dist/presenter-matte.js +0 -9
- package/dist/presenter-takes.d.ts +0 -3
- package/dist/presenter-takes.js +0 -8
- package/dist/prices.d.ts +2 -8
- package/dist/prices.js +13 -23
- package/dist/public-endpoints.d.ts +0 -11
- package/dist/public-endpoints.js +0 -14
- package/dist/public-responses.d.ts +0 -2
- package/dist/public-responses.js +0 -3
- package/dist/rate-limit.d.ts +0 -24
- package/dist/rate-limit.js +0 -29
- package/dist/reference-analysis.d.ts +57 -34
- package/dist/reference-analysis.js +0 -69
- package/dist/reference-bring.d.ts +33 -0
- package/dist/reference-bring.js +28 -0
- package/dist/reference-display.d.ts +0 -3
- package/dist/reference-display.js +37 -4
- package/dist/reference-kinds.d.ts +0 -4
- package/dist/reference-kinds.js +0 -6
- package/dist/reference-lyrics.d.ts +0 -6
- package/dist/reference-lyrics.js +0 -6
- package/dist/reference-profile.d.ts +270 -39
- package/dist/reference-profile.js +64 -50
- package/dist/reference-staging.d.ts +0 -10
- package/dist/reference-staging.js +0 -14
- package/dist/reference-text-spans.d.ts +0 -4
- package/dist/reference-text-spans.js +0 -7
- package/dist/reference-voice-over.d.ts +0 -6
- package/dist/reference-voice-over.js +0 -7
- package/dist/reference-voice.d.ts +0 -7
- package/dist/reference-voice.js +0 -12
- package/dist/render-backend.d.ts +0 -30
- package/dist/render-backend.js +0 -5
- package/dist/resolved-timeline.d.ts +4 -5
- package/dist/resolved-timeline.js +1 -31
- package/dist/run-media.d.ts +0 -1
- package/dist/run-media.js +0 -2
- package/dist/run-preflight.d.ts +0 -4
- package/dist/run-preflight.js +0 -11
- package/dist/run-static-warnings.d.ts +0 -8
- package/dist/run-static-warnings.js +0 -38
- package/dist/runs.d.ts +16 -32
- package/dist/runs.js +0 -50
- package/dist/scene-bible.d.ts +15 -7
- package/dist/scene-bible.js +15 -10
- package/dist/scene-graph.d.ts +0 -12
- package/dist/scene-graph.js +0 -24
- package/dist/scene-place.d.ts +0 -25
- package/dist/scene-place.js +0 -24
- package/dist/scene-proposal.d.ts +0 -3
- package/dist/scene-proposal.js +0 -9
- package/dist/script-integrity.d.ts +0 -6
- package/dist/script-integrity.js +0 -8
- package/dist/script-voice.d.ts +0 -7
- package/dist/script-voice.js +0 -16
- package/dist/semantic-inserts.d.ts +0 -7
- package/dist/semantic-inserts.js +0 -10
- package/dist/skill-theme-explainer.js +0 -5
- package/dist/skill-theme.d.ts +0 -13
- package/dist/skill-theme.js +0 -25
- package/dist/skills.d.ts +22 -86
- package/dist/skills.js +21 -167
- package/dist/speech-rhythm-contract.js +0 -1
- package/dist/speech-rhythm.d.ts +0 -4
- package/dist/speech-rhythm.js +0 -2
- package/dist/templates/backdrop.d.ts +0 -3
- package/dist/templates/backdrop.js +0 -5
- package/dist/templates/callout.d.ts +0 -4
- package/dist/templates/callout.js +0 -6
- package/dist/templates/chart.d.ts +0 -4
- package/dist/templates/chart.js +0 -6
- package/dist/templates/chat-window.d.ts +0 -8
- package/dist/templates/chat-window.js +0 -10
- package/dist/templates/checklist.d.ts +0 -3
- package/dist/templates/checklist.js +0 -6
- package/dist/templates/comment-cta.d.ts +0 -14
- package/dist/templates/comment-cta.js +0 -19
- package/dist/templates/compare.d.ts +0 -6
- package/dist/templates/compare.js +0 -7
- package/dist/templates/cover-story.d.ts +0 -1
- package/dist/templates/cover-story.js +0 -3
- package/dist/templates/end-card.d.ts +0 -2
- package/dist/templates/end-card.js +0 -3
- package/dist/templates/hand-title.d.ts +0 -5
- package/dist/templates/hand-title.js +0 -9
- package/dist/templates/index.d.ts +0 -57
- package/dist/templates/index.js +0 -60
- package/dist/templates/lower-third.d.ts +0 -4
- package/dist/templates/lower-third.js +0 -5
- package/dist/templates/notification.d.ts +0 -6
- package/dist/templates/notification.js +0 -7
- package/dist/templates/phone-call.d.ts +0 -2
- package/dist/templates/phone-call.js +0 -6
- package/dist/templates/phone-screen.d.ts +0 -5
- package/dist/templates/phone-screen.js +0 -7
- package/dist/templates/pointer-chips.d.ts +0 -4
- package/dist/templates/pointer-chips.js +0 -6
- package/dist/templates/progress.d.ts +0 -3
- package/dist/templates/progress.js +0 -5
- package/dist/templates/quote.d.ts +0 -3
- package/dist/templates/quote.js +0 -4
- package/dist/templates/race.d.ts +0 -5
- package/dist/templates/race.js +0 -7
- package/dist/templates/rating.d.ts +0 -3
- package/dist/templates/rating.js +0 -5
- package/dist/templates/series-frame.d.ts +0 -16
- package/dist/templates/series-frame.js +0 -19
- package/dist/templates/size.d.ts +0 -7
- package/dist/templates/size.js +0 -8
- package/dist/templates/slot.d.ts +0 -2
- package/dist/templates/slot.js +0 -2
- package/dist/templates/sounds.d.ts +0 -12
- package/dist/templates/sounds.js +0 -16
- package/dist/templates/stat.d.ts +0 -3
- package/dist/templates/stat.js +0 -5
- package/dist/templates/tag.d.ts +0 -3
- package/dist/templates/tag.js +0 -5
- package/dist/templates/terminal.d.ts +0 -6
- package/dist/templates/terminal.js +0 -8
- package/dist/templates/theme.d.ts +0 -7
- package/dist/templates/theme.js +0 -9
- package/dist/templates/title-card.d.ts +0 -3
- package/dist/templates/title-card.js +0 -5
- package/dist/templates/video-grid.d.ts +0 -5
- package/dist/templates/video-grid.js +0 -8
- package/dist/templates/word-fill.d.ts +0 -3
- package/dist/templates/word-fill.js +0 -4
- package/dist/templates/word-title.d.ts +0 -2
- package/dist/templates/word-title.js +0 -4
- package/dist/trend-niches.d.ts +0 -11
- package/dist/trend-niches.js +0 -16
- package/dist/trend-search.d.ts +0 -66
- package/dist/trend-search.js +0 -70
- package/dist/tts-backend.d.ts +0 -19
- package/dist/tts-backend.js +0 -7
- package/dist/ugc-call.d.ts +0 -16
- package/dist/ugc-call.js +0 -21
- package/dist/ugc-delivery.d.ts +0 -2
- package/dist/ugc-delivery.js +0 -4
- package/dist/ugc-framing.d.ts +0 -4
- package/dist/ugc-framing.js +0 -6
- package/dist/ugc-interview.d.ts +0 -18
- package/dist/ugc-interview.js +0 -24
- package/dist/ugc-layers.d.ts +0 -39
- package/dist/ugc-layers.js +0 -39
- package/dist/ugc-scenes.d.ts +0 -2
- package/dist/ugc-scenes.js +0 -5
- package/dist/ugc-video-media.d.ts +0 -5
- package/dist/ugc-video-media.js +0 -7
- package/dist/uploads.d.ts +1 -15
- package/dist/uploads.js +3 -20
- package/dist/vendor-response.d.ts +0 -19
- package/dist/vendor-response.js +0 -22
- package/dist/video-size.d.ts +0 -4
- package/dist/video-size.js +0 -7
- package/dist/voice-admission.d.ts +2 -11
- package/dist/voice-admission.js +0 -13
- package/dist/voice-catalog-data.d.ts +0 -2
- package/dist/voice-catalog-data.js +0 -3
- package/dist/voice-catalog.d.ts +0 -6
- package/dist/voice-catalog.js +0 -8
- package/dist/voice-listing.d.ts +0 -6
- package/dist/voice-listing.js +0 -14
- package/dist/voice-pace.d.ts +0 -4
- package/dist/voice-pace.js +0 -7
- package/dist/voice-preview-approval.js +0 -1
- package/dist/voices.d.ts +4 -69
- package/dist/voices.js +3 -88
- package/dist/workflows/catalog.d.ts +0 -2
- package/dist/workflows/catalog.js +0 -4
- package/dist/workflows/film-directions.d.ts +0 -3
- package/dist/workflows/film-directions.js +0 -4
- package/dist/workflows/index.js +0 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +33 -0
- package/dist/workflows/methods/faceless-explainer.js +0 -1
- package/dist/workflows/methods/kinetic-launch.d.ts +66 -1
- package/dist/workflows/methods/kinetic-launch.js +0 -2
- package/dist/workflows/methods/product-image-story.d.ts +33 -0
- package/dist/workflows/methods/product-image-story.js +0 -1
- package/dist/workflows/methods/reference-remake.d.ts +33 -0
- package/dist/workflows/methods/reference-remake.js +0 -1
- package/dist/workflows/methods/shared.d.ts +33 -1
- package/dist/workflows/methods/shared.js +0 -3
- package/dist/workflows/methods/ugc-faq-answer.d.ts +33 -0
- package/dist/workflows/methods/ugc-faq-answer.js +0 -1
- package/dist/workflows/methods/ugc-product-intro.d.ts +33 -0
- package/dist/workflows/methods/ugc-product-intro.js +0 -1
- package/dist/workflows/methods/website-proof-demo.d.ts +66 -1
- package/dist/workflows/methods/website-proof-demo.js +0 -2
- package/dist/workflows/motion-director.d.ts +0 -11
- package/dist/workflows/motion-director.js +0 -11
- package/dist/workflows/product-references.js +0 -1
- package/dist/workflows/reference-remake.d.ts +114 -17
- package/dist/workflows/reference-remake.js +0 -167
- package/dist/workflows/remake-chooser.d.ts +0 -6
- package/dist/workflows/remake-chooser.js +0 -4
- package/dist/workflows/remake-motion.d.ts +0 -16
- package/dist/workflows/remake-motion.js +0 -19
- package/dist/workflows/validate.d.ts +0 -1
- package/dist/workflows/validate.js +0 -5
- package/dist/workflows.js +0 -1
- package/package.json +1 -1
- package/dist/account-actors.js.map +0 -1
- package/dist/account.js.map +0 -1
- package/dist/actor-bounds.js.map +0 -1
- package/dist/actor-qualities.js.map +0 -1
- package/dist/actors.js.map +0 -1
- package/dist/ad-guide.js.map +0 -1
- package/dist/ad-pause-trim.js.map +0 -1
- package/dist/api-failure.js.map +0 -1
- package/dist/aspect.js.map +0 -1
- package/dist/asset-identity.js.map +0 -1
- package/dist/assets.js.map +0 -1
- package/dist/billing-terms.js.map +0 -1
- package/dist/brand-styles.js.map +0 -1
- package/dist/broll-policy.js.map +0 -1
- package/dist/canvas-fit.js.map +0 -1
- package/dist/caption-funnel.js.map +0 -1
- package/dist/caption-geometry.js.map +0 -1
- package/dist/caption-language.js.map +0 -1
- package/dist/contract-dispositions.js.map +0 -1
- package/dist/contracts/v1/workflow-brief.js.map +0 -1
- package/dist/contracts/v1/workflow-catalog.js.map +0 -1
- package/dist/contracts/v1/workflow-client.js.map +0 -1
- package/dist/contracts/v1/workflow-dto.js.map +0 -1
- package/dist/contracts/v1/workflow-evidence.js.map +0 -1
- package/dist/contracts/v1/workflow-execution.js.map +0 -1
- package/dist/contracts/v1/workflow-next.js.map +0 -1
- package/dist/contracts/v1/workflow-plan.js.map +0 -1
- package/dist/contracts/v1/workflow-primitives.js.map +0 -1
- package/dist/contracts/v1/workflow-run-read.js.map +0 -1
- package/dist/creator-profile.js.map +0 -1
- package/dist/default-actor.js.map +0 -1
- package/dist/design.js.map +0 -1
- package/dist/edit-billing.js.map +0 -1
- package/dist/edit-candidate.js.map +0 -1
- package/dist/edit-document.js.map +0 -1
- package/dist/edit-faceless.js.map +0 -1
- package/dist/edit-long-form.js.map +0 -1
- package/dist/edit-operations.js.map +0 -1
- package/dist/edit-primitives.js.map +0 -1
- package/dist/edit-revision.js.map +0 -1
- package/dist/edit-rules.js.map +0 -1
- package/dist/edit-shots.js.map +0 -1
- package/dist/edit-validate.js.map +0 -1
- package/dist/edit.js.map +0 -1
- package/dist/endpoint-notes.js.map +0 -1
- package/dist/endpoints.js.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/explainer-fit.js.map +0 -1
- package/dist/face-billing.js.map +0 -1
- package/dist/face-delivery.js.map +0 -1
- package/dist/faceless-action-shots.js.map +0 -1
- package/dist/faceless-customer-anchors.js.map +0 -1
- package/dist/faceless-cut-style.js.map +0 -1
- package/dist/faceless-image-placement.js.map +0 -1
- package/dist/faceless-image-qualification.js.map +0 -1
- package/dist/faceless-media-record.js.map +0 -1
- package/dist/faceless-price.js.map +0 -1
- package/dist/faceless-public-plan.js.map +0 -1
- package/dist/faceless-public.js.map +0 -1
- package/dist/faceless-short-61.js.map +0 -1
- package/dist/faceless-storyboard-timing.js.map +0 -1
- package/dist/faceless-storyboard-v2-plan.js.map +0 -1
- package/dist/faceless-storyboard-v2-timing.js.map +0 -1
- package/dist/faceless-storyboard-v2.js.map +0 -1
- package/dist/faceless-storyboard.js.map +0 -1
- package/dist/faceless-voices.js.map +0 -1
- package/dist/feedback.js.map +0 -1
- package/dist/film-directions.js.map +0 -1
- package/dist/film-drafts.js.map +0 -1
- package/dist/film-guide.js.map +0 -1
- package/dist/film-styles.js.map +0 -1
- package/dist/generation-shot.js.map +0 -1
- package/dist/generations-output.js.map +0 -1
- package/dist/generations.js.map +0 -1
- package/dist/idempotency.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/live-shot-kinds.js.map +0 -1
- package/dist/long-form-pricing.js.map +0 -1
- package/dist/long-form-profile.js.map +0 -1
- package/dist/long-form-revision.js.map +0 -1
- package/dist/markdown-quote.js.map +0 -1
- package/dist/mascots.js.map +0 -1
- package/dist/max-credits.js.map +0 -1
- package/dist/mcp-ugc-descriptions.js.map +0 -1
- package/dist/media-timebase.js.map +0 -1
- package/dist/motion-styles.js.map +0 -1
- package/dist/moves.js.map +0 -1
- package/dist/music.js.map +0 -1
- package/dist/naming.js.map +0 -1
- package/dist/openapi.js.map +0 -1
- package/dist/output-provenance.js.map +0 -1
- package/dist/own-agent-price.js.map +0 -1
- package/dist/own-agent-runs.js.map +0 -1
- package/dist/pacing.js.map +0 -1
- package/dist/parts-pricing.js.map +0 -1
- package/dist/post-text.js.map +0 -1
- package/dist/presenter-beats.js.map +0 -1
- package/dist/presenter-matte.js.map +0 -1
- package/dist/presenter-takes.js.map +0 -1
- package/dist/prices.js.map +0 -1
- package/dist/public-endpoints.js.map +0 -1
- package/dist/public-responses.js.map +0 -1
- package/dist/rate-limit.js.map +0 -1
- package/dist/reference-analysis.js.map +0 -1
- package/dist/reference-display.js.map +0 -1
- package/dist/reference-kinds.js.map +0 -1
- package/dist/reference-lyrics.js.map +0 -1
- package/dist/reference-profile.js.map +0 -1
- package/dist/reference-staging.js.map +0 -1
- package/dist/reference-text-spans.js.map +0 -1
- package/dist/reference-voice-over.js.map +0 -1
- package/dist/reference-voice.js.map +0 -1
- package/dist/render-backend.js.map +0 -1
- package/dist/resolved-timeline.js.map +0 -1
- package/dist/run-media.js.map +0 -1
- package/dist/run-preflight.js.map +0 -1
- package/dist/run-static-warnings.js.map +0 -1
- package/dist/runs.js.map +0 -1
- package/dist/scene-bible.js.map +0 -1
- package/dist/scene-graph.js.map +0 -1
- package/dist/scene-place.js.map +0 -1
- package/dist/scene-proposal.js.map +0 -1
- package/dist/script-integrity.js.map +0 -1
- package/dist/script-voice.js.map +0 -1
- package/dist/semantic-inserts.js.map +0 -1
- package/dist/skill-theme-explainer.js.map +0 -1
- package/dist/skill-theme.js.map +0 -1
- package/dist/skills.js.map +0 -1
- package/dist/speech-rhythm-contract.js.map +0 -1
- package/dist/speech-rhythm.js.map +0 -1
- package/dist/templates/backdrop.js.map +0 -1
- package/dist/templates/callout.js.map +0 -1
- package/dist/templates/chart.js.map +0 -1
- package/dist/templates/chat-window.js.map +0 -1
- package/dist/templates/checklist.js.map +0 -1
- package/dist/templates/comment-cta.js.map +0 -1
- package/dist/templates/compare.js.map +0 -1
- package/dist/templates/cover-story.js.map +0 -1
- package/dist/templates/end-card.js.map +0 -1
- package/dist/templates/hand-title.js.map +0 -1
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/lower-third.js.map +0 -1
- package/dist/templates/notification.js.map +0 -1
- package/dist/templates/phone-call.js.map +0 -1
- package/dist/templates/phone-screen.js.map +0 -1
- package/dist/templates/pointer-chips.js.map +0 -1
- package/dist/templates/progress.js.map +0 -1
- package/dist/templates/quote.js.map +0 -1
- package/dist/templates/race.js.map +0 -1
- package/dist/templates/rating.js.map +0 -1
- package/dist/templates/series-frame.js.map +0 -1
- package/dist/templates/size.js.map +0 -1
- package/dist/templates/slot.js.map +0 -1
- package/dist/templates/sounds.js.map +0 -1
- package/dist/templates/stat.js.map +0 -1
- package/dist/templates/tag.js.map +0 -1
- package/dist/templates/terminal.js.map +0 -1
- package/dist/templates/theme.js.map +0 -1
- package/dist/templates/title-card.js.map +0 -1
- package/dist/templates/video-grid.js.map +0 -1
- package/dist/templates/word-fill.js.map +0 -1
- package/dist/templates/word-title.js.map +0 -1
- package/dist/trend-niches.js.map +0 -1
- package/dist/trend-search.js.map +0 -1
- package/dist/tts-backend.js.map +0 -1
- package/dist/ugc-call.js.map +0 -1
- package/dist/ugc-delivery.js.map +0 -1
- package/dist/ugc-framing.js.map +0 -1
- package/dist/ugc-interview.js.map +0 -1
- package/dist/ugc-layers.js.map +0 -1
- package/dist/ugc-scenes.js.map +0 -1
- package/dist/ugc-video-media.js.map +0 -1
- package/dist/uploads.js.map +0 -1
- package/dist/vendor-response.js.map +0 -1
- package/dist/video-size.js.map +0 -1
- package/dist/voice-admission.js.map +0 -1
- package/dist/voice-catalog-data.js.map +0 -1
- package/dist/voice-catalog.js.map +0 -1
- package/dist/voice-listing.js.map +0 -1
- package/dist/voice-pace.js.map +0 -1
- package/dist/voice-preview-approval.js.map +0 -1
- package/dist/voices.js.map +0 -1
- package/dist/workflows/catalog.js.map +0 -1
- package/dist/workflows/film-directions.js.map +0 -1
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/methods/faceless-explainer.js.map +0 -1
- package/dist/workflows/methods/kinetic-launch.js.map +0 -1
- package/dist/workflows/methods/product-image-story.js.map +0 -1
- package/dist/workflows/methods/reference-remake.js.map +0 -1
- package/dist/workflows/methods/shared.js.map +0 -1
- package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
- package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
- package/dist/workflows/methods/website-proof-demo.js.map +0 -1
- package/dist/workflows/motion-director.js.map +0 -1
- package/dist/workflows/product-references.js.map +0 -1
- package/dist/workflows/reference-remake.js.map +0 -1
- package/dist/workflows/remake-chooser.js.map +0 -1
- package/dist/workflows/remake-motion.js.map +0 -1
- package/dist/workflows/validate.js.map +0 -1
- package/dist/workflows.js.map +0 -1
package/dist/runs.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** Shared run stages; each skill uses the stages it needs. */
|
|
3
2
|
export declare const RUN_STATES: readonly ["queued", "generating", "scripting", "tts", "avatar", "compositing", "uploading", "succeeded", "failed"];
|
|
4
3
|
export declare const runState: z.ZodEnum<{
|
|
5
4
|
avatar: "avatar";
|
|
@@ -13,8 +12,6 @@ export declare const runState: z.ZodEnum<{
|
|
|
13
12
|
uploading: "uploading";
|
|
14
13
|
}>;
|
|
15
14
|
export type RunState = z.infer<typeof runState>;
|
|
16
|
-
/** The signature covers GET only, so `curl -I` gets 403 and reads as "the link is dead". */
|
|
17
|
-
/** Said where the link is handed out. */
|
|
18
15
|
export declare const VIDEO_URL_CHECK: string;
|
|
19
16
|
export declare const runStep: z.ZodObject<{
|
|
20
17
|
step: z.ZodString;
|
|
@@ -32,33 +29,16 @@ export declare const runStep: z.ZodObject<{
|
|
|
32
29
|
bytes: z.ZodNumber;
|
|
33
30
|
}, z.core.$strip>>>;
|
|
34
31
|
}, z.core.$strip>;
|
|
35
|
-
/** AI output disclosure of a video with a presenter, the same on every surface: a fully */
|
|
36
|
-
/** synthetic clip says so itself. Not a claim of legal compliance. */
|
|
37
32
|
export declare const AI_DISCLOSURE_TEXT = "This video was generated with AI: the actor, the voice and the lip sync are synthetic.";
|
|
38
|
-
/** A faceless video has no actor and no lip sync, so it names what it does hold (clipwright#488). */
|
|
39
33
|
export declare const FACELESS_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the opening clip and the images are synthetic.";
|
|
40
|
-
/** An explainer has no opening clip: it is drawn, and its pictures are generated (#1277). */
|
|
41
34
|
export declare const FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the animation and the images in it are synthetic.";
|
|
42
|
-
/** A run with `scene_images` cannot call every image synthetic. One at the opening is animated */
|
|
43
|
-
/** into the clip, and every shot may be the author's, so the sentence counts neither. */
|
|
44
35
|
export declare const FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT: string;
|
|
45
|
-
/** The disclosure of one run, from its skill and stored input: every writer and the API */
|
|
46
|
-
/** response call this, so the sentence names what that video holds. */
|
|
47
36
|
export declare function aiDisclosureText(skill: string, input: unknown): string;
|
|
48
|
-
/** Whether a faceless run's stored input holds images of its author: a revision reads what its admission froze down the chain. */
|
|
49
37
|
export declare function facelessOwnImages(input: unknown): boolean;
|
|
50
|
-
/** Object metadata key that says whether the tag is in the file: a reader learns it without the bytes. */
|
|
51
38
|
export declare const AI_DISCLOSURE_EMBEDDED_METADATA_KEY = "ai-disclosure-embedded";
|
|
52
|
-
/** Storage object metadata of a delivery, one builder so every writer shares the keys. Weaker */
|
|
53
|
-
/** than an embedded tag (lost on re-save), but always set, without parsing MP4 boxes. */
|
|
54
39
|
export declare function aiDisclosureObjectMetadata(text: string, embedded?: boolean): Readonly<Record<string, string>>;
|
|
55
|
-
/** The metadata of a video with a presenter. */
|
|
56
40
|
export declare const AI_DISCLOSURE_OBJECT_METADATA: Readonly<Record<string, string>>;
|
|
57
|
-
/** Run id shape, a separate schema because INPUT asks for it too: the MCP `get_run` tool, */
|
|
58
|
-
/** where a bare `z.string()` let garbage reach the network. */
|
|
59
41
|
export declare const runId: z.ZodString;
|
|
60
|
-
/** A shot candidate's family and unit. The mode and take come from the stored input and are `null` once it is redacted; */
|
|
61
|
-
/** the preview and `usable_until` are `null` until its unit is published, and the preview again once its media are gone. */
|
|
62
42
|
export declare const runCandidate: z.ZodObject<{
|
|
63
43
|
source_run_id: z.ZodString;
|
|
64
44
|
root_run_id: z.ZodString;
|
|
@@ -78,7 +58,6 @@ export declare const runCandidate: z.ZodObject<{
|
|
|
78
58
|
usable_until: z.ZodNullable<z.ZodString>;
|
|
79
59
|
}, z.core.$strip>;
|
|
80
60
|
export type RunCandidate = z.infer<typeof runCandidate>;
|
|
81
|
-
/** Where a drawn element of a delivered run came from: a library kind, or a graphic made for this run (#1107). */
|
|
82
61
|
export declare const RUN_ELEMENT_ORIGINS: readonly ["library", "generated"];
|
|
83
62
|
export declare const runElement: z.ZodObject<{
|
|
84
63
|
id: z.ZodString;
|
|
@@ -141,6 +120,9 @@ export declare const run: z.ZodObject<{
|
|
|
141
120
|
shot_talking_action: z.ZodNumber;
|
|
142
121
|
shot_action: z.ZodNumber;
|
|
143
122
|
shot_omni: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
shot_seedance: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
shot_omni_no_text: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
shot_seedance_no_text: z.ZodOptional<z.ZodNumber>;
|
|
144
126
|
}, z.core.$strict>>>;
|
|
145
127
|
productionCreditsPerSecond: z.ZodNumber;
|
|
146
128
|
liveAvatarStillCredits: z.ZodNumber;
|
|
@@ -156,6 +138,7 @@ export declare const run: z.ZodObject<{
|
|
|
156
138
|
tariffId: z.ZodEnum<{
|
|
157
139
|
"faceless-image-i2v-v1": "faceless-image-i2v-v1";
|
|
158
140
|
"faceless-parts-v1": "faceless-parts-v1";
|
|
141
|
+
"faceless-parts-v2": "faceless-parts-v2";
|
|
159
142
|
}>;
|
|
160
143
|
captions: z.ZodBoolean;
|
|
161
144
|
images: z.ZodOptional<z.ZodNumber>;
|
|
@@ -163,6 +146,9 @@ export declare const run: z.ZodObject<{
|
|
|
163
146
|
musicCredits: z.ZodOptional<z.ZodNumber>;
|
|
164
147
|
shotSeconds: z.ZodOptional<z.ZodNumber>;
|
|
165
148
|
shotCredits: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
textShotSeconds: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
textShotCredits: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
totalCreditsWithoutText: z.ZodOptional<z.ZodNumber>;
|
|
166
152
|
scenes: z.ZodOptional<z.ZodNumber>;
|
|
167
153
|
sceneCredits: z.ZodOptional<z.ZodNumber>;
|
|
168
154
|
posePictures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -171,6 +157,7 @@ export declare const run: z.ZodObject<{
|
|
|
171
157
|
objectPictures: z.ZodOptional<z.ZodNumber>;
|
|
172
158
|
objectPictureCredits: z.ZodOptional<z.ZodNumber>;
|
|
173
159
|
filmCredits: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
directionCredits: z.ZodOptional<z.ZodNumber>;
|
|
174
161
|
outputFrames: z.ZodNumber;
|
|
175
162
|
}, z.core.$strict>>;
|
|
176
163
|
revision: z.ZodOptional<z.ZodObject<{
|
|
@@ -356,13 +343,9 @@ export declare const run: z.ZodObject<{
|
|
|
356
343
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
357
344
|
}, z.core.$strip>;
|
|
358
345
|
export type Run = z.infer<typeof run>;
|
|
359
|
-
/** Terminal run states as shared constants, the single source of truth about completion, */
|
|
360
|
-
/** instead of string literals repeated across consumers. */
|
|
361
346
|
export declare const SUCCEEDED_STATE: "succeeded";
|
|
362
347
|
export declare const FAILED_STATE: "failed";
|
|
363
348
|
export declare const TERMINAL_STATES: readonly ["succeeded", "failed"];
|
|
364
|
-
/** Tolerant READ projection: only `state` is loosened to `z.string()`, everything else is */
|
|
365
|
-
/** inherited via `run.extend`, so a new server stage does not break installed clients. */
|
|
366
349
|
export declare const runRead: z.ZodObject<{
|
|
367
350
|
run_id: z.ZodString;
|
|
368
351
|
actor: z.ZodOptional<z.ZodObject<{
|
|
@@ -404,6 +387,9 @@ export declare const runRead: z.ZodObject<{
|
|
|
404
387
|
shot_talking_action: z.ZodNumber;
|
|
405
388
|
shot_action: z.ZodNumber;
|
|
406
389
|
shot_omni: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
shot_seedance: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
shot_omni_no_text: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
shot_seedance_no_text: z.ZodOptional<z.ZodNumber>;
|
|
407
393
|
}, z.core.$strict>>>;
|
|
408
394
|
productionCreditsPerSecond: z.ZodNumber;
|
|
409
395
|
liveAvatarStillCredits: z.ZodNumber;
|
|
@@ -419,6 +405,7 @@ export declare const runRead: z.ZodObject<{
|
|
|
419
405
|
tariffId: z.ZodEnum<{
|
|
420
406
|
"faceless-image-i2v-v1": "faceless-image-i2v-v1";
|
|
421
407
|
"faceless-parts-v1": "faceless-parts-v1";
|
|
408
|
+
"faceless-parts-v2": "faceless-parts-v2";
|
|
422
409
|
}>;
|
|
423
410
|
captions: z.ZodBoolean;
|
|
424
411
|
images: z.ZodOptional<z.ZodNumber>;
|
|
@@ -426,6 +413,9 @@ export declare const runRead: z.ZodObject<{
|
|
|
426
413
|
musicCredits: z.ZodOptional<z.ZodNumber>;
|
|
427
414
|
shotSeconds: z.ZodOptional<z.ZodNumber>;
|
|
428
415
|
shotCredits: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
textShotSeconds: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
textShotCredits: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
totalCreditsWithoutText: z.ZodOptional<z.ZodNumber>;
|
|
429
419
|
scenes: z.ZodOptional<z.ZodNumber>;
|
|
430
420
|
sceneCredits: z.ZodOptional<z.ZodNumber>;
|
|
431
421
|
posePictures: z.ZodOptional<z.ZodNumber>;
|
|
@@ -434,6 +424,7 @@ export declare const runRead: z.ZodObject<{
|
|
|
434
424
|
objectPictures: z.ZodOptional<z.ZodNumber>;
|
|
435
425
|
objectPictureCredits: z.ZodOptional<z.ZodNumber>;
|
|
436
426
|
filmCredits: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
directionCredits: z.ZodOptional<z.ZodNumber>;
|
|
437
428
|
outputFrames: z.ZodNumber;
|
|
438
429
|
}, z.core.$strict>>;
|
|
439
430
|
revision: z.ZodOptional<z.ZodObject<{
|
|
@@ -620,18 +611,11 @@ export declare const runRead: z.ZodObject<{
|
|
|
620
611
|
state: z.ZodString;
|
|
621
612
|
}, z.core.$strip>;
|
|
622
613
|
export type RunRead = z.infer<typeof runRead>;
|
|
623
|
-
/** A money field of a run. Names are derived FROM THE SCHEMA: a hand list next to the MCP */
|
|
624
|
-
/** formatter kept losing them. */
|
|
625
614
|
export type RunMoneyField = Extract<keyof RunRead, `credits_${string}` | "balance_after_credits">;
|
|
626
615
|
export declare const RUN_MONEY_FIELDS: readonly RunMoneyField[];
|
|
627
|
-
/** A run's money fields as one object, for surfaces that build their own response. */
|
|
628
616
|
export declare function runMoney(read: Pick<RunRead, RunMoneyField>): Pick<RunRead, RunMoneyField>;
|
|
629
|
-
/** Whether a run is terminal. Takes a `string` (the read projection), so an unknown */
|
|
630
|
-
/** status from an extended enum correctly gives `false`. */
|
|
631
617
|
export declare function isTerminal(state: string): boolean;
|
|
632
|
-
/** The longest `GET /v1/runs/{id}` holds its answer (#1036), inside an agent's usual 60 s tool timeout. */
|
|
633
618
|
export declare const RUN_WAIT_MAX_SECONDS = 50;
|
|
634
|
-
/** The query of `GET /v1/runs/{id}`; other query fields stay ignored, as they were before it had one. */
|
|
635
619
|
export declare const runQuery: z.ZodObject<{
|
|
636
620
|
wait_seconds: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
637
621
|
}, z.core.$strip>;
|
package/dist/runs.js
CHANGED
|
@@ -12,7 +12,6 @@ import { SHOT_OPERATION_MODES, shotId } from "./edit-operations.js";
|
|
|
12
12
|
import { runGeneration } from "./generations-output.js";
|
|
13
13
|
import { postText } from "./post-text.js";
|
|
14
14
|
import { runVideo } from "./video-size.js";
|
|
15
|
-
/** Shared run stages; each skill uses the stages it needs. */
|
|
16
15
|
export const RUN_STATES = [
|
|
17
16
|
"queued",
|
|
18
17
|
"generating",
|
|
@@ -25,8 +24,6 @@ export const RUN_STATES = [
|
|
|
25
24
|
"failed",
|
|
26
25
|
];
|
|
27
26
|
export const runState = z.enum(RUN_STATES);
|
|
28
|
-
/** The signature covers GET only, so `curl -I` gets 403 and reads as "the link is dead". */
|
|
29
|
-
/** Said where the link is handed out. */
|
|
30
27
|
export const VIDEO_URL_CHECK = "signed for GET only: HEAD returns 403. To check it without downloading, " +
|
|
31
28
|
'use a ranged GET (curl -r 0-0), not curl -I.';
|
|
32
29
|
export const runStep = z.object({
|
|
@@ -38,21 +35,12 @@ export const runStep = z.object({
|
|
|
38
35
|
.array(z.object({ kind: z.string(), url: z.string().url(), bytes: z.number().int() }))
|
|
39
36
|
.default([]),
|
|
40
37
|
});
|
|
41
|
-
/** AI output disclosure of a video with a presenter, the same on every surface: a fully */
|
|
42
|
-
/** synthetic clip says so itself. Not a claim of legal compliance. */
|
|
43
38
|
export const AI_DISCLOSURE_TEXT = "This video was generated with AI: the actor, the voice and the lip sync are synthetic.";
|
|
44
|
-
/** A faceless video has no actor and no lip sync, so it names what it does hold (clipwright#488). */
|
|
45
39
|
export const FACELESS_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the opening clip and the images are synthetic.";
|
|
46
|
-
/** An explainer has no opening clip: it is drawn, and its pictures are generated (#1277). */
|
|
47
40
|
export const FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the animation and the images in it are synthetic.";
|
|
48
|
-
/** A run with `scene_images` cannot call every image synthetic. One at the opening is animated */
|
|
49
|
-
/** into the clip, and every shot may be the author's, so the sentence counts neither. */
|
|
50
41
|
export const FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice and the opening clip are synthetic, " +
|
|
51
42
|
"and so is every image its author did not supply.";
|
|
52
|
-
/** The disclosure of one run, from its skill and stored input: every writer and the API */
|
|
53
|
-
/** response call this, so the sentence names what that video holds. */
|
|
54
43
|
export function aiDisclosureText(skill, input) {
|
|
55
|
-
// A long-form revision shows its root's synthetic presenter, so it says what the root says.
|
|
56
44
|
if (skill === "revise_long_form")
|
|
57
45
|
return AI_DISCLOSURE_TEXT;
|
|
58
46
|
if (skill !== "make_faceless")
|
|
@@ -61,28 +49,19 @@ export function aiDisclosureText(skill, input) {
|
|
|
61
49
|
return FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT;
|
|
62
50
|
return facelessOwnImages(input) ? FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT : FACELESS_AI_DISCLOSURE_TEXT;
|
|
63
51
|
}
|
|
64
|
-
/** Whether a faceless run's stored input holds images of its author: a revision reads what its admission froze down the chain. */
|
|
65
52
|
export function facelessOwnImages(input) {
|
|
66
53
|
const stored = typeof input === "object" && input !== null
|
|
67
54
|
? input : {};
|
|
68
55
|
return stored.resolved_revision !== undefined ? stored.resolved_revision?.own_images === true
|
|
69
56
|
: Array.isArray(stored.scene_images) && stored.scene_images.length > 0;
|
|
70
57
|
}
|
|
71
|
-
/** Object metadata key that says whether the tag is in the file: a reader learns it without the bytes. */
|
|
72
58
|
export const AI_DISCLOSURE_EMBEDDED_METADATA_KEY = "ai-disclosure-embedded";
|
|
73
|
-
/** Storage object metadata of a delivery, one builder so every writer shares the keys. Weaker */
|
|
74
|
-
/** than an embedded tag (lost on re-save), but always set, without parsing MP4 boxes. */
|
|
75
59
|
export function aiDisclosureObjectMetadata(text, embedded) {
|
|
76
60
|
return { "ai-generated": "true", generator: "clipwright", "ai-disclosure": text,
|
|
77
61
|
...(embedded === undefined ? {} : { [AI_DISCLOSURE_EMBEDDED_METADATA_KEY]: String(embedded) }) };
|
|
78
62
|
}
|
|
79
|
-
/** The metadata of a video with a presenter. */
|
|
80
63
|
export const AI_DISCLOSURE_OBJECT_METADATA = aiDisclosureObjectMetadata(AI_DISCLOSURE_TEXT);
|
|
81
|
-
/** Run id shape, a separate schema because INPUT asks for it too: the MCP `get_run` tool, */
|
|
82
|
-
/** where a bare `z.string()` let garbage reach the network. */
|
|
83
64
|
export const runId = z.string().regex(/^run_[a-zA-Z0-9]+$/);
|
|
84
|
-
/** A shot candidate's family and unit. The mode and take come from the stored input and are `null` once it is redacted; */
|
|
85
|
-
/** the preview and `usable_until` are `null` until its unit is published, and the preview again once its media are gone. */
|
|
86
65
|
export const runCandidate = z.object({
|
|
87
66
|
source_run_id: runId, root_run_id: runId, shot_id: shotId,
|
|
88
67
|
kind: z.enum(["picture", "clip"]),
|
|
@@ -91,7 +70,6 @@ export const runCandidate = z.object({
|
|
|
91
70
|
preview_url: z.string().url().nullable(),
|
|
92
71
|
usable_until: z.string().datetime().nullable(),
|
|
93
72
|
});
|
|
94
|
-
/** Where a drawn element of a delivered run came from: a library kind, or a graphic made for this run (#1107). */
|
|
95
73
|
export const RUN_ELEMENT_ORIGINS = ["library", "generated"];
|
|
96
74
|
export const runElement = z.object({ id: z.string().min(1).max(64), kind: z.string().min(1).max(64), origin: z.enum(RUN_ELEMENT_ORIGINS) }).strict();
|
|
97
75
|
export const run = z.object({
|
|
@@ -101,26 +79,19 @@ export const run = z.object({
|
|
|
101
79
|
state: runState,
|
|
102
80
|
credits_reserved: z.number().int().nonnegative(),
|
|
103
81
|
credits_charged: z.number().int().nonnegative().nullable(),
|
|
104
|
-
/** The account's balance right after this run's charge was settled, read in the settling transaction; `null` until then. */
|
|
105
82
|
balance_after_credits: z.number().int().nullable().optional(),
|
|
106
83
|
billing_terms: faceBillingAdmissionTermsSchema.optional(),
|
|
107
84
|
faceless_billing: facelessRunBilling.optional(),
|
|
108
|
-
/** A revision of another run: its family, the credits held at admission, and its frozen price (`null` once redacted). */
|
|
109
85
|
revision: z.object({
|
|
110
86
|
source_run_id: runId, root_run_id: runId,
|
|
111
87
|
quoted_credits: z.number().int().nonnegative(),
|
|
112
88
|
billing: revisionBilling.nullable(),
|
|
113
89
|
}).optional(),
|
|
114
|
-
/** A shot candidate (`edit_shot`): told by its lineage row; its `final_output` is always `null`. */
|
|
115
90
|
candidate: runCandidate.optional(),
|
|
116
|
-
/** A single generation (`generate_image`, `generate_video`): its delivered file; its `final_output` is always `null`. */
|
|
117
91
|
generation: runGeneration.optional(),
|
|
118
92
|
resolved_broll_policy: brollPolicy.optional(),
|
|
119
93
|
warnings: z.array(z.string()).default([]),
|
|
120
|
-
/** The reason. A non-empty `error` does NOT imply `state: "failed"`: on a non-terminal */
|
|
121
|
-
/** run it explains a delay awaiting human review, and such a run will not finish by itself. */
|
|
122
94
|
error: z.string().nullable(),
|
|
123
|
-
/** The result of a `create_actor` run; absent on `make_ugc`, whose result is `final_output`. */
|
|
124
95
|
created_actor: createdActor.optional(),
|
|
125
96
|
final_output: z
|
|
126
97
|
.object({
|
|
@@ -131,61 +102,40 @@ export const run = z.object({
|
|
|
131
102
|
character_id: z.string().optional(),
|
|
132
103
|
duration_seconds: z.number().positive(),
|
|
133
104
|
long_form_billing: longFormBillingSummarySchema.optional(),
|
|
134
|
-
/** A long-form video on a parts tariff (#800): its charge by part. */
|
|
135
105
|
parts_billing: partsBillingSummarySchema.optional(),
|
|
136
106
|
face_duration_seconds: z.number().nonnegative().optional(),
|
|
137
107
|
full_speech_duration_seconds: z.number().positive().optional(),
|
|
138
108
|
face_credits_per_second: z.number().int().positive().optional(),
|
|
139
109
|
face_tariff_id: z.string().min(1).optional(),
|
|
140
110
|
speech_timing_gaps: speechRhythmResult.optional(),
|
|
141
|
-
/** REQUIRED disclosure fields: an optional one could be forgotten and the clip ship */
|
|
142
|
-
/** unmarked, while `z.literal(true)` makes `run.parse` fail on our side first. */
|
|
143
111
|
ai_generated: z.literal(true),
|
|
144
112
|
ai_disclosure: z.string().min(1),
|
|
145
|
-
/** Three formats, not one: requested, sent to the vendor and final. Set only on the */
|
|
146
|
-
/** composition path; without it the vendor file is returned as is. */
|
|
147
113
|
requested_aspect_ratio: z.string().optional(),
|
|
148
114
|
vendor_aspect_ratio: z.string().optional(),
|
|
149
115
|
final_aspect_ratio: z.string().optional(),
|
|
150
|
-
/** How the clip was fitted into the frame: `exact` or a background mode. */
|
|
151
116
|
composition_policy: z.string().optional(),
|
|
152
|
-
/** Each drawn template and scene with its origin; one left out is in `warnings[]`, not here. */
|
|
153
117
|
elements: z.array(runElement).max(64).optional(),
|
|
154
|
-
/** A done-for-you explainer's lines to publish with it; the video is delivered and charged the same without them. */
|
|
155
118
|
post_text: postText.optional(),
|
|
156
119
|
})
|
|
157
120
|
.nullable(),
|
|
158
|
-
/** A succeeded video's measured frame in pixels; absent when its file was not measured, never taken from the request. */
|
|
159
121
|
video: runVideo.optional(),
|
|
160
122
|
steps: z.array(runStep).default([]),
|
|
161
123
|
created_at: z.string().datetime(),
|
|
162
124
|
finished_at: z.string().datetime().nullable(),
|
|
163
125
|
});
|
|
164
|
-
/** Terminal run states as shared constants, the single source of truth about completion, */
|
|
165
|
-
/** instead of string literals repeated across consumers. */
|
|
166
126
|
export const SUCCEEDED_STATE = "succeeded";
|
|
167
127
|
export const FAILED_STATE = "failed";
|
|
168
|
-
// Consumers tell outcomes apart ONLY through the named constants above: a positional
|
|
169
|
-
// `TERMINAL_STATES[1]` would silently invert success and failure on reorder.
|
|
170
128
|
export const TERMINAL_STATES = [SUCCEEDED_STATE, FAILED_STATE];
|
|
171
|
-
/** Tolerant READ projection: only `state` is loosened to `z.string()`, everything else is */
|
|
172
|
-
/** inherited via `run.extend`, so a new server stage does not break installed clients. */
|
|
173
129
|
export const runRead = run.extend({ state: z.string() });
|
|
174
130
|
export const RUN_MONEY_FIELDS = Object.keys(run.shape).filter((field) => field.startsWith("credits_") || field === "balance_after_credits");
|
|
175
|
-
/** A run's money fields as one object, for surfaces that build their own response. */
|
|
176
131
|
export function runMoney(read) {
|
|
177
132
|
return Object.fromEntries(RUN_MONEY_FIELDS.map((field) => [field, read[field]]));
|
|
178
133
|
}
|
|
179
|
-
/** Whether a run is terminal. Takes a `string` (the read projection), so an unknown */
|
|
180
|
-
/** status from an extended enum correctly gives `false`. */
|
|
181
134
|
export function isTerminal(state) {
|
|
182
135
|
return TERMINAL_STATES.includes(state);
|
|
183
136
|
}
|
|
184
|
-
/** The longest `GET /v1/runs/{id}` holds its answer (#1036), inside an agent's usual 60 s tool timeout. */
|
|
185
137
|
export const RUN_WAIT_MAX_SECONDS = 50;
|
|
186
|
-
/** The query of `GET /v1/runs/{id}`; other query fields stay ignored, as they were before it had one. */
|
|
187
138
|
export const runQuery = z.object({
|
|
188
139
|
wait_seconds: z.coerce.number().int().min(0).max(RUN_WAIT_MAX_SECONDS).optional()
|
|
189
140
|
.describe(`Wait up to this many seconds (at most ${RUN_WAIT_MAX_SECONDS}) for the run to succeed or fail before answering.`),
|
|
190
141
|
});
|
|
191
|
-
//# sourceMappingURL=runs.js.map
|
package/dist/scene-bible.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** One scene for a whole video (#1491): written once, every live shot is drawn in it. */
|
|
3
2
|
export declare const MAX_SCENE_TEXT = 400;
|
|
4
3
|
export declare const MAX_SCENE_PROPS = 6;
|
|
5
4
|
export declare const MAX_SHOT_START = 400;
|
|
@@ -18,14 +17,11 @@ export declare const sceneBible: z.ZodObject<{
|
|
|
18
17
|
}, z.core.$strict>;
|
|
19
18
|
export type SceneBible = z.infer<typeof sceneBible>;
|
|
20
19
|
export declare const SCENE_DESCRIPTION: string;
|
|
21
|
-
/** A live shot's first frame (#1491), described as what is visible, like the scene. */
|
|
22
20
|
export declare const shotStart: z.ZodString;
|
|
23
|
-
/** make_faceless reads the same scene (#1491 S7); its posture is the main character's, and a video with no one in it leaves it out. */
|
|
24
21
|
export declare const FACELESS_SCENE_DESCRIPTION: string;
|
|
25
22
|
export declare const SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available right now; omit scene and each shot's start";
|
|
26
23
|
export declare const FACELESS_SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available on make_faceless right now; omit scene";
|
|
27
24
|
export declare const SCENE_UNUSED_WARNING = "scene has no effect on this video: it has no live shots";
|
|
28
|
-
/** Server-only: admission freezes the run's direction here, and a public body naming it is refused as an unknown field. */
|
|
29
25
|
export declare const sceneDirectionMark: z.ZodObject<{
|
|
30
26
|
mode: z.ZodLiteral<"complete">;
|
|
31
27
|
proposal: z.ZodOptional<z.ZodObject<{
|
|
@@ -36,11 +32,23 @@ export declare const sceneDirectionMark: z.ZodObject<{
|
|
|
36
32
|
knowledge: z.ZodOptional<z.ZodLiteral<"ugc_ad">>;
|
|
37
33
|
}, z.core.$strict>;
|
|
38
34
|
export type SceneDirectionMark = z.infer<typeof sceneDirectionMark>;
|
|
39
|
-
|
|
35
|
+
export declare const runSpeech: z.ZodObject<{
|
|
36
|
+
mode: z.ZodEnum<{
|
|
37
|
+
on_camera: "on_camera";
|
|
38
|
+
voice_over: "voice_over";
|
|
39
|
+
}>;
|
|
40
|
+
hook: z.ZodEnum<{
|
|
41
|
+
silent: "silent";
|
|
42
|
+
spoken: "spoken";
|
|
43
|
+
}>;
|
|
44
|
+
why: z.ZodString;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export type RunSpeech = z.infer<typeof runSpeech>;
|
|
47
|
+
export declare const speechActions: z.ZodArray<z.ZodString>;
|
|
48
|
+
export declare function speechActionsOf(storedInput: unknown): ReadonlySet<string>;
|
|
49
|
+
export declare function runSpeechOf(storedInput: unknown): RunSpeech | undefined;
|
|
40
50
|
export declare function sceneDirectorAccounts(env: Record<string, string | undefined>): "all" | ReadonlySet<string> | null;
|
|
41
|
-
/** An account switch's value read one way: `1` every account, a comma list of account ids only those, anything else nobody. */
|
|
42
51
|
export declare function listedAccounts(raw: string | undefined): "all" | ReadonlySet<string> | null;
|
|
43
|
-
/** Whether the run asks for direction by a field of its own: the scene or any shot's start. */
|
|
44
52
|
export declare function asksSceneDirection(input: {
|
|
45
53
|
scene?: unknown;
|
|
46
54
|
shots?: readonly {
|
package/dist/scene-bible.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { negationIn } from "./generation-shot.js";
|
|
3
|
-
/** One scene for a whole video (#1491): written once, every live shot is drawn in it. */
|
|
4
3
|
export const MAX_SCENE_TEXT = 400;
|
|
5
4
|
export const MAX_SCENE_PROPS = 6;
|
|
6
5
|
export const MAX_SHOT_START = 400;
|
|
@@ -31,32 +30,40 @@ export const sceneBible = z.strictObject({
|
|
|
31
30
|
export const SCENE_DESCRIPTION = "One scene for the whole video, written once: where it happens, how the presenter stands or sits, what " +
|
|
32
31
|
"they wear, how the product looks, the props and the light. The presenter and every live shot of the video are drawn in it; a presenter " +
|
|
33
32
|
"photo of your own (image) is kept as it is. Omitted, one is written from the script and the presenter's picture; free.";
|
|
34
|
-
/** A live shot's first frame (#1491), described as what is visible, like the scene. */
|
|
35
33
|
export const shotStart = sceneText(MAX_SHOT_START).superRefine((text, context) => {
|
|
36
34
|
const word = negationIn(text);
|
|
37
35
|
if (word)
|
|
38
36
|
context.addIssue({ code: z.ZodIssueCode.custom, message: absentMessage(word) });
|
|
39
37
|
}).describe("talking_action and action: the first frame, where the actor is and what they hold as the shot begins; omitted, written from " +
|
|
40
38
|
"the scene and the action.");
|
|
41
|
-
/** make_faceless reads the same scene (#1491 S7); its posture is the main character's, and a video with no one in it leaves it out. */
|
|
42
39
|
export const FACELESS_SCENE_DESCRIPTION = "One scene for the whole video, written once: where it happens, how the main character stands or " +
|
|
43
40
|
"sits, what they wear, how the product looks, the props and the light. Every picture and moving clip of the video is drawn in it; with " +
|
|
44
41
|
"format explainer, the film's scenes are set in it. Omitted, a picture video gets one written with its story; free.";
|
|
45
42
|
export const SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available right now; omit scene and each shot's start";
|
|
46
43
|
export const FACELESS_SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available on make_faceless right now; omit scene";
|
|
47
44
|
export const SCENE_UNUSED_WARNING = "scene has no effect on this video: it has no live shots";
|
|
48
|
-
/** Server-only: admission freezes the run's direction here, and a public body naming it is refused as an unknown field. */
|
|
49
45
|
export const sceneDirectionMark = z.strictObject({ mode: z.literal("complete"),
|
|
50
|
-
/** A run made from an accepted quote proposal (#1491 S6): what was proposed, by digest, and what was picked. */
|
|
51
46
|
proposal: z.strictObject({ id: z.string().regex(/^sp_[a-z0-9]{20}$/), content_digest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
52
47
|
accepted: z.array(z.string().regex(/^o[1-9][0-9]?$/)).max(12) }).optional(),
|
|
53
|
-
/** Set by admission when the run is directed as an ad (#1539); absent, it is directed as before. */
|
|
54
48
|
knowledge: z.literal("ugc_ad").optional() });
|
|
55
|
-
|
|
49
|
+
export const runSpeech = z.strictObject({ mode: z.enum(["on_camera", "voice_over"]), hook: z.enum(["spoken", "silent"]),
|
|
50
|
+
why: z.string().min(1).max(300) });
|
|
51
|
+
export const speechActions = z.array(z.string().min(1).max(64)).max(60);
|
|
52
|
+
export function speechActionsOf(storedInput) {
|
|
53
|
+
if (storedInput === null || typeof storedInput !== "object")
|
|
54
|
+
return new Set();
|
|
55
|
+
const parsed = speechActions.safeParse(storedInput.speech_actions);
|
|
56
|
+
return new Set(parsed.success ? parsed.data : []);
|
|
57
|
+
}
|
|
58
|
+
export function runSpeechOf(storedInput) {
|
|
59
|
+
if (storedInput === null || typeof storedInput !== "object")
|
|
60
|
+
return undefined;
|
|
61
|
+
const parsed = runSpeech.safeParse(storedInput.speech);
|
|
62
|
+
return parsed.success ? parsed.data : undefined;
|
|
63
|
+
}
|
|
56
64
|
export function sceneDirectorAccounts(env) {
|
|
57
65
|
return listedAccounts(env.CLIPWRIGHT_SCENE_DIRECTOR);
|
|
58
66
|
}
|
|
59
|
-
/** An account switch's value read one way: `1` every account, a comma list of account ids only those, anything else nobody. */
|
|
60
67
|
export function listedAccounts(raw) {
|
|
61
68
|
const value = raw?.trim();
|
|
62
69
|
if (value === "1")
|
|
@@ -64,8 +71,6 @@ export function listedAccounts(raw) {
|
|
|
64
71
|
const ids = (value ?? "").split(",").map(id => id.trim()).filter(id => /^acc_[A-Za-z0-9_-]+$/.test(id));
|
|
65
72
|
return ids.length ? new Set(ids) : null;
|
|
66
73
|
}
|
|
67
|
-
/** Whether the run asks for direction by a field of its own: the scene or any shot's start. */
|
|
68
74
|
export function asksSceneDirection(input) {
|
|
69
75
|
return input.scene !== undefined || (input.shots ?? []).some(shot => shot.start !== undefined);
|
|
70
76
|
}
|
|
71
|
-
//# sourceMappingURL=scene-bible.js.map
|
package/dist/scene-graph.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare const MAX_SCENE_SECONDS = 30;
|
|
|
4
4
|
export declare const MAX_SCENE_NODES = 200;
|
|
5
5
|
export declare const MAX_SCENE_DEPTH = 4;
|
|
6
6
|
export declare const SCENE_FPS: readonly [24, 25, 30];
|
|
7
|
-
/** Families a scene may name, with the faces each one has; anything else is refused before render. */
|
|
8
7
|
export declare const SCENE_FONTS: Readonly<Record<string, {
|
|
9
8
|
weights: readonly number[];
|
|
10
9
|
italic: boolean;
|
|
@@ -13,7 +12,6 @@ export declare const SCENE_EASINGS: readonly ["linear", "in", "out", "inOut", "b
|
|
|
13
12
|
export declare const SCENE_NUMBER_PROPS: readonly ["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "draw", "blur", "radius", "rotateX", "rotateY"];
|
|
14
13
|
export declare const SCENE_COLOR_PROPS: readonly ["fill", "stroke", "color"];
|
|
15
14
|
export declare const SCENE_NODE_TYPES: readonly ["rect", "ellipse", "path", "text", "image", "group"];
|
|
16
|
-
/** How a text shows over its window: characters typed, words one by one, `from` erased then the text typed, or glyphs settling into the text. */
|
|
17
15
|
export declare const SCENE_REVEALS: readonly ["type", "words", "swap", "scramble"];
|
|
18
16
|
declare const keyframeSchema: z.ZodObject<{
|
|
19
17
|
t: z.ZodNumber;
|
|
@@ -497,7 +495,6 @@ export interface SceneGroup {
|
|
|
497
495
|
rotateY?: number | undefined;
|
|
498
496
|
children: SceneNode[];
|
|
499
497
|
}
|
|
500
|
-
/** The viewing distance a tilted group is seen from, in canvas pixels (#1175 S5 C5). */
|
|
501
498
|
export declare const SCENE_PERSPECTIVE_PX = 1600;
|
|
502
499
|
export type SceneNode = SceneRect | SceneEllipse | ScenePath | SceneText | SceneImage | SceneGroup;
|
|
503
500
|
export declare const sceneGraphSchema: z.ZodObject<{
|
|
@@ -516,12 +513,9 @@ export declare const sceneGraphSchema: z.ZodObject<{
|
|
|
516
513
|
nodes: z.ZodArray<z.ZodType<SceneNode, unknown, z.core.$ZodTypeInternals<SceneNode, unknown>>>;
|
|
517
514
|
}, z.core.$strict>;
|
|
518
515
|
export type SceneGraph = z.infer<typeof sceneGraphSchema>;
|
|
519
|
-
/** Smallest legible text on a canvas, in canvas pixels: 20 px on a 1920-tall frame. */
|
|
520
516
|
export declare const minSceneTextPx: (canvas: {
|
|
521
517
|
height: number;
|
|
522
518
|
}) => number;
|
|
523
|
-
/** Where a scene draws, in shares of its canvas: every shape it ever shows, at its first and its resting pose, cut to the canvas; null when it shows */
|
|
524
|
-
/** nothing. Captions meet a scene drawn over the presenter by this box. */
|
|
525
519
|
export declare function sceneGraphFootprint(scene: SceneGraph): {
|
|
526
520
|
left: number;
|
|
527
521
|
top: number;
|
|
@@ -536,19 +530,13 @@ export type SceneGraphValidation = {
|
|
|
536
530
|
ok: false;
|
|
537
531
|
errors: string[];
|
|
538
532
|
};
|
|
539
|
-
/** The brand teal; a purple a scene may not keep turns to its hue. */
|
|
540
533
|
export declare const SCENE_BRAND_TEAL = "#1385A3";
|
|
541
|
-
/** Blue-violet to magenta: refused unless the customer's own colours hold one. */
|
|
542
534
|
export declare const SCENE_PURPLE_HUES: readonly [230, 335];
|
|
543
|
-
/** Whether a #RRGGBB(AA) colour is a chromatic purple by hue; greys of any tint are not. */
|
|
544
535
|
export declare function isScenePurple(colour: string): boolean;
|
|
545
|
-
/** Turns every purple colour of a scene, parsed or not, to the brand teal's hue; returns the colours it changed. */
|
|
546
536
|
export declare function repairScenePurple<T>(input: T): {
|
|
547
537
|
scene: T;
|
|
548
538
|
repaired: string[];
|
|
549
539
|
};
|
|
550
|
-
/** Parse, then check what the schema cannot: unique ids, timing inside the scene, fonts, text size, canvas bounds and purple.
|
|
551
|
-
* Errors are written to be fed back to the author; `allowPurple` only when the customer's own colours hold a purple. */
|
|
552
540
|
export declare function validateSceneGraph(input: unknown, options?: {
|
|
553
541
|
allowPurple?: boolean;
|
|
554
542
|
}): SceneGraphValidation;
|
package/dist/scene-graph.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
// A declarative motion-graphics scene: one fixed renderer draws it, so a scene is data and never code.
|
|
3
2
|
export const SCENE_GRAPH_VERSION = "scene-graph-v1";
|
|
4
3
|
export const MAX_SCENE_SECONDS = 30;
|
|
5
4
|
export const MAX_SCENE_NODES = 200;
|
|
6
5
|
export const MAX_SCENE_DEPTH = 4;
|
|
7
6
|
export const SCENE_FPS = [24, 25, 30];
|
|
8
|
-
/** Families a scene may name, with the faces each one has; anything else is refused before render. */
|
|
9
7
|
export const SCENE_FONTS = {
|
|
10
8
|
Inter: { weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: true },
|
|
11
9
|
Poppins: { weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: true },
|
|
@@ -23,7 +21,6 @@ export const SCENE_NUMBER_PROPS = ["x", "y", "opacity", "scale", "scaleX", "scal
|
|
|
23
21
|
"rotateX", "rotateY"];
|
|
24
22
|
export const SCENE_COLOR_PROPS = ["fill", "stroke", "color"];
|
|
25
23
|
export const SCENE_NODE_TYPES = ["rect", "ellipse", "path", "text", "image", "group"];
|
|
26
|
-
/** How a text shows over its window: characters typed, words one by one, `from` erased then the text typed, or glyphs settling into the text. */
|
|
27
24
|
export const SCENE_REVEALS = ["type", "words", "swap", "scramble"];
|
|
28
25
|
const hex = z.string().regex(/^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, "a colour is #RRGGBB or #RRGGBBAA");
|
|
29
26
|
const seconds = z.number().min(0).max(MAX_SCENE_SECONDS);
|
|
@@ -52,7 +49,6 @@ const base = {
|
|
|
52
49
|
to_s: seconds.optional(),
|
|
53
50
|
anim: z.array(trackSchema).max(16).optional(),
|
|
54
51
|
shadow: shadowSchema.optional(),
|
|
55
|
-
/** Motion blur along the node's own x and y movement (#1175 S5 C7): this share of the pixels it moves in a frame, 1 a frame's travel. */
|
|
56
52
|
smear: z.number().min(0).max(2).optional(),
|
|
57
53
|
};
|
|
58
54
|
const stroke = { stroke: hex.optional(), strokeWidth: z.number().min(0).max(200).optional() };
|
|
@@ -62,7 +58,6 @@ const ellipseSchema = z.object({ ...base, type: z.literal("ellipse"), width: siz
|
|
|
62
58
|
const pathSchema = z.object({
|
|
63
59
|
...base, type: z.literal("path"), width: size, height: size, d: pathData, fill: hex.optional(), ...stroke,
|
|
64
60
|
lineCap: z.enum(["butt", "round", "square"]).optional(), lineJoin: z.enum(["miter", "round", "bevel"]).optional(), draw: unit.optional(),
|
|
65
|
-
// The shape bends into `d` over the window (#1175 S5 C4), in the node's own coordinates as its first `d`.
|
|
66
61
|
morph: z.object({ d: pathData, from_s: seconds, to_s: seconds, ease: z.enum(SCENE_EASINGS).optional() }).strict().optional(),
|
|
67
62
|
}).strict();
|
|
68
63
|
const fontSchema = z.object({ family: z.string().min(1).max(60), weight: z.number().int().min(100).max(1000), italic: z.boolean().optional() }).strict();
|
|
@@ -79,7 +74,6 @@ const textSchema = z.object({
|
|
|
79
74
|
const imageSchema = z.object({
|
|
80
75
|
...base, type: z.literal("image"), width: size, height: size, src: id, fit: z.enum(["cover", "contain"]).optional(), radius: size.optional(),
|
|
81
76
|
}).strict();
|
|
82
|
-
/** The viewing distance a tilted group is seen from, in canvas pixels (#1175 S5 C5). */
|
|
83
77
|
export const SCENE_PERSPECTIVE_PX = 1600;
|
|
84
78
|
const tilt = z.number().min(-80).max(80);
|
|
85
79
|
const groupSchema = z.lazy(() => z.object({
|
|
@@ -98,9 +92,7 @@ export const sceneGraphSchema = z.object({
|
|
|
98
92
|
assets: z.array(z.object({ id, note: z.string().max(200).optional() }).strict()).max(20).optional(),
|
|
99
93
|
nodes: z.array(nodeSchema).min(1).max(MAX_SCENE_NODES),
|
|
100
94
|
}).strict();
|
|
101
|
-
/** Smallest legible text on a canvas, in canvas pixels: 20 px on a 1920-tall frame. */
|
|
102
95
|
export const minSceneTextPx = (canvas) => Math.ceil(canvas.height / 96);
|
|
103
|
-
/** Props each node type may animate; a colour prop takes #RRGGBB values, every other a number. */
|
|
104
96
|
const ANIMATABLE = {
|
|
105
97
|
rect: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "radius", "fill", "stroke"]),
|
|
106
98
|
ellipse: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "fill", "stroke"]),
|
|
@@ -110,16 +102,13 @@ const ANIMATABLE = {
|
|
|
110
102
|
group: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "radius", "rotateX", "rotateY"]),
|
|
111
103
|
};
|
|
112
104
|
const COLOR_PROPS = new Set(SCENE_COLOR_PROPS);
|
|
113
|
-
/** Average advance of a glyph as a share of the font size; the renderer measures, this only bounds the check. */
|
|
114
105
|
const glyphShare = (family) => (family === "JetBrains Mono" ? 0.6 : family === "Caveat" ? 0.42 : 0.55);
|
|
115
|
-
/** A node's resting value of a prop: its last keyframe, or the static value. */
|
|
116
106
|
function rest(node, prop, fallback) {
|
|
117
107
|
const keys = node.anim?.find(track => track.prop === prop)?.keys;
|
|
118
108
|
const last = keys?.[keys.length - 1]?.v;
|
|
119
109
|
return typeof last === "number" ? last : fallback;
|
|
120
110
|
}
|
|
121
111
|
function ownSize(node) {
|
|
122
|
-
// A swap shows its erased words first, so the longer of the two is measured.
|
|
123
112
|
if (node.type === "text" && node.reveal?.from !== undefined && node.reveal.from.length > node.text.length)
|
|
124
113
|
return ownSize({ ...node, text: node.reveal.from, reveal: undefined });
|
|
125
114
|
if (node.type === "text") {
|
|
@@ -134,8 +123,6 @@ function ownSize(node) {
|
|
|
134
123
|
return node.width !== undefined && node.height !== undefined ? { width: rest(node, "width", node.width), height: rest(node, "height", node.height) } : null;
|
|
135
124
|
return { width: rest(node, "width", node.width), height: rest(node, "height", node.height) };
|
|
136
125
|
}
|
|
137
|
-
/** Where a scene draws, in shares of its canvas: every shape it ever shows, at its first and its resting pose, cut to the canvas; null when it shows */
|
|
138
|
-
/** nothing. Captions meet a scene drawn over the presenter by this box. */
|
|
139
126
|
export function sceneGraphFootprint(scene) {
|
|
140
127
|
const { width: W, height: H } = scene.canvas;
|
|
141
128
|
let left = W, top = H, right = 0, bottom = 0;
|
|
@@ -151,7 +138,6 @@ export function sceneGraphFootprint(scene) {
|
|
|
151
138
|
const scale = origin.scale * at(node, "scale", node.scale ?? 1, last), own = ownSize(node), [ax, ay] = node.anchor ?? [0, 0];
|
|
152
139
|
const x = origin.x + origin.scale * at(node, "x", node.x, last) - ax * (own?.width ?? 0) * scale;
|
|
153
140
|
const y = origin.y + origin.scale * at(node, "y", node.y, last) - ay * (own?.height ?? 0) * scale;
|
|
154
|
-
// A group draws nothing of its own: only its children mark the frame.
|
|
155
141
|
if (node.type === "group") {
|
|
156
142
|
for (const child of node.children)
|
|
157
143
|
visit(child, { x, y, scale }, last);
|
|
@@ -169,9 +155,7 @@ export function sceneGraphFootprint(scene) {
|
|
|
169
155
|
visit(node, { x: 0, y: 0, scale: 1 }, last);
|
|
170
156
|
return right > left && bottom > top ? { left: left / W, top: top / H, width: (right - left) / W, height: (bottom - top) / H } : null;
|
|
171
157
|
}
|
|
172
|
-
/** The brand teal; a purple a scene may not keep turns to its hue. */
|
|
173
158
|
export const SCENE_BRAND_TEAL = "#1385A3";
|
|
174
|
-
/** Blue-violet to magenta: refused unless the customer's own colours hold one. */
|
|
175
159
|
export const SCENE_PURPLE_HUES = [230, 335];
|
|
176
160
|
const channels = (colour) => [1, 3, 5].map(at => Number.parseInt(colour.slice(at, at + 2), 16) / 255);
|
|
177
161
|
function hsl(colour) {
|
|
@@ -179,7 +163,6 @@ function hsl(colour) {
|
|
|
179
163
|
const h = d === 0 ? 0 : 60 * (max === r ? ((g - b) / d + 6) % 6 : max === g ? (b - r) / d + 2 : (r - g) / d + 4);
|
|
180
164
|
return { h, s: d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1)), l };
|
|
181
165
|
}
|
|
182
|
-
/** Whether a #RRGGBB(AA) colour is a chromatic purple by hue; greys of any tint are not. */
|
|
183
166
|
export function isScenePurple(colour) {
|
|
184
167
|
const [r, g, b] = channels(colour);
|
|
185
168
|
if (Math.max(r, g, b) - Math.min(r, g, b) < 0.15)
|
|
@@ -187,15 +170,12 @@ export function isScenePurple(colour) {
|
|
|
187
170
|
const { h } = hsl(colour);
|
|
188
171
|
return h >= SCENE_PURPLE_HUES[0] && h <= SCENE_PURPLE_HUES[1];
|
|
189
172
|
}
|
|
190
|
-
/** The colour on the brand teal's hue at its own saturation and lightness, alpha kept. */
|
|
191
173
|
function toTeal(colour) {
|
|
192
174
|
const { s, l } = hsl(colour), h = hsl(SCENE_BRAND_TEAL).h / 60, c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs((h % 2) - 1)), m = l - c / 2;
|
|
193
175
|
const [r, g, b] = h < 1 ? [c, x, 0] : h < 2 ? [x, c, 0] : h < 3 ? [0, c, x] : h < 4 ? [0, x, c] : h < 5 ? [x, 0, c] : [c, 0, x];
|
|
194
176
|
return `#${[r, g, b].map(v => Math.round((v + m) * 255).toString(16).padStart(2, "0")).join("").toUpperCase()}${colour.slice(7)}`;
|
|
195
177
|
}
|
|
196
|
-
/** Every key a scene draws a colour under, anywhere: fills, strokes, text, box and shadow colours, the ground, colour keyframes. */
|
|
197
178
|
const COLOUR_KEYS = new Set(["fill", "stroke", "color", "background", "v"]);
|
|
198
|
-
/** Maps each drawn colour of a scene, parsed or not; the purple check and the repair both walk it, so they cannot disagree. */
|
|
199
179
|
function mapColours(value, turn, key) {
|
|
200
180
|
if (Array.isArray(value))
|
|
201
181
|
return value.map(item => mapColours(item, turn));
|
|
@@ -203,15 +183,12 @@ function mapColours(value, turn, key) {
|
|
|
203
183
|
return Object.fromEntries(Object.entries(value).map(([name, item]) => [name, mapColours(item, turn, name)]));
|
|
204
184
|
return typeof value === "string" && key && COLOUR_KEYS.has(key) && /^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value) ? turn(value) : value;
|
|
205
185
|
}
|
|
206
|
-
/** Turns every purple colour of a scene, parsed or not, to the brand teal's hue; returns the colours it changed. */
|
|
207
186
|
export function repairScenePurple(input) {
|
|
208
187
|
const repaired = new Set();
|
|
209
188
|
const scene = mapColours(input, colour => { if (!isScenePurple(colour))
|
|
210
189
|
return colour; repaired.add(colour); return toTeal(colour); });
|
|
211
190
|
return { scene, repaired: [...repaired] };
|
|
212
191
|
}
|
|
213
|
-
/** Parse, then check what the schema cannot: unique ids, timing inside the scene, fonts, text size, canvas bounds and purple.
|
|
214
|
-
* Errors are written to be fed back to the author; `allowPurple` only when the customer's own colours hold a purple. */
|
|
215
192
|
export function validateSceneGraph(input, options = {}) {
|
|
216
193
|
const parsed = sceneGraphSchema.safeParse(input);
|
|
217
194
|
if (!parsed.success) {
|
|
@@ -328,4 +305,3 @@ export function validateSceneGraph(input, options = {}) {
|
|
|
328
305
|
}
|
|
329
306
|
return errors.length ? { ok: false, errors } : { ok: true, scene, warnings };
|
|
330
307
|
}
|
|
331
|
-
//# sourceMappingURL=scene-graph.js.map
|