wimui 0.14.0 → 0.15.0
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/components/ai/ChatUI/ChatUI.cjs +1 -1
- package/dist/components/ai/ChatUI/ChatUI.d.ts +8 -6
- package/dist/components/ai/ChatUI/ChatUI.js +2 -2
- package/dist/components/ai/ChatUI/chat-ui.module.cjs +1 -1
- package/dist/components/ai/ChatUI/chat-ui.module.js +4 -4
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/paperclip.cjs"),r=require("../../../icon/send.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../../hooks/useAutoResize.cjs"),o=require("./chat-ui.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=({children:e,className:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(`wim-chat-ui`,o.default.container,t),...n,children:e}),d=(0,s.forwardRef)(({children:e,className:t,...n},r)=>(0,l.jsx)(`div`,{ref:r,className:(0,c.default)(o.default.messageList,t),...n,children:e}));d.displayName=`ChatMessageList`;var f=({children:e,position:t=`left`,variant:n=`default`,showAvatar:r=!0,avatar:i,timestamp:a,senderName:s,isTyping:u=!1,actions:d,actionsVisible:f=!
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/paperclip.cjs"),r=require("../../../icon/send.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../../hooks/useAutoResize.cjs"),o=require("./chat-ui.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=({children:e,className:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(`wim-chat-ui`,o.default.container,t),...n,children:e}),d=(0,s.forwardRef)(({children:e,className:t,...n},r)=>(0,l.jsx)(`div`,{ref:r,className:(0,c.default)(o.default.messageList,t),...n,children:e}));d.displayName=`ChatMessageList`;var f=({children:e,position:t=`left`,variant:n=`default`,showAvatar:r=!0,avatar:i,timestamp:a,senderName:s,isTyping:u=!1,actions:d,actionsVisible:f=!0,className:p,...m})=>(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.message,o.default[t],o.default[n],{[o.default.hasAvatar]:r},p),...m,children:[r&&t===`left`&&(0,l.jsx)(`div`,{className:o.default.messageAvatar,children:i}),(0,l.jsxs)(`div`,{className:o.default.contentWrapper,children:[s&&(0,l.jsx)(`div`,{className:o.default.sender,children:s}),(0,l.jsx)(`div`,{className:(0,c.default)(o.default.bubble,{[o.default.typing]:u}),children:u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:o.default.typingDot}),(0,l.jsx)(`span`,{className:o.default.typingDot}),(0,l.jsx)(`span`,{className:o.default.typingDot})]}):e}),d&&(0,l.jsx)(`div`,{className:(0,c.default)(o.default.actions,{[o.default.hoverOnly]:!f}),children:d}),a&&(0,l.jsx)(`div`,{className:o.default.timestamp,children:a})]}),r&&t===`right`&&(0,l.jsx)(`div`,{className:o.default.messageAvatar,children:i})]}),p=({children:e,className:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.inputArea,t),...n,children:e}),m=(0,s.forwardRef)(({onSend:e,onAttach:c,sendButtonLabel:u,sendButtonIcon:d=r.default,showSendButton:f=!0,showAttach:m=!1,maxRows:h=8,className:g,..._},v)=>{let{t:y}=t.useWimTranslation(`common`),[b,x]=s.default.useState(``),S=_.value!==void 0,C=S?_.value:b,w=a.useAutoResize(C,h);s.default.useImperativeHandle(v,()=>w.current);let T=!!u,E=()=>{e&&(e(C),S||x(``))};return(0,l.jsx)(p,{className:g,children:(0,l.jsxs)(`div`,{className:o.default.fieldContainer,children:[m&&(0,l.jsx)(`button`,{type:`button`,className:o.default.attachButton,onClick:c,"aria-label":y(`a11y.attach_file`),children:(0,l.jsx)(i.Icon,{component:n.default,size:`sm`})}),(0,l.jsx)(`textarea`,{ref:w,className:o.default.field,value:C,onChange:e=>{S||x(e.target.value),_.onChange?.(e)},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),E())},placeholder:_.placeholder||`Type a message...`,rows:1,..._}),f&&(0,l.jsx)(`button`,{className:o.default.sendButton,onClick:E,disabled:!C.trim(),type:`button`,"aria-label":u||`Send`,children:T?u:(0,l.jsx)(i.Icon,{component:d,size:`sm`})})]})})});m.displayName=`ChatInput`;var h=({src:e,alt:t,fallback:n,size:r=`md`,color:i=`s18`,className:a,...u})=>{let[d,f]=s.default.useState(!1),p=t||`User Avatar`;return(0,l.jsx)(`div`,{className:(0,c.default)(o.default.avatar,o.default[r],o.default[i],a),...u,children:e&&!d?(0,l.jsx)(`img`,{src:e,alt:p,className:o.default.image,onError:()=>f(!0)}):(0,l.jsx)(`div`,{className:o.default.fallback,children:n||p.charAt(0).toUpperCase()})})};exports.ChatAvatar=h,exports.ChatContainer=u,exports.ChatInput=m,exports.ChatInputArea=p,exports.ChatMessage=f,exports.ChatMessageList=d;
|
|
@@ -34,14 +34,16 @@ export interface ChatMessageProps extends React.ComponentPropsWithoutRef<"div">
|
|
|
34
34
|
/** Action elements shown below the message */
|
|
35
35
|
actions?: React.ReactNode;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Whether `actions` are visible without hovering. Defaults to `true`.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* Hover-reveal hides the fact that the actions exist at all: a reader with a
|
|
40
|
+
* mouse has no way to learn that a reply can be rated until they happen to
|
|
41
|
+
* point at it, and a tooltip does not help because it also waits for the
|
|
42
|
+
* hover. Set `false` for a long transcript where the repeated controls are
|
|
43
|
+
* more noise than affordance.
|
|
42
44
|
*
|
|
43
|
-
* Touch devices ignore
|
|
44
|
-
* reveal them with, and `opacity` does not disable a control, so a hidden
|
|
45
|
+
* Touch devices ignore `false` and always show the actions: there is no hover
|
|
46
|
+
* to reveal them with, and `opacity` does not disable a control, so a hidden
|
|
45
47
|
* thumbs-down would still be tappable.
|
|
46
48
|
*/
|
|
47
49
|
actionsVisible?: boolean;
|
|
@@ -20,7 +20,7 @@ var f = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u("div", {
|
|
|
20
20
|
children: e
|
|
21
21
|
}));
|
|
22
22
|
p.displayName = "ChatMessageList";
|
|
23
|
-
var m = ({ children: e, position: t = "left", variant: n = "default", showAvatar: r = !0, avatar: i, timestamp: o, senderName: s, isTyping: f = !1, actions: p, actionsVisible: m = !
|
|
23
|
+
var m = ({ children: e, position: t = "left", variant: n = "default", showAvatar: r = !0, avatar: i, timestamp: o, senderName: s, isTyping: f = !1, actions: p, actionsVisible: m = !0, className: h, ...g }) => /* @__PURE__ */ d("div", {
|
|
24
24
|
className: c(a.message, a[t], a[n], { [a.hasAvatar]: r }, h),
|
|
25
25
|
...g,
|
|
26
26
|
children: [
|
|
@@ -44,7 +44,7 @@ var m = ({ children: e, position: t = "left", variant: n = "default", showAvatar
|
|
|
44
44
|
] }) : e
|
|
45
45
|
}),
|
|
46
46
|
p && /* @__PURE__ */ u("div", {
|
|
47
|
-
className: c(a.actions, { [a.
|
|
47
|
+
className: c(a.actions, { [a.hoverOnly]: !m }),
|
|
48
48
|
children: p
|
|
49
49
|
}),
|
|
50
50
|
o && /* @__PURE__ */ u("div", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_1ycre_3`,t=`_messageList_1ycre_19`,n=`_message_1ycre_19`,r=`_left_1ycre_36`,i=`_right_1ycre_41`,a=`_contentWrapper_1ycre_46`,o=`_primary_1ycre_49`,s=`_secondary_1ycre_52`,c=`_messageAvatar_1ycre_55`,l=`_sender_1ycre_64`,u=`_bubble_1ycre_69`,d=`_typing_1ycre_80`,f=`_typingDot_1ycre_87`,p=`_actions_1ycre_111`,m=`_hoverOnly_1ycre_118`,h=`_hasAvatar_1ycre_136`,g=`_timestamp_1ycre_176`,_=`_inputArea_1ycre_181`,v=`_fieldContainer_1ycre_194`,y=`_field_1ycre_194`,b=`_sendButton_1ycre_229`,x=`_attachButton_1ycre_256`,S=`_avatar_1ycre_278`,C=`_sm_1ycre_288`,w=`_md_1ycre_293`,T=`_lg_1ycre_298`,E=`_s1_1ycre_306`,D=`_s3_1ycre_309`,O=`_s5_1ycre_312`,k=`_s7_1ycre_315`,A=`_s10_1ycre_318`,j=`_s12_1ycre_321`,M=`_s14_1ycre_324`,N=`_s16_1ycre_327`,P=`_s18_1ycre_330`,F=`_s20_1ycre_333`,I=`_s22_1ycre_336`,L=`_s24_1ycre_339`,R=`_image_1ycre_342`,z=`_fallback_1ycre_347`,B={container:e,messageList:t,message:n,left:r,right:i,contentWrapper:a,primary:o,secondary:s,messageAvatar:c,sender:l,bubble:u,typing:d,typingDot:f,"chat-typing":`_chat-typing_1ycre_1`,actions:p,hoverOnly:m,hasAvatar:h,timestamp:g,inputArea:_,fieldContainer:v,field:y,sendButton:b,attachButton:x,avatar:S,sm:C,md:w,lg:T,s1:E,s3:D,s5:O,s7:k,s10:A,s12:j,s14:M,s16:N,s18:P,s20:F,s22:I,s24:L,image:R,fallback:z};exports.actions=p,exports.attachButton=x,exports.avatar=S,exports.bubble=u,exports.container=e,exports.contentWrapper=a,exports.default=B,exports.fallback=z,exports.field=y,exports.fieldContainer=v,exports.hasAvatar=h,exports.hoverOnly=m,exports.image=R,exports.inputArea=_,exports.left=r,exports.lg=T,exports.md=w,exports.message=n,exports.messageAvatar=c,exports.messageList=t,exports.primary=o,exports.right=i,exports.s1=E,exports.s10=A,exports.s12=j,exports.s14=M,exports.s16=N,exports.s18=P,exports.s20=F,exports.s22=I,exports.s24=L,exports.s3=D,exports.s5=O,exports.s7=k,exports.secondary=s,exports.sendButton=b,exports.sender=l,exports.sm=C,exports.timestamp=g,exports.typing=d,exports.typingDot=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/ai/ChatUI/chat-ui.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_container_1ycre_3", t = "_messageList_1ycre_19", n = "_message_1ycre_19", r = "_left_1ycre_36", i = "_right_1ycre_41", a = "_contentWrapper_1ycre_46", o = "_primary_1ycre_49", s = "_secondary_1ycre_52", c = "_messageAvatar_1ycre_55", l = "_sender_1ycre_64", u = "_bubble_1ycre_69", d = "_typing_1ycre_80", f = "_typingDot_1ycre_87", p = "_actions_1ycre_111", m = "_hoverOnly_1ycre_118", h = "_hasAvatar_1ycre_136", g = "_timestamp_1ycre_176", _ = "_inputArea_1ycre_181", v = "_fieldContainer_1ycre_194", y = "_field_1ycre_194", b = "_sendButton_1ycre_229", x = "_attachButton_1ycre_256", S = "_avatar_1ycre_278", C = "_sm_1ycre_288", w = "_md_1ycre_293", T = "_lg_1ycre_298", E = "_s1_1ycre_306", D = "_s3_1ycre_309", O = "_s5_1ycre_312", k = "_s7_1ycre_315", A = "_s10_1ycre_318", j = "_s12_1ycre_321", M = "_s14_1ycre_324", N = "_s16_1ycre_327", P = "_s18_1ycre_330", F = "_s20_1ycre_333", I = "_s22_1ycre_336", L = "_s24_1ycre_339", R = "_image_1ycre_342", z = "_fallback_1ycre_347", B = {
|
|
4
4
|
container: e,
|
|
5
5
|
messageList: t,
|
|
6
6
|
message: n,
|
|
@@ -14,9 +14,9 @@ var e = "_container_u0a2f_3", t = "_messageList_u0a2f_19", n = "_message_u0a2f_1
|
|
|
14
14
|
bubble: u,
|
|
15
15
|
typing: d,
|
|
16
16
|
typingDot: f,
|
|
17
|
-
"chat-typing": "_chat-
|
|
17
|
+
"chat-typing": "_chat-typing_1ycre_1",
|
|
18
18
|
actions: p,
|
|
19
|
-
|
|
19
|
+
hoverOnly: m,
|
|
20
20
|
hasAvatar: h,
|
|
21
21
|
timestamp: g,
|
|
22
22
|
inputArea: _,
|
|
@@ -44,4 +44,4 @@ var e = "_container_u0a2f_3", t = "_messageList_u0a2f_19", n = "_message_u0a2f_1
|
|
|
44
44
|
fallback: z
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
47
|
-
export { p as actions, x as attachButton, S as avatar, u as bubble, e as container, a as contentWrapper, B as default, z as fallback, y as field, v as fieldContainer, h as hasAvatar, R as image, _ as inputArea, r as left, T as lg, w as md, n as message, c as messageAvatar, t as messageList, o as primary, i as right, E as s1, A as s10, j as s12, M as s14, N as s16, P as s18, F as s20, I as s22, L as s24, D as s3, O as s5, k as s7, s as secondary, b as sendButton, l as sender, C as sm, g as timestamp, d as typing, f as typingDot
|
|
47
|
+
export { p as actions, x as attachButton, S as avatar, u as bubble, e as container, a as contentWrapper, B as default, z as fallback, y as field, v as fieldContainer, h as hasAvatar, m as hoverOnly, R as image, _ as inputArea, r as left, T as lg, w as md, n as message, c as messageAvatar, t as messageList, o as primary, i as right, E as s1, A as s10, j as s12, M as s14, N as s16, P as s18, F as s20, I as s22, L as s24, D as s3, O as s5, k as s7, s as secondary, b as sendButton, l as sender, C as sm, g as timestamp, d as typing, f as typingDot };
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.15.0 — a React 19 component library: 218 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.15.0 — a React 19 component library: 218 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|