@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
@@ -15,13 +15,14 @@ const OverlayToolbar = ({ api }) => {
15
15
  if (!selectedOverlay) {
16
16
  return null;
17
17
  }
18
- return (jsxs("div", { className: cs.overlayToolbar, children: [jsxs("span", { className: cs.overlayToolbarLabel, children: [jsx(NiceIcon, { name: "box", size: 14, style: { marginRight: 4 } }), "Warstwa"] }), jsx(RangeInput, { min: 0, max: 100, value: ((_a = selectedOverlay.opacity) !== null && _a !== void 0 ? _a : 1) * 100, onChange: (e) => updateOverlay(selectedOverlay.id, { opacity: Number(e.target.value) / 100 }), onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 70 }, title: t('photoEditor.opacity', 'Opacity') }), jsxs("span", { className: cs.sliderValueSm, style: { color: accent }, children: [Math.round(((_b = selectedOverlay.opacity) !== null && _b !== void 0 ? _b : 1) * 100), "%"] }), selectedOverlay.type !== 'drawing' && selectedOverlay.type !== 'frame' && (jsxs(Fragment, { children: [jsx(RangeInput, { min: 20, max: 500, value: ((_c = selectedOverlay.scaleX) !== null && _c !== void 0 ? _c : 1) * 100, onChange: (e) => {
18
+ return (jsxs("div", { className: cs.overlayToolbar, children: [jsxs("span", { className: cs.overlayToolbarLabel, children: [jsx(NiceIcon, { name: "box", size: 14, style: { marginRight: 4 } }), t('photoEditor.layer', 'Layer')] }), jsx(RangeInput, { min: 0, max: 100, value: ((_a = selectedOverlay.opacity) !== null && _a !== void 0 ? _a : 1) * 100, onChange: (e) => updateOverlay(selectedOverlay.id, { opacity: Number(e.target.value) / 100 }), onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 70 }, title: t('photoEditor.opacity', 'Opacity') }), jsxs("span", { className: cs.sliderValueSm, style: { color: accent }, children: [Math.round(((_b = selectedOverlay.opacity) !== null && _b !== void 0 ? _b : 1) * 100), "%"] }), selectedOverlay.type !== 'drawing' && selectedOverlay.type !== 'frame' && (jsxs(Fragment, { children: [jsx(RangeInput, { min: 20, max: 500, value: ((_c = selectedOverlay.scaleX) !== null && _c !== void 0 ? _c : 1) * 100, onChange: (e) => {
19
19
  const s = Number(e.target.value) / 100;
20
20
  updateOverlay(selectedOverlay.id, { scaleX: s, scaleY: s });
21
- }, onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 60 }, title: "Skala" }), jsxs("span", { className: cs.sliderValueSm, style: { color: 'var(--nice-text-muted, #aaa)' }, children: [Math.round(((_d = selectedOverlay.scaleX) !== null && _d !== void 0 ? _d : 1) * 100), "%"] })] })), selectedOverlay.type !== 'drawing' && selectedOverlay.type !== 'frame' && (jsx(RangeInput, { min: -180, max: 180, value: (_e = selectedOverlay.rotation) !== null && _e !== void 0 ? _e : 0, onChange: (e) => updateOverlay(selectedOverlay.id, { rotation: Number(e.target.value) }), onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 60 }, title: t('photoEditor.rotation', 'Rotation') })), jsx(Button, { variant: "dark", size: "sm", onClick: () => moveOverlayBack(selectedOverlay.id), title: t('photoEditor.moveBack', 'Move back'), className: cs.overlayToolbarBtn, children: jsx(NiceIcon, { name: "arrow-down", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: () => moveOverlayForward(selectedOverlay.id), title: t('photoEditor.moveForward', 'Move forward'), className: cs.overlayToolbarBtn, children: jsx(NiceIcon, { name: "arrow-up", size: 14 }) }), jsx(Button, { variant: "outline-danger", size: "sm", onClick: () => deleteOverlay(selectedOverlay.id), className: cs.overlayToolbarBtn, title: t('photoEditor.deleteLayer', 'Delete layer'), children: jsx(NiceIcon, { name: "trash", size: 14 }) })] }));
21
+ }, onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 60 }, title: t('photoEditor.scale', 'Scale') }), jsxs("span", { className: cs.sliderValueSm, style: { color: 'var(--nice-text-muted, #aaa)' }, children: [Math.round(((_d = selectedOverlay.scaleX) !== null && _d !== void 0 ? _d : 1) * 100), "%"] })] })), selectedOverlay.type !== 'drawing' && selectedOverlay.type !== 'frame' && (jsx(RangeInput, { min: -180, max: 180, value: (_e = selectedOverlay.rotation) !== null && _e !== void 0 ? _e : 0, onChange: (e) => updateOverlay(selectedOverlay.id, { rotation: Number(e.target.value) }), onMouseUp: pushHistory, accentColor: accent, style: { maxWidth: 60 }, title: t('photoEditor.rotation', 'Rotation') })), jsx(Button, { variant: "dark", size: "sm", onClick: () => moveOverlayBack(selectedOverlay.id), title: t('photoEditor.moveBack', 'Move back'), className: cs.overlayToolbarBtn, children: jsx(NiceIcon, { name: "arrow-down", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: () => moveOverlayForward(selectedOverlay.id), title: t('photoEditor.moveForward', 'Move forward'), className: cs.overlayToolbarBtn, children: jsx(NiceIcon, { name: "arrow-up", size: 14 }) }), jsx(Button, { variant: "outline-danger", size: "sm", onClick: () => deleteOverlay(selectedOverlay.id), className: cs.overlayToolbarBtn, title: t('photoEditor.deleteLayer', 'Delete layer'), children: jsx(NiceIcon, { name: "trash", size: 14 }) })] }));
22
22
  };
23
23
  // ── Left Panel ──
