Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

refactor(client): remove unused dead code (#14)

Corentin THOMASSETba4c8090aa47
diff --git a/apps/papra-client/package.json b/apps/papra-client/package.json
index 488192e9..19575431 100644
--- a/apps/papra-client/package.json
+++ b/apps/papra-client/package.json
@@ -44,15 +44,13 @@
"date-fns": "^4.1.0",
"jszip": "^3.10.1",
"lodash-es": "^4.17.21",
- "shiki": "^1.24.0",
"solid-js": "^1.8.11",
"solid-sonner": "^0.2.8",
"tailwind-merge": "^2.6.0",
"ts-pattern": "^5.5.0",
"unocss-preset-animations": "^1.1.0",
"uqr": "^0.1.2",
- "valibot": "1.0.0-beta.10",
- "zod": "^3.23.8"
+ "valibot": "1.0.0-beta.10"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:",
diff --git a/apps/papra-client/src/modules/auth/pages/generic-auth.page.tsx b/apps/papra-client/src/modules/auth/pages/generic-auth.page.tsx
index 88804103..11b58563 100644
--- a/apps/papra-client/src/modules/auth/pages/generic-auth.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/generic-auth.page.tsx
@@ -1,19 +1,11 @@
import type { Component, ParentComponent } from 'solid-js';
import { config } from '@/modules/config/config';
-import { createForm } from '@/modules/shared/form/form-legacy';
-import { isHttpErrorWithStatusCode } from '@/modules/shared/http/http-errors';
-import { useAsyncState } from '@/modules/shared/signals/async-state';
import { cn } from '@/modules/shared/style/cn';
import { createVitrineUrl } from '@/modules/shared/utils/urls';
import { Button } from '@/modules/ui/components/button';
import { Separator } from '@/modules/ui/components/separator';
-import { createToast } from '@/modules/ui/components/sonner';
-import { TextField, TextFieldLabel, TextFieldRoot } from '@/modules/ui/components/textfield';
-import { A, useNavigate } from '@solidjs/router';
-import { createSignal, For, Show } from 'solid-js';
-import { z } from 'zod';
-import { requestMagicLink } from '../auth.services';
-import { authStore } from '../auth.store';
+import { A } from '@solidjs/router';
+import { createSignal, For } from 'solid-js';
const InlineLink: ParentComponent<{ href: string }> = props => (
<Button variant="link" as={A} href={props.href} class="inline px-0">
@@ -37,54 +29,6 @@ const SsoProviderButton: Component<{ name: string; icon: string; url: string; la
);
};
-export const MagicLinkLinkForm: Component = () => {
- const navigate = useNavigate();
-
- const { getInputBindings, submit, onSubmit, getFieldError, getForm } = createForm({
- fields: {
- email: {
- schema: z.string().trim().email('Please enter a valid email address'),
- },
- },
- });
-
- const { execute: requestLink, getIsLoading, onSuccess, onError } = useAsyncState(requestMagicLink);
-
- onSubmit(async ({ email }) => {
- await requestLink({ email });
- });
-
- onSuccess(() => {
- authStore.setMagicLinkRequestEmail(getForm().email);
- navigate('/magic-link');
- });
-
- onError(({ error }) => {
- if (isHttpErrorWithStatusCode({ error, statusCode: 429 })) {
- createToast({ type: 'error', message: 'Too many magic link requests. Please try again later.' });
- return;
- }
-
- createToast({ type: 'error', message: 'An error occurred while requesting the magic link. Please try again later.' });
- });
-
- return (
- <div class="flex flex-col gap-3 w-full">
- <TextFieldRoot class="flex flex-col gap-2">
- <TextFieldLabel for="email">Email address</TextFieldLabel>
- <TextField type="email" id="email" placeholder="Eg. [email protected]" {...getInputBindings('email')} />
- <Show when={getFieldError('email')}>{getErrorMessage => <div class="text-red-500 text-sm">{getErrorMessage()}</div>}</Show>
- </TextFieldRoot>
-
- <Button onClick={submit} isLoading={getIsLoading()}>
- Continue with email
-
- <span class="i-tabler-arrow-right ml-2" />
- </Button>
- </div>
- );
-};
-
export const GenericAuthPage: Component<{ type: 'login' | 'register' }> = (props) => {
const { baseApiUrl } = config;
@@ -157,10 +101,6 @@ export const GenericAuthPage: Component<{ type: 'login' | 'register' }> = (props
<Separator class="my-6" />
- {/* <MagicLinkLinkForm /> */}
-
- {/* <Separator class="my-6" /> */}
-
<p class="text-muted-foreground">
{byType({
login: 'Don\'t have an account?',
diff --git a/apps/papra-client/src/modules/payments/pages/checkout-cancel.page.tsx b/apps/papra-client/src/modules/payments/pages/checkout-cancel.page.tsx
deleted file mode 100644
index d1b22e79..00000000
--- a/apps/papra-client/src/modules/payments/pages/checkout-cancel.page.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Component } from 'solid-js';
-import { Navigate } from '@solidjs/router';
-import { onMount } from 'solid-js';
-import { createToast } from '../../ui/components/sonner';
-
-export const CheckoutCancelPage: Component = () => {
- onMount(() => {
- createToast({ type: 'error', message: 'Payment canceled' });
- });
-
- return (
- <Navigate href="/upgrade-plan" />
- );
-};
diff --git a/apps/papra-client/src/modules/payments/pages/checkout-success.page.tsx b/apps/papra-client/src/modules/payments/pages/checkout-success.page.tsx
deleted file mode 100644
index adfe7049..00000000
--- a/apps/papra-client/src/modules/payments/pages/checkout-success.page.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { createProtectedPage } from '@/modules/auth/middleware/protected-page.middleware';
-import { useAsyncState } from '@/modules/shared/signals/async-state';
-import { useNavigate, useSearchParams } from '@solidjs/router';
-import { onMount, Suspense } from 'solid-js';
-import { match, P } from 'ts-pattern';
-import { getCheckoutSessionStatus } from '../payments.services';
-
-export const CheckoutSuccessPage = createProtectedPage({
- authType: 'private',
- component: () => {
- const [searchParams] = useSearchParams();
- const { execute, getStatus, onSuccess } = useAsyncState(getCheckoutSessionStatus);
- const navigate = useNavigate();
-
- onMount(() => {
- const sessionId = searchParams.sessionId;
-
- if (!sessionId || typeof sessionId !== 'string') {
- return console.error('No sessionId found in search params');
- }
-
- execute({ sessionId });
- });
-
- onSuccess(async () => {
- setTimeout(() => navigate('/'), 2000);
- });
-
- return (
- <div class="text-center">
- <Suspense>
- {match({ status: getStatus() })
- .with({ status: P.union('idle', 'loading') }, () => (
- <div class="flex items-center justify-center h-screen flex-col gap-2">
- <div class="i-tabler-loader-2 animate-spin text-4xl text-neutral-600" />
- <div class="text-lg font-semibold">Processing payment...</div>
- </div>
- ))
- .with({ status: 'error' }, () => (
- <div class="flex items-center justify-center h-screen flex-col gap-2">
- <div class="i-tabler-alert-triangle text-4xl text-red-500" />
- <div class="text-lg font-semibold">An error occurred, please try again later</div>
- </div>
- ))
- .with({ status: 'success' }, () => (
- <div class="flex items-center justify-center h-screen flex-col gap-2">
- <div class="i-tabler-check text-4xl text-green-500" />
- <div class="text-lg font-semibold">Payment successful</div>
- <p class="text-neutral-500">Redirecting to your dashboard...</p>
- </div>
- ))
- .exhaustive()}
- </Suspense>
- </div>
- );
- },
-});
diff --git a/apps/papra-client/src/modules/payments/pages/upgrade-plan.page.tsx b/apps/papra-client/src/modules/payments/pages/upgrade-plan.page.tsx
deleted file mode 100644
index e172dc62..00000000
--- a/apps/papra-client/src/modules/payments/pages/upgrade-plan.page.tsx
+++ /dev/null
@@ -1,189 +0,0 @@
-import type { Component, ComponentProps, ParentComponent } from 'solid-js';
-import { isHttpErrorWithCode } from '@/modules/shared/http/http-errors';
-import { Badge } from '@/modules/ui/components/badge';
-import { Button } from '@/modules/ui/components/button';
-import { Card } from '@/modules/ui/components/card';
-import { createToast } from '@/modules/ui/components/sonner';
-import { Tabs, TabsIndicator, TabsList, TabsTrigger } from '@/modules/ui/components/tabs';
-import { useCurrentUser } from '@/modules/users/composables/useCurrentUser';
-import { createSignal, splitProps } from 'solid-js';
-import { getCheckoutUrl } from '../payments.services';
-
-const plansDetails = [
- {
- id: 'free',
- name: 'Free',
- prices: {
- monthly: 0,
- yearly: 0,
- },
- features: [
- '500 docs renderings per month',
- 'No watermark',
- 'Privacy and security',
- 'Customer support',
- ],
- drawbacks: [
- 'Rendering priority',
- ],
- tags: [],
- },
- {
- id: 'starter',
- name: 'Starter',
- prices: {
- monthly: 15,
- yearly: 10, // 120 / 12,
- },
- features: [
- '5,000 docs renderings per month',
- 'No watermark',
- 'Privacy and security',
- 'Customer support',
- 'Rendering priority',
- ],
- drawbacks: [],
- tags: ['Popular'],
- },
- {
- id: 'enterprise',
- name: 'Enterprise',
- prices: {
- monthly: 120,
- yearly: 100, // 1200 / 12,
- },
- features: [
- '15,000 docs renderings per month',
- 'No watermark',
- 'Privacy and security',
- 'Priority customer support',
- 'Rendering priority',
- ],
- drawbacks: [],
- tags: [],
- },
-];
-
-const PlanButton: ParentComponent<ComponentProps<typeof Button>> = (props) => {
- const [getIsLoading, setIsLoading] = createSignal(false);
- const [local, rest] = splitProps(props, ['onClick']);
-
- const handleClick = async () => {
- setIsLoading(true);
- await local.onClick();
- setIsLoading(false);
- };
-
- return (
- <Button class="w-full" {...rest} onClick={handleClick} isLoading={getIsLoading()} />
- );
-};
-
-export const UpgradePlanPage: Component = () => {
- const { user } = useCurrentUser();
- const [getBillingInterval, setBillingInterval] = createSignal<'monthly' | 'yearly'>('yearly');
-
- const onPlanChoose = async ({ planId }: { planId: string }) => {
- try {
- const { checkoutUrl } = await getCheckoutUrl({ planId, billingInterval: getBillingInterval() });
-
- window.location.href = checkoutUrl;
- } catch (error) {
- if (isHttpErrorWithCode({ error, code: 'payment.customer_already_has_subscription' })) {
- createToast({ type: 'error', message: 'You already have an active subscription' });
- return;
- }
-
- createToast({ type: 'error', message: 'An error occurred while processing your request' });
- }
- };
-
- return (
- <div class="p-6 max-w-5xl mx-auto mt-4">
- <h1 class="text-3xl font-bold text-center mb-2">Upgrade your plan</h1>
- <p class="text-center text-muted-foreground mb-8 max-w-lg mx-auto text-pretty">
- Choose the plan that best fits your needs. You can change your plan at any time, no strings attached.
- </p>
-
- <div class="mb-10 max-w-72 mx-auto">
- <Tabs value={getBillingInterval()} onChange={setBillingInterval}>
- <TabsList>
- <TabsTrigger value="monthly">
- Monthly
- </TabsTrigger>
- <TabsTrigger value="yearly">
- <div class="flex items-baseline gap-3">
- Yearly
- <span class="text-muted-foreground text-xs">20% off</span>
- </div>
- </TabsTrigger>
- <TabsIndicator />
- </TabsList>
- </Tabs>
- </div>
-
- <div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
- {plansDetails.map(plan => (
- <Card class="p-6">
- <div>
- <div class="flex justify-between items-center">
- <h2 class="text-xl font-bold">{plan.name}</h2>
- {plan.tags.map(tag => (
- <Badge variant="secondary">
- {tag}
- </Badge>
- ))}
- </div>
-
- <div class="flex items-baseline gap-2 mt-2 mb-8">
- <div class="text-4xl font-bold">
- {`\$${plan.prices[getBillingInterval()]}`}
- </div>
- <div class="text-muted-foreground text-sm">/ month</div>
- </div>
- </div>
- <div class=" flex flex-col gap-2">
- {plan.features.map(feature => (
- <div class="flex items-center gap-2">
- <div class="i-tabler-check size-4 "></div>
- <div>{feature}</div>
- </div>
- ))}
-
- {plan.drawbacks && plan.drawbacks.map(drawback => (
- <div class="flex items-center gap-2 text-muted-foreground">
- <div class="i-tabler-x size-4 "></div>
- <div>{drawback}</div>
- </div>
- ))}
-
- </div>
- <div class="mt-8">
- {user.planId === plan.id
- ? (
- <Button variant="outline" class="w-full" disabled>
- Current plan
- </Button>
- )
- : (
- <PlanButton class="w-full" onClick={() => onPlanChoose({ planId: plan.id })}>
- Choose plan
- </PlanButton>
- )}
- </div>
- </Card>
- ))}
- </div>
-
- <div class="text-center mt-16">
- <h2 class="text-xl font-bold">Do you need a custom plan?</h2>
- <p class="max-w-lg mx-auto text-muted-foreground text-pretty mt-2">
- We can create a custom plan that fits your needs. Contact us to get started.
- </p>
- <Button variant="outline" class="mt-4">
- Contact us
- </Button>
- </div>
- </div>
- );
-};
diff --git a/apps/papra-client/src/modules/payments/payments.models.ts b/apps/papra-client/src/modules/payments/payments.models.ts
deleted file mode 100644
index 61744fc1..00000000
--- a/apps/papra-client/src/modules/payments/payments.models.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function getIsRenderingQuotaReached({ maxRenderingsPerMonth, renderingsCount }: { maxRenderingsPerMonth: number; renderingsCount: number }) {
- return renderingsCount >= maxRenderingsPerMonth;
-}
diff --git a/apps/papra-client/src/modules/payments/payments.services.ts b/apps/papra-client/src/modules/payments/payments.services.ts
deleted file mode 100644
index 90b54ae4..00000000
--- a/apps/papra-client/src/modules/payments/payments.services.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import type { Invoice } from './payments.types';
-import { map } from 'lodash-es';
-import { apiClient } from '../shared/http/http-client';
-
-export async function getCheckoutUrl({ planId, billingInterval }: { planId: string; billingInterval: string }) {
- const { checkoutUrl } = await apiClient<{ checkoutUrl: string }>({
- method: 'POST',
- path: `/api/payments/checkout-session`,
- body: {
- billingInterval,
- planId,
- },
- });
-
- return { checkoutUrl };
-}
-
-export async function getCheckoutSessionStatus({ sessionId }: { sessionId: string }) {
- const { isPaid, status } = await apiClient<{
- isPaid: boolean;
- status: string;
- }>({
- method: 'GET',
- path: `/api/payments/checkout-session/${sessionId}`,
- });
-
- return { isPaid, status };
-}
-
-export async function fetchUserSubscription() {
- const { subscription, planId } = await apiClient<{
- planId: string;
- subscription?: {
- nextBillingDate: string;
- };
- }>({
- method: 'GET',
- path: '/api/payments/subscription',
- });
-
- return {
- planId,
- subscription: subscription
- ? {
- nextBillingDate: new Date(subscription.nextBillingDate),
- }
- : undefined,
- };
-}
-
-export async function cancelSubscription() {
- await apiClient({
- method: 'DELETE',
- path: '/api/payments/subscription',
- });
-}
-
-export async function fetchInvoices() {
- const { invoices } = await apiClient<{ invoices: Invoice[] }>({
- method: 'GET',
- path: '/api/payments/invoices',
- });
-
- return {
- invoices: map(invoices, invoice => ({
- ...invoice,
- createdAt: new Date(invoice.createdAt),
- })),
- };
-}
-
-export async function fetchSubscriptionQuota({ userId }: { userId?: string } = {}) {
- const { maxRenderingsPerMonth, renderingsCount } = await apiClient<{ renderingsCount: number; maxRenderingsPerMonth: number }>({
- method: 'GET',
- path: '/api/subscription/quotas',
- impersonatedUserId: userId,
- });
-
- return { maxRenderingsPerMonth, renderingsCount };
-}
-
-export async function getCustomerPortalUrl() {
- const { portalUrl } = await apiClient<{ portalUrl: string }>({
- method: 'GET',
- path: '/api/payments/customer-portal',
- });
-
- return { portalUrl };
-}
diff --git a/apps/papra-client/src/modules/payments/payments.types.ts b/apps/papra-client/src/modules/payments/payments.types.ts
deleted file mode 100644
index 0d13a2ce..00000000
--- a/apps/papra-client/src/modules/payments/payments.types.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type Invoice = {
- id: string;
- amountDue: number;
- createdAt: Date;
- pdfUrl: string;
- status: string;
-};
diff --git a/apps/papra-client/src/modules/shared/form/form-legacy.ts b/apps/papra-client/src/modules/shared/form/form-legacy.ts
deleted file mode 100644
index 402972a4..00000000
--- a/apps/papra-client/src/modules/shared/form/form-legacy.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-import type { z } from 'zod';
-import { flatten, isEmpty, isEqual, map, mapValues } from 'lodash-es';
-import { createSignal } from 'solid-js';
-import { createHook } from '../hooks/hooks';
-
-export type FormRule = {
- isValid: (value: string) => boolean;
- message: string;
-};
-
-export type FormField = {
- initialValue?: string;
- schema: z.ZodTypeAny;
-};
-
-export function createForm<Keys>({ fields }: { fields: Record<keyof Keys, FormField> }) {
- const [getForm, setForm] = createSignal<Record<keyof Keys, string>>(mapValues(fields, field => field.initialValue ?? ''));
- const [getFieldsErrors, setFieldsErrors] = createSignal<Record<keyof Keys, string[]>>(mapValues(fields, () => []));
- const [getIsSubmitting, setIsSubmitting] = createSignal(false);
-
- const setField = (key: keyof Keys, value: string) => {
- setForm(form => ({ ...form, [key]: value }));
- setFieldsErrors(fieldErrors => ({ ...fieldErrors, [key]: [] }));
- };
-
- const getField = (key: keyof Keys) => {
- return getForm()[key];
- };
-
- const validateField = (key: keyof Keys) => {
- const value = getForm()[key];
- const schema = fields[key].schema;
- const result = schema.safeParse(value);
-
- if (!result.success) {
- return {
- isValid: false,
- errors: result.error.issues.map(issue => issue.message),
- };
- }
-
- return {
- isValid: true,
- errors: [],
- };
- };
-
- const triggerFieldValidation = (key: keyof Keys) => {
- const { isValid, errors } = validateField(key);
- if (!isValid) {
- setFieldsErrors(fieldErrors => ({ ...fieldErrors, [key]: errors }));
- return false;
- }
-
- return true;
- };
-
- const triggerFieldsValidation = () => {
- return map(fields, (_, key) => triggerFieldValidation(key as keyof Keys));
- };
-
- const getFieldErrors = (key: keyof Keys) => {
- return getFieldsErrors()[key];
- };
-
- const getFieldError = (key: keyof Keys) => {
- return getFieldErrors(key)[0];
- };
-
- const submitHook = createHook<Record<keyof Keys, string>>();
-
- const submit = async (event?: Event) => {
- event?.preventDefault();
- const form = getForm();
-
- triggerFieldsValidation();
- const isValid = isEmpty(flatten(Object.values(getFieldsErrors())));
-
- if (!isValid) {
- return;
- }
-
- setIsSubmitting(true);
- await submitHook.trigger(form);
- setIsSubmitting(false);
- };
-
- const getInputBindings = (key: keyof Keys) => {
- return {
- value: getField(key),
- onInput: (event: InputEvent) => {
- const value = (event.target as HTMLInputElement).value;
- setField(key, value);
- },
- onBlur: () => {
- triggerFieldValidation(key);
- },
- };
- };
-
- const getFieldStatus = (key: keyof Keys) => {
- const errors = getFieldErrors(key);
-
- if (isEmpty(errors)) {
- return 'valid';
- }
-
- return 'invalid';
- };
-
- const setFieldError = (key: keyof Keys, errors: string) => {
- setFieldsErrors(fieldErrors => ({ ...fieldErrors, [key]: [errors] }));
- };
-
- const getIsFormDirty = () => {
- return !isEqual(
- getForm(),
- mapValues(fields, field => field.initialValue ?? ''),
- );
- };
-
- const getFormHasErrors = () => {
- return !isEmpty(flatten(Object.values(getFieldsErrors())));
- };
-
- return {
- getForm,
- setForm,
- getField,
- setField,
- getFieldsErrors,
- getFieldError,
- validateField,
- triggerFieldValidation,
- triggerFieldsValidation,
- getFieldErrors,
- submit,
- onSubmit: submitHook.on,
- getIsSubmitting,
- getInputBindings,
- getFieldStatus,
- setFieldError,
- getIsFormDirty,
- getFormHasErrors,
- };
-}
diff --git a/apps/papra-client/src/modules/shared/syntax-highlight/code-group.tsx b/apps/papra-client/src/modules/shared/syntax-highlight/code-group.tsx
deleted file mode 100644
index 993eb3c0..00000000
--- a/apps/papra-client/src/modules/shared/syntax-highlight/code-group.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import type { BuiltinLanguage } from 'shiki';
-import type { Component, JSX } from 'solid-js';
-
-import { Card, CardContent, CardHeader } from '@/modules/ui/components/card';
-import { ToggleGroup, ToggleGroupItem } from '@/modules/ui/components/toggle-group';
-import { keys, map } from 'lodash-es';
-import { createSignal, splitProps } from 'solid-js';
-import { cn } from '../style/cn';
-import { CopyButton } from '../utils/copy';
-import { SyntaxHighlight } from './syntax-highlight';
-
-export type CodeGroupItem = {
- language: BuiltinLanguage;
- label: string;
- icon?: string;
- code: string;
-};
-
-export type CodeGroupItems = Record<string, CodeGroupItem>;
-
-export const CodeGroup: Component<{ items: CodeGroupItems } & JSX.HTMLAttributes<HTMLDivElement>> = (props) => {
- const [getSelectedKey, setSelectedKey] = createSignal(keys(props.items)[0]);
-
- const getCurrentItem = () => props.items[getSelectedKey()];
-
- const [local, rest] = splitProps(props, ['class', 'items']);
-
- return (
- <Card class={cn('w-full overflow-hidden', local.class)} {...rest}>
- <CardHeader class="py-2 px-2 flex items-center justify-between flex-row light:bg-white">
- <div class="overflow-x-auto">
- <ToggleGroup value={getSelectedKey()} onChange={setSelectedKey} class="justify-start">
- {map(local.items, (group, index) => (
- <ToggleGroupItem class="px-3 py-1.5 leading-tight h-auto" value={index}>
- {group.label}
- </ToggleGroupItem>
- ))}
- </ToggleGroup>
- </div>
- <CopyButton text={getCurrentItem().code} class="!mt-0" size="sm" variant="secondary" />
- </CardHeader>
- <CardContent class="p-0 ">
- <SyntaxHighlight code={getCurrentItem().code} language={getCurrentItem().language} class="rounded-none" />
- </CardContent>
- </Card>
- );
-};
diff --git a/apps/papra-client/src/modules/shared/syntax-highlight/syntax-highlight.tsx b/apps/papra-client/src/modules/shared/syntax-highlight/syntax-highlight.tsx
deleted file mode 100644
index 9a712977..00000000
--- a/apps/papra-client/src/modules/shared/syntax-highlight/syntax-highlight.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import type { Component, JSX } from 'solid-js';
-import { codeToHtml } from 'shiki';
-import { createEffect, createSignal, splitProps } from 'solid-js';
-import { cn } from '../style/cn';
-import { theme } from './theme';
-
-export const SyntaxHighlight: Component<{ code: string; language: string } & JSX.HTMLAttributes<HTMLDivElement>> = (props) => {
- const [local, rest] = splitProps(props, ['code', 'language', 'class']);
- const [html, setHtml] = createSignal<string | undefined>();
-
- createEffect(async () => {
- const codeHtml = await codeToHtml(local.code, {
- lang: local.language,
- theme,
- });
- setHtml(codeHtml);
- });
-
- return (
- <div class={cn('rounded-lg px-8 py-6 bg-#111 overflow-auto text-muted-foreground', local.class)} {...rest}>
- {html() ? <div innerHTML={html()} /> : <pre>{local.code}</pre>}
- </div>
- );
-};
diff --git a/apps/papra-client/src/modules/shared/syntax-highlight/theme.ts b/apps/papra-client/src/modules/shared/syntax-highlight/theme.ts
deleted file mode 100644
index 45ffd672..00000000
--- a/apps/papra-client/src/modules/shared/syntax-highlight/theme.ts
+++ /dev/null
@@ -1,562 +0,0 @@
-import type { ThemeRegistration } from 'shiki';
-
-export const theme: ThemeRegistration = {
- name: 'getcallback-dark',
- bg: '#00000000',
- colors: {
- 'activityBar.activeBorder': '#4d9375',
- 'activityBar.background': '#121212',
- 'activityBar.border': '#191919',
- 'activityBar.foreground': '#dbd7caee',
- 'activityBar.inactiveForeground': '#dedcd550',
- 'activityBarBadge.background': '#bfbaaa',
- 'activityBarBadge.foreground': '#121212',
- 'badge.background': '#dedcd590',
- 'badge.foreground': '#121212',
- 'breadcrumb.activeSelectionForeground': '#eeeeee18',
- 'breadcrumb.background': '#181818',
- 'breadcrumb.focusForeground': '#dbd7caee',
- 'breadcrumb.foreground': '#959da5',
- 'breadcrumbPicker.background': '#121212',
- 'button.background': '#4d9375',
- 'button.foreground': '#121212',
- 'button.hoverBackground': '#4d9375',
- 'checkbox.background': '#181818',
- 'checkbox.border': '#2f363d',
- 'debugToolBar.background': '#121212',
- 'descriptionForeground': '#dedcd590',
- 'diffEditor.insertedTextBackground': '#4d937550',
- 'diffEditor.removedTextBackground': '#ab595950',
- 'dropdown.background': '#121212',
- 'dropdown.border': '#191919',
- 'dropdown.foreground': '#dbd7caee',
- 'dropdown.listBackground': '#181818',
- 'editor.background': '#121212',
- 'editor.findMatchBackground': '#e6cc7722',
- 'editor.findMatchHighlightBackground': '#e6cc7744',
- 'editor.focusedStackFrameHighlightBackground': '#b808',
- 'editor.foldBackground': '#eeeeee10',
- 'editor.foreground': '#dbd7caee',
- 'editor.inactiveSelectionBackground': '#eeeeee10',
- 'editor.lineHighlightBackground': '#181818',
- 'editor.selectionBackground': '#eeeeee18',
- 'editor.selectionHighlightBackground': '#eeeeee10',
- 'editor.stackFrameHighlightBackground': '#a707',
- 'editor.wordHighlightBackground': '#1c6b4805',
- 'editor.wordHighlightStrongBackground': '#1c6b4810',
- 'editorBracketHighlight.foreground1': '#5eaab5',
- 'editorBracketHighlight.foreground2': '#4d9375',
- 'editorBracketHighlight.foreground3': '#d4976c',
- 'editorBracketHighlight.foreground4': '#d9739f',
- 'editorBracketHighlight.foreground5': '#e6cc77',
- 'editorBracketHighlight.foreground6': '#6394bf',
- 'editorBracketMatch.background': '#4d937520',
- 'editorError.foreground': '#cb7676',
- 'editorGroup.border': '#191919',
- 'editorGroupHeader.tabsBackground': '#121212',
- 'editorGroupHeader.tabsBorder': '#191919',
- 'editorGutter.addedBackground': '#4d9375',
- 'editorGutter.commentRangeForeground': '#dedcd550',
- 'editorGutter.deletedBackground': '#cb7676',
- 'editorGutter.foldingControlForeground': '#dedcd590',
- 'editorGutter.modifiedBackground': '#6394bf',
- 'editorHint.foreground': '#4d9375',
- 'editorIndentGuide.activeBackground': '#ffffff30',
- 'editorIndentGuide.background': '#ffffff15',
- 'editorInfo.foreground': '#6394bf',
- 'editorInlayHint.background': '#00000000',
- 'editorInlayHint.foreground': '#666666',
- 'editorLineNumber.activeForeground': '#bfbaaa',
- 'editorLineNumber.foreground': '#dedcd550',
- 'editorOverviewRuler.border': '#111',
- 'editorStickyScroll.background': '#181818',
- 'editorStickyScrollHover.background': '#181818',
- 'editorWarning.foreground': '#d4976c',
- 'editorWhitespace.foreground': '#ffffff15',
- 'editorWidget.background': '#121212',
- 'errorForeground': '#cb7676',
- 'focusBorder': '#00000000',
- 'foreground': '#dbd7caee',
- 'gitDecoration.addedResourceForeground': '#4d9375',
- 'gitDecoration.conflictingResourceForeground': '#d4976c',
- 'gitDecoration.deletedResourceForeground': '#cb7676',
- 'gitDecoration.ignoredResourceForeground': '#dedcd550',
- 'gitDecoration.modifiedResourceForeground': '#6394bf',
- 'gitDecoration.submoduleResourceForeground': '#dedcd590',
- 'gitDecoration.untrackedResourceForeground': '#5eaab5',
- 'input.background': '#181818',
- 'input.border': '#191919',
- 'input.foreground': '#dbd7caee',
- 'input.placeholderForeground': '#dedcd590',
- 'inputOption.activeBackground': '#dedcd550',
- 'list.activeSelectionBackground': '#181818',
- 'list.activeSelectionForeground': '#dbd7caee',
- 'list.focusBackground': '#181818',
- 'list.highlightForeground': '#4d9375',
- 'list.hoverBackground': '#181818',
- 'list.hoverForeground': '#dbd7caee',
- 'list.inactiveFocusBackground': '#121212',
- 'list.inactiveSelectionBackground': '#181818',
- 'list.inactiveSelectionForeground': '#dbd7caee',
- 'menu.separatorBackground': '#191919',
- 'notificationCenterHeader.background': '#121212',
- 'notificationCenterHeader.foreground': '#959da5',
- 'notifications.background': '#121212',
- 'notifications.border': '#191919',
- 'notifications.foreground': '#dbd7caee',
- 'notificationsErrorIcon.foreground': '#cb7676',
- 'notificationsInfoIcon.foreground': '#6394bf',
- 'notificationsWarningIcon.foreground': '#d4976c',
- 'panel.background': '#121212',
- 'panel.border': '#191919',
- 'panelInput.border': '#2f363d',
- 'panelTitle.activeBorder': '#4d9375',
- 'panelTitle.activeForeground': '#dbd7caee',
- 'panelTitle.inactiveForeground': '#959da5',
- 'peekViewEditor.background': '#121212',
- 'peekViewEditor.matchHighlightBackground': '#ffd33d33',
- 'peekViewResult.background': '#121212',
- 'peekViewResult.matchHighlightBackground': '#ffd33d33',
- 'pickerGroup.border': '#191919',
- 'pickerGroup.foreground': '#dbd7caee',
- 'problemsErrorIcon.foreground': '#cb7676',
- 'problemsInfoIcon.foreground': '#6394bf',
- 'problemsWarningIcon.foreground': '#d4976c',
- 'progressBar.background': '#4d9375',
- 'quickInput.background': '#121212',
- 'quickInput.foreground': '#dbd7caee',
- 'quickInputList.focusBackground': '#181818',
- 'scrollbar.shadow': '#0000',
- 'scrollbarSlider.activeBackground': '#dedcd550',
- 'scrollbarSlider.background': '#dedcd510',
- 'scrollbarSlider.hoverBackground': '#dedcd550',
- 'settings.headerForeground': '#dbd7caee',
- 'settings.modifiedItemIndicator': '#4d9375',
- 'sideBar.background': '#121212',
- 'sideBar.border': '#191919',
- 'sideBar.foreground': '#bfbaaa',
- 'sideBarSectionHeader.background': '#121212',
- 'sideBarSectionHeader.border': '#191919',
- 'sideBarSectionHeader.foreground': '#dbd7caee',
- 'sideBarTitle.foreground': '#dbd7caee',
- 'statusBar.background': '#121212',
- 'statusBar.border': '#191919',
- 'statusBar.debuggingBackground': '#181818',
- 'statusBar.debuggingForeground': '#bfbaaa',
- 'statusBar.foreground': '#bfbaaa',
- 'statusBar.noFolderBackground': '#121212',
- 'statusBarItem.prominentBackground': '#181818',
- 'tab.activeBackground': '#121212',
- 'tab.activeBorder': '#191919',
- 'tab.activeBorderTop': '#dedcd590',
- 'tab.activeForeground': '#dbd7caee',
- 'tab.border': '#191919',
- 'tab.hoverBackground': '#181818',
- 'tab.inactiveBackground': '#121212',
- 'tab.inactiveForeground': '#959da5',
- 'tab.unfocusedActiveBorder': '#191919',
- 'tab.unfocusedActiveBorderTop': '#191919',
- 'tab.unfocusedHoverBackground': '#121212',
- 'terminal.ansiBlack': '#393a34',
- 'terminal.ansiBlue': '#6394bf',
- 'terminal.ansiBrightBlack': '#777777',
- 'terminal.ansiBrightBlue': '#6394bf',
- 'terminal.ansiBrightCyan': '#5eaab5',
- 'terminal.ansiBrightGreen': '#4d9375',
- 'terminal.ansiBrightMagenta': '#d9739f',
- 'terminal.ansiBrightRed': '#cb7676',
- 'terminal.ansiBrightWhite': '#ffffff',
- 'terminal.ansiBrightYellow': '#e6cc77',
- 'terminal.ansiCyan': '#5eaab5',
- 'terminal.ansiGreen': '#4d9375',
- 'terminal.ansiMagenta': '#d9739f',
- 'terminal.ansiRed': '#cb7676',
- 'terminal.ansiWhite': '#dbd7ca',
- 'terminal.ansiYellow': '#e6cc77',
- 'terminal.foreground': '#dbd7caee',
- 'terminal.selectionBackground': '#eeeeee18',
- 'textBlockQuote.background': '#121212',
- 'textBlockQuote.border': '#191919',
- 'textCodeBlock.background': '#121212',
- 'textLink.activeForeground': '#4d9375',
- 'textLink.foreground': '#4d9375',
- 'textPreformat.foreground': '#d1d5da',
- 'textSeparator.foreground': '#586069',
- 'titleBar.activeBackground': '#121212',
- 'titleBar.activeForeground': '#bfbaaa',
- 'titleBar.border': '#181818',
- 'titleBar.inactiveBackground': '#121212',
- 'titleBar.inactiveForeground': '#959da5',
- 'tree.indentGuidesStroke': '#2f363d',
- 'welcomePage.buttonBackground': '#2f363d',
- 'welcomePage.buttonHoverBackground': '#444d56',
- },
- tokenColors: [
- {
- scope: ['comment', 'punctuation.definition.comment', 'string.comment'],
- settings: {
- foreground: '#758575dd',
- },
- },
- {
- scope: [
- 'delimiter.bracket',
- 'delimiter',
- 'invalid.illegal.character-not-allowed-here.html',
- 'keyword.operator.rest',
- 'keyword.operator.spread',
- 'keyword.operator.type.annotation',
- 'keyword.operator.relational',
- 'keyword.operator.assignment',
- 'keyword.operator.type',
- 'meta.brace',
- 'meta.tag.block.any.html',
- 'meta.tag.inline.any.html',
- 'meta.tag.structure.input.void.html',
- 'meta.type.annotation',
- 'meta.embedded.block.github-actions-expression',
- 'storage.type.function.arrow',
- 'meta.objectliteral.ts',
- 'punctuation',
- ],
- settings: {
- foreground: '#666666',
- },
- },
- {
- scope: ['constant', 'entity.name.constant', 'variable.language', 'meta.definition.variable'],
- settings: {
- foreground: '#c99076',
- },
- },
- {
- scope: ['entity', 'entity.name'],
- settings: {
- foreground: '#80a665',
- },
- },
- {
- scope: 'variable.parameter.function',
- settings: {
- foreground: '#dbd7caee',
- },
- },
- {
- scope: ['entity.name.tag', 'tag.html'],
- settings: {
- foreground: '#4d9375',
- },
- },
- {
- scope: 'entity.name.function',
- settings: {
- foreground: '#80a665',
- },
- },
- {
- scope: ['keyword', 'storage.type.class.jsdoc'],
- settings: {
- foreground: '#4d9375',
- },
- },
- {
- scope: ['storage', 'storage.type', 'support.type.builtin', 'constant.language.undefined', 'constant.language.null'],
- settings: {
- foreground: '#cb7676',
- },
- },
- {
- scope: ['text.html.derivative', 'storage.modifier.package', 'storage.modifier.import', 'storage.type.java'],
- settings: {
- foreground: '#dbd7caee',
- },
- },
- {
- scope: ['string', 'string punctuation.section.embedded source', 'attribute.value'],
- settings: {
- foreground: '#c98a7d',
- },
- },
- {
- scope: ['punctuation.definition.string', 'punctuation.support.type.property-name'],
- settings: {
- foreground: '#c98a7d99',
- },
- },
- {
- scope: 'support',
- settings: {
- foreground: '#b8a965',
- },
- },
- {
- scope: ['property', 'meta.property-name', 'meta.object-literal.key', 'entity.name.tag.yaml', 'attribute.name'],
- settings: {
- foreground: '#b8a965',
- },
- },
- {
- scope: ['entity.other.attribute-name', 'invalid.deprecated.entity.other.attribute-name.html'],
- settings: {
- foreground: '#bd976a',
- },
- },
- {
- scope: ['variable', 'identifier'],
- settings: {
- foreground: '#bd976a',
- },
- },
- {
- scope: ['support.type.primitive', 'entity.name.type'],
- settings: {
- foreground: '#5DA994',
- },
- },
- {
- scope: 'namespace',
- settings: {
- foreground: '#db889a',
- },
- },
- {
- scope: ['keyword.operator', 'keyword.operator.assignment.compound', 'meta.var.expr.ts'],
- settings: {
- foreground: '#cb7676',
- },
- },
- {
- scope: 'invalid.broken',
- settings: {
- fontStyle: 'italic',
- foreground: '#fdaeb7',
- },
- },
- {
- scope: 'invalid.deprecated',
- settings: {
- fontStyle: 'italic',
- foreground: '#fdaeb7',
- },
- },
- {
- scope: 'invalid.illegal',
- settings: {
- fontStyle: 'italic',
- foreground: '#fdaeb7',
- },
- },
- {
- scope: 'invalid.unimplemented',
- settings: {
- fontStyle: 'italic',
- foreground: '#fdaeb7',
- },
- },
- {
- scope: 'carriage-return',
- settings: {
- background: '#f97583',
- content: '^M',
- fontStyle: 'italic underline',
- foreground: '#24292e',
- },
- },
- {
- scope: 'message.error',
- settings: {
- foreground: '#fdaeb7',
- },
- },
- {
- scope: 'string variable',
- settings: {
- foreground: '#c98a7d',
- },
- },
- {
- scope: ['source.regexp', 'string.regexp'],
- settings: {
- foreground: '#c4704f',
- },
- },
- {
- scope: ['string.regexp.character-class', 'string.regexp constant.character.escape', 'string.regexp source.ruby.embedded', 'string.regexp string.regexp.arbitrary-repitition'],
- settings: {
- foreground: '#c98a7d',
- },
- },
- {
- scope: 'string.regexp constant.character.escape',
- settings: {
- foreground: '#e6cc77',
- },
- },
- {
- scope: ['support.constant'],
- settings: {
- foreground: '#c99076',
- },
- },
- {
- scope: ['keyword.operator.quantifier.regexp', 'constant.numeric', 'number'],
- settings: {
- foreground: '#4C9A91',
- },
- },
- {
- scope: ['keyword.other.unit'],
- settings: {
- foreground: '#cb7676',
- },
- },
- {
- scope: ['constant.language.boolean', 'constant.language'],
- settings: {
- foreground: '#4d9375',
- },
- },
- {
- scope: 'meta.module-reference',
- settings: {
- foreground: '#4d9375',
- },
- },
- {
- scope: 'punctuation.definition.list.begin.markdown',
- settings: {
- foreground: '#d4976c',
- },
- },
- {
- scope: ['markup.heading', 'markup.heading entity.name'],
- settings: {
- fontStyle: 'bold',
- foreground: '#4d9375',
- },
- },
- {
- scope: 'markup.quote',
- settings: {
- foreground: '#5d99a9',
- },
- },
- {
- scope: 'markup.italic',
- settings: {
- fontStyle: 'italic',
- foreground: '#dbd7caee',
- },
- },
- {
- scope: 'markup.bold',
- settings: {
- fontStyle: 'bold',
- foreground: '#dbd7caee',
- },
- },
- {
- scope: 'markup.raw',
- settings: {
- foreground: '#4d9375',
- },
- },
- {
- scope: ['markup.deleted', 'meta.diff.header.from-file', 'punctuation.definition.deleted'],
- settings: {
- background: '#86181d',
- foreground: '#fdaeb7',
- },
- },
- {
- scope: ['markup.inserted', 'meta.diff.header.to-file', 'punctuation.definition.inserted'],
- settings: {
- background: '#144620',
- foreground: '#85e89d',
- },
- },
- {
- scope: ['markup.changed', 'punctuation.definition.changed'],
- settings: {
- background: '#c24e00',
- foreground: '#ffab70',
- },
- },
- {
- scope: ['markup.ignored', 'markup.untracked'],
- settings: {
- background: '#79b8ff',
- foreground: '#2f363d',
- },
- },
- {
- scope: 'meta.diff.range',
- settings: {
- fontStyle: 'bold',
- foreground: '#b392f0',
- },
- },
- {
- scope: 'meta.diff.header',
- settings: {
- foreground: '#79b8ff',
- },
- },
- {
- scope: 'meta.separator',
- settings: {
- fontStyle: 'bold',
- foreground: '#79b8ff',
- },
- },
- {
- scope: 'meta.output',
- settings: {
- foreground: '#79b8ff',
- },
- },
- {
- scope: ['brackethighlighter.tag', 'brackethighlighter.curly', 'brackethighlighter.round', 'brackethighlighter.square', 'brackethighlighter.angle', 'brackethighlighter.quote'],
- settings: {
- foreground: '#d1d5da',
- },
- },
- {
- scope: 'brackethighlighter.unmatched',
- settings: {
- foreground: '#fdaeb7',
- },
- },
- {
- scope: ['constant.other.reference.link', 'string.other.link', 'punctuation.definition.string.begin.markdown', 'punctuation.definition.string.end.markdown'],
- settings: {
- foreground: '#c98a7d',
- },
- },
- {
- scope: ['markup.underline.link.markdown', 'markup.underline.link.image.markdown'],
- settings: {
- fontStyle: 'underline',
- foreground: '#dedcd590',
- },
- },
- {
- scope: ['type.identifier', 'constant.other.character-class.regexp'],
- settings: {
- foreground: '#6872ab',
- },
- },
- {
- scope: ['entity.other.attribute-name.html.vue'],
- settings: {
- foreground: '#80a665',
- },
- },
- {
- scope: ['invalid.illegal.unrecognized-tag.html'],
- settings: {
- fontStyle: 'normal',
- },
- },
- ],
-} as unknown as ThemeRegistration;
diff --git a/apps/papra-client/src/modules/users/pages/settings.account.page.tsx b/apps/papra-client/src/modules/users/pages/settings.account.page.tsx
deleted file mode 100644
index 477e1882..00000000
--- a/apps/papra-client/src/modules/users/pages/settings.account.page.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { authStore } from '@/modules/auth/auth.store';
-import { Button } from '@/modules/ui/components/button';
-import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/modules/ui/components/card';
-import { TextField, TextFieldLabel, TextFieldRoot } from '@/modules/ui/components/textfield';
-import { A } from '@solidjs/router';
-import { useCurrentUser } from '../composables/useCurrentUser';
-
-export function SettingsAccountPage() {
- const { user } = useCurrentUser();
- return (
- <div class="mt-8">
- <Card>
- <CardHeader class="border-b">
- <CardTitle>
- Account Email
- </CardTitle>
- </CardHeader>
-
- <CardContent class="p-6">
-
- <TextFieldRoot class="text-muted-foreground">
- <TextFieldLabel>Your email</TextFieldLabel>
- <TextField value={user.email} readOnly />
- </TextFieldRoot>
- </CardContent>
-
- <CardFooter class="border-t p-6">
- <p class="text-muted-foreground">
- Your email is used to log in and send you notifications. It cannot be changed.
- </p>
- </CardFooter>
-
- </Card>
-
- <Card class="mt-4">
- <CardHeader class="border-b">
- <CardTitle>
- Onboarding
- </CardTitle>
- </CardHeader>
-
- <CardContent class="p-6">
- <p class="text-muted-foreground">
- See the onboarding page to get started with setting up your api key.
- </p>
- </CardContent>
-
- <CardFooter class="border-t p-6">
- <Button as={A} href="/onboarding">
- Go to the onboarding
- </Button>
- </CardFooter>
-
- </Card>
-
- <Card class="mt-4 border-destructive">
- <CardHeader class="border-b">
- <CardTitle>
- Logout
- </CardTitle>
- </CardHeader>
-
- <CardContent class="p-6">
- <p class="text-muted-foreground">
- You can logout from your account here. You will be redirected to the login page.
- </p>
- </CardContent>
-
- <CardFooter class="border-t p-6">
- <Button onClick={() => authStore.logout()} variant="destructive">
- Logout
- </Button>
- </CardFooter>
-
- </Card>
- </div>
- );
-}
diff --git a/apps/papra-client/src/modules/users/pages/settings.billing.tsx b/apps/papra-client/src/modules/users/pages/settings.billing.tsx
deleted file mode 100644
index 0ce19f3c..00000000
--- a/apps/papra-client/src/modules/users/pages/settings.billing.tsx
+++ /dev/null
@@ -1,262 +0,0 @@
-import type { Invoice } from '@/modules/payments/payments.types';
-import type { Component } from 'solid-js';
-import { cancelSubscription, fetchInvoices, fetchSubscriptionQuota, fetchUserSubscription, getCustomerPortalUrl } from '@/modules/payments/payments.services';
-import { useConfirmModal } from '@/modules/shared/confirm';
-import { formatAmountInCents } from '@/modules/shared/currency';
-import { clearQueryCache } from '@/modules/shared/query/query-client';
-import { Badge } from '@/modules/ui/components/badge';
-import { Button } from '@/modules/ui/components/button';
-import { Card, CardContent, CardFooter } from '@/modules/ui/components/card';
-import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/modules/ui/components/dropdown-menu';
-import { Progress } from '@/modules/ui/components/progress';
-import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from '@/modules/ui/components/table';
-import { Tooltip, TooltipContent, TooltipTrigger } from '@/modules/ui/components/tooltip';
-import { safely } from '@corentinth/chisels';
-import { A } from '@solidjs/router';
-import { createQueries } from '@tanstack/solid-query';
-import { capitalize } from 'lodash-es';
-import { For, Show, Suspense } from 'solid-js';
-import { toast } from 'solid-sonner';
-import { useCurrentUser } from '../composables/useCurrentUser';
-
-const InvoiceList: Component<{ invoices?: Invoice[] }> = (props) => {
- return (
-
- <div class="mt-8 border rounded-lg">
- <Table>
- <TableCaption class="sr-only">
- Invoices
- </TableCaption>
-
- <TableHeader>
- <TableRow>
- <TableHead>
- Invoice Date
- </TableHead>
- <TableHead>
- Amount Due
- </TableHead>
- <TableHead>
- Status
- </TableHead>
- <TableHead class="text-right">
- Actions
- </TableHead>
-
- </TableRow>
-
- </TableHeader>
-
- <TableBody>
- <For each={props.invoices ?? []}>
- {invoice => (
- <TableRow>
- <TableCell>
- <span title={invoice.createdAt.toLocaleString()}>
- {invoice.createdAt.toLocaleDateString()}
- </span>
- </TableCell>
- <TableCell>
- {formatAmountInCents({ amountInCents: invoice.amountDue })}
- </TableCell>
- <TableCell>
- <Badge variant="secondary">
-
- {capitalize(invoice.status)}
- </Badge>
- </TableCell>
- <TableCell class="text-right">
- <Tooltip>
- <TooltipTrigger>
- <Button href={invoice.pdfUrl} as="a" target="_blank" rel="noopener noreferrer" download size="icon" variant="ghost">
- <div class="i-tabler-download size-4"></div>
- </Button>
- </TooltipTrigger>
- <TooltipContent>
- Download invoice PDF
- </TooltipContent>
- </Tooltip>
- </TableCell>
- </TableRow>
- )}
-
- </For>
-
- </TableBody>
- </Table>
- </div>
-
- );
-};
-
-export function SettingsBillingPage() {
- const { confirm } = useConfirmModal();
- const { refreshCurrentUser } = useCurrentUser();
-
- const query = createQueries(() => ({
- queries: [
- {
- queryKey: ['subscription'],
- queryFn: fetchUserSubscription,
- },
- {
- queryKey: ['invoices'],
- queryFn: fetchInvoices,
- },
- {
- queryKey: ['subscriptionQuota'],
- queryFn: () => fetchSubscriptionQuota(),
- },
- ],
- }));
-
- const getPlanId = () => query[0].data?.planId;
- const getSubscription = () => query[0].data?.subscription;
- const getInvoices = () => query[1].data?.invoices ?? [];
- const getSubscriptionQuota = () => query[2].data;
-
- async function downgradeToFreePlan() {
- const isConfirmed = await confirm({
- title: 'Downgrade to free plan',
- message: 'Are you sure you want to downgrade to the free plan? You will lose access to some features.',
- confirmButton: {
- text: 'Yes, downgrade to free plan',
- variant: 'destructive',
- },
- cancelButton: {
- text: 'Cancel',
- },
- });
-
- if (!isConfirmed) {
- return;
- }
-
- const [, cancelationError] = await safely(cancelSubscription());
-
- clearQueryCache();
- await refreshCurrentUser();
-
- if (cancelationError) {
- console.error(cancelationError);
- toast.error('An error occurred while canceling your subscription');
- return;
- }
-
- toast.success('Your subscription has been canceled');
-
- await query[0].refetch();
- }
-
- const getUsagePercentage = () => {
- const { maxRenderingsPerMonth = 1, renderingsCount = 0 } = getSubscriptionQuota() ?? {};
- return 100 * renderingsCount / maxRenderingsPerMonth;
- };
-
- async function openCustomerPortal() {
- try {
- const { portalUrl } = await getCustomerPortalUrl();
- window.open(portalUrl, '_blank');
- } catch (error) {
- console.error(error);
- toast.error('An error occurred while opening the customer portal');
- }
- }
-
- return (
- <div class="mt-8">
- <Suspense
- fallback={
- <div class="i-tabler-loader-2 animate-spin text-4xl mx-auto" />
- }
- >
-
- <Card>
- <CardContent class="p-6">
- <div class="flex items-center justify-between">
- <div>
- <div class="text-muted-foreground">
- Current Plan
- </div>
- <div class="text-xl font-bold">
- { getPlanId()?.toUpperCase()}
- </div>
- </div>
-
- { getPlanId() === 'free'
- ? (
- <Button href="/upgrade-plan" as={A}>
- Upgrade Plan
- <div class="i-tabler-arrow-right size-4 ml-2" />
- </Button>
- )
- : (
- <DropdownMenu>
- <DropdownMenuTrigger>
- <Button variant="outline">
- Manage Plan
- <div class="i-tabler-chevron-down size-4 ml-2" />
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent>
- <DropdownMenuItem class="cursor-pointer" onClick={openCustomerPortal}>
- <div class="i-tabler-credit-card size-4 mr-2"></div>
- Manage payment method
- </DropdownMenuItem>
-
- <DropdownMenuItem class="cursor-pointer" onClick={downgradeToFreePlan}>
- <div class="i-tabler-trash size-4 mr-2"></div>
- Downgrade to Free Plan
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- )}
- </div>
- </CardContent>
-
- { getSubscription() && (
- <CardFooter class="border-t p-6">
- <span class="text-muted-foreground mr-2">
- Next billing date:
- </span>
- <span title={getSubscription()?.nextBillingDate.toLocaleString()}>
- { getSubscription()?.nextBillingDate.toLocaleDateString()}
- </span>
- </CardFooter>
- )}
-
- </Card>
-
- <div class="mt-4 grid grid-cols-1 gap-6 md:grid-cols-2">
-
- <Card>
- <CardContent class="p-6">
- <div class="text-muted-foreground mb-1">
- Renderings this month
- </div>
- <div class="flex items-baseline gap-2 mb-3">
- <div class="text-xl font-bold">
- { getSubscriptionQuota()?.renderingsCount}
- {' '}
- /
- {' '}
- { getSubscriptionQuota()?.maxRenderingsPerMonth}
- {' '}
- <span class="text-muted-foreground text-sm font-normal">
- renderings
- </span>
- </div>
- </div>
- <Progress value={getUsagePercentage()} />
- </CardContent>
- </Card>
-
- </div>
-
- <Show when={getInvoices().length > 0}>
- <InvoiceList invoices={getInvoices()} />
- </Show>
- </Suspense>
- </div>
- );
-}
diff --git a/apps/papra-client/src/routes.tsx b/apps/papra-client/src/routes.tsx
index 153e4dab..7800350f 100644
--- a/apps/papra-client/src/routes.tsx
+++ b/apps/papra-client/src/routes.tsx
@@ -12,8 +12,6 @@ import { fetchOrganizations } from './modules/organizations/organizations.servic
import { CreateFirstOrganizationPage } from './modules/organizations/pages/create-first-organization.page';
import { CreateOrganizationPage } from './modules/organizations/pages/create-organization.page';
import { OrganizationsPage } from './modules/organizations/pages/organizations.page';
-import { CheckoutCancelPage } from './modules/payments/pages/checkout-cancel.page';
-import { CheckoutSuccessPage } from './modules/payments/pages/checkout-success.page';
import { Button } from './modules/ui/components/button';
import { OrganizationLayout } from './modules/ui/layouts/organization.layout';
import { CurrentUserProvider, useCurrentUser } from './modules/users/composables/useCurrentUser';
@@ -95,35 +93,8 @@ export const routes: RouteDefinition[] = [
path: '/first',
component: CreateFirstOrganizationPage,
},
- // {
- // path: '/settings',
- // component: SettingsLayout,
- // children: [
- // {
- // path: '/',
- // component: () => <Navigate href="/settings/account" />,
- // },
- // {
- // path: '/account',
- // component: createProtectedPage({ authType: 'private', component: SettingsAccountPage }),
- // },
- // {
- // path: '/billing',
- // component: createProtectedPage({ authType: 'private', component: SettingsBillingPage }),
- // },
- // ],
- // },
],
},
-
- {
- path: '/checkout-success',
- component: createProtectedPage({ authType: 'private', component: CheckoutSuccessPage }),
- },
- {
- path: '/checkout-cancel',
- component: createProtectedPage({ authType: 'private', component: CheckoutCancelPage }),
- },
],
},
{
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5f6c20ec..4bb9559d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -76,9 +76,6 @@ importers:
lodash-es:
specifier: ^4.17.21
version: 4.17.21
- shiki:
- specifier: ^1.24.0
- version: 1.26.1
solid-js:
specifier: ^1.8.11
version: 1.9.3
@@ -100,9 +97,6 @@ importers:
valibot:
specifier: 1.0.0-beta.10
version: 1.0.0-beta.10([email protected])
- zod:
- specifier: ^3.23.8
- version: 3.24.1
devDependencies:
'@antfu/eslint-config':
specifier: 'catalog:'
@@ -1660,27 +1654,6 @@ packages:
cpu: [x64]
os: [win32]
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-yeo7sG+WZQblKPclUOKRPwkv1PyoHYkJ4gP9DzhFJbTdueKR7wYTI1vfF/bFi1NTgc545yG/DzvVhZgueVOXMA==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-CRhA0b8CaSLxS0E9A4Bzcb3LKBNpykfo9F85ozlNyArxjo2NkijtiwrJZ6eHa+NT5I9Kox2IXVdjUsP4dilsmw==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-oz/TQiIqZejEIZbGtn68hbJijAOTtYH4TMMSWkWYozwqdpKR3EXgILneQy26WItmJjp3xVspHdiUxUCws4gtuw==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-JDxVn+z+wgLCiUhBGx2OQrLCkKZQGzNH3nAxFir4PjUcYiyD8Jdms9izyxIogYmSwmoPTatFTdzyrRKbKlSfPA==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==}
-
- '@shikijs/[email protected]':
- resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==}
-
'@smithy/[email protected]':
resolution: {integrity: sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==}
engines: {node: '>=16.0.0'}
@@ -2029,9 +2002,6 @@ packages:
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
- '@types/[email protected]':
- resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
-
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
@@ -2109,9 +2079,6 @@ packages:
resolution: {integrity: sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@ungap/[email protected]':
- resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==}
-
'@unocss/[email protected]':
resolution: {integrity: sha512-R6/u5SwFz6ACd0FqcInMi0Cp+wH44rRKSim9f0/qipyWJ5Am84l+XcWYGBpiVImnj6U6GHv3Qo+/aKj0jHIonw==}
peerDependencies:
@@ -2404,12 +2371,6 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
-
- resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==}
-
resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==}
@@ -2459,9 +2420,6 @@ packages:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
- resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
-
resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==}
engines: {node: '>= 12.0.0'}
@@ -2673,9 +2631,6 @@ packages:
resolution: {integrity: sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==}
- resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==}
-
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -3075,12 +3030,6 @@ packages:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==}
-
- resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}
-
resolution: {integrity: sha512-OiQwvAOAaI2JrABBH69z5rsctHDzFzIKJge0nYXgtzGJ0KftwLWcBXm1upJC23/omNRtnqM0gjRMbtXshPdqhQ==}
engines: {node: '>=16.9.0'}
@@ -3095,9 +3044,6 @@ packages:
resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==}
- resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}
-
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
engines: {node: '>= 14'}
@@ -3342,9 +3288,6 @@ packages:
resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==}
- resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==}
-
resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==}
@@ -3521,9 +3464,6 @@ packages:
resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==}
- resolution: {integrity: sha512-zapyOUOCJxt+xhiNRPPMtfJkHGsZ98HHB9qJEkdT8BGytO/+kpe4m1Ngf0MzbzTmhacn11w9yGeDP6tzDhnCdg==}
-
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
@@ -3644,9 +3584,6 @@ packages:
resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==}
- resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
-
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -3681,15 +3618,6 @@ packages:
resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==}
-
- resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
-
- resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==}
-
resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
@@ -3781,9 +3709,6 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-Gqg6DSTk3wYqaZ5OaYtzjcdxcBvX5kCy24yvRJEgjT5U+WHlmqCThLuBUx0juyxQBi+6ug53IGeuQS07DWwpcw==}
-
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
@@ -3831,9 +3756,6 @@ packages:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
- resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
-
resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==}
@@ -3868,9 +3790,6 @@ packages:
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
- resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==}
-
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
@@ -3961,9 +3880,6 @@ packages:
resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==}
engines: {node: '>=18'}
- resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
-
resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==}
engines: {node: '>=16'}
@@ -4014,9 +3930,6 @@ packages:
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
- resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}
-
resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==}
@@ -4082,12 +3995,6 @@ packages:
resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==}
- resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
-
- resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
-
resolution: {integrity: sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -5833,41 +5740,6 @@ snapshots:
'@rollup/[email protected]':
optional: true
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/engine-javascript': 1.26.1
- '@shikijs/engine-oniguruma': 1.26.1
- '@shikijs/types': 1.26.1
- '@shikijs/vscode-textmate': 10.0.1
- '@types/hast': 3.0.4
- hast-util-to-html: 9.0.4
-
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/types': 1.26.1
- '@shikijs/vscode-textmate': 10.0.1
- oniguruma-to-es: 0.10.0
-
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/types': 1.26.1
- '@shikijs/vscode-textmate': 10.0.1
-
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/types': 1.26.1
-
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/types': 1.26.1
-
- '@shikijs/[email protected]':
- dependencies:
- '@shikijs/vscode-textmate': 10.0.1
- '@types/hast': 3.0.4
-
- '@shikijs/[email protected]': {}
-
'@smithy/[email protected]':
dependencies:
'@smithy/types': 3.7.2
@@ -6350,10 +6222,6 @@ snapshots:
'@types/[email protected]': {}
- '@types/[email protected]':
- dependencies:
- '@types/unist': 3.0.3
-
'@types/[email protected]': {}
@@ -6461,8 +6329,6 @@ snapshots:
'@typescript-eslint/types': 8.19.0
eslint-visitor-keys: 4.2.0
- '@ungap/[email protected]': {}
-
dependencies:
'@unocss/core': 0.65.0-beta.2
@@ -6871,10 +6737,6 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
-
-
@@ -6929,8 +6791,6 @@ snapshots:
dependencies:
delayed-stream: 1.0.0
-
@@ -7029,8 +6889,6 @@ snapshots:
-
@@ -7609,24 +7467,6 @@ snapshots:
dependencies:
function-bind: 1.1.2
- dependencies:
- '@types/hast': 3.0.4
- '@types/unist': 3.0.3
- ccount: 2.0.1
- comma-separated-tokens: 2.0.3
- hast-util-whitespace: 3.0.0
- html-void-elements: 3.0.0
- mdast-util-to-hast: 13.2.0
- property-information: 6.5.0
- space-separated-tokens: 2.0.2
- stringify-entities: 4.0.4
- zwitch: 2.0.4
-
- dependencies:
- '@types/hast': 3.0.4
-
@@ -7637,8 +7477,6 @@ snapshots:
-
dependencies:
agent-base: 7.1.3
@@ -7946,18 +7784,6 @@ snapshots:
'@types/mdast': 4.0.4
unist-util-is: 6.0.0
- dependencies:
- '@types/hast': 3.0.4
- '@types/mdast': 4.0.4
- '@ungap/structured-clone': 1.2.1
- devlop: 1.1.0
- micromark-util-sanitize-uri: 2.0.1
- trim-lines: 3.0.1
- unist-util-position: 5.0.0
- unist-util-visit: 5.0.0
- vfile: 6.0.3
-
dependencies:
'@types/mdast': 4.0.4
@@ -8244,12 +8070,6 @@ snapshots:
node-fetch-native: 1.6.4
ufo: 1.5.4
- dependencies:
- emoji-regex-xs: 1.0.0
- regex: 5.1.1
- regex-recursion: 5.1.1
-
dependencies:
deep-is: 0.1.4
@@ -8358,8 +8178,6 @@ snapshots:
-
@@ -8405,17 +8223,6 @@ snapshots:
dependencies:
'@eslint-community/regexpp': 4.12.1
- dependencies:
- regex: 5.1.1
- regex-utilities: 2.3.0
-
-
- dependencies:
- regex-utilities: 2.3.0
-
dependencies:
'@eslint-community/regexpp': 4.12.1
@@ -8506,17 +8313,6 @@ snapshots:
- dependencies:
- '@shikijs/core': 1.26.1
- '@shikijs/engine-javascript': 1.26.1
- '@shikijs/engine-oniguruma': 1.26.1
- '@shikijs/langs': 1.26.1
- '@shikijs/themes': 1.26.1
- '@shikijs/types': 1.26.1
- '@shikijs/vscode-textmate': 10.0.1
- '@types/hast': 3.0.4
-
@@ -8567,8 +8363,6 @@ snapshots:
-
dependencies:
spdx-expression-parse: 3.0.1
@@ -8609,11 +8403,6 @@ snapshots:
dependencies:
safe-buffer: 5.1.2
- dependencies:
- character-entities-html4: 2.1.0
- character-entities-legacy: 3.0.0
-
dependencies:
ansi-regex: 5.0.1
@@ -8686,8 +8475,6 @@ snapshots:
dependencies:
punycode: 2.3.1
-
dependencies:
typescript: 5.7.2
@@ -8731,10 +8518,6 @@ snapshots:
dependencies:
'@types/unist': 3.0.3
- dependencies:
- '@types/unist': 3.0.3
-
dependencies:
'@types/unist': 3.0.3
@@ -8813,16 +8596,6 @@ snapshots:
spdx-correct: 3.2.0
spdx-expression-parse: 3.0.1
- dependencies:
- '@types/unist': 3.0.3
- unist-util-stringify-position: 4.0.0
-
- dependencies:
- '@types/unist': 3.0.3
- vfile-message: 4.0.2
-
dependencies:
cac: 6.7.14