@lark-apaas/coding-template-nestjs-react-fullstack 0.1.38-alpha.20260909120821 → 0.1.38

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/template/client/src/components/business-ui/tiptap-editor/README.md +324 -0
  3. package/template/client/src/components/business-ui/tiptap-editor/components/attachment-toolbar-button.tsx +74 -0
  4. package/template/client/src/components/business-ui/tiptap-editor/components/blockquote-toolbar-button.tsx +41 -0
  5. package/template/client/src/components/business-ui/tiptap-editor/components/code-block-toolbar-button.tsx +41 -0
  6. package/template/client/src/components/business-ui/tiptap-editor/components/color-highlight-toolbar-button.tsx +141 -0
  7. package/template/client/src/components/business-ui/tiptap-editor/components/heading-toolbar-button.tsx +99 -0
  8. package/template/client/src/components/business-ui/tiptap-editor/components/horizontal-rule-toolbar-button.tsx +39 -0
  9. package/template/client/src/components/business-ui/tiptap-editor/components/image-upload-toolbar-button.tsx +65 -0
  10. package/template/client/src/components/business-ui/tiptap-editor/components/link-edit-form.tsx +127 -0
  11. package/template/client/src/components/business-ui/tiptap-editor/components/link-hover-toolbar.tsx +380 -0
  12. package/template/client/src/components/business-ui/tiptap-editor/components/link-toolbar-button.tsx +96 -0
  13. package/template/client/src/components/business-ui/tiptap-editor/components/list-toolbar-button.tsx +75 -0
  14. package/template/client/src/components/business-ui/tiptap-editor/components/mark-toolbar-button.tsx +118 -0
  15. package/template/client/src/components/business-ui/tiptap-editor/components/text-align-toolbar-button.tsx +84 -0
  16. package/template/client/src/components/business-ui/tiptap-editor/components/undo-redo-toolbar-button.tsx +54 -0
  17. package/template/client/src/components/business-ui/tiptap-editor/extensions/attachment.tsx +539 -0
  18. package/template/client/src/components/business-ui/tiptap-editor/extensions/code-block-shiki.tsx +236 -0
  19. package/template/client/src/components/business-ui/tiptap-editor/extensions/complete-kit.ts +260 -0
  20. package/template/client/src/components/business-ui/tiptap-editor/extensions/image.tsx +456 -0
  21. package/template/client/src/components/business-ui/tiptap-editor/hooks/use-tiptap-editor.ts +47 -0
  22. package/template/client/src/components/business-ui/tiptap-editor/index.ts +38 -0
  23. package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor-complete.tsx +112 -0
  24. package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor.tsx +169 -0
  25. package/template/client/src/components/ui/streamdown.tsx +186 -0
  26. package/template/client/src/index.css +1 -0
  27. package/template/client/src/lib/shiki.ts +92 -0
  28. package/template/package-lock.json +17809 -10291
  29. package/template/package.json +76 -19
  30. package/template/client/src/components/ui/markdown.tsx +0 -43
@@ -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,17 +19,21 @@
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
  },
