@windrun-huaiin/diaomao 1.0.0 → 2.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.
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": true,
5
+ "commitMessageFormat": "🚀release {name}@{version} ({type})",
6
+ "fixed": [],
7
+ "linked": [],
8
+ "access": "public",
9
+ "baseBranch": "main",
10
+ "updateInternalDependencies": "patch",
11
+ "ignore": []
12
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@windrun-huaiin/diaomao": major
3
+ ---
4
+
5
+ fix(createApp): one command for standtard project init
package/.env.local.txt ADDED
@@ -0,0 +1,37 @@
1
+ # domain and github link
2
+ NEXT_PUBLIC_BASE_URL=http://localhost:3000
3
+
4
+ NEXT_PUBLIC_GITHUB=https://github.com/PowerZCY/next-ai-build/
5
+ NEXT_PUBLIC_GITHUB_BASE_URL=https://github.com/PowerZCY/next-ai-build/blob/main/apps/diaomao
6
+
7
+ # Website uniform style
8
+ NEXT_PUBLIC_STYLE_ICON_COLOR=text-purple-500
9
+ NEXT_PUBLIC_STYLE_SVG_ICON_COLOR=#AC62FD
10
+ NEXT_PUBLIC_STYLE_SVG_ICON_SIZE=18
11
+
12
+ NEXT_PUBLIC_STYLE_SHOW_BANNER=true
13
+ NEXT_PUBLIC_STYLE_CLERK_PAGE_BANNER=false
14
+ NEXT_PUBLIC_STYLE_CLERK_AUTH_IN_MODAL=false
15
+
16
+ NEXT_PUBLIC_STYLE_WATERMARK_ENABLED=true
17
+ NEXT_PUBLIC_STYLE_WATERMARK_TEXT=Windrun·Huaiin
18
+
19
+ # GoogleID TODO
20
+ NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
21
+ # MicrosoftID TODO
22
+ NEXT_PUBLIC_MICROSOFT_CLARITY_ID=
23
+
24
+ # Only-Use-In-Server, !!DO NOT USE IN CLIENT!!
25
+ CLERK_DEBUG=false
26
+ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
27
+ CLERK_SECRET_KEY=
28
+
29
+ # signin-url
30
+ NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
31
+ NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
32
+ # signupurl
33
+ NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
34
+ NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
35
+
36
+ # waitlist-url
37
+ NEXT_PUBLIC_CLERK_WAITLIST_URL=/waitlist
package/.gitignore ADDED
@@ -0,0 +1,134 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ lerna-debug.log*
8
+ .pnpm-debug.log*
9
+
10
+ # Diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # Runtime data
14
+ pids
15
+ *.pid
16
+ *.seed
17
+ *.pid.lock
18
+
19
+ # Directory for instrumented libs generated by jscoverage/JSCover
20
+ lib-cov
21
+
22
+ # Coverage directory used by tools like istanbul
23
+ coverage
24
+ *.lcov
25
+
26
+ # nyc test coverage
27
+ .nyc_output
28
+
29
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30
+ .grunt
31
+
32
+ # Bower dependency directory (https://bower.io/)
33
+ bower_components
34
+
35
+ # node-waf configuration
36
+ .lock-wscript
37
+
38
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
39
+ build/Release
40
+
41
+ # Dependency directories
42
+ node_modules/
43
+ jspm_packages/
44
+
45
+ # Snowpack dependency directory (https://snowpack.dev/)
46
+ web_modules/
47
+
48
+ # TypeScript cache
49
+ *.tsbuildinfo
50
+
51
+ # Optional npm cache directory
52
+ .npm
53
+
54
+ # Optional eslint cache
55
+ .eslintcache
56
+
57
+ # Optional stylelint cache
58
+ .stylelintcache
59
+
60
+ # Microbundle cache
61
+ .rpt2_cache/
62
+ .rts2_cache_cjs/
63
+ .rts2_cache_es/
64
+ .rts2_cache_umd/
65
+
66
+ # Optional REPL history
67
+ .node_repl_history
68
+
69
+ # Output of 'npm pack'
70
+ *.tgz
71
+
72
+ # Yarn Integrity file
73
+ .yarn-integrity
74
+
75
+ # dotenv environment variable files
76
+ .env
77
+ .env.development.local
78
+ .env.test.local
79
+ .env.production.local
80
+ .env.local
81
+
82
+ # parcel-bundler cache (https://parceljs.org/)
83
+ .cache
84
+ .parcel-cache
85
+
86
+ # Next.js build output
87
+ .next
88
+ out
89
+
90
+ # Nuxt.js build / generate output
91
+ .nuxt
92
+ dist
93
+
94
+ # Gatsby files
95
+ .cache/
96
+ # Comment in the public line in if your project uses Gatsby and not Next.js
97
+ # https://nextjs.org/blog/next-9-1#public-directory-support
98
+ # public
99
+
100
+ # vuepress build output
101
+ .vuepress/dist
102
+
103
+ # vuepress v2.x temp and cache directory
104
+ .temp
105
+ .cache
106
+
107
+ # Docusaurus cache and generated files
108
+ .docusaurus
109
+
110
+ # Serverless directories
111
+ .serverless/
112
+
113
+ # FuseBox cache
114
+ .fusebox/
115
+
116
+ # DynamoDB Local files
117
+ .dynamodb/
118
+
119
+ # TernJS port file
120
+ .tern-port
121
+
122
+ # Stores VSCode versions used for testing VSCode extensions
123
+ .vscode-test
124
+
125
+ # yarn v2
126
+ .yarn/cache
127
+ .yarn/unplugged
128
+ .yarn/build-state.yml
129
+ .yarn/install-state.gz
130
+ .pnp.*
131
+ .DS_Store
132
+ .source/index.ts
133
+ .source/source.config.mjs
134
+
package/next.config.ts ADDED
@@ -0,0 +1,60 @@
1
+ import createNextIntlPlugin from 'next-intl/plugin';
2
+ import { createMDX } from 'fumadocs-mdx/next';
3
+ import { NextConfig } from 'next';
4
+
5
+ const withNextIntl = createNextIntlPlugin('./src/i18n.ts');
6
+
7
+ const withMDX = createMDX();
8
+
9
+ /** @type {import('next').NextConfig} */
10
+ const nextConfig: NextConfig = {
11
+ // Monorepo development config
12
+ transpilePackages: [
13
+ '@windrun-huaiin/base-ui',
14
+ '@windrun-huaiin/third-ui',
15
+ '@windrun-huaiin/lib',
16
+ ],
17
+ // eslint: {
18
+ // ignoreDuringBuilds: true,
19
+ // },
20
+ // typescript: {
21
+ // ignoreBuildErrors: true,
22
+ // },
23
+
24
+ // mdx config
25
+ reactStrictMode: true,
26
+
27
+ images: {
28
+ unoptimized: true,
29
+ // allow remote image host
30
+ remotePatterns: [
31
+ {
32
+ protocol: 'https',
33
+ hostname: 'favicon.im',
34
+ },
35
+ {
36
+ protocol: 'https',
37
+ hostname: 'preview.reve.art',
38
+ }
39
+ ],
40
+ // allow remote svg image
41
+ dangerouslyAllowSVG: true,
42
+ contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
43
+ },
44
+
45
+ // experimental: {
46
+ // webpackBuildWorker: true,
47
+ // parallelServerBuildTraces: true,
48
+ // parallelServerCompiles: true,
49
+ // },
50
+
51
+ // Ensuring outputFileTracingIncludes is a top-level property
52
+ outputFileTracingIncludes: {
53
+ // Ensure MDX files for the llm-content API route are included in the serverless function
54
+ // Adjust the key if your API route path is different in the output structure
55
+ '/api/blog/llm-content': ['./src/mdx/blog/**/*'],
56
+ '/api/legal/llm-content': ['./src/mdx/legal/**/*'],
57
+ }
58
+ };
59
+
60
+ export default withNextIntl(withMDX(nextConfig));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/diaomao",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,6 +25,9 @@
25
25
  "@radix-ui/react-slot": "^1.2.2",