24
- const PhotoEditorLeftPanel = React.memo(({ api }) => {
24
+ const PhotoEditorLeftPanel = /* @__PURE__ */ Object.assign(
25
+ /* @__PURE__ */ React.memo(({ api }) => {
25
26
  var _a;
26
27
  const { t, accent, accentDim, activeTab, setActiveTab, setCropMode,
27
28
  // Filters
@@ -58,28 +59,28 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
58
59
  color: activeTab === tab.key ? accent : undefined,
59
60
  borderBottomColor: activeTab === tab.key ? accent : undefined,
60
61
  }, children: [jsx(NiceIcon, { name: tab.icon, size: 14 }), tab.label] }, tab.key))) }), jsxs("div", { className: cs.panelContent, children: [activeTab === 'filters' && (jsxs(Fragment, { children: [jsx("div", { className: cs.pillRow, children: [
61
- { key: 'all', label: 'All' },
62
- { key: 'color', label: 'Color' },
63
- { key: 'light', label: 'Light' },
64
- { key: 'vintage', label: 'Vintage' },
65
- { key: 'artistic', label: 'Artistic' },
66
- { key: 'fun', label: 'Fun' },
62
+ { key: 'all', label: t('photoEditor.all', 'All') },
63
+ { key: 'color', label: t('photoEditor.color', 'Color') },
64
+ { key: 'light', label: t('photoEditor.light', 'Light') },
65
+ { key: 'vintage', label: t('photoEditor.vintage', 'Vintage') },
66
+ { key: 'artistic', label: t('photoEditor.artistic', 'Artistic') },
67
+ { key: 'fun', label: t('photoEditor.fun', 'Fun') },
67
68
  ].map((cat) => (jsx("button", { onClick: () => setFilterCategory(cat.key), className: filterCategory === cat.key ? cs.pillActive : cs.pill, style: {
68
69
  borderColor: filterCategory === cat.key ? accent : undefined,
69
70
  background: filterCategory === cat.key ? accentDim : undefined,
70
71
  }, children: cat.label }, cat.key))) }), jsx("div", { className: cs.filterGrid, children: filteredList.map((filter) => (jsx(FilterThumb, { filter: filter, selected: selectedFilter === filter.id, accent: accent, onSelect: () => {
71
72
  setSelectedFilter(filter.id);
72
73
  pushHistory();
73
- }, generateThumbnail: generateThumbnail }, filter.id))) }), selectedFilter !== 'none' && (jsxs("div", { className: cs.intensitySection, children: [jsxs("div", { className: cs.intensityHeader, children: [jsxs("span", { className: cs.sliderLabel, children: [jsx(NiceIcon, { name: "bar-chart", size: 14, style: { marginRight: 4 } }), "Intensity"] }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [Math.round(filterIntensity * 100), "%"] })] }), jsx(RangeInput, { min: 0, max: 100, value: filterIntensity * 100, onChange: (e) => setFilterIntensity(Number(e.target.value) / 100), onMouseUp: () => pushHistory(), accentColor: accent })] }))] })), activeTab === 'adjust' && (jsxs("div", { className: cs.adjustColumn, children: [ADJUSTMENT_SLIDERS.map((sl) => (jsxs("div", { children: [jsxs("div", { className: cs.adjustHeader, children: [jsxs("span", { className: cs.sliderLabel, children: [jsx(NiceIcon, { name: sl.icon, size: 14, style: { marginRight: 4 } }), sl.label] }), jsx("span", { className: cs.adjustValue, style: {
74
+ }, generateThumbnail: generateThumbnail }, filter.id))) }), selectedFilter !== 'none' && (jsxs("div", { className: cs.intensitySection, children: [jsxs("div", { className: cs.intensityHeader, children: [jsxs("span", { className: cs.sliderLabel, children: [jsx(NiceIcon, { name: "bar-chart", size: 14, style: { marginRight: 4 } }), t('photoEditor.intensity', 'Intensity')] }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [Math.round(filterIntensity * 100), "%"] })] }), jsx(RangeInput, { min: 0, max: 100, value: filterIntensity * 100, onChange: (e) => setFilterIntensity(Number(e.target.value) / 100), onMouseUp: () => pushHistory(), accentColor: accent })] }))] })), activeTab === 'adjust' && (jsxs("div", { className: cs.adjustColumn, children: [ADJUSTMENT_SLIDERS.map((sl) => (jsxs("div", { children: [jsxs("div", { className: cs.adjustHeader, children: [jsxs("span", { className: cs.sliderLabel, children: [jsx(NiceIcon, { name: sl.icon, size: 14, style: { marginRight: 4 } }), sl.label] }), jsx("span", { className: cs.adjustValue, style: {
74
75
  color: adjustments[sl.key] !== 0 ? accent : 'var(--nice-text-secondary, #666)',
75
- }, onClick: () => handleAdjChange(sl.key, sl.key === 'blur' ? 0 : 0), title: "Reset", children: adjustments[sl.key] })] }), jsx(RangeInput, { min: sl.min, max: sl.max, value: adjustments[sl.key], onChange: (e) => handleAdjChange(sl.key, Number(e.target.value)), onMouseUp: handleAdjChangeEnd, accentColor: accent })] }, sl.key))), jsxs(Button, { variant: "outline-secondary", size: "sm", className: "mt-2", onClick: () => {
76
+ }, onClick: () => handleAdjChange(sl.key, sl.key === 'blur' ? 0 : 0), title: t('photoEditor.reset', 'Reset'), children: adjustments[sl.key] })] }), jsx(RangeInput, { min: sl.min, max: sl.max, value: adjustments[sl.key], onChange: (e) => handleAdjChange(sl.key, Number(e.target.value)), onMouseUp: handleAdjChangeEnd, accentColor: accent })] }, sl.key))), jsxs(Button, { variant: "outline-secondary", size: "sm", className: "mt-2", onClick: () => {
76
77
  handleAdjChange('brightness', 0);
77
78
  const defaults = { ...DEFAULT_ADJUSTMENTS };
78
79
  for (const key of Object.keys(defaults)) {
79
80
  handleAdjChange(key, defaults[key]);
80
81
  }
81
82
  pushHistory();
82
- }, children: [jsx(NiceIcon, { name: "refresh", size: 14, style: { marginRight: 4 } }), t('photoEditor.resetAdjustments', 'Reset adjustments')] })] })), activeTab === 'crop' && (jsxs("div", { children: [jsxs("div", { className: cs.cropInfo, children: [jsx(NiceIcon, { name: "info", size: 14, style: { marginRight: 4 } }), "Drag corners or edges to crop the photo."] }), jsx("div", { className: cs.cropAspectLabel, children: "Aspect ratio" }), jsx("div", { className: cs.cropAspectRow, children: ASPECT_RATIOS.map((ar) => (jsx("button", { onClick: () => {
83
+ }, children: [jsx(NiceIcon, { name: "refresh", size: 14, style: { marginRight: 4 } }), t('photoEditor.resetAdjustments', 'Reset adjustments')] })] })), activeTab === 'crop' && (jsxs("div", { children: [jsxs("div", { className: cs.cropInfo, children: [jsx(NiceIcon, { name: "info", size: 14, style: { marginRight: 4 } }), t('photoEditor.dragCornersOrEdgesTo', 'Drag corners or edges to crop the photo.')] }), jsx("div", { className: cs.cropAspectLabel, children: t('photoEditor.aspectRatio', 'Aspect ratio') }), jsx("div", { className: cs.cropAspectRow, children: ASPECT_RATIOS.map((ar) => (jsx("button", { onClick: () => {
83
84
  setCropAspect(ar.value);
84
85
  if (ar.value && cropRect && image) {
85
86
  let newW = cropRect.w;
@@ -104,7 +105,7 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
104
105
  setCropAspect(null);
105
106
  pushHistory();
106
107
  }
107
- }, children: [jsx(NiceIcon, { name: "expand", size: 14, style: { marginRight: 4 } }), t('photoEditor.resetCrop', 'Reset crop')] })] })), activeTab === 'transform' && (jsxs("div", { children: [jsx("div", { className: cs.sectionTitleMb8, children: "Rotation" }), jsxs("div", { className: cs.transformRow, children: [jsxs(Button, { variant: "dark", size: "sm", onClick: () => {
108
+ }, children: [jsx(NiceIcon, { name: "expand", size: 14, style: { marginRight: 4 } }), t('photoEditor.resetCrop', 'Reset crop')] })] })), activeTab === 'transform' && (jsxs("div", { children: [jsx("div", { className: cs.sectionTitleMb8, children: t('photoEditor.rotation', 'Rotation') }), jsxs("div", { className: cs.transformRow, children: [jsxs(Button, { variant: "dark", size: "sm", onClick: () => {
108
109
  setRotation((rotation - 90 + 360) % 360);
109
110
  pushHistory();
110
111
  }, children: [jsx(NiceIcon, { name: "reply", size: 14, style: { marginRight: 4 } }), " -90\u00B0"] }), jsxs(Button, { variant: "dark", size: "sm", onClick: () => {
@@ -113,13 +114,13 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
113
114
  }, children: [jsx(NiceIcon, { name: "forward", size: 14, style: { marginRight: 4 } }), " +90\u00B0"] }), jsx(Button, { variant: "dark", size: "sm", onClick: () => {
114
115
  setRotation(0);
115
116
  pushHistory();
116
- }, children: "0\u00B0" })] }), jsx("div", { className: cs.sectionTitleMb8, children: "Flip" }), jsxs("div", { className: cs.transformRow, children: [jsxs(Button, { variant: flipH ? 'outline-info' : 'dark', size: "sm", onClick: () => {
117
+ }, children: "0\u00B0" })] }), jsx("div", { className: cs.sectionTitleMb8, children: t('photoEditor.flip', 'Flip') }), jsxs("div", { className: cs.transformRow, children: [jsxs(Button, { variant: flipH ? 'outline-info' : 'dark', size: "sm", onClick: () => {
117
118
  setFlipH(!flipH);
118
119
  pushHistory();
119
- }, children: [jsx(NiceIcon, { name: "move", size: 14, style: { marginRight: 4 } }), " Horizontal"] }), jsxs(Button, { variant: flipV ? 'outline-info' : 'dark', size: "sm", onClick: () => {
120
+ }, children: [jsx(NiceIcon, { name: "move", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.horizontal', 'Horizontal')] }), jsxs(Button, { variant: flipV ? 'outline-info' : 'dark', size: "sm", onClick: () => {
120
121
  setFlipV(!flipV);
121
122
  pushHistory();
122
- }, children: [jsx(NiceIcon, { name: "move", size: 14, style: { marginRight: 4 } }), " Vertical"] })] }), jsx("div", { className: cs.sectionTitleMb8, children: "Preview zoom" }), jsxs("div", { className: cs.transformZoomRow, children: [jsx(RangeInput, { min: 50, max: 300, value: zoom * 100, onChange: (e) => setZoom(Number(e.target.value) / 100), accentColor: accent }), jsxs("span", { className: cs.transformZoomValue, style: { color: accent }, children: [Math.round(zoom * 100), "%"] })] }), jsxs("div", { className: cs.transformInfo, children: [jsxs("div", { children: [jsx("strong", { children: "Rotation:" }), " ", rotation, "\u00B0"] }), jsxs("div", { children: [jsx("strong", { children: "Flip H:" }), " ", flipH ? 'Yes' : 'No'] }), jsxs("div", { children: [jsx("strong", { children: "Flip V:" }), " ", flipV ? 'Yes' : 'No'] }), cropRect && (jsxs("div", { children: [jsx("strong", { children: "Crop:" }), " ", Math.round(cropRect.w), " \u00D7 ", Math.round(cropRect.h), ' (', "x:", Math.round(cropRect.x), ", y:", Math.round(cropRect.y), ")"] }))] })] })), activeTab === 'stickers' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "circle", size: 14, style: { marginRight: 4 } }), " Stickers / Emoji"] }), jsx("div", { className: cs.pillRowGap3, children: EMOJI_CATALOG.map((cat) => (jsxs("button", { onClick: () => setEmojiCat(cat.id), className: emojiCat === cat.id ? cs.pillEmojiActive : cs.pillEmoji, style: {
123
+ }, children: [jsx(NiceIcon, { name: "move", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.vertical', 'Vertical')] })] }), jsx("div", { className: cs.sectionTitleMb8, children: t('photoEditor.previewZoom', 'Preview zoom') }), jsxs("div", { className: cs.transformZoomRow, children: [jsx(RangeInput, { min: 50, max: 300, value: zoom * 100, onChange: (e) => setZoom(Number(e.target.value) / 100), accentColor: accent }), jsxs("span", { className: cs.transformZoomValue, style: { color: accent }, children: [Math.round(zoom * 100), "%"] })] }), jsxs("div", { className: cs.transformInfo, children: [jsxs("div", { children: [jsx("strong", { children: t('photoEditor.rotation2', 'Rotation:') }), " ", rotation, "\u00B0"] }), jsxs("div", { children: [jsx("strong", { children: t('photoEditor.flipH', 'Flip H:') }), ' ', flipH ? t('photoEditor.yes', 'Yes') : t('photoEditor.no', 'No')] }), jsxs("div", { children: [jsx("strong", { children: t('photoEditor.flipV', 'Flip V:') }), ' ', flipV ? t('photoEditor.yes', 'Yes') : t('photoEditor.no', 'No')] }), cropRect && (jsxs("div", { children: [jsx("strong", { children: t('photoEditor.crop', 'Crop:') }), " ", Math.round(cropRect.w), " \u00D7", ' ', Math.round(cropRect.h), ' (', "x:", Math.round(cropRect.x), ", y:", Math.round(cropRect.y), ")"] }))] })] })), activeTab === 'stickers' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "circle", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.stickersEmoji', 'Stickers / Emoji')] }), jsx("div", { className: cs.pillRowGap3, children: EMOJI_CATALOG.map((cat) => (jsxs("button", { onClick: () => setEmojiCat(cat.id), className: emojiCat === cat.id ? cs.pillEmojiActive : cs.pillEmoji, style: {
123
124
  borderColor: emojiCat === cat.id ? accent : undefined,
124
125
  background: emojiCat === cat.id ? accentDim : undefined,
125
126
  }, children: [cat.icon, " ", cat.label] }, cat.id))) }), jsx("div", { className: cs.emojiGrid, children: (_a = EMOJI_CATALOG.find((c) => c.id === emojiCat)) === null || _a === void 0 ? void 0 : _a.emojis.map((em, idx) => (jsx("button", { onClick: () => {
@@ -127,20 +128,20 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
127
128
  const cw = (_b = (_a = mainCanvasRef.current) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 400;
128
129
  const ch = (_d = (_c = mainCanvasRef.current) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 400;
129
130
  addOverlay(createEmojiOverlay(em, cw, ch));
130
- }, className: cs.emojiBtn, title: em, children: em }, idx))) }), overlays.length > 0 && (jsxs("div", { className: cs.overlaySection, children: [jsxs("div", { className: cs.overlaySectionTitle, children: ["Warstwy (", overlays.length, ")"] }), overlays.map((ov) => (jsxs("div", { onClick: () => setSelectedOverlayId(ov.id), className: cs.overlayItem, style: { background: selectedOverlayId === ov.id ? accentDim : undefined }, children: [jsx("span", { className: cs.overlayIcon, children: ov.type === 'emoji' ? (ov.emoji) : ov.type === 'text' ? ('T') : ov.type === 'shape' ? (jsx(NiceIcon, { name: "star", size: 14 })) : ov.type === 'drawing' ? (jsx(NiceIcon, { name: "pen", size: 14 })) : (jsx(NiceIcon, { name: "square", size: 14 })) }), jsx("span", { className: cs.overlayName, children: ov.type === 'text'
131
+ }, className: cs.emojiBtn, title: em, children: em }, idx))) }), overlays.length > 0 && (jsxs("div", { className: cs.overlaySection, children: [jsx("div", { className: cs.overlaySectionTitle, children: t('photoEditor.layers', 'Layers ({overlays})').replace('{overlays}', String(overlays.length)) }), overlays.map((ov) => (jsxs("div", { onClick: () => setSelectedOverlayId(ov.id), className: cs.overlayItem, style: { background: selectedOverlayId === ov.id ? accentDim : undefined }, children: [jsx("span", { className: cs.overlayIcon, children: ov.type === 'emoji' ? (ov.emoji) : ov.type === 'text' ? ('T') : ov.type === 'shape' ? (jsx(NiceIcon, { name: "star", size: 14 })) : ov.type === 'drawing' ? (jsx(NiceIcon, { name: "pen", size: 14 })) : (jsx(NiceIcon, { name: "square", size: 14 })) }), jsx("span", { className: cs.overlayName, children: ov.type === 'text'
131
132
  ? ov.text.slice(0, 20)
132
133
  : ov.type === 'emoji'
133
- ? 'Emoji'
134
+ ? t('photoEditor.emoji', 'Emoji')
134
135
  : ov.type === 'shape'
135
136
  ? ov.shapeKind
136
137
  : ov.type === 'drawing'
137
- ? `Rysunek (${ov.strokes.length})`
138
+ ? t('photoEditor.drawing', 'Drawing ({strokes})').replace('{strokes}', String(ov.strokes.length))
138
139
  : ov.type === 'frame'
139
140
  ? ov.frameStyle
140
141
  : '' }), jsx("button", { onClick: (e) => {
141
142
  e.stopPropagation();
142
143
  deleteOverlay(ov.id);
143
- }, className: cs.overlayDeleteBtn, "aria-label": t('photoEditor.deleteLayer', 'Delete layer'), children: jsx(NiceIcon, { name: "close", size: 14 }) })] }, ov.id)))] }))] })), activeTab === 'text' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitleMb8, children: [jsx(NiceIcon, { name: "type", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.addCaption', 'Add caption')] }), jsx(TextArea, { rows: 2, value: textDraft, onChange: (e) => setTextDraft(e.target.value), placeholder: t('photoEditor.textPlaceholder', 'Enter text…'), className: cs.textArea }), jsxs("div", { className: cs.textBtnRow, children: [jsx(Button, { variant: textBold ? 'light' : 'dark', size: "sm", onClick: () => setTextBold(!textBold), title: "Bold", className: cs.textFormatBtn, style: { fontWeight: 700 }, children: "B" }), jsx(Button, { variant: textItalic ? 'light' : 'dark', size: "sm", onClick: () => setTextItalic(!textItalic), title: "Italic", className: cs.textFormatBtn, style: { fontStyle: 'italic' }, children: "I" }), jsx(Button, { variant: textOutline ? 'light' : 'dark', size: "sm", onClick: () => setTextOutline(!textOutline), title: "Kontur", className: cs.textFormatBtn, children: "O" }), jsx(Button, { variant: textBg ? 'light' : 'dark', size: "sm", onClick: () => setTextBg(!textBg), title: t('photoEditor.background', 'Background'), className: cs.textFormatBtn, children: jsx(NiceIcon, { name: "square", size: 14 }) }), jsx("input", { type: "color", value: textColor, onChange: (e) => setTextColor(e.target.value), className: cs.colorInputLg, title: t('photoEditor.textColour', 'Text colour') })] }), jsxs("div", { className: cs.sliderRow, children: [jsxs("span", { className: cs.sliderLabel, children: [t('photoEditor.size', 'Size'), ":"] }), jsx(RangeInput, { min: 12, max: 120, value: textFontSize, onChange: (e) => setTextFontSize(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [textFontSize, "px"] })] }), jsxs(Button, { size: "sm", className: cs.accentBtn, style: { background: accent, borderColor: accent }, disabled: !textDraft.trim(), onClick: () => {
144
+ }, className: cs.overlayDeleteBtn, "aria-label": t('photoEditor.deleteLayer', 'Delete layer'), children: jsx(NiceIcon, { name: "close", size: 14 }) })] }, ov.id)))] }))] })), activeTab === 'text' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitleMb8, children: [jsx(NiceIcon, { name: "type", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.addCaption', 'Add caption')] }), jsx(TextArea, { rows: 2, value: textDraft, onChange: (e) => setTextDraft(e.target.value), placeholder: t('photoEditor.textPlaceholder', 'Enter text…'), className: cs.textArea }), jsxs("div", { className: cs.textBtnRow, children: [jsx(Button, { variant: textBold ? 'light' : 'dark', size: "sm", onClick: () => setTextBold(!textBold), title: t('photoEditor.bold', 'Bold'), className: cs.textFormatBtn, style: { fontWeight: 700 }, children: "B" }), jsx(Button, { variant: textItalic ? 'light' : 'dark', size: "sm", onClick: () => setTextItalic(!textItalic), title: t('photoEditor.italic', 'Italic'), className: cs.textFormatBtn, style: { fontStyle: 'italic' }, children: "I" }), jsx(Button, { variant: textOutline ? 'light' : 'dark', size: "sm", onClick: () => setTextOutline(!textOutline), title: t('photoEditor.outline', 'Outline'), className: cs.textFormatBtn, children: "O" }), jsx(Button, { variant: textBg ? 'light' : 'dark', size: "sm", onClick: () => setTextBg(!textBg), title: t('photoEditor.background', 'Background'), className: cs.textFormatBtn, children: jsx(NiceIcon, { name: "square", size: 14 }) }), jsx("input", { type: "color", value: textColor, onChange: (e) => setTextColor(e.target.value), className: cs.colorInputLg, title: t('photoEditor.textColour', 'Text colour') })] }), jsxs("div", { className: cs.sliderRow, children: [jsxs("span", { className: cs.sliderLabel, children: [t('photoEditor.size', 'Size'), ":"] }), jsx(RangeInput, { min: 12, max: 120, value: textFontSize, onChange: (e) => setTextFontSize(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [textFontSize, "px"] })] }), jsxs(Button, { size: "sm", className: cs.accentBtn, style: { background: accent, borderColor: accent }, disabled: !textDraft.trim(), onClick: () => {
144
145
  const ov = createTextOverlay(textDraft);
145
146
  ov.color = textColor;
146
147
  ov.bold = textBold;
@@ -164,13 +165,13 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
164
165
  italic: !selectedOverlay.italic,
165
166
  });
166
167
  pushHistory();
167
- }, className: cs.textFormatBtnSm, style: { fontStyle: 'italic' }, children: "I" })] })] }))] })), activeTab === 'shapes' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "star", size: 14, style: { marginRight: 4 } }), " Shapes"] }), jsxs("div", { className: cs.shapeColorRow, children: [jsx("span", { className: cs.shapeColorLabel, children: "Stroke:" }), jsx("input", { type: "color", value: shapeStroke, onChange: (e) => setShapeStroke(e.target.value), className: cs.colorInput, title: "Stroke color" }), jsx("span", { className: cs.shapeColorLabelMl, children: "Fill:" }), jsx("input", { type: "color", value: shapeFill || '#ffffff', onChange: (e) => setShapeFill(e.target.value), className: cs.colorInput, title: t('photoEditor.fillColor', 'Fill color') }), jsx(Button, { variant: shapeFill ? 'light' : 'dark', size: "sm", onClick: () => setShapeFill(shapeFill ? '' : '#ffffff'), className: cs.shapeFillToggle, children: shapeFill ? 'Off' : 'On' })] }), jsxs("div", { className: cs.sliderRow, children: [jsx("span", { className: cs.sliderLabel, children: "Width:" }), jsx(RangeInput, { min: 1, max: 20, value: shapeStrokeW, onChange: (e) => setShapeStrokeW(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [shapeStrokeW, "px"] })] }), jsx("div", { className: cs.shapeGrid, children: SHAPE_CATALOG.map((sh) => (jsx("button", { title: sh.label, onClick: () => {
168
+ }, className: cs.textFormatBtnSm, style: { fontStyle: 'italic' }, children: "I" })] })] }))] })), activeTab === 'shapes' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "star", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.shapes', 'Shapes')] }), jsxs("div", { className: cs.shapeColorRow, children: [jsx("span", { className: cs.shapeColorLabel, children: t('photoEditor.stroke', 'Stroke:') }), jsx("input", { type: "color", value: shapeStroke, onChange: (e) => setShapeStroke(e.target.value), className: cs.colorInput, title: t('photoEditor.strokeColor', 'Stroke color') }), jsx("span", { className: cs.shapeColorLabelMl, children: t('photoEditor.fill', 'Fill:') }), jsx("input", { type: "color", value: shapeFill || '#ffffff', onChange: (e) => setShapeFill(e.target.value), className: cs.colorInput, title: t('photoEditor.fillColor', 'Fill color') }), jsx(Button, { variant: shapeFill ? 'light' : 'dark', size: "sm", onClick: () => setShapeFill(shapeFill ? '' : '#ffffff'), className: cs.shapeFillToggle, children: shapeFill ? t('photoEditor.off', 'Off') : t('photoEditor.on', 'On') })] }), jsxs("div", { className: cs.sliderRow, children: [jsx("span", { className: cs.sliderLabel, children: t('photoEditor.width', 'Width:') }), jsx(RangeInput, { min: 1, max: 20, value: shapeStrokeW, onChange: (e) => setShapeStrokeW(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [shapeStrokeW, "px"] })] }), jsx("div", { className: cs.shapeGrid, children: SHAPE_CATALOG.map((sh) => (jsx("button", { title: sh.label, onClick: () => {
168
169
  const ov = createShapeOverlay(sh.id);
