@nice2dev/ui-graphics 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/dist/cjs/animation/AnimatedPerson.js +3 -1
  3. package/dist/cjs/animation/Audience.js +3 -1
  4. package/dist/cjs/animation/rig/RigPlayer.js +1 -1
  5. package/dist/cjs/animation/rig/presets.js +67 -55
  6. package/dist/cjs/animation/shapes/headwear.js +4 -1
  7. package/dist/cjs/core/NiceBrushEngine.js +8 -5
  8. package/dist/cjs/core/collaboration.js +11 -6
  9. package/dist/cjs/core/editorAsk.js +48 -0
  10. package/dist/cjs/core/i18n.js +7 -3
  11. package/dist/cjs/core/minimap.js +21 -20
  12. package/dist/cjs/core/plugins.js +1 -1
  13. package/dist/cjs/core/rtl.js +1 -1
  14. package/dist/cjs/core/theme.js +1 -1
  15. package/dist/cjs/font/NiceFontEditor.js +14 -12
  16. package/dist/cjs/game/GameAsset2dEditor.js +75 -44
  17. package/dist/cjs/nice2dev-ui-graphics.css +1 -1
  18. package/dist/cjs/photo/FilterThumb.js +3 -3
  19. package/dist/cjs/photo/NiceAITools.js +6 -4
  20. package/dist/cjs/photo/PhotoEditor.js +3 -1
  21. package/dist/cjs/photo/PhotoEditorCanvas.js +8 -6
  22. package/dist/cjs/photo/PhotoEditorLeftPanel.js +29 -29
  23. package/dist/cjs/photo/PhotoEditorToolbar.js +4 -4
  24. package/dist/cjs/photo/photoFilters.js +1 -0
  25. package/dist/cjs/pixel/PixelEditor.js +6 -3
  26. package/dist/cjs/pixel/PixelEditorCanvas.js +10 -6
  27. package/dist/cjs/pixel/PixelEditorMenuBar.js +95 -30
  28. package/dist/cjs/pixel/PixelEditorRightPanel.js +32 -24
  29. package/dist/cjs/pixel/PixelEditorStatusBar.js +12 -4
  30. package/dist/cjs/pixel/PixelEditorTimeline.js +15 -2
  31. package/dist/cjs/pixel/PixelEditorToolbar.js +12 -6
  32. package/dist/cjs/pixel/SpriteGeneratorPanel.js +28 -17
  33. package/dist/cjs/pixel/animalGeneratorPresets.js +31 -31
  34. package/dist/cjs/pixel/buildingGeneratorPresets.js +24 -24
  35. package/dist/cjs/pixel/characterGeneratorPresets.js +25 -25
  36. package/dist/cjs/pixel/usePixelEditor.js +13 -10
  37. package/dist/cjs/texture/Nice3DTexturePainter.js +16 -10
  38. package/dist/cjs/ui/NiceUIDesigner.js +17 -13
  39. package/dist/cjs/vector/NiceSvgToCode.js +7 -5
  40. package/dist/cjs/vector/VectorEditor.js +3 -2
  41. package/dist/cjs/vector/VectorEditorMenuBar.js +7 -1
  42. package/dist/cjs/vector/VectorEditorRightPanel.js +1 -1
  43. package/dist/cjs/vector/VectorEditorShapeRenderer.js +3 -1
  44. package/dist/cjs/vector/useVectorEditor.js +38 -29
  45. package/dist/cjs/vector/vectorEditorImport.js +1 -0
  46. package/dist/cjs/vector/vectorIconImport.js +1 -0
  47. package/dist/esm/animation/AnimatedPerson.js +3 -1
  48. package/dist/esm/animation/Audience.js +3 -1
  49. package/dist/esm/animation/rig/RigPlayer.js +1 -1
  50. package/dist/esm/animation/rig/presets.js +68 -56
  51. package/dist/esm/animation/shapes/headwear.js +4 -1
  52. package/dist/esm/animation/spineExport.js +1 -1
  53. package/dist/esm/core/NiceBrushEngine.js +8 -5
  54. package/dist/esm/core/collaboration.js +11 -6
  55. package/dist/esm/core/editorAsk.js +45 -0
  56. package/dist/esm/core/i18n.js +8 -4
  57. package/dist/esm/core/minimap.js +21 -20
  58. package/dist/esm/core/plugins.js +1 -1
  59. package/dist/esm/core/rtl.js +1 -1
  60. package/dist/esm/core/theme.js +1 -1
  61. package/dist/esm/font/NiceFontEditor.js +14 -12
  62. package/dist/esm/game/GameAsset2dEditor.js +75 -44
  63. package/dist/esm/nice2dev-ui-graphics.css +1 -1
  64. package/dist/esm/photo/FilterThumb.js +3 -3
  65. package/dist/esm/photo/NiceAITools.js +6 -4
  66. package/dist/esm/photo/PhotoEditor.js +3 -1
  67. package/dist/esm/photo/PhotoEditorCanvas.js +8 -6
  68. package/dist/esm/photo/PhotoEditorLeftPanel.js +29 -29
  69. package/dist/esm/photo/PhotoEditorToolbar.js +4 -4
  70. package/dist/esm/photo/photoFilters.js +1 -0
  71. package/dist/esm/pixel/PixelEditor.js +6 -3
  72. package/dist/esm/pixel/PixelEditorCanvas.js +10 -6
  73. package/dist/esm/pixel/PixelEditorMenuBar.js +95 -30
  74. package/dist/esm/pixel/PixelEditorRightPanel.js +32 -24
  75. package/dist/esm/pixel/PixelEditorStatusBar.js +12 -4
  76. package/dist/esm/pixel/PixelEditorTimeline.js +15 -2
  77. package/dist/esm/pixel/PixelEditorToolbar.js +12 -6
  78. package/dist/esm/pixel/SpriteGeneratorPanel.js +28 -17
  79. package/dist/esm/pixel/animalGeneratorPresets.js +32 -32
  80. package/dist/esm/pixel/buildingGeneratorPresets.js +25 -25
  81. package/dist/esm/pixel/characterGeneratorPresets.js +26 -26
  82. package/dist/esm/pixel/usePixelEditor.js +13 -10
  83. package/dist/esm/texture/Nice3DTexturePainter.js +16 -10
  84. package/dist/esm/ui/NiceUIDesigner.js +17 -13
  85. package/dist/esm/vector/NiceSvgToCode.js +7 -5
  86. package/dist/esm/vector/VectorEditor.js +3 -2
  87. package/dist/esm/vector/VectorEditorMenuBar.js +7 -1
  88. package/dist/esm/vector/VectorEditorRightPanel.js +1 -1
  89. package/dist/esm/vector/VectorEditorShapeRenderer.js +3 -1
  90. package/dist/esm/vector/useVectorEditor.js +38 -29
  91. package/dist/esm/vector/vectorEditorImport.js +1 -0
  92. package/dist/esm/vector/vectorIconImport.js +1 -0
  93. package/dist/types/core/LocalUI.d.ts +1 -2
  94. package/dist/types/core/editorAsk.d.ts +26 -0
  95. package/dist/types/core/i18n.d.ts +1 -17
  96. package/dist/types/pixel/usePixelEditor.d.ts +3 -0
  97. package/dist/types/vector/useVectorEditor.d.ts +2 -0
  98. package/package.json +5 -5
@@ -2,36 +2,44 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { NiceCollapse, NiceSlider, NiceButton, NiceCheckbox, NiceTextInput, NiceSelect } from '@nice2dev/ui';
3
3
  import { NiceIcon } from '@nice2dev/ui-core';
4
4
  import React from 'react';
5
+ import { useNiceTranslation } from '../core/i18n.js';
5
6
  import { HSVPicker } from './HSVPicker.js';
6
7
  import styles from './PixelEditor.module.css.js';
7
8
  import { BRUSH_SHAPES, BLEND_MODES } from './pixelEditorTypes.js';
8
9
 
9
10
  /** A collapsible section header: rotating chevron + title. */
10
11
  const sectionTrigger = (title) => (jsxs(Fragment, { children: [jsx("span", { className: styles.collapseChevron, children: jsx(NiceIcon, { name: "chevron-right", size: 12 }) }), jsx("span", { children: title })] }));
