@dsh-ft/dsh-fft-settings 0.0.0-stage → 0.5.1
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 +395 -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 +806 -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 +17 -0
- package/lib/features/api-key/probe.js +148 -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/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +108 -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 +125 -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,139 @@
|
|
|
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>设置插件的模块、两条缝与接口</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
|
+
body { font-family: 'Geist', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif; background: #f5f5f5; color: #2d3142;
|
|
11
|
+
min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; }
|
|
12
|
+
.frame { max-width: 1360px; width: 100%; }
|
|
13
|
+
.eyebrow { font-family: 'Geist Mono', monospace; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
|
|
14
|
+
color: #4f5d75; margin-bottom: 0.5rem; }
|
|
15
|
+
h1 { font-family: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', serif; font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem); font-weight: 400; letter-spacing: -0.02em;
|
|
16
|
+
line-height: 1.15; margin-bottom: 0.75rem; }
|
|
17
|
+
.lede { max-width: 74ch; color: #4f5d75; font-size: 0.95rem; line-height: 1.6; margin-bottom: 2rem; }
|
|
18
|
+
.diagram-container { width: 100%; overflow-x: auto; }
|
|
19
|
+
svg { width: 100%; min-width: 1280px; display: block; }
|
|
20
|
+
@media print { .diagram-container { overflow-x: visible; } svg { min-width: 0; } }
|
|
21
|
+
.note { max-width: 78ch; color: #4f5d75; font-size: 0.8rem; line-height: 1.6; margin-top: 1.25rem; }
|
|
22
|
+
.colophon { font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; color: #7a8399;
|
|
23
|
+
border-top: 1px solid rgba(45,49,66,0.10); padding-top: 0.85rem; margin-top: 2rem; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<div class="frame">
|
|
28
|
+
<p class="eyebrow">ER · Logical model</p>
|
|
29
|
+
<h1>模块、两条缝与接口</h1>
|
|
30
|
+
<p class="lede">代码实体关系,不是数据库表。宿主侧一条缝(<code>ctx.ftshareSettings.modules.register</code>),浏览器侧一条缝(<code>ftshare.settings.card</code> 槽位);核心不认识任何业务词汇,<code>features/api-key/</code> 与第三方模块走完全相同的注册路径。</p>
|
|
31
|
+
<div class="diagram-container">
|
|
32
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="ftshare-settings-er-title ftshare-settings-er-desc">
|
|
33
|
+
<title id="ftshare-settings-er-title">设置插件的模块、两条缝与接口</title>
|
|
34
|
+
<desc id="ftshare-settings-er-desc">ER 图:宿主注册表把模块注册成命名空间与 RPC 方法,浏览器设置页声明卡片槽位,内置 apiKey 特性走与第三方相同的两条缝。</desc>
|
|
35
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
36
|
+
<rect x="60" y="180" width="300" height="148" rx="6" fill="#f5f5f5"/>
|
|
37
|
+
<rect x="60" y="180" width="300" height="148" rx="6" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
38
|
+
<rect x="68" y="188" width="34" height="12" rx="2" fill="transparent" stroke="#eb6c36" stroke-width="0.8"/>
|
|
39
|
+
<text x="85" y="197" fill="#eb6c36" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
40
|
+
<text x="110" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">FtshareSettingsHost</text>
|
|
41
|
+
<text x="72" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
42
|
+
<line x1="72" y1="232" x2="348" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
43
|
+
<text x="72" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">service: FtshareSettingsService</text>
|
|
44
|
+
<text x="72" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">handler: SettingsRpcHandler</text>
|
|
45
|
+
<text x="72" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">register(module, owner): Reg</text>
|
|
46
|
+
<text x="72" y="314" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">namespaces(): readonly string[]</text>
|
|
47
|
+
<rect x="460" y="180" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
48
|
+
<rect x="460" y="180" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
49
|
+
<rect x="468" y="188" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
50
|
+
<text x="485" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
51
|
+
<text x="510" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsModule<N, S></text>
|
|
52
|
+
<text x="472" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
53
|
+
<line x1="472" y1="232" x2="768" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
54
|
+
<text x="472" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">namespace: N(endpoint 前缀)</text>
|
|
55
|
+
<text x="472" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">inject: readonly string[]</text>
|
|
56
|
+
<text x="472" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">create(ctx): { service, rpcMethods }</text>
|
|
57
|
+
<rect x="860" y="180" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
58
|
+
<rect x="860" y="180" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
59
|
+
<rect x="868" y="188" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
60
|
+
<text x="885" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
61
|
+
<text x="910" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">设置页外壳 · section</text>
|
|
62
|
+
<text x="872" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/shell.tsx</text>
|
|
63
|
+
<line x1="872" y1="232" x2="1168" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
64
|
+
<text x="872" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">注册 settings.section 条目</text>
|
|
65
|
+
<text x="872" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">children: ftshare.settings.card</text>
|
|
66
|
+
<text x="872" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">renderSlot(card) · 自带 <style></text>
|
|
67
|
+
<rect x="60" y="420" width="300" height="128" rx="6" fill="#f5f5f5"/>
|
|
68
|
+
<rect x="60" y="420" width="300" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
69
|
+
<rect x="68" y="428" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
70
|
+
<text x="85" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
71
|
+
<text x="110" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsRpcHandler</text>
|
|
72
|
+
<text x="72" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/rpc-core.ts</text>
|
|
73
|
+
<line x1="72" y1="472" x2="348" y2="472" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
74
|
+
<text x="72" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">register(module) / unregister(ns)</text>
|
|
75
|
+
<text x="72" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">call(endpoint, payload, signal)</text>
|
|
76
|
+
<text x="72" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">白名单:namespace / method</text>
|
|
77
|
+
<rect x="460" y="420" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
78
|
+
<rect x="460" y="420" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
79
|
+
<rect x="468" y="428" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
80
|
+
<text x="485" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
81
|
+
<text x="510" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsRegistration</text>
|
|
82
|
+
<text x="472" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
83
|
+
<line x1="472" y1="472" x2="768" y2="472" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
84
|
+
<text x="472" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">service: S</text>
|
|
85
|
+
<text x="472" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">dispose(): void(幂等)</text>
|
|
86
|
+
<text x="472" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">owner fiber 释放即撤销两条缝</text>
|
|
87
|
+
<rect x="860" y="420" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
88
|
+
<rect x="860" y="420" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
89
|
+
<rect x="868" y="428" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
90
|
+
<text x="885" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
91
|
+
<text x="910" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">卡片 · 槽位条目</text>
|
|
92
|
+
<text x="872" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/shell.tsx</text>
|
|
93
|
+
<line x1="872" y1="472" x2="1168" y2="472" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
94
|
+
<text x="872" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">id / order / label</text>
|
|
95
|
+
<text x="872" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">owner props 为空(无 settings 内部)</text>
|
|
96
|
+
<text x="872" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">实现:features/api-key/card.tsx</text>
|
|
97
|
+
<line x1="360" y1="254" x2="460" y2="254" stroke="#4f5d75" stroke-width="1.2"/>
|
|
98
|
+
<rect x="376" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
99
|
+
<text x="384" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
100
|
+
<rect x="428" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
101
|
+
<text x="436" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">N</text>
|
|
102
|
+
<rect x="381.5" y="268" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
103
|
+
<text x="410" y="277" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">register()</text>
|
|
104
|
+
<line x1="210" y1="328" x2="210" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
105
|
+
<rect x="186" y="342" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
106
|
+
<text x="194" y="351" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
107
|
+
<rect x="186" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
108
|
+
<text x="194" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
109
|
+
<rect x="218.36" y="368.0" width="42" height="12" rx="2" fill="#f5f5f5"/>
|
|
110
|
+
<text x="239.36" y="377.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">handler</text>
|
|
111
|
+
<line x1="620" y1="308" x2="620" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
112
|
+
<rect x="596" y="322" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
113
|
+
<text x="604" y="331" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
114
|
+
<rect x="596" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
115
|
+
<text x="604" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
116
|
+
<rect x="628.34" y="358.0" width="47" height="12" rx="2" fill="#f5f5f5"/>
|
|
117
|
+
<text x="651.84" y="367.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">create()</text>
|
|
118
|
+
<line x1="1020" y1="308" x2="1020" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
119
|
+
<rect x="996" y="322" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
120
|
+
<text x="1004" y="331" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
121
|
+
<rect x="996" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
122
|
+
<text x="1004" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">N</text>
|
|
123
|
+
<rect x="1028.3" y="358.0" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
124
|
+
<text x="1056.8" y="367.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">renderSlot</text>
|
|
125
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
126
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
127
|
+
<text x="40" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>
|
|
128
|
+
<line x1="50" y1="681" x2="86" y2="681" stroke="#4f5d75" stroke-width="1.2"/>
|
|
129
|
+
<text x="94" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">N</text>
|
|
130
|
+
<text x="114" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">关系基数</text>
|
|
131
|
+
<rect x="192" y="674" width="14" height="10" rx="2" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
132
|
+
<text x="216" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">聚合根</text>
|
|
133
|
+
</svg>
|
|
134
|
+
</div>
|
|
135
|
+
<p class="note">关系只画四个:宿主对模块的一对多注册、模块与注册句柄的一对一产出、宿主与活派发表的一对一持有、外壳对卡片的一对多渲染。命名空间属性与服务实例是注册的产物,不单独成实体;<code>apiKey</code> 只是这些实体当前的一个实现样例。</p>
|
|
136
|
+
<p class="colophon">doc-wide 1280×720 · 默认皮肤 · @ft/dsh-fft-settings 0.3.0</p>
|
|
137
|
+
</div>
|
|
138
|
+
</body>
|
|
139
|
+
</html>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="ftshare-settings-er-title ftshare-settings-er-desc" id="ftshare-settings-er-root">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>@import url('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+Serif:ital@0;1&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&family=Noto+Sans+TC:wght@400;500;600&family=Noto+Serif+TC:wght@400&display=swap');
|
|
5
|
+
#ftshare-settings-er-root { font-family: 'Geist', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif; color: #2d3142; }
|
|
6
|
+
#ftshare-settings-er-root .lede { max-width: 74ch; color: #4f5d75; font-size: 0.95rem; line-height: 1.6; margin-bottom: 2rem; }
|
|
7
|
+
#ftshare-settings-er-root .diagram-container { width: 100%; overflow-x: auto; }
|
|
8
|
+
#ftshare-settings-er-root .diagram-container { overflow-x: visible; }
|
|
9
|
+
#ftshare-settings-er-root .note { max-width: 78ch; color: #4f5d75; font-size: 0.8rem; line-height: 1.6; margin-top: 1.25rem; }
|
|
10
|
+
#ftshare-settings-er-root .colophon { font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; color: #7a8399;
|
|
11
|
+
border-top: 1px solid rgba(45,49,66,0.10); padding-top: 0.85rem; margin-top: 2rem; }</style>
|
|
12
|
+
</defs>
|
|
13
|
+
<title id="ftshare-settings-er-title">设置插件的模块、两条缝与接口</title>
|
|
14
|
+
<desc id="ftshare-settings-er-desc">ER 图:宿主注册表把模块注册成命名空间与 RPC 方法,浏览器设置页声明卡片槽位,内置 apiKey 特性走与第三方相同的两条缝。</desc>
|
|
15
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
16
|
+
<rect x="60" y="180" width="300" height="148" rx="6" fill="#f5f5f5"/>
|
|
17
|
+
<rect x="60" y="180" width="300" height="148" rx="6" fill="#eb6c36" fill-opacity="0.08" stroke="#eb6c36" stroke-width="1"/>
|
|
18
|
+
<rect x="68" y="188" width="34" height="12" rx="2" fill="none" stroke="#eb6c36" stroke-width="0.8"/>
|
|
19
|
+
<text x="85" y="197" fill="#eb6c36" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
20
|
+
<text x="110" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">FtshareSettingsHost</text>
|
|
21
|
+
<text x="72" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
22
|
+
<line x1="72" y1="232" x2="348" y2="232" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
23
|
+
<text x="72" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">service: FtshareSettingsService</text>
|
|
24
|
+
<text x="72" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">handler: SettingsRpcHandler</text>
|
|
25
|
+
<text x="72" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">register(module, owner): Reg</text>
|
|
26
|
+
<text x="72" y="314" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">namespaces(): readonly string[]</text>
|
|
27
|
+
<rect x="460" y="180" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
28
|
+
<rect x="460" y="180" width="320" height="128" rx="6" fill="#2d3142" fill-opacity="0.03" stroke="#2d3142" stroke-opacity="0.30" stroke-width="1"/>
|
|
29
|
+
<rect x="468" y="188" width="34" height="12" rx="2" fill="none" stroke="#2d3142" stroke-opacity="0.30" stroke-width="0.8"/>
|
|
30
|
+
<text x="485" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
31
|
+
<text x="510" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsModule<N, S></text>
|
|
32
|
+
<text x="472" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
33
|
+
<line x1="472" y1="232" x2="768" y2="232" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
34
|
+
<text x="472" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">namespace: N(endpoint 前缀)</text>
|
|
35
|
+
<text x="472" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">inject: readonly string[]</text>
|
|
36
|
+
<text x="472" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">create(ctx): { service, rpcMethods }</text>
|
|
37
|
+
<rect x="860" y="180" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
38
|
+
<rect x="860" y="180" width="320" height="128" rx="6" fill="#2d3142" fill-opacity="0.03" stroke="#2d3142" stroke-opacity="0.30" stroke-width="1"/>
|
|
39
|
+
<rect x="868" y="188" width="34" height="12" rx="2" fill="none" stroke="#2d3142" stroke-opacity="0.30" stroke-width="0.8"/>
|
|
40
|
+
<text x="885" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
41
|
+
<text x="910" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">设置页外壳 · section</text>
|
|
42
|
+
<text x="872" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/shell.tsx</text>
|
|
43
|
+
<line x1="872" y1="232" x2="1168" y2="232" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
44
|
+
<text x="872" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">注册 settings.section 条目</text>
|
|
45
|
+
<text x="872" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">children: ftshare.settings.card</text>
|
|
46
|
+
<text x="872" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">renderSlot(card) · 自带 <style></text>
|
|
47
|
+
<rect x="60" y="420" width="300" height="128" rx="6" fill="#f5f5f5"/>
|
|
48
|
+
<rect x="60" y="420" width="300" height="128" rx="6" fill="#2d3142" fill-opacity="0.03" stroke="#2d3142" stroke-opacity="0.30" stroke-width="1"/>
|
|
49
|
+
<rect x="68" y="428" width="34" height="12" rx="2" fill="none" stroke="#2d3142" stroke-opacity="0.30" stroke-width="0.8"/>
|
|
50
|
+
<text x="85" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
51
|
+
<text x="110" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsRpcHandler</text>
|
|
52
|
+
<text x="72" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/rpc-core.ts</text>
|
|
53
|
+
<line x1="72" y1="472" x2="348" y2="472" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
54
|
+
<text x="72" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">register(module) / unregister(ns)</text>
|
|
55
|
+
<text x="72" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">call(endpoint, payload, signal)</text>
|
|
56
|
+
<text x="72" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">白名单:namespace / method</text>
|
|
57
|
+
<rect x="460" y="420" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
58
|
+
<rect x="460" y="420" width="320" height="128" rx="6" fill="#2d3142" fill-opacity="0.03" stroke="#2d3142" stroke-opacity="0.30" stroke-width="1"/>
|
|
59
|
+
<rect x="468" y="428" width="34" height="12" rx="2" fill="none" stroke="#2d3142" stroke-opacity="0.30" stroke-width="0.8"/>
|
|
60
|
+
<text x="485" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
61
|
+
<text x="510" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SettingsRegistration</text>
|
|
62
|
+
<text x="472" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/module-registry.ts</text>
|
|
63
|
+
<line x1="472" y1="472" x2="768" y2="472" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
64
|
+
<text x="472" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">service: S</text>
|
|
65
|
+
<text x="472" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">dispose(): void(幂等)</text>
|
|
66
|
+
<text x="472" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">owner fiber 释放即撤销两条缝</text>
|
|
67
|
+
<rect x="860" y="420" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
68
|
+
<rect x="860" y="420" width="320" height="128" rx="6" fill="#2d3142" fill-opacity="0.03" stroke="#2d3142" stroke-opacity="0.30" stroke-width="1"/>
|
|
69
|
+
<rect x="868" y="428" width="34" height="12" rx="2" fill="none" stroke="#2d3142" stroke-opacity="0.30" stroke-width="0.8"/>
|
|
70
|
+
<text x="885" y="437" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
71
|
+
<text x="910" y="437" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">卡片 · 槽位条目</text>
|
|
72
|
+
<text x="872" y="456" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">core/shell.tsx</text>
|
|
73
|
+
<line x1="872" y1="472" x2="1168" y2="472" stroke="#2d3142" stroke-opacity="0.12" stroke-width="0.8"/>
|
|
74
|
+
<text x="872" y="494" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">id / order / label</text>
|
|
75
|
+
<text x="872" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">owner props 为空(无 settings 内部)</text>
|
|
76
|
+
<text x="872" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">实现:features/api-key/card.tsx</text>
|
|
77
|
+
<line x1="360" y1="254" x2="460" y2="254" stroke="#4f5d75" stroke-width="1.2"/>
|
|
78
|
+
<rect x="376" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
79
|
+
<text x="384" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
80
|
+
<rect x="428" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
81
|
+
<text x="436" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">N</text>
|
|
82
|
+
<rect x="381.5" y="268" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
83
|
+
<text x="410" y="277" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">register()</text>
|
|
84
|
+
<line x1="210" y1="328" x2="210" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
85
|
+
<rect x="186" y="342" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
86
|
+
<text x="194" y="351" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
87
|
+
<rect x="186" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
88
|
+
<text x="194" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
89
|
+
<rect x="218.36" y="368.0" width="42" height="12" rx="2" fill="#f5f5f5"/>
|
|
90
|
+
<text x="239.36" y="377.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">handler</text>
|
|
91
|
+
<line x1="620" y1="308" x2="620" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
92
|
+
<rect x="596" y="322" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
93
|
+
<text x="604" y="331" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
94
|
+
<rect x="596" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
95
|
+
<text x="604" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
96
|
+
<rect x="628.34" y="358.0" width="47" height="12" rx="2" fill="#f5f5f5"/>
|
|
97
|
+
<text x="651.84" y="367.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">create()</text>
|
|
98
|
+
<line x1="1020" y1="308" x2="1020" y2="420" stroke="#4f5d75" stroke-width="1.2"/>
|
|
99
|
+
<rect x="996" y="322" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
100
|
+
<text x="1004" y="331" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
101
|
+
<rect x="996" y="394" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
102
|
+
<text x="1004" y="403" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">N</text>
|
|
103
|
+
<rect x="1028.3" y="358.0" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
104
|
+
<text x="1056.8" y="367.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">renderSlot</text>
|
|
105
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="#2d3142" stroke-opacity="0.10" stroke-width="0.8"/>
|
|
106
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
107
|
+
<text x="40" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>
|
|
108
|
+
<line x1="50" y1="681" x2="86" y2="681" stroke="#4f5d75" stroke-width="1.2"/>
|
|
109
|
+
<text x="94" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">N</text>
|
|
110
|
+
<text x="114" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">关系基数</text>
|
|
111
|
+
<rect x="192" y="674" width="14" height="10" rx="2" fill="#eb6c36" fill-opacity="0.08" stroke="#eb6c36" stroke-width="1"/>
|
|
112
|
+
<text x="216" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">聚合根</text>
|
|
113
|
+
</svg>
|
|
@@ -0,0 +1,148 @@
|
|
|
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>设置状态、保存结果与检测结果的值对象</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
|
+
body { font-family: 'Geist', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif; background: #f5f5f5; color: #2d3142;
|
|
11
|
+
min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; }
|
|
12
|
+
.frame { max-width: 1360px; width: 100%; }
|
|
13
|
+
.eyebrow { font-family: 'Geist Mono', monospace; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
|
|
14
|
+
color: #4f5d75; margin-bottom: 0.5rem; }
|
|
15
|
+
h1 { font-family: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', serif; font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem); font-weight: 400; letter-spacing: -0.02em;
|
|
16
|
+
line-height: 1.15; margin-bottom: 0.75rem; }
|
|
17
|
+
.lede { max-width: 74ch; color: #4f5d75; font-size: 0.95rem; line-height: 1.6; margin-bottom: 2rem; }
|
|
18
|
+
.diagram-container { width: 100%; overflow-x: auto; }
|
|
19
|
+
svg { width: 100%; min-width: 1280px; display: block; }
|
|
20
|
+
@media print { .diagram-container { overflow-x: visible; } svg { min-width: 0; } }
|
|
21
|
+
.note { max-width: 78ch; color: #4f5d75; font-size: 0.8rem; line-height: 1.6; margin-top: 1.25rem; }
|
|
22
|
+
.colophon { font-family: 'Geist Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; color: #7a8399;
|
|
23
|
+
border-top: 1px solid rgba(45,49,66,0.10); padding-top: 0.85rem; margin-top: 2rem; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<div class="frame">
|
|
28
|
+
<p class="eyebrow">ER · Result model</p>
|
|
29
|
+
<h1>保存状态与检测结果</h1>
|
|
30
|
+
<p class="lede">代码实体关系,不是数据库表;全部实体都归 <code>features/api-key/contract.ts</code> 所有(core 不再认识这些词汇)。数量表示每个返回对象包含的值对象数量,不表示共享可变实例或历史记录表。</p>
|
|
31
|
+
<div class="diagram-container">
|
|
32
|
+
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="ftshare-settings-results-er-title ftshare-settings-results-er-desc">
|
|
33
|
+
<title id="ftshare-settings-results-er-title">设置状态、保存结果与检测结果的值对象</title>
|
|
34
|
+
<desc id="ftshare-settings-results-er-desc">ER 图:API Key 状态继承凭据状态,配置结果分别携带本次保存结果与验证结果,验证结果由远端服务和 Key 两个探测结果组成。</desc>
|
|
35
|
+
<rect width="100%" height="100%" fill="#f5f5f5"/>
|
|
36
|
+
<rect x="60" y="180" width="300" height="188" rx="6" fill="#f5f5f5"/>
|
|
37
|
+
<rect x="60" y="180" width="300" height="188" rx="6" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
38
|
+
<rect x="68" y="188" width="34" height="12" rx="2" fill="transparent" stroke="#eb6c36" stroke-width="0.8"/>
|
|
39
|
+
<text x="85" y="197" fill="#eb6c36" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
40
|
+
<text x="110" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">ApiKeyStatus</text>
|
|
41
|
+
<text x="72" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
42
|
+
<line x1="72" y1="232" x2="348" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
43
|
+
<text x="72" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">configured: boolean</text>
|
|
44
|
+
<text x="72" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">writable: boolean</text>
|
|
45
|
+
<text x="72" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">source?: string</text>
|
|
46
|
+
<text x="72" y="314" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">maskedValue?: string(仅展示)</text>
|
|
47
|
+
<text x="72" y="334" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">revision: number(进程内)</text>
|
|
48
|
+
<text x="72" y="354" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">validation: ValidationResult</text>
|
|
49
|
+
<rect x="460" y="180" width="320" height="148" rx="6" fill="#f5f5f5"/>
|
|
50
|
+
<rect x="460" y="180" width="320" height="148" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
51
|
+
<rect x="468" y="188" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
52
|
+
<text x="485" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
53
|
+
<text x="510" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">ValidationResult</text>
|
|
54
|
+
<text x="472" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
55
|
+
<line x1="472" y1="232" x2="768" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
56
|
+
<text x="472" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">status: not_tested | passed | …</text>
|
|
57
|
+
<text x="472" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">remote: ProbeResult</text>
|
|
58
|
+
<text x="472" y="294" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">apiKey: ProbeResult</text>
|
|
59
|
+
<text x="472" y="314" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">testedAt?: string</text>
|
|
60
|
+
<rect x="860" y="180" width="320" height="108" rx="6" fill="#f5f5f5"/>
|
|
61
|
+
<rect x="860" y="180" width="320" height="108" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
62
|
+
<rect x="868" y="188" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
63
|
+
<text x="885" y="197" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
64
|
+
<text x="910" y="197" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">ProbeResult</text>
|
|
65
|
+
<text x="872" y="216" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
66
|
+
<line x1="872" y1="232" x2="1168" y2="232" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
67
|
+
<text x="872" y="254" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">status: ProbeState(11 项)</text>
|
|
68
|
+
<text x="872" y="274" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">message: string</text>
|
|
69
|
+
<rect x="60" y="440" width="300" height="128" rx="6" fill="#f5f5f5"/>
|
|
70
|
+
<rect x="60" y="440" width="300" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
71
|
+
<rect x="68" y="448" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
72
|
+
<text x="85" y="457" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
73
|
+
<text x="110" y="457" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">CredentialStatus</text>
|
|
74
|
+
<text x="72" y="476" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
75
|
+
<line x1="72" y1="492" x2="348" y2="492" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
76
|
+
<text x="72" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">configured: boolean</text>
|
|
77
|
+
<text x="72" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">writable: boolean</text>
|
|
78
|
+
<text x="72" y="554" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">source?: string</text>
|
|
79
|
+
<rect x="460" y="440" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
80
|
+
<rect x="460" y="440" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
81
|
+
<rect x="468" y="448" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
82
|
+
<text x="485" y="457" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
83
|
+
<text x="510" y="457" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">ConfigureResult</text>
|
|
84
|
+
<text x="472" y="476" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
85
|
+
<line x1="472" y1="492" x2="768" y2="492" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
86
|
+
<text x="472" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">save: SaveOutcome</text>
|
|
87
|
+
<text x="472" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">validation: ValidationResult</text>
|
|
88
|
+
<text x="472" y="554" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">保存失败不回滚验证结果</text>
|
|
89
|
+
<rect x="860" y="440" width="320" height="128" rx="6" fill="#f5f5f5"/>
|
|
90
|
+
<rect x="860" y="440" width="320" height="128" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
|
|
91
|
+
<rect x="868" y="448" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
|
|
92
|
+
<text x="885" y="457" fill="#7a8399" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">ENTITY</text>
|
|
93
|
+
<text x="910" y="457" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">SaveOutcome</text>
|
|
94
|
+
<text x="872" y="476" fill="#7a8399" font-size="8" font-family="'Geist Mono', monospace">features/api-key/contract.ts</text>
|
|
95
|
+
<line x1="872" y1="492" x2="1168" y2="492" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
|
|
96
|
+
<text x="872" y="514" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">status: saved | failed</text>
|
|
97
|
+
<text x="872" y="534" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">code?: invalid_input | read_only</text>
|
|
98
|
+
<text x="872" y="554" fill="#4f5d75" font-size="9" font-family="'Geist Mono', 'Noto Sans Mono CJK SC', monospace">message: string</text>
|
|
99
|
+
<line x1="360" y1="254" x2="460" y2="254" stroke="#4f5d75" stroke-width="1.2"/>
|
|
100
|
+
<rect x="376" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
101
|
+
<text x="384" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
102
|
+
<rect x="428" y="228" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
103
|
+
<text x="436" y="237" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
104
|
+
<rect x="381.5" y="268" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
105
|
+
<text x="410" y="277" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">validation</text>
|
|
106
|
+
<line x1="210" y1="368" x2="210" y2="440" stroke="#4f5d75" stroke-width="1.2"/>
|
|
107
|
+
<rect x="186" y="382" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
108
|
+
<text x="194" y="391" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
109
|
+
<rect x="186" y="414" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
110
|
+
<text x="194" y="423" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
111
|
+
<rect x="218.36" y="398.0" width="42" height="12" rx="2" fill="#f5f5f5"/>
|
|
112
|
+
<text x="239.36" y="407.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">extends</text>
|
|
113
|
+
<line x1="620" y1="328" x2="620" y2="440" stroke="#4f5d75" stroke-width="1.2"/>
|
|
114
|
+
<rect x="596" y="342" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
115
|
+
<text x="604" y="351" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
116
|
+
<rect x="596" y="414" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
117
|
+
<text x="604" y="423" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
118
|
+
<rect x="628.3" y="378.0" width="57" height="12" rx="2" fill="#f5f5f5"/>
|
|
119
|
+
<text x="656.8" y="387.0" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">validation</text>
|
|
120
|
+
<line x1="780" y1="240" x2="860" y2="240" stroke="#4f5d75" stroke-width="1.2"/>
|
|
121
|
+
<rect x="796" y="214" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
122
|
+
<text x="804" y="223" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
123
|
+
<rect x="822.5" y="214" width="27" height="12" rx="2" fill="#f5f5f5"/>
|
|
124
|
+
<text x="836" y="223" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1..2</text>
|
|
125
|
+
<rect x="794" y="254" width="52" height="12" rx="2" fill="#f5f5f5"/>
|
|
126
|
+
<text x="820" y="263" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">two roles</text>
|
|
127
|
+
<line x1="780" y1="504" x2="860" y2="504" stroke="#4f5d75" stroke-width="1.2"/>
|
|
128
|
+
<rect x="796" y="478" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
129
|
+
<text x="804" y="487" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
130
|
+
<rect x="828" y="478" width="16" height="12" rx="2" fill="#f5f5f5"/>
|
|
131
|
+
<text x="836" y="487" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">1</text>
|
|
132
|
+
<rect x="806.5" y="518" width="27" height="12" rx="2" fill="#f5f5f5"/>
|
|
133
|
+
<text x="820" y="527" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">save</text>
|
|
134
|
+
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
|
|
135
|
+
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
|
|
136
|
+
<text x="40" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>
|
|
137
|
+
<line x1="50" y1="681" x2="86" y2="681" stroke="#4f5d75" stroke-width="1.2"/>
|
|
138
|
+
<text x="94" y="684" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">N</text>
|
|
139
|
+
<text x="114" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">关系基数</text>
|
|
140
|
+
<rect x="192" y="674" width="14" height="10" rx="2" fill="rgba(235,108,54,0.08)" stroke="#eb6c36" stroke-width="1"/>
|
|
141
|
+
<text x="216" y="684" fill="#4f5d75" font-size="8.5" font-family="'Geist', 'PingFang SC', 'Noto Sans SC', sans-serif">聚合根</text>
|
|
142
|
+
</svg>
|
|
143
|
+
</div>
|
|
144
|
+
<p class="note">验证只保存在内存,重启即“未测试”;<code>ProbeResult.status</code> 的取值域为 <code>ProbeState</code> 的 11 项(available、auth_required、auth_failed、permission_denied、quota_exceeded、rate_limited、network_error、timeout、upstream_error、invalid_response、not_run)。</p>
|
|
145
|
+
<p class="colophon">doc-wide 1280×720 · 默认皮肤 · @ft/dsh-fft-settings 0.3.0</p>
|
|
146
|
+
</div>
|
|
147
|
+
</body>
|
|
148
|
+
</html>
|