@windrun-huaiin/diaomao 16.0.0 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.local.txt CHANGED
@@ -6,14 +6,17 @@ NEXT_PUBLIC_GITHUB=https://github.com/caofanCPU/diaomao/
6
6
  NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/caofanCPU/diaomao/main
7
7
  NEXT_PUBLIC_STYLE_CDN_PROXY_URL=YOURS-
8
8
 
9
- ## https://supabase.com/docs/guides/database/connecting-to-postgres
10
- ## 直连模式supabase只支持ipv6;事务模式又不支持Prisma的预处理语句;所以必须降级为会话模式
11
- ## Project View -> Connect -> 查看连接方式以及限制
12
- # DATABASE_URL="postgresql://用户名.项目ID:[YOUR-PASSWORD]@服务厂商域名.pooler.supabase.com:5432/postgres?sslmode=require&schema=diaomao"
9
+ ## Project->Database->Settings->ResetPassword
10
+ #### 事务模式, 支持IPv4,并发性能好, 不支持Prisma预处理
11
+ ## DATABASE_URL="postgresql://postgres.项目ID:密码@服务厂商域名.pooler.supabase.com:6543/postgres?sslmode=require&schema=YOURS&pgbouncer=true"
12
+ #### 会话模式, 支持IPv4, 会占用链接,并发性能差一些,但是支持Prisma预处理
13
+ ## DATABASE_URL="postgresql://postgres.项目ID:密码@服务厂商域名.pooler.supabase.com:5432/postgres?sslmode=require&schema=YOURS"
13
14
 
15
+ #### DB Config, 本地pgsql数据库
16
+ ## DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/diaomao?schema=YOURS"
14
17
 
15
18
  # DB Config, replace YOUR port、db name、schema
16
- DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/postgres?schema=diaomao"
19
+ DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/postgres?schema=YOURS"
17
20
 
18
21
 
19
22
  # purple, orange, indigo, emerald, rose
@@ -49,6 +52,28 @@ NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
49
52
  # waitlist-url
50
53
  NEXT_PUBLIC_CLERK_WAITLIST_URL=/waitlist
51
54
 
55
+ ## OpenRouter·AI
56
+ NEXT_PUBLIC_APP_NAME="Diaomao"
57
+ OPENROUTER_TIMEOUT_SECONDS=240
58
+ ## OpenRouter KEY
59
+ OPENROUTER_API_KEY="XXXXXXXXXX"
60
+ ## Text2Text openai/gpt-5-nano,
61
+ NEXT_PUBLIC_OPENROUTER_MODEL_NAME="x-ai/grok-4.1-fast"
62
+ ## Multi-Chat slide window length(turns)
63
+ NEXT_PUBLIC_CHAT_CONTEXT_WINDOW_TURNS=6
64
+ NEXT_PUBLIC_OPENROUTER_DEBUG=true
65
+ ## Mock switch
66
+ OPENROUTER_ENABLE_MOCK=true
67
+ ## Mock Type, 0-Normal;1-Loading;2:TimeOut;3:PartTimeout;4PartAborted;5PartInterrupted
68
+ OPENROUTER_MOCK_TYPE=0
69
+
70
+ ## Loading time before show response content
71
+ OPENROUTER_MOCK_TIMEOUT_SECONDS=3
72
+ ## Stream mock delay(ms)
73
+ OPENROUTER_MOCK_STREAM_CHUNK_DELAY_MS=100
74
+ ## Stream mock slice words
75
+ OPENROUTER_MOCK_STREAM_CHUNK_SIZE=4
76
+
52
77
  # Enable Subscription Upgrade button
53
78
  ENABLE_STRIPE_SUBSCRIPTION_UPGRADE = true
54
79
  # Show Debug Status
@@ -118,3 +143,15 @@ STRIPE_ONE_TIME_MORE_AMOUNT=20
118
143
  STRIPE_ONE_TIME_MORE_CURRENCY=usd
119
144
  STRIPE_ONE_TIME_MORE_CREDITS=20
120
145
 
