From b5f752d8fb19946992bedd78b75b54d0c6ae5ff6 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 9 Mar 2023 12:56:13 -0500 Subject: [PATCH] upgrade component - fixes #135 --- package.json | 1 + pnpm-lock.yaml | 11 +- src/lib/components/SplitPane.svelte | 256 ------------------------ src/routes/tutorial/[slug]/+page.svelte | 2 +- 4 files changed, 12 insertions(+), 258 deletions(-) delete mode 100644 src/lib/components/SplitPane.svelte diff --git a/package.json b/package.json index 72ae87ee9..1668bda1d 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "type": "module", "dependencies": { "@fontsource/roboto-mono": "^4.5.10", + "@rich_harris/svelte-split-pane": "^1.0.0", "@webcontainer/api": "^1.0.2", "adm-zip": "^0.5.10", "base64-js": "^1.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b2b74667..ddb33e8a2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,6 +3,7 @@ lockfileVersion: 5.4 specifiers: '@fontsource/roboto-mono': ^4.5.10 '@playwright/test': ^1.30.0 + '@rich_harris/svelte-split-pane': ^1.0.0 '@sveltejs/adapter-vercel': 2.0.4 '@sveltejs/kit': ^1.7.2 '@sveltejs/site-kit': ^3.2.2 @@ -31,6 +32,7 @@ specifiers: dependencies: '@fontsource/roboto-mono': 4.5.10 + '@rich_harris/svelte-split-pane': 1.0.0_svelte@3.55.1 '@webcontainer/api': 1.0.2 adm-zip: 0.5.10 base64-js: 1.5.1 @@ -530,6 +532,14 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true + /@rich_harris/svelte-split-pane/1.0.0_svelte@3.55.1: + resolution: {integrity: sha512-nHc6DSIEoyiIAxfSBJkxJOvbUVhPA8HyWi6vzKGZcbQkCMuv6h29Qbotdzs12+zHDxWqECa0X9P0cYY4iDQimA==} + peerDependencies: + svelte: ^3.54.0 + dependencies: + svelte: 3.55.1 + dev: false + /@rollup/pluginutils/4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} @@ -1621,7 +1631,6 @@ packages: /svelte/3.55.1: resolution: {integrity: sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==} engines: {node: '>= 8'} - dev: true /tar/6.1.13: resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==} diff --git a/src/lib/components/SplitPane.svelte b/src/lib/components/SplitPane.svelte deleted file mode 100644 index 7bc6d6faf..000000000 --- a/src/lib/components/SplitPane.svelte +++ /dev/null @@ -1,256 +0,0 @@ - - -
-
- -
- -
- -
- - {#if pos !== '0%' && pos !== '100%'} -
update(e.clientX, e.clientY)} - use:touchDrag={(e) => update(e.touches[0].clientX, e.touches[0].clientY)} - /> - {/if} -
- -{#if dragging} -
-{/if} - - diff --git a/src/routes/tutorial/[slug]/+page.svelte b/src/routes/tutorial/[slug]/+page.svelte index aeb9c6c18..f456ffac9 100644 --- a/src/routes/tutorial/[slug]/+page.svelte +++ b/src/routes/tutorial/[slug]/+page.svelte @@ -4,7 +4,7 @@ import { afterNavigate } from '$app/navigation'; import ContextMenu from './filetree/ContextMenu.svelte'; import Filetree from './filetree/Filetree.svelte'; - import SplitPane from '$lib/components/SplitPane.svelte'; + import { SplitPane } from '@rich_harris/svelte-split-pane'; import Icon from '@sveltejs/site-kit/components/Icon.svelte'; import { writable } from 'svelte/store'; import Editor from './Editor.svelte';