@nonoun/native-ai 1.0.18 → 1.0.21
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/dist/native-ai.js +1673 -225
- package/dist/register.js +813 -112
- package/package.json +1 -1
- package/dist/a2ui/a2ui-diagnostics.d.ts +0 -31
- package/dist/a2ui/a2ui-diagnostics.d.ts.map +0 -1
- package/dist/a2ui/a2ui-element.d.ts +0 -30
- package/dist/a2ui/a2ui-element.d.ts.map +0 -1
- package/dist/a2ui/a2ui-presets.d.ts +0 -22
- package/dist/a2ui/a2ui-presets.d.ts.map +0 -1
- package/dist/a2ui/adapters/a2a-adapter.d.ts +0 -38
- package/dist/a2ui/adapters/a2a-adapter.d.ts.map +0 -1
- package/dist/a2ui/adapters/adapter-types.d.ts +0 -19
- package/dist/a2ui/adapters/adapter-types.d.ts.map +0 -1
- package/dist/a2ui/adapters/ag-ui-adapter.d.ts +0 -42
- package/dist/a2ui/adapters/ag-ui-adapter.d.ts.map +0 -1
- package/dist/a2ui/adapters/direct-adapter.d.ts +0 -30
- package/dist/a2ui/adapters/direct-adapter.d.ts.map +0 -1
- package/dist/a2ui/adapters/index.d.ts +0 -8
- package/dist/a2ui/adapters/index.d.ts.map +0 -1
- package/dist/a2ui/index.d.ts +0 -15
- package/dist/a2ui/index.d.ts.map +0 -1
- package/dist/a2ui/install.d.ts +0 -23
- package/dist/a2ui/install.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-adapter.d.ts +0 -52
- package/dist/a2ui/protocol/a2ui-adapter.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-component-map.d.ts +0 -75
- package/dist/a2ui/protocol/a2ui-component-map.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-converter.d.ts +0 -37
- package/dist/a2ui/protocol/a2ui-converter.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-surface.d.ts +0 -34
- package/dist/a2ui/protocol/a2ui-surface.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-transport.d.ts +0 -80
- package/dist/a2ui/protocol/a2ui-transport.d.ts.map +0 -1
- package/dist/a2ui/protocol/a2ui-types.d.ts +0 -104
- package/dist/a2ui/protocol/a2ui-types.d.ts.map +0 -1
- package/dist/a2ui/protocol/index.d.ts +0 -13
- package/dist/a2ui/protocol/index.d.ts.map +0 -1
- package/dist/a2ui/protocol/kernel-bridge.d.ts +0 -114
- package/dist/a2ui/protocol/kernel-bridge.d.ts.map +0 -1
- package/dist/a2ui/register.d.ts +0 -12
- package/dist/a2ui/register.d.ts.map +0 -1
- package/dist/a2ui/session/agent-session.d.ts +0 -44
- package/dist/a2ui/session/agent-session.d.ts.map +0 -1
- package/dist/a2ui/session/catalog.d.ts +0 -41
- package/dist/a2ui/session/catalog.d.ts.map +0 -1
- package/dist/a2ui/session/event-emitter.d.ts +0 -17
- package/dist/a2ui/session/event-emitter.d.ts.map +0 -1
- package/dist/a2ui/session/index.d.ts +0 -9
- package/dist/a2ui/session/index.d.ts.map +0 -1
- package/dist/a2ui/session/session-manager.d.ts +0 -33
- package/dist/a2ui/session/session-manager.d.ts.map +0 -1
- package/dist/a2ui/session/surface-registry.d.ts +0 -32
- package/dist/a2ui/session/surface-registry.d.ts.map +0 -1
- package/dist/a2ui/session/types.d.ts +0 -27
- package/dist/a2ui/session/types.d.ts.map +0 -1
- package/dist/chat/avatar/chat-avatar-element.d.ts +0 -18
- package/dist/chat/avatar/chat-avatar-element.d.ts.map +0 -1
- package/dist/chat/avatar/index.d.ts +0 -2
- package/dist/chat/avatar/index.d.ts.map +0 -1
- package/dist/chat/avatar/n-chat-avatar.d.ts +0 -2
- package/dist/chat/avatar/n-chat-avatar.d.ts.map +0 -1
- package/dist/chat/chat-input-element.d.ts +0 -32
- package/dist/chat/chat-input-element.d.ts.map +0 -1
- package/dist/chat/chat-panel-element.d.ts +0 -100
- package/dist/chat/chat-panel-element.d.ts.map +0 -1
- package/dist/chat/feed/chat-feed-element.d.ts +0 -48
- package/dist/chat/feed/chat-feed-element.d.ts.map +0 -1
- package/dist/chat/feed/index.d.ts +0 -2
- package/dist/chat/feed/index.d.ts.map +0 -1
- package/dist/chat/feed/n-chat-feed.d.ts +0 -2
- package/dist/chat/feed/n-chat-feed.d.ts.map +0 -1
- package/dist/chat/gateway/adapter-chatgpt.d.ts +0 -67
- package/dist/chat/gateway/adapter-chatgpt.d.ts.map +0 -1
- package/dist/chat/gateway/adapter-claude.d.ts +0 -68
- package/dist/chat/gateway/adapter-claude.d.ts.map +0 -1
- package/dist/chat/gateway/adapter-mock.d.ts +0 -3
- package/dist/chat/gateway/adapter-mock.d.ts.map +0 -1
- package/dist/chat/gateway/adapter.d.ts +0 -71
- package/dist/chat/gateway/adapter.d.ts.map +0 -1
- package/dist/chat/gateway/controller.d.ts +0 -46
- package/dist/chat/gateway/controller.d.ts.map +0 -1
- package/dist/chat/gateway/index.d.ts +0 -9
- package/dist/chat/gateway/index.d.ts.map +0 -1
- package/dist/chat/gateway/runtime.d.ts +0 -53
- package/dist/chat/gateway/runtime.d.ts.map +0 -1
- package/dist/chat/gateway/types.d.ts +0 -73
- package/dist/chat/gateway/types.d.ts.map +0 -1
- package/dist/chat/gateway.d.ts +0 -2
- package/dist/chat/gateway.d.ts.map +0 -1
- package/dist/chat/index.d.ts +0 -17
- package/dist/chat/index.d.ts.map +0 -1
- package/dist/chat/message/chat-input-structured-element.d.ts +0 -43
- package/dist/chat/message/chat-input-structured-element.d.ts.map +0 -1
- package/dist/chat/message/chat-message-activity-element.d.ts +0 -32
- package/dist/chat/message/chat-message-activity-element.d.ts.map +0 -1
- package/dist/chat/message/chat-message-element.d.ts +0 -44
- package/dist/chat/message/chat-message-element.d.ts.map +0 -1
- package/dist/chat/message/chat-message-genui-element.d.ts +0 -45
- package/dist/chat/message/chat-message-genui-element.d.ts.map +0 -1
- package/dist/chat/message/chat-message-seed-element.d.ts +0 -33
- package/dist/chat/message/chat-message-seed-element.d.ts.map +0 -1
- package/dist/chat/message/chat-message-text-element.d.ts +0 -37
- package/dist/chat/message/chat-message-text-element.d.ts.map +0 -1
- package/dist/chat/message/chat-messages-element.d.ts +0 -39
- package/dist/chat/message/chat-messages-element.d.ts.map +0 -1
- package/dist/chat/message/index.d.ts +0 -8
- package/dist/chat/message/index.d.ts.map +0 -1
- package/dist/chat/message/n-chat-message.d.ts +0 -2
- package/dist/chat/message/n-chat-message.d.ts.map +0 -1
- package/dist/chat/register.d.ts +0 -13
- package/dist/chat/register.d.ts.map +0 -1
- package/dist/chat/stream/classify.d.ts +0 -19
- package/dist/chat/stream/classify.d.ts.map +0 -1
- package/dist/chat/stream/create-transport.d.ts +0 -19
- package/dist/chat/stream/create-transport.d.ts.map +0 -1
- package/dist/chat/stream/index.d.ts +0 -9
- package/dist/chat/stream/index.d.ts.map +0 -1
- package/dist/chat/stream/parse-json.d.ts +0 -9
- package/dist/chat/stream/parse-json.d.ts.map +0 -1
- package/dist/chat/stream/parse-ndjson.d.ts +0 -9
- package/dist/chat/stream/parse-ndjson.d.ts.map +0 -1
- package/dist/chat/stream/parse-sse.d.ts +0 -9
- package/dist/chat/stream/parse-sse.d.ts.map +0 -1
- package/dist/chat/stream/types.d.ts +0 -42
- package/dist/chat/stream/types.d.ts.map +0 -1
- package/dist/chat/telemetry/emitter.d.ts +0 -20
- package/dist/chat/telemetry/emitter.d.ts.map +0 -1
- package/dist/chat/telemetry/events.d.ts +0 -11
- package/dist/chat/telemetry/events.d.ts.map +0 -1
- package/dist/chat/telemetry/index.d.ts +0 -5
- package/dist/chat/telemetry/index.d.ts.map +0 -1
- package/dist/chat/telemetry/redactor.d.ts +0 -17
- package/dist/chat/telemetry/redactor.d.ts.map +0 -1
- package/dist/chat/telemetry/types.d.ts +0 -27
- package/dist/chat/telemetry/types.d.ts.map +0 -1
- package/dist/gateway.d.ts +0 -2
- package/dist/gateway.d.ts.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/native-ai.css +0 -1422
- package/dist/register.d.ts +0 -12
- package/dist/register.d.ts.map +0 -1
package/dist/native-ai.js
CHANGED
|
@@ -54,7 +54,7 @@ function O(e) {
|
|
|
54
54
|
* change tracking via a signal. The default singleton (`defaultRegistry`)
|
|
55
55
|
* preserves backward compatibility with existing free-function imports.
|
|
56
56
|
*/
|
|
57
|
-
var
|
|
57
|
+
var k = class e {
|
|
58
58
|
#e = /* @__PURE__ */ new Map();
|
|
59
59
|
#t = /* @__PURE__ */ new Map();
|
|
60
60
|
#n = /* @__PURE__ */ new Map();
|
|
@@ -158,12 +158,19 @@ var re = class e {
|
|
|
158
158
|
for (let e of this.#e.values()) e.nativeTag !== "div" && e.nativeTag !== "span" && !this.#t.has(e.nativeTag) && this.#t.set(e.nativeTag, e);
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
const
|
|
161
|
+
const A = new k([
|
|
162
162
|
{
|
|
163
163
|
a2uiType: "Text",
|
|
164
164
|
nativeTag: "span",
|
|
165
165
|
childStrategy: "textContent",
|
|
166
|
-
defaultAttributes: { class: "text" }
|
|
166
|
+
defaultAttributes: { class: "text" },
|
|
167
|
+
events: [],
|
|
168
|
+
properties: [{
|
|
169
|
+
attr: "variant",
|
|
170
|
+
type: "'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'heading' | 'caption' | 'body'",
|
|
171
|
+
note: "Resolved to HTML tag by textVariantTag()"
|
|
172
|
+
}],
|
|
173
|
+
methods: []
|
|
167
174
|
},
|
|
168
175
|
{
|
|
169
176
|
a2uiType: "Button",
|
|
@@ -178,7 +185,21 @@ const k = new re([
|
|
|
178
185
|
ghost: "ghost",
|
|
179
186
|
outline: "outline",
|
|
180
187
|
danger: "primary"
|
|
181
|
-
}
|
|
188
|
+
},
|
|
189
|
+
events: [{
|
|
190
|
+
event: "native:press",
|
|
191
|
+
description: "Fires on click or keyboard activation (Enter/Space)."
|
|
192
|
+
}],
|
|
193
|
+
properties: [{
|
|
194
|
+
attr: "disabled",
|
|
195
|
+
type: "boolean",
|
|
196
|
+
reactive: !0
|
|
197
|
+
}, {
|
|
198
|
+
attr: "type",
|
|
199
|
+
type: "'button' | 'submit' | 'reset'",
|
|
200
|
+
reactive: !0
|
|
201
|
+
}],
|
|
202
|
+
methods: []
|
|
182
203
|
},
|
|
183
204
|
{
|
|
184
205
|
a2uiType: "TextField",
|
|
@@ -189,7 +210,78 @@ const k = new re([
|
|
|
189
210
|
propertyMap: {
|
|
190
211
|
value: "value",
|
|
191
212
|
placeholder: "placeholder"
|
|
192
|
-
}
|
|
213
|
+
},
|
|
214
|
+
events: [
|
|
215
|
+
{
|
|
216
|
+
event: "native:input",
|
|
217
|
+
detail: { value: "string" },
|
|
218
|
+
description: "Fires on each keystroke."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
event: "native:change",
|
|
222
|
+
detail: { value: "string" },
|
|
223
|
+
description: "Fires on blur after value changed."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
event: "native:format",
|
|
227
|
+
detail: {
|
|
228
|
+
type: "string",
|
|
229
|
+
value: "string"
|
|
230
|
+
},
|
|
231
|
+
description: "Fires after text formatting is applied."
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
properties: [
|
|
235
|
+
{
|
|
236
|
+
attr: "value",
|
|
237
|
+
type: "string",
|
|
238
|
+
reactive: !0
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
attr: "placeholder",
|
|
242
|
+
type: "string",
|
|
243
|
+
reactive: !0
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
attr: "disabled",
|
|
247
|
+
type: "boolean",
|
|
248
|
+
reactive: !0
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
attr: "readonly",
|
|
252
|
+
type: "boolean",
|
|
253
|
+
reactive: !0
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
attr: "required",
|
|
257
|
+
type: "boolean",
|
|
258
|
+
reactive: !0
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
attr: "pattern",
|
|
262
|
+
type: "string"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
attr: "type",
|
|
266
|
+
type: "'text' | 'password'",
|
|
267
|
+
reactive: !0
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
attr: "formatting",
|
|
271
|
+
type: "string",
|
|
272
|
+
note: "Space-separated format list (code, bold, italic)"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
methods: [{
|
|
276
|
+
name: "select",
|
|
277
|
+
returns: "void",
|
|
278
|
+
description: "Select all text in the input."
|
|
279
|
+
}, {
|
|
280
|
+
name: "focus",
|
|
281
|
+
params: { options: "FocusOptions" },
|
|
282
|
+
returns: "void",
|
|
283
|
+
description: "Focus the editing surface."
|
|
284
|
+
}]
|
|
193
285
|
},
|
|
194
286
|
{
|
|
195
287
|
a2uiType: "TextArea",
|
|
@@ -204,21 +296,172 @@ const k = new re([
|
|
|
204
296
|
value: "value",
|
|
205
297
|
placeholder: "placeholder",
|
|
206
298
|
rows: "rows"
|
|
207
|
-
}
|
|
299
|
+
},
|
|
300
|
+
events: [
|
|
301
|
+
{
|
|
302
|
+
event: "native:input",
|
|
303
|
+
detail: { value: "string" },
|
|
304
|
+
description: "Fires on each keystroke."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
event: "native:change",
|
|
308
|
+
detail: { value: "string" },
|
|
309
|
+
description: "Fires on blur after value changed."
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
event: "native:format",
|
|
313
|
+
detail: {
|
|
314
|
+
type: "string",
|
|
315
|
+
value: "string"
|
|
316
|
+
},
|
|
317
|
+
description: "Fires after text formatting is applied."
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
properties: [
|
|
321
|
+
{
|
|
322
|
+
attr: "value",
|
|
323
|
+
type: "string",
|
|
324
|
+
reactive: !0
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
attr: "placeholder",
|
|
328
|
+
type: "string",
|
|
329
|
+
reactive: !0
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
attr: "disabled",
|
|
333
|
+
type: "boolean",
|
|
334
|
+
reactive: !0
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
attr: "readonly",
|
|
338
|
+
type: "boolean",
|
|
339
|
+
reactive: !0
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
attr: "required",
|
|
343
|
+
type: "boolean",
|
|
344
|
+
reactive: !0
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
attr: "rows",
|
|
348
|
+
type: "number",
|
|
349
|
+
reactive: !0
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
attr: "maxlength",
|
|
353
|
+
type: "number"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
attr: "autogrow",
|
|
357
|
+
type: "boolean",
|
|
358
|
+
reactive: !0
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
attr: "pattern",
|
|
362
|
+
type: "string"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
attr: "formatting",
|
|
366
|
+
type: "string",
|
|
367
|
+
note: "Space-separated format list (code, bold, italic)"
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
methods: [{
|
|
371
|
+
name: "applyFormat",
|
|
372
|
+
params: { type: "string" },
|
|
373
|
+
returns: "void",
|
|
374
|
+
description: "Apply or toggle a text format on the current selection."
|
|
375
|
+
}]
|
|
208
376
|
},
|
|
209
377
|
{
|
|
210
378
|
a2uiType: "CheckBox",
|
|
211
379
|
nativeTag: "n-checkbox",
|
|
212
380
|
childStrategy: "textContent",
|
|
213
381
|
actionEvent: "native:change",
|
|
214
|
-
defaultAttributes: { size: "sm" }
|
|
382
|
+
defaultAttributes: { size: "sm" },
|
|
383
|
+
events: [{
|
|
384
|
+
event: "native:change",
|
|
385
|
+
detail: {
|
|
386
|
+
checked: "boolean",
|
|
387
|
+
value: "string"
|
|
388
|
+
},
|
|
389
|
+
description: "Fires when checked state toggles."
|
|
390
|
+
}],
|
|
391
|
+
properties: [
|
|
392
|
+
{
|
|
393
|
+
attr: "checked",
|
|
394
|
+
type: "boolean",
|
|
395
|
+
reactive: !0
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
attr: "indeterminate",
|
|
399
|
+
type: "boolean",
|
|
400
|
+
reactive: !0
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
attr: "disabled",
|
|
404
|
+
type: "boolean",
|
|
405
|
+
reactive: !0
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
attr: "name",
|
|
409
|
+
type: "string"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
attr: "value",
|
|
413
|
+
type: "string",
|
|
414
|
+
note: "Defaults to 'on'"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
attr: "required",
|
|
418
|
+
type: "boolean",
|
|
419
|
+
reactive: !0
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
methods: []
|
|
215
423
|
},
|
|
216
424
|
{
|
|
217
425
|
a2uiType: "Switch",
|
|
218
426
|
nativeTag: "n-switch",
|
|
219
427
|
childStrategy: "textContent",
|
|
220
428
|
actionEvent: "native:change",
|
|
221
|
-
defaultAttributes: { size: "sm" }
|
|
429
|
+
defaultAttributes: { size: "sm" },
|
|
430
|
+
events: [{
|
|
431
|
+
event: "native:change",
|
|
432
|
+
detail: {
|
|
433
|
+
checked: "boolean",
|
|
434
|
+
value: "string"
|
|
435
|
+
},
|
|
436
|
+
description: "Fires when toggled on/off."
|
|
437
|
+
}],
|
|
438
|
+
properties: [
|
|
439
|
+
{
|
|
440
|
+
attr: "checked",
|
|
441
|
+
type: "boolean",
|
|
442
|
+
reactive: !0
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
attr: "disabled",
|
|
446
|
+
type: "boolean",
|
|
447
|
+
reactive: !0
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
attr: "name",
|
|
451
|
+
type: "string"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
attr: "value",
|
|
455
|
+
type: "string",
|
|
456
|
+
note: "Defaults to 'on'"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
attr: "required",
|
|
460
|
+
type: "boolean",
|
|
461
|
+
reactive: !0
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
methods: []
|
|
222
465
|
},
|
|
223
466
|
{
|
|
224
467
|
a2uiType: "ChoicePicker",
|
|
@@ -226,7 +469,53 @@ const k = new re([
|
|
|
226
469
|
childStrategy: "children",
|
|
227
470
|
actionEvent: "native:change",
|
|
228
471
|
defaultAttributes: { size: "sm" },
|
|
229
|
-
propertyMap: { placeholder: "placeholder" }
|
|
472
|
+
propertyMap: { placeholder: "placeholder" },
|
|
473
|
+
events: [{
|
|
474
|
+
event: "native:change",
|
|
475
|
+
detail: {
|
|
476
|
+
value: "string",
|
|
477
|
+
label: "string",
|
|
478
|
+
previousValue: "string"
|
|
479
|
+
},
|
|
480
|
+
description: "Fires when selection changes."
|
|
481
|
+
}],
|
|
482
|
+
properties: [
|
|
483
|
+
{
|
|
484
|
+
attr: "value",
|
|
485
|
+
type: "string",
|
|
486
|
+
reactive: !0
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
attr: "disabled",
|
|
490
|
+
type: "boolean",
|
|
491
|
+
reactive: !0
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
attr: "name",
|
|
495
|
+
type: "string"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
attr: "options",
|
|
499
|
+
type: "string",
|
|
500
|
+
note: "JSON array: [{ value, label }]"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
attr: "src",
|
|
504
|
+
type: "string",
|
|
505
|
+
note: "URL for fetching options"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
attr: "placeholder",
|
|
509
|
+
type: "string",
|
|
510
|
+
reactive: !0
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
attr: "required",
|
|
514
|
+
type: "boolean",
|
|
515
|
+
reactive: !0
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
methods: []
|
|
230
519
|
},
|
|
231
520
|
{
|
|
232
521
|
a2uiType: "Slider",
|
|
@@ -238,7 +527,37 @@ const k = new re([
|
|
|
238
527
|
min: "min",
|
|
239
528
|
max: "max",
|
|
240
529
|
value: "value"
|
|
241
|
-
}
|
|
530
|
+
},
|
|
531
|
+
events: [{
|
|
532
|
+
event: "native:change",
|
|
533
|
+
detail: { value: "number" },
|
|
534
|
+
description: "Fires when slider value changes."
|
|
535
|
+
}],
|
|
536
|
+
properties: [
|
|
537
|
+
{
|
|
538
|
+
attr: "value",
|
|
539
|
+
type: "number",
|
|
540
|
+
reactive: !0
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
attr: "min",
|
|
544
|
+
type: "number"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
attr: "max",
|
|
548
|
+
type: "number"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
attr: "step",
|
|
552
|
+
type: "number"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
attr: "disabled",
|
|
556
|
+
type: "boolean",
|
|
557
|
+
reactive: !0
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
methods: []
|
|
242
561
|
},
|
|
243
562
|
{
|
|
244
563
|
a2uiType: "DateTimeInput",
|
|
@@ -250,60 +569,226 @@ const k = new re([
|
|
|
250
569
|
value: "value",
|
|
251
570
|
min: "min",
|
|
252
571
|
max: "max"
|
|
253
|
-
}
|
|
572
|
+
},
|
|
573
|
+
events: [{
|
|
574
|
+
event: "native:change",
|
|
575
|
+
detail: { value: "string" },
|
|
576
|
+
description: "Fires when date/time value changes."
|
|
577
|
+
}],
|
|
578
|
+
properties: [
|
|
579
|
+
{
|
|
580
|
+
attr: "value",
|
|
581
|
+
type: "string",
|
|
582
|
+
reactive: !0
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
attr: "min",
|
|
586
|
+
type: "string"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
attr: "max",
|
|
590
|
+
type: "string"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
attr: "disabled",
|
|
594
|
+
type: "boolean",
|
|
595
|
+
reactive: !0
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
attr: "required",
|
|
599
|
+
type: "boolean",
|
|
600
|
+
reactive: !0
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
methods: []
|
|
254
604
|
},
|
|
255
605
|
{
|
|
256
606
|
a2uiType: "Row",
|
|
257
607
|
nativeTag: "n-stack",
|
|
258
608
|
childStrategy: "children",
|
|
259
|
-
defaultAttributes: { direction: "row" }
|
|
609
|
+
defaultAttributes: { direction: "row" },
|
|
610
|
+
events: [],
|
|
611
|
+
properties: [{
|
|
612
|
+
attr: "gap",
|
|
613
|
+
type: "string"
|
|
614
|
+
}, {
|
|
615
|
+
attr: "align",
|
|
616
|
+
type: "string"
|
|
617
|
+
}],
|
|
618
|
+
methods: []
|
|
260
619
|
},
|
|
261
620
|
{
|
|
262
621
|
a2uiType: "Column",
|
|
263
622
|
nativeTag: "n-stack",
|
|
264
|
-
childStrategy: "children"
|
|
623
|
+
childStrategy: "children",
|
|
624
|
+
events: [],
|
|
625
|
+
properties: [{
|
|
626
|
+
attr: "gap",
|
|
627
|
+
type: "string"
|
|
628
|
+
}, {
|
|
629
|
+
attr: "align",
|
|
630
|
+
type: "string"
|
|
631
|
+
}],
|
|
632
|
+
methods: []
|
|
265
633
|
},
|
|
266
634
|
{
|
|
267
635
|
a2uiType: "Card",
|
|
268
636
|
nativeTag: "n-container",
|
|
269
|
-
childStrategy: "children"
|
|
637
|
+
childStrategy: "children",
|
|
638
|
+
events: [],
|
|
639
|
+
properties: [{
|
|
640
|
+
attr: "bordered",
|
|
641
|
+
type: "boolean"
|
|
642
|
+
}, {
|
|
643
|
+
attr: "data-kind",
|
|
644
|
+
type: "'panel'"
|
|
645
|
+
}],
|
|
646
|
+
methods: []
|
|
270
647
|
},
|
|
271
648
|
{
|
|
272
649
|
a2uiType: "Header",
|
|
273
650
|
nativeTag: "n-header",
|
|
274
|
-
childStrategy: "children"
|
|
651
|
+
childStrategy: "children",
|
|
652
|
+
events: [],
|
|
653
|
+
properties: [],
|
|
654
|
+
methods: []
|
|
275
655
|
},
|
|
276
656
|
{
|
|
277
657
|
a2uiType: "Body",
|
|
278
658
|
nativeTag: "n-body",
|
|
279
|
-
childStrategy: "children"
|
|
659
|
+
childStrategy: "children",
|
|
660
|
+
events: [],
|
|
661
|
+
properties: [],
|
|
662
|
+
methods: []
|
|
280
663
|
},
|
|
281
664
|
{
|
|
282
665
|
a2uiType: "Footer",
|
|
283
666
|
nativeTag: "n-footer",
|
|
284
|
-
childStrategy: "children"
|
|
667
|
+
childStrategy: "children",
|
|
668
|
+
events: [],
|
|
669
|
+
properties: [],
|
|
670
|
+
methods: []
|
|
285
671
|
},
|
|
286
672
|
{
|
|
287
673
|
a2uiType: "Modal",
|
|
288
674
|
nativeTag: "n-dialog",
|
|
289
675
|
childStrategy: "children",
|
|
290
|
-
actionEvent: "native:dismiss"
|
|
676
|
+
actionEvent: "native:dismiss",
|
|
677
|
+
events: [{
|
|
678
|
+
event: "close",
|
|
679
|
+
description: "Fires when the dialog is closed."
|
|
680
|
+
}],
|
|
681
|
+
properties: [{
|
|
682
|
+
attr: "no-close-on-escape",
|
|
683
|
+
type: "boolean"
|
|
684
|
+
}, {
|
|
685
|
+
attr: "no-close-on-backdrop",
|
|
686
|
+
type: "boolean"
|
|
687
|
+
}],
|
|
688
|
+
methods: [{
|
|
689
|
+
name: "showModal",
|
|
690
|
+
returns: "void",
|
|
691
|
+
description: "Open the dialog in modal mode."
|
|
692
|
+
}, {
|
|
693
|
+
name: "close",
|
|
694
|
+
returns: "void",
|
|
695
|
+
description: "Close the dialog."
|
|
696
|
+
}]
|
|
291
697
|
},
|
|
292
698
|
{
|
|
293
699
|
a2uiType: "Tabs",
|
|
294
700
|
nativeTag: "n-tabs",
|
|
295
|
-
childStrategy: "children"
|
|
701
|
+
childStrategy: "children",
|
|
702
|
+
events: [{
|
|
703
|
+
event: "native:change",
|
|
704
|
+
detail: {
|
|
705
|
+
value: "string",
|
|
706
|
+
label: "string"
|
|
707
|
+
},
|
|
708
|
+
description: "Fires when the active tab changes."
|
|
709
|
+
}],
|
|
710
|
+
properties: [
|
|
711
|
+
{
|
|
712
|
+
attr: "value",
|
|
713
|
+
type: "string",
|
|
714
|
+
reactive: !0
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
attr: "disabled",
|
|
718
|
+
type: "boolean",
|
|
719
|
+
reactive: !0
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
attr: "orientation",
|
|
723
|
+
type: "'horizontal' | 'vertical'",
|
|
724
|
+
reactive: !0
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
methods: []
|
|
296
728
|
},
|
|
297
729
|
{
|
|
298
730
|
a2uiType: "List",
|
|
299
731
|
nativeTag: "n-listbox",
|
|
300
732
|
childStrategy: "children",
|
|
301
|
-
actionEvent: "native:select"
|
|
733
|
+
actionEvent: "native:select",
|
|
734
|
+
events: [{
|
|
735
|
+
event: "native:change",
|
|
736
|
+
detail: {
|
|
737
|
+
value: "string",
|
|
738
|
+
label: "string"
|
|
739
|
+
},
|
|
740
|
+
description: "Fires when the selected option changes."
|
|
741
|
+
}],
|
|
742
|
+
properties: [
|
|
743
|
+
{
|
|
744
|
+
attr: "disabled",
|
|
745
|
+
type: "boolean",
|
|
746
|
+
reactive: !0
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
attr: "multiple",
|
|
750
|
+
type: "boolean",
|
|
751
|
+
reactive: !0
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
attr: "virtual-focus",
|
|
755
|
+
type: "boolean"
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
methods: [{
|
|
759
|
+
name: "getActiveOption",
|
|
760
|
+
returns: "Element | null",
|
|
761
|
+
description: "Returns the currently keyboard-focused option."
|
|
762
|
+
}]
|
|
302
763
|
},
|
|
303
764
|
{
|
|
304
765
|
a2uiType: "ListItem",
|
|
305
766
|
nativeTag: "n-option",
|
|
306
|
-
childStrategy: "textContent"
|
|
767
|
+
childStrategy: "textContent",
|
|
768
|
+
events: [{
|
|
769
|
+
event: "native:select",
|
|
770
|
+
detail: {
|
|
771
|
+
value: "string",
|
|
772
|
+
label: "string"
|
|
773
|
+
},
|
|
774
|
+
description: "Fires when this option is clicked."
|
|
775
|
+
}],
|
|
776
|
+
properties: [
|
|
777
|
+
{
|
|
778
|
+
attr: "value",
|
|
779
|
+
type: "string"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
attr: "disabled",
|
|
783
|
+
type: "boolean"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
attr: "label",
|
|
787
|
+
type: "string",
|
|
788
|
+
note: "Falls back to textContent"
|
|
789
|
+
}
|
|
790
|
+
],
|
|
791
|
+
methods: []
|
|
307
792
|
},
|
|
308
793
|
{
|
|
309
794
|
a2uiType: "Image",
|
|
@@ -312,24 +797,55 @@ const k = new re([
|
|
|
312
797
|
propertyMap: {
|
|
313
798
|
url: "src",
|
|
314
799
|
alt: "alt"
|
|
315
|
-
}
|
|
800
|
+
},
|
|
801
|
+
events: [],
|
|
802
|
+
properties: [{
|
|
803
|
+
attr: "src",
|
|
804
|
+
type: "string"
|
|
805
|
+
}, {
|
|
806
|
+
attr: "alt",
|
|
807
|
+
type: "string"
|
|
808
|
+
}],
|
|
809
|
+
methods: []
|
|
316
810
|
},
|
|
317
811
|
{
|
|
318
812
|
a2uiType: "Icon",
|
|
319
813
|
nativeTag: "n-icon",
|
|
320
814
|
childStrategy: "none",
|
|
321
815
|
defaultAttributes: { "aria-hidden": "true" },
|
|
322
|
-
propertyMap: { name: "name" }
|
|
816
|
+
propertyMap: { name: "name" },
|
|
817
|
+
events: [],
|
|
818
|
+
properties: [{
|
|
819
|
+
attr: "name",
|
|
820
|
+
type: "string",
|
|
821
|
+
reactive: !0
|
|
822
|
+
}],
|
|
823
|
+
methods: []
|
|
323
824
|
},
|
|
324
825
|
{
|
|
325
826
|
a2uiType: "Divider",
|
|
326
827
|
nativeTag: "n-divider",
|
|
327
|
-
childStrategy: "none"
|
|
828
|
+
childStrategy: "none",
|
|
829
|
+
events: [],
|
|
830
|
+
properties: [{
|
|
831
|
+
attr: "orientation",
|
|
832
|
+
type: "'horizontal' | 'vertical'"
|
|
833
|
+
}],
|
|
834
|
+
methods: []
|
|
328
835
|
},
|
|
329
836
|
{
|
|
330
837
|
a2uiType: "Badge",
|
|
331
838
|
nativeTag: "n-badge",
|
|
332
|
-
childStrategy: "textContent"
|
|
839
|
+
childStrategy: "textContent",
|
|
840
|
+
events: [],
|
|
841
|
+
properties: [{
|
|
842
|
+
attr: "intent",
|
|
843
|
+
type: "'info' | 'success' | 'warning' | 'danger'"
|
|
844
|
+
}, {
|
|
845
|
+
attr: "dot",
|
|
846
|
+
type: "boolean"
|
|
847
|
+
}],
|
|
848
|
+
methods: []
|
|
333
849
|
},
|
|
334
850
|
{
|
|
335
851
|
a2uiType: "Avatar",
|
|
@@ -338,14 +854,69 @@ const k = new re([
|
|
|
338
854
|
propertyMap: {
|
|
339
855
|
src: "src",
|
|
340
856
|
alt: "alt"
|
|
341
|
-
}
|
|
857
|
+
},
|
|
858
|
+
events: [],
|
|
859
|
+
properties: [{
|
|
860
|
+
attr: "src",
|
|
861
|
+
type: "string"
|
|
862
|
+
}, {
|
|
863
|
+
attr: "alt",
|
|
864
|
+
type: "string"
|
|
865
|
+
}],
|
|
866
|
+
methods: []
|
|
342
867
|
},
|
|
343
868
|
{
|
|
344
869
|
a2uiType: "Select",
|
|
345
870
|
nativeTag: "n-select",
|
|
346
871
|
childStrategy: "children",
|
|
347
872
|
actionEvent: "native:change",
|
|
348
|
-
propertyMap: { placeholder: "placeholder" }
|
|
873
|
+
propertyMap: { placeholder: "placeholder" },
|
|
874
|
+
events: [{
|
|
875
|
+
event: "native:change",
|
|
876
|
+
detail: {
|
|
877
|
+
value: "string",
|
|
878
|
+
label: "string",
|
|
879
|
+
previousValue: "string"
|
|
880
|
+
},
|
|
881
|
+
description: "Fires when selection changes."
|
|
882
|
+
}],
|
|
883
|
+
properties: [
|
|
884
|
+
{
|
|
885
|
+
attr: "value",
|
|
886
|
+
type: "string",
|
|
887
|
+
reactive: !0
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
attr: "disabled",
|
|
891
|
+
type: "boolean",
|
|
892
|
+
reactive: !0
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
attr: "name",
|
|
896
|
+
type: "string"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
attr: "options",
|
|
900
|
+
type: "string",
|
|
901
|
+
note: "JSON array: [{ value, label }]"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
attr: "src",
|
|
905
|
+
type: "string",
|
|
906
|
+
note: "URL for fetching options"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
attr: "placeholder",
|
|
910
|
+
type: "string",
|
|
911
|
+
reactive: !0
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
attr: "required",
|
|
915
|
+
type: "boolean",
|
|
916
|
+
reactive: !0
|
|
917
|
+
}
|
|
918
|
+
],
|
|
919
|
+
methods: []
|
|
349
920
|
},
|
|
350
921
|
{
|
|
351
922
|
a2uiType: "Video",
|
|
@@ -354,29 +925,127 @@ const k = new re([
|
|
|
354
925
|
propertyMap: {
|
|
355
926
|
url: "src",
|
|
356
927
|
poster: "poster"
|
|
357
|
-
}
|
|
928
|
+
},
|
|
929
|
+
events: [],
|
|
930
|
+
properties: [{
|
|
931
|
+
attr: "src",
|
|
932
|
+
type: "string"
|
|
933
|
+
}, {
|
|
934
|
+
attr: "poster",
|
|
935
|
+
type: "string"
|
|
936
|
+
}],
|
|
937
|
+
methods: []
|
|
358
938
|
},
|
|
359
939
|
{
|
|
360
940
|
a2uiType: "AudioPlayer",
|
|
361
941
|
nativeTag: "n-audio",
|
|
362
942
|
childStrategy: "none",
|
|
363
|
-
propertyMap: { url: "src" }
|
|
943
|
+
propertyMap: { url: "src" },
|
|
944
|
+
events: [],
|
|
945
|
+
properties: [{
|
|
946
|
+
attr: "src",
|
|
947
|
+
type: "string"
|
|
948
|
+
}],
|
|
949
|
+
methods: []
|
|
364
950
|
},
|
|
365
951
|
{
|
|
366
952
|
a2uiType: "Accordion",
|
|
367
953
|
nativeTag: "n-accordion",
|
|
368
|
-
childStrategy: "children"
|
|
954
|
+
childStrategy: "children",
|
|
955
|
+
events: [],
|
|
956
|
+
properties: [{
|
|
957
|
+
attr: "multiple",
|
|
958
|
+
type: "boolean",
|
|
959
|
+
reactive: !0
|
|
960
|
+
}, {
|
|
961
|
+
attr: "disabled",
|
|
962
|
+
type: "boolean",
|
|
963
|
+
reactive: !0
|
|
964
|
+
}],
|
|
965
|
+
methods: []
|
|
369
966
|
},
|
|
370
967
|
{
|
|
371
968
|
a2uiType: "AccordionItem",
|
|
372
969
|
nativeTag: "n-accordion-item",
|
|
373
970
|
childStrategy: "children",
|
|
374
|
-
propertyMap: { label: "label" }
|
|
971
|
+
propertyMap: { label: "label" },
|
|
972
|
+
events: [],
|
|
973
|
+
properties: [
|
|
974
|
+
{
|
|
975
|
+
attr: "open",
|
|
976
|
+
type: "boolean",
|
|
977
|
+
reactive: !0
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
attr: "disabled",
|
|
981
|
+
type: "boolean",
|
|
982
|
+
reactive: !0
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
attr: "label",
|
|
986
|
+
type: "string"
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
methods: []
|
|
375
990
|
},
|
|
376
991
|
{
|
|
377
992
|
a2uiType: "Table",
|
|
378
993
|
nativeTag: "n-table",
|
|
379
|
-
childStrategy: "children"
|
|
994
|
+
childStrategy: "children",
|
|
995
|
+
events: [
|
|
996
|
+
{
|
|
997
|
+
event: "native:table-sort",
|
|
998
|
+
detail: {
|
|
999
|
+
column: "string",
|
|
1000
|
+
direction: "'asc' | 'desc' | null"
|
|
1001
|
+
},
|
|
1002
|
+
description: "Fires when column sort changes."
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
event: "native:table-select",
|
|
1006
|
+
detail: {
|
|
1007
|
+
value: "string",
|
|
1008
|
+
selected: "boolean",
|
|
1009
|
+
allSelected: "string[]"
|
|
1010
|
+
},
|
|
1011
|
+
description: "Fires when row selection changes."
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
event: "native:table-reorder",
|
|
1015
|
+
detail: {
|
|
1016
|
+
sourceIndex: "number",
|
|
1017
|
+
targetIndex: "number",
|
|
1018
|
+
inserted: "string[]"
|
|
1019
|
+
},
|
|
1020
|
+
description: "Fires when rows are drag-reordered."
|
|
1021
|
+
}
|
|
1022
|
+
],
|
|
1023
|
+
properties: [
|
|
1024
|
+
{
|
|
1025
|
+
attr: "selectable",
|
|
1026
|
+
type: "boolean",
|
|
1027
|
+
reactive: !0
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
attr: "resizable",
|
|
1031
|
+
type: "boolean"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
attr: "reorderable",
|
|
1035
|
+
type: "boolean"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
attr: "cols",
|
|
1039
|
+
type: "string",
|
|
1040
|
+
reactive: !0,
|
|
1041
|
+
note: "Sets grid-template-columns CSS"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
attr: "sticky-header",
|
|
1045
|
+
type: "boolean"
|
|
1046
|
+
}
|
|
1047
|
+
],
|
|
1048
|
+
methods: []
|
|
380
1049
|
},
|
|
381
1050
|
{
|
|
382
1051
|
a2uiType: "Progress",
|
|
@@ -385,17 +1054,49 @@ const k = new re([
|
|
|
385
1054
|
propertyMap: {
|
|
386
1055
|
value: "value",
|
|
387
1056
|
max: "max"
|
|
388
|
-
}
|
|
1057
|
+
},
|
|
1058
|
+
events: [],
|
|
1059
|
+
properties: [{
|
|
1060
|
+
attr: "value",
|
|
1061
|
+
type: "number",
|
|
1062
|
+
reactive: !0
|
|
1063
|
+
}, {
|
|
1064
|
+
attr: "max",
|
|
1065
|
+
type: "number"
|
|
1066
|
+
}],
|
|
1067
|
+
methods: []
|
|
389
1068
|
},
|
|
390
1069
|
{
|
|
391
1070
|
a2uiType: "Breadcrumb",
|
|
392
1071
|
nativeTag: "n-breadcrumb",
|
|
393
|
-
childStrategy: "children"
|
|
1072
|
+
childStrategy: "children",
|
|
1073
|
+
events: [],
|
|
1074
|
+
properties: [],
|
|
1075
|
+
methods: []
|
|
394
1076
|
},
|
|
395
1077
|
{
|
|
396
1078
|
a2uiType: "Toast",
|
|
397
1079
|
nativeTag: "n-toast",
|
|
398
|
-
childStrategy: "textContent"
|
|
1080
|
+
childStrategy: "textContent",
|
|
1081
|
+
events: [{
|
|
1082
|
+
event: "native:dismiss",
|
|
1083
|
+
description: "Fires when the toast dismiss button is clicked."
|
|
1084
|
+
}],
|
|
1085
|
+
properties: [
|
|
1086
|
+
{
|
|
1087
|
+
attr: "message",
|
|
1088
|
+
type: "string"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
attr: "dismissible",
|
|
1092
|
+
type: "boolean"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
attr: "intent",
|
|
1096
|
+
type: "'info' | 'success' | 'warning' | 'danger'"
|
|
1097
|
+
}
|
|
1098
|
+
],
|
|
1099
|
+
methods: []
|
|
399
1100
|
}
|
|
400
1101
|
], {
|
|
401
1102
|
Text: "display",
|
|
@@ -431,17 +1132,23 @@ const k = new re([
|
|
|
431
1132
|
AudioPlayer: "media",
|
|
432
1133
|
Table: "data",
|
|
433
1134
|
Toast: "feedback"
|
|
434
|
-
}),
|
|
435
|
-
function
|
|
436
|
-
return
|
|
1135
|
+
}), re = A;
|
|
1136
|
+
function j(e) {
|
|
1137
|
+
return A.resolveNativeTag(e);
|
|
1138
|
+
}
|
|
1139
|
+
function M(e, t) {
|
|
1140
|
+
return A.resolveA2UIType(e, t);
|
|
437
1141
|
}
|
|
438
|
-
function
|
|
439
|
-
return
|
|
1142
|
+
function N() {
|
|
1143
|
+
return A.getSupportedTypes();
|
|
440
1144
|
}
|
|
441
|
-
function
|
|
442
|
-
return
|
|
1145
|
+
function ie(e) {
|
|
1146
|
+
return A.getComponentCategory(e);
|
|
443
1147
|
}
|
|
444
|
-
|
|
1148
|
+
function ae(e) {
|
|
1149
|
+
return A.getCompatibleTypes(e);
|
|
1150
|
+
}
|
|
1151
|
+
var oe = {
|
|
445
1152
|
h1: "h1",
|
|
446
1153
|
h2: "h2",
|
|
447
1154
|
h3: "h3",
|
|
@@ -455,16 +1162,16 @@ var ae = {
|
|
|
455
1162
|
* For A2UI Text components, resolve the variant to an HTML tag.
|
|
456
1163
|
* Returns 'span' by default.
|
|
457
1164
|
*/
|
|
458
|
-
function
|
|
459
|
-
return e ?
|
|
1165
|
+
function se(e) {
|
|
1166
|
+
return e ? oe[e] ?? "span" : "span";
|
|
460
1167
|
}
|
|
461
1168
|
/**
|
|
462
1169
|
* For A2UI DateTimeInput components, resolve enableDate/enableTime to HTML input type.
|
|
463
1170
|
*/
|
|
464
|
-
function
|
|
1171
|
+
function ce(e, t) {
|
|
465
1172
|
return e && t ? "datetime-local" : t && !e ? "time" : "date";
|
|
466
1173
|
}
|
|
467
|
-
var
|
|
1174
|
+
var le = {
|
|
468
1175
|
number: "number",
|
|
469
1176
|
obscured: "password",
|
|
470
1177
|
shortText: "text",
|
|
@@ -473,8 +1180,8 @@ var ce = {
|
|
|
473
1180
|
/**
|
|
474
1181
|
* For A2UI TextField components, resolve the variant to an HTML input type attribute.
|
|
475
1182
|
*/
|
|
476
|
-
function
|
|
477
|
-
return e ?
|
|
1183
|
+
function ue(e) {
|
|
1184
|
+
return e ? le[e] ?? "text" : "text";
|
|
478
1185
|
}
|
|
479
1186
|
/**
|
|
480
1187
|
* A2UI Converter
|
|
@@ -482,12 +1189,12 @@ function le(e) {
|
|
|
482
1189
|
* Bidirectional conversion between A2UI flat adjacency lists
|
|
483
1190
|
* and native-ui nested UINode trees.
|
|
484
1191
|
*/
|
|
485
|
-
var
|
|
1192
|
+
var de = new Set(/* @__PURE__ */ "id.component.children.child.text.label.variant.disabled.action.accessibility.value.placeholder.min.max.step.url.src.alt.name.fit.justify.align.weight.direction.enableDate.enableTime.options.filterable.displayStyle.validationRegexp.checks.trigger.content.tabs.poster.header.footer".split(".")), fe = new Set([
|
|
486
1193
|
"Header",
|
|
487
1194
|
"Body",
|
|
488
1195
|
"Footer"
|
|
489
1196
|
]);
|
|
490
|
-
function
|
|
1197
|
+
function P(e, t) {
|
|
491
1198
|
if (e.length === 0) return {
|
|
492
1199
|
root: {
|
|
493
1200
|
id: "empty-root",
|
|
@@ -519,7 +1226,7 @@ function N(e, t) {
|
|
|
519
1226
|
warnings: ["No root component found"],
|
|
520
1227
|
orphans: []
|
|
521
1228
|
};
|
|
522
|
-
let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map(), s = [], c = t?.surfaceId ?? "default", l = t?.registry ? (e) => t.registry.resolveNativeTag(e) :
|
|
1229
|
+
let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map(), s = [], c = t?.surfaceId ?? "default", l = t?.registry ? (e) => t.registry.resolveNativeTag(e) : j, u = F(i, n, a, o, s, c, l), d = e.filter((e) => !a.has(e.id)).map((e) => e.id);
|
|
523
1230
|
return d.length > 0 && s.push(`Orphan components not reachable from root: ${d.join(", ")}`), {
|
|
524
1231
|
root: u,
|
|
525
1232
|
bindings: o,
|
|
@@ -527,7 +1234,7 @@ function N(e, t) {
|
|
|
527
1234
|
orphans: d
|
|
528
1235
|
};
|
|
529
1236
|
}
|
|
530
|
-
function
|
|
1237
|
+
function F(e, t, n, r, i, a, o = j) {
|
|
531
1238
|
if (n.has(e)) return i.push(`Cycle detected at component "${e}"`), {
|
|
532
1239
|
id: `${e}-cycle`,
|
|
533
1240
|
tag: "div",
|
|
@@ -547,7 +1254,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
547
1254
|
textContent: s.text ?? `[Unknown: ${s.component}]`
|
|
548
1255
|
};
|
|
549
1256
|
let l = c.nativeTag;
|
|
550
|
-
s.component === "Text" && s.variant && (l =
|
|
1257
|
+
s.component === "Text" && s.variant && (l = se(s.variant));
|
|
551
1258
|
let u = {};
|
|
552
1259
|
if (u["data-a2ui"] = s.component, c.defaultAttributes && Object.assign(u, c.defaultAttributes), s.variant && c.variantMap) {
|
|
553
1260
|
let e = c.variantMap[s.variant];
|
|
@@ -564,10 +1271,10 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
564
1271
|
} else u[n] = String(i);
|
|
565
1272
|
}
|
|
566
1273
|
if (s.disabled && (u.disabled = ""), s.accessibility?.label && (u["aria-label"] = s.accessibility.label), s.component === "TextField") {
|
|
567
|
-
let e =
|
|
1274
|
+
let e = ue(s.variant);
|
|
568
1275
|
e !== "text" && (u.type = e);
|
|
569
1276
|
}
|
|
570
|
-
if (s.component === "DateTimeInput" && (u.type =
|
|
1277
|
+
if (s.component === "DateTimeInput" && (u.type = ce(s.enableDate, s.enableTime)), (s.component === "TextField" || s.component === "DateTimeInput" || s.component === "Slider") && s.label) if (S(s.label)) {
|
|
571
1278
|
let t = r.get(e);
|
|
572
1279
|
t || (t = [], r.set(e, t)), t.push({
|
|
573
1280
|
property: "aria-label",
|
|
@@ -586,7 +1293,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
586
1293
|
path: s.text.path
|
|
587
1294
|
});
|
|
588
1295
|
} else d = s.text;
|
|
589
|
-
for (let [e, t] of Object.entries(s))
|
|
1296
|
+
for (let [e, t] of Object.entries(s)) de.has(e) || typeof t == "string" && (u[e] = t);
|
|
590
1297
|
let f;
|
|
591
1298
|
s.action?.event && c.actionEvent && (f = { [c.actionEvent]: `a2ui:${a}:${e}:${s.action.event.name}` });
|
|
592
1299
|
let p, m = s.children ?? (s.child ? [s.child] : void 0);
|
|
@@ -604,7 +1311,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
604
1311
|
attributes: { value: u },
|
|
605
1312
|
textContent: d
|
|
606
1313
|
});
|
|
607
|
-
let f = l.children ?? (l.child ? [l.child] : void 0), h = f ? f.map((e) =>
|
|
1314
|
+
let f = l.children ?? (l.child ? [l.child] : void 0), h = f ? f.map((e) => F(e, t, n, r, i, a, o)) : void 0, g = typeof l.text == "string" ? l.text : void 0;
|
|
608
1315
|
s.push({
|
|
609
1316
|
id: `${c}-panel`,
|
|
610
1317
|
tag: "n-tab-panel",
|
|
@@ -642,8 +1349,8 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
642
1349
|
}
|
|
643
1350
|
} else if (s.component === "Card" && m && m.length > 0) if (m.some((e) => {
|
|
644
1351
|
let n = t.get(e);
|
|
645
|
-
return n ?
|
|
646
|
-
})) p = m.map((e) =>
|
|
1352
|
+
return n ? fe.has(n.component) : !1;
|
|
1353
|
+
})) p = m.map((e) => F(e, t, n, r, i, a, o));
|
|
647
1354
|
else {
|
|
648
1355
|
p = [];
|
|
649
1356
|
let c = s.header ?? s.label;
|
|
@@ -657,7 +1364,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
657
1364
|
textContent: c
|
|
658
1365
|
}]
|
|
659
1366
|
});
|
|
660
|
-
let l = m.map((e) =>
|
|
1367
|
+
let l = m.map((e) => F(e, t, n, r, i, a, o));
|
|
661
1368
|
p.push({
|
|
662
1369
|
id: `${e}-body`,
|
|
663
1370
|
tag: "n-body",
|
|
@@ -670,7 +1377,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
670
1377
|
textContent: u
|
|
671
1378
|
}), c && (d = void 0);
|
|
672
1379
|
}
|
|
673
|
-
else m && m.length > 0 && (p = m.map((e) =>
|
|
1380
|
+
else m && m.length > 0 && (p = m.map((e) => F(e, t, n, r, i, a, o)));
|
|
674
1381
|
if (c.childStrategy === "slot-label" && d && !p) p = [{
|
|
675
1382
|
id: `${e}-label`,
|
|
676
1383
|
tag: "span",
|
|
@@ -718,11 +1425,11 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
718
1425
|
...f ? { events: f } : {}
|
|
719
1426
|
};
|
|
720
1427
|
}
|
|
721
|
-
function
|
|
722
|
-
let n = [], r = t?.registry ? (e, n) => t.registry.resolveA2UIType(e, n) :
|
|
723
|
-
return
|
|
1428
|
+
function pe(e, t) {
|
|
1429
|
+
let n = [], r = t?.registry ? (e, n) => t.registry.resolveA2UIType(e, n) : M, i = t?.registry ? (e) => t.registry.resolveNativeTag(e) : j;
|
|
1430
|
+
return I(e, n, t?.surfaceId ?? "default", r, i), n;
|
|
724
1431
|
}
|
|
725
|
-
function
|
|
1432
|
+
function I(e, t, n, r = M, i = j) {
|
|
726
1433
|
let a = r(e.tag, e.attributes);
|
|
727
1434
|
if (!a) {
|
|
728
1435
|
let a = {
|
|
@@ -731,7 +1438,7 @@ function F(e, t, n, r = j, i = A) {
|
|
|
731
1438
|
...e.children ? { children: e.children.map((e) => e.id) } : {},
|
|
732
1439
|
...e.textContent ? { text: e.textContent } : {}
|
|
733
1440
|
};
|
|
734
|
-
if (t.push(a), e.children) for (let a of e.children)
|
|
1441
|
+
if (t.push(a), e.children) for (let a of e.children) I(a, t, n, r, i);
|
|
735
1442
|
return;
|
|
736
1443
|
}
|
|
737
1444
|
let o = i(a), s = {
|
|
@@ -744,11 +1451,11 @@ function F(e, t, n, r = j, i = A) {
|
|
|
744
1451
|
} else if (o?.childStrategy === "slot-label" && e.children.length === 1 && e.children[0].attributes?.slot === "label" && e.children[0].textContent) s.text = e.children[0].textContent;
|
|
745
1452
|
else {
|
|
746
1453
|
s.children = e.children.map((e) => e.id);
|
|
747
|
-
for (let a of e.children)
|
|
1454
|
+
for (let a of e.children) I(a, t, n, r, i);
|
|
748
1455
|
}
|
|
749
1456
|
if (e.textContent && (a === "CheckBox" || a === "Switch" || a === "ListItem" ? s.label = e.textContent : s.text = e.textContent), e.attributes) {
|
|
750
|
-
let t = o?.propertyMap ?
|
|
751
|
-
for (let [n, r] of Object.entries(e.attributes)) n === "style" || n === "data-a2ui" || n === "slot" || (t[n] ? s[t[n]] = r : n === "aria-label" ? s.label = r : n === "disabled" && r === "" ? s.disabled = !0 : n === "variant" && (s.variant = (o?.variantMap ?
|
|
1457
|
+
let t = o?.propertyMap ? me(o.propertyMap) : {};
|
|
1458
|
+
for (let [n, r] of Object.entries(e.attributes)) n === "style" || n === "data-a2ui" || n === "slot" || (t[n] ? s[t[n]] = r : n === "aria-label" ? s.label = r : n === "disabled" && r === "" ? s.disabled = !0 : n === "variant" && (s.variant = (o?.variantMap ? me(o.variantMap) : {})[r] ?? r));
|
|
752
1459
|
}
|
|
753
1460
|
if (e.events) for (let [t, n] of Object.entries(e.events)) {
|
|
754
1461
|
let e = n.split(":");
|
|
@@ -756,7 +1463,7 @@ function F(e, t, n, r = j, i = A) {
|
|
|
756
1463
|
}
|
|
757
1464
|
t.push(s);
|
|
758
1465
|
}
|
|
759
|
-
function
|
|
1466
|
+
function me(e) {
|
|
760
1467
|
let t = {};
|
|
761
1468
|
for (let [n, r] of Object.entries(e)) t[r] = n;
|
|
762
1469
|
return t;
|
|
@@ -764,7 +1471,7 @@ function pe(e) {
|
|
|
764
1471
|
/**
|
|
765
1472
|
* Wrap a conversion result as a UIPlan.
|
|
766
1473
|
*/
|
|
767
|
-
function
|
|
1474
|
+
function he(e, t = "generated") {
|
|
768
1475
|
return Object.freeze({
|
|
769
1476
|
id: f("a2ui-plan"),
|
|
770
1477
|
version: 1,
|
|
@@ -779,18 +1486,18 @@ function me(e, t = "generated") {
|
|
|
779
1486
|
* Manages A2UI surface lifecycle: create → updateComponents → updateDataModel → delete.
|
|
780
1487
|
* Each surface maps to one UIPlan in the kernel.
|
|
781
1488
|
*/
|
|
782
|
-
function
|
|
1489
|
+
function L(e, t) {
|
|
783
1490
|
if (!t || t === "/") return e;
|
|
784
|
-
let n = t.replace(/^\//, "").split("/").map(
|
|
1491
|
+
let n = t.replace(/^\//, "").split("/").map(z), r = e;
|
|
785
1492
|
for (let e of n) {
|
|
786
1493
|
if (typeof r != "object" || !r) return;
|
|
787
1494
|
r = r[e];
|
|
788
1495
|
}
|
|
789
1496
|
return r;
|
|
790
1497
|
}
|
|
791
|
-
function
|
|
1498
|
+
function R(e, t, n) {
|
|
792
1499
|
if (!t || t === "/") return;
|
|
793
|
-
let r = t.replace(/^\//, "").split("/").map(
|
|
1500
|
+
let r = t.replace(/^\//, "").split("/").map(z), i = e;
|
|
794
1501
|
for (let e = 0; e < r.length - 1; e++) {
|
|
795
1502
|
let t = r[e];
|
|
796
1503
|
(i[t] == null || typeof i[t] != "object") && (i[t] = {}), i = i[t];
|
|
@@ -798,10 +1505,10 @@ function L(e, t, n) {
|
|
|
798
1505
|
let a = r[r.length - 1];
|
|
799
1506
|
n === void 0 ? delete i[a] : i[a] = n;
|
|
800
1507
|
}
|
|
801
|
-
function
|
|
1508
|
+
function z(e) {
|
|
802
1509
|
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
803
1510
|
}
|
|
804
|
-
var
|
|
1511
|
+
var B = class {
|
|
805
1512
|
#e;
|
|
806
1513
|
#t;
|
|
807
1514
|
#n;
|
|
@@ -851,12 +1558,12 @@ var z = class {
|
|
|
851
1558
|
}, this.#i.set(n, i), this.#a.value = this.#i.size), i.rendered ? (this.#l(i, r), i.components = [...r]) : (i.components = [...r], this.#c(i)), i.rendered && this.#n?.(i.surfaceId, i.container);
|
|
852
1559
|
}
|
|
853
1560
|
#c(e) {
|
|
854
|
-
let t =
|
|
1561
|
+
let t = P(e.components, {
|
|
855
1562
|
surfaceId: e.surfaceId,
|
|
856
1563
|
registry: this.#r
|
|
857
1564
|
});
|
|
858
1565
|
e.bindings = new Map(t.bindings);
|
|
859
|
-
let n =
|
|
1566
|
+
let n = he(t);
|
|
860
1567
|
e.planId = n.id;
|
|
861
1568
|
try {
|
|
862
1569
|
let t = this.#e.executePlan(n, e.container);
|
|
@@ -864,7 +1571,7 @@ var z = class {
|
|
|
864
1571
|
} catch {}
|
|
865
1572
|
}
|
|
866
1573
|
#l(e, t) {
|
|
867
|
-
let n =
|
|
1574
|
+
let n = ye(e.components, t, e.surfaceId, this.#r);
|
|
868
1575
|
if (n.length === 0) return;
|
|
869
1576
|
this.#e.patchPlan({
|
|
870
1577
|
planId: e.planId,
|
|
@@ -872,7 +1579,7 @@ var z = class {
|
|
|
872
1579
|
source: "generated",
|
|
873
1580
|
timestamp: Date.now()
|
|
874
1581
|
});
|
|
875
|
-
let r =
|
|
1582
|
+
let r = P(t, {
|
|
876
1583
|
surfaceId: e.surfaceId,
|
|
877
1584
|
registry: this.#r
|
|
878
1585
|
});
|
|
@@ -886,7 +1593,7 @@ var z = class {
|
|
|
886
1593
|
let { surfaceId: t, path: n, value: r } = e.updateDataModel, i = this.#i.get(t);
|
|
887
1594
|
if (!i) return;
|
|
888
1595
|
let a = { ...i.dataModel.value };
|
|
889
|
-
!n || n === "/" ? i.dataModel.value = r ?? {} : (
|
|
1596
|
+
!n || n === "/" ? i.dataModel.value = r ?? {} : (R(a, n, r), i.dataModel.value = a);
|
|
890
1597
|
}
|
|
891
1598
|
#d(e) {
|
|
892
1599
|
let { surfaceId: t } = e.deleteSurface, n = this.#i.get(t);
|
|
@@ -901,7 +1608,7 @@ var z = class {
|
|
|
901
1608
|
let i = t.get(n);
|
|
902
1609
|
if (i) for (let t of r) {
|
|
903
1610
|
let n = u(() => {
|
|
904
|
-
let n = e.dataModel.value, r =
|
|
1611
|
+
let n = e.dataModel.value, r = L(n, t.path);
|
|
905
1612
|
r !== void 0 && (t.property === "textContent" ? i.textContent = String(r) : t.property === "src" || t.property === "alt" || t.property.startsWith("aria-") ? i.setAttribute(t.property, String(r)) : i[t.property] = r);
|
|
906
1613
|
});
|
|
907
1614
|
e.bindingDisposers.push(n);
|
|
@@ -913,7 +1620,7 @@ var z = class {
|
|
|
913
1620
|
e.actionDisposer = this.#e.bus.on((e) => e.type.startsWith(t), (t) => {
|
|
914
1621
|
let n = t.type.split(":");
|
|
915
1622
|
if (n.length < 4) return;
|
|
916
|
-
let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ?
|
|
1623
|
+
let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ? ge(a, e.dataModel.value) : void 0;
|
|
917
1624
|
this.#t({ action: {
|
|
918
1625
|
surfaceId: e.surfaceId,
|
|
919
1626
|
sourceComponentId: r,
|
|
@@ -944,13 +1651,13 @@ var z = class {
|
|
|
944
1651
|
for (let e of this.#i.keys()) this.#d({ deleteSurface: { surfaceId: e } });
|
|
945
1652
|
}
|
|
946
1653
|
};
|
|
947
|
-
function
|
|
1654
|
+
function ge(e, t) {
|
|
948
1655
|
let n = {};
|
|
949
|
-
for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] =
|
|
1656
|
+
for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] = L(t, i.path) : n[r] = i;
|
|
950
1657
|
return n;
|
|
951
1658
|
}
|
|
952
1659
|
/** A2UI properties that map to HTML attributes on the rendered element. */
|
|
953
|
-
var
|
|
1660
|
+
var _e = [
|
|
954
1661
|
"variant",
|
|
955
1662
|
"placeholder",
|
|
956
1663
|
"name",
|
|
@@ -963,8 +1670,8 @@ var ge = [
|
|
|
963
1670
|
"fit",
|
|
964
1671
|
"style",
|
|
965
1672
|
"intent"
|
|
966
|
-
],
|
|
967
|
-
function
|
|
1673
|
+
], ve = ["value"];
|
|
1674
|
+
function ye(e, t, n, r) {
|
|
968
1675
|
let i = /* @__PURE__ */ new Map();
|
|
969
1676
|
for (let t of e) i.set(t.id, t);
|
|
970
1677
|
let a = /* @__PURE__ */ new Map();
|
|
@@ -975,9 +1682,9 @@ function ve(e, t, n, r) {
|
|
|
975
1682
|
targetId: e
|
|
976
1683
|
});
|
|
977
1684
|
for (let [e, s] of a) if (!i.has(e)) {
|
|
978
|
-
let i =
|
|
1685
|
+
let i = be(e, t);
|
|
979
1686
|
if (i) {
|
|
980
|
-
let t =
|
|
1687
|
+
let t = P([s], {
|
|
981
1688
|
surfaceId: n,
|
|
982
1689
|
rootId: e,
|
|
983
1690
|
registry: r
|
|
@@ -993,7 +1700,7 @@ function ve(e, t, n, r) {
|
|
|
993
1700
|
let a = i.get(e);
|
|
994
1701
|
if (a) {
|
|
995
1702
|
if (s.component !== a.component) {
|
|
996
|
-
let i =
|
|
1703
|
+
let i = P(xe(e, t), {
|
|
997
1704
|
surfaceId: n,
|
|
998
1705
|
rootId: e,
|
|
999
1706
|
registry: r
|
|
@@ -1006,7 +1713,7 @@ function ve(e, t, n, r) {
|
|
|
1006
1713
|
continue;
|
|
1007
1714
|
}
|
|
1008
1715
|
if (JSON.stringify(a.children ?? a.child ?? []) !== JSON.stringify(s.children ?? s.child ?? [])) {
|
|
1009
|
-
let i =
|
|
1716
|
+
let i = P(xe(e, t), {
|
|
1010
1717
|
surfaceId: n,
|
|
1011
1718
|
rootId: e,
|
|
1012
1719
|
registry: r
|
|
@@ -1036,7 +1743,7 @@ function ve(e, t, n, r) {
|
|
|
1036
1743
|
targetId: e,
|
|
1037
1744
|
name: "disabled"
|
|
1038
1745
|
}));
|
|
1039
|
-
for (let t of
|
|
1746
|
+
for (let t of _e) {
|
|
1040
1747
|
let n = a[t], r = s[t];
|
|
1041
1748
|
r !== n && (r == null || r === !1 ? o.push({
|
|
1042
1749
|
type: "remove-attribute",
|
|
@@ -1049,7 +1756,7 @@ function ve(e, t, n, r) {
|
|
|
1049
1756
|
value: String(r)
|
|
1050
1757
|
}));
|
|
1051
1758
|
}
|
|
1052
|
-
for (let t of
|
|
1759
|
+
for (let t of ve) {
|
|
1053
1760
|
let n = a[t], r = s[t];
|
|
1054
1761
|
r !== n && r !== void 0 && o.push({
|
|
1055
1762
|
type: "set-property",
|
|
@@ -1062,11 +1769,11 @@ function ve(e, t, n, r) {
|
|
|
1062
1769
|
}
|
|
1063
1770
|
return o;
|
|
1064
1771
|
}
|
|
1065
|
-
function
|
|
1772
|
+
function be(e, t) {
|
|
1066
1773
|
for (let n of t) if (n.children?.includes(e) || n.child === e) return n.id;
|
|
1067
1774
|
return null;
|
|
1068
1775
|
}
|
|
1069
|
-
function
|
|
1776
|
+
function xe(e, t) {
|
|
1070
1777
|
let n = /* @__PURE__ */ new Map();
|
|
1071
1778
|
for (let e of t) n.set(e.id, e);
|
|
1072
1779
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
@@ -1081,14 +1788,14 @@ function B(e, t) {
|
|
|
1081
1788
|
}
|
|
1082
1789
|
return a(e), r;
|
|
1083
1790
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return new
|
|
1791
|
+
function Se(e, t, n) {
|
|
1792
|
+
return new B(e, t, void 0, n);
|
|
1086
1793
|
}
|
|
1087
1794
|
var V = class {
|
|
1088
1795
|
#e;
|
|
1089
1796
|
#t;
|
|
1090
1797
|
constructor(e, t) {
|
|
1091
|
-
this.#t = t ?? {}, this.#e = new
|
|
1798
|
+
this.#t = t ?? {}, this.#e = new B(e, (e) => {
|
|
1092
1799
|
this.#t.onClientMessage?.(e);
|
|
1093
1800
|
}, (e, t) => {
|
|
1094
1801
|
this.#t.onRender?.(e, t);
|
|
@@ -1116,7 +1823,7 @@ var V = class {
|
|
|
1116
1823
|
this.#e.handleMessage(n, t);
|
|
1117
1824
|
}
|
|
1118
1825
|
#n(e) {
|
|
1119
|
-
let t = this.#t.registry?.getSupportedTypes() ??
|
|
1826
|
+
let t = this.#t.registry?.getSupportedTypes() ?? N(), n = { catalog: {
|
|
1120
1827
|
...e ? { surfaceId: e } : {},
|
|
1121
1828
|
supportedTypes: [...t],
|
|
1122
1829
|
version: this.#t.version ?? "0.9"
|
|
@@ -1141,7 +1848,7 @@ var V = class {
|
|
|
1141
1848
|
};
|
|
1142
1849
|
return { updateComponents: {
|
|
1143
1850
|
surfaceId: n,
|
|
1144
|
-
components:
|
|
1851
|
+
components: pe(e.root, r)
|
|
1145
1852
|
} };
|
|
1146
1853
|
}
|
|
1147
1854
|
/**
|
|
@@ -1163,16 +1870,757 @@ var V = class {
|
|
|
1163
1870
|
* Returns the list of A2UI component types supported by this adapter.
|
|
1164
1871
|
*/
|
|
1165
1872
|
getSupportedTypes() {
|
|
1166
|
-
return this.#t.registry?.getSupportedTypes() ??
|
|
1873
|
+
return this.#t.registry?.getSupportedTypes() ?? N();
|
|
1167
1874
|
}
|
|
1168
1875
|
destroy() {
|
|
1169
1876
|
this.#e.destroy();
|
|
1170
1877
|
}
|
|
1171
1878
|
};
|
|
1172
|
-
function
|
|
1879
|
+
function Ce(e, t) {
|
|
1173
1880
|
return new V(e, t);
|
|
1174
1881
|
}
|
|
1175
|
-
|
|
1882
|
+
/**
|
|
1883
|
+
* A2UI Composition Map
|
|
1884
|
+
*
|
|
1885
|
+
* Bridge between abstract A2UI schema types and native-ui primitives.
|
|
1886
|
+
* Sits above the Component Map — while the Component Map handles 1:1
|
|
1887
|
+
* mappings (A2UI type → native tag), the Composition Map handles
|
|
1888
|
+
* complex types that require assembling multiple primitives into a
|
|
1889
|
+
* coordinated template with prop delegation, state projection,
|
|
1890
|
+
* and event bubbling.
|
|
1891
|
+
*
|
|
1892
|
+
* The `CompositionRegistry` class provides a mutable registry with
|
|
1893
|
+
* change tracking via a signal. The default singleton
|
|
1894
|
+
* (`defaultCompositionRegistry`) preserves backward compatibility.
|
|
1895
|
+
*/
|
|
1896
|
+
var we = class e {
|
|
1897
|
+
#e = /* @__PURE__ */ new Map();
|
|
1898
|
+
#t;
|
|
1899
|
+
constructor(e) {
|
|
1900
|
+
this.#t = d(0);
|
|
1901
|
+
for (let t of e) this.#e.set(t.a2uiType, t);
|
|
1902
|
+
}
|
|
1903
|
+
get version() {
|
|
1904
|
+
return this.#t;
|
|
1905
|
+
}
|
|
1906
|
+
get(e) {
|
|
1907
|
+
return this.#e.get(e);
|
|
1908
|
+
}
|
|
1909
|
+
has(e) {
|
|
1910
|
+
return this.#e.has(e);
|
|
1911
|
+
}
|
|
1912
|
+
get size() {
|
|
1913
|
+
return this.#e.size;
|
|
1914
|
+
}
|
|
1915
|
+
keys() {
|
|
1916
|
+
return this.#e.keys();
|
|
1917
|
+
}
|
|
1918
|
+
values() {
|
|
1919
|
+
return this.#e.values();
|
|
1920
|
+
}
|
|
1921
|
+
add(e) {
|
|
1922
|
+
this.#e.set(e.a2uiType, e), this.#t.value++;
|
|
1923
|
+
}
|
|
1924
|
+
remove(e) {
|
|
1925
|
+
this.#e.delete(e), this.#t.value++;
|
|
1926
|
+
}
|
|
1927
|
+
resolveStrategy(e, t) {
|
|
1928
|
+
return this.#e.has(e) ? "composition" : t.has(e) ? "direct" : "unknown";
|
|
1929
|
+
}
|
|
1930
|
+
toJSON() {
|
|
1931
|
+
return { compositions: Array.from(this.#e.values()) };
|
|
1932
|
+
}
|
|
1933
|
+
static fromJSON(t) {
|
|
1934
|
+
return new e(t.compositions);
|
|
1935
|
+
}
|
|
1936
|
+
getAllGaps() {
|
|
1937
|
+
let e = [];
|
|
1938
|
+
for (let t of this.#e.values()) for (let n of t.gaps ?? []) e.push({
|
|
1939
|
+
a2uiType: t.a2uiType,
|
|
1940
|
+
gap: n
|
|
1941
|
+
});
|
|
1942
|
+
return e;
|
|
1943
|
+
}
|
|
1944
|
+
coverageReport(e, t) {
|
|
1945
|
+
let n = [], r = [], i = [];
|
|
1946
|
+
for (let a of t) {
|
|
1947
|
+
let t = this.resolveStrategy(a, e);
|
|
1948
|
+
t === "direct" ? n.push(a) : t === "composition" ? r.push(a) : i.push(a);
|
|
1949
|
+
}
|
|
1950
|
+
return {
|
|
1951
|
+
direct: n,
|
|
1952
|
+
composed: r,
|
|
1953
|
+
unresolved: i,
|
|
1954
|
+
gapCount: this.getAllGaps().length
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
};
|
|
1958
|
+
function Te(e, t, n) {
|
|
1959
|
+
let r = t.resolveStrategy(e, n);
|
|
1960
|
+
return r === "direct" ? {
|
|
1961
|
+
strategy: "direct",
|
|
1962
|
+
mapping: n.get(e)
|
|
1963
|
+
} : r === "composition" ? {
|
|
1964
|
+
strategy: "composition",
|
|
1965
|
+
spec: t.get(e)
|
|
1966
|
+
} : {
|
|
1967
|
+
strategy: "unknown",
|
|
1968
|
+
type: e
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
const Ee = new we([
|
|
1972
|
+
{
|
|
1973
|
+
a2uiType: "SearchInput",
|
|
1974
|
+
description: "Text field with integrated clear button for search workflows.",
|
|
1975
|
+
mappingStatus: "none",
|
|
1976
|
+
template: {
|
|
1977
|
+
role: "root",
|
|
1978
|
+
primitiveType: "Row",
|
|
1979
|
+
staticProps: {
|
|
1980
|
+
gap: "sm",
|
|
1981
|
+
align: "center"
|
|
1982
|
+
},
|
|
1983
|
+
children: [{
|
|
1984
|
+
role: "search-input",
|
|
1985
|
+
primitiveType: "TextField"
|
|
1986
|
+
}, {
|
|
1987
|
+
role: "clear-button",
|
|
1988
|
+
primitiveType: "Button",
|
|
1989
|
+
staticProps: { variant: "ghost" }
|
|
1990
|
+
}]
|
|
1991
|
+
},
|
|
1992
|
+
propDelegation: [{
|
|
1993
|
+
from: "placeholder",
|
|
1994
|
+
toRole: "search-input",
|
|
1995
|
+
toProp: "placeholder",
|
|
1996
|
+
transform: "direct"
|
|
1997
|
+
}, {
|
|
1998
|
+
from: "value",
|
|
1999
|
+
toRole: "search-input",
|
|
2000
|
+
toProp: "value",
|
|
2001
|
+
transform: "direct"
|
|
2002
|
+
}],
|
|
2003
|
+
stateProjection: [
|
|
2004
|
+
{
|
|
2005
|
+
compositeState: "idle",
|
|
2006
|
+
childStates: { "search-input": "enabled" },
|
|
2007
|
+
description: "Default state, input is editable."
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
compositeState: "searching",
|
|
2011
|
+
childStates: { "search-input": "disabled" },
|
|
2012
|
+
description: "Search in progress, input is disabled."
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
compositeState: "empty",
|
|
2016
|
+
childStates: { "clear-button": "hidden" },
|
|
2017
|
+
description: "No search value, clear button is hidden."
|
|
2018
|
+
}
|
|
2019
|
+
],
|
|
2020
|
+
eventBubbling: [{
|
|
2021
|
+
fromRole: "search-input",
|
|
2022
|
+
fromEvent: "native:input",
|
|
2023
|
+
toAction: "onSearch",
|
|
2024
|
+
payloadStrategy: "passthrough"
|
|
2025
|
+
}, {
|
|
2026
|
+
fromRole: "clear-button",
|
|
2027
|
+
fromEvent: "native:press",
|
|
2028
|
+
toAction: "onClear",
|
|
2029
|
+
payloadStrategy: "passthrough"
|
|
2030
|
+
}],
|
|
2031
|
+
requiredStates: [
|
|
2032
|
+
"idle",
|
|
2033
|
+
"searching",
|
|
2034
|
+
"empty"
|
|
2035
|
+
],
|
|
2036
|
+
gaps: [{
|
|
2037
|
+
need: "Debounce behavior",
|
|
2038
|
+
impact: "No built-in debounce on search input",
|
|
2039
|
+
workaround: "Consumer adds debounce in event handler"
|
|
2040
|
+
}]
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
a2uiType: "ActionBar",
|
|
2044
|
+
description: "Horizontal bar of action buttons, typically used at the bottom of a card or panel.",
|
|
2045
|
+
mappingStatus: "none",
|
|
2046
|
+
template: {
|
|
2047
|
+
role: "root",
|
|
2048
|
+
primitiveType: "Row",
|
|
2049
|
+
staticProps: {
|
|
2050
|
+
gap: "sm",
|
|
2051
|
+
justify: "end",
|
|
2052
|
+
align: "center"
|
|
2053
|
+
},
|
|
2054
|
+
children: [{
|
|
2055
|
+
role: "action-button",
|
|
2056
|
+
primitiveType: "Button",
|
|
2057
|
+
repeatFrom: "actions"
|
|
2058
|
+
}]
|
|
2059
|
+
},
|
|
2060
|
+
propDelegation: [
|
|
2061
|
+
{
|
|
2062
|
+
from: "actions[n].label",
|
|
2063
|
+
toRole: "action-button",
|
|
2064
|
+
toProp: "label",
|
|
2065
|
+
transform: "direct"
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
from: "actions[n].variant",
|
|
2069
|
+
toRole: "action-button",
|
|
2070
|
+
toProp: "variant",
|
|
2071
|
+
transform: "variantMap"
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
from: "actions[n].disabled",
|
|
2075
|
+
toRole: "action-button",
|
|
2076
|
+
toProp: "disabled",
|
|
2077
|
+
transform: "boolean"
|
|
2078
|
+
}
|
|
2079
|
+
],
|
|
2080
|
+
stateProjection: [{
|
|
2081
|
+
compositeState: "idle",
|
|
2082
|
+
childStates: { "action-button": "enabled" },
|
|
2083
|
+
description: "All actions are available."
|
|
2084
|
+
}, {
|
|
2085
|
+
compositeState: "submitting",
|
|
2086
|
+
childStates: { "action-button": "disabled" },
|
|
2087
|
+
description: "Submission in progress, all buttons disabled."
|
|
2088
|
+
}],
|
|
2089
|
+
eventBubbling: [{
|
|
2090
|
+
fromRole: "action-button",
|
|
2091
|
+
fromEvent: "native:press",
|
|
2092
|
+
toAction: "onAction",
|
|
2093
|
+
payloadStrategy: "index"
|
|
2094
|
+
}],
|
|
2095
|
+
requiredStates: ["idle", "submitting"],
|
|
2096
|
+
gaps: []
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
a2uiType: "EmptyState",
|
|
2100
|
+
description: "Placeholder shown when a list or area has no content, with optional icon, message, and action.",
|
|
2101
|
+
mappingStatus: "none",
|
|
2102
|
+
template: {
|
|
2103
|
+
role: "root",
|
|
2104
|
+
primitiveType: "Column",
|
|
2105
|
+
staticProps: {
|
|
2106
|
+
gap: "md",
|
|
2107
|
+
align: "center",
|
|
2108
|
+
justify: "center"
|
|
2109
|
+
},
|
|
2110
|
+
children: [
|
|
2111
|
+
{
|
|
2112
|
+
role: "empty-icon",
|
|
2113
|
+
primitiveType: "Icon",
|
|
2114
|
+
staticProps: { name: "magnifying-glass" }
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
role: "empty-title",
|
|
2118
|
+
primitiveType: "Text",
|
|
2119
|
+
staticProps: { variant: "h3" }
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
role: "empty-message",
|
|
2123
|
+
primitiveType: "Text",
|
|
2124
|
+
staticProps: { variant: "body" }
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
role: "empty-action",
|
|
2128
|
+
primitiveType: "Button"
|
|
2129
|
+
}
|
|
2130
|
+
]
|
|
2131
|
+
},
|
|
2132
|
+
propDelegation: [
|
|
2133
|
+
{
|
|
2134
|
+
from: "title",
|
|
2135
|
+
toRole: "empty-title",
|
|
2136
|
+
toProp: "textContent",
|
|
2137
|
+
transform: "direct"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
from: "message",
|
|
2141
|
+
toRole: "empty-message",
|
|
2142
|
+
toProp: "textContent",
|
|
2143
|
+
transform: "direct"
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
from: "icon",
|
|
2147
|
+
toRole: "empty-icon",
|
|
2148
|
+
toProp: "name",
|
|
2149
|
+
transform: "direct"
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
from: "actionLabel",
|
|
2153
|
+
toRole: "empty-action",
|
|
2154
|
+
toProp: "label",
|
|
2155
|
+
transform: "direct"
|
|
2156
|
+
}
|
|
2157
|
+
],
|
|
2158
|
+
stateProjection: [{
|
|
2159
|
+
compositeState: "visible",
|
|
2160
|
+
childStates: { root: "visible" },
|
|
2161
|
+
description: "Empty state is displayed."
|
|
2162
|
+
}, {
|
|
2163
|
+
compositeState: "hidden",
|
|
2164
|
+
childStates: { root: "hidden" },
|
|
2165
|
+
description: "Content is present, empty state is hidden."
|
|
2166
|
+
}],
|
|
2167
|
+
eventBubbling: [{
|
|
2168
|
+
fromRole: "empty-action",
|
|
2169
|
+
fromEvent: "native:press",
|
|
2170
|
+
toAction: "onAction",
|
|
2171
|
+
payloadStrategy: "passthrough"
|
|
2172
|
+
}],
|
|
2173
|
+
requiredStates: ["visible", "hidden"],
|
|
2174
|
+
gaps: []
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
a2uiType: "PageHeader",
|
|
2178
|
+
description: "Top-of-page header with title, optional breadcrumb, and action buttons.",
|
|
2179
|
+
mappingStatus: "none",
|
|
2180
|
+
template: {
|
|
2181
|
+
role: "root",
|
|
2182
|
+
primitiveType: "Row",
|
|
2183
|
+
staticProps: {
|
|
2184
|
+
justify: "space-between",
|
|
2185
|
+
align: "center"
|
|
2186
|
+
},
|
|
2187
|
+
children: [{
|
|
2188
|
+
role: "title-area",
|
|
2189
|
+
primitiveType: "Column",
|
|
2190
|
+
children: [{
|
|
2191
|
+
role: "title-text",
|
|
2192
|
+
primitiveType: "Text",
|
|
2193
|
+
staticProps: { variant: "h1" }
|
|
2194
|
+
}, {
|
|
2195
|
+
role: "breadcrumb",
|
|
2196
|
+
primitiveType: "Breadcrumb"
|
|
2197
|
+
}]
|
|
2198
|
+
}, {
|
|
2199
|
+
role: "actions-area",
|
|
2200
|
+
primitiveType: "Row",
|
|
2201
|
+
staticProps: { gap: "sm" },
|
|
2202
|
+
children: [{
|
|
2203
|
+
role: "action-button",
|
|
2204
|
+
primitiveType: "Button",
|
|
2205
|
+
repeatFrom: "actions"
|
|
2206
|
+
}]
|
|
2207
|
+
}]
|
|
2208
|
+
},
|
|
2209
|
+
propDelegation: [
|
|
2210
|
+
{
|
|
2211
|
+
from: "title",
|
|
2212
|
+
toRole: "title-text",
|
|
2213
|
+
toProp: "textContent",
|
|
2214
|
+
transform: "direct"
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
from: "breadcrumbs",
|
|
2218
|
+
toRole: "breadcrumb",
|
|
2219
|
+
toProp: "children",
|
|
2220
|
+
transform: "direct"
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
from: "actions[n].label",
|
|
2224
|
+
toRole: "action-button",
|
|
2225
|
+
toProp: "label",
|
|
2226
|
+
transform: "direct"
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
from: "actions[n].variant",
|
|
2230
|
+
toRole: "action-button",
|
|
2231
|
+
toProp: "variant",
|
|
2232
|
+
transform: "variantMap"
|
|
2233
|
+
}
|
|
2234
|
+
],
|
|
2235
|
+
stateProjection: [{
|
|
2236
|
+
compositeState: "visible",
|
|
2237
|
+
childStates: {
|
|
2238
|
+
root: "visible",
|
|
2239
|
+
"action-button": "enabled"
|
|
2240
|
+
},
|
|
2241
|
+
description: "Page header is visible, actions are enabled."
|
|
2242
|
+
}, {
|
|
2243
|
+
compositeState: "loading",
|
|
2244
|
+
childStates: { "action-button": "disabled" },
|
|
2245
|
+
description: "Page is loading, action buttons are disabled."
|
|
2246
|
+
}],
|
|
2247
|
+
eventBubbling: [{
|
|
2248
|
+
fromRole: "action-button",
|
|
2249
|
+
fromEvent: "native:press",
|
|
2250
|
+
toAction: "onAction",
|
|
2251
|
+
payloadStrategy: "index"
|
|
2252
|
+
}],
|
|
2253
|
+
requiredStates: ["visible", "loading"],
|
|
2254
|
+
gaps: []
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
a2uiType: "ConfirmationDialog",
|
|
2258
|
+
description: "Modal dialog asking the user to confirm or cancel a destructive or important action.",
|
|
2259
|
+
mappingStatus: "none",
|
|
2260
|
+
template: {
|
|
2261
|
+
role: "root",
|
|
2262
|
+
primitiveType: "Modal",
|
|
2263
|
+
children: [{
|
|
2264
|
+
role: "content",
|
|
2265
|
+
primitiveType: "Column",
|
|
2266
|
+
staticProps: { gap: "md" },
|
|
2267
|
+
children: [
|
|
2268
|
+
{
|
|
2269
|
+
role: "title",
|
|
2270
|
+
primitiveType: "Text",
|
|
2271
|
+
staticProps: { variant: "h3" }
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
role: "message",
|
|
2275
|
+
primitiveType: "Text",
|
|
2276
|
+
staticProps: { variant: "body" }
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
role: "button-row",
|
|
2280
|
+
primitiveType: "Row",
|
|
2281
|
+
staticProps: {
|
|
2282
|
+
gap: "sm",
|
|
2283
|
+
justify: "end"
|
|
2284
|
+
},
|
|
2285
|
+
children: [{
|
|
2286
|
+
role: "cancel-button",
|
|
2287
|
+
primitiveType: "Button",
|
|
2288
|
+
staticProps: { variant: "ghost" }
|
|
2289
|
+
}, {
|
|
2290
|
+
role: "confirm-button",
|
|
2291
|
+
primitiveType: "Button",
|
|
2292
|
+
staticProps: { variant: "primary" }
|
|
2293
|
+
}]
|
|
2294
|
+
}
|
|
2295
|
+
]
|
|
2296
|
+
}]
|
|
2297
|
+
},
|
|
2298
|
+
propDelegation: [
|
|
2299
|
+
{
|
|
2300
|
+
from: "title",
|
|
2301
|
+
toRole: "title",
|
|
2302
|
+
toProp: "textContent",
|
|
2303
|
+
transform: "direct"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
from: "message",
|
|
2307
|
+
toRole: "message",
|
|
2308
|
+
toProp: "textContent",
|
|
2309
|
+
transform: "direct"
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
from: "confirmLabel",
|
|
2313
|
+
toRole: "confirm-button",
|
|
2314
|
+
toProp: "label",
|
|
2315
|
+
transform: "direct"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
from: "cancelLabel",
|
|
2319
|
+
toRole: "cancel-button",
|
|
2320
|
+
toProp: "label",
|
|
2321
|
+
transform: "direct"
|
|
2322
|
+
}
|
|
2323
|
+
],
|
|
2324
|
+
stateProjection: [
|
|
2325
|
+
{
|
|
2326
|
+
compositeState: "hidden",
|
|
2327
|
+
childStates: { root: "closed" },
|
|
2328
|
+
description: "Dialog is not visible."
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
compositeState: "visible",
|
|
2332
|
+
childStates: {
|
|
2333
|
+
root: "open",
|
|
2334
|
+
"confirm-button": "enabled",
|
|
2335
|
+
"cancel-button": "enabled"
|
|
2336
|
+
},
|
|
2337
|
+
description: "Dialog is open, buttons are interactive."
|
|
2338
|
+
},
|
|
2339
|
+
{
|
|
2340
|
+
compositeState: "submitting",
|
|
2341
|
+
childStates: {
|
|
2342
|
+
"confirm-button": "disabled",
|
|
2343
|
+
"cancel-button": "disabled"
|
|
2344
|
+
},
|
|
2345
|
+
description: "Confirmation in progress, buttons are disabled."
|
|
2346
|
+
}
|
|
2347
|
+
],
|
|
2348
|
+
eventBubbling: [
|
|
2349
|
+
{
|
|
2350
|
+
fromRole: "confirm-button",
|
|
2351
|
+
fromEvent: "native:press",
|
|
2352
|
+
toAction: "onConfirm",
|
|
2353
|
+
payloadStrategy: "passthrough"
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
fromRole: "cancel-button",
|
|
2357
|
+
fromEvent: "native:press",
|
|
2358
|
+
toAction: "onCancel",
|
|
2359
|
+
payloadStrategy: "passthrough"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
fromRole: "root",
|
|
2363
|
+
fromEvent: "native:dismiss",
|
|
2364
|
+
toAction: "onDismiss",
|
|
2365
|
+
payloadStrategy: "passthrough"
|
|
2366
|
+
}
|
|
2367
|
+
],
|
|
2368
|
+
requiredStates: [
|
|
2369
|
+
"hidden",
|
|
2370
|
+
"visible",
|
|
2371
|
+
"submitting"
|
|
2372
|
+
],
|
|
2373
|
+
gaps: [{
|
|
2374
|
+
need: "Modal open/close method",
|
|
2375
|
+
impact: "No declarative open/close attribute on n-dialog — requires imperative showModal()/close()",
|
|
2376
|
+
workaround: "Consumer calls element.showModal() and element.close() directly"
|
|
2377
|
+
}]
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
a2uiType: "ErrorBanner",
|
|
2381
|
+
description: "Inline error banner with icon, message text, and optional action button.",
|
|
2382
|
+
mappingStatus: "none",
|
|
2383
|
+
template: {
|
|
2384
|
+
role: "root",
|
|
2385
|
+
primitiveType: "Row",
|
|
2386
|
+
staticProps: {
|
|
2387
|
+
gap: "sm",
|
|
2388
|
+
align: "center"
|
|
2389
|
+
},
|
|
2390
|
+
children: [
|
|
2391
|
+
{
|
|
2392
|
+
role: "error-icon",
|
|
2393
|
+
primitiveType: "Icon",
|
|
2394
|
+
staticProps: { name: "warning" }
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
role: "error-message",
|
|
2398
|
+
primitiveType: "Text",
|
|
2399
|
+
staticProps: { variant: "body" }
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
role: "action-button",
|
|
2403
|
+
primitiveType: "Button",
|
|
2404
|
+
staticProps: { variant: "ghost" }
|
|
2405
|
+
}
|
|
2406
|
+
]
|
|
2407
|
+
},
|
|
2408
|
+
propDelegation: [
|
|
2409
|
+
{
|
|
2410
|
+
from: "message",
|
|
2411
|
+
toRole: "error-message",
|
|
2412
|
+
toProp: "textContent",
|
|
2413
|
+
transform: "direct"
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
from: "actionLabel",
|
|
2417
|
+
toRole: "action-button",
|
|
2418
|
+
toProp: "label",
|
|
2419
|
+
transform: "direct"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
from: "icon",
|
|
2423
|
+
toRole: "error-icon",
|
|
2424
|
+
toProp: "name",
|
|
2425
|
+
transform: "direct"
|
|
2426
|
+
}
|
|
2427
|
+
],
|
|
2428
|
+
stateProjection: [{
|
|
2429
|
+
compositeState: "visible",
|
|
2430
|
+
childStates: { root: "visible" },
|
|
2431
|
+
description: "Error banner is displayed."
|
|
2432
|
+
}, {
|
|
2433
|
+
compositeState: "hidden",
|
|
2434
|
+
childStates: { root: "hidden" },
|
|
2435
|
+
description: "Error banner is not displayed."
|
|
2436
|
+
}],
|
|
2437
|
+
eventBubbling: [{
|
|
2438
|
+
fromRole: "action-button",
|
|
2439
|
+
fromEvent: "native:press",
|
|
2440
|
+
toAction: "onAction",
|
|
2441
|
+
payloadStrategy: "passthrough"
|
|
2442
|
+
}],
|
|
2443
|
+
requiredStates: ["visible", "hidden"],
|
|
2444
|
+
gaps: []
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
a2uiType: "SuccessToast",
|
|
2448
|
+
description: "Transient success notification toast with auto-dismiss.",
|
|
2449
|
+
mappingStatus: "partial",
|
|
2450
|
+
template: {
|
|
2451
|
+
role: "root",
|
|
2452
|
+
primitiveType: "Toast",
|
|
2453
|
+
staticProps: { intent: "success" }
|
|
2454
|
+
},
|
|
2455
|
+
propDelegation: [{
|
|
2456
|
+
from: "message",
|
|
2457
|
+
toRole: "root",
|
|
2458
|
+
toProp: "message",
|
|
2459
|
+
transform: "direct"
|
|
2460
|
+
}],
|
|
2461
|
+
stateProjection: [{
|
|
2462
|
+
compositeState: "visible",
|
|
2463
|
+
childStates: { root: "visible" },
|
|
2464
|
+
description: "Toast is shown."
|
|
2465
|
+
}, {
|
|
2466
|
+
compositeState: "hidden",
|
|
2467
|
+
childStates: { root: "hidden" },
|
|
2468
|
+
description: "Toast is dismissed."
|
|
2469
|
+
}],
|
|
2470
|
+
eventBubbling: [{
|
|
2471
|
+
fromRole: "root",
|
|
2472
|
+
fromEvent: "native:dismiss",
|
|
2473
|
+
toAction: "onDismiss",
|
|
2474
|
+
payloadStrategy: "passthrough"
|
|
2475
|
+
}],
|
|
2476
|
+
requiredStates: ["visible", "hidden"],
|
|
2477
|
+
gaps: []
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
a2uiType: "ErrorDialog",
|
|
2481
|
+
description: "Modal dialog displaying an error with icon, title, message, and action buttons.",
|
|
2482
|
+
mappingStatus: "none",
|
|
2483
|
+
template: {
|
|
2484
|
+
role: "root",
|
|
2485
|
+
primitiveType: "Modal",
|
|
2486
|
+
children: [{
|
|
2487
|
+
role: "content",
|
|
2488
|
+
primitiveType: "Column",
|
|
2489
|
+
staticProps: { gap: "md" },
|
|
2490
|
+
children: [
|
|
2491
|
+
{
|
|
2492
|
+
role: "error-icon",
|
|
2493
|
+
primitiveType: "Icon",
|
|
2494
|
+
staticProps: { name: "warning-circle" }
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
role: "title",
|
|
2498
|
+
primitiveType: "Text",
|
|
2499
|
+
staticProps: { variant: "h3" }
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
role: "message",
|
|
2503
|
+
primitiveType: "Text",
|
|
2504
|
+
staticProps: { variant: "body" }
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
role: "button-row",
|
|
2508
|
+
primitiveType: "Row",
|
|
2509
|
+
staticProps: {
|
|
2510
|
+
gap: "sm",
|
|
2511
|
+
justify: "end"
|
|
2512
|
+
},
|
|
2513
|
+
children: [{
|
|
2514
|
+
role: "action-button",
|
|
2515
|
+
primitiveType: "Button",
|
|
2516
|
+
repeatFrom: "actions"
|
|
2517
|
+
}]
|
|
2518
|
+
}
|
|
2519
|
+
]
|
|
2520
|
+
}]
|
|
2521
|
+
},
|
|
2522
|
+
propDelegation: [
|
|
2523
|
+
{
|
|
2524
|
+
from: "title",
|
|
2525
|
+
toRole: "title",
|
|
2526
|
+
toProp: "textContent",
|
|
2527
|
+
transform: "direct"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
from: "message",
|
|
2531
|
+
toRole: "message",
|
|
2532
|
+
toProp: "textContent",
|
|
2533
|
+
transform: "direct"
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
from: "actions[n].label",
|
|
2537
|
+
toRole: "action-button",
|
|
2538
|
+
toProp: "label",
|
|
2539
|
+
transform: "direct"
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
from: "actions[n].variant",
|
|
2543
|
+
toRole: "action-button",
|
|
2544
|
+
toProp: "variant",
|
|
2545
|
+
transform: "variantMap"
|
|
2546
|
+
}
|
|
2547
|
+
],
|
|
2548
|
+
stateProjection: [
|
|
2549
|
+
{
|
|
2550
|
+
compositeState: "hidden",
|
|
2551
|
+
childStates: { root: "closed" },
|
|
2552
|
+
description: "Dialog is not visible."
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
compositeState: "visible",
|
|
2556
|
+
childStates: {
|
|
2557
|
+
root: "open",
|
|
2558
|
+
"action-button": "enabled"
|
|
2559
|
+
},
|
|
2560
|
+
description: "Dialog is open, action buttons are enabled."
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
compositeState: "submitting",
|
|
2564
|
+
childStates: { "action-button": "disabled" },
|
|
2565
|
+
description: "Action in progress, buttons are disabled."
|
|
2566
|
+
}
|
|
2567
|
+
],
|
|
2568
|
+
eventBubbling: [{
|
|
2569
|
+
fromRole: "action-button",
|
|
2570
|
+
fromEvent: "native:press",
|
|
2571
|
+
toAction: "onAction",
|
|
2572
|
+
payloadStrategy: "index"
|
|
2573
|
+
}, {
|
|
2574
|
+
fromRole: "root",
|
|
2575
|
+
fromEvent: "native:dismiss",
|
|
2576
|
+
toAction: "onDismiss",
|
|
2577
|
+
payloadStrategy: "passthrough"
|
|
2578
|
+
}],
|
|
2579
|
+
requiredStates: [
|
|
2580
|
+
"hidden",
|
|
2581
|
+
"visible",
|
|
2582
|
+
"submitting"
|
|
2583
|
+
],
|
|
2584
|
+
gaps: [{
|
|
2585
|
+
need: "Modal open/close method",
|
|
2586
|
+
impact: "No declarative open/close attribute on n-dialog — requires imperative showModal()/close()",
|
|
2587
|
+
workaround: "Consumer calls element.showModal() and element.close() directly"
|
|
2588
|
+
}]
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
a2uiType: "LoadingIndicator",
|
|
2592
|
+
description: "Progress indicator for loading states, maps to the native Progress primitive.",
|
|
2593
|
+
mappingStatus: "partial",
|
|
2594
|
+
template: {
|
|
2595
|
+
role: "root",
|
|
2596
|
+
primitiveType: "Progress"
|
|
2597
|
+
},
|
|
2598
|
+
propDelegation: [{
|
|
2599
|
+
from: "value",
|
|
2600
|
+
toRole: "root",
|
|
2601
|
+
toProp: "value",
|
|
2602
|
+
transform: "direct"
|
|
2603
|
+
}, {
|
|
2604
|
+
from: "max",
|
|
2605
|
+
toRole: "root",
|
|
2606
|
+
toProp: "max",
|
|
2607
|
+
transform: "direct"
|
|
2608
|
+
}],
|
|
2609
|
+
stateProjection: [{
|
|
2610
|
+
compositeState: "active",
|
|
2611
|
+
childStates: { root: "visible" },
|
|
2612
|
+
description: "Loading indicator is visible and active."
|
|
2613
|
+
}, {
|
|
2614
|
+
compositeState: "hidden",
|
|
2615
|
+
childStates: { root: "hidden" },
|
|
2616
|
+
description: "Loading is complete, indicator is hidden."
|
|
2617
|
+
}],
|
|
2618
|
+
eventBubbling: [],
|
|
2619
|
+
requiredStates: ["active", "hidden"],
|
|
2620
|
+
gaps: []
|
|
2621
|
+
}
|
|
2622
|
+
]), De = Ee;
|
|
2623
|
+
var Oe = class {
|
|
1176
2624
|
#e;
|
|
1177
2625
|
#t;
|
|
1178
2626
|
#n;
|
|
@@ -1237,7 +2685,7 @@ var Se = class {
|
|
|
1237
2685
|
this.#o = null, this.#i !== "closed" && this.connect();
|
|
1238
2686
|
}, n);
|
|
1239
2687
|
}
|
|
1240
|
-
},
|
|
2688
|
+
}, ke = class {
|
|
1241
2689
|
#e;
|
|
1242
2690
|
#t;
|
|
1243
2691
|
#n;
|
|
@@ -1297,13 +2745,13 @@ var Se = class {
|
|
|
1297
2745
|
this.#i !== e && (this.#i = e, this.#n.onStateChange?.(e));
|
|
1298
2746
|
}
|
|
1299
2747
|
};
|
|
1300
|
-
function
|
|
1301
|
-
return new
|
|
2748
|
+
function Ae(e, t, n) {
|
|
2749
|
+
return new Oe(e, t, n);
|
|
1302
2750
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return new
|
|
2751
|
+
function je(e, t, n) {
|
|
2752
|
+
return new ke(e, t, n);
|
|
1305
2753
|
}
|
|
1306
|
-
function
|
|
2754
|
+
function Me(e, t) {
|
|
1307
2755
|
e.use("a2ui", () => new V(e, t));
|
|
1308
2756
|
}
|
|
1309
2757
|
var H = new Set([
|
|
@@ -1317,7 +2765,7 @@ var H = new Set([
|
|
|
1317
2765
|
* Find top-level `{}` blocks using brace-counting with string-escape awareness.
|
|
1318
2766
|
* Same algorithm as the workbench's `#getEnvelopes()` method.
|
|
1319
2767
|
*/
|
|
1320
|
-
function
|
|
2768
|
+
function Ne(e) {
|
|
1321
2769
|
let t = [], n = 0, r = -1, i = !1, a = !1;
|
|
1322
2770
|
for (let o = 0; o < e.length; o++) {
|
|
1323
2771
|
let s = e[o];
|
|
@@ -1350,8 +2798,8 @@ function De(e) {
|
|
|
1350
2798
|
* const ext = linter(a2uiLinter);
|
|
1351
2799
|
* ```
|
|
1352
2800
|
*/
|
|
1353
|
-
function
|
|
1354
|
-
let t = e.state.doc.toString(), n = [], r =
|
|
2801
|
+
function Pe(e) {
|
|
2802
|
+
let t = e.state.doc.toString(), n = [], r = Ne(t), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = [], s = /* @__PURE__ */ new Map();
|
|
1355
2803
|
for (let e of r) {
|
|
1356
2804
|
let { from: t, to: r, text: c } = e, l;
|
|
1357
2805
|
try {
|
|
@@ -1452,7 +2900,7 @@ function Oe(e) {
|
|
|
1452
2900
|
}
|
|
1453
2901
|
return n;
|
|
1454
2902
|
}
|
|
1455
|
-
const
|
|
2903
|
+
const Fe = [
|
|
1456
2904
|
{
|
|
1457
2905
|
id: "general",
|
|
1458
2906
|
label: "General"
|
|
@@ -8862,7 +10310,7 @@ var W = [
|
|
|
8862
10310
|
"js",
|
|
8863
10311
|
"components",
|
|
8864
10312
|
"schema"
|
|
8865
|
-
],
|
|
10313
|
+
], Ie = {
|
|
8866
10314
|
"json-in": "IN",
|
|
8867
10315
|
"json-out": "OUT",
|
|
8868
10316
|
html: "HTML",
|
|
@@ -8870,7 +10318,7 @@ var W = [
|
|
|
8870
10318
|
js: "JS",
|
|
8871
10319
|
components: "UI",
|
|
8872
10320
|
schema: "SCHEMA"
|
|
8873
|
-
},
|
|
10321
|
+
}, Le = {
|
|
8874
10322
|
"json-in": "brackets-curly",
|
|
8875
10323
|
"json-out": "chat-circle-dots",
|
|
8876
10324
|
html: "code",
|
|
@@ -8878,21 +10326,21 @@ var W = [
|
|
|
8878
10326
|
js: "terminal",
|
|
8879
10327
|
components: "squares-four",
|
|
8880
10328
|
schema: "file-code"
|
|
8881
|
-
},
|
|
10329
|
+
}, Re = h.define(), ze = p.line({ class: "cm-a2ui-sent" }), Be = p.line({ class: "cm-a2ui-next" }), Ve = g.define({
|
|
8882
10330
|
create() {
|
|
8883
10331
|
return p.none;
|
|
8884
10332
|
},
|
|
8885
10333
|
update(e, t) {
|
|
8886
|
-
for (let e of t.effects) if (e.is(
|
|
10334
|
+
for (let e of t.effects) if (e.is(Re)) {
|
|
8887
10335
|
let n = t.state.doc, { sentUpToLine: r, nextFromLine: i, nextToLine: a } = e.value, o = [];
|
|
8888
|
-
for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(
|
|
8889
|
-
for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(
|
|
10336
|
+
for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(ze.range(n.line(e).from));
|
|
10337
|
+
for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(Be.range(n.line(e).from));
|
|
8890
10338
|
return p.set(o, !0);
|
|
8891
10339
|
}
|
|
8892
10340
|
return e;
|
|
8893
10341
|
},
|
|
8894
10342
|
provide: (e) => m.decorations.from(e)
|
|
8895
|
-
}),
|
|
10343
|
+
}), He = class extends i {
|
|
8896
10344
|
static observedAttributes = ["stream"];
|
|
8897
10345
|
#e = d("");
|
|
8898
10346
|
#t = d(0);
|
|
@@ -8920,7 +10368,7 @@ var W = [
|
|
|
8920
10368
|
#C = /* @__PURE__ */ new Map();
|
|
8921
10369
|
#w = /* @__PURE__ */ new Map();
|
|
8922
10370
|
#T = /* @__PURE__ */ new Map();
|
|
8923
|
-
#E =
|
|
10371
|
+
#E = A.clone();
|
|
8924
10372
|
#D = null;
|
|
8925
10373
|
#O = null;
|
|
8926
10374
|
#k = null;
|
|
@@ -8989,7 +10437,7 @@ var W = [
|
|
|
8989
10437
|
this.#m.value = r ? r + "\n\n" + n : n;
|
|
8990
10438
|
}), this.addEffect(() => {
|
|
8991
10439
|
let e = this.#s.value;
|
|
8992
|
-
this.#h && (this.#h.value = e ?
|
|
10440
|
+
this.#h && (this.#h.value = e ? Ue(e) : "");
|
|
8993
10441
|
}), this.addEffect(() => {
|
|
8994
10442
|
let e = this.#c.value;
|
|
8995
10443
|
this.#g && (typeof e == "object" && e && Object.keys(e).length > 0 ? this.#g.value = JSON.stringify(e, null, 2) : this.#g.value = "");
|
|
@@ -9002,7 +10450,7 @@ var W = [
|
|
|
9002
10450
|
i = n[t].startLine, a = n[t].endLine;
|
|
9003
10451
|
break;
|
|
9004
10452
|
}
|
|
9005
|
-
t.dispatch({ effects:
|
|
10453
|
+
t.dispatch({ effects: Re.of({
|
|
9006
10454
|
sentUpToLine: r,
|
|
9007
10455
|
nextFromLine: i,
|
|
9008
10456
|
nextToLine: a
|
|
@@ -9015,7 +10463,7 @@ var W = [
|
|
|
9015
10463
|
this.#A?.destroy(), this.#A = null, this.removeEventListener("native:present", this.#ve), this.removeEventListener("native:dismiss", this.#ye), this.#j?.destroy(), this.#j = null, this.#M = null, this.#N = null, this.#x?.removeEventListener("native:resize-end", this.#De), this.#S?.removeEventListener("pointerdown", this.#q), this.#S?.removeEventListener("dblclick", this.#X), document.removeEventListener("pointermove", this.#J), document.removeEventListener("pointerup", this.#Y), this.#P = null, this.#x = null, this.#S = null, this.#C.clear(), this.#w.clear(), this.#T.clear(), this.#I(), this.#p = null, this.#m = null, this.#h = null, this.#g = null, this.#_ = null, this.#v = null, this.#y = null, this.#b = null, super.teardown();
|
|
9016
10464
|
}
|
|
9017
10465
|
#F() {
|
|
9018
|
-
x(), this.#D = new b({ allowUnregistered: !0 }), this.#O =
|
|
10466
|
+
x(), this.#D = new b({ allowUnregistered: !0 }), this.#O = Ce(this.#D, {
|
|
9019
10467
|
registry: this.#E,
|
|
9020
10468
|
onClientMessage: (e) => {
|
|
9021
10469
|
this.#se("received", e);
|
|
@@ -9057,7 +10505,7 @@ var W = [
|
|
|
9057
10505
|
} catch {
|
|
9058
10506
|
return;
|
|
9059
10507
|
}
|
|
9060
|
-
!t || typeof t != "object" || (this.#E =
|
|
10508
|
+
!t || typeof t != "object" || (this.#E = k.fromJSON(t), this.#L(), this.#v && this.#fe(this.#v, this.#l.value));
|
|
9061
10509
|
}
|
|
9062
10510
|
#z() {
|
|
9063
10511
|
let e = this.#y;
|
|
@@ -9067,7 +10515,7 @@ var W = [
|
|
|
9067
10515
|
} catch {}
|
|
9068
10516
|
}
|
|
9069
10517
|
#B() {
|
|
9070
|
-
this.#E =
|
|
10518
|
+
this.#E = A.clone(), this.#L(), this.#y && (this.#y.value = JSON.stringify(this.#E.toJSON(), null, 2)), this.#v && this.#fe(this.#v, this.#l.value);
|
|
9071
10519
|
}
|
|
9072
10520
|
#V() {
|
|
9073
10521
|
if (!this.#O) return;
|
|
@@ -9233,7 +10681,7 @@ var W = [
|
|
|
9233
10681
|
r.setAttribute("justify", "spread"), r.innerHTML = "<span slot=\"label\">Presets</span><n-icon name=\"caret-up-down\" slot=\"trailing\"></n-icon>", n.appendChild(r);
|
|
9234
10682
|
let i = document.createElement("n-listbox");
|
|
9235
10683
|
i.setAttribute("popover", "");
|
|
9236
|
-
for (let e of
|
|
10684
|
+
for (let e of Fe) {
|
|
9237
10685
|
if ("hidden" in e && e.hidden) continue;
|
|
9238
10686
|
let t = Object.entries(U).filter(([t, n]) => n.group === e.id);
|
|
9239
10687
|
if (t.length === 0) continue;
|
|
@@ -9248,7 +10696,7 @@ var W = [
|
|
|
9248
10696
|
n.appendChild(i), n.addEventListener("native:change", this.#be), t.appendChild(n);
|
|
9249
10697
|
for (let e of W) {
|
|
9250
10698
|
let n = document.createElement("n-button");
|
|
9251
|
-
n.setAttribute("variant", "ghost"), n.setAttribute("size", "sm"), n.textContent =
|
|
10699
|
+
n.setAttribute("variant", "ghost"), n.setAttribute("size", "sm"), n.textContent = Ie[e], this.#n.value.has(e) && n.toggleAttribute("data-active", !0), n.addEventListener("native:press", this.#je(e)), t.appendChild(n), this.#T.set(e, n);
|
|
9252
10700
|
}
|
|
9253
10701
|
let a = document.createElement("n-button");
|
|
9254
10702
|
a.setAttribute("variant", "ghost"), a.setAttribute("size", "sm"), a.title = "Auto-play presets on load", a.innerHTML = "<n-icon name=\"lightning\"></n-icon>", a.addEventListener("native:press", this.#ke), t.appendChild(a), this.#N = a;
|
|
@@ -9266,9 +10714,9 @@ var W = [
|
|
|
9266
10714
|
let t = document.createElement("div");
|
|
9267
10715
|
t.className = "a2ui-pane", t.dataset.panel = e, this.#n.value.has(e) || (t.hidden = !0);
|
|
9268
10716
|
let n = document.createElement("n-header"), r = document.createElement("nav"), i = document.createElement("n-icon");
|
|
9269
|
-
i.setAttribute("name",
|
|
10717
|
+
i.setAttribute("name", Le[e]), r.appendChild(i), n.appendChild(r);
|
|
9270
10718
|
let a = document.createElement("span");
|
|
9271
|
-
a.textContent =
|
|
10719
|
+
a.textContent = Ie[e], n.appendChild(a);
|
|
9272
10720
|
let o = document.createElement("aside");
|
|
9273
10721
|
if (e === "js" || e === "html" || e === "css") {
|
|
9274
10722
|
let t = document.createElement("n-button");
|
|
@@ -9286,8 +10734,8 @@ var W = [
|
|
|
9286
10734
|
i.addEventListener("native:press", this.#Ce);
|
|
9287
10735
|
let a = this.#Q("Play all", "play", !0);
|
|
9288
10736
|
a.dataset.role = "run", a.addEventListener("native:press", this.#Se);
|
|
9289
|
-
let o = document.createElement("
|
|
9290
|
-
o.
|
|
10737
|
+
let o = document.createElement("n-divider");
|
|
10738
|
+
o.setAttribute("orientation", "vertical");
|
|
9291
10739
|
let s = this.#Q("Insert createSurface", "plus-circle");
|
|
9292
10740
|
s.addEventListener("native:press", this.#Ee("createSurface"));
|
|
9293
10741
|
let c = this.#Q("Insert updateComponents", "squares-four");
|
|
@@ -9304,8 +10752,8 @@ var W = [
|
|
|
9304
10752
|
n.addEventListener("native:press", () => this.#R());
|
|
9305
10753
|
let r = this.#Q("Format JSON", "text-align-left");
|
|
9306
10754
|
r.addEventListener("native:press", () => this.#z());
|
|
9307
|
-
let i = document.createElement("
|
|
9308
|
-
i.
|
|
10755
|
+
let i = document.createElement("n-divider");
|
|
10756
|
+
i.setAttribute("orientation", "vertical");
|
|
9309
10757
|
let a = this.#Q("Reset to defaults", "arrow-counter-clockwise");
|
|
9310
10758
|
a.addEventListener("native:press", () => this.#B()), e.append(n, r, i, a), t.appendChild(e);
|
|
9311
10759
|
}
|
|
@@ -9338,8 +10786,8 @@ var W = [
|
|
|
9338
10786
|
if (!this.#p) return;
|
|
9339
10787
|
this.#p.value = this.#e.value, this.#p.extensions = [
|
|
9340
10788
|
v(),
|
|
9341
|
-
|
|
9342
|
-
y(
|
|
10789
|
+
Ve,
|
|
10790
|
+
y(Pe)
|
|
9343
10791
|
], this.#p.addEventListener("native:input", (e) => {
|
|
9344
10792
|
this.#e.value = e.detail.value;
|
|
9345
10793
|
});
|
|
@@ -9755,7 +11203,7 @@ var W = [
|
|
|
9755
11203
|
} else if (e === "html") {
|
|
9756
11204
|
if (!this.#h) return;
|
|
9757
11205
|
let e = this.#s.value;
|
|
9758
|
-
this.#h.value = e ?
|
|
11206
|
+
this.#h.value = e ? Ue(e) : "";
|
|
9759
11207
|
} else if (e === "css") {
|
|
9760
11208
|
if (!this.#g) return;
|
|
9761
11209
|
let e = this.#c.value;
|
|
@@ -9767,7 +11215,7 @@ var W = [
|
|
|
9767
11215
|
t.has(e) ? t.delete(e) : t.add(e), this.#n.value = t;
|
|
9768
11216
|
};
|
|
9769
11217
|
};
|
|
9770
|
-
function
|
|
11218
|
+
function Ue(e) {
|
|
9771
11219
|
let t = "", n = 0, r = 0;
|
|
9772
11220
|
for (; r < e.length;) if (e[r] === "<") {
|
|
9773
11221
|
let i = e.indexOf(">", r);
|
|
@@ -9782,7 +11230,7 @@ function Le(e) {
|
|
|
9782
11230
|
}
|
|
9783
11231
|
return t.trimEnd();
|
|
9784
11232
|
}
|
|
9785
|
-
var
|
|
11233
|
+
var We = class {
|
|
9786
11234
|
#e = /* @__PURE__ */ new Set();
|
|
9787
11235
|
/** Emit an interaction event to all subscribers. */
|
|
9788
11236
|
emit(e) {
|
|
@@ -9798,7 +11246,7 @@ var Re = class {
|
|
|
9798
11246
|
destroy() {
|
|
9799
11247
|
this.#e.clear();
|
|
9800
11248
|
}
|
|
9801
|
-
},
|
|
11249
|
+
}, Ge = class {
|
|
9802
11250
|
id;
|
|
9803
11251
|
agentId;
|
|
9804
11252
|
catalog;
|
|
@@ -9810,7 +11258,7 @@ var Re = class {
|
|
|
9810
11258
|
#i;
|
|
9811
11259
|
#a = /* @__PURE__ */ new Map();
|
|
9812
11260
|
constructor(e, t, n) {
|
|
9813
|
-
this.id = f("session"), this.agentId = n.agentId, this.catalog = n.catalog, this.#t = t, this.#i = new Set(n.surfaces ?? []), this.eventEmitter = new
|
|
11261
|
+
this.id = f("session"), this.agentId = n.agentId, this.catalog = n.catalog, this.#t = t, this.#i = new Set(n.surfaces ?? []), this.eventEmitter = new We(), this.#e = new V(e, {
|
|
9814
11262
|
onClientMessage: (e) => {
|
|
9815
11263
|
if (ee(e)) {
|
|
9816
11264
|
let t = e.action, n = {
|
|
@@ -9846,7 +11294,7 @@ var Re = class {
|
|
|
9846
11294
|
if (this.#n === "terminated") return;
|
|
9847
11295
|
let t = typeof e == "string" ? O(e) : e;
|
|
9848
11296
|
if (!t) return;
|
|
9849
|
-
let n =
|
|
11297
|
+
let n = Ke(t);
|
|
9850
11298
|
if (n && !this.#i.has(n) && !this.#t.isOwner(n, this)) {
|
|
9851
11299
|
this.#s("catalog-violation", n, "");
|
|
9852
11300
|
return;
|
|
@@ -9884,13 +11332,13 @@ var Re = class {
|
|
|
9884
11332
|
if (n) for (let e of n) e(...t);
|
|
9885
11333
|
}
|
|
9886
11334
|
};
|
|
9887
|
-
function
|
|
11335
|
+
function Ke(e) {
|
|
9888
11336
|
if (C(e)) return e.createSurface.surfaceId;
|
|
9889
11337
|
if (w(e)) return e.updateComponents.surfaceId;
|
|
9890
11338
|
if (T(e)) return e.updateDataModel.surfaceId;
|
|
9891
11339
|
if (E(e)) return e.deleteSurface.surfaceId;
|
|
9892
11340
|
}
|
|
9893
|
-
var
|
|
11341
|
+
var qe = class {
|
|
9894
11342
|
#e = /* @__PURE__ */ new Map();
|
|
9895
11343
|
#t = /* @__PURE__ */ new Set();
|
|
9896
11344
|
#n = /* @__PURE__ */ new Set();
|
|
@@ -9970,7 +11418,7 @@ var Ve = class {
|
|
|
9970
11418
|
destroy() {
|
|
9971
11419
|
this.#e.clear(), this.#t.clear(), this.#n.clear();
|
|
9972
11420
|
}
|
|
9973
|
-
},
|
|
11421
|
+
}, Je = class {
|
|
9974
11422
|
#e;
|
|
9975
11423
|
constructor(e) {
|
|
9976
11424
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -10019,12 +11467,12 @@ var Ve = class {
|
|
|
10019
11467
|
});
|
|
10020
11468
|
}
|
|
10021
11469
|
};
|
|
10022
|
-
function
|
|
11470
|
+
function Ye(e) {
|
|
10023
11471
|
return {
|
|
10024
11472
|
a2uiType: e.a2uiType,
|
|
10025
11473
|
tagName: e.nativeTag,
|
|
10026
|
-
properties: e.propertyMap ? Object.keys(e.propertyMap) : [],
|
|
10027
|
-
events: e.actionEvent ? [e.actionEvent] : []
|
|
11474
|
+
properties: e.properties ? e.properties.map((e) => e.attr) : e.propertyMap ? Object.keys(e.propertyMap) : [],
|
|
11475
|
+
events: e.events ? e.events.map((e) => e.event) : e.actionEvent ? [e.actionEvent] : []
|
|
10028
11476
|
};
|
|
10029
11477
|
}
|
|
10030
11478
|
/**
|
|
@@ -10034,21 +11482,21 @@ function Ue(e) {
|
|
|
10034
11482
|
*/
|
|
10035
11483
|
function G(e = "core-only") {
|
|
10036
11484
|
let t = [];
|
|
10037
|
-
for (let [n, r] of
|
|
10038
|
-
return new
|
|
11485
|
+
for (let [n, r] of re) e === "core-only" && r.nativeTag.startsWith("native-dashboard-") || t.push(Ye(r));
|
|
11486
|
+
return new Je(t);
|
|
10039
11487
|
}
|
|
10040
|
-
var
|
|
11488
|
+
var Xe = class {
|
|
10041
11489
|
surfaces;
|
|
10042
11490
|
#e;
|
|
10043
11491
|
#t = /* @__PURE__ */ new Map();
|
|
10044
11492
|
constructor(e) {
|
|
10045
|
-
this.#e = e, this.surfaces = new
|
|
11493
|
+
this.#e = e, this.surfaces = new qe();
|
|
10046
11494
|
}
|
|
10047
11495
|
/** Create a new agent session with the given configuration. */
|
|
10048
11496
|
createSession(e) {
|
|
10049
11497
|
let t;
|
|
10050
11498
|
t = e.catalog === "full" ? G("full") : e.catalog === "core-only" ? G("core-only") : e.catalog;
|
|
10051
|
-
let n = new
|
|
11499
|
+
let n = new Ge(this.#e, this.surfaces, {
|
|
10052
11500
|
agentId: e.agentId,
|
|
10053
11501
|
catalog: t,
|
|
10054
11502
|
surfaces: e.surfaces
|
|
@@ -10087,7 +11535,7 @@ var We = class {
|
|
|
10087
11535
|
destroy() {
|
|
10088
11536
|
this.terminateAll(), this.surfaces.destroy();
|
|
10089
11537
|
}
|
|
10090
|
-
},
|
|
11538
|
+
}, Ze = class {
|
|
10091
11539
|
type = "direct";
|
|
10092
11540
|
#e;
|
|
10093
11541
|
#t = null;
|
|
@@ -10124,7 +11572,7 @@ var We = class {
|
|
|
10124
11572
|
async disconnect() {
|
|
10125
11573
|
this.#r?.(), this.#r = null, this.#n && this.#t && this.#t.sessionManager.terminateSession(this.#n.id), this.#n = null, this.#t = null;
|
|
10126
11574
|
}
|
|
10127
|
-
},
|
|
11575
|
+
}, Qe = class {
|
|
10128
11576
|
type = "a2a";
|
|
10129
11577
|
#e;
|
|
10130
11578
|
#t = null;
|
|
@@ -10186,7 +11634,7 @@ var We = class {
|
|
|
10186
11634
|
});
|
|
10187
11635
|
} catch {}
|
|
10188
11636
|
}
|
|
10189
|
-
},
|
|
11637
|
+
}, $e = class {
|
|
10190
11638
|
type = "ag-ui";
|
|
10191
11639
|
#e;
|
|
10192
11640
|
#t = null;
|
|
@@ -10225,7 +11673,7 @@ var We = class {
|
|
|
10225
11673
|
}
|
|
10226
11674
|
e.type === "RUN_FINISHED" || e.type;
|
|
10227
11675
|
}
|
|
10228
|
-
},
|
|
11676
|
+
}, et = class extends i {
|
|
10229
11677
|
static observedAttributes = [
|
|
10230
11678
|
"disabled",
|
|
10231
11679
|
"busy",
|
|
@@ -10298,10 +11746,10 @@ var We = class {
|
|
|
10298
11746
|
this.removeEventListener("native:input", this.#c), this.removeEventListener("native:press", this.#l), this.removeEventListener("keydown", this.#f), this.removeEventListener("focusin", this.#u), this.removeEventListener("focusout", this.#d), this.#r = null, this.#i = null, super.teardown();
|
|
10299
11747
|
}
|
|
10300
11748
|
#a() {
|
|
10301
|
-
this.#r = this.querySelector(":scope > n-textarea"), this.#i = this.querySelector("[data-submit]") ?? this.#o();
|
|
11749
|
+
this.#r = this.querySelector(":scope > n-textarea") ?? this.querySelector(":scope > n-chat-input-prompt > n-textarea"), this.#i = this.querySelector("[data-submit]") ?? this.#o();
|
|
10302
11750
|
}
|
|
10303
11751
|
#o() {
|
|
10304
|
-
let e = this.querySelector(":scope > n-chat-input-actions");
|
|
11752
|
+
let e = this.querySelector(":scope > n-chat-input-actions, :scope > n-toolbar") ?? this.querySelector(":scope > n-chat-input-prompt > n-chat-input-actions, :scope > n-chat-input-prompt > n-toolbar");
|
|
10305
11753
|
if (!e) return null;
|
|
10306
11754
|
let t = e.querySelectorAll("n-button[variant=\"primary\"]");
|
|
10307
11755
|
return t.length ? t[t.length - 1] : null;
|
|
@@ -10334,7 +11782,7 @@ var We = class {
|
|
|
10334
11782
|
let t = e;
|
|
10335
11783
|
if (t.isComposing) return;
|
|
10336
11784
|
let n = t.target;
|
|
10337
|
-
!this.#r?.contains(n) && n !== this.#r || t.key === "Enter" &&
|
|
11785
|
+
!this.#r?.contains(n) && n !== this.#r || t.key === "Enter" && (t.metaKey || t.ctrlKey) && !t.shiftKey && (t.preventDefault(), this.value.trim() && this.#p());
|
|
10338
11786
|
};
|
|
10339
11787
|
#p() {
|
|
10340
11788
|
let e = this.value.trim();
|
|
@@ -10355,7 +11803,7 @@ var We = class {
|
|
|
10355
11803
|
})) && !this.hasAttribute("no-auto-clear") && (this.value = "", this.#i?.setAttribute("disabled", ""));
|
|
10356
11804
|
}
|
|
10357
11805
|
}
|
|
10358
|
-
},
|
|
11806
|
+
}, tt = class extends et {}, nt = class extends i {
|
|
10359
11807
|
static MAX_CONTEXT_MESSAGES = 50;
|
|
10360
11808
|
static observedAttributes = [
|
|
10361
11809
|
"show-stop",
|
|
@@ -10874,7 +12322,7 @@ var We = class {
|
|
|
10874
12322
|
#B() {
|
|
10875
12323
|
this.#b &&= (this.#b.removeEventListener("native:change", this.#M), this.#b.remove(), null), this.#x = null;
|
|
10876
12324
|
}
|
|
10877
|
-
},
|
|
12325
|
+
}, rt = 40, it = class extends i {
|
|
10878
12326
|
static observedAttributes = [
|
|
10879
12327
|
"auto-scroll",
|
|
10880
12328
|
"scrollable",
|
|
@@ -10983,7 +12431,7 @@ var We = class {
|
|
|
10983
12431
|
}
|
|
10984
12432
|
}
|
|
10985
12433
|
#f = () => {
|
|
10986
|
-
let e = this.#n.value, t = this.scrollTop + this.clientHeight >= this.scrollHeight -
|
|
12434
|
+
let e = this.#n.value, t = this.scrollTop + this.clientHeight >= this.scrollHeight - rt;
|
|
10987
12435
|
this.#n.value = t, t !== e && this.dispatchEvent(new CustomEvent("native:feed-scroll", {
|
|
10988
12436
|
bubbles: !0,
|
|
10989
12437
|
composed: !0,
|
|
@@ -11001,7 +12449,7 @@ var We = class {
|
|
|
11001
12449
|
});
|
|
11002
12450
|
});
|
|
11003
12451
|
};
|
|
11004
|
-
},
|
|
12452
|
+
}, at = class extends i {
|
|
11005
12453
|
static observedAttributes = [
|
|
11006
12454
|
"src",
|
|
11007
12455
|
"name",
|
|
@@ -11041,7 +12489,7 @@ var We = class {
|
|
|
11041
12489
|
}
|
|
11042
12490
|
if (n) {
|
|
11043
12491
|
let e = document.createElement("span");
|
|
11044
|
-
e.className = "n-chat-avatar-initials", e.textContent =
|
|
12492
|
+
e.className = "n-chat-avatar-initials", e.textContent = ot(n), e.setAttribute("aria-hidden", "true"), this.appendChild(e);
|
|
11045
12493
|
return;
|
|
11046
12494
|
}
|
|
11047
12495
|
let r = document.createElement("n-icon");
|
|
@@ -11052,11 +12500,11 @@ var We = class {
|
|
|
11052
12500
|
this.textContent = "", super.teardown();
|
|
11053
12501
|
}
|
|
11054
12502
|
};
|
|
11055
|
-
function
|
|
12503
|
+
function ot(e) {
|
|
11056
12504
|
let t = e.trim().split(/\s+/);
|
|
11057
12505
|
return t.length === 0 ? "" : t.length === 1 ? t[0][0].toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
11058
12506
|
}
|
|
11059
|
-
const
|
|
12507
|
+
const st = {
|
|
11060
12508
|
copy: {
|
|
11061
12509
|
label: "Copy",
|
|
11062
12510
|
icon: "copy"
|
|
@@ -11081,7 +12529,7 @@ const et = {
|
|
|
11081
12529
|
label: "Continue",
|
|
11082
12530
|
icon: "arrow-right"
|
|
11083
12531
|
}
|
|
11084
|
-
},
|
|
12532
|
+
}, ct = {
|
|
11085
12533
|
assistant: [
|
|
11086
12534
|
"copy",
|
|
11087
12535
|
"retry",
|
|
@@ -11106,7 +12554,7 @@ const et = {
|
|
|
11106
12554
|
* @fires native:message-action - Fired when an action button is clicked
|
|
11107
12555
|
* @fires native:continue-request - Fired when continue is requested for a partial message
|
|
11108
12556
|
*/
|
|
11109
|
-
var
|
|
12557
|
+
var lt = class extends i {
|
|
11110
12558
|
static observedAttributes = [
|
|
11111
12559
|
"data-role",
|
|
11112
12560
|
"message-id",
|
|
@@ -11225,12 +12673,12 @@ var nt = class extends i {
|
|
|
11225
12673
|
#p(e, t, n, r, i) {
|
|
11226
12674
|
if (this.#o &&= (this.#f(), null), clearTimeout(this.#l), t === "none" || this.querySelector("[slot=\"actions\"]")) return;
|
|
11227
12675
|
let a;
|
|
11228
|
-
if (a = t ? t.split(",").map((e) => e.trim()).filter(Boolean) :
|
|
12676
|
+
if (a = t ? t.split(",").map((e) => e.trim()).filter(Boolean) : ct[e] ?? [], i === "partial" && !a.includes("continue") && (a = [...a, "continue"]), a.length === 0) return;
|
|
11229
12677
|
let o = document.createElement("n-toolbar");
|
|
11230
12678
|
o.dataset.role = "actions", o.setAttribute("padding", "tight"), o.setAttribute("aria-label", "Message actions"), n !== "label" && o.setAttribute("data-style", n);
|
|
11231
12679
|
for (let e of a) {
|
|
11232
|
-
let t =
|
|
11233
|
-
t && o.appendChild(
|
|
12680
|
+
let t = st[e];
|
|
12681
|
+
t && o.appendChild(ut(e, t, n));
|
|
11234
12682
|
}
|
|
11235
12683
|
if (o.children.length !== 0) {
|
|
11236
12684
|
if (o.addEventListener("native:press", this.#m), r === "below") {
|
|
@@ -11263,7 +12711,7 @@ var nt = class extends i {
|
|
|
11263
12711
|
}
|
|
11264
12712
|
};
|
|
11265
12713
|
};
|
|
11266
|
-
function
|
|
12714
|
+
function ut(e, t, n) {
|
|
11267
12715
|
let r = document.createElement("n-button");
|
|
11268
12716
|
if (r.setAttribute("variant", "ghost"), r.setAttribute("size", "sm"), r.setAttribute("inline", ""), r.setAttribute("data-action", e), r.setAttribute("aria-label", t.label), n === "icon" || n === "icon-label") {
|
|
11269
12717
|
let e = document.createElement("n-icon");
|
|
@@ -11300,7 +12748,7 @@ function rt(e, t, n) {
|
|
|
11300
12748
|
* @attr {string} sender - Display name of the sender
|
|
11301
12749
|
* @attr {string} avatar-align - `"top"` | `"center"` | `"bottom"` (default) — avatar vertical alignment
|
|
11302
12750
|
*/
|
|
11303
|
-
var
|
|
12751
|
+
var dt = class extends i {
|
|
11304
12752
|
static observedAttributes = [
|
|
11305
12753
|
"data-role",
|
|
11306
12754
|
"sender",
|
|
@@ -11343,7 +12791,7 @@ var it = class extends i {
|
|
|
11343
12791
|
for (let r of n) r instanceof Element && r.localName === "n-chat-avatar" || (r instanceof Element && r.localName === "n-chat-message" ? t.appendChild(r) : e.appendChild(r));
|
|
11344
12792
|
this.appendChild(e), this.appendChild(t), this.#t = e, this.#n = t;
|
|
11345
12793
|
}
|
|
11346
|
-
},
|
|
12794
|
+
}, ft = class extends i {
|
|
11347
12795
|
static observedAttributes = ["format"];
|
|
11348
12796
|
#e = d("markdown");
|
|
11349
12797
|
#t = d("");
|
|
@@ -11369,7 +12817,7 @@ var it = class extends i {
|
|
|
11369
12817
|
!this.#t.value && this.textContent?.trim() && (this.#t.value = this.textContent.trim()), this.#n = document.createElement("div"), this.#n.className = "n-chat-prose", this.textContent = "", this.appendChild(this.#n), this.addEffect(() => {
|
|
11370
12818
|
let e = this.#t.value, t = this.#e.value;
|
|
11371
12819
|
this.#n && (t === "plain" ? this.#n.textContent = e : (cancelAnimationFrame(this.#r), this.#r = requestAnimationFrame(() => {
|
|
11372
|
-
this.#n && (this.#n.innerHTML =
|
|
12820
|
+
this.#n && (this.#n.innerHTML = mt(J(e)));
|
|
11373
12821
|
})));
|
|
11374
12822
|
});
|
|
11375
12823
|
});
|
|
@@ -11377,7 +12825,7 @@ var it = class extends i {
|
|
|
11377
12825
|
teardown() {
|
|
11378
12826
|
cancelAnimationFrame(this.#r), this.#n = null, super.teardown();
|
|
11379
12827
|
}
|
|
11380
|
-
},
|
|
12828
|
+
}, pt = new Set([
|
|
11381
12829
|
"p",
|
|
11382
12830
|
"br",
|
|
11383
12831
|
"strong",
|
|
@@ -11456,10 +12904,10 @@ function J(e) {
|
|
|
11456
12904
|
return n.join("");
|
|
11457
12905
|
}
|
|
11458
12906
|
/** Sanitize rendered HTML — strip any tags not in allowlist. */
|
|
11459
|
-
function
|
|
12907
|
+
function mt(e) {
|
|
11460
12908
|
return e.replace(/<\/?([a-zA-Z][a-zA-Z0-9]*)[^>]*>/g, (e, t) => {
|
|
11461
12909
|
let n = t.toLowerCase();
|
|
11462
|
-
return
|
|
12910
|
+
return pt.has(n) ? e : "";
|
|
11463
12911
|
});
|
|
11464
12912
|
}
|
|
11465
12913
|
/**
|
|
@@ -11480,7 +12928,7 @@ function st(e) {
|
|
|
11480
12928
|
* @attr {boolean} expandable - Allow click to expand trace content
|
|
11481
12929
|
* @fires native:activity-toggle - Fired when trace is expanded/collapsed
|
|
11482
12930
|
*/
|
|
11483
|
-
var
|
|
12931
|
+
var ht = class extends i {
|
|
11484
12932
|
static observedAttributes = [
|
|
11485
12933
|
"type",
|
|
11486
12934
|
"label",
|
|
@@ -11538,7 +12986,7 @@ var ct = class extends i {
|
|
|
11538
12986
|
this.#r.value ? (this.#p(), this.#e.states.add("active")) : (this.#m(), this.#e.states.delete("active"));
|
|
11539
12987
|
}), this.addEffect(() => {
|
|
11540
12988
|
if (!this.#c) return;
|
|
11541
|
-
let e = this.#n.value ||
|
|
12989
|
+
let e = this.#n.value || gt(this.#t.value);
|
|
11542
12990
|
this.#c.textContent = e;
|
|
11543
12991
|
}), this.addEffect(() => {
|
|
11544
12992
|
this.#u && (this.#u.hidden = !this.#r.value);
|
|
@@ -11568,7 +13016,7 @@ var ct = class extends i {
|
|
|
11568
13016
|
#h = () => {
|
|
11569
13017
|
if (!this.#r.value || !this.#l) return;
|
|
11570
13018
|
let e = performance.now() - this.#o;
|
|
11571
|
-
this.#l.textContent =
|
|
13019
|
+
this.#l.textContent = _t(e), this.#s = requestAnimationFrame(this.#h);
|
|
11572
13020
|
};
|
|
11573
13021
|
#g = () => {
|
|
11574
13022
|
this.#i.value && (this.#a.value = !this.#a.value, this.toggleAttribute("expanded", this.#a.value), this.dispatchEvent(new CustomEvent("native:activity-toggle", {
|
|
@@ -11578,14 +13026,14 @@ var ct = class extends i {
|
|
|
11578
13026
|
})));
|
|
11579
13027
|
};
|
|
11580
13028
|
};
|
|
11581
|
-
function
|
|
13029
|
+
function gt(e) {
|
|
11582
13030
|
switch (e) {
|
|
11583
13031
|
case "thinking": return "Thinking…";
|
|
11584
13032
|
case "tool-use": return "Using tools…";
|
|
11585
13033
|
default: return "Host is typing…";
|
|
11586
13034
|
}
|
|
11587
13035
|
}
|
|
11588
|
-
function
|
|
13036
|
+
function _t(e) {
|
|
11589
13037
|
let t = Math.floor(e / 1e3);
|
|
11590
13038
|
if (t < 60) return `${t}s`;
|
|
11591
13039
|
let n = Math.floor(t / 60), r = t % 60;
|
|
@@ -11605,7 +13053,7 @@ function ut(e) {
|
|
|
11605
13053
|
* @attr {boolean} disabled - Disables all chips
|
|
11606
13054
|
* @fires native:seed-select - Fired when a chip is clicked
|
|
11607
13055
|
*/
|
|
11608
|
-
var
|
|
13056
|
+
var vt = class extends i {
|
|
11609
13057
|
static observedAttributes = ["options", "disabled"];
|
|
11610
13058
|
#e;
|
|
11611
13059
|
#t = d([]);
|
|
@@ -11646,8 +13094,8 @@ var dt = class extends i {
|
|
|
11646
13094
|
super.setup(), this.addEffect(l(this, this.#n, this.#e)), this.addEffect(() => {
|
|
11647
13095
|
let e = this.#t.value;
|
|
11648
13096
|
this.textContent = "";
|
|
11649
|
-
let t = document.createElement("
|
|
11650
|
-
t.
|
|
13097
|
+
let t = document.createElement("n-stack");
|
|
13098
|
+
t.setAttribute("direction", "row"), t.setAttribute("wrap", "");
|
|
11651
13099
|
for (let n of e) {
|
|
11652
13100
|
let e = document.createElement("n-button");
|
|
11653
13101
|
if (e.setAttribute("variant", "outline"), e.setAttribute("size", "sm"), e.setAttribute("inline", ""), e.setAttribute("data-value", n.value), n.icon) {
|
|
@@ -11677,7 +13125,7 @@ var dt = class extends i {
|
|
|
11677
13125
|
}
|
|
11678
13126
|
}));
|
|
11679
13127
|
};
|
|
11680
|
-
},
|
|
13128
|
+
}, yt = new Set([
|
|
11681
13129
|
"script",
|
|
11682
13130
|
"style",
|
|
11683
13131
|
"link",
|
|
@@ -11694,7 +13142,7 @@ var dt = class extends i {
|
|
|
11694
13142
|
"frame",
|
|
11695
13143
|
"frameset",
|
|
11696
13144
|
"noscript"
|
|
11697
|
-
]),
|
|
13145
|
+
]), bt = class extends i {
|
|
11698
13146
|
static observedAttributes = ["schema-type", "mode"];
|
|
11699
13147
|
#e;
|
|
11700
13148
|
#t = d("a2ui");
|
|
@@ -11740,7 +13188,7 @@ var dt = class extends i {
|
|
|
11740
13188
|
super.setup(), this.#i = document.createElement("div"), this.#i.className = "n-chat-genui-container", this.appendChild(this.#i), this.addEffect(() => {
|
|
11741
13189
|
let e = this.#r.value, t = this.#n.value;
|
|
11742
13190
|
if (!this.#i || (this.#i.textContent = "", !e)) return;
|
|
11743
|
-
let n =
|
|
13191
|
+
let n = xt(e);
|
|
11744
13192
|
if (n.length > 0) {
|
|
11745
13193
|
this.#o(n), this.dispatchEvent(new CustomEvent("native:genui-error", {
|
|
11746
13194
|
bubbles: !0,
|
|
@@ -11804,15 +13252,15 @@ var dt = class extends i {
|
|
|
11804
13252
|
}));
|
|
11805
13253
|
};
|
|
11806
13254
|
};
|
|
11807
|
-
function
|
|
13255
|
+
function xt(e, t = 0) {
|
|
11808
13256
|
let n = [];
|
|
11809
13257
|
if (t > 20) return n.push("Maximum nesting depth (20) exceeded"), n;
|
|
11810
13258
|
if (!e.tag || typeof e.tag != "string") return n.push("Node missing required \"tag\" property"), n;
|
|
11811
|
-
if (
|
|
13259
|
+
if (yt.has(e.tag.toLowerCase()) && n.push(`Forbidden tag: <${e.tag}>`), e.children) for (let r of e.children) n.push(...xt(r, t + 1));
|
|
11812
13260
|
return n;
|
|
11813
13261
|
}
|
|
11814
13262
|
function Y(e) {
|
|
11815
|
-
if (
|
|
13263
|
+
if (yt.has(e.tag.toLowerCase())) return null;
|
|
11816
13264
|
let t = document.createElement(e.tag);
|
|
11817
13265
|
if (e.id && (t.id = e.id), e.slot && (t.slot = e.slot), e.attributes) for (let [n, r] of Object.entries(e.attributes)) t.setAttribute(n, r);
|
|
11818
13266
|
if (e.properties) for (let [n, r] of Object.entries(e.properties)) t[n] = r;
|
|
@@ -11842,7 +13290,7 @@ function Y(e) {
|
|
|
11842
13290
|
* @fires native:structured-submit - Fired on submit with selections
|
|
11843
13291
|
* @fires native:structured-cancel - Fired when dismissed without selecting
|
|
11844
13292
|
*/
|
|
11845
|
-
var
|
|
13293
|
+
var St = class extends i {
|
|
11846
13294
|
static observedAttributes = [
|
|
11847
13295
|
"question",
|
|
11848
13296
|
"type",
|
|
@@ -11931,8 +13379,8 @@ var ht = class extends i {
|
|
|
11931
13379
|
let t = document.createElement("div");
|
|
11932
13380
|
t.className = "n-chat-structured-question", t.textContent = e, this.appendChild(t);
|
|
11933
13381
|
}
|
|
11934
|
-
let r = document.createElement("
|
|
11935
|
-
r.
|
|
13382
|
+
let r = document.createElement("n-stack");
|
|
13383
|
+
r.setAttribute("direction", "row"), r.setAttribute("wrap", ""), r.setAttribute("role", n === "multi" ? "group" : "radiogroup");
|
|
11936
13384
|
for (let e of t) {
|
|
11937
13385
|
let t = document.createElement("n-button");
|
|
11938
13386
|
if (t.setAttribute("variant", "outline"), t.setAttribute("data-value", e.value), t.setAttribute("aria-pressed", "false"), e.icon) {
|
|
@@ -11983,7 +13431,7 @@ var ht = class extends i {
|
|
|
11983
13431
|
* Reads `data:` lines from the response body, skips empty lines and comments,
|
|
11984
13432
|
* handles the `[DONE]` sentinel, and accumulates the full message across chunks.
|
|
11985
13433
|
*/
|
|
11986
|
-
async function*
|
|
13434
|
+
async function* Ct(e) {
|
|
11987
13435
|
let t = e.body.getReader(), n = new TextDecoder("utf-8"), r = "", i = "";
|
|
11988
13436
|
try {
|
|
11989
13437
|
for (;;) {
|
|
@@ -12063,7 +13511,7 @@ async function* gt(e) {
|
|
|
12063
13511
|
* Each non-empty line is parsed as a standalone JSON object.
|
|
12064
13512
|
* Accumulates the full message across chunks.
|
|
12065
13513
|
*/
|
|
12066
|
-
async function*
|
|
13514
|
+
async function* wt(e) {
|
|
12067
13515
|
let t = e.body.getReader(), n = new TextDecoder("utf-8"), r = "", i = "";
|
|
12068
13516
|
try {
|
|
12069
13517
|
for (;;) {
|
|
@@ -12124,7 +13572,7 @@ async function* _t(e) {
|
|
|
12124
13572
|
* Reads the entire response body, parses as JSON, and yields one chunk
|
|
12125
13573
|
* with `done: true`.
|
|
12126
13574
|
*/
|
|
12127
|
-
async function*
|
|
13575
|
+
async function* Tt(e) {
|
|
12128
13576
|
let t = await e.json(), n = "";
|
|
12129
13577
|
typeof t.content == "string" ? n = t.content : typeof t.message == "string" ? n = t.message : typeof t.delta == "string" ? n = t.delta : Array.isArray(t.choices) && typeof t.choices[0]?.message?.content == "string" && (n = t.choices[0].message.content), yield {
|
|
12130
13578
|
delta: n,
|
|
@@ -12141,13 +13589,13 @@ async function* vt(e) {
|
|
|
12141
13589
|
* - `error` — an error occurred during streaming
|
|
12142
13590
|
* - `stopped` — consumer aborted the stream
|
|
12143
13591
|
*/
|
|
12144
|
-
function
|
|
13592
|
+
function Et(e, t) {
|
|
12145
13593
|
return t ? t.name === "AbortError" ? "stopped" : "error" : e.partial ? "partial" : "complete";
|
|
12146
13594
|
}
|
|
12147
13595
|
/**
|
|
12148
13596
|
* Classify an HTTP status code into a transport state.
|
|
12149
13597
|
*/
|
|
12150
|
-
function
|
|
13598
|
+
function Dt(e) {
|
|
12151
13599
|
return e === 401 || e === 403 ? "auth-required" : e === 429 ? "rate-limited" : "server-error";
|
|
12152
13600
|
}
|
|
12153
13601
|
/**
|
|
@@ -12159,7 +13607,7 @@ function X(e, t = 1e3, n = 3e4) {
|
|
|
12159
13607
|
/**
|
|
12160
13608
|
* Detect the stream format from a Content-Type header value.
|
|
12161
13609
|
*/
|
|
12162
|
-
function
|
|
13610
|
+
function Ot(e) {
|
|
12163
13611
|
let t = e.toLowerCase();
|
|
12164
13612
|
return t.includes("text/event-stream") ? "sse" : t.includes("ndjson") || t.includes("x-ndjson") ? "ndjson" : "json";
|
|
12165
13613
|
}
|
|
@@ -12168,15 +13616,15 @@ function xt(e) {
|
|
|
12168
13616
|
* Response, auto-detecting the format from Content-Type when not specified.
|
|
12169
13617
|
*/
|
|
12170
13618
|
async function* Z(e, t) {
|
|
12171
|
-
switch (t ??
|
|
13619
|
+
switch (t ?? Ot(e.headers.get("content-type") ?? "")) {
|
|
12172
13620
|
case "sse":
|
|
12173
|
-
yield*
|
|
13621
|
+
yield* Ct(e);
|
|
12174
13622
|
break;
|
|
12175
13623
|
case "ndjson":
|
|
12176
|
-
yield*
|
|
13624
|
+
yield* wt(e);
|
|
12177
13625
|
break;
|
|
12178
13626
|
case "json":
|
|
12179
|
-
yield*
|
|
13627
|
+
yield* Tt(e);
|
|
12180
13628
|
break;
|
|
12181
13629
|
}
|
|
12182
13630
|
}
|
|
@@ -12184,7 +13632,7 @@ async function* Z(e, t) {
|
|
|
12184
13632
|
* Create a reusable chat transport that sends requests and returns a
|
|
12185
13633
|
* streaming async generator. Supports retry/backoff and transport state callbacks.
|
|
12186
13634
|
*/
|
|
12187
|
-
function
|
|
13635
|
+
function kt(e) {
|
|
12188
13636
|
let t = (t) => {
|
|
12189
13637
|
e.onStateChange?.(t);
|
|
12190
13638
|
}, n = e.retry?.maxAttempts ?? 1, r = e.retry?.baseDelayMs ?? 1e3, i = e.retry?.maxDelayMs ?? 3e4;
|
|
@@ -12222,13 +13670,13 @@ function St(e) {
|
|
|
12222
13670
|
retryInMs: e,
|
|
12223
13671
|
attempt: c + 1,
|
|
12224
13672
|
maxAttempts: n
|
|
12225
|
-
}), await
|
|
13673
|
+
}), await jt(e);
|
|
12226
13674
|
continue;
|
|
12227
13675
|
}
|
|
12228
13676
|
break;
|
|
12229
13677
|
}
|
|
12230
13678
|
if (!l.ok) {
|
|
12231
|
-
let e =
|
|
13679
|
+
let e = Dt(l.status);
|
|
12232
13680
|
s = /* @__PURE__ */ Error(`Chat transport error: ${l.status} ${l.statusText}`);
|
|
12233
13681
|
let a;
|
|
12234
13682
|
if (l.status === 429) {
|
|
@@ -12252,12 +13700,12 @@ function St(e) {
|
|
|
12252
13700
|
retryInMs: e,
|
|
12253
13701
|
attempt: c + 1,
|
|
12254
13702
|
maxAttempts: n
|
|
12255
|
-
}), await
|
|
13703
|
+
}), await jt(e);
|
|
12256
13704
|
continue;
|
|
12257
13705
|
}
|
|
12258
13706
|
break;
|
|
12259
13707
|
}
|
|
12260
|
-
return t({ state: "streaming" }),
|
|
13708
|
+
return t({ state: "streaming" }), At(Z(l, e.format), t);
|
|
12261
13709
|
}
|
|
12262
13710
|
throw s ?? /* @__PURE__ */ Error("Chat transport failed");
|
|
12263
13711
|
} };
|
|
@@ -12265,7 +13713,7 @@ function St(e) {
|
|
|
12265
13713
|
/**
|
|
12266
13714
|
* Wraps an async generator to emit `ready` state when the stream finishes.
|
|
12267
13715
|
*/
|
|
12268
|
-
async function*
|
|
13716
|
+
async function* At(e, t) {
|
|
12269
13717
|
try {
|
|
12270
13718
|
yield* e, t({ state: "ready" });
|
|
12271
13719
|
} catch (e) {
|
|
@@ -12275,7 +13723,7 @@ async function* Ct(e, t) {
|
|
|
12275
13723
|
}), e;
|
|
12276
13724
|
}
|
|
12277
13725
|
}
|
|
12278
|
-
function
|
|
13726
|
+
function jt(e) {
|
|
12279
13727
|
return new Promise((t) => setTimeout(t, e));
|
|
12280
13728
|
}
|
|
12281
13729
|
const Q = {
|
|
@@ -12285,7 +13733,7 @@ const Q = {
|
|
|
12285
13733
|
GENERATION_STOP: "native:generation-stop",
|
|
12286
13734
|
GENERATION_ERROR: "native:generation-error",
|
|
12287
13735
|
WARNING: "native:chat-warning"
|
|
12288
|
-
},
|
|
13736
|
+
}, Mt = [
|
|
12289
13737
|
"requestId",
|
|
12290
13738
|
"sessionId",
|
|
12291
13739
|
"conversationId",
|
|
@@ -12298,7 +13746,7 @@ const Q = {
|
|
|
12298
13746
|
"attempt",
|
|
12299
13747
|
"maxAttempts",
|
|
12300
13748
|
"chunkIndex"
|
|
12301
|
-
],
|
|
13749
|
+
], Nt = [
|
|
12302
13750
|
"query",
|
|
12303
13751
|
"message",
|
|
12304
13752
|
"delta",
|
|
@@ -12308,17 +13756,17 @@ const Q = {
|
|
|
12308
13756
|
"prompt",
|
|
12309
13757
|
"response"
|
|
12310
13758
|
];
|
|
12311
|
-
var
|
|
13759
|
+
var Pt = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g, Ft = /\b(?:\+?\d{1,3}[-.\s]?)?\(?\d{2,4}\)?[-.\s]?\d{3,4}[-.\s]?\d{3,4}\b/g, It = /\b(?:\d{4}[-\s]?){3}\d{4}\b/g;
|
|
12312
13760
|
/**
|
|
12313
13761
|
* Scrub common PII patterns from a string.
|
|
12314
13762
|
*
|
|
12315
13763
|
* Replaces email addresses, phone-like numbers, and credit-card-like
|
|
12316
13764
|
* number sequences with `[redacted]` placeholders.
|
|
12317
13765
|
*/
|
|
12318
|
-
function
|
|
12319
|
-
return e.replace(
|
|
13766
|
+
function Lt(e) {
|
|
13767
|
+
return e.replace(Pt, "[redacted:email]").replace(It, "[redacted:card]").replace(Ft, "[redacted:phone]");
|
|
12320
13768
|
}
|
|
12321
|
-
var
|
|
13769
|
+
var Rt = new Set(Nt);
|
|
12322
13770
|
/**
|
|
12323
13771
|
* Create a default redactor for the given telemetry level.
|
|
12324
13772
|
*
|
|
@@ -12330,7 +13778,7 @@ function $(e) {
|
|
|
12330
13778
|
return e === "debug" ? (e) => e : (e) => {
|
|
12331
13779
|
if (!e.detail) return e;
|
|
12332
13780
|
let t = {};
|
|
12333
|
-
for (let [n, r] of Object.entries(e.detail))
|
|
13781
|
+
for (let [n, r] of Object.entries(e.detail)) Rt.has(n) && typeof r == "string" ? t[n] = `[redacted:${r.length}chars]` : t[n] = r;
|
|
12334
13782
|
return {
|
|
12335
13783
|
...e,
|
|
12336
13784
|
detail: t
|
|
@@ -12341,7 +13789,7 @@ function $(e) {
|
|
|
12341
13789
|
* Dispatches telemetry events as `CustomEvent` instances on a given
|
|
12342
13790
|
* `EventTarget`, applying a configurable redactor before emission.
|
|
12343
13791
|
*/
|
|
12344
|
-
var
|
|
13792
|
+
var zt = class {
|
|
12345
13793
|
#e;
|
|
12346
13794
|
#t;
|
|
12347
13795
|
constructor(e, t = "minimal") {
|
|
@@ -12401,4 +13849,4 @@ var Mt = class {
|
|
|
12401
13849
|
});
|
|
12402
13850
|
}
|
|
12403
13851
|
};
|
|
12404
|
-
export {
|
|
13852
|
+
export { Qe as A2AAdapter, V as A2UIAdapter, st as ACTION_REGISTRY, $e as AGUIAdapter, Q as CHAT_EVENTS, re as COMPONENT_MAP, De as COMPOSITION_MAP, k as ComponentRegistry, we as CompositionRegistry, Ze as DirectAdapter, He as NA2UI, Ge as NAgentSession, Je as NCatalog, at as NChatAvatar, it as NChatFeed, et as NChatInput, tt as NChatInputAdvanced, St as NChatInputStructured, lt as NChatMessage, ht as NChatMessageActivity, bt as NChatMessageGenUI, vt as NChatMessageSeed, ft as NChatMessageText, dt as NChatMessages, nt as NChatPanel, We as NEventEmitter, Xe as NSessionManager, qe as NSurfaceRegistry, ct as ROLE_DEFAULTS, Mt as SAFE_FIELDS, Nt as SENSITIVE_FIELDS, ke as SSETransport, B as SurfaceManager, zt as TelemetryEmitter, Oe as WebSocketTransport, P as a2uiToUINode, X as backoffDelay, G as buildCatalogFromRegistry, Dt as classifyHttpError, Et as classifyStreamEnd, he as conversionToPlan, Ce as createA2UIAdapter, Z as createChatStream, kt as createChatTransport, $ as createDefaultRedactor, je as createSSETransport, Se as createSurfaceManager, Ae as createWebSocketTransport, ce as dateTimeInputType, Ee as defaultCompositionRegistry, A as defaultRegistry, Ot as detectFormat, ae as getCompatibleTypes, ie as getComponentCategory, N as getSupportedTypes, Me as installA2UI, ee as isActionMessage, D as isCatalogRequest, ne as isCatalogResponse, C as isCreateSurface, S as isDataBinding, E as isDeleteSurface, te as isErrorMessage, w as isUpdateComponents, T as isUpdateDataModel, Tt as parseJSON, wt as parseNDJSON, Ct as parseSSE, O as parseServerMessage, q as renderInline, J as renderMarkdown, M as resolveA2UIType, Te as resolveComponent, L as resolveJsonPointer, j as resolveNativeTag, mt as sanitizeHtml, Lt as scrubPII, R as setJsonPointer, ue as textFieldInputType, se as textVariantTag, pe as uiNodeToA2UI };
|