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

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/ui/markdown.tsx +43 -0
  3. package/template/client/src/index.css +0 -1
  4. package/template/package-lock.json +10378 -17896
  5. package/template/package.json +16 -73
  6. package/template/client/src/components/business-ui/tiptap-editor/README.md +0 -324
  7. package/template/client/src/components/business-ui/tiptap-editor/components/attachment-toolbar-button.tsx +0 -74
  8. package/template/client/src/components/business-ui/tiptap-editor/components/blockquote-toolbar-button.tsx +0 -41
  9. package/template/client/src/components/business-ui/tiptap-editor/components/code-block-toolbar-button.tsx +0 -41
  10. package/template/client/src/components/business-ui/tiptap-editor/components/color-highlight-toolbar-button.tsx +0 -141
  11. package/template/client/src/components/business-ui/tiptap-editor/components/heading-toolbar-button.tsx +0 -99
  12. package/template/client/src/components/business-ui/tiptap-editor/components/horizontal-rule-toolbar-button.tsx +0 -39
  13. package/template/client/src/components/business-ui/tiptap-editor/components/image-upload-toolbar-button.tsx +0 -65
  14. package/template/client/src/components/business-ui/tiptap-editor/components/link-edit-form.tsx +0 -127
  15. package/template/client/src/components/business-ui/tiptap-editor/components/link-hover-toolbar.tsx +0 -380
  16. package/template/client/src/components/business-ui/tiptap-editor/components/link-toolbar-button.tsx +0 -96
  17. package/template/client/src/components/business-ui/tiptap-editor/components/list-toolbar-button.tsx +0 -75
  18. package/template/client/src/components/business-ui/tiptap-editor/components/mark-toolbar-button.tsx +0 -118
  19. package/template/client/src/components/business-ui/tiptap-editor/components/text-align-toolbar-button.tsx +0 -84
  20. package/template/client/src/components/business-ui/tiptap-editor/components/undo-redo-toolbar-button.tsx +0 -54
  21. package/template/client/src/components/business-ui/tiptap-editor/extensions/attachment.tsx +0 -539
  22. package/template/client/src/components/business-ui/tiptap-editor/extensions/code-block-shiki.tsx +0 -236
  23. package/template/client/src/components/business-ui/tiptap-editor/extensions/complete-kit.ts +0 -260
  24. package/template/client/src/components/business-ui/tiptap-editor/extensions/image.tsx +0 -456
  25. package/template/client/src/components/business-ui/tiptap-editor/hooks/use-tiptap-editor.ts +0 -47
  26. package/template/client/src/components/business-ui/tiptap-editor/index.ts +0 -38
  27. package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor-complete.tsx +0 -112
  28. package/template/client/src/components/business-ui/tiptap-editor/tiptap-editor.tsx +0 -169
  29. package/template/client/src/components/ui/streamdown.tsx +0 -186
  30. package/template/client/src/lib/shiki.ts +0 -92
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/coding-template-nestjs-react-fullstack",
3
- "version": "0.1.37",
3
+ "version": "0.1.38-alpha.20260909120821",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -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
+ }
@@ -3,5 +3,4 @@
3
3
  @import "./tailwind-theme.css";
4
4
  @import "./typography.css";
5
5
 
6
- @source "../../node_modules/streamdown/dist/*.js";
7
6
  @config "../../tailwind.config.ts";