chore: remove unused dependencies

This commit is contained in:
Rotimi Best
2025-10-04 11:01:22 +01:00
parent fd2e3f5d76
commit 9a7018eb34
9 changed files with 90 additions and 531 deletions
-4
View File
@@ -35,7 +35,6 @@
"body-parser": "^1.20.2",
"bufferutil": "^4.0.9",
"canvas-confetti": "^1.6.0",
"clsx": "^2.1.1",
"color2k": "^2.0.3",
"cookie-parser": "^1.4.6",
"copy-to-clipboard": "^3.3.3",
@@ -60,10 +59,8 @@
"sirv": "^2.0.3",
"stripe": "^14.22.0",
"svelte-awesome-color-picker": "^3.1.4",
"svelte-email": "^0.0.4",
"svelte-meta-tags": "^3.1.2",
"sveltekit-i18n": "^2.4.2",
"tailwind-merge": "^2.6.0",
"tldts": "^6.1.41",
"unsplash-js": "^7.0.18",
"utf-8-validate": "^6.0.5",
@@ -97,7 +94,6 @@
"qrcode": "^1.5.3",
"sass": "^1.64.2",
"svelte": "^4.1.2",
"svelte-calendar": "^3.1.6",
"svelte-dnd-action": "^0.9.24",
"svelte-jester": "^3.0.0",
"svelte-loading-spinners": "^0.3.4",
@@ -1,74 +0,0 @@
<script lang="ts">
import { InlineCalendar, Datepicker } from 'svelte-calendar';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { isMobile } from '$lib/utils/store/useMobile';
import { formatDate } from '$lib/utils/functions/routes/dashboard';
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
import { t } from '$lib/utils/functions/translations';
let store;
const theme = {
calendar: {
width: '250px',
height: '200px',
shadow: '0px 0px 5px rgba(0, 0, 0, 0.25)',
colors: {
background: {
highlight: '#0F62FE'
}
},
font: {
regular: '0.7em',
large: '0.9em'
}
}
};
</script>
<section class="w-full h-full mt-2">
<p class="text-base font-semibold text-[#040F2D] pb-3 dark:text-white">{$t('schedule.title')}</p>
<div
class="flex items-center flex-col border border-[#EAEAEA] dark:bg-neutral-800 rounded w-full h-fit lg:h-[40vh] p-3 overflow-y-auto"
>
<div class="w-full h-fit hidden xl:flex items-center justify-center">
<InlineCalendar bind:store {theme} />
</div>
{#if $isMobile}
<div class="header w-full flex items-center">
<Datepicker bind:store let:key let:send let:receive>
<button
class="text-lg font-bold text-primary-700 p-3 hover:bg-gray-300 rounded-md"
in:receive|local={{ key }}
out:send|local={{ key }}
>
{formatDate($store?.selected)}
</button>
</Datepicker>
</div>
{:else}
<p class="xl:hidden dark:text-white font-bold m-5">
{formatDate($store?.selected)}
</p>
{/if}
{#if formatDate($store?.selected) == $t('dashboard.today')}
<span class="flex flex-col md:flex-row items-baseline justify-center gap-10 mt-5">
<p class="text-xs font-normal text-[#656565] dark:text-white">2:30pm</p>
<div class="flex flex-col items-start gap-4">
<span>
<p class="text-lg font-semibold text-[#262626] dark:text-white">
{$t('schedule.essence')}
</p>
<a href="#" class="text-sm font-normal text-primary-700 dark:text-white"
>{$t('schedule.figma')}</a
>
</span>
<PrimaryButton label={$t('schedule.join')} variant={VARIANTS.OUTLINED} className="" />
</div>
</span>
{:else}
<p>{$t('schedule.no')}</p>
{/if}
</div>
</section>
@@ -1,56 +0,0 @@
import { type ClassValue, clsx } from 'clsx';
import { cubicOut } from 'svelte/easing';
import type { TransitionConfig } from 'svelte/transition';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
type FlyAndScaleParams = {
y?: number;
x?: number;
start?: number;
duration?: number;
};
export const flyAndScale = (
node: Element,
params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }
): TransitionConfig => {
const style = getComputedStyle(node);
const transform = style.transform === 'none' ? '' : style.transform;
const scaleConversion = (valueA: number, scaleA: [number, number], scaleB: [number, number]) => {
const [minA, maxA] = scaleA;
const [minB, maxB] = scaleB;
const percentage = (valueA - minA) / (maxA - minA);
const valueB = percentage * (maxB - minB) + minB;
return valueB;
};
const styleToString = (style: Record<string, number | string | undefined>): string => {
return Object.keys(style).reduce((str, key) => {
if (style[key] === undefined) return str;
return str + `${key}:${style[key]};`;
}, '');
};
return {
duration: params.duration ?? 200,
delay: 0,
css: (t) => {
const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]);
const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]);
const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]);
return styleToString({
transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`,
opacity: t
});
},
easing: cubicOut
};
};
@@ -1,11 +0,0 @@
import { env } from '$env/dynamic/private';
import { lemonSqueezySetup } from '@lemonsqueezy/lemonsqueezy.js';
export function configureLemonSqueezy() {
return lemonSqueezySetup({
apiKey: env.LEMON_SQUEEZY_API_KEY,
onError: (error) => {
throw new Error(`Lemon Squeezy API error: ${error.message}`);
}
});
}
@@ -1,30 +0,0 @@
import { getAccessToken } from '$lib/utils/functions/supabase';
import axios from 'axios';
interface SubscriptionData {
productId: string;
email: string;
name: string;
triggeredBy: string;
orgId: string;
}
interface SubscriptionResponse {
success: boolean;
checkoutURL: string;
}
export async function subscribeToProduct(data: SubscriptionData): Promise<SubscriptionResponse> {
const accessToken = await getAccessToken();
const response = await axios({
method: 'POST',
url: '/api/lmz/subscribe',
data,
headers: {
Authorization: `Bearer ${accessToken}`
}
});
return response.data;
}
@@ -1,23 +0,0 @@
import { configureLemonSqueezy } from '$lib/utils/services/lemonsqueezy';
import { getSubscription } from '@lemonsqueezy/lemonsqueezy.js';
import { json } from '@sveltejs/kit';
export async function GET({ url }) {
const subscriptionId = url.searchParams.get('subscriptionId');
await configureLemonSqueezy();
if (!subscriptionId) {
return json({ success: false, message: 'Subscription id is required' }, { status: 400 });
}
const response = await getSubscription(subscriptionId);
const customerPortal = response?.data?.data?.attributes?.urls?.customer_portal;
console.log({ customerPortal });
return json({
success: true,
customerPortal
});
}
-1
View File
@@ -1,6 +1,5 @@
import 'dotenv/config';
// import adapterAuto from '@sveltejs/adapter-auto';
import adapterNode from '@sveltejs/adapter-node';
import adapterVercel from '@sveltejs/adapter-vercel';
import path from 'path';
+87 -329
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,4 +1,4 @@
packages:
- 'apps/*'
- 'packages/*'
- 'packages/course-app/src/*'
- apps/*
- packages/*
- packages/course-app/src/*