@adminide-stack/yantra-mobile 12.0.129-alpha.0 → 12.0.129

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.
Files changed (360) hide show
  1. package/lib/compute.js +57 -1
  2. package/lib/compute.js.map +1 -1
  3. package/lib/features/agent-chat/NativeAgentChat.js +3 -2
  4. package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
  5. package/lib/features/apps/AppsCatalog.js +10 -0
  6. package/lib/features/apps/AppsCatalog.js.map +1 -1
  7. package/lib/features/apps/mobileAppCatalog.js +11 -0
  8. package/lib/features/apps/mobileAppCatalog.js.map +1 -1
  9. package/lib/features/canvas/AudioEditorExperience.js +448 -105
  10. package/lib/features/canvas/AudioEditorExperience.js.map +1 -1
  11. package/lib/features/canvas/CanvasAgentChatPane.js +33 -14
  12. package/lib/features/canvas/CanvasAgentChatPane.js.map +1 -1
  13. package/lib/features/canvas/CanvasBoardsGrid.js +493 -41
  14. package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
  15. package/lib/features/canvas/CanvasChatResultCard.js.map +1 -1
  16. package/lib/features/canvas/CanvasEditToolsPanel.js +37 -1
  17. package/lib/features/canvas/CanvasEditToolsPanel.js.map +1 -1
  18. package/lib/features/canvas/CanvasExperience.js +237 -22
  19. package/lib/features/canvas/CanvasExperience.js.map +1 -1
  20. package/lib/features/canvas/CanvasGeneratePanel.js +119 -26
  21. package/lib/features/canvas/CanvasGeneratePanel.js.map +1 -1
  22. package/lib/features/canvas/CanvasLooksPanel.js +17 -6
  23. package/lib/features/canvas/CanvasLooksPanel.js.map +1 -1
  24. package/lib/features/canvas/CanvasTasksPanel.js +18 -1
  25. package/lib/features/canvas/CanvasTasksPanel.js.map +1 -1
  26. package/lib/features/canvas/DesignCategoryGallery.js +423 -0
  27. package/lib/features/canvas/DesignCategoryGallery.js.map +1 -0
  28. package/lib/features/canvas/ImageEditorExperience.js +763 -187
  29. package/lib/features/canvas/ImageEditorExperience.js.map +1 -1
  30. package/lib/features/canvas/SetStudioExperience.js +199 -11
  31. package/lib/features/canvas/SetStudioExperience.js.map +1 -1
  32. package/lib/features/canvas/VideoEditorExperience.js +59 -40
  33. package/lib/features/canvas/VideoEditorExperience.js.map +1 -1
  34. package/lib/features/canvas/VideoGeneratorExperience.js +134 -34
  35. package/lib/features/canvas/VideoGeneratorExperience.js.map +1 -1
  36. package/lib/features/canvas/aiEdit.js +4 -2
  37. package/lib/features/canvas/aiEdit.js.map +1 -1
  38. package/lib/features/canvas/audioEditor/AudioWaveform.js +96 -0
  39. package/lib/features/canvas/audioEditor/AudioWaveform.js.map +1 -0
  40. package/lib/features/canvas/audioEditor/audioPeaks.js +93 -0
  41. package/lib/features/canvas/audioEditor/audioPeaks.js.map +1 -0
  42. package/lib/features/canvas/canvasTaskSync.js +34 -7
  43. package/lib/features/canvas/canvasTaskSync.js.map +1 -1
  44. package/lib/features/canvas/canvasTasks.js +23 -3
  45. package/lib/features/canvas/canvasTasks.js.map +1 -1
  46. package/lib/features/canvas/canvasTheme.js +10 -24
  47. package/lib/features/canvas/canvasTheme.js.map +1 -1
  48. package/lib/features/canvas/canvasUi.js +1 -1
  49. package/lib/features/canvas/canvasUi.js.map +1 -1
  50. package/lib/features/canvas/createTiles.js +17 -9
  51. package/lib/features/canvas/createTiles.js.map +1 -1
  52. package/lib/features/canvas/deepLinks.js +35 -5
  53. package/lib/features/canvas/deepLinks.js.map +1 -1
  54. package/lib/features/canvas/designCatalog.js +165 -0
  55. package/lib/features/canvas/designCatalog.js.map +1 -0
  56. package/lib/features/canvas/designCategories.js +262 -0
  57. package/lib/features/canvas/designCategories.js.map +1 -0
  58. package/lib/features/canvas/editorControls.js +406 -0
  59. package/lib/features/canvas/editorControls.js.map +1 -0
  60. package/lib/features/canvas/generationModels.js +5 -3
  61. package/lib/features/canvas/generationModels.js.map +1 -1
  62. package/lib/features/canvas/generationTasks.js +162 -0
  63. package/lib/features/canvas/generationTasks.js.map +1 -0
  64. package/lib/features/canvas/generator/BottomSheet.js +167 -0
  65. package/lib/features/canvas/generator/BottomSheet.js.map +1 -0
  66. package/lib/features/canvas/generator/BusinessCardChatCard.js +155 -0
  67. package/lib/features/canvas/generator/BusinessCardChatCard.js.map +1 -0
  68. package/lib/features/canvas/generator/DirectorSheet.js +163 -0
  69. package/lib/features/canvas/generator/DirectorSheet.js.map +1 -0
  70. package/lib/features/canvas/generator/ReframePreview.js +122 -0
  71. package/lib/features/canvas/generator/ReframePreview.js.map +1 -0
  72. package/lib/features/canvas/generator/RunLogCard.js +119 -0
  73. package/lib/features/canvas/generator/RunLogCard.js.map +1 -0
  74. package/lib/features/canvas/generator/ShotPanel.js +261 -0
  75. package/lib/features/canvas/generator/ShotPanel.js.map +1 -0
  76. package/lib/features/canvas/generator/businessCardWidget.js +117 -0
  77. package/lib/features/canvas/generator/businessCardWidget.js.map +1 -0
  78. package/lib/features/canvas/generator/cameraVocabulary.js +142 -0
  79. package/lib/features/canvas/generator/cameraVocabulary.js.map +1 -0
  80. package/lib/features/canvas/generator/cinematicVocabulary.js +416 -0
  81. package/lib/features/canvas/generator/cinematicVocabulary.js.map +1 -0
  82. package/lib/features/canvas/generator/direction.js +41 -0
  83. package/lib/features/canvas/generator/direction.js.map +1 -0
  84. package/lib/features/canvas/generator/reframeGeometry.js +108 -0
  85. package/lib/features/canvas/generator/reframeGeometry.js.map +1 -0
  86. package/lib/features/canvas/generator/runLog.js +71 -0
  87. package/lib/features/canvas/generator/runLog.js.map +1 -0
  88. package/lib/features/canvas/generator/shot.js +133 -0
  89. package/lib/features/canvas/generator/shot.js.map +1 -0
  90. package/lib/features/canvas/generator/useShotSpec.js +87 -0
  91. package/lib/features/canvas/generator/useShotSpec.js.map +1 -0
  92. package/lib/features/canvas/home/HeroComposer.js +214 -0
  93. package/lib/features/canvas/home/HeroComposer.js.map +1 -0
  94. package/lib/features/canvas/home/HeroMonitor.js +225 -0
  95. package/lib/features/canvas/home/HeroMonitor.js.map +1 -0
  96. package/lib/features/canvas/home/LookDetail.js +185 -0
  97. package/lib/features/canvas/home/LookDetail.js.map +1 -0
  98. package/lib/features/canvas/home/LoopingVideo.js +37 -0
  99. package/lib/features/canvas/home/LoopingVideo.js.map +1 -0
  100. package/lib/features/canvas/home/TemplatesGallery.js +253 -0
  101. package/lib/features/canvas/home/TemplatesGallery.js.map +1 -0
  102. package/lib/features/canvas/home/heroShots.js +100 -0
  103. package/lib/features/canvas/home/heroShots.js.map +1 -0
  104. package/lib/features/canvas/homeWork.js +62 -3
  105. package/lib/features/canvas/homeWork.js.map +1 -1
  106. package/lib/features/canvas/imageEditor/ImageMarkup.js +195 -0
  107. package/lib/features/canvas/imageEditor/ImageMarkup.js.map +1 -0
  108. package/lib/features/canvas/imageEditor/imageEditOps.js +367 -0
  109. package/lib/features/canvas/imageEditor/imageEditOps.js.map +1 -0
  110. package/lib/features/canvas/nativeViewerRegistry.js.map +1 -1
  111. package/lib/features/canvas/rankedCatalogSearch.js +375 -0
  112. package/lib/features/canvas/rankedCatalogSearch.js.map +1 -0
  113. package/lib/features/canvas/recorder/CameraRecorderExperience.js +68 -20
  114. package/lib/features/canvas/recorder/CameraRecorderExperience.js.map +1 -1
  115. package/lib/features/canvas/recorder/RecordingReview.js +272 -0
  116. package/lib/features/canvas/recorder/RecordingReview.js.map +1 -0
  117. package/lib/features/canvas/recorder/RecordingsList.js +179 -0
  118. package/lib/features/canvas/recorder/RecordingsList.js.map +1 -0
  119. package/lib/features/canvas/recorder/recorderOps.js +99 -0
  120. package/lib/features/canvas/recorder/recorderOps.js.map +1 -0
  121. package/lib/features/canvas/seedanceShowcase.js +314 -0
  122. package/lib/features/canvas/seedanceShowcase.js.map +1 -0
  123. package/lib/features/canvas/serverTasks.js +149 -15
  124. package/lib/features/canvas/serverTasks.js.map +1 -1
  125. package/lib/features/canvas/sessionRenewal.js +114 -0
  126. package/lib/features/canvas/sessionRenewal.js.map +1 -0
  127. package/lib/features/canvas/set/SetViewportWebView.js +34 -1
  128. package/lib/features/canvas/set/SetViewportWebView.js.map +1 -1
  129. package/lib/features/canvas/set/agent/setTurn.js +4 -2
  130. package/lib/features/canvas/set/agent/setTurn.js.map +1 -1
  131. package/lib/features/canvas/set/setPresets.js +85 -0
  132. package/lib/features/canvas/set/setPresets.js.map +1 -0
  133. package/lib/features/canvas/set/setProject.js +4 -1
  134. package/lib/features/canvas/set/setProject.js.map +1 -1
  135. package/lib/features/canvas/studioCatalog.js +59 -4
  136. package/lib/features/canvas/studioCatalog.js.map +1 -1
  137. package/lib/features/canvas/studioLooks.js +31 -4
  138. package/lib/features/canvas/studioLooks.js.map +1 -1
  139. package/lib/features/canvas/surfaceIndex.js +1 -14
  140. package/lib/features/canvas/surfaceIndex.js.map +1 -1
  141. package/lib/features/canvas/templateSearch.js +489 -0
  142. package/lib/features/canvas/templateSearch.js.map +1 -0
  143. package/lib/features/canvas/useCanvasSession.js +28 -6
  144. package/lib/features/canvas/useCanvasSession.js.map +1 -1
  145. package/lib/features/canvas/useStudioCatalogTemplates.js +41 -5
  146. package/lib/features/canvas/useStudioCatalogTemplates.js.map +1 -1
  147. package/lib/features/canvas/videoEditor/EditorPanels.js +531 -0
  148. package/lib/features/canvas/videoEditor/EditorPanels.js.map +1 -0
  149. package/lib/features/canvas/videoEditor/agent/AgentCutPane.js +48 -4
  150. package/lib/features/canvas/videoEditor/agent/AgentCutPane.js.map +1 -1
  151. package/lib/features/canvas/videoEditor/agent/agentLoop.js +2 -0
  152. package/lib/features/canvas/videoEditor/agent/agentLoop.js.map +1 -1
  153. package/lib/features/canvas/videoEditor/agent/brainClient.js +97 -27
  154. package/lib/features/canvas/videoEditor/agent/brainClient.js.map +1 -1
  155. package/lib/features/canvas/videoEditor/agent/cutTools.js +707 -3
  156. package/lib/features/canvas/videoEditor/agent/cutTools.js.map +1 -1
  157. package/lib/features/canvas/videoEditor/audioServices.js +165 -0
  158. package/lib/features/canvas/videoEditor/audioServices.js.map +1 -0
  159. package/lib/features/canvas/videoEditor/captions.js +144 -0
  160. package/lib/features/canvas/videoEditor/captions.js.map +1 -0
  161. package/lib/features/canvas/videoEditor/compileTimeline.js +24 -16
  162. package/lib/features/canvas/videoEditor/compileTimeline.js.map +1 -1
  163. package/lib/features/canvas/videoEditor/editorModel.js +12 -2
  164. package/lib/features/canvas/videoEditor/editorModel.js.map +1 -1
  165. package/lib/features/canvas/videoEditor/exportTask.js +89 -7
  166. package/lib/features/canvas/videoEditor/exportTask.js.map +1 -1
  167. package/lib/features/canvas/videoEditor/layers.js +117 -0
  168. package/lib/features/canvas/videoEditor/layers.js.map +1 -0
  169. package/lib/features/canvas/videoEditor/remoteMediaClient.js +45 -18
  170. package/lib/features/canvas/videoEditor/remoteMediaClient.js.map +1 -1
  171. package/lib/features/canvas/videoEditor/renderTimeline.js +18 -6
  172. package/lib/features/canvas/videoEditor/renderTimeline.js.map +1 -1
  173. package/lib/features/canvas/videoEditor/revoice.js +138 -0
  174. package/lib/features/canvas/videoEditor/revoice.js.map +1 -0
  175. package/lib/features/canvas/videoEditor/storageUpload.js +34 -0
  176. package/lib/features/canvas/videoEditor/storageUpload.js.map +1 -0
  177. package/lib/features/canvas/videoEditor/textMotion.js +109 -0
  178. package/lib/features/canvas/videoEditor/textMotion.js.map +1 -0
  179. package/lib/features/canvas/videoEditor/transitions.js +31 -0
  180. package/lib/features/canvas/videoEditor/transitions.js.map +1 -0
  181. package/lib/features/chat/TemplatesChatCards.js +8 -3
  182. package/lib/features/chat/TemplatesChatCards.js.map +1 -1
  183. package/lib/features/design/DesignEditorExperience.js +674 -644
  184. package/lib/features/design/DesignEditorExperience.js.map +1 -1
  185. package/lib/features/design/DesignExperience.js +285 -538
  186. package/lib/features/design/DesignExperience.js.map +1 -1
  187. package/lib/features/design/designCore.js +2 -212
  188. package/lib/features/design/designCore.js.map +1 -1
  189. package/lib/features/design/designIndex.js +1 -50
  190. package/lib/features/design/designIndex.js.map +1 -1
  191. package/lib/features/design/doc/aiDesign.js +247 -0
  192. package/lib/features/design/doc/aiDesign.js.map +1 -0
  193. package/lib/features/design/doc/artifacts.js +280 -0
  194. package/lib/features/design/doc/artifacts.js.map +1 -0
  195. package/lib/features/design/doc/chart.js +98 -0
  196. package/lib/features/design/doc/chart.js.map +1 -0
  197. package/lib/features/design/doc/crop.js +104 -0
  198. package/lib/features/design/doc/crop.js.map +1 -0
  199. package/lib/features/design/doc/curve.js +49 -0
  200. package/lib/features/design/doc/curve.js.map +1 -0
  201. package/lib/features/design/doc/docOps.js +397 -0
  202. package/lib/features/design/doc/docOps.js.map +1 -0
  203. package/lib/features/design/doc/findReplace.js +112 -0
  204. package/lib/features/design/doc/findReplace.js.map +1 -0
  205. package/lib/features/design/doc/fonts.js +79 -0
  206. package/lib/features/design/doc/fonts.js.map +1 -0
  207. package/lib/features/design/doc/frames.js +17 -0
  208. package/lib/features/design/doc/frames.js.map +1 -0
  209. package/lib/features/design/doc/geometry.js +133 -0
  210. package/lib/features/design/doc/geometry.js.map +1 -0
  211. package/lib/features/design/doc/imageAdjust.js +203 -0
  212. package/lib/features/design/doc/imageAdjust.js.map +1 -0
  213. package/lib/features/design/doc/legacyDoc.js +107 -0
  214. package/lib/features/design/doc/legacyDoc.js.map +1 -0
  215. package/lib/features/design/doc/newDoc.js +335 -0
  216. package/lib/features/design/doc/newDoc.js.map +1 -0
  217. package/lib/features/design/doc/pageRange.js +17 -0
  218. package/lib/features/design/doc/pageRange.js.map +1 -0
  219. package/lib/features/design/doc/pathScale.js +68 -0
  220. package/lib/features/design/doc/pathScale.js.map +1 -0
  221. package/lib/features/design/doc/qr.js +62 -0
  222. package/lib/features/design/doc/qr.js.map +1 -0
  223. package/lib/features/design/doc/shapes.js +366 -0
  224. package/lib/features/design/doc/shapes.js.map +1 -0
  225. package/lib/features/design/doc/sizes.js +230 -0
  226. package/lib/features/design/doc/sizes.js.map +1 -0
  227. package/lib/features/design/doc/textEffects.js +134 -0
  228. package/lib/features/design/doc/textEffects.js.map +1 -0
  229. package/lib/features/design/doc/textLayout.js +182 -0
  230. package/lib/features/design/doc/textLayout.js.map +1 -0
  231. package/lib/features/design/doc/types.js +30 -0
  232. package/lib/features/design/doc/types.js.map +1 -0
  233. package/lib/features/design/editor/AiPanel.js +194 -0
  234. package/lib/features/design/editor/AiPanel.js.map +1 -0
  235. package/lib/features/design/editor/ChartDataPanel.js +182 -0
  236. package/lib/features/design/editor/ChartDataPanel.js.map +1 -0
  237. package/lib/features/design/editor/CropOverlay.js +199 -0
  238. package/lib/features/design/editor/CropOverlay.js.map +1 -0
  239. package/lib/features/design/editor/DesignCanvas.js +363 -0
  240. package/lib/features/design/editor/DesignCanvas.js.map +1 -0
  241. package/lib/features/design/editor/ExportSheet.js +123 -0
  242. package/lib/features/design/editor/ExportSheet.js.map +1 -0
  243. package/lib/features/design/editor/FindReplacePanel.js +93 -0
  244. package/lib/features/design/editor/FindReplacePanel.js.map +1 -0
  245. package/lib/features/design/editor/ImageTools.js +188 -0
  246. package/lib/features/design/editor/ImageTools.js.map +1 -0
  247. package/lib/features/design/editor/LayerTools.js +485 -0
  248. package/lib/features/design/editor/LayerTools.js.map +1 -0
  249. package/lib/features/design/editor/PageStrip.js +203 -0
  250. package/lib/features/design/editor/PageStrip.js.map +1 -0
  251. package/lib/features/design/editor/Slideshow.js +97 -0
  252. package/lib/features/design/editor/Slideshow.js.map +1 -0
  253. package/lib/features/design/editor/ToolPanels.js +695 -0
  254. package/lib/features/design/editor/ToolPanels.js.map +1 -0
  255. package/lib/features/design/editor/controls.js +630 -0
  256. package/lib/features/design/editor/controls.js.map +1 -0
  257. package/lib/features/design/editor/useDesignSave.js +91 -0
  258. package/lib/features/design/editor/useDesignSave.js.map +1 -0
  259. package/lib/features/design/export/exportDesign.js +170 -0
  260. package/lib/features/design/export/exportDesign.js.map +1 -0
  261. package/lib/features/design/export/pdf.js +143 -0
  262. package/lib/features/design/export/pdf.js.map +1 -0
  263. package/lib/features/design/home/DesignHome.js +688 -0
  264. package/lib/features/design/home/DesignHome.js.map +1 -0
  265. package/lib/features/design/home/studioHome.js +61 -0
  266. package/lib/features/design/home/studioHome.js.map +1 -0
  267. package/lib/features/design/pickDesignImage.js +60 -0
  268. package/lib/features/design/pickDesignImage.js.map +1 -0
  269. package/lib/features/design/render/DesignPageView.js +69 -0
  270. package/lib/features/design/render/DesignPageView.js.map +1 -0
  271. package/lib/features/design/render/PageCapture.js +288 -0
  272. package/lib/features/design/render/PageCapture.js.map +1 -0
  273. package/lib/features/design/render/TextMeasure.js +115 -0
  274. package/lib/features/design/render/TextMeasure.js.map +1 -0
  275. package/lib/features/design/render/fontRegistry.js +110 -0
  276. package/lib/features/design/render/fontRegistry.js.map +1 -0
  277. package/lib/features/design/render/layers.js +392 -0
  278. package/lib/features/design/render/layers.js.map +1 -0
  279. package/lib/features/design/render/svg.js +35 -0
  280. package/lib/features/design/render/svg.js.map +1 -0
  281. package/lib/features/design/render/svgParts.js +435 -0
  282. package/lib/features/design/render/svgParts.js.map +1 -0
  283. package/lib/features/design/surface/BoardScreen.js +529 -0
  284. package/lib/features/design/surface/BoardScreen.js.map +1 -0
  285. package/lib/features/design/surface/CompareView.js +138 -0
  286. package/lib/features/design/surface/CompareView.js.map +1 -0
  287. package/lib/features/design/surface/CreationScreen.js +294 -0
  288. package/lib/features/design/surface/CreationScreen.js.map +1 -0
  289. package/lib/features/design/surface/DesignAgentChatPane.js +444 -0
  290. package/lib/features/design/surface/DesignAgentChatPane.js.map +1 -0
  291. package/lib/features/design/surface/DesignBoards.js +441 -0
  292. package/lib/features/design/surface/DesignBoards.js.map +1 -0
  293. package/lib/features/design/surface/DesignPreview.js +159 -0
  294. package/lib/features/design/surface/DesignPreview.js.map +1 -0
  295. package/lib/features/design/surface/DesignSurfaceExperience.js +80 -0
  296. package/lib/features/design/surface/DesignSurfaceExperience.js.map +1 -0
  297. package/lib/features/design/surface/FullScreenPreview.js +59 -0
  298. package/lib/features/design/surface/FullScreenPreview.js.map +1 -0
  299. package/lib/features/design/surface/NewSystemDialog.js +122 -0
  300. package/lib/features/design/surface/NewSystemDialog.js.map +1 -0
  301. package/lib/features/design/surface/PickerSheet.js +175 -0
  302. package/lib/features/design/surface/PickerSheet.js.map +1 -0
  303. package/lib/features/design/surface/TemplatesGallery.js +156 -0
  304. package/lib/features/design/surface/TemplatesGallery.js.map +1 -0
  305. package/lib/features/design/surface/WetPaint.js +140 -0
  306. package/lib/features/design/surface/WetPaint.js.map +1 -0
  307. package/lib/features/design/surface/agentTurn.js +229 -0
  308. package/lib/features/design/surface/agentTurn.js.map +1 -0
  309. package/lib/features/design/surface/designBoard.js +218 -0
  310. package/lib/features/design/surface/designBoard.js.map +1 -0
  311. package/lib/features/design/surface/designChannel.js +186 -0
  312. package/lib/features/design/surface/designChannel.js.map +1 -0
  313. package/lib/features/design/surface/designChat.js +141 -0
  314. package/lib/features/design/surface/designChat.js.map +1 -0
  315. package/lib/features/design/surface/designConnector.js +266 -0
  316. package/lib/features/design/surface/designConnector.js.map +1 -0
  317. package/lib/features/design/surface/designDocument.js +40 -0
  318. package/lib/features/design/surface/designDocument.js.map +1 -0
  319. package/lib/features/design/surface/designExport.js +55 -0
  320. package/lib/features/design/surface/designExport.js.map +1 -0
  321. package/lib/features/design/surface/designLinks.js +64 -0
  322. package/lib/features/design/surface/designLinks.js.map +1 -0
  323. package/lib/features/design/surface/designPalette.js +24 -0
  324. package/lib/features/design/surface/designPalette.js.map +1 -0
  325. package/lib/features/design/surface/designRun.js +161 -0
  326. package/lib/features/design/surface/designRun.js.map +1 -0
  327. package/lib/features/design/surface/designTheme.js +119 -0
  328. package/lib/features/design/surface/designTheme.js.map +1 -0
  329. package/lib/features/design/surface/execStream.js +206 -0
  330. package/lib/features/design/surface/execStream.js.map +1 -0
  331. package/lib/features/design/surface/metaball.js +48 -0
  332. package/lib/features/design/surface/metaball.js.map +1 -0
  333. package/lib/features/design/surface/pickReferenceFiles.js +35 -0
  334. package/lib/features/design/surface/pickReferenceFiles.js.map +1 -0
  335. package/lib/features/design/surface/useDesignSurface.js +379 -0
  336. package/lib/features/design/surface/useDesignSurface.js.map +1 -0
  337. package/lib/features/docs/DocBlockRow.js +336 -0
  338. package/lib/features/docs/DocBlockRow.js.map +1 -0
  339. package/lib/features/docs/DocsEditorExperience.js +949 -0
  340. package/lib/features/docs/DocsEditorExperience.js.map +1 -0
  341. package/lib/features/docs/DocsToolbar.js +247 -0
  342. package/lib/features/docs/DocsToolbar.js.map +1 -0
  343. package/lib/features/docs/blocks.js +560 -0
  344. package/lib/features/docs/blocks.js.map +1 -0
  345. package/lib/features/docs/docArtifacts.js +129 -0
  346. package/lib/features/docs/docArtifacts.js.map +1 -0
  347. package/lib/features/docs/docEdits.js +201 -0
  348. package/lib/features/docs/docEdits.js.map +1 -0
  349. package/lib/features/docs/docExport.js +235 -0
  350. package/lib/features/docs/docExport.js.map +1 -0
  351. package/lib/features/docs/docShare.js +62 -0
  352. package/lib/features/docs/docShare.js.map +1 -0
  353. package/lib/features/links/openInApp.js +38 -2
  354. package/lib/features/links/openInApp.js.map +1 -1
  355. package/lib/routes.json +54 -0
  356. package/lib/screens/DesignNative/index.js +35 -0
  357. package/lib/screens/DesignNative/index.js.map +1 -0
  358. package/package.json +4 -4
  359. package/lib/features/design/exportDesign.js +0 -133
  360. package/lib/features/design/exportDesign.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useMemo,useState,useCallback,useEffect}from'react';import {View,Text,Linking,ActivityIndicator,StyleSheet}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {resultUrl,friendlyMediaError}from'./videoEditor/mediaActions.js';import {useCanvasTheme,themedStyles}from'./canvasTheme.js';import {Pressable,pressedStyle,RADIUS,SPACE,TYPE}from'./canvasUi.js';var __defProp = Object.defineProperty;
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useMemo,useState,useCallback,useEffect}from'react';import {View,Text,Linking,ActivityIndicator,ScrollView,StyleSheet}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {friendlyMediaError,resultUrl}from'./videoEditor/mediaActions.js';import {unwrapProxyUrl}from'./videoEditor/remoteMediaClient.js';import {useCanvasTheme,themedStyles}from'./canvasTheme.js';import {Pressable,pressedStyle,RADIUS,SPACE,TYPE}from'./canvasUi.js';import {MediaUrlPicker,ApplyButton,SliderRow,ChoiceRow,ToggleRow,TextField,NumberField}from'./editorControls.js';import {placeholderPeaks,fetchAudioPeaks}from'./audioEditor/audioPeaks.js';import {AudioWaveform}from'./audioEditor/AudioWaveform.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -17,28 +17,154 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- const WAVE_BARS = [0.35, 0.55, 0.8, 0.5, 0.65, 0.95, 0.7, 0.45, 0.6, 0.85, 1, 0.75, 0.5, 0.4, 0.62, 0.88, 0.7, 0.52, 0.36, 0.58, 0.8, 0.92, 0.66, 0.48, 0.7, 0.84, 0.6, 0.42, 0.55, 0.78, 0.64, 0.38];
20
+ const HSCROLL = {
21
+ flexGrow: 0
22
+ };
23
+ const AUDIO_EDIT_ACTIONS = {
24
+ probe: "YANTRA_AUDIO_EDIT_PROBE",
25
+ trim: "YANTRA_AUDIO_EDIT_TRIM",
26
+ volume: "YANTRA_AUDIO_EDIT_VOLUME",
27
+ volume_db: "YANTRA_AUDIO_EDIT_VOLUME_DB",
28
+ fade: "YANTRA_AUDIO_EDIT_FADE",
29
+ mix: "YANTRA_AUDIO_EDIT_MIX",
30
+ concat: "YANTRA_AUDIO_EDIT_CONCAT",
31
+ speed: "YANTRA_AUDIO_EDIT_SPEED",
32
+ normalize: "YANTRA_AUDIO_EDIT_NORMALIZE",
33
+ delay: "YANTRA_AUDIO_EDIT_DELAY",
34
+ convert: "YANTRA_AUDIO_EDIT_CONVERT",
35
+ extract: "YANTRA_AUDIO_EDIT_EXTRACT",
36
+ silence_remove: "YANTRA_AUDIO_EDIT_SILENCE_REMOVE",
37
+ reverse: "YANTRA_AUDIO_EDIT_REVERSE"
38
+ };
39
+ const TOOLS = [{
40
+ id: "trim",
41
+ label: "Trim",
42
+ icon: "content-cut"
43
+ }, {
44
+ id: "volume",
45
+ label: "Volume",
46
+ icon: "volume-high"
47
+ }, {
48
+ id: "fade",
49
+ label: "Fade",
50
+ icon: "sine-wave"
51
+ }, {
52
+ id: "speed",
53
+ label: "Speed",
54
+ icon: "speedometer"
55
+ }, {
56
+ id: "normalize",
57
+ label: "Normalize",
58
+ icon: "chart-bar"
59
+ }, {
60
+ id: "delay",
61
+ label: "Delay",
62
+ icon: "clock-outline"
63
+ }, {
64
+ id: "silence",
65
+ label: "Silence",
66
+ icon: "microphone-off"
67
+ }, {
68
+ id: "reverse",
69
+ label: "Reverse",
70
+ icon: "rewind"
71
+ }, {
72
+ id: "convert",
73
+ label: "Convert",
74
+ icon: "file-music-outline"
75
+ }, {
76
+ id: "mix",
77
+ label: "Mix",
78
+ icon: "source-merge"
79
+ }, {
80
+ id: "concat",
81
+ label: "Concat",
82
+ icon: "link-variant"
83
+ }, {
84
+ id: "extract",
85
+ label: "Extract",
86
+ icon: "file-video-outline"
87
+ }, {
88
+ id: "info",
89
+ label: "Info",
90
+ icon: "information-outline"
91
+ }];
92
+ function fmtTime(secs) {
93
+ if (!Number.isFinite(secs)) return "0:00";
94
+ const m = Math.floor(secs / 60);
95
+ const sec = Math.floor(secs % 60);
96
+ const d = Math.floor(secs % 1 * 10);
97
+ return `${m}:${String(sec).padStart(2, "0")}.${d}`;
98
+ }
21
99
  function AudioEditorExperience({
22
100
  src,
23
101
  name,
24
102
  runAction,
25
103
  onClose,
26
- onSave
104
+ onSave,
105
+ libraryItems
27
106
  }) {
107
+ var _c;
28
108
  const theme = useCanvasTheme();
29
109
  const styles = useMemo(() => makeStyles(theme), [theme]);
30
110
  const [history, setHistory] = useState([src]);
31
111
  const [busy, setBusy] = useState(null);
32
112
  const [notice, setNotice] = useState(null);
33
113
  const [playing, setPlaying] = useState(false);
34
- const [durationMs, setDurationMs] = useState(null);
114
+ const [playhead, setPlayhead] = useState(null);
115
+ const [durationSec, setDurationSec] = useState(0);
116
+ const [peaks, setPeaks] = useState(() => placeholderPeaks(src));
117
+ const [realWave, setRealWave] = useState(false);
118
+ const [selection, setSelection] = useState(null);
119
+ const [probe, setProbe] = useState(null);
120
+ const [tool, setTool] = useState("trim");
121
+ const current = history[history.length - 1];
122
+ const edited = history.length > 1;
35
123
  const [trim, setTrim] = useState({
36
124
  startMs: 0,
37
125
  endMs: 0
38
126
  });
39
- const current = history[history.length - 1];
40
- const edited = history.length > 1;
41
- const apply = useCallback((label, action, params) => {
127
+ const [volumeLevel, setVolumeLevel] = useState(1);
128
+ const [volumeDb, setVolumeDb] = useState(0);
129
+ const [fade, setFade] = useState({
130
+ inMs: 1e3,
131
+ outMs: 1e3,
132
+ curve: "tri"
133
+ });
134
+ const [speed, setSpeed] = useState(1);
135
+ const [lufs, setLufs] = useState({
136
+ i: -16,
137
+ tp: -1.5,
138
+ lra: 11
139
+ });
140
+ const [delayMs, setDelayMs] = useState(500);
141
+ const [silence, setSilence] = useState({
142
+ db: -50,
143
+ minMs: 500,
144
+ leading: true,
145
+ trailing: true
146
+ });
147
+ const [conv, setConv] = useState({
148
+ format: "mp3",
149
+ bitrate: "192k",
150
+ sampleRate: "",
151
+ channels: ""
152
+ });
153
+ const [mixUrl, setMixUrl] = useState("");
154
+ const [mixDuration, setMixDuration] = useState("longest");
155
+ const [mixNormalize, setMixNormalize] = useState(true);
156
+ const [concatUrl, setConcatUrl] = useState("");
157
+ const [crossfadeMs, setCrossfadeMs] = useState(0);
158
+ const [extractUrl, setExtractUrl] = useState("");
159
+ const media = useMemo(() => (libraryItems != null ? libraryItems : []).filter((item) => item.src !== current).map((item) => ({
160
+ id: item.id,
161
+ src: unwrapProxyUrl(item.src),
162
+ label: item.generatedAssetName,
163
+ kind: item.type
164
+ })), [current, libraryItems]);
165
+ const audioItems = media.filter((m) => m.kind === "audio");
166
+ const videoItems = media.filter((m) => m.kind === "video");
167
+ const run = useCallback((label, fn) => {
42
168
  if (!runAction) {
43
169
  setNotice("Editing needs the host connector - not wired in this host.");
44
170
  return;
@@ -46,38 +172,283 @@ function AudioEditorExperience({
46
172
  if (busy) return;
47
173
  setBusy(label);
48
174
  setPlaying(false);
49
- runAction("yantra-audio-editing", action, __spreadValues({
50
- input_url: current
51
- }, params)).then((result) => {
52
- setHistory((h) => [...h, resultUrl(result, action)]);
175
+ fn().then((url) => {
176
+ setHistory((h) => [...h, url]);
53
177
  setNotice(null);
54
- setDurationMs(null);
55
178
  }).catch((err) => setNotice(friendlyMediaError(err, "audio edit"))).finally(() => setBusy(null));
56
- }, [busy, current, runAction]);
179
+ }, [busy, runAction]);
180
+ const apply = useCallback((label, op, params, input) => run(label, async () => {
181
+ const action = AUDIO_EDIT_ACTIONS[op];
182
+ const result = await runAction("yantra-audio-editing", action, __spreadValues({
183
+ input_url: unwrapProxyUrl(input != null ? input : current)
184
+ }, params));
185
+ return resultUrl(result, action);
186
+ }), [current, run, runAction]);
57
187
  useEffect(() => {
58
- if (!runAction || durationMs !== null) return;
188
+ setSelection(null);
189
+ setPlayhead(null);
190
+ setProbe(null);
191
+ setRealWave(false);
192
+ setDurationSec(0);
193
+ setTrim({
194
+ startMs: 0,
195
+ endMs: 0
196
+ });
197
+ setPeaks(placeholderPeaks(current));
198
+ if (!runAction) return;
59
199
  let cancelled = false;
60
- runAction("yantra-audio-editing", "YANTRA_AUDIO_EDIT_PROBE", {
61
- input_url: current
200
+ runAction("yantra-audio-editing", AUDIO_EDIT_ACTIONS.probe, {
201
+ input_url: unwrapProxyUrl(current)
62
202
  }).then((result) => {
63
- var _a;
203
+ var _a2, _b2;
64
204
  if (cancelled) return;
65
- const secs = Number((_a = result.duration_secs) != null ? _a : result.duration);
205
+ const data = (_a2 = result.data) != null ? _a2 : result;
206
+ setProbe(data);
207
+ const ms = Number(data.duration_ms);
208
+ const secs = Number.isFinite(ms) && ms > 0 ? ms / 1e3 : Number((_b2 = data.duration_secs) != null ? _b2 : data.duration);
66
209
  if (Number.isFinite(secs) && secs > 0) {
67
- const ms = Math.round(secs * 1e3);
68
- setDurationMs(ms);
210
+ setDurationSec(secs);
69
211
  setTrim({
70
212
  startMs: 0,
71
- endMs: ms
213
+ endMs: Math.round(secs * 1e3)
72
214
  });
73
215
  }
74
216
  }).catch(() => {
75
217
  });
218
+ fetchAudioPeaks(runAction, unwrapProxyUrl(current)).then(({
219
+ peaks: p,
220
+ durationSec: d
221
+ }) => {
222
+ if (cancelled) return;
223
+ setPeaks(p);
224
+ setRealWave(true);
225
+ setDurationSec((prev) => prev > 0 ? prev : d);
226
+ setTrim((t) => t.endMs > 0 ? t : {
227
+ startMs: 0,
228
+ endMs: Math.round(d * 1e3)
229
+ });
230
+ }).catch(() => {
231
+ });
76
232
  return () => {
77
233
  cancelled = true;
78
234
  };
79
- }, [current, durationMs, runAction]);
235
+ }, [current, runAction]);
236
+ useEffect(() => {
237
+ if (selection) setTrim({
238
+ startMs: Math.round(selection.start * 1e3),
239
+ endMs: Math.round(selection.end * 1e3)
240
+ });
241
+ }, [selection]);
80
242
  const fmt = (ms) => `${(ms / 1e3).toFixed(1)}s`;
243
+ const busyOrNo = Boolean(busy) || !runAction;
244
+ const panel = (() => {
245
+ switch (tool) {
246
+ case "trim":
247
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
248
+ /* @__PURE__ */ jsx(Text, { style: styles.hint, children: "Drag across the waveform to pick the part to keep." }),
249
+ /* @__PURE__ */ jsxs(View, { style: styles.fieldRow, children: [
250
+ /* @__PURE__ */ jsx(NumberField, { label: "Start", suffix: "ms", value: trim.startMs, onChange: (v) => setTrim((t) => __spreadProps(__spreadValues({}, t), {
251
+ startMs: Math.max(0, Math.round(v))
252
+ })) }),
253
+ /* @__PURE__ */ jsx(NumberField, { label: "End", suffix: "ms", value: trim.endMs, onChange: (v) => setTrim((t) => __spreadProps(__spreadValues({}, t), {
254
+ endMs: Math.max(0, Math.round(v))
255
+ })) })
256
+ ] }),
257
+ /* @__PURE__ */ jsx(ApplyButton, { label: `Trim to ${fmt(trim.startMs)} - ${fmt(trim.endMs)}`, disabled: busyOrNo || trim.endMs <= trim.startMs, onPress: () => apply("Trimming", "trim", {
258
+ start_ms: trim.startMs,
259
+ end_ms: trim.endMs
260
+ }) })
261
+ ] });
262
+ case "volume":
263
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
264
+ /* @__PURE__ */ jsx(SliderRow, { label: "Level", value: volumeLevel, min: 0, max: 3, step: 0.05, format: (v) => `${Math.round(v * 100)}%`, onChange: setVolumeLevel }),
265
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Apply level", disabled: busyOrNo || volumeLevel === 1, onPress: () => apply("Adjusting volume", "volume", {
266
+ level: volumeLevel
267
+ }) }),
268
+ /* @__PURE__ */ jsx(SliderRow, { label: "Gain", value: volumeDb, min: -24, max: 24, step: 0.5, format: (v) => `${v > 0 ? "+" : ""}${v} dB`, onChange: setVolumeDb }),
269
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Apply dB gain", tone: "soft", disabled: busyOrNo || volumeDb === 0, onPress: () => apply("Adjusting gain", "volume_db", {
270
+ db: volumeDb
271
+ }) })
272
+ ] });
273
+ case "fade":
274
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
275
+ /* @__PURE__ */ jsxs(View, { style: styles.fieldRow, children: [
276
+ /* @__PURE__ */ jsx(NumberField, { label: "Fade in", suffix: "ms", value: fade.inMs, onChange: (v) => setFade((f) => __spreadProps(__spreadValues({}, f), {
277
+ inMs: Math.max(0, Math.round(v))
278
+ })) }),
279
+ /* @__PURE__ */ jsx(NumberField, { label: "Fade out", suffix: "ms", value: fade.outMs, onChange: (v) => setFade((f) => __spreadProps(__spreadValues({}, f), {
280
+ outMs: Math.max(0, Math.round(v))
281
+ })) })
282
+ ] }),
283
+ /* @__PURE__ */ jsx(ChoiceRow, { label: "Curve", options: [{
284
+ value: "tri",
285
+ label: "Linear"
286
+ }, {
287
+ value: "qsin",
288
+ label: "Quarter sine"
289
+ }, {
290
+ value: "esin",
291
+ label: "Exp. sine"
292
+ }, {
293
+ value: "log",
294
+ label: "Logarithmic"
295
+ }, {
296
+ value: "exp",
297
+ label: "Exponential"
298
+ }], value: fade.curve, onChange: (curve) => setFade((f) => __spreadProps(__spreadValues({}, f), {
299
+ curve
300
+ })) }),
301
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Apply fade", disabled: busyOrNo || fade.inMs === 0 && fade.outMs === 0, onPress: () => apply("Fading", "fade", {
302
+ fade_in_ms: fade.inMs,
303
+ fade_out_ms: fade.outMs,
304
+ curve: fade.curve
305
+ }) })
306
+ ] });
307
+ case "speed":
308
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
309
+ /* @__PURE__ */ jsx(SliderRow, { label: "Factor", value: speed, min: 0.25, max: 4, step: 0.05, format: (v) => `${v.toFixed(2)}\xD7`, onChange: setSpeed }),
310
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Apply speed", disabled: busyOrNo || speed === 1, onPress: () => apply("Changing speed", "speed", {
311
+ factor: speed
312
+ }) })
313
+ ] });
314
+ case "normalize":
315
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
316
+ /* @__PURE__ */ jsx(SliderRow, { label: "Target loudness (LUFS)", value: lufs.i, min: -40, max: -5, step: 0.5, onChange: (i) => setLufs((l) => __spreadProps(__spreadValues({}, l), {
317
+ i
318
+ })) }),
319
+ /* @__PURE__ */ jsx(SliderRow, { label: "True peak (dBTP)", value: lufs.tp, min: -9, max: 0, step: 0.1, format: (v) => v.toFixed(1), onChange: (tp) => setLufs((l) => __spreadProps(__spreadValues({}, l), {
320
+ tp
321
+ })) }),
322
+ /* @__PURE__ */ jsx(SliderRow, { label: "Loudness range (LU)", value: lufs.lra, min: 1, max: 20, step: 0.5, format: (v) => v.toFixed(1), onChange: (lra) => setLufs((l) => __spreadProps(__spreadValues({}, l), {
323
+ lra
324
+ })) }),
325
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Normalize", disabled: busyOrNo, onPress: () => apply("Normalizing", "normalize", {
326
+ i: lufs.i,
327
+ tp: lufs.tp,
328
+ lra: lufs.lra
329
+ }) })
330
+ ] });
331
+ case "delay":
332
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
333
+ /* @__PURE__ */ jsx(SliderRow, { label: "Delay", value: delayMs, min: 0, max: 1e4, step: 50, format: (v) => fmt(v), onChange: setDelayMs }),
334
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Apply delay", disabled: busyOrNo || delayMs === 0, onPress: () => apply("Delaying", "delay", {
335
+ delay_ms: delayMs
336
+ }) })
337
+ ] });
338
+ case "silence":
339
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
340
+ /* @__PURE__ */ jsx(SliderRow, { label: "Threshold (dB)", value: silence.db, min: -80, max: -20, onChange: (db) => setSilence((x) => __spreadProps(__spreadValues({}, x), {
341
+ db
342
+ })) }),
343
+ /* @__PURE__ */ jsx(SliderRow, { label: "Min silence", value: silence.minMs, min: 50, max: 5e3, step: 50, format: (v) => `${v} ms`, onChange: (minMs) => setSilence((x) => __spreadProps(__spreadValues({}, x), {
344
+ minMs
345
+ })) }),
346
+ /* @__PURE__ */ jsx(ToggleRow, { label: "Trim leading", value: silence.leading, onChange: (leading) => setSilence((x) => __spreadProps(__spreadValues({}, x), {
347
+ leading
348
+ })) }),
349
+ /* @__PURE__ */ jsx(ToggleRow, { label: "Trim trailing", value: silence.trailing, onChange: (trailing) => setSilence((x) => __spreadProps(__spreadValues({}, x), {
350
+ trailing
351
+ })) }),
352
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Remove silence", disabled: busyOrNo || !silence.leading && !silence.trailing, onPress: () => apply("Removing silence", "silence_remove", {
353
+ threshold_db: silence.db,
354
+ min_silence_ms: silence.minMs,
355
+ trim_leading: silence.leading,
356
+ trim_trailing: silence.trailing
357
+ }) })
358
+ ] });
359
+ case "reverse":
360
+ return /* @__PURE__ */ jsx(ApplyButton, { label: "Reverse audio", disabled: busyOrNo, onPress: () => apply("Reversing", "reverse", {}) });
361
+ case "convert":
362
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
363
+ /* @__PURE__ */ jsx(ChoiceRow, { label: "Format", options: ["mp3", "wav", "aac", "ogg", "flac", "m4a"].map((v) => ({
364
+ value: v,
365
+ label: v.toUpperCase()
366
+ })), value: conv.format, onChange: (format) => setConv((c) => __spreadProps(__spreadValues({}, c), {
367
+ format
368
+ })) }),
369
+ /* @__PURE__ */ jsx(TextField, { label: "Bitrate", value: conv.bitrate, onChange: (bitrate) => setConv((c) => __spreadProps(__spreadValues({}, c), {
370
+ bitrate
371
+ })), placeholder: "192k" }),
372
+ /* @__PURE__ */ jsx(ChoiceRow, { label: "Sample rate", options: [{
373
+ value: "",
374
+ label: "Keep"
375
+ }, {
376
+ value: "22050",
377
+ label: "22.05 kHz"
378
+ }, {
379
+ value: "44100",
380
+ label: "44.1 kHz"
381
+ }, {
382
+ value: "48000",
383
+ label: "48 kHz"
384
+ }], value: conv.sampleRate, onChange: (sampleRate) => setConv((c) => __spreadProps(__spreadValues({}, c), {
385
+ sampleRate
386
+ })) }),
387
+ /* @__PURE__ */ jsx(ChoiceRow, { label: "Channels", options: [{
388
+ value: "",
389
+ label: "Keep"
390
+ }, {
391
+ value: "1",
392
+ label: "Mono"
393
+ }, {
394
+ value: "2",
395
+ label: "Stereo"
396
+ }], value: conv.channels, onChange: (channels) => setConv((c) => __spreadProps(__spreadValues({}, c), {
397
+ channels
398
+ })) }),
399
+ /* @__PURE__ */ jsx(ApplyButton, { label: `Convert to ${conv.format.toUpperCase()}`, disabled: busyOrNo, onPress: () => apply(`Converting to ${conv.format}`, "convert", __spreadValues(__spreadValues(__spreadValues({
400
+ format: conv.format
401
+ }, conv.bitrate ? {
402
+ bitrate: conv.bitrate
403
+ } : {}), conv.sampleRate ? {
404
+ sample_rate: Number(conv.sampleRate)
405
+ } : {}), conv.channels ? {
406
+ channels: Number(conv.channels)
407
+ } : {})) })
408
+ ] });
409
+ case "mix":
410
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
411
+ /* @__PURE__ */ jsx(MediaUrlPicker, { label: "Track to mix in", items: audioItems, value: mixUrl, onChange: setMixUrl }),
412
+ /* @__PURE__ */ jsx(ChoiceRow, { label: "Duration", options: [{
413
+ value: "longest",
414
+ label: "Longest"
415
+ }, {
416
+ value: "shortest",
417
+ label: "Shortest"
418
+ }, {
419
+ value: "first",
420
+ label: "This track"
421
+ }], value: mixDuration, onChange: setMixDuration }),
422
+ /* @__PURE__ */ jsx(ToggleRow, { label: "Normalize mix", value: mixNormalize, onChange: setMixNormalize }),
423
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Mix with current", disabled: busyOrNo || !mixUrl.trim(), onPress: () => apply("Mixing", "mix", {
424
+ input_urls: [unwrapProxyUrl(mixUrl.trim())],
425
+ duration: mixDuration,
426
+ normalize: mixNormalize
427
+ }) })
428
+ ] });
429
+ case "concat":
430
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
431
+ /* @__PURE__ */ jsx(MediaUrlPicker, { label: "Track to append", items: audioItems, value: concatUrl, onChange: setConcatUrl }),
432
+ /* @__PURE__ */ jsx(SliderRow, { label: "Crossfade", value: crossfadeMs, min: 0, max: 5e3, step: 50, format: (v) => `${v} ms`, onChange: setCrossfadeMs }),
433
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Append to current", disabled: busyOrNo || !concatUrl.trim(), onPress: () => apply("Concatenating", "concat", {
434
+ input_urls: [unwrapProxyUrl(concatUrl.trim())],
435
+ crossfade_ms: crossfadeMs
436
+ }) })
437
+ ] });
438
+ case "extract":
439
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
440
+ /* @__PURE__ */ jsx(MediaUrlPicker, { label: "Video", items: videoItems, value: extractUrl, onChange: setExtractUrl, placeholder: "https://...video.mp4" }),
441
+ /* @__PURE__ */ jsx(Text, { style: styles.hint, children: "Extracts the audio track of a video and replaces the current audio." }),
442
+ /* @__PURE__ */ jsx(ApplyButton, { label: "Extract audio", disabled: busyOrNo || !extractUrl.trim(), onPress: () => apply("Extracting", "extract", {}, extractUrl.trim()) })
443
+ ] });
444
+ case "info":
445
+ default:
446
+ return probe ? /* @__PURE__ */ jsx(View, { style: styles.infoList, children: Object.entries(probe).filter(([, v]) => typeof v === "string" || typeof v === "number").map(([k, v]) => /* @__PURE__ */ jsxs(View, { style: styles.infoRow, children: [
447
+ /* @__PURE__ */ jsx(Text, { style: styles.infoKey, children: k.replace(/_/g, " ") }),
448
+ /* @__PURE__ */ jsx(Text, { style: styles.infoVal, numberOfLines: 1, children: String(v) })
449
+ ] }, k)) }) : /* @__PURE__ */ jsx(Text, { style: styles.hint, children: runAction ? "Reading the file\u2026" : "Info needs the host connector." });
450
+ }
451
+ })();
81
452
  return /* @__PURE__ */ jsxs(View, { style: styles.root, testID: "audio-editor", children: [
82
453
  /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
83
454
  /* @__PURE__ */ jsx(Pressable, { onPress: onClose, hitSlop: 10, accessibilityRole: "button", accessibilityLabel: "Close editor", style: ({
@@ -100,26 +471,16 @@ function AudioEditorExperience({
100
471
  ] })
101
472
  ] }),
102
473
  /* @__PURE__ */ jsxs(View, { style: styles.stage, children: [
103
- /* @__PURE__ */ jsxs(View, { style: styles.wave, children: [
104
- WAVE_BARS.map((h, i) => {
105
- const pos = i / (WAVE_BARS.length - 1);
106
- const inRange = durationMs === null || pos >= trim.startMs / durationMs - 1e-3 && pos <= trim.endMs / durationMs + 1e-3;
107
- return /* @__PURE__ */ jsx(View, { style: [styles.waveBar, {
108
- height: `${Math.round(h * 100)}%`
109
- }, inRange && styles.waveBarOn] }, i);
110
- }),
111
- /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.playhead, {
112
- left: `${durationMs ? Math.min(100, trim.startMs / durationMs * 100) : 0}%`
113
- }] })
114
- ] }),
474
+ /* @__PURE__ */ jsx(AudioWaveform, { peaks, durationSec, selection, playheadSec: playhead, onSelectionChange: setSelection, selectedColor: theme.edAccent }),
115
475
  /* @__PURE__ */ jsxs(Text, { style: styles.stageMeta, children: [
116
- durationMs !== null ? fmt(durationMs) : "audio",
117
- edited ? ` \xB7 edit ${history.length - 1}` : ""
476
+ selection ? `Selection ${fmtTime(selection.start)} - ${fmtTime(selection.end)}` : durationSec > 0 ? fmtTime(durationSec) : "audio",
477
+ edited ? ` \xB7 edit ${history.length - 1}` : "",
478
+ realWave ? "" : " \xB7 waveform approximate"
118
479
  ] }),
119
480
  null,
120
481
  /* @__PURE__ */ jsx(Pressable, { onPress: () => setPlaying((p) => !p), style: ({
121
482
  pressed
122
- }) => [styles.playBtn, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: playing ? "Pause" : "Play", disabled: true, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: playing ? "pause" : "play", size: 26, color: "#0A0A0C" }) }),
483
+ }) => [styles.playBtn, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: playing ? "Pause" : selection ? "Play selection" : "Play", disabled: true, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: playing ? "pause" : "play", size: 26, color: "#0A0A0C" }) }),
123
484
  busy ? /* @__PURE__ */ jsxs(View, { style: styles.busyVeil, children: [
124
485
  /* @__PURE__ */ jsx(ActivityIndicator, { color: "#F7F7FA" }),
125
486
  /* @__PURE__ */ jsxs(Text, { style: styles.busyLabel, children: [
@@ -129,53 +490,21 @@ function AudioEditorExperience({
129
490
  ] }) : null
130
491
  ] }),
131
492
  /* @__PURE__ */ jsxs(View, { style: styles.panel, children: [
132
- durationMs !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
133
- /* @__PURE__ */ jsx(Text, { style: styles.sheetTitle, children: "Trim range" }),
134
- /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
135
- /* @__PURE__ */ jsx(Stepper, { label: "From", value: fmt(trim.startMs), onLess: () => setTrim((t) => __spreadProps(__spreadValues({}, t), {
136
- startMs: Math.max(0, t.startMs - 500)
137
- })), onMore: () => setTrim((t) => __spreadProps(__spreadValues({}, t), {
138
- startMs: Math.min(t.endMs - 500, t.startMs + 500)
139
- })) }),
140
- /* @__PURE__ */ jsx(Stepper, { label: "To", value: fmt(trim.endMs), onLess: () => setTrim((t) => __spreadProps(__spreadValues({}, t), {
141
- endMs: Math.max(t.startMs + 500, t.endMs - 500)
142
- })), onMore: () => setTrim((t) => __spreadProps(__spreadValues({}, t), {
143
- endMs: Math.min(durationMs, t.endMs + 500)
144
- })) }),
145
- /* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Trimming", "YANTRA_AUDIO_EDIT_TRIM", {
146
- start_ms: trim.startMs,
147
- end_ms: trim.endMs
148
- }), style: ({
149
- pressed
150
- }) => [styles.chip, styles.chipAccent, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: [styles.chipLabel, styles.chipLabelDark], children: "Trim" }) })
151
- ] })
152
- ] }) : null,
153
- /* @__PURE__ */ jsx(Text, { style: styles.sheetTitle, children: "Effects" }),
154
- /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
155
- [0.5, 0.75, 1.25, 1.5].map((level) => /* @__PURE__ */ jsx(Pressable, { onPress: () => apply(`Volume ${level}x`, "YANTRA_AUDIO_EDIT_VOLUME", {
156
- level
157
- }), style: ({
158
- pressed
159
- }) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsxs(Text, { style: styles.chipLabel, children: [
160
- level,
161
- "\xD7"
162
- ] }) }, level)),
163
- /* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Fading", "YANTRA_AUDIO_EDIT_FADE", {
164
- fade_in_ms: 1e3,
165
- fade_out_ms: 1e3
166
- }), style: ({
167
- pressed
168
- }) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Fade" }) }),
169
- /* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Normalizing", "YANTRA_AUDIO_EDIT_NORMALIZE", {}), style: ({
170
- pressed
171
- }) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Normalize" }) }),
172
- /* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Cleaning silence", "YANTRA_AUDIO_EDIT_SILENCE_REMOVE", {}), style: ({
173
- pressed
174
- }) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Cut silence" }) }),
175
- /* @__PURE__ */ jsx(Pressable, { onPress: () => apply("Reversing", "YANTRA_AUDIO_EDIT_REVERSE", {}), style: ({
493
+ /* @__PURE__ */ jsxs(ScrollView, { style: styles.panelScroll, keyboardShouldPersistTaps: "handled", children: [
494
+ /* @__PURE__ */ jsx(Text, { style: styles.sheetTitle, children: (_c = TOOLS.find((t) => t.id === tool)) == null ? void 0 : _c.label }),
495
+ panel
496
+ ] }),
497
+ /* @__PURE__ */ jsx(ScrollView, { horizontal: true, style: HSCROLL, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.row, children: TOOLS.map((t) => {
498
+ const on = t.id === tool;
499
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => setTool(t.id), accessibilityRole: "tab", accessibilityState: {
500
+ selected: on
501
+ }, style: ({
176
502
  pressed
177
- }) => [styles.chip, pressedStyle(pressed)], accessibilityRole: "button", children: /* @__PURE__ */ jsx(Text, { style: styles.chipLabel, children: "Reverse" }) })
178
- ] })
503
+ }) => [styles.chip, on && styles.chipAccent, pressedStyle(pressed)], children: [
504
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: t.icon, size: 15, color: on ? theme.edOnInk : theme.edInk }),
505
+ /* @__PURE__ */ jsx(Text, { style: [styles.chipLabel, on && styles.chipLabelDark], children: t.label })
506
+ ] }, t.id);
507
+ }) })
179
508
  ] }),