11
- const PixelEditorRightPanel = React.memo(({ api }) => (jsxs("div", { className: styles.rightPanel, children: [jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Brush'), children: [jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: "Size" }), jsx(NiceSlider, { min: 1, max: 64, value: api.brush.size, onChange: (val) => api.setBrush((b) => ({ ...b, size: val })), "aria-label": "Brush size" }), jsx("span", { children: api.brush.size })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: "Opacity" }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.opacity, onChange: (val) => api.setBrush((b) => ({ ...b, opacity: val })), "aria-label": "Brush opacity" }), jsxs("span", { children: [api.brush.opacity, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: "Flow" }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.flow, onChange: (val) => api.setBrush((b) => ({ ...b, flow: val })), "aria-label": "Brush flow" }), jsxs("span", { children: [api.brush.flow, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: "Hard" }), jsx(NiceSlider, { min: 0, max: 100, value: api.brush.hardness, onChange: (val) => api.setBrush((b) => ({ ...b, hardness: val })), "aria-label": "Brush hardness" }), jsxs("span", { children: [api.brush.hardness, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: "Space" }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.spacing, onChange: (val) => api.setBrush((b) => ({ ...b, spacing: val })), "aria-label": "Brush spacing" }), jsxs("span", { children: [api.brush.spacing, "%"] })] }), jsx("div", { className: styles.brushShapes, children: BRUSH_SHAPES.map((s) => (jsx(NiceButton, { className: `${styles.miniBtn} ${api.brush.shape === s.id ? styles.miniBtnActive : ''}`, variant: api.brush.shape === s.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setBrush((b) => ({ ...b, shape: s.id })), title: s.label, "aria-label": s.label, children: jsx(NiceIcon, { name: s.icon, size: 16 }) }, s.id))) }), jsxs("div", { className: styles.pressureToggles, children: [jsx(NiceCheckbox, { checked: api.brush.pressureSize, onChange: (checked) => api.setBrush((b) => ({ ...b, pressureSize: checked })), label: "Pressure\u2192Size", className: styles.checkLabel }), jsx(NiceCheckbox, { checked: api.brush.pressureOpacity, onChange: (checked) => api.setBrush((b) => ({ ...b, pressureOpacity: checked })), label: "Pressure\u2192Opacity", className: styles.checkLabel })] })] }), jsx(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Colour'), children: jsx(HSVPicker, { color: api.col1, onChange: api.setCol1 }) }), jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Layers'), children: [jsxs("div", { className: styles.layerActions, children: [jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.addLayer, title: "Add Layer", "aria-label": "Add Layer", children: jsx(NiceIcon, { name: "plus", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.dupLayer, title: "Duplicate Layer", "aria-label": "Duplicate Layer", children: jsx(NiceIcon, { name: "copy", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.rmLayer, title: "Remove Layer", "aria-label": "Remove Layer", children: jsx(NiceIcon, { name: "minus", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.mergeDown, title: "Merge Down", "aria-label": "Merge Down", children: jsx(NiceIcon, { name: "arrow-down", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.moveLayerUp, title: "Move Up", "aria-label": "Move Up", children: jsx(NiceIcon, { name: "arrow-up", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.moveLayerDown, title: "Move Down", "aria-label": "Move Down", children: jsx(NiceIcon, { name: "arrow-down", size: 16 }) })] }), [...api.layers]
12
- .map((l, i) => ({ l, i }))
13
- .reverse()
14
- .map(({ l, i }) => (jsxs("div", { className: `${styles.layerItem} ${i === api.aLi ? styles.layerItemActive : ''}`, onClick: () => api.setALi(i), children: [jsx("span", { className: styles.layerVis, onClick: (e) => {
15
- e.stopPropagation();
16
- api.toggleVis(i);
17
- }, title: l.visible ? 'Visible' : 'Hidden', children: jsx(NiceIcon, { name: l.visible ? 'eye' : 'eye-off', size: 14 }) }), jsx("span", { className: styles.layerLock, onClick: (e) => {
18
- e.stopPropagation();
19
- api.toggleLock(i);
20
- }, title: l.locked ? 'Locked' : 'Unlocked', children: jsx(NiceIcon, { name: "lock", size: 14 }) }), api.editingLayerName === l.id ? (jsx(NiceTextInput, { className: styles.layerNameInput, value: l.name, onChange: (val) => api.renameLayer(i, val), onBlur: () => api.setEditingLayerName(null), onKeyDown: (e) => {
21
- if (e.key === 'Enter') {
22
- api.setEditingLayerName(null);
12
+ const PixelEditorRightPanel = /* @__PURE__ */ Object.assign(
13
+ /* @__PURE__ */ React.memo(({ api }) => {
14
+ const { t } = useNiceTranslation();
15
+ return (jsxs("div", { className: styles.rightPanel, children: [jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Brush'), children: [jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: t('pixelEditorRightPanel.size', 'Size') }), jsx(NiceSlider, { min: 1, max: 64, value: api.brush.size, onChange: (val) => api.setBrush((b) => ({ ...b, size: val })), "aria-label": t('pixelEditorRightPanel.brushSize', 'Brush size') }), jsx("span", { children: api.brush.size })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: t('pixelEditorRightPanel.opacity', 'Opacity') }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.opacity, onChange: (val) => api.setBrush((b) => ({ ...b, opacity: val })), "aria-label": t('pixelEditorRightPanel.brushOpacity', 'Brush opacity') }), jsxs("span", { children: [api.brush.opacity, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: t('pixelEditorRightPanel.flow', 'Flow') }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.flow, onChange: (val) => api.setBrush((b) => ({ ...b, flow: val })), "aria-label": t('pixelEditorRightPanel.brushFlow', 'Brush flow') }), jsxs("span", { children: [api.brush.flow, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: t('pixelEditorRightPanel.hard', 'Hard') }), jsx(NiceSlider, { min: 0, max: 100, value: api.brush.hardness, onChange: (val) => api.setBrush((b) => ({ ...b, hardness: val })), "aria-label": t('pixelEditorRightPanel.brushHardness', 'Brush hardness') }), jsxs("span", { children: [api.brush.hardness, "%"] })] }), jsxs("div", { className: styles.brushSlider, children: [jsx("label", { children: t('pixelEditorRightPanel.space', 'Space') }), jsx(NiceSlider, { min: 1, max: 100, value: api.brush.spacing, onChange: (val) => api.setBrush((b) => ({ ...b, spacing: val })), "aria-label": t('pixelEditorRightPanel.brushSpacing', 'Brush spacing') }), jsxs("span", { children: [api.brush.spacing, "%"] })] }), jsx("div", { className: styles.brushShapes, children: BRUSH_SHAPES.map((s) => (jsx(NiceButton, { className: `${styles.miniBtn} ${api.brush.shape === s.id ? styles.miniBtnActive : ''}`, variant: api.brush.shape === s.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setBrush((b) => ({ ...b, shape: s.id })), title: s.label, "aria-label": s.label, children: jsx(NiceIcon, { name: s.icon, size: 16 }) }, s.id))) }), jsxs("div", { className: styles.pressureToggles, children: [jsx(NiceCheckbox, { checked: api.brush.pressureSize, onChange: (checked) => api.setBrush((b) => ({ ...b, pressureSize: checked })), label: t('pixelEditorRightPanel.pressureSize', 'Pressure→Size'), className: styles.checkLabel }), jsx(NiceCheckbox, { checked: api.brush.pressureOpacity, onChange: (checked) => api.setBrush((b) => ({ ...b, pressureOpacity: checked })), label: t('pixelEditorRightPanel.pressureOpacity', 'Pressure→Opacity'), className: styles.checkLabel })] })] }), jsx(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Colour'), children: jsx(HSVPicker, { color: api.col1, onChange: api.setCol1 }) }), jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Layers'), children: [jsxs("div", { className: styles.layerActions, children: [jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.addLayer, title: t('pixelEditorRightPanel.addLayer', 'Add Layer'), "aria-label": t('pixelEditorRightPanel.addLayer', 'Add Layer'), children: jsx(NiceIcon, { name: "plus", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.dupLayer, title: t('pixelEditorRightPanel.duplicateLayer', 'Duplicate Layer'), "aria-label": t('pixelEditorRightPanel.duplicateLayer', 'Duplicate Layer'), children: jsx(NiceIcon, { name: "copy", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.rmLayer, title: t('pixelEditorRightPanel.removeLayer', 'Remove Layer'), "aria-label": t('pixelEditorRightPanel.removeLayer', 'Remove Layer'), children: jsx(NiceIcon, { name: "minus", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.mergeDown, title: t('pixelEditorRightPanel.mergeDown', 'Merge Down'), "aria-label": t('pixelEditorRightPanel.mergeDown', 'Merge Down'), children: jsx(NiceIcon, { name: "arrow-down", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.moveLayerUp, title: t('pixelEditorRightPanel.moveUp', 'Move Up'), "aria-label": t('pixelEditorRightPanel.moveUp', 'Move Up'), children: jsx(NiceIcon, { name: "arrow-up", size: 16 }) }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.moveLayerDown, title: t('pixelEditorRightPanel.moveDown', 'Move Down'), "aria-label": t('pixelEditorRightPanel.moveDown', 'Move Down'), children: jsx(NiceIcon, { name: "arrow-down", size: 16 }) })] }), [...api.layers]
16
+ .map((l, i) => ({ l, i }))
17
+ .reverse()
18
+ .map(({ l, i }) => (jsxs("div", { className: `${styles.layerItem} ${i === api.aLi ? styles.layerItemActive : ''}`, onClick: () => api.setALi(i), children: [jsx("span", { className: styles.layerVis, onClick: (e) => {
19
+ e.stopPropagation();
20
+ api.toggleVis(i);
21
+ }, title: l.visible
22
+ ? t('pixelEditorRightPanel.visible', 'Visible')
23
+ : t('pixelEditorRightPanel.hidden', 'Hidden'), children: jsx(NiceIcon, { name: l.visible ? 'eye' : 'eye-off', size: 14 }) }), jsx("span", { className: styles.layerLock, onClick: (e) => {
24
+ e.stopPropagation();
25
+ api.toggleLock(i);
26
+ }, title: l.locked
27
+ ? t('pixelEditorRightPanel.locked', 'Locked')
28
+ : t('pixelEditorRightPanel.unlocked', 'Unlocked'), children: jsx(NiceIcon, { name: "lock", size: 14 }) }), api.editingLayerName === l.id ? (jsx(NiceTextInput, { className: styles.layerNameInput, value: l.name, onChange: (val) => api.renameLayer(i, val), onBlur: () => api.setEditingLayerName(null), onKeyDown: (e) => {
29
+ if (e.key === 'Enter') {
30
+ api.setEditingLayerName(null);
31
+ }
32
+ }, autoFocus: true, "aria-label": t('pixelEditorRightPanel.layerName', 'Layer name') })) : (jsx("span", { className: styles.layerName, onDoubleClick: (e) => {
33
+ e.stopPropagation();
34
+ api.setEditingLayerName(l.id);
35
+ }, children: l.name })), jsxs("span", { className: styles.layerOpacity, children: [Math.round((l.opacity / 255) * 100), "%"] })] }, l.id))), api.layers[api.aLi] && (jsxs("div", { className: styles.layerControls, children: [jsx(NiceSelect, { value: api.layers[api.aLi].blendMode, onChange: (val) => api.setLayerBlendMode(api.aLi, val), className: styles.blendSelect, "aria-label": t('pixelEditorRightPanel.blendMode', 'Blend mode'), options: BLEND_MODES.map((m) => ({ value: m, label: m })) }), jsx(NiceSlider, { min: 0, max: 255, value: api.layers[api.aLi].opacity, onChange: (val) => api.setLayerOpacity(api.aLi, val), className: styles.layerOpSlider, title: t('pixelEditorRightPanel.opacity2', 'Opacity: {opacity}%').replace('{opacity}', String(Math.round((api.layers[api.aLi].opacity / 255) * 100))) })] }))] }), jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Palette'), children: [jsx("div", { className: styles.layerActions, children: jsx(NiceButton, { variant: "ghost", size: "sm", onClick: () => {
36
+ if (!api.pal.includes(api.col1)) {
37
+ api.setPal((p) => [...p, api.col1]);
23
38
  }
24
- }, autoFocus: true, "aria-label": "Layer name" })) : (jsx("span", { className: styles.layerName, onDoubleClick: (e) => {
25
- e.stopPropagation();
26
- api.setEditingLayerName(l.id);
27
- }, children: l.name })), jsxs("span", { className: styles.layerOpacity, children: [Math.round((l.opacity / 255) * 100), "%"] })] }, l.id))), api.layers[api.aLi] && (jsxs("div", { className: styles.layerControls, children: [jsx(NiceSelect, { value: api.layers[api.aLi].blendMode, onChange: (val) => api.setLayerBlendMode(api.aLi, val), className: styles.blendSelect, "aria-label": "Blend mode", options: BLEND_MODES.map((m) => ({ value: m, label: m })) }), jsx(NiceSlider, { min: 0, max: 255, value: api.layers[api.aLi].opacity, onChange: (val) => api.setLayerOpacity(api.aLi, val), className: styles.layerOpSlider, title: `Opacity: ${Math.round((api.layers[api.aLi].opacity / 255) * 100)}%` })] }))] }), jsxs(NiceCollapse, { className: styles.panelSection, defaultExpanded: true, trigger: sectionTrigger('Palette'), children: [jsx("div", { className: styles.layerActions, children: jsx(NiceButton, { variant: "ghost", size: "sm", onClick: () => {
28
- if (!api.pal.includes(api.col1)) {
29
- api.setPal((p) => [...p, api.col1]);
30
- }
31
- }, title: "Add current colour", "aria-label": "Add current colour", children: jsx(NiceIcon, { name: "plus", size: 16 }) }) }), jsx("div", { className: styles.paletteGrid, children: api.pal.map((c, i) => (jsx("div", { className: `${styles.paletteSwatch} ${c === api.col1 ? styles.paletteSwatchActive : ''}`, style: { backgroundColor: c }, onClick: () => api.setCol1(c), onContextMenu: (e) => {
32
- e.preventDefault();
33
- api.setCol2(c);
34
- }, title: c }, i))) })] })] })));
35
- PixelEditorRightPanel.displayName = 'PixelEditorRightPanel';
39
+ }, title: t('pixelEditorRightPanel.addCurrentColour', 'Add current colour'), "aria-label": t('pixelEditorRightPanel.addCurrentColour', 'Add current colour'), children: jsx(NiceIcon, { name: "plus", size: 16 }) }) }), jsx("div", { className: styles.paletteGrid, children: api.pal.map((c, i) => (jsx("div", { className: `${styles.paletteSwatch} ${c === api.col1 ? styles.paletteSwatchActive : ''}`, style: { backgroundColor: c }, onClick: () => api.setCol1(c), onContextMenu: (e) => {
40
+ e.preventDefault();
41
+ api.setCol2(c);
42
+ }, title: c }, i))) })] })] }));
43
+ }), { displayName: 'PixelEditorRightPanel' });
36
44
 
