@windrun-huaiin/diaomao 20.0.0 → 26.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/.changeset/config.json +4 -1
- package/.env.local.txt +121 -81
- package/.gitignore +3 -0
- package/dev-scripts.config.json +3 -4
- package/eslint.config.js +0 -1
- package/messages/en.json +3 -3
- package/next.config.ts +4 -17
- package/package.json +10 -11
- package/public/banner.webp +0 -0
- package/src/app/[locale]/(clerk)/layout.tsx +23 -29
- package/src/app/[locale]/(clerk)/sign-in/[[...sign-in]]/page.tsx +0 -9
- package/src/app/[locale]/(clerk)/sign-up/[[...sign-up]]/page.tsx +0 -9
- package/src/app/[locale]/(clerk)/waitlist/[[...waitlist]]/page.tsx +0 -9
- package/src/app/[locale]/(content)/blog/[[...slug]]/page.tsx +4 -3
- package/src/app/[locale]/(content)/blog/layout.tsx +2 -1
- package/src/app/[locale]/(content)/layout.tsx +20 -18
- package/src/app/[locale]/(home)/[...catchAll]/page.tsx +0 -9
- package/src/app/[locale]/(home)/layout.tsx +19 -14
- package/src/app/[locale]/(home)/legal/[[...slug]]/page.tsx +4 -3
- package/src/app/[locale]/(home)/legal/layout.tsx +2 -1
- package/src/app/[locale]/layout.config.tsx +105 -38
- package/src/app/[locale]/layout.tsx +22 -36
- package/src/app/api/blog/llm-content/route.ts +2 -1
- package/src/app/api/legal/llm-content/route.ts +2 -1
- package/src/components/mdx-components.tsx +31 -164
- package/src/i18n.ts +2 -2
- package/src/lib/appConfig.ts +2 -10
- package/src/lib/content-source.ts +42 -0
- package/src/mdx/blog/index.mdx +3 -3
- package/src/mdx/blog/ioc.mdx +3 -3
- package/src/mdx/blog/readme.mdx +24 -36
- package/tsconfig.json +0 -3
- package/source.config.ts +0 -94
- package/src/lib/source-blog.ts +0 -11
- package/src/lib/source-legal.ts +0 -11
package/.changeset/config.json
CHANGED
package/.env.local.txt
CHANGED
|
@@ -1,72 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
##===============================##
|
|
2
|
+
## 👁️🌐Public Config👁️🌐 ##
|
|
3
|
+
## - NON Key, Token, Secret, Pem. ##
|
|
4
|
+
## - public url, api, id ##
|
|
5
|
+
## - public ui control and switch ##
|
|
6
|
+
## - public third-party config ##
|
|
7
|
+
##===============================##
|
|
8
|
+
|
|
9
|
+
## Website
|
|
10
|
+
NEXT_PUBLIC_APP_NAME="YOURS_app_name"
|
|
2
11
|
NEXT_PUBLIC_BASE_URL=http://localhost:3000
|
|
12
|
+
# NEXT_PUBLIC_I18N_LOCALE_PREFIX_AS_NEEDED=false
|
|
3
13
|
|
|
4
|
-
|
|
5
|
-
NEXT_PUBLIC_GITHUB=https://github.com/
|
|
6
|
-
NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/
|
|
7
|
-
NEXT_PUBLIC_STYLE_CDN_PROXY_URL=YOURS-
|
|
14
|
+
## Github
|
|
15
|
+
NEXT_PUBLIC_GITHUB=https://github.com/YOURS_/YOURS_/
|
|
16
|
+
NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/YOURS_/YOURS_/main
|
|
8
17
|
|
|
9
|
-
##
|
|
10
|
-
|
|
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"
|
|
14
|
-
|
|
15
|
-
#### DB Config, 本地pgsql数据库
|
|
16
|
-
## DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/diaomao?schema=YOURS"
|
|
17
|
-
|
|
18
|
-
# DB Config, replace YOUR port、db name、schema
|
|
19
|
-
DATABASE_URL="postgresql://postgres:PASSWORD@localhost:5432/postgres?schema=YOURS"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# purple, orange, indigo, emerald, rose
|
|
18
|
+
## Website Theme Color config
|
|
19
|
+
## purple:#AC62FD , orange:#F97316, indigo:#6366F1, emerald:#48C892, rose:#F43F5E
|
|
23
20
|
NEXT_PUBLIC_STYLE_ICON_COLOR=orange
|
|
24
21
|
NEXT_PUBLIC_STYLE_SVG_ICON_SIZE=18
|
|
22
|
+
NEXT_PUBLIC_STYLE_WATERMARK_TEXT=YOURS_
|
|
25
23
|
|
|
26
|
-
NEXT_PUBLIC_STYLE_SHOW_BANNER=true
|
|
27
|
-
NEXT_PUBLIC_STYLE_CLERK_PAGE_BANNER=false
|
|
28
|
-
NEXT_PUBLIC_STYLE_CLERK_AUTH_IN_MODAL=true
|
|
29
|
-
|
|
30
|
-
NEXT_PUBLIC_STYLE_WATERMARK_ENABLED=true
|
|
31
|
-
NEXT_PUBLIC_STYLE_WATERMARK_TEXT=YOURS-
|
|
32
|
-
|
|
33
|
-
# GoogleID TODO
|
|
34
|
-
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
|
|
35
|
-
# MicrosoftID TODO
|
|
36
|
-
NEXT_PUBLIC_MICROSOFT_CLARITY_ID=
|
|
37
24
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# Only-Use-In-Server, !!DO NOT USE IN CLIENT!!
|
|
41
|
-
CLERK_SECRET_KEY=YOURS-
|
|
42
|
-
CLERK_WEBHOOK_SECRET=YOURS-
|
|
43
|
-
CLERK_DEBUG=false
|
|
44
|
-
|
|
45
|
-
# sign-in url
|
|
25
|
+
## Clerk Front config
|
|
46
26
|
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
|
|
47
27
|
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
|
|
48
|
-
# sign-up url
|
|
49
28
|
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
|
|
50
29
|
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
|
|
51
|
-
|
|
52
|
-
# waitlist-url
|
|
53
30
|
NEXT_PUBLIC_CLERK_WAITLIST_URL=/waitlist
|
|
54
31
|
|
|
55
|
-
##
|
|
56
|
-
|
|
32
|
+
## Media loading timeout
|
|
33
|
+
NEXT_PUBLIC_DELAYED_IMG_SECONDS=2
|
|
34
|
+
NEXT_PUBLIC_SUNO_EMBED_TIMEOUT_SECONDS=20
|
|
35
|
+
|
|
36
|
+
## OpenRouter·AI base config
|
|
57
37
|
OPENROUTER_TIMEOUT_SECONDS=240
|
|
58
|
-
## OpenRouter KEY
|
|
59
|
-
OPENROUTER_API_KEY="XXXXXXXXXX"
|
|
60
38
|
## Text2Text openai/gpt-5-nano,
|
|
61
39
|
NEXT_PUBLIC_OPENROUTER_MODEL_NAME="x-ai/grok-4.1-fast"
|
|
62
40
|
## Multi-Chat slide window length(turns)
|
|
63
41
|
NEXT_PUBLIC_CHAT_CONTEXT_WINDOW_TURNS=6
|
|
64
|
-
NEXT_PUBLIC_OPENROUTER_DEBUG=true
|
|
65
|
-
## Mock switch
|
|
66
|
-
OPENROUTER_ENABLE_MOCK=true
|
|
67
42
|
## Mock Type, 0-Normal;1-Loading;2:TimeOut;3:PartTimeout;4PartAborted;5PartInterrupted
|
|
68
43
|
OPENROUTER_MOCK_TYPE=0
|
|
69
|
-
|
|
70
44
|
## Loading time before show response content
|
|
71
45
|
OPENROUTER_MOCK_TIMEOUT_SECONDS=3
|
|
72
46
|
## Stream mock delay(ms)
|
|
@@ -74,76 +48,116 @@ OPENROUTER_MOCK_STREAM_CHUNK_DELAY_MS=100
|
|
|
74
48
|
## Stream mock slice words
|
|
75
49
|
OPENROUTER_MOCK_STREAM_CHUNK_SIZE=4
|
|
76
50
|
|
|
77
|
-
# Enable Subscription Upgrade button
|
|
78
|
-
ENABLE_STRIPE_SUBSCRIPTION_UPGRADE = true
|
|
79
|
-
# Show Debug Status
|
|
80
|
-
SHOW_FINGERPRINT_STATUS = true
|
|
81
|
-
|
|
82
|
-
# Stripe Configuration
|
|
83
|
-
STRIPE_PUBLISHABLE_KEY=YOURS-
|
|
84
|
-
STRIPE_SECRET_KEY=YOURS-
|
|
85
|
-
STRIPE_WEBHOOK_SECRET=YOURS-
|
|
86
|
-
STRIPE_PRO_PRODUCT_ID=YOURS-
|
|
87
|
-
STRIPE_ULTRA_PRODUCT_ID=YOURS-
|
|
88
|
-
STRIPE_ONE_TIME_PRODUCT_ID=YOURS-
|
|
89
|
-
|
|
90
|
-
MONEY_PRICE_MOCK_USER_ENABLED=false
|
|
91
|
-
# 0-FreeUser | 1-MonthPro | 2-MonthUltra | 3-YearPro | 4-YearUltra
|
|
92
|
-
MONEY_PRICE_MOCK_USER_TYPE=4
|
|
93
|
-
# 激活的支付供应商
|
|
94
|
-
ACTIVE_PAYMENT_PROVIDER=stripe
|
|
95
|
-
|
|
96
|
-
# 积分初始化配置
|
|
97
|
-
CREDITS_INIT_FREE_AMOUNT=1
|
|
98
|
-
CREDITS_INIT_FREE_REGISTER_AMOUNT=2
|
|
99
|
-
CREDITS_INIT_FREE_EXPIRED_DAYS=7
|
|
100
|
-
CREDITS_ONE_TIME_EXPIRED_DAYS=30
|
|
101
51
|
|
|
102
|
-
|
|
52
|
+
## Stripe price config
|
|
53
|
+
# Stripe Pro Monthly
|
|
103
54
|
STRIPE_PRO_MONTHLY_PRICE_ID=YOURS-
|
|
104
55
|
STRIPE_PRO_MONTHLY_AMOUNT=10
|
|
105
56
|
STRIPE_PRO_MONTHLY_CURRENCY=usd
|
|
106
57
|
STRIPE_PRO_MONTHLY_CREDITS=100
|
|
107
58
|
|
|
108
|
-
# Stripe Ultra
|
|
59
|
+
# Stripe Ultra Monthly
|
|
109
60
|
STRIPE_ULTRA_MONTHLY_PRICE_ID=YOURS-
|
|
110
61
|
STRIPE_ULTRA_MONTHLY_AMOUNT=50
|
|
111
62
|
STRIPE_ULTRA_MONTHLY_CURRENCY=usd
|
|
112
63
|
STRIPE_ULTRA_MONTHLY_CREDITS=800
|
|
113
64
|
|
|
114
|
-
# Stripe Pro
|
|
65
|
+
# Stripe Pro Yearly, Stripe total price: 8x12=96
|
|
115
66
|
STRIPE_PRO_YEARLY_PRICE_ID=YOURS-
|
|
116
67
|
STRIPE_PRO_YEARLY_AMOUNT=8
|
|
117
68
|
STRIPE_PRO_YEARLY_CURRENCY=usd
|
|
118
69
|
STRIPE_PRO_YEARLY_CREDITS=1200
|
|
119
70
|
STRIPE_PRO_DISCOUNT_PERCENT=20
|
|
120
71
|
|
|
121
|
-
# Stripe Ultra
|
|
72
|
+
# Stripe Ultra Yearly, Stripe total price: 40x12=480
|
|
122
73
|
STRIPE_ULTRA_YEARLY_PRICE_ID=YOURS-
|
|
123
74
|
STRIPE_ULTRA_YEARLY_AMOUNT=40
|
|
124
75
|
STRIPE_ULTRA_YEARLY_CURRENCY=usd
|
|
125
76
|
STRIPE_ULTRA_YEARLY_CREDITS=9600
|
|
126
77
|
STRIPE_ULTRA_DISCOUNT_PERCENT=20
|
|
127
78
|
|
|
128
|
-
# Stripe One-Time
|
|
79
|
+
# Stripe One-Time Less
|
|
129
80
|
STRIPE_ONE_TIME_LESS_PRICE_ID=YOURS-
|
|
130
81
|
STRIPE_ONE_TIME_LESS_AMOUNT=5
|
|
131
82
|
STRIPE_ONE_TIME_LESS_CURRENCY=usd
|
|
132
83
|
STRIPE_ONE_TIME_LESS_CREDITS=5
|
|
133
84
|
|
|
134
|
-
# Stripe One-Time
|
|
85
|
+
# Stripe One-Time Mid(Default)
|
|
135
86
|
STRIPE_ONE_TIME_MID_PRICE_ID=YOURS-
|
|
136
87
|
STRIPE_ONE_TIME_MID_AMOUNT=10
|
|
137
88
|
STRIPE_ONE_TIME_MID_CURRENCY=usd
|
|
138
89
|
STRIPE_ONE_TIME_MID_CREDITS=10
|
|
139
90
|
|
|
140
|
-
# Stripe One-Time
|
|
91
|
+
# Stripe One-Time More
|
|
141
92
|
STRIPE_ONE_TIME_MORE_PRICE_ID=YOURS-
|
|
142
93
|
STRIPE_ONE_TIME_MORE_AMOUNT=20
|
|
143
94
|
STRIPE_ONE_TIME_MORE_CURRENCY=usd
|
|
144
95
|
STRIPE_ONE_TIME_MORE_CREDITS=20
|
|
145
96
|
|
|
146
97
|
|
|
98
|
+
## Public Switch Control
|
|
99
|
+
NEXT_PUBLIC_STYLE_SHOW_BANNER=true
|
|
100
|
+
NEXT_PUBLIC_STYLE_CLERK_PAGE_BANNER=true
|
|
101
|
+
NEXT_PUBLIC_STYLE_CLERK_AUTH_IN_MODAL=false
|
|
102
|
+
NEXT_PUBLIC_STYLE_WATERMARK_ENABLED=true
|
|
103
|
+
NEXT_PUBLIC_DELAYED_IMG_ENABLED=true
|
|
104
|
+
CLERK_DEBUG=false
|
|
105
|
+
LOCAL_MD_CACHE_DISABLE=true
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
##================================##
|
|
109
|
+
## 🔒🔒Sensitive Config🔒🔒 ##
|
|
110
|
+
## ⚠️🚨🚨 DO NOT ALLOW 🚨🚨⚠️ ##
|
|
111
|
+
## 🚨Money relation config ##
|
|
112
|
+
## ⚠️ Key, Token, Secret, Pem. ##
|
|
113
|
+
## ⚠️ Private url, api, id, webhook ##
|
|
114
|
+
## ⚠️ Special switch you wanna hide ##
|
|
115
|
+
##================================##
|
|
116
|
+
|
|
117
|
+
######### ---------------------------------- #########
|
|
118
|
+
######### Money #############
|
|
119
|
+
## 0-FreeUser | 1-MonthPro | 2-MonthUltra | 3-YearPro | 4-YearUltra
|
|
120
|
+
MONEY_PRICE_MOCK_USER_TYPE=4
|
|
121
|
+
## Provider: stripe, apple, paypal
|
|
122
|
+
ACTIVE_PAYMENT_PROVIDER=stripe
|
|
123
|
+
## Init Credits config
|
|
124
|
+
CREDITS_INIT_FREE_AMOUNT=1
|
|
125
|
+
CREDITS_INIT_FREE_REGISTER_AMOUNT=2
|
|
126
|
+
CREDITS_INIT_FREE_EXPIRED_DAYS=7
|
|
127
|
+
CREDITS_ONE_TIME_EXPIRED_DAYS=30
|
|
128
|
+
|
|
129
|
+
## Supabase RLS Security Isolation Description
|
|
130
|
+
## The project adopts: Frontend -> Backend Authentication -> Prisma Transaction Direct Connection (Account Permission Isolation) -> PostgresDB Dedicated Schema Access
|
|
131
|
+
## No frontend role access is opened. Therefore, pay close attention to the creation SQL in init-schema, which contains sufficient permission isolation and security control
|
|
132
|
+
|
|
133
|
+
## Project->Database->Settings->ResetPassword
|
|
134
|
+
#### Transaction Mode, IPv4 supported, great concurrency performance, Prisma prepared statements not supported
|
|
135
|
+
## DATABASE_URL="postgresql://YOURS_app.PROJECT_ID:PASSWORD@SERVER_HOST.pooler.supabase.com:6543/postgres?sslmode=require&schema=YOURS&pgbouncer=true"
|
|
136
|
+
#### Session Mode, IPv4 supported, consumes connections with slightly poorer concurrency performance, but supports Prisma prepared statements
|
|
137
|
+
## DATABASE_URL="postgresql://YOURS_app.PROJECT_ID:PASSWORD@SERVER_HOST.pooler.supabase.com:5432/postgres?sslmode=require&schema=YOURS"
|
|
138
|
+
|
|
139
|
+
# DB Config, Local Supabase Docker Image
|
|
140
|
+
## 🚨⚠️Superuser Account Access🚨⚠️, extremely high risk, will completely invalidate multi-schema permission isolation for one database
|
|
141
|
+
## DATABASE_URL="postgresql://postgres:YOURS_PASSWORD@localhost:5432/postgres?schema=YOURS"
|
|
142
|
+
## Project dedicated account access, recommended
|
|
143
|
+
# DB Config, replace YOUR port、db name、schema
|
|
144
|
+
DATABASE_URL="postgresql://YOURS_app:YOURS_PASSWORD@localhost:5432/postgres?schema=YOURS"
|
|
145
|
+
|
|
146
|
+
## Clerk Front/Backend config
|
|
147
|
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOURS-
|
|
148
|
+
CLERK_SECRET_KEY=YOURS-
|
|
149
|
+
CLERK_WEBHOOK_SECRET=YOURS-
|
|
150
|
+
|
|
151
|
+
# Stripe Configuration
|
|
152
|
+
# Wind's local-dev Sandbox
|
|
153
|
+
STRIPE_PUBLISHABLE_KEY=YOURS-
|
|
154
|
+
STRIPE_SECRET_KEY=YOURS-
|
|
155
|
+
STRIPE_WEBHOOK_SECRET=YOURS-
|
|
156
|
+
|
|
157
|
+
## OpenRouter KEY
|
|
158
|
+
## Use different key for projects
|
|
159
|
+
OPENROUTER_API_KEY="YOURS-"
|
|
160
|
+
|
|
147
161
|
## Upstash
|
|
148
162
|
# Upstash Redis Config
|
|
149
163
|
UPSTASH_REDIS_REST_URL="https://XXX.upstash.io"
|
|
@@ -154,4 +168,30 @@ QSTASH_TOKEN="XXX"
|
|
|
154
168
|
QSTASH_CURRENT_SIGNING_KEY="XXX"
|
|
155
169
|
QSTASH_NEXT_SIGNING_KEY="XXX"
|
|
156
170
|
|
|
157
|
-
NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
|
|
171
|
+
NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
|
|
172
|
+
|
|
173
|
+
######### ---------------------------------- #########
|
|
174
|
+
######### Private url, api, id, webhook #########
|
|
175
|
+
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
|
|
176
|
+
NEXT_PUBLIC_MICROSOFT_CLARITY_ID=
|
|
177
|
+
|
|
178
|
+
NEXT_PUBLIC_STYLE_CDN_PROXY_URL=https://XXXX
|
|
179
|
+
NEXT_PUBLIC_QSTASH_CACHE_TASK_URL=https://YOURS.com/api/XXXXX
|
|
180
|
+
|
|
181
|
+
## FAQ config, maybe outdate
|
|
182
|
+
WINDRUN_HUAIIN_FAQ_BASE_URL=https://xxxx
|
|
183
|
+
WINDRUN_HUAIIN_FAQ_CLIENT_ID=client_XXXX
|
|
184
|
+
WINDRUN_HUAIIN_FAQ_KEY_VERSION=XXXX
|
|
185
|
+
NEXT_PUBLIC_WINDRUN_HUAIIN_FAQ_PK=YOURS-
|
|
186
|
+
WINDRUN_HUAIIN_FAQ_SK=YOURS-
|
|
187
|
+
WINDRUN_HUAIIN_SDK_DEBUG=false
|
|
188
|
+
WINDRUN_HUAIIN_FAQ_OUTER_CACHE_ENABLED=false
|
|
189
|
+
|
|
190
|
+
######### ---------------------------------- #########
|
|
191
|
+
######### Special switch you wanna hide #########
|
|
192
|
+
## ⚠️ Sensitive Switch COntrol
|
|
193
|
+
SHOW_FINGERPRINT_STATUS=true
|
|
194
|
+
OPENROUTER_ENABLE_MOCK=true
|
|
195
|
+
NEXT_PUBLIC_OPENROUTER_DEBUG=true
|
|
196
|
+
ENABLE_STRIPE_SUBSCRIPTION_UPGRADE=true
|
|
197
|
+
MONEY_PRICE_MOCK_USER_ENABLED=false
|
package/.gitignore
CHANGED
package/dev-scripts.config.json
CHANGED
|
@@ -62,11 +62,13 @@
|
|
|
62
62
|
"@types/react",
|
|
63
63
|
"@types/react-dom",
|
|
64
64
|
"@typescript-eslint/parser",
|
|
65
|
-
"@windrun-huaiin/
|
|
65
|
+
"@windrun-huaiin/contracts",
|
|
66
66
|
"@windrun-huaiin/base-ui",
|
|
67
67
|
"@windrun-huaiin/dev-scripts",
|
|
68
68
|
"@windrun-huaiin/lib",
|
|
69
69
|
"@windrun-huaiin/third-ui",
|
|
70
|
+
"@windrun-huaiin/backend-core",
|
|
71
|
+
"@windrun-huaiin/fumadocs-local-md",
|
|
70
72
|
"autoprefixer",
|
|
71
73
|
"baseline-browser-mapping",
|
|
72
74
|
"class-variance-authority",
|
|
@@ -77,9 +79,6 @@
|
|
|
77
79
|
"eslint-plugin-unused-imports",
|
|
78
80
|
"fast-glob",
|
|
79
81
|
"fumadocs-core",
|
|
80
|
-
"fumadocs-docgen",
|
|
81
|
-
"fumadocs-mdx",
|
|
82
|
-
"fumadocs-typescript",
|
|
83
82
|
"fumadocs-ui",
|
|
84
83
|
"katex",
|
|
85
84
|
"lucide-react",
|
package/eslint.config.js
CHANGED
package/messages/en.json
CHANGED
|
@@ -398,15 +398,15 @@
|
|
|
398
398
|
"searchNoResult": "No results found",
|
|
399
399
|
"toc": "On this page",
|
|
400
400
|
"tocNoHeadings": "No Headings",
|
|
401
|
-
"lastUpdate": "Last updated
|
|
401
|
+
"lastUpdate": "Last updated",
|
|
402
402
|
"emptyLastUpdate": "Ooops, Ages ago!",
|
|
403
403
|
"chooseLanguage": "Choose a language",
|
|
404
404
|
"nextPage": "Next Page",
|
|
405
405
|
"previousPage": "Previous Page",
|
|
406
406
|
"chooseTheme": "Theme",
|
|
407
|
-
"copyMarkdown": "Copy
|
|
407
|
+
"copyMarkdown": "Copy as Markdown",
|
|
408
408
|
"copyMarkdownDone": "Copied!",
|
|
409
|
-
"editOnGithub": "Edit
|
|
409
|
+
"editOnGithub": "Edit on GitHub"
|
|
410
410
|
},
|
|
411
411
|
"fingerprint": {
|
|
412
412
|
"panel": {
|
package/next.config.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
2
|
-
import { createMDX } from 'fumadocs-mdx/next';
|
|
3
2
|
import { NextConfig } from 'next';
|
|
4
3
|
|
|
5
4
|
const withNextIntl = createNextIntlPlugin('./src/i18n.ts');
|
|
6
5
|
|
|
7
|
-
const withMDX = createMDX();
|
|
8
|
-
|
|
9
6
|
/** @type {import('next').NextConfig} */
|
|
10
7
|
const nextConfig: NextConfig = {
|
|
11
8
|
// Monorepo development config
|
|
@@ -13,14 +10,8 @@ const nextConfig: NextConfig = {
|
|
|
13
10
|
'@windrun-huaiin/base-ui',
|
|
14
11
|
'@windrun-huaiin/third-ui',
|
|
15
12
|
'@windrun-huaiin/lib',
|
|
13
|
+
'@windrun-huaiin/fumadocs-local-md',
|
|
16
14
|
],
|
|
17
|
-
// eslint: {
|
|
18
|
-
// ignoreDuringBuilds: true,
|
|
19
|
-
// },
|
|
20
|
-
// typescript: {
|
|
21
|
-
// ignoreBuildErrors: true,
|
|
22
|
-
// },
|
|
23
|
-
|
|
24
15
|
// mdx config
|
|
25
16
|
reactStrictMode: true,
|
|
26
17
|
|
|
@@ -37,12 +28,6 @@ const nextConfig: NextConfig = {
|
|
|
37
28
|
dangerouslyAllowSVG: true,
|
|
38
29
|
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
|
39
30
|
},
|
|
40
|
-
|
|
41
|
-
// experimental: {
|
|
42
|
-
// webpackBuildWorker: true,
|
|
43
|
-
// parallelServerBuildTraces: true,
|
|
44
|
-
// parallelServerCompiles: true,
|
|
45
|
-
// },
|
|
46
31
|
|
|
47
32
|
// Ensuring outputFileTracingIncludes is a top-level property
|
|
48
33
|
outputFileTracingIncludes: {
|
|
@@ -50,7 +35,9 @@ const nextConfig: NextConfig = {
|
|
|
50
35
|
// Adjust the key if your API route path is different in the output structure
|
|
51
36
|
'/api/blog/llm-content': ['./src/mdx/blog/**/*'],
|
|
52
37
|
'/api/legal/llm-content': ['./src/mdx/legal/**/*'],
|
|
38
|
+
'/[locale]/blog/[[...slug]]': ['./src/mdx/blog/**/*'],
|
|
39
|
+
'/[locale]/legal/[[...slug]]': ['./src/mdx/legal/**/*'],
|
|
53
40
|
}
|
|
54
41
|
};
|
|
55
42
|
|
|
56
|
-
export default withNextIntl(
|
|
43
|
+
export default withNextIntl(nextConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windrun-huaiin/diaomao",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,19 +27,18 @@
|
|
|
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": "
|
|
31
|
-
"@windrun-huaiin/base-ui": "
|
|
32
|
-
"@windrun-huaiin/
|
|
33
|
-
"@windrun-huaiin/
|
|
30
|
+
"@windrun-huaiin/backend-core": "26.0.2",
|
|
31
|
+
"@windrun-huaiin/base-ui": "26.0.0",
|
|
32
|
+
"@windrun-huaiin/contracts": "22.0.0",
|
|
33
|
+
"@windrun-huaiin/fumadocs-local-md": "26.0.0",
|
|
34
|
+
"@windrun-huaiin/lib": "26.0.0",
|
|
35
|
+
"@windrun-huaiin/third-ui": "26.0.0",
|
|
34
36
|
"autoprefixer": "^10.4.27",
|
|
35
37
|
"class-variance-authority": "^0.7.1",
|
|
36
38
|
"clsx": "^2.1.1",
|
|
37
39
|
"date-fns": "^4.1.0",
|
|
38
|
-
"fumadocs-core": "16.
|
|
39
|
-
"fumadocs-
|
|
40
|
-
"fumadocs-mdx": "13.0.6",
|
|
41
|
-
"fumadocs-typescript": "4.0.13",
|
|
42
|
-
"fumadocs-ui": "16.0.9",
|
|
40
|
+
"fumadocs-core": "16.8.2",
|
|
41
|
+
"fumadocs-ui": "16.8.2",
|
|
43
42
|
"katex": "^0.16.33",
|
|
44
43
|
"lucide-react": "^0.577.0",
|
|
45
44
|
"mermaid": "11.12.1",
|
|
@@ -75,7 +74,7 @@
|
|
|
75
74
|
"@types/react": "^19.2.14",
|
|
76
75
|
"@types/react-dom": "^19.2.3",
|
|
77
76
|
"@typescript-eslint/parser": "^8.56.1",
|
|
78
|
-
"@windrun-huaiin/dev-scripts": "^
|
|
77
|
+
"@windrun-huaiin/dev-scripts": "^26.0.0",
|
|
79
78
|
"baseline-browser-mapping": "^2.10.0",
|
|
80
79
|
"eslint": "^9.39.1",
|
|
81
80
|
"eslint-config-next": "^16.1.6",
|
|
Binary file
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* MIT License
|
|
4
|
-
* Copyright (c) 2025 D8ger
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
import { baseOptions } from '@/app/[locale]/layout.config';
|
|
11
|
-
import { clerkPageBanner } from '@/lib/appConfig';
|
|
12
2
|
import { fingerprintConfig } from '@windrun-huaiin/backend-core/lib';
|
|
13
|
-
import { CustomHomeLayout } from '@windrun-huaiin/third-ui/fuma/base';
|
|
14
3
|
import { FingerprintProvider } from '@windrun-huaiin/third-ui/fingerprint';
|
|
15
|
-
import { type
|
|
4
|
+
import { SiteHomeLayout, type SiteHomeLayoutConfig } from '@windrun-huaiin/third-ui/fuma/base';
|
|
16
5
|
import { ReactNode } from 'react';
|
|
6
|
+
import { clerkPageBanner, localePrefixAsNeeded, defaultLocale } from '@/lib/appConfig';
|
|
7
|
+
import { i18n } from '@/i18n';
|
|
8
|
+
import { appConfig } from '@/lib/appConfig';
|
|
17
9
|
|
|
18
|
-
async function homeOptions(locale: string): Promise<
|
|
10
|
+
async function homeOptions(locale: string): Promise<SiteHomeLayoutConfig> {
|
|
19
11
|
const resolvedBaseOptions = await baseOptions(locale);
|
|
20
12
|
return {
|
|
21
13
|
...resolvedBaseOptions,
|
|
@@ -31,8 +23,11 @@ export default async function RootLayout({
|
|
|
31
23
|
}) {
|
|
32
24
|
const { locale } = await params;
|
|
33
25
|
const customeOptions = await homeOptions(locale);
|
|
34
|
-
|
|
26
|
+
|
|
27
|
+
const homeLayoutOptions: SiteHomeLayoutConfig = {
|
|
35
28
|
...customeOptions,
|
|
29
|
+
i18n,
|
|
30
|
+
githubUrl: appConfig.github,
|
|
36
31
|
searchToggle: {
|
|
37
32
|
enabled: false,
|
|
38
33
|
},
|
|
@@ -43,21 +38,20 @@ export default async function RootLayout({
|
|
|
43
38
|
};
|
|
44
39
|
return (
|
|
45
40
|
<FingerprintProvider config={fingerprintConfig}>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</CustomHomeLayout>
|
|
41
|
+
<SiteHomeLayout
|
|
42
|
+
locale={locale}
|
|
43
|
+
config={{
|
|
44
|
+
...homeLayoutOptions,
|
|
45
|
+
localePrefixAsNeeded,
|
|
46
|
+
defaultLocale,
|
|
47
|
+
showBanner: clerkPageBanner,
|
|
48
|
+
showFooter: false,
|
|
49
|
+
showGoToTop: false,
|
|
50
|
+
floatingNav: true,
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{children}
|
|
54
|
+
</SiteHomeLayout>
|
|
61
55
|
</FingerprintProvider>
|
|
62
56
|
);
|
|
63
57
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* MIT License
|
|
4
|
-
* Copyright (c) 2025 D8ger
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
'use client';
|
|
11
2
|
|
|
12
3
|
import { createSignInPageWithFingerprint } from '@windrun-huaiin/third-ui/clerk';
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* MIT License
|
|
4
|
-
* Copyright (c) 2025 D8ger
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
'use client';
|
|
11
2
|
|
|
12
3
|
import { createSignUpPageWithFingerprint } from '@windrun-huaiin/third-ui/clerk';
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* MIT License
|
|
4
|
-
* Copyright (c) 2025 D8ger
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
'use client';
|
|
11
2
|
|
|
12
3
|
import { createWaitlistPage } from '@windrun-huaiin/third-ui/clerk/server';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getMDXComponents } from '@/components/mdx-components';
|
|
2
2
|
import { appConfig } from '@/lib/appConfig';
|
|
3
3
|
import { NotFoundPage } from '@windrun-huaiin/base-ui/components';
|
|
4
|
-
import {
|
|
4
|
+
import { getContentSource } from '@/lib/content-source';
|
|
5
5
|
import { createFumaPage } from '@windrun-huaiin/third-ui/fuma/server';
|
|
6
6
|
import { SiteIcon } from '@/lib/site-config';
|
|
7
7
|
import { LLMCopyButton } from '@windrun-huaiin/third-ui/fuma/mdx';
|
|
@@ -9,7 +9,7 @@ import { LLMCopyButton } from '@windrun-huaiin/third-ui/fuma/mdx';
|
|
|
9
9
|
const sourceKey = 'blog';
|
|
10
10
|
const { Page, generateStaticParams, generateMetadata } = createFumaPage({
|
|
11
11
|
sourceKey: sourceKey,
|
|
12
|
-
mdxContentSource:
|
|
12
|
+
mdxContentSource: () => getContentSource('blog'),
|
|
13
13
|
getMDXComponents,
|
|
14
14
|
mdxSourceDir: appConfig.mdxSourceDir[sourceKey],
|
|
15
15
|
githubBaseUrl: appConfig.githubBaseUrl,
|
|
@@ -19,7 +19,8 @@ const { Page, generateStaticParams, generateMetadata } = createFumaPage({
|
|
|
19
19
|
supportedLocales: appConfig.i18n.locales as string[],
|
|
20
20
|
showBreadcrumb: false,
|
|
21
21
|
showTableOfContent: true,
|
|
22
|
-
showTableOfContentPopover: false
|
|
22
|
+
showTableOfContentPopover: false,
|
|
23
|
+
tocRenderMode: 'portable-clerk'
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
export default Page;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getContentSource } from '@/lib/content-source';
|
|
3
3
|
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
|
4
4
|
|
|
5
5
|
export default async function Layout({
|
|
@@ -10,6 +10,7 @@ export default async function Layout({
|
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
}) {
|
|
12
12
|
const { locale } = await params;
|
|
13
|
+
const blogSource = await getContentSource('blog');
|
|
13
14
|
return (
|
|
14
15
|
<DocsLayout sidebar={{enabled: false}} searchToggle={{enabled: false}} tree={blogSource.pageTree[locale]}>
|
|
15
16
|
{children}
|