169
170
  ov.strokeColor = shapeStroke;
170
171
  ov.fillColor = shapeFill || null;
171
172
  ov.strokeWidth = shapeStrokeW;
172
173
  addOverlay(ov);
173
- }, className: cs.shapeBtn, children: jsx(NiceIcon, { name: sh.icon, size: 18 }) }, sh.id))) }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "image", size: 14, style: { marginRight: 4 } }), " Ramki"] }), jsxs("div", { className: cs.frameColorRow, children: [jsx("input", { type: "color", value: frameColor, onChange: (e) => setFrameColor(e.target.value), className: cs.colorInput, "aria-label": t('photoEditor.frameColor', 'Frame color') }), jsxs("div", { className: cs.frameThicknessWrap, children: [jsx("span", { className: cs.sliderLabel, children: "Grub.:" }), jsx(RangeInput, { min: 1, max: 10, value: frameThick, onChange: (e) => setFrameThick(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsx("span", { className: cs.frameThicknessValue, style: { color: accent }, children: frameThick })] })] }), jsxs("div", { className: cs.frameGrid, children: [FRAME_CATALOG.map((fr) => (jsx("button", { title: fr.label, onClick: () => {
174
+ }, className: cs.shapeBtn, children: jsx(NiceIcon, { name: sh.icon, size: 18 }) }, sh.id))) }), jsxs("div", { className: cs.sectionTitle, children: [jsx(NiceIcon, { name: "image", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.frames', 'Frames')] }), jsxs("div", { className: cs.frameColorRow, children: [jsx("input", { type: "color", value: frameColor, onChange: (e) => setFrameColor(e.target.value), className: cs.colorInput, "aria-label": t('photoEditor.frameColor', 'Frame color') }), jsxs("div", { className: cs.frameThicknessWrap, children: [jsx("span", { className: cs.sliderLabel, children: t('photoEditor.thickness', 'Thickness:') }), jsx(RangeInput, { min: 1, max: 10, value: frameThick, onChange: (e) => setFrameThick(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsx("span", { className: cs.frameThicknessValue, style: { color: accent }, children: frameThick })] })] }), jsxs("div", { className: cs.frameGrid, children: [FRAME_CATALOG.map((fr) => (jsx("button", { title: fr.label, onClick: () => {
174
175
  setOverlays((prev) => prev.filter((o) => o.type !== 'frame'));
175
176
  const ov = createFrameOverlay(fr.id, frameColor);
176
177
  ov.thickness = frameThick / 100;
@@ -178,7 +179,7 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
178
179
  }, className: cs.frameBtn, children: jsx(NiceIcon, { name: fr.icon, size: 18 }) }, fr.id))), jsx("button", { title: t('photoEditor.removeFrame', 'Remove frame'), "aria-label": t('photoEditor.removeFrame', 'Remove frame'), onClick: () => {
179
180
  setOverlays((prev) => prev.filter((o) => o.type !== 'frame'));
180
181
  pushHistory();
181
- }, className: cs.removeFrameBtn, children: jsx(NiceIcon, { name: "close", size: 14 }) })] })] })), activeTab === 'draw' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitleMb8, children: [jsx(NiceIcon, { name: "brush", size: 14, style: { marginRight: 4 } }), " Freehand drawing"] }), jsxs("div", { className: cs.sectionInfoMb, children: [jsx(NiceIcon, { name: "info", size: 14, style: { marginRight: 4 } }), "Draw directly on the photo by holding the left mouse button."] }), jsxs("div", { className: cs.quickColorRow, children: [jsx("span", { className: cs.sliderLabel, children: "Color:" }), jsx("input", { type: "color", value: drawColor, onChange: (e) => setDrawColor(e.target.value), className: cs.colorInputDraw, "aria-label": t('photoEditor.drawColor', 'Drawing color') }), [
182
+ }, className: cs.removeFrameBtn, children: jsx(NiceIcon, { name: "close", size: 14 }) })] })] })), activeTab === 'draw' && (jsxs("div", { children: [jsx(OverlayToolbar, { api: api }), jsxs("div", { className: cs.sectionTitleMb8, children: [jsx(NiceIcon, { name: "brush", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.freehandDrawing', 'Freehand drawing')] }), jsxs("div", { className: cs.sectionInfoMb, children: [jsx(NiceIcon, { name: "info", size: 14, style: { marginRight: 4 } }), t('photoEditor.drawDirectlyOnThePhoto', 'Draw directly on the photo by holding the left mouse button.')] }), jsxs("div", { className: cs.quickColorRow, children: [jsx("span", { className: cs.sliderLabel, children: t('photoEditor.color2', 'Color:') }), jsx("input", { type: "color", value: drawColor, onChange: (e) => setDrawColor(e.target.value), className: cs.colorInputDraw, "aria-label": t('photoEditor.drawColor', 'Drawing color') }), [
182
183
  '#ff0000',
183
184
  '#ff8800',
184
185
  '#ffff00',
@@ -191,7 +192,7 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
191
192
  ].map((c) => (jsx("div", { onClick: () => setDrawColor(c), className: cs.quickColorSwatch, style: {
192
193
  background: c,
193
194
  border: drawColor === c ? `2px solid ${accent}` : undefined,
194
- } }, c)))] }), jsxs("div", { className: cs.sliderRow, style: { marginBottom: 12 }, children: [jsx("span", { className: cs.sliderLabel, children: "Width:" }), jsx(RangeInput, { min: 1, max: 30, value: drawWidth, onChange: (e) => setDrawWidth(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [drawWidth, "px"] })] }), jsx("div", { className: cs.drawPreview, children: jsx("div", { style: {
195
+ } }, c)))] }), jsxs("div", { className: cs.sliderRow, style: { marginBottom: 12 }, children: [jsx("span", { className: cs.sliderLabel, children: t('photoEditor.width', 'Width:') }), jsx(RangeInput, { min: 1, max: 30, value: drawWidth, onChange: (e) => setDrawWidth(Number(e.target.value)), accentColor: accent, style: { flex: 1 } }), jsxs("span", { className: cs.sliderValue, style: { color: accent }, children: [drawWidth, "px"] })] }), jsx("div", { className: cs.drawPreview, children: jsx("div", { style: {
195
196
  width: Math.max(drawWidth, 4),
196
197
  height: Math.max(drawWidth, 4),
197
198
  borderRadius: '50%',
@@ -212,15 +213,14 @@ const PhotoEditorLeftPanel = React.memo(({ api }) => {
212
213
  }));
213
214
  pushHistory();
214
215
  }
215
- }, className: cs.drawActionBtn, children: [jsx(NiceIcon, { name: "reply", size: 14, style: { marginRight: 4 } }), " Undo stroke"] }), jsxs(Button, { variant: "outline-danger", size: "sm", onClick: () => {
216
+ }, className: cs.drawActionBtn, children: [jsx(NiceIcon, { name: "reply", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.undoStroke', 'Undo stroke')] }), jsxs(Button, { variant: "outline-danger", size: "sm", onClick: () => {
216
217
  if (drawingOverlayRef.current) {
217
218
  deleteOverlay(drawingOverlayRef.current.id);
218
219
  drawingOverlayRef.current = null;
219
220
  }
220
- }, className: cs.drawActionBtn, children: [jsx(NiceIcon, { name: "trash", size: 14, style: { marginRight: 4 } }), " Clear"] })] }), jsxs(Button, { variant: "dark", size: "sm", className: "mt-2 w-100", onClick: () => {
221
+ }, className: cs.drawActionBtn, children: [jsx(NiceIcon, { name: "trash", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.clear', 'Clear')] })] }), jsxs(Button, { variant: "dark", size: "sm", className: "mt-2 w-100", onClick: () => {
221
222
  drawingOverlayRef.current = null;
222
- }, children: [jsx(NiceIcon, { name: "plus", size: 14, style: { marginRight: 4 } }), " New drawing layer"] })] }))] })] }));
223
- });
224
- PhotoEditorLeftPanel.displayName = 'PhotoEditorLeftPanel';
223
+ }, children: [jsx(NiceIcon, { name: "plus", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.newDrawingLayer', 'New drawing layer')] })] }))] })] }));
224
+ }), { displayName: 'PhotoEditorLeftPanel' });
225
225
 