37
45
  export { PixelEditorRightPanel as default };
@@ -1,12 +1,20 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import React from 'react';
3
+ import { useNiceTranslation } from '../core/i18n.js';
3
4
  import styles from './PixelEditor.module.css.js';
4
5
  import { inB } from './pixelEditorTypes.js';
5
6
 
6
- const PixelEditorStatusBar = React.memo(({ api }) => {
7
+ const PixelEditorStatusBar = /* @__PURE__ */ Object.assign(
8
+ /* @__PURE__ */ React.memo(({ api }) => {
7
9
  var _a;
8
- return (jsxs("div", { className: styles.statusBar, children: [jsxs("span", { children: [api.dw, "\u00D7", api.dh] }), jsxs("span", { children: ["Zoom ", Math.round(api.zoom * 100), "%"] }), api.cursor && inB(api.cursor.x, api.cursor.y, api.dw, api.dh) && (jsxs("span", { children: ["(", api.cursor.x, ", ", api.cursor.y, ")"] })), jsx("span", { children: api.tool }), jsxs("span", { children: ["Brush: ", api.brush.size, "px ", api.brush.shape] }), jsxs("span", { children: ["Pressure: ", Math.round(api.pressure * 100), "%"] }), jsxs("span", { children: ["Layer: ", (_a = api.layers[api.aLi]) === null || _a === void 0 ? void 0 : _a.name] }), jsxs("span", { children: ["Frame ", api.afi + 1, "/", api.fc] }), api.symmetry !== 'none' && jsxs("span", { children: ["Sym: ", api.symmetry] }), api.shapeFilled && jsx("span", { children: "Filled" }), api.sel && (jsxs("span", { children: ["Sel: ", api.sel.w, "\u00D7", api.sel.h] }))] }));
9
- });
10
- PixelEditorStatusBar.displayName = 'PixelEditorStatusBar';
10
+ const { t } = useNiceTranslation();
11
+ return (jsxs("div", { className: styles.statusBar, children: [jsxs("span", { children: [api.dw, "\u00D7", api.dh] }), jsx("span", { children: t('pixelEditorStatusBar.zoom', 'Zoom {zoom}%').replace('{zoom}', String(Math.round(api.zoom * 100))) }), api.cursor && inB(api.cursor.x, api.cursor.y, api.dw, api.dh) && (jsxs("span", { children: ["(", api.cursor.x, ", ", api.cursor.y, ")"] })), jsx("span", { children: api.tool }), jsx("span", { children: t('pixelEditorStatusBar.brushPx', 'Brush: {size}px {shape}')
12
+ .replace('{size}', String(api.brush.size))
13
+ .replace('{shape}', String(api.brush.shape)) }), jsx("span", { children: t('pixelEditorStatusBar.pressure', 'Pressure: {pressure}%').replace('{pressure}', String(Math.round(api.pressure * 100))) }), jsx("span", { children: t('pixelEditorStatusBar.layer', 'Layer: {name}').replace('{name}', String((_a = api.layers[api.aLi]) === null || _a === void 0 ? void 0 : _a.name)) }), jsx("span", { children: t('pixelEditorStatusBar.frame', 'Frame {current}/{total}')
14
+ .replace('{current}', String(api.afi + 1))
15
+ .replace('{total}', String(api.fc)) }), api.symmetry !== 'none' && (jsx("span", { children: t('pixelEditorStatusBar.sym', 'Sym: {symmetry}').replace('{symmetry}', String(api.symmetry)) })), api.shapeFilled && jsx("span", { children: t('pixelEditorStatusBar.filled', 'Filled') }), api.sel && (jsx("span", { children: t('pixelEditorStatusBar.sel', 'Sel: {w}×{h}')
16
+ .replace('{w}', String(api.sel.w))
17
+ .replace('{h}', String(api.sel.h)) }))] }));
18
+ }), { displayName: 'PixelEditorStatusBar' });
11
19
 
12
20
  export { PixelEditorStatusBar as default };
@@ -2,9 +2,22 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { NiceButton, NiceNumberInput, NiceCheckbox } from '@nice2dev/ui';
3
3
  import { NiceIcon } from '@nice2dev/ui-core';
4
4
  import React from 'react';
5
+ import { useNiceTranslation } from '../core/i18n.js';
5
6
  import styles from './PixelEditor.module.css.js';
6
7
 
