@lark-apaas/coding-template-nestjs-react-fullstack 0.1.34-alpha.20260831015214 → 0.1.34
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/package.json +1 -1
- package/template/client/src/components/business-ui/tiptap-editor/README.md +324 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/attachment-toolbar-button.tsx +74 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/blockquote-toolbar-button.tsx +41 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/code-block-toolbar-button.tsx +41 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/color-highlight-toolbar-button.tsx +141 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/heading-toolbar-button.tsx +99 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/horizontal-rule-toolbar-button.tsx +39 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/image-upload-toolbar-button.tsx +65 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/link-edit-form.tsx +127 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/link-hover-toolbar.tsx +380 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/link-toolbar-button.tsx +96 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/list-toolbar-button.tsx +75 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/mark-toolbar-button.tsx +118 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/text-align-toolbar-button.tsx +84 -0
- package/template/client/src/components/business-ui/tiptap-editor/components/undo-redo-toolbar-button.tsx +54 -0
- package/template/client/src/components/business-ui/tiptap-editor/extensions/attachment.tsx +539 -0
- package/template/client/src/components/business-ui/tiptap-editor/extensions/code-block-shiki.tsx +236 -0
- package/template/client/src/components/business-ui/tiptap-editor/extensions/complete-kit.ts +260 -0
- package/template/client/src/components/business-ui/tiptap-editor/extensions/image.tsx +456 -0
- package/template/client/src/components/business-ui/tiptap-editor/hooks/use-tiptap-editor.ts +47 -0
- package/template/client/src/components/business-ui/tiptap-editor/index.ts +38 -0
- package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor-complete.tsx +112 -0
- package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor.tsx +169 -0
- package/template/client/src/components/ui/streamdown.tsx +186 -0
- package/template/client/src/index.css +1 -0
- package/template/client/src/lib/shiki.ts +92 -0
- package/template/nest-cli.json +9 -10
- package/template/package-lock.json +11958 -6326
- package/template/package.json +51 -7
- package/template/scripts/build.sh +0 -12
- package/template/vite.config.ts +1 -1
- package/template/client/src/components/ui/markdown.tsx +0 -43
package/template/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"flags": {
|
|
6
6
|
"supportBusinessUser": true,
|
|
7
7
|
"supportScrollReveal": true,
|
|
8
|
+
"supportTiptapAndStreamdown": true,
|
|
8
9
|
"customToaster": true
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
@@ -34,8 +35,8 @@
|
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@lark-apaas/fullstack-nestjs-core": "^1.1.60",
|
|
36
37
|
"@nestjs/axios": "^4.0.1",
|
|
37
|
-
"@nestjs/cache-manager": "^3.1.3",
|
|
38
38
|
"@nestjs/common": "^10.4.20",
|
|
39
|
+
"@nestjs/cache-manager": "^3.1.3",
|
|
39
40
|
"@nestjs/config": "^3.3.0",
|
|
40
41
|
"@nestjs/core": "^10.4.20",
|
|
41
42
|
"@nestjs/platform-express": "^10.4.20",
|
|
@@ -55,10 +56,15 @@
|
|
|
55
56
|
"tslib": "^2.8.1"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
59
|
+
"@dnd-kit/core": "^6.3.1",
|
|
60
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
61
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
62
|
+
"@headlessui/react": "^2.2.9",
|
|
63
|
+
"@heroicons/react": "^2.2.0",
|
|
58
64
|
"@hookform/resolvers": "^5.2.2",
|
|
59
|
-
"@lark-apaas/client-toolkit": "^1.2.
|
|
60
|
-
"@lark-apaas/coding-preset-vite-react": "1.0.20-alpha.20260827110844",
|
|
65
|
+
"@lark-apaas/client-toolkit": "^1.2.68",
|
|
61
66
|
"@lark-apaas/fullstack-presets": "^1.1.0",
|
|
67
|
+
"@lark-apaas/fullstack-vite-preset": "^1.0.36",
|
|
62
68
|
"@nestjs/cli": "^10.4.9",
|
|
63
69
|
"@nestjs/testing": "^10.4.20",
|
|
64
70
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
@@ -87,8 +93,29 @@
|
|
|
87
93
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
88
94
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
89
95
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
96
|
+
"@reduxjs/toolkit": "^2.9.0",
|
|
97
|
+
"@shikijs/langs": "^3.21.0",
|
|
98
|
+
"@shikijs/themes": "^3.21.0",
|
|
99
|
+
"@swc/cli": "^0.5.2",
|
|
100
|
+
"@swc/core": "^1.16.1",
|
|
90
101
|
"@tailwindcss/postcss": "^4.1.13",
|
|
91
102
|
"@tailwindcss/typography": "^0.5.19",
|
|
103
|
+
"@tiptap/core": "^3.14.0",
|
|
104
|
+
"@tiptap/extension-code-block": "^3.15.3",
|
|
105
|
+
"@tiptap/extension-code-block-lowlight": "^3.14.0",
|
|
106
|
+
"@tiptap/extension-color": "^3.14.0",
|
|
107
|
+
"@tiptap/extension-highlight": "^3.14.0",
|
|
108
|
+
"@tiptap/extension-image": "^3.14.0",
|
|
109
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
110
|
+
"@tiptap/extension-placeholder": "^3.14.0",
|
|
111
|
+
"@tiptap/extension-task-item": "^3.15.3",
|
|
112
|
+
"@tiptap/extension-task-list": "^3.15.3",
|
|
113
|
+
"@tiptap/extension-text-align": "^3.14.0",
|
|
114
|
+
"@tiptap/extension-text-style": "^3.14.0",
|
|
115
|
+
"@tiptap/extension-underline": "^3.14.0",
|
|
116
|
+
"@tiptap/pm": "^3.15.3",
|
|
117
|
+
"@tiptap/react": "^3.14.0",
|
|
118
|
+
"@tiptap/starter-kit": "^3.14.0",
|
|
92
119
|
"@types/crypto-js": "^4.2.2",
|
|
93
120
|
"@types/express": "^5.0.3",
|
|
94
121
|
"@types/hbs": "^4.0.5",
|
|
@@ -100,7 +127,9 @@
|
|
|
100
127
|
"class-variance-authority": "^0.7.1",
|
|
101
128
|
"clsx": "~2.0.1",
|
|
102
129
|
"cmdk": "^1.1.1",
|
|
130
|
+
"cobe": "^0.6.5",
|
|
103
131
|
"concurrently": "^9.2.1",
|
|
132
|
+
"css-loader": "^7.1.2",
|
|
104
133
|
"date-fns": "^4.1.0",
|
|
105
134
|
"echarts": "~5.6.0",
|
|
106
135
|
"echarts-for-react": "~3.0.2",
|
|
@@ -108,30 +137,42 @@
|
|
|
108
137
|
"es-toolkit": "^1.43.0",
|
|
109
138
|
"eslint": "^9.35.0",
|
|
110
139
|
"eslint-config-prettier": "^9.1.2",
|
|
140
|
+
"form-data": "^4.0.4",
|
|
111
141
|
"framer-motion": "~11.13.5",
|
|
112
142
|
"gsap": "^3.13.0",
|
|
143
|
+
"html2canvas": "^1.4.1",
|
|
113
144
|
"input-otp": "^1.4.2",
|
|
114
145
|
"jest": "^29.7.0",
|
|
146
|
+
"js-base64": "^3.7.8",
|
|
147
|
+
"jspdf": "^3.0.3",
|
|
115
148
|
"lodash": "^4.17.21",
|
|
116
149
|
"lucide-react": "^0.554.0",
|
|
117
150
|
"nanoid": "^5.1.6",
|
|
118
151
|
"next-themes": "^0.4.6",
|
|
152
|
+
"pinyin-pro": "^3.27.0",
|
|
119
153
|
"postcss": "^8.5.6",
|
|
120
154
|
"postcss-import": "^16.1.1",
|
|
155
|
+
"postcss-loader": "^8.2.0",
|
|
121
156
|
"prettier": "^3.6.2",
|
|
157
|
+
"qrcode.react": "^4.2.0",
|
|
122
158
|
"radix-ui": "^1.4.3",
|
|
123
159
|
"react": "^19.2.0",
|
|
160
|
+
"react-countup": "^6.5.3",
|
|
124
161
|
"react-day-picker": "^9.11.1",
|
|
125
162
|
"react-dom": "^19.2.0",
|
|
163
|
+
"react-dropzone": "^14.3.5",
|
|
126
164
|
"react-error-boundary": "^6.0.0",
|
|
127
165
|
"react-hook-form": "^7.65.0",
|
|
128
|
-
"react-
|
|
166
|
+
"react-redux": "^9.2.0",
|
|
167
|
+
"react-refresh": "^0.17.0",
|
|
129
168
|
"react-resizable-panels": "^3.0.6",
|
|
130
169
|
"react-router-dom": "^6.30.1",
|
|
131
170
|
"recharts": "^2.15.4",
|
|
132
|
-
"remark-gfm": "^4.0.1",
|
|
133
171
|
"rxjs": "^7.8.2",
|
|
172
|
+
"shiki": "^3.21.0",
|
|
134
173
|
"sonner": "^2.0.7",
|
|
174
|
+
"streamdown": "^1.6.10",
|
|
175
|
+
"style-loader": "^4.0.0",
|
|
135
176
|
"stylelint": "^16.11.0",
|
|
136
177
|
"tailwind-merge": "~3.4.0",
|
|
137
178
|
"tailwindcss": "^4.1.13",
|
|
@@ -142,8 +183,11 @@
|
|
|
142
183
|
"typescript-eslint": "^8.44.0",
|
|
143
184
|
"uuid": "11.0.5",
|
|
144
185
|
"vaul": "^1.1.2",
|
|
145
|
-
"vite": "^
|
|
146
|
-
"
|
|
186
|
+
"vite": "^7.3.1",
|
|
187
|
+
"xlsx": "^0.18.5",
|
|
188
|
+
"xlsx-js-style": "^1.2.0",
|
|
189
|
+
"zod": "^3.25.76",
|
|
190
|
+
"zustand": "~5.0.8"
|
|
147
191
|
},
|
|
148
192
|
"overrides": {
|
|
149
193
|
"dayjs": "^1.11.15"
|
|
@@ -94,18 +94,6 @@ cp "$ROOT_DIR/dist/client/"*.html "$OUT_DIR/dist/client/" || true
|
|
|
94
94
|
# 拷贝 run.sh 文件
|
|
95
95
|
cp "$ROOT_DIR/scripts/run.sh" "$OUT_DIR/"
|
|
96
96
|
|
|
97
|
-
# 拷贝 shared/static → OUT_DIR/shared/static
|
|
98
|
-
# Nest server 生产从 process.cwd() + shared/static 读 (nestjs-core static.controller.ts:100),
|
|
99
|
-
# 生产 cwd = $OUT_DIR (dist/server), 所以目标是 dist/server/shared/static。
|
|
100
|
-
# coding-preset 的 static-assets plugin 之前 closeBundle 拷贝, 现在删除后由 build.sh 显式做。
|
|
101
|
-
# 排除 .ts/.tsx/.js/.jsx: 避免 shared/static/ 里若有开发脚本被误传到生产。
|
|
102
|
-
if [ -d "$ROOT_DIR/shared/static" ]; then
|
|
103
|
-
mkdir -p "$OUT_DIR/shared/static"
|
|
104
|
-
rsync -a --exclude='*.ts' --exclude='*.tsx' --exclude='*.js' --exclude='*.jsx' \
|
|
105
|
-
"$ROOT_DIR/shared/static/" "$OUT_DIR/shared/static/"
|
|
106
|
-
echo " Static → dist/server/shared/static/"
|
|
107
|
-
fi
|
|
108
|
-
|
|
109
97
|
# 清理无用文件
|
|
110
98
|
rm -rf "$ROOT_DIR/dist/scripts"
|
|
111
99
|
rm -rf "$ROOT_DIR/dist/tsconfig.node.tsbuildinfo"
|
package/template/vite.config.ts
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import ReactMarkdown, { type Options } from 'react-markdown';
|
|
5
|
-
import remarkGfm from 'remark-gfm';
|
|
6
|
-
|
|
7
|
-
import { cn } from '@/lib/utils';
|
|
8
|
-
|
|
9
|
-
export interface MarkdownProps extends Options {
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const defaultComponents: NonNullable<Options['components']> = {
|
|
14
|
-
a: ({ className, href, ...props }) => (
|
|
15
|
-
<a
|
|
16
|
-
className={cn(className)}
|
|
17
|
-
href={href}
|
|
18
|
-
rel={props.rel ?? 'noreferrer'}
|
|
19
|
-
target={props.target ?? '_blank'}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
),
|
|
23
|
-
img: ({ className, alt, ...props }) => (
|
|
24
|
-
<img className={cn(className)} alt={alt ?? ''} {...props} />
|
|
25
|
-
),
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export function Markdown({
|
|
29
|
-
className,
|
|
30
|
-
remarkPlugins,
|
|
31
|
-
components,
|
|
32
|
-
...props
|
|
33
|
-
}: MarkdownProps) {
|
|
34
|
-
return (
|
|
35
|
-
<div className={cn('prose max-w-none dark:prose-invert', className)}>
|
|
36
|
-
<ReactMarkdown
|
|
37
|
-
remarkPlugins={[remarkGfm, ...(remarkPlugins ?? [])]}
|
|
38
|
-
components={{ ...defaultComponents, ...components }}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
}
|