@infinilabs/doc-detail 0.0.4 → 0.0.5
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 +3057 -155
- package/dist/doc-detail.js +198796 -68570
- package/dist/index.d.ts +5 -5
- package/package.json +2 -1
- package/src/App.tsx +55 -1
- package/src/components/DocDetail/components/Preview/components/Markdown/index.tsx +23 -2
- package/src/components/DocDetail/index.tsx +9 -9
- package/vite.config.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -57,13 +57,13 @@ declare interface DocDetailProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
57
57
|
openSource?: string;
|
|
58
58
|
};
|
|
59
59
|
labels?: {
|
|
60
|
-
preview?: string;
|
|
61
|
-
aiInterpretation?: string;
|
|
62
|
-
createdBy?: string;
|
|
63
|
-
updatedAt?: string;
|
|
64
|
-
updatedBy?: string;
|
|
65
60
|
type?: string;
|
|
66
61
|
size?: string;
|
|
62
|
+
createdBy?: string;
|
|
63
|
+
createdAt?: string;
|
|
64
|
+
updatedAt?: string;
|
|
65
|
+
preview?: string;
|
|
66
|
+
aiInterpretation?: string;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
extraButtons?: ReactNode[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infinilabs/doc-detail",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/doc-detail.cjs",
|
|
7
7
|
"module": "dist/doc-detail.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"preview": "vite preview"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@ant-design/x": "^2.1.3",
|
|
25
26
|
"@ant-design/x-markdown": "^2.1.3",
|
|
26
27
|
"antd": "^6.0.0",
|
|
27
28
|
"clsx": "^2.1.1",
|
package/src/App.tsx
CHANGED
|
@@ -17,7 +17,61 @@ const App = () => {
|
|
|
17
17
|
url: "http://192.168.3.181:9101/coco-server/test.pdf",
|
|
18
18
|
metadata: {
|
|
19
19
|
content_type: "pdf",
|
|
20
|
-
ai_insights:
|
|
20
|
+
ai_insights: `
|
|
21
|
+
# Document Analysis: "106862408.jpg"
|
|
22
|
+
|
|
23
|
+
## Overview
|
|
24
|
+
This document is a detailed textual description of a corporate event photograph titled \`106862408.jpg.\` The analysis describes an indoor professional setting during INFINI.com's 2023 All Hands Meeting, capturing the environment, participants, and cultural elements.
|
|
25
|
+
|
|
26
|
+
## Key Insights & Themes
|
|
27
|
+
|
|
28
|
+
### 1. **Event Context & Purpose**
|
|
29
|
+
The image documents a formal company-wide gathering ("All Hands Meeting") for an organization named INFINI. The timing is significant—2023, the Year of the Rabbit—as reflected in the celebratory banner. The meeting appears to be a collaborative or informational session, likely for strategic planning or a new year kickoff, emphasizing organizational unity and forward momentum.
|
|
30
|
+
|
|
31
|
+
### 2. **Professional Environment & Atmosphere**
|
|
32
|
+
The setting is a modern, well-lit conference room designed for corporate functions. The structured seating, professional lighting, and presence of technology (laptops, a projector) indicate a prepared, business-focused environment. However, the casual postures of participants and personal belongings suggest a balanced atmosphere that is formal yet not overly rigid, promoting focused engagement.
|
|
33
|
+
|
|
34
|
+
### 3. **Cultural and Symbolic Elements**
|
|
35
|
+
A bilingual banner (English and Chinese) serves as a central visual motif. The Chinese phrase “兔飞猛进” (Rabbits leaping forward rapidly) is a culturally specific metaphor tied to the lunar year, symbolizing rapid progress and advancement. This highlights the organization's possible multicultural nature or global outlook, blending corporate identity with traditional symbolism.
|
|
36
|
+
|
|
37
|
+
### 4. **Visual Composition and Details**
|
|
38
|
+
The description notes a cohesive color palette (dominant blues, neutral tones, wood accents) and a clean, organized composition. The image perspective provides depth, drawing attention from the uniformly dressed participants toward the symbolic banner. Details like abstract artwork, branded attire, and patterned carpeting contribute to a narrative of a thoughtfully designed corporate space.
|
|
39
|
+
|
|
40
|
+
### 5. **Human Element and Team Identity**
|
|
41
|
+
Approximately ten individuals, mostly men with one woman visible, are depicted wearing uniform blue jackets with logos, signaling team or organizational belonging. Their engagement with laptops, notebooks, and personal items suggests active participation. The arrangement fosters a sense of collective purpose, underscoring themes of teamwork and shared enterprise.
|
|
42
|
+
|
|
43
|
+
## Relationships and Synthesis
|
|
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
|
+
|
|
46
|
+
\`\`\`mermaid
|
|
47
|
+
mindmap
|
|
48
|
+
root("Document Analysis: 106862408.jpg")
|
|
49
|
+
Event Context & Purpose
|
|
50
|
+
INFINI.com All Hands Meeting
|
|
51
|
+
2023 – Year of the Rabbit
|
|
52
|
+
Corporate gathering for strategy/kickoff
|
|
53
|
+
Theme of progress and unity
|
|
54
|
+
Professional Environment & Atmosphere
|
|
55
|
+
Modern conference room
|
|
56
|
+
Structured seating with technology
|
|
57
|
+
Balanced formal yet relaxed tone
|
|
58
|
+
Professional lighting & layout
|
|
59
|
+
Cultural & Symbolic Elements
|
|
60
|
+
Bilingual banner (English/Chinese)
|
|
61
|
+
“兔飞猛进” – Rabbits leaping forward
|
|
62
|
+
Metaphor for rapid advancement
|
|
63
|
+
Blends corporate and traditional motifs
|
|
64
|
+
Visual Composition & Details
|
|
65
|
+
Dominant color palette: blues, neutrals, wood
|
|
66
|
+
Organized perspective with depth
|
|
67
|
+
Details: artwork, branded attire, carpet pattern
|
|
68
|
+
Even, professional lighting
|
|
69
|
+
Human Element & Team Identity
|
|
70
|
+
~10 participants in uniform attire
|
|
71
|
+
Active engagement with tools
|
|
72
|
+
Sense of collective purpose
|
|
73
|
+
Represents organizational cohesion
|
|
74
|
+
\`\`\``,
|
|
21
75
|
},
|
|
22
76
|
owner: {
|
|
23
77
|
title: "Alice Johnson",
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
XMarkdown,
|
|
3
|
+
type ComponentProps,
|
|
4
|
+
type XMarkdownProps,
|
|
5
|
+
} from "@ant-design/x-markdown";
|
|
2
6
|
import { useEffect, useState, type FC } from "react";
|
|
7
|
+
import { Mermaid } from "@ant-design/x";
|
|
8
|
+
import { Typography } from "antd";
|
|
9
|
+
|
|
10
|
+
const { Text } = Typography;
|
|
11
|
+
|
|
12
|
+
const Code: FC<ComponentProps> = (props) => {
|
|
13
|
+
const { className, children } = props;
|
|
14
|
+
const lang = className?.match(/language-(\w+)/)?.[1] ?? "";
|
|
15
|
+
|
|
16
|
+
if (typeof children !== "string") return null;
|
|
17
|
+
|
|
18
|
+
if (lang === "mermaid") {
|
|
19
|
+
return <Mermaid>{children}</Mermaid>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return <Text code>{children}</Text>;
|
|
23
|
+
};
|
|
3
24
|
|
|
4
25
|
interface MarkdownProps extends XMarkdownProps {
|
|
5
26
|
url?: string;
|
|
@@ -24,7 +45,7 @@ const Markdown: FC<MarkdownProps> = (props) => {
|
|
|
24
45
|
fetchContent(url);
|
|
25
46
|
}, [url]);
|
|
26
47
|
|
|
27
|
-
return <XMarkdown {...rest} content={content} />;
|
|
48
|
+
return <XMarkdown {...rest} content={content} components={{ code: Code }} />;
|
|
28
49
|
};
|
|
29
50
|
|
|
30
51
|
export default Markdown;
|
|
@@ -73,13 +73,13 @@ export interface DocDetailProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
73
73
|
openSource?: string;
|
|
74
74
|
};
|
|
75
75
|
labels?: {
|
|
76
|
-
preview?: string;
|
|
77
|
-
aiInterpretation?: string;
|
|
78
|
-
createdBy?: string;
|
|
79
|
-
updatedAt?: string;
|
|
80
|
-
updatedBy?: string;
|
|
81
76
|
type?: string;
|
|
82
77
|
size?: string;
|
|
78
|
+
createdBy?: string;
|
|
79
|
+
createdAt?: string;
|
|
80
|
+
updatedAt?: string;
|
|
81
|
+
preview?: string;
|
|
82
|
+
aiInterpretation?: string;
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
extraButtons?: ReactNode[];
|
|
@@ -107,14 +107,14 @@ const DocDetail: FC<DocDetailProps> = (props) => {
|
|
|
107
107
|
label: i18n?.labels?.size ?? "Size",
|
|
108
108
|
value: data?.size,
|
|
109
109
|
},
|
|
110
|
-
{
|
|
111
|
-
label: i18n?.labels?.createdBy ?? "Created At",
|
|
112
|
-
value: data?.created,
|
|
113
|
-
},
|
|
114
110
|
{
|
|
115
111
|
label: i18n?.labels?.createdBy ?? "Created By",
|
|
116
112
|
value: data?.owner?.title,
|
|
117
113
|
},
|
|
114
|
+
{
|
|
115
|
+
label: i18n?.labels?.createdAt ?? "Created At",
|
|
116
|
+
value: data?.created,
|
|
117
|
+
},
|
|
118
118
|
{
|
|
119
119
|
label: i18n?.labels?.updatedAt ?? "Updated At",
|
|
120
120
|
value: data?.updated,
|