This commit is contained in:
David Nguyen
2025-02-05 01:29:26 +11:00
parent f4b2f8614e
commit 6b4c33a1bf
67 changed files with 31 additions and 156 deletions

View File

@ -1,5 +1,3 @@
'use client';
import { Trans, msg } from '@lingui/macro';
import { useLingui } from '@lingui/react';
import { DownloadIcon } from 'lucide-react';

View File

@ -1,5 +1,3 @@
'use client';
import { useMemo } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import { useMemo } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import { Trans, msg } from '@lingui/macro';
import { useLingui } from '@lingui/react';
import { Edit, Loader, Mail, MoreHorizontal, X } from 'lucide-react';

View File

@ -3,7 +3,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "cross-env NODE_ENV=production react-router build",
"build": "cross-env NODE_ENV=production bunx --bun vite build",
"dev": "bunx --bun vite",
"dev:node": "react-router dev",
"start": "cross-env NODE_ENV=production node dist/server/index.js",
@ -12,6 +12,15 @@
"copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs"
},
"dependencies": {
"@documenso/auth": "*",
"@documenso/api": "*",
"@documenso/assets": "*",
"@documenso/ee": "*",
"@documenso/lib": "*",
"@documenso/prisma": "*",
"@documenso/trpc": "*",
"@documenso/ui": "*",
"@documenso/tailwind-config": "*",
"@epic-web/remember": "^1.1.0",
"@hono/node-server": "^1.13.7",
"@hono/trpc-server": "^0.3.4",

View File

@ -1,4 +1,3 @@
// server/index.ts
import { Hono } from 'hono';
import { PDFDocument } from 'pdf-lib';

View File

@ -10,17 +10,7 @@
"rootDirs": [".", "./.react-router/types"],
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"],
// Todo fix this stuff
"@documenso/api": ["../../packages/api"],
"@documenso/assets": ["../../packages/assets"],
"@documenso/auth": ["../../packages/auth"],
"@documenso/ee": ["../../packages/ee"],
"@documenso/lib": ["../../packages/lib"],
"@documenso/prisma": ["../../packages/prisma"],
"@documenso/trpc": ["../../packages/trpc"],
"@documenso/ui": ["../../packages/ui"],
"@documenso/tailwind-config": ["../../packages/tailwind-config"]
"~/*": ["./app/*"]
},
"esModuleInterop": true,
"verbatimModuleSyntax": true,

View File

@ -54,23 +54,14 @@ export default defineConfig({
],
optimizeDeps: {
exclude: ['superjson'],
force: true,
// force: true,
},
build: {
commonjsOptions: {
include: ['superjson'],
},
rollupOptions: {
external: ['@node-rs/bcrypt'],
},
},
// optimizeDeps: {
// exclude: [
// '@node-rs/bcrypt-wasm32-wasi',
// '@noble/ciphers/chacha',
// '@noble/ciphers/utils',
// '@noble/ciphers/webcrypto/utils',
// '@noble/hashes/sha256a',
// 'crypto',
// '@node-rs/bcrypt',
// ], // Todo: Probably remove.
// force: true,
// },
});

9
package-lock.json generated
View File