146
+
147
+ ## Upstash
148
+ # Upstash Redis Config
149
+ UPSTASH_REDIS_REST_URL="https://XXX.upstash.io"
150
+ UPSTASH_REDIS_REST_TOKEN="XXX"
151
+ # Upstash QStash Config
152
+ QSTASH_URL="https://XXX.upstash.io"
153
+ QSTASH_TOKEN="XXX"
154
+ QSTASH_CURRENT_SIGNING_KEY="XXX"
155
+ QSTASH_NEXT_SIGNING_KEY="XXX"
156
+
157
+ NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
package/.gitignore CHANGED
@@ -140,3 +140,6 @@ dist
140
140
 
141
141
 
142
142
  /generated/prisma
143
+ .gitnexus
144
+ AGENTS.md
145
+ CLAUDE.md
package/README.md CHANGED
@@ -1 +1,3 @@
1
- # TODO
1
+ # TODO
2
+
3
+ SATETY!
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "i18n": {
3
- "locales": ["en", "zh"],
3
+ "locales": ["en"],
4
4
  "defaultLocale": "en",
5
5
  "messageRoot": "messages"
6
6
  },
package/messages/en.json CHANGED
@@ -407,5 +407,76 @@
407
407
  "copyMarkdown": "Copy page as Markdown",
408
408
  "copyMarkdownDone": "Copied!",
409
409
  "editOnGithub": "Edit this page on GitHub"
410
+ },
411
+ "fingerprint": {
412
+ "panel": {
413
+ "toggleAriaLabel": "Fingerprint panel",
414
+ "title": "Fingerprint Panel",
415
+ "testModeLabel": "Test",
416
+ "closeAriaLabel": "Close fingerprint panel"
417
+ },
418
+ "sections": {
419
+ "user": "User",
420
+ "creditsInfo": "Credits Info",
421
+ "subscription": "Subscription",
422
+ "concurrentBaseInfo": "Concurrent Base Info"
423
+ },
424
+ "labels": {
425
+ "userId": "UserID",
426
+ "nickName": "NickName",
427
+ "fingerprintId": "FingerprintID",
428
+ "clerkUserId": "ClerkUserID",
429
+ "email": "Email",
430
+ "stripeCusId": "StripeCusID",
431
+ "createdAt": "CreatedAt",
432
+ "plan": "Plan",
433
+ "period": "Period",
434
+ "allocated": "Allocated",
435
+ "subId": "SubID",
436
+ "orderId": "OrderID",
437
+ "priceId": "PriceID",
438
+ "realBrowser": "Real Browser",
439
+ "testOverride": "Test Override"
440
+ },
441
+ "creditBuckets": {
442
+ "paid": "Paid",
443
+ "oneTimePaid": "OneTimePaid",
444
+ "free": "Free"
445
+ },
446
+ "placeholders": {
447
+ "subscriptionStatusNever": "Never",
448
+ "subscriptionPeriodUnavailable": "Unavailable",
449
+ "noCreditsYet": "No Credits Yet",
450
+ "noRecords": "No records",
451
+ "noTestExecutedYet": "No test executed yet.",
452
+ "none": "None",
453
+ "unknownError": "Unknown error"
454
+ },
455
+ "status": {
456
+ "pending": "pending",
457
+ "idle": "idle"
458
+ },
459
+ "actions": {
460
+ "frontendPreventionTest": "Frontend Prevention Test",
461
+ "backendIdempotencyTest": "Backend Idempotency Test",
462
+ "generateNewTestFingerprintAriaLabel": "Generate new test fingerprint",
463
+ "dismissErrorAriaLabel": "Dismiss error"
464
+ },
465
+ "messages": {
466
+ "testFingerprintNotReady": "Test fingerprint override is not ready yet.",
467
+ "runningFrontendPreventionTest": "Running Frontend Prevention Test with fingerprint: {fingerprintId}",
468
+ "frontendPreventionTestFinished": "Frontend Prevention Test finished. Active test fingerprint: {fingerprintId}",
469
+ "frontendPreventionTestFailed": "Frontend Prevention Test failed: {error}",
470
+ "failedToInitializeAnonymousUser": "Failed to initialize anonymous user",
471
+ "runningBackendIdempotencyTest": "Running Backend Idempotency Test with fingerprint: {fingerprintId}",
472
+ "backendIdempotencyTestDone": "Backend Idempotency Test done.",
473
+ "backendIdempotencyTestFailed": "Backend Idempotency Test failed: {error}",
474
+ "generatedTestFingerprintOverride": "Generated test fingerprint override: {fingerprintId}",
475
+ "createdCount": "created={count}",
476
+ "reusedCount": "reused={count}",
477
+ "failedCount": "failed={count}",
478
+ "createdUserIds": "createdUserIds=[{value}]",
479
+ "failedStatuses": "failedStatuses=[{value}]"
480
+ }
410
481
  }