30
35
  "dependencies": {
31
- "@lark-apaas/fullstack-nestjs-core": "^1.1.60",
36
+ "@lark-apaas/fullstack-nestjs-core": "^1.1.61",
32
37
  "@nestjs/axios": "^4.0.1",
33
38
  "@nestjs/cache-manager": "^3.1.3",
34
39
  "@nestjs/common": "^10.4.20",
@@ -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.69",
56
- "@lark-apaas/coding-preset-vite-react": "^1.0.21",
65
+ "@lark-apaas/client-toolkit": "^1.2.70",
66
+ "@lark-apaas/coding-preset-vite-react": "^1.0.22",
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,66 +93,112 @@
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",
85
99
  "@swc/cli": "^0.5.2",
86
100
  "@swc/core": "^1.16.1",
87
101
  "@tailwindcss/postcss": "^4.1.13",
88
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",
89
119
  "@types/crypto-js": "^4.2.2",
90
120
  "@types/express": "^5.0.3",
91
121
  "@types/hbs": "^4.0.5",
122
+ "@types/jest": "^29.5.14",
92
123
  "@types/node": "^22.18.6",
93
124
  "@types/react": "^19.2.0",
94
125
  "@types/react-dom": "^19.2.0",
95
126
  "autoprefixer": "^10.4.21",
96
127
  "class-variance-authority": "^0.7.1",
97
- "clsx": "^2.1.1",
128
+ "clsx": "~2.0.1",
98
129
  "cmdk": "^1.1.1",
130
+ "cobe": "^0.6.5",
99
131
  "concurrently": "^9.2.1",
132
+ "css-loader": "^7.1.2",
100
133
  "date-fns": "^4.1.0",
101
- "echarts": "^6.1.0",
134
+ "echarts": "~5.6.0",
102
135
  "echarts-for-react": "~3.0.2",
103
136
  "embla-carousel-react": "^8.6.0",
137
+ "es-toolkit": "^1.43.0",
104
138
  "eslint": "^9.35.0",
105
- "framer-motion": "^12.38.0",
139
+ "eslint-config-prettier": "^9.1.2",
140
+ "form-data": "^4.0.4",
141
+ "framer-motion": "~11.13.5",
106
142
  "gsap": "^3.13.0",
143
+ "html2canvas": "^1.4.1",
107
144
  "input-otp": "^1.4.2",
145
+ "jest": "^29.7.0",
146
+ "js-base64": "^3.7.8",
147
+ "jspdf": "^3.0.3",
108
148
  "lodash": "^4.17.21",
109
- "lucide-react": "0.577.0",
149
+ "lucide-react": "^0.554.0",
110
150
  "nanoid": "^5.1.6",
111
151
  "next-themes": "^0.4.6",
152
+ "pinyin-pro": "^3.27.0",
112
153
  "postcss": "^8.5.6",
113
154
  "postcss-import": "^16.1.1",
155
+ "postcss-loader": "^8.2.0",
156
+ "prettier": "^3.6.2",
157
+ "qrcode.react": "^4.2.0",
114
158
  "radix-ui": "^1.4.3",
115
159
  "react": "^19.2.0",
160
+ "react-countup": "^6.5.3",
116
161
  "react-day-picker": "^9.11.1",
117
162
  "react-dom": "^19.2.0",
163
+ "react-dropzone": "^14.3.5",
118
164
  "react-error-boundary": "^6.0.0",
119
165
  "react-hook-form": "^7.65.0",
120
- "react-markdown": "^10.1.0",
166
+ "react-redux": "^9.2.0",
167
+ "react-refresh": "^0.17.0",
121
168
  "react-resizable-panels": "^3.0.6",
122
- "react-router-dom": "^7.13.2",
169
+ "react-router-dom": "^6.30.1",
123
170
  "recharts": "^2.15.4",
124
- "remark-gfm": "^4.0.1",
125
171
  "rxjs": "^7.8.2",
172
+ "shiki": "^3.21.0",
126
173
  "sonner": "^2.0.7",
127
- "stylelint": "^17.3.0",
128
- "tailwind-merge": "^3.5.0",
174
+ "streamdown": "^1.6.10",
175
+ "style-loader": "^4.0.0",
176
+ "stylelint": "^16.11.0",
177
+ "tailwind-merge": "~3.4.0",
129
178
  "tailwindcss": "^4.1.13",
179
+ "ts-jest": "^29.4.3",
180
+ "ts-node": "^10.9.2",
130
181
  "tw-animate-css": "^1.3.8",
131
182
  "typescript": "^5.9.2",
132
183
  "typescript-eslint": "^8.44.0",
133
184
  "uuid": "11.0.5",
134
185
  "vaul": "^1.1.2",
135
186
  "vite": "^8",
136
- "zod": "^4.3.6"
187
+ "xlsx": "^0.18.5",
188
+ "xlsx-js-style": "^1.2.0",
189
+ "zod": "^3.25.76",
190
+ "zustand": "~5.0.8"
137
191
  },
138
192
  "overrides": {
139
- "dayjs": "^1.11.15",
140
- "clsx": "^2.1.1",
141
- "tailwind-merge": "^3.5.0",
142
- "zod": "^4.3.6",
143
- "echarts": "^6.1.0",
144
- "stylelint": "^17.3.0"
193
+ "dayjs": "^1.11.15"
194
+ },
195
+ "jest": {
196
+ "preset": "ts-jest",
197
+ "testEnvironment": "node",
198
+ "testMatch": [
199
+ "<rootDir>/server/**/*.spec.ts",
200
+ "<rootDir>/test/unit/**/*.spec.ts"
201
+ ]
145
202
  },
146
203
  "engines": {
147
204
  "node": ">=22.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
- }