diff --git a/app/build.ts b/app/build.ts index 4d1480e..e931021 100644 --- a/app/build.ts +++ b/app/build.ts @@ -76,12 +76,7 @@ await tsup.build({ minify, sourcemap, watch, - entry: [ - "src/ui/index.ts", - "src/ui/client/index.ts", - "src/ui/main.css", - "src/ui/styles.css" - ], + entry: ["src/ui/index.ts", "src/ui/client/index.ts", "src/ui/main.css", "src/ui/styles.css"], outDir: "dist/ui", external: [ "bun:test", @@ -90,19 +85,21 @@ await tsup.build({ "react/jsx-runtime", "react/jsx-dev-runtime", "use-sync-external-store", - /codemirror/ + /codemirror/, + "@xyflow/react", + "@mantine/core" ], metafile: true, platform: "browser", format: ["esm"], - splitting: true, + splitting: false, + bundle: true, treeshake: true, loader: { ".svg": "dataurl" }, esbuildOptions: (options) => { options.logLevel = "silent"; - options.chunkNames = "chunks/[name]-[hash]"; }, onSuccess: async () => { delayTypes(); diff --git a/app/package.json b/app/package.json index 0bfda25..2da1a1a 100644 --- a/app/package.json +++ b/app/package.json @@ -49,7 +49,9 @@ "@uiw/react-codemirror": "^4.23.6", "@codemirror/lang-html": "^6.4.9", "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-liquid": "^6.2.1" + "@codemirror/lang-liquid": "^6.2.1", + "@xyflow/react": "^12.3.2", + "@mantine/core": "^7.13.4" }, "devDependencies": { "@aws-sdk/client-s3": "^3.613.0", @@ -60,7 +62,6 @@ "@hono/zod-validator": "^0.4.1", "@hookform/resolvers": "^3.9.1", "@libsql/kysely-libsql": "^0.4.1", - "@mantine/core": "^7.13.4", "@mantine/hooks": "^7.13.4", "@mantine/modals": "^7.13.4", "@mantine/notifications": "^7.13.5", @@ -71,7 +72,6 @@ "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.3", - "@xyflow/react": "^12.3.2", "autoprefixer": "^10.4.20", "clsx": "^2.1.1", "esbuild-postcss": "^0.0.4", diff --git a/app/src/auth/api/AuthApi.ts b/app/src/auth/api/AuthApi.ts index 869103c..d02a258 100644 --- a/app/src/auth/api/AuthApi.ts +++ b/app/src/auth/api/AuthApi.ts @@ -1,5 +1,5 @@ import type { AuthActionResponse } from "auth/api/AuthController"; -import type { AppAuthSchema, AppAuthStrategies } from "auth/auth-schema"; +import type { AppAuthSchema } from "auth/auth-schema"; import type { AuthResponse, SafeUser, Strategy } from "auth/authenticate/Authenticator"; import { type BaseModuleApiOptions, ModuleApi } from "modules/ModuleApi"; diff --git a/app/src/modules/ModuleApi.ts b/app/src/modules/ModuleApi.ts index 2bd7be8..882cb90 100644 --- a/app/src/modules/ModuleApi.ts +++ b/app/src/modules/ModuleApi.ts @@ -1,5 +1,6 @@ -import { type PrimaryFieldType, isDebug } from "core"; -import { encodeSearch } from "core/utils"; +import type { PrimaryFieldType } from "core"; +import { isDebug } from "core/env"; +import { encodeSearch } from "core/utils/reqres"; export type { PrimaryFieldType }; export type BaseModuleApiOptions = { diff --git a/app/src/ui/client/ClientProvider.tsx b/app/src/ui/client/ClientProvider.tsx index 3a81775..f456f94 100644 --- a/app/src/ui/client/ClientProvider.tsx +++ b/app/src/ui/client/ClientProvider.tsx @@ -1,5 +1,5 @@ import { Api, type ApiOptions, type TApiUser } from "Api"; -import { createContext, useContext, useEffect, useState } from "react"; +import { createContext, useContext } from "react"; const ClientContext = createContext<{ baseUrl: string; api: Api }>({ baseUrl: undefined diff --git a/app/src/ui/client/api/use-entity.ts b/app/src/ui/client/api/use-entity.ts index 85a44bb..483febf 100644 --- a/app/src/ui/client/api/use-entity.ts +++ b/app/src/ui/client/api/use-entity.ts @@ -1,6 +1,7 @@ import type { DB, PrimaryFieldType } from "core"; -import { encodeSearch, objectTransform } from "core/utils"; -import type { EntityData, RepoQuery, RepoQueryIn } from "data"; +import { objectTransform } from "core/utils/objects"; +import { encodeSearch } from "core/utils/reqres"; +import type { EntityData, RepoQueryIn } from "data"; import type { ModuleApi, ResponseObject } from "modules/ModuleApi"; import useSWR, { type SWRConfiguration, mutate } from "swr"; import { type Api, useApi } from "ui/client"; diff --git a/app/src/ui/client/schema/auth/use-auth.ts b/app/src/ui/client/schema/auth/use-auth.ts index 9ea39bf..b24f2ce 100644 --- a/app/src/ui/client/schema/auth/use-auth.ts +++ b/app/src/ui/client/schema/auth/use-auth.ts @@ -1,7 +1,6 @@ -import { Api, type AuthState } from "Api"; +import type { AuthState } from "Api"; import type { AuthResponse } from "auth"; -import type { AppAuthSchema } from "auth/auth-schema"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { useApi, useInvalidate } from "ui/client"; type LoginData = {