@4fu/arbor-plugin-http 0.0.0-stage → 2026.1106.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 +85 -2
- package/channel.d.ts +135 -0
- package/channel.js +395 -0
- package/index.d.ts +10 -0
- package/index.js +10 -0
- package/package.json +41 -4
- package/plugin.d.ts +42 -0
- package/plugin.js +95 -0
- package/server.d.ts +32 -0
- package/server.js +121 -0
- package/web/app.js +197 -0
- package/web/index.html +213 -0
package/web/index.html
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
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" />
|
|
6
|
+
<title>arbor · HTTP 测试频道</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
color-scheme: light dark;
|
|
10
|
+
--line: #c9c9c9;
|
|
11
|
+
--muted: #777;
|
|
12
|
+
--in: #eef2f7;
|
|
13
|
+
--out: #dff0e2;
|
|
14
|
+
}
|
|
15
|
+
* {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
21
|
+
}
|
|
22
|
+
header {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: baseline;
|
|
25
|
+
gap: 12px;
|
|
26
|
+
padding: 10px 16px;
|
|
27
|
+
border-bottom: 1px solid var(--line);
|
|
28
|
+
}
|
|
29
|
+
header h1 {
|
|
30
|
+
font-size: 15px;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
#status {
|
|
34
|
+
margin: 0;
|
|
35
|
+
color: var(--muted);
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
}
|
|
38
|
+
main {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: 220px minmax(0, 1fr) 320px;
|
|
41
|
+
gap: 16px;
|
|
42
|
+
padding: 16px;
|
|
43
|
+
align-items: start;
|
|
44
|
+
}
|
|
45
|
+
@media (max-width: 900px) {
|
|
46
|
+
main {
|
|
47
|
+
grid-template-columns: 1fr;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
section {
|
|
51
|
+
border: 1px solid var(--line);
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
padding: 12px;
|
|
54
|
+
min-height: 120px;
|
|
55
|
+
}
|
|
56
|
+
h2 {
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
letter-spacing: 0.06em;
|
|
60
|
+
color: var(--muted);
|
|
61
|
+
margin: 0 0 8px;
|
|
62
|
+
}
|
|
63
|
+
ul {
|
|
64
|
+
list-style: none;
|
|
65
|
+
margin: 0;
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
#conversation-list li {
|
|
69
|
+
padding: 4px 6px;
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
}
|
|
76
|
+
#conversation-list li:hover {
|
|
77
|
+
background: var(--in);
|
|
78
|
+
}
|
|
79
|
+
#conversation-list li[aria-current="true"] {
|
|
80
|
+
background: var(--in);
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
}
|
|
83
|
+
#conversation-list li .count {
|
|
84
|
+
color: var(--muted);
|
|
85
|
+
font-weight: 400;
|
|
86
|
+
}
|
|
87
|
+
form {
|
|
88
|
+
display: flex;
|
|
89
|
+
gap: 6px;
|
|
90
|
+
margin-top: 8px;
|
|
91
|
+
}
|
|
92
|
+
input,
|
|
93
|
+
textarea,
|
|
94
|
+
button {
|
|
95
|
+
font: inherit;
|
|
96
|
+
padding: 6px 8px;
|
|
97
|
+
border: 1px solid var(--line);
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
background: transparent;
|
|
100
|
+
color: inherit;
|
|
101
|
+
}
|
|
102
|
+
button {
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
#composer {
|
|
106
|
+
margin-top: 12px;
|
|
107
|
+
align-items: flex-end;
|
|
108
|
+
}
|
|
109
|
+
#text {
|
|
110
|
+
flex: 1;
|
|
111
|
+
resize: vertical;
|
|
112
|
+
min-height: 56px;
|
|
113
|
+
}
|
|
114
|
+
ol#messages {
|
|
115
|
+
list-style: none;
|
|
116
|
+
margin: 0;
|
|
117
|
+
padding: 0;
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
gap: 8px;
|
|
121
|
+
}
|
|
122
|
+
.message {
|
|
123
|
+
max-width: 78%;
|
|
124
|
+
padding: 8px 10px;
|
|
125
|
+
border-radius: 8px;
|
|
126
|
+
white-space: pre-wrap;
|
|
127
|
+
overflow-wrap: anywhere;
|
|
128
|
+
}
|
|
129
|
+
.message.in {
|
|
130
|
+
align-self: flex-start;
|
|
131
|
+
background: var(--in);
|
|
132
|
+
}
|
|
133
|
+
.message.out {
|
|
134
|
+
align-self: flex-end;
|
|
135
|
+
background: var(--out);
|
|
136
|
+
}
|
|
137
|
+
.message header {
|
|
138
|
+
display: flex;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
padding: 0 0 4px;
|
|
141
|
+
border: 0;
|
|
142
|
+
font-size: 11px;
|
|
143
|
+
color: var(--muted);
|
|
144
|
+
}
|
|
145
|
+
table {
|
|
146
|
+
width: 100%;
|
|
147
|
+
border-collapse: collapse;
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
}
|
|
150
|
+
th,
|
|
151
|
+
td {
|
|
152
|
+
text-align: left;
|
|
153
|
+
padding: 4px 6px;
|
|
154
|
+
border-bottom: 1px solid var(--line);
|
|
155
|
+
vertical-align: top;
|
|
156
|
+
}
|
|
157
|
+
th {
|
|
158
|
+
color: var(--muted);
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
}
|
|
161
|
+
td.doing {
|
|
162
|
+
max-width: 150px;
|
|
163
|
+
overflow-wrap: anywhere;
|
|
164
|
+
}
|
|
165
|
+
.empty {
|
|
166
|
+
color: var(--muted);
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
169
|
+
</head>
|
|
170
|
+
<body>
|
|
171
|
+
<header>
|
|
172
|
+
<h1>arbor · HTTP 测试频道</h1>
|
|
173
|
+
<p id="status">连接中……</p>
|
|
174
|
+
</header>
|
|
175
|
+
<main>
|
|
176
|
+
<section id="conversations">
|
|
177
|
+
<h2>来源</h2>
|
|
178
|
+
<ul id="conversation-list"></ul>
|
|
179
|
+
<form id="new-conversation">
|
|
180
|
+
<input id="new-conversation-name" placeholder="新来源名" autocomplete="off" />
|
|
181
|
+
<button type="submit">新建</button>
|
|
182
|
+
</form>
|
|
183
|
+
</section>
|
|
184
|
+
|
|
185
|
+
<section id="chat">
|
|
186
|
+
<h2 id="conversation-title">选择一个来源</h2>
|
|
187
|
+
<ol id="messages"></ol>
|
|
188
|
+
<p id="chat-empty" class="empty">还没有消息。</p>
|
|
189
|
+
<form id="composer">
|
|
190
|
+
<textarea id="text" placeholder="给这个来源发一条消息"></textarea>
|
|
191
|
+
<button id="send" type="submit">发送</button>
|
|
192
|
+
</form>
|
|
193
|
+
</section>
|
|
194
|
+
|
|
195
|
+
<section id="board">
|
|
196
|
+
<h2>现场板(只读)</h2>
|
|
197
|
+
<table>
|
|
198
|
+
<thead>
|
|
199
|
+
<tr>
|
|
200
|
+
<th>窗口</th>
|
|
201
|
+
<th>状态</th>
|
|
202
|
+
<th>在做</th>
|
|
203
|
+
<th>用量</th>
|
|
204
|
+
</tr>
|
|
205
|
+
</thead>
|
|
206
|
+
<tbody id="board-body"></tbody>
|
|
207
|
+
</table>
|
|
208
|
+
<p id="board-empty" class="empty">没有运行中的窗口。</p>
|
|
209
|
+
</section>
|
|
210
|
+
</main>
|
|
211
|
+
<script src="/app.js"></script>
|
|
212
|
+
</body>
|
|
213
|
+
</html>
|