@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,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rawFileSupport — RAW camera file support for PhotoEditor
|
|
3
|
+
*
|
|
4
|
+
* Provides loading and processing of RAW camera formats including:
|
|
5
|
+
* - Canon (.CR2, .CR3, .CRW)
|
|
6
|
+
* - Nikon (.NEF, .NRW)
|
|
7
|
+
* - Sony (.ARW, .SRF, .SR2)
|
|
8
|
+
* - Adobe (.DNG)
|
|
9
|
+
* - Fujifilm (.RAF)
|
|
10
|
+
* - Olympus (.ORF)
|
|
11
|
+
* - Panasonic (.RW2)
|
|
12
|
+
* - Pentax (.PEF, .DNG)
|
|
13
|
+
* - And many more via embedded thumbnail or DCRaw emulation
|
|
14
|
+
*
|
|
15
|
+
* Features:
|
|
16
|
+
* - Embedded preview extraction (fast)
|
|
17
|
+
* - Full demosaic processing (with optional libraw.js)
|
|
18
|
+
* - White balance adjustment
|
|
19
|
+
* - Exposure compensation
|
|
20
|
+
* - Highlight recovery
|
|
21
|
+
* - Noise reduction
|
|
22
|
+
*/
|
|
23
|
+
export type RawFormat = 'cr2' | 'cr3' | 'crw' | 'nef' | 'nrw' | 'arw' | 'srf' | 'sr2' | 'dng' | 'raf' | 'orf' | 'rw2' | 'pef' | 'raw' | '3fr' | 'fff' | 'iiq' | 'mrw' | 'x3f' | 'rwl' | 'srw' | 'unknown';
|
|
24
|
+
export interface RawMetadata {
|
|
25
|
+
/** Camera maker */
|
|
26
|
+
make: string;
|
|
27
|
+
/** Camera model */
|
|
28
|
+
model: string;
|
|
29
|
+
/** Image width */
|
|
30
|
+
width: number;
|
|
31
|
+
/** Image height */
|
|
32
|
+
height: number;
|
|
33
|
+
/** ISO sensitivity */
|
|
34
|
+
iso: number;
|
|
35
|
+
/** Shutter speed (seconds) */
|
|
36
|
+
shutterSpeed: number;
|
|
37
|
+
/** Aperture (f-number) */
|
|
38
|
+
aperture: number;
|
|
39
|
+
/** Focal length (mm) */
|
|
40
|
+
focalLength: number;
|
|
41
|
+
/** Capture date */
|
|
42
|
+
dateTime: Date | null;
|
|
43
|
+
/** Orientation (EXIF) */
|
|
44
|
+
orientation: number;
|
|
45
|
+
/** Color temperature (K) */
|
|
46
|
+
colorTemperature: number;
|
|
47
|
+
/** Detected RAW format */
|
|
48
|
+
format: RawFormat;
|
|
49
|
+
/** Has embedded preview */
|
|
50
|
+
hasPreview: boolean;
|
|
51
|
+
/** Has embedded thumbnail */
|
|
52
|
+
hasThumbnail: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface RawProcessingOptions {
|
|
55
|
+
/** Use embedded preview instead of demosaic */
|
|
56
|
+
usePreview: boolean;
|
|
57
|
+
/** White balance mode */
|
|
58
|
+
whiteBalance: 'camera' | 'auto' | 'daylight' | 'cloudy' | 'shade' | 'tungsten' | 'fluorescent' | 'flash' | 'custom';
|
|
59
|
+
/** Custom color temperature (K) */
|
|
60
|
+
colorTemperature: number;
|
|
61
|
+
/** Custom tint (green-magenta) */
|
|
62
|
+
tint: number;
|
|
63
|
+
/** Exposure compensation (EV) */
|
|
64
|
+
exposure: number;
|
|
65
|
+
/** Highlight recovery (0-1) */
|
|
66
|
+
highlightRecovery: number;
|
|
67
|
+
/** Shadow recovery (0-1) */
|
|
68
|
+
shadowRecovery: number;
|
|
69
|
+
/** Noise reduction level (0-1) */
|
|
70
|
+
noiseReduction: number;
|
|
71
|
+
/** Chromatic aberration correction */
|
|
72
|
+
chromaticAberration: boolean;
|
|
73
|
+
/** Output color space */
|
|
74
|
+
colorSpace: 'sRGB' | 'AdobeRGB' | 'ProPhotoRGB';
|
|
75
|
+
/** Output bit depth */
|
|
76
|
+
bitDepth: 8 | 16;
|
|
77
|
+
/** Demosaic algorithm */
|
|
78
|
+
demosaicAlgorithm: 'bilinear' | 'VNG' | 'PPG' | 'AHD' | 'DCB';
|
|
79
|
+
}
|
|
80
|
+
export interface RawLoadResult {
|
|
81
|
+
/** Processed image data */
|
|
82
|
+
imageData: ImageData;
|
|
83
|
+
/** Raw file metadata */
|
|
84
|
+
metadata: RawMetadata;
|
|
85
|
+
/** Processing info */
|
|
86
|
+
processingInfo: {
|
|
87
|
+
method: 'preview' | 'thumbnail' | 'demosaic';
|
|
88
|
+
timeMs: number;
|
|
89
|
+
originalWidth: number;
|
|
90
|
+
originalHeight: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export declare const DEFAULT_RAW_OPTIONS: RawProcessingOptions;
|
|
94
|
+
export declare const RAW_EXTENSIONS: Record<RawFormat, string[]>;
|
|
95
|
+
export declare const ALL_RAW_EXTENSIONS: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Detect RAW format from file extension
|
|
98
|
+
*/
|
|
99
|
+
export declare function detectFormatFromExtension(filename: string): RawFormat;
|
|
100
|
+
/**
|
|
101
|
+
* Detect RAW format from file header
|
|
102
|
+
*/
|
|
103
|
+
export declare function detectFormatFromHeader(buffer: ArrayBuffer): RawFormat;
|
|
104
|
+
/**
|
|
105
|
+
* Check if file is a RAW format
|
|
106
|
+
*/
|
|
107
|
+
export declare function isRawFile(filename: string): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Extract metadata from RAW file
|
|
110
|
+
*/
|
|
111
|
+
export declare function extractMetadata(buffer: ArrayBuffer): RawMetadata;
|
|
112
|
+
/**
|
|
113
|
+
* Extract embedded JPEG preview from RAW file
|
|
114
|
+
*/
|
|
115
|
+
export declare function extractPreview(buffer: ArrayBuffer): Promise<ImageData | null>;
|
|
116
|
+
/**
|
|
117
|
+
* Load and process RAW file
|
|
118
|
+
*/
|
|
119
|
+
export declare function loadRawFile(buffer: ArrayBuffer, options?: Partial<RawProcessingOptions>): Promise<RawLoadResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Quick preview load (just extract embedded preview)
|
|
122
|
+
*/
|
|
123
|
+
export declare function loadRawPreview(buffer: ArrayBuffer): Promise<ImageData | null>;
|
|
124
|
+
export default loadRawFile;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePhotoEditor.ts — Custom hook encapsulating all PhotoEditor state & logic.
|
|
3
|
+
*
|
|
4
|
+
* Extracts ~500 lines of state, effects, callbacks, and memoised values
|
|
5
|
+
* out of the god-component so that the main component file is pure composition.
|
|
6
|
+
*/
|
|
7
|
+
import { type NiceTranslateFn } from "../core/i18n";
|
|
8
|
+
import { type AdjustmentValues, type FilterDefinition } from "./photoFilters";
|
|
9
|
+
import { type Overlay, type DrawingOverlay, createEmojiOverlay, createTextOverlay, createShapeOverlay, createFrameOverlay } from "./photoOverlays";
|
|
10
|
+
import { type PhotoEditorProps, type EditorTab, type FilterCategory } from "./photoEditorTypes";
|
|
11
|
+
export interface PhotoEditorAPI {
|
|
12
|
+
t: NiceTranslateFn;
|
|
13
|
+
playerColor: string;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
accent: string;
|
|
16
|
+
accentDim: string;
|
|
17
|
+
image: HTMLImageElement | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
activeTab: EditorTab;
|
|
20
|
+
setActiveTab: (tab: EditorTab) => void;
|
|
21
|
+
setCropMode: (v: boolean) => void;
|
|
22
|
+
selectedFilter: string;
|
|
23
|
+
setSelectedFilter: (f: string) => void;
|
|
24
|
+
filterIntensity: number;
|
|
25
|
+
setFilterIntensity: (v: number) => void;
|
|
26
|
+
filterCategory: FilterCategory;
|
|
27
|
+
setFilterCategory: (c: FilterCategory) => void;
|
|
28
|
+
filteredList: FilterDefinition[];
|
|
29
|
+
generateThumbnail: (canvas: HTMLCanvasElement, filter: FilterDefinition) => void;
|
|
30
|
+
adjustments: AdjustmentValues;
|
|
31
|
+
handleAdjChange: (key: keyof AdjustmentValues, value: number) => void;
|
|
32
|
+
handleAdjChangeEnd: () => void;
|
|
33
|
+
rotation: number;
|
|
34
|
+
setRotation: (v: number) => void;
|
|
35
|
+
flipH: boolean;
|
|
36
|
+
setFlipH: (v: boolean) => void;
|
|
37
|
+
flipV: boolean;
|
|
38
|
+
setFlipV: (v: boolean) => void;
|
|
39
|
+
zoom: number;
|
|
40
|
+
setZoom: (v: number) => void;
|
|
41
|
+
cropMode: boolean;
|
|
42
|
+
cropRect: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
w: number;
|
|
46
|
+
h: number;
|
|
47
|
+
} | null;
|
|
48
|
+
setCropRect: (r: {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
w: number;
|
|
52
|
+
h: number;
|
|
53
|
+
} | null) => void;
|
|
54
|
+
cropAspect: number | null;
|
|
55
|
+
setCropAspect: (v: number | null) => void;
|
|
56
|
+
handleCropMouseDown: (e: React.MouseEvent, handle: string) => void;
|
|
57
|
+
showCompare: boolean;
|
|
58
|
+
setShowCompare: (v: boolean) => void;
|
|
59
|
+
comparePosition: number;
|
|
60
|
+
setCompareDragging: (v: boolean) => void;
|
|
61
|
+
overlays: Overlay[];
|
|
62
|
+
setOverlays: React.Dispatch<React.SetStateAction<Overlay[]>>;
|
|
63
|
+
selectedOverlayId: string | null;
|
|
64
|
+
setSelectedOverlayId: (id: string | null) => void;
|
|
65
|
+
selectedOverlay: Overlay | null;
|
|
66
|
+
addOverlay: (ov: Overlay) => void;
|
|
67
|
+
updateOverlay: (id: string, patch: Partial<Overlay>) => void;
|
|
68
|
+
deleteOverlay: (id: string) => void;
|
|
69
|
+
moveOverlayForward: (id: string) => void;
|
|
70
|
+
moveOverlayBack: (id: string) => void;
|
|
71
|
+
emojiCat: string;
|
|
72
|
+
setEmojiCat: (id: string) => void;
|
|
73
|
+
textDraft: string;
|
|
74
|
+
setTextDraft: (v: string) => void;
|
|
75
|
+
textColor: string;
|
|
76
|
+
setTextColor: (v: string) => void;
|
|
77
|
+
textBold: boolean;
|
|
78
|
+
setTextBold: (v: boolean) => void;
|
|
79
|
+
textItalic: boolean;
|
|
80
|
+
setTextItalic: (v: boolean) => void;
|
|
81
|
+
textOutline: boolean;
|
|
82
|
+
setTextOutline: (v: boolean) => void;
|
|
83
|
+
textFontSize: number;
|
|
84
|
+
setTextFontSize: (v: number) => void;
|
|
85
|
+
textBg: boolean;
|
|
86
|
+
setTextBg: (v: boolean) => void;
|
|
87
|
+
shapeStroke: string;
|
|
88
|
+
setShapeStroke: (v: string) => void;
|
|
89
|
+
shapeFill: string;
|
|
90
|
+
setShapeFill: (v: string) => void;
|
|
91
|
+
shapeStrokeW: number;
|
|
92
|
+
setShapeStrokeW: (v: number) => void;
|
|
93
|
+
frameColor: string;
|
|
94
|
+
setFrameColor: (v: string) => void;
|
|
95
|
+
frameThick: number;
|
|
96
|
+
setFrameThick: (v: number) => void;
|
|
97
|
+
drawColor: string;
|
|
98
|
+
setDrawColor: (v: string) => void;
|
|
99
|
+
drawWidth: number;
|
|
100
|
+
setDrawWidth: (v: number) => void;
|
|
101
|
+
drawingOverlayRef: React.MutableRefObject<DrawingOverlay | null>;
|
|
102
|
+
historyIdx: number;
|
|
103
|
+
historyLength: number;
|
|
104
|
+
undo: () => void;
|
|
105
|
+
redo: () => void;
|
|
106
|
+
pushHistory: () => void;
|
|
107
|
+
handleSave: () => Promise<void>;
|
|
108
|
+
handleReset: () => void;
|
|
109
|
+
handleDownload: () => Promise<void>;
|
|
110
|
+
handleCopyToClipboard: () => Promise<void>;
|
|
111
|
+
handleShareNative: () => Promise<void>;
|
|
112
|
+
mainCanvasRef: React.RefObject<HTMLCanvasElement>;
|
|
113
|
+
compareCanvasRef: React.RefObject<HTMLCanvasElement>;
|
|
114
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
115
|
+
handleCanvasMouseDown: (e: React.MouseEvent) => void;
|
|
116
|
+
handleCanvasMouseMove: (e: React.MouseEvent) => void;
|
|
117
|
+
handleCanvasMouseUp: () => void;
|
|
118
|
+
createEmojiOverlay: typeof createEmojiOverlay;
|
|
119
|
+
createTextOverlay: typeof createTextOverlay;
|
|
120
|
+
createShapeOverlay: typeof createShapeOverlay;
|
|
121
|
+
createFrameOverlay: typeof createFrameOverlay;
|
|
122
|
+
}
|
|
123
|
+
export declare function usePhotoEditor({ src, playerColor, onSave, onCancel, initialState }: PhotoEditorProps): PhotoEditorAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HSVPicker — Color picker using HSV model.
|
|
3
|
+
* Accepts a hex color string and outputs hex color strings via onChange.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface Props {
|
|
7
|
+
color: string;
|
|
8
|
+
onChange: (color: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const HSVPicker: React.FC<Props>;
|
|
11
|
+
export default HSVPicker;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PaletteExtractorPanel — UI for extracting palettes from images
|
|
3
|
+
*/
|
|
4
|
+
export interface PaletteExtractorPanelProps {
|
|
5
|
+
/** Current image data to extract from */
|
|
6
|
+
imageData?: ImageData | null;
|
|
7
|
+
/** Called when palette is extracted */
|
|
8
|
+
onExtract?: (colors: string[]) => void;
|
|
9
|
+
/** Called when palette is applied */
|
|
10
|
+
onApply?: (colors: string[]) => void;
|
|
11
|
+
/** Current palette for comparison */
|
|
12
|
+
currentPalette?: string[];
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function PaletteExtractorPanel({ imageData, onExtract, onApply, currentPalette, className, }: PaletteExtractorPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default PaletteExtractorPanel;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditor — Aseprite-inspired pixel art editor.
|
|
3
|
+
*
|
|
4
|
+
* Refactored: logic extracted to usePixelEditor hook,
|
|
5
|
+
* UI split into PixelEditorMenuBar, PixelEditorToolbar,
|
|
6
|
+
* PixelEditorCanvas, PixelEditorRightPanel, PixelEditorTimeline,
|
|
7
|
+
* PixelEditorStatusBar.
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
export interface PixelEditorProps {
|
|
11
|
+
initialWidth?: number;
|
|
12
|
+
initialHeight?: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
onSaveToLibrary?: (dataUrl: string, name: string, mimeType: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const PixelEditor: React.FC<PixelEditorProps>;
|
|
17
|
+
export default PixelEditor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorCanvas — the main canvas element with pointer and wheel handlers.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
6
|
+
interface Props {
|
|
7
|
+
api: PixelEditorAPI;
|
|
8
|
+
}
|
|
9
|
+
declare const PixelEditorCanvas: React.FC<Props>;
|
|
10
|
+
export default PixelEditorCanvas;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorMenuBar — top menu bar for PixelEditor.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
6
|
+
interface Props {
|
|
7
|
+
api: PixelEditorAPI;
|
|
8
|
+
hasOnSaveToLibrary: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const PixelEditorMenuBar: React.FC<Props>;
|
|
11
|
+
export default PixelEditorMenuBar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorRightPanel — brush config, HSV colour picker,
|
|
3
|
+
* layer management and palette.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
7
|
+
interface Props {
|
|
8
|
+
api: PixelEditorAPI;
|
|
9
|
+
}
|
|
10
|
+
declare const PixelEditorRightPanel: React.FC<Props>;
|
|
11
|
+
export default PixelEditorRightPanel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorStatusBar — bottom status bar showing
|
|
3
|
+
* canvas info, cursor position, tool, brush, pressure, layer, frame.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
7
|
+
interface Props {
|
|
8
|
+
api: PixelEditorAPI;
|
|
9
|
+
}
|
|
10
|
+
declare const PixelEditorStatusBar: React.FC<Props>;
|
|
11
|
+
export default PixelEditorStatusBar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorTimeline — bottom panel with frame management,
|
|
3
|
+
* playback controls, onion skin toggle and frame thumbnails.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
7
|
+
interface Props {
|
|
8
|
+
api: PixelEditorAPI;
|
|
9
|
+
}
|
|
10
|
+
declare const PixelEditorTimeline: React.FC<Props>;
|
|
11
|
+
export default PixelEditorTimeline;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PixelEditorToolbar — left-side tool buttons, shape-fill toggle,
|
|
3
|
+
* symmetry selector and colour swatches.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { PixelEditorAPI } from "./usePixelEditor";
|
|
7
|
+
interface Props {
|
|
8
|
+
api: PixelEditorAPI;
|
|
9
|
+
}
|
|
10
|
+
declare const PixelEditorToolbar: React.FC<Props>;
|
|
11
|
+
export default PixelEditorToolbar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TileMapPanel — UI panel for tile map mode settings
|
|
3
|
+
*/
|
|
4
|
+
import type { TileMapSettings } from './tileMapMode';
|
|
5
|
+
export interface TileMapPanelProps {
|
|
6
|
+
settings: TileMapSettings;
|
|
7
|
+
onSettingsChange: (settings: Partial<TileMapSettings>) => void;
|
|
8
|
+
seamScore?: number;
|
|
9
|
+
onMakeSeamless?: () => void;
|
|
10
|
+
onAnalyzeSeams?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function TileMapPanel({ settings, onSettingsChange, seamScore, onMakeSeamless, onAnalyzeSeams, className, }: TileMapPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default TileMapPanel;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* asepriteFormat.ts — Aseprite .ase/.aseprite binary format parser & writer.
|
|
3
|
+
* Spec: https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md
|
|
4
|
+
*
|
|
5
|
+
* Supports:
|
|
6
|
+
* - RGBA color depth (32-bit)
|
|
7
|
+
* - Layers (normal, groups)
|
|
8
|
+
* - Cels (raw + zlib-compressed read, raw write)
|
|
9
|
+
* - Palette chunks
|
|
10
|
+
* - Frame tags
|
|
11
|
+
* - Round-trip: parseAse → writeAse produces valid .ase files
|
|
12
|
+
*/
|
|
13
|
+
export interface AseDocument {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
colorDepth: 8 | 16 | 32;
|
|
17
|
+
frames: AseFrame[];
|
|
18
|
+
layers: AseLayer[];
|
|
19
|
+
palette: AseColor[];
|
|
20
|
+
tags: AseTag[];
|
|
21
|
+
transparentIndex: number;
|
|
22
|
+
}
|
|
23
|
+
export interface AseFrame {
|
|
24
|
+
duration: number;
|
|
25
|
+
cels: AseCel[];
|
|
26
|
+
}
|
|
27
|
+
export interface AseLayer {
|
|
28
|
+
name: string;
|
|
29
|
+
visible: boolean;
|
|
30
|
+
opacity: number;
|
|
31
|
+
blendMode: number;
|
|
32
|
+
childLevel: number;
|
|
33
|
+
layerType: number;
|
|
34
|
+
}
|
|
35
|
+
export interface AseCel {
|
|
36
|
+
layerIndex: number;
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
opacity: number;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
pixels: Uint8Array;
|
|
43
|
+
}
|
|
44
|
+
export interface AseTag {
|
|
45
|
+
name: string;
|
|
46
|
+
from: number;
|
|
47
|
+
to: number;
|
|
48
|
+
direction: number;
|
|
49
|
+
color: AseColor;
|
|
50
|
+
}
|
|
51
|
+
export interface AseColor {
|
|
52
|
+
r: number;
|
|
53
|
+
g: number;
|
|
54
|
+
b: number;
|
|
55
|
+
a: number;
|
|
56
|
+
}
|
|
57
|
+
export declare function parseAseFile(buffer: ArrayBuffer): Promise<AseDocument>;
|
|
58
|
+
export declare function writeAseFile(doc: AseDocument): Promise<ArrayBuffer>;
|
|
59
|
+
export declare function createEmptyAseDocument(width?: number, height?: number): AseDocument;
|
|
60
|
+
export declare function defaultPalette(): AseColor[];
|
|
61
|
+
export declare function aseColorToHex(c: AseColor): string;
|
|
62
|
+
export declare function hexToAseColor(hex: string): AseColor;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* paletteExtractor — Extract color palettes from images
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - K-means clustering for dominant colors
|
|
6
|
+
* - Median cut algorithm
|
|
7
|
+
* - Octree quantization
|
|
8
|
+
* - Color sorting options
|
|
9
|
+
* - Palette size control
|
|
10
|
+
* - Common palette format imports (GPL, PAL, ASE, ACO)
|
|
11
|
+
*/
|
|
12
|
+
export interface RGB {
|
|
13
|
+
r: number;
|
|
14
|
+
g: number;
|
|
15
|
+
b: number;
|
|
16
|
+
}
|
|
17
|
+
export interface PaletteColor extends RGB {
|
|
18
|
+
hex: string;
|
|
19
|
+
count: number;
|
|
20
|
+
percentage: number;
|
|
21
|
+
}
|
|
22
|
+
export type ExtractionAlgorithm = 'kmeans' | 'median-cut' | 'octree' | 'frequency';
|
|
23
|
+
export type SortOrder = 'frequency' | 'hue' | 'saturation' | 'lightness' | 'brightness' | 'none';
|
|
24
|
+
export interface ExtractionOptions {
|
|
25
|
+
/** Number of colors to extract */
|
|
26
|
+
colorCount: number;
|
|
27
|
+
/** Algorithm to use */
|
|
28
|
+
algorithm: ExtractionAlgorithm;
|
|
29
|
+
/** Sort order for results */
|
|
30
|
+
sortOrder: SortOrder;
|
|
31
|
+
/** Minimum color difference (0-255) to include similar colors */
|
|
32
|
+
minDifference: number;
|
|
33
|
+
/** Sample rate (1 = every pixel, 2 = every 2nd, etc.) */
|
|
34
|
+
sampleRate: number;
|
|
35
|
+
/** Ignore transparent pixels */
|
|
36
|
+
ignoreTransparent: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const DEFAULT_EXTRACTION_OPTIONS: ExtractionOptions;
|
|
39
|
+
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
40
|
+
export declare function hexToRgb(hex: string): RGB;
|
|
41
|
+
export declare function colorDistance(c1: RGB, c2: RGB): number;
|
|
42
|
+
export declare function rgbToHsl(r: number, g: number, b: number): {
|
|
43
|
+
h: number;
|
|
44
|
+
s: number;
|
|
45
|
+
l: number;
|
|
46
|
+
};
|
|
47
|
+
export declare function getBrightness(r: number, g: number, b: number): number;
|
|
48
|
+
export declare function extractPalette(imageData: ImageData, options?: Partial<ExtractionOptions>): PaletteColor[];
|
|
49
|
+
/**
|
|
50
|
+
* Extract palette from image/canvas element
|
|
51
|
+
*/
|
|
52
|
+
export declare function extractPaletteFromImage(source: HTMLImageElement | HTMLCanvasElement, options?: Partial<ExtractionOptions>): PaletteColor[];
|
|
53
|
+
/**
|
|
54
|
+
* Parse GIMP Palette (.gpl) format
|
|
55
|
+
*/
|
|
56
|
+
export declare function parseGplPalette(content: string): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Parse Paint.NET/JASC Palette (.pal) format
|
|
59
|
+
*/
|
|
60
|
+
export declare function parsePalPalette(content: string): string[];
|
|
61
|
+
/**
|
|
62
|
+
* Parse hex color list (one per line)
|
|
63
|
+
*/
|
|
64
|
+
export declare function parseHexPalette(content: string): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Export palette to GPL format
|
|
67
|
+
*/
|
|
68
|
+
export declare function exportToGpl(colors: string[], name?: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Export palette to PAL format
|
|
71
|
+
*/
|
|
72
|
+
export declare function exportToPal(colors: string[]): string;
|
|
73
|
+
export default extractPalette;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pixelEditorExports — pixel editor file export utilities as pure functions.
|
|
3
|
+
*/
|
|
4
|
+
import type { Layer } from "./pixelEditorTypes";
|
|
5
|
+
export interface ExportContext {
|
|
6
|
+
dw: number;
|
|
7
|
+
dh: number;
|
|
8
|
+
layers: Layer[];
|
|
9
|
+
fc: number;
|
|
10
|
+
fDur: number[];
|
|
11
|
+
pal: string[];
|
|
12
|
+
cels: Map<string, ImageData>;
|
|
13
|
+
}
|
|
14
|
+
export declare function exportAse(ctx: ExportContext): Promise<void>;
|
|
15
|
+
export declare function exportPNG(afi: number, dw: number, dh: number, compFrame: (fi: number) => ImageData): void;
|
|
16
|
+
export declare function exportJPG(afi: number, dw: number, dh: number, compFrame: (fi: number) => ImageData): void;
|
|
17
|
+
export declare function exportWebP(afi: number, dw: number, dh: number, compFrame: (fi: number) => ImageData): void;
|
|
18
|
+
export declare function exportBMP(afi: number, dw: number, dh: number, compFrame: (fi: number) => ImageData): void;
|
|
19
|
+
export declare function exportSVG(afi: number, dw: number, dh: number, compFrame: (fi: number) => ImageData): void;
|
|
20
|
+
export declare function exportSheet(dw: number, dh: number, fc: number, compFrame: (fi: number) => ImageData): void;
|
|
21
|
+
export interface SpriteSheetOptions {
|
|
22
|
+
columns?: number;
|
|
23
|
+
padding?: number;
|
|
24
|
+
includeMeta?: boolean;
|
|
25
|
+
fileName?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function exportSpriteSheetAdvanced(dw: number, dh: number, fc: number, compFrame: (fi: number) => ImageData, fDur: number[], options?: SpriteSheetOptions): void;
|
|
28
|
+
export declare function exportGIF(dw: number, dh: number, fc: number, compFrame: (fi: number) => ImageData, fDur: number[], options?: {
|
|
29
|
+
loop?: boolean;
|
|
30
|
+
quality?: number;
|
|
31
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pixelEditorTypes — shared types, constants & helpers for PixelEditor.
|
|
3
|
+
*/
|
|
4
|
+
import { type RGBA, type BrushShape, type SymmetryMode } from "./pixelEditorUtils";
|
|
5
|
+
export type Tool = "pencil" | "eraser" | "fill" | "line" | "rect" | "ellipse" | "eyedropper" | "select" | "move" | "gradient" | "dither";
|
|
6
|
+
export interface Layer {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
opacity: number;
|
|
11
|
+
locked: boolean;
|
|
12
|
+
blendMode: BlendMode;
|
|
13
|
+
}
|
|
14
|
+
export type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten";
|
|
15
|
+
export interface HistoryEntry {
|
|
16
|
+
desc: string;
|
|
17
|
+
cels: Map<string, ImageData>;
|
|
18
|
+
layers: Layer[];
|
|
19
|
+
frameCount: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Selection {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
w: number;
|
|
25
|
+
h: number;
|
|
26
|
+
}
|
|
27
|
+
export declare const TOOLS: {
|
|
28
|
+
id: Tool;
|
|
29
|
+
icon: string;
|
|
30
|
+
label: string;
|
|
31
|
+
key: string;
|
|
32
|
+
}[];
|
|
33
|
+
export declare const BLEND_MODES: BlendMode[];
|
|
34
|
+
export declare const BRUSH_SHAPES: {
|
|
35
|
+
id: BrushShape;
|
|
36
|
+
label: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
}[];
|
|
39
|
+
export declare const SYMMETRY_MODES: {
|
|
40
|
+
id: SymmetryMode;
|
|
41
|
+
label: string;
|
|
42
|
+
}[];
|
|
43
|
+
export declare const DEFAULT_PALETTE: string[];
|
|
44
|
+
export declare const lid: () => string;
|
|
45
|
+
export declare const celKey: (f: number, l: number) => string;
|
|
46
|
+
export declare const inB: (x: number, y: number, w: number, h: number) => boolean;
|
|
47
|
+
export declare const downloadBlob: (blob: Blob, name: string) => void;
|
|
48
|
+
/** Hex → RGBA tuple. */
|
|
49
|
+
export declare const hex2t: (hex: string) => RGBA;
|
|
50
|
+
/** Draw ellipse outline using parametric approach. */
|
|
51
|
+
export declare const plotEllipse: (data: ImageData, cx: number, cy: number, rx: number, ry: number, color: RGBA, w: number, h: number, filled?: boolean) => void;
|