From 3cbd731690e54edafd4f5b4c913c2ea61670862c Mon Sep 17 00:00:00 2001 From: _eyewave <89079979+eye-wave@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:39:49 +0200 Subject: [PATCH] feat: migrate to svelte 5 --- bun.lockb | Bin 111105 -> 111712 bytes package.json | 10 ++-- src/lib/Knob.svelte | 108 ++++++++++++++++++++++-------------- src/routes/+page.svelte | 19 +++++-- src/routes/CopyPaste.svelte | 10 +++- 5 files changed, 93 insertions(+), 54 deletions(-) diff --git a/bun.lockb b/bun.lockb index 909eff5930c90fd201f218f53fe68be5b39b8b13..8a924d8d93c519e8721a4fd4576033e331bb8ca1 100755 GIT binary patch delta 15343 zcmeHuXMNHm#=fnTg|HJf;b5A{0r>f3Yb?VFW=LLBgyczf}uc-J7a1W_aDk?|88x6(aEx{*&`+^V9>O;U= z06T*>2ftHal6=6=X?!<0_2(L%3QiLZ1vi5yf|G}j!0|5N7hxTZe*oO05CwaFPF8M# zBz1?MDFiVZzY5+EILAIE7k#D6TK#d2p9h!GKH6@d7?_nWjfCGD0EcPy7d%uP<*AO_ z4%`{-th8R-SkA}4EnR)KU0{-*Y?(T@zsa08Dha{z~TNX576ZNz-a;( zaB|H!p5)+GIJ~WDCnx0F$4{~6NzzfM5=GRT*DIL{z9^x2M*sYT~$m1AQi(|l~ zMGY`%9RN&&xPVg*J&#qb&a-FQr$HG9)KicT$Eo|mjHy`#l+4_!rc`Xa+P@VzjW-MR zO~JFk;gG_jR84Ton5-O1{$*X%0k46R`;x)Q4g0#P18fDS2|J^n!eId?>zjeoMpe{Z zwJuxZ1HftG;#bvd8*QJGGXZWKZJ#tbJqIhyh>qApiXL}XE$^-=6sl@iWahK$x`p=c zrMB(`Cx2`Mr!}`)k$xpXope@TwYR=c==;G5wA0)?QH?@Ie!e|F zLz2o-PsXj*_@RDk?o3Y~pM$}rMcTNp@kvfTg;TN$>|-WNQg)7gG7?bwSASLd5;&H8 z5z<=Ovp-K(T@{t0>Rx~?dlcGoCj@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;X-5TsN@J^tdmH=Wu%?+NCfn?tVw4AT0Xp zBl7)DVS%eh)rc-#RQgs79^#4AkNVMt_N`bXkYeX9Hh$jA_Oy#GgZ1G|LoG zNi4w-k|yRPv2k=Wn1qFm^UPQ~fa{Xma)onT5_wOF^-ta9X~j&{>p~m+#EN zn~8;vagIXAq%22nX0|iSQZ%{HIVsx#=5Sb^$6I}l!py08V~qhL%I%F!o;4bti71IkVUuD@0B2-7cE`H z#uC=ftY3Q3q!%s9#a9fOz + import { normalize, format, unnormalizeToString, unnormalizeToNumber } from './params.js'; import { spring } from 'svelte/motion'; - import { createEventDispatcher } from 'svelte'; import type { EnumParam, FloatParam } from './params.js'; - import { normalize, format, unnormalizeToString, unnormalizeToNumber } from './params.js'; - - const size = 80; - - export let label = ''; - export let unit = ''; - export let param: FloatParam | EnumParam; - export let value: number | string; - export let stiffness = 0.5; - export let decimalDigits = 0; - export let snapValues: number[] = []; - export let snapThreshold = 0.1; - export let disabled = false; - - export let arcColor = '#ae98db'; - export let bgColor = '#444'; - export let disabledColor = '#777'; - - $: arcColor2 = disabled ? disabledColor : arcColor; - - $: if (param.type === 'enum-param') snapValues = []; - $: center = size / 2; - $: arcRadius = size * 0.4; - $: circleRadius = size * 0.32; - $: lineWidth = size * 0.04; + interface Props { + style?: string; + class?: string; + label?: string; + unit?: string; + size?: number; + onChange?: (value: number | string) => void; + param: FloatParam | EnumParam; + value: number | string; + stiffness?: number; + decimalDigits?: number; + snapValues?: Array; + snapThreshold?: number; + disabled?: boolean; + colors?: { + arc?: string; + bg?: string; + disabled?: string; + }; + } - let isDragging = false; + let { + style, + class: className, + label = '', + unit = '', + size = 80, + onChange, + value = $bindable(), + param, + stiffness = 0.5, + decimalDigits = 0, + snapValues = [], + snapThreshold = 0.1, + disabled = false, + colors = {} + }: Props = $props(); + + const { + arc: arcColor = '#ae98db', + bg: bgColor = '#444', + disabled: disabledColor = '#777' + } = colors; + + const arcColor2 = $derived(disabled ? disabledColor : arcColor); + + const center = $derived(size / 2); + const arcRadius = $derived(size * 0.4); + const circleRadius = $derived(size * 0.32); + const lineWidth = $derived(size * 0.04); + + let isDragging = $state(false); let startY: number; let startValue: number; - const dispatch = createEventDispatcher(); - // This is needed in case some snap value is very close to the min or max range // preventing the user from selecting that value function completeFixedSnapValues(snapValues: number[]) { @@ -50,14 +73,20 @@ return clone; } - $: fixedSnapValues = completeFixedSnapValues(snapValues); + const fixedSnapValues = $derived(completeFixedSnapValues(snapValues)); // eslint-disable-next-line @typescript-eslint/no-explicit-any const rotationDegrees = spring(normalize(value as any, param as any) * 270 - 135, { stiffness }); // eslint-disable-next-line @typescript-eslint/no-explicit-any - $: normalizedValue = normalize(value as any, param as any); - $: rotationDegrees.set(normalizedValue * 270 - 135); + const normalizedValue = $derived(normalize(value as any, param as any)); + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const formatted = $derived(isDragging ? format(value as any, param as any, decimalDigits) : ''); + + $effect(() => { + rotationDegrees.set(normalizedValue * 270 - 135); + }); function handleMouseDown(event: MouseEvent) { isDragging = true; @@ -83,7 +112,7 @@ if (value !== newValue) { value = newValue; - dispatch('change', { value }); + onChange?.(value); } return; @@ -109,7 +138,7 @@ if (value !== newValue) { value = newValue; - dispatch('change', { value }); + onChange?.(value); } } @@ -151,16 +180,13 @@ return paths.join(' '); } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - $: formatted = isDragging ? format(value as any, param as any, decimalDigits) : ''; - + -
+
{#if snapValues.length > 0 || param.type === 'enum-param'} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index c528bb1..9cc5805 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -45,7 +45,7 @@

Logarithmic

- +

A knob with logarithmic scaling (default base is 10).

@@ -122,16 +122,25 @@

Colors

- + - +

Of course, {''} colors can be customized to look however you want. diff --git a/src/routes/CopyPaste.svelte b/src/routes/CopyPaste.svelte index d5e5ffc..6263c58 100644 --- a/src/routes/CopyPaste.svelte +++ b/src/routes/CopyPaste.svelte @@ -1,8 +1,12 @@

-