@lark-apaas/coding-template-nestjs-react-fullstack 0.1.35 → 0.1.36-alpha.20260901035538
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/ui/markdown.tsx +43 -0
- package/template/client/src/index.css +0 -1
- package/template/nest-cli.json +10 -9
- package/template/package-lock.json +10339 -18979
- package/template/package.json +7 -70
- package/template/scripts/build.sh +12 -0
- package/template/vite.config.ts +1 -1
- package/template/client/src/components/business-ui/tiptap-editor/README.md +0 -324
- package/template/client/src/components/business-ui/tiptap-editor/components/attachment-toolbar-button.tsx +0 -74
- package/template/client/src/components/business-ui/tiptap-editor/components/blockquote-toolbar-button.tsx +0 -41
- package/template/client/src/components/business-ui/tiptap-editor/components/code-block-toolbar-button.tsx +0 -41
- package/template/client/src/components/business-ui/tiptap-editor/components/color-highlight-toolbar-button.tsx +0 -141
- package/template/client/src/components/business-ui/tiptap-editor/components/heading-toolbar-button.tsx +0 -99
- package/template/client/src/components/business-ui/tiptap-editor/components/horizontal-rule-toolbar-button.tsx +0 -39
- package/template/client/src/components/business-ui/tiptap-editor/components/image-upload-toolbar-button.tsx +0 -65
- package/template/client/src/components/business-ui/tiptap-editor/components/link-edit-form.tsx +0 -127
- package/template/client/src/components/business-ui/tiptap-editor/components/link-hover-toolbar.tsx +0 -380
- package/template/client/src/components/business-ui/tiptap-editor/components/link-toolbar-button.tsx +0 -96
- package/template/client/src/components/business-ui/tiptap-editor/components/list-toolbar-button.tsx +0 -75
- package/template/client/src/components/business-ui/tiptap-editor/components/mark-toolbar-button.tsx +0 -118
- package/template/client/src/components/business-ui/tiptap-editor/components/text-align-toolbar-button.tsx +0 -84
- package/template/client/src/components/business-ui/tiptap-editor/components/undo-redo-toolbar-button.tsx +0 -54
- package/template/client/src/components/business-ui/tiptap-editor/extensions/attachment.tsx +0 -539
- package/template/client/src/components/business-ui/tiptap-editor/extensions/code-block-shiki.tsx +0 -236
- package/template/client/src/components/business-ui/tiptap-editor/extensions/complete-kit.ts +0 -260
- package/template/client/src/components/business-ui/tiptap-editor/extensions/image.tsx +0 -456
- package/template/client/src/components/business-ui/tiptap-editor/hooks/use-tiptap-editor.ts +0 -47
- package/template/client/src/components/business-ui/tiptap-editor/index.ts +0 -38
- package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor-complete.tsx +0 -112
- package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor.tsx +0 -169
- package/template/client/src/components/ui/streamdown.tsx +0 -186
- package/template/client/src/lib/shiki.ts +0 -92
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
package/template/nest-cli.json
CHANGED
|
@@ -5,20 +5,21 @@
|
|
|
5
5
|
"compilerOptions": {
|
|
6
6
|
"deleteOutDir": false,
|
|
7
7
|
"tsConfigPath": "tsconfig.node.json",
|
|
8
|
-
"typeCheck": true,
|
|
9
|
-
"builder": {
|
|
10
|
-
"type": "swc",
|
|
11
|
-
"options": {
|
|
12
|
-
"filenames": ["server", "shared"],
|
|
13
|
-
"stripLeadingPaths": false
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
8
|
"assets": [
|
|
17
9
|
{
|
|
18
10
|
"include": "capabilities/**/*.json",
|
|
19
11
|
"outDir": "dist/server",
|
|
20
12
|
"watchAssets": true
|
|
21
13
|
}
|
|
14
|
+
],
|
|
15
|
+
"plugins": [
|
|
16
|
+
{
|
|
17
|
+
"name": "@nestjs/swagger",
|
|
18
|
+
"options": {
|
|
19
|
+
"introspectComments": true,
|
|
20
|
+
"classValidatorShim": true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
22
23
|
]
|
|
23
24
|
}
|
|
24
|
-
}
|
|
25
|
+
}
|