7
- const PixelEditorTimeline = React.memo(({ api }) => (jsxs("div", { className: styles.bottomPanel, children: [jsxs("div", { className: styles.timelineControls, children: [jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.addFrame, children: "+ Frame" }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.dupFrame, "aria-label": "Duplicate frame", children: "Dup" }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.rmFrame, "aria-label": "Remove frame", children: "\u2212 Frame" }), jsx("div", { className: styles.menuSep }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: () => api.setPlaying((p) => !p), "aria-label": api.playing ? 'Pause' : 'Play', children: jsx(NiceIcon, { name: api.playing ? 'pause' : 'play', size: 16 }) }), jsx("label", { children: "FPS:" }), jsx(NiceNumberInput, { min: 1, max: 60, value: api.fps, onChange: (val) => api.setFps(val !== null && val !== void 0 ? val : 8), "aria-label": "Frames per second" }), jsx("div", { className: styles.menuSep }), jsx(NiceCheckbox, { checked: api.onion, onChange: (checked) => api.setOnion(checked), label: "Onion" }), jsx("div", { style: { flex: 1 } }), jsxs("span", { children: [api.fc, " frame", api.fc !== 1 ? 's' : ''] })] }), jsx("div", { className: styles.timelineFrames, children: Array.from({ length: api.fc }, (_, fi) => (jsxs("div", { className: `${styles.frameThumb} ${fi === api.afi ? styles.frameThumbActive : ''}`, onClick: () => api.setAfi(fi), children: [api.thumbs[fi] && (jsx("img", { src: api.thumbs[fi], alt: `Frame ${fi + 1}`, style: { width: 36, height: 36, imageRendering: 'pixelated', objectFit: 'contain' } })), jsx("span", { className: styles.frameNum, children: fi + 1 })] }, fi))) })] })));
8
- PixelEditorTimeline.displayName = 'PixelEditorTimeline';
8
+ const PixelEditorTimeline = /* @__PURE__ */ Object.assign(
9
+ /* @__PURE__ */ React.memo(({ api }) => {
10
+ const { t } = useNiceTranslation();
11
+ return (jsxs("div", { className: styles.bottomPanel, children: [jsxs("div", { className: styles.timelineControls, children: [jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.addFrame, children: t('pixelEditorTimeline.frame', '+ Frame') }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.dupFrame, "aria-label": t('pixelEditorTimeline.duplicateFrame', 'Duplicate frame'), children: t('pixelEditorTimeline.dup', 'Dup') }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: api.rmFrame, "aria-label": t('pixelEditorTimeline.removeFrame', 'Remove frame'), children: t('pixelEditorTimeline.frame2', '− Frame') }), jsx("div", { className: styles.menuSep }), jsx(NiceButton, { variant: "ghost", size: "sm", onClick: () => api.setPlaying((p) => !p), "aria-label": api.playing
12
+ ? t('pixelEditorTimeline.pause', 'Pause')
13
+ : t('pixelEditorTimeline.play', 'Play'), children: jsx(NiceIcon, { name: api.playing ? 'pause' : 'play', size: 16 }) }), jsx("label", { children: t('pixelEditorTimeline.fps', 'FPS:') }), jsx(NiceNumberInput, { min: 1, max: 60, value: api.fps, onChange: (val) => api.setFps(val !== null && val !== void 0 ? val : 8), "aria-label": t('pixelEditorTimeline.framesPerSecond', 'Frames per second') }), jsx("div", { className: styles.menuSep }), jsx(NiceCheckbox, { checked: api.onion, onChange: (checked) => api.setOnion(checked), label: t('pixelEditorTimeline.onion', 'Onion') }), jsx("div", { style: { flex: 1 } }), jsx("span", { children: api.fc !== 1
14
+ ? t('pixelEditorTimeline.framesMany', '{fc} frames').replace('{fc}', String(api.fc))
15
+ : t('pixelEditorTimeline.framesOne', '{fc} frame').replace('{fc}', String(api.fc)) })] }), jsx("div", { className: styles.timelineFrames, children: Array.from({ length: api.fc }, (_, fi) => (jsxs("div", { className: `${styles.frameThumb} ${fi === api.afi ? styles.frameThumbActive : ''}`, onClick: () => api.setAfi(fi), children: [api.thumbs[fi] && (jsx("img", { src: api.thumbs[fi], alt: t('pixelEditorTimeline.frame3', 'Frame {fi}').replace('{fi}', String(fi + 1)), style: {
16
+ width: 36,
17
+ height: 36,
18
+ imageRendering: 'pixelated',
19
+ objectFit: 'contain',
20
+ } })), jsx("span", { className: styles.frameNum, children: fi + 1 })] }, fi))) })] }));
21
+ }), { displayName: 'PixelEditorTimeline' });
9
22
 
10
23
  export { PixelEditorTimeline as default };
@@ -2,14 +2,20 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { NiceButton, NiceColorPicker } from '@nice2dev/ui';
3
3
  import { NiceIcon } from '@nice2dev/ui-core';
4
4
  import React from 'react';
5
+ import { useNiceTranslation } from '../core/i18n.js';
5
6
  import styles from './PixelEditor.module.css.js';
6
7
  import { TOOLS, SYMMETRY_MODES } from './pixelEditorTypes.js';
7
8
 
8
- const PixelEditorToolbar = React.memo(({ api }) => (jsxs("div", { className: styles.toolbar, children: [TOOLS.map((t) => (jsx(NiceButton, { className: `${styles.toolBtn} ${api.tool === t.id ? styles.toolBtnActive : ''}`, variant: api.tool === t.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setTool(t.id), title: `${t.label} (${t.key})`, "aria-label": t.label, children: jsx(NiceIcon, { name: t.icon, size: 16 }) }, t.id))), jsx("div", { className: styles.toolSep }), jsx(NiceButton, { className: `${styles.toolBtn} ${api.shapeFilled ? styles.toolBtnActive : ''}`, variant: api.shapeFilled ? 'primary' : 'ghost', size: "sm", onClick: () => api.setShapeFilled((f) => !f), title: `${api.shapeFilled ? 'Filled' : 'Outline'} (F)`, "aria-label": api.shapeFilled ? 'Filled shape' : 'Outline shape', children: jsx(NiceIcon, { name: api.shapeFilled ? 'check-square' : 'square', size: 16 }) }), jsx("div", { className: styles.toolGroup, children: SYMMETRY_MODES.map((m) => (jsx(NiceButton, { className: `${styles.miniBtn} ${api.symmetry === m.id ? styles.miniBtnActive : ''}`, variant: api.symmetry === m.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setSymmetry(m.id), title: `Symmetry: ${m.label}`, "aria-label": `Symmetry: ${m.label}`, children: jsx(NiceIcon, { name: m.icon, size: 14 }) }, m.id))) }), jsxs("div", { className: styles.colorSwatches, children: [jsx("label", { style: { position: 'relative', width: 28, height: 28, cursor: 'pointer' }, title: "Primary Colour (click for HSV)", children: jsx(NiceColorPicker, { value: api.col1, onChange: (c) => api.setCol1(c) }) }), jsx("label", { style: { position: 'relative', width: 22, height: 22, cursor: 'pointer' }, title: "Secondary Colour", children: jsx(NiceColorPicker, { value: api.col2, onChange: (c) => api.setCol2(c) }) }), jsx(NiceButton, { className: styles.toolBtn, variant: "ghost", size: "sm", onClick: () => {
9
- const tmp = api.col1;
10
- api.setCol1(api.col2);
11
- api.setCol2(tmp);
12
- }, title: "Swap (X)", "aria-label": "Swap colours", style: { fontSize: 12, width: 24, height: 24 }, children: jsx(NiceIcon, { name: "shuffle", size: 14 }) })] })] })));
13
- PixelEditorToolbar.displayName = 'PixelEditorToolbar';
9
+ const PixelEditorToolbar = /* @__PURE__ */ Object.assign(
10
+ /* @__PURE__ */ React.memo(({ api }) => {
11
+ const { t } = useNiceTranslation();
12
+ return (jsxs("div", { className: styles.toolbar, children: [TOOLS.map((t) => (jsx(NiceButton, { className: `${styles.toolBtn} ${api.tool === t.id ? styles.toolBtnActive : ''}`, variant: api.tool === t.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setTool(t.id), title: `${t.label} (${t.key})`, "aria-label": t.label, children: jsx(NiceIcon, { name: t.icon, size: 16 }) }, t.id))), jsx("div", { className: styles.toolSep }), jsx(NiceButton, { className: `${styles.toolBtn} ${api.shapeFilled ? styles.toolBtnActive : ''}`, variant: api.shapeFilled ? 'primary' : 'ghost', size: "sm", onClick: () => api.setShapeFilled((f) => !f), title: `${api.shapeFilled ? 'Filled' : 'Outline'} (F)`, "aria-label": api.shapeFilled
13
+ ? t('pixelEditorToolbar.filledShape', 'Filled shape')
14
+ : t('pixelEditorToolbar.outlineShape', 'Outline shape'), children: jsx(NiceIcon, { name: api.shapeFilled ? 'check-square' : 'square', size: 16 }) }), jsx("div", { className: styles.toolGroup, children: SYMMETRY_MODES.map((m) => (jsx(NiceButton, { className: `${styles.miniBtn} ${api.symmetry === m.id ? styles.miniBtnActive : ''}`, variant: api.symmetry === m.id ? 'primary' : 'ghost', size: "sm", onClick: () => api.setSymmetry(m.id), title: t('pixelEditorToolbar.symmetry', 'Symmetry: {label}').replace('{label}', String(m.label)), "aria-label": t('pixelEditorToolbar.symmetry', 'Symmetry: {label}').replace('{label}', String(m.label)), children: jsx(NiceIcon, { name: m.icon, size: 14 }) }, m.id))) }), jsxs("div", { className: styles.colorSwatches, children: [jsx("label", { style: { position: 'relative', width: 28, height: 28, cursor: 'pointer' }, title: t('pixelEditorToolbar.primaryColourClickForHsv', 'Primary Colour (click for HSV)'), children: jsx(NiceColorPicker, { value: api.col1, onChange: (c) => api.setCol1(c) }) }), jsx("label", { style: { position: 'relative', width: 22, height: 22, cursor: 'pointer' }, title: t('pixelEditorToolbar.secondaryColour', 'Secondary Colour'), children: jsx(NiceColorPicker, { value: api.col2, onChange: (c) => api.setCol2(c) }) }), jsx(NiceButton, { className: styles.toolBtn, variant: "ghost", size: "sm", onClick: () => {
15
+ const tmp = api.col1;
16
+ api.setCol1(api.col2);
17
+ api.setCol2(tmp);
18
+ }, title: t('pixelEditorToolbar.swapX', 'Swap (X)'), "aria-label": t('pixelEditorToolbar.swapColours', 'Swap colours'), style: { fontSize: 12, width: 24, height: 24 }, children: jsx(NiceIcon, { name: "shuffle", size: 14 }) })] })] }));
19
+ }), { displayName: 'PixelEditorToolbar' });
14
20
 
