tokimeki-image-editor 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AdjustTool.svelte +14 -1
- package/dist/components/AnnotationTool.svelte +13 -1
- package/dist/components/BlurTool.svelte +4 -1
- package/dist/components/BottomDock.svelte +7 -1
- package/dist/components/CropTool.svelte +12 -1
- package/dist/components/ExportTool.svelte +3 -1
- package/dist/components/ImageEditor.svelte +8 -1
- package/dist/components/QuickDrawEditor.svelte +3 -1
- package/dist/components/RotateTool.svelte +4 -1
- package/dist/components/Sheet.svelte +1 -1
- package/dist/components/StampTool.svelte +4 -1
- package/dist/components/ToneCurveTool.svelte +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
<script lang="ts">import { _ } from 'svelte-i18n';
|
|
2
|
-
import
|
|
2
|
+
import Sun from '@lucide/svelte/icons/sun';
|
|
3
|
+
import Contrast from '@lucide/svelte/icons/contrast';
|
|
4
|
+
import Cloud from '@lucide/svelte/icons/cloud';
|
|
5
|
+
import Moon from '@lucide/svelte/icons/moon';
|
|
6
|
+
import SunMedium from '@lucide/svelte/icons/sun-medium';
|
|
7
|
+
import Palette from '@lucide/svelte/icons/palette';
|
|
8
|
+
import Thermometer from '@lucide/svelte/icons/thermometer';
|
|
9
|
+
import Aperture from '@lucide/svelte/icons/aperture';
|
|
10
|
+
import Waves from '@lucide/svelte/icons/waves';
|
|
11
|
+
import Sparkles from '@lucide/svelte/icons/sparkles';
|
|
12
|
+
import Focus from '@lucide/svelte/icons/focus';
|
|
13
|
+
import AudioWaveform from '@lucide/svelte/icons/audio-waveform';
|
|
14
|
+
import Spline from '@lucide/svelte/icons/spline';
|
|
15
|
+
import Droplets from '@lucide/svelte/icons/droplets';
|
|
3
16
|
import ToolPanel from './ToolPanel.svelte';
|
|
4
17
|
import Slider from './Slider.svelte';
|
|
5
18
|
import ToneCurveTool from './ToneCurveTool.svelte';
|
|
@@ -7,7 +7,19 @@ import { initWasm } from '../wasm/stroke-processor';
|
|
|
7
7
|
import { getEventCoords, createPenAnnotation, createBrushAnnotation, createFillAnnotation, createEraserStrokeAnnotation, addPointToPen, addPointToBrush, finalizeBrushStroke, performFloodFill, getCompositeImageData, getAnnotationOnlyImageData, generateSmoothPath, generateSmoothPathWithLOD, smoothPoints, interpolateBrushPoints, generateBrushPath, generateBrushPathWithLOD, MIN_POINT_DISTANCE } from '../utils/drawing';
|
|
8
8
|
import { createEditorInteractionState, handleOverlayKeyDown, handleOverlayKeyUp, calculatePanOffset, calculateZoomViewport, shouldPan } from '../utils/editor-interaction';
|
|
9
9
|
import { screenToImageCoords as sharedScreenToImageCoords, imageToCanvasCoords as sharedImageToCanvasCoords } from '../utils/coordinates';
|
|
10
|
-
import
|
|
10
|
+
import Pencil from '@lucide/svelte/icons/pencil';
|
|
11
|
+
import Eraser from '@lucide/svelte/icons/eraser';
|
|
12
|
+
import ArrowRight from '@lucide/svelte/icons/arrow-right';
|
|
13
|
+
import Square from '@lucide/svelte/icons/square';
|
|
14
|
+
import Brush from '@lucide/svelte/icons/brush';
|
|
15
|
+
import Type from '@lucide/svelte/icons/type';
|
|
16
|
+
import PaintBucket from '@lucide/svelte/icons/paint-bucket';
|
|
17
|
+
import X from '@lucide/svelte/icons/x';
|
|
18
|
+
import Trash2 from '@lucide/svelte/icons/trash-2';
|
|
19
|
+
import Sparkles from '@lucide/svelte/icons/sparkles';
|
|
20
|
+
import Layers from '@lucide/svelte/icons/layers';
|
|
21
|
+
import ImageOff from '@lucide/svelte/icons/image-off';
|
|
22
|
+
import EyeOff from '@lucide/svelte/icons/eye-off';
|
|
11
23
|
import FloatingRail from './FloatingRail.svelte';
|
|
12
24
|
import RailButton from './RailButton.svelte';
|
|
13
25
|
import Popover from './Popover.svelte';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script lang="ts">import { onMount } from 'svelte';
|
|
2
2
|
import { _ } from 'svelte-i18n';
|
|
3
|
-
import
|
|
3
|
+
import X from '@lucide/svelte/icons/x';
|
|
4
|
+
import Trash2 from '@lucide/svelte/icons/trash-2';
|
|
5
|
+
import Droplet from '@lucide/svelte/icons/droplet';
|
|
6
|
+
import Info from '@lucide/svelte/icons/info';
|
|
4
7
|
import { screenToImageCoords, imageToCanvasCoords } from '../utils/canvas';
|
|
5
8
|
import { calculateZoomViewport, calculatePanOffset } from '../utils/editor-interaction';
|
|
6
9
|
import FloatingRail from './FloatingRail.svelte';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<script lang="ts">import { _ } from 'svelte-i18n';
|
|
2
|
-
import
|
|
2
|
+
import Crop from '@lucide/svelte/icons/crop';
|
|
3
|
+
import SlidersHorizontal from '@lucide/svelte/icons/sliders-horizontal';
|
|
4
|
+
import Sparkles from '@lucide/svelte/icons/sparkles';
|
|
5
|
+
import Droplet from '@lucide/svelte/icons/droplet';
|
|
6
|
+
import Sticker from '@lucide/svelte/icons/sticker';
|
|
7
|
+
import PenLine from '@lucide/svelte/icons/pen-line';
|
|
8
|
+
import Download from '@lucide/svelte/icons/download';
|
|
3
9
|
import { haptic } from '../utils/haptics';
|
|
4
10
|
let { mode, hasImage, isStandalone = false, onModeChange } = $props();
|
|
5
11
|
const baseTools = [
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
<script lang="ts">import { onMount } from 'svelte';
|
|
2
2
|
import { _ } from 'svelte-i18n';
|
|
3
|
-
import
|
|
3
|
+
import RotateCw from '@lucide/svelte/icons/rotate-cw';
|
|
4
|
+
import RotateCcw from '@lucide/svelte/icons/rotate-ccw';
|
|
5
|
+
import FlipHorizontal from '@lucide/svelte/icons/flip-horizontal';
|
|
6
|
+
import FlipVertical from '@lucide/svelte/icons/flip-vertical';
|
|
7
|
+
import X from '@lucide/svelte/icons/x';
|
|
8
|
+
import Check from '@lucide/svelte/icons/check';
|
|
9
|
+
import CropIcon from '@lucide/svelte/icons/crop';
|
|
10
|
+
import Lock from '@lucide/svelte/icons/lock';
|
|
11
|
+
import Unlock from '@lucide/svelte/icons/unlock';
|
|
12
|
+
import Repeat2 from '@lucide/svelte/icons/repeat-2';
|
|
13
|
+
import RotateCcwSquare from '@lucide/svelte/icons/rotate-ccw-square';
|
|
14
|
+
import Maximize2 from '@lucide/svelte/icons/maximize-2';
|
|
4
15
|
import { screenToImageCoords, imageToCanvasCoords } from '../utils/canvas';
|
|
5
16
|
import FloatingRail from './FloatingRail.svelte';
|
|
6
17
|
import RailButton from './RailButton.svelte';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">import { _ } from 'svelte-i18n';
|
|
2
|
-
import
|
|
2
|
+
import Download from '@lucide/svelte/icons/download';
|
|
3
|
+
import FileImage from '@lucide/svelte/icons/file-image';
|
|
4
|
+
import ImageDown from '@lucide/svelte/icons/image-down';
|
|
3
5
|
import ToolPanel from './ToolPanel.svelte';
|
|
4
6
|
import Slider from './Slider.svelte';
|
|
5
7
|
import { haptic } from '../utils/haptics';
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
<script lang="ts">import '../i18n';
|
|
2
2
|
import '../styles/tokens.css';
|
|
3
3
|
import { _ } from 'svelte-i18n';
|
|
4
|
-
import
|
|
4
|
+
import Redo2 from '@lucide/svelte/icons/redo-2';
|
|
5
|
+
import Undo2 from '@lucide/svelte/icons/undo-2';
|
|
6
|
+
import RotateCcw from '@lucide/svelte/icons/rotate-ccw';
|
|
7
|
+
import ImagePlus from '@lucide/svelte/icons/image-plus';
|
|
8
|
+
import Check from '@lucide/svelte/icons/check';
|
|
9
|
+
import Sparkles from '@lucide/svelte/icons/sparkles';
|
|
10
|
+
import Download from '@lucide/svelte/icons/download';
|
|
11
|
+
import LoaderCircle from '@lucide/svelte/icons/loader-circle';
|
|
5
12
|
import { createEditorState, loadImageFromFile, loadImageFromUrl, applyImageToState, setMode, applyCrop, applyTransformUpdate, applyAdjustmentsUpdate, applyFilter, setBlurAreas, setStampAreas, setAnnotations, setViewport, resetState, handleZoom as coreHandleZoom, saveToHistory as coreSaveToHistory, handleUndo as coreHandleUndo, handleRedo as coreHandleRedo, canUndo, canRedo, getKeyboardAction, applyKeyboardAction, exportImage, getDroppedFile, getInputFile, handleDragOver } from '../utils/editor-core';
|
|
6
13
|
import { calculateFitScale, downloadImage } from '../utils/canvas';
|
|
7
14
|
import { haptic } from '../utils/haptics';
|
|
@@ -6,7 +6,9 @@ import { shouldPan } from '../utils/editor-interaction';
|
|
|
6
6
|
import { loadImageFromFile, loadImageFromUrl, createBlankImage, createQuickDrawState, applyQuickDrawImage, handleQuickDrawKeyDown, handleQuickDrawKeyUp, handleQuickDrawMouseDown, handleQuickDrawMouseMove, handleQuickDrawMouseUp, handleQuickDrawTouchStart, handleQuickDrawTouchMove, handleQuickDrawTouchEnd, handleQuickDrawWheel, handleQuickDrawViewportChange, handleQuickDrawZoom, quickDrawUndo, exportQuickDraw } from '../utils/editor-core';
|
|
7
7
|
import { DEFAULT_COLOR_PRESETS, DEFAULT_STROKE_WIDTH } from '../utils/colors';
|
|
8
8
|
import Canvas from './Canvas.svelte';
|
|
9
|
-
import
|
|
9
|
+
import Pencil from '@lucide/svelte/icons/pencil';
|
|
10
|
+
import Brush from '@lucide/svelte/icons/brush';
|
|
11
|
+
import PaintBucket from '@lucide/svelte/icons/paint-bucket';
|
|
10
12
|
import { initWasm } from '../wasm/stroke-processor';
|
|
11
13
|
import { haptic } from '../utils/haptics';
|
|
12
14
|
let { width = 400, initialImage, colorPresets = DEFAULT_COLOR_PRESETS, initialStrokeWidth, onComplete, onCancel } = $props();
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import { _ } from 'svelte-i18n';
|
|
2
|
-
import
|
|
2
|
+
import RotateCw from '@lucide/svelte/icons/rotate-cw';
|
|
3
|
+
import RotateCcw from '@lucide/svelte/icons/rotate-ccw';
|
|
4
|
+
import FlipHorizontal from '@lucide/svelte/icons/flip-horizontal';
|
|
5
|
+
import FlipVertical from '@lucide/svelte/icons/flip-vertical';
|
|
3
6
|
import ToolPanel from './ToolPanel.svelte';
|
|
4
7
|
import { haptic } from '../utils/haptics';
|
|
5
8
|
let { transform, onChange, onClose } = $props();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { onMount } from 'svelte';
|
|
2
2
|
import { _ } from 'svelte-i18n';
|
|
3
|
-
import
|
|
3
|
+
import X from '@lucide/svelte/icons/x';
|
|
4
4
|
import IconButton from './IconButton.svelte';
|
|
5
5
|
import { haptic } from '../utils/haptics';
|
|
6
6
|
let { title, onClose, children, actions, collapsible = true, minimal = false } = $props();
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import { _ } from 'svelte-i18n';
|
|
3
3
|
import { STAMP_ASSETS } from '../config/stamps';
|
|
4
4
|
import { preloadStampImage } from '../utils/canvas';
|
|
5
|
-
import
|
|
5
|
+
import RotateCw from '@lucide/svelte/icons/rotate-cw';
|
|
6
|
+
import Trash2 from '@lucide/svelte/icons/trash-2';
|
|
7
|
+
import X from '@lucide/svelte/icons/x';
|
|
8
|
+
import Sticker from '@lucide/svelte/icons/sticker';
|
|
6
9
|
import FloatingRail from './FloatingRail.svelte';
|
|
7
10
|
import RailButton from './RailButton.svelte';
|
|
8
11
|
import Popover from './Popover.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import { _ } from 'svelte-i18n';
|
|
2
|
-
import
|
|
2
|
+
import RotateCcw from '@lucide/svelte/icons/rotate-ccw';
|
|
3
3
|
import { haptic } from '../utils/haptics';
|
|
4
4
|
let { toneCurve, onChange } = $props();
|
|
5
5
|
let activeChannel = $state('rgb');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokimeki-image-editor",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A image editor for svelte.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"svelte": "^5.55.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@lucide/svelte": "^1.22.0",
|
|
27
28
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
28
|
-
"lucide-svelte": "^0.548.0",
|
|
29
29
|
"rbush": "^4.0.1",
|
|
30
30
|
"runed": "^0.35.1",
|
|
31
31
|
"svelte-i18n": "^4.0.1",
|