180
509
  notice ? /* @__PURE__ */ jsxs(View, { style: styles.notice, children: [
181
510
  /* @__PURE__ */ jsx(Text, { style: styles.noticeText, children: notice }),
@@ -183,25 +512,6 @@ function AudioEditorExperience({
183
512
  ] }) : null
184
513
  ] });
185
514
  }
186
- function Stepper({
187
- label,
188
- value,
189
- onLess,
190
- onMore
191
- }) {
192
- const theme = useCanvasTheme();
193
- const styles = useMemo(() => makeStyles(theme), [theme]);
194
- return /* @__PURE__ */ jsxs(View, { style: styles.stepper, children: [
195
- /* @__PURE__ */ jsx(Text, { style: styles.stepperLabel, children: label }),
196
- /* @__PURE__ */ jsx(Pressable, { onPress: onLess, hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} less`, style: ({
197
- pressed
198
- }) => [styles.stepBtn, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "minus", size: 15, color: theme.edInk }) }),
199
- /* @__PURE__ */ jsx(Text, { style: styles.stepperValue, children: value }),
200
- /* @__PURE__ */ jsx(Pressable, { onPress: onMore, hitSlop: 8, accessibilityRole: "button", accessibilityLabel: `${label} more`, style: ({
201
- pressed
202
- }) => [styles.stepBtn, pressedStyle(pressed)], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 15, color: theme.edInk }) })
203
- ] });
204
- }
205
515
  const makeStyles = themedStyles((theme) => StyleSheet.create({
206
516
  root: {
207
517
  flex: 1,
@@ -325,9 +635,42 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
325
635
  borderTopLeftRadius: RADIUS.xl,
326
636
  borderTopRightRadius: RADIUS.xl
327
637
  },
328
- sheetTitle: __spreadProps(__spreadValues({}, TYPE.caption), {
638
+ sheetTitle: __spreadProps(__spreadValues({}, TYPE.label), {
639
+ color: theme.edInk,
640
+ marginTop: SPACE.xs,
641
+ marginBottom: SPACE.sm
642
+ }),
643
+ panelScroll: {
644
+ maxHeight: 280
645
+ },
646
+ hint: __spreadProps(__spreadValues({}, TYPE.caption), {
647
+ fontWeight: "400",
329
648
  color: theme.edInk2,
330
- marginTop: SPACE.xs
649
+ marginBottom: SPACE.sm
650
+ }),
651
+ fieldRow: {
652
+ flexDirection: "row",
653
+ gap: SPACE.sm,
654
+ marginBottom: SPACE.sm
655
+ },
656
+ infoList: {
657
+ gap: SPACE.xs,
658
+ paddingBottom: SPACE.sm
659
+ },
660
+ infoRow: {
661
+ flexDirection: "row",
662
+ justifyContent: "space-between",
663
+ gap: SPACE.md,
664
+ minHeight: 24
665
+ },
666
+ infoKey: __spreadProps(__spreadValues({}, TYPE.caption), {
667
+ color: theme.edInk3,
668
+ textTransform: "capitalize"
669
+ }),
670
+ infoVal: __spreadProps(__spreadValues({}, TYPE.caption), {
671
+ color: theme.edInk,
672
+ fontVariant: ["tabular-nums"],
673
+ flexShrink: 1
331
674
  }),
332
675
  row: {
333
676
  flexDirection: "row",
@@ -403,4 +746,4 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
403
746
  noticeDismiss: __spreadProps(__spreadValues({}, TYPE.label), {
404
747
  color: theme.edAccent
405
748
  })
406
- }));export{AudioEditorExperience,AudioEditorExperience as default};//# sourceMappingURL=AudioEditorExperience.js.map
749
+ }));export{AUDIO_EDIT_ACTIONS,AudioEditorExperience,AudioEditorExperience as default};//# sourceMappingURL=AudioEditorExperience.js.map