@dsh-ft/dsh-fft-settings 0.0.0-stage → 0.5.0
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/LICENSE +21 -0
- package/README.md +392 -2
- package/cordis.patch.yml +18 -0
- package/docs/compatibility-dsh-0.1.6-alpha.1.md +58 -0
- package/docs/extension-service-design.md +351 -0
- package/docs/extension-service-sequences.html +545 -0
- package/docs/ftshare-settings-er.html +139 -0
- package/docs/ftshare-settings-er.svg +113 -0
- package/docs/ftshare-settings-results-er.html +148 -0
- package/docs/ftshare-settings-results-er.svg +122 -0
- package/docs/kline-integration.md +258 -0
- package/lib/agent.d.ts +24 -0
- package/lib/agent.js +26 -0
- package/lib/brand.d.ts +53 -0
- package/lib/brand.js +50 -0
- package/lib/client.d.ts +8 -0
- package/lib/client.js +822 -0
- package/lib/client.js.map +1 -0
- package/lib/contract.d.ts +14 -0
- package/lib/contract.js +14 -0
- package/lib/core/client-transport.d.ts +15 -0
- package/lib/core/client-transport.js +31 -0
- package/lib/core/contract.d.ts +62 -0
- package/lib/core/contract.js +28 -0
- package/lib/core/module-registry.d.ts +54 -0
- package/lib/core/module-registry.js +68 -0
- package/lib/core/rpc-core.d.ts +69 -0
- package/lib/core/rpc-core.js +88 -0
- package/lib/core/shell.d.ts +59 -0
- package/lib/core/shell.js +28 -0
- package/lib/core/styles.d.ts +31 -0
- package/lib/core/styles.js +43 -0
- package/lib/core/transport.d.ts +19 -0
- package/lib/core/transport.js +80 -0
- package/lib/default-preset.d.ts +52 -0
- package/lib/default-preset.js +121 -0
- package/lib/features/api-key/card.d.ts +24 -0
- package/lib/features/api-key/card.js +39 -0
- package/lib/features/api-key/client-api.d.ts +4 -0
- package/lib/features/api-key/client-api.js +11 -0
- package/lib/features/api-key/contract.d.ts +69 -0
- package/lib/features/api-key/contract.js +24 -0
- package/lib/features/api-key/host.d.ts +17 -0
- package/lib/features/api-key/host.js +32 -0
- package/lib/features/api-key/index.d.ts +13 -0
- package/lib/features/api-key/index.js +12 -0
- package/lib/features/api-key/logging.d.ts +15 -0
- package/lib/features/api-key/logging.js +1 -0
- package/lib/features/api-key/model.d.ts +24 -0
- package/lib/features/api-key/model.js +105 -0
- package/lib/features/api-key/probe.d.ts +11 -0
- package/lib/features/api-key/probe.js +142 -0
- package/lib/features/api-key/rpc.d.ts +4 -0
- package/lib/features/api-key/rpc.js +17 -0
- package/lib/features/api-key/service.d.ts +21 -0
- package/lib/features/api-key/service.js +181 -0
- package/lib/features/api-key/styles.d.ts +9 -0
- package/lib/features/api-key/styles.js +24 -0
- package/lib/features/logs/archive.d.ts +87 -0
- package/lib/features/logs/archive.js +156 -0
- package/lib/features/logs/card.d.ts +22 -0
- package/lib/features/logs/card.js +107 -0
- package/lib/features/logs/client-api.d.ts +4 -0
- package/lib/features/logs/client-api.js +11 -0
- package/lib/features/logs/collector.d.ts +91 -0
- package/lib/features/logs/collector.js +258 -0
- package/lib/features/logs/config.d.ts +70 -0
- package/lib/features/logs/config.js +97 -0
- package/lib/features/logs/contract.d.ts +130 -0
- package/lib/features/logs/contract.js +67 -0
- package/lib/features/logs/export.d.ts +92 -0
- package/lib/features/logs/export.js +212 -0
- package/lib/features/logs/format.d.ts +42 -0
- package/lib/features/logs/format.js +172 -0
- package/lib/features/logs/home.d.ts +18 -0
- package/lib/features/logs/home.js +39 -0
- package/lib/features/logs/host.d.ts +19 -0
- package/lib/features/logs/host.js +139 -0
- package/lib/features/logs/index.d.ts +12 -0
- package/lib/features/logs/index.js +12 -0
- package/lib/features/logs/rpc.d.ts +6 -0
- package/lib/features/logs/rpc.js +27 -0
- package/lib/features/logs/styles.d.ts +9 -0
- package/lib/features/logs/styles.js +13 -0
- package/lib/guidance.d.ts +41 -0
- package/lib/guidance.js +88 -0
- package/lib/index.d.ts +67 -0
- package/lib/index.js +50 -0
- package/lib/rpc.d.ts +10 -0
- package/lib/rpc.js +10 -0
- package/package.json +86 -4
- package/src/agent.ts +31 -0
- package/src/brand.ts +79 -0
- package/src/client.tsx +21 -0
- package/src/contract.ts +14 -0
- package/src/core/client-transport.ts +37 -0
- package/src/core/contract.ts +57 -0
- package/src/core/module-registry.ts +102 -0
- package/src/core/rpc-core.ts +107 -0
- package/src/core/shell.tsx +81 -0
- package/src/core/styles.ts +43 -0
- package/src/core/transport.ts +82 -0
- package/src/default-preset.ts +151 -0
- package/src/features/api-key/card.tsx +77 -0
- package/src/features/api-key/client-api.ts +12 -0
- package/src/features/api-key/contract.ts +63 -0
- package/src/features/api-key/host.ts +36 -0
- package/src/features/api-key/index.ts +13 -0
- package/src/features/api-key/logging.ts +15 -0
- package/src/features/api-key/model.ts +63 -0
- package/src/features/api-key/probe.ts +116 -0
- package/src/features/api-key/rpc.ts +18 -0
- package/src/features/api-key/service.ts +157 -0
- package/src/features/api-key/styles.ts +24 -0
- package/src/features/logs/archive.ts +230 -0
- package/src/features/logs/card.tsx +169 -0
- package/src/features/logs/client-api.ts +20 -0
- package/src/features/logs/collector.ts +313 -0
- package/src/features/logs/config.ts +115 -0
- package/src/features/logs/contract.ts +149 -0
- package/src/features/logs/export.ts +274 -0
- package/src/features/logs/format.ts +188 -0
- package/src/features/logs/home.ts +43 -0
- package/src/features/logs/host.ts +153 -0
- package/src/features/logs/index.ts +12 -0
- package/src/features/logs/rpc.ts +29 -0
- package/src/features/logs/styles.ts +13 -0
- package/src/guidance.ts +114 -0
- package/src/index.ts +59 -0
- package/src/rpc.ts +10 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>FTShare 设置扩展服务 · 架构与时序</title>
|
|
7
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@400&display=swap" rel="stylesheet">
|
|
8
|
+
<style>
|
|
9
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
10
|
+
:root {
|
|
11
|
+
--color-paper: #f5f5f5;
|
|
12
|
+
--color-ink: #2d3142;
|
|
13
|
+
--color-muted: #4f5d75;
|
|
14
|
+
--color-soft: #7a8399;
|
|
15
|
+
--color-accent: #eb6c36;
|
|
16
|
+
--font-sans: 'Geist', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
|
|
17
|
+
--font-serif: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', serif;
|
|
18
|
+
--font-mono: 'Geist Mono', 'Noto Sans Mono CJK SC', ui-monospace, monospace;
|
|
19
|
+
}
|
|
20
|
+
body {
|
|
21
|
+
font-family: var(--font-sans);
|
|
22
|
+
background: var(--color-paper);
|
|
23
|
+
color: var(--color-ink);
|
|
24
|
+
min-height: 100vh;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
padding: 3rem 2rem;
|
|
29
|
+
}
|
|
30
|
+
.frame { max-width: 1360px; width: 100%; }
|
|
31
|
+
.eyebrow {
|
|
32
|
+
font-family: var(--font-mono);
|
|
33
|
+
font-size: 0.66rem;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
letter-spacing: 0.18em;
|
|
36
|
+
text-transform: uppercase;
|
|
37
|
+
color: var(--color-muted);
|
|
38
|
+
margin-bottom: 0.5rem;
|
|
39
|
+
}
|
|
40
|
+
h1 {
|
|
41
|
+
font-family: var(--font-serif);
|
|
42
|
+
font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem);
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
letter-spacing: -0.02em;
|
|
45
|
+
line-height: 1.15;
|
|
46
|
+
margin-bottom: 0.75rem;
|
|
47
|
+
}
|
|
48
|
+
.lede {
|
|
49
|
+
max-width: 66ch;
|
|
50
|
+
color: var(--color-muted);
|
|
51
|
+
font-size: 0.95rem;
|
|
52
|
+
line-height: 1.6;
|
|
53
|
+
margin-bottom: 2.5rem;
|
|
54
|
+
}
|
|
55
|
+
.figure { margin-bottom: 3rem; }
|
|
56
|
+
.figure h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; }
|
|
57
|
+
.figure-note {
|
|
58
|
+
max-width: 78ch;
|
|
59
|
+
color: var(--color-muted);
|
|
60
|
+
font-size: 0.86rem;
|
|
61
|
+
line-height: 1.6;
|
|
62
|
+
margin-bottom: 1.25rem;
|
|
63
|
+
}
|
|
64
|
+
.diagram-container { width: 100%; overflow-x: auto; }
|
|
65
|
+
svg { width: 100%; min-width: 1280px; display: block; }
|
|
66
|
+
@media print {
|
|
67
|
+
.diagram-container { overflow-x: visible; }
|
|
68
|
+
svg { min-width: 0; }
|
|
69
|
+
}
|
|
70
|
+
.colophon {
|
|
71
|
+
font-family: var(--font-mono);
|
|
72
|
+
font-size: 0.7rem;
|
|
73
|
+
letter-spacing: 0.08em;
|
|
74
|
+
color: var(--color-soft);
|
|
75
|
+
border-top: 1px solid rgba(45,49,66,0.10);
|
|
76
|
+
padding-top: 0.85rem;
|
|
77
|
+
margin-top: 1rem;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
</head>
|
|
81
|
+
<body>
|
|
82
|
+
<div class="frame">
|
|
83
|
+
<p class="eyebrow">Architecture + Sequence · Settings extension</p>
|
|
84
|
+
<h1>设置扩展服务(A2):架构与五段时序</h1>
|
|
85
|
+
<p class="lede">配套 <a href="extension-service-design.md">extension-service-design.md</a>。图 1 是架构与两条缝,图 2-6 分别是注册命名空间、注册卡片、端到端读写、卸载与 HMR、可选装配。</p>
|
|
86
|
+
|
|
87
|
+
<section class="figure">
|
|
88
|
+
<h2>01 · 架构与两条缝</h2>
|
|
89
|
+
<p class="figure-note">浏览器侧一条槽位、宿主侧一个注册表,两侧之间只有一条 HTTP 通道;珊瑚色是本次新增的两个缝。</p>
|
|
90
|
+
<div class="diagram-container">
|
|
91
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="arch-title arch-desc">
|
|
92
|
+
<title id="arch-title">设置扩展的两条缝:卡片槽位与命名空间注册表</title>
|
|
93
|
+
<desc id="arch-desc">架构图:浏览器侧通过 ftshare.settings.card 槽位贡献卡片,宿主侧通过 ctx.ftshareSettings.modules.register 注册命名空间,两侧以 /api/ftshare-settings 一条 HTTP 通道相连。</desc>
|
|
94
|
+
<defs><marker id="arch-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="arch-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="arch-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
95
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
96
|
+
<rect x="40" y="180" width="560" height="380" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
97
|
+
<rect x="56" y="184" width="112" height="12" rx="2" fill="#f5f5f5"/>
|
|
98
|
+
<text x="112" y="193" fill="rgba(45,49,66,0.40)" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.14em">CLIENT · BROWSER</text>
|
|
99
|
+
<rect x="680" y="180" width="560" height="380" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
100
|
+
<rect x="696" y="184" width="88" height="12" rx="2" fill="#f5f5f5"/>
|
|
101
|
+
<text x="740" y="193" fill="rgba(45,49,66,0.40)" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.14em">HOST · NODE</text>
|
|
102
|
+
<rect x="610" y="202" width="44" height="12" rx="2" fill="#f5f5f5"/>
|
|
103
|
+
<text x="632" y="211" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.10em">HTTP</text>
|
|
104
|
+
<path d="M 160 488 H 128 Q 120 488 120 480 V 272 Q 120 264 128 264 H 160" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arch-arrow)"/>
|
|
105
|
+
<path d="M 160 376 H 144 Q 136 376 136 368 V 288 Q 136 280 144 280 H 160" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arch-arrow)"/>
|
|
106
|
+
<path d="M 480 472 H 624 Q 632 472 632 464 V 272 Q 632 264 640 264 H 800" fill="none" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#arch-arrow-link)"/>
|
|
107
|
+
<line x1="960" y1="296" x2="960" y2="344" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arch-arrow)"/>
|
|
108
|
+
<path d="M 1120 376 H 1176 Q 1184 376 1184 368 V 272 Q 1184 264 1176 264 H 1120" fill="none" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="4,3" marker-end="url(#arch-arrow)"/>
|
|
109
|
+
<line x1="960" y1="408" x2="960" y2="456" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arch-arrow)"/>
|
|
110
|
+
<rect x="149" y="421" width="80" height="12" rx="2" fill="#f5f5f5"/>
|
|
111
|
+
<text x="189" y="432" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">REGISTER CARD</text>
|
|
112
|
+
<rect x="149" y="309" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
113
|
+
<text x="185" y="320" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">RENDER SLOT</text>
|
|
114
|
+
<rect x="641" y="357" width="60" height="12" rx="2" fill="#f5f5f5"/>
|
|
115
|
+
<text x="671" y="368" fill="#2e5aa8" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">POST /API</text>
|
|
116
|
+
<rect x="969" y="309" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
117
|
+
<text x="1005" y="320" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DISPATCH NS</text>
|
|
118
|
+
<rect x="1103" y="309" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
119
|
+
<text x="1139" y="320" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">REGISTER NS</text>
|
|
120
|
+
<rect x="969" y="421" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
121
|
+
<text x="1007" y="432" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">READ / WRITE</text>
|
|
122
|
+
<rect x="160" y="232" width="320" height="64" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
123
|
+
<rect x="168" y="240" width="28" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
124
|
+
<text x="182.0" y="249" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DSH</text>
|
|
125
|
+
<text x="320" y="270" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">ui-slots 台账</text>
|
|
126
|
+
<text x="320" y="288" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">slot ledger</text>
|
|
127
|
+
<rect x="160" y="344" width="320" height="64" rx="6" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
128
|
+
<rect x="168" y="352" width="34" height="12" rx="2" fill="transparent" stroke="rgba(235,108,54,0.50)" stroke-width="0.8"/>
|
|
129
|
+
<text x="185.0" y="361" fill="#eb6c36" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">OWNER</text>
|
|
130
|
+
<text x="320" y="382" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置页</text>
|
|
131
|
+
<text x="320" y="400" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">settings.section</text>
|
|
132
|
+
<rect x="160" y="456" width="320" height="64" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
133
|
+
<rect x="168" y="464" width="30" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
134
|
+
<text x="183.0" y="473" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">CARD</text>
|
|
135
|
+
<text x="320" y="494" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方卡片</text>
|
|
136
|
+
<text x="320" y="512" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">ftshare.settings.card</text>
|
|
137
|
+
<rect x="800" y="232" width="320" height="64" rx="6" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
138
|
+
<rect x="808" y="240" width="30" height="12" rx="2" fill="transparent" stroke="rgba(235,108,54,0.50)" stroke-width="0.8"/>
|
|
139
|
+
<text x="823.0" y="249" fill="#eb6c36" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">HOST</text>
|
|
140
|
+
<text x="960" y="270" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置</text>
|
|
141
|
+
<text x="960" y="288" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">registry · /api route</text>
|
|
142
|
+
<rect x="800" y="344" width="320" height="64" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
143
|
+
<rect x="808" y="352" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
144
|
+
<text x="829.0" y="361" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">MODULE</text>
|
|
145
|
+
<text x="960" y="382" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方 Host 模块</text>
|
|
146
|
+
<text x="960" y="400" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">namespace: kline</text>
|
|
147
|
+
<rect x="800" y="456" width="320" height="64" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
148
|
+
<rect x="808" y="464" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
149
|
+
<text x="825.0" y="473" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">STORE</text>
|
|
150
|
+
<text x="960" y="494" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">DSH 存储</text>
|
|
151
|
+
<text x="960" y="512" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">credentials · settings</text>
|
|
152
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
153
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
154
|
+
<line x1="40" y1="681" x2="68" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arch-arrow)"/>
|
|
155
|
+
<text x="76" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">注册 / 调用</text>
|
|
156
|
+
<line x1="196" y1="681" x2="224" y2="681" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#arch-arrow-link)"/>
|
|
157
|
+
<text x="232" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">HTTP 调用</text>
|
|
158
|
+
<rect x="352" y="674" width="14" height="10" rx="2" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
159
|
+
<text x="376" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">焦点:新增的缝</text>
|
|
160
|
+
</svg>
|
|
161
|
+
</div>
|
|
162
|
+
</section>
|
|
163
|
+
<section class="figure">
|
|
164
|
+
<h2>02 · S1 注册命名空间</h2>
|
|
165
|
+
<p class="figure-note">校验在写入之前:命名空间非法或重复时抛错且不产生任何副作用。</p>
|
|
166
|
+
<div class="diagram-container">
|
|
167
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="s1-title s1-desc">
|
|
168
|
+
<title id="s1-title">插件向设置 Host 注册一个命名空间</title>
|
|
169
|
+
<desc id="s1-desc">时序图:消费方插件调用 modules.register 提交模块,注册表先校验命名空间,再同步创建模块的服务与 RPC 方法,发布服务属性与路由后把服务实例交回插件。</desc>
|
|
170
|
+
<defs><marker id="s1-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="s1-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="s1-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
171
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
172
|
+
<line x1="190" y1="128" x2="190" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
173
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
174
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
175
|
+
<rect x="98" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
176
|
+
<text x="119.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PLUGIN</text>
|
|
177
|
+
<text x="190" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方插件</text>
|
|
178
|
+
<text x="190" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">apply · inject</text>
|
|
179
|
+
<line x1="490" y1="128" x2="490" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
180
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
181
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
182
|
+
<rect x="398" y="80" width="52" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
183
|
+
<text x="424.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">REGISTRY</text>
|
|
184
|
+
<text x="490" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置 Host</text>
|
|
185
|
+
<text x="490" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">modules.register</text>
|
|
186
|
+
<line x1="790" y1="128" x2="790" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
187
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
188
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
189
|
+
<rect x="698" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
190
|
+
<text x="719.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">MODULE</text>
|
|
191
|
+
<text x="790" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方模块</text>
|
|
192
|
+
<text x="790" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">create(scoped)</text>
|
|
193
|
+
<line x1="1090" y1="128" x2="1090" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
194
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
195
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
196
|
+
<rect x="998" y="80" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
197
|
+
<text x="1015.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">STORE</text>
|
|
198
|
+
<text x="1090" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">DSH 服务</text>
|
|
199
|
+
<text x="1090" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">storage</text>
|
|
200
|
+
<rect x="186" y="172" width="8" height="340" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
201
|
+
<rect x="486" y="172" width="8" height="340" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
202
|
+
<rect x="786" y="228" width="8" height="164" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
203
|
+
<rect x="1086" y="284" width="8" height="56" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
204
|
+
<line x1="190" y1="176" x2="490" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s1-arrow)"/>
|
|
205
|
+
<rect x="302" y="156" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
206
|
+
<text x="340" y="167" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">REGISTER MOD</text>
|
|
207
|
+
<line x1="490" y1="232" x2="790" y2="232" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s1-arrow)"/>
|
|
208
|
+
<rect x="596" y="212" width="88" height="12" rx="2" fill="#f5f5f5"/>
|
|
209
|
+
<text x="640" y="223" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">CREATE(SCOPED)</text>
|
|
210
|
+
<line x1="790" y1="288" x2="1090" y2="288" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s1-arrow)"/>
|
|
211
|
+
<rect x="904" y="268" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
212
|
+
<text x="940" y="279" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">LOAD VALUES</text>
|
|
213
|
+
<line x1="1090" y1="336" x2="790" y2="336" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s1-arrow)"/>
|
|
214
|
+
<rect x="916" y="316" width="48" height="12" rx="2" fill="#f5f5f5"/>
|
|
215
|
+
<text x="940" y="327" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">VALUES</text>
|
|
216
|
+
<line x1="790" y1="384" x2="490" y2="384" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s1-arrow)"/>
|
|
217
|
+
<rect x="600" y="364" width="80" height="12" rx="2" fill="#f5f5f5"/>
|
|
218
|
+
<text x="640" y="375" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">SERVICE + RPC</text>
|
|
219
|
+
<path d="M 494 432 L 534 432 L 534 456 L 494 456" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s1-arrow)"/>
|
|
220
|
+
<rect x="542" y="438" width="68" height="12" rx="2" fill="#f5f5f5"/>
|
|
221
|
+
<text x="576" y="449" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">PUBLISH NS</text>
|
|
222
|
+
<line x1="490" y1="504" x2="190" y2="504" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s1-arrow)"/>
|
|
223
|
+
<rect x="302" y="484" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
224
|
+
<text x="340" y="495" fill="#eb6c36" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">REGISTRATION</text>
|
|
225
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
226
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
227
|
+
<rect x="40" y="674" width="4" height="12" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
228
|
+
<text x="52" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">激活区间</text>
|
|
229
|
+
<line x1="132" y1="681" x2="160" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s1-arrow)"/>
|
|
230
|
+
<text x="168" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">注册 / 调用</text>
|
|
231
|
+
<line x1="288" y1="681" x2="316" y2="681" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s1-arrow)"/>
|
|
232
|
+
<text x="324" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">回执</text>
|
|
233
|
+
<line x1="384" y1="681" x2="412" y2="681" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s1-arrow-accent)"/>
|
|
234
|
+
<text x="420" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">主链路结果</text>
|
|
235
|
+
</svg>
|
|
236
|
+
</div>
|
|
237
|
+
</section>
|
|
238
|
+
<section class="figure">
|
|
239
|
+
<h2>03 · S2 注册卡片</h2>
|
|
240
|
+
<p class="figure-note">槽位声明与卡片注册顺序无关:slots.inject 等的是声明,不是服务。</p>
|
|
241
|
+
<div class="diagram-container">
|
|
242
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="s2-title s2-desc">
|
|
243
|
+
<title id="s2-title">插件向设置页注册一张卡片</title>
|
|
244
|
+
<desc id="s2-desc">时序图:设置页声明设置卡片子槽位,消费方插件注入该槽位并注册卡片,用户打开设置页后槽位台账渲染并挂载卡片。</desc>
|
|
245
|
+
<defs><marker id="s2-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="s2-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="s2-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
246
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
247
|
+
<line x1="190" y1="128" x2="190" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
248
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
249
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
250
|
+
<rect x="98" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
251
|
+
<text x="119.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PLUGIN</text>
|
|
252
|
+
<text x="190" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方插件</text>
|
|
253
|
+
<text x="190" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">client half</text>
|
|
254
|
+
<line x1="490" y1="128" x2="490" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
255
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
256
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
257
|
+
<rect x="398" y="80" width="28" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
258
|
+
<text x="412.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DSH</text>
|
|
259
|
+
<text x="490" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">ui-slots 台账</text>
|
|
260
|
+
<text x="490" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">slot ledger</text>
|
|
261
|
+
<line x1="790" y1="128" x2="790" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
262
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
263
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
264
|
+
<rect x="698" y="80" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
265
|
+
<text x="715.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">OWNER</text>
|
|
266
|
+
<text x="790" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置页</text>
|
|
267
|
+
<text x="790" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">settings.section</text>
|
|
268
|
+
<line x1="1090" y1="128" x2="1090" y2="560" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
269
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
270
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
271
|
+
<rect x="998" y="80" width="30" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
272
|
+
<text x="1013.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">CARD</text>
|
|
273
|
+
<text x="1090" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方卡片</text>
|
|
274
|
+
<text x="1090" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">settings.card</text>
|
|
275
|
+
<rect x="786" y="172" width="8" height="212" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
276
|
+
<rect x="486" y="172" width="8" height="264" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
277
|
+
<rect x="186" y="228" width="8" height="108" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
278
|
+
<rect x="1086" y="420" width="8" height="80" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
279
|
+
<line x1="790" y1="176" x2="490" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
280
|
+
<rect x="602" y="156" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
281
|
+
<text x="640" y="167" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DECLARE SLOT</text>
|
|
282
|
+
<line x1="190" y1="232" x2="490" y2="232" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
283
|
+
<rect x="304" y="212" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
284
|
+
<text x="340" y="223" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">INJECT SLOT</text>
|
|
285
|
+
<line x1="490" y1="280" x2="190" y2="280" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s2-arrow)"/>
|
|
286
|
+
<rect x="312" y="260" width="56" height="12" rx="2" fill="#f5f5f5"/>
|
|
287
|
+
<text x="340" y="271" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DECLARED</text>
|
|
288
|
+
<line x1="190" y1="328" x2="490" y2="328" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
289
|
+
<rect x="300" y="308" width="80" height="12" rx="2" fill="#f5f5f5"/>
|
|
290
|
+
<text x="340" y="319" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">REGISTER CARD</text>
|
|
291
|
+
<line x1="790" y1="376" x2="490" y2="376" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
292
|
+
<rect x="604" y="356" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
293
|
+
<text x="640" y="367" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">RENDER SLOT</text>
|
|
294
|
+
<line x1="490" y1="424" x2="1090" y2="424" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s2-arrow-accent)"/>
|
|
295
|
+
<rect x="916" y="404" width="48" height="12" rx="2" fill="#f5f5f5"/>
|
|
296
|
+
<text x="940" y="415" fill="#eb6c36" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">MOUNT</text>
|
|
297
|
+
<path d="M 1094 472 L 1134 472 L 1134 496 L 1094 496" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
298
|
+
<rect x="1142" y="478" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
299
|
+
<text x="1178" y="489" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">INJECT FACE</text>
|
|
300
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
301
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
302
|
+
<rect x="40" y="674" width="4" height="12" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
303
|
+
<text x="52" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">激活区间</text>
|
|
304
|
+
<line x1="132" y1="681" x2="160" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s2-arrow)"/>
|
|
305
|
+
<text x="168" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">注册 / 调用</text>
|
|
306
|
+
<line x1="288" y1="681" x2="316" y2="681" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s2-arrow)"/>
|
|
307
|
+
<text x="324" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">回执</text>
|
|
308
|
+
<line x1="384" y1="681" x2="412" y2="681" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s2-arrow-accent)"/>
|
|
309
|
+
<text x="420" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">主链路结果</text>
|
|
310
|
+
</svg>
|
|
311
|
+
</div>
|
|
312
|
+
</section>
|
|
313
|
+
<section class="figure">
|
|
314
|
+
<h2>04 · S3 端到端读写</h2>
|
|
315
|
+
<p class="figure-note">卡片复用共享路由;kline 自己的代码在模块闭包里读到新值,Python 侧是它自己的第二跳。</p>
|
|
316
|
+
<div class="diagram-container">
|
|
317
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="s3-title s3-desc">
|
|
318
|
+
<title id="s3-title">用户改动设置后,插件自己的代码读到新值</title>
|
|
319
|
+
<desc id="s3-desc">时序图:用户在 kline 卡片上编辑设置,卡片经共享路由把调用派发给 kline 的 Host 模块,模块持久化后回读新值并逐层返回结果到卡片。</desc>
|
|
320
|
+
<defs><marker id="s3-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="s3-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="s3-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
321
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
322
|
+
<line x1="160" y1="128" x2="160" y2="600" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
323
|
+
<rect x="60" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
324
|
+
<rect x="60" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
325
|
+
<rect x="68" y="80" width="38" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
326
|
+
<text x="87.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ACTOR</text>
|
|
327
|
+
<text x="160" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">用户</text>
|
|
328
|
+
<text x="160" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">编辑设置</text>
|
|
329
|
+
<line x1="400" y1="128" x2="400" y2="600" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
330
|
+
<rect x="300" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
331
|
+
<rect x="300" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
332
|
+
<rect x="308" y="80" width="30" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
333
|
+
<text x="323.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">CARD</text>
|
|
334
|
+
<text x="400" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">kline 卡片</text>
|
|
335
|
+
<text x="400" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">browser half</text>
|
|
336
|
+
<line x1="640" y1="128" x2="640" y2="600" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
337
|
+
<rect x="540" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
338
|
+
<rect x="540" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
339
|
+
<rect x="548" y="80" width="36" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
340
|
+
<text x="566.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ROUTE</text>
|
|
341
|
+
<text x="640" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置</text>
|
|
342
|
+
<text x="640" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">/api route</text>
|
|
343
|
+
<line x1="880" y1="128" x2="880" y2="600" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
344
|
+
<rect x="780" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
345
|
+
<rect x="780" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
346
|
+
<rect x="788" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
347
|
+
<text x="809.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">MODULE</text>
|
|
348
|
+
<text x="880" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">kline 模块</text>
|
|
349
|
+
<text x="880" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">namespace: kline</text>
|
|
350
|
+
<line x1="1120" y1="128" x2="1120" y2="600" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
351
|
+
<rect x="1020" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
352
|
+
<rect x="1020" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
353
|
+
<rect x="1028" y="80" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
354
|
+
<text x="1045.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">STORE</text>
|
|
355
|
+
<text x="1120" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">kline 存储</text>
|
|
356
|
+
<text x="1120" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">own store</text>
|
|
357
|
+
<rect x="396" y="172" width="8" height="384" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
358
|
+
<rect x="636" y="220" width="8" height="288" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
359
|
+
<rect x="876" y="268" width="8" height="192" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
360
|
+
<rect x="1116" y="316" width="8" height="60" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
361
|
+
<line x1="160" y1="176" x2="400" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s3-arrow)"/>
|
|
362
|
+
<rect x="242" y="156" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
363
|
+
<text x="280" y="167" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">EDIT SETTING</text>
|
|
364
|
+
<line x1="400" y1="224" x2="640" y2="224" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#s3-arrow-link)"/>
|
|
365
|
+
<rect x="490" y="204" width="60" height="12" rx="2" fill="#f5f5f5"/>
|
|
366
|
+
<text x="520" y="215" fill="#2e5aa8" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">POST /API</text>
|
|
367
|
+
<line x1="640" y1="272" x2="880" y2="272" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s3-arrow)"/>
|
|
368
|
+
<rect x="722" y="252" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
369
|
+
<text x="760" y="263" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DISPATCH SET</text>
|
|
370
|
+
<line x1="880" y1="320" x2="1120" y2="320" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s3-arrow)"/>
|
|
371
|
+
<rect x="974" y="300" width="52" height="12" rx="2" fill="#f5f5f5"/>
|
|
372
|
+
<text x="1000" y="311" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">PERSIST</text>
|
|
373
|
+
<line x1="1120" y1="368" x2="880" y2="368" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s3-arrow)"/>
|
|
374
|
+
<rect x="976" y="348" width="48" height="12" rx="2" fill="#f5f5f5"/>
|
|
375
|
+
<text x="1000" y="359" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">STORED</text>
|
|
376
|
+
<path d="M 884 400 L 924 400 L 924 424 L 884 424" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s3-arrow)"/>
|
|
377
|
+
<rect x="932" y="406" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
378
|
+
<text x="968" y="417" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">GET() VALUE</text>
|
|
379
|
+
<line x1="880" y1="452" x2="640" y2="452" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s3-arrow)"/>
|
|
380
|
+
<rect x="724" y="432" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
381
|
+
<text x="760" y="443" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">{OK, VALUE}</text>
|
|
382
|
+
<line x1="640" y1="500" x2="400" y2="500" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s3-arrow)"/>
|
|
383
|
+
<rect x="492" y="480" width="56" height="12" rx="2" fill="#f5f5f5"/>
|
|
384
|
+
<text x="520" y="491" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">ENVELOPE</text>
|
|
385
|
+
<line x1="400" y1="548" x2="160" y2="548" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s3-arrow-accent)"/>
|
|
386
|
+
<rect x="254" y="528" width="52" height="12" rx="2" fill="#f5f5f5"/>
|
|
387
|
+
<text x="280" y="539" fill="#eb6c36" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">UPDATED</text>
|
|
388
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
389
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
390
|
+
<rect x="40" y="674" width="4" height="12" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
391
|
+
<text x="52" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">激活区间</text>
|
|
392
|
+
<line x1="132" y1="681" x2="160" y2="681" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#s3-arrow-link)"/>
|
|
393
|
+
<text x="168" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">HTTP 调用</text>
|
|
394
|
+
<line x1="288" y1="681" x2="316" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s3-arrow)"/>
|
|
395
|
+
<text x="324" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">内部调用</text>
|
|
396
|
+
<line x1="408" y1="681" x2="436" y2="681" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s3-arrow)"/>
|
|
397
|
+
<text x="444" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">回执</text>
|
|
398
|
+
<line x1="504" y1="681" x2="532" y2="681" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s3-arrow-accent)"/>
|
|
399
|
+
<text x="540" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">主链路结果</text>
|
|
400
|
+
</svg>
|
|
401
|
+
</div>
|
|
402
|
+
</section>
|
|
403
|
+
<section class="figure">
|
|
404
|
+
<h2>05 · S4 卸载与 HMR</h2>
|
|
405
|
+
<p class="figure-note">插件 fiber 一释放,命名空间、路由与卡片同时消失,其余卡片不受影响。</p>
|
|
406
|
+
<div class="diagram-container">
|
|
407
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="s4-title s4-desc">
|
|
408
|
+
<title id="s4-title">卸载与 HMR:两条缝随插件 fiber 一起消失</title>
|
|
409
|
+
<desc id="s4-desc">时序图:插件 fiber 释放后先撤销 Host 命名空间与它的全部路由,再撤销客户端卡片注册,用户看到卡片消失而其余卡片保留。</desc>
|
|
410
|
+
<defs><marker id="s4-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="s4-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="s4-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
411
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
412
|
+
<line x1="190" y1="128" x2="190" y2="520" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
413
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
414
|
+
<rect x="90" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
415
|
+
<rect x="98" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
416
|
+
<text x="119.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PLUGIN</text>
|
|
417
|
+
<text x="190" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方插件</text>
|
|
418
|
+
<text x="190" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">plugin fiber</text>
|
|
419
|
+
<line x1="490" y1="128" x2="490" y2="520" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
420
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
421
|
+
<rect x="390" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
422
|
+
<rect x="398" y="80" width="52" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
423
|
+
<text x="424.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">REGISTRY</text>
|
|
424
|
+
<text x="490" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置</text>
|
|
425
|
+
<text x="490" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">host registry</text>
|
|
426
|
+
<line x1="790" y1="128" x2="790" y2="520" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
427
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
428
|
+
<rect x="690" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
429
|
+
<rect x="698" y="80" width="28" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
430
|
+
<text x="712.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DSH</text>
|
|
431
|
+
<text x="790" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">槽位台账</text>
|
|
432
|
+
<text x="790" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">slot ledger</text>
|
|
433
|
+
<line x1="1090" y1="128" x2="1090" y2="520" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
434
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
435
|
+
<rect x="990" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
436
|
+
<rect x="998" y="80" width="38" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
437
|
+
<text x="1017.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ACTOR</text>
|
|
438
|
+
<text x="1090" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">用户</text>
|
|
439
|
+
<text x="1090" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">设置页</text>
|
|
440
|
+
<rect x="186" y="172" width="8" height="180" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
441
|
+
<rect x="486" y="172" width="8" height="124" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
442
|
+
<rect x="786" y="340" width="8" height="140" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
443
|
+
<line x1="190" y1="176" x2="490" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s4-arrow)"/>
|
|
444
|
+
<rect x="306" y="156" width="68" height="12" rx="2" fill="#f5f5f5"/>
|
|
445
|
+
<text x="340" y="167" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DISPOSER()</text>
|
|
446
|
+
<line x1="490" y1="232" x2="190" y2="232" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s4-arrow)"/>
|
|
447
|
+
<rect x="306" y="212" width="68" height="12" rx="2" fill="#f5f5f5"/>
|
|
448
|
+
<text x="340" y="223" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">NS REMOVED</text>
|
|
449
|
+
<line x1="490" y1="288" x2="190" y2="288" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s4-arrow)"/>
|
|
450
|
+
<rect x="296" y="268" width="88" height="12" rx="2" fill="#f5f5f5"/>
|
|
451
|
+
<text x="340" y="279" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">ROUTES DROPPED</text>
|
|
452
|
+
<line x1="190" y1="344" x2="790" y2="344" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s4-arrow)"/>
|
|
453
|
+
<rect x="606" y="324" width="68" height="12" rx="2" fill="#f5f5f5"/>
|
|
454
|
+
<text x="640" y="335" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DISPOSER()</text>
|
|
455
|
+
<line x1="790" y1="400" x2="1090" y2="400" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s4-arrow-accent)"/>
|
|
456
|
+
<rect x="902" y="380" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
457
|
+
<text x="940" y="391" fill="#eb6c36" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">CARD REMOVED</text>
|
|
458
|
+
<line x1="790" y1="456" x2="1090" y2="456" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s4-arrow)"/>
|
|
459
|
+
<rect x="904" y="436" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
460
|
+
<text x="940" y="447" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">OTHERS KEPT</text>
|
|
461
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
462
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
463
|
+
<rect x="40" y="674" width="4" height="12" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
464
|
+
<text x="52" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">激活区间</text>
|
|
465
|
+
<line x1="132" y1="681" x2="160" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s4-arrow)"/>
|
|
466
|
+
<text x="168" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">撤销 / 调用</text>
|
|
467
|
+
<line x1="288" y1="681" x2="316" y2="681" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s4-arrow)"/>
|
|
468
|
+
<text x="324" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">回执</text>
|
|
469
|
+
<line x1="384" y1="681" x2="412" y2="681" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s4-arrow-accent)"/>
|
|
470
|
+
<text x="420" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">主链路结果</text>
|
|
471
|
+
</svg>
|
|
472
|
+
</div>
|
|
473
|
+
</section>
|
|
474
|
+
<section class="figure">
|
|
475
|
+
<h2>06 · S5 可选装配</h2>
|
|
476
|
+
<p class="figure-note">两处可选挂载各自等待服务/声明;settings 缺失时整段不生效,插件其余功能照常。</p>
|
|
477
|
+
<div class="diagram-container">
|
|
478
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="s5-title s5-desc">
|
|
479
|
+
<title id="s5-title">可选装配:settings 缺失时逐段静默不生效</title>
|
|
480
|
+
<desc id="s5-desc">时序图:插件先按可选服务注入设置 Host 并拿到服务,再注入卡片槽位;opt 分支说明 settings 未安装时同一请求只会得到未提供的结果。</desc>
|
|
481
|
+
<defs><marker id="s5-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker><marker id="s5-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#eb6c36"/></marker><marker id="s5-arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker></defs>
|
|
482
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
483
|
+
<line x1="240" y1="128" x2="240" y2="580" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
484
|
+
<rect x="140" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
485
|
+
<rect x="140" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
486
|
+
<rect x="148" y="80" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
487
|
+
<text x="169.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PLUGIN</text>
|
|
488
|
+
<text x="240" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">消费方插件</text>
|
|
489
|
+
<text x="240" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">plugin fiber</text>
|
|
490
|
+
<line x1="640" y1="128" x2="640" y2="580" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
491
|
+
<rect x="540" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
492
|
+
<rect x="540" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
493
|
+
<rect x="548" y="80" width="52" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
494
|
+
<text x="574.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">REGISTRY</text>
|
|
495
|
+
<text x="640" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">FTShare 设置</text>
|
|
496
|
+
<text x="640" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">host registry</text>
|
|
497
|
+
<line x1="1040" y1="128" x2="1040" y2="580" stroke="rgba(45,49,66,0.22)" stroke-width="1" stroke-dasharray="3,3"/>
|
|
498
|
+
<rect x="940" y="72" width="200" height="56" rx="6" fill="#f5f5f5"/>
|
|
499
|
+
<rect x="940" y="72" width="200" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
500
|
+
<rect x="948" y="80" width="28" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
|
|
501
|
+
<text x="962.0" y="89" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DSH</text>
|
|
502
|
+
<text x="1040" y="104" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif" text-anchor="middle">槽位台账</text>
|
|
503
|
+
<text x="1040" y="120" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" text-anchor="middle">slot ledger</text>
|
|
504
|
+
<rect x="236" y="172" width="8" height="196" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
505
|
+
<rect x="636" y="172" width="8" height="100" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
506
|
+
<rect x="1036" y="300" width="8" height="72" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
507
|
+
<line x1="240" y1="176" x2="640" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s5-arrow)"/>
|
|
508
|
+
<rect x="396" y="156" width="88" height="12" rx="2" fill="#f5f5f5"/>
|
|
509
|
+
<text x="440" y="167" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">INJECT SERVICE</text>
|
|
510
|
+
<line x1="640" y1="224" x2="240" y2="224" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s5-arrow-accent)"/>
|
|
511
|
+
<rect x="412" y="204" width="56" height="12" rx="2" fill="#f5f5f5"/>
|
|
512
|
+
<text x="440" y="215" fill="#eb6c36" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">PROVIDED</text>
|
|
513
|
+
<line x1="240" y1="272" x2="1040" y2="272" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s5-arrow)"/>
|
|
514
|
+
<rect x="804" y="252" width="72" height="12" rx="2" fill="#f5f5f5"/>
|
|
515
|
+
<text x="840" y="263" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">INJECT SLOT</text>
|
|
516
|
+
<line x1="1040" y1="320" x2="240" y2="320" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s5-arrow)"/>
|
|
517
|
+
<rect x="412" y="300" width="56" height="12" rx="2" fill="#f5f5f5"/>
|
|
518
|
+
<text x="440" y="311" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">DECLARED</text>
|
|
519
|
+
<rect x="188" y="360" width="504" height="168" rx="4" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.22)" stroke-width="1"/>
|
|
520
|
+
<rect x="188" y="360" width="44" height="16" rx="2" fill="#f5f5f5" stroke="rgba(45,49,66,0.22)" stroke-width="1"/>
|
|
521
|
+
<text x="210" y="371" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.12em">OPT</text>
|
|
522
|
+
<text x="200" y="396" fill="#4f5d75" font-size="8" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace" letter-spacing="0.04em">[未安装]</text>
|
|
523
|
+
<line x1="240" y1="440" x2="640" y2="440" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s5-arrow)"/>
|
|
524
|
+
<rect x="396" y="420" width="88" height="12" rx="2" fill="#f5f5f5"/>
|
|
525
|
+
<text x="440" y="431" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">INJECT SERVICE</text>
|
|
526
|
+
<line x1="640" y1="496" x2="240" y2="496" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s5-arrow)"/>
|
|
527
|
+
<rect x="402" y="476" width="76" height="12" rx="2" fill="#f5f5f5"/>
|
|
528
|
+
<text x="440" y="487" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">NOT PROVIDED</text>
|
|
529
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
530
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
531
|
+
<rect x="40" y="674" width="4" height="12" fill="rgba(45,49,66,0.06)" stroke="#4f5d75" stroke-width="0.8"/>
|
|
532
|
+
<text x="52" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">激活区间</text>
|
|
533
|
+
<line x1="132" y1="681" x2="160" y2="681" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#s5-arrow)"/>
|
|
534
|
+
<text x="168" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">注入 / 调用</text>
|
|
535
|
+
<line x1="288" y1="681" x2="316" y2="681" stroke="#4f5d75" stroke-width="1.2" stroke-dasharray="5,4" marker-end="url(#s5-arrow)"/>
|
|
536
|
+
<text x="324" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">回执</text>
|
|
537
|
+
<line x1="384" y1="681" x2="412" y2="681" stroke="#eb6c36" stroke-width="1.4" marker-end="url(#s5-arrow-accent)"/>
|
|
538
|
+
<text x="420" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">主链路结果</text>
|
|
539
|
+
</svg>
|
|
540
|
+
</div>
|
|
541
|
+
</section>
|
|
542
|
+
<p class="colophon">doc-wide 1280×720 · 默认皮肤 · 与 extension-service-design.md 配套</p>
|
|
543
|
+
</div>
|
|
544
|
+
</body>
|
|
545
|
+
</html>
|