@adminide-stack/yantra-mobile 12.0.160-alpha.1 → 12.0.160
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/lib/assets/channels/lucy.jpg +0 -0
- package/lib/components/GatewayConnector/GatewayConnector.js +3 -2
- package/lib/components/GatewayConnector/GatewayConnector.js.map +1 -1
- package/lib/components/GatewayToolbarButtonMobile.js +4 -2
- package/lib/components/GatewayToolbarButtonMobile.js.map +1 -1
- package/lib/components/NavigationHeader/HeaderMoreMenu.js +2 -1
- package/lib/components/NavigationHeader/HeaderMoreMenu.js.map +1 -1
- package/lib/components/NavigationHeader/NavigationHeader.js +13 -11
- package/lib/components/NavigationHeader/NavigationHeader.js.map +1 -1
- package/lib/features/attachments/ComposerAttachMenu.js +15 -6
- package/lib/features/attachments/ComposerAttachMenu.js.map +1 -1
- package/lib/features/canvas/AudioEditorExperience.js +44 -1
- package/lib/features/canvas/AudioEditorExperience.js.map +1 -1
- package/lib/features/canvas/CanvasAppsPanel.js +240 -0
- package/lib/features/canvas/CanvasAppsPanel.js.map +1 -0
- package/lib/features/canvas/CanvasBoardsGrid.js +264 -803
- package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
- package/lib/features/canvas/CanvasEditToolsPanel.js +320 -66
- package/lib/features/canvas/CanvasEditToolsPanel.js.map +1 -1
- package/lib/features/canvas/CanvasExperience.js +366 -235
- package/lib/features/canvas/CanvasExperience.js.map +1 -1
- package/lib/features/canvas/CanvasGeneratePanel.js +437 -117
- package/lib/features/canvas/CanvasGeneratePanel.js.map +1 -1
- package/lib/features/canvas/CanvasLibrarySheet.js +218 -18
- package/lib/features/canvas/CanvasLibrarySheet.js.map +1 -1
- package/lib/features/canvas/CanvasLooksPanel.js +2 -2
- package/lib/features/canvas/CanvasLooksPanel.js.map +1 -1
- package/lib/features/canvas/CanvasTasksPanel.js +52 -12
- package/lib/features/canvas/CanvasTasksPanel.js.map +1 -1
- package/lib/features/canvas/CanvasTemplatesPanel.js +2 -2
- package/lib/features/canvas/CanvasTemplatesPanel.js.map +1 -1
- package/lib/features/canvas/CanvasToolDock.js +146 -37
- package/lib/features/canvas/CanvasToolDock.js.map +1 -1
- package/lib/features/canvas/DesignCategoryGallery.js +264 -7
- package/lib/features/canvas/DesignCategoryGallery.js.map +1 -1
- package/lib/features/canvas/NativeCanvasViewer.js +54 -7
- package/lib/features/canvas/NativeCanvasViewer.js.map +1 -1
- package/lib/features/canvas/SetStudioExperience.js +7 -5
- package/lib/features/canvas/SetStudioExperience.js.map +1 -1
- package/lib/features/canvas/VideoEditorExperience.js +9 -5
- package/lib/features/canvas/VideoEditorExperience.js.map +1 -1
- package/lib/features/canvas/VideoGeneratorExperience.js +295 -96
- package/lib/features/canvas/VideoGeneratorExperience.js.map +1 -1
- package/lib/features/canvas/appsCatalog.js +554 -0
- package/lib/features/canvas/appsCatalog.js.map +1 -0
- package/lib/features/canvas/boardActions.js +547 -0
- package/lib/features/canvas/boardActions.js.map +1 -0
- package/lib/features/canvas/boardHistory.js +264 -0
- package/lib/features/canvas/boardHistory.js.map +1 -0
- package/lib/features/canvas/canvasAgentChat.js +3 -2
- package/lib/features/canvas/canvasAgentChat.js.map +1 -1
- package/lib/features/canvas/canvasArtifacts.js +115 -0
- package/lib/features/canvas/canvasArtifacts.js.map +1 -0
- package/lib/features/canvas/canvasCore.js +5 -2
- package/lib/features/canvas/canvasCore.js.map +1 -1
- package/lib/features/canvas/canvasEditHistory.js +42 -0
- package/lib/features/canvas/canvasEditHistory.js.map +1 -0
- package/lib/features/canvas/canvasEditOps.js +27 -21
- package/lib/features/canvas/canvasEditOps.js.map +1 -1
- package/lib/features/canvas/canvasTasks.js +5 -4
- package/lib/features/canvas/canvasTasks.js.map +1 -1
- package/lib/features/canvas/canvasUi.js +9 -4
- package/lib/features/canvas/canvasUi.js.map +1 -1
- package/lib/features/canvas/catalogSearchIndex.js +271 -0
- package/lib/features/canvas/catalogSearchIndex.js.map +1 -0
- package/lib/features/canvas/characters/CharacterBuilder.js +331 -0
- package/lib/features/canvas/characters/CharacterBuilder.js.map +1 -0
- package/lib/features/canvas/characters/CharacterPicker.js +207 -0
- package/lib/features/canvas/characters/CharacterPicker.js.map +1 -0
- package/lib/features/canvas/characters/CharacterStudio.js +106 -0
- package/lib/features/canvas/characters/CharacterStudio.js.map +1 -0
- package/lib/features/canvas/characters/PhotoDumpTool.js +157 -0
- package/lib/features/canvas/characters/PhotoDumpTool.js.map +1 -0
- package/lib/features/canvas/characters/PhotoSlot.js +104 -0
- package/lib/features/canvas/characters/PhotoSlot.js.map +1 -0
- package/lib/features/canvas/characters/RunFooter.js +126 -0
- package/lib/features/canvas/characters/RunFooter.js.map +1 -0
- package/lib/features/canvas/characters/StoryFramesTool.js +245 -0
- package/lib/features/canvas/characters/StoryFramesTool.js.map +1 -0
- package/lib/features/canvas/characters/SubjectPicker.js +198 -0
- package/lib/features/canvas/characters/SubjectPicker.js.map +1 -0
- package/lib/features/canvas/characters/characterActions.js +364 -0
- package/lib/features/canvas/characters/characterActions.js.map +1 -0
- package/lib/features/canvas/characters/characterRuns.js +256 -0
- package/lib/features/canvas/characters/characterRuns.js.map +1 -0
- package/lib/features/canvas/characters/characterStore.js +137 -0
- package/lib/features/canvas/characters/characterStore.js.map +1 -0
- package/lib/features/canvas/characters/characterTools.js +33 -0
- package/lib/features/canvas/characters/characterTools.js.map +1 -0
- package/lib/features/canvas/characters/characterVocabulary.js +1138 -0
- package/lib/features/canvas/characters/characterVocabulary.js.map +1 -0
- package/lib/features/canvas/characters/charactersRpc.js +70 -0
- package/lib/features/canvas/characters/charactersRpc.js.map +1 -0
- package/lib/features/canvas/characters/photoDumpPacks.js +252 -0
- package/lib/features/canvas/characters/photoDumpPacks.js.map +1 -0
- package/lib/features/canvas/characters/placement.js +114 -0
- package/lib/features/canvas/characters/placement.js.map +1 -0
- package/lib/features/canvas/characters/storyboard.js +188 -0
- package/lib/features/canvas/characters/storyboard.js.map +1 -0
- package/lib/features/canvas/createTiles.js +16 -98
- package/lib/features/canvas/createTiles.js.map +1 -1
- package/lib/features/canvas/creditsOffer.js +21 -0
- package/lib/features/canvas/creditsOffer.js.map +1 -0
- package/lib/features/canvas/deepLinks.js.map +1 -1
- package/lib/features/canvas/designCatalog.js +6 -13
- package/lib/features/canvas/designCatalog.js.map +1 -1
- package/lib/features/canvas/editTools.js +122 -10
- package/lib/features/canvas/editTools.js.map +1 -1
- package/lib/features/canvas/editorControls.js +1 -1
- package/lib/features/canvas/elements/ElementForm.js +389 -0
- package/lib/features/canvas/elements/ElementForm.js.map +1 -0
- package/lib/features/canvas/elements/ElementMentionMenu.js +125 -0
- package/lib/features/canvas/elements/ElementMentionMenu.js.map +1 -0
- package/lib/features/canvas/elements/ElementThumb.js +23 -0
- package/lib/features/canvas/elements/ElementThumb.js.map +1 -0
- package/lib/features/canvas/elements/ElementsButton.js +55 -0
- package/lib/features/canvas/elements/ElementsButton.js.map +1 -0
- package/lib/features/canvas/elements/ElementsSheet.js +392 -0
- package/lib/features/canvas/elements/ElementsSheet.js.map +1 -0
- package/lib/features/canvas/elements/MentionedElements.js +159 -0
- package/lib/features/canvas/elements/MentionedElements.js.map +1 -0
- package/lib/features/canvas/elements/elementCopy.js +37 -0
- package/lib/features/canvas/elements/elementCopy.js.map +1 -0
- package/lib/features/canvas/elements/elementImages.js +66 -0
- package/lib/features/canvas/elements/elementImages.js.map +1 -0
- package/lib/features/canvas/elements/elementsStore.js +164 -0
- package/lib/features/canvas/elements/elementsStore.js.map +1 -0
- package/lib/features/canvas/elements/shotMentions.js +94 -0
- package/lib/features/canvas/elements/shotMentions.js.map +1 -0
- package/lib/features/canvas/elements/unicodeWords.js +13 -0
- package/lib/features/canvas/elements/unicodeWords.js.map +1 -0
- package/lib/features/canvas/elements/useElementMentions.js +94 -0
- package/lib/features/canvas/elements/useElementMentions.js.map +1 -0
- package/lib/features/canvas/elements/useGeneratorElements.js +83 -0
- package/lib/features/canvas/elements/useGeneratorElements.js.map +1 -0
- package/lib/features/canvas/elements/useSavedElements.js +170 -0
- package/lib/features/canvas/elements/useSavedElements.js.map +1 -0
- package/lib/features/canvas/enhance/AnimateControls.js +249 -0
- package/lib/features/canvas/enhance/AnimateControls.js.map +1 -0
- package/lib/features/canvas/enhance/ClipAudioControls.js +184 -0
- package/lib/features/canvas/enhance/ClipAudioControls.js.map +1 -0
- package/lib/features/canvas/enhance/ImageAiControls.js +293 -0
- package/lib/features/canvas/enhance/ImageAiControls.js.map +1 -0
- package/lib/features/canvas/enhance/MediaSlot.js +220 -0
- package/lib/features/canvas/enhance/MediaSlot.js.map +1 -0
- package/lib/features/canvas/enhance/PixelToolControls.js +236 -0
- package/lib/features/canvas/enhance/PixelToolControls.js.map +1 -0
- package/lib/features/canvas/enhance/RemixControls.js +166 -0
- package/lib/features/canvas/enhance/RemixControls.js.map +1 -0
- package/lib/features/canvas/enhance/enhanceUi.js +182 -0
- package/lib/features/canvas/enhance/enhanceUi.js.map +1 -0
- package/lib/features/canvas/enhance/useEnhanceRunner.js +218 -0
- package/lib/features/canvas/enhance/useEnhanceRunner.js.map +1 -0
- package/lib/features/canvas/enhanceCatalog.js +110 -0
- package/lib/features/canvas/enhanceCatalog.js.map +1 -0
- package/lib/features/canvas/enhanceOps.js +630 -0
- package/lib/features/canvas/enhanceOps.js.map +1 -0
- package/lib/features/canvas/enhanceRpc.js +404 -0
- package/lib/features/canvas/enhanceRpc.js.map +1 -0
- package/lib/features/canvas/generationModels.js +82 -11
- package/lib/features/canvas/generationModels.js.map +1 -1
- package/lib/features/canvas/generationTasks.js +46 -17
- package/lib/features/canvas/generationTasks.js.map +1 -1
- package/lib/features/canvas/generator/GeneratorModelMenu.js +118 -0
- package/lib/features/canvas/generator/GeneratorModelMenu.js.map +1 -0
- package/lib/features/canvas/generator/audio/AudioLaneSettings.js +127 -0
- package/lib/features/canvas/generator/audio/AudioLaneSettings.js.map +1 -0
- package/lib/features/canvas/generator/audio/audioLane.js +163 -0
- package/lib/features/canvas/generator/audio/audioLane.js.map +1 -0
- package/lib/features/canvas/generator/audio/audioVoices.js +108 -0
- package/lib/features/canvas/generator/audio/audioVoices.js.map +1 -0
- package/lib/features/canvas/generator/audio/clipAudio.js +149 -0
- package/lib/features/canvas/generator/audio/clipAudio.js.map +1 -0
- package/lib/features/canvas/generator/audio/dub.js +109 -0
- package/lib/features/canvas/generator/audio/dub.js.map +1 -0
- package/lib/features/canvas/generator/audio/soundtrack.js +70 -0
- package/lib/features/canvas/generator/audio/soundtrack.js.map +1 -0
- package/lib/features/canvas/generator/audio/useAudioVoices.js +38 -0
- package/lib/features/canvas/generator/audio/useAudioVoices.js.map +1 -0
- package/lib/features/canvas/generator/audio/useSamplePlayer.js +72 -0
- package/lib/features/canvas/generator/audio/useSamplePlayer.js.map +1 -0
- package/lib/features/canvas/generator/audio/useSampleUploads.js +11 -0
- package/lib/features/canvas/generator/audio/useSampleUploads.js.map +1 -0
- package/lib/features/canvas/generator/batchImages.js +198 -0
- package/lib/features/canvas/generator/batchImages.js.map +1 -0
- package/lib/features/canvas/generator/batchLayout.js +36 -0
- package/lib/features/canvas/generator/batchLayout.js.map +1 -0
- package/lib/features/canvas/generator/brandKitGeneration.js +47 -0
- package/lib/features/canvas/generator/brandKitGeneration.js.map +1 -0
- package/lib/features/canvas/generator/cameraVocabulary.js +90 -0
- package/lib/features/canvas/generator/cameraVocabulary.js.map +1 -1
- package/lib/features/canvas/generator/cinematicVocabulary.js +58 -0
- package/lib/features/canvas/generator/cinematicVocabulary.js.map +1 -1
- package/lib/features/canvas/generator/elementMentions.js +402 -0
- package/lib/features/canvas/generator/elementMentions.js.map +1 -0
- package/lib/features/canvas/generator/reuse/BatchCountPill.js +136 -0
- package/lib/features/canvas/generator/reuse/BatchCountPill.js.map +1 -0
- package/lib/features/canvas/generator/reuse/busyRuns.js +17 -0
- package/lib/features/canvas/generator/reuse/busyRuns.js.map +1 -0
- package/lib/features/canvas/generator/reuse/generationRecord.js +368 -0
- package/lib/features/canvas/generator/reuse/generationRecord.js.map +1 -0
- package/lib/features/canvas/generator/reuse/generationReuse.js +77 -0
- package/lib/features/canvas/generator/reuse/generationReuse.js.map +1 -0
- package/lib/features/canvas/generator/reuse/laneInputs.js +75 -0
- package/lib/features/canvas/generator/reuse/laneInputs.js.map +1 -0
- package/lib/features/canvas/generator/reuse/modelFavourites.js +87 -0
- package/lib/features/canvas/generator/reuse/modelFavourites.js.map +1 -0
- package/lib/features/canvas/generator/reuse/recreate.js +121 -0
- package/lib/features/canvas/generator/reuse/recreate.js.map +1 -0
- package/lib/features/canvas/generator/reuse/retryJob.js +142 -0
- package/lib/features/canvas/generator/reuse/retryJob.js.map +1 -0
- package/lib/features/canvas/generator/reuse/reusePlan.js +203 -0
- package/lib/features/canvas/generator/reuse/reusePlan.js.map +1 -0
- package/lib/features/canvas/generator/reuse/runBoard.js +117 -0
- package/lib/features/canvas/generator/reuse/runBoard.js.map +1 -0
- package/lib/features/canvas/generator/useShotSpec.js +4 -3
- package/lib/features/canvas/generator/useShotSpec.js.map +1 -1
- package/lib/features/canvas/generator/video/VideoExtrasControls.js +276 -0
- package/lib/features/canvas/generator/video/VideoExtrasControls.js.map +1 -0
- package/lib/features/canvas/generator/video/cameraMotions.js +66 -0
- package/lib/features/canvas/generator/video/cameraMotions.js.map +1 -0
- package/lib/features/canvas/generator/video/clipTile.js +20 -0
- package/lib/features/canvas/generator/video/clipTile.js.map +1 -0
- package/lib/features/canvas/generator/video/mediaSeconds.js +31 -0
- package/lib/features/canvas/generator/video/mediaSeconds.js.map +1 -0
- package/lib/features/canvas/generator/video/referenceMedia.js +156 -0
- package/lib/features/canvas/generator/video/referenceMedia.js.map +1 -0
- package/lib/features/canvas/generator/video/useVideoGenExtras.js +179 -0
- package/lib/features/canvas/generator/video/useVideoGenExtras.js.map +1 -0
- package/lib/features/canvas/generator/video/videoExtras.js +34 -0
- package/lib/features/canvas/generator/video/videoExtras.js.map +1 -0
- package/lib/features/canvas/generator/video/videoModelCaps.js +96 -0
- package/lib/features/canvas/generator/video/videoModelCaps.js.map +1 -0
- package/lib/features/canvas/home/BoardHistorySheet.js +266 -0
- package/lib/features/canvas/home/BoardHistorySheet.js.map +1 -0
- package/lib/features/canvas/home/BoardMenuSheet.js +157 -0
- package/lib/features/canvas/home/BoardMenuSheet.js.map +1 -0
- package/lib/features/canvas/home/BoardTile.js +224 -0
- package/lib/features/canvas/home/BoardTile.js.map +1 -0
- package/lib/features/canvas/home/HeroComposer.js +72 -6
- package/lib/features/canvas/home/HeroComposer.js.map +1 -1
- package/lib/features/canvas/home/SlidesPrompt.js +79 -0
- package/lib/features/canvas/home/SlidesPrompt.js.map +1 -0
- package/lib/features/canvas/home/TemplatesGallery.js +2 -19
- package/lib/features/canvas/home/TemplatesGallery.js.map +1 -1
- package/lib/features/canvas/home/TrashView.js +299 -0
- package/lib/features/canvas/home/TrashView.js.map +1 -0
- package/lib/features/canvas/home/heroShots.js +4 -2
- package/lib/features/canvas/home/heroShots.js.map +1 -1
- package/lib/features/canvas/home/templatesGallerySources.js +13 -58
- package/lib/features/canvas/home/templatesGallerySources.js.map +1 -1
- package/lib/features/canvas/home/useYourWork.js +218 -0
- package/lib/features/canvas/home/useYourWork.js.map +1 -0
- package/lib/features/canvas/homeWork.js +54 -119
- package/lib/features/canvas/homeWork.js.map +1 -1
- package/lib/features/canvas/influencer/influencerPipeline.js +9 -8
- package/lib/features/canvas/influencer/influencerPipeline.js.map +1 -1
- package/lib/features/canvas/lazyEditors.js +3 -2
- package/lib/features/canvas/lazyEditors.js.map +1 -1
- package/lib/features/canvas/lookReading.js +38 -0
- package/lib/features/canvas/lookReading.js.map +1 -0
- package/lib/features/canvas/matchLook.js +81 -0
- package/lib/features/canvas/matchLook.js.map +1 -0
- package/lib/features/canvas/mediaUrls.js +22 -1
- package/lib/features/canvas/mediaUrls.js.map +1 -1
- package/lib/features/canvas/pngPixels.js +224 -0
- package/lib/features/canvas/pngPixels.js.map +1 -0
- package/lib/features/canvas/rankedCatalogSearch.js +1 -1
- package/lib/features/canvas/serverTasks.js +12 -5
- package/lib/features/canvas/serverTasks.js.map +1 -1
- package/lib/features/canvas/studioCatalog.js +1 -1
- package/lib/features/canvas/surfaceIndex.js +287 -11
- package/lib/features/canvas/surfaceIndex.js.map +1 -1
- package/lib/features/canvas/templateSearch.js +90 -11
- package/lib/features/canvas/templateSearch.js.map +1 -1
- package/lib/features/canvas/videoEditor/agent/agentLoop.js +6 -5
- package/lib/features/canvas/videoEditor/agent/agentLoop.js.map +1 -1
- package/lib/features/canvas/videoEditor/agent/brainClient.js +13 -2
- package/lib/features/canvas/videoEditor/agent/brainClient.js.map +1 -1
- package/lib/features/canvas/videoEditor/agent/cutTools.js +150 -4
- package/lib/features/canvas/videoEditor/agent/cutTools.js.map +1 -1
- package/lib/features/canvas/videoEditor/exportTask.js +5 -2
- package/lib/features/canvas/videoEditor/exportTask.js.map +1 -1
- package/lib/features/canvas/videoEditor/formWidgets.js +1 -1
- package/lib/features/canvas/videoEditor/mediaActions.js +18 -3
- package/lib/features/canvas/videoEditor/mediaActions.js.map +1 -1
- package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js +25 -2
- package/lib/features/canvas/videoEditor/produce/ProduceVideoSheet.js.map +1 -1
- package/lib/features/canvas/videoEditor/produce/produceScenes.js +15 -7
- package/lib/features/canvas/videoEditor/produce/produceScenes.js.map +1 -1
- package/lib/features/canvas/videoEditor/remoteMediaClient.js +3 -3
- package/lib/features/canvas/videoEditor/remoteMediaClient.js.map +1 -1
- package/lib/features/channels/ChannelIcon.js +62 -0
- package/lib/features/channels/ChannelIcon.js.map +1 -0
- package/lib/features/channels/ConnectAppsSheet.js +721 -0
- package/lib/features/channels/ConnectAppsSheet.js.map +1 -0
- package/lib/features/channels/HomeImessage.js +48 -0
- package/lib/features/channels/HomeImessage.js.map +1 -0
- package/lib/features/channels/channelLinks.js +90 -0
- package/lib/features/channels/channelLinks.js.map +1 -0
- package/lib/features/channels/useChannelsApi.js +299 -0
- package/lib/features/channels/useChannelsApi.js.map +1 -0
- package/lib/features/chat/AskUserCard.js +327 -21
- package/lib/features/chat/AskUserCard.js.map +1 -1
- package/lib/features/chat/ChatModelSheet.js +414 -0
- package/lib/features/chat/ChatModelSheet.js.map +1 -0
- package/lib/features/chat/TemplatesChatCards.js +32 -1
- package/lib/features/chat/TemplatesChatCards.js.map +1 -1
- package/lib/features/chat/askUser.js +130 -17
- package/lib/features/chat/askUser.js.map +1 -1
- package/lib/features/chat/chatModelCredentials.js +76 -0
- package/lib/features/chat/chatModelCredentials.js.map +1 -0
- package/lib/features/chat/chatModelPick.js +67 -0
- package/lib/features/chat/chatModelPick.js.map +1 -0
- package/lib/features/chat/credentialTemplates.js +43 -0
- package/lib/features/chat/credentialTemplates.js.map +1 -0
- package/lib/features/design/DesignEditorExperience.js +208 -22
- package/lib/features/design/DesignEditorExperience.js.map +1 -1
- package/lib/features/design/DesignExperience.js +23 -6
- package/lib/features/design/DesignExperience.js.map +1 -1
- package/lib/features/design/doc/aiDesign.js +6 -16
- package/lib/features/design/doc/aiDesign.js.map +1 -1
- package/lib/features/design/doc/arrange.js +72 -0
- package/lib/features/design/doc/arrange.js.map +1 -0
- package/lib/features/design/doc/artifacts.js +40 -10
- package/lib/features/design/doc/artifacts.js.map +1 -1
- package/lib/features/design/doc/bleedRunout.js +201 -0
- package/lib/features/design/doc/bleedRunout.js.map +1 -0
- package/lib/features/design/doc/briefForms.js +218 -0
- package/lib/features/design/doc/briefForms.js.map +1 -0
- package/lib/features/design/doc/chart.js +11 -1
- package/lib/features/design/doc/chart.js.map +1 -1
- package/lib/features/design/doc/deletedWork.js +13 -0
- package/lib/features/design/doc/deletedWork.js.map +1 -0
- package/lib/features/design/doc/demoVideo.js +91 -0
- package/lib/features/design/doc/demoVideo.js.map +1 -0
- package/lib/features/design/doc/docOps.js +15 -0
- package/lib/features/design/doc/docOps.js.map +1 -1
- package/lib/features/design/doc/layoutGuides.js +159 -0
- package/lib/features/design/doc/layoutGuides.js.map +1 -0
- package/lib/features/design/doc/pageTemplates.js +286 -0
- package/lib/features/design/doc/pageTemplates.js.map +1 -0
- package/lib/features/design/doc/resize.js +8 -3
- package/lib/features/design/doc/resize.js.map +1 -1
- package/lib/features/design/doc/sizes.js +18 -5
- package/lib/features/design/doc/sizes.js.map +1 -1
- package/lib/features/design/doc/textRuns.js +67 -0
- package/lib/features/design/doc/textRuns.js.map +1 -0
- package/lib/features/design/doc/types.js +8 -1
- package/lib/features/design/doc/types.js.map +1 -1
- package/lib/features/design/editor/AiPanel.js +71 -74
- package/lib/features/design/editor/AiPanel.js.map +1 -1
- package/lib/features/design/editor/AllPagesPanel.js +64 -0
- package/lib/features/design/editor/AllPagesPanel.js.map +1 -0
- package/lib/features/design/editor/CarouselWizard.js +139 -0
- package/lib/features/design/editor/CarouselWizard.js.map +1 -0
- package/lib/features/design/editor/DesignCanvas.js +205 -14
- package/lib/features/design/editor/DesignCanvas.js.map +1 -1
- package/lib/features/design/editor/ExportSheet.js +24 -8
- package/lib/features/design/editor/ExportSheet.js.map +1 -1
- package/lib/features/design/editor/FlyerBriefForm.js +221 -0
- package/lib/features/design/editor/FlyerBriefForm.js.map +1 -0
- package/lib/features/design/editor/GuidesPanel.js +152 -0
- package/lib/features/design/editor/GuidesPanel.js.map +1 -0
- package/lib/features/design/editor/LayerTools.js +24 -1
- package/lib/features/design/editor/LayerTools.js.map +1 -1
- package/lib/features/design/editor/LayersPanel.js +156 -0
- package/lib/features/design/editor/LayersPanel.js.map +1 -0
- package/lib/features/design/editor/ToolPanels.js +34 -1
- package/lib/features/design/editor/ToolPanels.js.map +1 -1
- package/lib/features/design/editor/WordStyleRow.js +66 -0
- package/lib/features/design/editor/WordStyleRow.js.map +1 -0
- package/lib/features/design/editor/useDesignSave.js +36 -2
- package/lib/features/design/editor/useDesignSave.js.map +1 -1
- package/lib/features/design/export/exportDesign.js +79 -19
- package/lib/features/design/export/exportDesign.js.map +1 -1
- package/lib/features/design/export/fetchBytes.js +26 -0
- package/lib/features/design/export/fetchBytes.js.map +1 -0
- package/lib/features/design/export/pdf.js +16 -1
- package/lib/features/design/export/pdf.js.map +1 -1
- package/lib/features/design/export/pptx.js +621 -0
- package/lib/features/design/export/pptx.js.map +1 -0
- package/lib/features/design/export/pptxChart.js +106 -0
- package/lib/features/design/export/pptxChart.js.map +1 -0
- package/lib/features/design/export/pptxGeometry.js +219 -0
- package/lib/features/design/export/pptxGeometry.js.map +1 -0
- package/lib/features/design/export/printFile.js +19 -0
- package/lib/features/design/export/printFile.js.map +1 -0
- package/lib/features/design/export/zip.js +91 -0
- package/lib/features/design/export/zip.js.map +1 -0
- package/lib/features/design/render/PageCapture.js +95 -23
- package/lib/features/design/render/PageCapture.js.map +1 -1
- package/lib/features/design/render/TextMeasure.js +1 -1
- package/lib/features/design/render/layers.js +1 -1
- package/lib/features/design/surface/BoardScreen.js +139 -102
- package/lib/features/design/surface/BoardScreen.js.map +1 -1
- package/lib/features/design/surface/BrandSheet.js +407 -0
- package/lib/features/design/surface/BrandSheet.js.map +1 -0
- package/lib/features/design/surface/ChatWorkView.js +154 -0
- package/lib/features/design/surface/ChatWorkView.js.map +1 -0
- package/lib/features/design/surface/CreationScreen.js +36 -2
- package/lib/features/design/surface/CreationScreen.js.map +1 -1
- package/lib/features/design/surface/DesignAgentChatPane.js +7 -1
- package/lib/features/design/surface/DesignAgentChatPane.js.map +1 -1
- package/lib/features/design/surface/DesignHome.js +505 -0
- package/lib/features/design/surface/DesignHome.js.map +1 -0
- package/lib/features/design/surface/DesignSurfaceExperience.js +182 -9
- package/lib/features/design/surface/DesignSurfaceExperience.js.map +1 -1
- package/lib/features/design/surface/TasksSheet.js +141 -0
- package/lib/features/design/surface/TasksSheet.js.map +1 -0
- package/lib/features/design/surface/TemplatesGallery.js +67 -17
- package/lib/features/design/surface/TemplatesGallery.js.map +1 -1
- package/lib/features/design/surface/WorkTiles.js +207 -0
- package/lib/features/design/surface/WorkTiles.js.map +1 -0
- package/lib/features/design/surface/agentTurn.js +4 -4
- package/lib/features/design/surface/agentTurn.js.map +1 -1
- package/lib/features/design/surface/brandKit.js +204 -0
- package/lib/features/design/surface/brandKit.js.map +1 -0
- package/lib/features/design/surface/designBoard.js +269 -58
- package/lib/features/design/surface/designBoard.js.map +1 -1
- package/lib/features/design/surface/designChannel.js +30 -6
- package/lib/features/design/surface/designChannel.js.map +1 -1
- package/lib/features/design/surface/designConnector.js +11 -3
- package/lib/features/design/surface/designConnector.js.map +1 -1
- package/lib/features/design/surface/designErrors.js +92 -0
- package/lib/features/design/surface/designErrors.js.map +1 -0
- package/lib/features/design/surface/designLinks.js +64 -1
- package/lib/features/design/surface/designLinks.js.map +1 -1
- package/lib/features/design/surface/designRun.js +7 -3
- package/lib/features/design/surface/designRun.js.map +1 -1
- package/lib/features/design/surface/designTheme.js +54 -93
- package/lib/features/design/surface/designTheme.js.map +1 -1
- package/lib/features/design/surface/execStream.js +2 -2
- package/lib/features/design/surface/execStream.js.map +1 -1
- package/lib/features/design/surface/freshLinks.js +69 -0
- package/lib/features/design/surface/freshLinks.js.map +1 -0
- package/lib/features/design/surface/graphicChat.js +37 -0
- package/lib/features/design/surface/graphicChat.js.map +1 -0
- package/lib/features/design/surface/templateKinds.js +61 -0
- package/lib/features/design/surface/templateKinds.js.map +1 -0
- package/lib/features/design/surface/useBrandKitInUse.js +90 -0
- package/lib/features/design/surface/useBrandKitInUse.js.map +1 -0
- package/lib/features/design/surface/useDesignSurface.js +202 -43
- package/lib/features/design/surface/useDesignSurface.js.map +1 -1
- package/lib/features/design/surface/workList.js +184 -0
- package/lib/features/design/surface/workList.js.map +1 -0
- package/lib/features/devices/bodyComposition.js.map +1 -1
- package/lib/features/docs/DocsEditorExperience.js +18 -3
- package/lib/features/docs/DocsEditorExperience.js.map +1 -1
- package/lib/features/docs/docArtifacts.js +11 -23
- package/lib/features/docs/docArtifacts.js.map +1 -1
- package/lib/features/docs/docExport.js +1 -13
- package/lib/features/docs/docExport.js.map +1 -1
- package/lib/features/docs/docShare.js +28 -1
- package/lib/features/docs/docShare.js.map +1 -1
- package/lib/features/docs/docxFile.js +221 -0
- package/lib/features/docs/docxFile.js.map +1 -0
- package/lib/features/home/sky/HomeSky.js +526 -0
- package/lib/features/home/sky/HomeSky.js.map +1 -0
- package/lib/features/home/sky/homeSkyBar.js +16 -0
- package/lib/features/home/sky/homeSkyBar.js.map +1 -0
- package/lib/features/home/sky/skyScene.js +273 -0
- package/lib/features/home/sky/skyScene.js.map +1 -0
- package/lib/features/home/sky/useSkyScene.js +32 -0
- package/lib/features/home/sky/useSkyScene.js.map +1 -0
- package/lib/features/home/weather.js +8 -3
- package/lib/features/home/weather.js.map +1 -1
- package/lib/features/links/openInApp.js +8 -1
- package/lib/features/links/openInApp.js.map +1 -1
- package/lib/features/webbuilder/codezenHandoff.js +7 -1
- package/lib/features/webbuilder/codezenHandoff.js.map +1 -1
- package/lib/hooks/useChatStream.js +3 -2
- package/lib/hooks/useChatStream.js.map +1 -1
- package/lib/screens/DesignNative/index.js +13 -3
- package/lib/screens/DesignNative/index.js.map +1 -1
- package/lib/screens/Devices/index.js.map +1 -1
- package/lib/screens/Home/HomeScreen.js +150 -28
- package/lib/screens/Home/HomeScreen.js.map +1 -1
- package/lib/screens/Home/components/HomeHero.js +7 -4
- package/lib/screens/Home/components/HomeHero.js.map +1 -1
- package/lib/screens/Home/components/HomeSuggestions.js +5 -3
- package/lib/screens/Home/components/HomeSuggestions.js.map +1 -1
- package/package.json +4 -4
- package/lib/features/design/surface/DesignBoards.js +0 -441
- package/lib/features/design/surface/DesignBoards.js.map +0 -1
- package/lib/features/design/surface/WetPaint.js +0 -140
- package/lib/features/design/surface/WetPaint.js.map +0 -1
- package/lib/features/design/surface/metaball.js +0 -48
- package/lib/features/design/surface/metaball.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const MAX_CAMERA_MOTIONS = 2;
|
|
21
|
+
function modelTakesMotions(model) {
|
|
22
|
+
return (model == null ? void 0 : model.supportsMotions) === true;
|
|
23
|
+
}
|
|
24
|
+
function clampStrength(value) {
|
|
25
|
+
if (!Number.isFinite(value)) return 1;
|
|
26
|
+
return Math.round(Math.min(1, Math.max(0, value)) * 100) / 100;
|
|
27
|
+
}
|
|
28
|
+
function isMotionId(raw) {
|
|
29
|
+
return /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/.test(raw.trim());
|
|
30
|
+
}
|
|
31
|
+
function addMotion(picks, motion) {
|
|
32
|
+
var _a;
|
|
33
|
+
const id = motion.id.trim();
|
|
34
|
+
if (!id || picks.length >= MAX_CAMERA_MOTIONS || picks.some((p) => p.id === id)) return [...picks];
|
|
35
|
+
return [...picks, __spreadValues({
|
|
36
|
+
id,
|
|
37
|
+
strength: 1
|
|
38
|
+
}, ((_a = motion.label) == null ? void 0 : _a.trim()) ? {
|
|
39
|
+
label: motion.label.trim()
|
|
40
|
+
} : {})];
|
|
41
|
+
}
|
|
42
|
+
function removeMotion(picks, id) {
|
|
43
|
+
return picks.filter((p) => p.id !== id);
|
|
44
|
+
}
|
|
45
|
+
function setMotionStrength(picks, id, strength) {
|
|
46
|
+
return picks.map((p) => p.id === id ? __spreadProps(__spreadValues({}, p), {
|
|
47
|
+
strength: clampStrength(strength)
|
|
48
|
+
}) : p);
|
|
49
|
+
}
|
|
50
|
+
function motionsParam(picks) {
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const pick of picks) {
|
|
53
|
+
const id = pick.id.trim();
|
|
54
|
+
if (!id || out.some((m) => m.id === id)) continue;
|
|
55
|
+
out.push({
|
|
56
|
+
id,
|
|
57
|
+
strength: clampStrength(pick.strength)
|
|
58
|
+
});
|
|
59
|
+
if (out.length === MAX_CAMERA_MOTIONS) break;
|
|
60
|
+
}
|
|
61
|
+
return out.length > 0 ? out : void 0;
|
|
62
|
+
}
|
|
63
|
+
function motionName(pick) {
|
|
64
|
+
if (pick.label) return pick.label;
|
|
65
|
+
return pick.id.length > 13 ? `${pick.id.slice(0, 8)}\u2026` : pick.id;
|
|
66
|
+
}export{MAX_CAMERA_MOTIONS,addMotion,clampStrength,isMotionId,modelTakesMotions,motionName,motionsParam,removeMotion,setMotionStrength};//# sourceMappingURL=cameraMotions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cameraMotions.js","sources":["../../../../../src/features/canvas/generator/video/cameraMotions.ts"],"sourcesContent":["/**\n * Camera moves for motion shots - GENERATE's `motions`.\n *\n * Only the motion-shot models read the field (the connector ignores it on\n * every other model), and they take at most two moves, each an id with a\n * strength from 0 to 1. The connector normalizes what it is sent the same way\n * (`normalizeMotions`: a bare id means full strength, extras past two are\n * dropped) - this module does it first so the panel shows exactly what will be\n * sent instead of finding out from the result.\n *\n * Where the ids come from matters more than how they are sent. The connector\n * has no catalogue: LIST_MODELS reports none, there is no list action, and its\n * own docs say \"Discover ids in Higgsfield Cloud\". The camera-move names on\n * Higgsfield's web pages carry ids from its site CMS, which nothing ties to\n * the API's motion ids. So nothing here ships an id table: the picker takes\n * ids a person brings from their own Higgsfield Cloud account, and shows named\n * presets only when a real catalogue is handed to it.\n */\nimport type { ModelInfo } from '../../generationModels';\n\n/** The API caps the list at two; a third is dropped by the connector, so it is never offered. */\nexport const MAX_CAMERA_MOTIONS = 2;\n\n/** One chosen move. `label` is for the panel only and is never sent. */\nexport interface CameraMotionPick {\n id: string;\n /** 0 to 1; 1 is the move at full effect. */\n strength: number;\n label?: string;\n}\n\n/** A named move from a catalogue the caller holds (none ships with the connector). */\nexport interface MotionPreset {\n id: string;\n label: string;\n}\n\n/** The `motions` entry the API documents - both fields required by its schema. */\nexport interface CameraMotionParam {\n id: string;\n strength: number;\n}\n\n/** Whether the chosen model reads `motions` at all. */\nexport function modelTakesMotions(model: ModelInfo | undefined): boolean {\n return model?.supportsMotions === true;\n}\n\n/** A strength the API accepts: 0 to 1, in hundredths so the slider and the request agree. */\nexport function clampStrength(value: number): number {\n if (!Number.isFinite(value)) return 1;\n return Math.round(Math.min(1, Math.max(0, value)) * 100) / 100;\n}\n\n/**\n * Whether a pasted value can be a motion id. Deliberately loose - Higgsfield\n * ids are UUIDs today, but nothing in the connector promises that - while\n * still turning away a sentence, a URL or an empty paste.\n */\nexport function isMotionId(raw: string): boolean {\n return /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/.test(raw.trim());\n}\n\n/** Add a move at full strength. A repeat or a third move changes nothing. */\nexport function addMotion(\n picks: readonly CameraMotionPick[],\n motion: { id: string; label?: string },\n): CameraMotionPick[] {\n const id = motion.id.trim();\n if (!id || picks.length >= MAX_CAMERA_MOTIONS || picks.some((p) => p.id === id)) return [...picks];\n return [...picks, { id, strength: 1, ...(motion.label?.trim() ? { label: motion.label.trim() } : {}) }];\n}\n\nexport function removeMotion(picks: readonly CameraMotionPick[], id: string): CameraMotionPick[] {\n return picks.filter((p) => p.id !== id);\n}\n\nexport function setMotionStrength(\n picks: readonly CameraMotionPick[],\n id: string,\n strength: number,\n): CameraMotionPick[] {\n return picks.map((p) => (p.id === id ? { ...p, strength: clampStrength(strength) } : p));\n}\n\n/**\n * The `motions` param: `{ id, strength }` for each move, first two only, no\n * repeats - the shape the API's schema requires. Undefined with no moves, so\n * the field is left off and the shot runs on the prompt alone.\n */\nexport function motionsParam(picks: readonly CameraMotionPick[]): CameraMotionParam[] | undefined {\n const out: CameraMotionParam[] = [];\n for (const pick of picks) {\n const id = pick.id.trim();\n if (!id || out.some((m) => m.id === id)) continue;\n out.push({ id, strength: clampStrength(pick.strength) });\n if (out.length === MAX_CAMERA_MOTIONS) break;\n }\n return out.length > 0 ? out : undefined;\n}\n\n/** How a move is named in the panel: its catalogue label, else the start of its id. */\nexport function motionName(pick: Pick<CameraMotionPick, 'id' | 'label'>): string {\n if (pick.label) return pick.label;\n return pick.id.length > 13 ? `${pick.id.slice(0, 8)}…` : pick.id;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAqBO,MAAM,kBAAqB,GAAA;AAuB3B,SAAS,kBAAkB,KAAuC,EAAA;AACvE,EAAA,OAAA,CAAO,+BAAO,eAAoB,MAAA,IAAA;AACpC;AAGO,SAAS,cAAc,KAAuB,EAAA;AACnD,EAAA,IAAI,CAAC,MAAA,CAAO,QAAS,CAAA,KAAK,GAAU,OAAA,CAAA;AACpC,EAAA,OAAO,IAAK,CAAA,KAAA,CAAM,IAAK,CAAA,GAAA,CAAI,CAAG,EAAA,IAAA,CAAK,GAAI,CAAA,CAAA,EAAG,KAAK,CAAC,CAAI,GAAA,GAAG,CAAI,GAAA,GAAA;AAC7D;AAOO,SAAS,WAAW,GAAsB,EAAA;AAC/C,EAAA,OAAO,qCAAsC,CAAA,IAAA,CAAK,GAAI,CAAA,IAAA,EAAM,CAAA;AAC9D;AAGgB,SAAA,SAAA,CAAU,OAAoC,MAGvC,EAAA;AAnEvB,EAAA,IAAA,EAAA;AAo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AAI,IAAK,CAAA;AAAA,MACP,EAAA;AAAA,MACA,QAAA,EAAU,aAAc,CAAA,IAAA,CAAK,QAAQ;AAAA,KACtC,CAAA;AACD,IAAI,IAAA,GAAA,CAAI,WAAW,kBAAoB,EAAA;AAAA;AAEzC,EAAO,OAAA,GAAA,CAAI,MAAS,GAAA,CAAA,GAAI,GAAM,GAAA,MAAA;AAChC;AAGO,SAAS,WAAW,IAAsD,EAAA;AAC/E,EAAI,IAAA,IAAA,CAAK,KAAO,EAAA,OAAO,IAAK,CAAA,KAAA;AAC5B,EAAA,OAAO,IAAK,CAAA,EAAA,CAAG,MAAS,GAAA,EAAA,GAAK,CAAG,EAAA,IAAA,CAAK,EAAG,CAAA,KAAA,CAAM,CAAG,EAAA,CAAC,CAAC,CAAA,MAAA,CAAA,GAAM,IAAK,CAAA,EAAA;AAChE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
async function readClipAspect(src, measure) {
|
|
2
|
+
try {
|
|
3
|
+
const dims = await measure(src);
|
|
4
|
+
return dims && dims.width > 0 && dims.height > 0 ? `${dims.width}:${dims.height}` : void 0;
|
|
5
|
+
} catch (e) {
|
|
6
|
+
return void 0;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function ratioValue(aspect) {
|
|
10
|
+
const [width, height] = aspect.split(":").map(Number);
|
|
11
|
+
return width > 0 && height > 0 ? width / height : void 0;
|
|
12
|
+
}
|
|
13
|
+
function sameShape(a, b) {
|
|
14
|
+
const x = ratioValue(a);
|
|
15
|
+
const y = ratioValue(b);
|
|
16
|
+
return x === void 0 || y === void 0 || Math.abs(x - y) <= x * 0.02;
|
|
17
|
+
}
|
|
18
|
+
function madeAspect(sent, delivered) {
|
|
19
|
+
return sent && delivered && !sameShape(sent, delivered) ? void 0 : sent;
|
|
20
|
+
}export{madeAspect,readClipAspect};//# sourceMappingURL=clipTile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipTile.js","sources":["../../../../../src/features/canvas/generator/video/clipTile.ts"],"sourcesContent":["/**\n * A generated clip's board tile, in the shape the clip really came back in (web\n * `video/clipTile.ts`). The ratio a run asks for is not always the clip's: a lane\n * can frame it from its first frame, and which lane runs is the connector's choice.\n * Only the delivered file can say; the phone reads it through the connector's PROBE.\n */\nimport type { Dims } from '../../canvasEditOps';\n\n/** Reads a clip's pixel size; null when it cannot. */\nexport type MeasureClip = (src: string) => Promise<Dims | null>;\n\n/** The clip's own W:H, or undefined when it cannot be read. */\nexport async function readClipAspect(src: string, measure: MeasureClip): Promise<string | undefined> {\n try {\n const dims = await measure(src);\n return dims && dims.width > 0 && dims.height > 0 ? `${dims.width}:${dims.height}` : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction ratioValue(aspect: string): number | undefined {\n const [width, height] = aspect.split(':').map(Number);\n return width > 0 && height > 0 ? width / height : undefined;\n}\n\n/** Whether two W:H values are one shape, within 2%. True when either names none. */\nfunction sameShape(a: string, b: string): boolean {\n const x = ratioValue(a);\n const y = ratioValue(b);\n return x === undefined || y === undefined || Math.abs(x - y) <= x * 0.02;\n}\n\n/**\n * The ratio a run can say it made: the one it sent, when the clip came back in that\n * shape or could not be read. Undefined when a lane framed the clip itself.\n */\nexport function madeAspect(sent: string | undefined, delivered: string | undefined): string | undefined {\n return sent && delivered && !sameShape(sent, delivered) ? undefined : sent;\n}\n"],"names":[],"mappings":"AAYsB,eAAA,cAAA,CAAe,KAAa,OAAmD,EAAA;AACnG,EAAI,IAAA;AACF,IAAM,MAAA,IAAA,GAAO,MAAM,OAAA,CAAQ,GAAG,CAAA;AAC9B,IAAA,OAAO,IAAQ,IAAA,IAAA,CAAK,KAAQ,GAAA,CAAA,IAAK,IAAK,CAAA,MAAA,GAAS,CAAI,GAAA,CAAA,EAAG,IAAK,CAAA,KAAK,CAAI,CAAA,EAAA,IAAA,CAAK,MAAM,CAAK,CAAA,GAAA,KAAA,CAAA;AAAA,GAC9E,CAAA,OAAA,CAAA,EAAA;AACN,IAAO,OAAA,MAAA;AAAA;AAEX;AACA,SAAS,WAAW,MAAoC,EAAA;AACtD,EAAM,MAAA,CAAC,OAAO,MAAM,CAAA,GAAI,OAAO,KAAM,CAAA,GAAG,CAAE,CAAA,GAAA,CAAI,MAAM,CAAA;AACpD,EAAA,OAAO,KAAQ,GAAA,CAAA,IAAK,MAAS,GAAA,CAAA,GAAI,QAAQ,MAAS,GAAA,MAAA;AACpD;AAGA,SAAS,SAAA,CAAU,GAAW,CAAoB,EAAA;AAChD,EAAM,MAAA,CAAA,GAAI,WAAW,CAAC,CAAA;AACtB,EAAM,MAAA,CAAA,GAAI,WAAW,CAAC,CAAA;AACtB,EAAO,OAAA,CAAA,KAAM,UAAa,CAAM,KAAA,MAAA,IAAa,KAAK,GAAI,CAAA,CAAA,GAAI,CAAC,CAAA,IAAK,CAAI,GAAA,IAAA;AACtE;AAMgB,SAAA,UAAA,CAAW,MAA0B,SAAmD,EAAA;AACtG,EAAA,OAAO,QAAQ,SAAa,IAAA,CAAC,UAAU,IAAM,EAAA,SAAS,IAAI,MAAY,GAAA,IAAA;AACxE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {unwrapProxyUrl}from'../../videoEditor/remoteMediaClient.js';import {probeClipAudio}from'../audio/clipAudio.js';const MEASURE_TIMEOUT_MS = 15e3;
|
|
2
|
+
async function readMediaSeconds(run, src, kind) {
|
|
3
|
+
var _a;
|
|
4
|
+
if (kind === "video") {
|
|
5
|
+
const {
|
|
6
|
+
seconds: seconds2
|
|
7
|
+
} = await probeClipAudio(run, src);
|
|
8
|
+
if (seconds2 === void 0) throw new Error("Could not read the clip length.");
|
|
9
|
+
return seconds2;
|
|
10
|
+
}
|
|
11
|
+
const raw = await run("yantra-audio-editing", "YANTRA_AUDIO_EDIT_PROBE", {
|
|
12
|
+
input_url: unwrapProxyUrl(src)
|
|
13
|
+
});
|
|
14
|
+
const data = raw.data && typeof raw.data === "object" ? raw.data : raw;
|
|
15
|
+
const ms = Number(data.duration_ms);
|
|
16
|
+
const seconds = Number.isFinite(ms) && ms > 0 ? ms / 1e3 : Number((_a = data.duration_secs) != null ? _a : data.duration);
|
|
17
|
+
if (!Number.isFinite(seconds) || seconds <= 0) throw new Error("Could not read the track length.");
|
|
18
|
+
return seconds;
|
|
19
|
+
}
|
|
20
|
+
function withinMeasureTime(read, ms = MEASURE_TIMEOUT_MS) {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
const timer = setTimeout(() => reject(new Error("Timed out reading the length.")), ms);
|
|
23
|
+
read.then((seconds) => {
|
|
24
|
+
clearTimeout(timer);
|
|
25
|
+
resolve(seconds);
|
|
26
|
+
}, (err) => {
|
|
27
|
+
clearTimeout(timer);
|
|
28
|
+
reject(err);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}export{MEASURE_TIMEOUT_MS,readMediaSeconds,withinMeasureTime};//# sourceMappingURL=mediaSeconds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaSeconds.js","sources":["../../../../../src/features/canvas/generator/video/mediaSeconds.ts"],"sourcesContent":["/**\n * How long an attached clip or track runs (web `video/mediaSeconds.ts`). The\n * reference lane caps clips and audio by their COMBINED length and the connector\n * does not check it. A phone cannot read a remote file's metadata, so the\n * connector's PROBE does; rejects when it cannot, and callers keep the item\n * with no length.\n */\nimport type { RunMediaAction } from '../../videoEditor/mediaActions';\nimport { unwrapProxyUrl } from '../../videoEditor/remoteMediaClient';\nimport { probeClipAudio } from '../audio/clipAudio';\nimport type { ReferenceMediaKind } from './referenceMedia';\n\n/** How long a length read may take before it counts as unreadable. */\nexport const MEASURE_TIMEOUT_MS = 15_000;\n\n/** Seconds of a clip or a track, off the matching connector's PROBE. */\nexport async function readMediaSeconds(run: RunMediaAction, src: string, kind: ReferenceMediaKind): Promise<number> {\n if (kind === 'video') {\n const { seconds } = await probeClipAudio(run, src);\n if (seconds === undefined) throw new Error('Could not read the clip length.');\n return seconds;\n }\n const raw = await run('yantra-audio-editing', 'YANTRA_AUDIO_EDIT_PROBE', { input_url: unwrapProxyUrl(src) });\n const data = (raw.data && typeof raw.data === 'object' ? raw.data : raw) as Record<string, unknown>;\n const ms = Number(data.duration_ms);\n const seconds = Number.isFinite(ms) && ms > 0 ? ms / 1000 : Number(data.duration_secs ?? data.duration);\n if (!Number.isFinite(seconds) || seconds <= 0) throw new Error('Could not read the track length.');\n return seconds;\n}\n\n/** A length read that gives up, so a stalled host cannot hold Generate for good. */\nexport function withinMeasureTime(read: Promise<number>, ms = MEASURE_TIMEOUT_MS): Promise<number> {\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => reject(new Error('Timed out reading the length.')), ms);\n read.then(\n (seconds) => {\n clearTimeout(timer);\n resolve(seconds);\n },\n (err: unknown) => {\n clearTimeout(timer);\n reject(err);\n },\n );\n });\n}\n"],"names":["seconds"],"mappings":"uHAaO,MAAM,kBAAqB,GAAA;AAGZ,eAAA,gBAAA,CAAiB,GAAqB,EAAA,GAAA,EAAa,IAA2C,EAAA;AAhBpH,EAAA,IAAA,EAAA;AAiBE,EAAA,IAAI,SAAS,OAAS,EAAA;AACpB,IAAM,MAAA;AAAA,MACJ,OAAAA,EAAAA;AAAA,KACE,GAAA,MAAM,cAAe,CAAA,GAAA,EAAK,GAAG,CAAA;AACjC,IAAA,IAAIA,QAAY,KAAA,MAAA,EAAiB,MAAA,IAAI,MAAM,iCAAiC,CAAA;AAC5E,IAAOA,OAAAA,QAAAA;AAAA;AAET,EAAA,MAAM,GAAM,GAAA,MAAM,GAAI,CAAA,sBAAA,EAAwB,yBAA2B,EAAA;AAAA,IACvE,SAAA,EAAW,eAAe,GAAG;AAAA,GAC9B,CAAA;AACD,EAAM,MAAA,IAAA,GAAQ,IAAI,IAAQ,IAAA,OAAO,IAAI,IAAS,KAAA,QAAA,GAAW,IAAI,IAAO,GAAA,GAAA;AACpE,EAAM,MAAA,EAAA,GAAK,MAAO,CAAA,IAAA,CAAK,WAAW,CAAA;AAClC,EAAA,MAAM,OAAU,GAAA,MAAA,CAAO,QAAS,CAAA,EAAE,KAAK,EAAK,GAAA,CAAA,GAAI,EAAK,GAAA,GAAA,GAAO,MAAO,CAAA,CAAA,EAAA,GAAA,IAAA,CAAK,aAAL,KAAA,IAAA,GAAA,EAAA,GAAsB,KAAK,QAAQ,CAAA;AACtG,EAAI,IAAA,CAAC,MAAO,CAAA,QAAA,CAAS,OAAO,CAAA,IAAK,WAAW,CAAG,EAAA,MAAM,IAAI,KAAA,CAAM,kCAAkC,CAAA;AACjG,EAAO,OAAA,OAAA;AACT;AAGgB,SAAA,iBAAA,CAAkB,IAAuB,EAAA,EAAA,GAAK,kBAAqC,EAAA;AACjG,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,OAAA,EAAS,MAAW,KAAA;AACtC,IAAM,MAAA,KAAA,GAAQ,WAAW,MAAM,MAAA,CAAO,IAAI,KAAM,CAAA,+BAA+B,CAAC,CAAA,EAAG,EAAE,CAAA;AACrF,IAAA,IAAA,CAAK,KAAK,CAAW,OAAA,KAAA;AACnB,MAAA,YAAA,CAAa,KAAK,CAAA;AAClB,MAAA,OAAA,CAAQ,OAAO,CAAA;AAAA,KACjB,EAAG,CAAC,GAAiB,KAAA;AACnB,MAAA,YAAA,CAAa,KAAK,CAAA;AAClB,MAAA,MAAA,CAAO,GAAG,CAAA;AAAA,KACX,CAAA;AAAA,GACF,CAAA;AACH"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
function referenceMediaCaps(model) {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
return __spreadProps(__spreadValues(__spreadValues({
|
|
23
|
+
// A connector too old to report the count still says whether the
|
|
24
|
+
// model reads a source video; that one passthrough clip is all it takes.
|
|
25
|
+
clips: (_a = model == null ? void 0 : model.maxReferenceVideos) != null ? _a : (model == null ? void 0 : model.supportsVideoInput) ? 1 : 0,
|
|
26
|
+
audio: (_b = model == null ? void 0 : model.maxReferenceAudios) != null ? _b : 0
|
|
27
|
+
}, (model == null ? void 0 : model.maxReferenceVideoSeconds) ? {
|
|
28
|
+
clipSeconds: model.maxReferenceVideoSeconds
|
|
29
|
+
} : {}), (model == null ? void 0 : model.maxReferenceAudioSeconds) ? {
|
|
30
|
+
audioSeconds: model.maxReferenceAudioSeconds
|
|
31
|
+
} : {}), {
|
|
32
|
+
stills: (_c = model == null ? void 0 : model.maxReferenceImages) != null ? _c : 0,
|
|
33
|
+
framesBecomeStills: Boolean(model == null ? void 0 : model.referenceModel)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function takesClipList(caps) {
|
|
37
|
+
return caps.clips > 1;
|
|
38
|
+
}
|
|
39
|
+
function takesReferenceAudio(caps) {
|
|
40
|
+
return caps.audio > 0;
|
|
41
|
+
}
|
|
42
|
+
function clipSlots(caps, sourceAttached) {
|
|
43
|
+
const taken = sourceAttached ? 1 : 0;
|
|
44
|
+
return {
|
|
45
|
+
cap: Math.max(0, caps.clips - taken),
|
|
46
|
+
firstNumber: 1 + taken
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function referenceName(kind, position) {
|
|
50
|
+
return `${kind === "video" ? "Video" : "Audio"} ${position}`;
|
|
51
|
+
}
|
|
52
|
+
function formatSeconds(seconds) {
|
|
53
|
+
const rounded = Math.round(seconds * 10) / 10;
|
|
54
|
+
return `${Number.isInteger(rounded) ? rounded.toFixed(0) : rounded.toFixed(1)} s`;
|
|
55
|
+
}
|
|
56
|
+
function sumSeconds(items) {
|
|
57
|
+
let seconds = 0;
|
|
58
|
+
let unknown = 0;
|
|
59
|
+
for (const item of items) {
|
|
60
|
+
if (typeof item.seconds === "number" && Number.isFinite(item.seconds) && item.seconds > 0) seconds += item.seconds;
|
|
61
|
+
else unknown += 1;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
seconds,
|
|
65
|
+
unknown
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
69
|
+
const SECONDS_SLACK = 0.05;
|
|
70
|
+
function checkReferenceMedia(state, caps) {
|
|
71
|
+
var _a;
|
|
72
|
+
const problems = [];
|
|
73
|
+
const notes = [];
|
|
74
|
+
const source = (_a = state.source) != null ? _a : null;
|
|
75
|
+
if (state.clips.length > 0) {
|
|
76
|
+
const total = state.clips.length + (source ? 1 : 0);
|
|
77
|
+
if (total > caps.clips) {
|
|
78
|
+
problems.push(caps.clips <= (source ? 1 : 0) ? "This model takes no more reference clips - remove the extra ones." : `This model takes ${plural(caps.clips, "reference clip")} - remove ${total - caps.clips}.`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (caps.clipSeconds !== void 0 && (state.clips.length > 0 || source)) {
|
|
82
|
+
const timed = source && !source.measuring ? [...state.clips, source] : state.clips;
|
|
83
|
+
const {
|
|
84
|
+
seconds,
|
|
85
|
+
unknown
|
|
86
|
+
} = sumSeconds(timed);
|
|
87
|
+
if (seconds > caps.clipSeconds + SECONDS_SLACK) {
|
|
88
|
+
problems.push(`Reference clips run ${formatSeconds(seconds)} - this model takes ${formatSeconds(caps.clipSeconds)} in all. Trim or remove one.`);
|
|
89
|
+
} else if (unknown > 0) {
|
|
90
|
+
notes.push(`The length of ${plural(unknown, "clip")} could not be read. Together the clips must stay within ${formatSeconds(caps.clipSeconds)}, or the model refuses the run.`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (state.audio.length > 0) {
|
|
94
|
+
if (state.audio.length > caps.audio) {
|
|
95
|
+
problems.push(caps.audio === 0 ? "This model takes no reference audio - remove it or pick a model that does." : `This model takes ${plural(caps.audio, "audio track")} - remove ${state.audio.length - caps.audio}.`);
|
|
96
|
+
}
|
|
97
|
+
if (caps.audioSeconds !== void 0) {
|
|
98
|
+
const {
|
|
99
|
+
seconds,
|
|
100
|
+
unknown
|
|
101
|
+
} = sumSeconds(state.audio);
|
|
102
|
+
if (seconds > caps.audioSeconds + SECONDS_SLACK) {
|
|
103
|
+
problems.push(`Reference audio runs ${formatSeconds(seconds)} - this model takes ${formatSeconds(caps.audioSeconds)} in all. Trim or remove a track.`);
|
|
104
|
+
} else if (unknown > 0) {
|
|
105
|
+
notes.push(`The length of ${plural(unknown, "audio track")} could not be read. Together the tracks must stay within ${formatSeconds(caps.audioSeconds)}, or the model refuses the run.`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const carriesReferences = state.stillCount > 0 || state.clips.length > 0 || state.audio.length > 0 || source !== null;
|
|
110
|
+
const frames = (state.hasStartFrame ? 1 : 0) + (state.hasEndFrame ? 1 : 0);
|
|
111
|
+
if (caps.framesBecomeStills && carriesReferences && frames > 0) {
|
|
112
|
+
const which = state.hasStartFrame && state.hasEndFrame ? "the first frame is sent as Image 1 and the last frame as the final image" : state.hasStartFrame ? "the first frame is sent as Image 1" : "the last frame is sent as the final image";
|
|
113
|
+
notes.push(`With references attached this model runs on its reference lane, which has no frame inputs: ${which}, as references - the clip will not open or end on them exactly.`);
|
|
114
|
+
const stills = state.stillCount + frames;
|
|
115
|
+
if (caps.stills > 0 && stills > caps.stills) {
|
|
116
|
+
problems.push(`With references attached, frames count as reference stills: ${stills} of ${caps.stills}. Remove ${stills - caps.stills}.`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
problems,
|
|
121
|
+
notes
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function uniqueUrls(items) {
|
|
125
|
+
const out = [];
|
|
126
|
+
for (const item of items) {
|
|
127
|
+
const url = item.url.trim();
|
|
128
|
+
if (url && !out.includes(url)) out.push(url);
|
|
129
|
+
}
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
function referenceMediaParams(clips, audio) {
|
|
133
|
+
const videos = uniqueUrls(clips);
|
|
134
|
+
const tracks = uniqueUrls(audio);
|
|
135
|
+
return __spreadValues(__spreadValues({}, videos.length ? {
|
|
136
|
+
referenceVideoUrls: videos
|
|
137
|
+
} : {}), tracks.length ? {
|
|
138
|
+
referenceAudioUrls: tracks
|
|
139
|
+
} : {});
|
|
140
|
+
}
|
|
141
|
+
function referenceMediaBlock(model, attached) {
|
|
142
|
+
const caps = referenceMediaCaps(model);
|
|
143
|
+
const name = model.label || model.id;
|
|
144
|
+
if (attached.audioCount > caps.audio) {
|
|
145
|
+
return caps.audio === 0 ? `${name} takes no reference audio - remove the audio to use it` : `${name} takes ${plural(caps.audio, "audio track")} - remove some to use it`;
|
|
146
|
+
}
|
|
147
|
+
if (attached.clipCount > 0) {
|
|
148
|
+
if (!takesClipList(caps)) return `${name} takes no extra reference clips - remove them to use it`;
|
|
149
|
+
const total = attached.clipCount + (attached.sourceAttached ? 1 : 0);
|
|
150
|
+
if (total > caps.clips) return `${name} takes ${plural(caps.clips, "reference clip")} - remove some to use it`;
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
function footageBadge(caps) {
|
|
155
|
+
return takesClipList(caps) ? "Video 1 - steers motion, subject or style" : "Restyling this footage";
|
|
156
|
+
}export{checkReferenceMedia,clipSlots,footageBadge,formatSeconds,referenceMediaBlock,referenceMediaCaps,referenceMediaParams,referenceName,sumSeconds,takesClipList,takesReferenceAudio};//# sourceMappingURL=referenceMedia.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceMedia.js","sources":["../../../../../src/features/canvas/generator/video/referenceMedia.ts"],"sourcesContent":["/**\n * Reference clips and reference audio for the video lane - GENERATE's\n * `referenceVideoUrls` and `referenceAudioUrls`.\n *\n * Only a model with a reference lane takes them (Wan 3.0 and 3.0 Prime today:\n * 5 clips and 5 audio tracks, each kind at most 15 s combined), and the\n * connector refuses a request over any count rather than trimming it - but it\n * does NOT check the combined seconds, which the provider then refuses after\n * the upload. So every limit is checked here, before Generate, with the\n * numbers LIST_MODELS reports for the chosen model.\n *\n * Two connector behaviours shape the rest:\n * - The footage slot's clip (`referenceVideoUrl`, the board's \"Restyle a\n * video\") is folded in as the FIRST reference clip. It counts toward the\n * clip cap and the seconds, and the strip numbers its own clips after it.\n * - A reference lane has no frame inputs. A first or last frame sent with\n * references rides along as a reference still - first frame as Image 1,\n * last frame after the other stills - and counts toward the still cap.\n * The panel says so instead of letting a \"first frame\" quietly stop being one.\n */\nimport type { ModelInfo } from '../../generationModels';\n\nexport type ReferenceMediaKind = 'video' | 'audio';\n\n/** One attached clip or audio track. */\nexport interface ReferenceMediaItem {\n /** A hosted URL the provider can fetch. */\n url: string;\n name: string;\n /** Measured length; undefined when it could not be read. */\n seconds?: number;\n}\n\n/** What the chosen model takes, from its LIST_MODELS row. */\nexport interface ReferenceMediaCaps {\n /** Reference clips in all - the footage slot's one included. */\n clips: number;\n audio: number;\n /** Combined seconds the clips may run, when the provider publishes a limit. */\n clipSeconds?: number;\n audioSeconds?: number;\n /** Reference stills the model takes; on a reference lane, frames count toward it. */\n stills: number;\n /** Whether a request with references moves to a lane with no frame inputs. */\n framesBecomeStills: boolean;\n}\n\nexport function referenceMediaCaps(model: ModelInfo | undefined): ReferenceMediaCaps {\n return {\n // A connector too old to report the count still says whether the\n // model reads a source video; that one passthrough clip is all it takes.\n clips: model?.maxReferenceVideos ?? (model?.supportsVideoInput ? 1 : 0),\n audio: model?.maxReferenceAudios ?? 0,\n ...(model?.maxReferenceVideoSeconds ? { clipSeconds: model.maxReferenceVideoSeconds } : {}),\n ...(model?.maxReferenceAudioSeconds ? { audioSeconds: model.maxReferenceAudioSeconds } : {}),\n stills: model?.maxReferenceImages ?? 0,\n framesBecomeStills: Boolean(model?.referenceModel),\n };\n}\n\n/**\n * Whether the model gets the clip strip: it takes more clips than the footage\n * slot's one. A single-clip model (Wan 2.7's passthrough) keeps that slot and\n * nothing more.\n */\nexport function takesClipList(caps: ReferenceMediaCaps): boolean {\n return caps.clips > 1;\n}\n\nexport function takesReferenceAudio(caps: ReferenceMediaCaps): boolean {\n return caps.audio > 0;\n}\n\n/** Room left in the strip, and the number its first clip is called by, with or without footage in the slot. */\nexport function clipSlots(caps: ReferenceMediaCaps, sourceAttached: boolean): { cap: number; firstNumber: number } {\n const taken = sourceAttached ? 1 : 0;\n return { cap: Math.max(0, caps.clips - taken), firstNumber: 1 + taken };\n}\n\n/** How the prompt addresses an input - by position, as the providers read it. */\nexport function referenceName(kind: ReferenceMediaKind, position: number): string {\n return `${kind === 'video' ? 'Video' : 'Audio'} ${position}`;\n}\n\n/** \"9.5 s\", \"15 s\". */\nexport function formatSeconds(seconds: number): string {\n const rounded = Math.round(seconds * 10) / 10;\n return `${Number.isInteger(rounded) ? rounded.toFixed(0) : rounded.toFixed(1)} s`;\n}\n\n/** Known seconds summed, and how many lengths are unknown. */\nexport function sumSeconds(items: ReadonlyArray<{ seconds?: number }>): { seconds: number; unknown: number } {\n let seconds = 0;\n let unknown = 0;\n for (const item of items) {\n if (typeof item.seconds === 'number' && Number.isFinite(item.seconds) && item.seconds > 0)\n seconds += item.seconds;\n else unknown += 1;\n }\n return { seconds, unknown };\n}\n\nconst plural = (n: number, one: string, many = `${one}s`): string => `${n} ${n === 1 ? one : many}`;\n\n/** Lengths are read from metadata to a few milliseconds; a hair over the cap is the same clip, not a refusal. */\nconst SECONDS_SLACK = 0.05;\n\n/** What the panel holds, as the checks read it. */\nexport interface ReferenceMediaState {\n clips: readonly ReferenceMediaItem[];\n audio: readonly ReferenceMediaItem[];\n /**\n * The footage slot's clip, sent as the first reference clip; null when the\n * slot is empty. `measuring` while its length is still being read.\n */\n source?: { seconds?: number; measuring?: boolean } | null;\n /** Reference stills in \"Other references\". */\n stillCount: number;\n hasStartFrame: boolean;\n hasEndFrame: boolean;\n}\n\nexport interface ReferenceMediaCheck {\n /** What the model would refuse. Generate waits until these are gone. */\n problems: string[];\n /** What the person should know before spending; nothing blocks. */\n notes: string[];\n}\n\n/** Every limit the chosen model would refuse, plus what changes about the frames. */\nexport function checkReferenceMedia(state: ReferenceMediaState, caps: ReferenceMediaCaps): ReferenceMediaCheck {\n const problems: string[] = [];\n const notes: string[] = [];\n const source = state.source ?? null;\n\n // Clips: the strip's plus the footage slot's, which the connector sends first.\n if (state.clips.length > 0) {\n const total = state.clips.length + (source ? 1 : 0);\n if (total > caps.clips) {\n problems.push(\n caps.clips <= (source ? 1 : 0)\n ? 'This model takes no more reference clips - remove the extra ones.'\n : `This model takes ${plural(caps.clips, 'reference clip')} - remove ${total - caps.clips}.`,\n );\n }\n }\n // The seconds cap holds for the footage slot's clip on its own too: on a\n // reference lane it is a reference clip like the rest. One still being\n // measured is left out rather than reported as unreadable.\n if (caps.clipSeconds !== undefined && (state.clips.length > 0 || source)) {\n const timed = source && !source.measuring ? [...state.clips, source] : state.clips;\n const { seconds, unknown } = sumSeconds(timed);\n if (seconds > caps.clipSeconds + SECONDS_SLACK) {\n problems.push(\n `Reference clips run ${formatSeconds(seconds)} - this model takes ${formatSeconds(caps.clipSeconds)} in all. Trim or remove one.`,\n );\n } else if (unknown > 0) {\n notes.push(\n `The length of ${plural(unknown, 'clip')} could not be read. Together the clips must stay within ${formatSeconds(caps.clipSeconds)}, or the model refuses the run.`,\n );\n }\n }\n\n if (state.audio.length > 0) {\n if (state.audio.length > caps.audio) {\n problems.push(\n caps.audio === 0\n ? 'This model takes no reference audio - remove it or pick a model that does.'\n : `This model takes ${plural(caps.audio, 'audio track')} - remove ${state.audio.length - caps.audio}.`,\n );\n }\n if (caps.audioSeconds !== undefined) {\n const { seconds, unknown } = sumSeconds(state.audio);\n if (seconds > caps.audioSeconds + SECONDS_SLACK) {\n problems.push(\n `Reference audio runs ${formatSeconds(seconds)} - this model takes ${formatSeconds(caps.audioSeconds)} in all. Trim or remove a track.`,\n );\n } else if (unknown > 0) {\n notes.push(\n `The length of ${plural(unknown, 'audio track')} could not be read. Together the tracks must stay within ${formatSeconds(caps.audioSeconds)}, or the model refuses the run.`,\n );\n }\n }\n }\n\n // A reference lane has no frame inputs: frames ride along as stills.\n const carriesReferences =\n state.stillCount > 0 || state.clips.length > 0 || state.audio.length > 0 || source !== null;\n const frames = (state.hasStartFrame ? 1 : 0) + (state.hasEndFrame ? 1 : 0);\n if (caps.framesBecomeStills && carriesReferences && frames > 0) {\n const which =\n state.hasStartFrame && state.hasEndFrame\n ? 'the first frame is sent as Image 1 and the last frame as the final image'\n : state.hasStartFrame\n ? 'the first frame is sent as Image 1'\n : 'the last frame is sent as the final image';\n notes.push(\n `With references attached this model runs on its reference lane, which has no frame inputs: ${which}, as references - the clip will not open or end on them exactly.`,\n );\n const stills = state.stillCount + frames;\n if (caps.stills > 0 && stills > caps.stills) {\n problems.push(\n `With references attached, frames count as reference stills: ${stills} of ${caps.stills}. Remove ${stills - caps.stills}.`,\n );\n }\n }\n\n return { problems, notes };\n}\n\n/** Trimmed, non-empty, first occurrence kept - the connector would send a repeated URL once anyway. */\nfunction uniqueUrls(items: readonly ReferenceMediaItem[]): string[] {\n const out: string[] = [];\n for (const item of items) {\n const url = item.url.trim();\n if (url && !out.includes(url)) out.push(url);\n }\n return out;\n}\n\n/** The two list params, each only when it has something in it. */\nexport function referenceMediaParams(\n clips: readonly ReferenceMediaItem[],\n audio: readonly ReferenceMediaItem[],\n): { referenceVideoUrls?: string[]; referenceAudioUrls?: string[] } {\n const videos = uniqueUrls(clips);\n const tracks = uniqueUrls(audio);\n return {\n ...(videos.length ? { referenceVideoUrls: videos } : {}),\n ...(tracks.length ? { referenceAudioUrls: tracks } : {}),\n };\n}\n\n/**\n * Why switching to `model` would strand what is attached, or null when it\n * would not - the model menu's disabled reason, the same way it already turns\n * away a model that cannot read the footage.\n */\nexport function referenceMediaBlock(\n model: ModelInfo,\n attached: { clipCount: number; audioCount: number; sourceAttached: boolean },\n): string | null {\n const caps = referenceMediaCaps(model);\n const name = model.label || model.id;\n if (attached.audioCount > caps.audio) {\n return caps.audio === 0\n ? `${name} takes no reference audio - remove the audio to use it`\n : `${name} takes ${plural(caps.audio, 'audio track')} - remove some to use it`;\n }\n if (attached.clipCount > 0) {\n // A model without the strip would never be sent the strip's clips.\n if (!takesClipList(caps)) return `${name} takes no extra reference clips - remove them to use it`;\n const total = attached.clipCount + (attached.sourceAttached ? 1 : 0);\n if (total > caps.clips) return `${name} takes ${plural(caps.clips, 'reference clip')} - remove some to use it`;\n }\n return null;\n}\n\n/**\n * What the filled footage slot says it does with its clip. On a model with a\n * reference lane the clip steers a NEW video - it is sent as Video 1, ahead of\n * the strip's clips - and only a passthrough model restyles the footage itself.\n * (The EMPTY slot is not offered on a reference-lane model: the clip strip is\n * the one place to add clips there, and a second drop zone for the same thing\n * would only raise the question of which one to use.)\n */\nexport function footageBadge(caps: ReferenceMediaCaps): string {\n return takesClipList(caps) ? 'Video 1 - steers motion, subject or style' : 'Restyling this footage';\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA6CO,SAAS,mBAAmB,KAAkD,EAAA;AA7CrF,EA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;AAAA;AAEtF,EAAO,OAAA,IAAA;AACT;AAUO,SAAS,aAAa,IAAkC,EAAA;AAC7D,EAAO,OAAA,aAAA,CAAc,IAAI,CAAA,GAAI,2CAA8C,GAAA,wBAAA;AAC7E"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {useState,useMemo,useCallback,useEffect}from'react';import {modelTakesMotions}from'./cameraMotions.js';import {withinMeasureTime,readMediaSeconds}from'./mediaSeconds.js';import {referenceMediaCaps,takesClipList,takesReferenceAudio,clipSlots,checkReferenceMedia,referenceMediaBlock,footageBadge}from'./referenceMedia.js';import {buildVideoExtraOptions}from'./videoExtras.js';import {modelTakesSeed}from'./videoModelCaps.js';var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
function modelWait(held) {
|
|
21
|
+
const what = [held.clips > 0 ? held.clips === 1 ? "reference clip" : "reference clips" : "", held.audio > 0 ? "reference audio" : "", held.motions > 0 ? held.motions === 1 ? "camera move" : "camera moves" : "", held.seed ? "seed" : ""].filter(Boolean);
|
|
22
|
+
if (what.length === 0) return null;
|
|
23
|
+
const list = what.length === 1 ? what[0] : `${what.slice(0, -1).join(", ")} and ${what[what.length - 1]}`;
|
|
24
|
+
return `The video model has not loaded yet, so the ${list} would not go with the run. Wait a moment, or pick a model.`;
|
|
25
|
+
}
|
|
26
|
+
function uploadWait(clips, audio) {
|
|
27
|
+
const files = clips + audio;
|
|
28
|
+
if (files <= 0) return null;
|
|
29
|
+
const what = clips > 0 && audio > 0 ? "reference clips and audio" : clips > 0 ? `reference ${clips === 1 ? "clip" : "clips"}` : "reference audio";
|
|
30
|
+
return `Wait for the ${what} to finish uploading - a run started now would go without ${files === 1 ? "it" : "them"}.`;
|
|
31
|
+
}
|
|
32
|
+
function useVideoGenExtras({
|
|
33
|
+
model,
|
|
34
|
+
runAction,
|
|
35
|
+
hasStartFrame,
|
|
36
|
+
hasEndFrame,
|
|
37
|
+
stillCount,
|
|
38
|
+
sourceVideoUrl,
|
|
39
|
+
onNotice
|
|
40
|
+
}) {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
const [clips, setClips] = useState([]);
|
|
43
|
+
const [audio, setAudio] = useState([]);
|
|
44
|
+
const [motions, setMotions] = useState([]);
|
|
45
|
+
const [seed, setSeed] = useState(null);
|
|
46
|
+
const [source, setSource] = useState(null);
|
|
47
|
+
const [pendingClips, setPendingClips] = useState(0);
|
|
48
|
+
const [pendingAudio, setPendingAudio] = useState(0);
|
|
49
|
+
const caps = useMemo(() => referenceMediaCaps(model), [model]);
|
|
50
|
+
const takesClips = takesClipList(caps);
|
|
51
|
+
const takesAudio = takesReferenceAudio(caps);
|
|
52
|
+
const takesMotions = modelTakesMotions(model);
|
|
53
|
+
const takesSeed = modelTakesSeed(model);
|
|
54
|
+
const sourceAttached = Boolean(sourceVideoUrl);
|
|
55
|
+
const slots = clipSlots(caps, sourceAttached);
|
|
56
|
+
const clipRoom = takesClips ? slots.cap : 0;
|
|
57
|
+
const measure = useCallback((src, kind) => runAction ? withinMeasureTime(readMediaSeconds(runAction, src, kind)) : Promise.reject(new Error("No connector to read the length.")), [runAction]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (!sourceVideoUrl || caps.clipSeconds === void 0) return void 0;
|
|
60
|
+
if ((source == null ? void 0 : source.url) === sourceVideoUrl) return void 0;
|
|
61
|
+
let live = true;
|
|
62
|
+
measure(sourceVideoUrl, "video").then((seconds) => {
|
|
63
|
+
if (live) setSource({
|
|
64
|
+
url: sourceVideoUrl,
|
|
65
|
+
seconds
|
|
66
|
+
});
|
|
67
|
+
}, () => {
|
|
68
|
+
if (live) setSource({
|
|
69
|
+
url: sourceVideoUrl
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
return () => {
|
|
73
|
+
live = false;
|
|
74
|
+
};
|
|
75
|
+
}, [sourceVideoUrl, caps.clipSeconds, source == null ? void 0 : source.url, measure]);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (!model || clips.length <= clipRoom) return;
|
|
78
|
+
const dropped = clips.length - clipRoom;
|
|
79
|
+
setClips((prev) => prev.slice(0, clipRoom));
|
|
80
|
+
onNotice == null ? void 0 : onNotice(`${!takesClips ? "This model takes no extra reference clips" : `This model takes ${caps.clips} reference clip${caps.clips === 1 ? "" : "s"}`}. ${sourceAttached ? `The footage counts as Video 1 - ${dropped} removed.` : `${dropped} removed.`}`);
|
|
81
|
+
}, [model, clips.length, clipRoom, caps.clips, takesClips, sourceAttached]);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!model || audio.length <= caps.audio) return;
|
|
84
|
+
const dropped = audio.length - caps.audio;
|
|
85
|
+
setAudio((prev) => prev.slice(0, caps.audio));
|
|
86
|
+
onNotice == null ? void 0 : onNotice(`${caps.audio === 0 ? "This model takes no reference audio" : `This model takes ${caps.audio} audio track${caps.audio === 1 ? "" : "s"}`}. ${dropped} removed.`);
|
|
87
|
+
}, [model, audio.length, caps.audio]);
|
|
88
|
+
const sourceSeconds = sourceVideoUrl && (source == null ? void 0 : source.url) === sourceVideoUrl ? source.seconds : void 0;
|
|
89
|
+
const sourceMeasuring = Boolean(sourceVideoUrl) && caps.clipSeconds !== void 0 && (source == null ? void 0 : source.url) !== sourceVideoUrl;
|
|
90
|
+
const check = useMemo(() => checkReferenceMedia({
|
|
91
|
+
clips: takesClips ? clips : [],
|
|
92
|
+
audio: takesAudio ? audio : [],
|
|
93
|
+
source: sourceVideoUrl ? __spreadProps(__spreadValues({}, sourceSeconds ? {
|
|
94
|
+
seconds: sourceSeconds
|
|
95
|
+
} : {}), {
|
|
96
|
+
measuring: sourceMeasuring
|
|
97
|
+
}) : null,
|
|
98
|
+
stillCount,
|
|
99
|
+
hasStartFrame,
|
|
100
|
+
hasEndFrame
|
|
101
|
+
}, caps), [takesClips, takesAudio, clips, audio, sourceVideoUrl, sourceSeconds, sourceMeasuring, stillCount, hasStartFrame, hasEndFrame, caps]);
|
|
102
|
+
const motionProblem = takesMotions && !hasStartFrame && !hasEndFrame ? "Motion shots animate a first frame - add one under Reference." : null;
|
|
103
|
+
const uploadProblem = uploadWait(takesClips ? pendingClips : 0, takesAudio ? pendingAudio : 0);
|
|
104
|
+
const modelProblem = model ? null : modelWait({
|
|
105
|
+
clips: clips.length,
|
|
106
|
+
audio: audio.length,
|
|
107
|
+
motions: motions.length,
|
|
108
|
+
seed: seed !== null
|
|
109
|
+
});
|
|
110
|
+
const blocker = (_c = (_b = (_a = modelProblem != null ? modelProblem : motionProblem) != null ? _a : uploadProblem) != null ? _b : check.problems[0]) != null ? _c : null;
|
|
111
|
+
const options = useMemo(() => buildVideoExtraOptions({
|
|
112
|
+
model,
|
|
113
|
+
clips,
|
|
114
|
+
audio,
|
|
115
|
+
motions,
|
|
116
|
+
seed
|
|
117
|
+
}), [model, clips, audio, motions, seed]);
|
|
118
|
+
const take = useCallback(() => {
|
|
119
|
+
const taken = {
|
|
120
|
+
options,
|
|
121
|
+
inputs: {
|
|
122
|
+
clips: takesClips ? clips : [],
|
|
123
|
+
audio: takesAudio ? audio : []
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
if (takesClips) setClips([]);
|
|
127
|
+
if (takesAudio) setAudio([]);
|
|
128
|
+
return taken;
|
|
129
|
+
}, [options, clips, audio, takesClips, takesAudio]);
|
|
130
|
+
const trackUpload = useCallback((kind, files, work) => {
|
|
131
|
+
const count = kind === "video" ? setPendingClips : setPendingAudio;
|
|
132
|
+
count((n) => n + files);
|
|
133
|
+
return work.then(() => count((n) => Math.max(0, n - files)), () => count((n) => Math.max(0, n - files)));
|
|
134
|
+
}, []);
|
|
135
|
+
const restore = useCallback((inputs) => {
|
|
136
|
+
setClips((current) => current.length ? current : inputs.clips);
|
|
137
|
+
setAudio((current) => current.length ? current : inputs.audio);
|
|
138
|
+
}, []);
|
|
139
|
+
const resetInputs = useCallback(() => {
|
|
140
|
+
setClips([]);
|
|
141
|
+
setAudio([]);
|
|
142
|
+
}, []);
|
|
143
|
+
const blockReason = useCallback((candidate) => referenceMediaBlock(candidate, {
|
|
144
|
+
clipCount: clips.length,
|
|
145
|
+
audioCount: audio.length,
|
|
146
|
+
sourceAttached
|
|
147
|
+
}), [clips.length, audio.length, sourceAttached]);
|
|
148
|
+
return {
|
|
149
|
+
caps,
|
|
150
|
+
takesClips,
|
|
151
|
+
takesAudio,
|
|
152
|
+
takesMotions,
|
|
153
|
+
takesSeed,
|
|
154
|
+
clips,
|
|
155
|
+
setClips,
|
|
156
|
+
audio,
|
|
157
|
+
setAudio,
|
|
158
|
+
motions,
|
|
159
|
+
setMotions,
|
|
160
|
+
seed,
|
|
161
|
+
setSeed,
|
|
162
|
+
clipRoom,
|
|
163
|
+
clipFirstNumber: slots.firstNumber,
|
|
164
|
+
sourceSeconds,
|
|
165
|
+
footageBadge: footageBadge(caps),
|
|
166
|
+
check,
|
|
167
|
+
motionProblem,
|
|
168
|
+
pendingClips,
|
|
169
|
+
pendingAudio,
|
|
170
|
+
trackUpload,
|
|
171
|
+
blocker,
|
|
172
|
+
options,
|
|
173
|
+
take,
|
|
174
|
+
restore,
|
|
175
|
+
resetInputs,
|
|
176
|
+
blockReason,
|
|
177
|
+
measure
|
|
178
|
+
};
|
|
179
|
+
}export{modelWait,uploadWait,useVideoGenExtras};//# sourceMappingURL=useVideoGenExtras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVideoGenExtras.js","sources":["../../../../../src/features/canvas/generator/video/useVideoGenExtras.ts"],"sourcesContent":["/**\n * The video lane's newer inputs in one place (web `video/useVideoGenExtras.ts`):\n * reference clips, reference audio, camera moves and a seed, with which controls\n * the model gets, what would be refused before Generate, and the request fields.\n *\n * Clips and audio are inputs, like the frames: emptied when a run starts and put\n * back if it fails. Camera moves and the seed are settings, like the aspect: they\n * stay. Files on their way are counted here, not in the strip, because the upload\n * outlives it.\n */\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport type { ModelInfo } from '../../generationModels';\nimport type { RunMediaAction } from '../../videoEditor/mediaActions';\nimport { modelTakesMotions, type CameraMotionPick } from './cameraMotions';\nimport { readMediaSeconds, withinMeasureTime } from './mediaSeconds';\nimport {\n checkReferenceMedia,\n clipSlots,\n footageBadge,\n referenceMediaBlock,\n referenceMediaCaps,\n takesClipList,\n takesReferenceAudio,\n type ReferenceMediaCheck,\n type ReferenceMediaItem,\n type ReferenceMediaKind,\n} from './referenceMedia';\nimport { buildVideoExtraOptions, type VideoExtraOptions } from './videoExtras';\nimport { modelTakesSeed } from './videoModelCaps';\n\nexport interface VideoGenExtrasInput {\n /** The chosen video model's row; undefined while the list loads. */\n model: ModelInfo | undefined;\n runAction: RunMediaAction | undefined;\n hasStartFrame: boolean;\n hasEndFrame: boolean;\n /** Stills in \"Other references\". */\n stillCount: number;\n /** The footage slot's clip, which the connector sends as the first reference clip. */\n sourceVideoUrl: string | null;\n /** A trim the person should hear about (web's toast). */\n onNotice?: (line: string) => void;\n}\n\n/** What `take()` hands back: the request fields, and the inputs to put back if the run fails. */\nexport interface TakenVideoExtras {\n options: VideoExtraOptions;\n inputs: { clips: ReferenceMediaItem[]; audio: ReferenceMediaItem[] };\n}\n\n/** Why Generate waits when inputs are held for a model whose row has not loaded; null when none are. */\nexport function modelWait(held: { clips: number; audio: number; motions: number; seed: boolean }): string | null {\n const what = [\n held.clips > 0 ? (held.clips === 1 ? 'reference clip' : 'reference clips') : '',\n held.audio > 0 ? 'reference audio' : '',\n held.motions > 0 ? (held.motions === 1 ? 'camera move' : 'camera moves') : '',\n held.seed ? 'seed' : '',\n ].filter(Boolean);\n if (what.length === 0) return null;\n const list = what.length === 1 ? what[0] : `${what.slice(0, -1).join(', ')} and ${what[what.length - 1]}`;\n return `The video model has not loaded yet, so the ${list} would not go with the run. Wait a moment, or pick a model.`;\n}\n\n/** Why Generate waits for files still uploading to the strips, or null when none are. */\nexport function uploadWait(clips: number, audio: number): string | null {\n const files = clips + audio;\n if (files <= 0) return null;\n const what =\n clips > 0 && audio > 0\n ? 'reference clips and audio'\n : clips > 0\n ? `reference ${clips === 1 ? 'clip' : 'clips'}`\n : 'reference audio';\n return `Wait for the ${what} to finish uploading - a run started now would go without ${files === 1 ? 'it' : 'them'}.`;\n}\n\nexport function useVideoGenExtras({\n model,\n runAction,\n hasStartFrame,\n hasEndFrame,\n stillCount,\n sourceVideoUrl,\n onNotice,\n}: VideoGenExtrasInput) {\n const [clips, setClips] = useState<ReferenceMediaItem[]>([]);\n const [audio, setAudio] = useState<ReferenceMediaItem[]>([]);\n const [motions, setMotions] = useState<CameraMotionPick[]>([]);\n const [seed, setSeed] = useState<number | null>(null);\n /** The footage slot's length, keyed by its URL so a new clip is measured again. */\n const [source, setSource] = useState<{ url: string; seconds?: number } | null>(null);\n const [pendingClips, setPendingClips] = useState(0);\n const [pendingAudio, setPendingAudio] = useState(0);\n\n const caps = useMemo(() => referenceMediaCaps(model), [model]);\n const takesClips = takesClipList(caps);\n const takesAudio = takesReferenceAudio(caps);\n const takesMotions = modelTakesMotions(model);\n const takesSeed = modelTakesSeed(model);\n const sourceAttached = Boolean(sourceVideoUrl);\n const slots = clipSlots(caps, sourceAttached);\n const clipRoom = takesClips ? slots.cap : 0;\n\n const measure = useCallback(\n (src: string, kind: ReferenceMediaKind): Promise<number> =>\n runAction\n ? withinMeasureTime(readMediaSeconds(runAction, src, kind))\n : Promise.reject(new Error('No connector to read the length.')),\n [runAction],\n );\n\n useEffect(() => {\n if (!sourceVideoUrl || caps.clipSeconds === undefined) return undefined;\n if (source?.url === sourceVideoUrl) return undefined;\n let live = true;\n measure(sourceVideoUrl, 'video').then(\n (seconds) => {\n if (live) setSource({ url: sourceVideoUrl, seconds });\n },\n () => {\n if (live) setSource({ url: sourceVideoUrl });\n },\n );\n return () => {\n live = false;\n };\n }, [sourceVideoUrl, caps.clipSeconds, source?.url, measure]);\n\n // The pick can move by routes the menu does not guard (a command, the reference\n // re-pick). Trim to what the new model takes and say what went - never while the\n // list is loading, when there is no model to read.\n useEffect(() => {\n if (!model || clips.length <= clipRoom) return;\n const dropped = clips.length - clipRoom;\n setClips((prev) => prev.slice(0, clipRoom));\n onNotice?.(\n `${\n !takesClips\n ? 'This model takes no extra reference clips'\n : `This model takes ${caps.clips} reference clip${caps.clips === 1 ? '' : 's'}`\n }. ${sourceAttached ? `The footage counts as Video 1 - ${dropped} removed.` : `${dropped} removed.`}`,\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `onNotice` is a fresh closure each render\n }, [model, clips.length, clipRoom, caps.clips, takesClips, sourceAttached]);\n\n useEffect(() => {\n if (!model || audio.length <= caps.audio) return;\n const dropped = audio.length - caps.audio;\n setAudio((prev) => prev.slice(0, caps.audio));\n onNotice?.(\n `${\n caps.audio === 0\n ? 'This model takes no reference audio'\n : `This model takes ${caps.audio} audio track${caps.audio === 1 ? '' : 's'}`\n }. ${dropped} removed.`,\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `onNotice` is a fresh closure each render\n }, [model, audio.length, caps.audio]);\n\n const sourceSeconds = sourceVideoUrl && source?.url === sourceVideoUrl ? source.seconds : undefined;\n /** Still reading the footage's length - not the same as \"could not read it\". */\n const sourceMeasuring = Boolean(sourceVideoUrl) && caps.clipSeconds !== undefined && source?.url !== sourceVideoUrl;\n\n const check = useMemo<ReferenceMediaCheck>(\n () =>\n checkReferenceMedia(\n {\n clips: takesClips ? clips : [],\n audio: takesAudio ? audio : [],\n source: sourceVideoUrl\n ? { ...(sourceSeconds ? { seconds: sourceSeconds } : {}), measuring: sourceMeasuring }\n : null,\n stillCount,\n hasStartFrame,\n hasEndFrame,\n },\n caps,\n ),\n [\n takesClips,\n takesAudio,\n clips,\n audio,\n sourceVideoUrl,\n sourceSeconds,\n sourceMeasuring,\n stillCount,\n hasStartFrame,\n hasEndFrame,\n caps,\n ],\n );\n\n // A motion shot animates a frame; a lone last frame is taken as the start.\n const motionProblem =\n takesMotions && !hasStartFrame && !hasEndFrame\n ? 'Motion shots animate a first frame - add one under Reference.'\n : null;\n const uploadProblem = uploadWait(takesClips ? pendingClips : 0, takesAudio ? pendingAudio : 0);\n const modelProblem = model\n ? null\n : modelWait({ clips: clips.length, audio: audio.length, motions: motions.length, seed: seed !== null });\n const blocker = modelProblem ?? motionProblem ?? uploadProblem ?? check.problems[0] ?? null;\n\n const options = useMemo(\n () => buildVideoExtraOptions({ model, clips, audio, motions, seed }),\n [model, clips, audio, motions, seed],\n );\n\n /** The fields for a run that is starting; empties the per-run inputs it sends. */\n const take = useCallback((): TakenVideoExtras => {\n const taken = { options, inputs: { clips: takesClips ? clips : [], audio: takesAudio ? audio : [] } };\n if (takesClips) setClips([]);\n if (takesAudio) setAudio([]);\n return taken;\n }, [options, clips, audio, takesClips, takesAudio]);\n\n /** Count `files` on their way to a strip until `work` settles. */\n const trackUpload = useCallback((kind: ReferenceMediaKind, files: number, work: Promise<unknown>) => {\n const count = kind === 'video' ? setPendingClips : setPendingAudio;\n count((n) => n + files);\n return work.then(\n () => count((n) => Math.max(0, n - files)),\n () => count((n) => Math.max(0, n - files)),\n );\n }, []);\n\n /** Put a failed run's inputs back - unless new ones were attached meanwhile. */\n const restore = useCallback((inputs: TakenVideoExtras['inputs']) => {\n setClips((current) => (current.length ? current : inputs.clips));\n setAudio((current) => (current.length ? current : inputs.audio));\n }, []);\n\n /** Empty the per-run inputs - the panel opened for something else. */\n const resetInputs = useCallback(() => {\n setClips([]);\n setAudio([]);\n }, []);\n\n /** Why switching to `candidate` would strand what is attached; null when it would not. */\n const blockReason = useCallback(\n (candidate: ModelInfo) =>\n referenceMediaBlock(candidate, { clipCount: clips.length, audioCount: audio.length, sourceAttached }),\n [clips.length, audio.length, sourceAttached],\n );\n\n return {\n caps,\n takesClips,\n takesAudio,\n takesMotions,\n takesSeed,\n clips,\n setClips,\n audio,\n setAudio,\n motions,\n setMotions,\n seed,\n setSeed,\n clipRoom,\n clipFirstNumber: slots.firstNumber,\n sourceSeconds,\n footageBadge: footageBadge(caps),\n check,\n motionProblem,\n pendingClips,\n pendingAudio,\n trackUpload,\n blocker,\n options,\n take,\n restore,\n resetInputs,\n blockReason,\n measure,\n };\n}\n\nexport type VideoGenExtras = ReturnType<typeof useVideoGenExtras>;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA0CO,SAAS,UAAU,IAKR,EAAA;AAChB,EAAA,MAAM,IAAO,GAAA,CAAC,IAAK,CAAA,KAAA,GAAQ,CAAI,GAAA,IAAA,CAAK,KAAU,KAAA,CAAA,GAAI,gBAAmB,GAAA,iBAAA,GAAoB,EAAI,EAAA,IAAA,CAAK,QAAQ,CAAI,GAAA,iBAAA,GAAoB,EAAI,EAAA,IAAA,CAAK,OAAU,GAAA,CAAA,GAAI,IAAK,CAAA,OAAA,KAAY,IAAI,aAAgB,GAAA,cAAA,GAAiB,EAAI,EAAA,IAAA,CAAK,IAAO,GAAA,MAAA,GAAS,EAAE,CAAA,CAAE,OAAO,OAAO,CAAA;AAC1P,EAAI,IAAA,IA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A,CAAS,EAAE,CAAA;AAAA,GACb,EAAG,EAAE,CAAA;AAGL,EAAA,MAAM,WAAc,GAAA,WAAA,CAAY,CAAC,SAAA,KAAyB,oBAAoB,SAAW,EAAA;AAAA,IACvF,WAAW,KAAM,CAAA,MAAA;AAAA,IACjB,YAAY,KAAM,CAAA,MAAA;AAAA,IAClB;AAAA,GACD,GAAG,CAAC,KAAA,CAAM,QAAQ,KAAM,CAAA,MAAA,EAAQ,cAAc,CAAC,CAAA;AAChD,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,iBAAiB,KAAM,CAAA,WAAA;AAAA,IACvB,aAAA;AAAA,IACA,YAAA,EAAc,aAAa,IAAI,CAAA;AAAA,IAC/B,KAAA;AAAA,IACA,aAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACF;AACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {modelTakesMotions,motionsParam}from'./cameraMotions.js';import {referenceMediaCaps,referenceMediaParams,takesReferenceAudio,takesClipList}from'./referenceMedia.js';import {modelTakesSeed,normalizeSeed}from'./videoModelCaps.js';var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
function buildVideoExtraOptions(state) {
|
|
18
|
+
const caps = referenceMediaCaps(state.model);
|
|
19
|
+
const media = referenceMediaParams(takesClipList(caps) ? state.clips : [], takesReferenceAudio(caps) ? state.audio : []);
|
|
20
|
+
const motions = modelTakesMotions(state.model) ? motionsParam(state.motions) : void 0;
|
|
21
|
+
const seed = modelTakesSeed(state.model) ? normalizeSeed(state.seed, state.model) : void 0;
|
|
22
|
+
return __spreadValues(__spreadValues(__spreadValues({}, media), motions ? {
|
|
23
|
+
motions
|
|
24
|
+
} : {}), seed !== void 0 ? {
|
|
25
|
+
seed
|
|
26
|
+
} : {});
|
|
27
|
+
}
|
|
28
|
+
const plural = (n, one) => `${n} ${one}${n === 1 ? "" : "s"}`;
|
|
29
|
+
function describeVideoExtras(options) {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const parts = [((_a = options.referenceVideoUrls) == null ? void 0 : _a.length) ? plural(options.referenceVideoUrls.length, "reference clip") : "", ((_b = options.referenceAudioUrls) == null ? void 0 : _b.length) ? plural(options.referenceAudioUrls.length, "audio track") : "", ((_c = options.motions) == null ? void 0 : _c.length) ? plural(options.motions.length, "camera move") : ""].filter(Boolean);
|
|
32
|
+
const used = parts.length === 0 ? "" : parts.length === 1 ? parts[0] : `${parts.slice(0, -1).join(", ")} and ${parts[parts.length - 1]}`;
|
|
33
|
+
return [used ? `Used ${used}.` : "", options.seed !== void 0 ? `Seed ${options.seed}.` : ""].filter(Boolean).join(" ");
|
|
34
|
+
}export{buildVideoExtraOptions,describeVideoExtras};//# sourceMappingURL=videoExtras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoExtras.js","sources":["../../../../../src/features/canvas/generator/video/videoExtras.ts"],"sourcesContent":["/**\n * The GENERATE fields the video lane's newer inputs add to a run: reference\n * clips, reference audio, camera moves and a seed.\n *\n * Each field is sent only to a model that reads it. The panel hides a control\n * the chosen model cannot use, but what is held is not thrown away when the\n * pick moves - switch to Veo and back and the camera moves are still there -\n * so the request, not the panel, is where a field is left off. That is this\n * module's whole job, kept pure so the request shape is tested against the\n * connector's schema without a page.\n */\nimport type { ModelInfo } from '../../generationModels';\nimport { modelTakesMotions, motionsParam, type CameraMotionParam, type CameraMotionPick } from './cameraMotions';\nimport {\n referenceMediaCaps,\n referenceMediaParams,\n takesClipList,\n takesReferenceAudio,\n type ReferenceMediaItem,\n} from './referenceMedia';\nimport { modelTakesSeed, normalizeSeed } from './videoModelCaps';\n\n/** The fields added to generateVideoViaExec's options; same names as the connector's params. */\nexport interface VideoExtraOptions {\n /** Reference clips after the footage slot's one (which rides `referenceVideoUrl`). */\n referenceVideoUrls?: string[];\n referenceAudioUrls?: string[];\n /** At most two, `{ id, strength }` each. */\n motions?: CameraMotionParam[];\n seed?: number;\n}\n\n/** What the panel holds for these fields. */\nexport interface VideoExtrasState {\n model: ModelInfo | undefined;\n clips: readonly ReferenceMediaItem[];\n audio: readonly ReferenceMediaItem[];\n motions: readonly CameraMotionPick[];\n /** Null means no fixed seed: the provider picks one per run. */\n seed: number | null;\n}\n\n/** The request fields for the chosen model - each one left off a model that would not read it. */\nexport function buildVideoExtraOptions(state: VideoExtrasState): VideoExtraOptions {\n const caps = referenceMediaCaps(state.model);\n const media = referenceMediaParams(\n takesClipList(caps) ? state.clips : [],\n takesReferenceAudio(caps) ? state.audio : [],\n );\n const motions = modelTakesMotions(state.model) ? motionsParam(state.motions) : undefined;\n const seed = modelTakesSeed(state.model) ? normalizeSeed(state.seed, state.model) : undefined;\n return {\n ...media,\n ...(motions ? { motions } : {}),\n ...(seed !== undefined ? { seed } : {}),\n };\n}\n\nconst plural = (n: number, one: string): string => `${n} ${one}${n === 1 ? '' : 's'}`;\n\n/**\n * One or two sentences for the run's receipt: what rode along, and the seed -\n * the number someone needs to repeat a take they liked. Empty when none of\n * these fields were sent.\n */\nexport function describeVideoExtras(options: VideoExtraOptions): string {\n const parts = [\n options.referenceVideoUrls?.length ? plural(options.referenceVideoUrls.length, 'reference clip') : '',\n options.referenceAudioUrls?.length ? plural(options.referenceAudioUrls.length, 'audio track') : '',\n options.motions?.length ? plural(options.motions.length, 'camera move') : '',\n ].filter(Boolean);\n const used =\n parts.length === 0\n ? ''\n : parts.length === 1\n ? parts[0]\n : `${parts.slice(0, -1).join(', ')} and ${parts[parts.length - 1]}`;\n return [used ? `Used ${used}.` : '', options.seed !== undefined ? `Seed ${options.seed}.` : '']\n .filter(Boolean)\n .join(' ');\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqCO,SAAS,uBAAuB,KAA4C,EAAA;AACjF,EAAM,MAAA,IAAA,GAAO,kBAAmB,CAAA,KAAA,CAAM,KAAK,CAAA;AAC3C,EAAA,MAAM,KAAQ,GAAA,oBAAA,CAAqB,aAAc,CAAA,IAAI,IAAI,KAAM,CAAA,KAAA,GAAQ,EAAC,EAAG,oBAAoB,IAAI,CAAA,GAAI,KAAM,CAAA,KAAA,GAAQ,EAAE,CAAA;AACvH,EAAM,MAAA,OAAA,GAAU,kBAAkB,KAAM,CAAA,KAAK,IAAI,YAAa,CAAA,KAAA,CAAM,OAAO,CAAI,GAAA,MAAA;AAC/E,EAAM,MAAA,IAAA,GAAO,cAAe,CAAA,KAAA,CAAM,KAAK,CAAA,GAAI,cAAc,KAAM,CAAA,IAAA,EAAM,KAAM,CAAA,KAAK,CAAI,GAAA,MAAA;AACpF,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