26
26
  "@tailwindcss/typography": "latest",
27
27
  "@types/mdx": "^2.0.13",
28
+ "@windrun-huaiin/base-ui": "^5.3.1",
29
+ "@windrun-huaiin/lib": "^5.7.0",
30
+ "@windrun-huaiin/third-ui": "^5.9.3",
28
31
  "autoprefixer": "^10.4.21",
29
32
  "class-variance-authority": "^0.7.1",
30
33
  "clsx": "^2.1.1",
@@ -49,13 +52,11 @@
49
52
  "shiki": "^3.4.2",
50
53
  "tailwind-merge": "^3.3.0",
51
54
  "tailwindcss-animate": "^1.0.7",
52
- "zod": "^3.24.4",
53
- "@windrun-huaiin/base-ui": "^5.3.1",
54
- "@windrun-huaiin/third-ui": "^5.9.3",
55
- "@windrun-huaiin/lib": "^5.7.0"
55
+ "zod": "^3.24.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@changesets/cli": "^2.29.5",
59
+ "@windrun-huaiin/dev-scripts": "^6.6.0",
59
60
  "@tailwindcss/cli": "^4.1.11",
60
61
  "@tailwindcss/postcss": "^4.1.7",
61
62
  "@types/hast": "^3.0.4",
@@ -76,22 +77,26 @@
76
77
  "ts-node": "^10.9.2",
