@yugoo-design/dsh-design-studio-dsh 0.1.2 → 0.2.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/README.md +438 -3
- package/lib/authoring/panel-components.json +10790 -0
- package/lib/authoring/studio-creators/material.json +1 -0
- package/lib/authoring-agent-vc786tS0.js +648 -0
- package/lib/authoring-agent.d.ts +24 -0
- package/lib/authoring-agent.js +2 -0
- package/lib/authoring-agent.types-0S0xnlDW.d.ts +87 -0
- package/lib/authoring-entry.d.ts +20 -0
- package/lib/authoring-entry.js +77 -0
- package/lib/authoring-host-m8-GmXIx.js +348 -0
- package/lib/authoring-host.d.ts +5 -0
- package/lib/authoring-host.js +2 -0
- package/lib/authoring-host.types-BZt9l0xK.d.ts +77 -0
- package/lib/authoring-reference-store.d.ts +39 -0
- package/lib/authoring-reference-store.js +385 -0
- package/lib/authoring-service-WClXJGik.js +347 -0
- package/lib/authoring-service.d.ts +121 -0
- package/lib/authoring-service.js +2 -0
- package/lib/authoring-session.d.ts +5 -0
- package/lib/authoring-session.js +204 -0
- package/lib/authoring-session.types-C6HosIWU.d.ts +58 -0
- package/lib/authoring-sources-BzRuEuub.d.ts +17 -0
- package/lib/authoring-sources.d.ts +2 -0
- package/lib/authoring-sources.js +95 -0
- package/lib/authoring-workbench.d.ts +15 -0
- package/lib/authoring-workbench.js +782 -0
- package/lib/authoring.page-rpc-CYYWsmxc.d.ts +30 -0
- package/lib/authoring.page-rpc.d.ts +2 -0
- package/lib/authoring.page-rpc.js +55 -0
- package/lib/authoring.remote-client.d.ts +2557 -0
- package/lib/authoring.remote-client.js +435 -0
- package/lib/client-adapter-BmIzQcMT.d.ts +65 -0
- package/lib/client-adapter.d.ts +2 -64
- package/lib/client.js +1 -2
- package/lib/css-assets/dsh-design-studio-page/9178281a0695f79ff8bff8eca529231b67f896dc1c12c8dbaaad24b32dd3fc07.eot +0 -0
- package/lib/css-assets/dsh-design-studio-page/b366faf39f6bcc48f10b10f2860e5ebe57091cb2a15beeed8a0977e24560bbba.svg +224 -0
- package/lib/css-assets/dsh-design-studio-page/manifest.json +20 -0
- package/lib/index.js +4 -105
- package/lib/kit-files-DKBlBOG8.js +159 -0
- package/lib/page-client.js +4 -23849
- package/lib/page-path-BkPiqrUH.d.ts +25 -0
- package/lib/page-path.d.ts +2 -2
- package/lib/page-path.js +70 -2
- package/lib/page-rpc-DXbf4seT.d.ts +24 -0
- package/lib/page-rpc.d.ts +2 -15
- package/lib/page-rpc.js +9 -4
- package/lib/page.d.ts +5 -3
- package/lib/page.js +219 -2
- package/lib/remote-method-ab_lHwWN.js +16 -0
- package/lib/typert.host.d.ts +827 -2
- package/lib/typert.host.js +2 -1
- package/lib/typert.remote-client-CWz-anTr.d.ts +37 -0
- package/lib/typert.remote-client.d.ts +1 -36
- package/licenses/dsh-distribution.json +8644 -149
- package/package.json +73 -10
- package/lib/page-path-wn8e_fid.d.ts +0 -14
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/authoring.remote-client.ts
|
|
3
|
+
/** Strict JSON projections for an explicitly enabled, native-parent-scoped service. */
|
|
4
|
+
const text = z.string();
|
|
5
|
+
const identity = text.min(1).regex(/^[^\u0000-\u001f\u007f]+$/u);
|
|
6
|
+
const revision = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
7
|
+
const pin = z.object({
|
|
8
|
+
name: identity,
|
|
9
|
+
version: identity
|
|
10
|
+
}).strict();
|
|
11
|
+
const title = z.object({
|
|
12
|
+
zh: text,
|
|
13
|
+
en: text
|
|
14
|
+
}).strict();
|
|
15
|
+
const source = z.object({
|
|
16
|
+
kit: pin.optional(),
|
|
17
|
+
bundle: pin.optional()
|
|
18
|
+
}).strict();
|
|
19
|
+
const retained = z.object({
|
|
20
|
+
snapshot: identity,
|
|
21
|
+
sourceId: identity
|
|
22
|
+
}).strict();
|
|
23
|
+
const mountedPin = pin.extend({
|
|
24
|
+
source: retained.optional(),
|
|
25
|
+
instanceId: identity.optional(),
|
|
26
|
+
revision: revision.optional()
|
|
27
|
+
}).strict();
|
|
28
|
+
const mount = z.object({
|
|
29
|
+
bindingKey: identity.optional(),
|
|
30
|
+
bundle: mountedPin,
|
|
31
|
+
instanceId: identity.optional(),
|
|
32
|
+
revision: revision.optional()
|
|
33
|
+
}).strict();
|
|
34
|
+
const choice = pin.extend({
|
|
35
|
+
title,
|
|
36
|
+
runtimeName: identity,
|
|
37
|
+
instanceId: identity.optional(),
|
|
38
|
+
revision: revision.optional(),
|
|
39
|
+
description: text.optional(),
|
|
40
|
+
displayDescription: title.optional()
|
|
41
|
+
}).strict();
|
|
42
|
+
const readiness = z.object({
|
|
43
|
+
ready: z.boolean(),
|
|
44
|
+
diagnostics: z.array(z.object({
|
|
45
|
+
code: text,
|
|
46
|
+
message: text,
|
|
47
|
+
path: text.optional(),
|
|
48
|
+
severity: z.enum(["error", "warning"]).optional()
|
|
49
|
+
}).strict())
|
|
50
|
+
}).strict();
|
|
51
|
+
/** Preserve the existing S2 projection, including its retained source and migration context. */
|
|
52
|
+
const instance = z.object({
|
|
53
|
+
id: identity,
|
|
54
|
+
revision,
|
|
55
|
+
recordVersion: z.union([z.literal(1), z.literal(2)]).optional(),
|
|
56
|
+
kind: z.enum(["kit", "bundle"]),
|
|
57
|
+
title,
|
|
58
|
+
source,
|
|
59
|
+
kit: pin.optional(),
|
|
60
|
+
bundle: pin.optional(),
|
|
61
|
+
runtimeName: identity.optional(),
|
|
62
|
+
sourceId: identity.optional(),
|
|
63
|
+
baseSnapshot: identity,
|
|
64
|
+
mounts: z.array(mount),
|
|
65
|
+
createdAt: text.optional(),
|
|
66
|
+
deletedAt: text.optional(),
|
|
67
|
+
bundlePath: text.optional(),
|
|
68
|
+
forkedFrom: z.object({
|
|
69
|
+
id: identity,
|
|
70
|
+
revision,
|
|
71
|
+
pin
|
|
72
|
+
}).strict().optional(),
|
|
73
|
+
migration: z.object({
|
|
74
|
+
fromRevision: revision,
|
|
75
|
+
fromSnapshot: identity
|
|
76
|
+
}).strict().optional(),
|
|
77
|
+
refs: z.array(z.object({
|
|
78
|
+
id: identity,
|
|
79
|
+
title
|
|
80
|
+
}).strict()),
|
|
81
|
+
requiresMigration: z.boolean().optional(),
|
|
82
|
+
description: text.optional(),
|
|
83
|
+
displayDescription: title.optional(),
|
|
84
|
+
createdBlank: z.boolean().optional(),
|
|
85
|
+
current: z.boolean().optional(),
|
|
86
|
+
files: z.array(z.object({
|
|
87
|
+
path: text,
|
|
88
|
+
bytes: revision,
|
|
89
|
+
editable: z.boolean()
|
|
90
|
+
}).strict()).optional(),
|
|
91
|
+
availableBundles: z.array(choice).optional(),
|
|
92
|
+
readiness: readiness.optional()
|
|
93
|
+
}).strict();
|
|
94
|
+
const diagnostic = z.object({
|
|
95
|
+
code: text,
|
|
96
|
+
message: text,
|
|
97
|
+
subject: text.optional(),
|
|
98
|
+
severity: z.literal("warning").optional()
|
|
99
|
+
}).strict();
|
|
100
|
+
const preview = z.object({
|
|
101
|
+
revision,
|
|
102
|
+
kit: pin.optional(),
|
|
103
|
+
bundle: pin,
|
|
104
|
+
panelYaml: text,
|
|
105
|
+
sample: z.record(text, z.json()),
|
|
106
|
+
artifacts: z.record(text, text).optional()
|
|
107
|
+
}).strict();
|
|
108
|
+
const previewResult = z.object({
|
|
109
|
+
preview: preview.optional(),
|
|
110
|
+
diagnostics: z.array(diagnostic)
|
|
111
|
+
}).strict();
|
|
112
|
+
const candidate = z.object({
|
|
113
|
+
id: identity,
|
|
114
|
+
baseRevision: revision,
|
|
115
|
+
revision,
|
|
116
|
+
digest: text.regex(/^[a-f0-9]{64}$/u),
|
|
117
|
+
diff: z.array(z.object({
|
|
118
|
+
path: text,
|
|
119
|
+
before: text.optional(),
|
|
120
|
+
after: text.optional()
|
|
121
|
+
}).strict()),
|
|
122
|
+
valid: z.boolean(),
|
|
123
|
+
diagnostics: z.array(diagnostic),
|
|
124
|
+
preview: preview.optional()
|
|
125
|
+
}).strict();
|
|
126
|
+
const receipt = z.object({
|
|
127
|
+
baseRevision: revision,
|
|
128
|
+
revision,
|
|
129
|
+
digest: text.regex(/^[a-f0-9]{64}$/u),
|
|
130
|
+
mode: z.enum(["draft", "validated"]),
|
|
131
|
+
validation: z.enum([
|
|
132
|
+
"not_requested",
|
|
133
|
+
"definition_passed",
|
|
134
|
+
"preview_passed"
|
|
135
|
+
])
|
|
136
|
+
}).strict();
|
|
137
|
+
const selected = z.object({
|
|
138
|
+
id: identity,
|
|
139
|
+
expectedRevision: revision
|
|
140
|
+
}).strict();
|
|
141
|
+
const changes = selected.extend({
|
|
142
|
+
changes: z.array(z.object({
|
|
143
|
+
path: text,
|
|
144
|
+
content: text.nullable()
|
|
145
|
+
}).strict()).min(1).max(64),
|
|
146
|
+
bundle: pin.optional(),
|
|
147
|
+
sampleSource: text.optional()
|
|
148
|
+
}).strict();
|
|
149
|
+
const scope = z.object({
|
|
150
|
+
id: identity,
|
|
151
|
+
expectedRevision: revision,
|
|
152
|
+
allowedPaths: z.array(identity).min(1).max(64),
|
|
153
|
+
bundle: pin.optional()
|
|
154
|
+
}).strict();
|
|
155
|
+
const reference = z.object({
|
|
156
|
+
sessionId: identity,
|
|
157
|
+
parentSessionId: identity,
|
|
158
|
+
invocationId: identity,
|
|
159
|
+
epoch: identity,
|
|
160
|
+
messageId: identity,
|
|
161
|
+
afterSeq: z.number().int().min(-1).max(Number.MAX_SAFE_INTEGER),
|
|
162
|
+
scope
|
|
163
|
+
}).strict();
|
|
164
|
+
const address = z.object({
|
|
165
|
+
sessionId: identity,
|
|
166
|
+
epoch: identity
|
|
167
|
+
}).strict();
|
|
168
|
+
const observation = z.object({
|
|
169
|
+
reference,
|
|
170
|
+
status: z.enum([
|
|
171
|
+
"queued",
|
|
172
|
+
"running",
|
|
173
|
+
"completed",
|
|
174
|
+
"cancelled",
|
|
175
|
+
"failed",
|
|
176
|
+
"unknown"
|
|
177
|
+
]),
|
|
178
|
+
consumed: z.boolean(),
|
|
179
|
+
turn: revision.nullable(),
|
|
180
|
+
terminal: z.boolean(),
|
|
181
|
+
reason: text.optional(),
|
|
182
|
+
throughSeq: z.number().int().min(-1).max(Number.MAX_SAFE_INTEGER),
|
|
183
|
+
source: z.enum(["live", "prepared"]),
|
|
184
|
+
durable: z.boolean(),
|
|
185
|
+
pendingInput: z.boolean(),
|
|
186
|
+
diagnostic: text.optional(),
|
|
187
|
+
conversation: z.object({
|
|
188
|
+
rows: z.array(z.object({
|
|
189
|
+
id: identity,
|
|
190
|
+
role: z.enum(["assistant", "tool"]),
|
|
191
|
+
label: text,
|
|
192
|
+
text: text.max(16384),
|
|
193
|
+
status: text
|
|
194
|
+
}).strict()).max(200),
|
|
195
|
+
omitted: revision
|
|
196
|
+
}).strict().optional()
|
|
197
|
+
}).strict();
|
|
198
|
+
const start = selected.extend({
|
|
199
|
+
invocationId: identity.max(128),
|
|
200
|
+
paths: z.array(identity).min(1).max(64),
|
|
201
|
+
bundle: pin.optional(),
|
|
202
|
+
prompt: text.min(1)
|
|
203
|
+
}).strict();
|
|
204
|
+
const preparedTarget = selected.extend({ bundle: pin.optional() }).strict();
|
|
205
|
+
const preparedLocator = preparedTarget.extend({
|
|
206
|
+
requestId: identity.max(128),
|
|
207
|
+
digest: text.regex(/^[a-f0-9]{64}$/u)
|
|
208
|
+
}).strict();
|
|
209
|
+
const conversationCandidate = candidate.extend({ authoring: z.object({
|
|
210
|
+
requestId: identity.max(128),
|
|
211
|
+
studio: preparedTarget,
|
|
212
|
+
url: text
|
|
213
|
+
}).strict().optional() }).strict();
|
|
214
|
+
const archive = z.object({
|
|
215
|
+
format: z.literal("studio-content-archive/v1"),
|
|
216
|
+
kind: z.enum(["kit", "bundle"]),
|
|
217
|
+
pin,
|
|
218
|
+
title: title.optional(),
|
|
219
|
+
provenance: z.object({
|
|
220
|
+
source: text.optional(),
|
|
221
|
+
license: text.optional()
|
|
222
|
+
}).strict().optional(),
|
|
223
|
+
dependencies: z.array(pin),
|
|
224
|
+
files: z.array(z.object({
|
|
225
|
+
path: text,
|
|
226
|
+
base64: text,
|
|
227
|
+
bytes: revision,
|
|
228
|
+
sha256: text.regex(/^[a-f0-9]{64}$/u)
|
|
229
|
+
}).strict()).max(4096),
|
|
230
|
+
sha256: text.regex(/^[a-f0-9]{64}$/u)
|
|
231
|
+
}).strict();
|
|
232
|
+
/** Business validation and byte budgets still belong to S1/S2/S4; these are JSON codecs. */
|
|
233
|
+
const STUDIO_AUTHORING_RPC_SCHEMAS = {
|
|
234
|
+
list: {
|
|
235
|
+
request: z.object({ kind: z.enum(["kit", "bundle"]).optional() }).strict().optional(),
|
|
236
|
+
result: z.array(instance),
|
|
237
|
+
optional: true
|
|
238
|
+
},
|
|
239
|
+
read: {
|
|
240
|
+
request: z.object({ id: identity }).strict(),
|
|
241
|
+
result: instance
|
|
242
|
+
},
|
|
243
|
+
create: {
|
|
244
|
+
request: z.object({
|
|
245
|
+
kind: z.enum(["kit", "bundle"]),
|
|
246
|
+
title
|
|
247
|
+
}).strict(),
|
|
248
|
+
result: instance
|
|
249
|
+
},
|
|
250
|
+
importSources: {
|
|
251
|
+
request: z.object({
|
|
252
|
+
kind: z.enum(["kit", "bundle"]),
|
|
253
|
+
files: z.array(z.object({
|
|
254
|
+
path: text,
|
|
255
|
+
base64: text
|
|
256
|
+
}).strict()).min(1).max(4096),
|
|
257
|
+
title: title.optional()
|
|
258
|
+
}).strict(),
|
|
259
|
+
result: instance
|
|
260
|
+
},
|
|
261
|
+
copy: {
|
|
262
|
+
request: z.object({
|
|
263
|
+
kind: z.enum(["kit", "bundle"]),
|
|
264
|
+
kit: pin.optional(),
|
|
265
|
+
bundle: pin.optional(),
|
|
266
|
+
sourceId: identity.optional(),
|
|
267
|
+
expectedRevision: revision.optional(),
|
|
268
|
+
title: title.optional()
|
|
269
|
+
}).strict(),
|
|
270
|
+
result: instance
|
|
271
|
+
},
|
|
272
|
+
editCurrent: {
|
|
273
|
+
request: z.object({
|
|
274
|
+
kind: z.enum(["kit", "bundle"]),
|
|
275
|
+
kit: pin.optional(),
|
|
276
|
+
bundle: pin.optional()
|
|
277
|
+
}).strict(),
|
|
278
|
+
result: instance
|
|
279
|
+
},
|
|
280
|
+
rename: {
|
|
281
|
+
request: selected.extend({ title }).strict(),
|
|
282
|
+
result: instance
|
|
283
|
+
},
|
|
284
|
+
remove: {
|
|
285
|
+
request: selected,
|
|
286
|
+
result: z.object({
|
|
287
|
+
id: identity,
|
|
288
|
+
revision,
|
|
289
|
+
trashed: z.literal(true)
|
|
290
|
+
}).strict()
|
|
291
|
+
},
|
|
292
|
+
readFile: {
|
|
293
|
+
request: z.object({
|
|
294
|
+
id: identity,
|
|
295
|
+
path: text
|
|
296
|
+
}).strict(),
|
|
297
|
+
result: z.object({
|
|
298
|
+
id: identity,
|
|
299
|
+
revision,
|
|
300
|
+
path: text,
|
|
301
|
+
content: text
|
|
302
|
+
}).strict()
|
|
303
|
+
},
|
|
304
|
+
saveFile: {
|
|
305
|
+
request: selected.extend({
|
|
306
|
+
path: text,
|
|
307
|
+
content: text
|
|
308
|
+
}).strict(),
|
|
309
|
+
result: instance
|
|
310
|
+
},
|
|
311
|
+
prepareChanges: {
|
|
312
|
+
request: changes,
|
|
313
|
+
result: conversationCandidate
|
|
314
|
+
},
|
|
315
|
+
saveChanges: {
|
|
316
|
+
request: z.union([changes.extend({
|
|
317
|
+
mode: z.literal("draft").optional(),
|
|
318
|
+
digest: text.optional()
|
|
319
|
+
}).strict(), changes.extend({
|
|
320
|
+
mode: z.literal("validated"),
|
|
321
|
+
digest: text.regex(/^[a-f0-9]{64}$/u)
|
|
322
|
+
}).strict()]),
|
|
323
|
+
result: instance.extend({ changeReceipt: receipt }).strict()
|
|
324
|
+
},
|
|
325
|
+
updateMounts: {
|
|
326
|
+
request: selected.extend({ bundles: z.array(pin.extend({
|
|
327
|
+
bindingKey: identity.optional(),
|
|
328
|
+
instanceId: identity.optional(),
|
|
329
|
+
revision: revision.optional()
|
|
330
|
+
}).strict()) }).strict(),
|
|
331
|
+
result: instance
|
|
332
|
+
},
|
|
333
|
+
preview: {
|
|
334
|
+
request: selected.extend({
|
|
335
|
+
bundle: pin.optional(),
|
|
336
|
+
sampleSource: text.optional()
|
|
337
|
+
}).strict(),
|
|
338
|
+
result: previewResult
|
|
339
|
+
},
|
|
340
|
+
start: {
|
|
341
|
+
request: start,
|
|
342
|
+
result: reference
|
|
343
|
+
},
|
|
344
|
+
resume: {
|
|
345
|
+
request: start.extend({
|
|
346
|
+
previous: address,
|
|
347
|
+
explicit: z.literal(true)
|
|
348
|
+
}).strict(),
|
|
349
|
+
result: reference
|
|
350
|
+
},
|
|
351
|
+
observe: {
|
|
352
|
+
request: address,
|
|
353
|
+
result: observation
|
|
354
|
+
},
|
|
355
|
+
cancel: {
|
|
356
|
+
request: address.extend({ expectedTurn: revision.nullable() }).strict(),
|
|
357
|
+
result: observation
|
|
358
|
+
},
|
|
359
|
+
readPrepared: {
|
|
360
|
+
request: z.union([address, preparedLocator]),
|
|
361
|
+
result: z.object({ prepared: z.object({
|
|
362
|
+
request: changes,
|
|
363
|
+
candidate
|
|
364
|
+
}).strict().optional() }).strict()
|
|
365
|
+
},
|
|
366
|
+
listReferences: {
|
|
367
|
+
request: void 0,
|
|
368
|
+
result: z.array(reference)
|
|
369
|
+
},
|
|
370
|
+
readArchive: {
|
|
371
|
+
request: z.object({ source: text.max(33554432) }).strict(),
|
|
372
|
+
result: archive
|
|
373
|
+
},
|
|
374
|
+
exportContentArchive: {
|
|
375
|
+
request: z.union([z.object({
|
|
376
|
+
kind: z.enum(["kit", "bundle"]),
|
|
377
|
+
pin,
|
|
378
|
+
provenance: z.object({
|
|
379
|
+
source: text.optional(),
|
|
380
|
+
license: text.optional()
|
|
381
|
+
}).strict().optional()
|
|
382
|
+
}).strict(), selected.extend({
|
|
383
|
+
provenance: z.object({
|
|
384
|
+
source: text.optional(),
|
|
385
|
+
license: text.optional()
|
|
386
|
+
}).strict().optional(),
|
|
387
|
+
dependencies: z.array(pin).optional()
|
|
388
|
+
}).strict()]),
|
|
389
|
+
result: text
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
/** The real Host lookup turns this SessionId locator into the actual live Agent. */
|
|
393
|
+
const agentParameter = {
|
|
394
|
+
name: "agent",
|
|
395
|
+
wire: "agentId",
|
|
396
|
+
source: "lookup",
|
|
397
|
+
lookup: "agent",
|
|
398
|
+
codec: {
|
|
399
|
+
mode: "strict",
|
|
400
|
+
typeSymbol: "@deepseek-ai/dsh-session/types#SessionId",
|
|
401
|
+
create: () => identity
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
const STUDIO_AUTHORING_REMOTE = {
|
|
405
|
+
package: "@yugoo-design/dsh-design-studio-dsh",
|
|
406
|
+
descriptors: Object.entries(STUDIO_AUTHORING_RPC_SCHEMAS).map(([method, spec]) => ({
|
|
407
|
+
id: `dsh-design-studio-dsh#studioAuthoring/${method}`,
|
|
408
|
+
service: "studioAuthoring",
|
|
409
|
+
namespace: "studioAuthoring",
|
|
410
|
+
method,
|
|
411
|
+
invocation: { kind: "direct" },
|
|
412
|
+
scope: {
|
|
413
|
+
context: "agent",
|
|
414
|
+
wire: "agentId"
|
|
415
|
+
},
|
|
416
|
+
parameters: [agentParameter, ...spec.request === void 0 ? [] : [{
|
|
417
|
+
name: "request",
|
|
418
|
+
wire: "request",
|
|
419
|
+
source: "json",
|
|
420
|
+
..."optional" in spec && spec.optional ? { acceptsUndefined: true } : {},
|
|
421
|
+
codec: {
|
|
422
|
+
mode: "strict",
|
|
423
|
+
typeSymbol: `dsh-design-studio-dsh#${method}Request`,
|
|
424
|
+
create: () => spec.request
|
|
425
|
+
}
|
|
426
|
+
}]],
|
|
427
|
+
result: {
|
|
428
|
+
mode: "strict",
|
|
429
|
+
typeSymbol: `dsh-design-studio-dsh#${method}Result`,
|
|
430
|
+
create: () => spec.result
|
|
431
|
+
}
|
|
432
|
+
}))
|
|
433
|
+
};
|
|
434
|
+
//#endregion
|
|
435
|
+
export { STUDIO_AUTHORING_REMOTE, STUDIO_AUTHORING_RPC_SCHEMAS };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "./page-path-BkPiqrUH.js";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
import { StudioManagementClient } from "@yugoo-design/dsh-design-studio-ui";
|
|
4
|
+
import { SettingsSectionOwnerProps } from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
5
|
+
//#region src/client-adapter.d.ts
|
|
6
|
+
interface LocaleSnapshot {
|
|
7
|
+
readonly active: string;
|
|
8
|
+
readonly revision: number;
|
|
9
|
+
}
|
|
10
|
+
/** Browser services used by the Studio settings section. */
|
|
11
|
+
interface DshStudioSettingsRuntime {
|
|
12
|
+
readonly locale: {
|
|
13
|
+
getSnapshot(): LocaleSnapshot;
|
|
14
|
+
subscribe(listener: () => void): () => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface DshStudioSettingsSectionProps extends SettingsSectionOwnerProps {
|
|
18
|
+
readonly locale: DshStudioSettingsRuntime['locale'];
|
|
19
|
+
}
|
|
20
|
+
/** DSH Remote gateway settlement for one call. */
|
|
21
|
+
type DshRemoteResult<T> = {
|
|
22
|
+
readonly ok: true;
|
|
23
|
+
readonly value: T;
|
|
24
|
+
} | {
|
|
25
|
+
readonly ok: false;
|
|
26
|
+
readonly error: {
|
|
27
|
+
readonly code?: string;
|
|
28
|
+
readonly message?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/** Remote namespace methods used by the Studio client. */
|
|
32
|
+
interface DshStudioRemote {
|
|
33
|
+
workspace(query: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['workspace']>>>>;
|
|
34
|
+
readKitWorkspace(name: string, version: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readKitWorkspace']>>>>;
|
|
35
|
+
readKitFiles(name: string, version: string): Promise<DshRemoteResult<Awaited<ReturnType<NonNullable<StudioManagementClient['readKitFiles']>>>>>;
|
|
36
|
+
readKitFile(name: string, version: string, path: string): Promise<DshRemoteResult<Awaited<ReturnType<NonNullable<StudioManagementClient['readKitFile']>>>>>;
|
|
37
|
+
readBundleWorkspace(name: string, version?: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readBundleWorkspace']>>>>;
|
|
38
|
+
readBundleFile(name: string, path: string, version?: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readBundleFile']>>>>;
|
|
39
|
+
}
|
|
40
|
+
/** Build the shared client over DSH's generated Remote namespace. */
|
|
41
|
+
declare function createDshStudioClient(remote: DshStudioRemote): StudioManagementClient;
|
|
42
|
+
/**
|
|
43
|
+
* Settings-shell launcher for the full-page Studio workspace. Web opens a
|
|
44
|
+
* separate noopener page; Desktop follows its existing same-window app route.
|
|
45
|
+
* @param actions - Settings owner affordances.
|
|
46
|
+
* @returns the launcher element.
|
|
47
|
+
*/
|
|
48
|
+
declare function renderStudioLauncher(actions: {
|
|
49
|
+
close(): void;
|
|
50
|
+
}, zh?: boolean, locationHref?: string): ReactElement;
|
|
51
|
+
/** Compact Desktop page navigation, independent of the shared Studio workspace. */
|
|
52
|
+
declare function renderStudioReturnNavigation(zh?: boolean, locationHref?: string): ReactElement | null;
|
|
53
|
+
/** Design Studio settings page with the launcher only. */
|
|
54
|
+
declare function DshStudioSettingsSection(props: DshStudioSettingsSectionProps): ReactElement;
|
|
55
|
+
/** Minimal slot face required to install the Studio Settings contribution. */
|
|
56
|
+
interface DshStudioSlots {
|
|
57
|
+
inject(name: string, contribution: () => () => void): void;
|
|
58
|
+
register(spec: Record<string, unknown>, component: unknown): () => void;
|
|
59
|
+
}
|
|
60
|
+
/** Register the root-scoped Studio Settings launcher for the caller's fiber. */
|
|
61
|
+
declare function registerDshStudioSettings(host: {
|
|
62
|
+
readonly slots: DshStudioSlots;
|
|
63
|
+
} & DshStudioSettingsRuntime): void;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { DshStudioSlots as a, renderStudioLauncher as c, DshStudioSettingsSection as i, renderStudioReturnNavigation as l, DshStudioRemote as n, createDshStudioClient as o, DshStudioSettingsRuntime as r, registerDshStudioSettings as s, DshRemoteResult as t };
|
package/lib/client-adapter.d.ts
CHANGED
|
@@ -1,65 +1,3 @@
|
|
|
1
|
-
import { t as STUDIO_PAGE_BASE } from "./page-path-
|
|
2
|
-
import {
|
|
3
|
-
import { SettingsSectionOwnerProps } from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
4
|
-
import { StudioManagementClient } from "@yugoo-design/dsh-design-studio-ui";
|
|
5
|
-
//#region src/client-adapter.d.ts
|
|
6
|
-
interface LocaleSnapshot {
|
|
7
|
-
readonly active: string;
|
|
8
|
-
readonly revision: number;
|
|
9
|
-
}
|
|
10
|
-
/** Browser services used by the Studio settings section. */
|
|
11
|
-
interface DshStudioSettingsRuntime {
|
|
12
|
-
readonly locale: {
|
|
13
|
-
getSnapshot(): LocaleSnapshot;
|
|
14
|
-
subscribe(listener: () => void): () => void;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
interface DshStudioSettingsSectionProps extends SettingsSectionOwnerProps {
|
|
18
|
-
readonly locale: DshStudioSettingsRuntime['locale'];
|
|
19
|
-
}
|
|
20
|
-
/** DSH Remote gateway settlement for one call. */
|
|
21
|
-
type DshRemoteResult<T> = {
|
|
22
|
-
readonly ok: true;
|
|
23
|
-
readonly value: T;
|
|
24
|
-
} | {
|
|
25
|
-
readonly ok: false;
|
|
26
|
-
readonly error: {
|
|
27
|
-
readonly code?: string;
|
|
28
|
-
readonly message?: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
/** Remote namespace methods used by the Studio client. */
|
|
32
|
-
interface DshStudioRemote {
|
|
33
|
-
workspace(query: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['workspace']>>>>;
|
|
34
|
-
readKitWorkspace(name: string, version: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readKitWorkspace']>>>>;
|
|
35
|
-
readKitFiles(name: string, version: string): Promise<DshRemoteResult<Awaited<ReturnType<NonNullable<StudioManagementClient['readKitFiles']>>>>>;
|
|
36
|
-
readKitFile(name: string, version: string, path: string): Promise<DshRemoteResult<Awaited<ReturnType<NonNullable<StudioManagementClient['readKitFile']>>>>>;
|
|
37
|
-
readBundleWorkspace(name: string, version?: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readBundleWorkspace']>>>>;
|
|
38
|
-
readBundleFile(name: string, path: string, version?: string): Promise<DshRemoteResult<Awaited<ReturnType<StudioManagementClient['readBundleFile']>>>>;
|
|
39
|
-
}
|
|
40
|
-
/** Build the shared client over DSH's generated Remote namespace. */
|
|
41
|
-
declare function createDshStudioClient(remote: DshStudioRemote): StudioManagementClient;
|
|
42
|
-
/**
|
|
43
|
-
* Settings-shell launcher for the full-page Studio workspace. Web opens a
|
|
44
|
-
* separate noopener page; Desktop follows its existing same-window app route.
|
|
45
|
-
* @param actions - Settings owner affordances.
|
|
46
|
-
* @returns the launcher element.
|
|
47
|
-
*/
|
|
48
|
-
declare function renderStudioLauncher(actions: {
|
|
49
|
-
close(): void;
|
|
50
|
-
}, zh?: boolean, locationHref?: string): ReactElement;
|
|
51
|
-
/** Compact Desktop page navigation, independent of the shared Studio workspace. */
|
|
52
|
-
declare function renderStudioReturnNavigation(zh?: boolean, locationHref?: string): ReactElement | null;
|
|
53
|
-
/** Design Studio settings page with the launcher only. */
|
|
54
|
-
declare function DshStudioSettingsSection(props: DshStudioSettingsSectionProps): ReactElement;
|
|
55
|
-
/** Minimal slot face required to install the Studio Settings contribution. */
|
|
56
|
-
interface DshStudioSlots {
|
|
57
|
-
inject(name: string, contribution: () => () => void): void;
|
|
58
|
-
register(spec: Record<string, unknown>, component: unknown): () => void;
|
|
59
|
-
}
|
|
60
|
-
/** Register the root-scoped Studio Settings launcher for the caller's fiber. */
|
|
61
|
-
declare function registerDshStudioSettings(host: {
|
|
62
|
-
readonly slots: DshStudioSlots;
|
|
63
|
-
} & DshStudioSettingsRuntime): void;
|
|
64
|
-
//#endregion
|
|
1
|
+
import { t as STUDIO_PAGE_BASE } from "./page-path-BkPiqrUH.js";
|
|
2
|
+
import { a as DshStudioSlots, c as renderStudioLauncher, i as DshStudioSettingsSection, l as renderStudioReturnNavigation, n as DshStudioRemote, o as createDshStudioClient, r as DshStudioSettingsRuntime, s as registerDshStudioSettings, t as DshRemoteResult } from "./client-adapter-BmIzQcMT.js";
|
|
65
3
|
export { DshRemoteResult, DshStudioRemote, DshStudioSettingsRuntime, DshStudioSettingsSection, DshStudioSlots, STUDIO_PAGE_BASE as STUDIO_PAGE_URL, createDshStudioClient, registerDshStudioSettings, renderStudioLauncher, renderStudioReturnNavigation };
|
package/lib/client.js
CHANGED
|
@@ -7,7 +7,6 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
//#region src/page-path.ts
|
|
10
|
-
/** Browser-safe path constants shared by the host route and the launcher. */
|
|
11
10
|
/** Base path owned by the Studio page route. */
|
|
12
11
|
const STUDIO_PAGE_BASE = "/design-studio/";
|
|
13
12
|
/** Recognize only the official Desktop application authority, not a redirect hint. */
|
|
@@ -162,7 +161,7 @@ window.__ModuleLoader__.load({
|
|
|
162
161
|
//#region src/client.tsx
|
|
163
162
|
/** Required browser services; the full-page Studio owns its own Remote boot. */
|
|
164
163
|
const inject = ["slots", "locale"];
|
|
165
|
-
/**
|
|
164
|
+
/** Studio has no persistent entry in the conversation header. */
|
|
166
165
|
async function apply(ctx) {
|
|
167
166
|
registerDshStudioSettings(ctx);
|
|
168
167
|
}
|