@nonoun/native-ai 1.0.21 → 1.0.23
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/a2ui/a2ui-diagnostics.d.ts +31 -0
- package/dist/a2ui/a2ui-diagnostics.d.ts.map +1 -0
- package/dist/a2ui/a2ui-element.d.ts +30 -0
- package/dist/a2ui/a2ui-element.d.ts.map +1 -0
- package/dist/a2ui/a2ui-presets.d.ts +22 -0
- package/dist/a2ui/a2ui-presets.d.ts.map +1 -0
- package/dist/a2ui/adapters/a2a-adapter.d.ts +38 -0
- package/dist/a2ui/adapters/a2a-adapter.d.ts.map +1 -0
- package/dist/a2ui/adapters/adapter-types.d.ts +19 -0
- package/dist/a2ui/adapters/adapter-types.d.ts.map +1 -0
- package/dist/a2ui/adapters/ag-ui-adapter.d.ts +42 -0
- package/dist/a2ui/adapters/ag-ui-adapter.d.ts.map +1 -0
- package/dist/a2ui/adapters/direct-adapter.d.ts +30 -0
- package/dist/a2ui/adapters/direct-adapter.d.ts.map +1 -0
- package/dist/a2ui/adapters/index.d.ts +8 -0
- package/dist/a2ui/adapters/index.d.ts.map +1 -0
- package/dist/a2ui/index.d.ts +15 -0
- package/dist/a2ui/index.d.ts.map +1 -0
- package/dist/a2ui/install.d.ts +23 -0
- package/dist/a2ui/install.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-adapter.d.ts +52 -0
- package/dist/a2ui/protocol/a2ui-adapter.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-component-map.d.ts +98 -0
- package/dist/a2ui/protocol/a2ui-component-map.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-composition-map.d.ts +101 -0
- package/dist/a2ui/protocol/a2ui-composition-map.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-converter.d.ts +37 -0
- package/dist/a2ui/protocol/a2ui-converter.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-surface.d.ts +34 -0
- package/dist/a2ui/protocol/a2ui-surface.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-transport.d.ts +80 -0
- package/dist/a2ui/protocol/a2ui-transport.d.ts.map +1 -0
- package/dist/a2ui/protocol/a2ui-types.d.ts +104 -0
- package/dist/a2ui/protocol/a2ui-types.d.ts.map +1 -0
- package/dist/a2ui/protocol/index.d.ts +15 -0
- package/dist/a2ui/protocol/index.d.ts.map +1 -0
- package/dist/a2ui/protocol/kernel-bridge.d.ts +114 -0
- package/dist/a2ui/protocol/kernel-bridge.d.ts.map +1 -0
- package/dist/a2ui/register.d.ts +12 -0
- package/dist/a2ui/register.d.ts.map +1 -0
- package/dist/a2ui/session/agent-session.d.ts +44 -0
- package/dist/a2ui/session/agent-session.d.ts.map +1 -0
- package/dist/a2ui/session/catalog.d.ts +41 -0
- package/dist/a2ui/session/catalog.d.ts.map +1 -0
- package/dist/a2ui/session/event-emitter.d.ts +17 -0
- package/dist/a2ui/session/event-emitter.d.ts.map +1 -0
- package/dist/a2ui/session/index.d.ts +9 -0
- package/dist/a2ui/session/index.d.ts.map +1 -0
- package/dist/a2ui/session/session-manager.d.ts +33 -0
- package/dist/a2ui/session/session-manager.d.ts.map +1 -0
- package/dist/a2ui/session/surface-registry.d.ts +32 -0
- package/dist/a2ui/session/surface-registry.d.ts.map +1 -0
- package/dist/a2ui/session/types.d.ts +27 -0
- package/dist/a2ui/session/types.d.ts.map +1 -0
- package/dist/chat/avatar/chat-avatar-element.d.ts +18 -0
- package/dist/chat/avatar/chat-avatar-element.d.ts.map +1 -0
- package/dist/chat/avatar/index.d.ts +2 -0
- package/dist/chat/avatar/index.d.ts.map +1 -0
- package/dist/chat/avatar/n-chat-avatar.d.ts +2 -0
- package/dist/chat/avatar/n-chat-avatar.d.ts.map +1 -0
- package/dist/chat/chat-input-element.d.ts +35 -0
- package/dist/chat/chat-input-element.d.ts.map +1 -0
- package/dist/chat/chat-panel-element.d.ts +100 -0
- package/dist/chat/chat-panel-element.d.ts.map +1 -0
- package/dist/chat/feed/chat-feed-element.d.ts +48 -0
- package/dist/chat/feed/chat-feed-element.d.ts.map +1 -0
- package/dist/chat/feed/index.d.ts +2 -0
- package/dist/chat/feed/index.d.ts.map +1 -0
- package/dist/chat/feed/n-chat-feed.d.ts +2 -0
- package/dist/chat/feed/n-chat-feed.d.ts.map +1 -0
- package/dist/chat/gateway/adapter-chatgpt.d.ts +67 -0
- package/dist/chat/gateway/adapter-chatgpt.d.ts.map +1 -0
- package/dist/chat/gateway/adapter-claude.d.ts +68 -0
- package/dist/chat/gateway/adapter-claude.d.ts.map +1 -0
- package/dist/chat/gateway/adapter-mock.d.ts +3 -0
- package/dist/chat/gateway/adapter-mock.d.ts.map +1 -0
- package/dist/chat/gateway/adapter.d.ts +71 -0
- package/dist/chat/gateway/adapter.d.ts.map +1 -0
- package/dist/chat/gateway/controller.d.ts +46 -0
- package/dist/chat/gateway/controller.d.ts.map +1 -0
- package/dist/chat/gateway/index.d.ts +9 -0
- package/dist/chat/gateway/index.d.ts.map +1 -0
- package/dist/chat/gateway/runtime.d.ts +53 -0
- package/dist/chat/gateway/runtime.d.ts.map +1 -0
- package/dist/chat/gateway/types.d.ts +73 -0
- package/dist/chat/gateway/types.d.ts.map +1 -0
- package/dist/chat/gateway.d.ts +2 -0
- package/dist/chat/gateway.d.ts.map +1 -0
- package/dist/chat/index.d.ts +17 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/message/chat-input-structured-element.d.ts +43 -0
- package/dist/chat/message/chat-input-structured-element.d.ts.map +1 -0
- package/dist/chat/message/chat-message-activity-element.d.ts +32 -0
- package/dist/chat/message/chat-message-activity-element.d.ts.map +1 -0
- package/dist/chat/message/chat-message-element.d.ts +44 -0
- package/dist/chat/message/chat-message-element.d.ts.map +1 -0
- package/dist/chat/message/chat-message-genui-element.d.ts +45 -0
- package/dist/chat/message/chat-message-genui-element.d.ts.map +1 -0
- package/dist/chat/message/chat-message-seed-element.d.ts +33 -0
- package/dist/chat/message/chat-message-seed-element.d.ts.map +1 -0
- package/dist/chat/message/chat-message-text-element.d.ts +37 -0
- package/dist/chat/message/chat-message-text-element.d.ts.map +1 -0
- package/dist/chat/message/chat-messages-element.d.ts +39 -0
- package/dist/chat/message/chat-messages-element.d.ts.map +1 -0
- package/dist/chat/message/index.d.ts +8 -0
- package/dist/chat/message/index.d.ts.map +1 -0
- package/dist/chat/message/n-chat-message.d.ts +2 -0
- package/dist/chat/message/n-chat-message.d.ts.map +1 -0
- package/dist/chat/register.d.ts +13 -0
- package/dist/chat/register.d.ts.map +1 -0
- package/dist/chat/stream/classify.d.ts +19 -0
- package/dist/chat/stream/classify.d.ts.map +1 -0
- package/dist/chat/stream/create-transport.d.ts +19 -0
- package/dist/chat/stream/create-transport.d.ts.map +1 -0
- package/dist/chat/stream/index.d.ts +9 -0
- package/dist/chat/stream/index.d.ts.map +1 -0
- package/dist/chat/stream/parse-json.d.ts +9 -0
- package/dist/chat/stream/parse-json.d.ts.map +1 -0
- package/dist/chat/stream/parse-ndjson.d.ts +9 -0
- package/dist/chat/stream/parse-ndjson.d.ts.map +1 -0
- package/dist/chat/stream/parse-sse.d.ts +9 -0
- package/dist/chat/stream/parse-sse.d.ts.map +1 -0
- package/dist/chat/stream/types.d.ts +42 -0
- package/dist/chat/stream/types.d.ts.map +1 -0
- package/dist/chat/telemetry/emitter.d.ts +20 -0
- package/dist/chat/telemetry/emitter.d.ts.map +1 -0
- package/dist/chat/telemetry/events.d.ts +11 -0
- package/dist/chat/telemetry/events.d.ts.map +1 -0
- package/dist/chat/telemetry/index.d.ts +5 -0
- package/dist/chat/telemetry/index.d.ts.map +1 -0
- package/dist/chat/telemetry/redactor.d.ts +17 -0
- package/dist/chat/telemetry/redactor.d.ts.map +1 -0
- package/dist/chat/telemetry/types.d.ts +27 -0
- package/dist/chat/telemetry/types.d.ts.map +1 -0
- package/dist/gateway.d.ts +2 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/native-ai.css +1567 -0
- package/dist/native-ai.js +252 -202
- package/dist/register.d.ts +12 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +246 -196
- package/package.json +1 -1
package/dist/register.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NButton as e, NContainer as t, NDialog as n, NIcon as r, NListbox as i, NOption as a, NOptionGroup as o, NOptionGroupHeader as s, NSegment as c, NSegmentedControl as l, NSelect as u, NTextarea as d, NToolbar as f, NativeElement as p, PresentController as m, ResizeController as h, VirtualScrollController as g, computed as _, createDisabledEffect as v, define as y, effect as ee, registerIcon as b, signal as x, uid as S } from "@nonoun/native-ui";
|
|
2
|
-
import { Decoration as C, EditorView as
|
|
3
|
-
import { json as
|
|
4
|
-
import { linter as
|
|
2
|
+
import { Decoration as C, EditorView as te, StateEffect as ne, StateField as re, keymap as ie } from "@nonoun/native-code";
|
|
3
|
+
import { json as w } from "@codemirror/lang-json";
|
|
4
|
+
import { linter as ae } from "@codemirror/lint";
|
|
5
5
|
import "@nonoun/native-code/register";
|
|
6
|
-
import { Kernel as
|
|
7
|
-
var
|
|
6
|
+
import { Kernel as oe, resetKernel as se } from "@nonoun/native-ui/kernel";
|
|
7
|
+
var T = new Set([
|
|
8
8
|
"createSurface",
|
|
9
9
|
"updateComponents",
|
|
10
10
|
"updateDataModel",
|
|
@@ -15,7 +15,7 @@ var D = new Set([
|
|
|
15
15
|
* Find top-level `{}` blocks using brace-counting with string-escape awareness.
|
|
16
16
|
* Same algorithm as the workbench's `#getEnvelopes()` method.
|
|
17
17
|
*/
|
|
18
|
-
function
|
|
18
|
+
function ce(e) {
|
|
19
19
|
let t = [], n = 0, r = -1, i = !1, a = !1;
|
|
20
20
|
for (let o = 0; o < e.length; o++) {
|
|
21
21
|
let s = e[o];
|
|
@@ -48,8 +48,8 @@ function oe(e) {
|
|
|
48
48
|
* const ext = linter(a2uiLinter);
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
function
|
|
52
|
-
let t = e.state.doc.toString(), n = [], r =
|
|
51
|
+
function le(e) {
|
|
52
|
+
let t = e.state.doc.toString(), n = [], r = ce(t), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = [], s = /* @__PURE__ */ new Map();
|
|
53
53
|
for (let e of r) {
|
|
54
54
|
let { from: t, to: r, text: c } = e, l;
|
|
55
55
|
try {
|
|
@@ -73,13 +73,13 @@ function se(e) {
|
|
|
73
73
|
});
|
|
74
74
|
continue;
|
|
75
75
|
}
|
|
76
|
-
let u = Object.keys(l), d = u.find((e) =>
|
|
76
|
+
let u = Object.keys(l), d = u.find((e) => T.has(e)), f = u.filter((e) => !T.has(e) && e !== "version");
|
|
77
77
|
if (!d && f.length > 0) {
|
|
78
78
|
n.push({
|
|
79
79
|
from: t,
|
|
80
80
|
to: r,
|
|
81
81
|
severity: "error",
|
|
82
|
-
message: `Unknown envelope key: "${f[0]}". Expected one of: ${[...
|
|
82
|
+
message: `Unknown envelope key: "${f[0]}". Expected one of: ${[...T].join(", ")}`
|
|
83
83
|
});
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
@@ -88,7 +88,7 @@ function se(e) {
|
|
|
88
88
|
from: t,
|
|
89
89
|
to: r,
|
|
90
90
|
severity: "error",
|
|
91
|
-
message: `Missing envelope key. Expected one of: ${[...
|
|
91
|
+
message: `Missing envelope key. Expected one of: ${[...T].join(", ")}`
|
|
92
92
|
});
|
|
93
93
|
continue;
|
|
94
94
|
}
|
|
@@ -150,29 +150,29 @@ function se(e) {
|
|
|
150
150
|
}
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function E(e) {
|
|
154
154
|
return typeof e == "object" && !!e && "path" in e && typeof e.path == "string" && Object.keys(e).length === 1;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ue(e) {
|
|
157
157
|
return "createSurface" in e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function de(e) {
|
|
160
160
|
return "updateComponents" in e;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function fe(e) {
|
|
163
163
|
return "updateDataModel" in e;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function pe(e) {
|
|
166
166
|
return "deleteSurface" in e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function me(e) {
|
|
169
169
|
return "requestCatalog" in e;
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* Parse a raw JSON string into a typed A2UI server message.
|
|
173
173
|
* Returns null if the JSON is not a valid A2UI message.
|
|
174
174
|
*/
|
|
175
|
-
function
|
|
175
|
+
function D(e) {
|
|
176
176
|
try {
|
|
177
177
|
let t = JSON.parse(e);
|
|
178
178
|
return "createSurface" in t || "updateComponents" in t || "updateDataModel" in t || "deleteSurface" in t || "requestCatalog" in t ? t : null;
|
|
@@ -190,7 +190,7 @@ function pe(e) {
|
|
|
190
190
|
* change tracking via a signal. The default singleton (`defaultRegistry`)
|
|
191
191
|
* preserves backward compatibility with existing free-function imports.
|
|
192
192
|
*/
|
|
193
|
-
var
|
|
193
|
+
var he = class e {
|
|
194
194
|
#e = /* @__PURE__ */ new Map();
|
|
195
195
|
#t = /* @__PURE__ */ new Map();
|
|
196
196
|
#n = /* @__PURE__ */ new Map();
|
|
@@ -293,8 +293,34 @@ var me = class e {
|
|
|
293
293
|
this.#t.clear();
|
|
294
294
|
for (let e of this.#e.values()) e.nativeTag !== "div" && e.nativeTag !== "span" && !this.#t.has(e.nativeTag) && this.#t.set(e.nativeTag, e);
|
|
295
295
|
}
|
|
296
|
-
}
|
|
297
|
-
|
|
296
|
+
}, O = [
|
|
297
|
+
{
|
|
298
|
+
attr: "intent",
|
|
299
|
+
type: "'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'",
|
|
300
|
+
note: "Color intent — drives background, border, and text color tokens"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
attr: "variant",
|
|
304
|
+
type: "'default' | 'primary' | 'secondary' | 'ghost' | 'outline'",
|
|
305
|
+
note: "Visual weight — primary=filled, ghost=transparent, outline=bordered"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
attr: "size",
|
|
309
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
|
|
310
|
+
note: "Component scale — affects height, padding, font-size, icon-size"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
attr: "radius",
|
|
314
|
+
type: "'none' | 'sm' | 'md' | 'lg' | 'full'",
|
|
315
|
+
note: "Border radius override"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
attr: "density",
|
|
319
|
+
type: "'compact' | 'inline'",
|
|
320
|
+
note: "compact=reduced padding, inline=minimal height"
|
|
321
|
+
}
|
|
322
|
+
];
|
|
323
|
+
const k = new he([
|
|
298
324
|
{
|
|
299
325
|
a2uiType: "Text",
|
|
300
326
|
nativeTag: "span",
|
|
@@ -326,15 +352,19 @@ const k = new me([
|
|
|
326
352
|
event: "native:press",
|
|
327
353
|
description: "Fires on click or keyboard activation (Enter/Space)."
|
|
328
354
|
}],
|
|
329
|
-
properties: [
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
355
|
+
properties: [
|
|
356
|
+
...O,
|
|
357
|
+
{
|
|
358
|
+
attr: "disabled",
|
|
359
|
+
type: "boolean",
|
|
360
|
+
reactive: !0
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
attr: "type",
|
|
364
|
+
type: "'button' | 'submit' | 'reset'",
|
|
365
|
+
reactive: !0
|
|
366
|
+
}
|
|
367
|
+
],
|
|
338
368
|
methods: []
|
|
339
369
|
},
|
|
340
370
|
{
|
|
@@ -368,6 +398,7 @@ const k = new me([
|
|
|
368
398
|
}
|
|
369
399
|
],
|
|
370
400
|
properties: [
|
|
401
|
+
...O,
|
|
371
402
|
{
|
|
372
403
|
attr: "value",
|
|
373
404
|
type: "string",
|
|
@@ -454,6 +485,7 @@ const k = new me([
|
|
|
454
485
|
}
|
|
455
486
|
],
|
|
456
487
|
properties: [
|
|
488
|
+
...O,
|
|
457
489
|
{
|
|
458
490
|
attr: "value",
|
|
459
491
|
type: "string",
|
|
@@ -525,6 +557,7 @@ const k = new me([
|
|
|
525
557
|
description: "Fires when checked state toggles."
|
|
526
558
|
}],
|
|
527
559
|
properties: [
|
|
560
|
+
...O,
|
|
528
561
|
{
|
|
529
562
|
attr: "checked",
|
|
530
563
|
type: "boolean",
|
|
@@ -572,6 +605,7 @@ const k = new me([
|
|
|
572
605
|
description: "Fires when toggled on/off."
|
|
573
606
|
}],
|
|
574
607
|
properties: [
|
|
608
|
+
...O,
|
|
575
609
|
{
|
|
576
610
|
attr: "checked",
|
|
577
611
|
type: "boolean",
|
|
@@ -616,6 +650,7 @@ const k = new me([
|
|
|
616
650
|
description: "Fires when selection changes."
|
|
617
651
|
}],
|
|
618
652
|
properties: [
|
|
653
|
+
...O,
|
|
619
654
|
{
|
|
620
655
|
attr: "value",
|
|
621
656
|
type: "string",
|
|
@@ -670,6 +705,7 @@ const k = new me([
|
|
|
670
705
|
description: "Fires when slider value changes."
|
|
671
706
|
}],
|
|
672
707
|
properties: [
|
|
708
|
+
...O,
|
|
673
709
|
{
|
|
674
710
|
attr: "value",
|
|
675
711
|
type: "number",
|
|
@@ -712,6 +748,7 @@ const k = new me([
|
|
|
712
748
|
description: "Fires when date/time value changes."
|
|
713
749
|
}],
|
|
714
750
|
properties: [
|
|
751
|
+
...O,
|
|
715
752
|
{
|
|
716
753
|
attr: "value",
|
|
717
754
|
type: "string",
|
|
@@ -814,13 +851,17 @@ const k = new me([
|
|
|
814
851
|
event: "close",
|
|
815
852
|
description: "Fires when the dialog is closed."
|
|
816
853
|
}],
|
|
817
|
-
properties: [
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
854
|
+
properties: [
|
|
855
|
+
...O,
|
|
856
|
+
{
|
|
857
|
+
attr: "no-close-on-escape",
|
|
858
|
+
type: "boolean"
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
attr: "no-close-on-backdrop",
|
|
862
|
+
type: "boolean"
|
|
863
|
+
}
|
|
864
|
+
],
|
|
824
865
|
methods: [{
|
|
825
866
|
name: "showModal",
|
|
826
867
|
returns: "void",
|
|
@@ -844,6 +885,7 @@ const k = new me([
|
|
|
844
885
|
description: "Fires when the active tab changes."
|
|
845
886
|
}],
|
|
846
887
|
properties: [
|
|
888
|
+
...O,
|
|
847
889
|
{
|
|
848
890
|
attr: "value",
|
|
849
891
|
type: "string",
|
|
@@ -876,6 +918,7 @@ const k = new me([
|
|
|
876
918
|
description: "Fires when the selected option changes."
|
|
877
919
|
}],
|
|
878
920
|
properties: [
|
|
921
|
+
...O,
|
|
879
922
|
{
|
|
880
923
|
attr: "disabled",
|
|
881
924
|
type: "boolean",
|
|
@@ -1017,6 +1060,7 @@ const k = new me([
|
|
|
1017
1060
|
description: "Fires when selection changes."
|
|
1018
1061
|
}],
|
|
1019
1062
|
properties: [
|
|
1063
|
+
...O,
|
|
1020
1064
|
{
|
|
1021
1065
|
attr: "value",
|
|
1022
1066
|
type: "string",
|
|
@@ -1089,15 +1133,19 @@ const k = new me([
|
|
|
1089
1133
|
nativeTag: "n-accordion",
|
|
1090
1134
|
childStrategy: "children",
|
|
1091
1135
|
events: [],
|
|
1092
|
-
properties: [
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1136
|
+
properties: [
|
|
1137
|
+
...O,
|
|
1138
|
+
{
|
|
1139
|
+
attr: "multiple",
|
|
1140
|
+
type: "boolean",
|
|
1141
|
+
reactive: !0
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
attr: "disabled",
|
|
1145
|
+
type: "boolean",
|
|
1146
|
+
reactive: !0
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1101
1149
|
methods: []
|
|
1102
1150
|
},
|
|
1103
1151
|
{
|
|
@@ -1157,6 +1205,7 @@ const k = new me([
|
|
|
1157
1205
|
}
|
|
1158
1206
|
],
|
|
1159
1207
|
properties: [
|
|
1208
|
+
...O,
|
|
1160
1209
|
{
|
|
1161
1210
|
attr: "selectable",
|
|
1162
1211
|
type: "boolean",
|
|
@@ -1192,14 +1241,18 @@ const k = new me([
|
|
|
1192
1241
|
max: "max"
|
|
1193
1242
|
},
|
|
1194
1243
|
events: [],
|
|
1195
|
-
properties: [
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1244
|
+
properties: [
|
|
1245
|
+
...O,
|
|
1246
|
+
{
|
|
1247
|
+
attr: "value",
|
|
1248
|
+
type: "number",
|
|
1249
|
+
reactive: !0
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
attr: "max",
|
|
1253
|
+
type: "number"
|
|
1254
|
+
}
|
|
1255
|
+
],
|
|
1203
1256
|
methods: []
|
|
1204
1257
|
},
|
|
1205
1258
|
{
|
|
@@ -1219,6 +1272,7 @@ const k = new me([
|
|
|
1219
1272
|
description: "Fires when the toast dismiss button is clicked."
|
|
1220
1273
|
}],
|
|
1221
1274
|
properties: [
|
|
1275
|
+
...O,
|
|
1222
1276
|
{
|
|
1223
1277
|
attr: "message",
|
|
1224
1278
|
type: "string"
|
|
@@ -1226,10 +1280,6 @@ const k = new me([
|
|
|
1226
1280
|
{
|
|
1227
1281
|
attr: "dismissible",
|
|
1228
1282
|
type: "boolean"
|
|
1229
|
-
},
|
|
1230
|
-
{
|
|
1231
|
-
attr: "intent",
|
|
1232
|
-
type: "'info' | 'success' | 'warning' | 'danger'"
|
|
1233
1283
|
}
|
|
1234
1284
|
],
|
|
1235
1285
|
methods: []
|
|
@@ -1278,7 +1328,7 @@ function j(e, t) {
|
|
|
1278
1328
|
function M() {
|
|
1279
1329
|
return k.getSupportedTypes();
|
|
1280
1330
|
}
|
|
1281
|
-
var
|
|
1331
|
+
var ge = {
|
|
1282
1332
|
h1: "h1",
|
|
1283
1333
|
h2: "h2",
|
|
1284
1334
|
h3: "h3",
|
|
@@ -1292,16 +1342,16 @@ var he = {
|
|
|
1292
1342
|
* For A2UI Text components, resolve the variant to an HTML tag.
|
|
1293
1343
|
* Returns 'span' by default.
|
|
1294
1344
|
*/
|
|
1295
|
-
function
|
|
1296
|
-
return e ?
|
|
1345
|
+
function _e(e) {
|
|
1346
|
+
return e ? ge[e] ?? "span" : "span";
|
|
1297
1347
|
}
|
|
1298
1348
|
/**
|
|
1299
1349
|
* For A2UI DateTimeInput components, resolve enableDate/enableTime to HTML input type.
|
|
1300
1350
|
*/
|
|
1301
|
-
function
|
|
1351
|
+
function ve(e, t) {
|
|
1302
1352
|
return e && t ? "datetime-local" : t && !e ? "time" : "date";
|
|
1303
1353
|
}
|
|
1304
|
-
var
|
|
1354
|
+
var ye = {
|
|
1305
1355
|
number: "number",
|
|
1306
1356
|
obscured: "password",
|
|
1307
1357
|
shortText: "text",
|
|
@@ -1310,8 +1360,8 @@ var ve = {
|
|
|
1310
1360
|
/**
|
|
1311
1361
|
* For A2UI TextField components, resolve the variant to an HTML input type attribute.
|
|
1312
1362
|
*/
|
|
1313
|
-
function
|
|
1314
|
-
return e ?
|
|
1363
|
+
function be(e) {
|
|
1364
|
+
return e ? ye[e] ?? "text" : "text";
|
|
1315
1365
|
}
|
|
1316
1366
|
/**
|
|
1317
1367
|
* A2UI Converter
|
|
@@ -1319,7 +1369,7 @@ function ye(e) {
|
|
|
1319
1369
|
* Bidirectional conversion between A2UI flat adjacency lists
|
|
1320
1370
|
* and native-ui nested UINode trees.
|
|
1321
1371
|
*/
|
|
1322
|
-
var
|
|
1372
|
+
var xe = 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(".")), Se = new Set([
|
|
1323
1373
|
"Header",
|
|
1324
1374
|
"Body",
|
|
1325
1375
|
"Footer"
|
|
@@ -1384,7 +1434,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1384
1434
|
textContent: s.text ?? `[Unknown: ${s.component}]`
|
|
1385
1435
|
};
|
|
1386
1436
|
let l = c.nativeTag;
|
|
1387
|
-
s.component === "Text" && s.variant && (l =
|
|
1437
|
+
s.component === "Text" && s.variant && (l = _e(s.variant));
|
|
1388
1438
|
let u = {};
|
|
1389
1439
|
if (u["data-a2ui"] = s.component, c.defaultAttributes && Object.assign(u, c.defaultAttributes), s.variant && c.variantMap) {
|
|
1390
1440
|
let e = c.variantMap[s.variant];
|
|
@@ -1392,7 +1442,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1392
1442
|
} else s.variant && s.component !== "Text" && (u.variant = s.variant);
|
|
1393
1443
|
if (c.propertyMap) for (let [t, n] of Object.entries(c.propertyMap)) {
|
|
1394
1444
|
let i = s[t];
|
|
1395
|
-
if (i !== void 0) if (
|
|
1445
|
+
if (i !== void 0) if (E(i)) {
|
|
1396
1446
|
let t = r.get(e);
|
|
1397
1447
|
t || (t = [], r.set(e, t)), t.push({
|
|
1398
1448
|
property: n,
|
|
@@ -1401,10 +1451,10 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1401
1451
|
} else u[n] = String(i);
|
|
1402
1452
|
}
|
|
1403
1453
|
if (s.disabled && (u.disabled = ""), s.accessibility?.label && (u["aria-label"] = s.accessibility.label), s.component === "TextField") {
|
|
1404
|
-
let e =
|
|
1454
|
+
let e = be(s.variant);
|
|
1405
1455
|
e !== "text" && (u.type = e);
|
|
1406
1456
|
}
|
|
1407
|
-
if (s.component === "DateTimeInput" && (u.type =
|
|
1457
|
+
if (s.component === "DateTimeInput" && (u.type = ve(s.enableDate, s.enableTime)), (s.component === "TextField" || s.component === "DateTimeInput" || s.component === "Slider") && s.label) if (E(s.label)) {
|
|
1408
1458
|
let t = r.get(e);
|
|
1409
1459
|
t || (t = [], r.set(e, t)), t.push({
|
|
1410
1460
|
property: "aria-label",
|
|
@@ -1416,14 +1466,14 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1416
1466
|
u.style = `--n-progress: ${t > 0 ? Math.min(1, Math.max(0, e / t)) : 0}`, u.value && (u["data-value"] = u.value, delete u.value), u.max && (u["data-max"] = u.max, delete u.max);
|
|
1417
1467
|
}
|
|
1418
1468
|
let d;
|
|
1419
|
-
if (s.text !== void 0) if (
|
|
1469
|
+
if (s.text !== void 0) if (E(s.text)) {
|
|
1420
1470
|
let t = r.get(e);
|
|
1421
1471
|
t || (t = [], r.set(e, t)), t.push({
|
|
1422
1472
|
property: "textContent",
|
|
1423
1473
|
path: s.text.path
|
|
1424
1474
|
});
|
|
1425
1475
|
} else d = s.text;
|
|
1426
|
-
for (let [e, t] of Object.entries(s))
|
|
1476
|
+
for (let [e, t] of Object.entries(s)) xe.has(e) || typeof t == "string" && (u[e] = t);
|
|
1427
1477
|
let f;
|
|
1428
1478
|
s.action?.event && c.actionEvent && (f = { [c.actionEvent]: `a2ui:${a}:${e}:${s.action.event.name}` });
|
|
1429
1479
|
let p, m = s.children ?? (s.child ? [s.child] : void 0);
|
|
@@ -1479,7 +1529,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1479
1529
|
}
|
|
1480
1530
|
} else if (s.component === "Card" && m && m.length > 0) if (m.some((e) => {
|
|
1481
1531
|
let n = t.get(e);
|
|
1482
|
-
return n ?
|
|
1532
|
+
return n ? Se.has(n.component) : !1;
|
|
1483
1533
|
})) p = m.map((e) => P(e, t, n, r, i, a, o));
|
|
1484
1534
|
else {
|
|
1485
1535
|
p = [];
|
|
@@ -1514,7 +1564,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1514
1564
|
attributes: { slot: "label" },
|
|
1515
1565
|
textContent: d
|
|
1516
1566
|
}], d = void 0;
|
|
1517
|
-
else if (c.childStrategy === "textContent" && s.label && !d) if (
|
|
1567
|
+
else if (c.childStrategy === "textContent" && s.label && !d) if (E(s.label)) {
|
|
1518
1568
|
let t = r.get(e);
|
|
1519
1569
|
t || (t = [], r.set(e, t)), t.push({
|
|
1520
1570
|
property: "textContent",
|
|
@@ -1530,7 +1580,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1530
1580
|
"poster"
|
|
1531
1581
|
]) u[e] && (n[e] = u[e], delete u[e]);
|
|
1532
1582
|
if (s.component === "Image" && s.url !== void 0) {
|
|
1533
|
-
if (
|
|
1583
|
+
if (E(s.url)) {
|
|
1534
1584
|
let t = r.get(`${e}-inner`);
|
|
1535
1585
|
t || (t = [], r.set(`${e}-inner`, t)), t.push({
|
|
1536
1586
|
property: "src",
|
|
@@ -1555,7 +1605,7 @@ function P(e, t, n, r, i, a, o = A) {
|
|
|
1555
1605
|
...f ? { events: f } : {}
|
|
1556
1606
|
};
|
|
1557
1607
|
}
|
|
1558
|
-
function
|
|
1608
|
+
function Ce(e, t) {
|
|
1559
1609
|
let n = [], r = t?.registry ? (e, n) => t.registry.resolveA2UIType(e, n) : j, i = t?.registry ? (e) => t.registry.resolveNativeTag(e) : A;
|
|
1560
1610
|
return F(e, n, t?.surfaceId ?? "default", r, i), n;
|
|
1561
1611
|
}
|
|
@@ -1584,8 +1634,8 @@ function F(e, t, n, r = j, i = A) {
|
|
|
1584
1634
|
for (let a of e.children) F(a, t, n, r, i);
|
|
1585
1635
|
}
|
|
1586
1636
|
if (e.textContent && (a === "CheckBox" || a === "Switch" || a === "ListItem" ? s.label = e.textContent : s.text = e.textContent), e.attributes) {
|
|
1587
|
-
let t = o?.propertyMap ?
|
|
1588
|
-
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 ?
|
|
1637
|
+
let t = o?.propertyMap ? we(o.propertyMap) : {};
|
|
1638
|
+
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 ? we(o.variantMap) : {})[r] ?? r));
|
|
1589
1639
|
}
|
|
1590
1640
|
if (e.events) for (let [t, n] of Object.entries(e.events)) {
|
|
1591
1641
|
let e = n.split(":");
|
|
@@ -1593,7 +1643,7 @@ function F(e, t, n, r = j, i = A) {
|
|
|
1593
1643
|
}
|
|
1594
1644
|
t.push(s);
|
|
1595
1645
|
}
|
|
1596
|
-
function
|
|
1646
|
+
function we(e) {
|
|
1597
1647
|
let t = {};
|
|
1598
1648
|
for (let [n, r] of Object.entries(e)) t[r] = n;
|
|
1599
1649
|
return t;
|
|
@@ -1601,7 +1651,7 @@ function I(e) {
|
|
|
1601
1651
|
/**
|
|
1602
1652
|
* Wrap a conversion result as a UIPlan.
|
|
1603
1653
|
*/
|
|
1604
|
-
function
|
|
1654
|
+
function Te(e, t = "generated") {
|
|
1605
1655
|
return Object.freeze({
|
|
1606
1656
|
id: S("a2ui-plan"),
|
|
1607
1657
|
version: 1,
|
|
@@ -1616,18 +1666,18 @@ function Ce(e, t = "generated") {
|
|
|
1616
1666
|
* Manages A2UI surface lifecycle: create → updateComponents → updateDataModel → delete.
|
|
1617
1667
|
* Each surface maps to one UIPlan in the kernel.
|
|
1618
1668
|
*/
|
|
1619
|
-
function
|
|
1669
|
+
function I(e, t) {
|
|
1620
1670
|
if (!t || t === "/") return e;
|
|
1621
|
-
let n = t.replace(/^\//, "").split("/").map(
|
|
1671
|
+
let n = t.replace(/^\//, "").split("/").map(L), r = e;
|
|
1622
1672
|
for (let e of n) {
|
|
1623
1673
|
if (typeof r != "object" || !r) return;
|
|
1624
1674
|
r = r[e];
|
|
1625
1675
|
}
|
|
1626
1676
|
return r;
|
|
1627
1677
|
}
|
|
1628
|
-
function
|
|
1678
|
+
function Ee(e, t, n) {
|
|
1629
1679
|
if (!t || t === "/") return;
|
|
1630
|
-
let r = t.replace(/^\//, "").split("/").map(
|
|
1680
|
+
let r = t.replace(/^\//, "").split("/").map(L), i = e;
|
|
1631
1681
|
for (let e = 0; e < r.length - 1; e++) {
|
|
1632
1682
|
let t = r[e];
|
|
1633
1683
|
(i[t] == null || typeof i[t] != "object") && (i[t] = {}), i = i[t];
|
|
@@ -1635,10 +1685,10 @@ function we(e, t, n) {
|
|
|
1635
1685
|
let a = r[r.length - 1];
|
|
1636
1686
|
n === void 0 ? delete i[a] : i[a] = n;
|
|
1637
1687
|
}
|
|
1638
|
-
function
|
|
1688
|
+
function L(e) {
|
|
1639
1689
|
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1640
1690
|
}
|
|
1641
|
-
var
|
|
1691
|
+
var De = class {
|
|
1642
1692
|
#e;
|
|
1643
1693
|
#t;
|
|
1644
1694
|
#n;
|
|
@@ -1650,7 +1700,7 @@ var Te = class {
|
|
|
1650
1700
|
this.#e = e, this.#t = t, this.#n = n ?? null, this.#r = r;
|
|
1651
1701
|
}
|
|
1652
1702
|
handleMessage(e, t) {
|
|
1653
|
-
|
|
1703
|
+
ue(e) ? this.#o(e, t) : de(e) ? this.#s(e, t) : fe(e) ? this.#u(e) : pe(e) && this.#d(e);
|
|
1654
1704
|
}
|
|
1655
1705
|
#o(e, t) {
|
|
1656
1706
|
let { surfaceId: n, catalogId: r, theme: i } = e.createSurface, a = this.#i.get(n);
|
|
@@ -1693,7 +1743,7 @@ var Te = class {
|
|
|
1693
1743
|
registry: this.#r
|
|
1694
1744
|
});
|
|
1695
1745
|
e.bindings = new Map(t.bindings);
|
|
1696
|
-
let n =
|
|
1746
|
+
let n = Te(t);
|
|
1697
1747
|
e.planId = n.id;
|
|
1698
1748
|
try {
|
|
1699
1749
|
let t = this.#e.executePlan(n, e.container);
|
|
@@ -1701,7 +1751,7 @@ var Te = class {
|
|
|
1701
1751
|
} catch {}
|
|
1702
1752
|
}
|
|
1703
1753
|
#l(e, t) {
|
|
1704
|
-
let n =
|
|
1754
|
+
let n = je(e.components, t, e.surfaceId, this.#r);
|
|
1705
1755
|
if (n.length === 0) return;
|
|
1706
1756
|
this.#e.patchPlan({
|
|
1707
1757
|
planId: e.planId,
|
|
@@ -1723,7 +1773,7 @@ var Te = class {
|
|
|
1723
1773
|
let { surfaceId: t, path: n, value: r } = e.updateDataModel, i = this.#i.get(t);
|
|
1724
1774
|
if (!i) return;
|
|
1725
1775
|
let a = { ...i.dataModel.value };
|
|
1726
|
-
!n || n === "/" ? i.dataModel.value = r ?? {} : (
|
|
1776
|
+
!n || n === "/" ? i.dataModel.value = r ?? {} : (Ee(a, n, r), i.dataModel.value = a);
|
|
1727
1777
|
}
|
|
1728
1778
|
#d(e) {
|
|
1729
1779
|
let { surfaceId: t } = e.deleteSurface, n = this.#i.get(t);
|
|
@@ -1738,7 +1788,7 @@ var Te = class {
|
|
|
1738
1788
|
let i = t.get(n);
|
|
1739
1789
|
if (i) for (let t of r) {
|
|
1740
1790
|
let n = ee(() => {
|
|
1741
|
-
let n = e.dataModel.value, r =
|
|
1791
|
+
let n = e.dataModel.value, r = I(n, t.path);
|
|
1742
1792
|
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);
|
|
1743
1793
|
});
|
|
1744
1794
|
e.bindingDisposers.push(n);
|
|
@@ -1750,7 +1800,7 @@ var Te = class {
|
|
|
1750
1800
|
e.actionDisposer = this.#e.bus.on((e) => e.type.startsWith(t), (t) => {
|
|
1751
1801
|
let n = t.type.split(":");
|
|
1752
1802
|
if (n.length < 4) return;
|
|
1753
|
-
let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ?
|
|
1803
|
+
let r = n[2], i = n[3], a = e.components.find((e) => e.id === r)?.action?.event?.context, o = a ? Oe(a, e.dataModel.value) : void 0;
|
|
1754
1804
|
this.#t({ action: {
|
|
1755
1805
|
surfaceId: e.surfaceId,
|
|
1756
1806
|
sourceComponentId: r,
|
|
@@ -1781,13 +1831,13 @@ var Te = class {
|
|
|
1781
1831
|
for (let e of this.#i.keys()) this.#d({ deleteSurface: { surfaceId: e } });
|
|
1782
1832
|
}
|
|
1783
1833
|
};
|
|
1784
|
-
function
|
|
1834
|
+
function Oe(e, t) {
|
|
1785
1835
|
let n = {};
|
|
1786
|
-
for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] =
|
|
1836
|
+
for (let [r, i] of Object.entries(e)) typeof i == "object" && i && "path" in i ? n[r] = I(t, i.path) : n[r] = i;
|
|
1787
1837
|
return n;
|
|
1788
1838
|
}
|
|
1789
1839
|
/** A2UI properties that map to HTML attributes on the rendered element. */
|
|
1790
|
-
var
|
|
1840
|
+
var ke = [
|
|
1791
1841
|
"variant",
|
|
1792
1842
|
"placeholder",
|
|
1793
1843
|
"name",
|
|
@@ -1800,8 +1850,8 @@ var De = [
|
|
|
1800
1850
|
"fit",
|
|
1801
1851
|
"style",
|
|
1802
1852
|
"intent"
|
|
1803
|
-
],
|
|
1804
|
-
function
|
|
1853
|
+
], Ae = ["value"];
|
|
1854
|
+
function je(e, t, n, r) {
|
|
1805
1855
|
let i = /* @__PURE__ */ new Map();
|
|
1806
1856
|
for (let t of e) i.set(t.id, t);
|
|
1807
1857
|
let a = /* @__PURE__ */ new Map();
|
|
@@ -1812,7 +1862,7 @@ function ke(e, t, n, r) {
|
|
|
1812
1862
|
targetId: e
|
|
1813
1863
|
});
|
|
1814
1864
|
for (let [e, s] of a) if (!i.has(e)) {
|
|
1815
|
-
let i =
|
|
1865
|
+
let i = Me(e, t);
|
|
1816
1866
|
if (i) {
|
|
1817
1867
|
let t = N([s], {
|
|
1818
1868
|
surfaceId: n,
|
|
@@ -1830,7 +1880,7 @@ function ke(e, t, n, r) {
|
|
|
1830
1880
|
let a = i.get(e);
|
|
1831
1881
|
if (a) {
|
|
1832
1882
|
if (s.component !== a.component) {
|
|
1833
|
-
let i = N(
|
|
1883
|
+
let i = N(R(e, t), {
|
|
1834
1884
|
surfaceId: n,
|
|
1835
1885
|
rootId: e,
|
|
1836
1886
|
registry: r
|
|
@@ -1843,7 +1893,7 @@ function ke(e, t, n, r) {
|
|
|
1843
1893
|
continue;
|
|
1844
1894
|
}
|
|
1845
1895
|
if (JSON.stringify(a.children ?? a.child ?? []) !== JSON.stringify(s.children ?? s.child ?? [])) {
|
|
1846
|
-
let i = N(
|
|
1896
|
+
let i = N(R(e, t), {
|
|
1847
1897
|
surfaceId: n,
|
|
1848
1898
|
rootId: e,
|
|
1849
1899
|
registry: r
|
|
@@ -1873,7 +1923,7 @@ function ke(e, t, n, r) {
|
|
|
1873
1923
|
targetId: e,
|
|
1874
1924
|
name: "disabled"
|
|
1875
1925
|
}));
|
|
1876
|
-
for (let t of
|
|
1926
|
+
for (let t of ke) {
|
|
1877
1927
|
let n = a[t], r = s[t];
|
|
1878
1928
|
r !== n && (r == null || r === !1 ? o.push({
|
|
1879
1929
|
type: "remove-attribute",
|
|
@@ -1886,7 +1936,7 @@ function ke(e, t, n, r) {
|
|
|
1886
1936
|
value: String(r)
|
|
1887
1937
|
}));
|
|
1888
1938
|
}
|
|
1889
|
-
for (let t of
|
|
1939
|
+
for (let t of Ae) {
|
|
1890
1940
|
let n = a[t], r = s[t];
|
|
1891
1941
|
r !== n && r !== void 0 && o.push({
|
|
1892
1942
|
type: "set-property",
|
|
@@ -1899,11 +1949,11 @@ function ke(e, t, n, r) {
|
|
|
1899
1949
|
}
|
|
1900
1950
|
return o;
|
|
1901
1951
|
}
|
|
1902
|
-
function
|
|
1952
|
+
function Me(e, t) {
|
|
1903
1953
|
for (let n of t) if (n.children?.includes(e) || n.child === e) return n.id;
|
|
1904
1954
|
return null;
|
|
1905
1955
|
}
|
|
1906
|
-
function
|
|
1956
|
+
function R(e, t) {
|
|
1907
1957
|
let n = /* @__PURE__ */ new Map();
|
|
1908
1958
|
for (let e of t) n.set(e.id, e);
|
|
1909
1959
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
@@ -1918,11 +1968,11 @@ function z(e, t) {
|
|
|
1918
1968
|
}
|
|
1919
1969
|
return a(e), r;
|
|
1920
1970
|
}
|
|
1921
|
-
var
|
|
1971
|
+
var Ne = class {
|
|
1922
1972
|
#e;
|
|
1923
1973
|
#t;
|
|
1924
1974
|
constructor(e, t) {
|
|
1925
|
-
this.#t = t ?? {}, this.#e = new
|
|
1975
|
+
this.#t = t ?? {}, this.#e = new De(e, (e) => {
|
|
1926
1976
|
this.#t.onClientMessage?.(e);
|
|
1927
1977
|
}, (e, t) => {
|
|
1928
1978
|
this.#t.onRender?.(e, t);
|
|
@@ -1934,7 +1984,7 @@ var je = class {
|
|
|
1934
1984
|
* If a container is provided, it is used as the render target for new surfaces.
|
|
1935
1985
|
*/
|
|
1936
1986
|
receive(e, t) {
|
|
1937
|
-
let n = typeof e == "string" ?
|
|
1987
|
+
let n = typeof e == "string" ? D(e) : e;
|
|
1938
1988
|
if (!n) {
|
|
1939
1989
|
this.#t.onClientMessage?.({ error: {
|
|
1940
1990
|
surfaceId: "",
|
|
@@ -1943,7 +1993,7 @@ var je = class {
|
|
|
1943
1993
|
} });
|
|
1944
1994
|
return;
|
|
1945
1995
|
}
|
|
1946
|
-
if (
|
|
1996
|
+
if (me(n)) {
|
|
1947
1997
|
this.#n(n.requestCatalog.surfaceId);
|
|
1948
1998
|
return;
|
|
1949
1999
|
}
|
|
@@ -1962,7 +2012,7 @@ var je = class {
|
|
|
1962
2012
|
* Returns null if invalid.
|
|
1963
2013
|
*/
|
|
1964
2014
|
parse(e) {
|
|
1965
|
-
return
|
|
2015
|
+
return D(e);
|
|
1966
2016
|
}
|
|
1967
2017
|
/**
|
|
1968
2018
|
* Convert a UIPlan to A2UI updateComponents format.
|
|
@@ -1975,7 +2025,7 @@ var je = class {
|
|
|
1975
2025
|
};
|
|
1976
2026
|
return { updateComponents: {
|
|
1977
2027
|
surfaceId: n,
|
|
1978
|
-
components:
|
|
2028
|
+
components: Ce(e.root, r)
|
|
1979
2029
|
} };
|
|
1980
2030
|
}
|
|
1981
2031
|
/**
|
|
@@ -2003,10 +2053,10 @@ var je = class {
|
|
|
2003
2053
|
this.#e.destroy();
|
|
2004
2054
|
}
|
|
2005
2055
|
};
|
|
2006
|
-
function
|
|
2007
|
-
return new
|
|
2056
|
+
function Pe(e, t) {
|
|
2057
|
+
return new Ne(e, t);
|
|
2008
2058
|
}
|
|
2009
|
-
const
|
|
2059
|
+
const Fe = [
|
|
2010
2060
|
{
|
|
2011
2061
|
id: "general",
|
|
2012
2062
|
label: "General"
|
|
@@ -2024,7 +2074,7 @@ const Ne = [
|
|
|
2024
2074
|
label: "Travel",
|
|
2025
2075
|
hidden: !0
|
|
2026
2076
|
}
|
|
2027
|
-
],
|
|
2077
|
+
], z = {
|
|
2028
2078
|
hello: {
|
|
2029
2079
|
label: "Hello World",
|
|
2030
2080
|
group: "general",
|
|
@@ -9408,7 +9458,7 @@ const Ne = [
|
|
|
9408
9458
|
* @fires native:a2ui-action - When an action fires inside the preview
|
|
9409
9459
|
* @fires native:a2ui-state - When surface state updates after processing envelopes
|
|
9410
9460
|
*/
|
|
9411
|
-
var
|
|
9461
|
+
var B = [
|
|
9412
9462
|
"json-in",
|
|
9413
9463
|
"json-out",
|
|
9414
9464
|
"html",
|
|
@@ -9416,7 +9466,7 @@ var V = [
|
|
|
9416
9466
|
"js",
|
|
9417
9467
|
"components",
|
|
9418
9468
|
"schema"
|
|
9419
|
-
],
|
|
9469
|
+
], Ie = {
|
|
9420
9470
|
"json-in": "IN",
|
|
9421
9471
|
"json-out": "OUT",
|
|
9422
9472
|
html: "HTML",
|
|
@@ -9424,7 +9474,7 @@ var V = [
|
|
|
9424
9474
|
js: "JS",
|
|
9425
9475
|
components: "UI",
|
|
9426
9476
|
schema: "SCHEMA"
|
|
9427
|
-
},
|
|
9477
|
+
}, Le = {
|
|
9428
9478
|
"json-in": "brackets-curly",
|
|
9429
9479
|
"json-out": "chat-circle-dots",
|
|
9430
9480
|
html: "code",
|
|
@@ -9432,21 +9482,21 @@ var V = [
|
|
|
9432
9482
|
js: "terminal",
|
|
9433
9483
|
components: "squares-four",
|
|
9434
9484
|
schema: "file-code"
|
|
9435
|
-
},
|
|
9485
|
+
}, Re = ne.define(), ze = C.line({ class: "cm-a2ui-sent" }), Be = C.line({ class: "cm-a2ui-next" }), Ve = re.define({
|
|
9436
9486
|
create() {
|
|
9437
9487
|
return C.none;
|
|
9438
9488
|
},
|
|
9439
9489
|
update(e, t) {
|
|
9440
|
-
for (let e of t.effects) if (e.is(
|
|
9490
|
+
for (let e of t.effects) if (e.is(Re)) {
|
|
9441
9491
|
let n = t.state.doc, { sentUpToLine: r, nextFromLine: i, nextToLine: a } = e.value, o = [];
|
|
9442
|
-
for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(
|
|
9443
|
-
for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(
|
|
9492
|
+
for (let e = 1; e <= Math.min(r, n.lines); e++) o.push(ze.range(n.line(e).from));
|
|
9493
|
+
for (let e = Math.max(1, i); e <= Math.min(a, n.lines); e++) o.push(Be.range(n.line(e).from));
|
|
9444
9494
|
return C.set(o, !0);
|
|
9445
9495
|
}
|
|
9446
9496
|
return e;
|
|
9447
9497
|
},
|
|
9448
|
-
provide: (e) =>
|
|
9449
|
-
}),
|
|
9498
|
+
provide: (e) => te.decorations.from(e)
|
|
9499
|
+
}), V = class extends p {
|
|
9450
9500
|
static observedAttributes = ["stream"];
|
|
9451
9501
|
#e = x("");
|
|
9452
9502
|
#t = x(0);
|
|
@@ -9524,7 +9574,7 @@ var V = [
|
|
|
9524
9574
|
if (e) {
|
|
9525
9575
|
if (!e.extensions?.length) {
|
|
9526
9576
|
requestAnimationFrame(() => {
|
|
9527
|
-
e.extensions = [
|
|
9577
|
+
e.extensions = [w()], e.value = JSON.stringify(this.#E.toJSON(), null, 2);
|
|
9528
9578
|
});
|
|
9529
9579
|
return;
|
|
9530
9580
|
}
|
|
@@ -9543,7 +9593,7 @@ var V = [
|
|
|
9543
9593
|
this.#m.value = r ? r + "\n\n" + n : n;
|
|
9544
9594
|
}), this.addEffect(() => {
|
|
9545
9595
|
let e = this.#s.value;
|
|
9546
|
-
this.#h && (this.#h.value = e ?
|
|
9596
|
+
this.#h && (this.#h.value = e ? H(e) : "");
|
|
9547
9597
|
}), this.addEffect(() => {
|
|
9548
9598
|
let e = this.#c.value;
|
|
9549
9599
|
this.#g && (typeof e == "object" && e && Object.keys(e).length > 0 ? this.#g.value = JSON.stringify(e, null, 2) : this.#g.value = "");
|
|
@@ -9556,7 +9606,7 @@ var V = [
|
|
|
9556
9606
|
i = n[t].startLine, a = n[t].endLine;
|
|
9557
9607
|
break;
|
|
9558
9608
|
}
|
|
9559
|
-
t.dispatch({ effects:
|
|
9609
|
+
t.dispatch({ effects: Re.of({
|
|
9560
9610
|
sentUpToLine: r,
|
|
9561
9611
|
nextFromLine: i,
|
|
9562
9612
|
nextToLine: a
|
|
@@ -9569,7 +9619,7 @@ var V = [
|
|
|
9569
9619
|
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();
|
|
9570
9620
|
}
|
|
9571
9621
|
#F() {
|
|
9572
|
-
|
|
9622
|
+
se(), this.#D = new oe({ allowUnregistered: !0 }), this.#O = Pe(this.#D, {
|
|
9573
9623
|
registry: this.#E,
|
|
9574
9624
|
onClientMessage: (e) => {
|
|
9575
9625
|
this.#se("received", e);
|
|
@@ -9611,7 +9661,7 @@ var V = [
|
|
|
9611
9661
|
} catch {
|
|
9612
9662
|
return;
|
|
9613
9663
|
}
|
|
9614
|
-
!t || typeof t != "object" || (this.#E =
|
|
9664
|
+
!t || typeof t != "object" || (this.#E = he.fromJSON(t), this.#L(), this.#v && this.#fe(this.#v, this.#l.value));
|
|
9615
9665
|
}
|
|
9616
9666
|
#z() {
|
|
9617
9667
|
let e = this.#y;
|
|
@@ -9686,7 +9736,7 @@ var V = [
|
|
|
9686
9736
|
/** Get visible pane IDs in DOM order. */
|
|
9687
9737
|
#K() {
|
|
9688
9738
|
let e = this.#n.value;
|
|
9689
|
-
return
|
|
9739
|
+
return B.filter((t) => e.has(t));
|
|
9690
9740
|
}
|
|
9691
9741
|
#q = (e) => {
|
|
9692
9742
|
if (e.button !== 0) return;
|
|
@@ -9787,9 +9837,9 @@ var V = [
|
|
|
9787
9837
|
r.setAttribute("justify", "spread"), r.innerHTML = "<span slot=\"label\">Presets</span><n-icon name=\"caret-up-down\" slot=\"trailing\"></n-icon>", n.appendChild(r);
|
|
9788
9838
|
let i = document.createElement("n-listbox");
|
|
9789
9839
|
i.setAttribute("popover", "");
|
|
9790
|
-
for (let e of
|
|
9840
|
+
for (let e of Fe) {
|
|
9791
9841
|
if ("hidden" in e && e.hidden) continue;
|
|
9792
|
-
let t = Object.entries(
|
|
9842
|
+
let t = Object.entries(z).filter(([t, n]) => n.group === e.id);
|
|
9793
9843
|
if (t.length === 0) continue;
|
|
9794
9844
|
let n = document.createElement("n-option-group"), r = document.createElement("n-option-group-header");
|
|
9795
9845
|
r.textContent = e.label, n.appendChild(r);
|
|
@@ -9800,9 +9850,9 @@ var V = [
|
|
|
9800
9850
|
i.appendChild(n);
|
|
9801
9851
|
}
|
|
9802
9852
|
n.appendChild(i), n.addEventListener("native:change", this.#be), t.appendChild(n);
|
|
9803
|
-
for (let e of
|
|
9853
|
+
for (let e of B) {
|
|
9804
9854
|
let n = document.createElement("n-button");
|
|
9805
|
-
n.setAttribute("variant", "ghost"), n.setAttribute("size", "sm"), n.textContent =
|
|
9855
|
+
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);
|
|
9806
9856
|
}
|
|
9807
9857
|
let a = document.createElement("n-button");
|
|
9808
9858
|
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;
|
|
@@ -9816,13 +9866,13 @@ var V = [
|
|
|
9816
9866
|
l.className = "a2ui-preview-content", c.appendChild(l), this.#b = l;
|
|
9817
9867
|
let u = document.createElement("div");
|
|
9818
9868
|
u.className = "a2ui-resize-handle", c.appendChild(u), s.appendChild(c);
|
|
9819
|
-
for (let e of
|
|
9869
|
+
for (let e of B) {
|
|
9820
9870
|
let t = document.createElement("div");
|
|
9821
9871
|
t.className = "a2ui-pane", t.dataset.panel = e, this.#n.value.has(e) || (t.hidden = !0);
|
|
9822
9872
|
let n = document.createElement("n-header"), r = document.createElement("nav"), i = document.createElement("n-icon");
|
|
9823
|
-
i.setAttribute("name",
|
|
9873
|
+
i.setAttribute("name", Le[e]), r.appendChild(i), n.appendChild(r);
|
|
9824
9874
|
let a = document.createElement("span");
|
|
9825
|
-
a.textContent =
|
|
9875
|
+
a.textContent = Ie[e], n.appendChild(a);
|
|
9826
9876
|
let o = document.createElement("aside");
|
|
9827
9877
|
if (e === "js" || e === "html" || e === "css") {
|
|
9828
9878
|
let t = document.createElement("n-button");
|
|
@@ -9891,20 +9941,20 @@ var V = [
|
|
|
9891
9941
|
#ee() {
|
|
9892
9942
|
if (!this.#p) return;
|
|
9893
9943
|
this.#p.value = this.#e.value, this.#p.extensions = [
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9944
|
+
w(),
|
|
9945
|
+
Ve,
|
|
9946
|
+
ae(le)
|
|
9897
9947
|
], this.#p.addEventListener("native:input", (e) => {
|
|
9898
9948
|
this.#e.value = e.detail.value;
|
|
9899
9949
|
});
|
|
9900
|
-
let e =
|
|
9950
|
+
let e = ie.of([{
|
|
9901
9951
|
key: "Mod-s",
|
|
9902
9952
|
run: () => (this.#U(), !0)
|
|
9903
|
-
}]), t =
|
|
9953
|
+
}]), t = ie.of([{
|
|
9904
9954
|
key: "Mod-s",
|
|
9905
9955
|
run: () => (this.#W(), !0)
|
|
9906
9956
|
}]);
|
|
9907
|
-
this.#m && (this.#m.extensions = [
|
|
9957
|
+
this.#m && (this.#m.extensions = [w()]), this.#h && (this.#h.extensions = [e]), this.#g && (this.#g.extensions = [w(), t]);
|
|
9908
9958
|
}
|
|
9909
9959
|
/** Parse JSON envelopes from the editor stream (supports multi-line formatted JSON). */
|
|
9910
9960
|
#te() {
|
|
@@ -10147,7 +10197,7 @@ var V = [
|
|
|
10147
10197
|
i.setAttribute("variant", "ghost"), i.setAttribute("size", "sm"), i.title = "Apply changes to stream", i.innerHTML = "<n-icon name=\"play\" weight=\"fill\"></n-icon>", i.addEventListener("native:press", () => this.#he(t)), r.appendChild(i), n.appendChild(r);
|
|
10148
10198
|
let a = document.createElement("native-codemirror");
|
|
10149
10199
|
a.setAttribute("line-numbers", "false"), n.appendChild(a), this.#_ = a, requestAnimationFrame(() => {
|
|
10150
|
-
a.extensions = [
|
|
10200
|
+
a.extensions = [w()], a.value = JSON.stringify(s, null, 2);
|
|
10151
10201
|
}), e.appendChild(n);
|
|
10152
10202
|
return;
|
|
10153
10203
|
}
|
|
@@ -10222,8 +10272,8 @@ var V = [
|
|
|
10222
10272
|
t && this.#xe(t);
|
|
10223
10273
|
};
|
|
10224
10274
|
#xe(e) {
|
|
10225
|
-
if (!
|
|
10226
|
-
let t =
|
|
10275
|
+
if (!z[e]) return;
|
|
10276
|
+
let t = z[e].envelopes.map((e) => JSON.stringify(e, null, 2)).join("\n\n");
|
|
10227
10277
|
this.#ae(), this.stream = t, this.#ne();
|
|
10228
10278
|
}
|
|
10229
10279
|
#Se = () => {
|
|
@@ -10277,7 +10327,7 @@ var V = [
|
|
|
10277
10327
|
let a = this.#p?.editorView;
|
|
10278
10328
|
if (a) {
|
|
10279
10329
|
let e = a.state.doc.lines;
|
|
10280
|
-
a.dispatch({ selection: { anchor: a.state.doc.line(e).from } }), a.dispatch({ effects:
|
|
10330
|
+
a.dispatch({ selection: { anchor: a.state.doc.line(e).from } }), a.dispatch({ effects: te.scrollIntoView(a.state.doc.line(e).from) });
|
|
10281
10331
|
}
|
|
10282
10332
|
};
|
|
10283
10333
|
#De = () => {
|
|
@@ -10309,7 +10359,7 @@ var V = [
|
|
|
10309
10359
|
} else if (e === "html") {
|
|
10310
10360
|
if (!this.#h) return;
|
|
10311
10361
|
let e = this.#s.value;
|
|
10312
|
-
this.#h.value = e ?
|
|
10362
|
+
this.#h.value = e ? H(e) : "";
|
|
10313
10363
|
} else if (e === "css") {
|
|
10314
10364
|
if (!this.#g) return;
|
|
10315
10365
|
let e = this.#c.value;
|
|
@@ -10321,7 +10371,7 @@ var V = [
|
|
|
10321
10371
|
t.has(e) ? t.delete(e) : t.add(e), this.#n.value = t;
|
|
10322
10372
|
};
|
|
10323
10373
|
};
|
|
10324
|
-
function
|
|
10374
|
+
function H(e) {
|
|
10325
10375
|
let t = "", n = 0, r = 0;
|
|
10326
10376
|
for (; r < e.length;) if (e[r] === "<") {
|
|
10327
10377
|
let i = e.indexOf(">", r);
|
|
@@ -10336,7 +10386,7 @@ function ze(e) {
|
|
|
10336
10386
|
}
|
|
10337
10387
|
return t.trimEnd();
|
|
10338
10388
|
}
|
|
10339
|
-
y("native-a2ui",
|
|
10389
|
+
y("native-a2ui", V), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-select", u), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-segmented-control", l), y("n-segment", c), b("caret-left", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\"/></svg>"), b("caret-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("play-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z\"/></svg>"), b("arrows-out-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z\"/></svg>"), b("arrows-in-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z\"/></svg>"), b("x", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("lightning", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.38a8,8,0,0,0,5,9.06l52.8,19.8Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("arrows-left-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z\"/></svg>"), b("plus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z\"/></svg>"), b("minus-circle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M176,128a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,128Zm56,0A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z\"/></svg>"), b("database", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z\"/></svg>"), b("play", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z\"/></svg>"), b("brackets-curly", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z\"/></svg>"), b("chat-circle-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z\"/></svg>"), b("code", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z\"/></svg>"), b("palette", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z\"/></svg>"), b("terminal", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z\"/></svg>"), b("squares-four", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z\"/></svg>");
|
|
10340
10390
|
/**
|
|
10341
10391
|
* Chat message input with textarea, submit button, and Enter-to-send behavior.
|
|
10342
10392
|
* @attr {boolean} disabled - Disables interaction
|
|
@@ -10349,7 +10399,7 @@ y("native-a2ui", Re), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-
|
|
|
10349
10399
|
* @fires native:composer-focus - Fired when the composer textarea gains focus
|
|
10350
10400
|
* @fires native:composer-blur - Fired when the composer textarea loses focus
|
|
10351
10401
|
*/
|
|
10352
|
-
var
|
|
10402
|
+
var U = class extends p {
|
|
10353
10403
|
static observedAttributes = [
|
|
10354
10404
|
"disabled",
|
|
10355
10405
|
"busy",
|
|
@@ -10479,7 +10529,7 @@ var W = class extends p {
|
|
|
10479
10529
|
})) && !this.hasAttribute("no-auto-clear") && (this.value = "", this.#i?.setAttribute("disabled", ""));
|
|
10480
10530
|
}
|
|
10481
10531
|
}
|
|
10482
|
-
},
|
|
10532
|
+
}, He = class extends U {}, W = class extends Error {
|
|
10483
10533
|
kind;
|
|
10484
10534
|
status;
|
|
10485
10535
|
body;
|
|
@@ -10489,7 +10539,7 @@ var W = class extends p {
|
|
|
10489
10539
|
super(e.message), this.name = "GatewayRequestError", this.kind = e.kind, this.status = e.status ?? 0, this.body = e.body ?? "", this.requestId = e.requestId, this.contentType = e.contentType;
|
|
10490
10540
|
}
|
|
10491
10541
|
};
|
|
10492
|
-
async function
|
|
10542
|
+
async function G(e) {
|
|
10493
10543
|
return K(e, e.retryPolicy ?? {
|
|
10494
10544
|
delaysMs: [
|
|
10495
10545
|
1e3,
|
|
@@ -10499,7 +10549,7 @@ async function Ve(e) {
|
|
|
10499
10549
|
jitterRatio: 0
|
|
10500
10550
|
}, 0);
|
|
10501
10551
|
}
|
|
10502
|
-
function
|
|
10552
|
+
function Ue(e, t) {
|
|
10503
10553
|
let n = { ...e };
|
|
10504
10554
|
if (!t) return n;
|
|
10505
10555
|
if (t instanceof Headers) return t.forEach((e, t) => {
|
|
@@ -10525,7 +10575,7 @@ async function K(e, t, n) {
|
|
|
10525
10575
|
maxAttempts: t.delaysMs.length + 1
|
|
10526
10576
|
});
|
|
10527
10577
|
try {
|
|
10528
|
-
let s =
|
|
10578
|
+
let s = Ue(e.defaultHeaders ?? {}, i.headers), c = e.auth;
|
|
10529
10579
|
if (c?.token) {
|
|
10530
10580
|
let e = c.headerName ?? "Authorization";
|
|
10531
10581
|
s[e] = c.scheme === "raw" ? c.token : `Bearer ${c.token}`;
|
|
@@ -10538,7 +10588,7 @@ async function K(e, t, n) {
|
|
|
10538
10588
|
signal: d
|
|
10539
10589
|
}), p = Math.round(performance.now() - o);
|
|
10540
10590
|
if (!f.ok) {
|
|
10541
|
-
let o = await f.text(), s =
|
|
10591
|
+
let o = await f.text(), s = We(f.status), c = f.headers.get("content-type") ?? void 0;
|
|
10542
10592
|
if (!e.noRetry && (s === "rate-limit" || s === "server") && n < t.delaysMs.length) return a?.({
|
|
10543
10593
|
type: "request:retry",
|
|
10544
10594
|
requestId: i.requestId,
|
|
@@ -10549,7 +10599,7 @@ async function K(e, t, n) {
|
|
|
10549
10599
|
durationMs: p,
|
|
10550
10600
|
status: f.status,
|
|
10551
10601
|
errorKind: s
|
|
10552
|
-
}), await Ge(
|
|
10602
|
+
}), await Ge(Y(t.delaysMs[n], t.jitterRatio ?? 0)), K(e, t, n + 1);
|
|
10553
10603
|
throw a?.({
|
|
10554
10604
|
type: "request:error",
|
|
10555
10605
|
requestId: i.requestId,
|
|
@@ -10560,7 +10610,7 @@ async function K(e, t, n) {
|
|
|
10560
10610
|
durationMs: p,
|
|
10561
10611
|
status: f.status,
|
|
10562
10612
|
errorKind: s
|
|
10563
|
-
}), new
|
|
10613
|
+
}), new W({
|
|
10564
10614
|
message: Je(f.status, o, c),
|
|
10565
10615
|
kind: s,
|
|
10566
10616
|
requestId: i.requestId,
|
|
@@ -10580,7 +10630,7 @@ async function K(e, t, n) {
|
|
|
10580
10630
|
status: f.status
|
|
10581
10631
|
}), f;
|
|
10582
10632
|
} catch (s) {
|
|
10583
|
-
if (s instanceof DOMException && s.name === "AbortError" || s instanceof
|
|
10633
|
+
if (s instanceof DOMException && s.name === "AbortError" || s instanceof W) throw s;
|
|
10584
10634
|
let c = Math.round(performance.now() - o);
|
|
10585
10635
|
if (!e.noRetry && n < t.delaysMs.length) return a?.({
|
|
10586
10636
|
type: "request:retry",
|
|
@@ -10591,7 +10641,7 @@ async function K(e, t, n) {
|
|
|
10591
10641
|
maxAttempts: t.delaysMs.length + 1,
|
|
10592
10642
|
durationMs: c,
|
|
10593
10643
|
errorKind: "network"
|
|
10594
|
-
}), await Ge(
|
|
10644
|
+
}), await Ge(Y(t.delaysMs[n], t.jitterRatio ?? 0)), K(e, t, n + 1);
|
|
10595
10645
|
throw a?.({
|
|
10596
10646
|
type: "request:error",
|
|
10597
10647
|
requestId: i.requestId,
|
|
@@ -10601,19 +10651,19 @@ async function K(e, t, n) {
|
|
|
10601
10651
|
maxAttempts: t.delaysMs.length + 1,
|
|
10602
10652
|
durationMs: c,
|
|
10603
10653
|
errorKind: "network"
|
|
10604
|
-
}), new
|
|
10654
|
+
}), new W({
|
|
10605
10655
|
message: s instanceof Error ? s.message : "Network error",
|
|
10606
10656
|
kind: "network",
|
|
10607
10657
|
requestId: i.requestId
|
|
10608
10658
|
});
|
|
10609
10659
|
}
|
|
10610
10660
|
}
|
|
10611
|
-
function
|
|
10661
|
+
function We(e) {
|
|
10612
10662
|
return e === 401 || e === 403 ? "auth" : e === 429 ? "rate-limit" : e >= 500 ? "server" : e >= 400 ? "client" : "unknown";
|
|
10613
10663
|
}
|
|
10614
10664
|
async function q(e, t) {
|
|
10615
10665
|
let n = e.headers.get("content-type") ?? "", r = await e.text();
|
|
10616
|
-
if (!r.trim()) throw new
|
|
10666
|
+
if (!r.trim()) throw new W({
|
|
10617
10667
|
message: "Empty response body",
|
|
10618
10668
|
kind: "unknown",
|
|
10619
10669
|
requestId: t,
|
|
@@ -10623,7 +10673,7 @@ async function q(e, t) {
|
|
|
10623
10673
|
try {
|
|
10624
10674
|
return JSON.parse(r);
|
|
10625
10675
|
} catch {
|
|
10626
|
-
throw new
|
|
10676
|
+
throw new W({
|
|
10627
10677
|
message: `Invalid JSON response (status ${e.status}, content-type "${n || "unknown"}")`,
|
|
10628
10678
|
kind: "unknown",
|
|
10629
10679
|
requestId: t,
|
|
@@ -10636,7 +10686,7 @@ async function q(e, t) {
|
|
|
10636
10686
|
function J() {
|
|
10637
10687
|
return crypto.randomUUID();
|
|
10638
10688
|
}
|
|
10639
|
-
function
|
|
10689
|
+
function Y(e, t) {
|
|
10640
10690
|
if (t <= 0) return e;
|
|
10641
10691
|
let n = 1 + Math.random() * t;
|
|
10642
10692
|
return Math.round(e * n);
|
|
@@ -10771,7 +10821,7 @@ var Ye = class {
|
|
|
10771
10821
|
return {
|
|
10772
10822
|
healthy: !1,
|
|
10773
10823
|
requestId: t,
|
|
10774
|
-
status: e instanceof
|
|
10824
|
+
status: e instanceof W ? e.status : 0,
|
|
10775
10825
|
durationMs: Math.round(performance.now() - n)
|
|
10776
10826
|
};
|
|
10777
10827
|
}
|
|
@@ -10817,7 +10867,7 @@ var Ye = class {
|
|
|
10817
10867
|
}))), n;
|
|
10818
10868
|
}
|
|
10819
10869
|
async parseEventStream(e, t, n, r, i) {
|
|
10820
|
-
if (!e.body) throw new
|
|
10870
|
+
if (!e.body) throw new W({
|
|
10821
10871
|
message: "Missing stream body",
|
|
10822
10872
|
kind: "unknown",
|
|
10823
10873
|
requestId: t,
|
|
@@ -10853,7 +10903,7 @@ var Ye = class {
|
|
|
10853
10903
|
mode: "sse",
|
|
10854
10904
|
contentType: i,
|
|
10855
10905
|
message: n
|
|
10856
|
-
}), new
|
|
10906
|
+
}), new W({
|
|
10857
10907
|
message: n,
|
|
10858
10908
|
kind: "server",
|
|
10859
10909
|
requestId: t,
|
|
@@ -10883,7 +10933,7 @@ var Ye = class {
|
|
|
10883
10933
|
} finally {
|
|
10884
10934
|
a.releaseLock();
|
|
10885
10935
|
}
|
|
10886
|
-
if (!c.trim()) throw new
|
|
10936
|
+
if (!c.trim()) throw new W({
|
|
10887
10937
|
message: "Empty stream response body",
|
|
10888
10938
|
kind: "unknown",
|
|
10889
10939
|
requestId: t,
|
|
@@ -10909,7 +10959,7 @@ var Ye = class {
|
|
|
10909
10959
|
};
|
|
10910
10960
|
}
|
|
10911
10961
|
request(e) {
|
|
10912
|
-
return
|
|
10962
|
+
return G({
|
|
10913
10963
|
url: e.url,
|
|
10914
10964
|
init: e.init,
|
|
10915
10965
|
noRetry: e.noRetry,
|
|
@@ -11046,7 +11096,7 @@ var Qe = class {
|
|
|
11046
11096
|
return {
|
|
11047
11097
|
healthy: !1,
|
|
11048
11098
|
requestId: t,
|
|
11049
|
-
status: e instanceof
|
|
11099
|
+
status: e instanceof W ? e.status : 0,
|
|
11050
11100
|
durationMs: Math.round(performance.now() - n)
|
|
11051
11101
|
};
|
|
11052
11102
|
}
|
|
@@ -11092,7 +11142,7 @@ var Qe = class {
|
|
|
11092
11142
|
return (e.content ?? []).filter((e) => e.type === "text").map((e) => e.text ?? "").join("") || "No response returned.";
|
|
11093
11143
|
}
|
|
11094
11144
|
async parseEventStream(e, t, n, r, i) {
|
|
11095
|
-
if (!e.body) throw new
|
|
11145
|
+
if (!e.body) throw new W({
|
|
11096
11146
|
message: "Missing stream body",
|
|
11097
11147
|
kind: "unknown",
|
|
11098
11148
|
requestId: t,
|
|
@@ -11127,7 +11177,7 @@ var Qe = class {
|
|
|
11127
11177
|
mode: "sse",
|
|
11128
11178
|
contentType: i,
|
|
11129
11179
|
message: a
|
|
11130
|
-
}), new
|
|
11180
|
+
}), new W({
|
|
11131
11181
|
message: a,
|
|
11132
11182
|
kind: "server",
|
|
11133
11183
|
requestId: t,
|
|
@@ -11160,7 +11210,7 @@ var Qe = class {
|
|
|
11160
11210
|
} finally {
|
|
11161
11211
|
a.releaseLock();
|
|
11162
11212
|
}
|
|
11163
|
-
if (!c.trim()) throw new
|
|
11213
|
+
if (!c.trim()) throw new W({
|
|
11164
11214
|
message: "Empty stream response body",
|
|
11165
11215
|
kind: "unknown",
|
|
11166
11216
|
requestId: t,
|
|
@@ -11186,7 +11236,7 @@ var Qe = class {
|
|
|
11186
11236
|
};
|
|
11187
11237
|
}
|
|
11188
11238
|
request(e) {
|
|
11189
|
-
return
|
|
11239
|
+
return G({
|
|
11190
11240
|
url: e.url,
|
|
11191
11241
|
init: e.init,
|
|
11192
11242
|
noRetry: e.noRetry,
|
|
@@ -11221,7 +11271,7 @@ const $e = ({ clientId: e, baseUrl: t, gatewayConfig: n, onEvent: r, auth: i })
|
|
|
11221
11271
|
onEvent: r
|
|
11222
11272
|
});
|
|
11223
11273
|
};
|
|
11224
|
-
var
|
|
11274
|
+
var X = [
|
|
11225
11275
|
"That's a great question! Here's what I think:\n\n**Web components** are built on three main browser APIs:\n\n1. **Custom Elements** — define your own HTML tags\n2. **Shadow DOM** — encapsulated styling and markup\n3. **HTML Templates** — reusable content fragments\n\nThey work natively in all modern browsers.",
|
|
11226
11276
|
"Sure, I can help with that! Let me break it down:\n\n- First, you'll want to understand the **component lifecycle**\n- Then look at how **attributes** map to **properties**\n- Finally, consider your **event strategy**\n\n```js\nclass MyElement extends HTMLElement {\n connectedCallback() {\n console.log('Connected!');\n }\n}\n```",
|
|
11227
11277
|
"Here are some key points to consider:\n\n> The best code is the code you don't have to write.\n\n1. Keep components **small and focused**\n2. Use **composition** over inheritance\n3. Leverage **CSS custom properties** for theming\n4. Always consider **accessibility**\n\nLet me know if you'd like more detail on any of these!"
|
|
@@ -11231,7 +11281,7 @@ var Y = [
|
|
|
11231
11281
|
return Promise.resolve({ id: "mock-session" });
|
|
11232
11282
|
}
|
|
11233
11283
|
sendMessage(e) {
|
|
11234
|
-
let t =
|
|
11284
|
+
let t = X[this.#e++ % X.length];
|
|
11235
11285
|
return Promise.resolve({
|
|
11236
11286
|
role: "assistant",
|
|
11237
11287
|
message: t,
|
|
@@ -11239,7 +11289,7 @@ var Y = [
|
|
|
11239
11289
|
});
|
|
11240
11290
|
}
|
|
11241
11291
|
async sendMessageStream(e) {
|
|
11242
|
-
let t =
|
|
11292
|
+
let t = X[this.#e++ % X.length], n = t.split(/(\s+)/);
|
|
11243
11293
|
e.onMode?.("sse", "text/event-stream"), e.onStreamEvent?.({
|
|
11244
11294
|
phase: "start",
|
|
11245
11295
|
mode: "sse"
|
|
@@ -12379,11 +12429,11 @@ var ft = class extends p {
|
|
|
12379
12429
|
"blockquote",
|
|
12380
12430
|
"hr"
|
|
12381
12431
|
]);
|
|
12382
|
-
function
|
|
12432
|
+
function Z(e) {
|
|
12383
12433
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
12384
12434
|
}
|
|
12385
|
-
function
|
|
12386
|
-
let t =
|
|
12435
|
+
function Q(e) {
|
|
12436
|
+
let t = Z(e);
|
|
12387
12437
|
return t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__(.+?)__/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/(?<!\w)_(.+?)_(?!\w)/g, "<em>$1</em>"), t = t.replace(/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g, "<a href=\"$2\" rel=\"noopener noreferrer\" target=\"_blank\">$1</a>"), t;
|
|
12388
12438
|
}
|
|
12389
12439
|
function ht(e) {
|
|
@@ -12395,14 +12445,14 @@ function ht(e) {
|
|
|
12395
12445
|
let i = e.slice(3).trim(), a = [];
|
|
12396
12446
|
for (r += 1; r < t.length && !t[r].startsWith("```");) a.push(t[r]), r += 1;
|
|
12397
12447
|
r += 1;
|
|
12398
|
-
let o = i ? ` data-lang="${
|
|
12399
|
-
n.push(`<pre${o}><code>${
|
|
12448
|
+
let o = i ? ` data-lang="${Z(i)}"` : "";
|
|
12449
|
+
n.push(`<pre${o}><code>${Z(a.join("\n"))}</code></pre>`);
|
|
12400
12450
|
continue;
|
|
12401
12451
|
}
|
|
12402
12452
|
let i = e.match(/^(#{1,6})\s+(.+)/);
|
|
12403
12453
|
if (i) {
|
|
12404
12454
|
let e = i[1].length;
|
|
12405
|
-
n.push(`<h${e}>${
|
|
12455
|
+
n.push(`<h${e}>${Q(i[2])}</h${e}>`), r += 1;
|
|
12406
12456
|
continue;
|
|
12407
12457
|
}
|
|
12408
12458
|
if (/^---+$/.test(e.trim()) || /^\*\*\*+$/.test(e.trim())) {
|
|
@@ -12418,13 +12468,13 @@ function ht(e) {
|
|
|
12418
12468
|
if (/^[-*+]\s/.test(e)) {
|
|
12419
12469
|
let e = [];
|
|
12420
12470
|
for (; r < t.length && /^[-*+]\s/.test(t[r]);) e.push(t[r].replace(/^[-*+]\s/, "")), r += 1;
|
|
12421
|
-
n.push("<ul>" + e.map((e) => `<li>${
|
|
12471
|
+
n.push("<ul>" + e.map((e) => `<li>${Q(e)}</li>`).join("") + "</ul>");
|
|
12422
12472
|
continue;
|
|
12423
12473
|
}
|
|
12424
12474
|
if (/^\d+\.\s/.test(e)) {
|
|
12425
12475
|
let e = [];
|
|
12426
12476
|
for (; r < t.length && /^\d+\.\s/.test(t[r]);) e.push(t[r].replace(/^\d+\.\s/, "")), r += 1;
|
|
12427
|
-
n.push("<ol>" + e.map((e) => `<li>${
|
|
12477
|
+
n.push("<ol>" + e.map((e) => `<li>${Q(e)}</li>`).join("") + "</ol>");
|
|
12428
12478
|
continue;
|
|
12429
12479
|
}
|
|
12430
12480
|
if (!e.trim()) {
|
|
@@ -12433,7 +12483,7 @@ function ht(e) {
|
|
|
12433
12483
|
}
|
|
12434
12484
|
let a = [];
|
|
12435
12485
|
for (; r < t.length && t[r].trim() && !t[r].startsWith("#") && !t[r].startsWith("```") && !t[r].startsWith("> ") && !/^[-*+]\s/.test(t[r]) && !/^\d+\.\s/.test(t[r]) && !/^---+$/.test(t[r].trim());) a.push(t[r]), r += 1;
|
|
12436
|
-
a.length > 0 && n.push(`<p>${
|
|
12486
|
+
a.length > 0 && n.push(`<p>${Q(a.join("\n"))}</p>`);
|
|
12437
12487
|
}
|
|
12438
12488
|
return n.join("");
|
|
12439
12489
|
}
|
|
@@ -12587,7 +12637,7 @@ function yt(e) {
|
|
|
12587
12637
|
* @attr {boolean} disabled - Disables all chips
|
|
12588
12638
|
* @fires native:seed-select - Fired when a chip is clicked
|
|
12589
12639
|
*/
|
|
12590
|
-
var
|
|
12640
|
+
var bt = class extends p {
|
|
12591
12641
|
static observedAttributes = ["options", "disabled"];
|
|
12592
12642
|
#e;
|
|
12593
12643
|
#t = x([]);
|
|
@@ -12659,7 +12709,7 @@ var Q = class extends p {
|
|
|
12659
12709
|
}
|
|
12660
12710
|
}));
|
|
12661
12711
|
};
|
|
12662
|
-
},
|
|
12712
|
+
}, xt = new Set([
|
|
12663
12713
|
"script",
|
|
12664
12714
|
"style",
|
|
12665
12715
|
"link",
|
|
@@ -12676,7 +12726,7 @@ var Q = class extends p {
|
|
|
12676
12726
|
"frame",
|
|
12677
12727
|
"frameset",
|
|
12678
12728
|
"noscript"
|
|
12679
|
-
]),
|
|
12729
|
+
]), St = class extends p {
|
|
12680
12730
|
static observedAttributes = ["schema-type", "mode"];
|
|
12681
12731
|
#e;
|
|
12682
12732
|
#t = x("a2ui");
|
|
@@ -12722,7 +12772,7 @@ var Q = class extends p {
|
|
|
12722
12772
|
super.setup(), this.#i = document.createElement("div"), this.#i.className = "n-chat-genui-container", this.appendChild(this.#i), this.addEffect(() => {
|
|
12723
12773
|
let e = this.#r.value, t = this.#n.value;
|
|
12724
12774
|
if (!this.#i || (this.#i.textContent = "", !e)) return;
|
|
12725
|
-
let n =
|
|
12775
|
+
let n = Ct(e);
|
|
12726
12776
|
if (n.length > 0) {
|
|
12727
12777
|
this.#o(n), this.dispatchEvent(new CustomEvent("native:genui-error", {
|
|
12728
12778
|
bubbles: !0,
|
|
@@ -12786,15 +12836,15 @@ var Q = class extends p {
|
|
|
12786
12836
|
}));
|
|
12787
12837
|
};
|
|
12788
12838
|
};
|
|
12789
|
-
function
|
|
12839
|
+
function Ct(e, t = 0) {
|
|
12790
12840
|
let n = [];
|
|
12791
12841
|
if (t > 20) return n.push("Maximum nesting depth (20) exceeded"), n;
|
|
12792
12842
|
if (!e.tag || typeof e.tag != "string") return n.push("Node missing required \"tag\" property"), n;
|
|
12793
|
-
if (
|
|
12843
|
+
if (xt.has(e.tag.toLowerCase()) && n.push(`Forbidden tag: <${e.tag}>`), e.children) for (let r of e.children) n.push(...Ct(r, t + 1));
|
|
12794
12844
|
return n;
|
|
12795
12845
|
}
|
|
12796
12846
|
function $(e) {
|
|
12797
|
-
if (
|
|
12847
|
+
if (xt.has(e.tag.toLowerCase())) return null;
|
|
12798
12848
|
let t = document.createElement(e.tag);
|
|
12799
12849
|
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);
|
|
12800
12850
|
if (e.properties) for (let [n, r] of Object.entries(e.properties)) t[n] = r;
|
|
@@ -12824,7 +12874,7 @@ function $(e) {
|
|
|
12824
12874
|
* @fires native:structured-submit - Fired on submit with selections
|
|
12825
12875
|
* @fires native:structured-cancel - Fired when dismissed without selecting
|
|
12826
12876
|
*/
|
|
12827
|
-
var
|
|
12877
|
+
var wt = class extends p {
|
|
12828
12878
|
static observedAttributes = [
|
|
12829
12879
|
"question",
|
|
12830
12880
|
"type",
|
|
@@ -12959,5 +13009,5 @@ var Ct = class extends p {
|
|
|
12959
13009
|
}));
|
|
12960
13010
|
};
|
|
12961
13011
|
};
|
|
12962
|
-
y("n-chat-input", W), y("n-chat-input-advanced", Be), y("native-chat-panel", rt), y("n-chat-feed", at), y("n-chat-avatar", ot), y("n-chat-message", ut), y("n-chat-messages", ft), y("n-chat-message-text", pt), y("n-chat-message-activity", _t), y("n-chat-message-seed", Q), y("n-chat-message-genui", xt), y("n-chat-input-structured", Ct), y("n-textarea", d), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-dialog", n), y("n-container", t), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-select", u), b("chat-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z\"/></svg>"), b("user", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8C55.71,194.74,89.05,176,128,176s72.29,18.74,89.07,44a8,8,0,0,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z\"/></svg>"), b("stop", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("dots-three-outline-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128ZM48,100a28,28,0,1,0,28,28A28,28,0,0,0,48,100Zm160,0a28,28,0,1,0,28,28A28,28,0,0,0,208,100Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("microphone", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z\"/></svg>"), b("arrow-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z\"/></svg>"), b("copy", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z\"/></svg>"), b("arrow-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z\"/></svg>"), b("pencil-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z\"/></svg>"), b("thumbs-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z\"/></svg>"), b("thumbs-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z\"/></svg>"), b("arrow-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z\"/></svg>"), b("brain", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z\"/></svg>"), b("sliders", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z\"/></svg>"), b("clock", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z\"/></svg>"), b("magnifying-glass", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z\"/></svg>"), b("compass", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM172.42,72.84l-64,32a8.05,8.05,0,0,0-3.58,3.58l-32,64A8,8,0,0,0,80,184a8.1,8.1,0,0,0,3.58-.84l64-32a8.05,8.05,0,0,0,3.58-3.58l32-64a8,8,0,0,0-10.74-10.74ZM138,138,97.89,158.11,118,118l40.15-20.07Z\"/></svg>"), b("flask", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.74,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z\"/></svg>"), b("lightbulb", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z\"/></svg>"), b("crosshair", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z\"/></svg>"), b("list-checks", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z\"/></svg>"), b("sparkle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z\"/></svg>"), b("record", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm0-160a72,72,0,1,0,72,72A72.08,72.08,0,0,0,128,56Zm0,128a56,56,0,1,1,56-56A56.06,56.06,0,0,1,128,184Z\"/></svg>");
|
|
12963
|
-
export {
|
|
13012
|
+
y("n-chat-input", U), y("n-chat-input-advanced", He), y("native-chat-panel", rt), y("n-chat-feed", at), y("n-chat-avatar", ot), y("n-chat-message", ut), y("n-chat-messages", ft), y("n-chat-message-text", pt), y("n-chat-message-activity", _t), y("n-chat-message-seed", bt), y("n-chat-message-genui", St), y("n-chat-input-structured", wt), y("n-textarea", d), y("n-button", e), y("n-icon", r), y("n-toolbar", f), y("n-dialog", n), y("n-container", t), y("n-listbox", i), y("n-option", a), y("n-option-group", o), y("n-option-group-header", s), y("n-select", u), b("chat-dots", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z\"/></svg>"), b("user", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8C55.71,194.74,89.05,176,128,176s72.29,18.74,89.07,44a8,8,0,0,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z\"/></svg>"), b("stop", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z\"/></svg>"), b("arrow-counter-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z\"/></svg>"), b("caret-up-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/></svg>"), b("dots-three-outline-fill", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128ZM48,100a28,28,0,1,0,28,28A28,28,0,0,0,48,100Zm160,0a28,28,0,1,0,28,28A28,28,0,0,0,208,100Z\"/></svg>"), b("plus", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z\"/></svg>"), b("microphone", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z\"/></svg>"), b("arrow-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z\"/></svg>"), b("copy", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z\"/></svg>"), b("arrow-clockwise", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z\"/></svg>"), b("pencil-simple", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z\"/></svg>"), b("thumbs-up", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z\"/></svg>"), b("thumbs-down", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z\"/></svg>"), b("arrow-right", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z\"/></svg>"), b("brain", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z\"/></svg>"), b("sliders", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z\"/></svg>"), b("clock", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z\"/></svg>"), b("magnifying-glass", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z\"/></svg>"), b("compass", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM172.42,72.84l-64,32a8.05,8.05,0,0,0-3.58,3.58l-32,64A8,8,0,0,0,80,184a8.1,8.1,0,0,0,3.58-.84l64-32a8.05,8.05,0,0,0,3.58-3.58l32-64a8,8,0,0,0-10.74-10.74ZM138,138,97.89,158.11,118,118l40.15-20.07Z\"/></svg>"), b("flask", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.74,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z\"/></svg>"), b("lightbulb", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z\"/></svg>"), b("crosshair", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z\"/></svg>"), b("list-checks", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z\"/></svg>"), b("sparkle", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z\"/></svg>"), b("record", "<svg viewBox=\"0 0 256 256\" fill=\"currentColor\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm0-160a72,72,0,1,0,72,72A72.08,72.08,0,0,0,128,56Zm0,128a56,56,0,1,1,56-56A56.06,56.06,0,0,1,128,184Z\"/></svg>");
|
|
13013
|
+
export { V as NA2UI, ot as NChatAvatar, at as NChatFeed, U as NChatInput, wt as NChatInputStructured, ut as NChatMessage, _t as NChatMessageActivity, St as NChatMessageGenUI, bt as NChatMessageSeed, pt as NChatMessageText, ft as NChatMessages, rt as NChatPanel };
|