@nice2dev/ui-graphics 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/LICENSE +21 -0
  3. package/README.md +339 -0
  4. package/dist/cjs/animation/AnimatedPerson.js +153 -0
  5. package/dist/cjs/animation/AnimatedPerson.js.map +1 -0
  6. package/dist/cjs/animation/AnimationEditor.js +106 -0
  7. package/dist/cjs/animation/AnimationEditor.js.map +1 -0
  8. package/dist/cjs/animation/Audience.js +59 -0
  9. package/dist/cjs/animation/Audience.js.map +1 -0
  10. package/dist/cjs/animation/BodyRenderer.js +33 -0
  11. package/dist/cjs/animation/BodyRenderer.js.map +1 -0
  12. package/dist/cjs/animation/animationHelper.js +272 -0
  13. package/dist/cjs/animation/animationHelper.js.map +1 -0
  14. package/dist/cjs/animation/characterTypes.js +75 -0
  15. package/dist/cjs/animation/characterTypes.js.map +1 -0
  16. package/dist/cjs/animation/choreoDSL.js +190 -0
  17. package/dist/cjs/animation/choreoDSL.js.map +1 -0
  18. package/dist/cjs/animation/choreography.js +41 -0
  19. package/dist/cjs/animation/choreography.js.map +1 -0
  20. package/dist/cjs/animation/karaokeIntegration.js +98 -0
  21. package/dist/cjs/animation/karaokeIntegration.js.map +1 -0
  22. package/dist/cjs/animation/lottieExport.js +128 -0
  23. package/dist/cjs/animation/lottieExport.js.map +1 -0
  24. package/dist/cjs/animation/motionPath.js +196 -0
  25. package/dist/cjs/animation/motionPath.js.map +1 -0
  26. package/dist/cjs/animation/physics.js +201 -0
  27. package/dist/cjs/animation/physics.js.map +1 -0
  28. package/dist/cjs/animation/rig/RigPlayer.js +63 -0
  29. package/dist/cjs/animation/rig/RigPlayer.js.map +1 -0
  30. package/dist/cjs/animation/rig/RiggedBody.js +30 -0
  31. package/dist/cjs/animation/rig/RiggedBody.js.map +1 -0
  32. package/dist/cjs/animation/rig/choreoRigBridge.js +63 -0
  33. package/dist/cjs/animation/rig/choreoRigBridge.js.map +1 -0
  34. package/dist/cjs/animation/rig/ik.js +22 -0
  35. package/dist/cjs/animation/rig/ik.js.map +1 -0
  36. package/dist/cjs/animation/rig/poseOps.js +49 -0
  37. package/dist/cjs/animation/rig/poseOps.js.map +1 -0
  38. package/dist/cjs/animation/rig/presets.js +60 -0
  39. package/dist/cjs/animation/rig/presets.js.map +1 -0
  40. package/dist/cjs/animation/rig/rigMath.js +41 -0
  41. package/dist/cjs/animation/rig/rigMath.js.map +1 -0
  42. package/dist/cjs/animation/rig/rigTypes.js +44 -0
  43. package/dist/cjs/animation/rig/rigTypes.js.map +1 -0
  44. package/dist/cjs/animation/shapes/arms.js +15 -0
  45. package/dist/cjs/animation/shapes/arms.js.map +1 -0
  46. package/dist/cjs/animation/shapes/eyes.js +52 -0
  47. package/dist/cjs/animation/shapes/eyes.js.map +1 -0
  48. package/dist/cjs/animation/shapes/hair.js +55 -0
  49. package/dist/cjs/animation/shapes/hair.js.map +1 -0
  50. package/dist/cjs/animation/shapes/heads.js +62 -0
  51. package/dist/cjs/animation/shapes/heads.js.map +1 -0
  52. package/dist/cjs/animation/shapes/headwear.js +44 -0
  53. package/dist/cjs/animation/shapes/headwear.js.map +1 -0
  54. package/dist/cjs/animation/shapes/legs.js +15 -0
  55. package/dist/cjs/animation/shapes/legs.js.map +1 -0
  56. package/dist/cjs/animation/shapes/mouths.js +53 -0
  57. package/dist/cjs/animation/shapes/mouths.js.map +1 -0
  58. package/dist/cjs/animation/shapes/noses.js +31 -0
  59. package/dist/cjs/animation/shapes/noses.js.map +1 -0
  60. package/dist/cjs/animation/shapes/outfits.js +43 -0
  61. package/dist/cjs/animation/shapes/outfits.js.map +1 -0
  62. package/dist/cjs/animation/shapes/torsos.js +13 -0
  63. package/dist/cjs/animation/shapes/torsos.js.map +1 -0
  64. package/dist/cjs/animation/spineExport.js +132 -0
  65. package/dist/cjs/animation/spineExport.js.map +1 -0
  66. package/dist/cjs/core/LocalUI.js +54 -0
  67. package/dist/cjs/core/LocalUI.js.map +1 -0
  68. package/dist/cjs/core/collaboration.js +259 -0
  69. package/dist/cjs/core/collaboration.js.map +1 -0
  70. package/dist/cjs/core/colorBlindness.js +97 -0
  71. package/dist/cjs/core/colorBlindness.js.map +1 -0
  72. package/dist/cjs/core/dragDrop.js +168 -0
  73. package/dist/cjs/core/dragDrop.js.map +1 -0
  74. package/dist/cjs/core/fixes.js +185 -0
  75. package/dist/cjs/core/fixes.js.map +1 -0
  76. package/dist/cjs/core/gridGuides.js +245 -0
  77. package/dist/cjs/core/gridGuides.js.map +1 -0
  78. package/dist/cjs/core/historyVisual.js +124 -0
  79. package/dist/cjs/core/historyVisual.js.map +1 -0
  80. package/dist/cjs/core/i18n.js +16 -0
  81. package/dist/cjs/core/i18n.js.map +1 -0
  82. package/dist/cjs/core/integrations.js +261 -0
  83. package/dist/cjs/core/integrations.js.map +1 -0
  84. package/dist/cjs/core/minimap.js +142 -0
  85. package/dist/cjs/core/minimap.js.map +1 -0
  86. package/dist/cjs/core/plugins.js +129 -0
  87. package/dist/cjs/core/plugins.js.map +1 -0
  88. package/dist/cjs/core/rtl.js +102 -0
  89. package/dist/cjs/core/rtl.js.map +1 -0
  90. package/dist/cjs/core/shortcuts.js +205 -0
  91. package/dist/cjs/core/shortcuts.js.map +1 -0
  92. package/dist/cjs/core/theme.js +171 -0
  93. package/dist/cjs/core/theme.js.map +1 -0
  94. package/dist/cjs/font/NiceFontEditor.js +193 -0
  95. package/dist/cjs/font/NiceFontEditor.js.map +1 -0
  96. package/dist/cjs/game/GameAsset2dEditor.js +371 -0
  97. package/dist/cjs/game/GameAsset2dEditor.js.map +1 -0
  98. package/dist/cjs/game/GameAsset2dEditor.module.css.js +6 -0
  99. package/dist/cjs/game/GameAsset2dEditor.module.css.js.map +1 -0
  100. package/dist/cjs/game/gameAssetTypes.js +20 -0
  101. package/dist/cjs/game/gameAssetTypes.js.map +1 -0
  102. package/dist/cjs/game/gameAssetUtils.js +475 -0
  103. package/dist/cjs/game/gameAssetUtils.js.map +1 -0
  104. package/dist/cjs/game/useGameAssetEditor.js +761 -0
  105. package/dist/cjs/game/useGameAssetEditor.js.map +1 -0
  106. package/dist/cjs/icon/NiceIconEditor.js +249 -0
  107. package/dist/cjs/icon/NiceIconEditor.js.map +1 -0
  108. package/dist/cjs/index.js +264 -0
  109. package/dist/cjs/index.js.map +1 -0
  110. package/dist/cjs/nice2dev-ui/dist/index.js +32070 -0
  111. package/dist/cjs/nice2dev-ui/dist/index.js.map +1 -0
  112. package/dist/cjs/nice2dev-ui-graphics.css +1 -0
  113. package/dist/cjs/photo/FilterThumb.js +29 -0
  114. package/dist/cjs/photo/FilterThumb.js.map +1 -0
  115. package/dist/cjs/photo/PhotoEditor.js +20 -0
  116. package/dist/cjs/photo/PhotoEditor.js.map +1 -0
  117. package/dist/cjs/photo/PhotoEditor.module.css.js +6 -0
  118. package/dist/cjs/photo/PhotoEditor.module.css.js.map +1 -0
  119. package/dist/cjs/photo/PhotoEditorCanvas.js +59 -0
  120. package/dist/cjs/photo/PhotoEditorCanvas.js.map +1 -0
  121. package/dist/cjs/photo/PhotoEditorLeftPanel.js +174 -0
  122. package/dist/cjs/photo/PhotoEditorLeftPanel.js.map +1 -0
  123. package/dist/cjs/photo/PhotoEditorToolbar.js +15 -0
  124. package/dist/cjs/photo/PhotoEditorToolbar.js.map +1 -0
  125. package/dist/cjs/photo/photoEditorActions.js +80 -0
  126. package/dist/cjs/photo/photoEditorActions.js.map +1 -0
  127. package/dist/cjs/photo/photoEditorTypes.js +40 -0
  128. package/dist/cjs/photo/photoEditorTypes.js.map +1 -0
  129. package/dist/cjs/photo/photoFilters.js +880 -0
  130. package/dist/cjs/photo/photoFilters.js.map +1 -0
  131. package/dist/cjs/photo/photoOverlays.js +651 -0
  132. package/dist/cjs/photo/photoOverlays.js.map +1 -0
  133. package/dist/cjs/photo/photoSelection.js +547 -0
  134. package/dist/cjs/photo/photoSelection.js.map +1 -0
  135. package/dist/cjs/photo/usePhotoEditor.js +640 -0
  136. package/dist/cjs/photo/usePhotoEditor.js.map +1 -0
  137. package/dist/cjs/pixel/HSVPicker.js +173 -0
  138. package/dist/cjs/pixel/HSVPicker.js.map +1 -0
  139. package/dist/cjs/pixel/PixelEditor.js +28 -0
  140. package/dist/cjs/pixel/PixelEditor.js.map +1 -0
  141. package/dist/cjs/pixel/PixelEditor.module.css.js +6 -0
  142. package/dist/cjs/pixel/PixelEditor.module.css.js.map +1 -0
  143. package/dist/cjs/pixel/PixelEditorCanvas.js +15 -0
  144. package/dist/cjs/pixel/PixelEditorCanvas.js.map +1 -0
  145. package/dist/cjs/pixel/PixelEditorMenuBar.js +11 -0
  146. package/dist/cjs/pixel/PixelEditorMenuBar.js.map +1 -0
  147. package/dist/cjs/pixel/PixelEditorRightPanel.js +15 -0
  148. package/dist/cjs/pixel/PixelEditorRightPanel.js.map +1 -0
  149. package/dist/cjs/pixel/PixelEditorStatusBar.js +15 -0
  150. package/dist/cjs/pixel/PixelEditorStatusBar.js.map +1 -0
  151. package/dist/cjs/pixel/PixelEditorTimeline.js +11 -0
  152. package/dist/cjs/pixel/PixelEditorTimeline.js.map +1 -0
  153. package/dist/cjs/pixel/PixelEditorToolbar.js +16 -0
  154. package/dist/cjs/pixel/PixelEditorToolbar.js.map +1 -0
  155. package/dist/cjs/pixel/asepriteFormat.js +512 -0
  156. package/dist/cjs/pixel/asepriteFormat.js.map +1 -0
  157. package/dist/cjs/pixel/pixelEditorExports.js +471 -0
  158. package/dist/cjs/pixel/pixelEditorExports.js.map +1 -0
  159. package/dist/cjs/pixel/pixelEditorTypes.js +102 -0
  160. package/dist/cjs/pixel/pixelEditorTypes.js.map +1 -0
  161. package/dist/cjs/pixel/pixelEditorUtils.js +664 -0
  162. package/dist/cjs/pixel/pixelEditorUtils.js.map +1 -0
  163. package/dist/cjs/pixel/usePixelEditor.js +1112 -0
  164. package/dist/cjs/pixel/usePixelEditor.js.map +1 -0
  165. package/dist/cjs/texture/Nice3DTexturePainter.js +236 -0
  166. package/dist/cjs/texture/Nice3DTexturePainter.js.map +1 -0
  167. package/dist/cjs/ui/NiceUIDesigner.js +191 -0
  168. package/dist/cjs/ui/NiceUIDesigner.js.map +1 -0
  169. package/dist/cjs/vector/VectorEditor.js +31 -0
  170. package/dist/cjs/vector/VectorEditor.js.map +1 -0
  171. package/dist/cjs/vector/VectorEditor.module.css.js +6 -0
  172. package/dist/cjs/vector/VectorEditor.module.css.js.map +1 -0
  173. package/dist/cjs/vector/VectorEditorMenuBar.js +16 -0
  174. package/dist/cjs/vector/VectorEditorMenuBar.js.map +1 -0
  175. package/dist/cjs/vector/VectorEditorRightPanel.js +126 -0
  176. package/dist/cjs/vector/VectorEditorRightPanel.js.map +1 -0
  177. package/dist/cjs/vector/VectorEditorShapeRenderer.js +55 -0
  178. package/dist/cjs/vector/VectorEditorShapeRenderer.js.map +1 -0
  179. package/dist/cjs/vector/VectorEditorStatusBar.js +14 -0
  180. package/dist/cjs/vector/VectorEditorStatusBar.js.map +1 -0
  181. package/dist/cjs/vector/useVectorEditor.js +613 -0
  182. package/dist/cjs/vector/useVectorEditor.js.map +1 -0
  183. package/dist/cjs/vector/vectorBooleanOps.js +511 -0
  184. package/dist/cjs/vector/vectorBooleanOps.js.map +1 -0
  185. package/dist/cjs/vector/vectorEditorExport.js +159 -0
  186. package/dist/cjs/vector/vectorEditorExport.js.map +1 -0
  187. package/dist/cjs/vector/vectorEditorImport.js +150 -0
  188. package/dist/cjs/vector/vectorEditorImport.js.map +1 -0
  189. package/dist/cjs/vector/vectorEditorTypes.js +72 -0
  190. package/dist/cjs/vector/vectorEditorTypes.js.map +1 -0
  191. package/dist/cjs/vector/vectorGradients.js +201 -0
  192. package/dist/cjs/vector/vectorGradients.js.map +1 -0
  193. package/dist/esm/animation/AnimatedPerson.js +151 -0
  194. package/dist/esm/animation/AnimatedPerson.js.map +1 -0
  195. package/dist/esm/animation/AnimationEditor.js +104 -0
  196. package/dist/esm/animation/AnimationEditor.js.map +1 -0
  197. package/dist/esm/animation/Audience.js +57 -0
  198. package/dist/esm/animation/Audience.js.map +1 -0
  199. package/dist/esm/animation/BodyRenderer.js +28 -0
  200. package/dist/esm/animation/BodyRenderer.js.map +1 -0
  201. package/dist/esm/animation/animationHelper.js +268 -0
  202. package/dist/esm/animation/animationHelper.js.map +1 -0
  203. package/dist/esm/animation/characterTypes.js +70 -0
  204. package/dist/esm/animation/characterTypes.js.map +1 -0
  205. package/dist/esm/animation/choreoDSL.js +182 -0
  206. package/dist/esm/animation/choreoDSL.js.map +1 -0
  207. package/dist/esm/animation/choreography.js +36 -0
  208. package/dist/esm/animation/choreography.js.map +1 -0
  209. package/dist/esm/animation/karaokeIntegration.js +91 -0
  210. package/dist/esm/animation/karaokeIntegration.js.map +1 -0
  211. package/dist/esm/animation/lottieExport.js +123 -0
  212. package/dist/esm/animation/lottieExport.js.map +1 -0
  213. package/dist/esm/animation/motionPath.js +185 -0
  214. package/dist/esm/animation/motionPath.js.map +1 -0
  215. package/dist/esm/animation/physics.js +192 -0
  216. package/dist/esm/animation/physics.js.map +1 -0
  217. package/dist/esm/animation/rig/RigPlayer.js +61 -0
  218. package/dist/esm/animation/rig/RigPlayer.js.map +1 -0
  219. package/dist/esm/animation/rig/RiggedBody.js +28 -0
  220. package/dist/esm/animation/rig/RiggedBody.js.map +1 -0
  221. package/dist/esm/animation/rig/choreoRigBridge.js +60 -0
  222. package/dist/esm/animation/rig/choreoRigBridge.js.map +1 -0
  223. package/dist/esm/animation/rig/ik.js +20 -0
  224. package/dist/esm/animation/rig/ik.js.map +1 -0
  225. package/dist/esm/animation/rig/poseOps.js +45 -0
  226. package/dist/esm/animation/rig/poseOps.js.map +1 -0
  227. package/dist/esm/animation/rig/presets.js +53 -0
  228. package/dist/esm/animation/rig/presets.js.map +1 -0
  229. package/dist/esm/animation/rig/rigMath.js +37 -0
  230. package/dist/esm/animation/rig/rigMath.js.map +1 -0
  231. package/dist/esm/animation/rig/rigTypes.js +40 -0
  232. package/dist/esm/animation/rig/rigTypes.js.map +1 -0
  233. package/dist/esm/animation/shapes/arms.js +13 -0
  234. package/dist/esm/animation/shapes/arms.js.map +1 -0
  235. package/dist/esm/animation/shapes/eyes.js +45 -0
  236. package/dist/esm/animation/shapes/eyes.js.map +1 -0
  237. package/dist/esm/animation/shapes/hair.js +46 -0
  238. package/dist/esm/animation/shapes/hair.js.map +1 -0
  239. package/dist/esm/animation/shapes/heads.js +52 -0
  240. package/dist/esm/animation/shapes/heads.js.map +1 -0
  241. package/dist/esm/animation/shapes/headwear.js +36 -0
  242. package/dist/esm/animation/shapes/headwear.js.map +1 -0
  243. package/dist/esm/animation/shapes/legs.js +13 -0
  244. package/dist/esm/animation/shapes/legs.js.map +1 -0
  245. package/dist/esm/animation/shapes/mouths.js +45 -0
  246. package/dist/esm/animation/shapes/mouths.js.map +1 -0
  247. package/dist/esm/animation/shapes/noses.js +23 -0
  248. package/dist/esm/animation/shapes/noses.js.map +1 -0
  249. package/dist/esm/animation/shapes/outfits.js +37 -0
  250. package/dist/esm/animation/shapes/outfits.js.map +1 -0
  251. package/dist/esm/animation/shapes/torsos.js +11 -0
  252. package/dist/esm/animation/shapes/torsos.js.map +1 -0
  253. package/dist/esm/animation/spineExport.js +128 -0
  254. package/dist/esm/animation/spineExport.js.map +1 -0
  255. package/dist/esm/core/LocalUI.js +50 -0
  256. package/dist/esm/core/LocalUI.js.map +1 -0
  257. package/dist/esm/core/collaboration.js +252 -0
  258. package/dist/esm/core/collaboration.js.map +1 -0
  259. package/dist/esm/core/colorBlindness.js +90 -0
  260. package/dist/esm/core/colorBlindness.js.map +1 -0
  261. package/dist/esm/core/dragDrop.js +165 -0
  262. package/dist/esm/core/dragDrop.js.map +1 -0
  263. package/dist/esm/core/fixes.js +179 -0
  264. package/dist/esm/core/fixes.js.map +1 -0
  265. package/dist/esm/core/gridGuides.js +232 -0
  266. package/dist/esm/core/gridGuides.js.map +1 -0
  267. package/dist/esm/core/historyVisual.js +121 -0
  268. package/dist/esm/core/historyVisual.js.map +1 -0
  269. package/dist/esm/core/i18n.js +13 -0
  270. package/dist/esm/core/i18n.js.map +1 -0
  271. package/dist/esm/core/integrations.js +254 -0
  272. package/dist/esm/core/integrations.js.map +1 -0
  273. package/dist/esm/core/minimap.js +139 -0
  274. package/dist/esm/core/minimap.js.map +1 -0
  275. package/dist/esm/core/plugins.js +124 -0
  276. package/dist/esm/core/plugins.js.map +1 -0
  277. package/dist/esm/core/rtl.js +95 -0
  278. package/dist/esm/core/rtl.js.map +1 -0
  279. package/dist/esm/core/shortcuts.js +200 -0
  280. package/dist/esm/core/shortcuts.js.map +1 -0
  281. package/dist/esm/core/theme.js +162 -0
  282. package/dist/esm/core/theme.js.map +1 -0
  283. package/dist/esm/font/NiceFontEditor.js +189 -0
  284. package/dist/esm/font/NiceFontEditor.js.map +1 -0
  285. package/dist/esm/game/GameAsset2dEditor.js +369 -0
  286. package/dist/esm/game/GameAsset2dEditor.js.map +1 -0
  287. package/dist/esm/game/GameAsset2dEditor.module.css.js +4 -0
  288. package/dist/esm/game/GameAsset2dEditor.module.css.js.map +1 -0
  289. package/dist/esm/game/gameAssetTypes.js +18 -0
  290. package/dist/esm/game/gameAssetTypes.js.map +1 -0
  291. package/dist/esm/game/gameAssetUtils.js +456 -0
  292. package/dist/esm/game/gameAssetUtils.js.map +1 -0
  293. package/dist/esm/game/useGameAssetEditor.js +759 -0
  294. package/dist/esm/game/useGameAssetEditor.js.map +1 -0
  295. package/dist/esm/icon/NiceIconEditor.js +246 -0
  296. package/dist/esm/icon/NiceIconEditor.js.map +1 -0
  297. package/dist/esm/index.js +59 -0
  298. package/dist/esm/index.js.map +1 -0
  299. package/dist/esm/nice2dev-ui/dist/index.js +31720 -0
  300. package/dist/esm/nice2dev-ui/dist/index.js.map +1 -0
  301. package/dist/esm/nice2dev-ui-graphics.css +1 -0
  302. package/dist/esm/photo/FilterThumb.js +27 -0
  303. package/dist/esm/photo/FilterThumb.js.map +1 -0
  304. package/dist/esm/photo/PhotoEditor.js +18 -0
  305. package/dist/esm/photo/PhotoEditor.js.map +1 -0
  306. package/dist/esm/photo/PhotoEditor.module.css.js +4 -0
  307. package/dist/esm/photo/PhotoEditor.module.css.js.map +1 -0
  308. package/dist/esm/photo/PhotoEditorCanvas.js +57 -0
  309. package/dist/esm/photo/PhotoEditorCanvas.js.map +1 -0
  310. package/dist/esm/photo/PhotoEditorLeftPanel.js +172 -0
  311. package/dist/esm/photo/PhotoEditorLeftPanel.js.map +1 -0
  312. package/dist/esm/photo/PhotoEditorToolbar.js +13 -0
  313. package/dist/esm/photo/PhotoEditorToolbar.js.map +1 -0
  314. package/dist/esm/photo/photoEditorActions.js +75 -0
  315. package/dist/esm/photo/photoEditorActions.js.map +1 -0
  316. package/dist/esm/photo/photoEditorTypes.js +36 -0
  317. package/dist/esm/photo/photoEditorTypes.js.map +1 -0
  318. package/dist/esm/photo/photoFilters.js +871 -0
  319. package/dist/esm/photo/photoFilters.js.map +1 -0
  320. package/dist/esm/photo/photoOverlays.js +636 -0
  321. package/dist/esm/photo/photoOverlays.js.map +1 -0
  322. package/dist/esm/photo/photoSelection.js +535 -0
  323. package/dist/esm/photo/photoSelection.js.map +1 -0
  324. package/dist/esm/photo/usePhotoEditor.js +638 -0
  325. package/dist/esm/photo/usePhotoEditor.js.map +1 -0
  326. package/dist/esm/pixel/HSVPicker.js +171 -0
  327. package/dist/esm/pixel/HSVPicker.js.map +1 -0
  328. package/dist/esm/pixel/PixelEditor.js +26 -0
  329. package/dist/esm/pixel/PixelEditor.js.map +1 -0
  330. package/dist/esm/pixel/PixelEditor.module.css.js +4 -0
  331. package/dist/esm/pixel/PixelEditor.module.css.js.map +1 -0
  332. package/dist/esm/pixel/PixelEditorCanvas.js +13 -0
  333. package/dist/esm/pixel/PixelEditorCanvas.js.map +1 -0
  334. package/dist/esm/pixel/PixelEditorMenuBar.js +9 -0
  335. package/dist/esm/pixel/PixelEditorMenuBar.js.map +1 -0
  336. package/dist/esm/pixel/PixelEditorRightPanel.js +13 -0
  337. package/dist/esm/pixel/PixelEditorRightPanel.js.map +1 -0
  338. package/dist/esm/pixel/PixelEditorStatusBar.js +13 -0
  339. package/dist/esm/pixel/PixelEditorStatusBar.js.map +1 -0
  340. package/dist/esm/pixel/PixelEditorTimeline.js +9 -0
  341. package/dist/esm/pixel/PixelEditorTimeline.js.map +1 -0
  342. package/dist/esm/pixel/PixelEditorToolbar.js +14 -0
  343. package/dist/esm/pixel/PixelEditorToolbar.js.map +1 -0
  344. package/dist/esm/pixel/asepriteFormat.js +505 -0
  345. package/dist/esm/pixel/asepriteFormat.js.map +1 -0
  346. package/dist/esm/pixel/pixelEditorExports.js +461 -0
  347. package/dist/esm/pixel/pixelEditorExports.js.map +1 -0
  348. package/dist/esm/pixel/pixelEditorTypes.js +90 -0
  349. package/dist/esm/pixel/pixelEditorTypes.js.map +1 -0
  350. package/dist/esm/pixel/pixelEditorUtils.js +631 -0
  351. package/dist/esm/pixel/pixelEditorUtils.js.map +1 -0
  352. package/dist/esm/pixel/usePixelEditor.js +1110 -0
  353. package/dist/esm/pixel/usePixelEditor.js.map +1 -0
  354. package/dist/esm/texture/Nice3DTexturePainter.js +233 -0
  355. package/dist/esm/texture/Nice3DTexturePainter.js.map +1 -0
  356. package/dist/esm/ui/NiceUIDesigner.js +187 -0
  357. package/dist/esm/ui/NiceUIDesigner.js.map +1 -0
  358. package/dist/esm/vector/VectorEditor.js +29 -0
  359. package/dist/esm/vector/VectorEditor.js.map +1 -0
  360. package/dist/esm/vector/VectorEditor.module.css.js +4 -0
  361. package/dist/esm/vector/VectorEditor.module.css.js.map +1 -0
  362. package/dist/esm/vector/VectorEditorMenuBar.js +14 -0
  363. package/dist/esm/vector/VectorEditorMenuBar.js.map +1 -0
  364. package/dist/esm/vector/VectorEditorRightPanel.js +124 -0
  365. package/dist/esm/vector/VectorEditorRightPanel.js.map +1 -0
  366. package/dist/esm/vector/VectorEditorShapeRenderer.js +53 -0
  367. package/dist/esm/vector/VectorEditorShapeRenderer.js.map +1 -0
  368. package/dist/esm/vector/VectorEditorStatusBar.js +12 -0
  369. package/dist/esm/vector/VectorEditorStatusBar.js.map +1 -0
  370. package/dist/esm/vector/useVectorEditor.js +611 -0
  371. package/dist/esm/vector/useVectorEditor.js.map +1 -0
  372. package/dist/esm/vector/vectorBooleanOps.js +507 -0
  373. package/dist/esm/vector/vectorBooleanOps.js.map +1 -0
  374. package/dist/esm/vector/vectorEditorExport.js +152 -0
  375. package/dist/esm/vector/vectorEditorExport.js.map +1 -0
  376. package/dist/esm/vector/vectorEditorImport.js +148 -0
  377. package/dist/esm/vector/vectorEditorImport.js.map +1 -0
  378. package/dist/esm/vector/vectorEditorTypes.js +63 -0
  379. package/dist/esm/vector/vectorEditorTypes.js.map +1 -0
  380. package/dist/esm/vector/vectorGradients.js +193 -0
  381. package/dist/esm/vector/vectorGradients.js.map +1 -0
  382. package/dist/types/__benchmarks__/bench.d.ts +13 -0
  383. package/dist/types/__tests__/setup.d.ts +4 -0
  384. package/dist/types/animation/AnimatedPerson.d.ts +14 -0
  385. package/dist/types/animation/AnimationEditor.d.ts +20 -0
  386. package/dist/types/animation/Audience.d.ts +11 -0
  387. package/dist/types/animation/BodyRenderer.d.ts +12 -0
  388. package/dist/types/animation/animationHelper.d.ts +28 -0
  389. package/dist/types/animation/characterTypes.d.ts +37 -0
  390. package/dist/types/animation/choreoDSL.d.ts +88 -0
  391. package/dist/types/animation/choreography.d.ts +8 -0
  392. package/dist/types/animation/karaokeIntegration.d.ts +31 -0
  393. package/dist/types/animation/lottieExport.d.ts +77 -0
  394. package/dist/types/animation/motionPath.d.ts +60 -0
  395. package/dist/types/animation/physics.d.ts +73 -0
  396. package/dist/types/animation/rig/RigPlayer.d.ts +32 -0
  397. package/dist/types/animation/rig/RiggedBody.d.ts +19 -0
  398. package/dist/types/animation/rig/choreoRigBridge.d.ts +9 -0
  399. package/dist/types/animation/rig/ik.d.ts +8 -0
  400. package/dist/types/animation/rig/poseOps.d.ts +14 -0
  401. package/dist/types/animation/rig/presets.d.ts +13 -0
  402. package/dist/types/animation/rig/rigMath.d.ts +7 -0
  403. package/dist/types/animation/rig/rigTypes.d.ts +38 -0
  404. package/dist/types/animation/shapes/arms.d.ts +10 -0
  405. package/dist/types/animation/shapes/eyes.d.ts +17 -0
  406. package/dist/types/animation/shapes/hair.d.ts +17 -0
  407. package/dist/types/animation/shapes/heads.d.ts +18 -0
  408. package/dist/types/animation/shapes/headwear.d.ts +16 -0
  409. package/dist/types/animation/shapes/legs.d.ts +10 -0
  410. package/dist/types/animation/shapes/mouths.d.ts +17 -0
  411. package/dist/types/animation/shapes/noses.d.ts +17 -0
  412. package/dist/types/animation/shapes/outfits.d.ts +14 -0
  413. package/dist/types/animation/shapes/torsos.d.ts +9 -0
  414. package/dist/types/animation/spineExport.d.ts +66 -0
  415. package/dist/types/core/LocalUI.d.ts +21 -0
  416. package/dist/types/core/collaboration.d.ts +164 -0
  417. package/dist/types/core/colorBlindness.d.ts +24 -0
  418. package/dist/types/core/dragDrop.d.ts +46 -0
  419. package/dist/types/core/fixes.d.ts +80 -0
  420. package/dist/types/core/gridGuides.d.ts +70 -0
  421. package/dist/types/core/historyVisual.d.ts +915 -0
  422. package/dist/types/core/i18n.d.ts +27 -0
  423. package/dist/types/core/integrations.d.ts +103 -0
  424. package/dist/types/core/minimap.d.ts +49 -0
  425. package/dist/types/core/plugins.d.ts +111 -0
  426. package/dist/types/core/rtl.d.ts +32 -0
  427. package/dist/types/core/shortcuts.d.ts +150 -0
  428. package/dist/types/core/theme.d.ts +78 -0
  429. package/dist/types/core/useGamepad.d.ts +64 -0
  430. package/dist/types/core/usePointerPressure.d.ts +88 -0
  431. package/dist/types/font/NiceFontEditor.d.ts +62 -0
  432. package/dist/types/game/AnimationPreviewPlayer.d.ts +29 -0
  433. package/dist/types/game/CollisionEditor.d.ts +101 -0
  434. package/dist/types/game/GameAsset2dEditor.d.ts +17 -0
  435. package/dist/types/game/GameAssetExportPanel.d.ts +20 -0
  436. package/dist/types/game/IsometricEditor.d.ts +22 -0
  437. package/dist/types/game/IsometricTilePanel.d.ts +18 -0
  438. package/dist/types/game/gameAssetExport.d.ts +160 -0
  439. package/dist/types/game/gameAssetTypes.d.ts +238 -0
  440. package/dist/types/game/gameAssetUtils.d.ts +23 -0
  441. package/dist/types/game/index.d.ts +8 -0
  442. package/dist/types/game/isometricTiles.d.ts +250 -0
  443. package/dist/types/game/useAnimationPreview.d.ts +63 -0
  444. package/dist/types/game/useCollisionEditor.d.ts +96 -0
  445. package/dist/types/game/useGameAssetEditor.d.ts +79 -0
  446. package/dist/types/game/useGameAssetExport.d.ts +82 -0
  447. package/dist/types/icon/NiceIconEditor.d.ts +79 -0
  448. package/dist/types/index.d.ts +85 -0
  449. package/dist/types/photo/BatchProcessingPanel.d.ts +13 -0
  450. package/dist/types/photo/FaceDetectionPanel.d.ts +18 -0
  451. package/dist/types/photo/FilterThumb.d.ts +14 -0
  452. package/dist/types/photo/PerspectiveCorrectionPanel.d.ts +17 -0
  453. package/dist/types/photo/PhotoEditor.d.ts +2 -0
  454. package/dist/types/photo/PhotoEditorCanvas.d.ts +14 -0
  455. package/dist/types/photo/PhotoEditorLeftPanel.d.ts +13 -0
  456. package/dist/types/photo/PhotoEditorToolbar.d.ts +13 -0
  457. package/dist/types/photo/RawFilePanel.d.ts +14 -0
  458. package/dist/types/photo/StyleTransferPanel.d.ts +15 -0
  459. package/dist/types/photo/aiStyleTransfer.d.ts +58 -0
  460. package/dist/types/photo/batchProcessing.d.ts +95 -0
  461. package/dist/types/photo/faceDetection.d.ts +103 -0
  462. package/dist/types/photo/index.d.ts +17 -0
  463. package/dist/types/photo/perspectiveCorrection.d.ts +134 -0
  464. package/dist/types/photo/photoEditorActions.d.ts +40 -0
  465. package/dist/types/photo/photoEditorTypes.d.ts +34 -0
  466. package/dist/types/photo/photoFilters.d.ts +55 -0
  467. package/dist/types/photo/photoOverlays.d.ts +126 -0
  468. package/dist/types/photo/photoSelection.d.ts +56 -0
  469. package/dist/types/photo/rawFileSupport.d.ts +124 -0
  470. package/dist/types/photo/usePhotoEditor.d.ts +123 -0
  471. package/dist/types/pixel/HSVPicker.d.ts +11 -0
  472. package/dist/types/pixel/PaletteExtractorPanel.d.ts +16 -0
  473. package/dist/types/pixel/PixelEditor.d.ts +17 -0
  474. package/dist/types/pixel/PixelEditorCanvas.d.ts +10 -0
  475. package/dist/types/pixel/PixelEditorMenuBar.d.ts +11 -0
  476. package/dist/types/pixel/PixelEditorRightPanel.d.ts +11 -0
  477. package/dist/types/pixel/PixelEditorStatusBar.d.ts +11 -0
  478. package/dist/types/pixel/PixelEditorTimeline.d.ts +11 -0
  479. package/dist/types/pixel/PixelEditorToolbar.d.ts +11 -0
  480. package/dist/types/pixel/TileMapPanel.d.ts +14 -0
  481. package/dist/types/pixel/asepriteFormat.d.ts +62 -0
  482. package/dist/types/pixel/paletteExtractor.d.ts +73 -0
  483. package/dist/types/pixel/pixelEditorExports.d.ts +31 -0
  484. package/dist/types/pixel/pixelEditorTypes.d.ts +51 -0
  485. package/dist/types/pixel/pixelEditorUtils.d.ts +136 -0
  486. package/dist/types/pixel/tileMapMode.d.ts +122 -0
  487. package/dist/types/pixel/usePixelEditor.d.ts +114 -0
  488. package/dist/types/texture/Nice3DTexturePainter.d.ts +55 -0
  489. package/dist/types/ui/NiceUIDesigner.d.ts +43 -0
  490. package/dist/types/vector/PathSimplificationPanel.d.ts +15 -0
  491. package/dist/types/vector/PdfExportPanel.d.ts +20 -0
  492. package/dist/types/vector/TextOnPathPanel.d.ts +26 -0
  493. package/dist/types/vector/VectorEditor.d.ts +32 -0
  494. package/dist/types/vector/VectorEditorMenuBar.d.ts +8 -0
  495. package/dist/types/vector/VectorEditorRightPanel.d.ts +7 -0
  496. package/dist/types/vector/VectorEditorShapeRenderer.d.ts +9 -0
  497. package/dist/types/vector/VectorEditorStatusBar.d.ts +9 -0
  498. package/dist/types/vector/VectorFilterPanel.d.ts +19 -0
  499. package/dist/types/vector/VectorPatternPanel.d.ts +21 -0
  500. package/dist/types/vector/pathSimplification.d.ts +135 -0
  501. package/dist/types/vector/pdfExport.d.ts +65 -0
  502. package/dist/types/vector/textOnPath.d.ts +145 -0
  503. package/dist/types/vector/useVectorEditor.d.ts +90 -0
  504. package/dist/types/vector/vectorBooleanOps.d.ts +22 -0
  505. package/dist/types/vector/vectorEditorExport.d.ts +8 -0
  506. package/dist/types/vector/vectorEditorImport.d.ts +7 -0
  507. package/dist/types/vector/vectorEditorTypes.d.ts +47 -0
  508. package/dist/types/vector/vectorGradients.d.ts +64 -0
  509. package/dist/types/vector/vectorPatternFills.d.ts +101 -0
  510. package/dist/types/vector/vectorSvgFilters.d.ts +134 -0
  511. package/package.json +93 -0