@ -108,6 +108,15 @@
"apps/remix": {
"name": "@documenso/remix",
"dependencies": {
"@documenso/api": "*",
"@documenso/assets": "*",
"@documenso/auth": "*",
"@documenso/ee": "*",
"@documenso/lib": "*",
"@documenso/prisma": "*",
"@documenso/tailwind-config": "*",
"@documenso/trpc": "*",
"@documenso/ui": "*",
"@epic-web/remember": "^1.1.0",
"@hono/node-server": "^1.13.7",
"@hono/trpc-server": "^0.3.4",

View File

@ -1,5 +1,3 @@
'use client';
import { createContext, useContext } from 'react';
type BrandingContextValue = {

View File

@ -1,5 +1,3 @@
'use client';
import { useCallback } from 'react';
import { getBoundingClientRect } from '@documenso/lib/client-only/get-bounding-client-rect';

View File

@ -1,5 +1,3 @@
'use client';
import { createContext, useCallback, useContext, useEffect, useState } from 'react';
import {
@ -9,7 +7,7 @@ import {
} from '@documenso/lib/constants/feature-flags';
import { getAllFlags } from '@documenso/lib/universal/get-feature-flag';
import { TFeatureFlagValue } from './feature-flag.types';
import type { TFeatureFlagValue } from './feature-flag.types';
export type FeatureFlagContextValue = {
getFlag: (_key: string) => TFeatureFlagValue;

View File

@ -1,5 +1,3 @@
'use client';
import { useState } from 'react';
import { type Messages, setupI18n } from '@lingui/core';

View File

@ -1,5 +1,3 @@
'use server';
import type { DocumentDataType } from '@prisma/client';
import { prisma } from '@documenso/prisma';

View File

@ -1,5 +1,3 @@
'use client';
import { motion } from 'framer-motion';
type AnimateGenericFadeInOutProps = {

View File

@ -1,5 +1,3 @@
'use client';
import { useState } from 'react';
import { motion } from 'framer-motion';

View File

@ -1,5 +1,3 @@
'use client';
import React, { forwardRef } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import React, { forwardRef } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import React from 'react';
import { Trans } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import type { HTMLAttributes } from 'react';
import React, { useState } from 'react';

View File

@ -1,5 +1,3 @@
'use client';
import React, { useEffect, useMemo, useState } from 'react';
import type { Field } from '@prisma/client';

View File

@ -1,5 +1,3 @@
'use client';
import React from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import React, { forwardRef } from 'react';
import { Trans } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as AccordionPrimitive from '@radix-ui/react-accordion';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';

View File

@ -1,5 +1,3 @@
'use client';
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
const AspectRatio = AspectRatioPrimitive.Root;

View File

@ -1,5 +1,3 @@
'use client';
import { useLayoutEffect, useRef } from 'react';
import { cn } from '../lib/utils';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as AvatarPrimitive from '@radix-ui/react-avatar';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import { ChevronLeft, ChevronRight } from 'lucide-react';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import { motion, useMotionTemplate, useMotionValue } from 'framer-motion';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';

View File

@ -1,5 +1,3 @@
'use client';
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
const Collapsible = CollapsiblePrimitive.Root;

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import type { DialogProps } from '@radix-ui/react-dialog';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';

View File

@ -1,5 +1,3 @@
'use client';
import React, { useMemo } from 'react';
import { Trans } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as DialogPrimitive from '@radix-ui/react-dialog';

View File

@ -1,5 +1,3 @@
'use client';
import { useEffect } from 'react';
import { zodResolver } from '@hookform/resolvers/zod';

View File

@ -1,5 +1,3 @@
'use client';
import { zodResolver } from '@hookform/resolvers/zod';
import { Trans, msg } from '@lingui/macro';
import { useLingui } from '@lingui/react';

View File

@ -1,5 +1,3 @@
'use client';
import type { HTMLAttributes } from 'react';
import React from 'react';

View File

@ -1,5 +1,3 @@
'use client';
import { forwardRef, useEffect, useState } from 'react';
import type { MessageDescriptor } from '@lingui/core';

View File

@ -1,5 +1,3 @@
'use client';
import { useEffect, useState } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import { useEffect, useState } from 'react';
import { Trans, msg } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import { useState } from 'react';
import { Trans, msg } from '@lingui/macro';
@ -38,12 +36,12 @@ export const NumberFieldAdvancedSettings = ({
const [showValidation, setShowValidation] = useState(false);
const handleInput = (field: keyof NumberFieldMeta, value: string | boolean) => {
const userValue = field === 'value' ? value : fieldState.value ?? 0;
const userValue = field === 'value' ? value : (fieldState.value ?? 0);
const userMinValue = field === 'minValue' ? Number(value) : Number(fieldState.minValue ?? 0);
const userMaxValue = field === 'maxValue' ? Number(value) : Number(fieldState.maxValue ?? 0);
const readOnly = field === 'readOnly' ? Boolean(value) : Boolean(fieldState.readOnly);
const required = field === 'required' ? Boolean(value) : Boolean(fieldState.required);
const numberFormat = field === 'numberFormat' ? String(value) : fieldState.numberFormat ?? '';
const numberFormat = field === 'numberFormat' ? String(value) : (fieldState.numberFormat ?? '');
const fontSize = field === 'fontSize' ? Number(value) : Number(fieldState.fontSize ?? 14);
const valueErrors = validateNumberField(String(userValue), {

View File

@ -1,5 +1,3 @@
'use client';
import { useEffect, useState } from 'react';
import { Trans } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import { Trans } from '@lingui/macro';
import { DialogClose } from '@radix-ui/react-dialog';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';

View File

@ -1,5 +1,3 @@
'use client';
import React, { useEffect, useState } from 'react';
export type ElementVisibleProps = {

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';

View File

@ -1,9 +1,8 @@
'use client';
import * as React from 'react';
import * as LabelPrimitive from '@radix-ui/react-label';
import { VariantProps, cva } from 'class-variance-authority';
import type { VariantProps } from 'class-variance-authority';
import { cva } from 'class-variance-authority';
import { cn } from '../lib/utils';

View File

@ -1,5 +1,3 @@
'use client';
import dynamic from 'next/dynamic';
import { Trans } from '@lingui/macro';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as MenubarPrimitive from '@radix-ui/react-menubar';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import type { MessageDescriptor } from '@lingui/core';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import { OTPInput, OTPInputContext } from 'input-otp';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as PopoverPrimitive from '@radix-ui/react-popover';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as ProgressPrimitive from '@radix-ui/react-progress';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as SelectPrimitive from '@radix-ui/react-select';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as SeparatorPrimitive from '@radix-ui/react-separator';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as SheetPrimitive from '@radix-ui/react-dialog';

View File

@ -1,5 +1,3 @@
'use client';
import type { HTMLAttributes, MouseEvent, PointerEvent, TouchEvent } from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as SliderPrimitive from '@radix-ui/react-slider';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as TabsPrimitive from '@radix-ui/react-tabs';

View File

@ -1,5 +1,3 @@
'use client';
import { useEffect } from 'react';
import { zodResolver } from '@hookform/resolvers/zod';

View File

@ -1,5 +1,3 @@
'use client';
import {
Toast,
ToastClose,

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as TogglePrimitive from '@radix-ui/react-toggle';

View File

@ -1,5 +1,3 @@
'use client';
import * as React from 'react';
import * as TooltipPrimitive from '@radix-ui/react-tooltip';