@imgly/codesign-mcp 0.1.5 → 0.1.6

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 (973) hide show
  1. package/README.md +51 -1
  2. package/assets/docs/guide/SKILL.md +45 -53
  3. package/assets/docs/guide/animation/create/base.md +234 -243
  4. package/assets/docs/guide/animation/create/text.md +250 -231
  5. package/assets/docs/guide/animation/create.md +197 -231
  6. package/assets/docs/guide/animation/edit.md +196 -271
  7. package/assets/docs/guide/animation/types.md +182 -185
  8. package/assets/docs/guide/animation.md +9 -6
  9. package/assets/docs/guide/api/AssetAPI.md +7 -53
  10. package/assets/docs/guide/api/BlockAPI.md +725 -648
  11. package/assets/docs/guide/api/CreativeEngine.md +7 -16
  12. package/assets/docs/guide/api/EditorAPI.md +32 -93
  13. package/assets/docs/guide/api/EventAPI.md +1 -2
  14. package/assets/docs/guide/api/SceneAPI.md +47 -98
  15. package/assets/docs/guide/api/VariableAPI.md +1 -4
  16. package/assets/docs/guide/api/node/classes/assetapi.md +1090 -0
  17. package/assets/docs/guide/api/node/classes/blockapi.md +12965 -0
  18. package/assets/docs/guide/api/node/classes/creativeengine.md +319 -0
  19. package/assets/docs/guide/api/node/classes/editorapi.md +3417 -0
  20. package/assets/docs/guide/api/node/classes/engineactions.md +319 -0
  21. package/assets/docs/guide/api/node/classes/eventapi.md +56 -0
  22. package/assets/docs/guide/api/node/classes/sceneapi.md +1370 -0
  23. package/assets/docs/guide/api/node/classes/variableapi.md +143 -0
  24. package/assets/docs/guide/api/node/enumerations/compressionformat.md +23 -0
  25. package/assets/docs/guide/api/node/enumerations/compressionlevel.md +24 -0
  26. package/assets/docs/guide/api/node/functions/iscmykcolor.md +30 -0
  27. package/assets/docs/guide/api/node/functions/isrgbacolor.md +30 -0
  28. package/assets/docs/guide/api/node/functions/isspotcolor.md +30 -0
  29. package/assets/docs/guide/api/node/interfaces/addvideooptions.md +31 -0
  30. package/assets/docs/guide/api/node/interfaces/applyassetoptions.md +31 -0
  31. package/assets/docs/guide/api/node/interfaces/asset.md +30 -0
  32. package/assets/docs/guide/api/node/interfaces/assetbooleanproperty.md +25 -0
  33. package/assets/docs/guide/api/node/interfaces/assetcmykcolor.md +26 -0
  34. package/assets/docs/guide/api/node/interfaces/assetcolorproperty.md +25 -0
  35. package/assets/docs/guide/api/node/interfaces/assetcontentaspectratio.md +23 -0
  36. package/assets/docs/guide/api/node/interfaces/assetdefinition.md +31 -0
  37. package/assets/docs/guide/api/node/interfaces/assetenumproperty.md +26 -0
  38. package/assets/docs/guide/api/node/interfaces/assetfixedaspectratio.md +24 -0
  39. package/assets/docs/guide/api/node/interfaces/assetfixedsize.md +25 -0
  40. package/assets/docs/guide/api/node/interfaces/assetfreeaspectratio.md +22 -0
  41. package/assets/docs/guide/api/node/interfaces/assetnumberproperty.md +28 -0
  42. package/assets/docs/guide/api/node/interfaces/assetpayload.md +27 -0
  43. package/assets/docs/guide/api/node/interfaces/assetquerydata.md +32 -0
  44. package/assets/docs/guide/api/node/interfaces/assetresult.md +46 -0
  45. package/assets/docs/guide/api/node/interfaces/assetrgbcolor.md +25 -0
  46. package/assets/docs/guide/api/node/interfaces/assetsource.md +111 -0
  47. package/assets/docs/guide/api/node/interfaces/assetspotcolor.md +25 -0
  48. package/assets/docs/guide/api/node/interfaces/assetsqueryresult.md +31 -0
  49. package/assets/docs/guide/api/node/interfaces/assetstringproperty.md +25 -0
  50. package/assets/docs/guide/api/node/interfaces/assetstylepreset.md +39 -0
  51. package/assets/docs/guide/api/node/interfaces/assetstylepresetanimation.md +23 -0
  52. package/assets/docs/guide/api/node/interfaces/audiotrackinfo.md +32 -0
  53. package/assets/docs/guide/api/node/interfaces/blockevent.md +26 -0
  54. package/assets/docs/guide/api/node/interfaces/blockstateerror.md +26 -0
  55. package/assets/docs/guide/api/node/interfaces/blockstatepending.md +26 -0
  56. package/assets/docs/guide/api/node/interfaces/blockstateready.md +25 -0
  57. package/assets/docs/guide/api/node/interfaces/buffer.md +26 -0
  58. package/assets/docs/guide/api/node/interfaces/characterinkbox.md +29 -0
  59. package/assets/docs/guide/api/node/interfaces/cmykcolor.md +34 -0
  60. package/assets/docs/guide/api/node/interfaces/completeassetresult.md +46 -0
  61. package/assets/docs/guide/api/node/interfaces/configuration.md +38 -0
  62. package/assets/docs/guide/api/node/interfaces/dominantcolor.md +25 -0
  63. package/assets/docs/guide/api/node/interfaces/dominantcolorsoptions.md +23 -0
  64. package/assets/docs/guide/api/node/interfaces/engineactioninfo.md +24 -0
  65. package/assets/docs/guide/api/node/interfaces/engineactionsregistry.md +18 -0
  66. package/assets/docs/guide/api/node/interfaces/engineplugin.md +30 -0
  67. package/assets/docs/guide/api/node/interfaces/font.md +27 -0
  68. package/assets/docs/guide/api/node/interfaces/fontmetrics.md +32 -0
  69. package/assets/docs/guide/api/node/interfaces/gradientcolorstop.md +28 -0
  70. package/assets/docs/guide/api/node/interfaces/logger.md +39 -0
  71. package/assets/docs/guide/api/node/interfaces/pageduration.md +23 -0
  72. package/assets/docs/guide/api/node/interfaces/range.md +23 -0
  73. package/assets/docs/guide/api/node/interfaces/rgbacolor.md +32 -0
  74. package/assets/docs/guide/api/node/interfaces/rgbcolor.md +30 -0
  75. package/assets/docs/guide/api/node/interfaces/settings.md +126 -0
  76. package/assets/docs/guide/api/node/interfaces/size2.md +21 -0
  77. package/assets/docs/guide/api/node/interfaces/source.md +24 -0
  78. package/assets/docs/guide/api/node/interfaces/spotcolor.md +30 -0
  79. package/assets/docs/guide/api/node/interfaces/textdecorationconfig.md +31 -0
  80. package/assets/docs/guide/api/node/interfaces/textfontsizeoptions.md +24 -0
  81. package/assets/docs/guide/api/node/interfaces/textruninfo.md +33 -0
  82. package/assets/docs/guide/api/node/interfaces/transientresource.md +26 -0
  83. package/assets/docs/guide/api/node/interfaces/typeface.md +23 -0
  84. package/assets/docs/guide/api/node/interfaces/vec2.md +21 -0
  85. package/assets/docs/guide/api/node/interfaces/vec3.md +22 -0
  86. package/assets/docs/guide/api/node/type-aliases/addimageoptions.md +36 -0
  87. package/assets/docs/guide/api/node/type-aliases/animationbaselinedirection.md +18 -0
  88. package/assets/docs/guide/api/node/type-aliases/animationblockswipetextdirection.md +18 -0
  89. package/assets/docs/guide/api/node/type-aliases/animationeasing.md +18 -0
  90. package/assets/docs/guide/api/node/type-aliases/animationentry.md +28 -0
  91. package/assets/docs/guide/api/node/type-aliases/animationgrowdirection.md +18 -0
  92. package/assets/docs/guide/api/node/type-aliases/animationjumploopdirection.md +18 -0
  93. package/assets/docs/guide/api/node/type-aliases/animationkenburnsdirection.md +18 -0
  94. package/assets/docs/guide/api/node/type-aliases/animationmergetextdirection.md +18 -0
  95. package/assets/docs/guide/api/node/type-aliases/animationoptions.md +28 -0
  96. package/assets/docs/guide/api/node/type-aliases/animationspindirection.md +18 -0
  97. package/assets/docs/guide/api/node/type-aliases/animationspinloopdirection.md +18 -0
  98. package/assets/docs/guide/api/node/type-aliases/animationtype.md +24 -0
  99. package/assets/docs/guide/api/node/type-aliases/animationtypelonghand.md +21 -0
  100. package/assets/docs/guide/api/node/type-aliases/animationtypeshorthand.md +18 -0
  101. package/assets/docs/guide/api/node/type-aliases/animationtypewritertextwritingstyle.md +18 -0
  102. package/assets/docs/guide/api/node/type-aliases/animationwipedirection.md +18 -0
  103. package/assets/docs/guide/api/node/type-aliases/applicationmimetype.md +20 -0
  104. package/assets/docs/guide/api/node/type-aliases/assetcolor.md +23 -0
  105. package/assets/docs/guide/api/node/type-aliases/assetfilter.md +47 -0
  106. package/assets/docs/guide/api/node/type-aliases/assetgroups.md +25 -0
  107. package/assets/docs/guide/api/node/type-aliases/assetmetadata.md +42 -0
  108. package/assets/docs/guide/api/node/type-aliases/assetproperty.md +25 -0
  109. package/assets/docs/guide/api/node/type-aliases/assetpropertyfilter.md +41 -0
  110. package/assets/docs/guide/api/node/type-aliases/assetpropertypath.md +26 -0
  111. package/assets/docs/guide/api/node/type-aliases/assetstylepresetanimationproperties.md +34 -0
  112. package/assets/docs/guide/api/node/type-aliases/assetstylepresetproperties.md +29 -0
  113. package/assets/docs/guide/api/node/type-aliases/assetstylepresetpropertyvalue.md +29 -0
  114. package/assets/docs/guide/api/node/type-aliases/assetstylepresetscalableproperty.md +28 -0
  115. package/assets/docs/guide/api/node/type-aliases/assettransformpreset.md +24 -0
  116. package/assets/docs/guide/api/node/type-aliases/asyncuriresolver.md +36 -0
  117. package/assets/docs/guide/api/node/type-aliases/audioexportoptions.md +43 -0
  118. package/assets/docs/guide/api/node/type-aliases/audiofromvideooptions.md +27 -0
  119. package/assets/docs/guide/api/node/type-aliases/audiomimetype.md +20 -0
  120. package/assets/docs/guide/api/node/type-aliases/blendmode.md +18 -0
  121. package/assets/docs/guide/api/node/type-aliases/blockenumtype.md +63 -0
  122. package/assets/docs/guide/api/node/type-aliases/blockstate.md +26 -0
  123. package/assets/docs/guide/api/node/type-aliases/blurtype.md +24 -0
  124. package/assets/docs/guide/api/node/type-aliases/blurtypelonghand.md +21 -0
  125. package/assets/docs/guide/api/node/type-aliases/blurtypeshorthand.md +18 -0
  126. package/assets/docs/guide/api/node/type-aliases/booleanoperation.md +27 -0
  127. package/assets/docs/guide/api/node/type-aliases/boolpropertyname.md +79 -0
  128. package/assets/docs/guide/api/node/type-aliases/cameraclampingovershootmode.md +18 -0
  129. package/assets/docs/guide/api/node/type-aliases/captionhorizontalalignment.md +18 -0
  130. package/assets/docs/guide/api/node/type-aliases/captionverticalalignment.md +18 -0
  131. package/assets/docs/guide/api/node/type-aliases/cmyk.md +23 -0
  132. package/assets/docs/guide/api/node/type-aliases/color.md +23 -0
  133. package/assets/docs/guide/api/node/type-aliases/colorpickercolormode.md +18 -0
  134. package/assets/docs/guide/api/node/type-aliases/colorpropertyname.md +31 -0
  135. package/assets/docs/guide/api/node/type-aliases/colorspace.md +20 -0
  136. package/assets/docs/guide/api/node/type-aliases/contentfillmode.md +18 -0
  137. package/assets/docs/guide/api/node/type-aliases/controlgizmomovehandlevisibility.md +18 -0
  138. package/assets/docs/guide/api/node/type-aliases/controlgizmoresizehandlesvisibility.md +18 -0
  139. package/assets/docs/guide/api/node/type-aliases/controlgizmorotatehandlesvisibility.md +18 -0
  140. package/assets/docs/guide/api/node/type-aliases/controlgizmoscalehandlesvisibility.md +18 -0
  141. package/assets/docs/guide/api/node/type-aliases/createsceneoptions.md +30 -0
  142. package/assets/docs/guide/api/node/type-aliases/cutoutoperation.md +20 -0
  143. package/assets/docs/guide/api/node/type-aliases/cutouttype.md +18 -0
  144. package/assets/docs/guide/api/node/type-aliases/defaultassetsourceid.md +37 -0
  145. package/assets/docs/guide/api/node/type-aliases/demoassetsourceid.md +33 -0
  146. package/assets/docs/guide/api/node/type-aliases/designblockid.md +20 -0
  147. package/assets/docs/guide/api/node/type-aliases/designblocktype.md +24 -0
  148. package/assets/docs/guide/api/node/type-aliases/designblocktypelonghand.md +21 -0
  149. package/assets/docs/guide/api/node/type-aliases/designblocktypeshorthand.md +18 -0
  150. package/assets/docs/guide/api/node/type-aliases/designunit.md +18 -0
  151. package/assets/docs/guide/api/node/type-aliases/doubleclickselectionmode.md +18 -0
  152. package/assets/docs/guide/api/node/type-aliases/doublepropertyname.md +26 -0
  153. package/assets/docs/guide/api/node/type-aliases/dropshadowoptions.md +32 -0
  154. package/assets/docs/guide/api/node/type-aliases/editmode.md +27 -0
  155. package/assets/docs/guide/api/node/type-aliases/effecttype.md +24 -0
  156. package/assets/docs/guide/api/node/type-aliases/effecttypelonghand.md +21 -0
  157. package/assets/docs/guide/api/node/type-aliases/effecttypeshorthand.md +18 -0
  158. package/assets/docs/guide/api/node/type-aliases/engineactionid.md +20 -0
  159. package/assets/docs/guide/api/node/type-aliases/enginecustomactionfunction.md +30 -0
  160. package/assets/docs/guide/api/node/type-aliases/engineplugincontext.md +30 -0
  161. package/assets/docs/guide/api/node/type-aliases/enumpropertyname.md +59 -0
  162. package/assets/docs/guide/api/node/type-aliases/enumvalues.md +59 -0
  163. package/assets/docs/guide/api/node/type-aliases/exportoptions.md +57 -0
  164. package/assets/docs/guide/api/node/type-aliases/fillpixelstreamorientation.md +18 -0
  165. package/assets/docs/guide/api/node/type-aliases/filltype.md +24 -0
  166. package/assets/docs/guide/api/node/type-aliases/filltypelonghand.md +21 -0
  167. package/assets/docs/guide/api/node/type-aliases/filltypeshorthand.md +18 -0
  168. package/assets/docs/guide/api/node/type-aliases/floatpropertyname.md +184 -0
  169. package/assets/docs/guide/api/node/type-aliases/fontsizeunit.md +23 -0
  170. package/assets/docs/guide/api/node/type-aliases/fontstyle.md +20 -0
  171. package/assets/docs/guide/api/node/type-aliases/fontweight.md +30 -0
  172. package/assets/docs/guide/api/node/type-aliases/gradientstoprgba.md +23 -0
  173. package/assets/docs/guide/api/node/type-aliases/heightmode.md +18 -0
  174. package/assets/docs/guide/api/node/type-aliases/hexcolorstring.md +20 -0
  175. package/assets/docs/guide/api/node/type-aliases/historyid.md +20 -0
  176. package/assets/docs/guide/api/node/type-aliases/historyupdate.md +25 -0
  177. package/assets/docs/guide/api/node/type-aliases/horizontalblockalignment.md +18 -0
  178. package/assets/docs/guide/api/node/type-aliases/horizontalcontentfillalignment.md +18 -0
  179. package/assets/docs/guide/api/node/type-aliases/horizontaltextalignment.md +18 -0
  180. package/assets/docs/guide/api/node/type-aliases/imagemimetype.md +25 -0
  181. package/assets/docs/guide/api/node/type-aliases/intpropertyname.md +26 -0
  182. package/assets/docs/guide/api/node/type-aliases/liststyle.md +20 -0
  183. package/assets/docs/guide/api/node/type-aliases/locale.md +20 -0
  184. package/assets/docs/guide/api/node/type-aliases/loglevel.md +24 -0
  185. package/assets/docs/guide/api/node/type-aliases/mimetype.md +20 -0
  186. package/assets/docs/guide/api/node/type-aliases/objecttype.md +24 -0
  187. package/assets/docs/guide/api/node/type-aliases/objecttypelonghand.md +27 -0
  188. package/assets/docs/guide/api/node/type-aliases/objecttypeshorthand.md +27 -0
  189. package/assets/docs/guide/api/node/type-aliases/optionalprefix.md +24 -0
  190. package/assets/docs/guide/api/node/type-aliases/pageguidessource.md +18 -0
  191. package/assets/docs/guide/api/node/type-aliases/palettecolor.md +24 -0
  192. package/assets/docs/guide/api/node/type-aliases/positionmode.md +20 -0
  193. package/assets/docs/guide/api/node/type-aliases/positionxmode.md +18 -0
  194. package/assets/docs/guide/api/node/type-aliases/positionymode.md +18 -0
  195. package/assets/docs/guide/api/node/type-aliases/propertytype.md +31 -0
  196. package/assets/docs/guide/api/node/type-aliases/rgba.md +23 -0
  197. package/assets/docs/guide/api/node/type-aliases/rolestring.md +23 -0
  198. package/assets/docs/guide/api/node/type-aliases/scenefontsizeunit.md +18 -0
  199. package/assets/docs/guide/api/node/type-aliases/scenelayout.md +18 -0
  200. package/assets/docs/guide/api/node/type-aliases/scenemode.md +18 -0
  201. package/assets/docs/guide/api/node/type-aliases/scope.md +50 -0
  202. package/assets/docs/guide/api/node/type-aliases/settingboolpropertyname.md +62 -0
  203. package/assets/docs/guide/api/node/type-aliases/settingcolorpropertyname.md +38 -0
  204. package/assets/docs/guide/api/node/type-aliases/settingenumpropertyname.md +29 -0
  205. package/assets/docs/guide/api/node/type-aliases/settingenumtype.md +33 -0
  206. package/assets/docs/guide/api/node/type-aliases/settingenumvalues.md +29 -0
  207. package/assets/docs/guide/api/node/type-aliases/settingfloatpropertyname.md +25 -0
  208. package/assets/docs/guide/api/node/type-aliases/settingintpropertyname.md +18 -0
  209. package/assets/docs/guide/api/node/type-aliases/settingkey.md +20 -0
  210. package/assets/docs/guide/api/node/type-aliases/settingsbool.md +18 -0
  211. package/assets/docs/guide/api/node/type-aliases/settingscolor.md +20 -0
  212. package/assets/docs/guide/api/node/type-aliases/settingscolorrgba.md +24 -0
  213. package/assets/docs/guide/api/node/type-aliases/settingsenum.md +18 -0
  214. package/assets/docs/guide/api/node/type-aliases/settingsfloat.md +18 -0
  215. package/assets/docs/guide/api/node/type-aliases/settingsint.md +18 -0
  216. package/assets/docs/guide/api/node/type-aliases/settingsstring.md +18 -0
  217. package/assets/docs/guide/api/node/type-aliases/settingstringpropertyname.md +28 -0
  218. package/assets/docs/guide/api/node/type-aliases/settingtype.md +20 -0
  219. package/assets/docs/guide/api/node/type-aliases/settingvaluetype.md +26 -0
  220. package/assets/docs/guide/api/node/type-aliases/shapetype.md +24 -0
  221. package/assets/docs/guide/api/node/type-aliases/shapetypelonghand.md +21 -0
  222. package/assets/docs/guide/api/node/type-aliases/shapetypeshorthand.md +18 -0
  223. package/assets/docs/guide/api/node/type-aliases/shapevectorpathfillrule.md +18 -0
  224. package/assets/docs/guide/api/node/type-aliases/sizemode.md +20 -0
  225. package/assets/docs/guide/api/node/type-aliases/sortingorder.md +21 -0
  226. package/assets/docs/guide/api/node/type-aliases/sourcesetpropertyname.md +18 -0
  227. package/assets/docs/guide/api/node/type-aliases/splitoptions.md +28 -0
  228. package/assets/docs/guide/api/node/type-aliases/stringpropertyname.md +43 -0
  229. package/assets/docs/guide/api/node/type-aliases/strokecap.md +18 -0
  230. package/assets/docs/guide/api/node/type-aliases/strokecornergeometry.md +18 -0
  231. package/assets/docs/guide/api/node/type-aliases/strokedashendcap.md +18 -0
  232. package/assets/docs/guide/api/node/type-aliases/strokedashstartcap.md +18 -0
  233. package/assets/docs/guide/api/node/type-aliases/strokeendcap.md +18 -0
  234. package/assets/docs/guide/api/node/type-aliases/strokeposition.md +18 -0
  235. package/assets/docs/guide/api/node/type-aliases/strokestartcap.md +18 -0
  236. package/assets/docs/guide/api/node/type-aliases/strokestyle.md +18 -0
  237. package/assets/docs/guide/api/node/type-aliases/syncuriresolver.md +31 -0
  238. package/assets/docs/guide/api/node/type-aliases/textanimationwritingstyle.md +18 -0
  239. package/assets/docs/guide/api/node/type-aliases/textcase.md +20 -0
  240. package/assets/docs/guide/api/node/type-aliases/textdecorationline.md +27 -0
  241. package/assets/docs/guide/api/node/type-aliases/textdecorationstyle.md +26 -0
  242. package/assets/docs/guide/api/node/type-aliases/textverticalalignment.md +18 -0
  243. package/assets/docs/guide/api/node/type-aliases/timelinetrackvisibility.md +18 -0
  244. package/assets/docs/guide/api/node/type-aliases/touchpinchaction.md +18 -0
  245. package/assets/docs/guide/api/node/type-aliases/touchrotateaction.md +18 -0
  246. package/assets/docs/guide/api/node/type-aliases/typefacedefinition.md +41 -0
  247. package/assets/docs/guide/api/node/type-aliases/verticalblockalignment.md +18 -0
  248. package/assets/docs/guide/api/node/type-aliases/verticalcontentfillalignment.md +18 -0
  249. package/assets/docs/guide/api/node/type-aliases/videoexportoptions.md +54 -0
  250. package/assets/docs/guide/api/node/type-aliases/videomimetype.md +20 -0
  251. package/assets/docs/guide/api/node/type-aliases/widthmode.md +18 -0
  252. package/assets/docs/guide/api/node/type-aliases/xywh.md +23 -0
  253. package/assets/docs/guide/api/node/type-aliases/zoomautofitaxis.md +20 -0
  254. package/assets/docs/guide/api/node/type-aliases/zoomoptions.md +27 -0
  255. package/assets/docs/guide/api/node/variables/animation_types.md +21 -0
  256. package/assets/docs/guide/api/node/variables/animationbaselinedirectionvalues.md +18 -0
  257. package/assets/docs/guide/api/node/variables/animationblockswipetextdirectionvalues.md +18 -0
  258. package/assets/docs/guide/api/node/variables/animationeasingvalues.md +18 -0
  259. package/assets/docs/guide/api/node/variables/animationgrowdirectionvalues.md +18 -0
  260. package/assets/docs/guide/api/node/variables/animationjumploopdirectionvalues.md +18 -0
  261. package/assets/docs/guide/api/node/variables/animationkenburnsdirectionvalues.md +18 -0
  262. package/assets/docs/guide/api/node/variables/animationmergetextdirectionvalues.md +18 -0
  263. package/assets/docs/guide/api/node/variables/animationspindirectionvalues.md +18 -0
  264. package/assets/docs/guide/api/node/variables/animationspinloopdirectionvalues.md +18 -0
  265. package/assets/docs/guide/api/node/variables/animationtypewritertextwritingstylevalues.md +18 -0
  266. package/assets/docs/guide/api/node/variables/animationwipedirectionvalues.md +18 -0
  267. package/assets/docs/guide/api/node/variables/blendmodevalues.md +18 -0
  268. package/assets/docs/guide/api/node/variables/blur_types.md +21 -0
  269. package/assets/docs/guide/api/node/variables/cameraclampingovershootmodevalues.md +18 -0
  270. package/assets/docs/guide/api/node/variables/captionhorizontalalignmentvalues.md +18 -0
  271. package/assets/docs/guide/api/node/variables/captionverticalalignmentvalues.md +18 -0
  272. package/assets/docs/guide/api/node/variables/colorpickercolormodevalues.md +18 -0
  273. package/assets/docs/guide/api/node/variables/contentfillmodevalues.md +18 -0
  274. package/assets/docs/guide/api/node/variables/controlgizmomovehandlevisibilityvalues.md +18 -0
  275. package/assets/docs/guide/api/node/variables/controlgizmoresizehandlesvisibilityvalues.md +18 -0
  276. package/assets/docs/guide/api/node/variables/controlgizmorotatehandlesvisibilityvalues.md +18 -0
  277. package/assets/docs/guide/api/node/variables/controlgizmoscalehandlesvisibilityvalues.md +18 -0
  278. package/assets/docs/guide/api/node/variables/cutouttypevalues.md +18 -0
  279. package/assets/docs/guide/api/node/variables/design_block_types.md +21 -0
  280. package/assets/docs/guide/api/node/variables/doubleclickselectionmodevalues.md +18 -0
  281. package/assets/docs/guide/api/node/variables/effect_types.md +21 -0
  282. package/assets/docs/guide/api/node/variables/fill_types.md +21 -0
  283. package/assets/docs/guide/api/node/variables/fillpixelstreamorientationvalues.md +18 -0
  284. package/assets/docs/guide/api/node/variables/heightmodevalues.md +18 -0
  285. package/assets/docs/guide/api/node/variables/horizontalcontentfillalignmentvalues.md +18 -0
  286. package/assets/docs/guide/api/node/variables/loglevel.md +37 -0
  287. package/assets/docs/guide/api/node/variables/mimetype.md +41 -0
  288. package/assets/docs/guide/api/node/variables/pageguidessourcevalues.md +18 -0
  289. package/assets/docs/guide/api/node/variables/positionxmodevalues.md +18 -0
  290. package/assets/docs/guide/api/node/variables/positionymodevalues.md +18 -0
  291. package/assets/docs/guide/api/node/variables/scenedesignunitvalues.md +18 -0
  292. package/assets/docs/guide/api/node/variables/scenefontsizeunitvalues.md +18 -0
  293. package/assets/docs/guide/api/node/variables/scenelayoutvalues.md +18 -0
  294. package/assets/docs/guide/api/node/variables/scenemodevalues.md +18 -0
  295. package/assets/docs/guide/api/node/variables/shape_types.md +21 -0
  296. package/assets/docs/guide/api/node/variables/shapevectorpathfillrulevalues.md +18 -0
  297. package/assets/docs/guide/api/node/variables/strokecapvalues.md +18 -0
  298. package/assets/docs/guide/api/node/variables/strokecornergeometryvalues.md +18 -0
  299. package/assets/docs/guide/api/node/variables/strokedashendcapvalues.md +18 -0
  300. package/assets/docs/guide/api/node/variables/strokedashstartcapvalues.md +18 -0
  301. package/assets/docs/guide/api/node/variables/strokeendcapvalues.md +18 -0
  302. package/assets/docs/guide/api/node/variables/strokepositionvalues.md +18 -0
  303. package/assets/docs/guide/api/node/variables/strokestartcapvalues.md +18 -0
  304. package/assets/docs/guide/api/node/variables/strokestylevalues.md +18 -0
  305. package/assets/docs/guide/api/node/variables/textanimationwritingstylevalues.md +18 -0
  306. package/assets/docs/guide/api/node/variables/texthorizontalalignmentvalues.md +18 -0
  307. package/assets/docs/guide/api/node/variables/textverticalalignmentvalues.md +18 -0
  308. package/assets/docs/guide/api/node/variables/timelinetrackvisibilityvalues.md +18 -0
  309. package/assets/docs/guide/api/node/variables/touchpinchactionvalues.md +18 -0
  310. package/assets/docs/guide/api/node/variables/touchrotateactionvalues.md +18 -0
  311. package/assets/docs/guide/api/node/variables/verticalcontentfillalignmentvalues.md +18 -0
  312. package/assets/docs/guide/api/node/variables/widthmodevalues.md +18 -0
  313. package/assets/docs/guide/api/types.md +5 -9
  314. package/assets/docs/guide/api-reference/overview.md +7 -7
  315. package/assets/docs/guide/automation/auto-resize.md +263 -300
  316. package/assets/docs/guide/automation/data-merge.md +246 -275
  317. package/assets/docs/guide/automation/design-generation.md +102 -31
  318. package/assets/docs/guide/automation/multi-image-generation.md +758 -0
  319. package/assets/docs/guide/automation/overview.md +21 -4
  320. package/assets/docs/guide/automation.md +10 -5
  321. package/assets/docs/guide/capabilities.md +6 -4
  322. package/assets/docs/guide/colors/adjust.md +247 -249
  323. package/assets/docs/guide/colors/apply.md +127 -138
  324. package/assets/docs/guide/colors/basics.md +126 -150
  325. package/assets/docs/guide/colors/conversion.md +171 -177
  326. package/assets/docs/guide/colors/create-color-palette.md +244 -245
  327. package/assets/docs/guide/colors/extract-colors.md +144 -0
  328. package/assets/docs/guide/colors/for-print/cmyk.md +292 -352
  329. package/assets/docs/guide/colors/for-print/spot.md +521 -578
  330. package/assets/docs/guide/colors/for-print.md +9 -4
  331. package/assets/docs/guide/colors/for-screen/p3.md +12 -10
  332. package/assets/docs/guide/colors/for-screen/srgb.md +107 -133
  333. package/assets/docs/guide/colors/for-screen.md +9 -4
  334. package/assets/docs/guide/colors/overview.md +6 -4
  335. package/assets/docs/guide/colors/replace.md +381 -419
  336. package/assets/docs/guide/colors.md +9 -4
  337. package/assets/docs/guide/compatibility.md +7 -5
  338. package/assets/docs/guide/concepts/architecture.md +17 -15
  339. package/assets/docs/guide/concepts/assets.md +152 -140
  340. package/assets/docs/guide/concepts/blocks.md +227 -323
  341. package/assets/docs/guide/concepts/buffers.md +147 -276
  342. package/assets/docs/guide/concepts/design-units.md +95 -145
  343. package/assets/docs/guide/concepts/editing-workflow.md +69 -183
  344. package/assets/docs/guide/concepts/events.md +80 -122
  345. package/assets/docs/guide/concepts/headless-mode.md +237 -0
  346. package/assets/docs/guide/concepts/pages.md +137 -127
  347. package/assets/docs/guide/concepts/resources.md +156 -217
  348. package/assets/docs/guide/concepts/scenes.md +191 -210
  349. package/assets/docs/guide/concepts/templating.md +118 -74
  350. package/assets/docs/guide/concepts/terminology.md +49 -47
  351. package/assets/docs/guide/concepts/undo-and-history.md +229 -303
  352. package/assets/docs/guide/concepts.md +9 -7
  353. package/assets/docs/guide/configuration.md +252 -380
  354. package/assets/docs/guide/conversion/overview.md +33 -4
  355. package/assets/docs/guide/conversion/to-base64.md +127 -167
  356. package/assets/docs/guide/conversion/to-pdf.md +24 -474
  357. package/assets/docs/guide/conversion/to-png.md +168 -211
  358. package/assets/docs/guide/conversion.md +9 -4
  359. package/assets/docs/guide/create-audio/audio/add-music.md +301 -327
  360. package/assets/docs/guide/create-audio/audio/add-sound-effects.md +475 -359
  361. package/assets/docs/guide/create-audio/audio/loop.md +232 -272
  362. package/assets/docs/guide/create-composition/add-background.md +237 -239
  363. package/assets/docs/guide/create-composition/blend-modes.md +118 -209
  364. package/assets/docs/guide/create-composition/collage.md +538 -320
  365. package/assets/docs/guide/create-composition/group-and-ungroup.md +216 -261
  366. package/assets/docs/guide/create-composition/layer-management.md +219 -257
  367. package/assets/docs/guide/create-composition/layout.md +513 -315
  368. package/assets/docs/guide/create-composition/lock-design.md +90 -109
  369. package/assets/docs/guide/create-composition/multi-page.md +133 -113
  370. package/assets/docs/guide/create-composition/overview.md +16 -4
  371. package/assets/docs/guide/create-composition/programmatic.md +288 -344
  372. package/assets/docs/guide/create-composition.md +10 -5
  373. package/assets/docs/guide/create-templates/add-dynamic-content/placeholders.md +443 -569
  374. package/assets/docs/guide/create-templates/add-dynamic-content/set-editing-constraints.md +567 -470
  375. package/assets/docs/guide/create-templates/add-dynamic-content/text-variables.md +179 -516
  376. package/assets/docs/guide/create-templates/add-dynamic-content.md +226 -224
  377. package/assets/docs/guide/create-templates/add-to-template-library.md +183 -193
  378. package/assets/docs/guide/create-templates/edit-or-remove.md +297 -303
  379. package/assets/docs/guide/create-templates/from-scratch.md +207 -268
  380. package/assets/docs/guide/create-templates/import/from-scene-file.md +158 -236
  381. package/assets/docs/guide/create-templates/import.md +145 -161
  382. package/assets/docs/guide/create-templates/lock.md +42 -295
  383. package/assets/docs/guide/create-templates/overview.md +33 -4
  384. package/assets/docs/guide/create-templates.md +9 -5
  385. package/assets/docs/guide/create-video/audio/adjust-speed.md +157 -207
  386. package/assets/docs/guide/create-video/audio/adjust-volume.md +116 -227
  387. package/assets/docs/guide/create-video/control.md +352 -193
  388. package/assets/docs/guide/create-video/limitations.md +175 -280
  389. package/assets/docs/guide/create-video.md +11 -10
  390. package/assets/docs/guide/edit-image/add-watermark.md +283 -330
  391. package/assets/docs/guide/edit-image/overview.md +29 -4
  392. package/assets/docs/guide/edit-image/remove-bg.md +283 -337
  393. package/assets/docs/guide/edit-image/replace-colors.md +424 -502
  394. package/assets/docs/guide/edit-image/transform/crop.md +463 -402
  395. package/assets/docs/guide/edit-image/transform/flip.md +353 -0
  396. package/assets/docs/guide/edit-image/transform/move.md +143 -100
  397. package/assets/docs/guide/edit-image/transform/resize.md +118 -88
  398. package/assets/docs/guide/edit-image/transform/rotate.md +132 -165
  399. package/assets/docs/guide/edit-image/transform/scale.md +230 -228
  400. package/assets/docs/guide/edit-image/transform.md +10 -5
  401. package/assets/docs/guide/edit-image.md +11 -7
  402. package/assets/docs/guide/edit-video/add-captions.md +344 -421
  403. package/assets/docs/guide/edit-video/add-watermark.md +312 -258
  404. package/assets/docs/guide/edit-video/join-and-arrange.md +237 -371
  405. package/assets/docs/guide/edit-video/redaction.md +419 -385
  406. package/assets/docs/guide/edit-video/split.md +243 -493
  407. package/assets/docs/guide/edit-video/transform/crop.md +21 -352
  408. package/assets/docs/guide/edit-video/transform/flip.md +102 -76
  409. package/assets/docs/guide/edit-video/transform/move.md +258 -310
  410. package/assets/docs/guide/edit-video/transform/resize.md +264 -428
  411. package/assets/docs/guide/edit-video/transform/rotate.md +265 -228
  412. package/assets/docs/guide/edit-video/transform/scale.md +320 -417
  413. package/assets/docs/guide/edit-video/transform.md +10 -6
  414. package/assets/docs/guide/edit-video/trim.md +448 -494
  415. package/assets/docs/guide/engine-interface.md +51 -62
  416. package/assets/docs/guide/export-save-publish/create-thumbnail.md +148 -184
  417. package/assets/docs/guide/export-save-publish/export/compress.md +161 -559
  418. package/assets/docs/guide/export-save-publish/export/overview.md +224 -373
  419. package/assets/docs/guide/export-save-publish/export/partial-export.md +386 -577
  420. package/assets/docs/guide/export-save-publish/export/size-limits.md +215 -310
  421. package/assets/docs/guide/export-save-publish/export/to-jpeg.md +132 -213
  422. package/assets/docs/guide/export-save-publish/export/to-pdf.md +139 -267
  423. package/assets/docs/guide/export-save-publish/export/to-png.md +121 -165
  424. package/assets/docs/guide/export-save-publish/export/to-raw-data.md +187 -234
  425. package/assets/docs/guide/export-save-publish/export/to-webp.md +160 -190
  426. package/assets/docs/guide/export-save-publish/export/with-color-mask.md +359 -203
  427. package/assets/docs/guide/export-save-publish/export.md +14 -11
  428. package/assets/docs/guide/export-save-publish/for-printing.md +141 -237
  429. package/assets/docs/guide/export-save-publish/for-social-media.md +124 -261
  430. package/assets/docs/guide/export-save-publish/pre-export-validation.md +436 -522
  431. package/assets/docs/guide/export-save-publish/save.md +167 -226
  432. package/assets/docs/guide/export-save-publish/store-custom-metadata.md +97 -162
  433. package/assets/docs/guide/file-format-support.md +9 -9
  434. package/assets/docs/guide/fills/color.md +370 -347
  435. package/assets/docs/guide/fills/image.md +167 -196
  436. package/assets/docs/guide/fills/overview.md +6 -4
  437. package/assets/docs/guide/fills/video.md +286 -438
  438. package/assets/docs/guide/fills.md +12 -8
  439. package/assets/docs/guide/filters-and-effects/apply.md +598 -664
  440. package/assets/docs/guide/filters-and-effects/blur.md +261 -159
  441. package/assets/docs/guide/filters-and-effects/chroma-key-green-screen.md +194 -293
  442. package/assets/docs/guide/filters-and-effects/create-custom-filters.md +548 -466
  443. package/assets/docs/guide/filters-and-effects/create-custom-lut-filter.md +176 -244
  444. package/assets/docs/guide/filters-and-effects/distortion.md +317 -384
  445. package/assets/docs/guide/filters-and-effects/duotone.md +221 -217
  446. package/assets/docs/guide/filters-and-effects/gradients.md +670 -813
  447. package/assets/docs/guide/filters-and-effects/overview.md +7 -7
  448. package/assets/docs/guide/filters-and-effects/support.md +97 -132
  449. package/assets/docs/guide/filters-and-effects.md +11 -6
  450. package/assets/docs/guide/get-started/agent-skills.md +20 -18
  451. package/assets/docs/guide/get-started/build-with-ai.md +7 -4
  452. package/assets/docs/guide/get-started/bun.md +219 -0
  453. package/assets/docs/guide/get-started/deno.md +161 -0
  454. package/assets/docs/guide/get-started/mcp-server.md +6 -4
  455. package/assets/docs/guide/get-started/overview.md +11 -6
  456. package/assets/docs/guide/get-started/vanilla-aws-lambda.md +506 -0
  457. package/assets/docs/guide/get-started/vanilla-clone-github-project.md +124 -0
  458. package/assets/docs/guide/get-started/vanilla.md +235 -0
  459. package/assets/docs/guide/guides/export-save-publish/export/audio.md +80 -66
  460. package/assets/docs/guide/guides.md +10 -9
  461. package/assets/docs/guide/import-media/asset-panel/refresh-assets.md +259 -288
  462. package/assets/docs/guide/import-media/concepts.md +20 -38
  463. package/assets/docs/guide/import-media/content-json-schema.md +145 -125
  464. package/assets/docs/guide/import-media/default-assets.md +113 -161
  465. package/assets/docs/guide/import-media/edit-or-remove-assets.md +391 -395
  466. package/assets/docs/guide/import-media/file-format-support.md +78 -61
  467. package/assets/docs/guide/import-media/from-remote-source/asset-versioning.md +273 -244
  468. package/assets/docs/guide/import-media/from-remote-source/remote-asset.md +152 -222
  469. package/assets/docs/guide/import-media/from-remote-source.md +9 -11
  470. package/assets/docs/guide/import-media/overview.md +5 -5
  471. package/assets/docs/guide/import-media/retrieve-mimetype.md +216 -108
  472. package/assets/docs/guide/import-media/size-limits.md +6 -4
  473. package/assets/docs/guide/import-media/source-sets.md +190 -251
  474. package/assets/docs/guide/import-media.md +10 -8
  475. package/assets/docs/guide/insert-media/audio.md +202 -195
  476. package/assets/docs/guide/insert-media/images.md +190 -188
  477. package/assets/docs/guide/insert-media/position-and-align.md +284 -551
  478. package/assets/docs/guide/insert-media/shapes-or-stickers.md +402 -418
  479. package/assets/docs/guide/insert-media/videos.md +236 -203
  480. package/assets/docs/guide/insert-media.md +10 -5
  481. package/assets/docs/guide/key-capabilities.md +36 -4
  482. package/assets/docs/guide/key-concepts.md +6 -4
  483. package/assets/docs/guide/licensing.md +6 -4
  484. package/assets/docs/guide/llms-txt.md +11 -7
  485. package/assets/docs/guide/open-the-editor/blank-canvas.md +102 -63
  486. package/assets/docs/guide/open-the-editor/from-image.md +157 -127
  487. package/assets/docs/guide/open-the-editor/from-template.md +131 -92
  488. package/assets/docs/guide/open-the-editor/from-video.md +204 -212
  489. package/assets/docs/guide/open-the-editor/import-design/from-archive.md +310 -360
  490. package/assets/docs/guide/open-the-editor/import-design/from-indesign.md +716 -513
  491. package/assets/docs/guide/open-the-editor/import-design/from-photoshop.md +667 -695
  492. package/assets/docs/guide/open-the-editor/import-design.md +228 -266
  493. package/assets/docs/guide/open-the-editor/load-scene.md +72 -68
  494. package/assets/docs/guide/open-the-editor/overview.md +6 -4
  495. package/assets/docs/guide/open-the-editor/uri-resolver.md +160 -251
  496. package/assets/docs/guide/open-the-editor.md +11 -9
  497. package/assets/docs/guide/outlines/overview.md +12 -4
  498. package/assets/docs/guide/outlines/shadows-and-glows.md +105 -410
  499. package/assets/docs/guide/outlines/strokes.md +218 -166
  500. package/assets/docs/guide/outlines.md +9 -4
  501. package/assets/docs/guide/overview.md +14 -6
  502. package/assets/docs/guide/performance.md +220 -113
  503. package/assets/docs/guide/plugins/print-ready-pdf.md +273 -368
  504. package/assets/docs/guide/plugins.md +10 -16
  505. package/assets/docs/guide/rules/asset-handling.md +7 -18
  506. package/assets/docs/guide/rules/common-pitfalls.md +25 -42
  507. package/assets/docs/guide/rules/content-fill-mode.md +4 -4
  508. package/assets/docs/guide/rules/enforce-brand-guidelines.md +398 -567
  509. package/assets/docs/guide/rules/lock-content.md +188 -231
  510. package/assets/docs/guide/rules/moderate-content.md +580 -571
  511. package/assets/docs/guide/rules/overview.md +345 -380
  512. package/assets/docs/guide/rules/silent-init-errors.md +4 -1
  513. package/assets/docs/guide/rules/verify-properties-before-use.md +2 -11
  514. package/assets/docs/guide/rules.md +10 -5
  515. package/assets/docs/guide/security.md +7 -5
  516. package/assets/docs/guide/serve-assets.md +57 -284
  517. package/assets/docs/guide/settings.md +96 -74
  518. package/assets/docs/guide/shapes.md +10 -5
  519. package/assets/docs/guide/stickers-and-shapes/combine.md +397 -583
  520. package/assets/docs/guide/stickers-and-shapes/create-cutout.md +181 -268
  521. package/assets/docs/guide/stickers-and-shapes/create-edit/create-shapes.md +418 -431
  522. package/assets/docs/guide/stickers-and-shapes/create-edit/create-stickers.md +147 -226
  523. package/assets/docs/guide/stickers-and-shapes/create-edit/edit-shapes.md +138 -123
  524. package/assets/docs/guide/stickers-and-shapes/insert-qr-code.md +151 -149
  525. package/assets/docs/guide/stickers.md +9 -4
  526. package/assets/docs/guide/text/add.md +470 -482
  527. package/assets/docs/guide/text/adjust-spacing.md +179 -214
  528. package/assets/docs/guide/text/auto-size.md +210 -271
  529. package/assets/docs/guide/text/edit.md +294 -309
  530. package/assets/docs/guide/text/effects.md +154 -190
  531. package/assets/docs/guide/text/emojis.md +199 -232
  532. package/assets/docs/guide/text/language-support.md +369 -382
  533. package/assets/docs/guide/text/overview.md +41 -4
  534. package/assets/docs/guide/text/styling.md +239 -273
  535. package/assets/docs/guide/text/text-designs.md +405 -544
  536. package/assets/docs/guide/text.md +10 -9
  537. package/assets/docs/guide/to-v1-19.md +12 -10
  538. package/assets/docs/guide/upgrade.md +8 -9
  539. package/assets/docs/guide/use-templates/apply-template.md +174 -163
  540. package/assets/docs/guide/use-templates/generate.md +171 -152
  541. package/assets/docs/guide/use-templates/overview.md +32 -4
  542. package/assets/docs/guide/use-templates/programmatic.md +266 -301
  543. package/assets/docs/guide/use-templates/replace-content.md +181 -171
  544. package/assets/docs/guide/what-is-cesdk.md +71 -282
  545. package/assets/docs/handbook/SKILL.md +24 -0
  546. package/dist/assets/inline.generated.d.ts.map +1 -1
  547. package/dist/assets/inline.generated.js +544 -406
  548. package/dist/assets/inline.generated.js.map +1 -1
  549. package/dist/assets/load-browser.d.ts +1 -1
  550. package/dist/assets/load-browser.js +1 -1
  551. package/dist/assets/load-browser.js.map +1 -1
  552. package/dist/assets/load-node.d.ts +1 -1
  553. package/dist/assets/load-node.js +1 -1
  554. package/dist/assets/load-node.js.map +1 -1
  555. package/dist/cli/http.d.ts.map +1 -1
  556. package/dist/cli/http.js +4 -28
  557. package/dist/cli/http.js.map +1 -1
  558. package/dist/cli/redirect-console.d.ts +1 -1
  559. package/dist/cli/redirect-console.d.ts.map +1 -1
  560. package/dist/cli/redirect-console.js +12 -3
  561. package/dist/cli/redirect-console.js.map +1 -1
  562. package/dist/cli/resolve-license.d.ts.map +1 -1
  563. package/dist/cli/resolve-license.js +8 -6
  564. package/dist/cli/resolve-license.js.map +1 -1
  565. package/dist/cli/stdio.d.ts +9 -0
  566. package/dist/cli/stdio.d.ts.map +1 -1
  567. package/dist/cli/stdio.js +48 -4
  568. package/dist/cli/stdio.js.map +1 -1
  569. package/dist/cli.js +10 -1
  570. package/dist/cli.js.map +1 -1
  571. package/dist/config.d.ts +11 -2
  572. package/dist/config.d.ts.map +1 -1
  573. package/dist/config.js +20 -1
  574. package/dist/config.js.map +1 -1
  575. package/dist/diagnostics/bundle.d.ts +10 -0
  576. package/dist/diagnostics/bundle.d.ts.map +1 -0
  577. package/dist/diagnostics/bundle.js +148 -0
  578. package/dist/diagnostics/bundle.js.map +1 -0
  579. package/dist/diagnostics/compose.d.ts +3 -0
  580. package/dist/diagnostics/compose.d.ts.map +1 -0
  581. package/dist/diagnostics/compose.js +15 -0
  582. package/dist/diagnostics/compose.js.map +1 -0
  583. package/dist/diagnostics/events.d.ts +34 -0
  584. package/dist/diagnostics/events.d.ts.map +1 -0
  585. package/dist/diagnostics/events.js +3 -0
  586. package/dist/diagnostics/events.js.map +1 -0
  587. package/dist/diagnostics/file-sink.d.ts +38 -0
  588. package/dist/diagnostics/file-sink.d.ts.map +1 -0
  589. package/dist/diagnostics/file-sink.js +157 -0
  590. package/dist/diagnostics/file-sink.js.map +1 -0
  591. package/dist/diagnostics/redact.d.ts +7 -0
  592. package/dist/diagnostics/redact.d.ts.map +1 -0
  593. package/dist/diagnostics/redact.js +43 -0
  594. package/dist/diagnostics/redact.js.map +1 -0
  595. package/dist/diagnostics/tool-call-adapter.d.ts +4 -0
  596. package/dist/diagnostics/tool-call-adapter.d.ts.map +1 -0
  597. package/dist/diagnostics/tool-call-adapter.js +21 -0
  598. package/dist/diagnostics/tool-call-adapter.js.map +1 -0
  599. package/dist/engine/cesdk-adapter.d.ts +5 -1
  600. package/dist/engine/cesdk-adapter.d.ts.map +1 -1
  601. package/dist/engine/cesdk-adapter.js +9 -2
  602. package/dist/engine/cesdk-adapter.js.map +1 -1
  603. package/dist/engine/index.d.ts +1 -0
  604. package/dist/engine/index.d.ts.map +1 -1
  605. package/dist/engine/index.js +4 -0
  606. package/dist/engine/index.js.map +1 -1
  607. package/dist/engine/scene-resource-schemes.d.ts +2 -0
  608. package/dist/engine/scene-resource-schemes.d.ts.map +1 -0
  609. package/dist/engine/scene-resource-schemes.js +20 -0
  610. package/dist/engine/scene-resource-schemes.js.map +1 -0
  611. package/dist/http/server.d.ts +0 -6
  612. package/dist/http/server.d.ts.map +1 -1
  613. package/dist/http/server.js +1 -2
  614. package/dist/http/server.js.map +1 -1
  615. package/dist/server.d.ts +0 -4
  616. package/dist/server.d.ts.map +1 -1
  617. package/dist/server.js +4 -60
  618. package/dist/server.js.map +1 -1
  619. package/dist/test/scripts/changelog-add.d.ts +8 -0
  620. package/dist/test/scripts/changelog-add.d.ts.map +1 -0
  621. package/dist/test/scripts/changelog-add.js +50 -0
  622. package/dist/test/scripts/changelog-add.js.map +1 -0
  623. package/dist/test/scripts/changelog-collate.d.ts +38 -0
  624. package/dist/test/scripts/changelog-collate.d.ts.map +1 -0
  625. package/dist/test/scripts/changelog-collate.js +171 -0
  626. package/dist/test/scripts/changelog-collate.js.map +1 -0
  627. package/dist/test/test/changelog.test.d.ts +2 -0
  628. package/dist/test/test/changelog.test.d.ts.map +1 -0
  629. package/dist/test/test/changelog.test.js +293 -0
  630. package/dist/test/test/changelog.test.js.map +1 -0
  631. package/dist/test/test/cli/dispatcher.test.js +10 -3
  632. package/dist/test/test/cli/dispatcher.test.js.map +1 -1
  633. package/dist/test/test/cli/redirect-console.test.js +31 -0
  634. package/dist/test/test/cli/redirect-console.test.js.map +1 -1
  635. package/dist/test/test/cli/resolve-license.test.js +10 -1
  636. package/dist/test/test/cli/resolve-license.test.js.map +1 -1
  637. package/dist/test/test/cli/stdio-diagnostics.test.d.ts +2 -0
  638. package/dist/test/test/cli/stdio-diagnostics.test.d.ts.map +1 -0
  639. package/dist/test/test/cli/stdio-diagnostics.test.js +31 -0
  640. package/dist/test/test/cli/stdio-diagnostics.test.js.map +1 -0
  641. package/dist/test/test/config.test.js +17 -13
  642. package/dist/test/test/config.test.js.map +1 -1
  643. package/dist/test/test/diagnostics/bundle.test.d.ts +2 -0
  644. package/dist/test/test/diagnostics/bundle.test.d.ts.map +1 -0
  645. package/dist/test/test/diagnostics/bundle.test.js +53 -0
  646. package/dist/test/test/diagnostics/bundle.test.js.map +1 -0
  647. package/dist/test/test/diagnostics/compose.test.d.ts +2 -0
  648. package/dist/test/test/diagnostics/compose.test.d.ts.map +1 -0
  649. package/dist/test/test/diagnostics/compose.test.js +31 -0
  650. package/dist/test/test/diagnostics/compose.test.js.map +1 -0
  651. package/dist/test/test/diagnostics/file-sink.test.d.ts +2 -0
  652. package/dist/test/test/diagnostics/file-sink.test.d.ts.map +1 -0
  653. package/dist/test/test/diagnostics/file-sink.test.js +113 -0
  654. package/dist/test/test/diagnostics/file-sink.test.js.map +1 -0
  655. package/dist/test/test/diagnostics/redact.test.d.ts +2 -0
  656. package/dist/test/test/diagnostics/redact.test.d.ts.map +1 -0
  657. package/dist/test/test/diagnostics/redact.test.js +59 -0
  658. package/dist/test/test/diagnostics/redact.test.js.map +1 -0
  659. package/dist/test/test/diagnostics/tool-call-adapter.test.d.ts +2 -0
  660. package/dist/test/test/diagnostics/tool-call-adapter.test.d.ts.map +1 -0
  661. package/dist/test/test/diagnostics/tool-call-adapter.test.js +34 -0
  662. package/dist/test/test/diagnostics/tool-call-adapter.test.js.map +1 -0
  663. package/dist/test/test/engine/cesdk-adapter.test.d.ts +2 -0
  664. package/dist/test/test/engine/cesdk-adapter.test.d.ts.map +1 -0
  665. package/dist/test/test/engine/cesdk-adapter.test.js +32 -0
  666. package/dist/test/test/engine/cesdk-adapter.test.js.map +1 -0
  667. package/dist/test/test/handbook-contract.test.js +6 -2
  668. package/dist/test/test/handbook-contract.test.js.map +1 -1
  669. package/dist/test/test/http/server.test.js +0 -36
  670. package/dist/test/test/http/server.test.js.map +1 -1
  671. package/dist/test/test/http/workspace-auth.test.js +0 -1
  672. package/dist/test/test/http/workspace-auth.test.js.map +1 -1
  673. package/dist/test/test/server.test.js +0 -40
  674. package/dist/test/test/server.test.js.map +1 -1
  675. package/dist/test/test/tools/edit-harness.d.ts +14 -0
  676. package/dist/test/test/tools/edit-harness.d.ts.map +1 -0
  677. package/dist/test/test/tools/edit-harness.js +30 -0
  678. package/dist/test/test/tools/edit-harness.js.map +1 -0
  679. package/dist/test/test/tools/edit.telemetry.test.d.ts +2 -0
  680. package/dist/test/test/tools/edit.telemetry.test.d.ts.map +1 -0
  681. package/dist/test/test/tools/edit.telemetry.test.js +46 -0
  682. package/dist/test/test/tools/edit.telemetry.test.js.map +1 -0
  683. package/dist/test/test/tools/export-harness.d.ts +13 -0
  684. package/dist/test/test/tools/export-harness.d.ts.map +1 -0
  685. package/dist/test/test/tools/export-harness.js +27 -0
  686. package/dist/test/test/tools/export-harness.js.map +1 -0
  687. package/dist/test/test/tools/export.telemetry.test.d.ts +2 -0
  688. package/dist/test/test/tools/export.telemetry.test.d.ts.map +1 -0
  689. package/dist/test/test/tools/export.telemetry.test.js +65 -0
  690. package/dist/test/test/tools/export.telemetry.test.js.map +1 -0
  691. package/dist/test/test/tools/import.test.d.ts +2 -0
  692. package/dist/test/test/tools/import.test.d.ts.map +1 -0
  693. package/dist/test/test/tools/import.test.js +122 -0
  694. package/dist/test/test/tools/import.test.js.map +1 -0
  695. package/dist/test/test/tools/index.test.js +78 -16
  696. package/dist/test/test/tools/index.test.js.map +1 -1
  697. package/dist/test/test/tools/load.integration.test.d.ts +2 -0
  698. package/dist/test/test/tools/load.integration.test.d.ts.map +1 -0
  699. package/dist/test/test/tools/load.integration.test.js +165 -0
  700. package/dist/test/test/tools/load.integration.test.js.map +1 -0
  701. package/dist/test/test/tools/load.test.d.ts +2 -0
  702. package/dist/test/test/tools/load.test.d.ts.map +1 -0
  703. package/dist/test/test/tools/load.test.js +387 -0
  704. package/dist/test/test/tools/load.test.js.map +1 -0
  705. package/dist/test/test/tools/preview-harness.d.ts +9 -0
  706. package/dist/test/test/tools/preview-harness.d.ts.map +1 -0
  707. package/dist/test/test/tools/preview-harness.js +23 -0
  708. package/dist/test/test/tools/preview-harness.js.map +1 -0
  709. package/dist/test/test/tools/preview.telemetry.test.d.ts +2 -0
  710. package/dist/test/test/tools/preview.telemetry.test.d.ts.map +1 -0
  711. package/dist/test/test/tools/preview.telemetry.test.js +36 -0
  712. package/dist/test/test/tools/preview.telemetry.test.js.map +1 -0
  713. package/dist/test/test/tools/schema-best-practices.d.ts +13 -0
  714. package/dist/test/test/tools/schema-best-practices.d.ts.map +1 -0
  715. package/dist/test/test/tools/schema-best-practices.js +169 -0
  716. package/dist/test/test/tools/schema-best-practices.js.map +1 -0
  717. package/dist/test/test/tools/schema-best-practices.test.d.ts +3 -0
  718. package/dist/test/test/tools/schema-best-practices.test.d.ts.map +1 -0
  719. package/dist/test/test/tools/schema-best-practices.test.js +194 -0
  720. package/dist/test/test/tools/schema-best-practices.test.js.map +1 -0
  721. package/dist/test/test/tools/spans.test.d.ts +2 -0
  722. package/dist/test/test/tools/spans.test.d.ts.map +1 -0
  723. package/dist/test/test/tools/spans.test.js +84 -0
  724. package/dist/test/test/tools/spans.test.js.map +1 -0
  725. package/dist/test/test/viewer/cesdk-cdn.test.d.ts +2 -0
  726. package/dist/test/test/viewer/cesdk-cdn.test.d.ts.map +1 -0
  727. package/dist/test/test/viewer/cesdk-cdn.test.js +19 -0
  728. package/dist/test/test/viewer/cesdk-cdn.test.js.map +1 -0
  729. package/dist/test/test/viewer/config-route.test.d.ts +2 -0
  730. package/dist/test/test/viewer/config-route.test.d.ts.map +1 -0
  731. package/dist/test/test/viewer/config-route.test.js +28 -0
  732. package/dist/test/test/viewer/config-route.test.js.map +1 -0
  733. package/dist/test/test/viewer/spa-version.test.d.ts +2 -0
  734. package/dist/test/test/viewer/spa-version.test.d.ts.map +1 -0
  735. package/dist/test/test/viewer/spa-version.test.js +14 -0
  736. package/dist/test/test/viewer/spa-version.test.js.map +1 -0
  737. package/dist/test/test/workspace/content-hash.test.d.ts +2 -0
  738. package/dist/test/test/workspace/content-hash.test.d.ts.map +1 -0
  739. package/dist/test/test/workspace/content-hash.test.js +17 -0
  740. package/dist/test/test/workspace/content-hash.test.js.map +1 -0
  741. package/dist/test/tsconfig.test.tsbuildinfo +1 -1
  742. package/dist/test/vitest.config.js +1 -1
  743. package/dist/test/vitest.config.js.map +1 -1
  744. package/dist/tools/asset-generate.d.ts.map +1 -1
  745. package/dist/tools/asset-generate.js +1 -8
  746. package/dist/tools/asset-generate.js.map +1 -1
  747. package/dist/tools/edit.d.ts +3 -0
  748. package/dist/tools/edit.d.ts.map +1 -1
  749. package/dist/tools/edit.js +145 -96
  750. package/dist/tools/edit.js.map +1 -1
  751. package/dist/tools/export.d.ts +3 -0
  752. package/dist/tools/export.d.ts.map +1 -1
  753. package/dist/tools/export.js +146 -108
  754. package/dist/tools/export.js.map +1 -1
  755. package/dist/tools/import.d.ts +12 -0
  756. package/dist/tools/import.d.ts.map +1 -0
  757. package/dist/tools/import.js +144 -0
  758. package/dist/tools/import.js.map +1 -0
  759. package/dist/tools/index.d.ts +3 -0
  760. package/dist/tools/index.d.ts.map +1 -1
  761. package/dist/tools/index.js +44 -4
  762. package/dist/tools/index.js.map +1 -1
  763. package/dist/tools/load.d.ts +26 -0
  764. package/dist/tools/load.d.ts.map +1 -0
  765. package/dist/tools/load.js +400 -0
  766. package/dist/tools/load.js.map +1 -0
  767. package/dist/tools/preview.d.ts +3 -0
  768. package/dist/tools/preview.d.ts.map +1 -1
  769. package/dist/tools/preview.js +79 -44
  770. package/dist/tools/preview.js.map +1 -1
  771. package/dist/tools/result.d.ts +1 -1
  772. package/dist/tools/result.js +2 -2
  773. package/dist/tools/result.js.map +1 -1
  774. package/dist/tools/spans.d.ts +45 -0
  775. package/dist/tools/spans.d.ts.map +1 -0
  776. package/dist/tools/spans.js +77 -0
  777. package/dist/tools/spans.js.map +1 -0
  778. package/dist/tools/telemetry-wrapper.d.ts +4 -0
  779. package/dist/tools/telemetry-wrapper.d.ts.map +1 -0
  780. package/dist/tools/telemetry-wrapper.js +43 -0
  781. package/dist/tools/telemetry-wrapper.js.map +1 -0
  782. package/dist/viewer/cesdk-cdn.d.ts +16 -0
  783. package/dist/viewer/cesdk-cdn.d.ts.map +1 -0
  784. package/dist/viewer/cesdk-cdn.js +30 -0
  785. package/dist/viewer/cesdk-cdn.js.map +1 -0
  786. package/dist/viewer/router.d.ts +6 -0
  787. package/dist/viewer/router.d.ts.map +1 -1
  788. package/dist/viewer/router.js +4 -1
  789. package/dist/viewer/router.js.map +1 -1
  790. package/dist/viewer/spa-assets.generated.d.ts.map +1 -1
  791. package/dist/viewer/spa-assets.generated.js +2 -3
  792. package/dist/viewer/spa-assets.generated.js.map +1 -1
  793. package/dist/workspace/content-hash.d.ts +2 -0
  794. package/dist/workspace/content-hash.d.ts.map +1 -0
  795. package/dist/workspace/content-hash.js +15 -0
  796. package/dist/workspace/content-hash.js.map +1 -0
  797. package/package.json +18 -9
  798. package/assets/docs/guide/actions.md +0 -1038
  799. package/assets/docs/guide/animation/overview.md +0 -22
  800. package/assets/docs/guide/automation/batch-processing.md +0 -474
  801. package/assets/docs/guide/browser-support.md +0 -38
  802. package/assets/docs/guide/concepts/edit-modes.md +0 -431
  803. package/assets/docs/guide/concepts/headless-mode/browser.md +0 -291
  804. package/assets/docs/guide/create-audio/audio.md +0 -336
  805. package/assets/docs/guide/create-video/overview.md +0 -224
  806. package/assets/docs/guide/create-video/timeline-editor.md +0 -622
  807. package/assets/docs/guide/create-video/update-caption-presets.md +0 -676
  808. package/assets/docs/guide/edit-image/vectorize.md +0 -204
  809. package/assets/docs/guide/export-save-publish/export/to-html5.md +0 -474
  810. package/assets/docs/guide/export-save-publish/export/to-mp4.md +0 -364
  811. package/assets/docs/guide/get-started/vanilla-js/quickstart.md +0 -175
  812. package/assets/docs/guide/grid-and-rulers.md +0 -222
  813. package/assets/docs/guide/guides/text/rendering-internals.md +0 -796
  814. package/assets/docs/guide/import-media/asset-library.md +0 -23
  815. package/assets/docs/guide/import-media/asset-panel/basics.md +0 -324
  816. package/assets/docs/guide/import-media/asset-panel/customize.md +0 -478
  817. package/assets/docs/guide/import-media/asset-panel/thumbnails.md +0 -633
  818. package/assets/docs/guide/import-media/capture-from-camera/record-video.md +0 -137
  819. package/assets/docs/guide/import-media/capture-from-camera.md +0 -20
  820. package/assets/docs/guide/import-media/from-local-source/user-upload.md +0 -438
  821. package/assets/docs/guide/import-media/from-local-source.md +0 -20
  822. package/assets/docs/guide/import-media/from-remote-source/getty-images.md +0 -627
  823. package/assets/docs/guide/import-media/from-remote-source/imgly-premium-assets.md +0 -625
  824. package/assets/docs/guide/import-media/from-remote-source/pexels.md +0 -692
  825. package/assets/docs/guide/import-media/from-remote-source/soundstripe.md +0 -497
  826. package/assets/docs/guide/import-media/from-remote-source/third-party.md +0 -51
  827. package/assets/docs/guide/import-media/from-remote-source/unsplash.md +0 -914
  828. package/assets/docs/guide/import-media/from-remote-source/your-server.md +0 -764
  829. package/assets/docs/guide/open-the-editor/from-htmlcanvas.md +0 -228
  830. package/assets/docs/guide/open-the-editor/set-zoom-level.md +0 -303
  831. package/assets/docs/guide/plugins/asset-sources.md +0 -553
  832. package/assets/docs/guide/starterkits/3d-mockup-editor.md +0 -748
  833. package/assets/docs/guide/starterkits/advanced-editor.md +0 -698
  834. package/assets/docs/guide/starterkits/advanced-video-editor.md +0 -696
  835. package/assets/docs/guide/starterkits/ai-editor.md +0 -749
  836. package/assets/docs/guide/starterkits/airtable-image-editor.md +0 -672
  837. package/assets/docs/guide/starterkits/apparel-ui.md +0 -188
  838. package/assets/docs/guide/starterkits/assets.md +0 -27
  839. package/assets/docs/guide/starterkits/auto-resize.md +0 -586
  840. package/assets/docs/guide/starterkits/automated-video-generation.md +0 -692
  841. package/assets/docs/guide/starterkits/background-removal-editor.md +0 -480
  842. package/assets/docs/guide/starterkits/content-moderation.md +0 -863
  843. package/assets/docs/guide/starterkits/creative-automation.md +0 -28
  844. package/assets/docs/guide/starterkits/custom-built-uis.md +0 -26
  845. package/assets/docs/guide/starterkits/customization.md +0 -29
  846. package/assets/docs/guide/starterkits/cutout-lines-editor.md +0 -470
  847. package/assets/docs/guide/starterkits/data-merge.md +0 -850
  848. package/assets/docs/guide/starterkits/design-editor.md +0 -698
  849. package/assets/docs/guide/starterkits/design-generation.md +0 -719
  850. package/assets/docs/guide/starterkits/design-validation.md +0 -808
  851. package/assets/docs/guide/starterkits/editor-ui-configurations.md +0 -14
  852. package/assets/docs/guide/starterkits/export-options.md +0 -724
  853. package/assets/docs/guide/starterkits/export-using-renderer.md +0 -708
  854. package/assets/docs/guide/starterkits/extensibility.md +0 -28
  855. package/assets/docs/guide/starterkits/force-crop-editor.md +0 -675
  856. package/assets/docs/guide/starterkits/form-based-template-adoption.md +0 -522
  857. package/assets/docs/guide/starterkits/getty-images-editor.md +0 -700
  858. package/assets/docs/guide/starterkits/html5-ads-exporter.md +0 -719
  859. package/assets/docs/guide/starterkits/indesign-template-import.md +0 -580
  860. package/assets/docs/guide/starterkits/layouts-editor.md +0 -724
  861. package/assets/docs/guide/starterkits/mobile-ui.md +0 -185
  862. package/assets/docs/guide/starterkits/mockup-editor.md +0 -745
  863. package/assets/docs/guide/starterkits/multi-image-generation.md +0 -542
  864. package/assets/docs/guide/starterkits/page-sizes-editor.md +0 -657
  865. package/assets/docs/guide/starterkits/pexels-image-editor.md +0 -665
  866. package/assets/docs/guide/starterkits/photo-editor.md +0 -755
  867. package/assets/docs/guide/starterkits/photo-ui.md +0 -186
  868. package/assets/docs/guide/starterkits/photobook-ui.md +0 -188
  869. package/assets/docs/guide/starterkits/placeholders.md +0 -678
  870. package/assets/docs/guide/starterkits/player.md +0 -405
  871. package/assets/docs/guide/starterkits/plugins.md +0 -25
  872. package/assets/docs/guide/starterkits/postcard-editor.md +0 -202
  873. package/assets/docs/guide/starterkits/pptx-template-import.md +0 -581
  874. package/assets/docs/guide/starterkits/print-ready-pdf-editor.md +0 -746
  875. package/assets/docs/guide/starterkits/product-editor.md +0 -773
  876. package/assets/docs/guide/starterkits/psd-template-import.md +0 -580
  877. package/assets/docs/guide/starterkits/qr-code-editor.md +0 -470
  878. package/assets/docs/guide/starterkits/single-page-editor.md +0 -661
  879. package/assets/docs/guide/starterkits/start-with-image.md +0 -684
  880. package/assets/docs/guide/starterkits/start-with-video.md +0 -651
  881. package/assets/docs/guide/starterkits/t-shirt-designer.md +0 -742
  882. package/assets/docs/guide/starterkits/templating.md +0 -23
  883. package/assets/docs/guide/starterkits/theming.md +0 -662
  884. package/assets/docs/guide/starterkits/translation-internationalization.md +0 -662
  885. package/assets/docs/guide/starterkits/unsplash-editor.md +0 -839
  886. package/assets/docs/guide/starterkits/vectorizer-editor.md +0 -466
  887. package/assets/docs/guide/starterkits/version-history.md +0 -745
  888. package/assets/docs/guide/starterkits/video-animations.md +0 -853
  889. package/assets/docs/guide/starterkits/video-captions.md +0 -884
  890. package/assets/docs/guide/starterkits/video-editing.md +0 -25
  891. package/assets/docs/guide/starterkits/video-editor.md +0 -696
  892. package/assets/docs/guide/starterkits/video-export-options.md +0 -676
  893. package/assets/docs/guide/starterkits/viewer.md +0 -400
  894. package/assets/docs/guide/starterkits.md +0 -41
  895. package/assets/docs/guide/stickers-and-shapes/create-edit/vector-edit.md +0 -362
  896. package/assets/docs/guide/text/custom-fonts.md +0 -401
  897. package/assets/docs/guide/text/decorations.md +0 -330
  898. package/assets/docs/guide/text/enumerations.md +0 -258
  899. package/assets/docs/guide/to-v1-10.md +0 -131
  900. package/assets/docs/guide/to-v1-13.md +0 -165
  901. package/assets/docs/guide/to-v1-32.md +0 -110
  902. package/assets/docs/guide/to-v1-69.md +0 -468
  903. package/assets/docs/guide/to-v1-72.md +0 -193
  904. package/assets/docs/guide/use-templates/library.md +0 -450
  905. package/assets/docs/guide/user-interface/ai-integration/audio-generation.md +0 -428
  906. package/assets/docs/guide/user-interface/ai-integration/auto-captions.md +0 -337
  907. package/assets/docs/guide/user-interface/ai-integration/custom-provider.md +0 -853
  908. package/assets/docs/guide/user-interface/ai-integration/gateway-provider.md +0 -1045
  909. package/assets/docs/guide/user-interface/ai-integration/image-generation.md +0 -641
  910. package/assets/docs/guide/user-interface/ai-integration/integrate.md +0 -966
  911. package/assets/docs/guide/user-interface/ai-integration/proxy-server.md +0 -99
  912. package/assets/docs/guide/user-interface/ai-integration/text-generation.md +0 -498
  913. package/assets/docs/guide/user-interface/ai-integration/video-generation.md +0 -493
  914. package/assets/docs/guide/user-interface/ai-integration.md +0 -30
  915. package/assets/docs/guide/user-interface/appearance/change-ui-font.md +0 -316
  916. package/assets/docs/guide/user-interface/appearance/custom-labels.md +0 -509
  917. package/assets/docs/guide/user-interface/appearance/icons.md +0 -373
  918. package/assets/docs/guide/user-interface/appearance/theming.md +0 -665
  919. package/assets/docs/guide/user-interface/appearance.md +0 -23
  920. package/assets/docs/guide/user-interface/build-your-own-ui.md +0 -620
  921. package/assets/docs/guide/user-interface/customization/canvas-menu.md +0 -412
  922. package/assets/docs/guide/user-interface/customization/canvas.md +0 -281
  923. package/assets/docs/guide/user-interface/customization/color-palette.md +0 -413
  924. package/assets/docs/guide/user-interface/customization/crop-presets.md +0 -384
  925. package/assets/docs/guide/user-interface/customization/disable-or-enable.md +0 -676
  926. package/assets/docs/guide/user-interface/customization/dock.md +0 -399
  927. package/assets/docs/guide/user-interface/customization/force-crop.md +0 -289
  928. package/assets/docs/guide/user-interface/customization/inspector-bar.md +0 -371
  929. package/assets/docs/guide/user-interface/customization/navigation-bar.md +0 -516
  930. package/assets/docs/guide/user-interface/customization/page-format.md +0 -436
  931. package/assets/docs/guide/user-interface/customization/panel.md +0 -605
  932. package/assets/docs/guide/user-interface/customization/quick-start/add-action-buttons.md +0 -531
  933. package/assets/docs/guide/user-interface/customization/quick-start/add-dock-buttons.md +0 -358
  934. package/assets/docs/guide/user-interface/customization/quick-start/create-custom-components.md +0 -374
  935. package/assets/docs/guide/user-interface/customization/quick-start/reorder-components.md +0 -323
  936. package/assets/docs/guide/user-interface/customization/quick-start/show-hide-components.md +0 -294
  937. package/assets/docs/guide/user-interface/customization/quick-start.md +0 -12
  938. package/assets/docs/guide/user-interface/customization/reference/component-order-api.md +0 -519
  939. package/assets/docs/guide/user-interface/customization/reference/component-reference.md +0 -333
  940. package/assets/docs/guide/user-interface/customization/reference.md +0 -12
  941. package/assets/docs/guide/user-interface/customization.md +0 -39
  942. package/assets/docs/guide/user-interface/localization.md +0 -633
  943. package/assets/docs/guide/user-interface/overview.md +0 -167
  944. package/assets/docs/guide/user-interface/ui-extensions/add-custom-feature.md +0 -411
  945. package/assets/docs/guide/user-interface/ui-extensions/asset-library.md +0 -721
  946. package/assets/docs/guide/user-interface/ui-extensions/create-custom-panel.md +0 -331
  947. package/assets/docs/guide/user-interface/ui-extensions/customize-behaviour.md +0 -553
  948. package/assets/docs/guide/user-interface/ui-extensions/notifications-and-dialogs.md +0 -672
  949. package/assets/docs/guide/user-interface/ui-extensions/quick-actions.md +0 -415
  950. package/assets/docs/guide/user-interface/ui-extensions/register-new-component.md +0 -521
  951. package/assets/docs/guide/user-interface/ui-extensions.md +0 -26
  952. package/assets/docs/guide/user-interface.md +0 -25
  953. package/assets/prompts/evals-assetGenerate.md +0 -12
  954. package/assets/prompts/evals-brutalistCore.md +0 -34
  955. package/assets/prompts/evals-danskCatalogue.md +0 -31
  956. package/assets/prompts/evals-exportRoundTrip.md +0 -12
  957. package/assets/prompts/evals-inspectPriorCode.md +0 -16
  958. package/assets/prompts/evals-listProjectFiles.md +0 -6
  959. package/assets/prompts/evals-readAndExplainScript.md +0 -6
  960. package/assets/prompts/evals-resumeAcrossRestart.md +0 -15
  961. package/assets/prompts/evals-rewindRecovery.md +0 -10
  962. package/assets/prompts/evals-searchAcrossFiles.md +0 -6
  963. package/assets/prompts/evals-weddingCard.md +0 -20
  964. package/assets/prompts/explain.md +0 -6
  965. package/assets/prompts/review.md +0 -6
  966. package/dist/frontmatter.d.ts +0 -15
  967. package/dist/frontmatter.d.ts.map +0 -1
  968. package/dist/frontmatter.js +0 -46
  969. package/dist/frontmatter.js.map +0 -1
  970. package/dist/test/test/frontmatter.test.d.ts +0 -2
  971. package/dist/test/test/frontmatter.test.d.ts.map +0 -1
  972. package/dist/test/test/frontmatter.test.js +0 -55
  973. package/dist/test/test/frontmatter.test.js.map +0 -1
