@infinilabs/doc-detail 0.0.5 → 0.0.6
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/dist/doc-detail.cjs +996 -993
- package/dist/doc-detail.js +108521 -85770
- package/package.json +1 -1
- package/src/App.tsx +11 -0
- package/src/components/DocDetail/components/Preview/components/Markdown/index.tsx +15 -3
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -43,6 +43,17 @@ Approximately ten individuals, mostly men with one woman visible, are depicted w
|
|
|
43
43
|
## Relationships and Synthesis
|
|
44
44
|
The document intertwines physical setting, human activity, and symbolic communication to portray a snapshot of corporate culture. The environment supports the event's purpose, the participants' uniformity reflects organizational cohesion, and the banner bridges corporate messaging with cultural tradition. Together, these elements construct a narrative of a modern, globally-aware company marking a moment of collective planning and aspirational growth.
|
|
45
45
|
|
|
46
|
+
|
|
47
|
+
\`\`\`ts
|
|
48
|
+
const analysisSummary = {
|
|
49
|
+
eventContext: "INFINI.com All Hands Meeting in 2023, Year of the Rabbit",
|
|
50
|
+
environment: "Modern conference room with professional yet relaxed atmosphere",
|
|
51
|
+
culturalElements: "Bilingual banner with metaphor for rapid advancement",
|
|
52
|
+
visualDetails: "Cohesive color palette, organized composition, branded attire",
|
|
53
|
+
humanElement: "Team identity through uniform clothing and active engagement",
|
|
54
|
+
};
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
46
57
|
\`\`\`mermaid
|
|
47
58
|
mindmap
|
|
48
59
|
root("Document Analysis: 106862408.jpg")
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
type XMarkdownProps,
|
|
5
5
|
} from "@ant-design/x-markdown";
|
|
6
6
|
import { useEffect, useState, type FC } from "react";
|
|
7
|
-
import { Mermaid } from "@ant-design/x";
|
|
7
|
+
import { Mermaid, CodeHighlighter } from "@ant-design/x";
|
|
8
8
|
import { Typography } from "antd";
|
|
9
|
+
import clsx from "clsx";
|
|
9
10
|
|
|
10
11
|
const { Text } = Typography;
|
|
11
12
|
|
|
@@ -19,6 +20,10 @@ const Code: FC<ComponentProps> = (props) => {
|
|
|
19
20
|
return <Mermaid>{children}</Mermaid>;
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
if (lang) {
|
|
24
|
+
return <CodeHighlighter lang={lang}>{children}</CodeHighlighter>;
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
return <Text code>{children}</Text>;
|
|
23
28
|
};
|
|
24
29
|
|
|
@@ -27,7 +32,7 @@ interface MarkdownProps extends XMarkdownProps {
|
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
const Markdown: FC<MarkdownProps> = (props) => {
|
|
30
|
-
const { url, ...rest } = props;
|
|
35
|
+
const { url, className, ...rest } = props;
|
|
31
36
|
|
|
32
37
|
const [content, setContent] = useState(rest.content);
|
|
33
38
|
|
|
@@ -45,7 +50,14 @@ const Markdown: FC<MarkdownProps> = (props) => {
|
|
|
45
50
|
fetchContent(url);
|
|
46
51
|
}, [url]);
|
|
47
52
|
|
|
48
|
-
return
|
|
53
|
+
return (
|
|
54
|
+
<XMarkdown
|
|
55
|
+
{...rest}
|
|
56
|
+
className={clsx("[&_h1,h2,h3,h4,h5,h6,ul,ol,p]:[all:revert]", className)}
|
|
57
|
+
content={content}
|
|
58
|
+
components={{ code: Code }}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
49
61
|
};
|
|
50
62
|
|
|
51
63
|
export default Markdown;
|