@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infinilabs/doc-detail",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "main": "dist/doc-detail.cjs",
7
7
  "module": "dist/doc-detail.js",
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 <XMarkdown {...rest} content={content} components={{ code: Code }} />;
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;