Skip to content

Commit bc315f0

Browse files
committed
docs(react-share): refactor mermaid diagram with subgraphs
- Group platform strategies into subgraphs (SDK-Based, Direct URL, Fallback, Extensible) - Remove all emojis from diagram nodes - Improve visual organization of architecture diagram
1 parent d88685a commit bc315f0

2 files changed

Lines changed: 50 additions & 30 deletions

File tree

packages/react-share/README.ko.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,34 @@ React를 위한 가볍고 유연한 헤드리스 소셜 공유 라이브러리
1414

1515
```mermaid
1616
flowchart TD
17-
User[👤 사용자 액션<br/>공유 버튼 클릭] --> Hook[⚛️ useHeadlessShare Hook<br/>상태 관리 및 SDK 로딩]
18-
Hook --> Registry[📋 전략 레지스트리<br/>Map<platform, ShareStrategy>]
17+
User[사용자 액션<br/>공유 버튼 클릭] --> Hook[useHeadlessShare Hook<br/>상태 관리 및 SDK 로딩]
18+
Hook --> Registry[전략 레지스트리<br/>Map<platform, ShareStrategy>]
1919
Registry --> Strategy{플랫폼 전략}
2020
21-
Strategy -->|SDK 지연 로딩| Kakao[KakaoStrategy]
22-
Strategy -->|SDK 지연 로딩| Facebook[FacebookStrategy]
23-
Strategy -->|직접 URL| Direct[직접 URL 전략<br/>Twitter, Pinterest 등]
24-
Strategy -->|Web Share API| Native[NativeStrategy]
25-
Strategy -->|클립보드| Link[LinkStrategy]
26-
Strategy -->|커스텀| Custom[커스텀 전략<br/>registerShareStrategy]
21+
subgraph SDKStrategies [SDK 기반]
22+
Kakao[KakaoStrategy]
23+
Facebook[FacebookStrategy]
24+
end
2725
28-
Kakao --> Exec[🚀 공유 실행]
26+
subgraph URLStrategies [직접 URL]
27+
Direct[직접 URL 전략<br/>Twitter, Pinterest 등]
28+
end
29+
30+
subgraph FallbackStrategies [Fallback]
31+
Native[NativeStrategy<br/>Web Share API]
32+
Link[LinkStrategy<br/>클립보드]
33+
end
34+
35+
subgraph Extensible [확장 가능]
36+
Custom[커스텀 전략<br/>registerShareStrategy]
37+
end
38+
39+
Strategy -->|SDK 지연 로딩| SDKStrategies
40+
Strategy -->|직접 URL| URLStrategies
41+
Strategy -->|Fallback| FallbackStrategies
42+
Strategy -->|커스텀| Extensible
43+
44+
Kakao --> Exec[공유 실행]
2945
Facebook --> Exec
3046
Direct --> Exec
3147
Native --> Exec
@@ -34,12 +50,6 @@ flowchart TD
3450
3551
style Hook fill:#d5e8d4,stroke:#82b366
3652
style Registry fill:#fff2cc,stroke:#d6b656
37-
style Kakao fill:#e1d5e7,stroke:#9673a6
38-
style Facebook fill:#e1d5e7,stroke:#9673a6
39-
style Direct fill:#f8cecc,stroke:#b85450
40-
style Native fill:#ffe6cc,stroke:#d79b00
41-
style Link fill:#ffe6cc,stroke:#d79b00
42-
style Custom fill:#e6f3ff,stroke:#0070c0,stroke-dasharray: 5 5
4353
style Exec fill:#f5f5f5,stroke:#666666
4454
```
4555

packages/react-share/README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,34 @@ A lightweight, headless social sharing library for React. Highly customizable an
1414

1515
```mermaid
1616
flowchart TD
17-
User[👤 User Action<br/>Click Share Button] --> Hook[⚛️ useHeadlessShare Hook<br/>State Management & SDK Loading]
18-
Hook --> Registry[📋 Strategy Registry<br/>Map<platform, ShareStrategy>]
17+
User[User Action<br/>Click Share Button] --> Hook[useHeadlessShare Hook<br/>State Management & SDK Loading]
18+
Hook --> Registry[Strategy Registry<br/>Map<platform, ShareStrategy>]
1919
Registry --> Strategy{Platform Strategy}
2020
21-
Strategy -->|SDK Lazy Load| Kakao[KakaoStrategy]
22-
Strategy -->|SDK Lazy Load| Facebook[FacebookStrategy]
23-
Strategy -->|Direct URL| Direct[Direct URL Strategies<br/>Twitter, Pinterest, etc.]
24-
Strategy -->|Web Share API| Native[NativeStrategy]
25-
Strategy -->|Clipboard| Link[LinkStrategy]
26-
Strategy -->|Custom| Custom[Custom Strategy<br/>registerShareStrategy]
21+
subgraph SDKStrategies [SDK-Based]
22+
Kakao[KakaoStrategy]
23+
Facebook[FacebookStrategy]
24+
end
2725
28-
Kakao --> Exec[🚀 Share Execution]
26+
subgraph URLStrategies [Direct URL]
27+
Direct[Direct URL Strategies<br/>Twitter, Pinterest, etc.]
28+
end
29+
30+
subgraph FallbackStrategies [Fallback]
31+
Native[NativeStrategy<br/>Web Share API]
32+
Link[LinkStrategy<br/>Clipboard]
33+
end
34+
35+
subgraph Extensible [Extensible]
36+
Custom[Custom Strategy<br/>registerShareStrategy]
37+
end
38+
39+
Strategy -->|SDK Lazy Load| SDKStrategies
40+
Strategy -->|Direct URL| URLStrategies
41+
Strategy -->|Fallback| FallbackStrategies
42+
Strategy -->|Custom| Extensible
43+
44+
Kakao --> Exec[Share Execution]
2945
Facebook --> Exec
3046
Direct --> Exec
3147
Native --> Exec
@@ -34,12 +50,6 @@ flowchart TD
3450
3551
style Hook fill:#d5e8d4,stroke:#82b366
3652
style Registry fill:#fff2cc,stroke:#d6b656
37-
style Kakao fill:#e1d5e7,stroke:#9673a6
38-
style Facebook fill:#e1d5e7,stroke:#9673a6
39-
style Direct fill:#f8cecc,stroke:#b85450
40-
style Native fill:#ffe6cc,stroke:#d79b00
41-
style Link fill:#ffe6cc,stroke:#d79b00
42-
style Custom fill:#e6f3ff,stroke:#0070c0,stroke-dasharray: 5 5
4353
style Exec fill:#f5f5f5,stroke:#666666
4454
```
4555

0 commit comments

Comments
 (0)