@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 {useState,useMemo,useEffect,useCallback}from'react';import {useWindowDimensions,View,Text,ScrollView,FlatList,StyleSheet}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {isUnsetBoardTitle}from'./canvasCore.js';import {CANVAS_BOARD_PAGE_SIZE}from'./canvasBoardsCatalog.js';import {mergeWork,availableFilters,matchesFilter,WORK_FILTERS,designNoun,pageCount,boardCover,videoCoverFrame}from'./homeWork.js';import {resultUrl}from'./videoEditor/mediaActions.js';import {unwrapProxyUrl}from'./videoEditor/remoteMediaClient.js';import {renewMediaUrl,useMediaSource}from'./useMediaSource.js';import {useCanvasTheme,themedStyles,CanvasThemeToggle}from'./canvasTheme.js';import {Pressable,pressedStyle,SectionHeader,Segmented,RADIUS,SPACE,CoverPlaceholder,Skeleton,TYPE}from'./canvasUi.js';var __defProp = Object.defineProperty;
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useMemo,useEffect,useCallback,useRef}from'react';import {StyleSheet,useWindowDimensions,View,Text,ScrollView,FlatList,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {DesignPageView}from'../design/render/DesignPageView.js';import {isUnsetBoardTitle}from'./canvasCore.js';import {CANVAS_BOARD_PAGE_SIZE}from'./canvasBoardsCatalog.js';import {mergeWork,availableFilters,matchesFilter,collapsedWorkCount,WORK_FILTERS,showAllLabel,WORK_ARTIFACTS,studioNoun,designNoun,pageCount,boardCover,videoCoverFrame}from'./homeWork.js';import {HeroComposer}from'./home/HeroComposer.js';import {LookDetail}from'./home/LookDetail.js';import {LoopingVideo}from'./home/LoopingVideo.js';import {pickPlayingRegion,centredIndex}from'./home/heroShots.js';import {resultUrl}from'./videoEditor/mediaActions.js';import {unwrapProxyUrl}from'./videoEditor/remoteMediaClient.js';import {renewMediaUrl,useMediaSource}from'./useMediaSource.js';import {useCanvasTheme,themedStyles,CanvasThemeToggle}from'./canvasTheme.js';import {Pressable,pressedStyle,SectionHeader,Segmented,RADIUS,SPACE,Skeleton,CoverPlaceholder,TYPE}from'./canvasUi.js';import {docPreviewLines}from'../docs/blocks.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -59,6 +59,11 @@ const LANE_HUES = {
59
59
  }
60
60
  };
