mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-11-24 16:06:55 +00:00
* feat(ui): add codex extra limits, key last used, and admin audit surfaces - codex usage dialog: render `additional_rate_limits` with `RateLimitGroupSection` and typed base/secondary window data. - api keys table: add "Last Used" column from `accessed_time`. - usage log details: show top-up audit and manage operator for admins; extend `LogOtherData` audit fields; broaden IP display; warn when legacy records lack audit data. - billing history: show user id badge for admins; add zh i18n for new strings. * feat(web): add dynamic pricing breakdown and Waffo Pancake payments - add billing-expr parsing and DynamicPricingBreakdown; surface tiered_expr in model list/details. - extend PricingModel with billing_mode, billing_expr, and pricing_version for backend parity. - add Waffo Pancake integration settings, amount/pay APIs, hook, and recharge flow wiring. - update payment confirm/recharge UI and Chinese locale strings. * feat(pricing): add tiered billing editor and tool price settings - introduce tier-expr and extend billing-expr (time/param conditions, combine/split helpers, editor utilities) for visual tiers and request rules. - support tiered_expr in model ratio dialog, form, and visual editor with billing_setting fields and default JSON placeholders. - add TieredPricingEditor and tool price settings UI plus i18n updates. * chore(web): bump rsbuild to v2 and align build config - upgrade @rsbuild/core, @rsbuild/plugin-react, and Rspack 2 transitives; bump TanStack Router packages and refresh bun.lock. - replace deprecated performance.chunkSplit with top-level splitChunks cache groups for react, radix, and tanstack vendors. - factor dev server proxy into devProxy; set legalComments to none in prod; enable performance.buildCache keyed by VITE_REACT_APP_VERSION. - TanStack Router plugin: enable autoCodeSplitting only in production for faster dev navigation and HMR. * fix(i18n): update translations for API keys and Waffo Pancake settings - Corrected translations for "API Private Key" and "Merchant ID is required" across multiple languages. - Added new translation for "Configure Waffo Pancake hosted checkout integration for USD-priced top-ups." - Updated various existing translations to ensure consistency and clarity in user interface text. * refactor(code-block): simplify code highlighting and improve theme handling - Updated the highlightCode function to support dual themes in a single call, reducing complexity. - Removed unnecessary state management for dark theme HTML, streamlining the component. - Enhanced CSS for Shiki themes to ensure proper token color application in dark mode. * refactor(wallet): use isWaffoPancakePayment for pancake payment dispatch - replace the waffo_pancake string literal with the shared helper for consistency with use-payment and PAYMENT_TYPES. - centralize the value so a constant change does not require hunting for typos in multiple call sites. * fix(wallet): validate waffo pancake checkout url and safe open - allow only parseable http/https redirect targets from the backend, rejecting dangerous schemes. - pass noopener and noreferrer in window.open to reduce reverse tabnabbing. - show a toast and abort on invalid URLs; add i18n entries across locales. * fix(wallet): harden payment icon image URLs - add normalizeHttpIconUrl to allow only http(s) after resolution and reject userinfo in URLs. - set referrerPolicy, lazy loading, and async decode on the icon <img> to cut referrer leakage. - fall back to built-in icons on invalid URLs, same as when iconUrl is missing. * fix(pricing): label param() conditions as body param in dynamic pricing - non-header request rules map to `param()`, not query strings. - align with tiered pricing editor by using the existing `Body param` string. * fix(rsbuild): update legalComments handling in build config - Rely on Rsbuild's default legalComments setting in all modes to ensure compliance with open-source licensing requirements. - Clarified comments to explain the implications of omitting legalComments in production. * fix(i18n): correct billing and codex UI strings in locale files - restore ~83 en.json values to English (tool pricing, audit text, alipay label, etc.). - add proper fr/ru/vi/ja strings so those locales no longer copy zh. - change five locale files only; zh.json unchanged. * fix(i18n): update locale files for improved translations and sync report - Added missing translations and corrected existing strings in English, French, Japanese, Russian, Vietnamese, and Chinese locale files. - Updated the sync report to reflect zero missing translations across multiple locales. - Enhanced the untranslated count for Japanese locale to ensure completeness. - Changed the base locale from zh.json to en.json for better alignment.
114 lines
3.6 KiB
JSON
Vendored
114 lines
3.6 KiB
JSON
Vendored
{
|
|
"name": "newapi-web",
|
|
"private": false,
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "rsbuild dev",
|
|
"build": "rsbuild build",
|
|
"build:check": "tsc -b && rsbuild build",
|
|
"typecheck": "tsc -b",
|
|
"lint": "eslint .",
|
|
"preview": "rsbuild preview",
|
|
"format:check": "prettier --check .",
|
|
"format": "prettier --write .",
|
|
"i18n:sync": "node scripts/sync-i18n.mjs",
|
|
"knip": "knip"
|
|
},
|
|
"dependencies": {
|
|
"@fontsource-variable/public-sans": "^5.2.7",
|
|
"@hookform/resolvers": "^5.2.2",
|
|
"@lobehub/icons": "^4.0.3",
|
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-direction": "^1.1.1",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
"@radix-ui/react-icons": "^1.3.2",
|
|
"@radix-ui/react-label": "^2.1.8",
|
|
"@radix-ui/react-popover": "^1.1.15",
|
|
"@radix-ui/react-progress": "^1.1.8",
|
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@radix-ui/react-switch": "^1.2.6",
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
"@tailwindcss/postcss": "^4.2.2",
|
|
"@tanstack/react-query": "^5.95.2",
|
|
"@tanstack/react-router": "^1.168.23",
|
|
"@tanstack/react-table": "^8.21.3",
|
|
"@tanstack/react-virtual": "^3.13.18",
|
|
"@visactor/react-vchart": "^2.0.13",
|
|
"@visactor/vchart": "^2.0.13",
|
|
"ai": "^6.0.27",
|
|
"auto-skeleton-react": "^1.0.5",
|
|
"axios": "^1.13.6",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"dayjs": "^1.11.19",
|
|
"i18next": "^25.7.4",
|
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
"input-otp": "^1.4.2",
|
|
"lucide-react": "^1.7.0",
|
|
"motion": "^12.38.0",
|
|
"nanoid": "^5.1.6",
|
|
"qrcode.react": "^4.2.0",
|
|
"react": "^19.2.4",
|
|
"react-day-picker": "^9.14.0",
|
|
"react-dom": "^19.2.4",
|
|
"react-hook-form": "^7.71.0",
|
|
"react-i18next": "^16.5.2",
|
|
"react-icons": "^5.5.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-top-loading-bar": "^3.0.2",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"shiki": "^4.0.2",
|
|
"sonner": "^2.0.7",
|
|
"sse.js": "^2.7.2",
|
|
"streamdown": "^2.0.1",
|
|
"tailwind-merge": "^3.5.0",
|
|
"tailwindcss": "^4.2.2",
|
|
"tokenlens": "^1.3.1",
|
|
"tw-animate-css": "^1.4.0",
|
|
"use-stick-to-bottom": "^1.1.1",
|
|
"vaul": "^1.1.2",
|
|
"zod": "^4.3.6",
|
|
"zustand": "^5.0.12"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@rsbuild/core": "^2.0.1",
|
|
"@rsbuild/plugin-react": "^2.0.0",
|
|
"@tanstack/eslint-plugin-query": "^5.95.2",
|
|
"@tanstack/react-query-devtools": "^5.95.2",
|
|
"@tanstack/react-router-devtools": "^1.166.13",
|
|
"@tanstack/router-plugin": "^1.167.23",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"@types/node": "^25.5.0",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@xyflow/react": "^12.10.2",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"eslint": "^10.1.0",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"globals": "^17.4.0",
|
|
"knip": "^6.0.6",
|
|
"prettier": "^3.8.1",
|
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
"shadcn": "^3.7.0",
|
|
"typescript": "~5.9.3",
|
|
"typescript-eslint": "^8.57.2"
|
|
}
|
|
}
|