226
226
  export { PhotoEditorLeftPanel as default };
@@ -4,15 +4,15 @@ import React from 'react';
4
4
  import { Button } from '../core/LocalUI.js';
5
5
  import cs from './PhotoEditor.module.css.js';
6
6
 
7
- const PhotoEditorToolbar = React.memo(({ api }) => {
7
+ const PhotoEditorToolbar = /* @__PURE__ */ Object.assign(
8
+ /* @__PURE__ */ React.memo(({ api }) => {
8
9
  const { t, accent, historyIdx, historyLength, undo, redo, handleReset, showCompare, setShowCompare, handleDownload, handleCopyToClipboard, handleShareNative, onCancel, handleSave, } = api;
9
- return (jsxs("div", { className: cs.toolbar, children: [jsxs("div", { className: cs.toolbarGroup, children: [jsx(Button, { variant: "dark", size: "sm", onClick: undo, disabled: historyIdx <= 0, title: `${t('photoEditor.undo', 'Undo')} (Ctrl+Z)`, children: jsx(NiceIcon, { name: "reply", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: redo, disabled: historyIdx >= historyLength - 1, title: t('photoEditor.redo', 'Redo (Ctrl+Y)'), children: jsx(NiceIcon, { name: "forward", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleReset, title: "Reset", children: jsx(NiceIcon, { name: "refresh", size: 14 }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: showCompare ? 'outline-info' : 'dark', size: "sm", onClick: () => setShowCompare(!showCompare), title: t('photoEditor.compareOriginal', 'Compare with original'), children: jsx(NiceIcon, { name: "columns", size: 14 }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: "dark", size: "sm", onClick: handleDownload, title: "Download", children: jsx(NiceIcon, { name: "download", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleCopyToClipboard, title: "Copy to clipboard", children: jsx(NiceIcon, { name: "clipboard", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleShareNative, title: t('common.share', 'Share'), children: jsx(NiceIcon, { name: "send", size: 14 }) })] }), jsxs("div", { className: cs.toolbarTitle, style: { color: accent }, children: [jsx(NiceIcon, { name: "wand", size: 14, style: { marginRight: 8 } }), t('photoEditor.title', 'Photo Editor')] }), jsxs("div", { className: cs.toolbarGroup, children: [jsxs(Button, { variant: "outline-secondary", size: "sm", onClick: onCancel, children: [jsx(NiceIcon, { name: "close", size: 14, style: { marginRight: 4 } }), ' ', t('common.cancel', 'Cancel')] }), jsxs(Button, { size: "sm", style: {
10
+ return (jsxs("div", { className: cs.toolbar, children: [jsxs("div", { className: cs.toolbarGroup, children: [jsx(Button, { variant: "dark", size: "sm", onClick: undo, disabled: historyIdx <= 0, title: `${t('photoEditor.undo', 'Undo')} (Ctrl+Z)`, children: jsx(NiceIcon, { name: "reply", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: redo, disabled: historyIdx >= historyLength - 1, title: t('photoEditor.redo', 'Redo (Ctrl+Y)'), children: jsx(NiceIcon, { name: "forward", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleReset, title: t('photoEditor.reset', 'Reset'), children: jsx(NiceIcon, { name: "refresh", size: 14 }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: showCompare ? 'outline-info' : 'dark', size: "sm", onClick: () => setShowCompare(!showCompare), title: t('photoEditor.compareOriginal', 'Compare with original'), children: jsx(NiceIcon, { name: "columns", size: 14 }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: "dark", size: "sm", onClick: handleDownload, title: t('photoEditor.download', 'Download'), children: jsx(NiceIcon, { name: "download", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleCopyToClipboard, title: t('photoEditor.copyToClipboard', 'Copy to clipboard'), children: jsx(NiceIcon, { name: "clipboard", size: 14 }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleShareNative, title: t('common.share', 'Share'), children: jsx(NiceIcon, { name: "send", size: 14 }) })] }), jsxs("div", { className: cs.toolbarTitle, style: { color: accent }, children: [jsx(NiceIcon, { name: "wand", size: 14, style: { marginRight: 8 } }), t('photoEditor.title', 'Photo Editor')] }), jsxs("div", { className: cs.toolbarGroup, children: [jsxs(Button, { variant: "outline-secondary", size: "sm", onClick: onCancel, children: [jsx(NiceIcon, { name: "close", size: 14, style: { marginRight: 4 } }), ' ', t('common.cancel', 'Cancel')] }), jsxs(Button, { size: "sm", style: {
10
11
  background: accent,
11
12
  borderColor: accent,
12
13
  color: 'var(--nice-color-white, #fff)',
13
14
  fontWeight: 600,
14
15
  }, onClick: handleSave, children: [jsx(NiceIcon, { name: "check", size: 14, style: { marginRight: 4 } }), ' ', t('photoEditor.apply', 'Apply')] })] })] }));
15
- });
16
- PhotoEditorToolbar.displayName = 'PhotoEditorToolbar';
16
+ }), { displayName: 'PhotoEditorToolbar' });
17
17
 
18
18
  export { PhotoEditorToolbar as default };
@@ -285,6 +285,7 @@ function brownie(data) {
285
285
  function duotone(data, params) {
286
286
  const out = cloneImageData(data);
287
287
  const d = out.data;
288
+ // audit-allow: literal-color +2 — the duotone filter's default inks, written into the photo
288
289
  const dark = hexToRgb((params === null || params === void 0 ? void 0 : params.darkColor) || '#001f3f');
289
290
  const light = hexToRgb((params === null || params === void 0 ? void 0 : params.lightColor) || '#ff851b');
290
291
  for (let i = 0; i < d.length; i += 4) {
@@ -1,6 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { NiceAppShell, NiceModal, NiceNumberInput, NiceButton } from '@nice2dev/ui';
3
3
  import { useState, useCallback } from 'react';
4
+ import { EditorAskDialog } from '../core/editorAsk.js';
5
+ import { useNiceTranslation } from '../core/i18n.js';
4
6
  import styles from './PixelEditor.module.css.js';
5
7
  import PixelEditorCanvas from './PixelEditorCanvas.js';
6
8
  import PixelEditorMenuBar from './PixelEditorMenuBar.js';
@@ -12,20 +14,21 @@ import NiceSpriteGeneratorPanel from './SpriteGeneratorPanel.js';
12
14
  import { usePixelEditor } from './usePixelEditor.js';
13
15
 
14
16
  const NicePixelEditor = ({ initialWidth = 64, initialHeight = 64, className, onSaveToLibrary, }) => {
17
+ const { t } = useNiceTranslation();
15
18
  const api = usePixelEditor({ initialWidth, initialHeight, onSaveToLibrary });
16
19
  const [showGenerator, setShowGenerator] = useState(false);
17
20
  const handleGeneratorSend = useCallback((imageData) => {
18
21
  var _a;
19
22
  (_a = api.importImageData) === null || _a === void 0 ? void 0 : _a.call(api, imageData);
20
23
  }, [api]);
21
- return (jsxs(Fragment, { children: [jsx("input", { ref: api.fInp, type: "file", accept: ".ase,.aseprite,.png,.jpg,.jpeg,.gif,.bmp,.webp,.svg,.tga,.ico,.tiff,.tif,.avif", style: { display: 'none' }, onChange: (e) => {
24
+ return (jsxs(Fragment, { children: [jsx(EditorAskDialog, { ask: api.pendingAsk }), jsx("input", { ref: api.fInp, type: "file", accept: ".ase,.aseprite,.png,.jpg,.jpeg,.gif,.bmp,.webp,.svg,.tga,.ico,.tiff,.tif,.avif", style: { display: 'none' }, onChange: (e) => {
22
25
  var _a;
23
26
  const f = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
24
27
  if (f) {
25
28
  api.openFile(f);
26
29
  }
27
30
  e.target.value = '';
28
- } }), jsx(NiceAppShell, { className: className, flush: true, menubar: jsx(PixelEditorMenuBar, { api: api, hasOnSaveToLibrary: !!onSaveToLibrary, onOpenGenerator: () => setShowGenerator(true) }), sidebar: jsx(PixelEditorToolbar, { api: api }), rightSidebar: jsx(PixelEditorRightPanel, { api: api }), bottomPanel: jsx(PixelEditorTimeline, { api: api }), statusBar: jsx(PixelEditorStatusBar, { api: api }), children: jsx(PixelEditorCanvas, { api: api }) }), showGenerator && (jsx(NiceSpriteGeneratorPanel, { onSendToCanvas: handleGeneratorSend, onClose: () => setShowGenerator(false) })), jsxs(NiceModal, { open: api.dlgNew, onClose: () => api.setDlgNew(false), title: "New Document", children: [jsx("label", { children: "Width (px)" }), jsx(NiceNumberInput, { min: 1, max: 4096, value: api.nw, onChange: (val) => api.setNw(val !== null && val !== void 0 ? val : 64), "aria-label": "Document width" }), jsx("label", { children: "Height (px)" }), jsx(NiceNumberInput, { min: 1, max: 4096, value: api.nh, onChange: (val) => api.setNh(val !== null && val !== void 0 ? val : 64), "aria-label": "Document height" }), jsx("div", { style: { display: 'flex', gap: 4, flexWrap: 'wrap', marginTop: 8 }, children: [
31
+ } }), jsx(NiceAppShell, { className: className, flush: true, menubar: jsx(PixelEditorMenuBar, { api: api, hasOnSaveToLibrary: !!onSaveToLibrary, onOpenGenerator: () => setShowGenerator(true) }), sidebar: jsx(PixelEditorToolbar, { api: api }), rightSidebar: jsx(PixelEditorRightPanel, { api: api }), bottomPanel: jsx(PixelEditorTimeline, { api: api }), statusBar: jsx(PixelEditorStatusBar, { api: api }), children: jsx(PixelEditorCanvas, { api: api }) }), showGenerator && (jsx(NiceSpriteGeneratorPanel, { onSendToCanvas: handleGeneratorSend, onClose: () => setShowGenerator(false) })), jsxs(NiceModal, { open: api.dlgNew, onClose: () => api.setDlgNew(false), title: t('pixelEditor.newDocument', 'New Document'), children: [jsx("label", { children: t('pixelEditor.widthPx', 'Width (px)') }), jsx(NiceNumberInput, { min: 1, max: 4096, value: api.nw, onChange: (val) => api.setNw(val !== null && val !== void 0 ? val : 64), "aria-label": t('pixelEditor.documentWidth', 'Document width') }), jsx("label", { children: t('pixelEditor.heightPx', 'Height (px)') }), jsx(NiceNumberInput, { min: 1, max: 4096, value: api.nh, onChange: (val) => api.setNh(val !== null && val !== void 0 ? val : 64), "aria-label": t('pixelEditor.documentHeight', 'Document height') }), jsx("div", { style: { display: 'flex', gap: 4, flexWrap: 'wrap', marginTop: 8 }, children: [
29
32
  [16, 16],
30
33
  [32, 32],
31
34
  [48, 48],
@@ -39,7 +42,7 @@ const NicePixelEditor = ({ initialWidth = 64, initialHeight = 64, className, onS
39
42
  ].map(([w, h]) => (jsxs(NiceButton, { className: styles.btnSecondary, variant: "ghost", size: "sm", style: { fontSize: 10, padding: '2px 6px' }, onClick: () => {
40
43
  api.setNw(w);
41
44
  api.setNh(h);
42
- }, children: [w, "x", h] }, `${w}x${h}`))) }), jsxs("div", { className: styles.dialogActions, children: [jsx(NiceButton, { className: styles.btnSecondary, variant: "ghost", onClick: () => api.setDlgNew(false), children: "Cancel" }), jsx(NiceButton, { className: styles.btnPrimary, variant: "primary", onClick: () => api.newDoc(api.nw, api.nh), children: "Create" })] })] })] }));
45
+ }, children: [w, "x", h] }, `${w}x${h}`))) }), jsxs("div", { className: styles.dialogActions, children: [jsx(NiceButton, { className: styles.btnSecondary, variant: "ghost", onClick: () => api.setDlgNew(false), children: t('pixelEditor.cancel', 'Cancel') }), jsx(NiceButton, { className: styles.btnPrimary, variant: "primary", onClick: () => api.newDoc(api.nw, api.nh), children: t('pixelEditor.create', 'Create') })] })] })] }));
43
46
  };
44
47
 
45
48
  export { NicePixelEditor };
@@ -1,12 +1,16 @@
1
1
  import { 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
 
5
- const PixelEditorCanvas = React.memo(({ api }) => (jsx("div", { ref: api.boxRef, className: styles.canvasContainer, children: jsx("canvas", { ref: api.cvRef, onPointerDown: api.onDown, onPointerMove: api.onMove, onPointerUp: api.onUp, onPointerLeave: () => {
6
- api.drawing.current = false;
7
- api.panning.current = false;
8
- api.setCursor(null);
9
- }, onWheel: api.onWheel, onContextMenu: (e) => e.preventDefault(), style: { inset: 0, width: '100%', height: '100%', touchAction: 'none' }, "aria-label": "Pixel editor canvas" }) })));
10
- PixelEditorCanvas.displayName = 'PixelEditorCanvas';
6
+ const PixelEditorCanvas = /* @__PURE__ */ Object.assign(
7
+ /* @__PURE__ */ React.memo(({ api }) => {
8
+ const { t } = useNiceTranslation();
9
+ return (jsx("div", { ref: api.boxRef, className: styles.canvasContainer, children: jsx("canvas", { ref: api.cvRef, onPointerDown: api.onDown, onPointerMove: api.onMove, onPointerUp: api.onUp, onPointerLeave: () => {
10
+ api.drawing.current = false;
11
+ api.panning.current = false;
12
+ api.setCursor(null);
13
+ }, onWheel: api.onWheel, onContextMenu: (e) => e.preventDefault(), style: { inset: 0, width: '100%', height: '100%', touchAction: 'none' }, "aria-label": t('pixelEditorCanvas.pixelEditorCanvas', 'Pixel editor canvas') }) }));
14
+ }), { displayName: 'PixelEditorCanvas' });
11
15
 
12
16
  export { PixelEditorCanvas as default };
@@ -2,40 +2,71 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { NiceMenu } 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 PixelEditorMenuBar = React.memo(({ api, hasOnSaveToLibrary, onOpenGenerator }) => {
8
+ const PixelEditorMenuBar = /* @__PURE__ */ Object.assign(
9
+ /* @__PURE__ */ React.memo(({ api, hasOnSaveToLibrary, onOpenGenerator }) => {
10
+ const { t } = useNiceTranslation();
8
11
  const items = [
9
12
  {
10
13
  id: 'file',
11
- label: 'File',
14
+ label: t('pixelEditorMenuBar.file', 'File'),
12
15
  children: [
13
16
  {
14
17
  id: 'new',
15
- label: 'New…',
18
+ label: t('pixelEditorMenuBar.new', 'New…'),
16
19
  icon: jsx(NiceIcon, { name: "file", size: 14 }),
17
20
  onClick: () => api.setDlgNew(true),
18
21
  },
19
22
  {
20
23
  id: 'open',
21
- label: 'Open…',
24
+ label: t('pixelEditorMenuBar.open', 'Open…'),
22
25
  icon: jsx(NiceIcon, { name: "folder", size: 14 }),
23
26
  onClick: () => { var _a; return (_a = api.fInp.current) === null || _a === void 0 ? void 0 : _a.click(); },
24
27
  },
25
28
  { id: 'sep-file-1', divider: true },
26
- { id: 'ase', label: 'Save .ase', onClick: api.exportAse },
27
- { id: 'png', label: 'Export PNG', onClick: api.exportPNG },
28
- { id: 'jpg', label: 'Export JPG', onClick: api.exportJPG },
29
- { id: 'webp', label: 'Export WebP', onClick: api.exportWebP },
30
- { id: 'bmp', label: 'Export BMP', onClick: api.exportBMP },
31
- { id: 'svg', label: 'Export SVG', onClick: api.exportSVG },
32
- { id: 'sheet', label: 'Export sprite sheet', onClick: api.exportSheet },
29
+ {
30
+ id: 'ase',
31
+ label: t('pixelEditorMenuBar.saveAse', 'Save .ase'),
32
+ onClick: api.exportAse,
33
+ },
34
+ {
35
+ id: 'png',
36
+ label: t('pixelEditorMenuBar.exportPng', 'Export PNG'),
37
+ onClick: api.exportPNG,
38
+ },
39
+ {
40
+ id: 'jpg',
41
+ label: t('pixelEditorMenuBar.exportJpg', 'Export JPG'),
42
+ onClick: api.exportJPG,
43
+ },
44
+ {
45
+ id: 'webp',
46
+ label: t('pixelEditorMenuBar.exportWebp', 'Export WebP'),
47
+ onClick: api.exportWebP,
48
+ },
49
+ {
50
+ id: 'bmp',
51
+ label: t('pixelEditorMenuBar.exportBmp', 'Export BMP'),
52
+ onClick: api.exportBMP,
53
+ },
54
+ {
55
+ id: 'svg',
56
+ label: t('pixelEditorMenuBar.exportSvg', 'Export SVG'),
57
+ onClick: api.exportSVG,
58
+ },
59
+ {
60
+ id: 'sheet',
61
+ label: t('pixelEditorMenuBar.exportSpriteSheet', 'Export sprite sheet'),
62
+ onClick: api.exportSheet,
63
+ },
33
64
  ...(hasOnSaveToLibrary
34
65
  ? [
35
66
  { id: 'sep-file-2', divider: true },
36
67
  {
37
68
  id: 'lib',
38
- label: 'Save to Library',
69
+ label: t('pixelEditorMenuBar.saveToLibrary', 'Save to Library'),
39
70
  icon: jsx(NiceIcon, { name: "box", size: 14 }),
40
71
  onClick: api.saveToLibrary,
41
72
  },
@@ -45,35 +76,70 @@ const PixelEditorMenuBar = React.memo(({ api, hasOnSaveToLibrary, onOpenGenerato
45
76
  },
46
77
  {
47
78
  id: 'edit',
48
- label: 'Edit',
79
+ label: t('pixelEditorMenuBar.edit', 'Edit'),
49
80
  children: [
50
- { id: 'undo', label: 'Undo', onClick: api.undo },
51
- { id: 'redo', label: 'Redo', onClick: api.redo },
81
+ { id: 'undo', label: t('pixelEditorMenuBar.undo', 'Undo'), onClick: api.undo },
82
+ { id: 'redo', label: t('pixelEditorMenuBar.redo', 'Redo'), onClick: api.redo },
52
83
  { id: 'sep-edit-1', divider: true },
53
- { id: 'copy', label: 'Copy', onClick: api.doCopy, disabled: !api.sel },
54
- { id: 'cut', label: 'Cut', onClick: api.doCut, disabled: !api.sel },
55
- { id: 'paste', label: 'Paste', onClick: api.doPaste, disabled: !api.clipboard.current },
56
- { id: 'selall', label: 'Select all', onClick: api.doSelectAll },
84
+ {
85
+ id: 'copy',
86
+ label: t('pixelEditorMenuBar.copy', 'Copy'),
87
+ onClick: api.doCopy,
88
+ disabled: !api.sel,
89
+ },
90
+ {
91
+ id: 'cut',
92
+ label: t('pixelEditorMenuBar.cut', 'Cut'),
93
+ onClick: api.doCut,
94
+ disabled: !api.sel,
95
+ },
96
+ {
97
+ id: 'paste',
98
+ label: t('pixelEditorMenuBar.paste', 'Paste'),
99
+ onClick: api.doPaste,
100
+ disabled: !api.clipboard.current,
101
+ },
102
+ {
103
+ id: 'selall',
104
+ label: t('pixelEditorMenuBar.selectAll', 'Select all'),
105
+ onClick: api.doSelectAll,
106
+ },
57
107
  ],
58
108
  },
59
109
  {
60
110
  id: 'image',
61
- label: 'Image',
111
+ label: t('pixelEditorMenuBar.image', 'Image'),
62
112
  children: [
63
- { id: 'fliph', label: 'Flip horizontal', onClick: () => api.flipCv('h') },
64
- { id: 'flipv', label: 'Flip vertical', onClick: () => api.flipCv('v') },
65
- { id: 'rot', label: 'Rotate 90°', onClick: api.rotateCv },
113
+ {
114
+ id: 'fliph',
115
+ label: t('pixelEditorMenuBar.flipHorizontal', 'Flip horizontal'),
116
+ onClick: () => api.flipCv('h'),
117
+ },
118
+ {
119
+ id: 'flipv',
120
+ label: t('pixelEditorMenuBar.flipVertical', 'Flip vertical'),
121
+ onClick: () => api.flipCv('v'),
122
+ },
123
+ {
124
+ id: 'rot',
125
+ label: t('pixelEditorMenuBar.rotate90', 'Rotate 90°'),
126
+ onClick: api.rotateCv,
127
+ },
66
128
  { id: 'sep-image-1', divider: true },
67
- { id: 'clear', label: 'Clear canvas', onClick: api.clearCv },
129
+ {
130
+ id: 'clear',
131
+ label: t('pixelEditorMenuBar.clearCanvas', 'Clear canvas'),
132
+ onClick: api.clearCv,
133
+ },
68
134
  ],
69
135
  },
70
136
  {
71
137
  id: 'view',
72
- label: 'View',
138
+ label: t('pixelEditorMenuBar.view', 'View'),
73
139
  children: [
74
140
  {
75
141
  id: 'grid',
76
- label: 'Show grid',
142
+ label: t('pixelEditorMenuBar.showGrid', 'Show grid'),
77
143
  badge: api.grid ? 'On' : 'Off',
78
144
  onClick: () => api.setGrid((g) => !g),
79
145
  },
@@ -81,11 +147,11 @@ const PixelEditorMenuBar = React.memo(({ api, hasOnSaveToLibrary, onOpenGenerato
81
147
  },
82
148
  {
83
149
  id: 'tools',
84
- label: 'Tools',
150
+ label: t('pixelEditorMenuBar.tools', 'Tools'),
85
151
  children: [
86
152
  {
87
153
  id: 'gen',
88
- label: 'Sprite generator…',
154
+ label: t('pixelEditorMenuBar.spriteGenerator', 'Sprite generator…'),
89
155
  icon: jsx(NiceIcon, { name: "palette", size: 14 }),
90
156
  onClick: onOpenGenerator,
91
157
  },
@@ -93,7 +159,6 @@ const PixelEditorMenuBar = React.memo(({ api, hasOnSaveToLibrary, onOpenGenerato
93
159
  },
94
160
  ];
95
161
  return (jsx("div", { className: styles.menuBar, children: jsx(NiceMenu, { items: items, orientation: "horizontal", variant: "ghost", density: "compact" }) }));
96
- });
97
- PixelEditorMenuBar.displayName = 'PixelEditorMenuBar';
162
+ }), { displayName: 'PixelEditorMenuBar' });
98
163
 
99
164
  export { PixelEditorMenuBar as default };