61
61
  const FORMAT_SHAPE = {
62
+ presentation: {
63
+ w: 16,
64
+ h: 9,
65
+ stack: true
66
+ },
62
67
  social: {
63
68
  w: 1,
64
69
  h: 1
@@ -72,28 +77,77 @@ const FORMAT_SHAPE = {
72
77
  w: 3,
73
78
  h: 4
74
79
  },
80
+ "business-card": {
81
+ w: 7,
82
+ h: 4,
83
+ stack: true
84
+ },
75
85
  logo: {
76
86
  w: 1,
77
87
  h: 1,
78
88
  round: true
79
89
  },
90
+ banner: {
91
+ w: 3,
92
+ h: 1
93
+ },
94
+ brochure: {
95
+ w: 11,
96
+ h: 8.5,
97
+ stack: true
98
+ },
99
+ branding: {
100
+ w: 8.5,
101
+ h: 11
102
+ },
103
+ doc: {
104
+ w: 8.5,
105
+ h: 11
106
+ },
107
+ custom: {
108
+ w: 5,
109
+ h: 4
110
+ },
80
111
  tshirt: {
81
112
  w: 5,
82
113
  h: 6
83
114
  }
84
115
  };
116
+ const TEMPLATE_HEIGHT = 176;
117
+ const TEMPLATE_SKELETON_RATIOS = [210 / 297, 16 / 9];
118
+ const SHOWCASE_WIDTH = 248;
85
119
  function CanvasBoardsGrid({
86
120
  boards,
87
121
  onOpen,
88
122
  onNewCanvas,
89
123
  designs = [],
90
124
  onOpenDesign,
125
+ studioDesigns = [],
126
+ onOpenStudioDesign,
127
+ docs = [],
128
+ onOpenDoc,
91
129
  onAskAgent,
92
130
  createGroups = [],
93
131
  onCreate,
94
132
  featuredLooks = [],
95
133
  onRecreateLook,
96
- runAction
134
+ onOpenCategory,
135
+ templateRails,
136
+ onOpenTemplate,
137
+ onSeeAllTemplates,
138
+ onRetryTemplates,
139
+ showcase = [],
140
+ onUseShowcasePrompt,
141
+ runAction,
142
+ onStartWithPrompt,
143
+ onPickReference,
144
+ onBrowseTemplates,
145
+ studioMore = false,
146
+ studioError = null,
147
+ onRetryStudioDesigns,
148
+ onExpandWork,
149
+ currentSessionId,
150
+ onOpenSession
97
151
  }) {
98
152
  const theme = useCanvasTheme();
99
153
  const styles = makeStyles(theme);
@@ -103,31 +157,108 @@ function CanvasBoardsGrid({
103
157
  const tileWidth = Math.max(140, (width - GUTTER * 3) / 2);
104
158
  const laneWidth = (width - GUTTER * 2 - SPACE.sm * 2) / 3;
105
159
  const [visible, setVisible] = useState(CANVAS_BOARD_PAGE_SIZE);
160
+ const [expanded, setExpanded] = useState(false);
106
161
  const [filter, setFilter] = useState("all");
162
+ const [lookIndex, setLookIndex] = useState(-1);
107
163
  const renew = useMemo(() => renewMediaUrl(runAction), [runAction]);
108
- const work = useMemo(() => mergeWork(boards, designs), [boards, designs]);
164
+ const work = useMemo(() => mergeWork(boards, designs, studioDesigns, docs), [boards, designs, studioDesigns, docs]);
109
165
  const filters = useMemo(() => availableFilters(work), [work]);
110
166
  const active = filters.includes(filter) ? filter : "all";
111
167
  const shown = useMemo(() => work.filter((item) => matchesFilter(item, active)), [work, active]);
112
168
  useEffect(() => {
113
169
  setVisible(CANVAS_BOARD_PAGE_SIZE);
114
- }, [boards, designs, active]);
115
- const tiles = useMemo(() => [{
170
+ }, [boards, designs, studioDesigns, docs, active]);
171
+ const startSession = currentSessionId && onOpenSession && (active === "all" || active === "canvases") && !boards.some((b) => b.channelId === currentSessionId) ? currentSessionId : null;
172
+ const lead = useMemo(() => [{
116
173
  kind: "new",
117
174
  id: "__new__"
118
- }, ...shown.slice(0, visible).map((entry) => ({
119
- kind: "work",
120
- id: `${entry.type}:${entry.id}`,
121
- work: entry
122
- }))], [shown, visible]);
175
+ }, ...startSession ? [{
176
+ kind: "start",
177
+ id: "__start__",
178
+ sessionId: startSession
179
+ }] : []], [startSession]);
180
+ const collapsedCount = collapsedWorkCount(2);
181
+ const totalTiles = lead.length + shown.length;
182
+ const tiles = useMemo(() => {
183
+ const limit = expanded ? visible : Math.max(0, collapsedCount - lead.length);
184
+ return [...lead, ...shown.slice(0, limit).map((entry) => ({
185
+ kind: "work",
186
+ id: `${entry.type}:${entry.id}`,
187
+ work: entry
188
+ }))];
189
+ }, [lead, shown, visible, expanded, collapsedCount]);
190
+ const toggleExpanded = useCallback(() => {
191
+ setExpanded((was) => {
192
+ onExpandWork == null ? void 0 : onExpandWork(!was);
193
+ return !was;
194
+ });
195
+ setVisible(CANVAS_BOARD_PAGE_SIZE);
196
+ }, [onExpandWork]);
197
+ const {
198
+ height: windowHeight
199
+ } = useWindowDimensions();
200
+ const regions = useRef({
201
+ hero: {
202
+ top: 0,
203
+ height: 0
204
+ },
205
+ showcase: {
206
+ top: 0,
207
+ height: 0
208
+ }
209
+ });
210
+ const viewport = useRef({
211
+ top: 0,
212
+ height: windowHeight
213
+ });
214
+ const [playing, setPlaying] = useState(null);
215
+ const [showcaseIndex, setShowcaseIndex] = useState(0);
216
+ const govern = useCallback(() => {
217
+ const next = pickPlayingRegion(Object.keys(regions.current).map((id) => __spreadValues({
218
+ id
219
+ }, regions.current[id])), viewport.current.top, viewport.current.height);
220
+ setPlaying((prev) => prev === next ? prev : next);
221
+ }, []);
222
+ const measure = (id) => (e) => {
223
+ const {
224
+ y,
225
+ height
226
+ } = e.nativeEvent.layout;
227
+ regions.current[id] = {
228
+ top: y + SPACE.sm,
229
+ height
230
+ };
231
+ govern();
232
+ };
233
+ const onListScroll = useCallback((e) => {
234
+ const {
235
+ contentOffset,
236
+ layoutMeasurement
237
+ } = e.nativeEvent;
238
+ viewport.current = {
239
+ top: contentOffset.y,
240
+ height: layoutMeasurement.height
241
+ };
242
+ govern();
243
+ }, [govern]);
244
+ const onShowcaseScroll = (e) => {
245
+ const {
246
+ contentOffset,
247
+ layoutMeasurement
248
+ } = e.nativeEvent;
249
+ const next = centredIndex(contentOffset.x, layoutMeasurement.width, SHOWCASE_WIDTH, SPACE.sm, GUTTER, showcase.length);
250
+ setShowcaseIndex((prev) => prev === next ? prev : next);
251
+ };
252
+ const playingNow = lookIndex >= 0 ? null : playing;
123
253
  const rows = useMemo(() => {
124
254
  const chunked = [];
125
255
  for (let i = 0; i < tiles.length; i += 2) chunked.push(tiles.slice(i, i + 2));
126
256
  return chunked;
127
257
  }, [tiles]);
128
258
  const loadMore = useCallback(() => {
259
+ if (!expanded) return;
129
260
  setVisible((count) => count >= shown.length ? count : Math.min(count + CANVAS_BOARD_PAGE_SIZE, shown.length));
130
- }, [shown.length]);
261
+ }, [shown.length, expanded]);
131
262
  const group = (id) => createGroups.find((g) => g.id === id);
132
263
  const generate = group("generate");
133
264
  const edit = group("edit");
