Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [main]
pull_request:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: yarn

- run: yarn install --immutable

- name: Typecheck
run: yarn typecheck

- name: Lint
run: yarn lint

- name: Build
run: yarn build

- name: Verify Tailwind output
run: |
if grep -l "@tailwind" .next/static/css/*.css; then
echo "Tailwind directives were not processed"
exit 1
fi
grep -q "\.flex{" .next/static/css/*.css
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# dependencies
node_modules
.pnp
.pnp.js
yarn.lock
.yarnrc.yml
.pnp.*
.yarn/
package-lock.json
pnpm-lock.yaml

# testing
coverage
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ This project focuses on:
## 🛠️ Getting Started

```bash
pnpm install
pnpm dev
yarn install
yarn dev
```

---
Expand Down
4 changes: 2 additions & 2 deletions components/editor/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,5 @@ export const IDB_VERSION = 1

export const INFERENCE_SIZE = 1024

export const WASM_CDN_BASE =
"https://cdn.jsdelivr.net/npm/onnxruntime-web@1.24.3/dist/"
export const getWasmCdnBase = (version: string) =>
`https://cdn.jsdelivr.net/npm/onnxruntime-web@${version}/dist/`
6 changes: 4 additions & 2 deletions components/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
MODELS,
TOOL_ACCENTS,
UPSCALER_MODELS,
WASM_CDN_BASE,
getWasmCdnBase,
} from "./constants"
import { useImageQueue } from "./hooks/use-image-queue"
import { useOnnxSession } from "./hooks/use-onnx-session"
Expand Down Expand Up @@ -73,7 +73,9 @@ export const Editor = ({ initialTool = "remover" }: EditorProps) => {
import("onnxruntime-web").then((ort) => {
if (!mounted) return

ort.env.wasm.wasmPaths = WASM_CDN_BASE
ort.env.wasm.wasmPaths = getWasmCdnBase(
ort.env.versions.web ?? ort.env.versions.common
)
ort.env.wasm.numThreads = 1

ortRef.current = ort
Expand Down
6 changes: 4 additions & 2 deletions components/theme-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"use client"

import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
import { type ThemeProviderProps } from "next-themes/dist/types"
import {
ThemeProvider as NextThemesProvider,
type ThemeProviderProps,
} from "next-themes"

export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
Expand Down
40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import nextCoreWebVitals from "eslint-config-next/core-web-vitals"
import prettier from "eslint-config-prettier/flat"
import tailwind from "eslint-plugin-tailwindcss"

const config = [
{
ignores: [
".next/**",
"node_modules/**",
"public/**",
"dist/**",
".cache/**",
"**/*.esm.js",
"next-env.d.ts",
],
},
...nextCoreWebVitals,
...tailwind.configs["flat/recommended"],
{
settings: {
tailwindcss: {
callees: ["cn"],
config: "tailwind.config.js",
},
},
rules: {
"@next/next/no-html-link-for-pages": "off",
"react/jsx-key": "off",
"tailwindcss/no-custom-classname": "off",
"@next/next/no-sync-scripts": "warn",
"react-hooks/immutability": "warn",
"react-hooks/purity": "warn",
"react-hooks/refs": "warn",
"react-hooks/set-state-in-effect": "warn",
},
},
prettier,
]

export default config
40 changes: 11 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
"dev": "next dev",
"build": "next build --webpack",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "next build && next start",
"typecheck": "tsc --noEmit",
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache"
},
"dependencies": {
"@daybrush/utils": "^1.13.0",
"@midudev/tailwind-animations": "^0.0.7",
"@next/third-parties": "16.2.0",
"@prisma/client": "^6.4.1",
"@next/third-parties": "16.3.6",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.1.2",
Expand All @@ -29,58 +27,42 @@
"@radix-ui/react-slider": "^1.2.1",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tooltip": "^1.1.4",
"@serwist/next": "^9.5.7",
"@vercel/analytics": "^2.0.1",
"@vercel/speed-insights": "^2.0.0",
"cheerio": "^1.0.0-rc.12",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"embla-carousel-react": "^8.0.0",
"framer-motion": "^11.0.28",
"framework-utils": "^1.1.0",
"html2canvas": "^1.4.1",
"image-resize-compress": "^2.1.1",
"lucide-react": "^0.456.0",
"luxon": "^3.4.4",
"next": "16.2.3",
"next-themes": "^0.3.0",
"onnxruntime-web": "^1.24.3",
"next": "16.3.6",
"next-themes": "^0.4.6",
"onnxruntime-web": "1.24.3",
"react": "19.2.4",
"react-compare-slider": "^3.1.0",
"react-dom": "19.2.4",
"react-dropzone": "^14.2.3",
"react-dust-effect": "^0.0.7",
"react-infinite-viewer": "^0.28.1",
"react-markdown": "^10.1.0",
"sharp": "^0.32.6",
"simple-background-remover": "^1.0.5",
"sonner": "^1.4.41",
"tailwind-merge": "^1.13.2",
"tailwindcss-animate": "^1.0.6"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@serwist/turbopack": "^9.5.7",
"@types/cheerio": "^0.22.35",
"@types/luxon": "^3.4.2",
"@types/node": "^17.0.45",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"@typescript-eslint/parser": "^5.61.0",
"autoprefixer": "^10.4.14",
"esbuild": "^0.28.0",
"eslint": "^8.44.0",
"eslint-config-next": "16.2.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint": "^9.39.5",
"eslint-config-next": "16.3.6",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-tailwindcss": "~3.17.5",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"serwist": "^9.5.7",
"tailwindcss": "^3.3.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.3",
"webpack": "^5.91.0"
"typescript": "^5.4.3"
},
"packageManager": "yarn@4.7.0",
"resolutions": {
Expand Down
Loading
Loading