diff --git a/src/app.css b/src/app.css
index d127ba2..8a2f662 100644
--- a/src/app.css
+++ b/src/app.css
@@ -48,10 +48,9 @@
--text-main: oklch(from var(--brand-main) 0.94 0.01 h);
--text-muted: oklch(from var(--brand-main) 0.75 0.02 h);
- /* --text-action: oklch(from var(--brand-main) 0.12 0.02 h); */
- --border-main: oklch(from var(--brand-main) 0.22 0.04 h);
- --border-strong: oklch(from var(--brand-main) 0.3 0.06 h);
+ --border-main: oklch(from var(--brand-main) 0.26 0.04 h);
+ --border-strong: oklch(from var(--brand-main) 0.4 0.06 h);
--shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
diff --git a/src/components/image/CropInline.svelte b/src/components/image/CropInline.svelte
index e857aa8..60f8929 100644
--- a/src/components/image/CropInline.svelte
+++ b/src/components/image/CropInline.svelte
@@ -1,12 +1,56 @@
-

-
+
+
+
+
+
+
@@ -30,12 +74,6 @@
cursor: crosshair;
}
- .crop-canvas {
- width: 100%;
- height: 100%;
- display: block;
- }
-
.crop-box {
position: absolute;
border: 2px solid var(--action-primary);
diff --git a/src/components/image/ImageManager.svelte b/src/components/image/ImageManager.svelte
index d078e70..627c846 100644
--- a/src/components/image/ImageManager.svelte
+++ b/src/components/image/ImageManager.svelte
@@ -9,14 +9,10 @@
import { imageState } from "$states/image.svelte";
import Pencil from "~icons/lucide/pencil";
import Reset from "~icons/lucide/rotate-ccw";
+ import Sliders from "~icons/lucide/sliders-horizontal";
import Upload from "~icons/lucide/upload";
import CropInline from "./CropInline.svelte";
- let brightness = $state(IMAGE_SETTINGS.DEFAULT_BRIGHTNESS);
- let contrast = $state(IMAGE_SETTINGS.DEFAULT_CONTRAST);
- let hue = $state(IMAGE_SETTINGS.DEFAULT_HUE);
- let chroma = $state(IMAGE_SETTINGS.DEFAULT_CHROMA);
-
async function handlePaste(event: ClipboardEvent) {
let image = await uploadService.fromClipboard(event);
if (image.ok) {
@@ -35,29 +31,50 @@
-
-
-
+
+
+
+
+
+
diff --git a/src/components/layout/SettingsGrid.svelte b/src/components/layout/SettingsGrid.svelte
index e5b6115..6a0df13 100644
--- a/src/components/layout/SettingsGrid.svelte
+++ b/src/components/layout/SettingsGrid.svelte
@@ -1,15 +1,26 @@
- {@render children()}
+
+ {#if expanded}
+ {@render children()}
+ {/if}
diff --git a/src/components/panel/Preview.svelte b/src/components/panel/Preview.svelte
index 13d359b..32cc402 100644
--- a/src/components/panel/Preview.svelte
+++ b/src/components/panel/Preview.svelte
@@ -14,7 +14,6 @@
let x = $derived(textConfigState.paddingX);
let y = $derived(textConfigState.offsetY);
let width = $derived(PANEL_SETTINGS.PANEL_WIDTH - 2 * textConfigState.paddingX);
- let height = PANEL_SETTINGS.PANEL_HEIGHT_DEFAULT;
-
+
diff --git a/src/components/panel/PreviewManager.svelte b/src/components/panel/PreviewManager.svelte
index 3abfa8c..35cc8fb 100644
--- a/src/components/panel/PreviewManager.svelte
+++ b/src/components/panel/PreviewManager.svelte
@@ -4,11 +4,13 @@
import Button from "$components/ui/Button.svelte";
import { PANEL_SETTINGS, TRANSITION_DURATION, type SlideDirectionType } from "$lib/constants";
import { downloadService, type DownloadItem } from "$services/downloadService";
+ import { imageState } from "$states/image.svelte";
import { konvaAllStagesState } from "$states/konvaAllStages.svelte";
import { konvaStageState } from "$states/konvaStage.svelte";
import { textsState } from "$states/texts.svelte";
import { fly } from "svelte/transition";
import Download from "~icons/lucide/download";
+ import Loader from "~icons/lucide/loader";
import StickyNote from "~icons/lucide/sticky-note";
import Preview from "./Preview.svelte";
import PreviewAll from "./PreviewAll.svelte";
@@ -67,6 +69,9 @@
in:fly={{ x: xDirection, duration: TRANSITION_DURATION }}
out:fly={{ x: -xDirection, duration: TRANSITION_DURATION }}
>
+
+
+
{/key}
@@ -141,4 +146,29 @@
justify-content: center;
align-items: center;
}
+
+ .loader {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 32px;
+ height: 32px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ transition: 0.3s;
+ opacity: 0;
+ &.loading {
+ opacity: 1;
+ animation: spin 3s linear infinite;
+ }
+ }
+ @keyframes spin {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
diff --git a/src/components/text/TextConfig.svelte b/src/components/text/TextConfig.svelte
index 8e602f4..4cb303e 100644
--- a/src/components/text/TextConfig.svelte
+++ b/src/components/text/TextConfig.svelte
@@ -9,10 +9,11 @@
import SelectFont from "$components/ui/SelectFont.svelte";
import { TYPOGRAPHY } from "$lib/constants";
import { textConfigState } from "$states/textConfig.svelte";
+ import TextSettings from "~icons/lucide/text-initial";
-
+
import type { ChangeEventHandler } from "svelte/elements";
+ import Reset from "~icons/lucide/rotate-ccw";
+ import Button from "./Button.svelte";
interface Props {
value: number;
min?: number;
max?: number;
step?: number;
+ defaultValue?: number;
+ showReset?: boolean;
onchange?: ChangeEventHandler;
}
- let { value = $bindable(), min = 0, max = 100, step = 1, onchange = () => {} }: Props = $props();
+ let {
+ value = $bindable(),
+ min = 0,
+ max = 100,
+ step = 1,
+ onchange = () => {},
+ defaultValue = 0,
+ showReset = false,
+ }: Props = $props();
{value}
+{#if showReset}
+