@lark-apaas/coding-template-nestjs-react-fullstack 0.1.36-alpha.20260902024923 → 0.1.36-alpha.20260902085217
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 +18307 -9660
- package/template/package.json +68 -5
- 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": {
|
|
@@ -18,12 +19,16 @@
|
|
|
18
19
|
"build:server": "NODE_ENV=production nest build",
|
|
19
20
|
"build:client": "NODE_ENV=production vite build --config vite.config.ts",
|
|
20
21
|
"start": "NODE_ENV=production node main.js",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"test:watch": "jest --watch",
|
|
24
|
+
"test:e2e": "jest --config test/e2e/jest.config.js",
|
|
21
25
|
"eslint": "eslint . --quiet",
|
|
22
26
|
"stylelint": "stylelint client/src/**/*.css --quiet",
|
|
23
27
|
"type:check": "concurrently -n \"server,client\" -c \"blue,green\" \"npm run type:check:server\" \"npm run type:check:client\"",
|
|
24
28
|
"type:check:client": "tsc --noEmit --project tsconfig.app.json",
|
|
25
29
|
"type:check:server": "tsc --noEmit --project tsconfig.node.json",
|
|
26
30
|
"lint": "node ./scripts/lint.js",
|
|
31
|
+
"format": "prettier --write \"{server,client,test}/**/*.{js,ts,tsx,json,md}\"",
|
|
27
32
|
"precommit": "node scripts/hooks/run-precommit.js",
|
|
28
33
|
"upgrade": "npx -y @lark-apaas/fullstack-cli sync --disable-gen-openapi"
|
|
29
34
|
},
|
|
@@ -51,11 +56,17 @@
|
|
|
51
56
|
"tslib": "^2.8.1"
|
|
52
57
|
},
|
|
53
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",
|
|
54
64
|
"@hookform/resolvers": "^5.2.2",
|
|
55
|
-
"@lark-apaas/client-toolkit": "^1.2.
|
|
56
|
-
"@lark-apaas/coding-preset-vite-react": "1.0.
|
|
65
|
+
"@lark-apaas/client-toolkit": "^1.2.69",
|
|
66
|
+
"@lark-apaas/coding-preset-vite-react": "1.0.21-alpha.20260902084607",
|
|
57
67
|
"@lark-apaas/fullstack-presets": "^1.1.0",
|
|
58
68
|
"@nestjs/cli": "^10.4.9",
|
|
69
|
+
"@nestjs/testing": "^10.4.20",
|
|
59
70
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
60
71
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
61
72
|
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
@@ -82,11 +93,33 @@
|
|
|
82
93
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
83
94
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
84
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",
|
|
85
101
|
"@tailwindcss/postcss": "^4.1.13",
|
|
86
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",
|
|
87
119
|
"@types/crypto-js": "^4.2.2",
|
|
88
120
|
"@types/express": "^5.0.3",
|
|
89
121
|
"@types/hbs": "^4.0.5",
|
|
122
|
+
"@types/jest": "^29.5.14",
|
|
90
123
|
"@types/node": "^22.18.6",
|
|
91
124
|
"@types/react": "^19.2.0",
|
|
92
125
|
"@types/react-dom": "^19.2.0",
|
|
@@ -94,49 +127,79 @@
|
|
|
94
127
|
"class-variance-authority": "^0.7.1",
|
|
95
128
|
"clsx": "~2.0.1",
|
|
96
129
|
"cmdk": "^1.1.1",
|
|
130
|
+
"cobe": "^0.6.5",
|
|
97
131
|
"concurrently": "^9.2.1",
|
|
132
|
+
"css-loader": "^7.1.2",
|
|
98
133
|
"date-fns": "^4.1.0",
|
|
99
134
|
"echarts": "~5.6.0",
|
|
100
135
|
"echarts-for-react": "~3.0.2",
|
|
101
136
|
"embla-carousel-react": "^8.6.0",
|
|
102
137
|
"es-toolkit": "^1.43.0",
|
|
103
138
|
"eslint": "^9.35.0",
|
|
139
|
+
"eslint-config-prettier": "^9.1.2",
|
|
140
|
+
"form-data": "^4.0.4",
|
|
104
141
|
"framer-motion": "~11.13.5",
|
|
105
142
|
"gsap": "^3.13.0",
|
|
143
|
+
"html2canvas": "^1.4.1",
|
|
106
144
|
"input-otp": "^1.4.2",
|
|
145
|
+
"jest": "^29.7.0",
|
|
146
|
+
"js-base64": "^3.7.8",
|
|
147
|
+
"jspdf": "^3.0.3",
|
|
107
148
|
"lodash": "^4.17.21",
|
|
108
149
|
"lucide-react": "^0.554.0",
|
|
109
150
|
"nanoid": "^5.1.6",
|
|
110
151
|
"next-themes": "^0.4.6",
|
|
152
|
+
"pinyin-pro": "^3.27.0",
|
|
111
153
|
"postcss": "^8.5.6",
|
|
112
154
|
"postcss-import": "^16.1.1",
|
|
155
|
+
"postcss-loader": "^8.2.0",
|
|
156
|
+
"prettier": "^3.6.2",
|
|
157
|
+
"qrcode.react": "^4.2.0",
|
|
113
158
|
"radix-ui": "^1.4.3",
|
|
114
159
|
"react": "^19.2.0",
|
|
160
|
+
"react-countup": "^6.5.3",
|
|
115
161
|
"react-day-picker": "^9.11.1",
|
|
116
162
|
"react-dom": "^19.2.0",
|
|
163
|
+
"react-dropzone": "^14.3.5",
|
|
117
164
|
"react-error-boundary": "^6.0.0",
|
|
118
165
|
"react-hook-form": "^7.65.0",
|
|
119
|
-
"react-
|
|
166
|
+
"react-redux": "^9.2.0",
|
|
167
|
+
"react-refresh": "^0.17.0",
|
|
120
168
|
"react-resizable-panels": "^3.0.6",
|
|
121
169
|
"react-router-dom": "^6.30.1",
|
|
122
170
|
"recharts": "^2.15.4",
|
|
123
|
-
"remark-gfm": "^4.0.1",
|
|
124
171
|
"rxjs": "^7.8.2",
|
|
172
|
+
"shiki": "^3.21.0",
|
|
125
173
|
"sonner": "^2.0.7",
|
|
174
|
+
"streamdown": "^1.6.10",
|
|
175
|
+
"style-loader": "^4.0.0",
|
|
126
176
|
"stylelint": "^16.11.0",
|
|
127
177
|
"tailwind-merge": "~3.4.0",
|
|
128
178
|
"tailwindcss": "^4.1.13",
|
|
179
|
+
"ts-jest": "^29.4.3",
|
|
180
|
+
"ts-node": "^10.9.2",
|
|
129
181
|
"tw-animate-css": "^1.3.8",
|
|
130
182
|
"typescript": "^5.9.2",
|
|
131
183
|
"typescript-eslint": "^8.44.0",
|
|
132
184
|
"uuid": "11.0.5",
|
|
133
185
|
"vaul": "^1.1.2",
|
|
134
186
|
"vite": "^8",
|
|
135
|
-
"
|
|
187
|
+
"xlsx": "^0.18.5",
|
|
188
|
+
"xlsx-js-style": "^1.2.0",
|
|
189
|
+
"zod": "^3.25.76",
|
|
190
|
+
"zustand": "~5.0.8"
|
|
136
191
|
},
|
|
137
192
|
"overrides": {
|
|
138
193
|
"dayjs": "^1.11.15"
|
|
139
194
|
},
|
|
195
|
+
"jest": {
|
|
196
|
+
"preset": "ts-jest",
|
|
197
|
+
"testEnvironment": "node",
|
|
198
|
+
"testMatch": [
|
|
199
|
+
"<rootDir>/server/**/*.spec.ts",
|
|
200
|
+
"<rootDir>/test/unit/**/*.spec.ts"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
140
203
|
"engines": {
|
|
141
204
|
"node": ">=22.0.0",
|
|
142
205
|
"npm": ">=10.0.0"
|
|
@@ -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
|
-
}
|