From f1f5c8a35ba7a6e64df00c0cafef169fe0c03c94 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Tue, 9 Apr 2024 23:35:24 +0530
Subject: [PATCH 01/13] Update README.md
---
README.md | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c387838..a0e1b61 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,16 @@
-# Team Svelte @ Hackfest 2024, NMAMIT nitte
+## Freix
-Freix
+Team Svelte @Hackfest 2024, NMAMIT, Nitte
+## Logistics Problem Statement (by Hackfest)
+Redefine logistics and contribute to a world where movement of goods is faster, smarter and also sustainable.
+
+- Revolutionize the way goods and services move across the globe.
+- Tackle challenges in supply chain optimization, last-mile delivery, warehouse management, or transportation efficiency.
+- Build solutions that streamline logistics operations, reduce environmental impact, and ensure the seamless flow of products from point A to point B.
+- Your code can be the driving force behind a more connected and efficient global logistics network.
+
+## What is Freix?
+
+Freix is a platform that aims to simplify international logistics for regular everyday users. It is a web application that allows users to learn about the status of shipment of various goods across countries.
From 5fbd9fed84ba76d98cc923772415bd160dd03efe Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:27:49 +0530
Subject: [PATCH 02/13] feat: update home page
---
src/routes/(nav)/(grid)/+page.svelte | 112 +++++----------------
src/routes/(nav)/(grid)/user-submit.svelte | 68 +++++++++++++
src/routes/+layout.svelte | 3 +-
3 files changed, 96 insertions(+), 87 deletions(-)
create mode 100644 src/routes/(nav)/(grid)/user-submit.svelte
diff --git a/src/routes/(nav)/(grid)/+page.svelte b/src/routes/(nav)/(grid)/+page.svelte
index f17ff16..d805e20 100644
--- a/src/routes/(nav)/(grid)/+page.svelte
+++ b/src/routes/(nav)/(grid)/+page.svelte
@@ -1,23 +1,5 @@
@@ -30,79 +12,39 @@
- Effortlessly navigate international shipping routes with our platform. Also get tax insights and intelligent route recommendations.
+ Effortlessly navigate
+ international shipping routes
+ with our platform. Also get tax insights and intelligent route recommendations.
+
-
-
-
-
-
-
-
- {#each countries as country}
- {country}
- {/each}
-
-
-
-
-
-
-
- {#each countries as country}
- {country}
- {/each}
-
-
+
+
+
-
-
-
-
-
- Electronics
- Edibles
- Cosmetic
- Clothing
-
-
-
-
Submit
-
-
-
+ -->
diff --git a/src/routes/(nav)/(grid)/user-submit.svelte b/src/routes/(nav)/(grid)/user-submit.svelte
new file mode 100644
index 0000000..e258a23
--- /dev/null
+++ b/src/routes/(nav)/(grid)/user-submit.svelte
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+ {#each countries as country}
+ {country}
+ {/each}
+
+
+
+
+
+
+
+
+ {#each countries as country}
+ {country}
+ {/each}
+
+
+
+
+
+
+
+
+ Electronics
+ Edibles
+ Cosmetic
+ Clothing
+
+
+
+
Submit
+
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 22f7659..8fa687c 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -7,5 +7,4 @@
$user;
-
-
\ No newline at end of file
+
From 52f81ccb63f60d09c273ae47ec1fa7527bec5347 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:28:24 +0530
Subject: [PATCH 03/13] feat: delete zod schema and use +page.ts instead of
+page.server.ts
---
src/routes/(nonav)/features/+page.server.ts | 49 ---------------------
src/routes/(nonav)/features/+page.ts | 32 ++++++++++++++
src/routes/(nonav)/features/schema.ts | 26 -----------
3 files changed, 32 insertions(+), 75 deletions(-)
delete mode 100644 src/routes/(nonav)/features/+page.server.ts
create mode 100644 src/routes/(nonav)/features/+page.ts
delete mode 100644 src/routes/(nonav)/features/schema.ts
diff --git a/src/routes/(nonav)/features/+page.server.ts b/src/routes/(nonav)/features/+page.server.ts
deleted file mode 100644
index 25a9da6..0000000
--- a/src/routes/(nonav)/features/+page.server.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import supabase from '$lib/db/db';
-import { superValidate } from 'sveltekit-superforms';
-import { zod } from 'sveltekit-superforms/adapters';
-import type { PageServerLoad } from './$types';
-import { formSchema } from './schema';
-
-export const load = (async () => {
- // const { data, error } = await supabase.from('Data').select().eq('country2', 'India');
- // if (error) {
- // console.error(error);
- // return;
- // }
- // console.log(data);
- // console.log('Hello');
- return {
- form: await superValidate(zod(formSchema))
- };
-}) satisfies PageServerLoad;
-
-// export const actions: Actions = {
-// default: async (event) => {
-// console.log('Event', event.request);
-// const form = await superValidate(event, zod(formSchema));
-
-// if (!form.valid) {
-// return fail(400, {
-// form
-// });
-// }
-
-// //geminiFetchInsights(form.data.source, form.data.dest, form.data.product);
-
-// // const pathCoordinates = [
-// // { lat: 22.351, lng: 78.667 },
-// // { lat: 46.85, lng: 103.284 },
-// // { lat: 36.2, lng: 138.25 }
-// // ];
-
-// // const queryParams = pathCoordinates
-// // .map((obj) =>
-// // Object.entries(obj)
-// // .map(([key, value]) => `${key}=${value}`)
-// // .join('&')
-// // )
-// // .join('&');
-
-// return redirect(302, `/features/?${queryParams}`);
-// }
-// };
diff --git a/src/routes/(nonav)/features/+page.ts b/src/routes/(nonav)/features/+page.ts
new file mode 100644
index 0000000..dc52f7f
--- /dev/null
+++ b/src/routes/(nonav)/features/+page.ts
@@ -0,0 +1,32 @@
+import type { PageLoad } from './$types';
+
+/** @type {import('./$types').PageLoad} */
+export const load = (async ({ params, url }) => {
+ const source = url.searchParams.get('source');
+ const dest = url.searchParams.get('dest');
+ const product = url.searchParams.get('product');
+ const qp = url.searchParams.get('qp');
+
+ let zodData = {
+ source: '',
+ dest: '',
+ product: '',
+ pathCoordinatesArray: [[]],
+ gem: '',
+ qp: '',
+ data: {}
+ };
+
+ zodData.source = source ?? '';
+ zodData.dest = dest ?? '';
+ zodData.product = product ?? '';
+ zodData.qp = qp ?? '';
+
+ console.log('asdfasdfasdf', JSON.stringify(zodData));
+
+ return {
+ form: {
+ ...zodData
+ }
+ };
+}) satisfies PageLoad;
diff --git a/src/routes/(nonav)/features/schema.ts b/src/routes/(nonav)/features/schema.ts
deleted file mode 100644
index 8c1f577..0000000
--- a/src/routes/(nonav)/features/schema.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { z } from 'zod';
-
-const initialFormValues = {
- source: 'Initial Source',
- dest: 'Initial Destination',
- product: 'Initial Product',
- pathCoordinatesArray: [[{ lat: 0, lng: 0 }]],
- gem: ''
-};
-
-export const formSchema = z.object({
- source: z.string().min(1).default(initialFormValues.source),
- dest: z.string().min(1).default(initialFormValues.dest),
- product: z.string().min(1).default(initialFormValues.product),
- pathCoordinatesArray: z.array(
- z.array(
- z.object({
- lat: z.number().default(initialFormValues.pathCoordinatesArray[0][0].lat),
- lng: z.number().default(initialFormValues.pathCoordinatesArray[0][0].lng)
- })
- )
- ),
- gem: z.string().default(initialFormValues.gem)
-});
-
-export type FormSchema = typeof formSchema;
From 002376d7aa8e9fd72a0fc68bb405e8ef21409f96 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:28:47 +0530
Subject: [PATCH 04/13] fix: features route
---
src/routes/(nonav)/features/+page.svelte | 44 +++++++-----------------
1 file changed, 13 insertions(+), 31 deletions(-)
diff --git a/src/routes/(nonav)/features/+page.svelte b/src/routes/(nonav)/features/+page.svelte
index 698a37c..9250801 100644
--- a/src/routes/(nonav)/features/+page.svelte
+++ b/src/routes/(nonav)/features/+page.svelte
@@ -12,19 +12,10 @@
import type { PageData } from './$types';
export let data: PageData;
-
- /* ******************************************************** */
-
- // import { page } from '$app/stores';
- // const url = $page.url;
- // let source_country = {
- // value: url.searchParams.get('source'),
- // label: url.searchParams.get('source')
- // };
- // let dest_country = { value: url.searchParams.get('dest'), label: url.searchParams.get('dest') };
- // let product_hs = url.searchParams.get('product');
+
+
@@ -43,21 +34,21 @@
AI Analysis
- {#if data?.form?.data?.gem}
+ {#if data?.form?.gem}
-
+
{:else}
- Analysis of shipping products from {data?.form?.data.source ?? 'country A'} to {data
- ?.form?.data.dest ?? 'country B'} using AI
+ Analysis of shipping products from {data?.form?.source ?? 'country A'} to {data?.form
+ ?.dest ?? 'country B'} using AI
{/if}
@@ -67,12 +58,12 @@
Charges and Taxes on import
- Estimate of various taxes and duties in shipping your product from {data?.form?.data
- .source ?? 'country A'} to {data?.form?.data.dest ?? 'country B'}
+ Estimate of various taxes and duties in shipping your product from {data?.form?.source ??
+ 'country A'} to {data?.form?.dest ?? 'country B'}
- {#if data?.form?.data?.gem}
+ {#if data?.form?.gem}
-
+
{/if}
@@ -82,19 +73,10 @@
Similar Transactions
- Here are some of the matching transactions from {data?.form?.data.source ?? 'country A'} to
- {data?.form?.data.dest ?? 'country B'} of the product category X
+ Here are some of the matching transactions from {data?.form?.source ?? 'country A'} to
+ {data?.form?.dest ?? 'country B'} of the product category X
-
-
-
From 9a2957b2c7a1647a01193b80d035647ea51dda9b Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:29:03 +0530
Subject: [PATCH 05/13] refactor: Map.svelte
---
src/routes/(nonav)/features/Map.svelte | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/routes/(nonav)/features/Map.svelte b/src/routes/(nonav)/features/Map.svelte
index 43079eb..65e563e 100644
--- a/src/routes/(nonav)/features/Map.svelte
+++ b/src/routes/(nonav)/features/Map.svelte
@@ -6,12 +6,8 @@
export let apiKey: string;
export let loaderOptions: Omit | null = null;
export let mapOptions: google.maps.MapOptions | null = null;
- export let data: {} = {};
-
- let pathCoordinatesArray: { lat: number; lng: number }[][] = [[]];
-
- $: pathCoordinatesArray = data?.pathCoordinatesArray ?? [[]];
- // $: console.log('Path Coordinates', pathCoordinates);
+ export let pathCoordinatesArray: { lat: number; lng: number }[][] = [[]];
+ let previousPathCoordinatesArray: { lat: number; lng: number }[][] = [[]];
const { Loader } = Maps;
@@ -91,7 +87,8 @@
}
$: {
- mounted && pathCoordinatesArray && renderMap();
+ mounted && pathCoordinatesArray != previousPathCoordinatesArray && renderMap();
+ previousPathCoordinatesArray = pathCoordinatesArray;
}
onMount(() => {
@@ -103,6 +100,8 @@
});
renderMap();
+
+ previousPathCoordinatesArray = pathCoordinatesArray;
});
From 37b0183d17943f7838d4e6f2a693b9af5d849a48 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:29:46 +0530
Subject: [PATCH 06/13] fix: ResultTable.svelte
Stop rendering components when data is null
---
.../(nonav)/features/ResultTable.svelte | 104 ++++--------------
1 file changed, 23 insertions(+), 81 deletions(-)
diff --git a/src/routes/(nonav)/features/ResultTable.svelte b/src/routes/(nonav)/features/ResultTable.svelte
index 6064103..141f6c9 100644
--- a/src/routes/(nonav)/features/ResultTable.svelte
+++ b/src/routes/(nonav)/features/ResultTable.svelte
@@ -1,109 +1,51 @@
-
-
-
-
-
- Type
- Percentage
-
-
-
- {#if formData.data}
+
+
+{#if data.length >= 1}
+
+
+
+ Type
+ Percentage
+
+
+
Import Duty
- {formData.data[0].values['import-duty']}
+ {data[0].values['import-duty']}
Value Added Tax
- {formData.data[0].values['value-added-tax']}
+ {data[0].values['value-added-tax']}
Custom Clearance Fee
- {formData.data[0].values['custom-clearance-fee']}
+ {data[0].values['custom-clearance-fee']}
Exercise Duties
- {formData.data[0].values['exercise-duties']}
+ {data[0].values['exercise-duties']}
Tariffs
- {formData.data[0].values['tariffs']}
+ {data[0].values['tariffs']}
Anti Dumping Duties
- {formData.data[0].values['anti-dumping-duties']}
+ {data[0].values['anti-dumping-duties']}
Environmental Tax
- {formData.data[0].values['environmental-tax']}
+ {data[0].values['environmental-tax']}
Documentation
- {formData.data[0].values['documentation']}
+ {data[0].values['documentation']}
- {:else}
- {#each response as item}
-
- {item['Charge']}
- {item['Percentage']}
-
- {/each}
- {/if}
-
-
+
+
+{/if}
From 27b56963e909a98004d2bdfb12c6f5a89d11b4db Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:30:10 +0530
Subject: [PATCH 07/13] Update +server.ts
---
src/routes/api/submit/+server.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/routes/api/submit/+server.ts b/src/routes/api/submit/+server.ts
index 50f3dc6..8ab872c 100644
--- a/src/routes/api/submit/+server.ts
+++ b/src/routes/api/submit/+server.ts
@@ -36,7 +36,7 @@ export const POST: RequestHandler = async ({ request }) => {
for (let route in gem2) {
let arr = gem2[route];
- let new_arr = [];
+ let new_arr: {}[] = [];
for (let i = 0; i < arr.length; i++) {
CountryCords.forEach((ele) => {
if (ele.name === arr[i]) {
From 2126091c29e8abeb95a4b688ec658d0df9d17d7e Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 14:30:30 +0530
Subject: [PATCH 08/13] fix: Update user-form.svelte
---
src/routes/(nonav)/features/user-form.svelte | 230 +++++++------------
1 file changed, 86 insertions(+), 144 deletions(-)
diff --git a/src/routes/(nonav)/features/user-form.svelte b/src/routes/(nonav)/features/user-form.svelte
index 4e197b2..63bd796 100644
--- a/src/routes/(nonav)/features/user-form.svelte
+++ b/src/routes/(nonav)/features/user-form.svelte
@@ -1,75 +1,59 @@
-
+
+
-
-
From 48b002a423585276440825623332c94f4fd88e7a Mon Sep 17 00:00:00 2001
From: Kausthubh J Rao <105716675+Exgene@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:02:13 +0530
Subject: [PATCH 09/13] style: responsiveness feature page
---
src/routes/(nonav)/features/+page.svelte | 10 +--
src/routes/(nonav)/features/user-form.svelte | 77 +++++++++++---------
src/routes/(nonav)/features/user-menu.svelte | 6 +-
3 files changed, 50 insertions(+), 43 deletions(-)
diff --git a/src/routes/(nonav)/features/+page.svelte b/src/routes/(nonav)/features/+page.svelte
index 9250801..cd772bb 100644
--- a/src/routes/(nonav)/features/+page.svelte
+++ b/src/routes/(nonav)/features/+page.svelte
@@ -16,9 +16,9 @@
-
+
-
+
@@ -29,16 +29,16 @@
-
+
-
+
AI Analysis
{#if data?.form?.gem}
diff --git a/src/routes/(nonav)/features/user-form.svelte b/src/routes/(nonav)/features/user-form.svelte
index 63bd796..cd09e25 100644
--- a/src/routes/(nonav)/features/user-form.svelte
+++ b/src/routes/(nonav)/features/user-form.svelte
@@ -5,8 +5,8 @@
import { Input } from '$lib/components/ui/input';
import { Label } from '$lib/components/ui/label';
import * as Select from '$lib/components/ui/select';
- import CountryCords from './countryCords.json';
import { onMount } from 'svelte';
+ import CountryCords from './countryCords.json';
export let data: {
source: string;
@@ -83,42 +83,49 @@
{JSON.stringify(source)}
{JSON.stringify(product)} -->
-
-
-
Source
-
-
-
-
-
-
- {#each countries as country}
- {country}
- {/each}
-
-
+
+
+
+ Source
+
+
+
+
+
+
+ {#each countries as country}
+ {country}
+ {/each}
+
+
+
+
+
+ Destination
+
+
+
+
+
+
+
+ {#each countries as country}
+ {country}
+ {/each}
+
+
+
-
-
Destination
-
-
-
-
-
+
+
+ Product
+
+
-
- {#each countries as country}
- {country}
- {/each}
-
-
+
Submit
-
-
- Product
-
-
-
- Submit
diff --git a/src/routes/(nonav)/features/user-menu.svelte b/src/routes/(nonav)/features/user-menu.svelte
index 3f4e331..611c033 100644
--- a/src/routes/(nonav)/features/user-menu.svelte
+++ b/src/routes/(nonav)/features/user-menu.svelte
@@ -17,13 +17,13 @@
// let product_hs = url.searchParams.get('product');
-
-
+
+
-
+
From 6c689ed4aa1bc8bfd953ece6063c276d7c919cb0 Mon Sep 17 00:00:00 2001
From: Kausthubh J Rao <105716675+Exgene@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:02:28 +0530
Subject: [PATCH 10/13] stlye: responsiveness main page
---
src/routes/(nav)/(grid)/user-submit.svelte | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/routes/(nav)/(grid)/user-submit.svelte b/src/routes/(nav)/(grid)/user-submit.svelte
index e258a23..dc21ae1 100644
--- a/src/routes/(nav)/(grid)/user-submit.svelte
+++ b/src/routes/(nav)/(grid)/user-submit.svelte
@@ -23,10 +23,10 @@
-
+
@@ -39,7 +39,7 @@
@@ -52,7 +52,7 @@
From 9be66f1fa362ec4dfdd2b7f244d6eafd802f2c50 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 17:24:51 +0530
Subject: [PATCH 11/13] feat: shadcn-drawer component
---
package.json | 1 +
pnpm-lock.yaml | 37 +++++++++++++++++
.../ui/drawer/drawer-content.svelte | 24 +++++++++++
.../ui/drawer/drawer-description.svelte | 18 ++++++++
.../components/ui/drawer/drawer-footer.svelte | 16 ++++++++
.../components/ui/drawer/drawer-header.svelte | 19 +++++++++
.../components/ui/drawer/drawer-nested.svelte | 12 ++++++
.../ui/drawer/drawer-overlay.svelte | 18 ++++++++
.../components/ui/drawer/drawer-title.svelte | 18 ++++++++
src/lib/components/ui/drawer/drawer.svelte | 12 ++++++
src/lib/components/ui/drawer/index.ts | 41 +++++++++++++++++++
11 files changed, 216 insertions(+)
create mode 100644 src/lib/components/ui/drawer/drawer-content.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-description.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-footer.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-header.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-nested.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-overlay.svelte
create mode 100644 src/lib/components/ui/drawer/drawer-title.svelte
create mode 100644 src/lib/components/ui/drawer/drawer.svelte
create mode 100644 src/lib/components/ui/drawer/index.ts
diff --git a/package.json b/package.json
index 4935aa9..f1b2e78 100644
--- a/package.json
+++ b/package.json
@@ -58,6 +58,7 @@
"sveltekit-superforms": "^2.12.2",
"tailwind-merge": "^2.2.2",
"tailwind-variants": "^0.2.1",
+ "vaul-svelte": "^0.3.0",
"zod": "^3.22.4"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bf87909..2d6e366 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,6 +62,9 @@ dependencies:
tailwind-variants:
specifier: ^0.2.1
version: 0.2.1(tailwindcss@3.4.3)
+ vaul-svelte:
+ specifier: ^0.3.0
+ version: 0.3.0(svelte@4.2.12)
zod:
specifier: ^3.22.4
version: 3.22.4
@@ -1078,6 +1081,20 @@ packages:
svelte: 4.2.12
dev: false
+ /@melt-ui/svelte@0.68.0(svelte@4.2.12):
+ resolution: {integrity: sha512-/QvA98hnYEodZtHJ71+ocum/WWp30hVNt3F8uiZKnNYwZDaiQYjlyR9AaGKYcZLCe6R68op1mfCzc0kTzJilyA==}
+ peerDependencies:
+ svelte: '>=3 <5'
+ dependencies:
+ '@floating-ui/core': 1.6.0
+ '@floating-ui/dom': 1.6.3
+ '@internationalized/date': 3.5.2
+ dequal: 2.0.3
+ focus-trap: 7.5.4
+ nanoid: 5.0.6
+ svelte: 4.2.12
+ dev: false
+
/@melt-ui/svelte@0.74.4(svelte@4.2.12):
resolution: {integrity: sha512-EeDP3C1grK+bPTezJQXKid2k4RRGZakyHTghD/zg//fM6Gqe4JykVtV0Yih4QJs+yGTgJq/EaNQMQ6JkTnvHxg==}
peerDependencies:
@@ -1946,6 +1963,17 @@ packages:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'}
+ /bits-ui@0.16.0(svelte@4.2.12):
+ resolution: {integrity: sha512-HEkuVDyUG9dTWtKujKpdDsGOe9GRmuYOEF9yGbjVwNazxMQDQa9deUX8vM3ofGBWaJgr1cEu88p38kP5Z5gQ8w==}
+ peerDependencies:
+ svelte: ^4.0.0
+ dependencies:
+ '@internationalized/date': 3.5.2
+ '@melt-ui/svelte': 0.68.0(svelte@4.2.12)
+ nanoid: 5.0.6
+ svelte: 4.2.12
+ dev: false
+
/bits-ui@0.18.6(svelte@4.2.12):
resolution: {integrity: sha512-UbBFuyG7qEM+VA1rA/7GRy94rXRFCW+B1LfK7uiBd6fZiPZtPmPPW1RjTblGaJjCW2E6e/ruxbuKjxW2oXDP7g==}
peerDependencies:
@@ -4477,6 +4505,15 @@ packages:
dev: false
optional: true
+ /vaul-svelte@0.3.0(svelte@4.2.12):
+ resolution: {integrity: sha512-+PBfKDWl+xfloe8Tm1G8x3TqbCiUWoyUedU2WC5iE3v6LOYPKo8FyEtzNC5ZqFVVnUKSKNg+4Fi73nuzMkT7JA==}
+ peerDependencies:
+ svelte: ^4.0.0
+ dependencies:
+ bits-ui: 0.16.0(svelte@4.2.12)
+ svelte: 4.2.12
+ dev: false
+
/vite@5.2.8:
resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==}
engines: {node: ^18.0.0 || >=20.0.0}
diff --git a/src/lib/components/ui/drawer/drawer-content.svelte b/src/lib/components/ui/drawer/drawer-content.svelte
new file mode 100644
index 0000000..54a4079
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-content.svelte
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-description.svelte b/src/lib/components/ui/drawer/drawer-description.svelte
new file mode 100644
index 0000000..b901385
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-description.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-footer.svelte b/src/lib/components/ui/drawer/drawer-footer.svelte
new file mode 100644
index 0000000..c6c07ad
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-footer.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-header.svelte b/src/lib/components/ui/drawer/drawer-header.svelte
new file mode 100644
index 0000000..f857176
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-header.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-nested.svelte b/src/lib/components/ui/drawer/drawer-nested.svelte
new file mode 100644
index 0000000..79b68e3
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-nested.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-overlay.svelte b/src/lib/components/ui/drawer/drawer-overlay.svelte
new file mode 100644
index 0000000..ccc7322
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-overlay.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer-title.svelte b/src/lib/components/ui/drawer/drawer-title.svelte
new file mode 100644
index 0000000..cfbe596
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer-title.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/drawer.svelte b/src/lib/components/ui/drawer/drawer.svelte
new file mode 100644
index 0000000..40eae5e
--- /dev/null
+++ b/src/lib/components/ui/drawer/drawer.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/drawer/index.ts b/src/lib/components/ui/drawer/index.ts
new file mode 100644
index 0000000..76932e3
--- /dev/null
+++ b/src/lib/components/ui/drawer/index.ts
@@ -0,0 +1,41 @@
+import { Drawer as DrawerPrimitive } from "vaul-svelte";
+
+import Root from "./drawer.svelte";
+import Content from "./drawer-content.svelte";
+import Description from "./drawer-description.svelte";
+import Overlay from "./drawer-overlay.svelte";
+import Footer from "./drawer-footer.svelte";
+import Header from "./drawer-header.svelte";
+import Title from "./drawer-title.svelte";
+import NestedRoot from "./drawer-nested.svelte";
+
+const Trigger = DrawerPrimitive.Trigger;
+const Portal = DrawerPrimitive.Portal;
+const Close = DrawerPrimitive.Close;
+
+export {
+ Root,
+ NestedRoot,
+ Content,
+ Description,
+ Overlay,
+ Footer,
+ Header,
+ Title,
+ Trigger,
+ Portal,
+ Close,
+
+ //
+ Root as Drawer,
+ NestedRoot as DrawerNestedRoot,
+ Content as DrawerContent,
+ Description as DrawerDescription,
+ Overlay as DrawerOverlay,
+ Footer as DrawerFooter,
+ Header as DrawerHeader,
+ Title as DrawerTitle,
+ Trigger as DrawerTrigger,
+ Portal as DrawerPortal,
+ Close as DrawerClose,
+};
From fdaaa8ea846114f65ffa2f3e19862a3a86b06cd9 Mon Sep 17 00:00:00 2001
From: prathwik <64214685+prathwik0@users.noreply.github.com>
Date: Thu, 11 Apr 2024 17:25:09 +0530
Subject: [PATCH 12/13] style: use drawer in mobile view
---
src/routes/(nonav)/features/+page.svelte | 29 +++++++++++++++++++-----
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/src/routes/(nonav)/features/+page.svelte b/src/routes/(nonav)/features/+page.svelte
index cd772bb..9b97340 100644
--- a/src/routes/(nonav)/features/+page.svelte
+++ b/src/routes/(nonav)/features/+page.svelte
@@ -1,5 +1,6 @@
-
+
@@ -39,7 +41,7 @@
@@ -52,7 +54,7 @@
diff --git a/src/routes/(nonav)/features/+page.svelte b/src/routes/(nonav)/features/+page.svelte
index 9b97340..a293b44 100644
--- a/src/routes/(nonav)/features/+page.svelte
+++ b/src/routes/(nonav)/features/+page.svelte
@@ -2,12 +2,13 @@
import * as Card from '$lib/components/ui/card';
import * as Drawer from '$lib/components/ui/drawer';
- import SvelteMarkdown from 'svelte-markdown';
import { Separator } from '$lib/components/ui/separator';
+ import { Icons } from '$lib/icons';
+ import SvelteMarkdown from 'svelte-markdown';
+ import Map from './Map.svelte';
+ import ResultTable from './ResultTable.svelte';
import UserForm from './user-form.svelte';
import UserMenu from './user-menu.svelte';
- import ResultTable from './ResultTable.svelte';
- import Map from './Map.svelte';
import { PUBLIC_MAPS_API_KEY } from '$env/static/public';
@@ -19,7 +20,7 @@
-
+
@@ -28,12 +29,14 @@
-
+
- Options
+ Options
@@ -44,7 +47,7 @@
-
+
+ import { ThemeToggleButton } from '$lib/components/theme';
import * as Card from '$lib/components/ui/card';
import { Separator } from '$lib/components/ui/separator';
import { Icons } from '$lib/icons';
import ProfileButton from '$lib/profile/profile-button.svelte';
- import { ThemeToggleButton } from '$lib/components/theme';
/* ******************************************************** */
@@ -17,8 +17,10 @@
// let product_hs = url.searchParams.get('product');
-
-
+
+