@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.
- package/CHANGELOG.md +84 -0
- package/LICENSE +21 -0
- package/README.md +339 -0
- package/dist/cjs/animation/AnimatedPerson.js +153 -0
- package/dist/cjs/animation/AnimatedPerson.js.map +1 -0
- package/dist/cjs/animation/AnimationEditor.js +106 -0
- package/dist/cjs/animation/AnimationEditor.js.map +1 -0
- package/dist/cjs/animation/Audience.js +59 -0
- package/dist/cjs/animation/Audience.js.map +1 -0
- package/dist/cjs/animation/BodyRenderer.js +33 -0
- package/dist/cjs/animation/BodyRenderer.js.map +1 -0
- package/dist/cjs/animation/animationHelper.js +272 -0
- package/dist/cjs/animation/animationHelper.js.map +1 -0
- package/dist/cjs/animation/characterTypes.js +75 -0
- package/dist/cjs/animation/characterTypes.js.map +1 -0
- package/dist/cjs/animation/choreoDSL.js +190 -0
- package/dist/cjs/animation/choreoDSL.js.map +1 -0
- package/dist/cjs/animation/choreography.js +41 -0
- package/dist/cjs/animation/choreography.js.map +1 -0
- package/dist/cjs/animation/karaokeIntegration.js +98 -0
- package/dist/cjs/animation/karaokeIntegration.js.map +1 -0
- package/dist/cjs/animation/lottieExport.js +128 -0
- package/dist/cjs/animation/lottieExport.js.map +1 -0
- package/dist/cjs/animation/motionPath.js +196 -0
- package/dist/cjs/animation/motionPath.js.map +1 -0
- package/dist/cjs/animation/physics.js +201 -0
- package/dist/cjs/animation/physics.js.map +1 -0
- package/dist/cjs/animation/rig/RigPlayer.js +63 -0
- package/dist/cjs/animation/rig/RigPlayer.js.map +1 -0
- package/dist/cjs/animation/rig/RiggedBody.js +30 -0
- package/dist/cjs/animation/rig/RiggedBody.js.map +1 -0
- package/dist/cjs/animation/rig/choreoRigBridge.js +63 -0
- package/dist/cjs/animation/rig/choreoRigBridge.js.map +1 -0
- package/dist/cjs/animation/rig/ik.js +22 -0
- package/dist/cjs/animation/rig/ik.js.map +1 -0
- package/dist/cjs/animation/rig/poseOps.js +49 -0
- package/dist/cjs/animation/rig/poseOps.js.map +1 -0
- package/dist/cjs/animation/rig/presets.js +60 -0
- package/dist/cjs/animation/rig/presets.js.map +1 -0
- package/dist/cjs/animation/rig/rigMath.js +41 -0
- package/dist/cjs/animation/rig/rigMath.js.map +1 -0
- package/dist/cjs/animation/rig/rigTypes.js +44 -0
- package/dist/cjs/animation/rig/rigTypes.js.map +1 -0
- package/dist/cjs/animation/shapes/arms.js +15 -0
- package/dist/cjs/animation/shapes/arms.js.map +1 -0
- package/dist/cjs/animation/shapes/eyes.js +52 -0
- package/dist/cjs/animation/shapes/eyes.js.map +1 -0
- package/dist/cjs/animation/shapes/hair.js +55 -0
- package/dist/cjs/animation/shapes/hair.js.map +1 -0
- package/dist/cjs/animation/shapes/heads.js +62 -0
- package/dist/cjs/animation/shapes/heads.js.map +1 -0
- package/dist/cjs/animation/shapes/headwear.js +44 -0
- package/dist/cjs/animation/shapes/headwear.js.map +1 -0
- package/dist/cjs/animation/shapes/legs.js +15 -0
- package/dist/cjs/animation/shapes/legs.js.map +1 -0
- package/dist/cjs/animation/shapes/mouths.js +53 -0
- package/dist/cjs/animation/shapes/mouths.js.map +1 -0
- package/dist/cjs/animation/shapes/noses.js +31 -0
- package/dist/cjs/animation/shapes/noses.js.map +1 -0
- package/dist/cjs/animation/shapes/outfits.js +43 -0
- package/dist/cjs/animation/shapes/outfits.js.map +1 -0
- package/dist/cjs/animation/shapes/torsos.js +13 -0
- package/dist/cjs/animation/shapes/torsos.js.map +1 -0
- package/dist/cjs/animation/spineExport.js +132 -0
- package/dist/cjs/animation/spineExport.js.map +1 -0
- package/dist/cjs/core/LocalUI.js +54 -0
- package/dist/cjs/core/LocalUI.js.map +1 -0
- package/dist/cjs/core/collaboration.js +259 -0
- package/dist/cjs/core/collaboration.js.map +1 -0
- package/dist/cjs/core/colorBlindness.js +97 -0
- package/dist/cjs/core/colorBlindness.js.map +1 -0
- package/dist/cjs/core/dragDrop.js +168 -0
- package/dist/cjs/core/dragDrop.js.map +1 -0
- package/dist/cjs/core/fixes.js +185 -0
- package/dist/cjs/core/fixes.js.map +1 -0
- package/dist/cjs/core/gridGuides.js +245 -0
- package/dist/cjs/core/gridGuides.js.map +1 -0
- package/dist/cjs/core/historyVisual.js +124 -0
- package/dist/cjs/core/historyVisual.js.map +1 -0
- package/dist/cjs/core/i18n.js +16 -0
- package/dist/cjs/core/i18n.js.map +1 -0
- package/dist/cjs/core/integrations.js +261 -0
- package/dist/cjs/core/integrations.js.map +1 -0
- package/dist/cjs/core/minimap.js +142 -0
- package/dist/cjs/core/minimap.js.map +1 -0
- package/dist/cjs/core/plugins.js +129 -0
- package/dist/cjs/core/plugins.js.map +1 -0
- package/dist/cjs/core/rtl.js +102 -0
- package/dist/cjs/core/rtl.js.map +1 -0
- package/dist/cjs/core/shortcuts.js +205 -0
- package/dist/cjs/core/shortcuts.js.map +1 -0
- package/dist/cjs/core/theme.js +171 -0
- package/dist/cjs/core/theme.js.map +1 -0
- package/dist/cjs/font/NiceFontEditor.js +193 -0
- package/dist/cjs/font/NiceFontEditor.js.map +1 -0
- package/dist/cjs/game/GameAsset2dEditor.js +371 -0
- package/dist/cjs/game/GameAsset2dEditor.js.map +1 -0
- package/dist/cjs/game/GameAsset2dEditor.module.css.js +6 -0
- package/dist/cjs/game/GameAsset2dEditor.module.css.js.map +1 -0
- package/dist/cjs/game/gameAssetTypes.js +20 -0
- package/dist/cjs/game/gameAssetTypes.js.map +1 -0
- package/dist/cjs/game/gameAssetUtils.js +475 -0
- package/dist/cjs/game/gameAssetUtils.js.map +1 -0
- package/dist/cjs/game/useGameAssetEditor.js +761 -0
- package/dist/cjs/game/useGameAssetEditor.js.map +1 -0
- package/dist/cjs/icon/NiceIconEditor.js +249 -0
- package/dist/cjs/icon/NiceIconEditor.js.map +1 -0
- package/dist/cjs/index.js +264 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/nice2dev-ui/dist/index.js +32070 -0
- package/dist/cjs/nice2dev-ui/dist/index.js.map +1 -0
- package/dist/cjs/nice2dev-ui-graphics.css +1 -0
- package/dist/cjs/photo/FilterThumb.js +29 -0
- package/dist/cjs/photo/FilterThumb.js.map +1 -0
- package/dist/cjs/photo/PhotoEditor.js +20 -0
- package/dist/cjs/photo/PhotoEditor.js.map +1 -0
- package/dist/cjs/photo/PhotoEditor.module.css.js +6 -0
- package/dist/cjs/photo/PhotoEditor.module.css.js.map +1 -0
- package/dist/cjs/photo/PhotoEditorCanvas.js +59 -0
- package/dist/cjs/photo/PhotoEditorCanvas.js.map +1 -0
- package/dist/cjs/photo/PhotoEditorLeftPanel.js +174 -0
- package/dist/cjs/photo/PhotoEditorLeftPanel.js.map +1 -0
- package/dist/cjs/photo/PhotoEditorToolbar.js +15 -0
- package/dist/cjs/photo/PhotoEditorToolbar.js.map +1 -0
- package/dist/cjs/photo/photoEditorActions.js +80 -0
- package/dist/cjs/photo/photoEditorActions.js.map +1 -0
- package/dist/cjs/photo/photoEditorTypes.js +40 -0
- package/dist/cjs/photo/photoEditorTypes.js.map +1 -0
- package/dist/cjs/photo/photoFilters.js +880 -0
- package/dist/cjs/photo/photoFilters.js.map +1 -0
- package/dist/cjs/photo/photoOverlays.js +651 -0
- package/dist/cjs/photo/photoOverlays.js.map +1 -0
- package/dist/cjs/photo/photoSelection.js +547 -0
- package/dist/cjs/photo/photoSelection.js.map +1 -0
- package/dist/cjs/photo/usePhotoEditor.js +640 -0
- package/dist/cjs/photo/usePhotoEditor.js.map +1 -0
- package/dist/cjs/pixel/HSVPicker.js +173 -0
- package/dist/cjs/pixel/HSVPicker.js.map +1 -0
- package/dist/cjs/pixel/PixelEditor.js +28 -0
- package/dist/cjs/pixel/PixelEditor.js.map +1 -0
- package/dist/cjs/pixel/PixelEditor.module.css.js +6 -0
- package/dist/cjs/pixel/PixelEditor.module.css.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorCanvas.js +15 -0
- package/dist/cjs/pixel/PixelEditorCanvas.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorMenuBar.js +11 -0
- package/dist/cjs/pixel/PixelEditorMenuBar.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorRightPanel.js +15 -0
- package/dist/cjs/pixel/PixelEditorRightPanel.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorStatusBar.js +15 -0
- package/dist/cjs/pixel/PixelEditorStatusBar.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorTimeline.js +11 -0
- package/dist/cjs/pixel/PixelEditorTimeline.js.map +1 -0
- package/dist/cjs/pixel/PixelEditorToolbar.js +16 -0
- package/dist/cjs/pixel/PixelEditorToolbar.js.map +1 -0
- package/dist/cjs/pixel/asepriteFormat.js +512 -0
- package/dist/cjs/pixel/asepriteFormat.js.map +1 -0
- package/dist/cjs/pixel/pixelEditorExports.js +471 -0
- package/dist/cjs/pixel/pixelEditorExports.js.map +1 -0
- package/dist/cjs/pixel/pixelEditorTypes.js +102 -0
- package/dist/cjs/pixel/pixelEditorTypes.js.map +1 -0
- package/dist/cjs/pixel/pixelEditorUtils.js +664 -0
- package/dist/cjs/pixel/pixelEditorUtils.js.map +1 -0
- package/dist/cjs/pixel/usePixelEditor.js +1112 -0
- package/dist/cjs/pixel/usePixelEditor.js.map +1 -0
- package/dist/cjs/texture/Nice3DTexturePainter.js +236 -0
- package/dist/cjs/texture/Nice3DTexturePainter.js.map +1 -0
- package/dist/cjs/ui/NiceUIDesigner.js +191 -0
- package/dist/cjs/ui/NiceUIDesigner.js.map +1 -0
- package/dist/cjs/vector/VectorEditor.js +31 -0
- package/dist/cjs/vector/VectorEditor.js.map +1 -0
- package/dist/cjs/vector/VectorEditor.module.css.js +6 -0
- package/dist/cjs/vector/VectorEditor.module.css.js.map +1 -0
- package/dist/cjs/vector/VectorEditorMenuBar.js +16 -0
- package/dist/cjs/vector/VectorEditorMenuBar.js.map +1 -0
- package/dist/cjs/vector/VectorEditorRightPanel.js +126 -0
- package/dist/cjs/vector/VectorEditorRightPanel.js.map +1 -0
- package/dist/cjs/vector/VectorEditorShapeRenderer.js +55 -0
- package/dist/cjs/vector/VectorEditorShapeRenderer.js.map +1 -0
- package/dist/cjs/vector/VectorEditorStatusBar.js +14 -0
- package/dist/cjs/vector/VectorEditorStatusBar.js.map +1 -0
- package/dist/cjs/vector/useVectorEditor.js +613 -0
- package/dist/cjs/vector/useVectorEditor.js.map +1 -0
- package/dist/cjs/vector/vectorBooleanOps.js +511 -0
- package/dist/cjs/vector/vectorBooleanOps.js.map +1 -0
- package/dist/cjs/vector/vectorEditorExport.js +159 -0
- package/dist/cjs/vector/vectorEditorExport.js.map +1 -0
- package/dist/cjs/vector/vectorEditorImport.js +150 -0
- package/dist/cjs/vector/vectorEditorImport.js.map +1 -0
- package/dist/cjs/vector/vectorEditorTypes.js +72 -0
- package/dist/cjs/vector/vectorEditorTypes.js.map +1 -0
- package/dist/cjs/vector/vectorGradients.js +201 -0
- package/dist/cjs/vector/vectorGradients.js.map +1 -0
- package/dist/esm/animation/AnimatedPerson.js +151 -0
- package/dist/esm/animation/AnimatedPerson.js.map +1 -0
- package/dist/esm/animation/AnimationEditor.js +104 -0
- package/dist/esm/animation/AnimationEditor.js.map +1 -0
- package/dist/esm/animation/Audience.js +57 -0
- package/dist/esm/animation/Audience.js.map +1 -0
- package/dist/esm/animation/BodyRenderer.js +28 -0
- package/dist/esm/animation/BodyRenderer.js.map +1 -0
- package/dist/esm/animation/animationHelper.js +268 -0
- package/dist/esm/animation/animationHelper.js.map +1 -0
- package/dist/esm/animation/characterTypes.js +70 -0
- package/dist/esm/animation/characterTypes.js.map +1 -0
- package/dist/esm/animation/choreoDSL.js +182 -0
- package/dist/esm/animation/choreoDSL.js.map +1 -0
- package/dist/esm/animation/choreography.js +36 -0
- package/dist/esm/animation/choreography.js.map +1 -0
- package/dist/esm/animation/karaokeIntegration.js +91 -0
- package/dist/esm/animation/karaokeIntegration.js.map +1 -0
- package/dist/esm/animation/lottieExport.js +123 -0
- package/dist/esm/animation/lottieExport.js.map +1 -0
- package/dist/esm/animation/motionPath.js +185 -0
- package/dist/esm/animation/motionPath.js.map +1 -0
- package/dist/esm/animation/physics.js +192 -0
- package/dist/esm/animation/physics.js.map +1 -0
- package/dist/esm/animation/rig/RigPlayer.js +61 -0
- package/dist/esm/animation/rig/RigPlayer.js.map +1 -0
- package/dist/esm/animation/rig/RiggedBody.js +28 -0
- package/dist/esm/animation/rig/RiggedBody.js.map +1 -0
- package/dist/esm/animation/rig/choreoRigBridge.js +60 -0
- package/dist/esm/animation/rig/choreoRigBridge.js.map +1 -0
- package/dist/esm/animation/rig/ik.js +20 -0
- package/dist/esm/animation/rig/ik.js.map +1 -0
- package/dist/esm/animation/rig/poseOps.js +45 -0
- package/dist/esm/animation/rig/poseOps.js.map +1 -0
- package/dist/esm/animation/rig/presets.js +53 -0
- package/dist/esm/animation/rig/presets.js.map +1 -0
- package/dist/esm/animation/rig/rigMath.js +37 -0
- package/dist/esm/animation/rig/rigMath.js.map +1 -0
- package/dist/esm/animation/rig/rigTypes.js +40 -0
- package/dist/esm/animation/rig/rigTypes.js.map +1 -0
- package/dist/esm/animation/shapes/arms.js +13 -0
- package/dist/esm/animation/shapes/arms.js.map +1 -0
- package/dist/esm/animation/shapes/eyes.js +45 -0
- package/dist/esm/animation/shapes/eyes.js.map +1 -0
- package/dist/esm/animation/shapes/hair.js +46 -0
- package/dist/esm/animation/shapes/hair.js.map +1 -0
- package/dist/esm/animation/shapes/heads.js +52 -0
- package/dist/esm/animation/shapes/heads.js.map +1 -0
- package/dist/esm/animation/shapes/headwear.js +36 -0
- package/dist/esm/animation/shapes/headwear.js.map +1 -0
- package/dist/esm/animation/shapes/legs.js +13 -0
- package/dist/esm/animation/shapes/legs.js.map +1 -0
- package/dist/esm/animation/shapes/mouths.js +45 -0
- package/dist/esm/animation/shapes/mouths.js.map +1 -0
- package/dist/esm/animation/shapes/noses.js +23 -0
- package/dist/esm/animation/shapes/noses.js.map +1 -0
- package/dist/esm/animation/shapes/outfits.js +37 -0
- package/dist/esm/animation/shapes/outfits.js.map +1 -0
- package/dist/esm/animation/shapes/torsos.js +11 -0
- package/dist/esm/animation/shapes/torsos.js.map +1 -0
- package/dist/esm/animation/spineExport.js +128 -0
- package/dist/esm/animation/spineExport.js.map +1 -0
- package/dist/esm/core/LocalUI.js +50 -0
- package/dist/esm/core/LocalUI.js.map +1 -0
- package/dist/esm/core/collaboration.js +252 -0
- package/dist/esm/core/collaboration.js.map +1 -0
- package/dist/esm/core/colorBlindness.js +90 -0
- package/dist/esm/core/colorBlindness.js.map +1 -0
- package/dist/esm/core/dragDrop.js +165 -0
- package/dist/esm/core/dragDrop.js.map +1 -0
- package/dist/esm/core/fixes.js +179 -0
- package/dist/esm/core/fixes.js.map +1 -0
- package/dist/esm/core/gridGuides.js +232 -0
- package/dist/esm/core/gridGuides.js.map +1 -0
- package/dist/esm/core/historyVisual.js +121 -0
- package/dist/esm/core/historyVisual.js.map +1 -0
- package/dist/esm/core/i18n.js +13 -0
- package/dist/esm/core/i18n.js.map +1 -0
- package/dist/esm/core/integrations.js +254 -0
- package/dist/esm/core/integrations.js.map +1 -0
- package/dist/esm/core/minimap.js +139 -0
- package/dist/esm/core/minimap.js.map +1 -0
- package/dist/esm/core/plugins.js +124 -0
- package/dist/esm/core/plugins.js.map +1 -0
- package/dist/esm/core/rtl.js +95 -0
- package/dist/esm/core/rtl.js.map +1 -0
- package/dist/esm/core/shortcuts.js +200 -0
- package/dist/esm/core/shortcuts.js.map +1 -0
- package/dist/esm/core/theme.js +162 -0
- package/dist/esm/core/theme.js.map +1 -0
- package/dist/esm/font/NiceFontEditor.js +189 -0
- package/dist/esm/font/NiceFontEditor.js.map +1 -0
- package/dist/esm/game/GameAsset2dEditor.js +369 -0
- package/dist/esm/game/GameAsset2dEditor.js.map +1 -0
- package/dist/esm/game/GameAsset2dEditor.module.css.js +4 -0
- package/dist/esm/game/GameAsset2dEditor.module.css.js.map +1 -0
- package/dist/esm/game/gameAssetTypes.js +18 -0
- package/dist/esm/game/gameAssetTypes.js.map +1 -0
- package/dist/esm/game/gameAssetUtils.js +456 -0
- package/dist/esm/game/gameAssetUtils.js.map +1 -0
- package/dist/esm/game/useGameAssetEditor.js +759 -0
- package/dist/esm/game/useGameAssetEditor.js.map +1 -0
- package/dist/esm/icon/NiceIconEditor.js +246 -0
- package/dist/esm/icon/NiceIconEditor.js.map +1 -0
- package/dist/esm/index.js +59 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/nice2dev-ui/dist/index.js +31720 -0
- package/dist/esm/nice2dev-ui/dist/index.js.map +1 -0
- package/dist/esm/nice2dev-ui-graphics.css +1 -0
- package/dist/esm/photo/FilterThumb.js +27 -0
- package/dist/esm/photo/FilterThumb.js.map +1 -0
- package/dist/esm/photo/PhotoEditor.js +18 -0
- package/dist/esm/photo/PhotoEditor.js.map +1 -0
- package/dist/esm/photo/PhotoEditor.module.css.js +4 -0
- package/dist/esm/photo/PhotoEditor.module.css.js.map +1 -0
- package/dist/esm/photo/PhotoEditorCanvas.js +57 -0
- package/dist/esm/photo/PhotoEditorCanvas.js.map +1 -0
- package/dist/esm/photo/PhotoEditorLeftPanel.js +172 -0
- package/dist/esm/photo/PhotoEditorLeftPanel.js.map +1 -0
- package/dist/esm/photo/PhotoEditorToolbar.js +13 -0
- package/dist/esm/photo/PhotoEditorToolbar.js.map +1 -0
- package/dist/esm/photo/photoEditorActions.js +75 -0
- package/dist/esm/photo/photoEditorActions.js.map +1 -0
- package/dist/esm/photo/photoEditorTypes.js +36 -0
- package/dist/esm/photo/photoEditorTypes.js.map +1 -0
- package/dist/esm/photo/photoFilters.js +871 -0
- package/dist/esm/photo/photoFilters.js.map +1 -0
- package/dist/esm/photo/photoOverlays.js +636 -0
- package/dist/esm/photo/photoOverlays.js.map +1 -0
- package/dist/esm/photo/photoSelection.js +535 -0
- package/dist/esm/photo/photoSelection.js.map +1 -0
- package/dist/esm/photo/usePhotoEditor.js +638 -0
- package/dist/esm/photo/usePhotoEditor.js.map +1 -0
- package/dist/esm/pixel/HSVPicker.js +171 -0
- package/dist/esm/pixel/HSVPicker.js.map +1 -0
- package/dist/esm/pixel/PixelEditor.js +26 -0
- package/dist/esm/pixel/PixelEditor.js.map +1 -0
- package/dist/esm/pixel/PixelEditor.module.css.js +4 -0
- package/dist/esm/pixel/PixelEditor.module.css.js.map +1 -0
- package/dist/esm/pixel/PixelEditorCanvas.js +13 -0
- package/dist/esm/pixel/PixelEditorCanvas.js.map +1 -0
- package/dist/esm/pixel/PixelEditorMenuBar.js +9 -0
- package/dist/esm/pixel/PixelEditorMenuBar.js.map +1 -0
- package/dist/esm/pixel/PixelEditorRightPanel.js +13 -0
- package/dist/esm/pixel/PixelEditorRightPanel.js.map +1 -0
- package/dist/esm/pixel/PixelEditorStatusBar.js +13 -0
- package/dist/esm/pixel/PixelEditorStatusBar.js.map +1 -0
- package/dist/esm/pixel/PixelEditorTimeline.js +9 -0
- package/dist/esm/pixel/PixelEditorTimeline.js.map +1 -0
- package/dist/esm/pixel/PixelEditorToolbar.js +14 -0
- package/dist/esm/pixel/PixelEditorToolbar.js.map +1 -0
- package/dist/esm/pixel/asepriteFormat.js +505 -0
- package/dist/esm/pixel/asepriteFormat.js.map +1 -0
- package/dist/esm/pixel/pixelEditorExports.js +461 -0
- package/dist/esm/pixel/pixelEditorExports.js.map +1 -0
- package/dist/esm/pixel/pixelEditorTypes.js +90 -0
- package/dist/esm/pixel/pixelEditorTypes.js.map +1 -0
- package/dist/esm/pixel/pixelEditorUtils.js +631 -0
- package/dist/esm/pixel/pixelEditorUtils.js.map +1 -0
- package/dist/esm/pixel/usePixelEditor.js +1110 -0
- package/dist/esm/pixel/usePixelEditor.js.map +1 -0
- package/dist/esm/texture/Nice3DTexturePainter.js +233 -0
- package/dist/esm/texture/Nice3DTexturePainter.js.map +1 -0
- package/dist/esm/ui/NiceUIDesigner.js +187 -0
- package/dist/esm/ui/NiceUIDesigner.js.map +1 -0
- package/dist/esm/vector/VectorEditor.js +29 -0
- package/dist/esm/vector/VectorEditor.js.map +1 -0
- package/dist/esm/vector/VectorEditor.module.css.js +4 -0
- package/dist/esm/vector/VectorEditor.module.css.js.map +1 -0
- package/dist/esm/vector/VectorEditorMenuBar.js +14 -0
- package/dist/esm/vector/VectorEditorMenuBar.js.map +1 -0
- package/dist/esm/vector/VectorEditorRightPanel.js +124 -0
- package/dist/esm/vector/VectorEditorRightPanel.js.map +1 -0
- package/dist/esm/vector/VectorEditorShapeRenderer.js +53 -0
- package/dist/esm/vector/VectorEditorShapeRenderer.js.map +1 -0
- package/dist/esm/vector/VectorEditorStatusBar.js +12 -0
- package/dist/esm/vector/VectorEditorStatusBar.js.map +1 -0
- package/dist/esm/vector/useVectorEditor.js +611 -0
- package/dist/esm/vector/useVectorEditor.js.map +1 -0
- package/dist/esm/vector/vectorBooleanOps.js +507 -0
- package/dist/esm/vector/vectorBooleanOps.js.map +1 -0
- package/dist/esm/vector/vectorEditorExport.js +152 -0
- package/dist/esm/vector/vectorEditorExport.js.map +1 -0
- package/dist/esm/vector/vectorEditorImport.js +148 -0
- package/dist/esm/vector/vectorEditorImport.js.map +1 -0
- package/dist/esm/vector/vectorEditorTypes.js +63 -0
- package/dist/esm/vector/vectorEditorTypes.js.map +1 -0
- package/dist/esm/vector/vectorGradients.js +193 -0
- package/dist/esm/vector/vectorGradients.js.map +1 -0
- package/dist/types/__benchmarks__/bench.d.ts +13 -0
- package/dist/types/__tests__/setup.d.ts +4 -0
- package/dist/types/animation/AnimatedPerson.d.ts +14 -0
- package/dist/types/animation/AnimationEditor.d.ts +20 -0
- package/dist/types/animation/Audience.d.ts +11 -0
- package/dist/types/animation/BodyRenderer.d.ts +12 -0
- package/dist/types/animation/animationHelper.d.ts +28 -0
- package/dist/types/animation/characterTypes.d.ts +37 -0
- package/dist/types/animation/choreoDSL.d.ts +88 -0
- package/dist/types/animation/choreography.d.ts +8 -0
- package/dist/types/animation/karaokeIntegration.d.ts +31 -0
- package/dist/types/animation/lottieExport.d.ts +77 -0
- package/dist/types/animation/motionPath.d.ts +60 -0
- package/dist/types/animation/physics.d.ts +73 -0
- package/dist/types/animation/rig/RigPlayer.d.ts +32 -0
- package/dist/types/animation/rig/RiggedBody.d.ts +19 -0
- package/dist/types/animation/rig/choreoRigBridge.d.ts +9 -0
- package/dist/types/animation/rig/ik.d.ts +8 -0
- package/dist/types/animation/rig/poseOps.d.ts +14 -0
- package/dist/types/animation/rig/presets.d.ts +13 -0
- package/dist/types/animation/rig/rigMath.d.ts +7 -0
- package/dist/types/animation/rig/rigTypes.d.ts +38 -0
- package/dist/types/animation/shapes/arms.d.ts +10 -0
- package/dist/types/animation/shapes/eyes.d.ts +17 -0
- package/dist/types/animation/shapes/hair.d.ts +17 -0
- package/dist/types/animation/shapes/heads.d.ts +18 -0
- package/dist/types/animation/shapes/headwear.d.ts +16 -0
- package/dist/types/animation/shapes/legs.d.ts +10 -0
- package/dist/types/animation/shapes/mouths.d.ts +17 -0
- package/dist/types/animation/shapes/noses.d.ts +17 -0
- package/dist/types/animation/shapes/outfits.d.ts +14 -0
- package/dist/types/animation/shapes/torsos.d.ts +9 -0
- package/dist/types/animation/spineExport.d.ts +66 -0
- package/dist/types/core/LocalUI.d.ts +21 -0
- package/dist/types/core/collaboration.d.ts +164 -0
- package/dist/types/core/colorBlindness.d.ts +24 -0
- package/dist/types/core/dragDrop.d.ts +46 -0
- package/dist/types/core/fixes.d.ts +80 -0
- package/dist/types/core/gridGuides.d.ts +70 -0
- package/dist/types/core/historyVisual.d.ts +915 -0
- package/dist/types/core/i18n.d.ts +27 -0
- package/dist/types/core/integrations.d.ts +103 -0
- package/dist/types/core/minimap.d.ts +49 -0
- package/dist/types/core/plugins.d.ts +111 -0
- package/dist/types/core/rtl.d.ts +32 -0
- package/dist/types/core/shortcuts.d.ts +150 -0
- package/dist/types/core/theme.d.ts +78 -0
- package/dist/types/core/useGamepad.d.ts +64 -0
- package/dist/types/core/usePointerPressure.d.ts +88 -0
- package/dist/types/font/NiceFontEditor.d.ts +62 -0
- package/dist/types/game/AnimationPreviewPlayer.d.ts +29 -0
- package/dist/types/game/CollisionEditor.d.ts +101 -0
- package/dist/types/game/GameAsset2dEditor.d.ts +17 -0
- package/dist/types/game/GameAssetExportPanel.d.ts +20 -0
- package/dist/types/game/IsometricEditor.d.ts +22 -0
- package/dist/types/game/IsometricTilePanel.d.ts +18 -0
- package/dist/types/game/gameAssetExport.d.ts +160 -0
- package/dist/types/game/gameAssetTypes.d.ts +238 -0
- package/dist/types/game/gameAssetUtils.d.ts +23 -0
- package/dist/types/game/index.d.ts +8 -0
- package/dist/types/game/isometricTiles.d.ts +250 -0
- package/dist/types/game/useAnimationPreview.d.ts +63 -0
- package/dist/types/game/useCollisionEditor.d.ts +96 -0
- package/dist/types/game/useGameAssetEditor.d.ts +79 -0
- package/dist/types/game/useGameAssetExport.d.ts +82 -0
- package/dist/types/icon/NiceIconEditor.d.ts +79 -0
- package/dist/types/index.d.ts +85 -0
- package/dist/types/photo/BatchProcessingPanel.d.ts +13 -0
- package/dist/types/photo/FaceDetectionPanel.d.ts +18 -0
- package/dist/types/photo/FilterThumb.d.ts +14 -0
- package/dist/types/photo/PerspectiveCorrectionPanel.d.ts +17 -0
- package/dist/types/photo/PhotoEditor.d.ts +2 -0
- package/dist/types/photo/PhotoEditorCanvas.d.ts +14 -0
- package/dist/types/photo/PhotoEditorLeftPanel.d.ts +13 -0
- package/dist/types/photo/PhotoEditorToolbar.d.ts +13 -0
- package/dist/types/photo/RawFilePanel.d.ts +14 -0
- package/dist/types/photo/StyleTransferPanel.d.ts +15 -0
- package/dist/types/photo/aiStyleTransfer.d.ts +58 -0
- package/dist/types/photo/batchProcessing.d.ts +95 -0
- package/dist/types/photo/faceDetection.d.ts +103 -0
- package/dist/types/photo/index.d.ts +17 -0
- package/dist/types/photo/perspectiveCorrection.d.ts +134 -0
- package/dist/types/photo/photoEditorActions.d.ts +40 -0
- package/dist/types/photo/photoEditorTypes.d.ts +34 -0
- package/dist/types/photo/photoFilters.d.ts +55 -0
- package/dist/types/photo/photoOverlays.d.ts +126 -0
- package/dist/types/photo/photoSelection.d.ts +56 -0
- package/dist/types/photo/rawFileSupport.d.ts +124 -0
- package/dist/types/photo/usePhotoEditor.d.ts +123 -0
- package/dist/types/pixel/HSVPicker.d.ts +11 -0
- package/dist/types/pixel/PaletteExtractorPanel.d.ts +16 -0
- package/dist/types/pixel/PixelEditor.d.ts +17 -0
- package/dist/types/pixel/PixelEditorCanvas.d.ts +10 -0
- package/dist/types/pixel/PixelEditorMenuBar.d.ts +11 -0
- package/dist/types/pixel/PixelEditorRightPanel.d.ts +11 -0
- package/dist/types/pixel/PixelEditorStatusBar.d.ts +11 -0
- package/dist/types/pixel/PixelEditorTimeline.d.ts +11 -0
- package/dist/types/pixel/PixelEditorToolbar.d.ts +11 -0
- package/dist/types/pixel/TileMapPanel.d.ts +14 -0
- package/dist/types/pixel/asepriteFormat.d.ts +62 -0
- package/dist/types/pixel/paletteExtractor.d.ts +73 -0
- package/dist/types/pixel/pixelEditorExports.d.ts +31 -0
- package/dist/types/pixel/pixelEditorTypes.d.ts +51 -0
- package/dist/types/pixel/pixelEditorUtils.d.ts +136 -0
- package/dist/types/pixel/tileMapMode.d.ts +122 -0
- package/dist/types/pixel/usePixelEditor.d.ts +114 -0
- package/dist/types/texture/Nice3DTexturePainter.d.ts +55 -0
- package/dist/types/ui/NiceUIDesigner.d.ts +43 -0
- package/dist/types/vector/PathSimplificationPanel.d.ts +15 -0
- package/dist/types/vector/PdfExportPanel.d.ts +20 -0
- package/dist/types/vector/TextOnPathPanel.d.ts +26 -0
- package/dist/types/vector/VectorEditor.d.ts +32 -0
- package/dist/types/vector/VectorEditorMenuBar.d.ts +8 -0
- package/dist/types/vector/VectorEditorRightPanel.d.ts +7 -0
- package/dist/types/vector/VectorEditorShapeRenderer.d.ts +9 -0
- package/dist/types/vector/VectorEditorStatusBar.d.ts +9 -0
- package/dist/types/vector/VectorFilterPanel.d.ts +19 -0
- package/dist/types/vector/VectorPatternPanel.d.ts +21 -0
- package/dist/types/vector/pathSimplification.d.ts +135 -0
- package/dist/types/vector/pdfExport.d.ts +65 -0
- package/dist/types/vector/textOnPath.d.ts +145 -0
- package/dist/types/vector/useVectorEditor.d.ts +90 -0
- package/dist/types/vector/vectorBooleanOps.d.ts +22 -0
- package/dist/types/vector/vectorEditorExport.d.ts +8 -0
- package/dist/types/vector/vectorEditorImport.d.ts +7 -0
- package/dist/types/vector/vectorEditorTypes.d.ts +47 -0
- package/dist/types/vector/vectorGradients.d.ts +64 -0
- package/dist/types/vector/vectorPatternFills.d.ts +101 -0
- package/dist/types/vector/vectorSvgFilters.d.ts +134 -0
- package/package.json +93 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useGameAssetEditor.ts — State and logic hook for GameAsset2dEditor
|
|
3
|
+
*/
|
|
4
|
+
import type { GameAssetProject, SpriteFrame, SpriteAnimation, AnimationState, AnimationParameter, Effect, EditorState, EditorMode, TileMapTool, SpriteSheetTool } from './gameAssetTypes';
|
|
5
|
+
export interface UseGameAssetEditorOptions {
|
|
6
|
+
onSave?: (project: GameAssetProject) => void;
|
|
7
|
+
onExport?: (data: string, format: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface GameAssetEditorApi {
|
|
10
|
+
project: GameAssetProject;
|
|
11
|
+
setProject: (project: GameAssetProject) => void;
|
|
12
|
+
newProject: (name: string) => void;
|
|
13
|
+
saveProject: () => void;
|
|
14
|
+
loadProject: (file: File) => Promise<void>;
|
|
15
|
+
editorState: EditorState;
|
|
16
|
+
setMode: (mode: EditorMode) => void;
|
|
17
|
+
setTileMapTool: (tool: TileMapTool) => void;
|
|
18
|
+
setSpriteSheetTool: (tool: SpriteSheetTool) => void;
|
|
19
|
+
setZoom: (zoom: number) => void;
|
|
20
|
+
setPan: (x: number, y: number) => void;
|
|
21
|
+
toggleGrid: () => void;
|
|
22
|
+
toggleCollision: () => void;
|
|
23
|
+
toggleSnap: () => void;
|
|
24
|
+
addTile: (imageData: ImageData, name: string) => void;
|
|
25
|
+
removeTile: (id: string) => void;
|
|
26
|
+
selectTile: (id: string | null) => void;
|
|
27
|
+
importTileSet: (file: File) => Promise<void>;
|
|
28
|
+
createTileMap: (name: string, width: number, height: number) => void;
|
|
29
|
+
removeTileMap: (id: string) => void;
|
|
30
|
+
selectTileMap: (id: string | null) => void;
|
|
31
|
+
setTile: (layerId: string, x: number, y: number, tileId: string | null) => void;
|
|
32
|
+
fillTiles: (layerId: string, x: number, y: number, tileId: string | null) => void;
|
|
33
|
+
addLayer: () => void;
|
|
34
|
+
removeLayer: (id: string) => void;
|
|
35
|
+
selectLayer: (id: string | null) => void;
|
|
36
|
+
toggleLayerVisibility: (id: string) => void;
|
|
37
|
+
setLayerOpacity: (id: string, opacity: number) => void;
|
|
38
|
+
moveLayer: (id: string, direction: 'up' | 'down') => void;
|
|
39
|
+
importSpriteSheet: (file: File) => Promise<void>;
|
|
40
|
+
removeSpriteSheet: (id: string) => void;
|
|
41
|
+
selectSpriteSheet: (id: string | null) => void;
|
|
42
|
+
autoSlice: (frameWidth: number, frameHeight: number) => void;
|
|
43
|
+
detectSprites: () => void;
|
|
44
|
+
addFrame: (frame: Omit<SpriteFrame, 'id'>) => void;
|
|
45
|
+
updateFrame: (id: string, updates: Partial<SpriteFrame>) => void;
|
|
46
|
+
removeFrame: (id: string) => void;
|
|
47
|
+
selectFrames: (ids: string[]) => void;
|
|
48
|
+
createAnimation: (name: string, frameIds: string[]) => void;
|
|
49
|
+
removeAnimation: (id: string) => void;
|
|
50
|
+
updateAnimation: (id: string, updates: Partial<SpriteAnimation>) => void;
|
|
51
|
+
createStateMachine: (name: string) => void;
|
|
52
|
+
removeStateMachine: (id: string) => void;
|
|
53
|
+
selectStateMachine: (id: string | null) => void;
|
|
54
|
+
addState: (name: string, animationId: string) => void;
|
|
55
|
+
removeState: (id: string) => void;
|
|
56
|
+
selectState: (id: string | null) => void;
|
|
57
|
+
updateState: (id: string, updates: Partial<AnimationState>) => void;
|
|
58
|
+
addTransition: (fromId: string, toId: string) => void;
|
|
59
|
+
removeTransition: (id: string) => void;
|
|
60
|
+
addParameter: (name: string, type: AnimationParameter['type']) => void;
|
|
61
|
+
removeParameter: (id: string) => void;
|
|
62
|
+
addEffect: (type: Effect['type']) => void;
|
|
63
|
+
removeEffect: (id: string) => void;
|
|
64
|
+
updateEffect: (id: string, updates: Partial<Effect>) => void;
|
|
65
|
+
toggleEffect: (id: string) => void;
|
|
66
|
+
saveEffectPreset: (name: string) => void;
|
|
67
|
+
loadEffectPreset: (id: string) => void;
|
|
68
|
+
previewEffects: (imageData: ImageData) => ImageData;
|
|
69
|
+
undo: () => void;
|
|
70
|
+
redo: () => void;
|
|
71
|
+
canUndo: boolean;
|
|
72
|
+
canRedo: boolean;
|
|
73
|
+
exportTileMap: (format: 'json' | 'tiled-json' | 'png') => void;
|
|
74
|
+
exportSpriteSheet: (format: 'json' | 'png' | 'atlas') => void;
|
|
75
|
+
exportStateMachine: (format: 'json') => void;
|
|
76
|
+
canvasRef: React.RefObject<HTMLCanvasElement>;
|
|
77
|
+
fileInputRef: React.RefObject<HTMLInputElement>;
|
|
78
|
+
}
|
|
79
|
+
export declare const useGameAssetEditor: (options?: UseGameAssetEditorOptions) => GameAssetEditorApi;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useGameAssetExport
|
|
3
|
+
* Hook for exporting game assets from editor contexts
|
|
4
|
+
*/
|
|
5
|
+
import type { ExportFormat, ExportResult, ExportManagerOptions } from './gameAssetExport';
|
|
6
|
+
import type { CollisionShape } from './CollisionEditor';
|
|
7
|
+
export interface UseGameAssetExportOptions {
|
|
8
|
+
/** Asset name */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Asset dimensions */
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
/** Image data (canvas, blob, or path) */
|
|
14
|
+
image: HTMLCanvasElement | Blob | string;
|
|
15
|
+
/** Collision shapes */
|
|
16
|
+
collisions?: CollisionShape[];
|
|
17
|
+
/** Animation frames data */
|
|
18
|
+
frames?: FrameData[];
|
|
19
|
+
/** Default export format */
|
|
20
|
+
defaultFormat?: ExportFormat;
|
|
21
|
+
}
|
|
22
|
+
export interface FrameData {
|
|
23
|
+
/** Frame index */
|
|
24
|
+
index: number;
|
|
25
|
+
/** Frame duration in ms */
|
|
26
|
+
duration: number;
|
|
27
|
+
/** Frame region in source image */
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
/** Anchor point (0-1) */
|
|
33
|
+
anchorX?: number;
|
|
34
|
+
anchorY?: number;
|
|
35
|
+
/** Per-frame collisions */
|
|
36
|
+
collisions?: CollisionShape[];
|
|
37
|
+
}
|
|
38
|
+
export interface ExportState {
|
|
39
|
+
/** Whether export is in progress */
|
|
40
|
+
isExporting: boolean;
|
|
41
|
+
/** Export progress (0-1) */
|
|
42
|
+
progress: number;
|
|
43
|
+
/** Current export step */
|
|
44
|
+
step: string;
|
|
45
|
+
/** Last export results */
|
|
46
|
+
results: ExportResult[] | null;
|
|
47
|
+
/** Last export error */
|
|
48
|
+
error: Error | null;
|
|
49
|
+
}
|
|
50
|
+
export interface UseGameAssetExportReturn {
|
|
51
|
+
/** Export state */
|
|
52
|
+
state: ExportState;
|
|
53
|
+
/** Export to specific format */
|
|
54
|
+
exportTo: (format: ExportFormat, options?: Partial<ExportManagerOptions['formatOptions']>) => Promise<ExportResult[]>;
|
|
55
|
+
/** Export and download */
|
|
56
|
+
exportAndDownload: (format: ExportFormat, options?: Partial<ExportManagerOptions['formatOptions']>) => Promise<void>;
|
|
57
|
+
/** Export and download as ZIP */
|
|
58
|
+
exportAndZip: (format: ExportFormat, options?: Partial<ExportManagerOptions['formatOptions']>) => Promise<void>;
|
|
59
|
+
/** Export to all formats */
|
|
60
|
+
exportAll: () => Promise<Map<ExportFormat, ExportResult[]>>;
|
|
61
|
+
/** Clear last results/error */
|
|
62
|
+
reset: () => void;
|
|
63
|
+
/** Available formats */
|
|
64
|
+
availableFormats: ExportFormat[];
|
|
65
|
+
}
|
|
66
|
+
export declare function useGameAssetExport(options: UseGameAssetExportOptions): UseGameAssetExportReturn;
|
|
67
|
+
export interface ExportWithImageOptions extends UseGameAssetExportOptions {
|
|
68
|
+
/** Include image in export */
|
|
69
|
+
includeImage?: boolean;
|
|
70
|
+
/** Image format */
|
|
71
|
+
imageFormat?: 'png' | 'webp' | 'jpg';
|
|
72
|
+
/** Image quality (0-1, for jpg/webp) */
|
|
73
|
+
imageQuality?: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Export asset data along with image file
|
|
77
|
+
*/
|
|
78
|
+
export declare function exportWithImage(format: ExportFormat, options: ExportWithImageOptions): Promise<{
|
|
79
|
+
data: ExportResult[];
|
|
80
|
+
image?: Blob;
|
|
81
|
+
}>;
|
|
82
|
+
export default useGameAssetExport;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NiceIconEditor.tsx — SVG icon editor integrated with @nice2dev/icons.
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - SVG icon creation and editing (paths, shapes)
|
|
6
|
+
* - Grid-aligned design (24×24, 32×32, 48×48 grids)
|
|
7
|
+
* - Outline/filled style variants
|
|
8
|
+
* - Stroke width and cap adjustments
|
|
9
|
+
* - Export to SVG, React component, PNG (multiple sizes)
|
|
10
|
+
* - Icon set management
|
|
11
|
+
* - Preview on different backgrounds
|
|
12
|
+
*/
|
|
13
|
+
import React from "react";
|
|
14
|
+
export interface IconEditorProps {
|
|
15
|
+
/** Initial SVG content. */
|
|
16
|
+
initialSvg?: string;
|
|
17
|
+
/** Grid size in px. Default: 24. */
|
|
18
|
+
gridSize?: number;
|
|
19
|
+
/** Called on save with SVG string. */
|
|
20
|
+
onSave?: (svg: string) => void;
|
|
21
|
+
/** Called on export. */
|
|
22
|
+
onExport?: (data: IconExportResult) => void;
|
|
23
|
+
/** CSS class. */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IconConfig {
|
|
27
|
+
viewBox: number;
|
|
28
|
+
strokeWidth: number;
|
|
29
|
+
strokeLinecap: "butt" | "round" | "square";
|
|
30
|
+
strokeLinejoin: "miter" | "round" | "bevel";
|
|
31
|
+
fill: string;
|
|
32
|
+
stroke: string;
|
|
33
|
+
variant: "outline" | "filled" | "duotone";
|
|
34
|
+
}
|
|
35
|
+
export interface IconShape {
|
|
36
|
+
id: string;
|
|
37
|
+
type: "path" | "circle" | "rect" | "line" | "polyline" | "polygon";
|
|
38
|
+
d?: string;
|
|
39
|
+
cx?: number;
|
|
40
|
+
cy?: number;
|
|
41
|
+
r?: number;
|
|
42
|
+
x?: number;
|
|
43
|
+
y?: number;
|
|
44
|
+
width?: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
x1?: number;
|
|
47
|
+
y1?: number;
|
|
48
|
+
x2?: number;
|
|
49
|
+
y2?: number;
|
|
50
|
+
points?: string;
|
|
51
|
+
fill?: string;
|
|
52
|
+
stroke?: string;
|
|
53
|
+
strokeWidth?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface IconExportResult {
|
|
56
|
+
svg: string;
|
|
57
|
+
reactComponent: string;
|
|
58
|
+
pngSizes: Map<number, Blob>;
|
|
59
|
+
}
|
|
60
|
+
export type IconVariant = "outline" | "filled" | "duotone";
|
|
61
|
+
export interface IconEditorApi {
|
|
62
|
+
config: IconConfig;
|
|
63
|
+
setConfig: React.Dispatch<React.SetStateAction<IconConfig>>;
|
|
64
|
+
shapes: IconShape[];
|
|
65
|
+
setShapes: React.Dispatch<React.SetStateAction<IconShape[]>>;
|
|
66
|
+
selectedId: string | null;
|
|
67
|
+
setSelectedId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
68
|
+
tool: "select" | "path" | "circle" | "rect" | "line";
|
|
69
|
+
setTool: React.Dispatch<React.SetStateAction<"select" | "path" | "circle" | "rect" | "line">>;
|
|
70
|
+
addShape: (shape: Omit<IconShape, "id">) => void;
|
|
71
|
+
updateShape: (id: string, updates: Partial<IconShape>) => void;
|
|
72
|
+
deleteShape: (id: string) => void;
|
|
73
|
+
toSvg: () => string;
|
|
74
|
+
toReactComponent: (name: string) => string;
|
|
75
|
+
}
|
|
76
|
+
export declare function useIconEditor(initialSvg?: string): IconEditorApi;
|
|
77
|
+
/** SVG icon editor with grid, snap, and export capabilities. */
|
|
78
|
+
export declare const NiceIconEditor: React.FC<IconEditorProps>;
|
|
79
|
+
export default NiceIconEditor;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nice2dev/ui-graphics — Public API
|
|
3
|
+
*
|
|
4
|
+
* Tree-shakeable exports. Import only what you need:
|
|
5
|
+
* import { PixelEditor } from '@nice2dev/ui-graphics';
|
|
6
|
+
* import { NiceI18nProvider } from '@nice2dev/ui-graphics';
|
|
7
|
+
*/
|
|
8
|
+
export { PixelEditor, type PixelEditorProps } from './pixel/PixelEditor';
|
|
9
|
+
export { VectorEditor, type VectorEditorProps } from './vector/VectorEditor';
|
|
10
|
+
export { default as PhotoEditor } from './photo/PhotoEditor';
|
|
11
|
+
export type { PhotoEditorProps } from './photo/photoEditorTypes';
|
|
12
|
+
export { AnimationEditor, type AnimationEditorProps } from './animation/AnimationEditor';
|
|
13
|
+
export { default as AnimatedPerson, type AnimatedPersonProps } from './animation/AnimatedPerson';
|
|
14
|
+
export { GameAsset2dEditor, type GameAsset2dEditorProps, useGameAssetEditor, type GameAssetEditorApi, } from './game';
|
|
15
|
+
export type { TileMap, TileLayer, TileDefinition, SpriteSheet, SpriteFrame, SpriteAnimation, AnimationStateMachine, AnimationState, AnimationTransition, GameAssetProject, Effect, EffectType, } from './game';
|
|
16
|
+
export { NiceI18nProvider, useNiceTranslation, type NiceTranslateFn, type NiceI18nProviderProps, } from './core/i18n';
|
|
17
|
+
export type { Layer, Tool as PixelTool, BlendMode } from './pixel/pixelEditorTypes';
|
|
18
|
+
export { ditherOrdered, ditherFloydSteinberg, ditherAtkinson, applyDithering, extractPalette, hexPaletteToRGBA, createReferenceOverlay, renderReferenceOverlay, type DitheringAlgorithm, type ReferenceOverlay, } from './pixel/pixelEditorUtils';
|
|
19
|
+
export { exportGIF, exportSpriteSheetAdvanced, } from './pixel/pixelEditorExports';
|
|
20
|
+
export type { VShape, VTool as VectorTool } from './vector/vectorEditorTypes';
|
|
21
|
+
export { booleanOperation, shapesOverlap, flattenToOutline, type BooleanOp, } from './vector/vectorBooleanOps';
|
|
22
|
+
export { PRESET_GRADIENTS, gradientToCSS, gradientToSVGDef, createLinearGradient, createRadialGradient, type Gradient, type LinearGradient, type RadialGradient, type GradientStop, } from './vector/vectorGradients';
|
|
23
|
+
export type { AdjustmentValues, FilterParams } from './photo/photoFilters';
|
|
24
|
+
export { magicWandSelect, lassoSelect, magneticLassoPoint, selectColorRange, applyHealingBrush, contentAwareFill, renderSelectionOutline, createEmptyMask, featherMask, invertMask, combineMasks, type SelectionMask, type MagicWandOptions, type HealingBrushOptions, type SelectionMode, } from './photo/photoSelection';
|
|
25
|
+
export type { CharacterConfig, FeatureConfig } from './animation/characterTypes';
|
|
26
|
+
export { VARIANTS, DEFAULT_CHARACTER, DEFAULT_COLORS, pick } from './animation/characterTypes';
|
|
27
|
+
export type { PersonPose, ChoreoStep as AnimChoreoStep } from './animation/animationHelper';
|
|
28
|
+
export { playPose, runChoreo, usePersonControls } from './animation/animationHelper';
|
|
29
|
+
export type { BoneKey, BoneSpec, RigConfig, RigPose, SolvedBone } from './animation/rig/rigTypes';
|
|
30
|
+
export { BONE_ORDER, DEFAULT_RIG, DEFAULT_POSE } from './animation/rig/rigTypes';
|
|
31
|
+
export { solveTwoBoneIK } from './animation/rig/ik';
|
|
32
|
+
export { deg2rad, lerpAngle, solveFK } from './animation/rig/rigMath';
|
|
33
|
+
export { blendPose, tweenPose, ease } from './animation/rig/poseOps';
|
|
34
|
+
export { RIG_SLIM, RIG_HERO, RIG_ROBOT, POSE_HAPPY, POSE_ANGRY, POSE_DANCE_A } from './animation/rig/presets';
|
|
35
|
+
export { default as RiggedBody } from './animation/rig/RiggedBody';
|
|
36
|
+
export { default as RigPlayer } from './animation/rig/RigPlayer';
|
|
37
|
+
export type { RigPlayerHandle } from './animation/rig/RigPlayer';
|
|
38
|
+
export { rigPoseFor, playRigFromChoreo } from './animation/rig/choreoRigBridge';
|
|
39
|
+
export { ChoreoBuilder, seq, compile, runSeq, runWave, runCannon, runRounds } from './animation/choreoDSL';
|
|
40
|
+
export { waveScoreChoreo, booChoreo, danceParty, showcaseAll } from './animation/choreography';
|
|
41
|
+
export { default as Audience } from './animation/Audience';
|
|
42
|
+
export type { AudienceProps } from './animation/Audience';
|
|
43
|
+
export { scoreBus, onScore, reactionForScore, playIntro, simulateScore, attachScoreReactions, } from './animation/karaokeIntegration';
|
|
44
|
+
export { BodyRenderer, default as BodyRendererDefault } from './animation/BodyRenderer';
|
|
45
|
+
export type { BodyRendererProps } from './animation/BodyRenderer';
|
|
46
|
+
export { Head, HEAD_RENDERERS } from './animation/shapes/heads';
|
|
47
|
+
export type { HeadProps } from './animation/shapes/heads';
|
|
48
|
+
export { Eyes, EYES_RENDERERS } from './animation/shapes/eyes';
|
|
49
|
+
export type { EyesProps } from './animation/shapes/eyes';
|
|
50
|
+
export { Nose, NOSE_RENDERERS } from './animation/shapes/noses';
|
|
51
|
+
export type { NoseProps } from './animation/shapes/noses';
|
|
52
|
+
export { Mouth, MOUTH_RENDERERS } from './animation/shapes/mouths';
|
|
53
|
+
export type { MouthProps } from './animation/shapes/mouths';
|
|
54
|
+
export { Hair, HAIR_RENDERERS } from './animation/shapes/hair';
|
|
55
|
+
export type { HairProps } from './animation/shapes/hair';
|
|
56
|
+
export { Outfit, OUTFIT_RENDERERS } from './animation/shapes/outfits';
|
|
57
|
+
export type { OutfitProps } from './animation/shapes/outfits';
|
|
58
|
+
export { Torso } from './animation/shapes/torsos';
|
|
59
|
+
export type { TorsoProps } from './animation/shapes/torsos';
|
|
60
|
+
export { Arm } from './animation/shapes/arms';
|
|
61
|
+
export type { ArmProps } from './animation/shapes/arms';
|
|
62
|
+
export { Leg } from './animation/shapes/legs';
|
|
63
|
+
export type { LegProps } from './animation/shapes/legs';
|
|
64
|
+
export { Headwear, HEADWEAR_RENDERERS } from './animation/shapes/headwear';
|
|
65
|
+
export type { HeadwearProps } from './animation/shapes/headwear';
|
|
66
|
+
export { createRagdoll, stepRagdoll, ragdollToPose, applyImpulse, createCloth, stepCloth, clothVertices, pinClothParticle, type PhysicsParticle, type DistanceConstraint, type RagdollConfig, type Ragdoll, type Cloth, } from './animation/physics';
|
|
67
|
+
export { evaluatePath, evaluatePathTangent, pathLength, arcLengthTable, distanceToT, createLinearPath, createCircularPath, createFigure8Path, evaluateMotionPathAnimation, PRESET_PATHS, type MotionPath, type BezierPoint, type MotionPathKeyframe, type MotionPathAnimation, } from './animation/motionPath';
|
|
68
|
+
export { exportToLottie, lottieToJSON, lottieToBlob, choreoToLottieKeyframes, } from './animation/lottieExport';
|
|
69
|
+
export { exportToSpine, spineToJSON, spineToBlob, } from './animation/spineExport';
|
|
70
|
+
export { PluginRegistry, NicePluginProvider, usePlugins, usePluginRegistry, type EditorPlugin, type PluginTool, type PluginFilter, type PluginExporter, type PluginPanel, type PluginMenuAction, } from './core/plugins';
|
|
71
|
+
export { useVisualHistory, VisualHistoryPanel, type HistoryEntry, type VisualHistoryApi, } from './core/historyVisual';
|
|
72
|
+
export { ShortcutRegistry, DEFAULT_SHORTCUTS, useShortcuts, eventToKeyCombo, type ShortcutDef, type ShortcutConfig, } from './core/shortcuts';
|
|
73
|
+
export { useDragDrop, DropZoneOverlay, type DragDropConfig, type DropResult, type DragDropState, type DropZoneOverlayProps, } from './core/dragDrop';
|
|
74
|
+
export { NiceRTLProvider, useRTL, useIsRTL, logicalStyles, rtlFlexDirection, detectDirection, type Direction, type RTLConfig, } from './core/rtl';
|
|
75
|
+
export { Minimap, useMinimap, type MinimapProps, type MinimapConfig, type ViewportRect, } from './core/minimap';
|
|
76
|
+
export { drawGrid, drawHorizontalRuler, drawVerticalRuler, drawGuides, snapToGrid, snapToGuides, snapToPixel, snapPoint, createGuide, addGuide, removeGuide, clearGuides, type GridConfig, type RulersConfig, type GuidesConfig, type Guide, type SnapResult, } from './core/gridGuides';
|
|
77
|
+
export { simulateColorBlindness, simulateColorBlindnessCopy, applyColorBlindnessFilter, simulateColor, colorBlindnessSvgFilter, COLOR_BLINDNESS_TYPES, type ColorBlindnessType, type ColorBlindnessInfo, } from './core/colorBlindness';
|
|
78
|
+
export { LIGHT_THEME, DARK_THEME, themeToCssVars, applyThemeToElement, systemPrefersDark, resolveThemeMode, NiceEditorThemeProvider, useEditorTheme, type EditorTheme, type ThemeMode, } from './core/theme';
|
|
79
|
+
export { NiceIconEditor, useIconEditor, type IconShape, type IconVariant, type IconEditorApi, } from './icon/NiceIconEditor';
|
|
80
|
+
export { NiceUIDesigner, useUIDesigner, exportToReact, type UINode, type UIDesignerApi, } from './ui/NiceUIDesigner';
|
|
81
|
+
export { Nice3DTexturePainter, useTexturePainter, type TextureLayer, type BrushSettings, type TexturePainterApi, } from './texture/Nice3DTexturePainter';
|
|
82
|
+
export { NiceFontEditor, useFontEditor, exportToSvgFont, type FontGlyph, type FontMetrics, type FontEditorApi, } from './font/NiceFontEditor';
|
|
83
|
+
export { UnsplashProvider, PexelsProvider, AdobeCCConnector, FigmaConnector, TemplateLibrary, generateAIImage, type StockImage, type StockImageSearchOptions, type FigmaImportResult, type FigmaNode, type AIGenerationOptions, type AIGenerationResult, type TemplateItem, type AdobeCCConfig, } from './core/integrations';
|
|
84
|
+
export { WebSocketTransport, VersionHistory, CommentManager, useCollaboration, useComments, useVersionHistory, type CollaborationUser, type CollaborationOperation, type CollaborationTransport, type CollaborationMessage, type Comment, type CommentReply, type VersionSnapshot, } from './core/collaboration';
|
|
85
|
+
export { setupRetinaCanvas, retinaMousePosition, virtualizeShapes, SpatialHashGrid, AnimationCleanup, type RetinaCanvasOptions, type VirtualBounds, type VirtualizedShape, } from './core/fixes';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BatchProcessingPanel
|
|
3
|
+
* UI panel for batch processing in PhotoEditor
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface BatchProcessingPanelProps {
|
|
7
|
+
/** Called when processing complete */
|
|
8
|
+
onComplete?: () => void;
|
|
9
|
+
/** Custom class name */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const BatchProcessingPanel: React.FC<BatchProcessingPanelProps>;
|
|
13
|
+
export default BatchProcessingPanel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FaceDetectionPanel — UI for face detection and auto-crop
|
|
3
|
+
*/
|
|
4
|
+
import { FaceRegion } from './faceDetection';
|
|
5
|
+
export interface FaceDetectionPanelProps {
|
|
6
|
+
/** Source image data */
|
|
7
|
+
imageData: ImageData | null;
|
|
8
|
+
/** Callback when crop is applied */
|
|
9
|
+
onCrop: (x: number, y: number, width: number, height: number) => void;
|
|
10
|
+
/** Callback when face regions are detected */
|
|
11
|
+
onFacesDetected?: (faces: FaceRegion[]) => void;
|
|
12
|
+
/** Optional class name */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Panel title */
|
|
15
|
+
title?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function FaceDetectionPanel({ imageData, onCrop, onFacesDetected, className, title, }: FaceDetectionPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default FaceDetectionPanel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FilterThumb — Thumbnail preview for a photo filter.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import type { FilterDefinition } from "./photoFilters";
|
|
6
|
+
interface Props {
|
|
7
|
+
filter: FilterDefinition;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
accent: string;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
generateThumbnail: (canvas: HTMLCanvasElement, filter: FilterDefinition) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const FilterThumb: React.FC<Props>;
|
|
14
|
+
export default FilterThumb;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PerspectiveCorrectionPanel
|
|
3
|
+
* UI panel for perspective correction in PhotoEditor
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface PerspectiveCorrectionPanelProps {
|
|
7
|
+
/** Source image data */
|
|
8
|
+
imageData: ImageData;
|
|
9
|
+
/** Called when correction is applied */
|
|
10
|
+
onApply: (result: ImageData) => void;
|
|
11
|
+
/** Called when cancelled */
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
/** Custom class name */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const PerspectiveCorrectionPanel: React.FC<PerspectiveCorrectionPanelProps>;
|
|
17
|
+
export default PerspectiveCorrectionPanel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PhotoEditorCanvas.tsx — Canvas viewport for the PhotoEditor.
|
|
3
|
+
*
|
|
4
|
+
* Shows either:
|
|
5
|
+
* - Compare mode (before / after with a slider)
|
|
6
|
+
* - Regular mode (main canvas + optional crop overlay)
|
|
7
|
+
*/
|
|
8
|
+
import React from "react";
|
|
9
|
+
import type { PhotoEditorAPI } from "./usePhotoEditor";
|
|
10
|
+
interface Props {
|
|
11
|
+
api: PhotoEditorAPI;
|
|
12
|
+
}
|
|
13
|
+
declare const PhotoEditorCanvas: React.FC<Props>;
|
|
14
|
+
export default PhotoEditorCanvas;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PhotoEditorLeftPanel.tsx — Left sidebar of the PhotoEditor.
|
|
3
|
+
*
|
|
4
|
+
* Contains 8 tab buttons and their corresponding panel content:
|
|
5
|
+
* Filters, Adjust, Crop, Transform, Stickers, Text, Shapes, Draw
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
import type { PhotoEditorAPI } from "./usePhotoEditor";
|
|
9
|
+
interface Props {
|
|
10
|
+
api: PhotoEditorAPI;
|
|
11
|
+
}
|
|
12
|
+
declare const PhotoEditorLeftPanel: React.FC<Props>;
|
|
13
|
+
export default PhotoEditorLeftPanel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PhotoEditorToolbar.tsx — Top toolbar for the PhotoEditor.
|
|
3
|
+
*
|
|
4
|
+
* Includes undo / redo / reset, compare toggle, download / clipboard / share,
|
|
5
|
+
* title, cancel and save (apply) buttons.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
import type { PhotoEditorAPI } from "./usePhotoEditor";
|
|
9
|
+
interface Props {
|
|
10
|
+
api: PhotoEditorAPI;
|
|
11
|
+
}
|
|
12
|
+
declare const PhotoEditorToolbar: React.FC<Props>;
|
|
13
|
+
export default PhotoEditorToolbar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RawFilePanel — UI for RAW file loading and processing
|
|
3
|
+
*/
|
|
4
|
+
import { RawMetadata } from './rawFileSupport';
|
|
5
|
+
export interface RawFilePanelProps {
|
|
6
|
+
/** Callback when RAW file is processed */
|
|
7
|
+
onLoad: (imageData: ImageData, metadata: RawMetadata) => void;
|
|
8
|
+
/** Optional class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Panel title */
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function RawFilePanel({ onLoad, className, title, }: RawFilePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default RawFilePanel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StyleTransferPanel — UI for AI-based style transfer
|
|
3
|
+
*/
|
|
4
|
+
export interface StyleTransferPanelProps {
|
|
5
|
+
/** Source image data */
|
|
6
|
+
imageData: ImageData | null;
|
|
7
|
+
/** Callback when style transfer is applied */
|
|
8
|
+
onApply: (result: ImageData) => void;
|
|
9
|
+
/** Optional class name */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Panel title */
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function StyleTransferPanel({ imageData, onApply, className, title, }: StyleTransferPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default StyleTransferPanel;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* aiStyleTransfer — AI-based style transfer filters for PhotoEditor
|
|
3
|
+
*
|
|
4
|
+
* This module implements neural style transfer effects using pure canvas operations
|
|
5
|
+
* for lightweight, dependency-free artistic filters. Also supports optional
|
|
6
|
+
* TensorFlow.js integration for more advanced neural style transfer.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Pre-defined artistic styles (oil painting, watercolor, sketch, etc.)
|
|
10
|
+
* - Real-time preview with downscaled processing
|
|
11
|
+
* - Adjustable style intensity
|
|
12
|
+
* - Optional TF.js for advanced neural transfer
|
|
13
|
+
*/
|
|
14
|
+
export type StylePreset = 'oil-painting' | 'watercolor' | 'pencil-sketch' | 'charcoal' | 'impressionist' | 'pop-art' | 'vintage' | 'noir' | 'cyberpunk' | 'anime' | 'pixel-art' | 'mosaic' | 'pointillism' | 'stained-glass' | 'custom';
|
|
15
|
+
export interface StyleTransferOptions {
|
|
16
|
+
/** Style preset to apply */
|
|
17
|
+
style: StylePreset;
|
|
18
|
+
/** Intensity of the effect (0-1) */
|
|
19
|
+
intensity: number;
|
|
20
|
+
/** Detail preservation (0-1) */
|
|
21
|
+
detailPreservation: number;
|
|
22
|
+
/** Color saturation adjustment (-1 to 1) */
|
|
23
|
+
saturation: number;
|
|
24
|
+
/** Custom style image (for 'custom' preset) */
|
|
25
|
+
customStyleImage?: ImageData;
|
|
26
|
+
/** Processing quality (affects speed vs quality) */
|
|
27
|
+
quality: 'fast' | 'balanced' | 'high';
|
|
28
|
+
}
|
|
29
|
+
export interface StyleTransferResult {
|
|
30
|
+
imageData: ImageData;
|
|
31
|
+
processingTimeMs: number;
|
|
32
|
+
style: StylePreset;
|
|
33
|
+
}
|
|
34
|
+
export declare const DEFAULT_STYLE_OPTIONS: StyleTransferOptions;
|
|
35
|
+
export declare const STYLE_PRESETS: Record<StylePreset, {
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Downscale image for faster preview processing
|
|
41
|
+
*/
|
|
42
|
+
export declare function downscaleForPreview(imageData: ImageData, quality: 'fast' | 'balanced' | 'high'): {
|
|
43
|
+
data: ImageData;
|
|
44
|
+
scale: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Upscale processed image back to original size
|
|
48
|
+
*/
|
|
49
|
+
export declare function upscaleFromPreview(imageData: ImageData, originalWidth: number, originalHeight: number): ImageData;
|
|
50
|
+
/**
|
|
51
|
+
* Apply style transfer to an image
|
|
52
|
+
*/
|
|
53
|
+
export declare function applyStyleTransfer(imageData: ImageData, options?: Partial<StyleTransferOptions>): StyleTransferResult;
|
|
54
|
+
/**
|
|
55
|
+
* Generate preview thumbnails for all styles
|
|
56
|
+
*/
|
|
57
|
+
export declare function generateStylePreviews(imageData: ImageData, size?: number): Promise<Map<StylePreset, ImageData>>;
|
|
58
|
+
export default applyStyleTransfer;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* batchProcessing.ts
|
|
3
|
+
* Batch image processing utilities for PhotoEditor
|
|
4
|
+
*/
|
|
5
|
+
/** Image processing operation */
|
|
6
|
+
export interface ProcessingOperation {
|
|
7
|
+
type: string;
|
|
8
|
+
params: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/** Single batch item */
|
|
11
|
+
export interface BatchItem {
|
|
12
|
+
id: string;
|
|
13
|
+
file: File;
|
|
14
|
+
status: 'pending' | 'processing' | 'completed' | 'error';
|
|
15
|
+
progress: number;
|
|
16
|
+
result?: Blob;
|
|
17
|
+
error?: string;
|
|
18
|
+
preview?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Batch processing settings */
|
|
21
|
+
export interface BatchSettings {
|
|
22
|
+
/** Operations to apply */
|
|
23
|
+
operations: ProcessingOperation[];
|
|
24
|
+
/** Output format */
|
|
25
|
+
outputFormat: 'jpeg' | 'png' | 'webp';
|
|
26
|
+
/** Output quality (0-1) */
|
|
27
|
+
quality: number;
|
|
28
|
+
/** Resize settings */
|
|
29
|
+
resize?: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
maintainAspect: boolean;
|
|
34
|
+
mode: 'fit' | 'fill' | 'stretch';
|
|
35
|
+
};
|
|
36
|
+
/** Naming pattern */
|
|
37
|
+
namingPattern: string;
|
|
38
|
+
/** Preserve metadata */
|
|
39
|
+
preserveMetadata: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Processing result */
|
|
42
|
+
export interface BatchResult {
|
|
43
|
+
totalFiles: number;
|
|
44
|
+
completedFiles: number;
|
|
45
|
+
failedFiles: number;
|
|
46
|
+
totalTime: number;
|
|
47
|
+
results: BatchItem[];
|
|
48
|
+
}
|
|
49
|
+
/** Available filter types */
|
|
50
|
+
export type FilterType = 'brightness' | 'contrast' | 'saturation' | 'hue' | 'grayscale' | 'sepia' | 'invert' | 'blur' | 'sharpen' | 'vignette' | 'exposure' | 'gamma' | 'temperature' | 'posterize' | 'noise';
|
|
51
|
+
/** Filter presets */
|
|
52
|
+
export interface FilterPreset {
|
|
53
|
+
name: string;
|
|
54
|
+
operations: ProcessingOperation[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Apply single operation to image data
|
|
58
|
+
*/
|
|
59
|
+
export declare function applyOperation(imageData: ImageData, operation: ProcessingOperation): void;
|
|
60
|
+
/**
|
|
61
|
+
* Process single image file
|
|
62
|
+
*/
|
|
63
|
+
export declare function processImage(file: File, settings: BatchSettings, onProgress?: (progress: number) => void): Promise<Blob>;
|
|
64
|
+
/**
|
|
65
|
+
* Process multiple images in batch
|
|
66
|
+
*/
|
|
67
|
+
export declare function processBatch(files: File[], settings: BatchSettings, onItemProgress?: (itemId: string, progress: number) => void, onItemComplete?: (item: BatchItem) => void): Promise<BatchResult>;
|
|
68
|
+
/**
|
|
69
|
+
* Generate output filename
|
|
70
|
+
*/
|
|
71
|
+
export declare function generateOutputFilename(original: string, pattern: string, index: number, format: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* Download all batch results as ZIP
|
|
74
|
+
*/
|
|
75
|
+
export declare function downloadBatchAsZip(result: BatchResult, settings: BatchSettings): Promise<void>;
|
|
76
|
+
export declare const FILTER_PRESETS: FilterPreset[];
|
|
77
|
+
export declare const DEFAULT_BATCH_SETTINGS: BatchSettings;
|
|
78
|
+
export interface UseBatchProcessingOptions {
|
|
79
|
+
onComplete?: (result: BatchResult) => void;
|
|
80
|
+
}
|
|
81
|
+
export declare function useBatchProcessing(options?: UseBatchProcessingOptions): {
|
|
82
|
+
files: File[];
|
|
83
|
+
items: BatchItem[];
|
|
84
|
+
settings: BatchSettings;
|
|
85
|
+
setSettings: import("react").Dispatch<import("react").SetStateAction<BatchSettings>>;
|
|
86
|
+
isProcessing: boolean;
|
|
87
|
+
result: BatchResult | null;
|
|
88
|
+
addFiles: (newFiles: File[]) => void;
|
|
89
|
+
removeFile: (index: number) => void;
|
|
90
|
+
clearFiles: () => void;
|
|
91
|
+
addOperation: (operation: ProcessingOperation) => void;
|
|
92
|
+
removeOperation: (index: number) => void;
|
|
93
|
+
applyPreset: (preset: FilterPreset) => void;
|
|
94
|
+
process: () => Promise<void>;
|
|
95
|
+
};
|