@@ -150,22 +281,33 @@ function CanvasBoardsGrid({
150
281
  const header = /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
151
282
  /* @__PURE__ */ jsxs(View, { style: styles.titleRow, children: [
152
283
  /* @__PURE__ */ jsx(Text, { style: styles.title, accessibilityRole: "header", children: "Create" }),
153
- /* @__PURE__ */ jsx(CanvasThemeToggle, { size: 20, style: styles.toggle })
284
+ /* @__PURE__ */ jsxs(View, { style: styles.titleActions, children: [
285
+ onAskAgent && onStartWithPrompt ? (
286
+ // The hero is the prompt box; AI Chat stays one tap away without a second box.
287
+ /* @__PURE__ */ jsx(Pressable, { onPress: onAskAgent, style: ({
288
+ pressed
289
+ }) => [styles.toggle, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Open AI Chat", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 20, color: theme.foreground }) })
290
+ ) : null,
291
+ /* @__PURE__ */ jsx(CanvasThemeToggle, { size: 20, style: styles.toggle })
292
+ ] })
154
293
  ] }),
155
- onAskAgent ? /* @__PURE__ */ jsxs(Pressable, { onPress: onAskAgent, style: ({
294
+ onAskAgent && !onStartWithPrompt ? /* @__PURE__ */ jsxs(Pressable, { onPress: onAskAgent, style: ({
156
295
  pressed
157
296
  }) => [styles.prompt, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Ask AI Chat to make something", children: [
158
297
  /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 20, color: theme.mutedForeground }),
159
298
  /* @__PURE__ */ jsx(Text, { style: styles.promptText, numberOfLines: 1, children: "Describe what you want to make" }),
160
299
  /* @__PURE__ */ jsx(View, { style: styles.promptGo, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-up", size: 18, color: theme.primaryForeground }) })
161
300
  ] }) : null,
301
+ onStartWithPrompt ? /* @__PURE__ */ jsx(View, { onLayout: measure("hero"), children: /* @__PURE__ */ jsx(HeroComposer, { featuredLooks, showcase, playing: playingNow === "hero", onStartWithPrompt, onPickReference, onBrowseTemplates }) }) : null,
162
302
  onCreate && generate ? /* @__PURE__ */ jsxs(View, { style: styles.section, children: [
163
303
  /* @__PURE__ */ jsx(SectionHeader, { title: "Generate with AI" }),
164
304
  /* @__PURE__ */ jsx(View, { style: styles.lanes, children: generate.tiles.map(lane) })
165
305
  ] }) : null,
166
306
  onCreate && designGroup ? /* @__PURE__ */ jsxs(View, { style: styles.section, children: [
167
307
  /* @__PURE__ */ jsx(SectionHeader, { title: "Design" }),
168
- /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.bleed, contentContainerStyle: styles.railContent, children: designGroup.tiles.map((tile) => /* @__PURE__ */ jsx(FormatTile, { tile, onPress: () => onCreate(tile.action, tile.id) }, tile.id)) })
308
+ /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.bleed, contentContainerStyle: styles.railContent, children: designGroup.tiles.map((tile) => /* @__PURE__ */ jsx(FormatTile, { tile, onPress: () => {
309
+ if (!(onOpenCategory == null ? void 0 : onOpenCategory(tile.id))) onCreate(tile.action, tile.id);
310
+ } }, tile.id)) })
169
311
  ] }) : null,
170
312
  onCreate && edit ? /* @__PURE__ */ jsxs(View, { style: styles.section, children: [
171
313
  /* @__PURE__ */ jsx(SectionHeader, { title: "Edit & produce" }),
@@ -178,22 +320,44 @@ function CanvasBoardsGrid({
178
320
  ] }) : null,
179
321
  featuredLooks.length > 0 && onRecreateLook ? /* @__PURE__ */ jsxs(View, { style: styles.section, children: [
180
322
  /* @__PURE__ */ jsx(SectionHeader, { title: "Looks", detail: "Recreate a studio style" }),
181
- /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.bleed, contentContainerStyle: styles.railContent, children: featuredLooks.map((look) => /* @__PURE__ */ jsxs(Pressable, { onPress: () => onRecreateLook(look), style: ({
323
+ /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.bleed, contentContainerStyle: styles.railContent, children: featuredLooks.map((look, i) => /* @__PURE__ */ jsxs(Pressable, { onPress: () => setLookIndex(i), style: ({
182
324
  pressed
183
- }) => [styles.look, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Recreate ${look.name}`, children: [
325
+ }) => [styles.look, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Open look ${look.name}`, children: [
184
326
  look.cover ? /* @__PURE__ */ jsx(Image, { source: {
185
327
  uri: look.cover
186
- }, style: styles.fill, contentFit: "cover" }) : /* @__PURE__ */ jsx(View, { style: [styles.fill, styles.centered], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "movie-open-outline", size: 22, color: theme.mutedForeground }) }),
328
+ }, style: StyleSheet.absoluteFill, contentFit: "cover" }) : /* @__PURE__ */ jsx(View, { style: [styles.fill, styles.centered], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "movie-open-outline", size: 22, color: theme.mutedForeground }) }),
187
329
  /* @__PURE__ */ jsx(View, { style: styles.lookCaption, children: /* @__PURE__ */ jsx(Text, { style: styles.lookName, numberOfLines: 2, children: look.name }) })
188
330
  ] }, look.id)) })
189
331
  ] }) : null,
332
+ templateRails && onOpenTemplate ? /* @__PURE__ */ jsx(TemplateRails, { state: templateRails, onOpenTemplate, onSeeAll: onSeeAllTemplates, onRetry: onRetryTemplates }) : null,
333
+ showcase.length > 0 && onUseShowcasePrompt ? /* @__PURE__ */ jsxs(View, { style: styles.section, onLayout: measure("showcase"), children: [
334
+ /* @__PURE__ */ jsx(SectionHeader, { title: "Made with Seedance 2.0" }),
335
+ /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.bleed, contentContainerStyle: styles.railContent, onScroll: onShowcaseScroll, scrollEventThrottle: 100, children: showcase.map((clip, i) => /* @__PURE__ */ jsx(ShowcaseTile, { clip, playing: playingNow === "showcase" && i === showcaseIndex, onUse: () => onUseShowcasePrompt(clip) }, clip.id)) })
336
+ ] }) : null,
190
337
  /* @__PURE__ */ jsxs(View, { style: styles.workHead, children: [
191
338
  /* @__PURE__ */ jsx(SectionHeader, { title: "Your work", detail: work.length > 0 ? String(work.length) : void 0, style: styles.noMargin }),
192
339
  filters.length > 0 ? /* @__PURE__ */ jsx(Segmented, { options: WORK_FILTERS.filter((f) => filters.includes(f.id)), value: active, onChange: setFilter, style: styles.segmented }) : null
193
- ] })
340
+ ] }),
341
+ studioError ? /* @__PURE__ */ jsxs(View, { style: styles.railError, accessibilityRole: "alert", children: [
342
+ /* @__PURE__ */ jsx(Text, { style: styles.railErrorText, children: "Couldn't load your designs." }),
343
+ onRetryStudioDesigns ? /* @__PURE__ */ jsxs(Pressable, { onPress: onRetryStudioDesigns, hitSlop: 8, style: ({
344
+ pressed
345
+ }) => [styles.retry, pressedStyle(pressed)], accessibilityRole: "button", children: [
346
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "refresh", size: 16, color: theme.foreground }),
347
+ /* @__PURE__ */ jsx(Text, { style: styles.retryLabel, children: "Retry" })
348
+ ] }) : null
349
+ ] }) : null
194
350
  ] });
