@nice2dev/ui-graphics 1.1.0 → 1.1.1

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 (391) hide show
  1. package/dist/cjs/animation/AnimatedPerson.js +69 -63
  2. package/dist/cjs/animation/AnimatedPerson.js.map +1 -1
  3. package/dist/cjs/animation/AnimationEditor.js +27 -20
  4. package/dist/cjs/animation/AnimationEditor.js.map +1 -1
  5. package/dist/cjs/animation/Audience.js +17 -11
  6. package/dist/cjs/animation/Audience.js.map +1 -1
  7. package/dist/cjs/animation/BodyRenderer.js +7 -7
  8. package/dist/cjs/animation/BodyRenderer.js.map +1 -1
  9. package/dist/cjs/animation/animationHelper.js +83 -52
  10. package/dist/cjs/animation/animationHelper.js.map +1 -1
  11. package/dist/cjs/animation/characterTypes.js +171 -30
  12. package/dist/cjs/animation/characterTypes.js.map +1 -1
  13. package/dist/cjs/animation/choreoDSL.js +114 -62
  14. package/dist/cjs/animation/choreoDSL.js.map +1 -1
  15. package/dist/cjs/animation/karaokeIntegration.js +10 -11
  16. package/dist/cjs/animation/karaokeIntegration.js.map +1 -1
  17. package/dist/cjs/animation/lottieExport.js +15 -9
  18. package/dist/cjs/animation/lottieExport.js.map +1 -1
  19. package/dist/cjs/animation/motionPath.js +125 -30
  20. package/dist/cjs/animation/motionPath.js.map +1 -1
  21. package/dist/cjs/animation/physics.js +157 -57
  22. package/dist/cjs/animation/physics.js.map +1 -1
  23. package/dist/cjs/animation/rig/RigPlayer.js +7 -6
  24. package/dist/cjs/animation/rig/RigPlayer.js.map +1 -1
  25. package/dist/cjs/animation/rig/RiggedBody.js +7 -7
  26. package/dist/cjs/animation/rig/RiggedBody.js.map +1 -1
  27. package/dist/cjs/animation/rig/choreoRigBridge.js +52 -29
  28. package/dist/cjs/animation/rig/choreoRigBridge.js.map +1 -1
  29. package/dist/cjs/animation/rig/poseOps.js +6 -3
  30. package/dist/cjs/animation/rig/poseOps.js.map +1 -1
  31. package/dist/cjs/animation/shapes/arms.js +7 -6
  32. package/dist/cjs/animation/shapes/arms.js.map +1 -1
  33. package/dist/cjs/animation/shapes/eyes.js +31 -18
  34. package/dist/cjs/animation/shapes/eyes.js.map +1 -1
  35. package/dist/cjs/animation/shapes/hair.js +39 -23
  36. package/dist/cjs/animation/shapes/hair.js.map +1 -1
  37. package/dist/cjs/animation/shapes/heads.js +47 -29
  38. package/dist/cjs/animation/shapes/heads.js.map +1 -1
  39. package/dist/cjs/animation/shapes/headwear.js +26 -14
  40. package/dist/cjs/animation/shapes/headwear.js.map +1 -1
  41. package/dist/cjs/animation/shapes/legs.js +7 -6
  42. package/dist/cjs/animation/shapes/legs.js.map +1 -1
  43. package/dist/cjs/animation/shapes/mouths.js +28 -18
  44. package/dist/cjs/animation/shapes/mouths.js.map +1 -1
  45. package/dist/cjs/animation/shapes/noses.js +18 -9
  46. package/dist/cjs/animation/shapes/noses.js.map +1 -1
  47. package/dist/cjs/animation/shapes/outfits.js +25 -14
  48. package/dist/cjs/animation/shapes/outfits.js.map +1 -1
  49. package/dist/cjs/animation/shapes/torsos.js +5 -4
  50. package/dist/cjs/animation/shapes/torsos.js.map +1 -1
  51. package/dist/cjs/animation/spineExport.js +33 -26
  52. package/dist/cjs/animation/spineExport.js.map +1 -1
  53. package/dist/cjs/core/LocalUI.js +16 -16
  54. package/dist/cjs/core/LocalUI.js.map +1 -1
  55. package/dist/cjs/core/NiceBrushEngine.js +205 -69
  56. package/dist/cjs/core/NiceBrushEngine.js.map +1 -1
  57. package/dist/cjs/core/collaboration.js +35 -21
  58. package/dist/cjs/core/collaboration.js.map +1 -1
  59. package/dist/cjs/core/colorBlindness.js +64 -24
  60. package/dist/cjs/core/colorBlindness.js.map +1 -1
  61. package/dist/cjs/core/dragDrop.js +34 -26
  62. package/dist/cjs/core/dragDrop.js.map +1 -1
  63. package/dist/cjs/core/fixes.js +26 -14
  64. package/dist/cjs/core/fixes.js.map +1 -1
  65. package/dist/cjs/core/gridGuides.js +24 -16
  66. package/dist/cjs/core/gridGuides.js.map +1 -1
  67. package/dist/cjs/core/historyVisual.js +42 -23
  68. package/dist/cjs/core/historyVisual.js.map +1 -1
  69. package/dist/cjs/core/integrations.js +65 -48
  70. package/dist/cjs/core/integrations.js.map +1 -1
  71. package/dist/cjs/core/minimap.js +40 -24
  72. package/dist/cjs/core/minimap.js.map +1 -1
  73. package/dist/cjs/core/plugins.js +10 -6
  74. package/dist/cjs/core/plugins.js.map +1 -1
  75. package/dist/cjs/core/rtl.js +32 -27
  76. package/dist/cjs/core/rtl.js.map +1 -1
  77. package/dist/cjs/core/shortcuts.js +77 -39
  78. package/dist/cjs/core/shortcuts.js.map +1 -1
  79. package/dist/cjs/core/theme.js +68 -61
  80. package/dist/cjs/core/theme.js.map +1 -1
  81. package/dist/cjs/core/yjsCollaboration.js +61 -28
  82. package/dist/cjs/core/yjsCollaboration.js.map +1 -1
  83. package/dist/cjs/font/NiceFontEditor.js +160 -57
  84. package/dist/cjs/font/NiceFontEditor.js.map +1 -1
  85. package/dist/cjs/font/fontFormatUtils.js +37 -24
  86. package/dist/cjs/font/fontFormatUtils.js.map +1 -1
  87. package/dist/cjs/game/GameAsset2dEditor.js +73 -60
  88. package/dist/cjs/game/GameAsset2dEditor.js.map +1 -1
  89. package/dist/cjs/game/gameAssetUtils.js +18 -13
  90. package/dist/cjs/game/gameAssetUtils.js.map +1 -1
  91. package/dist/cjs/game/useGameAssetEditor.js +160 -143
  92. package/dist/cjs/game/useGameAssetEditor.js.map +1 -1
  93. package/dist/cjs/icon/NiceIconEditor.js +329 -106
  94. package/dist/cjs/icon/NiceIconEditor.js.map +1 -1
  95. package/dist/cjs/packages/ui/dist/NiceErrorBoundary-D75yr_WE.js +572 -0
  96. package/dist/cjs/packages/ui/dist/NiceErrorBoundary-D75yr_WE.js.map +1 -0
  97. package/dist/cjs/packages/ui/dist/NiceForm-CKoJA6NG.js +4979 -0
  98. package/dist/cjs/packages/ui/dist/NiceForm-CKoJA6NG.js.map +1 -0
  99. package/dist/cjs/packages/ui/dist/NiceModal-1QX7NhyH.js +98 -0
  100. package/dist/cjs/packages/ui/dist/NiceModal-1QX7NhyH.js.map +1 -0
  101. package/dist/cjs/packages/ui/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5244 -0
  102. package/dist/cjs/packages/ui/dist/NiceModuleLifecyclePanel-CMrPbSw9.js.map +1 -0
  103. package/dist/cjs/packages/ui/dist/NicePagination-DbE-uOkl.js +174 -0
  104. package/dist/cjs/packages/ui/dist/NicePagination-DbE-uOkl.js.map +1 -0
  105. package/dist/cjs/packages/ui/dist/NicePinCodeInput-B8cI8zu8.js +10459 -0
  106. package/dist/cjs/packages/ui/dist/NicePinCodeInput-B8cI8zu8.js.map +1 -0
  107. package/dist/cjs/packages/ui/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6313 -0
  108. package/dist/cjs/packages/ui/dist/NiceSavedQueryPanel-CZ5bYOe_.js.map +1 -0
  109. package/dist/cjs/packages/ui/dist/NiceTabs-DzLHzwuA.js +1639 -0
  110. package/dist/cjs/packages/ui/dist/NiceTabs-DzLHzwuA.js.map +1 -0
  111. package/dist/cjs/packages/ui/dist/NiceWindow-DeC83yfE.js +807 -0
  112. package/dist/cjs/packages/ui/dist/NiceWindow-DeC83yfE.js.map +1 -0
  113. package/dist/cjs/packages/ui/dist/charts-BAS21jkC.js +3833 -0
  114. package/dist/cjs/packages/ui/dist/charts-BAS21jkC.js.map +1 -0
  115. package/dist/cjs/packages/ui/dist/core-Da43q-pO.js +11683 -0
  116. package/dist/cjs/packages/ui/dist/core-Da43q-pO.js.map +1 -0
  117. package/dist/cjs/packages/ui/dist/index-pAuGTbuB.js +28876 -0
  118. package/dist/cjs/packages/ui/dist/index-pAuGTbuB.js.map +1 -0
  119. package/dist/cjs/photo/FilterThumb.js +7 -5
  120. package/dist/cjs/photo/FilterThumb.js.map +1 -1
  121. package/dist/cjs/photo/NiceAITools.js +78 -32
  122. package/dist/cjs/photo/NiceAITools.js.map +1 -1
  123. package/dist/cjs/photo/PhotoEditor.js +4 -4
  124. package/dist/cjs/photo/PhotoEditor.js.map +1 -1
  125. package/dist/cjs/photo/PhotoEditorCanvas.js +56 -22
  126. package/dist/cjs/photo/PhotoEditorCanvas.js.map +1 -1
  127. package/dist/cjs/photo/PhotoEditorLeftPanel.js +106 -48
  128. package/dist/cjs/photo/PhotoEditorLeftPanel.js.map +1 -1
  129. package/dist/cjs/photo/PhotoEditorToolbar.js +2 -2
  130. package/dist/cjs/photo/PhotoEditorToolbar.js.map +1 -1
  131. package/dist/cjs/photo/photoEditorActions.js +27 -18
  132. package/dist/cjs/photo/photoEditorActions.js.map +1 -1
  133. package/dist/cjs/photo/photoFilters.js +316 -81
  134. package/dist/cjs/photo/photoFilters.js.map +1 -1
  135. package/dist/cjs/photo/photoOverlays.js +521 -165
  136. package/dist/cjs/photo/photoOverlays.js.map +1 -1
  137. package/dist/cjs/photo/photoSelection.js +69 -35
  138. package/dist/cjs/photo/photoSelection.js.map +1 -1
  139. package/dist/cjs/photo/usePhotoEditor.js +203 -97
  140. package/dist/cjs/photo/usePhotoEditor.js.map +1 -1
  141. package/dist/cjs/pixel/HSVPicker.js +32 -19
  142. package/dist/cjs/pixel/HSVPicker.js.map +1 -1
  143. package/dist/cjs/pixel/PixelEditor.js +25 -14
  144. package/dist/cjs/pixel/PixelEditor.js.map +1 -1
  145. package/dist/cjs/pixel/PixelEditorCanvas.js +2 -2
  146. package/dist/cjs/pixel/PixelEditorCanvas.js.map +1 -1
  147. package/dist/cjs/pixel/PixelEditorMenuBar.js +3 -3
  148. package/dist/cjs/pixel/PixelEditorMenuBar.js.map +1 -1
  149. package/dist/cjs/pixel/PixelEditorRightPanel.js +28 -8
  150. package/dist/cjs/pixel/PixelEditorRightPanel.js.map +1 -1
  151. package/dist/cjs/pixel/PixelEditorStatusBar.js +2 -2
  152. package/dist/cjs/pixel/PixelEditorStatusBar.js.map +1 -1
  153. package/dist/cjs/pixel/PixelEditorTimeline.js +3 -4
  154. package/dist/cjs/pixel/PixelEditorTimeline.js.map +1 -1
  155. package/dist/cjs/pixel/PixelEditorToolbar.js +3 -3
  156. package/dist/cjs/pixel/PixelEditorToolbar.js.map +1 -1
  157. package/dist/cjs/pixel/SpriteGeneratorPanel.js +136 -54
  158. package/dist/cjs/pixel/SpriteGeneratorPanel.js.map +1 -1
  159. package/dist/cjs/pixel/asepriteFormat.js +122 -38
  160. package/dist/cjs/pixel/asepriteFormat.js.map +1 -1
  161. package/dist/cjs/pixel/characterGeneratorPresets.js +208 -54
  162. package/dist/cjs/pixel/characterGeneratorPresets.js.map +1 -1
  163. package/dist/cjs/pixel/pixelEditorExports.js +42 -35
  164. package/dist/cjs/pixel/pixelEditorExports.js.map +1 -1
  165. package/dist/cjs/pixel/pixelEditorTypes.js +67 -33
  166. package/dist/cjs/pixel/pixelEditorTypes.js.map +1 -1
  167. package/dist/cjs/pixel/pixelEditorUtils.js +62 -38
  168. package/dist/cjs/pixel/pixelEditorUtils.js.map +1 -1
  169. package/dist/cjs/pixel/spriteGeneratorCore.js +47 -24
  170. package/dist/cjs/pixel/spriteGeneratorCore.js.map +1 -1
  171. package/dist/cjs/pixel/usePixelEditor.js +475 -213
  172. package/dist/cjs/pixel/usePixelEditor.js.map +1 -1
  173. package/dist/cjs/texture/Nice3DTexturePainter.js +201 -71
  174. package/dist/cjs/texture/Nice3DTexturePainter.js.map +1 -1
  175. package/dist/cjs/ui/NiceUIDesigner.js +280 -91
  176. package/dist/cjs/ui/NiceUIDesigner.js.map +1 -1
  177. package/dist/cjs/vector/NiceSvgToCode.js +96 -34
  178. package/dist/cjs/vector/NiceSvgToCode.js.map +1 -1
  179. package/dist/cjs/vector/VectorEditor.js +14 -13
  180. package/dist/cjs/vector/VectorEditor.js.map +1 -1
  181. package/dist/cjs/vector/VectorEditorMenuBar.js +7 -6
  182. package/dist/cjs/vector/VectorEditorMenuBar.js.map +1 -1
  183. package/dist/cjs/vector/VectorEditorRightPanel.js +87 -32
  184. package/dist/cjs/vector/VectorEditorRightPanel.js.map +1 -1
  185. package/dist/cjs/vector/VectorEditorShapeRenderer.js +17 -15
  186. package/dist/cjs/vector/VectorEditorShapeRenderer.js.map +1 -1
  187. package/dist/cjs/vector/VectorEditorStatusBar.js.map +1 -1
  188. package/dist/cjs/vector/useVectorEditor.js +312 -122
  189. package/dist/cjs/vector/useVectorEditor.js.map +1 -1
  190. package/dist/cjs/vector/vectorBooleanOps.js +60 -42
  191. package/dist/cjs/vector/vectorBooleanOps.js.map +1 -1
  192. package/dist/cjs/vector/vectorEditorExport.js +40 -34
  193. package/dist/cjs/vector/vectorEditorExport.js.map +1 -1
  194. package/dist/cjs/vector/vectorGradients.js +41 -40
  195. package/dist/cjs/vector/vectorGradients.js.map +1 -1
  196. package/dist/esm/animation/AnimatedPerson.js +69 -63
  197. package/dist/esm/animation/AnimatedPerson.js.map +1 -1
  198. package/dist/esm/animation/AnimationEditor.js +27 -20
  199. package/dist/esm/animation/AnimationEditor.js.map +1 -1
  200. package/dist/esm/animation/Audience.js +17 -11
  201. package/dist/esm/animation/Audience.js.map +1 -1
  202. package/dist/esm/animation/BodyRenderer.js +7 -7
  203. package/dist/esm/animation/BodyRenderer.js.map +1 -1
  204. package/dist/esm/animation/animationHelper.js +83 -52
  205. package/dist/esm/animation/animationHelper.js.map +1 -1
  206. package/dist/esm/animation/characterTypes.js +171 -30
  207. package/dist/esm/animation/characterTypes.js.map +1 -1
  208. package/dist/esm/animation/choreoDSL.js +114 -62
  209. package/dist/esm/animation/choreoDSL.js.map +1 -1
  210. package/dist/esm/animation/karaokeIntegration.js +10 -11
  211. package/dist/esm/animation/karaokeIntegration.js.map +1 -1
  212. package/dist/esm/animation/lottieExport.js +15 -9
  213. package/dist/esm/animation/lottieExport.js.map +1 -1
  214. package/dist/esm/animation/motionPath.js +125 -30
  215. package/dist/esm/animation/motionPath.js.map +1 -1
  216. package/dist/esm/animation/physics.js +157 -57
  217. package/dist/esm/animation/physics.js.map +1 -1
  218. package/dist/esm/animation/rig/RigPlayer.js +7 -6
  219. package/dist/esm/animation/rig/RigPlayer.js.map +1 -1
  220. package/dist/esm/animation/rig/RiggedBody.js +7 -7
  221. package/dist/esm/animation/rig/RiggedBody.js.map +1 -1
  222. package/dist/esm/animation/rig/choreoRigBridge.js +52 -29
  223. package/dist/esm/animation/rig/choreoRigBridge.js.map +1 -1
  224. package/dist/esm/animation/rig/poseOps.js +6 -3
  225. package/dist/esm/animation/rig/poseOps.js.map +1 -1
  226. package/dist/esm/animation/shapes/arms.js +7 -6
  227. package/dist/esm/animation/shapes/arms.js.map +1 -1
  228. package/dist/esm/animation/shapes/eyes.js +31 -18
  229. package/dist/esm/animation/shapes/eyes.js.map +1 -1
  230. package/dist/esm/animation/shapes/hair.js +39 -23
  231. package/dist/esm/animation/shapes/hair.js.map +1 -1
  232. package/dist/esm/animation/shapes/heads.js +47 -29
  233. package/dist/esm/animation/shapes/heads.js.map +1 -1
  234. package/dist/esm/animation/shapes/headwear.js +26 -14
  235. package/dist/esm/animation/shapes/headwear.js.map +1 -1
  236. package/dist/esm/animation/shapes/legs.js +7 -6
  237. package/dist/esm/animation/shapes/legs.js.map +1 -1
  238. package/dist/esm/animation/shapes/mouths.js +28 -18
  239. package/dist/esm/animation/shapes/mouths.js.map +1 -1
  240. package/dist/esm/animation/shapes/noses.js +18 -9
  241. package/dist/esm/animation/shapes/noses.js.map +1 -1
  242. package/dist/esm/animation/shapes/outfits.js +25 -14
  243. package/dist/esm/animation/shapes/outfits.js.map +1 -1
  244. package/dist/esm/animation/shapes/torsos.js +5 -4
  245. package/dist/esm/animation/shapes/torsos.js.map +1 -1
  246. package/dist/esm/animation/spineExport.js +33 -26
  247. package/dist/esm/animation/spineExport.js.map +1 -1
  248. package/dist/esm/core/LocalUI.js +16 -16
  249. package/dist/esm/core/LocalUI.js.map +1 -1
  250. package/dist/esm/core/NiceBrushEngine.js +205 -69
  251. package/dist/esm/core/NiceBrushEngine.js.map +1 -1
  252. package/dist/esm/core/collaboration.js +35 -21
  253. package/dist/esm/core/collaboration.js.map +1 -1
  254. package/dist/esm/core/colorBlindness.js +64 -24
  255. package/dist/esm/core/colorBlindness.js.map +1 -1
  256. package/dist/esm/core/dragDrop.js +34 -26
  257. package/dist/esm/core/dragDrop.js.map +1 -1
  258. package/dist/esm/core/fixes.js +26 -14
  259. package/dist/esm/core/fixes.js.map +1 -1
  260. package/dist/esm/core/gridGuides.js +24 -16
  261. package/dist/esm/core/gridGuides.js.map +1 -1
  262. package/dist/esm/core/historyVisual.js +42 -23
  263. package/dist/esm/core/historyVisual.js.map +1 -1
  264. package/dist/esm/core/integrations.js +65 -48
  265. package/dist/esm/core/integrations.js.map +1 -1
  266. package/dist/esm/core/minimap.js +40 -24
  267. package/dist/esm/core/minimap.js.map +1 -1
  268. package/dist/esm/core/plugins.js +10 -6
  269. package/dist/esm/core/plugins.js.map +1 -1
  270. package/dist/esm/core/rtl.js +32 -27
  271. package/dist/esm/core/rtl.js.map +1 -1
  272. package/dist/esm/core/shortcuts.js +77 -39
  273. package/dist/esm/core/shortcuts.js.map +1 -1
  274. package/dist/esm/core/theme.js +68 -61
  275. package/dist/esm/core/theme.js.map +1 -1
  276. package/dist/esm/core/yjsCollaboration.js +61 -28
  277. package/dist/esm/core/yjsCollaboration.js.map +1 -1
  278. package/dist/esm/font/NiceFontEditor.js +160 -57
  279. package/dist/esm/font/NiceFontEditor.js.map +1 -1
  280. package/dist/esm/font/fontFormatUtils.js +37 -24
  281. package/dist/esm/font/fontFormatUtils.js.map +1 -1
  282. package/dist/esm/game/GameAsset2dEditor.js +73 -60
  283. package/dist/esm/game/GameAsset2dEditor.js.map +1 -1
  284. package/dist/esm/game/gameAssetUtils.js +18 -13
  285. package/dist/esm/game/gameAssetUtils.js.map +1 -1
  286. package/dist/esm/game/useGameAssetEditor.js +160 -143
  287. package/dist/esm/game/useGameAssetEditor.js.map +1 -1
  288. package/dist/esm/icon/NiceIconEditor.js +329 -106
  289. package/dist/esm/icon/NiceIconEditor.js.map +1 -1
  290. package/dist/esm/packages/ui/dist/NiceErrorBoundary-D75yr_WE.js +563 -0
  291. package/dist/esm/packages/ui/dist/NiceErrorBoundary-D75yr_WE.js.map +1 -0
  292. package/dist/esm/packages/ui/dist/NiceForm-CKoJA6NG.js +4960 -0
  293. package/dist/esm/packages/ui/dist/NiceForm-CKoJA6NG.js.map +1 -0
  294. package/dist/esm/packages/ui/dist/NiceModal-1QX7NhyH.js +96 -0
  295. package/dist/esm/packages/ui/dist/NiceModal-1QX7NhyH.js.map +1 -0
  296. package/dist/esm/packages/ui/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5201 -0
  297. package/dist/esm/packages/ui/dist/NiceModuleLifecyclePanel-CMrPbSw9.js.map +1 -0
  298. package/dist/esm/packages/ui/dist/NicePagination-DbE-uOkl.js +172 -0
  299. package/dist/esm/packages/ui/dist/NicePagination-DbE-uOkl.js.map +1 -0
  300. package/dist/esm/packages/ui/dist/NicePinCodeInput-B8cI8zu8.js +10408 -0
  301. package/dist/esm/packages/ui/dist/NicePinCodeInput-B8cI8zu8.js.map +1 -0
  302. package/dist/esm/packages/ui/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6296 -0
  303. package/dist/esm/packages/ui/dist/NiceSavedQueryPanel-CZ5bYOe_.js.map +1 -0
  304. package/dist/esm/packages/ui/dist/NiceTabs-DzLHzwuA.js +1630 -0
  305. package/dist/esm/packages/ui/dist/NiceTabs-DzLHzwuA.js.map +1 -0
  306. package/dist/esm/packages/ui/dist/NiceWindow-DeC83yfE.js +796 -0
  307. package/dist/esm/packages/ui/dist/NiceWindow-DeC83yfE.js.map +1 -0
  308. package/dist/esm/packages/ui/dist/charts-BAS21jkC.js +3809 -0
  309. package/dist/esm/packages/ui/dist/charts-BAS21jkC.js.map +1 -0
  310. package/dist/esm/packages/ui/dist/core-Da43q-pO.js +11502 -0
  311. package/dist/esm/packages/ui/dist/core-Da43q-pO.js.map +1 -0
  312. package/dist/esm/packages/ui/dist/index-pAuGTbuB.js +28792 -0
  313. package/dist/esm/packages/ui/dist/index-pAuGTbuB.js.map +1 -0
  314. package/dist/esm/photo/FilterThumb.js +7 -5
  315. package/dist/esm/photo/FilterThumb.js.map +1 -1
  316. package/dist/esm/photo/NiceAITools.js +78 -32
  317. package/dist/esm/photo/NiceAITools.js.map +1 -1
  318. package/dist/esm/photo/PhotoEditor.js +4 -4
  319. package/dist/esm/photo/PhotoEditor.js.map +1 -1
  320. package/dist/esm/photo/PhotoEditorCanvas.js +56 -22
  321. package/dist/esm/photo/PhotoEditorCanvas.js.map +1 -1
  322. package/dist/esm/photo/PhotoEditorLeftPanel.js +106 -48
  323. package/dist/esm/photo/PhotoEditorLeftPanel.js.map +1 -1
  324. package/dist/esm/photo/PhotoEditorToolbar.js +2 -2
  325. package/dist/esm/photo/PhotoEditorToolbar.js.map +1 -1
  326. package/dist/esm/photo/photoEditorActions.js +27 -18
  327. package/dist/esm/photo/photoEditorActions.js.map +1 -1
  328. package/dist/esm/photo/photoFilters.js +316 -81
  329. package/dist/esm/photo/photoFilters.js.map +1 -1
  330. package/dist/esm/photo/photoOverlays.js +521 -165
  331. package/dist/esm/photo/photoOverlays.js.map +1 -1
  332. package/dist/esm/photo/photoSelection.js +69 -35
  333. package/dist/esm/photo/photoSelection.js.map +1 -1
  334. package/dist/esm/photo/usePhotoEditor.js +203 -97
  335. package/dist/esm/photo/usePhotoEditor.js.map +1 -1
  336. package/dist/esm/pixel/HSVPicker.js +32 -19
  337. package/dist/esm/pixel/HSVPicker.js.map +1 -1
  338. package/dist/esm/pixel/PixelEditor.js +25 -14
  339. package/dist/esm/pixel/PixelEditor.js.map +1 -1
  340. package/dist/esm/pixel/PixelEditorCanvas.js +2 -2
  341. package/dist/esm/pixel/PixelEditorCanvas.js.map +1 -1
  342. package/dist/esm/pixel/PixelEditorMenuBar.js +3 -3
  343. package/dist/esm/pixel/PixelEditorMenuBar.js.map +1 -1
  344. package/dist/esm/pixel/PixelEditorRightPanel.js +28 -8
  345. package/dist/esm/pixel/PixelEditorRightPanel.js.map +1 -1
  346. package/dist/esm/pixel/PixelEditorStatusBar.js +2 -2
  347. package/dist/esm/pixel/PixelEditorStatusBar.js.map +1 -1
  348. package/dist/esm/pixel/PixelEditorTimeline.js +3 -4
  349. package/dist/esm/pixel/PixelEditorTimeline.js.map +1 -1
  350. package/dist/esm/pixel/PixelEditorToolbar.js +3 -3
  351. package/dist/esm/pixel/PixelEditorToolbar.js.map +1 -1
  352. package/dist/esm/pixel/SpriteGeneratorPanel.js +136 -54
  353. package/dist/esm/pixel/SpriteGeneratorPanel.js.map +1 -1
  354. package/dist/esm/pixel/asepriteFormat.js +122 -38
  355. package/dist/esm/pixel/asepriteFormat.js.map +1 -1
  356. package/dist/esm/pixel/characterGeneratorPresets.js +208 -54
  357. package/dist/esm/pixel/characterGeneratorPresets.js.map +1 -1
  358. package/dist/esm/pixel/pixelEditorExports.js +42 -35
  359. package/dist/esm/pixel/pixelEditorExports.js.map +1 -1
  360. package/dist/esm/pixel/pixelEditorTypes.js +67 -33
  361. package/dist/esm/pixel/pixelEditorTypes.js.map +1 -1
  362. package/dist/esm/pixel/pixelEditorUtils.js +62 -38
  363. package/dist/esm/pixel/pixelEditorUtils.js.map +1 -1
  364. package/dist/esm/pixel/spriteGeneratorCore.js +47 -24
  365. package/dist/esm/pixel/spriteGeneratorCore.js.map +1 -1
  366. package/dist/esm/pixel/usePixelEditor.js +475 -213
  367. package/dist/esm/pixel/usePixelEditor.js.map +1 -1
  368. package/dist/esm/texture/Nice3DTexturePainter.js +201 -71
  369. package/dist/esm/texture/Nice3DTexturePainter.js.map +1 -1
  370. package/dist/esm/ui/NiceUIDesigner.js +280 -91
  371. package/dist/esm/ui/NiceUIDesigner.js.map +1 -1
  372. package/dist/esm/vector/NiceSvgToCode.js +96 -34
  373. package/dist/esm/vector/NiceSvgToCode.js.map +1 -1
  374. package/dist/esm/vector/VectorEditor.js +14 -13
  375. package/dist/esm/vector/VectorEditor.js.map +1 -1
  376. package/dist/esm/vector/VectorEditorMenuBar.js +7 -6
  377. package/dist/esm/vector/VectorEditorMenuBar.js.map +1 -1
  378. package/dist/esm/vector/VectorEditorRightPanel.js +87 -32
  379. package/dist/esm/vector/VectorEditorRightPanel.js.map +1 -1
  380. package/dist/esm/vector/VectorEditorShapeRenderer.js +17 -15
  381. package/dist/esm/vector/VectorEditorShapeRenderer.js.map +1 -1
  382. package/dist/esm/vector/VectorEditorStatusBar.js.map +1 -1
  383. package/dist/esm/vector/useVectorEditor.js +312 -122
  384. package/dist/esm/vector/useVectorEditor.js.map +1 -1
  385. package/dist/esm/vector/vectorBooleanOps.js +60 -42
  386. package/dist/esm/vector/vectorBooleanOps.js.map +1 -1
  387. package/dist/esm/vector/vectorEditorExport.js +40 -34
  388. package/dist/esm/vector/vectorEditorExport.js.map +1 -1
  389. package/dist/esm/vector/vectorGradients.js +41 -40
  390. package/dist/esm/vector/vectorGradients.js.map +1 -1
  391. package/package.json +2 -2
