@nonoun/native-chat 0.5.12 → 0.5.14

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.
@@ -136,16 +136,22 @@ var a = class extends e {
136
136
  "show-stop",
137
137
  "show-restart",
138
138
  "auto-focus-policy",
139
- "open"
139
+ "open",
140
+ "model"
140
141
  ];
141
142
  #e = r(!1);
142
143
  #t = r(!1);
143
144
  #n = r("open-request");
144
145
  #r = r(!1);
145
- #i = null;
146
- #a = null;
146
+ #i = r([]);
147
+ #a = r(null);
147
148
  #o = null;
148
149
  #s = null;
150
+ #c = null;
151
+ #l = null;
152
+ #u = null;
153
+ #d = null;
154
+ #f = r(!1);
149
155
  attributeChangedCallback(e, t, n) {
150
156
  if (t !== n) {
151
157
  switch (e) {
@@ -160,9 +166,12 @@ var a = class extends e {
160
166
  break;
161
167
  case "open": {
162
168
  let e = this.#r.value;
163
- this.#r.value = n !== null, !e && n !== null ? this.#f(void 0, !1) : e && n === null && this.#p(void 0);
169
+ this.#r.value = n !== null, !e && n !== null ? this.#_(void 0, !1) : e && n === null && this.#v(void 0);
164
170
  break;
165
171
  }
172
+ case "model":
173
+ this.#a.value = n;
174
+ break;
166
175
  }
167
176
  super.attributeChangedCallback(e, t, n);
168
177
  }
@@ -185,21 +194,35 @@ var a = class extends e {
185
194
  set autoFocusPolicy(e) {
186
195
  this.#n.value = e, this.setAttribute("auto-focus-policy", e);
187
196
  }
197
+ /** List of available models for the model picker. */
198
+ get models() {
199
+ return this.#i.value;
200
+ }
201
+ set models(e) {
202
+ this.#i.value = e, e.length > 0 && this.#a.value === null && (this.#a.value = e[0].value, this.setAttribute("model", e[0].value));
203
+ }
204
+ /** Currently selected model value. */
205
+ get model() {
206
+ return this.#a.value;
207
+ }
208
+ set model(e) {
209
+ this.#a.value = e, e === null ? this.removeAttribute("model") : this.setAttribute("model", e);
210
+ }
188
211
  /** Open the panel. Optionally focus the composer. */
189
212
  open(e) {
190
213
  let t = this.#r.value;
191
214
  this.#r.value = !0, this.toggleAttribute("open", !0);
192
215
  let n = this.#n.value, r = e?.focusComposer ?? !1, i = n !== "never" && (n === "open-request" ? r : !1);
193
- t || this.#f(e?.reason, i), i && this.focusComposer({ cursor: "end" }, "api");
216
+ t || this.#_(e?.reason, i), i && this.focusComposer({ cursor: "end" }, "api");
194
217
  }
195
218
  /** Close the panel. */
196
219
  close(e) {
197
220
  let t = this.#r.value;
198
- this.#r.value = !1, this.removeAttribute("open"), t && this.#p(e);
221
+ this.#r.value = !1, this.removeAttribute("open"), t && this.#v(e);
199
222
  }
200
223
  /** Focus the composer input. */
201
224
  focusComposer(e, t = "api") {
202
- this.#l(e ?? {}, t, 0);
225
+ this.#m(e ?? {}, t, 0);
203
226
  }
204
227
  setup() {
205
228
  super.setup(), this.hasAttribute("open") && (this.#r.value = !0);
@@ -210,11 +233,11 @@ var a = class extends e {
210
233
  let n = document.createElement("span");
211
234
  n.setAttribute("slot", "label"), n.textContent = "Assistant", e.appendChild(n);
212
235
  let r = document.createElement("span");
213
- r.setAttribute("slot", "trailing"), r.style.display = "inline-flex", r.style.alignItems = "center", r.style.gap = "calc(var(--n-space) * 2)", e.appendChild(r), this.#s = r;
236
+ r.setAttribute("slot", "trailing"), r.style.display = "inline-flex", r.style.alignItems = "center", r.style.gap = "calc(var(--n-space) * 2)", e.appendChild(r), this.#l = r;
214
237
  let i = document.createElement("n-body"), a = document.createElement("n-chat-content");
215
238
  i.appendChild(a);
216
239
  let o = document.createElement("n-footer");
217
- o.setAttribute("dividers", ""), this.#i = o;
240
+ o.setAttribute("dividers", ""), this.#o = o;
218
241
  let s = document.createElement("n-chat-input");
219
242
  s.setAttribute("variant", "plain");
220
243
  let c = document.createElement("n-textarea");
@@ -226,52 +249,79 @@ var a = class extends e {
226
249
  let f = document.createElement("n-button");
227
250
  f.setAttribute("variant", "primary"), f.setAttribute("intent", "accent"), f.setAttribute("radius", "round"), f.setAttribute("inline", ""), f.setAttribute("disabled", ""), f.dataset.role = "submit", f.innerHTML = "<n-icon name=\"arrow-up\"></n-icon>", l.appendChild(f), s.appendChild(l), o.appendChild(s), this.append(e, i, o), this.addEffect(() => {
228
251
  let e = this.#e.value;
229
- if (e && !this.#a) {
252
+ if (e && !this.#s) {
230
253
  let e = document.createElement("n-button");
231
- e.setAttribute("variant", "ghost"), e.setAttribute("inline", ""), e.setAttribute("aria-label", "Stop"), e.innerHTML = "<n-icon name=\"stop\"></n-icon>", e.addEventListener("native:press", this.#h), this.#a = e, this.#s?.prepend(e);
232
- } else !e && this.#a && (this.#a.removeEventListener("native:press", this.#h), this.#a.remove(), this.#a = null);
254
+ e.setAttribute("variant", "ghost"), e.setAttribute("inline", ""), e.setAttribute("aria-label", "Stop"), e.innerHTML = "<n-icon name=\"stop\"></n-icon>", e.addEventListener("native:press", this.#b), this.#s = e, this.#l?.prepend(e);
255
+ } else !e && this.#s && (this.#s.removeEventListener("native:press", this.#b), this.#s.remove(), this.#s = null);
233
256
  }), this.addEffect(() => {
234
257
  let e = this.#t.value;
235
- if (e && !this.#o) {
258
+ if (e && !this.#c) {
259
+ let e = document.createElement("n-button");
260
+ e.setAttribute("variant", "ghost"), e.setAttribute("inline", ""), e.setAttribute("aria-label", "Restart"), e.innerHTML = "<n-icon name=\"arrow-counter-clockwise\"></n-icon>", e.addEventListener("native:press", this.#x), this.#c = e;
261
+ let t = this.#s?.nextSibling ?? this.#l?.firstChild ?? null;
262
+ this.#l?.insertBefore(e, t);
263
+ } else !e && this.#c && (this.#c.removeEventListener("native:press", this.#x), this.#c.remove(), this.#c = null);
264
+ }), this.addEffect(() => {
265
+ let e = this.#i.value;
266
+ if (e.length > 0 && !this.#u) {
236
267
  let e = document.createElement("n-button");
237
- e.setAttribute("variant", "ghost"), e.setAttribute("inline", ""), e.setAttribute("aria-label", "Restart"), e.innerHTML = "<n-icon name=\"arrow-counter-clockwise\"></n-icon>", e.addEventListener("native:press", this.#g), this.#o = e;
238
- let t = this.#a?.nextSibling ?? this.#s?.firstChild ?? null;
239
- this.#s?.insertBefore(e, t);
240
- } else !e && this.#o && (this.#o.removeEventListener("native:press", this.#g), this.#o.remove(), this.#o = null);
268
+ e.setAttribute("variant", "ghost"), e.setAttribute("inline", ""), e.setAttribute("aria-label", "Select model"), e.setAttribute("data-role", "model-picker"), e.innerHTML = "<span data-role=\"model-label\"></span><n-icon name=\"caret-up-down\"></n-icon>", e.addEventListener("native:press", this.#S), this.#u = e;
269
+ let t = document.createElement("n-listbox");
270
+ t.setAttribute("popover", "auto"), t.setAttribute("data-role", "model-listbox"), t.addEventListener("native:change", this.#C), this.#d = t, this.#l?.prepend(e), this.#l?.appendChild(t);
271
+ } else e.length === 0 && this.#u && this.#w();
272
+ }), this.addEffect(() => {
273
+ let e = this.#i.value, t = this.#a.value, n = this.#d, r = this.#u;
274
+ if (!n || !r || e.length === 0) return;
275
+ n.innerHTML = "";
276
+ for (let t of e) {
277
+ let e = document.createElement("n-option");
278
+ e.setAttribute("value", t.value), e.textContent = t.label ?? t.value, n.appendChild(e);
279
+ }
280
+ t && (n.value = t);
281
+ let i = r.querySelector("[data-role=\"model-label\"]");
282
+ if (i) {
283
+ let n = e.find((e) => e.value === t);
284
+ i.textContent = n ? n.label ?? n.value : e[0].label ?? e[0].value;
285
+ }
286
+ }), this.addEffect(() => {
287
+ let e = this.#f.value, t = this.#d;
288
+ if (t) try {
289
+ e ? t.showPopover() : t.hidePopover();
290
+ } catch {}
241
291
  }), this.deferChildren(() => {
242
- this.#c();
292
+ this.#p();
243
293
  }), this.#n.value === "ready" && queueMicrotask(() => {
244
294
  this.isConnected && this.focusComposer({ cursor: "end" }, "policy");
245
295
  });
246
296
  }
247
297
  teardown() {
248
- this.#a && this.#a.removeEventListener("native:press", this.#h), this.#o && this.#o.removeEventListener("native:press", this.#g), this.#i = null, this.#a = null, this.#o = null, this.#s = null, this.innerHTML = "", super.teardown();
298
+ this.#s && this.#s.removeEventListener("native:press", this.#b), this.#c && this.#c.removeEventListener("native:press", this.#x), this.#w(), this.#o = null, this.#s = null, this.#c = null, this.#l = null, this.innerHTML = "", super.teardown();
249
299
  }
250
- #c() {
300
+ #p() {
251
301
  let e = this.querySelector(":scope > [slot=\"header-trailing\"]");
252
- e && this.#s && this.#s.appendChild(e);
302
+ e && this.#l && this.#l.appendChild(e);
253
303
  let t = this.querySelector(":scope > [slot=\"footer-leading\"]");
254
- if (t && this.#i) {
255
- let e = this.#i.querySelector(":scope > n-chat-input");
256
- this.#i.insertBefore(t, e);
304
+ if (t && this.#o) {
305
+ let e = this.#o.querySelector(":scope > n-chat-input");
306
+ this.#o.insertBefore(t, e);
257
307
  }
258
308
  }
259
- #l(e, t, n) {
260
- let r = this.#u();
309
+ #m(e, t, n) {
310
+ let r = this.#h();
261
311
  if (!r) {
262
312
  if (n < 2) {
263
- queueMicrotask(() => this.#l(e, t, n + 1));
313
+ queueMicrotask(() => this.#m(e, t, n + 1));
264
314
  return;
265
315
  }
266
- this.#m("composer-unavailable", 3);
316
+ this.#y("composer-unavailable", 3);
267
317
  return;
268
318
  }
269
319
  if (r.disabled) {
270
320
  if (n < 2) {
271
- queueMicrotask(() => this.#l(e, t, n + 1));
321
+ queueMicrotask(() => this.#m(e, t, n + 1));
272
322
  return;
273
323
  }
274
- this.#m("disabled", 3);
324
+ this.#y("disabled", 3);
275
325
  return;
276
326
  }
277
327
  let i = r.querySelector("n-textarea"), a = i ?? r;
@@ -279,22 +329,22 @@ var a = class extends e {
279
329
  a.focus();
280
330
  } catch {
281
331
  if (n < 2) {
282
- queueMicrotask(() => this.#l(e, t, n + 1));
332
+ queueMicrotask(() => this.#m(e, t, n + 1));
283
333
  return;
284
334
  }
285
- this.#m("blocked", 3);
335
+ this.#y("blocked", 3);
286
336
  return;
287
337
  }
288
- e.cursor && e.cursor !== "preserve" && i && this.#d(i, e.cursor), this.dispatchEvent(new CustomEvent("native:composer-focused", {
338
+ e.cursor && e.cursor !== "preserve" && i && this.#g(i, e.cursor), this.dispatchEvent(new CustomEvent("native:composer-focused", {
289
339
  bubbles: !0,
290
340
  composed: !0,
291
341
  detail: { by: t }
292
342
  }));
293
343
  }
294
- #u() {
344
+ #h() {
295
345
  return this.querySelector("n-chat-input");
296
346
  }
297
- #d(e, t) {
347
+ #g(e, t) {
298
348
  let n = e.ownerDocument.getSelection?.();
299
349
  if (!n) return;
300
350
  let r = e.firstChild ?? e, i = t === "end" ? r.textContent?.length ?? 0 : 0;
@@ -303,7 +353,7 @@ var a = class extends e {
303
353
  e.setStart(r, i), e.collapse(!0), n.removeAllRanges(), n.addRange(e);
304
354
  } catch {}
305
355
  }
306
- #f(e, t) {
356
+ #_(e, t) {
307
357
  this.dispatchEvent(new CustomEvent("native:chat-opened", {
308
358
  bubbles: !0,
309
359
  composed: !0,
@@ -313,14 +363,14 @@ var a = class extends e {
313
363
  }
314
364
  }));
315
365
  }
316
- #p(e) {
366
+ #v(e) {
317
367
  this.dispatchEvent(new CustomEvent("native:chat-closed", {
318
368
  bubbles: !0,
319
369
  composed: !0,
320
370
  detail: { reason: e }
321
371
  }));
322
372
  }
323
- #m(e, t) {
373
+ #y(e, t) {
324
374
  this.dispatchEvent(new CustomEvent("native:composer-focus-failed", {
325
375
  bubbles: !0,
326
376
  composed: !0,
@@ -330,18 +380,41 @@ var a = class extends e {
330
380
  }
331
381
  }));
332
382
  }
333
- #h = () => {
383
+ #b = () => {
334
384
  this.dispatchEvent(new CustomEvent("native:chat-stop", {
335
385
  bubbles: !0,
336
386
  composed: !0
337
387
  }));
338
388
  };
339
- #g = () => {
389
+ #x = () => {
340
390
  this.dispatchEvent(new CustomEvent("native:chat-restart", {
341
391
  bubbles: !0,
342
392
  composed: !0
343
393
  }));
344
394
  };
395
+ #S = () => {
396
+ this.#f.value = !this.#f.value;
397
+ };
398
+ #C = (e) => {
399
+ let t = e.detail?.value ?? null;
400
+ if (t === null) return;
401
+ let n = this.#a.value;
402
+ if (t === n) {
403
+ this.#f.value = !1;
404
+ return;
405
+ }
406
+ this.#a.value = t, this.setAttribute("model", t), this.#f.value = !1, this.dispatchEvent(new CustomEvent("native:model-change", {
407
+ bubbles: !0,
408
+ composed: !0,
409
+ detail: {
410
+ value: t,
411
+ previousValue: n
412
+ }
413
+ }));
414
+ };
415
+ #w() {
416
+ this.#u &&= (this.#u.removeEventListener("native:press", this.#S), this.#u.remove(), null), this.#d &&= (this.#d.removeEventListener("native:change", this.#C), this.#d.remove(), null), this.#f.value = !1;
417
+ }
345
418
  }, s = 40, c = class extends e {
346
419
  static observedAttributes = [
347
420
  "auto-scroll",
@@ -1112,15 +1185,18 @@ var T = class extends e {
1112
1185
  super.setup(), this.addEffect(n(this, this.#n, this.#e)), this.addEffect(() => {
1113
1186
  let e = this.#t.value;
1114
1187
  this.textContent = "";
1115
- for (let t of e) {
1188
+ let t = document.createElement("n-stack");
1189
+ t.setAttribute("direction", "row"), t.setAttribute("wrap", ""), t.setAttribute("gap", "1");
1190
+ for (let n of e) {
1116
1191
  let e = document.createElement("n-button");
1117
- if (e.setAttribute("variant", "outline"), e.setAttribute("size", "sm"), e.setAttribute("inline", ""), e.setAttribute("data-value", t.value), t.icon) {
1118
- let n = document.createElement("n-icon");
1119
- n.setAttribute("name", t.icon), n.setAttribute("slot", "leading"), e.appendChild(n);
1192
+ if (e.setAttribute("variant", "outline"), e.setAttribute("size", "sm"), e.setAttribute("inline", ""), e.setAttribute("data-value", n.value), n.icon) {
1193
+ let t = document.createElement("n-icon");
1194
+ t.setAttribute("name", n.icon), t.setAttribute("slot", "leading"), e.appendChild(t);
1120
1195
  }
1121
- let n = document.createElement("span");
1122
- n.setAttribute("slot", "label"), n.textContent = t.label, e.appendChild(n), this.appendChild(e);
1196
+ let r = document.createElement("span");
1197
+ r.setAttribute("slot", "label"), r.textContent = n.label, e.appendChild(r), t.appendChild(e);
1123
1198
  }
1199
+ this.appendChild(t);
1124
1200
  }), this.addEventListener("native:press", this.#r);
1125
1201
  }
1126
1202
  teardown() {
@@ -1375,8 +1451,8 @@ var A = class extends e {
1375
1451
  let t = document.createElement("div");
1376
1452
  t.className = "n-chat-structured-question", t.textContent = e, this.appendChild(t);
1377
1453
  }
1378
- let i = document.createElement("div");
1379
- i.className = "n-chat-structured-options", i.setAttribute("role", r === "multi" ? "group" : "radiogroup");
1454
+ let i = document.createElement("n-stack");
1455
+ i.setAttribute("direction", "row"), i.setAttribute("wrap", ""), i.setAttribute("gap", "1"), i.setAttribute("role", r === "multi" ? "group" : "radiogroup");
1380
1456
  for (let e of t) {
1381
1457
  let t = document.createElement("n-button"), r = n.has(e.value);
1382
1458
  if (t.setAttribute("variant", r ? "primary" : "outline"), t.setAttribute("data-value", e.value), t.setAttribute("aria-pressed", String(r)), e.icon) {
@@ -112,6 +112,27 @@
112
112
  border-top: 1px solid var(--n-chat-panel-footer-border);
113
113
  }
114
114
 
115
+ /* ── Model picker ── */
116
+
117
+ :where(native-chat-panel) :where(n-button[data-role="model-picker"]) {
118
+ gap: calc(var(--n-space) * 0.5);
119
+ max-width: 12rem;
120
+ }
121
+
122
+ :where(native-chat-panel) :where(n-button[data-role="model-picker"]) :where([data-role="model-label"]) {
123
+ overflow: hidden;
124
+ text-overflow: ellipsis;
125
+ white-space: nowrap;
126
+ }
127
+
128
+ :where(native-chat-panel) :where(n-listbox[data-role="model-listbox"][popover]) {
129
+ position: fixed;
130
+ position-area: block-end span-inline-end;
131
+ position-try-fallbacks: flip-block;
132
+ margin: 0.25rem 0 0;
133
+ min-width: anchor-size(inline);
134
+ }
135
+
115
136
  /* WHY: Wide padding only above 22rem — asides (280–480px) keep compact defaults. */
116
137
  @container (min-width: 22rem) {
117
138
  :where(native-chat-panel) > :where(n-header) {
@@ -614,9 +635,7 @@
614
635
  ══════════════════════════════════════════════════ */
615
636
 
616
637
  :where(n-chat-message-seed) {
617
- display: flex;
618
- flex-wrap: wrap;
619
- gap: var(--n-space);
638
+ display: block;
620
639
  padding-block: var(--n-space);
621
640
  padding-inline: var(--n-chat-bubble-padding-inline);
622
641
  align-self: flex-start;
@@ -676,10 +695,8 @@
676
695
  font-weight: 600;
677
696
  }
678
697
 
679
- :where(n-chat-input-structured) > :where(.n-chat-structured-options) {
680
- display: flex;
681
- flex-wrap: wrap;
682
- gap: var(--n-space);
698
+ :where(n-chat-input-structured) > :where(n-stack) {
699
+ flex: 0 0 auto;
683
700
  }
684
701
 
685
702
  :where(n-chat-input-structured) > :where(.n-chat-structured-actions) {
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./chat-input-structured-element-DPKHlnRm.js";
1
+ import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./chat-input-structured-element-C_5MDbpb.js";
2
2
  /**
3
3
  * Parse a Server-Sent Events (SSE) response stream into ChatStreamChunk values.
4
4
  *
package/dist/register.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, d as t, g as n, h as r, i, l as a, m as o, n as s, p as c, r as l, t as u } from "./chat-input-structured-element-DPKHlnRm.js";
2
- import { NButton as d, NCard as f, NDialog as p, NIcon as m, NTextarea as h, NToolbar as g, define as _, registerIcon as v } from "@nonoun/native-ui";
3
- _("n-chat-input", n), _("native-chat-panel", r), _("n-chat-feed", o), _("n-chat-avatar", c), _("n-chat-message", t), _("n-chat-messages", a), _("n-chat-message-text", e), _("n-chat-message-activity", i), _("n-chat-message-seed", l), _("n-chat-message-genui", s), _("n-chat-input-structured", u), _("n-textarea", h), _("n-button", d), _("n-icon", m), _("n-toolbar", g), _("n-dialog", p), _("n-card", f), v("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>"), v("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>"), v("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>"), v("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>"), v("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>"), v("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>"), v("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>"), v("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>"), v("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>"), v("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>");
1
+ import { a as e, d as t, g as n, h as r, i, l as a, m as o, n as s, p as c, r as l, t as u } from "./chat-input-structured-element-C_5MDbpb.js";
2
+ import { NButton as d, NCard as f, NDialog as p, NIcon as m, NListbox as h, NOption as g, NTextarea as _, NToolbar as v, define as y, registerIcon as b } from "@nonoun/native-ui";
3
+ y("n-chat-input", n), y("native-chat-panel", r), y("n-chat-feed", o), y("n-chat-avatar", c), y("n-chat-message", t), y("n-chat-messages", a), y("n-chat-message-text", e), y("n-chat-message-activity", i), y("n-chat-message-seed", l), y("n-chat-message-genui", s), y("n-chat-input-structured", u), y("n-textarea", _), y("n-button", d), y("n-icon", m), y("n-toolbar", v), y("n-dialog", p), y("n-card", f), y("n-listbox", h), y("n-option", g), 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("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>");
4
4
  export { c as NChatAvatar, o as NChatFeed, n as NChatInput, u as NChatInputStructured, t as NChatMessage, i as NChatMessageActivity, s as NChatMessageGenUI, l as NChatMessageSeed, e as NChatMessageText, a as NChatMessages, r as NChatPanel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonoun/native-chat",
3
- "version": "0.5.12",
3
+ "version": "0.5.14",
4
4
  "description": "Chat input and message layout components for @nonoun/native-ui",
5
5
  "license": "MIT",
6
6
  "type": "module",