15
21
  export { PixelEditorToolbar as default };
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { NiceModal, NiceButton, NiceSelect, NiceNumberInput, NiceCheckbox } from '@nice2dev/ui';
3
3
  import { NiceIcon } from '@nice2dev/ui-core';
4
4
  import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
5
+ import { useNiceTranslation } from '../core/i18n.js';
5
6
  import { ANIMAL_PRESETS, initAnimalParts, FUR_PALETTES } from './animalGeneratorPresets.js';
6
7
  import { BUILDING_PRESETS, assembleBuildingFromConfig, initBuildingParts, WALL_PALETTES, ROOF_PALETTES } from './buildingGeneratorPresets.js';
7
8
  import { CHARACTER_PRESETS, initCharacterParts, SKIN_PALETTES, HAIR_PALETTES, CLOTHING_PALETTES } from './characterGeneratorPresets.js';
@@ -66,6 +67,7 @@ const ANIMAL_CATEGORIES = [
66
67
  const NiceSpriteGeneratorPanel = ({ onSendToCanvas, onClose, mode,
67
68
  // presets and onGenerate are exposed for forward-compat; not currently consumed.
68
69
  }) => {
70
+ const { t } = useNiceTranslation();
69
71
  ensureInitialized();
70
72
  /* ── State ── */
71
73
  const [tab, setTab] = useState(mode !== null && mode !== void 0 ? mode : 'character');
@@ -224,19 +226,19 @@ const NiceSpriteGeneratorPanel = ({ onSendToCanvas, onClose, mode,
224
226
  case 'character':
225
227
  return [
226
228
  {
227
- label: 'Skin',
229
+ label: t('spriteGeneratorPanel.skin', 'Skin'),
228
230
  options: palettesToOptions(SKIN_PALETTES),
229
231
  value: skinPalette,
230
232
  set: setSkinPalette,
231
233
  },
232
234
  {
233
- label: 'Hair',
235
+ label: t('spriteGeneratorPanel.hair', 'Hair'),
234
236
  options: palettesToOptions(HAIR_PALETTES),
235
237
  value: hairPalette,
236
238
  set: setHairPalette,
237
239
  },
238
240
  {
239
- label: 'Clothing',
241
+ label: t('spriteGeneratorPanel.clothing', 'Clothing'),
240
242
  options: palettesToOptions(CLOTHING_PALETTES),
241
243
  value: clothPalette,
242
244
  set: setClothPalette,
@@ -245,13 +247,13 @@ const NiceSpriteGeneratorPanel = ({ onSendToCanvas, onClose, mode,
245
247
  case 'building':
246
248
  return [
247
249
  {
248
- label: 'Walls',
250
+ label: t('spriteGeneratorPanel.walls', 'Walls'),
249
251
  options: palettesToOptions(WALL_PALETTES),
250
252
  value: wallPalette,
251
253
  set: setWallPalette,
252
254
  },
253
255
  {
254
- label: 'Roof',
256
+ label: t('spriteGeneratorPanel.roof', 'Roof'),
255
257
  options: palettesToOptions(ROOF_PALETTES),
256
258
  value: roofPalette,
257
259
  set: setRoofPalette,
@@ -260,16 +262,16 @@ const NiceSpriteGeneratorPanel = ({ onSendToCanvas, onClose, mode,
260
262
  case 'animal':
261
263
  return [
262
264
  {
263
- label: 'Fur',
265
+ label: t('spriteGeneratorPanel.fur', 'Fur'),
264
266
  options: palettesToOptions(FUR_PALETTES),
265
267
  value: furPalette,
266
268
  set: setFurPalette,
267
269
  },
268
270
  ];
269
271
  }
270
- }, [tab, skinPalette, hairPalette, clothPalette, wallPalette, roofPalette, furPalette]);
272
+ }, [tab, skinPalette, hairPalette, clothPalette, wallPalette, roofPalette, furPalette, t]);
271
273
  /* ── Render ── */
272
- return (jsx(NiceModal, { open: true, onClose: onClose !== null && onClose !== void 0 ? onClose : (() => { }), title: "Sprite Generator", size: "xl", children: jsxs("div", { className: styles.genPanel, children: [jsx("div", { className: styles.genTabs, children: ['character', 'building', 'animal'].map((t) => (jsxs(NiceButton, { className: `${styles.genTabBtn} ${tab === t ? styles.genTabBtnActive : ''}`, variant: tab === t ? 'primary' : 'ghost', size: "sm", onClick: () => setTab(t), children: [jsx(NiceIcon, { name: t === 'character' ? 'user' : t === 'building' ? 'home' : 'heart', size: 14 }), ' ', t.charAt(0).toUpperCase() + t.slice(1)] }, t))) }), jsxs("div", { className: styles.genBody, children: [jsxs("div", { className: styles.genLeft, children: [jsxs("div", { className: styles.panelSection, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: "Presets" }) }), jsx("div", { className: styles.genPresetGrid, children: presets.map((preset, i) => (jsx(NiceButton, { className: `${styles.genPresetBtn} ${i === selectedPresetIdx ? styles.genPresetBtnActive : ''}`, variant: i === selectedPresetIdx ? 'primary' : 'ghost', size: "sm", onClick: () => applyPreset(i), title: preset.name, children: preset.name }, i))) })] }), jsxs("div", { className: styles.panelSection, style: { flex: 1, overflowY: 'auto' }, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: "Parts" }) }), categories.map((cat) => {
274
+ return (jsx(NiceModal, { open: true, onClose: onClose !== null && onClose !== void 0 ? onClose : (() => { }), title: t('spriteGeneratorPanel.spriteGenerator', 'Sprite Generator'), size: "xl", children: jsxs("div", { className: styles.genPanel, children: [jsx("div", { className: styles.genTabs, children: ['character', 'building', 'animal'].map((t) => (jsxs(NiceButton, { className: `${styles.genTabBtn} ${tab === t ? styles.genTabBtnActive : ''}`, variant: tab === t ? 'primary' : 'ghost', size: "sm", onClick: () => setTab(t), children: [jsx(NiceIcon, { name: t === 'character' ? 'user' : t === 'building' ? 'home' : 'heart', size: 14 }), ' ', t.charAt(0).toUpperCase() + t.slice(1)] }, t))) }), jsxs("div", { className: styles.genBody, children: [jsxs("div", { className: styles.genLeft, children: [jsxs("div", { className: styles.panelSection, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: t('spriteGeneratorPanel.presets', 'Presets') }) }), jsx("div", { className: styles.genPresetGrid, children: presets.map((preset, i) => (jsx(NiceButton, { className: `${styles.genPresetBtn} ${i === selectedPresetIdx ? styles.genPresetBtnActive : ''}`, variant: i === selectedPresetIdx ? 'primary' : 'ghost', size: "sm", onClick: () => applyPreset(i), title: preset.name, children: preset.name }, i))) })] }), jsxs("div", { className: styles.panelSection, style: { flex: 1, overflowY: 'auto' }, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: t('spriteGeneratorPanel.parts', 'Parts') }) }), categories.map((cat) => {
273
275
  const parts = getPartsByCategory(cat);
274
276
  if (parts.length === 0) {
275
277
  return null;
@@ -283,26 +285,35 @@ const NiceSpriteGeneratorPanel = ({ onSendToCanvas, onClose, mode,
283
285
  const active = selectedParts.some((p) => { var _a; return p.partId === part.id && ((_a = p.visible) !== null && _a !== void 0 ? _a : true); });
284
286
  return (jsx(NiceButton, { className: `${styles.miniBtn} ${styles.genPartBtn} ${active ? styles.miniBtnActive : ''}`, variant: active ? 'primary' : 'ghost', size: "sm", onClick: () => (active ? removePart(part.id) : addPart(part.id)), title: part.name, children: part.name }, part.id));
285
287
  }) })] }, cat));
286
- })] })] }), jsxs("div", { className: styles.genCenter, children: [jsx("div", { className: styles.genPreviewWrap, children: jsx("canvas", { ref: previewRef, className: styles.genPreviewCanvas }) }), jsx("div", { className: styles.genDirGrid, children: ALL_DIRECTIONS.map((d) => (jsx(NiceButton, { className: `${styles.miniBtn} ${direction === d ? styles.miniBtnActive : ''}`, variant: direction === d ? 'primary' : 'ghost', size: "sm", onClick: () => setDirection(d), children: d }, d))) }), jsxs("div", { className: styles.genRow, children: [jsx("label", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: "Projection" }), jsx(NiceSelect, { className: styles.propSelect, value: projection, onChange: (val) => setProjection(val), options: [
287
- { value: 'topDown', label: 'Top-Down' },
288
- { value: 'sideView', label: 'Side View' },
289
- { value: 'iso25d', label: '2.5D Isometric' },
290
- ] })] }), jsxs("div", { className: styles.genRow, children: [jsx("label", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: "Size" }), jsx(NiceNumberInput, { min: 8, max: 256, value: canvasW, onChange: (val) => setCanvasW(val !== null && val !== void 0 ? val : 32) }), jsx("span", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: "\u00D7" }), jsx(NiceNumberInput, { min: 8, max: 256, value: canvasH, onChange: (val) => setCanvasH(val !== null && val !== void 0 ? val : 32) })] }), jsx(NiceCheckbox, { checked: generate8Dir, onChange: (checked) => setGenerate8Dir(checked), label: "Generate 8-direction sheet", className: styles.checkLabel })] }), jsxs("div", { className: styles.genRight, children: [jsxs("div", { className: styles.panelSection, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: "Colors" }) }), paletteGroups.map((group) => {
288
+ })] })] }), jsxs("div", { className: styles.genCenter, children: [jsx("div", { className: styles.genPreviewWrap, children: jsx("canvas", { ref: previewRef, className: styles.genPreviewCanvas }) }), jsx("div", { className: styles.genDirGrid, children: ALL_DIRECTIONS.map((d) => (jsx(NiceButton, { className: `${styles.miniBtn} ${direction === d ? styles.miniBtnActive : ''}`, variant: direction === d ? 'primary' : 'ghost', size: "sm", onClick: () => setDirection(d), children: d }, d))) }), jsxs("div", { className: styles.genRow, children: [jsx("label", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: t('spriteGeneratorPanel.projection', 'Projection') }), jsx(NiceSelect, { className: styles.propSelect, value: projection, onChange: (val) => setProjection(val), options: [
289
+ { value: 'topDown', label: t('spriteGeneratorPanel.topDown', 'Top-Down') },
290
+ { value: 'sideView', label: t('spriteGeneratorPanel.sideView', 'Side View') },
291
+ {
292
+ value: 'iso25d',
293
+ label: t('spriteGeneratorPanel.n25dIsometric', '2.5D Isometric'),
294
+ },
295
+ ] })] }), jsxs("div", { className: styles.genRow, children: [jsx("label", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: t('spriteGeneratorPanel.size', 'Size') }), jsx(NiceNumberInput, { min: 8, max: 256, value: canvasW, onChange: (val) => setCanvasW(val !== null && val !== void 0 ? val : 32) }), jsx("span", { style: { fontSize: 10, color: 'var(--nice-text-muted)' }, children: "\u00D7" }), jsx(NiceNumberInput, { min: 8, max: 256, value: canvasH, onChange: (val) => setCanvasH(val !== null && val !== void 0 ? val : 32) })] }), jsx(NiceCheckbox, { checked: generate8Dir, onChange: (checked) => setGenerate8Dir(checked), label: t('spriteGeneratorPanel.generate8DirectionSheet', 'Generate 8-direction sheet'), className: styles.checkLabel })] }), jsxs("div", { className: styles.genRight, children: [jsxs("div", { className: styles.panelSection, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: t('spriteGeneratorPanel.colors', 'Colors') }) }), paletteGroups.map((group) => {
291
296
  var _a;
292
297
  return (jsxs("div", { style: { marginBottom: 6 }, children: [jsx("div", { style: { fontSize: 9, color: 'var(--nice-text-muted)', marginBottom: 2 }, children: group.label }), jsx(NiceSelect, { className: styles.propSelect, value: group.value, onChange: (val) => group.set(val), options: group.options.map((opt) => ({
293
298
  value: opt.id,
294
299
  label: opt.name,
295
300
  })) }), jsx("div", { className: styles.genColorSwatches, children: (_a = group.options
296
301
  .find((o) => o.id === group.value)) === null || _a === void 0 ? void 0 : _a.colors.map((c, i) => (jsx("div", { className: styles.genColorSwatch, style: { backgroundColor: c }, title: c }, i))) })] }, group.label));
297
- })] }), jsxs("div", { className: styles.panelSection, style: { flex: 1, overflowY: 'auto' }, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: "Assembly" }) }), selectedParts.map((ap, i) => {
302
+ })] }), jsxs("div", { className: styles.panelSection, style: { flex: 1, overflowY: 'auto' }, children: [jsx("div", { className: styles.panelTitle, children: jsx("span", { children: t('spriteGeneratorPanel.assembly', 'Assembly') }) }), selectedParts.map((ap, i) => {
298
303
  var _a, _b, _c, _d, _e;
299
304
  const part = partsMapRef.current.get(ap.partId);
300
305
  return (
301
306
  // A part can be placed twice (left and right leg, flipped), so its id
302
307
  // alone is not a unique key.
303
- jsxs("div", { className: styles.genAssemblyItem, children: [jsx(NiceButton, { className: styles.btnIcon, variant: "ghost", size: "sm", onClick: () => togglePart(ap.partId), title: ((_a = ap.visible) !== null && _a !== void 0 ? _a : true) ? 'Hide' : 'Show', "aria-label": ((_b = ap.visible) !== null && _b !== void 0 ? _b : true) ? 'Hide' : 'Show', children: jsx(NiceIcon, { name: ((_c = ap.visible) !== null && _c !== void 0 ? _c : true) ? 'eye' : 'eye-off', size: 14 }) }), jsx("span", { className: styles.genAssemblyName, children: (_d = part === null || part === void 0 ? void 0 : part.name) !== null && _d !== void 0 ? _d : ap.partId }), jsxs("span", { style: { fontSize: 9, color: 'var(--nice-text-muted)' }, children: ["z:", (_e = part === null || part === void 0 ? void 0 : part.zOrder) !== null && _e !== void 0 ? _e : 0] }), jsx(NiceButton, { className: styles.btnIcon, variant: "ghost", size: "sm", onClick: () => removePart(ap.partId), title: "Remove", "aria-label": "Remove", children: jsx(NiceIcon, { name: "close", size: 14 }) })] }, `${ap.partId}-${i}`));
304
- })] })] })] }), jsxs("div", { className: styles.genFooter, children: [jsx(NiceButton, { className: styles.btnSecondary, variant: "ghost", onClick: onClose, children: "Cancel" }), jsxs(NiceButton, { className: styles.btnPrimary, variant: "primary", onClick: handleSendToCanvas, children: [jsx(NiceIcon, { name: "clipboard", size: 14 }), " Send to Canvas"] })] })] }) }));
308
+ jsxs("div", { className: styles.genAssemblyItem, children: [jsx(NiceButton, { className: styles.btnIcon, variant: "ghost", size: "sm", onClick: () => togglePart(ap.partId), title: ((_a = ap.visible) !== null && _a !== void 0 ? _a : true)
309
+ ? t('spriteGeneratorPanel.hide', 'Hide')
310
+ : t('spriteGeneratorPanel.show', 'Show'), "aria-label": ((_b = ap.visible) !== null && _b !== void 0 ? _b : true)
311
+ ? t('spriteGeneratorPanel.hide', 'Hide')
312
+ : t('spriteGeneratorPanel.show', 'Show'), children: jsx(NiceIcon, { name: ((_c = ap.visible) !== null && _c !== void 0 ? _c : true) ? 'eye' : 'eye-off', size: 14 }) }), jsx("span", { className: styles.genAssemblyName, children: (_d = part === null || part === void 0 ? void 0 : part.name) !== null && _d !== void 0 ? _d : ap.partId }), jsxs("span", { style: { fontSize: 9, color: 'var(--nice-text-muted)' }, children: ["z:", (_e = part === null || part === void 0 ? void 0 : part.zOrder) !== null && _e !== void 0 ? _e : 0] }), jsx(NiceButton, { className: styles.btnIcon, variant: "ghost", size: "sm", onClick: () => removePart(ap.partId), title: t('spriteGeneratorPanel.remove', 'Remove'), "aria-label": t('spriteGeneratorPanel.remove', 'Remove'), children: jsx(NiceIcon, { name: "close", size: 14 }) })] }, `${ap.partId}-${i}`));
313
+ })] })] })] }), jsxs("div", { className: styles.genFooter, children: [jsx(NiceButton, { className: styles.btnSecondary, variant: "ghost", onClick: onClose, children: t('spriteGeneratorPanel.cancel', 'Cancel') }), jsxs(NiceButton, { className: styles.btnPrimary, variant: "primary", onClick: handleSendToCanvas, children: [jsx(NiceIcon, { name: "clipboard", size: 14 }), ' ', t('spriteGeneratorPanel.sendToCanvas', 'Send to Canvas')] })] })] }) }));
305
314
  };