@@ -1,492 +1,378 @@
1
- > This is one page of the CE.SDK Vanilla JS/TS documentation. For a complete overview, see the [Vanilla JS/TS Documentation Index](https://img.ly/docs/cesdk/js.md). For all docs in one file, see [llms-full.txt](./llms-full.txt.md).
1
+ > This is one page of the CE.SDK Node.js documentation. For a complete overview, see the [Node.js Documentation Index](https://img.ly/docs/cesdk/node.md). For all docs in one file, see [llms-full.txt](./llms-full.txt.md).
2
2
 
3
3
  **Navigation:** [Guides](./guides.md) > [Open the Editor](./open-the-editor.md) > [Import a Design](./open-the-editor/import-design.md) > [From Photoshop](./open-the-editor/import-design/from-photoshop.md)
4
4
 
5
5
  ---
6
6
 
7
- Import Adobe Photoshop (PSD) files into CE.SDK, converting them into editable scenes while preserving layers, text, shapes, and positioning.
7
+ Convert Adobe Photoshop (PSD) files to CE.SDK scene archives at build-time using Node.js. This approach is ideal for migrating existing template libraries or integrating PSD conversion into CI/CD pipelines.
8
8
 
9
9
  > **Reading time:** 10 minutes
10
10
  >
11
11
  > **Resources:**
12
12
  >
13
13
  > - [Download examples](https://github.com/imgly/cesdk-web-examples/archive/refs/tags/release-$UBQ_VERSION$.zip)
14
- > - [View source on GitHub](https://github.com/imgly/cesdk-web-examples/tree/release-$UBQ_VERSION$/guides-open-the-editor-import-design-from-photoshop-browser)
15
- > - [Open in StackBlitz](https://stackblitz.com/github/imgly/cesdk-web-examples/tree/v$UBQ_VERSION$/guides-open-the-editor-import-design-from-photoshop-browser)
16
- > - [Live demo](https://img.ly/docs/cesdk/examples/guides-open-the-editor-import-design-from-photoshop-browser/)
17
-
18
- ![Import from Photoshop](https://img.ly/docs/cesdk/./assets/browser.hero.webp)
19
-
20
- The `@imgly/psd-importer` package converts Photoshop files into CE.SDK scene format, preserving design structure for editing or export. This guide focuses on enabling end-users to upload their own PSD files directly in the browser and load them into the CE.SDK editor. For batch conversion of template libraries at build-time, see the [server guide](./open-the-editor/import-design/from-photoshop.md).
14
+ >
15
+ > - [View source on GitHub](https://github.com/imgly/cesdk-web-examples/tree/release-$UBQ_VERSION$/guides-open-the-editor-import-design-from-photoshop-server-js)
16
+ >
17
+ > - [Open in StackBlitz](https://stackblitz.com/github/imgly/cesdk-web-examples/tree/v$UBQ_VERSION$/guides-open-the-editor-import-design-from-photoshop-server-js)
21
18
 
22
- ```typescript file=@cesdk_web_examples/guides-open-the-editor-import-design-from-photoshop-browser/browser.ts reference-only
23
- import type { EditorPlugin, EditorPluginContext } from '@cesdk/cesdk-js';
19
+ The `@imgly/psd-importer` package converts Photoshop files into CE.SDK scene format on the server, allowing you to distribute pre-converted templates without client-side processing. This guide covers batch conversion of PSD template files to CE.SDK scene archives that can be shipped with your product. For enabling end-users to upload PSD files directly in the browser, see the [browser guide](./open-the-editor/import-design/from-photoshop.md).
24
20
 
25
- import {
26
- BlurAssetSource,
27
- ColorPaletteAssetSource,
28
- CropPresetsAssetSource,
29
- DemoAssetSources,
30
- EffectsAssetSource,
31
- FiltersAssetSource,
32
- PagePresetsAssetSource,
33
- StickerAssetSource,
34
- TextAssetSource,
35
- TextComponentAssetSource,
36
- TypefaceAssetSource,
37
- UploadAssetSources,
38
- VectorShapeAssetSource
39
- } from '@cesdk/cesdk-js/plugins';
40
- import { DesignEditorConfig } from './design-editor/plugin';
41
- import type {
42
- AssetQueryData,
43
- AssetResult,
44
- AssetsQueryResult
45
- } from '@cesdk/engine';
21
+ ```typescript file=@cesdk_web_examples/guides-open-the-editor-import-design-from-photoshop-server-js/server-js.ts reference-only
22
+ import CreativeEngine from '@cesdk/node';
46
23
  import type { TypefaceResolver } from '@imgly/psd-importer';
47
24
  import {
48
25
  PSDParser,
49
- addGfontsAssetLibrary,
50
- createWebEncodeBufferToPNG
26
+ createPNGJSEncodeBufferToPNG,
27
+ addGfontsAssetLibrary
51
28
  } from '@imgly/psd-importer';
52
- import packageJson from './package.json';
29
+ import { PNG } from 'pngjs';
30
+ import { config } from 'dotenv';
31
+ import { promises as fs } from 'fs';
32
+ import { join, basename } from 'path';
33
+
34
+ // Load environment variables
35
+ config();
36
+
37
+ // Optional: Create a custom font resolver for advanced font mapping
38
+ // Use this when you need to map Photoshop fonts to specific alternatives,
39
+ // use enterprise fonts, or implement custom fallback logic
40
+ const customFontResolver: TypefaceResolver = async (fontParams, engine) => {
41
+ const { family, style, weight } = fontParams;
42
+
43
+ // Define font mappings from Photoshop fonts to available alternatives
44
+ const fontMappings: Record<string, string> = {
45
+ Arial: 'Open Sans',
46
+ Helvetica: 'Inter',
47
+ 'Helvetica Neue': 'Inter',
48
+ 'Times New Roman': 'Lora',
49
+ Georgia: 'Merriweather'
50
+ };
51
+
52
+ // Use mapped font or original family name
53
+ const targetFamily = fontMappings[family] || family;
54
+
55
+ // Search for the font in available typefaces
56
+ const result = await engine.asset.findAssets('ly.img.typeface', {
57
+ query: targetFamily,
58
+ page: 0,
59
+ perPage: 10
60
+ });
61
+
62
+ if (result.assets.length === 0) {
63
+ console.warn(`Font "${family}" not found, using default fallback`);
64
+ return null; // Let the parser use its default fallback
65
+ }
66
+
67
+ // Get the typeface from the asset payload
68
+ const asset = result.assets[0];
69
+ const typeface = asset.payload?.typeface;
70
+ if (!typeface) return null;
71
+
72
+ // Find the best matching font variant (weight and style)
73
+ const matchingFont =
74
+ typeface.fonts.find(
75
+ (f: { weight?: string; style?: string }) =>
76
+ f.weight === weight && f.style === style
77
+ ) ||
78
+ typeface.fonts.find((f: { weight?: string }) => f.weight === weight) ||
79
+ typeface.fonts[0];
80
+
81
+ return { typeface, font: matchingFont };
82
+ };
53
83
 
54
84
  /**
55
- * CE.SDK Plugin: Import from Photoshop Guide
56
- *
57
- * Demonstrates how to import Adobe Photoshop (PSD) files into CE.SDK:
58
- * - Creating a custom asset source for PSD templates
59
- * - Adding a custom nav bar button to upload PSD files
60
- * - Parsing PSD files with the PSD importer
61
- * - Displaying import warnings to users
62
- *
63
- * Note: In-library file uploads for custom asset sources will be supported
64
- * in a future CE.SDK release. This guide demonstrates using a custom nav bar
65
- * button as an alternative approach for user file uploads.
85
+ * Convert a single PSD file to CE.SDK scene formats
86
+ * Outputs both an archive file and a scene string with stable URLs
66
87
  */
88
+ async function convertPsd(
89
+ engine: InstanceType<typeof CreativeEngine>,
90
+ psdPath: string,
91
+ outputDir: string
92
+ ): Promise<{
93
+ archivePath: string;
94
+ sceneStringPath: string;
95
+ warnings: string[];
96
+ errors: string[];
97
+ }> {
98
+ // Read the PSD file
99
+ const psdBuffer = await fs.readFile(psdPath);
100
+
101
+ // Create parser with Node.js PNG encoder
102
+ // The addGfontsAssetLibrary() call enables automatic font matching
103
+ // For custom font mapping, pass fontResolver in options (see customFontResolver example)
104
+ // Note: Cast engine to any because psd-importer types expect browser engine
105
+ const parser = await PSDParser.fromFile(
106
+ engine as any,
107
+ psdBuffer.buffer,
108
+ createPNGJSEncodeBufferToPNG(PNG),
109
+ // Pass fontResolver for advanced font mapping
110
+ { fontResolver: customFontResolver }
111
+ );
67
112
 
68
- // Asset source ID for PSD library
69
- const PSD_SOURCE_ID = 'psd-files';
70
-
71
- // Base URL for PSD template files
72
- const PSD_BASE_URL =
73
- 'https://staticimgly.com/imgly/docs-reference-files-temp/psd-template-import';
74
-
75
- // Sample PSD files from the CE.SDK showcases
76
- const SAMPLE_PSD_FILES: AssetResult[] = [
77
- {
78
- id: 'showcase-file-1',
79
- label: 'Sample Design 1',
80
- tags: ['sample', 'psd'],
81
- meta: {
82
- uri: `${PSD_BASE_URL}/showcase-file-1.psd`,
83
- thumbUri: `${PSD_BASE_URL}/showcase-file-1-thumb.png`,
84
- mimeType: 'application/x-photoshop',
85
- width: 1920,
86
- height: 1080
87
- }
88
- },
89
- {
90
- id: 'showcase-file-2',
91
- label: 'Sample Design 2',
92
- tags: ['sample', 'psd'],
93
- meta: {
94
- uri: `${PSD_BASE_URL}/showcase-file-2.psd`,
95
- thumbUri: `${PSD_BASE_URL}/showcase-file-2-thumb.png`,
96
- mimeType: 'application/x-photoshop',
97
- width: 1920,
98
- height: 1080
99
- }
100
- },
101
- {
102
- id: 'showcase-file-3',
103
- label: 'Sample Design 3',
104
- tags: ['sample', 'psd'],
105
- meta: {
106
- uri: `${PSD_BASE_URL}/showcase-file-3.psd`,
107
- thumbUri: `${PSD_BASE_URL}/showcase-file-3-thumb.png`,
108
- mimeType: 'application/x-photoshop',
109
- width: 1920,
110
- height: 1080
111
- }
113
+ // Parse the PSD file
114
+ const result = await parser.parse();
115
+
116
+ // Extract warnings and errors from logger
117
+ const messages = result.logger.getMessages();
118
+ const warnings = messages
119
+ .filter((m) => m.type === 'warning')
120
+ .map((m) => m.message);
121
+ const errors = messages
122
+ .filter((m) => m.type === 'error')
123
+ .map((m) => m.message);
124
+
125
+ if (errors.length > 0) {
126
+ console.error(` Errors: ${errors.length}`);
127
+ }
128
+ if (warnings.length > 0) {
129
+ console.warn(` Warnings: ${warnings.length}`);
112
130
  }
113
- ];
114
131
 
115
- class Example implements EditorPlugin {
116
- name = packageJson.name;
132
+ // Generate output filename from input filename
133
+ const inputName = basename(psdPath, '.psd');
134
+ const archivePath = join(outputDir, `${inputName}.cesdk`);
135
+
136
+ // Save as scene archive
137
+ const archive = await engine.scene.saveToArchive();
138
+ const archiveBuffer = Buffer.from(await archive.arrayBuffer());
139
+ await fs.writeFile(archivePath, archiveBuffer);
140
+
141
+ // Optional: Save scene as JSON string with stable URLs instead of archive
142
+ // This is useful when storing scenes in a database or referencing CDN-hosted assets
143
+ // By default, PSD images use transient buffer:// URLs that only work with saveToArchive()
144
+ // To use saveToString(), relocate transient resources to permanent URLs first:
145
+
146
+ // Mock upload function - replace with your actual backend upload logic
147
+ const uploadToBackend = async (data: Uint8Array): Promise<string> => {
148
+ // In production, upload the data to your CDN/storage and return the permanent URL
149
+ // For this example, we write to a temp file and return a file:// URL
150
+ const hash = data.reduce((acc, byte) => (acc + byte) % 1000000, 0);
151
+ const tempPath = join(outputDir, `asset-${hash}.png`);
152
+ await fs.writeFile(tempPath, data);
153
+ return `file://${tempPath}`;
154
+ };
117
155
 
118
- version = packageJson.version;
156
+ const transientResources = engine.editor.findAllTransientResources();
157
+ for (const resource of transientResources) {
158
+ const { URL: bufferUri, size } = resource;
159
+ const data = engine.editor.getBufferData(bufferUri, 0, size);
160
+ const permanentUrl = await uploadToBackend(data);
161
+ engine.editor.relocateResource(bufferUri, permanentUrl);
162
+ }
119
163
 
120
- async initialize({ cesdk }: EditorPluginContext): Promise<void> {
121
- if (!cesdk) {
122
- throw new Error('CE.SDK instance is required for this plugin');
123
- }
164
+ // Now save as scene string - all URLs are permanent
165
+ const sceneString = await engine.scene.saveToString();
166
+ const sceneStringPath = join(outputDir, `${inputName}.scene`);
167
+ await fs.writeFile(sceneStringPath, sceneString);
124
168
 
125
- const engine = cesdk.engine;
126
-
127
- // Initialize CE.SDK with Google Fonts support for PSD text matching
128
- await cesdk.addPlugin(new DesignEditorConfig());
129
-
130
- // Add asset source plugins
131
- await cesdk.addPlugin(new BlurAssetSource());
132
- await cesdk.addPlugin(new ColorPaletteAssetSource());
133
- await cesdk.addPlugin(new CropPresetsAssetSource());
134
- await cesdk.addPlugin(
135
- new UploadAssetSources({ include: ['ly.img.image.upload'] })
136
- );
137
- await cesdk.addPlugin(
138
- new DemoAssetSources({
139
- include: [
140
- 'ly.img.templates.blank.*',
141
- 'ly.img.templates.presentation.*',
142
- 'ly.img.templates.print.*',
143
- 'ly.img.templates.social.*',
144
- 'ly.img.image.*'
145
- ]
146
- })
147
- );
148
- await cesdk.addPlugin(new EffectsAssetSource());
149
- await cesdk.addPlugin(new FiltersAssetSource());
150
- await cesdk.addPlugin(new PagePresetsAssetSource());
151
- await cesdk.addPlugin(new StickerAssetSource());
152
- await cesdk.addPlugin(new TextAssetSource());
153
- await cesdk.addPlugin(new TextComponentAssetSource());
154
- await cesdk.addPlugin(new TypefaceAssetSource());
155
- await cesdk.addPlugin(new VectorShapeAssetSource());
156
-
157
- // Register Google Fonts before parsing PSD files for best font matching
158
- await addGfontsAssetLibrary(engine);
159
-
160
- // Optional: Create a custom font resolver for advanced font mapping
161
- // Use this when you need to map Photoshop fonts to specific alternatives,
162
- // use enterprise fonts, or implement custom fallback logic
163
- const customFontResolver: TypefaceResolver = async (fontParams, eng) => {
164
- const { family, style, weight } = fontParams;
165
-
166
- // Define font mappings from Photoshop fonts to available alternatives
167
- const fontMappings: Record<string, string> = {
168
- Arial: 'Open Sans',
169
- Helvetica: 'Inter',
170
- 'Helvetica Neue': 'Inter',
171
- 'Times New Roman': 'Lora',
172
- Georgia: 'Merriweather'
173
- };
174
-
175
- // Use mapped font or original family name
176
- const targetFamily = fontMappings[family] || family;
177
-
178
- // Search for the font in available typefaces
179
- const result = await eng.asset.findAssets('ly.img.typeface', {
180
- query: targetFamily,
181
- page: 0,
182
- perPage: 10
183
- });
184
-
185
- if (result.assets.length === 0) {
186
- console.warn(`Font "${family}" not found, using default fallback`);
187
- return null; // Let the parser use its default fallback
188
- }
169
+ return { archivePath, sceneStringPath, warnings, errors };
170
+ }
189
171
 
190
- // Get the typeface from the asset payload
191
- const asset = result.assets[0];
192
- const typeface = asset.payload?.typeface;
193
- if (!typeface) return null;
194
-
195
- // Find the best matching font variant (weight and style)
196
- const matchingFont =
197
- typeface.fonts.find(
198
- (f: { weight?: string; style?: string }) =>
199
- f.weight === weight && f.style === style
200
- ) ||
201
- typeface.fonts.find((f: { weight?: string }) => f.weight === weight) ||
202
- typeface.fonts[0];
203
-
204
- return { typeface, font: matchingFont };
205
- };
172
+ /**
173
+ * Batch convert multiple PSD files to CE.SDK scene formats
174
+ * Processes files sequentially, continuing even if individual files fail
175
+ */
176
+ async function batchConvertPsds(
177
+ psdPaths: string[],
178
+ outputDir: string
179
+ ): Promise<void> {
180
+ console.log(`Starting batch conversion of ${psdPaths.length} PSD files...`);
181
+
182
+ // Ensure output directory exists
183
+ await fs.mkdir(outputDir, { recursive: true });
184
+
185
+ // Initialize engine once for all conversions
186
+ const engine = await CreativeEngine.init({
187
+ baseURL: process.env.IMGLY_LOCAL_ASSETS_URL
188
+ // license: process.env.CESDK_LICENSE,
189
+ });
206
190
 
207
- // Create an initial design scene
208
- await cesdk.actions.run('scene.create', {
209
- page: {
210
- sourceId: 'ly.img.page.presets',
211
- assetId: 'ly.img.page.presets.print.iso.a6.landscape'
212
- }
213
- });
214
-
215
- // Helper function to import PSD from URL or buffer
216
- const importPsd = async (
217
- source: string | ArrayBuffer,
218
- sourceName: string
219
- ) => {
220
- console.log(`Processing PSD: ${sourceName}`);
221
-
222
- // Get buffer from URL or use directly
223
- let buffer: ArrayBuffer;
224
- if (typeof source === 'string') {
225
- const response = await fetch(source);
226
- buffer = await response.arrayBuffer();
227
- } else {
228
- buffer = source;
229
- }
191
+ try {
192
+ // Configure Google Fonts for text element support
193
+ // Note: Cast engine to any because psd-importer types expect browser engine
194
+ await addGfontsAssetLibrary(engine as any);
230
195
 
231
- // Parse the PSD file using the PSD importer
232
- // The addGfontsAssetLibrary() call above enables automatic font matching
233
- // For custom font mapping, pass fontResolver in options (see customFontResolver example)
234
- const parser = await PSDParser.fromFile(
235
- engine,
236
- buffer,
237
- createWebEncodeBufferToPNG(),
238
- { fontResolver: customFontResolver }
239
- );
240
- const result = await parser.parse();
241
-
242
- // Check for import warnings and errors
243
- const messages = result.logger.getMessages();
244
- const warnings = messages.filter((m) => m.type === 'warning');
245
- const errors = messages.filter((m) => m.type === 'error');
246
-
247
- if (errors.length > 0) {
248
- console.error('Import errors:', errors);
249
- }
250
- if (warnings.length > 0) {
251
- console.warn(
252
- 'Import warnings:',
253
- warnings.map((w) => w.message)
254
- );
255
- }
196
+ let successCount = 0;
197
+ let failCount = 0;
198
+
199
+ // Process each PSD file
200
+ for (const psdPath of psdPaths) {
201
+ const fileName = basename(psdPath);
202
+ console.log(`\nProcessing: ${fileName}`);
203
+
204
+ try {
205
+ const { archivePath, sceneStringPath, warnings, errors } =
206
+ await convertPsd(engine, psdPath, outputDir);
207
+
208
+ // Log results
209
+ if (errors.length > 0) {
210
+ console.log(` Errors: ${errors.length}`);
211
+ errors.forEach((e) => console.log(` - ${e}`));
212
+ }
213
+ if (warnings.length > 0) {
214
+ console.log(` Warnings: ${warnings.length}`);
215
+ warnings.forEach((w) => console.log(` - ${w}`));
216
+ }
256
217
 
257
- // Save the imported scene as an archive for editor loading
258
- const sceneArchive = await engine.scene.saveToArchive();
259
- const archiveUrl = URL.createObjectURL(sceneArchive);
260
-
261
- // Optional: Save scene as JSON string with stable URLs instead of archive
262
- // This is useful when storing scenes in a database or referencing CDN-hosted assets
263
- // By default, PSD images use transient buffer:// URLs that only work with saveToArchive()
264
- // To use saveToString(), relocate transient resources to permanent URLs first:
265
-
266
- // Mock upload function - replace with your actual backend upload logic
267
- const uploadToBackend = async (data: Uint8Array): Promise<string> => {
268
- // In production, upload the data to your CDN/storage and return the permanent URL
269
- // For this example, we create a blob URL to demonstrate the workflow
270
- const blob = new Blob([new Uint8Array(data)], { type: 'image/png' });
271
- return URL.createObjectURL(blob);
272
- };
273
-
274
- const transientResources = engine.editor.findAllTransientResources();
275
- for (const resource of transientResources) {
276
- const { URL: bufferUri, size } = resource;
277
- const data = engine.editor.getBufferData(bufferUri, 0, size);
278
- const permanentUrl = await uploadToBackend(data);
279
- engine.editor.relocateResource(bufferUri, permanentUrl);
218
+ console.log(` Archive: ${archivePath}`);
219
+ console.log(` Scene: ${sceneStringPath}`);
220
+ successCount++;
221
+ } catch (error) {
222
+ console.error(` Failed: ${(error as Error).message}`);
223
+ failCount++;
280
224
  }
281
- const sceneString = await engine.scene.saveToString();
282
- console.log(
283
- `Scene persisted with stable URLs (${sceneString.length} bytes)`
284
- );
225
+ }
285
226
 
286
- // Load the archived scene into the editor
287
- await cesdk.engine.scene.loadFromArchiveURL(archiveUrl);
227
+ console.log(`\nBatch conversion complete:`);
228
+ console.log(` Success: ${successCount}/${psdPaths.length}`);
229
+ console.log(` Failed: ${failCount}/${psdPaths.length}`);
230
+ } finally {
231
+ // Always dispose engine to free resources
232
+ engine.dispose();
233
+ }
234
+ }
235
+
236
+ /**
237
+ * Validate conversion results by loading the archive and checking scene structure
238
+ */
239
+ export async function validateArchive(archivePath: string): Promise<{
240
+ valid: boolean;
241
+ pageCount: number;
242
+ blockCount: number;
243
+ }> {
244
+ const engine = await CreativeEngine.init({
245
+ // license: process.env.CESDK_LICENSE,
246
+ });
247
+
248
+ try {
249
+ // Load the archive
250
+ const archiveBuffer = await fs.readFile(archivePath);
251
+ const archiveBlob = new Blob([archiveBuffer]);
252
+ const archiveUrl = URL.createObjectURL(archiveBlob);
288
253
 
289
- // Verify scene loaded correctly
290
- const pages = engine.scene.getPages();
291
- console.log(`PSD imported successfully with ${pages.length} page(s)`);
254
+ await engine.scene.loadFromArchiveURL(archiveUrl);
292
255
 
293
- // Zoom to fit the imported page
294
- await cesdk.actions.run('zoom.toPage', { page: 'first', autoFit: true });
256
+ // Get scene information
257
+ const pages = engine.block.findByType('page');
258
+ const allBlocks = engine.block.findAll();
295
259
 
296
- // Clean up object URL
297
- URL.revokeObjectURL(archiveUrl);
260
+ return {
261
+ valid: pages.length > 0,
262
+ pageCount: pages.length,
263
+ blockCount: allBlocks.length
298
264
  };
265
+ } finally {
266
+ engine.dispose();
267
+ }
268
+ }
299
269
 
300
- // Add custom asset source for PSD templates
301
- engine.asset.addSource({
302
- id: PSD_SOURCE_ID,
303
-
304
- async findAssets(
305
- queryData: AssetQueryData
306
- ): Promise<AssetsQueryResult<AssetResult>> {
307
- let assets = SAMPLE_PSD_FILES;
308
-
309
- // Filter by query if provided
310
- if (queryData.query) {
311
- const query = queryData.query.toLowerCase();
312
- assets = assets.filter(
313
- (a) =>
314
- a.label?.toLowerCase().includes(query) ||
315
- a.tags?.some((t) => t.toLowerCase().includes(query))
316
- );
317
- }
270
+ /**
271
+ * Find all PSD files in a directory and convert them
272
+ */
273
+ export async function processDirectory(
274
+ inputDir: string,
275
+ outputDir: string
276
+ ): Promise<void> {
277
+ // Find all PSD files in directory
278
+ const files = await fs.readdir(inputDir);
279
+ const psdFiles = files
280
+ .filter((f) => f.toLowerCase().endsWith('.psd'))
281
+ .map((f) => join(inputDir, f));
282
+
283
+ if (psdFiles.length === 0) {
284
+ console.log(`No PSD files found in ${inputDir}`);
285
+ return;
286
+ }
318
287
 
319
- return {
320
- assets,
321
- total: assets.length,
322
- currentPage: queryData.page,
323
- nextPage: undefined
324
- };
325
- },
326
-
327
- async applyAsset(asset: AssetResult): Promise<number | undefined> {
328
- if (!asset.meta?.uri) {
329
- console.error('Asset has no URI');
330
- return undefined;
331
- }
288
+ await batchConvertPsds(psdFiles, outputDir);
289
+ }
332
290
 
333
- await importPsd(asset.meta.uri as string, asset.label || asset.id);
334
- return undefined; // Scene replaced, no new block created
335
- }
336
- });
291
+ /**
292
+ * Main entry point - demonstrates batch PSD conversion workflow
293
+ */
294
+ async function main(): Promise<void> {
295
+ console.log('PSD to CE.SDK Batch Converter');
296
+ console.log('=============================\n');
297
+
298
+ // Example: Convert a single PSD file
299
+ // In production, you would provide actual PSD files
300
+ const engine = await CreativeEngine.init({
301
+ // license: process.env.CESDK_LICENSE,
302
+ });
337
303
 
338
- // Set labels for the asset source and library entry
339
- cesdk.i18n.setTranslations({
340
- en: {
341
- [`libraries.${PSD_SOURCE_ID}.label`]: 'PSD Files',
342
- 'libraries.psd-library-entry.label': 'PSD Templates'
343
- }
344
- });
345
-
346
- // Configure the asset library UI to show the PSD source
347
- cesdk.ui.addAssetLibraryEntry({
348
- id: 'psd-library-entry',
349
- sourceIds: [PSD_SOURCE_ID],
350
- previewLength: 3,
351
- previewBackgroundType: 'contain',
352
- gridBackgroundType: 'contain',
353
- gridColumns: 2
354
- });
355
-
356
- // Add PSD library to the dock and remove the default Templates entry
357
- const existingDockOrder = cesdk.ui.getComponentOrder({ in: 'ly.img.dock' });
358
- const filteredDockOrder = existingDockOrder.filter(
359
- (entry) => entry.key !== 'ly.img.templates'
360
- );
361
- cesdk.ui.setComponentOrder({ in: 'ly.img.dock' }, [
362
- {
363
- id: 'ly.img.assetLibrary.dock',
364
- key: 'psd-library-dock',
365
- label: 'PSD Templates',
366
- icon: '@imgly/Template',
367
- entries: ['psd-library-entry']
368
- },
369
- ...filteredDockOrder
370
- ]);
371
-
372
- // Add a custom nav bar button for uploading and importing PSD files
373
- // Uses cesdk.utils.loadFile() to open the browser's file picker
374
- cesdk.ui.registerComponent('psd.uploadButton', ({ builder }) => {
375
- builder.Button('psd.uploadButton', {
376
- label: 'Load PSD File',
377
- icon: '@imgly/Upload',
378
- variant: 'regular',
379
- color: 'accent',
380
- onClick: async () => {
381
- const buffer = await cesdk.utils.loadFile({
382
- accept: '.psd,application/x-photoshop,image/vnd.adobe.photoshop',
383
- returnType: 'arrayBuffer'
384
- });
385
- await importPsd(buffer, 'uploaded.psd');
386
- }
387
- });
388
- });
389
-
390
- // Add the upload button to the right side of the navigation bar
391
- cesdk.ui.setComponentOrder({ in: 'ly.img.navigation.bar' }, [
392
- ...cesdk.ui.getComponentOrder({ in: 'ly.img.navigation.bar' }),
393
- 'psd.uploadButton'
394
- ]);
395
-
396
- // Open the PSD Templates library by default
397
- cesdk.ui.openPanel('//ly.img.panel/assetLibrary', {
398
- payload: {
399
- entries: ['psd-library-entry'],
400
- title: 'PSD Templates'
401
- }
402
- });
403
-
404
- // Override the importScene action to support PSD files alongside standard formats
405
- // This integrates PSD import with the default import workflow
406
- cesdk.actions.register(
407
- 'importScene',
408
- async ({
409
- format = 'scene'
410
- }: {
411
- format?: 'scene' | 'archive' | 'psd';
412
- }) => {
413
- if (format === 'psd') {
414
- // Handle PSD import using cesdk.utils.loadFile
415
- const buffer = await cesdk.utils.loadFile({
416
- accept: '.psd,application/x-photoshop,image/vnd.adobe.photoshop',
417
- returnType: 'arrayBuffer'
418
- });
419
- await importPsd(buffer, 'imported.psd');
420
- } else if (format === 'scene') {
421
- // Handle standard .scene files
422
- const scene = await cesdk.utils.loadFile({
423
- accept: '.scene',
424
- returnType: 'text'
425
- });
426
- await cesdk.engine.scene.loadFromString(scene);
427
- await cesdk.actions.run('zoom.toPage', { page: 'first' });
428
- } else {
429
- // Handle archive files (.zip)
430
- const blobURL = await cesdk.utils.loadFile({
431
- accept: '.zip',
432
- returnType: 'objectURL'
433
- });
434
- try {
435
- await cesdk.engine.scene.loadFromArchiveURL(blobURL);
436
- } finally {
437
- URL.revokeObjectURL(blobURL);
438
- }
439
- await cesdk.actions.run('zoom.toPage', { page: 'first' });
440
- }
441
- }
442
- );
304
+ try {
305
+ // Configure Google Fonts for text element support
306
+ await addGfontsAssetLibrary(engine as any);
307
+
308
+ // Create a sample scene to demonstrate the export format
309
+ // In production, this would be replaced by actual PSD conversion
310
+ await engine.scene.create();
311
+ const page = engine.block.create('page');
312
+ engine.block.setWidth(page, 800);
313
+ engine.block.setHeight(page, 600);
314
+ engine.block.appendChild(engine.scene.get()!, page);
315
+
316
+ // Save as archive
317
+ await fs.mkdir('./output', { recursive: true });
318
+ const archive = await engine.scene.saveToArchive();
319
+ const archiveBuffer = Buffer.from(await archive.arrayBuffer());
320
+ await fs.writeFile('./output/sample.cesdk', archiveBuffer);
321
+
322
+ console.log('Sample archive created: ./output/sample.cesdk');
323
+ console.log('\nTo convert actual PSD files:');
324
+ console.log('1. Place PSD files in an input directory');
325
+ console.log('2. Call: await processDirectory("./input", "./output")');
326
+ } finally {
327
+ engine.dispose();
443
328
  }
444
329
  }
445
330
 
446
- export default Example;
331
+ // Run the example
332
+ main().catch(console.error);
447
333
  ```
448
334
 
449
335
  ## Installation
450
336
 
451
- Install the `@imgly/psd-importer` package alongside CE.SDK:
337
+ Install the `@imgly/psd-importer` package alongside the CE.SDK Node.js engine and the `pngjs` package for PNG encoding:
452
338
 
453
339
  ```bash
454
- npm install @imgly/psd-importer @cesdk/cesdk-js@$UBQ_VERSION$
340
+ npm install @imgly/psd-importer @cesdk/node@$UBQ_VERSION$ pngjs
455
341
  ```
456
342
 
457
- The browser environment uses `createWebEncodeBufferToPNG()` for PNG encoding, which requires no additional dependencies.
343
+ The server environment requires `pngjs` because Node.js doesn't have native browser APIs for PNG encoding. The `createPNGJSEncodeBufferToPNG(PNG)` function provides this capability.
458
344
 
459
- ## Import Your First PSD
345
+ ## Convert Your First PSD
460
346
 
461
- Parse a PSD file and load it into CE.SDK with just a few lines of code:
347
+ Convert a PSD file to a CE.SDK archive with just a few lines of code:
462
348
 
463
349
  ```typescript
464
- import CreativeEditorSDK from '@cesdk/cesdk-js';
465
- import { PSDParser, createWebEncodeBufferToPNG } from '@imgly/psd-importer';
466
-
467
- // Initialize CE.SDK
468
- const cesdk = await CreativeEditorSDK.create('#container', {
469
- license: 'YOUR_LICENSE_KEY'
470
- });
471
- const engine = cesdk.engine;
350
+ import CreativeEngine from '@cesdk/node';
351
+ import { PSDParser, createPNGJSEncodeBufferToPNG } from '@imgly/psd-importer';
352
+ import { PNG } from 'pngjs';
353
+ import { promises as fs } from 'fs';
472
354
 
473
- // Fetch and parse a PSD file
474
- const response = await fetch('https://example.com/design.psd');
475
- const buffer = await response.arrayBuffer();
355
+ // Initialize the engine
356
+ const engine = await CreativeEngine.init({});
476
357
 
477
- // Parse the PSD - creates a scene in the engine
358
+ // Read and parse the PSD file
359
+ const psdBuffer = await fs.readFile('./design.psd');
478
360
  const parser = await PSDParser.fromFile(
479
- engine,
480
- buffer,
481
- createWebEncodeBufferToPNG()
361
+ engine as any,
362
+ psdBuffer.buffer,
363
+ createPNGJSEncodeBufferToPNG(PNG)
482
364
  );
483
365
  await parser.parse();
484
366
 
485
- // The PSD is now loaded as an editable scene
486
- console.log('Pages:', engine.scene.getPages().length);
367
+ // Save as a portable archive
368
+ const archive = await engine.scene.saveToArchive();
369
+ await fs.writeFile('./design.cesdk', Buffer.from(await archive.arrayBuffer()));
370
+
371
+ // Clean up
372
+ engine.dispose();
487
373
  ```
488
374
 
489
- This minimal example fetches a PSD from a URL and converts it into an editable CE.SDK scene. The following sections cover font handling, user uploads, and additional features.
375
+ This minimal example reads a PSD file, converts it to a CE.SDK scene, and saves it as an archive. The archive can be loaded in any CE.SDK environment (browser or server). The following sections cover font handling, batch processing, and validation.
490
376
 
491
377
  ## Supported Elements
492
378
 
@@ -499,340 +385,424 @@ The PSD importer preserves the following Photoshop elements:
499
385
  - **Fills** - Solid color fills and strokes (weight, color, alignment)
500
386
  - **Images** - Raster image layers (without cropping)
501
387
 
502
- ## Setting Up Font Matching
388
+ ## Setting Up the Conversion Environment
503
389
 
504
- Text elements in PSD files reference fonts that may not be available in CE.SDK. Use `addGfontsAssetLibrary()` to register Google Fonts as a font source before parsing:
390
+ Initialize the CE.SDK Node.js engine and configure Google Fonts support before processing PSD files:
505
391
 
506
392
  ```typescript highlight=highlight-setup
507
- // Initialize CE.SDK with Google Fonts support for PSD text matching
508
- await cesdk.addPlugin(new DesignEditorConfig());
509
-
510
- // Add asset source plugins
511
- await cesdk.addPlugin(new BlurAssetSource());
512
- await cesdk.addPlugin(new ColorPaletteAssetSource());
513
- await cesdk.addPlugin(new CropPresetsAssetSource());
514
- await cesdk.addPlugin(
515
- new UploadAssetSources({ include: ['ly.img.image.upload'] })
516
- );
517
- await cesdk.addPlugin(
518
- new DemoAssetSources({
519
- include: [
520
- 'ly.img.templates.blank.*',
521
- 'ly.img.templates.presentation.*',
522
- 'ly.img.templates.print.*',
523
- 'ly.img.templates.social.*',
524
- 'ly.img.image.*'
525
- ]
526
- })
527
- );
528
- await cesdk.addPlugin(new EffectsAssetSource());
529
- await cesdk.addPlugin(new FiltersAssetSource());
530
- await cesdk.addPlugin(new PagePresetsAssetSource());
531
- await cesdk.addPlugin(new StickerAssetSource());
532
- await cesdk.addPlugin(new TextAssetSource());
533
- await cesdk.addPlugin(new TextComponentAssetSource());
534
- await cesdk.addPlugin(new TypefaceAssetSource());
535
- await cesdk.addPlugin(new VectorShapeAssetSource());
536
-
537
- // Register Google Fonts before parsing PSD files for best font matching
538
- await addGfontsAssetLibrary(engine);
539
- ```
393
+ import CreativeEngine from '@cesdk/node';
394
+ import type { TypefaceResolver } from '@imgly/psd-importer';
395
+ import {
396
+ PSDParser,
397
+ createPNGJSEncodeBufferToPNG,
398
+ addGfontsAssetLibrary
399
+ } from '@imgly/psd-importer';
400
+ import { PNG } from 'pngjs';
401
+ import { config } from 'dotenv';
402
+ import { promises as fs } from 'fs';
403
+ import { join, basename } from 'path';
540
404
 
541
- Call this function on the engine before parsing PSD files. The importer attempts to match fonts from the PSD with available Google Fonts. For fonts not found, the importer uses a fallback font.
405
+ // Load environment variables
406
+ config();
407
+ ```
542
408
 
543
- ## Checking Import Warnings
409
+ The `pngjs` package provides the `PNG` constructor needed for `createPNGJSEncodeBufferToPNG()`. We use `dotenv` to load environment variables like the license key.
544
410
 
545
- Display warnings from the import result to inform users about unsupported features. Filter the logger messages and show appropriate notifications:
411
+ ## Converting a Single PSD File
546
412
 
547
- ```typescript highlight=highlight-check-warnings
548
- // Check for import warnings and errors
549
- const messages = result.logger.getMessages();
550
- const warnings = messages.filter((m) => m.type === 'warning');
551
- const errors = messages.filter((m) => m.type === 'error');
413
+ Read a PSD file, parse it using the PSD importer, and save the resulting scene as an archive:
552
414
 
553
- if (errors.length > 0) {
554
- console.error('Import errors:', errors);
555
- }
556
- if (warnings.length > 0) {
557
- console.warn(
558
- 'Import warnings:',
559
- warnings.map((w) => w.message)
415
+ ```typescript highlight=highlight-convert-single
416
+ /**
417
+ * Convert a single PSD file to CE.SDK scene formats
418
+ * Outputs both an archive file and a scene string with stable URLs
419
+ */
420
+ async function convertPsd(
421
+ engine: InstanceType<typeof CreativeEngine>,
422
+ psdPath: string,
423
+ outputDir: string
424
+ ): Promise<{
425
+ archivePath: string;
426
+ sceneStringPath: string;
427
+ warnings: string[];
428
+ errors: string[];
429
+ }> {
430
+ // Read the PSD file
431
+ const psdBuffer = await fs.readFile(psdPath);
432
+
433
+ // Create parser with Node.js PNG encoder
434
+ // The addGfontsAssetLibrary() call enables automatic font matching
435
+ // For custom font mapping, pass fontResolver in options (see customFontResolver example)
436
+ // Note: Cast engine to any because psd-importer types expect browser engine
437
+ const parser = await PSDParser.fromFile(
438
+ engine as any,
439
+ psdBuffer.buffer,
440
+ createPNGJSEncodeBufferToPNG(PNG),
441
+ // Pass fontResolver for advanced font mapping
442
+ { fontResolver: customFontResolver }
560
443
  );
561
- }
562
- ```
563
444
 
564
- Common warnings include unsupported blend modes, font substitutions, and features that couldn't be converted. Errors indicate critical issues that prevented parts of the PSD from being imported.
565
-
566
- ## Adding a File Upload Button
567
-
568
- Add a custom button to the navigation bar that allows users to upload and import PSD files directly. The button uses `cesdk.utils.loadFile()` to open the file picker and immediately imports the selected file:
569
-
570
- ```typescript highlight=highlight-file-upload
571
- // Add a custom nav bar button for uploading and importing PSD files
572
- // Uses cesdk.utils.loadFile() to open the browser's file picker
573
- cesdk.ui.registerComponent('psd.uploadButton', ({ builder }) => {
574
- builder.Button('psd.uploadButton', {
575
- label: 'Load PSD File',
576
- icon: '@imgly/Upload',
577
- variant: 'regular',
578
- color: 'accent',
579
- onClick: async () => {
580
- const buffer = await cesdk.utils.loadFile({
581
- accept: '.psd,application/x-photoshop,image/vnd.adobe.photoshop',
582
- returnType: 'arrayBuffer'
583
- });
584
- await importPsd(buffer, 'uploaded.psd');
585
- }
586
- });
587
- });
588
-
589
- // Add the upload button to the right side of the navigation bar
590
- cesdk.ui.setComponentOrder({ in: 'ly.img.navigation.bar' }, [
591
- ...cesdk.ui.getComponentOrder({ in: 'ly.img.navigation.bar' }),
592
- 'psd.uploadButton'
593
- ]);
594
-
595
- // Open the PSD Templates library by default
596
- cesdk.ui.openPanel('//ly.img.panel/assetLibrary', {
597
- payload: {
598
- entries: ['psd-library-entry'],
599
- title: 'PSD Templates'
445
+ // Parse the PSD file
446
+ const result = await parser.parse();
447
+
448
+ // Extract warnings and errors from logger
449
+ const messages = result.logger.getMessages();
450
+ const warnings = messages
451
+ .filter((m) => m.type === 'warning')
452
+ .map((m) => m.message);
453
+ const errors = messages
454
+ .filter((m) => m.type === 'error')
455
+ .map((m) => m.message);
456
+
457
+ if (errors.length > 0) {
458
+ console.error(` Errors: ${errors.length}`);
459
+ }
460
+ if (warnings.length > 0) {
461
+ console.warn(` Warnings: ${warnings.length}`);
600
462
  }
601
- });
602
- ```
603
463
 
604
- This registers a custom button component that uses `cesdk.utils.loadFile()` to handle file selection. When clicked, the button opens the system file picker, reads the selected file as an ArrayBuffer, and passes it directly to the PSD parser for immediate import into the editor.
464
+ // Generate output filename from input filename
465
+ const inputName = basename(psdPath, '.psd');
466
+ const archivePath = join(outputDir, `${inputName}.cesdk`);
467
+
468
+ // Save as scene archive
469
+ const archive = await engine.scene.saveToArchive();
470
+ const archiveBuffer = Buffer.from(await archive.arrayBuffer());
471
+ await fs.writeFile(archivePath, archiveBuffer);
472
+
473
+ // Optional: Save scene as JSON string with stable URLs instead of archive
474
+ // This is useful when storing scenes in a database or referencing CDN-hosted assets
475
+ // By default, PSD images use transient buffer:// URLs that only work with saveToArchive()
476
+ // To use saveToString(), relocate transient resources to permanent URLs first:
477
+
478
+ // Mock upload function - replace with your actual backend upload logic
479
+ const uploadToBackend = async (data: Uint8Array): Promise<string> => {
480
+ // In production, upload the data to your CDN/storage and return the permanent URL
481
+ // For this example, we write to a temp file and return a file:// URL
482
+ const hash = data.reduce((acc, byte) => (acc + byte) % 1000000, 0);
483
+ const tempPath = join(outputDir, `asset-${hash}.png`);
484
+ await fs.writeFile(tempPath, data);
485
+ return `file://${tempPath}`;
486
+ };
605
487
 
606
- ## Parsing the PSD File
488
+ const transientResources = engine.editor.findAllTransientResources();
489
+ for (const resource of transientResources) {
490
+ const { URL: bufferUri, size } = resource;
491
+ const data = engine.editor.getBufferData(bufferUri, 0, size);
492
+ const permanentUrl = await uploadToBackend(data);
493
+ engine.editor.relocateResource(bufferUri, permanentUrl);
494
+ }
607
495
 
608
- Use `PSDParser.fromFile()` with `createWebEncodeBufferToPNG()` for browser environments. After parsing, the scene is immediately available in the engine:
496
+ // Now save as scene string - all URLs are permanent
497
+ const sceneString = await engine.scene.saveToString();
498
+ const sceneStringPath = join(outputDir, `${inputName}.scene`);
499
+ await fs.writeFile(sceneStringPath, sceneString);
609
500
 
610
- ```typescript highlight=highlight-parse-psd
611
- // Get buffer from URL or use directly
612
- let buffer: ArrayBuffer;
613
- if (typeof source === 'string') {
614
- const response = await fetch(source);
615
- buffer = await response.arrayBuffer();
616
- } else {
617
- buffer = source;
501
+ return { archivePath, sceneStringPath, warnings, errors };
618
502
  }
619
-
620
- // Parse the PSD file using the PSD importer
621
- // The addGfontsAssetLibrary() call above enables automatic font matching
622
- // For custom font mapping, pass fontResolver in options (see customFontResolver example)
623
- const parser = await PSDParser.fromFile(
624
- engine,
625
- buffer,
626
- createWebEncodeBufferToPNG(),
627
- { fontResolver: customFontResolver }
628
- );
629
- const result = await parser.parse();
630
503
  ```
631
504
 
632
- The parser creates a new scene in the engine with all supported PSD elements converted to CE.SDK blocks. The result object contains a logger with messages about the import process.
505
+ The `convertPSDToArchive` function:
633
506
 
634
- ## Saving as Archive
507
+ 1. Reads the PSD file from disk as a buffer
508
+ 2. Creates a parser instance with the Node.js PNG encoder
509
+ 3. Parses the PSD, creating a scene in the engine
510
+ 4. Extracts warnings and errors from the logger
511
+ 5. Saves the scene as a `.cesdk` archive file
635
512
 
636
- After parsing, save the imported scene as an archive. This creates a portable bundle containing the scene and all its assets:
513
+ ## Batch Converting Multiple PSD Files
637
514
 
638
- ```typescript highlight=highlight-save-archive
639
- // Save the imported scene as an archive for editor loading
640
- const sceneArchive = await engine.scene.saveToArchive();
641
- const archiveUrl = URL.createObjectURL(sceneArchive);
642
- ```
515
+ Process multiple PSD files sequentially, continuing even if individual files fail:
643
516
 
644
- Archives can be stored, shared, or loaded later using `loadFromArchiveURL()`.
517
+ ```typescript highlight=highlight-batch-convert
518
+ /**
519
+ * Batch convert multiple PSD files to CE.SDK scene formats
520
+ * Processes files sequentially, continuing even if individual files fail
521
+ */
522
+ async function batchConvertPsds(
523
+ psdPaths: string[],
524
+ outputDir: string
525
+ ): Promise<void> {
526
+ console.log(`Starting batch conversion of ${psdPaths.length} PSD files...`);
527
+
528
+ // Ensure output directory exists
529
+ await fs.mkdir(outputDir, { recursive: true });
530
+
531
+ // Initialize engine once for all conversions
532
+ const engine = await CreativeEngine.init({
533
+ baseURL: process.env.IMGLY_LOCAL_ASSETS_URL
534
+ // license: process.env.CESDK_LICENSE,
535
+ });
645
536
 
646
- ## Saving Scenes with Stable URLs
537
+ try {
538
+ // Configure Google Fonts for text element support
539
+ // Note: Cast engine to any because psd-importer types expect browser engine
540
+ await addGfontsAssetLibrary(engine as any);
647
541
 
648
- By default, the PSD importer creates internal `buffer://` URLs for imported images. These are transient resources that work well when saving to an archive (`engine.scene.saveToArchive()`), which bundles all assets together.
542
+ let successCount = 0;
543
+ let failCount = 0;
649
544
 
650
- However, if you want to save scenes as JSON strings (`engine.scene.saveToString()`) with stable, permanent URLs (e.g., for storing in a database or referencing CDN-hosted assets), you need to relocate the transient resources first.
545
+ // Process each PSD file
546
+ for (const psdPath of psdPaths) {
547
+ const fileName = basename(psdPath);
548
+ console.log(`\nProcessing: ${fileName}`);
651
549
 
652
- ### Why Relocate?
550
+ try {
551
+ const { archivePath, sceneStringPath, warnings, errors } =
552
+ await convertPsd(engine, psdPath, outputDir);
653
553
 
654
- - **Scene Archives** (`saveToArchive`): Include all assets in a single ZIP file. Transient `buffer://` URLs work fine.
655
- - **Scene Strings** (`saveToString`): Only contain references to assets. Transient URLs won't work when reloading the scene later. You need permanent URLs (e.g., `https://`).
554
+ // Log results
555
+ if (errors.length > 0) {
556
+ console.log(` Errors: ${errors.length}`);
557
+ errors.forEach((e) => console.log(` - ${e}`));
558
+ }
559
+ if (warnings.length > 0) {
560
+ console.log(` Warnings: ${warnings.length}`);
561
+ warnings.forEach((w) => console.log(` - ${w}`));
562
+ }
656
563
 
657
- ### How to Relocate Transient Resources
564
+ console.log(` Archive: ${archivePath}`);
565
+ console.log(` Scene: ${sceneStringPath}`);
566
+ successCount++;
567
+ } catch (error) {
568
+ console.error(` Failed: ${(error as Error).message}`);
569
+ failCount++;
570
+ }
571
+ }
658
572
 
659
- After parsing the PSD file, use CE.SDK's native APIs to find and relocate all transient resources:
573
+ console.log(`\nBatch conversion complete:`);
574
+ console.log(` Success: ${successCount}/${psdPaths.length}`);
575
+ console.log(` Failed: ${failCount}/${psdPaths.length}`);
576
+ } finally {
577
+ // Always dispose engine to free resources
578
+ engine.dispose();
579
+ }
580
+ }
581
+ ```
660
582
 
661
- ```typescript highlight=highlight-stable-urls
662
- // Optional: Save scene as JSON string with stable URLs instead of archive
663
- // This is useful when storing scenes in a database or referencing CDN-hosted assets
664
- // By default, PSD images use transient buffer:// URLs that only work with saveToArchive()
665
- // To use saveToString(), relocate transient resources to permanent URLs first:
666
-
667
- // Mock upload function - replace with your actual backend upload logic
668
- const uploadToBackend = async (data: Uint8Array): Promise<string> => {
669
- // In production, upload the data to your CDN/storage and return the permanent URL
670
- // For this example, we create a blob URL to demonstrate the workflow
671
- const blob = new Blob([new Uint8Array(data)], { type: 'image/png' });
672
- return URL.createObjectURL(blob);
673
- };
583
+ Key aspects of batch conversion:
584
+
585
+ - **Single engine instance** - Initialize once and reuse for all conversions to improve performance
586
+ - **Error isolation** - Each file is processed in a try-catch block so one failure doesn't stop the batch
587
+ - **Progress logging** - Track success and failure counts for reporting
588
+ - **Resource cleanup** - Always dispose the engine in a finally block
589
+
590
+ ## Processing a Directory
591
+
592
+ Scan a directory for PSD files and convert all of them:
593
+
594
+ ```typescript highlight=highlight-process-directory
595
+ /**
596
+ * Find all PSD files in a directory and convert them
597
+ */
598
+ export async function processDirectory(
599
+ inputDir: string,
600
+ outputDir: string
601
+ ): Promise<void> {
602
+ // Find all PSD files in directory
603
+ const files = await fs.readdir(inputDir);
604
+ const psdFiles = files
605
+ .filter((f) => f.toLowerCase().endsWith('.psd'))
606
+ .map((f) => join(inputDir, f));
607
+
608
+ if (psdFiles.length === 0) {
609
+ console.log(`No PSD files found in ${inputDir}`);
610
+ return;
611
+ }
674
612
 
675
- const transientResources = engine.editor.findAllTransientResources();
676
- for (const resource of transientResources) {
677
- const { URL: bufferUri, size } = resource;
678
- const data = engine.editor.getBufferData(bufferUri, 0, size);
679
- const permanentUrl = await uploadToBackend(data);
680
- engine.editor.relocateResource(bufferUri, permanentUrl);
613
+ await batchConvertPsds(psdFiles, outputDir);
681
614
  }
682
- const sceneString = await engine.scene.saveToString();
683
- console.log(`Scene persisted with stable URLs (${sceneString.length} bytes)`);
684
615
  ```
685
616
 
686
- The relocation workflow:
687
-
688
- 1. Find all transient resources using `engine.editor.findAllTransientResources()`
689
- 2. Extract binary data for each resource using `engine.editor.getBufferData()`
690
- 3. Upload the data to your backend or CDN
691
- 4. Relocate the resource URL using `engine.editor.relocateResource()`
692
- 5. Save to string with `engine.scene.saveToString()` - all URLs will now be permanent
617
+ This function finds all `.psd` files in the input directory and processes them as a batch.
693
618
 
694
- ### Note on Font URLs
619
+ ## Validating Conversion Results
695
620
 
696
- When using the default font resolver with Google Fonts, the resulting scene string will contain Google CDN URLs for fonts. If you need fonts hosted on your own infrastructure, configure a custom font resolver instead of using the default Google Fonts integration.
621
+ Load a converted archive and verify its structure:
697
622
 
698
- ## Loading into the Editor
623
+ ```typescript highlight=highlight-validate-results
624
+ /**
625
+ * Validate conversion results by loading the archive and checking scene structure
626
+ */
627
+ export async function validateArchive(archivePath: string): Promise<{
628
+ valid: boolean;
629
+ pageCount: number;
630
+ blockCount: number;
631
+ }> {
632
+ const engine = await CreativeEngine.init({
633
+ // license: process.env.CESDK_LICENSE,
634
+ });
699
635
 
700
- Load the archived scene into the CE.SDK editor for user editing:
636
+ try {
637
+ // Load the archive
638
+ const archiveBuffer = await fs.readFile(archivePath);
639
+ const archiveBlob = new Blob([archiveBuffer]);
640
+ const archiveUrl = URL.createObjectURL(archiveBlob);
701
641
 
702
- ```typescript highlight=highlight-load-editor
703
- // Load the archived scene into the editor
704
- await cesdk.engine.scene.loadFromArchiveURL(archiveUrl);
642
+ await engine.scene.loadFromArchiveURL(archiveUrl);
705
643
 
706
- // Verify scene loaded correctly
707
- const pages = engine.scene.getPages();
708
- console.log(`PSD imported successfully with ${pages.length} page(s)`);
644
+ // Get scene information
645
+ const pages = engine.block.findByType('page');
646
+ const allBlocks = engine.block.findAll();
709
647
 
710
- // Zoom to fit the imported page
711
- await cesdk.actions.run('zoom.toPage', { page: 'first', autoFit: true });
648
+ return {
649
+ valid: pages.length > 0,
650
+ pageCount: pages.length,
651
+ blockCount: allBlocks.length
652
+ };
653
+ } finally {
654
+ engine.dispose();
655
+ }
656
+ }
712
657
  ```
713
658
 
714
- After loading, verify the scene contains at least one page. The imported design is now ready for editing in the CE.SDK editor.
659
+ Validation checks:
715
660
 
716
- ## Creating a PSD Template Library
661
+ - The archive can be loaded without errors
662
+ - At least one page exists in the scene
663
+ - Block count indicates content was imported
717
664
 
718
- Add a custom asset source that provides PSD templates users can select from a library panel. This allows users to browse and apply pre-defined PSD designs directly from the editor UI:
665
+ ## Running the Conversion
719
666
 
720
- ```typescript highlight=highlight-asset-source
721
- // Add custom asset source for PSD templates
722
- engine.asset.addSource({
723
- id: PSD_SOURCE_ID,
667
+ The main entry point demonstrates the complete batch conversion workflow:
724
668
 
725
- async findAssets(
726
- queryData: AssetQueryData
727
- ): Promise<AssetsQueryResult<AssetResult>> {
728
- let assets = SAMPLE_PSD_FILES;
669
+ ```typescript highlight=highlight-main
670
+ /**
671
+ * Main entry point - demonstrates batch PSD conversion workflow
672
+ */
673
+ async function main(): Promise<void> {
674
+ console.log('PSD to CE.SDK Batch Converter');
675
+ console.log('=============================\n');
676
+
677
+ // Example: Convert a single PSD file
678
+ // In production, you would provide actual PSD files
679
+ const engine = await CreativeEngine.init({
680
+ // license: process.env.CESDK_LICENSE,
681
+ });
729
682
 
730
- // Filter by query if provided
731
- if (queryData.query) {
732
- const query = queryData.query.toLowerCase();
733
- assets = assets.filter(
734
- (a) =>
735
- a.label?.toLowerCase().includes(query) ||
736
- a.tags?.some((t) => t.toLowerCase().includes(query))
737
- );
738
- }
683
+ try {
684
+ // Configure Google Fonts for text element support
685
+ await addGfontsAssetLibrary(engine as any);
686
+
687
+ // Create a sample scene to demonstrate the export format
688
+ // In production, this would be replaced by actual PSD conversion
689
+ await engine.scene.create();
690
+ const page = engine.block.create('page');
691
+ engine.block.setWidth(page, 800);
692
+ engine.block.setHeight(page, 600);
693
+ engine.block.appendChild(engine.scene.get()!, page);
694
+
695
+ // Save as archive
696
+ await fs.mkdir('./output', { recursive: true });
697
+ const archive = await engine.scene.saveToArchive();
698
+ const archiveBuffer = Buffer.from(await archive.arrayBuffer());
699
+ await fs.writeFile('./output/sample.cesdk', archiveBuffer);
700
+
701
+ console.log('Sample archive created: ./output/sample.cesdk');
702
+ console.log('\nTo convert actual PSD files:');
703
+ console.log('1. Place PSD files in an input directory');
704
+ console.log('2. Call: await processDirectory("./input", "./output")');
705
+ } finally {
706
+ engine.dispose();
707
+ }
708
+ }
709
+ ```
739
710
 
740
- return {
741
- assets,
742
- total: assets.length,
743
- currentPage: queryData.page,
744
- nextPage: undefined
745
- };
746
- },
711
+ Run the script with `vite-node` or `tsx`:
747
712
 
748
- async applyAsset(asset: AssetResult): Promise<number | undefined> {
749
- if (!asset.meta?.uri) {
750
- console.error('Asset has no URI');
751
- return undefined;
752
- }
713
+ ```bash
714
+ npx vite-node server-js.ts
715
+ ```
753
716
 
754
- await importPsd(asset.meta.uri as string, asset.label || asset.id);
755
- return undefined; // Scene replaced, no new block created
756
- }
757
- });
717
+ For production use, modify the script to accept input/output directories as arguments.
718
+
719
+ ## Saving and Loading Archives
720
+
721
+ Scene archives (`.cesdk` files) contain the complete scene with all embedded assets:
722
+
723
+ ```typescript
724
+ // Save scene as archive
725
+ const archive = await engine.scene.saveToArchive();
726
+ const archiveBuffer = Buffer.from(await archive.arrayBuffer());
727
+ await fs.writeFile('output.cesdk', archiveBuffer);
728
+
729
+ // Load archive in browser or server
730
+ await engine.scene.loadFromArchiveURL(archiveUrl);
758
731
  ```
759
732
 
760
- The asset source implements `findAssets()` to return a list of available PSD templates with thumbnails, and `applyAsset()` to import the selected PSD when users click on a template. The imported scene replaces the current editor content.
733
+ Archives are portable - convert on server, load in browser or another server instance.
761
734
 
762
- ## Custom Font Resolution
735
+ ## Saving Scenes with Stable URLs
763
736
 
764
- For advanced use cases, create a custom font resolver to control how PSD fonts map to available typefaces. This is useful when you need to:
737
+ By default, the PSD importer creates internal `buffer://` URLs for imported images. These are transient resources that work well when saving to an archive (`engine.scene.saveToArchive()`), which bundles all assets together.
765
738
 
766
- - **Map proprietary fonts** - Replace Photoshop fonts with specific alternatives (e.g., Arial to Open Sans)
767
- - **Use enterprise fonts** - Integrate with custom font libraries or brand-specific typefaces
768
- - **Implement fallback logic** - Define priority-based font matching with graceful degradation
769
- - **Validate fonts** - Ensure only approved fonts are used in imported designs
739
+ However, if you want to save scenes as JSON strings (`engine.scene.saveToString()`) with stable, permanent URLs (e.g., for storing in a database or referencing CDN-hosted assets), you need to relocate the transient resources first.
770
740
 
771
- ```typescript highlight=highlight-custom-font-resolver
772
- // Optional: Create a custom font resolver for advanced font mapping
773
- // Use this when you need to map Photoshop fonts to specific alternatives,
774
- // use enterprise fonts, or implement custom fallback logic
775
- const customFontResolver: TypefaceResolver = async (fontParams, eng) => {
776
- const { family, style, weight } = fontParams;
741
+ ### Why Relocate?
777
742
 
778
- // Define font mappings from Photoshop fonts to available alternatives
779
- const fontMappings: Record<string, string> = {
780
- Arial: 'Open Sans',
781
- Helvetica: 'Inter',
782
- 'Helvetica Neue': 'Inter',
783
- 'Times New Roman': 'Lora',
784
- Georgia: 'Merriweather'
785
- };
743
+ - **Scene Archives** (`saveToArchive`): Include all assets in a single ZIP file. Transient `buffer://` URLs work fine.
744
+ - **Scene Strings** (`saveToString`): Only contain references to assets. Transient URLs won't work when reloading the scene later. You need permanent URLs (e.g., `https://`).
786
745
 
787
- // Use mapped font or original family name
788
- const targetFamily = fontMappings[family] || family;
746
+ ### How to Relocate Transient Resources
789
747
 
790
- // Search for the font in available typefaces
791
- const result = await eng.asset.findAssets('ly.img.typeface', {
792
- query: targetFamily,
793
- page: 0,
794
- perPage: 10
795
- });
748
+ After parsing the PSD file, use CE.SDK's native APIs to find and relocate all transient resources:
796
749
 
797
- if (result.assets.length === 0) {
798
- console.warn(`Font "${family}" not found, using default fallback`);
799
- return null; // Let the parser use its default fallback
750
+ ```typescript highlight=highlight-stable-urls
751
+ // Optional: Save scene as JSON string with stable URLs instead of archive
752
+ // This is useful when storing scenes in a database or referencing CDN-hosted assets
753
+ // By default, PSD images use transient buffer:// URLs that only work with saveToArchive()
754
+ // To use saveToString(), relocate transient resources to permanent URLs first:
755
+
756
+ // Mock upload function - replace with your actual backend upload logic
757
+ const uploadToBackend = async (data: Uint8Array): Promise<string> => {
758
+ // In production, upload the data to your CDN/storage and return the permanent URL
759
+ // For this example, we write to a temp file and return a file:// URL
760
+ const hash = data.reduce((acc, byte) => (acc + byte) % 1000000, 0);
761
+ const tempPath = join(outputDir, `asset-${hash}.png`);
762
+ await fs.writeFile(tempPath, data);
763
+ return `file://${tempPath}`;
764
+ };
765
+
766
+ const transientResources = engine.editor.findAllTransientResources();
767
+ for (const resource of transientResources) {
768
+ const { URL: bufferUri, size } = resource;
769
+ const data = engine.editor.getBufferData(bufferUri, 0, size);
770
+ const permanentUrl = await uploadToBackend(data);
771
+ engine.editor.relocateResource(bufferUri, permanentUrl);
800
772
  }
801
773
 
802
- // Get the typeface from the asset payload
803
- const asset = result.assets[0];
804
- const typeface = asset.payload?.typeface;
805
- if (!typeface) return null;
774
+ // Now save as scene string - all URLs are permanent
775
+ const sceneString = await engine.scene.saveToString();
776
+ const sceneStringPath = join(outputDir, `${inputName}.scene`);
777
+ await fs.writeFile(sceneStringPath, sceneString);
778
+ ```
806
779
 
807
- // Find the best matching font variant (weight and style)
808
- const matchingFont =
809
- typeface.fonts.find(
810
- (f: { weight?: string; style?: string }) =>
811
- f.weight === weight && f.style === style
812
- ) ||
813
- typeface.fonts.find((f: { weight?: string }) => f.weight === weight) ||
814
- typeface.fonts[0];
780
+ The relocation workflow:
815
781
 
816
- return { typeface, font: matchingFont };
817
- };
818
- ```
782
+ 1. Find all transient resources using `engine.editor.findAllTransientResources()`
783
+ 2. Extract binary data for each resource using `engine.editor.getBufferData()`
784
+ 3. Upload the data to your storage service (S3, GCS, CDN, etc.)
785
+ 4. Relocate the resource URL using `engine.editor.relocateResource()`
786
+ 5. Save to string with `engine.scene.saveToString()` - all URLs will now be permanent
819
787
 
820
- The font resolver receives font parameters (family, style, weight) from each text element in the PSD and returns a matching typeface and font from your available assets. Return `null` to let the parser use its default fallback behavior.
788
+ ### Note on Font URLs
821
789
 
822
- Pass the custom resolver to `PSDParser.fromFile()` via the options parameter. When both `addGfontsAssetLibrary()` and a custom resolver are used, the custom resolver takes precedence for font matching decisions.
790
+ When using the default font resolver with Google Fonts, the resulting scene string will contain Google CDN URLs for fonts. If you need fonts hosted on your own infrastructure, configure a custom font resolver instead of using the default Google Fonts integration.
823
791
 
824
792
  ## API Reference
825
793
 
826
794
  The `@imgly/psd-importer` package exports the following key APIs:
827
795
 
828
- | API | Description |
829
- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
830
- | `PSDParser.fromFile(engine, buffer, encoder, options?)` | Creates a parser instance from a PSD file buffer. Returns a parser with a `parse()` method. |
831
- | `createWebEncodeBufferToPNG()` | Creates a PNG encoder for browser environments using the Canvas API. |
832
- | `addGfontsAssetLibrary(engine)` | Registers Google Fonts as a font source for text element matching. Call before parsing. |
833
- | `TypefaceResolver` | Type for custom font resolver functions. Receives font parameters and returns a matching typeface/font pair. |
834
- | `options.fontResolver` | `TypefaceResolver` - Custom function to resolve fonts from the PSD to available typefaces. |
835
- | `result.logger.getMessages()` | Returns an array of import messages with `type` ('warning' or 'error') and `message` properties. |
796
+ | API | Description |
797
+ |-----|-------------|
798
+ | `PSDParser.fromFile(engine, buffer, encoder, options?)` | Creates a parser instance from a PSD file buffer. Returns a parser with a `parse()` method. |
799
+ | `createPNGJSEncodeBufferToPNG(PNG)` | Creates a PNG encoder for Node.js using the `pngjs` library. Pass the `PNG` constructor from `pngjs`. |
800
+ | `addGfontsAssetLibrary(engine)` | Registers Google Fonts as a font source for text element matching. Call before parsing. |
801
+ | `TypefaceResolver` | Type for custom font resolver functions. Receives font parameters and returns a matching typeface/font pair. |
802
+ | `options.fontResolver` | `TypefaceResolver` - Custom function to resolve fonts from the PSD to available typefaces. |
803
+ | `result.logger.getMessages()` | Returns an array of import messages with `type` ('warning' or 'error') and `message` properties. |
804
+
805
+ **Type Casting Note:** The `@imgly/psd-importer` types expect the browser engine. When using `@cesdk/node`, cast the engine: `PSDParser.fromFile(engine as any, ...)`.
836
806
 
837
807
  ## Limitations
838
808
 
@@ -847,19 +817,21 @@ The PSD importer has the following limitations:
847
817
 
848
818
  ## Troubleshooting
849
819
 
850
- **Import fails silently:** Check the logger messages for errors using `result.logger.getMessages()`.
820
+ **Conversion fails silently:** Check the logger messages from `result.logger.getMessages()`. The batch conversion functions log warnings and errors for each file.
821
+
822
+ **Text appears with wrong font:** Ensure `addGfontsAssetLibrary()` is called before parsing. The importer attempts to match fonts with Google Fonts and uses a fallback for unavailable fonts.
823
+
824
+ **Memory issues with large files:** Files over 900MB may encounter memory constraints. The importer gracefully skips problematic elements. Consider increasing Node.js memory with `--max-old-space-size`.
851
825
 
852
- **Text appears with wrong font:** Ensure `addGfontsAssetLibrary()` is called before parsing. Verify the font exists in Google Fonts. If not available, a fallback font is used.
826
+ **Type errors with engine parameter:** The `@imgly/psd-importer` types expect the browser engine. Cast to `any` when using `@cesdk/node`: `PSDParser.fromFile(engine as any, ...)`.
853
827
 
854
- **Missing layers:** Some layer types or blend modes may not be supported. Check the import warnings for details about which layers couldn't be converted.
855
828
 
856
- **Large file handling:** Files over 900MB may encounter memory constraints. The importer gracefully skips problematic elements and continues with the rest of the file.
857
829
 
858
830
  ---
859
831
 
860
832
  ## More Resources
861
833
 
862
- - **[Vanilla JS/TS Documentation Index](https://img.ly/docs/cesdk/js.md)** - Browse all Vanilla JS/TS documentation
834
+ - **[Node.js Documentation Index](https://img.ly/docs/cesdk/node.md)** - Browse all Node.js documentation
863
835
  - **[Complete Documentation](./llms-full.txt.md)** - Full documentation in one file (for LLMs)
864
- - **[Web Documentation](./js.md)** - Interactive documentation with examples
865
- - **[Support](mailto:support@img.ly)** - Contact IMG.LY support
836
+ - **[Web Documentation](./node.md)** - Interactive documentation with examples
837
+ - **[Support](mailto:support@img.ly)** - Contact IMG.LY support