@@ -0,0 +1,136 @@
1
+ /**
2
+ * pixelEditorUtils.ts — Drawing algorithms for the pixel editor.
3
+ * Bresenham line, midpoint ellipse, flood fill, selection, brush shapes,
4
+ * pressure-aware blending, dithering, gradient, symmetry etc.
5
+ */
6
+ export type RGBA = [number, number, number, number];
7
+ export type BrushShape = 'square' | 'circle' | 'diamond' | 'spray';
8
+ export type SymmetryMode = 'none' | 'h' | 'v' | 'both' | 'radial4';
9
+ export interface BrushConfig {
10
+ size: number;
11
+ shape: BrushShape;
12
+ opacity: number;
13
+ flow: number;
14
+ spacing: number;
15
+ pressureSize: boolean;
16
+ pressureOpacity: boolean;
17
+ hardness: number;
18
+ }
19
+ export declare const DEFAULT_BRUSH: BrushConfig;
20
+ /** Read a pixel from ImageData at (x,y). Returns [r,g,b,a]. */
21
+ export declare function getPixel(data: ImageData, x: number, y: number): RGBA;
22
+ /** Set a pixel in ImageData at (x,y). */
23
+ export declare function setPixel(data: ImageData, x: number, y: number, color: RGBA): void;
24
+ /** Blend a pixel onto ImageData at (x,y) with alpha compositing. */
25
+ export declare function blendPixel(data: ImageData, x: number, y: number, color: RGBA, strength?: number): void;
26
+ /** Generate brush mask: returns array of {dx, dy, strength} offsets. */
27
+ export declare function getBrushMask(cfg: BrushConfig, pressure?: number): {
28
+ dx: number;
29
+ dy: number;
30
+ strength: number;
31
+ }[];
32
+ /** Apply brush stamp at (x,y) with all brush settings. */
33
+ export declare function applyBrushStamp(data: ImageData, x: number, y: number, color: RGBA, cfg: BrushConfig, pressure?: number, erase?: boolean): void;
34
+ /** Get symmetry points for a coordinate. */
35
+ export declare function getSymmetryPoints(x: number, y: number, w: number, h: number, mode: SymmetryMode): {
36
+ x: number;
37
+ y: number;
38
+ }[];
39
+ /** Draw a linear gradient between two points on ImageData. */
40
+ export declare function drawGradient(data: ImageData, x0: number, y0: number, x1: number, y1: number, color1: RGBA, color2: RGBA, sel?: {
41
+ x: number;
42
+ y: number;
43
+ w: number;
44
+ h: number;
45
+ } | null): void;
46
+ /** Apply dithered brush stamp. */
47
+ export declare function applyDitherStamp(data: ImageData, x: number, y: number, color: RGBA, size: number, pressure?: number): void;
48
+ /** Copy pixels from a selection region. */
49
+ export declare function copySelection(data: ImageData, sel: {
50
+ x: number;
51
+ y: number;
52
+ w: number;
53
+ h: number;
54
+ }): ImageData;
55
+ /** Paste ImageData at position. */
56
+ export declare function pasteAt(dst: ImageData, src: ImageData, ox: number, oy: number): void;
57
+ /** Clear pixels in selection region. */
58
+ export declare function clearSelection(data: ImageData, sel: {
59
+ x: number;
60
+ y: number;
61
+ w: number;
62
+ h: number;
63
+ }): void;
64
+ /** HSV to RGB conversion. h: 0-360, s: 0-1, v: 0-1. Returns [r,g,b] 0-255. */
65
+ export declare function hsvToRgb(h: number, s: number, v: number): [number, number, number];
66
+ /** RGB to HSV conversion. r,g,b: 0-255. Returns [h: 0-360, s: 0-1, v: 0-1]. */
67
+ export declare function rgbToHsv(r: number, g: number, b: number): [number, number, number];
68
+ /** Bresenham line — calls callback for each pixel along the line. */
69
+ export declare function bresenhamLine(x0: number, y0: number, x1: number, y1: number, cb: (x: number, y: number) => void): void;
70
+ /** Draw a filled rectangle. */
71
+ export declare function fillRect(data: ImageData, x0: number, y0: number, x1: number, y1: number, color: RGBA): void;
72
+ /** Draw rectangle outline. */
73
+ export declare function strokeRect(data: ImageData, x0: number, y0: number, x1: number, y1: number, color: RGBA): void;
74
+ /** Midpoint ellipse algorithm — filled. */
75
+ export declare function fillEllipse(data: ImageData, cx: number, cy: number, rx: number, ry: number, color: RGBA): void;
76
+ /** Midpoint ellipse — outline only. */
77
+ export declare function strokeEllipse(data: ImageData, cx: number, cy: number, rx: number, ry: number, color: RGBA): void;
78
+ /** Flood fill — fills connected region of same color with new color. */
79
+ export declare function floodFill(data: ImageData, startX: number, startY: number, fillColor: RGBA): void;
80
+ /** Check if two RGBA colors are equal (with small tolerance for alpha). */
81
+ export declare function colorsEqual(a: RGBA, b: RGBA, tolerance?: number): boolean;
82
+ /** Parse hex color string to RGBA. */
83
+ export declare function hexToRGBA(hex: string, alpha?: number): RGBA;
84
+ /** Convert RGBA to hex string. */
85
+ export declare function rgbaToHex(c: RGBA): string;
86
+ /** Draw checkerboard pattern (for transparency indication). */
87
+ export declare function drawCheckerboard(ctx: CanvasRenderingContext2D, width: number, height: number, cellSize: number, color1?: string, color2?: string): void;
88
+ /** Generate spritesheet from frames (horizontal strip). */
89
+ export declare function generateSpritesheet(frames: ImageData[], cols?: number): {
90
+ canvas: HTMLCanvasElement;
91
+ frameWidth: number;
92
+ frameHeight: number;
93
+ cols: number;
94
+ rows: number;
95
+ } | null;
96
+ /** Create blank ImageData. */
97
+ export declare function createBlankImageData(width: number, height: number): ImageData;
98
+ /** Clone ImageData. */
99
+ export declare function cloneImageData(src: ImageData): ImageData;
100
+ /** Composite two ImageData layers (src over dst), respecting opacity. */
101
+ export declare function compositeOver(dst: ImageData, src: ImageData, srcOpacity?: number, offsetX?: number, offsetY?: number): void;
102
+ /** Flip ImageData horizontally. */
103
+ export declare function flipH(src: ImageData): ImageData;
104
+ /** Flip ImageData vertically. */
105
+ export declare function flipV(src: ImageData): ImageData;
106
+ /** Rotate ImageData 90° clockwise. Returns new ImageData with swapped dimensions. */
107
+ export declare function rotateCW(src: ImageData): ImageData;
108
+ export type DitheringAlgorithm = 'none' | 'ordered-2x2' | 'ordered-4x4' | 'ordered-8x8' | 'floyd-steinberg' | 'jarvis-judice-ninke' | 'stucki' | 'atkinson' | 'burkes' | 'sierra' | 'sierra-lite' | 'random';
109
+ /** Apply ordered dithering with Bayer matrix */
110
+ export declare function ditherOrdered(data: ImageData, palette: RGBA[], matrix?: number[][], strength?: number): ImageData;
111
+ /** Floyd-Steinberg error diffusion dithering */
112
+ export declare function ditherFloydSteinberg(data: ImageData, palette: RGBA[]): ImageData;
113
+ /** Jarvis-Judice-Ninke dithering (larger error diffusion kernel) */
114
+ export declare function ditherJarvisJudiceNinke(data: ImageData, palette: RGBA[]): ImageData;
115
+ /** Atkinson dithering (preserves details better) */
116
+ export declare function ditherAtkinson(data: ImageData, palette: RGBA[]): ImageData;
117
+ /** Random dithering */
118
+ export declare function ditherRandom(data: ImageData, palette: RGBA[], strength?: number): ImageData;
119
+ /** Apply dithering with specified algorithm */
120
+ export declare function applyDithering(data: ImageData, palette: RGBA[], algorithm: DitheringAlgorithm): ImageData;
121
+ /** Generate palette from image using median cut algorithm */
122
+ export declare function extractPalette(data: ImageData, maxColors: number): RGBA[];
123
+ /** Convert hex palette to RGBA array */
124
+ export declare function hexPaletteToRGBA(hexColors: string[]): RGBA[];
125
+ export interface ReferenceOverlay {
126
+ image: ImageData;
127
+ x: number;
128
+ y: number;
129
+ opacity: number;
130
+ scale: number;
131
+ locked: boolean;
132
+ }
133
+ /** Create reference overlay from file */
134
+ export declare function createReferenceOverlay(file: File, targetWidth: number, targetHeight: number): Promise<ReferenceOverlay>;
135
+ /** Render reference overlay onto canvas */
136
+ export declare function renderReferenceOverlay(ctx: CanvasRenderingContext2D, ref: ReferenceOverlay, zoom: number, panX: number, panY: number): void;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * tileMapMode — Tile map editing mode for PixelEditor
3
+ *
4
+ * Features:
5
+ * - Repeat pattern (tile seamless preview)
6
+ * - Mirror modes (horizontal, vertical, both)
7
+ * - Tile grid overlay
8
+ * - Tile offset/wrapping
9
+ * - Seamless tile generation
10
+ * - Auto-tile detection
11
+ */
12
+ export type TileMirrorMode = 'none' | 'horizontal' | 'vertical' | 'both';
13
+ export type TileRepeatPattern = 'none' | 'repeat' | 'repeat-x' | 'repeat-y' | 'mirror-repeat' | 'brick' | 'hexagonal';
14
+ export interface TileMapSettings {
15
+ /** Whether tile map mode is enabled */
16
+ enabled: boolean;
17
+ /** Mirror mode for editing */
18
+ mirrorMode: TileMirrorMode;
19
+ /** Repeat pattern for preview */
20
+ repeatPattern: TileRepeatPattern;
21
+ /** Number of tiles to show in preview (width) */
22
+ repeatCountX: number;
23
+ /** Number of tiles to show in preview (height) */
24
+ repeatCountY: number;
25
+ /** Brick offset (0-1, only for brick pattern) */
26
+ brickOffset: number;
27
+ /** Show tile grid */
28
+ showGrid: boolean;
29
+ /** Grid color */
30
+ gridColor: string;
31
+ /** Grid opacity (0-1) */
32
+ gridOpacity: number;
33
+ /** Wrap editing across tile boundaries */
34
+ wrapEditing: boolean;
35
+ /** Show seam warning markers */
36
+ showSeamWarnings: boolean;
37
+ }
38
+ export interface TileMapState {
39
+ settings: TileMapSettings;
40
+ /** Offset for scrolling the tile preview */
41
+ previewOffsetX: number;
42
+ previewOffsetY: number;
43
+ /** Zoom level for tile preview */
44
+ previewZoom: number;
45
+ }
46
+ export declare const DEFAULT_TILE_MAP_SETTINGS: TileMapSettings;
47
+ /**
48
+ * Apply mirror transformation to coordinates
49
+ */
50
+ export declare function applyMirror(x: number, y: number, width: number, height: number, mode: TileMirrorMode): {
51
+ x: number;
52
+ y: number;
53
+ }[];
54
+ /**
55
+ * Wrap coordinates to tile boundaries
56
+ */
57
+ export declare function wrapCoordinates(x: number, y: number, width: number, height: number): {
58
+ x: number;
59
+ y: number;
60
+ };
61
+ /**
62
+ * Get all affected coordinates for a draw operation
63
+ */
64
+ export declare function getAffectedCoordinates(x: number, y: number, width: number, height: number, settings: TileMapSettings): {
65
+ x: number;
66
+ y: number;
67
+ }[];
68
+ /**
69
+ * Render tile pattern to a canvas for preview
70
+ */
71
+ export declare function renderTilePattern(source: HTMLCanvasElement | ImageData, settings: TileMapSettings, targetWidth: number, targetHeight: number): HTMLCanvasElement;
72
+ /**
73
+ * Analyze tile for seam issues (discontinuities at edges)
74
+ */
75
+ export declare function analyzeSeams(imageData: ImageData, threshold?: number): {
76
+ top: number[];
77
+ right: number[];
78
+ bottom: number[];
79
+ left: number[];
80
+ score: number;
81
+ };
82
+ /**
83
+ * Make tile seamless using offset blend technique
84
+ */
85
+ export declare function makeSeamless(imageData: ImageData, blendWidth?: number): ImageData;
86
+ export interface UseTileMapModeOptions {
87
+ /** Initial settings */
88
+ initialSettings?: Partial<TileMapSettings>;
89
+ /** Tile width */
90
+ tileWidth: number;
91
+ /** Tile height */
92
+ tileHeight: number;
93
+ /** Called when settings change */
94
+ onSettingsChange?: (settings: TileMapSettings) => void;
95
+ }
96
+ export interface UseTileMapModeReturn {
97
+ /** Current settings */
98
+ settings: TileMapSettings;
99
+ /** Update settings */
100
+ updateSettings: (partial: Partial<TileMapSettings>) => void;
101
+ /** Toggle tile map mode */
102
+ toggle: () => void;
103
+ /** Set mirror mode */
104
+ setMirrorMode: (mode: TileMirrorMode) => void;
105
+ /** Set repeat pattern */
106
+ setRepeatPattern: (pattern: TileRepeatPattern) => void;
107
+ /** Get affected coordinates for a draw operation */
108
+ getDrawCoordinates: (x: number, y: number) => {
109
+ x: number;
110
+ y: number;
111
+ }[];
112
+ /** Render tile preview */
113
+ renderPreview: (source: HTMLCanvasElement | ImageData, width: number, height: number) => HTMLCanvasElement;
114
+ /** Analyze seams */
115
+ analyzeSeams: (imageData: ImageData) => ReturnType<typeof analyzeSeams>;
116
+ /** Make tile seamless */
117
+ makeSeamless: (imageData: ImageData) => ImageData;
118
+ /** Reset to defaults */
119
+ reset: () => void;
120
+ }
121
+ export declare function useTileMapMode(options: UseTileMapModeOptions): UseTileMapModeReturn;
122
+ export default useTileMapMode;
@@ -0,0 +1,114 @@
1
+ /**
2
+ * usePixelEditor — custom hook encapsulating ALL state, refs, callbacks,
3
+ * side-effects and memos for the PixelEditor component.
4
+ */
5
+ import { type BrushConfig, type SymmetryMode } from "./pixelEditorUtils";
6
+ import { type Tool, type Layer, type BlendMode, type Selection } from "./pixelEditorTypes";
7
+ export interface UsePixelEditorProps {
8
+ initialWidth?: number;
9
+ initialHeight?: number;
10
+ onSaveToLibrary?: (dataUrl: string, name: string, mimeType: string) => void;
11
+ }
12
+ export interface PixelEditorAPI {
13
+ dw: number;
14
+ dh: number;
15
+ layers: Layer[];
16
+ aLi: number;
17
+ setALi: React.Dispatch<React.SetStateAction<number>>;
18
+ fc: number;
19
+ afi: number;
20
+ setAfi: React.Dispatch<React.SetStateAction<number>>;
21
+ fDur: number[];
22
+ tool: Tool;
23
+ setTool: React.Dispatch<React.SetStateAction<Tool>>;
24
+ col1: string;
25
+ setCol1: React.Dispatch<React.SetStateAction<string>>;
26
+ col2: string;
27
+ setCol2: React.Dispatch<React.SetStateAction<string>>;
28
+ brush: BrushConfig;
29
+ setBrush: React.Dispatch<React.SetStateAction<BrushConfig>>;
30
+ zoom: number;
31
+ setZoom: React.Dispatch<React.SetStateAction<number>>;
32
+ grid: boolean;
33
+ setGrid: React.Dispatch<React.SetStateAction<boolean>>;
34
+ onion: boolean;
35
+ setOnion: React.Dispatch<React.SetStateAction<boolean>>;
36
+ fps: number;
37
+ setFps: React.Dispatch<React.SetStateAction<number>>;
38
+ playing: boolean;
39
+ setPlaying: React.Dispatch<React.SetStateAction<boolean>>;
40
+ pal: string[];
41
+ setPal: React.Dispatch<React.SetStateAction<string[]>>;
42
+ cursor: {
43
+ x: number;
44
+ y: number;
45
+ } | null;
46
+ setCursor: React.Dispatch<React.SetStateAction<{
47
+ x: number;
48
+ y: number;
49
+ } | null>>;
50
+ dlgNew: boolean;
51
+ setDlgNew: React.Dispatch<React.SetStateAction<boolean>>;
52
+ nw: number;
53
+ setNw: React.Dispatch<React.SetStateAction<number>>;
54
+ nh: number;
55
+ setNh: React.Dispatch<React.SetStateAction<number>>;
56
+ sel: Selection | null;
57
+ setSel: React.Dispatch<React.SetStateAction<Selection | null>>;
58
+ symmetry: SymmetryMode;
59
+ setSymmetry: React.Dispatch<React.SetStateAction<SymmetryMode>>;
60
+ shapeFilled: boolean;
61
+ setShapeFilled: React.Dispatch<React.SetStateAction<boolean>>;
62
+ pressure: number;
63
+ showHSV: boolean;
64
+ setShowHSV: React.Dispatch<React.SetStateAction<boolean>>;
65
+ editingLayerName: string | null;
66
+ setEditingLayerName: React.Dispatch<React.SetStateAction<string | null>>;
67
+ cvRef: React.RefObject<HTMLCanvasElement>;
68
+ boxRef: React.RefObject<HTMLDivElement>;
69
+ fInp: React.RefObject<HTMLInputElement>;
70
+ clipboard: React.MutableRefObject<ImageData | null>;
71
+ drawing: React.MutableRefObject<boolean>;
72
+ panning: React.MutableRefObject<boolean>;
73
+ undo: () => void;
74
+ redo: () => void;
75
+ openFile: (file: File) => Promise<void>;
76
+ exportAse: () => Promise<void>;
77
+ exportPNG: () => void;
78
+ exportJPG: () => void;
79
+ exportWebP: () => void;
80
+ exportBMP: () => void;
81
+ exportSVG: () => void;
82
+ exportSheet: () => void;
83
+ saveToLibrary: () => void;
84
+ addLayer: () => void;
85
+ rmLayer: () => void;
86
+ toggleVis: (i: number) => void;
87
+ toggleLock: (i: number) => void;
88
+ setLayerOpacity: (i: number, op: number) => void;
89
+ setLayerBlendMode: (i: number, mode: BlendMode) => void;
90
+ renameLayer: (i: number, name: string) => void;
91
+ moveLayerUp: () => void;
92
+ moveLayerDown: () => void;
93
+ mergeDown: () => void;
94
+ dupLayer: () => void;
95
+ addFrame: () => void;
96
+ dupFrame: () => void;
97
+ rmFrame: () => void;
98
+ flipCv: (dir: "h" | "v") => void;
99
+ rotateCv: () => void;
100
+ clearCv: () => void;
101
+ newDoc: (w: number, h: number) => void;
102
+ doCopy: () => void;
103
+ doCut: () => void;
104
+ doPaste: () => void;
105
+ doDeleteSel: () => void;
106
+ doSelectAll: () => void;
107
+ doDeselectAll: () => void;
108
+ onDown: (e: React.PointerEvent<HTMLCanvasElement>) => void;
109
+ onMove: (e: React.PointerEvent<HTMLCanvasElement>) => void;
110
+ onUp: (e: React.PointerEvent<HTMLCanvasElement>) => void;
111
+ onWheel: (e: React.WheelEvent) => void;
112
+ thumbs: string[];
113
+ }
114
+ export declare function usePixelEditor({ initialWidth, initialHeight, onSaveToLibrary, }: UsePixelEditorProps): PixelEditorAPI;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Nice3DTexturePainter.tsx — Paint textures directly on 3D models.
3
+ *
4
+ * Features:
5
+ * - WebGL-based 3D model viewer
6
+ * - UV unwrap visualization
7
+ * - Brush painting on UV texture
8
+ * - Texture baking and export (PNG, JPEG, WebP)
9
+ * - Layer support for non-destructive painting
10
+ * - Color picker and brush settings
11
+ */
12
+ import React from "react";
13
+ export interface TexturePainterProps {
14
+ /** Initial texture image URL. */
15
+ textureUrl?: string;
16
+ /** Texture width. Default: 1024. */
17
+ textureWidth?: number;
18
+ /** Texture height. Default: 1024. */
19
+ textureHeight?: number;
20
+ /** Called when texture is saved. */
21
+ onSave?: (blob: Blob) => void;
22
+ /** CSS class. */
23
+ className?: string;
24
+ }
25
+ export interface TexturePainterApi {
26
+ brush: BrushSettings;
27
+ setBrush: React.Dispatch<React.SetStateAction<BrushSettings>>;
28
+ layers: TextureLayer[];
29
+ addLayer: (name: string) => void;
30
+ removeLayer: (id: string) => void;
31
+ activeLayerId: string | null;
32
+ setActiveLayerId: React.Dispatch<React.SetStateAction<string | null>>;
33
+ tool: "brush" | "eraser" | "eyedropper" | "fill";
34
+ setTool: React.Dispatch<React.SetStateAction<"brush" | "eraser" | "eyedropper" | "fill">>;
35
+ paintStroke: (x: number, y: number) => void;
36
+ flattenToBlob: () => Promise<Blob | null>;
37
+ }
38
+ export interface BrushSettings {
39
+ size: number;
40
+ opacity: number;
41
+ hardness: number;
42
+ color: string;
43
+ blendMode: "normal" | "multiply" | "screen" | "overlay";
44
+ }
45
+ export interface TextureLayer {
46
+ id: string;
47
+ name: string;
48
+ visible: boolean;
49
+ opacity: number;
50
+ canvas: HTMLCanvasElement;
51
+ }
52
+ export declare function useTexturePainter(width: number, height: number): TexturePainterApi;
53
+ /** 3D texture painting tool with UV-space brush painting. */
54
+ export declare const Nice3DTexturePainter: React.FC<TexturePainterProps>;
55
+ export default Nice3DTexturePainter;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * NiceUIDesigner.tsx — Drag & drop UI builder that generates React code.
3
+ *
4
+ * Features:
5
+ * - Visual drag & drop layout builder
6
+ * - Component palette (buttons, inputs, text, containers)
7
+ * - Property editor panel
8
+ * - Responsive breakpoint preview
9
+ * - Export to React/TSX code
10
+ * - Undo/redo support
11
+ */
12
+ import React from "react";
13
+ export interface UIDesignerProps {
14
+ /** Called when the design changes. */
15
+ onChange?: (tree: UINode[]) => void;
16
+ /** Called on code export. */
17
+ onExport?: (code: string) => void;
18
+ /** CSS class. */
19
+ className?: string;
20
+ }
21
+ export interface UIDesignerApi {
22
+ tree: UINode[];
23
+ setTree: React.Dispatch<React.SetStateAction<UINode[]>>;
24
+ selectedId: string | null;
25
+ setSelectedId: React.Dispatch<React.SetStateAction<string | null>>;
26
+ addNode: (type: UIComponentType, parentId?: string) => void;
27
+ removeNode: (id: string) => void;
28
+ updateNode: (id: string, updates: Partial<Pick<UINode, "props" | "style">>) => void;
29
+ exportCode: () => string;
30
+ }
31
+ export interface UINode {
32
+ id: string;
33
+ type: UIComponentType;
34
+ props: Record<string, unknown>;
35
+ children: UINode[];
36
+ style: React.CSSProperties;
37
+ }
38
+ export type UIComponentType = "Container" | "Row" | "Column" | "Text" | "Heading" | "Button" | "TextInput" | "Image" | "Spacer" | "Divider" | "Card" | "List";
39
+ export declare function exportToReact(tree: UINode[], componentName?: string): string;
40
+ export declare function useUIDesigner(): UIDesignerApi;
41
+ /** Visual drag & drop UI builder that generates React code. */
42
+ export declare const NiceUIDesigner: React.FC<UIDesignerProps>;
43
+ export default NiceUIDesigner;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * PathSimplificationPanel — UI for path simplification and smoothing
3
+ */
4
+ import type { Point } from './pathSimplification';
5
+ export interface PathSimplificationPanelProps {
6
+ /** Points array from selected shape */
7
+ points: Point[];
8
+ /** Called when points are modified */
9
+ onApply: (points: Point[]) => void;
10
+ /** Whether the path is closed (polygon) */
11
+ isClosed?: boolean;
12
+ className?: string;
13
+ }
14
+ export declare function PathSimplificationPanel({ points, onApply, isClosed, className, }: PathSimplificationPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ export default PathSimplificationPanel;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * PdfExportPanel
3
+ * UI for exporting vector graphics to PDF
4
+ */
5
+ import React from 'react';
6
+ import type { PdfExportResult } from './pdfExport';
7
+ export interface PdfExportPanelProps {
8
+ /** SVG element or string to export */
9
+ svg: SVGElement | string | null;
10
+ /** Called when export starts */
11
+ onExportStart?: () => void;
12
+ /** Called when export completes */
13
+ onExportComplete?: (result: PdfExportResult) => void;
14
+ /** Called on export error */
15
+ onExportError?: (error: Error) => void;
16
+ /** Custom class name */
17
+ className?: string;
18
+ }
19
+ export declare const PdfExportPanel: React.FC<PdfExportPanelProps>;
20
+ export default PdfExportPanel;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * TextOnPathPanel
3
+ * UI for editing text along a path
4
+ */
5
+ import React from 'react';
6
+ import type { TextOnPathOptions } from './textOnPath';
7
+ export interface TextOnPathPanelProps {
8
+ /** Initial text */
9
+ initialText?: string;
10
+ /** Initial path data */
11
+ initialPath?: string;
12
+ /** Called when result changes */
13
+ onChange?: (result: {
14
+ svg: string;
15
+ options: TextOnPathOptions;
16
+ }) => void;
17
+ /** Custom class name */
18
+ className?: string;
19
+ /** Preview size */
20
+ previewSize?: {
21
+ width: number;
22
+ height: number;
23
+ };
24
+ }
25
+ export declare const TextOnPathPanel: React.FC<TextOnPathPanelProps>;
26
+ export default TextOnPathPanel;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * VectorEditor — SVG-based vector drawing editor.
3
+ *
4
+ * Refactored: logic extracted to useVectorEditor hook,
5
+ * UI split into VectorEditorMenuBar, VectorEditorRightPanel, VectorEditorStatusBar.
6
+ *
7
+ * Features:
8
+ * - Tools: pointer/select, rectangle, rounded rect, ellipse, line, arrow,
9
+ * polygon, star, pen (polyline), text
10
+ * - Fill & stroke colour + stroke-width editing per shape
11
+ * - Opacity per shape, rotation per shape
12
+ * - Shape list with selection, delete, reorder (bring to front / send to back)
13
+ * - Copy / Paste / Duplicate
14
+ * - Flip horizontal / vertical
15
+ * - Alignment: left, center, right, top, middle, bottom
16
+ * - Snap to grid toggle
17
+ * - Multi-format export: SVG, PNG, JPG, WebP, BMP
18
+ * - SVG import (paste or file)
19
+ * - Undo / Redo
20
+ * - Zoom & pan (wheel + middle-click)
21
+ * - Keyboard shortcuts: Delete, Ctrl+Z, Ctrl+Y, Ctrl+C, Ctrl+V, Ctrl+D,
22
+ * V, R, U, C, L, A, G, S, P, T
23
+ */
24
+ import React from "react";
25
+ export interface VectorEditorProps {
26
+ width?: number;
27
+ height?: number;
28
+ className?: string;
29
+ onSaveToLibrary?: (dataUrl: string, name: string, mimeType: string) => void;
30
+ }
31
+ export declare const VectorEditor: React.FC<VectorEditorProps>;
32
+ export default VectorEditor;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { VectorEditorAPI } from "./useVectorEditor";
3
+ interface Props {
4
+ api: VectorEditorAPI;
5
+ hasOnSaveToLibrary?: boolean;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<Props>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { VectorEditorAPI } from "./useVectorEditor";
3
+ interface Props {
4
+ api: VectorEditorAPI;
5
+ }
6
+ declare const _default: React.NamedExoticComponent<Props>;
7
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { VShape } from "./vectorEditorTypes";
3
+ interface ShapeRendererProps {
4
+ shape: VShape;
5
+ selected: boolean;
6
+ zoom: number;
7
+ }
8
+ export declare const ShapeRenderer: React.FC<ShapeRendererProps>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { VectorEditorAPI } from "./useVectorEditor";
3
+ interface Props {
4
+ api: VectorEditorAPI;
5
+ artW: number;
6
+ artH: number;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<Props>;
9
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * VectorFilterPanel — UI for editing SVG filters on shapes
3
+ *
4
+ * Features:
5
+ * - Add/remove filters
6
+ * - Filter presets
7
+ * - Individual filter property editing
8
+ * - Drag to reorder filters
9
+ * - Enable/disable individual filters
10
+ */
11
+ import type { VShape } from './vectorEditorTypes';
12
+ import { type SvgFilter } from './vectorSvgFilters';
13
+ export interface VectorFilterPanelProps {
14
+ shape: VShape | null;
15
+ onFiltersChange: (shapeId: string, filters: SvgFilter[]) => void;
16
+ className?: string;
17
+ }
18
+ export declare function VectorFilterPanel({ shape, onFiltersChange, className, }: VectorFilterPanelProps): import("react/jsx-runtime").JSX.Element;
19
+ export default VectorFilterPanel;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * VectorPatternPanel — UI for pattern fill editing
3
+ */
4
+ import type { PatternFill } from './vectorPatternFills';
5
+ export interface VectorPatternPanelProps {
6
+ /** Currently selected pattern */
7
+ pattern: PatternFill | null;
8
+ /** Called when pattern changes */
9
+ onChange: (pattern: PatternFill | null) => void;
10
+ /** Whether pattern fill is enabled */
11
+ enabled: boolean;
12
+ /** Called when enabled state changes */
13
+ onEnabledChange: (enabled: boolean) => void;
14
+ /** Saved patterns library */
15
+ savedPatterns?: PatternFill[];
16
+ /** Called when pattern is saved to library */
17
+ onSavePattern?: (pattern: PatternFill) => void;
18
+ className?: string;
19
+ }
20
+ export declare function VectorPatternPanel({ pattern, onChange, enabled, onEnabledChange, savedPatterns, onSavePattern, className, }: VectorPatternPanelProps): import("react/jsx-runtime").JSX.Element;
21
+ export default VectorPatternPanel;