306
- NiceSpriteGeneratorPanel.displayName = 'NiceSpriteGeneratorPanel';
315
+ if (process.env.NODE_ENV !== 'production') {
316
+ NiceSpriteGeneratorPanel.displayName = 'NiceSpriteGeneratorPanel';
317
+ }
307
318
 
308
319
  export { NiceSpriteGeneratorPanel as default };
@@ -1,4 +1,4 @@
1
- import { createPartData, generateMirroredDirections, registerParts } from './spriteGeneratorCore.js';
1
+ import { generateMirroredDirections, createPartData, registerParts } from './spriteGeneratorCore.js';
2
2
 
3
3
  /**
4
4
  * animalGeneratorPresets.ts — Modular animal sprite generator.
@@ -38,7 +38,7 @@ const FEATHER_PALETTES = {
38
38
  ════════════════════════════════════════════════════════════════ */
39
39
  const _ = -1;
40
40
  /* ── Cat head ── */
41
- const CAT_HEAD_S = createPartData(8, 7, [
41
+ const CAT_HEAD_S = /* @__PURE__ */ createPartData(8, 7, [
42
42
  [_, 0, _, _, _, _, 0, _],
43
43
  [0, 0, 0, 0, 0, 0, 0, 0],
44
44
  [0, 0, 0, 0, 0, 0, 0, 0],
@@ -47,7 +47,7 @@ const CAT_HEAD_S = createPartData(8, 7, [
47
47
  [0, 0, 0, 3, 3, 0, 0, 0],
48
48
  [_, 0, 0, 0, 0, 0, 0, _],
49
49
  ], ['#e09040', '#c07828', 'var(--nice-success, #40a040)', '#f0a0a0']);
50
- const CAT_HEAD_E = createPartData(6, 7, [
50
+ const CAT_HEAD_E = /* @__PURE__ */ createPartData(6, 7, [
51
51
  [_, _, _, _, 0, _],
52
52
  [_, 0, 0, 0, 0, 0],
53
53
  [0, 0, 0, 0, 0, 0],
@@ -57,7 +57,7 @@ const CAT_HEAD_E = createPartData(6, 7, [
57
57
  [_, 0, 0, 0, 0, _],
58
58
  ], ['#e09040', '#c07828', 'var(--nice-success, #40a040)', '#f0a0a0']);
59
59
  /* ── Dog head ── */
60
- const DOG_HEAD_S = createPartData(8, 8, [
60
+ const DOG_HEAD_S = /* @__PURE__ */ createPartData(8, 8, [
61
61
  [_, _, 0, 0, 0, 0, _, _],
62
62
  [_, 0, 0, 0, 0, 0, 0, _],
63
63
  [0, 0, 0, 0, 0, 0, 0, 0],
@@ -67,7 +67,7 @@ const DOG_HEAD_S = createPartData(8, 8, [
67
67
  [_, _, 0, 0, 0, 0, _, _],
68
68
  [_, _, _, 0, 0, _, _, _],
69
69
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)', 'var(--nice-bg, #301818)', 'var(--nice-bg, #301818)']);
70
- const DOG_HEAD_E = createPartData(7, 8, [
70
+ const DOG_HEAD_E = /* @__PURE__ */ createPartData(7, 8, [
71
71
  [_, _, 0, 0, 0, _, _],
72
72
  [_, 0, 0, 0, 0, 0, _],
73
73
  [0, 0, 0, 0, 0, 0, _],
@@ -78,7 +78,7 @@ const DOG_HEAD_E = createPartData(7, 8, [
78
78
  [_, _, _, 0, 0, 0, _],
79
79
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)', 'var(--nice-bg, #301818)', 'var(--nice-bg, #301818)']);
80
80
  /* ── Wolf head ── */
81
- const WOLF_HEAD_S = createPartData(10, 8, [
81
+ const WOLF_HEAD_S = /* @__PURE__ */ createPartData(10, 8, [
82
82
  [_, 0, _, _, _, _, _, _, 0, _],
83
83
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
84
84
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -89,7 +89,7 @@ const WOLF_HEAD_S = createPartData(10, 8, [
89
89
  [_, _, _, 0, 0, 0, 0, _, _, _],
90
90
  ], ['var(--nice-text-secondary, #808080)', '#606060', '#f0d060', 'var(--nice-bg, #301818)']);
91
91
  /* ── Bird head ── */
92
- const BIRD_HEAD_S = createPartData(6, 6, [
92
+ const BIRD_HEAD_S = /* @__PURE__ */ createPartData(6, 6, [
93
93
  [_, _, 0, 0, _, _],
94
94
  [_, 0, 0, 0, 0, _],
95
95
  [0, 0, 2, 2, 0, 0],
@@ -98,7 +98,7 @@ const BIRD_HEAD_S = createPartData(6, 6, [
98
98
  [_, _, _, 3, _, _],
99
99
  ], ['#a08040', '#806030', 'var(--nice-bg, #301818)', '#f0a020']);
100
100
  /* ── Dragon head ── */
101
- const DRAGON_HEAD_S = createPartData(10, 9, [
101
+ const DRAGON_HEAD_S = /* @__PURE__ */ createPartData(10, 9, [
102
102
  [_, _, _, 0, _, _, 0, _, _, _],
103
103
  [_, _, 0, 0, 0, 0, 0, 0, _, _],
104
104
  [_, 0, 0, 0, 0, 0, 0, 0, 0, _],
@@ -110,7 +110,7 @@ const DRAGON_HEAD_S = createPartData(10, 9, [
110
110
  [_, _, _, 0, 0, 0, 0, _, _, _],
111
111
  ], ['var(--nice-success, #40a040)', '#308030', '#f0d060', 'var(--nice-bg, #301818)']);
112
112
  /* ── Rabbit head ── */
113
- const RABBIT_HEAD_S = createPartData(8, 10, [
113
+ const RABBIT_HEAD_S = /* @__PURE__ */ createPartData(8, 10, [
114
114
  [_, _, 0, _, _, 0, _, _],
115
115
  [_, _, 0, _, _, 0, _, _],
116
116
  [_, _, 0, _, _, 0, _, _],
@@ -123,7 +123,7 @@ const RABBIT_HEAD_S = createPartData(8, 10, [
123
123
  [_, _, 0, 0, 0, 0, _, _],
124
124
  ], ['#f0e8d0', '#d8d0b8', '#d04040', '#f0a0a0']);
125
125
  /* ── Bear head ── */
126
- const BEAR_HEAD_S = createPartData(10, 9, [
126
+ const BEAR_HEAD_S = /* @__PURE__ */ createPartData(10, 9, [
127
127
  [_, 0, 0, _, _, _, _, 0, 0, _],
128
128
  [_, 0, 0, 0, 0, 0, 0, 0, 0, _],
129
129
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -135,7 +135,7 @@ const BEAR_HEAD_S = createPartData(10, 9, [
135
135
  [_, _, 0, 0, 0, 0, 0, 0, _, _],
136
136
  ], ['#805020', '#603818', '#201010', '#402818']);
137
137
  /* ── Horse head ── */
138
- const HORSE_HEAD_S = createPartData(8, 10, [
138
+ const HORSE_HEAD_S = /* @__PURE__ */ createPartData(8, 10, [
139
139
  [_, _, _, 0, 0, _, _, _],
140
140
  [_, _, 0, 0, 0, 0, _, _],
141
141
  [_, 0, 0, 0, 0, 0, 0, _],
@@ -148,7 +148,7 @@ const HORSE_HEAD_S = createPartData(8, 10, [
148
148
  [_, _, _, 0, 0, _, _, _],
149
149
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)', 'var(--nice-bg, #301818)']);
150
150
  /* ── Bodies ── */
151
- const BODY_SMALL = createPartData(8, 6, [
151
+ const BODY_SMALL = /* @__PURE__ */ createPartData(8, 6, [
152
152
  [_, _, 0, 0, 0, 0, _, _],
153
153
  [_, 0, 0, 0, 0, 0, 0, _],
154
154
  [0, 0, 0, 0, 0, 0, 0, 0],
@@ -156,7 +156,7 @@ const BODY_SMALL = createPartData(8, 6, [
156
156
  [_, 0, 0, 0, 0, 0, 0, _],
157
157
  [_, _, 0, 0, 0, 0, _, _],
158
158
  ], ['#e09040', '#c07828']);
159
- const BODY_MEDIUM = createPartData(12, 8, [
159
+ const BODY_MEDIUM = /* @__PURE__ */ createPartData(12, 8, [
160
160
  [_, _, _, 0, 0, 0, 0, 0, 0, _, _, _],
161
161
  [_, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
162
162
  [_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
@@ -166,7 +166,7 @@ const BODY_MEDIUM = createPartData(12, 8, [
166
166
  [_, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
167
167
  [_, _, _, 0, 0, 0, 0, 0, 0, _, _, _],
168
168
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)']);
169
- const BODY_LARGE = createPartData(14, 10, [
169
+ const BODY_LARGE = /* @__PURE__ */ createPartData(14, 10, [
170
170
  [_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
171
171
  [_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
172
172
  [_, _, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
@@ -178,7 +178,7 @@ const BODY_LARGE = createPartData(14, 10, [
178
178
  [_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
179
179
  [_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
180
180
  ], ['#805020', '#603818']);
181
- const BODY_BIRD = createPartData(8, 7, [
181
+ const BODY_BIRD = /* @__PURE__ */ createPartData(8, 7, [
182
182
  [_, _, _, 0, 0, _, _, _],
183
183
  [_, _, 0, 0, 0, 0, _, _],
184
184
  [_, 0, 0, 0, 0, 0, 0, _],
@@ -187,7 +187,7 @@ const BODY_BIRD = createPartData(8, 7, [
187
187
  [_, _, 0, 0, 0, 0, _, _],
188
188
  [_, _, _, 0, 0, _, _, _],
189
189
  ], ['#a08040', '#806030']);
190
- const BODY_DRAGON = createPartData(14, 10, [
190
+ const BODY_DRAGON = /* @__PURE__ */ createPartData(14, 10, [
191
191
  [_, _, _, _, _, 0, 0, 0, 0, _, _, _, _, _],
192
192
  [_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
193
193
  [_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
@@ -200,28 +200,28 @@ const BODY_DRAGON = createPartData(14, 10, [
200
200
  [_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
201
201
  ], ['var(--nice-success, #40a040)', '#f0d060']);
202
202
  /* ── Legs ── */
203
- const LEG_THIN = createPartData(2, 5, [
203
+ const LEG_THIN = /* @__PURE__ */ createPartData(2, 5, [
204
204
  [0, 0],
205
205
  [0, 0],
206
206
  [0, 0],
207
207
  [0, 0],
208
208
  [0, 1],
209
209
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)']);
210
- const LEG_THICK = createPartData(3, 5, [
210
+ const LEG_THICK = /* @__PURE__ */ createPartData(3, 5, [
211
211
  [0, 0, 0],
212
212
  [0, 0, 0],
213
213
  [0, 0, 0],
214
214
  [0, 0, 0],
215
215
  [0, 0, 1],
216
216
  ], ['#805020', '#603818']);
217
- const LEG_BIRD = createPartData(2, 5, [
217
+ const LEG_BIRD = /* @__PURE__ */ createPartData(2, 5, [
218
218
  [_, 0],
219
219
  [_, 0],
220
220
  [_, 0],
221
221
  [0, 0],
222
222
  [0, 0],
223
223
  ], ['#f0a020', '#c08010']);
224
- const LEG_DRAGON = createPartData(3, 6, [
224
+ const LEG_DRAGON = /* @__PURE__ */ createPartData(3, 6, [
225
225
  [_, 0, 0],
226
226
  [0, 0, 0],
227
227
  [0, 0, 0],
@@ -230,31 +230,31 @@ const LEG_DRAGON = createPartData(3, 6, [
230
230
  [0, 1, 0],
231
231
  ], ['var(--nice-success, #40a040)', '#206020']);
232
232
  /* ── Tails ── */
233
- const TAIL_SHORT = createPartData(4, 3, [
233
+ const TAIL_SHORT = /* @__PURE__ */ createPartData(4, 3, [
234
234
  [0, 0, _, _],
235
235
  [_, 0, 0, _],
236
236
  [_, _, 0, 0],
237
237
  ], ['#e09040', '#c07828']);
238
- const TAIL_LONG = createPartData(6, 4, [
238
+ const TAIL_LONG = /* @__PURE__ */ createPartData(6, 4, [
239
239
  [0, 0, _, _, _, _],
240
240
  [_, 0, 0, _, _, _],
241
241
  [_, _, 0, 0, _, _],
242
242
  [_, _, _, 0, 0, 0],
243
243
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)']);
244
- const TAIL_FLUFFY = createPartData(6, 5, [
244
+ const TAIL_FLUFFY = /* @__PURE__ */ createPartData(6, 5, [
245
245
  [_, 0, 0, _, _, _],
246
246
  [0, 0, 0, 0, _, _],
247
247
  [_, 0, 0, 0, 0, _],
248
248
  [_, _, 0, 0, 0, 0],
249
249
  [_, _, _, 0, 0, _],
250
250
  ], ['var(--nice-text-secondary, #808080)', '#606060']);
251
- const TAIL_DRAGON = createPartData(8, 4, [
251
+ const TAIL_DRAGON = /* @__PURE__ */ createPartData(8, 4, [
252
252
  [0, 0, _, _, _, _, _, _],
253
253
  [_, 0, 0, 0, _, _, _, _],
254
254
  [_, _, _, 0, 0, 0, _, _],
255
255
  [_, _, _, _, _, 0, 1, 0],
256
256
  ], ['var(--nice-success, #40a040)', '#308030']);
257
- const TAIL_BIRD = createPartData(5, 5, [
257
+ const TAIL_BIRD = /* @__PURE__ */ createPartData(5, 5, [
258
258
  [_, _, 0, _, _],
259
259
  [_, 0, 0, 0, _],
260
260
  [0, 0, 0, 0, 0],
@@ -262,14 +262,14 @@ const TAIL_BIRD = createPartData(5, 5, [
262
262
  [_, _, 0, _, _],
263
263
  ], ['#a08040', '#806030']);
264
264
  /* ── Wings ── */
265
- const WING_SMALL = createPartData(6, 5, [
265
+ const WING_SMALL = /* @__PURE__ */ createPartData(6, 5, [
266
266
  [_, _, _, _, 0, _],
267
267
  [_, _, _, 0, 0, 0],
268
268
  [_, _, 0, 0, 0, 0],
269
269
  [_, 0, 0, 0, 0, 0],
270
270
  [0, 0, 0, 0, 0, _],
271
271
  ], ['#a08040', '#806030']);
272
- const WING_LARGE = createPartData(10, 8, [
272
+ const WING_LARGE = /* @__PURE__ */ createPartData(10, 8, [
273
273
  [_, _, _, _, _, _, _, _, 0, _],
274
274
  [_, _, _, _, _, _, _, 0, 0, 0],
275
275
  [_, _, _, _, _, _, 0, 0, 0, 0],
@@ -279,7 +279,7 @@ const WING_LARGE = createPartData(10, 8, [
279
279
  [_, _, 0, 0, 0, 0, 0, 0, 0, _],
280
280
  [_, 0, 0, 0, 0, 0, 0, 0, _, _],
281
281
  ], ['var(--nice-success, #40a040)', '#308030']);
282
- const WING_BAT = createPartData(10, 7, [
282
+ const WING_BAT = /* @__PURE__ */ createPartData(10, 7, [
283
283
  [_, _, 0, _, _, 0, _, _, 0, _],
284
284
  [_, 0, 0, _, 0, 0, _, 0, 0, _],
285
285
  [_, 0, 0, 0, 0, 0, 0, 0, 0, _],
@@ -289,13 +289,13 @@ const WING_BAT = createPartData(10, 7, [
289
289
  [_, _, _, 0, 0, 0, 0, _, _, _],
290
290
  ], ['var(--nice-border, #404040)', '#303030']);
291
291
  /* ── Manes ── */
292
- const MANE_SHORT = createPartData(6, 4, [
292
+ const MANE_SHORT = /* @__PURE__ */ createPartData(6, 4, [
293
293
  [_, _, 0, 0, _, _],
294
294
  [_, 0, 0, 0, 0, _],
295
295
  [0, 0, 0, 0, 0, 0],
296
296
  [_, _, 0, 0, _, _],
297
297
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)']);
298
- const MANE_LONG = createPartData(6, 8, [
298
+ const MANE_LONG = /* @__PURE__ */ createPartData(6, 8, [
299
299
  [_, _, 0, 0, _, _],
300
300
  [_, 0, 0, 0, 0, _],
301
301
  [0, 0, 0, 0, 0, 0],
@@ -306,12 +306,12 @@ const MANE_LONG = createPartData(6, 8, [
306
306
  [_, _, 0, 0, _, _],
307
307
  ], ['var(--nice-warning-dark, #c08848)', 'var(--nice-warning-dark, #a06830)']);
308
308
  /* ── Horns ── */
309
- const HORNS_SMALL = createPartData(8, 3, [
309
+ const HORNS_SMALL = /* @__PURE__ */ createPartData(8, 3, [
310
310
  [0, _, _, _, _, _, _, 0],
311
311
  [0, 0, _, _, _, _, 0, 0],
312
312
  [_, 0, _, _, _, _, 0, _],
313
313
  ], ['#f0e8d0', '#d8d0b8']);
314
- const HORNS_DRAGON = createPartData(10, 4, [
314
+ const HORNS_DRAGON = /* @__PURE__ */ createPartData(10, 4, [
315
315
  [0, _, _, _, _, _, _, _, _, 0],
316
316
  [0, 0, _, _, _, _, _, _, 0, 0],
317
317
  [_, 0, 0, _, _, _, _, 0, 0, _],