@kitn.ai/ui 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{create-tween-qs-jjvNA.js → create-tween-BmBnlg25.js} +1 -1
- package/dist/{create-tween-COnPwAQN.js → create-tween-CTT5l1bo.js} +1 -1
- package/dist/{create-tween-DmTUaXWE.js → create-tween-vA7upv0h.js} +1 -1
- package/dist/elements/agent-card.js +1 -1
- package/dist/elements/artifact.js +1 -1
- package/dist/elements/attachments.js +1 -1
- package/dist/elements/audio-visualizer.js +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/badge.js +1 -1
- package/dist/elements/button.js +1 -1
- package/dist/elements/card.js +1 -1
- package/dist/elements/cards.js +1 -1
- package/dist/elements/chain-of-thought.js +1 -1
- package/dist/elements/chat-scope-picker.js +1 -1
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/chunks/{Icon-CHG5z5L7.js → Icon-b5A8hlHs.js} +1 -1
- package/dist/elements/chunks/{action-icons-BAtCEEgg.js → action-icons-DW9muWrY.js} +1 -1
- package/dist/elements/chunks/arrow-left-iJVnQmxA.js +1 -0
- package/dist/elements/chunks/{artifact-fBZOE4SO.js → artifact-BhJIuh3D.js} +1 -1
- package/dist/elements/chunks/{attachments-DpYMe5VQ.js → attachments-CL6TaqIb.js} +1 -1
- package/dist/elements/chunks/{audio-visualizer-DFwzAcuL.js → audio-visualizer-BuUqQmaO.js} +1 -1
- package/dist/elements/chunks/{badge-D6zodm6E.js → badge-TIMiJFKc.js} +1 -1
- package/dist/elements/chunks/{button-C42vrGvO.js → button-B9okqG73.js} +1 -1
- package/dist/elements/chunks/{card-renderer-DMZsSuvU.js → card-renderer-aNA0WRFH.js} +1 -1
- package/dist/elements/chunks/{chat-thread-CNNEhol-.js → chat-thread-DN9evldr.js} +1 -1
- package/dist/elements/chunks/check-MdLzbxrm.js +1 -0
- package/dist/elements/chunks/chevron-down-MK7IzDqe.js +1 -0
- package/dist/elements/chunks/chevron-right-C5jXhmtV.js +1 -0
- package/dist/elements/chunks/{choice-card-YoWjpsFV.js → choice-card-kNsjU2m8.js} +1 -1
- package/dist/elements/chunks/circle-BG7VkPep.js +1 -0
- package/dist/elements/chunks/circle-check-GqvO2UBs.js +1 -0
- package/dist/elements/chunks/{circle-x-QIxXda6k.js → circle-x-mhH7pOK2.js} +1 -1
- package/dist/elements/chunks/{code-block-CqeugReY.js → code-block-ClhQO9RW.js} +1 -1
- package/dist/elements/chunks/{collapsible-sTv-_5lF.js → collapsible-DBcBkFPh.js} +1 -1
- package/dist/elements/chunks/{composer-ldQyeVEB.js → composer-CZZmtYOT.js} +1 -1
- package/dist/elements/chunks/{confirm-card-C0RNOwfn.js → confirm-card-CEvFmVhz.js} +1 -1
- package/dist/elements/chunks/{context-5qgypNHC.js → context-hKjNqiyQ.js} +1 -1
- package/dist/elements/chunks/{conversation-list-DLzOacXz.js → conversation-list-CsGJjSKG.js} +1 -1
- package/dist/elements/chunks/{create-tween-V4TXZ93X.js → create-tween-CUrM6D_o.js} +1 -1
- package/dist/elements/chunks/{default-input-DeeRSDHc.js → default-input-B1Mem5wu.js} +1 -1
- package/dist/elements/chunks/{define-lE-QvQFn.js → define-B_tXMYRm.js} +1 -1
- package/dist/elements/chunks/{disclosure-DZSa9jog.js → disclosure-DAoYOKew.js} +1 -1
- package/dist/elements/chunks/{download-B2ZmnGqW.js → download-DnCyWFJE.js} +1 -1
- package/dist/elements/chunks/{dropdown-R3B7cSRE.js → dropdown-CmNna5lT.js} +1 -1
- package/dist/elements/chunks/{ellipsis-BmxceY4l.js → ellipsis-CVxqfsDZ.js} +1 -1
- package/dist/elements/chunks/{embed-BVrtTZPo.js → embed-CjAD2jSi.js} +1 -1
- package/dist/elements/chunks/{external-link-BbdR7YO7.js → external-link-DG2sRdQL.js} +1 -1
- package/dist/elements/chunks/{file-text-D7dijo1A.js → file-text-D0J9F6M7.js} +1 -1
- package/dist/elements/chunks/file-tree-yGWNK0Js.js +1 -0
- package/dist/elements/chunks/{folder-D8z58t7B.js → folder-NV1pi_ud.js} +1 -1
- package/dist/elements/chunks/{form-p5BKJNw5.js → form-lUuJjz6s.js} +1 -1
- package/dist/elements/chunks/{hover-card-CN9s2md5.js → hover-card-6KtXpLwT.js} +1 -1
- package/dist/elements/chunks/{icon-CNiKP37E.js → icon-97R8SR2p.js} +1 -1
- package/dist/elements/chunks/{info-BSnuJiHI.js → info-C8r5Q6cc.js} +1 -1
- package/dist/elements/chunks/{input-BauDmzxX.js → input-DrseEjhp.js} +1 -1
- package/dist/elements/chunks/{kbd-BlHJaP9b.js → kbd-OGJDUT-O.js} +1 -1
- package/dist/elements/chunks/{link-DEi5iUWC.js → link-BdsfLB7b.js} +1 -1
- package/dist/elements/chunks/{link-preview-BaHyM6W4.js → link-preview-C9-jNJBf.js} +1 -1
- package/dist/elements/chunks/{loader-CmJG_Fkq.js → loader-B5QzK_8_.js} +1 -1
- package/dist/elements/chunks/{markdown-D2jaMpCN.js → markdown-BpAHnBJz.js} +1 -1
- package/dist/elements/chunks/{message-C5UfXZ2Z.js → message-CoqLuLkd.js} +1 -1
- package/dist/elements/chunks/{message-CXWLmmLn.js → message-_oYx5mk1.js} +1 -1
- package/dist/elements/chunks/message-square-C9ovmtOo.js +1 -0
- package/dist/elements/chunks/{minimize-2-C9ytZFMU.js → minimize-2-SegJ_oku.js} +1 -1
- package/dist/elements/chunks/{model-switcher-CivGfD7-.js → model-switcher-D7JrFFHp.js} +1 -1
- package/dist/elements/chunks/{overlay-DJL_sbOm.js → overlay-CV7z2YuX.js} +1 -1
- package/dist/elements/chunks/{paperclip-CFaB8naM.js → paperclip-Bg0ITU3b.js} +1 -1
- package/dist/elements/chunks/{progress-bar-Br5SksfR.js → progress-bar-D1_rzt6N.js} +1 -1
- package/dist/elements/chunks/{prompt-suggestion-CMIvtAhU.js → prompt-suggestion-D5Sm8xF1.js} +1 -1
- package/dist/elements/chunks/{reasoning-DpZcNzLq.js → reasoning-D26Bb4p6.js} +1 -1
- package/dist/elements/chunks/{resizable-Q8i3T9a_.js → resizable-Dpzjlvp4.js} +1 -1
- package/dist/elements/chunks/{rotate-cw-B5IHCBFV.js → rotate-cw-DzVDJOA1.js} +1 -1
- package/dist/elements/chunks/{scroll-area-eLeydBje.js → scroll-area-93A1bbeG.js} +1 -1
- package/dist/elements/chunks/{scroll-button-DWbz0yA1.js → scroll-button-CrTo7wm4.js} +1 -1
- package/dist/elements/chunks/{separator-Xic78AD_.js → separator-DH2r_ZSZ.js} +1 -1
- package/dist/elements/chunks/{settings-B8H51pAx.js → settings-BFMOd6yB.js} +1 -1
- package/dist/elements/chunks/{settings-group-CsG9eYLe.js → settings-group-B3VZKIcz.js} +1 -1
- package/dist/elements/chunks/{share-CNTx0z__.js → share-DgNbkJKY.js} +1 -1
- package/dist/elements/chunks/{skeleton-CLlHTcMI.js → skeleton-N8BuWYmf.js} +1 -1
- package/dist/elements/chunks/{source-BoVcU5ok.js → source-eJurW_-L.js} +1 -1
- package/dist/elements/chunks/{star-CxQVTVhI.js → star-DHvACxtm.js} +1 -1
- package/dist/elements/chunks/{store-CLtS5CUG.js → store-HIPGhNz9.js} +1 -1
- package/dist/elements/chunks/{tasks-card-CzlkLmUt.js → tasks-card-CfqrkoVO.js} +1 -1
- package/dist/elements/chunks/{text-shimmer-D5NhpIQ1.js → text-shimmer-BY_rI3s5.js} +1 -1
- package/dist/elements/chunks/{textarea-x5Uxsmtm.js → textarea-DPfuhswM.js} +1 -1
- package/dist/elements/chunks/{thumbs-up-UobcJnx9.js → thumbs-up-DQe0hvkZ.js} +1 -1
- package/dist/elements/chunks/{toast-store-BOfs9eXq.js → toast-store-VUZZBhzH.js} +1 -1
- package/dist/elements/chunks/{tool-Be6Dh_dt.js → tool-C1YtxwPu.js} +1 -1
- package/dist/elements/chunks/{tooltip-RxMxyCLF.js → tooltip-BqwnFWhn.js} +1 -1
- package/dist/elements/chunks/{triangle-alert-C4yxH2XN.js → triangle-alert-B6or7F5u.js} +1 -1
- package/dist/elements/chunks/{use-card-resolution-jva9ehH6.js → use-card-resolution-DJg32jGH.js} +1 -1
- package/dist/elements/chunks/{variant-aurora-Dx4VRcjS.js → variant-aurora-QXTZPyST.js} +1 -1
- package/dist/elements/chunks/{variant-custom-Y1ZTWgEa.js → variant-custom-D5ZlmziF.js} +1 -1
- package/dist/elements/chunks/{variant-wave-B9gml9Cg.js → variant-wave-DDCwhLas.js} +1 -1
- package/dist/elements/chunks/{video-CrPHsytT.js → video-Bb86fVYI.js} +1 -1
- package/dist/elements/chunks/x-BOhjBeOd.js +1 -0
- package/dist/elements/coachmark.js +1 -1
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command.js +1 -1
- package/dist/elements/compare.js +1 -1
- package/dist/elements/composer.js +1 -1
- package/dist/elements/confirm-card.js +1 -1
- package/dist/elements/context-meter.js +1 -1
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/embed.js +1 -1
- package/dist/elements/empty.js +1 -1
- package/dist/elements/feedback-bar.js +1 -1
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/form.js +1 -1
- package/dist/elements/hover-card.js +1 -1
- package/dist/elements/icon.js +1 -1
- package/dist/elements/image.js +1 -1
- package/dist/elements/input.js +1 -1
- package/dist/elements/kbd.js +1 -1
- package/dist/elements/link-preview.js +1 -1
- package/dist/elements/loader.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/menu.js +1 -1
- package/dist/elements/message-skills.js +1 -1
- package/dist/elements/message.js +1 -1
- package/dist/elements/model-switcher.js +1 -1
- package/dist/elements/nav.js +1 -1
- package/dist/elements/notice.js +1 -1
- package/dist/elements/pane-group.js +1 -1
- package/dist/elements/pane.js +1 -1
- package/dist/elements/popover.js +1 -1
- package/dist/elements/progress-bar.js +1 -1
- package/dist/elements/prompt-dock.js +1 -1
- package/dist/elements/prompt-input.js +1 -1
- package/dist/elements/prompt-suggestions.js +1 -1
- package/dist/elements/reasoning.js +1 -1
- package/dist/elements/remote.js +1 -1
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +1 -1
- package/dist/elements/screen.js +1 -1
- package/dist/elements/scroll-area.js +1 -1
- package/dist/elements/scroll-button.js +1 -1
- package/dist/elements/search.js +1 -1
- package/dist/elements/segmented.js +1 -1
- package/dist/elements/separator.js +1 -1
- package/dist/elements/setting-item.js +1 -1
- package/dist/elements/settings-group.js +1 -1
- package/dist/elements/skeleton.js +1 -1
- package/dist/elements/source.js +1 -1
- package/dist/elements/status.js +1 -1
- package/dist/elements/switch.js +1 -1
- package/dist/elements/tabs.js +1 -1
- package/dist/elements/tasks.js +1 -1
- package/dist/elements/text-shimmer.js +1 -1
- package/dist/elements/thinking-bar.js +1 -1
- package/dist/elements/thread.js +1 -1
- package/dist/elements/toast.js +1 -1
- package/dist/elements/tool.js +1 -1
- package/dist/elements/tooltip.js +1 -1
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.js +1 -1
- package/dist/index.js +1423 -1425
- package/dist/index.server.js +1212 -1214
- package/dist/kai.es.js +1 -1
- package/dist/mcp.es.js +99 -11
- package/dist/{register-impl-AxIlqjo7.js → register-impl-C96AnOJn.js} +18 -18
- package/dist/{solid-Dt2nEwfl.js → solid-BuqWLn6x.js} +1034 -1036
- package/dist/{solid-BGYSJyHG.js → solid-C76UXJuy.js} +1719 -1721
- package/dist/solid.js +1 -1
- package/dist/solid.server.js +1 -1
- package/dist/{variant-aurora-Ds5ou9BH.js → variant-aurora-CD35fdJF.js} +2 -2
- package/dist/{variant-aurora-B44X69AG.js → variant-aurora-Dau5Z4yR.js} +1 -1
- package/dist/{variant-aurora-BRhV8Flk.js → variant-aurora-Dc-2RVH9.js} +2 -2
- package/dist/{variant-custom-D6Rtvneb.js → variant-custom-CHr_jbMU.js} +2 -2
- package/dist/{variant-custom-B20FhtYj.js → variant-custom-Cyu8zx4A.js} +2 -2
- package/dist/{variant-custom-BvA1Schl.js → variant-custom-Df7QvXyZ.js} +1 -1
- package/dist/{variant-wave-DXC6_LcH.js → variant-wave-BkVpxkVF.js} +2 -2
- package/dist/{variant-wave-BUQtkryq.js → variant-wave-CXcaP_9W.js} +1 -1
- package/dist/{variant-wave-BVYnqy9L.js → variant-wave-DcGqjVnK.js} +2 -2
- package/package.json +3 -1
- package/src/agent-tooling/mcp/tools/scaffold.ts +81 -11
- package/src/components/file-tree.tsx +7 -3
- package/src/elements/compiled.css +1 -1
- package/src/wire/encode.ts +5 -0
- package/dist/elements/chunks/arrow-left-CFPTeL1Y.js +0 -1
- package/dist/elements/chunks/check-7Q3K-iXE.js +0 -1
- package/dist/elements/chunks/chevron-down-CpNYLn7E.js +0 -1
- package/dist/elements/chunks/chevron-right-DrH85Fha.js +0 -1
- package/dist/elements/chunks/circle-C9KRjKYv.js +0 -1
- package/dist/elements/chunks/circle-check-Dmi7Y4zw.js +0 -1
- package/dist/elements/chunks/file-tree-0upJ5jeb.js +0 -1
- package/dist/elements/chunks/message-square-hXylwsy0.js +0 -1
- package/dist/elements/chunks/x-_-OPHept.js +0 -1
package/dist/solid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-
|
|
1
|
+
import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-C76UXJuy.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AgentCard,
|
|
4
4
|
t as Artifact,
|
package/dist/solid.server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-
|
|
1
|
+
import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-BuqWLn6x.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AgentCard,
|
|
4
4
|
t as Artifact,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ssr as b, ssrAttribute as h, escape as l, ssrStyleProperty as d, createComponent as w } from "solid-js/web";
|
|
2
2
|
import { createEffect as u, createSignal as R, onCleanup as A } from "solid-js";
|
|
3
|
-
import { c, S, h as _, D as k } from "./create-tween-
|
|
4
|
-
import { C } from "./solid-
|
|
3
|
+
import { c, S, h as _, D as k } from "./create-tween-CTT5l1bo.js";
|
|
4
|
+
import { C } from "./solid-BuqWLn6x.js";
|
|
5
5
|
const T = `
|
|
6
6
|
const float PI = 3.14159265359;
|
|
7
7
|
// Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as x,s as y,c as b,a as w,C as R,t as A}from"./register-impl-
|
|
1
|
+
import{i as x,s as y,c as b,a as w,C as R,t as A}from"./register-impl-C96AnOJn.js";import{d as u,j as S,b as _,f as k,o as M}from"./kai.es.js";import{c as n,h as T,S as W,D as C}from"./create-tween-BmBnlg25.js";const q=`
|
|
2
2
|
const float PI = 3.14159265359;
|
|
3
3
|
// Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
|
|
4
4
|
// midpoint of the interval [1, 2*pi] with the interpolation knob fixed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { insert as x, createComponent as y, effect as b, setAttribute as w, className as R, setStyleProperty as A, template as S } from "solid-js/web";
|
|
2
2
|
import { createEffect as u, createSignal as k, onCleanup as C } from "solid-js";
|
|
3
|
-
import { c as l, S as T, h as _, D as M } from "./create-tween-
|
|
4
|
-
import { C as W } from "./solid-
|
|
3
|
+
import { c as l, S as T, h as _, D as M } from "./create-tween-vA7upv0h.js";
|
|
4
|
+
import { C as W } from "./solid-C76UXJuy.js";
|
|
5
5
|
const z = `
|
|
6
6
|
const float PI = 3.14159265359;
|
|
7
7
|
// Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as d, insert as A, effect as m, setAttribute as c, className as y, style as b, template as C } from "solid-js/web";
|
|
2
2
|
import { createEffect as g, createMemo as E, Show as x } from "solid-js";
|
|
3
|
-
import { c as S, D as N, S as k, h as w } from "./create-tween-
|
|
4
|
-
import { s as M, C as T } from "./solid-
|
|
3
|
+
import { c as S, D as N, S as k, h as w } from "./create-tween-vA7upv0h.js";
|
|
4
|
+
import { s as M, C as T } from "./solid-C76UXJuy.js";
|
|
5
5
|
var h = /* @__PURE__ */ C("<div>");
|
|
6
6
|
const O = {
|
|
7
7
|
"1f": !0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as c, ssr as m, ssrAttribute as o, escape as u, ssrStyle as d } from "solid-js/web";
|
|
2
2
|
import { createEffect as v, createMemo as g, Show as y } from "solid-js";
|
|
3
|
-
import { c as b, D as x, S as $, h as S } from "./create-tween-
|
|
4
|
-
import { s as z, C as A } from "./solid-
|
|
3
|
+
import { c as b, D as x, S as $, h as S } from "./create-tween-CTT5l1bo.js";
|
|
4
|
+
import { s as z, C as A } from "./solid-BuqWLn6x.js";
|
|
5
5
|
var h = ["<div", ' style="', '"></div>'], C = ["<div", ' style="', '">', "</div>"];
|
|
6
6
|
const E = {
|
|
7
7
|
"1f": !0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as k,i as w,s as d,c,d as m,t as S,C as M}from"./register-impl-
|
|
1
|
+
import{b as k,i as w,s as d,c,d as m,t as S,C as M}from"./register-impl-C96AnOJn.js";import{d as h,c as A,j as y,S as g,b as p}from"./kai.es.js";import{c as x,S as N,h as j,D as C}from"./create-tween-BmBnlg25.js";var b=S("<div>");const E={"1f":!0,"1i":!0,"1fv":!0,"2f":!0,"3f":!0,"3fv":!0,"4f":!0,"4fv":!0,Matrix2fv:!0,Matrix3fv:!0,Matrix4fv:!0},V=new Set(["1f","1i"]),F={"2f":2,"3f":3,"4f":4,Matrix2fv:4,Matrix3fv:9,Matrix4fv:16};function O(r,e){if(e==null||typeof e!="object")return`uniform "${r}" is not a valid declaration (expected an object with "type" and "value").`;if(E[e.type]!==!0)return`uniform "${r}" has an unrecognized type "${String(e.type)}".`;if(V.has(e.type))return typeof e.value!="number"||!Number.isFinite(e.value)?`uniform "${r}" is declared "${e.type}" (a number) but its value is not a finite number.`:void 0;if(!Array.isArray(e.value)||e.value.some(s=>typeof s!="number"||!Number.isFinite(s)))return`uniform "${r}" is declared "${e.type}" (an array) but its value is not an array of finite numbers.`;const o=F[e.type];if(o!==void 0&&e.value.length!==o)return`uniform "${r}" is declared "${e.type}", which takes exactly ${o} numbers, but its value has ${e.value.length}.`}function $(r,e){const o=r.bands.length?r.bands:[0],s={uColor:{type:"3fv",value:j(r.color)},uIntensity:{type:"1f",value:r.intensity},uSpeed:{type:"1f",value:r.speed},uComplexity:{type:"1f",value:r.complexity},uVolume:{type:"1f",value:r.volume},uBands:{type:"1fv",value:o,arraySize:o.length}};if(!e)return s;for(const[l,v]of Object.entries(e)){const t=O(l,v);if(t)throw new Error(t)}return{...s,...e}}function U(r){const e=x(.3),o=x(1);h(()=>{const t=k(r.state);if(r.state==="speaking")e.to(.3+.7*r.volume,{duration:0});else{const a=r.frozen?{duration:0}:{duration:.5,ease:"easeOut"};e.to(Array.isArray(t.intensity)&&r.frozen?t.intensity[0]:t.intensity,a)}o.to(r.frozen?0:t.speed,{duration:0})});const s=A(()=>{var t;try{return{uniforms:$({color:r.color??C,intensity:e.value(),speed:o.value(),complexity:r.complexity??.5,volume:r.volume,bands:r.bands},(t=r.shader)==null?void 0:t.uniforms)}}catch(a){return{error:a instanceof Error?a.message:String(a)}}});let l=!1;h(()=>{const{error:t}=s();if(!t){l=!1;return}l||(l=!0,console.error(`<kai-audio-visualizer variant="custom">: ${t}`),r.onUnavailable())});const v=()=>({height:`${M[r.size]}px`,"aspect-ratio":"1"});return y(g,{get when(){var t;return(t=r.shader)==null?void 0:t.fragment},get fallback(){return(()=>{var t=b();return p(a=>{var n=r.state,i=r.class,u=v();return n!==a.e&&d(t,"data-kai-state",a.e=n),i!==a.t&&c(t,a.t=i),a.a=m(t,u,a.a),a},{e:void 0,t:void 0,a:void 0}),t})()},children:t=>y(g,{get when(){return s().uniforms},get fallback(){return(()=>{var a=b();return p(n=>{var i=r.state,u=r.class,f=v();return i!==n.e&&d(a,"data-kai-state",n.e=i),u!==n.t&&c(a,n.t=u),n.a=m(a,f,n.a),n},{e:void 0,t:void 0,a:void 0}),a})()},children:a=>(()=>{var n=b();return w(n,y(N,{get fragment(){return t()},get precision(){return r.size==="icon"||r.size==="sm"?"mediump":"highp"},get uniforms(){return a()},get animateWhenNotVisible(){return r.animateWhenNotVisible},onError:i=>{/not available/i.test(i)?console.warn('<kai-audio-visualizer variant="custom">: shader unavailable',i):console.error('<kai-audio-visualizer variant="custom">: shader error',i),r.onUnavailable()}})),p(i=>{var u=r.state,f=r.class,z=v();return u!==i.e&&d(n,"data-kai-state",i.e=u),f!==i.t&&c(n,i.t=f),i.a=m(n,z,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()})})}export{$ as customUniforms,U as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ssr as m, ssrAttribute as f, escape as o, ssrStyleProperty as l, createComponent as h } from "solid-js/web";
|
|
2
2
|
import { createEffect as d } from "solid-js";
|
|
3
|
-
import { c, S as p, h as x, D as g } from "./create-tween-
|
|
4
|
-
import { C as y, w as b } from "./solid-
|
|
3
|
+
import { c, S as p, h as x, D as g } from "./create-tween-CTT5l1bo.js";
|
|
4
|
+
import { C as y, w as b } from "./solid-BuqWLn6x.js";
|
|
5
5
|
const w = `
|
|
6
6
|
const float TAU = 6.28318530718;
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as p,s as m,c as h,a as x,C as g,t as y,w as b}from"./register-impl-
|
|
1
|
+
import{i as p,s as m,c as h,a as x,C as g,t as y,w as b}from"./register-impl-C96AnOJn.js";import{d as v,j as w,b as C}from"./kai.es.js";import{c as r,h as z,S,D as U}from"./create-tween-BmBnlg25.js";const F=`
|
|
2
2
|
const float TAU = 6.28318530718;
|
|
3
3
|
|
|
4
4
|
// Noise for dithering
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { insert as m, createComponent as h, effect as p, setAttribute as x, className as g, setStyleProperty as y, template as b } from "solid-js/web";
|
|
2
2
|
import { createEffect as v } from "solid-js";
|
|
3
|
-
import { c as r, S as w, h as C, D as S } from "./create-tween-
|
|
4
|
-
import { C as z, w as U } from "./solid-
|
|
3
|
+
import { c as r, S as w, h as C, D as S } from "./create-tween-vA7upv0h.js";
|
|
4
|
+
import { C as z, w as U } from "./solid-C76UXJuy.js";
|
|
5
5
|
const A = `
|
|
6
6
|
const float TAU = 6.28318530718;
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitn.ai/ui",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.2",
|
|
4
4
|
"nx": {
|
|
5
5
|
"name": "ui",
|
|
6
6
|
"targets": {
|
|
@@ -178,6 +178,8 @@
|
|
|
178
178
|
"verify:ssr:render": "node scripts/verify-ssr-render.mjs",
|
|
179
179
|
"verify:pack": "node scripts/verify-pack-weight.mjs",
|
|
180
180
|
"verify:starters": "node scripts/verify-starters.mjs",
|
|
181
|
+
"lint:attachment-object-urls": "node scripts/lint-attachment-object-urls.mjs --self-test && node scripts/lint-attachment-object-urls.mjs",
|
|
182
|
+
"lint:silent-drops": "node scripts/lint-silent-drops.mjs --self-test && node scripts/lint-silent-drops.mjs",
|
|
181
183
|
"test": "vitest run",
|
|
182
184
|
"test:react": "vitest run --config vitest.react.config.ts",
|
|
183
185
|
"test:storybook": "vitest run --project=storybook",
|
|
@@ -8,6 +8,12 @@ import {
|
|
|
8
8
|
listArchetypes,
|
|
9
9
|
listIntegrations,
|
|
10
10
|
} from '../../registry';
|
|
11
|
+
// The kit's media-type declaration, read rather than restated. This is the one
|
|
12
|
+
// import in agent-tooling that reaches outside itself, and the module it reaches
|
|
13
|
+
// for is the reason: `wire/media-types.ts` is pure (no I/O, no DOM, no solid-js),
|
|
14
|
+
// so the Node MCP pass typechecks and bundles it unchanged. See
|
|
15
|
+
// `ATTACHMENT_ACCEPT`.
|
|
16
|
+
import { encodableMediaTypes } from '../../../wire/media-types';
|
|
11
17
|
|
|
12
18
|
/**
|
|
13
19
|
* scaffold — the keystone tool. Composes a working chat surface from four axes:
|
|
@@ -1081,6 +1087,40 @@ function hasAttachments(components: readonly string[]): boolean {
|
|
|
1081
1087
|
return components.includes('kai-file-upload') && components.includes('kai-attachments');
|
|
1082
1088
|
}
|
|
1083
1089
|
|
|
1090
|
+
/**
|
|
1091
|
+
* ★ THE EMITTED `accept`, DERIVED. The seven renderers below interpolate this;
|
|
1092
|
+
* none of them writes a media type.
|
|
1093
|
+
*
|
|
1094
|
+
* It used to be the literal `image/*,application/pdf` in all seven, which was
|
|
1095
|
+
* right when only images and PDFs could be encoded and silently stopped being
|
|
1096
|
+
* right when #190 made `text/*`, `application/json`, `application/xml` and YAML
|
|
1097
|
+
* encodable. The list did not become wrong in this file — it became wrong in
|
|
1098
|
+
* every app scaffolded from it, which is the worst place for a copy to live and
|
|
1099
|
+
* exactly what `wire/media-types.ts` exists to prevent. An `accept` attribute is
|
|
1100
|
+
* a harder case than the prose in `ATTACHMENT_WIRE_NOTE` only in that a comment
|
|
1101
|
+
* can point at a function and an attribute has to CONTAIN the answer; the fix is
|
|
1102
|
+
* the same either way, which is to read the declaration rather than restate it.
|
|
1103
|
+
*
|
|
1104
|
+
* WHY EMIT IT AT ALL, RATHER THAN NOTHING. An absent filter means the full
|
|
1105
|
+
* capability set to `resolveMediaPolicy`, so omitting looks equivalent and is
|
|
1106
|
+
* not, because the tags emitted here never call it. `<kai-file-upload>` (and the
|
|
1107
|
+
* Solid `<FileUpload>`) pass `accept` straight to `<input type="file">` and do no
|
|
1108
|
+
* JS filtering at all — unlike `<kai-chat accept>`, which resolves the policy in
|
|
1109
|
+
* `default-input.tsx`. So on THESE tags an absent attribute is not the capability
|
|
1110
|
+
* set, it is wider than the capability set: the dialog offers `.zip`, the emitted
|
|
1111
|
+
* `toAttachment` stages it, and the encoder throws on a file the picker
|
|
1112
|
+
* volunteered. Deriving the attribute is the only form that tracks the
|
|
1113
|
+
* declaration; omitting it is a third behaviour that matches neither layer.
|
|
1114
|
+
*
|
|
1115
|
+
* IT IS A STEER, NOT A GATE, and nothing here should be read as claiming
|
|
1116
|
+
* otherwise. `accept` filters the OS dialog, which always offers an "All Files"
|
|
1117
|
+
* escape, and it does not apply to drag-and-drop — `file-upload.tsx` hands
|
|
1118
|
+
* `dataTransfer.files` straight to `onFilesAdded`. A scaffolded app that wants a
|
|
1119
|
+
* filter that HOLDS calls `resolveMediaPolicy().decide()` on what it staged; the
|
|
1120
|
+
* emitted note points at it.
|
|
1121
|
+
*/
|
|
1122
|
+
const ATTACHMENT_ACCEPT = encodableMediaTypes().join(',');
|
|
1123
|
+
|
|
1084
1124
|
/**
|
|
1085
1125
|
* What the scaffolder INTENDS to emit for one components list, so a guard can
|
|
1086
1126
|
* check the seven renderers against the decision instead of restating it.
|
|
@@ -1161,15 +1201,35 @@ export const ATTACHMENT_WIRE_NOTE = [
|
|
|
1161
1201
|
*
|
|
1162
1202
|
* `<kai-file-upload>` hands over `File` objects and `<kai-attachments>` renders
|
|
1163
1203
|
* `AttachmentData`, so something has to bridge them and it may as well be code
|
|
1164
|
-
* the consumer can edit.
|
|
1165
|
-
*
|
|
1166
|
-
*
|
|
1204
|
+
* the consumer can edit.
|
|
1205
|
+
*
|
|
1206
|
+
* It reads the file with `FileReader.readAsDataURL` and stages a `data:` URI —
|
|
1207
|
+
* the same call `readAsDataUrl` in `elements/default-input.tsx` makes, for the
|
|
1208
|
+
* same reason. `URL.createObjectURL` would draw an identical thumbnail and be
|
|
1209
|
+
* meaningless to anything downstream: an object URL resolves only inside the tab
|
|
1210
|
+
* that minted it, so `toOpenAIMessages` / `toAnthropicMessages` refuse it rather
|
|
1211
|
+
* than send a provider an address it cannot fetch. A `data:` URI previews the
|
|
1212
|
+
* same and is the one form both APIs actually take. Reading is async, which is
|
|
1213
|
+
* the only reason the emitted function is.
|
|
1214
|
+
*
|
|
1215
|
+
* WHICH files survive that encoding is deliberately not stated here, and the
|
|
1216
|
+
* emitted code does not state it either: `encodableMediaTypes()` is the set, and
|
|
1217
|
+
* is public precisely so that nothing has to keep a second copy of it (the
|
|
1218
|
+
* reasoning is on `ATTACHMENT_WIRE_NOTE` above).
|
|
1167
1219
|
*
|
|
1168
1220
|
* The parameter type is derived from the property it feeds
|
|
1169
1221
|
* (`KaiAttachmentsElement['items']` / the wrapper's `items` prop) at each call
|
|
1170
1222
|
* site rather than importing `AttachmentData`, for the reason the html target
|
|
1171
1223
|
* already derives its message type from `KaiChatElement['messages']`: a type
|
|
1172
1224
|
* read off the assignment target cannot drift out of step with it.
|
|
1225
|
+
*
|
|
1226
|
+
* This comment taught the reverse until now, and approvingly — it described the
|
|
1227
|
+
* object URL as what made a preview a real thumbnail and called leaving it
|
|
1228
|
+
* unrevoked a deliberate choice, having gone untouched since #185 while #186
|
|
1229
|
+
* rewrote the function under it. That is the second time in this file the code
|
|
1230
|
+
* was corrected and the prose above it was not; the paragraph on
|
|
1231
|
+
* `ATTACHMENT_WIRE_NOTE` records the first. Neither claim had anything to
|
|
1232
|
+
* disagree with, which is the whole hazard of explaining emitted code in prose.
|
|
1173
1233
|
*/
|
|
1174
1234
|
function fileToAttachmentLines(pad: string, typeName: string): string[] {
|
|
1175
1235
|
return [
|
|
@@ -1404,7 +1464,7 @@ function componentTags(components: readonly string[], chatFill: string): string
|
|
|
1404
1464
|
` <!-- Drop files here to stage them for the NEXT message. src/main.ts wires`,
|
|
1405
1465
|
` kai-files-added -> the staged list -> kai-attachments' items property. -->`,
|
|
1406
1466
|
` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
|
|
1407
|
-
` <kai-file-upload id="upload" accept="
|
|
1467
|
+
` <kai-file-upload id="upload" accept="${ATTACHMENT_ACCEPT}"></kai-file-upload>`,
|
|
1408
1468
|
` <!-- items is a JS PROPERTY (arrays can't be attributes); 'removable' fires kai-remove. -->`,
|
|
1409
1469
|
` <kai-attachments id="attachments" variant="inline" removable></kai-attachments>`,
|
|
1410
1470
|
` </div>`,
|
|
@@ -1815,7 +1875,7 @@ function renderJsx(components: readonly string[], ctx: RenderCtx, framework: str
|
|
|
1815
1875
|
? [
|
|
1816
1876
|
` {/* Drop files here to stage them for the NEXT message. */}`,
|
|
1817
1877
|
` <div style={{ flex: '0 0 auto', display: 'flex', flexDirection: 'column', gap: '0.5rem', padding: '0.75rem' }}>`,
|
|
1818
|
-
` <FileUpload accept="
|
|
1878
|
+
` <FileUpload accept="${ATTACHMENT_ACCEPT}" onFilesAdded={onFilesAdded} />`,
|
|
1819
1879
|
` {/* items is an ARRAY, so the wrapper sets it as a DOM property, never an attribute. */}`,
|
|
1820
1880
|
` <Attachments items={staged} variant="inline" removable onRemove={onRemoveAttachment} />`,
|
|
1821
1881
|
` </div>`,
|
|
@@ -2176,7 +2236,7 @@ function renderVue(components: readonly string[], ctx: RenderCtx): string {
|
|
|
2176
2236
|
? [
|
|
2177
2237
|
` <!-- Drop files here to stage them for the NEXT message. -->`,
|
|
2178
2238
|
` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
|
|
2179
|
-
` <kai-file-upload accept="
|
|
2239
|
+
` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" @kai-files-added="onFilesAdded" />`,
|
|
2180
2240
|
` <kai-attachments :items.prop="staged" variant="inline" removable @kai-remove="onRemoveAttachment" />`,
|
|
2181
2241
|
` </div>`,
|
|
2182
2242
|
].join('\n')
|
|
@@ -2533,7 +2593,7 @@ function renderSvelte(components: readonly string[], ctx: RenderCtx): string {
|
|
|
2533
2593
|
? [
|
|
2534
2594
|
` <!-- Drop files here to stage them for the NEXT message. -->`,
|
|
2535
2595
|
` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
|
|
2536
|
-
` <kai-file-upload accept="
|
|
2596
|
+
` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" onkai-files-added={onFilesAdded}></kai-file-upload>`,
|
|
2537
2597
|
` <kai-attachments bind:this={attachmentsEl} variant="inline" removable onkai-remove={onRemoveAttachment}></kai-attachments>`,
|
|
2538
2598
|
` </div>`,
|
|
2539
2599
|
]
|
|
@@ -2714,7 +2774,7 @@ function renderTanstackStart(components: readonly string[], ctx: RenderCtx): str
|
|
|
2714
2774
|
? [
|
|
2715
2775
|
` {/* Drop files here to stage them for the NEXT message. */}`,
|
|
2716
2776
|
` <div style={{ flex: '0 0 auto', display: 'flex', flexDirection: 'column', gap: '0.5rem', padding: '0.75rem' }}>`,
|
|
2717
|
-
` <FileUpload accept="
|
|
2777
|
+
` <FileUpload accept="${ATTACHMENT_ACCEPT}" onFilesAdded={onFilesAdded} />`,
|
|
2718
2778
|
` {/* items is an ARRAY, so the wrapper sets it as a DOM property, never an attribute. */}`,
|
|
2719
2779
|
` <Attachments items={staged} variant="inline" removable onRemove={onRemoveAttachment} />`,
|
|
2720
2780
|
` </div>`,
|
|
@@ -2989,7 +3049,7 @@ function renderAngular(components: readonly string[], ctx: RenderCtx): string {
|
|
|
2989
3049
|
? [
|
|
2990
3050
|
` <!-- Drop files here to stage them for the NEXT message. -->`,
|
|
2991
3051
|
` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
|
|
2992
|
-
` <kai-file-upload accept="
|
|
3052
|
+
` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" (kai-files-added)="onFilesAdded($event)"></kai-file-upload>`,
|
|
2993
3053
|
` <kai-attachments [items]="staged()" variant="inline" removable (kai-remove)="onRemoveAttachment($event)"></kai-attachments>`,
|
|
2994
3054
|
` </div>`,
|
|
2995
3055
|
]
|
|
@@ -3439,7 +3499,17 @@ function renderSolid(components: readonly string[], ctx: RenderCtx): string {
|
|
|
3439
3499
|
` // shortened the array.`,
|
|
3440
3500
|
` <Show when={messages()[i()]}>`,
|
|
3441
3501
|
` {(m) => (`,
|
|
3442
|
-
` <Message
|
|
3502
|
+
` <Message`,
|
|
3503
|
+
` // \`role\` is the SPEAKER, not an ARIA role — <Message> turns it`,
|
|
3504
|
+
` // into role="article" plus an aria-label naming the speaker, and`,
|
|
3505
|
+
` // a data-role hook for styling. Omit it and the row is an`,
|
|
3506
|
+
` // unlabelled <div> that tells a screen reader nothing about who`,
|
|
3507
|
+
` // is talking. The alignment class below reads the SAME value: if`,
|
|
3508
|
+
` // you are deriving CSS from a semantic field, the semantics have`,
|
|
3509
|
+
` // to reach the DOM too.`,
|
|
3510
|
+
` role={m().role}`,
|
|
3511
|
+
` class={\`mx-auto flex w-full max-w-3xl flex-col gap-2 px-6 \${m().role === 'user' ? 'items-end' : 'items-start'}\`}`,
|
|
3512
|
+
` >`,
|
|
3443
3513
|
` {/* <Index>, not <For>, INSIDE a message. The state folds only`,
|
|
3444
3514
|
` ever append a part or patch one in place — they never`,
|
|
3445
3515
|
` reorder — so a part's POSITION is a stable identity, and`,
|
|
@@ -3498,7 +3568,7 @@ function renderSolid(components: readonly string[], ctx: RenderCtx): string {
|
|
|
3498
3568
|
` {/* Read every file BEFORE appending: a per-file append would order`,
|
|
3499
3569
|
` the list by whichever finished reading first. */}`,
|
|
3500
3570
|
` <FileUpload`,
|
|
3501
|
-
` accept="
|
|
3571
|
+
` accept="${ATTACHMENT_ACCEPT}"`,
|
|
3502
3572
|
` onFilesAdded={async (files) => setStaged([...staged(), ...(await Promise.all(files.map(toAttachment)))])}`,
|
|
3503
3573
|
` >`,
|
|
3504
3574
|
` <FileUploadTrigger class="border-border text-muted-foreground w-full rounded-xl border border-dashed px-4 py-3 text-center text-sm">`,
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
splitProps,
|
|
6
6
|
createSignal,
|
|
7
7
|
createMemo,
|
|
8
|
-
mergeProps,
|
|
9
8
|
} from 'solid-js';
|
|
10
9
|
import { cn } from '../utils/cn';
|
|
11
10
|
import {
|
|
@@ -208,8 +207,13 @@ export interface FileTreeProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>,
|
|
|
208
207
|
* calls `onSelect(path, file)`.
|
|
209
208
|
*/
|
|
210
209
|
export function FileTree(props: FileTreeProps): JSX.Element {
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
// `files` is REQUIRED, so it is read straight off `props` — no `mergeProps`
|
|
211
|
+
// default. Defaulting it to `[]` here would turn a caller who forgot it into a
|
|
212
|
+
// silently empty tree, which fails far from the mistake. The `<kai-file-tree>`
|
|
213
|
+
// facade declares its own `files: []` default (elements/file-tree.tsx), so the
|
|
214
|
+
// web-component path is covered where the property genuinely arrives late.
|
|
215
|
+
// Same shape as `Segmented`, which reads `merged.options` directly.
|
|
216
|
+
const [local, rest] = splitProps(props, [
|
|
213
217
|
'files',
|
|
214
218
|
'activeFile',
|
|
215
219
|
'onSelect',
|