Skip to content

Commit a36da70

Browse files
committed
feat: replace sortablejs with sveltednd
1 parent 0a89e81 commit a36da70

5 files changed

Lines changed: 136 additions & 161 deletions

File tree

package-lock.json

Lines changed: 10 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"@sveltejs/vite-plugin-svelte": "^7.1.2",
2222
"@tailwindcss/vite": "^4.3.0",
2323
"@types/node": "^26",
24-
"@types/sortablejs": "^1.15.9",
2524
"daisyui": "^5.7.4",
2625
"eslint": "^10.8.0",
2726
"eslint-config-prettier": "^10.1.8",
@@ -30,7 +29,6 @@
3029
"prettier": "^3.8.3",
3130
"prettier-plugin-svelte": "^4.1.0",
3231
"prettier-plugin-tailwindcss": "^0.8.0",
33-
"sortablejs": "^1.15.7",
3432
"svelte": "^5.56.8",
3533
"svelte-check": "^4.6.0",
3634
"tailwindcss": "^4.3.0",
@@ -40,6 +38,7 @@
4038
},
4139
"dependencies": {
4240
"@lucide/svelte": "^1.26.0",
41+
"@thisux/sveltednd": "^0.4.1",
4342
"emoji-picker-element": "^1.29.1"
4443
}
4544
}

src/lib/components/SnippetCard.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
<span class="px-1 text-xs font-bold opacity-60">{lang.name}</span>
245245
{/if}
246246
<button
247-
class="group relative block min-h-[3rem] w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
247+
class="group relative block min-h-12 w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
248248
onclick={() => handleCopy(snippet.content[lang.id], lang.id)}
249249
aria-label="Copy snippet for {lang.name}"
250250
disabled={isReorderMode}
@@ -269,7 +269,7 @@
269269
{/each}
270270
{#if languagesShowingInMultiple.every((lang) => !snippet.content[lang.id])}
271271
<button
272-
class="group relative block min-h-[3rem] w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
272+
class="group relative block min-h-12 w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
273273
disabled={true}
274274
>
275275
Empty snippet
@@ -278,7 +278,7 @@
278278
</div>
279279
{:else}
280280
<button
281-
class="group relative block min-h-[3rem] w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
281+
class="group relative block min-h-12 w-full cursor-pointer rounded-lg bg-base-200 p-3 text-left font-mono text-sm break-words whitespace-pre-wrap transition-colors hover:bg-base-300"
282282
onclick={() => handleCopy(activeContent, 'single')}
283283
aria-label="Copy snippet"
284284
disabled={isReorderMode}

0 commit comments

Comments
 (0)