77
78
  "typescript": "^5.8.3",
78
79
  "ts-morph": "25.0.1",
79
- "unist-util-visit": "^5.0.0",
80
- "@windrun-huaiin/dev-scripts": "6.6.0"
80
+ "unist-util-visit": "^5.0.0"
81
81
  },
82
82
  "files": [
83
+ ".changeset",
83
84
  "src",
84
85
  "public",
86
+ ".gitignore",
85
87
  "messages",
88
+ ".env.local.txt",
86
89
  ".eslintrc.json",
87
90
  "components.json",
88
91
  "dev-scripts.config.json",
89
92
  "LICENSE",
90
93
  "next-env.d.ts",
91
- "next.config.mjs",
94
+ "next.config.ts",
92
95
  "postcss.config.mjs",
93
96
  "tailwind.config.ts",
97
+ "source.config.ts",
94
98
  "tsconfig.json",
99
+ "tsconfig.node.json",
95
100
  "!**/scripts/**",
96
101
  "!**/*.test.{js,ts}",
97
102
  "!**/*.log"
@@ -105,6 +110,11 @@
105
110
  "build:prod": "next build",
106
111
  "start": "next start",
107
112
  "lint": "next lint",
113
+ "deep-clean": "dev-scripts deep-clean",
114
+ "d8": "pnpm run deep-clean",
115
+ "easy-changeset": "dev-scripts easy-changeset",
116
+ "dj": "pnpm run easy-changeset && pnpm changeset status",
117
+ "djv": "pnpm changeset version",
108
118
  "generate-blog-index": "dev-scripts generate-blog-index -v",
109
119
  "check-translations": "dev-scripts check-translations -v",
110
120
  "clean-translations": "dev-scripts clean-translations -v",
@@ -0,0 +1,95 @@
1
+ import { appConfig } from '@/lib/appConfig';
2
+ import { createCommonDocsSchema, createCommonMetaSchema } from '@windrun-huaiin/third-ui/lib/server';
3
+ import { rehypeCodeDefaultOptions, remarkSteps } from 'fumadocs-core/mdx-plugins';
4
+ import { defineConfig, defineDocs } from 'fumadocs-mdx/config';
5
+ import type { Element } from 'hast';
6
+ import rehypeKatex from 'rehype-katex';
7
+ import remarkMath from 'remark-math';
8
+ import type { ShikiTransformerContext as TransformerContext } from 'shiki';
9
+
10
+ const mdxSourceDir = appConfig.mdxSourceDir
11
+
12
+ export const blog = defineDocs({
13
+ dir: mdxSourceDir.blog,
14
+ docs: {
15
+ async: false,
16
+ // @ts-ignore - Temporarily suppress deep instantiation error
17
+ schema: createCommonDocsSchema(),
18
+ },
19
+ meta: {
20
+ schema: createCommonMetaSchema(),
21
+ },
22
+ });
23
+
24
+ export const legal = defineDocs({
25
+ dir: mdxSourceDir.legal,
26
+ docs: {
27
+ async: false,
28
+ // @ts-ignore - Temporarily suppress deep instantiation error
29
+ schema: createCommonDocsSchema(),
30
+ },
31
+ meta: {
32
+ schema: createCommonMetaSchema(),
33
+ },
34
+ });
35
+
36
+ export default defineConfig({
37
+ lastModifiedTime: 'git',
38
+ mdxOptions: {
39
+ providerImportSource: '@/components/mdx-components',
40
+ // disable remark-image default behavior, use remote URL for all images
41
+ remarkImageOptions: false,
42
+ rehypeCodeOptions: {
43
+ lazy: true,
44
+ experimentalJSEngine: true,
45
+ inline: 'tailing-curly-colon',
46
+ themes: {
47
+ light: 'catppuccin-latte',
48
+ dark: 'catppuccin-mocha',
49
+ },
50
+ transformers: [
51
+ // 1. custom transformer, add data-language from this.options.lang
52
+ {
53
+ name: 'transformer:parse-code-language',
54
+ pre(this: TransformerContext | any, preNode: Element) {
55
+ const languageFromOptions = this.options?.lang as string | undefined;
56
+
57
+ if (languageFromOptions && typeof languageFromOptions === 'string' && languageFromOptions.trim() !== '') {
58
+ if (!preNode.properties) {
59
+ preNode.properties = {};
60
+ }
61
+ const langLower = languageFromOptions.toLowerCase();
62
+ preNode.properties['data-language'] = langLower;
63
+ }
64
+ return preNode;
65
+ }
66
+ },
67
+ // 2. Fumadocs default transformers
68
+ ...(rehypeCodeDefaultOptions.transformers ?? []),
69
+ // 3. your existing transformer
70
+ {
71
+ name: 'transformers:remove-notation-escape',
72
+ code(hast) {
73
+ for (const line of hast.children) {
74
+ if (line.type !== 'element') continue;
75
+
76
+ const lastSpan = line.children.findLast(
77
+ (v) => v.type === 'element',
78
+ );
79
+
80
+ const head = lastSpan?.children[0];
81
+ if (head?.type !== 'text') continue;
82
+
83
+ head.value = head.value.replace(/\[\\!code/g, '[!code');
84
+ }
85
+ },
86
+ },
87
+ ],
88
+ },
89
+ remarkPlugins: [
90
+ remarkSteps,
91
+ remarkMath,
92
+ ],
93
+ rehypePlugins: (v) => [rehypeKatex, ...v],
94
+ },
95
+ });
@@ -9,10 +9,10 @@
9
9
 
10
10
  import { baseOptions } from '@/app/[locale]/layout.config';
11
11
  import { HomeLayout, type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
12
- import { FumaBannerSuit } from '@third-ui/fuma/mdx';
12
+ import { FumaBannerSuit } from '@windrun-huaiin/third-ui/fuma/mdx';
13
13
  import { ReactNode } from 'react';
14
14
  import { clerkPageBanner } from '@/lib/appConfig';
15
- import { ClerkProviderClient } from '@third-ui/clerk';
15
+ import { ClerkProviderClient } from '@windrun-huaiin/third-ui/clerk';
16
16
 
17
17
  async function homeOptions(locale: string): Promise<HomeLayoutProps>{
18
18
  const resolvedBaseOptions = await baseOptions(locale);
@@ -9,6 +9,6 @@
9
9
 
10
10
  'use client';
11
11
 
12
- import { createSignInPage } from '@third-ui/clerk';
12
+ import { createSignInPage } from '@windrun-huaiin/third-ui/clerk';
13
13
 
14
14
  export default createSignInPage();
@@ -9,6 +9,6 @@
9
9
 
10
10
  'use client';
11
11
 
12
- import { createSignUpPage } from '@third-ui/clerk';
12
+ import { createSignUpPage } from '@windrun-huaiin/third-ui/clerk';
13
13
 
14
14
  export default createSignUpPage();
@@ -9,6 +9,6 @@
9
9
 
10
10
  'use client';
11
11
 
12
- import { createWaitlistPage } from '@third-ui/clerk';
12
+ import { createWaitlistPage } from '@windrun-huaiin/third-ui/clerk';
13
13
 
14
14
  export default createWaitlistPage();
@@ -7,7 +7,7 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- import { NotFoundPage } from '@base-ui/components';
10
+ import { NotFoundPage } from '@windrun-huaiin/base-ui/components';
11
11
  import { SiteIcon } from '@/lib/site-config';
12
12
 
13
13
  export default function NotFound() {
@@ -1,10 +1,10 @@
1
1
  import { getMDXComponents } from '@/components/mdx-components';
2
2
  import { appConfig } from '@/lib/appConfig';
3
- import { NotFoundPage } from '@base-ui/components';
3
+ import { NotFoundPage } from '@windrun-huaiin/base-ui/components';
4
4
  import { blogSource } from '@/lib/source-blog';
5
- import { createFumaPage } from '@third-ui/fuma/server';
5
+ import { createFumaPage } from '@windrun-huaiin/third-ui/fuma/server';
6
6
  import { SiteIcon } from '@/lib/site-config';
7
- import { LLMCopyButton } from '@third-ui/fuma/mdx/toc-base';
7
+ import { LLMCopyButton } from '@windrun-huaiin/third-ui/fuma/mdx';
8
8
 
9
9
  const sourceKey = 'blog';
10
10
  const { Page, generateStaticParams, generateMetadata } = createFumaPage({
@@ -1,10 +1,10 @@
1
1
  import { baseOptions, homeNavLinks, levelNavLinks } from '@/app/[locale]/layout.config';
2
- import { Footer, GoToTop } from '@third-ui/main';
2
+ import { Footer, GoToTop } from '@windrun-huaiin/third-ui/main';
3
3
  import { HomeLayout, type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
4
- import { FumaBannerSuit } from '@third-ui/fuma/mdx';
4
+ import { FumaBannerSuit } from '@windrun-huaiin/third-ui/fuma/mdx';
5
5
  import type { ReactNode } from 'react';
6
6
  import { showBanner } from '@/lib/appConfig';
7
- import { ClerkProviderClient } from '@third-ui/clerk';
7
+ import { ClerkProviderClient } from '@windrun-huaiin/third-ui/clerk';
8
8
 
9
9
  async function homeOptions(locale: string): Promise<HomeLayoutProps> {
10
10
  return {
@@ -2,8 +2,8 @@ import { getMDXComponents } from '@/components/mdx-components';
2
2
  import { appConfig } from '@/lib/appConfig';
3
3
  import { SiteIcon } from '@/lib/site-config';
4
4
  import { legalSource } from '@/lib/source-legal';
5
- import { NotFoundPage } from '@base-ui/components';
6
- import { createFumaPage } from '@third-ui/fuma/server';
5
+ import { NotFoundPage } from '@windrun-huaiin/base-ui/components';
6
+ import { createFumaPage } from '@windrun-huaiin/third-ui/fuma/server';
7
7
 
8
8
  const sourceKey = 'legal';
9
9
  const { Page, generateStaticParams, generateMetadata } = createFumaPage({
@@ -1,5 +1,7 @@
1
+ 'use client';
2
+
1
3
  import { Hero } from "@/components/hero"
2
- import { Gallery, Usage, Features, Tips, FAQ, SeoContent, CTA, PricePlan } from "@third-ui/main"
4
+ import { Gallery, Usage, Features, Tips, FAQ, SeoContent, CTA, PricePlan } from "@windrun-huaiin/third-ui/main"
3
5
  import { pricePlanConfig } from "@/lib/price-config"
4
6
 
5
7
  export default function Home() {
@@ -1,7 +1,7 @@
1
1
  @import 'tailwindcss';
2
2
 
3
- @source "../../../../../packages/third-ui/src/**/*.{js,ts,jsx,tsx}";
4
- @source "../../../../../packages/base-ui/src/**/*.{js,ts,jsx,tsx}";
3
+ @source "../../../node_modules/@windrun-huaiin/third-ui/src/**/*.{js,ts,jsx,tsx}";
4
+ @source "../../../node_modules/@windrun-huaiin/base-ui/src/**/*.{js,ts,jsx,tsx}";
5
5
  @source "../../../src/**/*.{js,ts,jsx,tsx}";
6
6
 
7
7
  @import '@windrun-huaiin/third-ui/styles/third-ui.css';
@@ -1,8 +1,8 @@
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 '@base-ui/components/global-icon';
5
- import { ClerkUser } from '@third-ui/clerk';
4
+ import { globalLucideIcons as icons } from '@windrun-huaiin/base-ui/components/server';
5
+ import { ClerkUser } from '@windrun-huaiin/third-ui/clerk';
6
6
  import { type LinkItemType } from 'fumadocs-ui/layouts/docs';
7
7
  import { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
8
8
  import { getTranslations } from 'next-intl/server';
@@ -1,6 +1,6 @@
1
1
  import { appConfig, generatedLocales } from "@/lib/appConfig";
2
- import { fumaI18nCn } from '@third-ui/lib/server';
3
- import { NProgressBar } from '@third-ui/main/nprogress-bar';
2
+ import { fumaI18nCn } from '@windrun-huaiin/third-ui/lib/server';
3
+ import { NProgressBar } from '@windrun-huaiin/third-ui/main';
4
4
  import { RootProvider } from "fumadocs-ui/provider";
5
5
  import { NextIntlClientProvider } from 'next-intl';
6
6
  import { getMessages, getTranslations, setRequestLocale } from 'next-intl/server';
@@ -1,4 +1,4 @@
1
1
  'use client';
2
- import { Loading } from '@third-ui/main/loading';
2
+ import { Loading } from '@windrun-huaiin/third-ui/main';
3
3
 
4
4
  export default Loading;
@@ -2,17 +2,22 @@
2
2
 
3
3
  import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
- import { blogSource } from '@/lib/source-blog';
6
5
  import { appConfig } from '@/lib/appConfig';
7
- import { LLMCopyHandler } from '@third-ui/fuma/server';
6
+ import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server';
7
+ import { blogSource } from '@/lib/source-blog';
8
8
 
9
9
  export async function GET(request: NextRequest) {
10
10
  const searchParams = request.nextUrl.searchParams;
11
11
  const locale = searchParams.get('locale') ?? appConfig.i18n.defaultLocale;
12
- const requestedPath = searchParams.get('path') || '';
12
+ const requestedPath = searchParams.get('path');
13
+
14
+ if (!requestedPath) {
15
+ console.error('API llm-content: Missing path query parameter');
16
+ return new NextResponse('Missing path query parameter', { status: 400 });
17
+ }
13
18
 
14
19
  const result = await LLMCopyHandler({
15
- sourceDir: appConfig.mdxSourceDir.blog,
20
+ sourceDir: appConfig.mdxSourceDir['blog'],
16
21
  dataSource: blogSource,
17
22
  requestedPath,
18
23
  locale,
@@ -4,7 +4,7 @@ import { type NextRequest, NextResponse } from 'next/server';
4
4
 
5
5
  import { legalSource } from '@/lib/source-legal';
6
6
  import { appConfig } from '@/lib/appConfig';
7
- import { LLMCopyHandler } from '@third-ui/fuma/server';
7
+ import { LLMCopyHandler } from '@windrun-huaiin/third-ui/fuma/server';
8
8
 
9
9
  export async function GET(request: NextRequest) {
10
10
  const searchParams = request.nextUrl.searchParams;
@@ -3,8 +3,8 @@
3
3
 
4
4
  import Image from "next/image"
5
5
  import { useTranslations } from 'next-intl'
6
- import { globalLucideIcons as icons} from '@base-ui/components/global-icon'
7
- import { GradientButton } from "@third-ui/fuma/mdx"
6
+ import { globalLucideIcons as icons} from '@windrun-huaiin/base-ui/components/server'
7
+ import { GradientButton } from "@windrun-huaiin/third-ui/fuma/mdx"
8
8
 
9
9
  export function Hero() {
10
10
  const t = useTranslations('hero');
@@ -10,7 +10,7 @@ import {
10
10
  SiteX,
11
11
  ZiaFile,
12
12
  ZiaFolder,
13
- } from "@third-ui/fuma/mdx";
13
+ } from "@windrun-huaiin/third-ui/fuma/mdx";
14
14
  import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
15
15
  import { Callout } from "fumadocs-ui/components/callout";
16
16
  import { File, Folder, Files } from "fumadocs-ui/components/files";
@@ -18,7 +18,7 @@ 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 "@base-ui/components/global-icon";
21
+ import { globalLucideIcons as icons } from "@windrun-huaiin/base-ui/components/server";
22
22
  import { appConfig } from "@/lib/appConfig";
23
23
 
24
24
  // create a mapping from language identifier to icon component
@@ -1,4 +1,4 @@
1
- import { createCommonAppConfig, createI18nHelpers, LOCALE_PRESETS } from "@lib/common-app-config";
1
+ import { createCommonAppConfig, createI18nHelpers, LOCALE_PRESETS } from "@windrun-huaiin/lib/common-app-config";
2
2
 
3
3
  // 创建应用配置
4
4
  export const appConfig = {
@@ -1,4 +1,4 @@
1
- import { PricePlanAppConfig } from "@third-ui/main/price-plan";
1
+ import { PricePlanAppConfig } from "@windrun-huaiin/third-ui/main";
2
2
 
3
3
  export const pricePlanConfig: PricePlanAppConfig = {
4
4
  billingOptions: [
@@ -1,3 +1,3 @@
1
- import { createSiteIcon } from "@base-ui/components/server";
1
+ import { createSiteIcon } from "@windrun-huaiin/base-ui/components/server";
2
2
 
3
3
  export const SiteIcon = createSiteIcon('Pi');
@@ -1,5 +1,5 @@
1
1
  import { blog } from '.source';
2
- import { getIconElement } from '@base-ui/components/global-icon';
2
+ import { getIconElement } from '@windrun-huaiin/base-ui/components/server';
3
3
  import { i18n } from '@/i18n';
4
4
  import { loader } from 'fumadocs-core/source';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { legal } from '.source';
2
2
  import { i18n } from '@/i18n';
3
- import { getIconElement } from '@base-ui/components/global-icon';
3
+ import { getIconElement } from '@windrun-huaiin/base-ui/components/server';
4
4
  import { loader } from 'fumadocs-core/source';
5
5
 
6
6
  export const legalSource = loader({
package/tsconfig.json CHANGED
@@ -26,13 +26,10 @@
26
26
  "paths": {
27
27
  "@/*": [ "./src/*" ],
28
28
  ".source/*": ["./.source/*"],
29
- "@third-ui/*": ["../../packages/third-ui/src/*"],
30
- "@base-ui/*": ["../../packages/base-ui/src/*"],
31
- "@lib/*": ["../../packages/lib/src/*"]
32
29
  }
33
30
  },
34
31
  "include": [
35
- "apps/diaomao/next-env.d.ts",
32
+ "apps/zhengchengyan/next-env.d.ts",
36
33
  "**/*.ts",
37
34
  "**/*.tsx",
38
35
  ".next/types/**/*.ts"
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "CommonJS",
6
+ "moduleResolution": "node",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true,
9
+ "target": "ES2020",
10
+ "lib": [
11
+ "ES2020"
12
+ ],
13
+ "esModuleInterop": true
14
+ },
15
+ "include": [
16
+ "scripts/**/*"
17
+ ]
18
+ }