351
+ const footer = totalTiles > collapsedCount || expanded ? /* @__PURE__ */ jsxs(View, { style: styles.workFooter, children: [
352
+ /* @__PURE__ */ jsx(Pressable, { onPress: toggleExpanded, style: ({
353
+ pressed
354
+ }) => [styles.showAll, pressedStyle(pressed)], accessibilityRole: "button", accessibilityState: {
355
+ expanded
356
+ }, testID: "your-work-show-all", children: /* @__PURE__ */ jsx(Text, { style: styles.retryLabel, children: expanded ? "Show less" : showAllLabel(shown.length, studioMore) }) }),
357
+ expanded && studioMore ? /* @__PURE__ */ jsx(Text, { style: styles.workNote, children: `Showing your ${WORK_ARTIFACTS.expanded} most recent designs of each kind.` }) : null
358
+ ] }) : null;
195
359
  const renderTile = (item) => {
196
- var _a, _b;
360
+ var _a, _b, _c;
197
361
  if (item.kind === "new") {
198
362
  return /* @__PURE__ */ jsxs(Pressable, { onPress: onNewCanvas, style: ({
199
363
  pressed
@@ -205,15 +369,59 @@ function CanvasBoardsGrid({
205
369
  /* @__PURE__ */ jsx(Text, { style: styles.workMeta, children: "Start blank" })
206
370
  ] });
207
371
  }
372
+ if (item.kind === "start") {
373
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => onOpenSession == null ? void 0 : onOpenSession(item.sessionId), style: ({
374
+ pressed
375
+ }) => [{
376
+ width: tileWidth
377
+ }, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Open this chat's canvas", children: [
378
+ /* @__PURE__ */ jsx(View, { style: [styles.cover, styles.coverNew], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-outline", size: 26, color: theme.mutedForeground }) }),
379
+ /* @__PURE__ */ jsx(Text, { style: styles.workTitle, children: "This chat's canvas" }),
380
+ /* @__PURE__ */ jsx(Text, { style: styles.workMeta, children: "Canvas \xB7 Start creating here" })
381
+ ] });
382
+ }
208
383
  const {
209
384
  work: entry
210
385
  } = item;
386
+ if (entry.type === "doc") {
387
+ const title2 = ((_a = entry.doc.title) == null ? void 0 : _a.trim()) || "Untitled doc";
388
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => onOpenDoc == null ? void 0 : onOpenDoc(entry.doc.id), style: ({
389
+ pressed
390
+ }) => [{
391
+ width: tileWidth
392
+ }, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Open doc ${title2}`, children: [
393
+ /* @__PURE__ */ jsx(View, { style: [styles.cover, styles.centered], children: /* @__PURE__ */ jsx(DocPaper, { blocks: entry.doc.doc.blocks, title: title2, height: tileWidth - SPACE.lg * 2 }) }),
394
+ /* @__PURE__ */ jsx(Text, { style: styles.workTitle, numberOfLines: 1, children: title2 }),
395
+ /* @__PURE__ */ jsx(Text, { style: styles.workMeta, numberOfLines: 1, children: `Doc \xB7 ${relativeTime(entry.doc.updatedAt)}` })
396
+ ] });
397
+ }
398
+ if (entry.type === "studio") {
399
+ const {
400
+ doc,
401
+ title: title2
402
+ } = entry.studio;
403
+ const page = doc.pages[0];
404
+ const frame = tileWidth - SPACE.xl * 2;
405
+ const ratio = doc.pageHeight / doc.pageWidth;
406
+ const pageW = ratio > 1 ? frame / ratio : frame;
407
+ const noun = studioNoun(entry.studio);
408
+ const meta = [noun, doc.pages.length > 1 ? `${doc.pages.length} pages` : "", relativeTime(entry.studio.updatedAt)].filter(Boolean).join(" \xB7 ");
409
+ return /* @__PURE__ */ jsxs(Pressable, { onPress: () => onOpenStudioDesign == null ? void 0 : onOpenStudioDesign(entry.studio.id), style: ({
410
+ pressed
411
+ }) => [{
412
+ width: tileWidth
413
+ }, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Open ${noun.toLowerCase()} ${title2}`, children: [
414
+ /* @__PURE__ */ jsx(View, { style: [styles.cover, styles.centered], children: page ? /* @__PURE__ */ jsx(DesignPageView, { doc, page, width: pageW }) : null }),
415
+ /* @__PURE__ */ jsx(Text, { style: styles.workTitle, numberOfLines: 1, children: title2 || "Untitled design" }),
416
+ /* @__PURE__ */ jsx(Text, { style: styles.workMeta, numberOfLines: 1, children: meta })
417
+ ] });
418
+ }
211
419
  if (entry.type === "design") {
212
420
  const {
213
421
  design
214
422
  } = entry;
215
423
  const noun = designNoun(design.doc);
216
- const title2 = ((_a = design.title) == null ? void 0 : _a.trim()) || `Untitled ${noun.toLowerCase()}`;
424
+ const title2 = ((_b = design.title) == null ? void 0 : _b.trim()) || `Untitled ${noun.toLowerCase()}`;
217
425
  const meta = [noun, pageCount(design.doc), relativeTime(design.savedAt)].filter(Boolean).join(" \xB7 ");
218
426
  return /* @__PURE__ */ jsxs(Pressable, { onPress: () => onOpenDesign == null ? void 0 : onOpenDesign(design.channelId), style: ({
219
427
  pressed
@@ -229,7 +437,7 @@ function CanvasBoardsGrid({
229
437
  board
230
438
  } = entry;
231
439
  const cover = boardCover(board.board.items);
232
- const title = !isUnsetBoardTitle(board.title) ? board.title : ((_b = board.board.items.find((it) => it.generatedAssetName)) == null ? void 0 : _b.generatedAssetName) || "Untitled canvas";
440
+ const title = !isUnsetBoardTitle(board.title) ? board.title : ((_c = board.board.items.find((it) => it.generatedAssetName)) == null ? void 0 : _c.generatedAssetName) || "Untitled canvas";
233
441
  return /* @__PURE__ */ jsxs(Pressable, { onPress: () => onOpen(board.channelId), style: ({
234
442
  pressed
235
443
  }) => [{
@@ -243,27 +451,117 @@ function CanvasBoardsGrid({
243
451
  /* @__PURE__ */ jsx(Text, { style: styles.workMeta, numberOfLines: 1, children: `Canvas \xB7 ${relativeTime(board.savedAt)}` })
244
452
  ] });
245
453
  };
246
- return /* @__PURE__ */ jsx(View, { style: styles.plane, children: work.length === 0 ? /* @__PURE__ */ jsxs(ScrollView, { contentContainerStyle: styles.list, showsVerticalScrollIndicator: false, children: [
247
- header,
248
- /* @__PURE__ */ jsxs(View, { style: styles.empty, children: [
249
- /* @__PURE__ */ jsx(View, { style: styles.emptyIcon, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-multiple-outline", size: 26, color: theme.foreground }) }),
250
- /* @__PURE__ */ jsx(Text, { style: styles.emptyTitle, children: "Nothing here yet" }),
251
- /* @__PURE__ */ jsx(Text, { style: styles.emptyDetail, children: "Every chat gets its own canvas. Generate an image, video or audio and it lands here." }),
252
- /* @__PURE__ */ jsxs(Pressable, { onPress: onNewCanvas, style: ({
253
- pressed
254
- }) => [styles.emptyCta, pressedStyle(pressed)], accessibilityRole: "button", children: [
255
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 18, color: theme.primaryForeground }),
256
- /* @__PURE__ */ jsx(Text, { style: styles.emptyCtaLabel, children: "New canvas" })
454
+ return /* @__PURE__ */ jsxs(View, { style: styles.plane, children: [
455
+ work.length === 0 ? /* @__PURE__ */ jsxs(ScrollView, { contentContainerStyle: styles.list, showsVerticalScrollIndicator: false, onScroll: onListScroll, scrollEventThrottle: 100, children: [
456
+ header,
457
+ /* @__PURE__ */ jsxs(View, { style: styles.empty, children: [
458
+ /* @__PURE__ */ jsx(View, { style: styles.emptyIcon, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-multiple-outline", size: 26, color: theme.foreground }) }),
459
+ /* @__PURE__ */ jsx(Text, { style: styles.emptyTitle, children: "Nothing here yet" }),
460
+ /* @__PURE__ */ jsx(Text, { style: styles.emptyDetail, children: "Every chat gets its own canvas. Generate an image, video or audio and it lands here." }),
461
+ /* @__PURE__ */ jsxs(Pressable, { onPress: onNewCanvas, style: ({
462
+ pressed
463
+ }) => [styles.emptyCta, pressedStyle(pressed)], accessibilityRole: "button", children: [
464
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "plus", size: 18, color: theme.primaryForeground }),
465
+ /* @__PURE__ */ jsx(Text, { style: styles.emptyCtaLabel, children: "New canvas" })
466
+ ] })
257
467
  ] })
468
+ ] }) : /* @__PURE__ */ jsx(FlatList, { data: rows, keyExtractor: (pair) => pair.map((item) => item.id).join(":"), contentContainerStyle: styles.list, showsVerticalScrollIndicator: false, onEndReached: loadMore, onEndReachedThreshold: 0.4, onScroll: onListScroll, scrollEventThrottle: 100, ListHeaderComponent: header, ListFooterComponent: footer, renderItem: ({
469
+ item: pair
470
+ }) => /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
471
+ pair.map((entry) => /* @__PURE__ */ jsx(View, { children: renderTile(entry) }, entry.id)),
472
+ pair.length < 2 ? /* @__PURE__ */ jsx(View, { style: {
473
+ width: tileWidth
474
+ } }) : null
475
+ ] }) }),
476
+ onRecreateLook ? /* @__PURE__ */ jsx(LookDetail, { looks: featuredLooks, index: lookIndex, onIndexChange: setLookIndex, onRecreate: (look) => {
477
+ setLookIndex(-1);
478
+ onRecreateLook(look);
479
+ }, onClose: () => setLookIndex(-1) }) : null
480
+ ] });
481
+ }
482
+ function TemplateRails({
483
+ state,
484
+ onOpenTemplate,
485
+ onSeeAll,
486
+ onRetry
487
+ }) {
488
+ const theme = useCanvasTheme();
489
+ const styles = makeStyles(theme);
490
+ const count = state.rows[0].length + state.rows[1].length;
491
+ const pending = state.status === "loading";
492
+ if (state.status === "ready" && count === 0) return null;
493
+ return /* @__PURE__ */ jsxs(View, { style: styles.section, children: [
494
+ /* @__PURE__ */ jsx(SectionHeader, { title: "Templates for you", action: onSeeAll ? "See all" : void 0, onAction: onSeeAll }),
495
+ state.status === "failed" ? /* @__PURE__ */ jsxs(View, { style: styles.railError, children: [
496
+ /* @__PURE__ */ jsx(Text, { style: styles.railErrorText, children: count ? "Some templates couldn't load." : "Templates couldn't load." }),
497
+ onRetry ? /* @__PURE__ */ jsxs(Pressable, { onPress: onRetry, hitSlop: 8, style: ({
498
+ pressed
499
+ }) => [styles.retry, pressedStyle(pressed)], accessibilityRole: "button", children: [
500
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "refresh", size: 16, color: theme.foreground }),
501
+ /* @__PURE__ */ jsx(Text, { style: styles.retryLabel, children: "Retry" })
502
+ ] }) : null
503
+ ] }) : null,
504
+ state.rows.map((row, index) => row.length || pending ? /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: [styles.bleed, index === 0 && styles.templateRowGap], contentContainerStyle: styles.railContent, children: [
505
+ row.map((card) => /* @__PURE__ */ jsx(TemplateCover, { card, onPress: () => onOpenTemplate(card.id) }, card.id)),
506
+ pending ? Array.from({
507
+ length: row.length ? 2 : 4
508
+ }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { radius: RADIUS.md, style: {
509
+ width: Math.round(TEMPLATE_HEIGHT * TEMPLATE_SKELETON_RATIOS[(i + index) % TEMPLATE_SKELETON_RATIOS.length]),
510
+ height: TEMPLATE_HEIGHT
511
+ } }, `skeleton-${i}`)) : null
512
+ ] }, index) : null)
513
+ ] });
514
+ }
515
+ function TemplateCover({
516
+ card,
517
+ onPress
518
+ }) {
519
+ const theme = useCanvasTheme();
520
+ const styles = makeStyles(theme);
521
+ const [loaded, setLoaded] = useState(false);
522
+ const width = Math.min(Math.round(TEMPLATE_HEIGHT * card.pageWidth / card.pageHeight), TEMPLATE_HEIGHT * 2);
523
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, style: ({
524
+ pressed
525
+ }) => [styles.templateCover, {
526
+ width,
527
+ height: TEMPLATE_HEIGHT
528
+ }, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Use template ${card.title}`, children: [
529
+ loaded ? null : /* @__PURE__ */ jsx(Skeleton, {}),
530
+ /* @__PURE__ */ jsx(Image, { source: {
531
+ uri: card.coverUrl
532
+ }, style: StyleSheet.absoluteFill, contentFit: "contain", transition: 150, onLoad: () => setLoaded(true) })
533
+ ] });
534
+ }
535
+ function ShowcaseTile({
536
+ clip,
537
+ playing,
538
+ onUse
539
+ }) {
540
+ const theme = useCanvasTheme();
541
+ const styles = makeStyles(theme);
542
+ const openSource = () => {
543
+ void Linking.openURL(clip.sourceUrl).catch(() => void 0);
544
+ };
545
+ return /* @__PURE__ */ jsxs(View, { style: styles.showcase, children: [
546
+ /* @__PURE__ */ jsxs(Pressable, { onPress: onUse, style: ({
547
+ pressed
548
+ }) => [styles.showcasePoster, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Use the prompt from ${clip.title}`, children: [
549
+ /* @__PURE__ */ jsx(CoverPlaceholder, { seed: clip.id, icon: "play" }),
550
+ /* @__PURE__ */ jsx(LoopingVideo, { src: clip.hls, poster: clip.poster, playing }),
551
+ playing ? null : /* @__PURE__ */ jsx(View, { style: styles.playBadge, pointerEvents: "none", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "play", size: 16, color: "#fafafa" }) })
552
+ ] }),
553
+ /* @__PURE__ */ jsx(Text, { style: styles.workTitle, numberOfLines: 1, children: clip.title }),
554
+ /* @__PURE__ */ jsxs(Pressable, { onPress: openSource, hitSlop: 6, style: styles.credit, accessibilityRole: "link", accessibilityLabel: `By ${clip.author}, ${clip.license}. Open the original post`, children: [
555
+ /* @__PURE__ */ jsx(Text, { style: styles.creditText, numberOfLines: 1, children: `By ${clip.author} \xB7 CC BY 4.0` }),
556
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "open-in-new", size: 12, color: theme.mutedForeground })
557
+ ] }),
558
+ /* @__PURE__ */ jsxs(Pressable, { onPress: onUse, style: ({
559
+ pressed
560
+ }) => [styles.usePrompt, pressedStyle(pressed)], accessibilityRole: "button", children: [
561
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "creation", size: 14, color: theme.foreground }),
562
+ /* @__PURE__ */ jsx(Text, { style: styles.usePromptLabel, children: "Use this prompt" })
258
563
  ] })
259
- ] }) : /* @__PURE__ */ jsx(FlatList, { data: rows, keyExtractor: (pair) => pair.map((item) => item.id).join(":"), contentContainerStyle: styles.list, showsVerticalScrollIndicator: false, onEndReached: loadMore, onEndReachedThreshold: 0.4, ListHeaderComponent: header, renderItem: ({
260
- item: pair
261
- }) => /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
262
- pair.map((entry) => /* @__PURE__ */ jsx(View, { children: renderTile(entry) }, entry.id)),
263
- pair.length < 2 ? /* @__PURE__ */ jsx(View, { style: {
264
- width: tileWidth
265
- } }) : null
266
- ] }) }) });
564
+ ] });
267
565
  }