411
482
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "16.0.0",
3
+ "version": "20.0.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,10 +27,10 @@
27
27
  "@radix-ui/react-slot": "^1.2.4",
28
28
  "@tailwindcss/typography": "^0.5.19",
29
29
  "@types/mdx": "^2.0.13",
30
- "@windrun-huaiin/backend-core": "15.1.0",
31
- "@windrun-huaiin/base-ui": "15.1.1",
32
- "@windrun-huaiin/lib": "15.1.1",
33
- "@windrun-huaiin/third-ui": "15.1.0",
30
+ "@windrun-huaiin/backend-core": "20.2.0",
31
+ "@windrun-huaiin/base-ui": "20.1.0",
32
+ "@windrun-huaiin/lib": "20.0.0",
33
+ "@windrun-huaiin/third-ui": "20.1.0",
34
34
  "autoprefixer": "^10.4.27",
35
35
  "class-variance-authority": "^0.7.1",
36
36
  "clsx": "^2.1.1",
@@ -56,7 +56,7 @@
56
56
  "remark-math": "^6.0.0",
57
57
  "remark-mdx": "^3.1.1",
58
58
  "shiki": "^4.0.0",
59
- "stripe": "20.0.0",
59
+ "stripe": "22.0.2",
60
60
  "svix": "^1.86.0",
61
61
  "swiper": "^12.1.2",
62
62
  "tailwind-merge": "^3.5.0",
@@ -75,7 +75,7 @@
75
75
  "@types/react": "^19.2.14",
76
76
  "@types/react-dom": "^19.2.3",
77
77
  "@typescript-eslint/parser": "^8.56.1",
78
- "@windrun-huaiin/dev-scripts": "^15.2.1",
78
+ "@windrun-huaiin/dev-scripts": "^20.0.1",
79
79
  "baseline-browser-mapping": "^2.10.0",
80
80
  "eslint": "^9.39.1",
81
81
  "eslint-config-next": "^16.1.6",
Binary file
@@ -1,5 +1,5 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
2
- stroke="#AC62FD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
2
+ stroke="#FF6600" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
3
3
  class="lucide lucide-bug-off-icon lucide-bug-off">
4
4
  <path d="M15 7.13V6a3 3 0 0 0-5.14-2.1L8 2" />
5
5
  <path d="M14.12 3.88 16 2" />
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  import { i18n } from '@/i18n';
2
2
  import { appConfig } from '@/lib/appConfig';
3
3
  import { SiteIcon } from '@/lib/site-config';
4
- import { globalLucideIcons as icons } from '@windrun-huaiin/base-ui/components/server';
4
+ import { BTCIcon, BugOffIcon } from '@windrun-huaiin/base-ui/icons';
5
5
  import { ClerkUser } from '@windrun-huaiin/third-ui/clerk/server';