@@ -0,0 +1,572 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var coreDa43qPO = require('./core-Da43q-pO.js');
5
+ var React = require('react');
6
+
7
+ const J = {
8
+ info: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" }) }),
9
+ success: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" }) }),
10
+ warning: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" }) }),
11
+ error: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z", clipRule: "evenodd" }) })
12
+ }, he = ({
13
+ variant: n = "info",
14
+ title: t,
15
+ children: s,
16
+ closable: r,
17
+ onClose: i,
18
+ icon: c,
19
+ size: l = "md",
20
+ className: m,
21
+ style: d,
22
+ displayStyle: b
23
+ }) => {
24
+ const h = coreDa43qPO.d("card", b);
25
+ return /* @__PURE__ */ jsxRuntime.jsxs(
26
+ "div",
27
+ {
28
+ className: `nice-alert nice-alert--${n} nice-alert--${l} nice-alert--ds-${h} ${m || ""}`,
29
+ style: d,
30
+ role: "alert",
31
+ children: [
32
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `nice-alert__icon nice-alert__icon--${n}`, children: c || J[n] }),
33
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-alert__content", children: [
34
+ t && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-alert__title", children: t }),
35
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: s })
36
+ ] }),
37
+ r && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nice-alert__close", onClick: i, "aria-label": "Close", children: "✕" })
38
+ ]
39
+ }
40
+ );
41
+ }, fe = ({
42
+ open: n,
43
+ onClose: t,
44
+ title: s,
45
+ position: r = "right",
46
+ size: i = "md",
47
+ children: c,
48
+ footer: l,
49
+ transitionDuration: m,
50
+ className: d,
51
+ style: b,
52
+ displayStyle: h
53
+ }) => {
54
+ const v = coreDa43qPO.c("modal", h), g = coreDa43qPO.d("modal", h), { t: f } = coreDa43qPO.W(), N = React.useRef(null);
55
+ return coreDa43qPO.e(N, n), React.useEffect(() => {
56
+ if (!n)
57
+ return;
58
+ const p = (o) => {
59
+ o.key === "Escape" && t();
60
+ };
61
+ return document.addEventListener("keydown", p), document.body.style.overflow = "hidden", () => {
62
+ document.removeEventListener("keydown", p), document.body.style.overflow = "";
63
+ };
64
+ }, [n, t]), n ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
65
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-drawer-overlay", onClick: t }),
66
+ /* @__PURE__ */ jsxRuntime.jsxs(
67
+ "div",
68
+ {
69
+ ref: N,
70
+ className: `nice-drawer nice-drawer--${r} nice-drawer--${i} nice-drawer--ds-${g} ${d || ""}`,
71
+ style: {
72
+ ...v,
73
+ ...b,
74
+ ...m != null ? { transitionDuration: `${m}ms` } : {}
75
+ },
76
+ role: "dialog",
77
+ "aria-modal": "true",
78
+ "aria-label": s,
79
+ children: [
80
+ s && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-drawer__header", children: [
81
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "nice-drawer__title", children: s }),
82
+ /* @__PURE__ */ jsxRuntime.jsx(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ className: "nice-drawer__close",
87
+ onClick: t,
88
+ "aria-label": f("controls.close", "Close"),
89
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" }) })
90
+ }
91
+ )
92
+ ] }),
93
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-drawer__body", children: c }),
94
+ l && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-drawer__footer", children: l })
95
+ ]
96
+ }
97
+ )
98
+ ] }) : null;
99
+ }, _e = ({
100
+ toasts: n,
101
+ onDismiss: t,
102
+ position: s = "top-right"
103
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `nice-toast-container nice-toast-container--${s}`, children: n.map((r) => /* @__PURE__ */ jsxRuntime.jsx(ne, { toast: r, onDismiss: t }, r.id)) }), ne = ({
104
+ toast: n,
105
+ onDismiss: t
106
+ }) => {
107
+ const [s, r] = React.useState(false);
108
+ return React.useEffect(() => {
109
+ if (!n.duration && n.duration !== 0) {
110
+ const i = setTimeout(() => r(true), 4e3);
111
+ return () => clearTimeout(i);
112
+ }
113
+ if (n.duration > 0) {
114
+ const i = setTimeout(() => r(true), n.duration);
115
+ return () => clearTimeout(i);
116
+ }
117
+ }, [n.duration]), React.useEffect(() => {
118
+ if (s) {
119
+ const i = setTimeout(() => t(n.id), 200);
120
+ return () => clearTimeout(i);
121
+ }
122
+ }, [s, n.id, t]), /* @__PURE__ */ jsxRuntime.jsxs(
123
+ "div",
124
+ {
125
+ className: `nice-toast nice-toast--${n.variant} ${s ? "nice-toast--exiting" : ""}`,
126
+ role: "alert",
127
+ style: { position: "relative" },
128
+ children: [
129
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-toast__icon", children: J[n.variant] }),
130
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-toast__content", children: [
131
+ n.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-toast__title", children: n.title }),
132
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-toast__message", children: n.message })
133
+ ] }),
134
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nice-toast__close", onClick: () => r(true), children: "✕" })
135
+ ]
136
+ }
137
+ );
138
+ };
139
+ let ie = 0;
140
+ function pe() {
141
+ const [n, t] = React.useState([]), s = React.useCallback(
142
+ (i, c, l) => {
143
+ const m = `toast-${++ie}`;
144
+ return t((d) => [
145
+ ...d,
146
+ { id: m, variant: i, message: c, title: l?.title, duration: l?.duration }
147
+ ]), m;
148
+ },
149
+ []
150
+ ), r = React.useCallback((i) => {
151
+ t((c) => c.filter((l) => l.id !== i));
152
+ }, []);
153
+ return {
154
+ toasts: n,
155
+ dismiss: r,
156
+ info: (i, c) => s("info", i, c),
157
+ success: (i, c) => s("success", i, c),
158
+ warning: (i, c) => s("warning", i, c),
159
+ error: (i, c) => s("error", i, c)
160
+ };
161
+ }
162
+ const te = {
163
+ info: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) }),
164
+ warning: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" }) }),
165
+ error: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) }),
166
+ success: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) })
167
+ }, be = ({
168
+ visible: n,
169
+ message: t,
170
+ header: s,
171
+ icon: r,
172
+ variant: i = "warning",
173
+ acceptLabel: c,
174
+ rejectLabel: l,
175
+ onAccept: m,
176
+ onReject: d,
177
+ closeOnOverlay: b = false,
178
+ closeOnEscape: h = true,
179
+ size: v = "md",
180
+ className: g,
181
+ style: f
182
+ }) => {
183
+ const { t: N } = coreDa43qPO.W();
184
+ if (React.useEffect(() => {
185
+ if (!n || !h)
186
+ return;
187
+ const w = (y) => {
188
+ y.key === "Escape" && d();
189
+ };
190
+ return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
191
+ }, [n, h, d]), React.useEffect(() => (n ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
192
+ document.body.style.overflow = "";
193
+ }), [n]), !n)
194
+ return null;
195
+ const p = r ?? te[i], o = c ?? N("confirm.accept", "Yes"), $ = l ?? N("confirm.reject", "No");
196
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-modal-overlay", onClick: b ? d : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(
197
+ "div",
198
+ {
199
+ className: `nice-confirm nice-confirm--${i} nice-confirm--${v} ${g || ""}`,
200
+ style: f,
201
+ role: "alertdialog",
202
+ "aria-modal": "true",
203
+ "aria-label": s,
204
+ "aria-describedby": "nice-confirm-message",
205
+ onClick: (w) => w.stopPropagation(),
206
+ children: [
207
+ s && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-confirm__header", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "nice-confirm__title", children: s }) }),
208
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-confirm__body", children: [
209
+ p && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `nice-confirm__icon nice-confirm__icon--${i}`, children: p }),
210
+ /* @__PURE__ */ jsxRuntime.jsx("div", { id: "nice-confirm-message", className: "nice-confirm__message", children: t })
211
+ ] }),
212
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-confirm__footer", children: [
213
+ /* @__PURE__ */ jsxRuntime.jsx(
214
+ "button",
215
+ {
216
+ type: "button",
217
+ className: "nice-btn nice-btn--ghost nice-btn--md",
218
+ onClick: d,
219
+ children: $
220
+ }
221
+ ),
222
+ /* @__PURE__ */ jsxRuntime.jsx(
223
+ "button",
224
+ {
225
+ type: "button",
226
+ className: `nice-btn nice-btn--${i === "error" ? "error" : "primary"} nice-btn--md`,
227
+ onClick: m,
228
+ autoFocus: true,
229
+ children: o
230
+ }
231
+ )
232
+ ] })
233
+ ]
234
+ }
235
+ ) });
236
+ };
237
+ const oe = React.forwardRef(
238
+ ({
239
+ visible: n,
240
+ onAcceptAll: t,
241
+ onRejectAll: s,
242
+ onSave: r,
243
+ categories: i = ["necessary", "analytics", "marketing", "preferences"],
244
+ defaults: c,
245
+ position: l = "bottom",
246
+ size: m = "md",
247
+ policyUrl: d,
248
+ showDetails: b = false,
249
+ className: h,
250
+ style: v,
251
+ id: g,
252
+ ...f
253
+ }, N) => {
254
+ const p = coreDa43qPO.b(g), { t: o } = coreDa43qPO.W(), [$, w] = React.useState(true), y = n ?? $, [C, T] = React.useState(b), [u, z] = React.useState(() => {
255
+ const _ = {
256
+ necessary: true,
257
+ analytics: false,
258
+ marketing: false,
259
+ preferences: false
260
+ };
261
+ return c && Object.assign(_, c), _.necessary = true, _;
262
+ }), S = {
263
+ necessary: o("cookie.necessary", "Necessary"),
264
+ analytics: o("cookie.analytics", "Analytics"),
265
+ marketing: o("cookie.marketing", "Marketing"),
266
+ preferences: o("cookie.preferences", "Preferences")
267
+ }, E = {
268
+ necessary: o(
269
+ "cookie.necessaryDesc",
270
+ "Required for the website to function. Cannot be disabled."
271
+ ),
272
+ analytics: o(
273
+ "cookie.analyticsDesc",
274
+ "Help us understand how visitors interact with the website."
275
+ ),
276
+ marketing: o("cookie.marketingDesc", "Used to deliver relevant advertisements."),
277
+ preferences: o("cookie.preferencesDesc", "Allow the website to remember your choices.")
278
+ }, R = React.useCallback(() => {
279
+ const _ = {
280
+ necessary: true,
281
+ analytics: true,
282
+ marketing: true,
283
+ preferences: true
284
+ };
285
+ t?.(), r?.(_), w(false);
286
+ }, [t, r]), M = React.useCallback(() => {
287
+ const _ = {
288
+ necessary: true,
289
+ analytics: false,
290
+ marketing: false,
291
+ preferences: false
292
+ };
293
+ s?.(), r?.(_), w(false);
294
+ }, [s, r]), F = React.useCallback(() => {
295
+ r?.({ ...u, necessary: true }), w(false);
296
+ }, [u, r]);
297
+ return y ? /* @__PURE__ */ jsxRuntime.jsx(
298
+ "div",
299
+ {
300
+ ref: N,
301
+ id: p,
302
+ className: `nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${m} ${h ?? ""}`,
303
+ style: v,
304
+ role: "dialog",
305
+ "aria-label": o("cookie.label", "Cookie Consent"),
306
+ "aria-modal": "true",
307
+ ...f,
308
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-cookie-consent__content", children: [
309
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "nice-cookie-consent__message", children: [
310
+ o(
311
+ "cookie.message",
312
+ "We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."
313
+ ),
314
+ d && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
315
+ " ",
316
+ /* @__PURE__ */ jsxRuntime.jsx(
317
+ "a",
318
+ {
319
+ href: d,
320
+ className: "nice-cookie-consent__link",
321
+ target: "_blank",
322
+ rel: "noopener noreferrer",
323
+ children: o("cookie.learnMore", "Learn more")
324
+ }
325
+ )
326
+ ] })
327
+ ] }),
328
+ C && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-cookie-consent__details", children: i.map((_) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "nice-cookie-consent__category", children: [
329
+ /* @__PURE__ */ jsxRuntime.jsx(
330
+ "input",
331
+ {
332
+ type: "checkbox",
333
+ checked: u[_],
334
+ disabled: _ === "necessary",
335
+ onChange: (j) => z((P) => ({ ...P, [_]: j.target.checked })),
336
+ className: "nice-cookie-consent__checkbox"
337
+ }
338
+ ),
339
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-cookie-consent__cat-info", children: [
340
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: S[_] }),
341
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-cookie-consent__cat-desc", children: E[_] })
342
+ ] })
343
+ ] }, _)) }),
344
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-cookie-consent__actions", children: [
345
+ !C && /* @__PURE__ */ jsxRuntime.jsx(
346
+ "button",
347
+ {
348
+ type: "button",
349
+ className: "nice-cookie-consent__btn nice-cookie-consent__btn--details",
350
+ onClick: () => T(true),
351
+ children: o("cookie.customize", "Customize")
352
+ }
353
+ ),
354
+ C && /* @__PURE__ */ jsxRuntime.jsx(
355
+ "button",
356
+ {
357
+ type: "button",
358
+ className: "nice-cookie-consent__btn nice-cookie-consent__btn--save",
359
+ onClick: F,
360
+ children: o("cookie.savePreferences", "Save preferences")
361
+ }
362
+ ),
363
+ /* @__PURE__ */ jsxRuntime.jsx(
364
+ "button",
365
+ {
366
+ type: "button",
367
+ className: "nice-cookie-consent__btn nice-cookie-consent__btn--reject",
368
+ onClick: M,
369
+ children: o("cookie.rejectAll", "Reject all")
370
+ }
371
+ ),
372
+ /* @__PURE__ */ jsxRuntime.jsx(
373
+ "button",
374
+ {
375
+ type: "button",
376
+ className: "nice-cookie-consent__btn nice-cookie-consent__btn--accept",
377
+ onClick: R,
378
+ children: o("cookie.acceptAll", "Accept all")
379
+ }
380
+ )
381
+ ] })
382
+ ] })
383
+ }
384
+ ) : null;
385
+ }
386
+ );
387
+ oe.displayName = "NiceCookieConsent";
388
+ const le = React.forwardRef(
389
+ ({
390
+ onSubmit: n,
391
+ onForgotPassword: t,
392
+ onRegister: s,
393
+ loading: r = false,
394
+ error: i,
395
+ variant: c = "primary",
396
+ size: l = "md",
397
+ showRememberMe: m = true,
398
+ showForgotPassword: d = true,
399
+ showRegister: b = false,
400
+ title: h,
401
+ logo: v,
402
+ usernameLabel: g,
403
+ passwordLabel: f,
404
+ usernamePlaceholder: N,
405
+ passwordPlaceholder: p,
406
+ className: o,
407
+ style: $,
408
+ id: w,
409
+ ...y
410
+ }, C) => {
411
+ const T = coreDa43qPO.b(w), { t: u } = coreDa43qPO.W(), [z, S] = React.useState(""), [E, R] = React.useState(""), [M, F] = React.useState(false), [_, j] = React.useState(false), P = `${T}-user`, q = `${T}-pass`, H = `${T}-remember`, K = React.useCallback(
412
+ (x) => {
413
+ x.preventDefault(), !r && n?.({ username: z, password: E, rememberMe: M });
414
+ },
415
+ [r, z, E, M, n]
416
+ );
417
+ return /* @__PURE__ */ jsxRuntime.jsxs(
418
+ "form",
419
+ {
420
+ ref: C,
421
+ id: T,
422
+ className: `nice-login nice-login--${c} nice-login--${l} ${o ?? ""}`,
423
+ style: $,
424
+ onSubmit: K,
425
+ noValidate: true,
426
+ ...y,
427
+ children: [
428
+ v && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-login__logo", children: v }),
429
+ h && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "nice-login__title", children: h ?? u("login.title", "Sign In") }),
430
+ i && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-login__error", role: "alert", children: i }),
431
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-login__field", children: [
432
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: P, className: "nice-login__label", children: g ?? u("login.username", "Username") }),
433
+ /* @__PURE__ */ jsxRuntime.jsx(
434
+ "input",
435
+ {
436
+ id: P,
437
+ className: "nice-login__input",
438
+ type: "text",
439
+ value: z,
440
+ onChange: (x) => S(x.target.value),
441
+ placeholder: N ?? u("login.usernamePlaceholder", "Enter your username"),
442
+ autoComplete: "username",
443
+ required: true,
444
+ disabled: r,
445
+ "aria-required": "true"
446
+ }
447
+ )
448
+ ] }),
449
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-login__field", children: [
450
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: q, className: "nice-login__label", children: f ?? u("login.password", "Password") }),
451
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-login__password-wrap", children: [
452
+ /* @__PURE__ */ jsxRuntime.jsx(
453
+ "input",
454
+ {
455
+ id: q,
456
+ className: "nice-login__input",
457
+ type: _ ? "text" : "password",
458
+ value: E,
459
+ onChange: (x) => R(x.target.value),
460
+ placeholder: p ?? u("login.passwordPlaceholder", "Enter your password"),
461
+ autoComplete: "current-password",
462
+ required: true,
463
+ disabled: r,
464
+ "aria-required": "true"
465
+ }
466
+ ),
467
+ /* @__PURE__ */ jsxRuntime.jsx(
468
+ "button",
469
+ {
470
+ type: "button",
471
+ className: "nice-login__toggle-password",
472
+ onClick: () => j(!_),
473
+ "aria-label": _ ? u("login.hidePassword", "Hide password") : u("login.showPassword", "Show password"),
474
+ tabIndex: -1,
475
+ children: _ ? "🙈" : "👁"
476
+ }
477
+ )
478
+ ] })
479
+ ] }),
480
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-login__options", children: [
481
+ m && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "nice-login__remember", htmlFor: H, children: [
482
+ /* @__PURE__ */ jsxRuntime.jsx(
483
+ "input",
484
+ {
485
+ id: H,
486
+ type: "checkbox",
487
+ checked: M,
488
+ onChange: (x) => F(x.target.checked),
489
+ disabled: r
490
+ }
491
+ ),
492
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: u("login.rememberMe", "Remember me") })
493
+ ] }),
494
+ d && t && /* @__PURE__ */ jsxRuntime.jsx(
495
+ "button",
496
+ {
497
+ type: "button",
498
+ className: "nice-login__forgot",
499
+ onClick: t,
500
+ disabled: r,
501
+ children: u("login.forgotPassword", "Forgot password?")
502
+ }
503
+ )
504
+ ] }),
505
+ /* @__PURE__ */ jsxRuntime.jsx(
506
+ "button",
507
+ {
508
+ type: "submit",
509
+ className: `nice-login__submit nice-login__submit--${c}`,
510
+ disabled: r || !z || !E,
511
+ children: r ? u("login.loading", "Signing in...") : u("login.submit", "Sign In")
512
+ }
513
+ ),
514
+ b && s && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "nice-login__register", children: [
515
+ u("login.noAccount", "Don't have an account?"),
516
+ " ",
517
+ /* @__PURE__ */ jsxRuntime.jsx(
518
+ "button",
519
+ {
520
+ type: "button",
521
+ className: "nice-login__register-link",
522
+ onClick: s,
523
+ disabled: r,
524
+ children: u("login.register", "Register")
525
+ }
526
+ )
527
+ ] })
528
+ ]
529
+ }
530
+ );
531
+ }
532
+ );
533
+ le.displayName = "NiceLoginForm";
534
+ const O = class O extends React.Component {
535
+ constructor() {
536
+ super(...arguments), this.state = {
537
+ hasError: false,
538
+ error: null
539
+ }, this.handleReset = () => {
540
+ this.setState({ hasError: false, error: null });
541
+ };
542
+ }
543
+ static getDerivedStateFromError(t) {
544
+ return { hasError: true, error: t };
545
+ }
546
+ componentDidCatch(t, s) {
547
+ this.props.onError?.(t, s);
548
+ }
549
+ render() {
550
+ if (this.state.hasError && this.state.error) {
551
+ const { fallback: t, showRetry: s = true, retryLabel: r = "Retry", title: i = "Something went wrong" } = this.props;
552
+ return typeof t == "function" ? t(this.state.error, this.handleReset) : t || /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-error-boundary", role: "alert", children: [
553
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-error-boundary__icon", children: "⚠️" }),
554
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "nice-error-boundary__title", children: i }),
555
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "nice-error-boundary__message", children: this.state.error.message }),
556
+ s && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nice-btn nice-btn--primary", onClick: this.handleReset, children: r })
557
+ ] });
558
+ }
559
+ return this.props.children;
560
+ }
561
+ };
562
+ O.displayName = "NiceErrorBoundary";
563
+
564
+ exports.N = he;
565
+ exports.a = be;
566
+ exports.b = oe;
567
+ exports.c = fe;
568
+ exports.e = le;
569
+ exports.i = _e;
570
+ exports.j = J;
571
+ exports.u = pe;
572
+ //# sourceMappingURL=NiceErrorBoundary-D75yr_WE.js.map