268
566
  function FormatTile({
269
567
  tile,
@@ -338,7 +636,7 @@ function BoardCover({
338
636
  loaded && media.phase === "ok" ? null : stalled ? /* @__PURE__ */ jsx(CoverPlaceholder, { seed, icon: isVideo ? "play" : "image-outline" }) : /* @__PURE__ */ jsx(Skeleton, {}),
339
637
  frame ? /* @__PURE__ */ jsx(Image, { source: {
340
638
  uri: media.src
341
- }, style: styles.fill, contentFit: "cover", transition: 200, onLoad: () => setLoaded(true), onError: media.onError }, media.key) : null,
639
+ }, style: StyleSheet.absoluteFill, contentFit: "cover", transition: 200, onLoad: () => setLoaded(true), onError: media.onError }, media.key) : null,
342
640
  isVideo && loaded ? /* @__PURE__ */ jsx(View, { style: styles.playBadge, pointerEvents: "none", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "play", size: 16, color: "#fafafa" }) }) : null
343
641
  ] });
344
642
  }
@@ -410,6 +708,66 @@ function DesignThumbLayer({
410
708
  textAlign: layer.align
411
709
  }], numberOfLines: 3, children: layer.text });
412
710
  }
711
+ function DocPaper({
712
+ blocks,
713
+ title,
714
+ height
715
+ }) {
716
+ const lines = docPreviewLines(blocks, 7);
717
+ const width = Math.round(height * 8.5 / 11);
718
+ return /* @__PURE__ */ jsxs(View, { style: [docPaperStyles.page, {
719
+ width,
720
+ height
721
+ }], pointerEvents: "none", children: [
722
+ /* @__PURE__ */ jsx(Text, { style: docPaperStyles.title, numberOfLines: 1, children: title }),
723
+ lines.length ? lines.map((line, i) => /* @__PURE__ */ jsx(Text, { style: line.heading ? docPaperStyles.heading : docPaperStyles.line, numberOfLines: 2, children: line.text }, i)) : (
724
+ // A new doc has no words yet; ruled lines say "page" without inventing text.
725
+ [92, 100, 84, 96, 70].map((w, i) => /* @__PURE__ */ jsx(View, { style: [docPaperStyles.rule, {
726
+ width: `${w}%`
727
+ }] }, i))
728
+ )
729
+ ] });
730
+ }
731
+ const docPaperStyles = StyleSheet.create({
732
+ page: {
733
+ backgroundColor: "#ffffff",
734
+ borderRadius: 3,
735
+ padding: 10,
736
+ gap: 5,
737
+ overflow: "hidden",
738
+ shadowColor: "#000",
739
+ shadowOpacity: 0.12,
740
+ shadowRadius: 4,
741
+ shadowOffset: {
742
+ width: 0,
743
+ height: 1
744
+ },
745
+ elevation: 2
746
+ },
747
+ title: {
748
+ fontSize: 10,
749
+ lineHeight: 13,
750
+ fontWeight: "700",
751
+ color: "#171717"
752
+ },
753
+ heading: {
754
+ fontSize: 8,
755
+ lineHeight: 11,
756
+ fontWeight: "600",
757
+ color: "#262626"
758
+ },
759
+ line: {
760
+ fontSize: 8,
761
+ lineHeight: 11,
762
+ color: "#525252"
763
+ },
764
+ rule: {
765
+ height: 4,
766
+ borderRadius: 2,
767
+ backgroundColor: "#e5e5e5",
768
+ marginTop: 4
769
+ }
770
+ });
413
771
  const makeStyles = themedStyles((theme) => StyleSheet.create({
414
772
  plane: {
415
773
  flex: 1,
@@ -433,6 +791,11 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
433
791
  title: __spreadProps(__spreadValues({}, TYPE.display), {
434
792
  color: theme.foreground
435
793
  }),
794
+ titleActions: {
795
+ flexDirection: "row",
796
+ alignItems: "center",
797
+ gap: SPACE.sm
798
+ },
436
799
  toggle: {
437
800
  width: 40,
438
801
  height: 40,
@@ -469,7 +832,9 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
469
832
  section: {
470
833
  marginBottom: SPACE.xl
471
834
  },
835
+ // flexGrow 0: a horizontal ScrollView otherwise swells into any spare height.
472
836
  bleed: {
837
+ flexGrow: 0,
473
838
  marginHorizontal: -16
474
839
  },
475
840
  railContent: {
@@ -554,10 +919,97 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
554
919
  lookName: __spreadProps(__spreadValues({}, TYPE.label), {
555
920
  color: "#fafafa"
556
921
  }),
922
+ templateRowGap: {
923
+ marginBottom: SPACE.md
924
+ },
925
+ templateCover: {
926
+ borderRadius: RADIUS.md,
927
+ overflow: "hidden",
928
+ backgroundColor: theme.card,
929
+ borderWidth: StyleSheet.hairlineWidth,
930
+ borderColor: theme.border
931
+ },
932
+ railError: {
933
+ flexDirection: "row",
934
+ alignItems: "center",
935
+ flexWrap: "wrap",
936
+ gap: SPACE.md,
937
+ marginBottom: SPACE.md
938
+ },
939
+ railErrorText: __spreadProps(__spreadValues({}, TYPE.body), {
940
+ fontSize: 14,
941
+ color: theme.mutedForeground
942
+ }),
943
+ retry: {
944
+ flexDirection: "row",
945
+ alignItems: "center",
946
+ gap: SPACE.xs + 2,
947
+ minHeight: 36,
948
+ paddingHorizontal: SPACE.md,
949
+ borderRadius: RADIUS.pill,
950
+ backgroundColor: theme.card
951
+ },
952
+ retryLabel: __spreadProps(__spreadValues({}, TYPE.label), {
953
+ color: theme.foreground
954
+ }),
955
+ showcase: {
956
+ width: SHOWCASE_WIDTH
957
+ },
958
+ showcasePoster: {
959
+ width: SHOWCASE_WIDTH,
960
+ height: Math.round(SHOWCASE_WIDTH * 9 / 16),
961
+ borderRadius: RADIUS.lg,
962
+ overflow: "hidden",
963
+ backgroundColor: theme.card,
964
+ marginBottom: SPACE.sm
965
+ },
966
+ credit: {
967
+ flexDirection: "row",
968
+ alignItems: "center",
969
+ gap: SPACE.xs,
970
+ marginTop: 1,
971
+ alignSelf: "flex-start"
972
+ },
973
+ creditText: __spreadProps(__spreadValues({}, TYPE.caption), {
974
+ flexShrink: 1,
975
+ color: theme.mutedForeground,
976
+ textDecorationLine: "underline"
977
+ }),
978
+ usePrompt: {
979
+ flexDirection: "row",
980
+ alignItems: "center",
981
+ alignSelf: "flex-start",
982
+ gap: SPACE.xs + 2,
983
+ minHeight: 36,
984
+ marginTop: SPACE.sm,
985
+ paddingHorizontal: SPACE.md,
986
+ borderRadius: RADIUS.pill,
987
+ backgroundColor: theme.card
988
+ },
989
+ usePromptLabel: __spreadProps(__spreadValues({}, TYPE.label), {
990
+ color: theme.foreground
991
+ }),
557
992
  workHead: {
558
993
  gap: SPACE.md,
559
994
  marginBottom: SPACE.lg
560
995
  },
996
+ workFooter: {
997
+ alignItems: "center",
998
+ gap: SPACE.sm,
999
+ marginTop: SPACE.xs
1000
+ },
1001
+ showAll: {
1002
+ minHeight: 40,
1003
+ justifyContent: "center",
1004
+ paddingHorizontal: SPACE.lg,
1005
+ borderRadius: RADIUS.md,
1006
+ borderWidth: StyleSheet.hairlineWidth,
1007
+ borderColor: theme.borderStrong
1008
+ },
1009
+ workNote: __spreadProps(__spreadValues({}, TYPE.caption), {
1010
+ color: theme.mutedForeground,
1011
+ textAlign: "center"
1012
+ }),
561
1013
  noMargin: {
562
1014
  marginBottom: 0
563
1015
  },