6
6
  import { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
7
7
  import { getTranslations } from 'next-intl/server';
@@ -14,12 +14,12 @@ export async function homeNavLinks(locale: string): Promise<ExtendedLinkItem[]>
14
14
  const t1 = await getTranslations({ locale: locale, namespace: 'linkPreview' });
15
15
  return [
16
16
  {
17
- icon: <icons.BugOff />,
17
+ icon: <BugOffIcon />,
18
18
  text: t1('blog'),
19
19
  url: getAsNeededLocalizedUrl(locale, '/blog'),
20
20
  },
21
21
  {
22
- icon: <icons.BTC />,
22
+ icon: <BTCIcon />,
23
23
  text: t1('pricing'),
24
24
  url: getAsNeededLocalizedUrl(locale, '/pricing'),
25
25
  },
@@ -1,50 +1,45 @@
1
1
  import { getTranslations } from 'next-intl/server'
2
- import { globalLucideIcons as icons} from '@windrun-huaiin/base-ui/components/server'
3
- import { themeHeroEyesOnClass } from '@windrun-huaiin/base-ui/lib'
4
- import { cn } from "@windrun-huaiin/lib"
2
+ import { ZapIcon} from '@windrun-huaiin/base-ui/icons'
5
3
  import { GradientButton } from "@windrun-huaiin/third-ui/fuma/mdx"
6
- import { DelayedImg } from "@windrun-huaiin/third-ui/main"
4
+ import { HeroMedia, HeroSection } from "@windrun-huaiin/third-ui/main";
5
+ import { themeHeroEyesOnClass } from '@windrun-huaiin/base-ui/lib'
6
+ import { cn } from '@windrun-huaiin/lib/utils';
7
7
 
8
8
  export async function Hero({ locale }: { locale: string }) {
9
9
  const t = await getTranslations({ locale, namespace: 'hero' });
10
10
 
11
11
  return (
12
- <section className="mx-auto mt-12 flex max-w-6xl flex-col gap-10 px-6 py-8 md:min-w-[calc(100vw-22rem)] md:px-4 md:flex-row md:items-center md:gap-12">
13
- <div className="space-y-6 md:w-1/2">
14
- <h1 className="text-4xl md:text-6xl font-bold leading-tight">
15
- {t('mainTitle')}<br />{" "}
16
- <span className={cn("text-transparent bg-clip-text", themeHeroEyesOnClass)}>{t('mainEyesOn')}</span>
17
- </h1>
18
- <p className="text-lg text-gray-400 max-w-2xl">
19
- {t('description')}
20
- </p>
21
- <GradientButton
22
- title={t('button')}
23
- href="https://newspaper-template.org/"
24
- align="center"
25
- className="md:w-full"
26
- />
27
- <div className="flex items-center gap-2 text-sm text-gray-400">
28
- <icons.Zap className="h-4 w-4" />
29
- <span>{t('about')}</span>
30
- </div>
31
- </div>
32
- <div className="relative flex justify-center md:w-1/2 md:justify-end">
33
- <div className="w-full max-w-[500px]">
34
- <div className="group relative aspect-890/569 overflow-hidden rounded-lg shadow-purple-500/20">
35
- <DelayedImg
36
- src={t('heroImageUrl')}
37
- alt={t('heroImageAlt')}
38
- fill
39
- preload
40
- sizes="(max-width: 768px) 90vw, (max-width: 1200px) 45vw, 35vw"
41
- className="rounded-lg object-cover group-hover:scale-105"
42
- wrapperClassName="h-full w-full"
43
- placeholderClassName="rounded-lg"
44
- />
12
+ <HeroSection
13
+ content={
14
+ <>
15
+ <h1 className="text-4xl font-bold leading-tight md:text-6xl">
16
+ {t('mainTitle')}<br />{" "}
17
+ <span className={cn("bg-clip-text text-transparent", themeHeroEyesOnClass)}>{t('mainEyesOn')}</span>
18
+ </h1>
19
+ <p className="max-w-2xl text-lg text-gray-400">
20
+ {t('description')}
21
+ </p>
22
+ <GradientButton
23
+ title={t('button')}
24
+ href="https://d8ger.com/test/color"
25
+ align="center"
26
+ className="md:w-full"
27
+ />
28
+ <div className="flex items-center gap-2 text-sm text-gray-400">
29
+ <ZapIcon className="h-4 w-4" />
30
+ <span>{t('about')}</span>
45
31
  </div>
46
- </div>
47
- </div>
48
- </section>
32
+ </>
33
+ }
34
+ media={
35
+ <HeroMedia
36
+ src={t('heroImageUrl')}
37
+ alt={t('heroImageAlt')}
38
+ width={890}
39
+ height={569}
40
+ preload
41
+ />
42
+ }
43
+ />
49
44
  )
50
45
  }
@@ -18,30 +18,49 @@ import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
18
18
  import type { MDXComponents, MDXProps } from "mdx/types";
19
19
  import { TypeTable } from "fumadocs-ui/components/type-table";
20
20
 
21
- import { globalLucideIcons as icons } from "@windrun-huaiin/base-ui/components/server";
22
21
  import { appConfig } from "@/lib/appConfig";
23
22
 
23
+ import {
24
+ CSSIcon,
25
+ CSVIcon,
26
+ DiffIcon,
27
+ HtmlIcon,
28
+ HttpIcon,
29
+ JavaIcon,
30
+ JsonIcon,
31
+ LogIcon,
32
+ MDXIcon,
33
+ RegexIcon,
34
+ SQLIcon,
35
+ SchemeIcon,
36
+ SquareDashedBottomCodeIcon,
37
+ TxtIcon,
38
+ XMLIcon,
39
+ YamlIcon,
40
+ globalLucideIcons
41
+ } from "@windrun-huaiin/base-ui/icons";
42
+
24
43
  // create a mapping from language identifier to icon component
25
44
  const languageToIconMap: Record<string, React.ReactNode> = {
26
- css: <icons.CSS />,
27
- csv: <icons.CSV />,
28
- diff: <icons.Diff />,
29
- html: <icons.Html />,
30
- http: <icons.Http />,
31
- java: <icons.Java />,
32
- json: <icons.Json />,
33
- jsonc: <icons.SquareDashedBottomCode />,
34
- log: <icons.Log />,
35
- mdx: <icons.MDX />,
36
- regex: <icons.Regex />,
37
- sql: <icons.SQL />,
38
- text: <icons.Txt />,
39
- txt: <icons.Txt />,
40
- plaintext: <icons.Txt />,
41
- scheme: <icons.Scheme />,
42
- xml: <icons.XML />,
43
- yaml: <icons.Yaml />,
44
- yml: <icons.Yaml />,
45
+ css: <CSSIcon />,
46
+ csv: <CSVIcon />,
47
+ diff: <DiffIcon />,
48
+ html: <HtmlIcon />,
49
+ http: <HttpIcon />,
50
+ java: <JavaIcon />,
51
+ json: <JsonIcon />,
52
+ jsonc: <SquareDashedBottomCodeIcon />,
53
+ log: <LogIcon />,
54
+ mdx: <MDXIcon />,
55
+ regex: <RegexIcon />,
56
+ sql: <SQLIcon />,
57
+ text: <TxtIcon />,
58
+ txt: <TxtIcon />,
59
+ plaintext: <TxtIcon />,
60
+ scheme: <SchemeIcon />,
61
+ xml: <XMLIcon />,
62
+ yaml: <YamlIcon />,
63
+ yml: <YamlIcon />,
45
64
  };
46
65
 
47
66
  // used in source.config.ts custom transformer:parse-code-language, used together
@@ -140,7 +159,7 @@ export function getMDXComponents(
140
159
  ...fumadocsUiComponents,
141
160
  ...customUiComponents,
142
161
  // use icons from the project's unified icon library
143
- ...icons,
162
+ ...globalLucideIcons,
144
163
  ...components,
145
164
  };
146
165
  }
@@ -2,7 +2,7 @@
2
2
  title: Blog
3
3
  description: Articles and thoughts about various topics.
4
4
  icon: Rss
5
- date: 2026-04-11
5
+ date: 2026-04-21
6
6
  ---
7
7
 
8
8
  ## Past List
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Monthly Summary
3
3
  description: Index and Summary
4
- date: 2026-04-11
4
+ date: 2026-04-21
5
5
  ---
6
6
 
7
7