@agent-network-protocol/dsh-anp-identity 0.1.2 → 0.1.3-rc.2
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/BOUNDARY.md +14 -2
- package/README.md +33 -4
- package/README.zh.md +10 -2
- package/V7-MANAGEMENT.md +90 -0
- package/cordis.patch.yml +4 -0
- package/lib/authorization-types.d.ts +150 -0
- package/lib/authorization-types.d.ts.map +1 -0
- package/lib/authorization-types.js +2 -0
- package/lib/authorization-types.js.map +1 -0
- package/lib/authorization.d.ts +45 -0
- package/lib/authorization.d.ts.map +1 -0
- package/lib/authorization.js +718 -0
- package/lib/authorization.js.map +1 -0
- package/lib/catalog.d.ts +7 -2
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +45 -23
- package/lib/catalog.js.map +1 -1
- package/lib/client/controller.d.ts +78 -0
- package/lib/client/controller.d.ts.map +1 -0
- package/lib/client/controller.js +365 -0
- package/lib/client/controller.js.map +1 -0
- package/lib/client/identity-icon.d.ts +3 -0
- package/lib/client/identity-icon.d.ts.map +1 -0
- package/lib/client/identity-icon.js +6 -0
- package/lib/client/identity-icon.js.map +1 -0
- package/lib/client/index.d.ts +7 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/index.js +51 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/settings-icon-slot.d.ts +13 -0
- package/lib/client/settings-icon-slot.d.ts.map +1 -0
- package/lib/client/settings-icon-slot.js +2 -0
- package/lib/client/settings-icon-slot.js.map +1 -0
- package/lib/client/styles.d.ts +4 -0
- package/lib/client/styles.d.ts.map +1 -0
- package/lib/client/styles.js +39 -0
- package/lib/client/styles.js.map +1 -0
- package/lib/client/views.d.ts +11 -0
- package/lib/client/views.d.ts.map +1 -0
- package/lib/client/views.js +287 -0
- package/lib/client/views.js.map +1 -0
- package/lib/client.js +21008 -0
- package/lib/client.js.map +7 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +413 -58
- package/lib/index.js.map +1 -1
- package/lib/management-remote.d.ts +23 -0
- package/lib/management-remote.d.ts.map +1 -0
- package/lib/management-remote.js +126 -0
- package/lib/management-remote.js.map +1 -0
- package/lib/management-types.d.ts +50 -0
- package/lib/management-types.d.ts.map +1 -0
- package/lib/management-types.js +2 -0
- package/lib/management-types.js.map +1 -0
- package/lib/provider-api.d.ts +3 -0
- package/lib/provider-api.d.ts.map +1 -1
- package/lib/provider-api.js.map +1 -1
- package/lib/remote.d.ts +4 -0
- package/lib/remote.d.ts.map +1 -0
- package/lib/remote.js +86 -0
- package/lib/remote.js.map +1 -0
- package/lib/user-client.d.ts +41 -0
- package/lib/user-client.d.ts.map +1 -0
- package/lib/user-client.js +6 -0
- package/lib/user-client.js.map +1 -0
- package/lib/user-operation.d.ts +7 -0
- package/lib/user-operation.d.ts.map +1 -0
- package/lib/user-operation.js +87 -0
- package/lib/user-operation.js.map +1 -0
- package/lib/user-service.d.ts +26 -0
- package/lib/user-service.d.ts.map +1 -0
- package/lib/user-service.js +140 -0
- package/lib/user-service.js.map +1 -0
- package/package.json +113 -10
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
export const identityKey = (ref) => JSON.stringify([ref.storeId, ref.identityId, ref.did]);
|
|
2
|
+
export const identityReference = (identity) => identity.reference;
|
|
3
|
+
/** One shared controller owns both settings and overlay; remounts cannot duplicate prompts. */
|
|
4
|
+
export class IdentityController {
|
|
5
|
+
remote;
|
|
6
|
+
view = {
|
|
7
|
+
loading: true,
|
|
8
|
+
identities: [],
|
|
9
|
+
requests: [],
|
|
10
|
+
history: [],
|
|
11
|
+
selectedKey: null,
|
|
12
|
+
grants: [],
|
|
13
|
+
document: null,
|
|
14
|
+
documentOpen: false,
|
|
15
|
+
modal: null,
|
|
16
|
+
pending: false,
|
|
17
|
+
error: null,
|
|
18
|
+
notice: null,
|
|
19
|
+
};
|
|
20
|
+
listeners = new Set();
|
|
21
|
+
timer;
|
|
22
|
+
refreshing = false;
|
|
23
|
+
disposed = false;
|
|
24
|
+
pauseQueue = false;
|
|
25
|
+
selectionVersion = 0;
|
|
26
|
+
returnFocus = null;
|
|
27
|
+
getSnapshot = () => this.view;
|
|
28
|
+
subscribe = (listener) => {
|
|
29
|
+
this.listeners.add(listener);
|
|
30
|
+
return () => {
|
|
31
|
+
this.listeners.delete(listener);
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
constructor(remote) {
|
|
35
|
+
this.remote = remote;
|
|
36
|
+
}
|
|
37
|
+
patch(value) {
|
|
38
|
+
if (this.disposed)
|
|
39
|
+
return;
|
|
40
|
+
this.view = { ...this.view, ...value };
|
|
41
|
+
for (const listener of this.listeners)
|
|
42
|
+
listener();
|
|
43
|
+
}
|
|
44
|
+
async call(method, ...args) {
|
|
45
|
+
const result = await this.remote[method](...args);
|
|
46
|
+
if (!result.ok)
|
|
47
|
+
throw new Error(result.error.message);
|
|
48
|
+
return result.value;
|
|
49
|
+
}
|
|
50
|
+
start() {
|
|
51
|
+
void this.refresh();
|
|
52
|
+
this.timer = setInterval(() => {
|
|
53
|
+
void this.refresh();
|
|
54
|
+
}, 3000);
|
|
55
|
+
}
|
|
56
|
+
dispose() {
|
|
57
|
+
this.disposed = true;
|
|
58
|
+
clearInterval(this.timer);
|
|
59
|
+
this.listeners.clear();
|
|
60
|
+
}
|
|
61
|
+
async refresh() {
|
|
62
|
+
if (this.refreshing || this.disposed)
|
|
63
|
+
return;
|
|
64
|
+
this.refreshing = true;
|
|
65
|
+
try {
|
|
66
|
+
const [identities, requests] = await Promise.all([
|
|
67
|
+
this.call("listIdentities"),
|
|
68
|
+
this.call("listRequests", false),
|
|
69
|
+
]);
|
|
70
|
+
const selectedKey = identities.some((i) => identityKey(identityReference(i)) === this.view.selectedKey)
|
|
71
|
+
? this.view.selectedKey
|
|
72
|
+
: identities[0]
|
|
73
|
+
? identityKey(identityReference(identities[0]))
|
|
74
|
+
: null;
|
|
75
|
+
const changed = selectedKey !== this.view.selectedKey;
|
|
76
|
+
this.patch({
|
|
77
|
+
loading: false,
|
|
78
|
+
identities,
|
|
79
|
+
requests: requests
|
|
80
|
+
.filter((r) => r.status === "pending")
|
|
81
|
+
.sort((a, b) => b.createdAt - a.createdAt),
|
|
82
|
+
selectedKey,
|
|
83
|
+
...(changed ? { grants: [], document: null, documentOpen: false } : {}),
|
|
84
|
+
});
|
|
85
|
+
await this.loadGrants();
|
|
86
|
+
if (!this.pauseQueue && this.view.modal === null) {
|
|
87
|
+
const next = this.view.requests.find((r) => !r.prompted);
|
|
88
|
+
if (next)
|
|
89
|
+
await this.openRequest(next.id, true);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
this.patch({
|
|
94
|
+
loading: false,
|
|
95
|
+
error: error instanceof Error
|
|
96
|
+
? error.message
|
|
97
|
+
: "Unable to load identity management",
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
this.refreshing = false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async selectIdentity(key) {
|
|
105
|
+
this.selectionVersion++;
|
|
106
|
+
this.patch({
|
|
107
|
+
selectedKey: key,
|
|
108
|
+
grants: [],
|
|
109
|
+
document: null,
|
|
110
|
+
documentOpen: false,
|
|
111
|
+
error: null,
|
|
112
|
+
});
|
|
113
|
+
try {
|
|
114
|
+
await this.loadGrants();
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
this.fail(error);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
selected() {
|
|
121
|
+
return this.view.identities.find((i) => identityKey(identityReference(i)) === this.view.selectedKey);
|
|
122
|
+
}
|
|
123
|
+
async loadGrants() {
|
|
124
|
+
const selected = this.selected();
|
|
125
|
+
if (!selected)
|
|
126
|
+
return;
|
|
127
|
+
const key = this.view.selectedKey;
|
|
128
|
+
const grants = await this.call("grants", identityReference(selected));
|
|
129
|
+
if (this.view.selectedKey === key) {
|
|
130
|
+
this.patch({ grants: grants.filter((g) => g.status === "active") });
|
|
131
|
+
const modal = this.view.modal;
|
|
132
|
+
if ((modal?.kind === "permissions" || modal?.kind === "revoke") &&
|
|
133
|
+
!grants.some((g) => g.id === modal.grant.id &&
|
|
134
|
+
g.status === "active" &&
|
|
135
|
+
g.version === modal.grant.version)) {
|
|
136
|
+
this.closeModal();
|
|
137
|
+
this.patch({ notice: "该授权已失效。" });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
captureFocus() {
|
|
142
|
+
if (typeof document !== "undefined")
|
|
143
|
+
this.returnFocus =
|
|
144
|
+
document.activeElement instanceof HTMLElement
|
|
145
|
+
? document.activeElement
|
|
146
|
+
: null;
|
|
147
|
+
}
|
|
148
|
+
async openRequest(id, automatic = false) {
|
|
149
|
+
if (this.view.modal !== null || this.view.pending)
|
|
150
|
+
return;
|
|
151
|
+
this.captureFocus();
|
|
152
|
+
this.patch({ pending: true, error: null });
|
|
153
|
+
try {
|
|
154
|
+
const review = await this.call("getRequest", id);
|
|
155
|
+
if (review.request.status !== "pending") {
|
|
156
|
+
await this.refresh();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
await this.call("markPrompted", {
|
|
160
|
+
requestId: id,
|
|
161
|
+
expectedVersion: review.request.version,
|
|
162
|
+
});
|
|
163
|
+
this.patch({
|
|
164
|
+
modal: { kind: "request", review },
|
|
165
|
+
requests: this.view.requests.map((r) => r.id === id ? { ...r, prompted: true } : r),
|
|
166
|
+
});
|
|
167
|
+
if (!automatic)
|
|
168
|
+
this.pauseQueue = false;
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
this.fail(error);
|
|
172
|
+
}
|
|
173
|
+
finally {
|
|
174
|
+
this.patch({ pending: false });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
closeModal(later = true) {
|
|
178
|
+
if (this.view.pending)
|
|
179
|
+
return;
|
|
180
|
+
if (later)
|
|
181
|
+
this.pauseQueue = true;
|
|
182
|
+
this.patch({ modal: null, error: null });
|
|
183
|
+
const focus = this.returnFocus;
|
|
184
|
+
queueMicrotask(() => {
|
|
185
|
+
if (focus?.isConnected)
|
|
186
|
+
focus.focus();
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
async decide(decision) {
|
|
190
|
+
const modal = this.view.modal;
|
|
191
|
+
if (modal?.kind !== "request" || this.view.pending)
|
|
192
|
+
return;
|
|
193
|
+
this.patch({ pending: true, error: null });
|
|
194
|
+
try {
|
|
195
|
+
const result = await this.call("decide", {
|
|
196
|
+
...decision,
|
|
197
|
+
requestId: modal.review.request.id,
|
|
198
|
+
expectedVersion: modal.review.request.version,
|
|
199
|
+
});
|
|
200
|
+
this.patch({
|
|
201
|
+
pending: false,
|
|
202
|
+
notice: result.kind === "create" && result.executionStatus === "succeeded"
|
|
203
|
+
? "身份已创建,尚未发布身份文档。"
|
|
204
|
+
: result.kind === "create" && result.status === "approved"
|
|
205
|
+
? "创建结果待核对,请查看已处理请求;不要重复创建。"
|
|
206
|
+
: null,
|
|
207
|
+
});
|
|
208
|
+
this.closeModal(false);
|
|
209
|
+
await this.refresh();
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
this.fail(error);
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
this.patch({ pending: false });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async openPermissions(grantId) {
|
|
219
|
+
await this.openGrantModal(grantId, "permissions");
|
|
220
|
+
}
|
|
221
|
+
async openRevoke(grantId) {
|
|
222
|
+
await this.openGrantModal(grantId, "revoke");
|
|
223
|
+
}
|
|
224
|
+
async openGrantModal(grantId, kind) {
|
|
225
|
+
if (this.view.modal || this.view.pending)
|
|
226
|
+
return;
|
|
227
|
+
this.captureFocus();
|
|
228
|
+
try {
|
|
229
|
+
await this.loadGrants();
|
|
230
|
+
const grant = this.view.grants.find((g) => g.id === grantId);
|
|
231
|
+
const identity = this.selected();
|
|
232
|
+
if (!grant || !identity)
|
|
233
|
+
throw new Error("The authorization is no longer active");
|
|
234
|
+
this.patch({
|
|
235
|
+
modal: { kind, grant, identity },
|
|
236
|
+
error: null,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
this.fail(error);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
async revoke() {
|
|
244
|
+
const modal = this.view.modal;
|
|
245
|
+
if (modal?.kind !== "revoke")
|
|
246
|
+
return;
|
|
247
|
+
const grant = modal.grant;
|
|
248
|
+
await this.action(async () => {
|
|
249
|
+
await this.call("revoke", {
|
|
250
|
+
grantId: grant.id,
|
|
251
|
+
expectedVersion: grant.version,
|
|
252
|
+
});
|
|
253
|
+
this.patch({ pending: false });
|
|
254
|
+
this.closeModal();
|
|
255
|
+
await this.refresh();
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
openDelete() {
|
|
259
|
+
const identity = this.selected();
|
|
260
|
+
if (!identity ||
|
|
261
|
+
this.view.modal ||
|
|
262
|
+
identity.deleteBlockedReason ||
|
|
263
|
+
this.view.grants.length ||
|
|
264
|
+
identity.integrations.length)
|
|
265
|
+
return;
|
|
266
|
+
this.captureFocus();
|
|
267
|
+
this.patch({ modal: { kind: "delete", identity }, error: null });
|
|
268
|
+
}
|
|
269
|
+
async deleteIdentity(confirmationName) {
|
|
270
|
+
const modal = this.view.modal;
|
|
271
|
+
if (modal?.kind !== "delete")
|
|
272
|
+
return;
|
|
273
|
+
await this.action(async () => {
|
|
274
|
+
await this.call("deleteIdentity", {
|
|
275
|
+
reference: identityReference(modal.identity),
|
|
276
|
+
confirmationName,
|
|
277
|
+
});
|
|
278
|
+
this.patch({ pending: false });
|
|
279
|
+
this.closeModal();
|
|
280
|
+
await this.refresh();
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
async toggleDocument() {
|
|
284
|
+
if (this.view.documentOpen) {
|
|
285
|
+
this.patch({ documentOpen: false, document: null });
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const identity = this.selected();
|
|
289
|
+
if (!identity)
|
|
290
|
+
return;
|
|
291
|
+
const version = this.selectionVersion;
|
|
292
|
+
const key = this.view.selectedKey;
|
|
293
|
+
try {
|
|
294
|
+
const value = await this.call("publicDocument", identityReference(identity));
|
|
295
|
+
if (this.selectionVersion === version && this.view.selectedKey === key)
|
|
296
|
+
this.patch({
|
|
297
|
+
document: JSON.stringify(value, null, 2),
|
|
298
|
+
documentOpen: true,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
this.fail(error);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
async loadHistory() {
|
|
306
|
+
try {
|
|
307
|
+
this.patch({ history: await this.call("listRequests", true) });
|
|
308
|
+
}
|
|
309
|
+
catch (error) {
|
|
310
|
+
this.fail(error);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
async openResult(requestId) {
|
|
314
|
+
if (this.view.modal || this.view.pending)
|
|
315
|
+
return;
|
|
316
|
+
this.captureFocus();
|
|
317
|
+
await this.action(async () => {
|
|
318
|
+
const review = await this.call("getRequest", requestId);
|
|
319
|
+
this.patch({
|
|
320
|
+
modal: { kind: "result", review },
|
|
321
|
+
history: this.view.history.map((request) => request.id === requestId ? review.request : request),
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
async reauthorize(request) {
|
|
326
|
+
await this.action(async () => {
|
|
327
|
+
const next = await this.call("reauthorize", {
|
|
328
|
+
requestId: request.id,
|
|
329
|
+
expectedVersion: request.version,
|
|
330
|
+
});
|
|
331
|
+
this.patch({ pending: false });
|
|
332
|
+
await this.openRequest(next.id);
|
|
333
|
+
await this.refresh();
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
async copy(value) {
|
|
337
|
+
try {
|
|
338
|
+
await navigator.clipboard.writeText(value);
|
|
339
|
+
this.patch({ notice: "已复制" });
|
|
340
|
+
}
|
|
341
|
+
catch {
|
|
342
|
+
this.patch({ error: "无法复制,请检查剪贴板权限。" });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
fail(error) {
|
|
346
|
+
this.patch({
|
|
347
|
+
error: error instanceof Error ? error.message : "Identity management failed",
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
async action(operation) {
|
|
351
|
+
if (this.view.pending)
|
|
352
|
+
return;
|
|
353
|
+
this.patch({ pending: true, error: null });
|
|
354
|
+
try {
|
|
355
|
+
await operation();
|
|
356
|
+
}
|
|
357
|
+
catch (error) {
|
|
358
|
+
this.fail(error);
|
|
359
|
+
}
|
|
360
|
+
finally {
|
|
361
|
+
this.patch({ pending: false });
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
//# sourceMappingURL=controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/client/controller.ts"],"names":[],"mappings":"AAyCA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAsB,EAAU,EAAE,CAC5D,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,QAAgC,EACb,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;AAE3C,+FAA+F;AAC/F,MAAM,OAAO,kBAAkB;IA6BA;IA5BrB,IAAI,GAAgB;QAC1B,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI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,IAAI,CAAC,OAAO;YAAE,OAAO;QAC9B,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC;YACH,MAAM,SAAS,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-icon.d.ts","sourceRoot":"","sources":["../../src/client/identity-icon.tsx"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wBAAgB,YAAY,gCAQ3B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Decorative contact-card glyph for the settings navigation entry. */
|
|
3
|
+
export function IdentityIcon() {
|
|
4
|
+
return (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: [_jsx("rect", { x: "3", y: "4", width: "18", height: "16", rx: "3" }), _jsx("circle", { cx: "9", cy: "10", r: "2" }), _jsx("path", { d: "M6 16c0-2 6-2 6 0M15 9h3M15 13h3" })] }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=identity-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-icon.js","sourceRoot":"","sources":["../../src/client/identity-icon.tsx"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,MAAM,UAAU,YAAY;IAC1B,OAAO,CACL,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,aACnL,eAAM,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,GAAG,EAClD,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,GAAG,EAC/B,eAAM,CAAC,EAAC,kCAAkC,GAAG,IACzC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Context as ClientContext } from "@deepseek-ai/cordis";
|
|
2
|
+
import { IdentityController } from "./controller.js";
|
|
3
|
+
import { IdentityOverlay, IdentitySettings } from "./views.js";
|
|
4
|
+
export declare const inject: string[];
|
|
5
|
+
export declare function apply(ctx: ClientContext): Promise<() => Promise<void>>;
|
|
6
|
+
export { IdentityController, IdentitySettings, IdentityOverlay };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpE,OAAO,EAAE,kBAAkB,EAAyB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK/D,eAAO,MAAM,MAAM,UAAoC,CAAC;AACxD,wBAAsB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAyD5E;AACD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import managementRemote from "../remote.js";
|
|
2
|
+
import { IdentityController } from "./controller.js";
|
|
3
|
+
import { IdentityOverlay, IdentitySettings } from "./views.js";
|
|
4
|
+
import { mountStyles } from "./styles.js";
|
|
5
|
+
import { IdentityIcon } from "./identity-icon.js";
|
|
6
|
+
export const inject = ["slots", "remote", "connection"];
|
|
7
|
+
export async function apply(ctx) {
|
|
8
|
+
const unmount = await ctx.remote.$mount(managementRemote);
|
|
9
|
+
const disposeStyles = mountStyles();
|
|
10
|
+
const disposers = [];
|
|
11
|
+
let controller;
|
|
12
|
+
try {
|
|
13
|
+
const remote = ctx.get("remote.anpIdentityManager");
|
|
14
|
+
if (!remote)
|
|
15
|
+
throw new Error("ANP Identity manager Remote is unavailable");
|
|
16
|
+
controller = new IdentityController(remote);
|
|
17
|
+
const active = controller;
|
|
18
|
+
disposers.push(ctx.slots.inject("settings.nav.icon", () => ctx.slots.register({ name: "settings.nav.icon", id: "anp-identity" }, IdentityIcon)));
|
|
19
|
+
disposers.push(ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
20
|
+
name: "settings.section",
|
|
21
|
+
id: "anp-identity",
|
|
22
|
+
label: "身份",
|
|
23
|
+
order: 40,
|
|
24
|
+
inject: () => ({ controller: active }),
|
|
25
|
+
}, IdentitySettings)));
|
|
26
|
+
disposers.push(ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
27
|
+
name: "shell.overlay",
|
|
28
|
+
id: "anp-identity-authorization",
|
|
29
|
+
order: 50,
|
|
30
|
+
inject: () => ({ controller: active }),
|
|
31
|
+
}, IdentityOverlay)));
|
|
32
|
+
active.start();
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
controller?.dispose();
|
|
36
|
+
for (const dispose of disposers.reverse())
|
|
37
|
+
dispose();
|
|
38
|
+
disposeStyles();
|
|
39
|
+
await unmount();
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
return async () => {
|
|
43
|
+
controller?.dispose();
|
|
44
|
+
for (const dispose of disposers.reverse())
|
|
45
|
+
dispose();
|
|
46
|
+
disposeStyles();
|
|
47
|
+
await unmount();
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export { IdentityController, IdentitySettings, IdentityOverlay };
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAKA,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAyB,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AACxD,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAkB;IAC5C,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,WAAW,EAAE,CAAC;IACpC,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,IAAI,UAA0C,CAAC;IAC/C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,2BAA2B,CACpB,CAAC;QAC/B,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC3E,UAAU,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,UAAU,CAAC;QAC1B,SAAS,CAAC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AAK,MAAM,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE;YAAE,OAAO,EAAE,CAAC;QACrD,aAAa,EAAE,CAAC;QAChB,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC;AACD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-icon-slot.d.ts","sourceRoot":"","sources":["../../src/client/settings-icon-slot.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,OAAO;QACf,mBAAmB,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE;gBAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;aAAE,CAAA;SAAE,CAAC;KACnF;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-icon-slot.js","sourceRoot":"","sources":["../../src/client/settings-icon-slot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Host design tokens keep the plugin aligned with both DSH themes. */
|
|
2
|
+
export declare const styles = "\n.anpi{container-type:inline-size}\n.anpi .anpi-tabs{margin:16px 0 20px;gap:20px}\n.anpi .anpi-columns{grid-template-columns:minmax(164px,30%) minmax(0,1fr);gap:24px}\n.anpi .anpi-identities{padding:4px;border-radius:12px;background:var(--dsw-alias-bg-layer-2,#1e232a)}\n.anpi .anpi-identities button{display:flex;align-items:center;gap:10px;padding:12px 8px;border-radius:8px;min-height:72px;transition:background-color .15s}\n.anpi .anpi-identities button:hover{background:var(--dsw-alias-bg-layer-3,#222830)}\n.anpi .anpi-identities button[aria-current=true]{background:var(--dsw-alias-bg-layer-3,#222830);border-left-color:var(--dsw-alias-label-primary,#eef0f5)}\n.anpi-identity-label{min-width:0;display:block}\n.anpi-identity-label strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}\n.anpi .anpi-identities small{font-size:12px;margin-top:4px}\n.anpi .anpi-detail>h3{font-size:18px;line-height:1.4;overflow-wrap:anywhere;margin:2px 0 16px}\n.anpi-fields{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden;background:var(--dsw-alias-bg-layer-2,#1e232a)}\n.anpi .anpi-fields .anpi-copy{margin:0;padding:12px 14px;border:0;border-radius:0;background:none;gap:8px;grid-template-columns:58px minmax(0,1fr) auto}\n.anpi .anpi-fields .anpi-copy+.anpi-copy{border-top:1px solid var(--dsw-alias-border-l2,#343b46)}\n.anpi-field-label{font-size:12px;color:var(--dsw-alias-label-secondary,#bec6d2)}\n.anpi .anpi-fields .anpi-copy-did{grid-template-columns:minmax(0,1fr) auto;align-items:start}\n.anpi-copy-did .anpi-field-value{grid-row:2;grid-column:1/-1;font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;user-select:text}\n.anpi-copy-did button{grid-column:2;grid-row:1}\n.anpi .anpi-detail .anpi-section{padding-top:16px;margin-top:20px}\n.anpi .anpi-detail .anpi-section h3{font-size:14px;font-weight:600;margin-bottom:8px}\n.anpi .anpi-detail .anpi-section>p.anpi-muted{padding:8px 0;margin:0}\n.anpi .anpi-detail .anpi-section>p.anpi-small{margin-top:10px;line-height:1.6}\n@container(max-width:480px){.anpi .anpi-columns{grid-template-columns:1fr;gap:20px}.anpi .anpi-identities{display:block}.anpi .anpi-identities button{min-height:60px}.anpi-identity-label strong{-webkit-line-clamp:1}}\n@media(prefers-reduced-motion:reduce){.anpi .anpi-identities button{transition:none}}\n.anpi-access-scope{margin-top:12px}.anpi-access-scope summary{cursor:pointer}.anpi-access-scope p{margin:4px 0}.anpi-access-scope details{margin-top:8px}.anpi-modal .anpi-modal-content{max-height:calc(100dvh - 80px)}\n.anpi{font:14px/1.6 system-ui,sans-serif;color:var(--dsw-alias-label-primary,#eef0f5);min-width:0}.anpi h2{font-size:24px;margin:0}.anpi h3{font-size:17px;margin:0 0 12px}.anpi p{margin:8px 0}.anpi-small,.anpi-muted,.anpi small,.anpi time{color:var(--dsw-alias-label-tertiary,#aab3c2);font-size:12px}.anpi-break{overflow-wrap:anywhere;min-width:0}.anpi-tabs{display:flex;gap:18px;border-bottom:1px solid var(--dsw-alias-border-l2,#343b46);margin:22px 0}.anpi-tabs button{padding:8px 3px;background:none;border:0;border-bottom:3px solid transparent;color:inherit;font:inherit;cursor:pointer}.anpi-tabs button[aria-selected=true]{border-bottom-color:var(--dsw-alias-brand-primary,#4a65ff)}.anpi-count{display:inline-flex;align-items:center;justify-content:center;background:var(--dsw-alias-bg-layer-3,#3a414c);border-radius:20px;min-width:23px;margin-left:8px}.anpi-columns{display:grid;grid-template-columns:minmax(170px,28%) minmax(0,1fr);gap:28px}.anpi-identities{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden;align-self:start}.anpi-identities button{background:none;color:inherit;border:0;border-left:3px solid transparent;width:100%;padding:16px;text-align:left;cursor:pointer}.anpi-identities button[aria-current=true]{border-left-color:var(--dsw-alias-brand-primary,#4a65ff);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4a65ff) 17%,transparent)}.anpi-identities small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.anpi-detail{min-width:0}.anpi-copy{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--dsw-alias-border-l2,#343b46);background:var(--dsw-alias-bg-layer-3,#222830);border-radius:8px;padding:9px 12px;margin:8px 0}.anpi-section{border-top:1px solid var(--dsw-alias-border-l2,#343b46);padding-top:18px;margin-top:20px}.anpi-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0}.anpi-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.anpi-request-list{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden}.anpi-request-list article{padding:18px;margin:0;border-bottom:1px solid var(--dsw-alias-border-l2,#343b46)}.anpi-request-list article:last-child{border:0}.anpi-request-action{display:flex;align-items:flex-end;flex-direction:column;gap:12px;flex-shrink:0}.anpi-document{padding:12px;background:var(--dsw-alias-bg-layer-1,#14181e);max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.anpi-error{color:var(--dsw-alias-state-error-primary,#ff9c99);overflow-wrap:anywhere}.anpi-modal{width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}.anpi-modal-content{overflow-y:auto;max-height:calc(100dvh - 160px)}.anpi-modal .anpi{padding:0 4px}.anpi-parameters{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:18px;background:var(--dsw-alias-bg-layer-3,#222830);border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:9px}.anpi dd{margin:0;overflow-wrap:anywhere}.anpi dt{color:var(--dsw-alias-label-tertiary,#aab3c2)}.anpi select,.anpi input:not([type=radio]){box-sizing:border-box;width:100%;font:inherit;color:inherit;background:var(--dsw-alias-bg-layer-1,#14181e);border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:8px;padding:12px;margin:8px 0}.anpi select{white-space:normal}.anpi fieldset{border:0;padding:0;margin:18px 0}.anpi legend{margin-bottom:10px;font-weight:600}.anpi-mode{display:flex;gap:24px}.anpi-mode label{flex:1;cursor:pointer}.anpi-mode input{margin-right:9px;accent-color:var(--dsw-alias-brand-primary,#4a65ff)}.anpi-mode small{display:block;padding-left:25px}.anpi-operation{padding:10px;background:var(--dsw-alias-bg-layer-3,#222830);border-radius:7px;overflow-wrap:anywhere}.anpi-footer{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:24px;position:sticky;bottom:0;background:var(--dsw-alias-bg-layer-2,#1e232a);padding:8px 0}.anpi-spacer{flex:1}.anpi button:focus-visible,.anpi input:focus-visible,.anpi select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4a65ff);outline-offset:3px}@media(max-width:720px){.anpi-columns{grid-template-columns:1fr;gap:18px}.anpi-identities{display:flex}.anpi-identities button{min-width:0}.anpi-row{align-items:flex-start;flex-wrap:wrap}.anpi-request-action{align-items:flex-start}.anpi-mode{gap:10px}.anpi-copy{gap:7px}.anpi-modal{width:calc(100vw - 20px)}}\n";
|
|
3
|
+
export declare function mountStyles(): () => void;
|
|
4
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,eAAO,MAAM,MAAM,w/NA2BlB,CAAC;AACF,wBAAgB,WAAW,IAAI,MAAM,IAAI,CAQxC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Host design tokens keep the plugin aligned with both DSH themes. */
|
|
2
|
+
export const styles = `
|
|
3
|
+
.anpi{container-type:inline-size}
|
|
4
|
+
.anpi .anpi-tabs{margin:16px 0 20px;gap:20px}
|
|
5
|
+
.anpi .anpi-columns{grid-template-columns:minmax(164px,30%) minmax(0,1fr);gap:24px}
|
|
6
|
+
.anpi .anpi-identities{padding:4px;border-radius:12px;background:var(--dsw-alias-bg-layer-2,#1e232a)}
|
|
7
|
+
.anpi .anpi-identities button{display:flex;align-items:center;gap:10px;padding:12px 8px;border-radius:8px;min-height:72px;transition:background-color .15s}
|
|
8
|
+
.anpi .anpi-identities button:hover{background:var(--dsw-alias-bg-layer-3,#222830)}
|
|
9
|
+
.anpi .anpi-identities button[aria-current=true]{background:var(--dsw-alias-bg-layer-3,#222830);border-left-color:var(--dsw-alias-label-primary,#eef0f5)}
|
|
10
|
+
.anpi-identity-label{min-width:0;display:block}
|
|
11
|
+
.anpi-identity-label strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
|
|
12
|
+
.anpi .anpi-identities small{font-size:12px;margin-top:4px}
|
|
13
|
+
.anpi .anpi-detail>h3{font-size:18px;line-height:1.4;overflow-wrap:anywhere;margin:2px 0 16px}
|
|
14
|
+
.anpi-fields{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden;background:var(--dsw-alias-bg-layer-2,#1e232a)}
|
|
15
|
+
.anpi .anpi-fields .anpi-copy{margin:0;padding:12px 14px;border:0;border-radius:0;background:none;gap:8px;grid-template-columns:58px minmax(0,1fr) auto}
|
|
16
|
+
.anpi .anpi-fields .anpi-copy+.anpi-copy{border-top:1px solid var(--dsw-alias-border-l2,#343b46)}
|
|
17
|
+
.anpi-field-label{font-size:12px;color:var(--dsw-alias-label-secondary,#bec6d2)}
|
|
18
|
+
.anpi .anpi-fields .anpi-copy-did{grid-template-columns:minmax(0,1fr) auto;align-items:start}
|
|
19
|
+
.anpi-copy-did .anpi-field-value{grid-row:2;grid-column:1/-1;font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;user-select:text}
|
|
20
|
+
.anpi-copy-did button{grid-column:2;grid-row:1}
|
|
21
|
+
.anpi .anpi-detail .anpi-section{padding-top:16px;margin-top:20px}
|
|
22
|
+
.anpi .anpi-detail .anpi-section h3{font-size:14px;font-weight:600;margin-bottom:8px}
|
|
23
|
+
.anpi .anpi-detail .anpi-section>p.anpi-muted{padding:8px 0;margin:0}
|
|
24
|
+
.anpi .anpi-detail .anpi-section>p.anpi-small{margin-top:10px;line-height:1.6}
|
|
25
|
+
@container(max-width:480px){.anpi .anpi-columns{grid-template-columns:1fr;gap:20px}.anpi .anpi-identities{display:block}.anpi .anpi-identities button{min-height:60px}.anpi-identity-label strong{-webkit-line-clamp:1}}
|
|
26
|
+
@media(prefers-reduced-motion:reduce){.anpi .anpi-identities button{transition:none}}
|
|
27
|
+
.anpi-access-scope{margin-top:12px}.anpi-access-scope summary{cursor:pointer}.anpi-access-scope p{margin:4px 0}.anpi-access-scope details{margin-top:8px}.anpi-modal .anpi-modal-content{max-height:calc(100dvh - 80px)}
|
|
28
|
+
.anpi{font:14px/1.6 system-ui,sans-serif;color:var(--dsw-alias-label-primary,#eef0f5);min-width:0}.anpi h2{font-size:24px;margin:0}.anpi h3{font-size:17px;margin:0 0 12px}.anpi p{margin:8px 0}.anpi-small,.anpi-muted,.anpi small,.anpi time{color:var(--dsw-alias-label-tertiary,#aab3c2);font-size:12px}.anpi-break{overflow-wrap:anywhere;min-width:0}.anpi-tabs{display:flex;gap:18px;border-bottom:1px solid var(--dsw-alias-border-l2,#343b46);margin:22px 0}.anpi-tabs button{padding:8px 3px;background:none;border:0;border-bottom:3px solid transparent;color:inherit;font:inherit;cursor:pointer}.anpi-tabs button[aria-selected=true]{border-bottom-color:var(--dsw-alias-brand-primary,#4a65ff)}.anpi-count{display:inline-flex;align-items:center;justify-content:center;background:var(--dsw-alias-bg-layer-3,#3a414c);border-radius:20px;min-width:23px;margin-left:8px}.anpi-columns{display:grid;grid-template-columns:minmax(170px,28%) minmax(0,1fr);gap:28px}.anpi-identities{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden;align-self:start}.anpi-identities button{background:none;color:inherit;border:0;border-left:3px solid transparent;width:100%;padding:16px;text-align:left;cursor:pointer}.anpi-identities button[aria-current=true]{border-left-color:var(--dsw-alias-brand-primary,#4a65ff);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4a65ff) 17%,transparent)}.anpi-identities small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.anpi-detail{min-width:0}.anpi-copy{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--dsw-alias-border-l2,#343b46);background:var(--dsw-alias-bg-layer-3,#222830);border-radius:8px;padding:9px 12px;margin:8px 0}.anpi-section{border-top:1px solid var(--dsw-alias-border-l2,#343b46);padding-top:18px;margin-top:20px}.anpi-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0}.anpi-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.anpi-request-list{border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:10px;overflow:hidden}.anpi-request-list article{padding:18px;margin:0;border-bottom:1px solid var(--dsw-alias-border-l2,#343b46)}.anpi-request-list article:last-child{border:0}.anpi-request-action{display:flex;align-items:flex-end;flex-direction:column;gap:12px;flex-shrink:0}.anpi-document{padding:12px;background:var(--dsw-alias-bg-layer-1,#14181e);max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.anpi-error{color:var(--dsw-alias-state-error-primary,#ff9c99);overflow-wrap:anywhere}.anpi-modal{width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}.anpi-modal-content{overflow-y:auto;max-height:calc(100dvh - 160px)}.anpi-modal .anpi{padding:0 4px}.anpi-parameters{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:18px;background:var(--dsw-alias-bg-layer-3,#222830);border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:9px}.anpi dd{margin:0;overflow-wrap:anywhere}.anpi dt{color:var(--dsw-alias-label-tertiary,#aab3c2)}.anpi select,.anpi input:not([type=radio]){box-sizing:border-box;width:100%;font:inherit;color:inherit;background:var(--dsw-alias-bg-layer-1,#14181e);border:1px solid var(--dsw-alias-border-l2,#343b46);border-radius:8px;padding:12px;margin:8px 0}.anpi select{white-space:normal}.anpi fieldset{border:0;padding:0;margin:18px 0}.anpi legend{margin-bottom:10px;font-weight:600}.anpi-mode{display:flex;gap:24px}.anpi-mode label{flex:1;cursor:pointer}.anpi-mode input{margin-right:9px;accent-color:var(--dsw-alias-brand-primary,#4a65ff)}.anpi-mode small{display:block;padding-left:25px}.anpi-operation{padding:10px;background:var(--dsw-alias-bg-layer-3,#222830);border-radius:7px;overflow-wrap:anywhere}.anpi-footer{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:24px;position:sticky;bottom:0;background:var(--dsw-alias-bg-layer-2,#1e232a);padding:8px 0}.anpi-spacer{flex:1}.anpi button:focus-visible,.anpi input:focus-visible,.anpi select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4a65ff);outline-offset:3px}@media(max-width:720px){.anpi-columns{grid-template-columns:1fr;gap:18px}.anpi-identities{display:flex}.anpi-identities button{min-width:0}.anpi-row{align-items:flex-start;flex-wrap:wrap}.anpi-request-action{align-items:flex-start}.anpi-mode{gap:10px}.anpi-copy{gap:7px}.anpi-modal{width:calc(100vw - 20px)}}
|
|
29
|
+
`;
|
|
30
|
+
export function mountStyles() {
|
|
31
|
+
const style = document.createElement("style");
|
|
32
|
+
style.dataset.anpIdentity = "v7";
|
|
33
|
+
style.textContent = styles;
|
|
34
|
+
document.head.appendChild(style);
|
|
35
|
+
return () => {
|
|
36
|
+
style.remove();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BrB,CAAC;AACF,MAAM,UAAU,WAAW;IACzB,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,KAAK,CAAC,MAAM,EAAE,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { IdentityController } from "./controller.js";
|
|
3
|
+
export declare const FULL_PERMISSION_NOTICE = "\u5F53\u524D\u9ED8\u8BA4\u6388\u4E88\u8BE5\u8EAB\u4EFD\u7684\u5168\u90E8\u4F7F\u7528\u6743\u9650\uFF0C\u6682\u4E0D\u652F\u6301\u9010\u9879\u9009\u62E9\u3002";
|
|
4
|
+
/** Actual settings-section contribution, not a stand-alone preview. */
|
|
5
|
+
export declare function IdentitySettings({ controller, }: {
|
|
6
|
+
controller: IdentityController;
|
|
7
|
+
}): ReactNode;
|
|
8
|
+
export declare function IdentityOverlay({ controller, }: {
|
|
9
|
+
controller: IdentityController;
|
|
10
|
+
}): ReactNode;
|
|
11
|
+
//# sourceMappingURL=views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/client/views.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,OAAO,EACL,kBAAkB,EAGnB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,sBAAsB,iKACL,CAAC;AAoE/B,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,kBAAkB,CAAC;CAChC,GAAG,SAAS,CAoNZ;AA8JD,wBAAgB,eAAe,CAAC,EAC9B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,kBAAkB,CAAC;CAChC,GAAG,SAAS,CAcZ"}
|