wimui 0.23.2 → 0.23.4

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1adbo_35`,t=`_titleBar_1adbo_48`,n=`_dot_1adbo_57`,r=`_titleText_1adbo_73`,i=`_titleActions_1adbo_89`,a=`_titleBtn_1adbo_95`,o=`_copied_1adbo_119`,s=`_body_1adbo_126`,c=`_line_1adbo_141`,l=`_prompt_1adbo_147`,u=`_content_1adbo_152`,d=`_input_1adbo_159`,f=`_output_1adbo_162`,p=`_error_1adbo_165`,m=`_info_1adbo_171`,h={root:e,titleBar:t,dot:n,titleText:r,titleActions:i,titleBtn:a,copied:o,body:s,line:c,prompt:l,content:u,input:d,output:f,error:p,info:m};exports.body=s,exports.content=u,exports.copied=o,exports.default=h,exports.dot=n,exports.error=p,exports.info=m,exports.input=d,exports.line=c,exports.output=f,exports.prompt=l,exports.root=e,exports.titleActions=i,exports.titleBar=t,exports.titleBtn=a,exports.titleText=r;
2
+ var e=`_root_12m7g_35`,t=`_titleBar_12m7g_48`,n=`_dot_12m7g_57`,r=`_titleText_12m7g_73`,i=`_titleActions_12m7g_89`,a=`_titleBtn_12m7g_95`,o=`_copied_12m7g_119`,s=`_body_12m7g_126`,c=`_line_12m7g_141`,l=`_prompt_12m7g_152`,u=`_content_12m7g_141`,d=`_input_12m7g_168`,f=`_output_12m7g_171`,p=`_error_12m7g_174`,m=`_info_12m7g_180`,h={root:e,titleBar:t,dot:n,titleText:r,titleActions:i,titleBtn:a,copied:o,body:s,line:c,prompt:l,content:u,input:d,output:f,error:p,info:m};exports.body=s,exports.content=u,exports.copied=o,exports.default=h,exports.dot=n,exports.error=p,exports.info=m,exports.input=d,exports.line=c,exports.output=f,exports.prompt=l,exports.root=e,exports.titleActions=i,exports.titleBar=t,exports.titleBtn=a,exports.titleText=r;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/ai/Terminal/terminal.module.scss
3
- var e = "_root_1adbo_35", t = "_titleBar_1adbo_48", n = "_dot_1adbo_57", r = "_titleText_1adbo_73", i = "_titleActions_1adbo_89", a = "_titleBtn_1adbo_95", o = "_copied_1adbo_119", s = "_body_1adbo_126", c = "_line_1adbo_141", l = "_prompt_1adbo_147", u = "_content_1adbo_152", d = "_input_1adbo_159", f = "_output_1adbo_162", p = "_error_1adbo_165", m = "_info_1adbo_171", h = {
3
+ var e = "_root_12m7g_35", t = "_titleBar_12m7g_48", n = "_dot_12m7g_57", r = "_titleText_12m7g_73", i = "_titleActions_12m7g_89", a = "_titleBtn_12m7g_95", o = "_copied_12m7g_119", s = "_body_12m7g_126", c = "_line_12m7g_141", l = "_prompt_12m7g_152", u = "_content_12m7g_141", d = "_input_12m7g_168", f = "_output_12m7g_171", p = "_error_12m7g_174", m = "_info_12m7g_180", h = {
4
4
  root: e,
5
5
  titleBar: t,
6
6
  dot: n,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./voice-visualizer.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=100,o=.05,s=n.default.forwardRef(({mode:e=`bars`,data:s,isActive:c=!0,barCount:l=24,height:u=40,className:d,sentiment:f=`neutral`,style:p,...m},h)=>{let g=c&&!s,_=(0,n.useMemo)(()=>a/l*.55,[l]),v=(0,n.useMemo)(()=>a/l*.45,[l]),y=(0,n.useMemo)(()=>Array.from({length:l},(e,t)=>{let n=s?Math.min(1,Math.max(o,s[t]??o)):o,r=n*u;return{x:t*(_+v)+v/2,barH:r,norm:n}}),[s,l,u,_,v]),b=(0,n.useMemo)(()=>!s||s.length<2?null:s.map((e,t)=>{let n=t/(s.length-1)*a,r=u*(1-Math.min(1,Math.max(0,e)));return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[s,u]),x=(0,n.useMemo)(()=>Array.from({length:80},(e,t)=>{let n=t/79*a*2,r=u/2-u*.22*Math.sin(t/79*4*Math.PI);return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[u]);return(0,i.jsxs)(`svg`,{ref:h,role:`img`,"aria-hidden":`true`,viewBox:`0 0 ${a} ${u}`,width:`100%`,height:u,preserveAspectRatio:`none`,className:(0,r.default)(`wim-voice-visualizer`,t.default.root,t.default[e],t.default[f],c&&t.default.active,!c&&t.default.muted,d),style:{height:`${u}px`,...p},...m,children:[e===`bars`&&y.map(({x:e,barH:n,norm:a},s)=>(0,i.jsx)(`rect`,{className:(0,r.default)(t.default.bar,g&&t.default.idle),style:g?{"--delay":`${(s/l*.5).toFixed(3)}s`}:void 0,x:e,y:a>o?u-n:u*.45,width:_,height:a>o?n:u*.1,rx:_*.5},s)),e===`waveform`&&(0,i.jsx)(`g`,{className:(0,r.default)(t.default.waveGroup,g&&t.default.idle),style:{overflow:`hidden`},children:(0,i.jsx)(`polyline`,{className:t.default.wave,points:b??x,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})});s.displayName=`VoiceVisualizer`,exports.VoiceVisualizer=s;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./voice-visualizer.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=100,o=.05,s=n.default.forwardRef(({mode:e=`bars`,data:s,isActive:c=!0,barCount:l=24,height:u=40,className:d,sentiment:f=`neutral`,style:p,ariaLabel:m,"aria-label":h,...g},_)=>{let v=c&&!s,y=m??(typeof h==`string`?h:void 0),b=(0,n.useMemo)(()=>a/l*.55,[l]),x=(0,n.useMemo)(()=>a/l*.45,[l]),S=(0,n.useMemo)(()=>Array.from({length:l},(e,t)=>{let n=s?Math.min(1,Math.max(o,s[t]??o)):o,r=n*u;return{x:t*(b+x)+x/2,barH:r,norm:n}}),[s,l,u,b,x]),C=(0,n.useMemo)(()=>!s||s.length<2?null:s.map((e,t)=>{let n=t/(s.length-1)*a,r=u*(1-Math.min(1,Math.max(0,e)));return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[s,u]),w=(0,n.useMemo)(()=>Array.from({length:80},(e,t)=>{let n=t/79*a*2,r=u/2-u*.22*Math.sin(t/79*4*Math.PI);return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[u]);return(0,i.jsxs)(`svg`,{ref:_,viewBox:`0 0 ${a} ${u}`,width:`100%`,height:u,preserveAspectRatio:`none`,className:(0,r.default)(`wim-voice-visualizer`,t.default.root,t.default[e],t.default[f],c&&t.default.active,!c&&t.default.muted,d),style:{height:`${u}px`,...p},...g,role:y?`img`:void 0,"aria-label":y,"aria-hidden":y?void 0:!0,children:[e===`bars`&&S.map(({x:e,barH:n,norm:a},s)=>(0,i.jsx)(`rect`,{className:(0,r.default)(t.default.bar,v&&t.default.idle),style:v?{"--delay":`${(s/l*.5).toFixed(3)}s`}:void 0,x:e,y:a>o?u-n:u*.45,width:b,height:a>o?n:u*.1,rx:b*.5},s)),e===`waveform`&&(0,i.jsx)(`g`,{className:(0,r.default)(t.default.waveGroup,v&&t.default.idle),style:{overflow:`hidden`},children:(0,i.jsx)(`polyline`,{className:t.default.wave,points:C??w,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})});s.displayName=`VoiceVisualizer`,exports.VoiceVisualizer=s;
@@ -19,6 +19,11 @@ export interface VoiceVisualizerProps extends React.ComponentPropsWithoutRef<"sv
19
19
  className?: string;
20
20
  /** Sentiment context for coloring (default 'neutral') */
21
21
  sentiment?: "neutral" | "positive" | "caution" | "negative" | "informative";
22
+ /**
23
+ * Accessible label describing the audio; when omitted the visualizer is
24
+ * hidden from assistive tech
25
+ */
26
+ ariaLabel?: string;
22
27
  }
23
28
  /**
24
29
  * VoiceVisualizer renders an SVG audio-level indicator.
@@ -4,11 +4,11 @@ import t, { useMemo as n } from "react";
4
4
  import r from "classnames";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  //#region src/components/ai/VoiceVisualizer/VoiceVisualizer.tsx
7
- var o = 100, s = .05, c = t.forwardRef(({ mode: t = "bars", data: c, isActive: l = !0, barCount: u = 24, height: d = 40, className: f, sentiment: p = "neutral", style: m, ...h }, g) => {
8
- let _ = l && !c, v = n(() => o / u * .55, [u]), y = n(() => o / u * .45, [u]), b = n(() => Array.from({ length: u }, (e, t) => {
7
+ var o = 100, s = .05, c = t.forwardRef(({ mode: t = "bars", data: c, isActive: l = !0, barCount: u = 24, height: d = 40, className: f, sentiment: p = "neutral", style: m, ariaLabel: h, "aria-label": g, ..._ }, v) => {
8
+ let y = l && !c, b = h ?? (typeof g == "string" ? g : void 0), x = n(() => o / u * .55, [u]), S = n(() => o / u * .45, [u]), C = n(() => Array.from({ length: u }, (e, t) => {
9
9
  let n = c ? Math.min(1, Math.max(s, c[t] ?? s)) : s, r = n * d;
10
10
  return {
11
- x: t * (v + y) + y / 2,
11
+ x: t * (x + S) + S / 2,
12
12
  barH: r,
13
13
  norm: n
14
14
  };
@@ -16,19 +16,17 @@ var o = 100, s = .05, c = t.forwardRef(({ mode: t = "bars", data: c, isActive: l
16
16
  c,
17
17
  u,
18
18
  d,
19
- v,
20
- y
21
- ]), x = n(() => !c || c.length < 2 ? null : c.map((e, t) => {
19
+ x,
20
+ S
21
+ ]), w = n(() => !c || c.length < 2 ? null : c.map((e, t) => {
22
22
  let n = t / (c.length - 1) * o, r = d * (1 - Math.min(1, Math.max(0, e)));
23
23
  return `${n.toFixed(2)},${r.toFixed(2)}`;
24
- }).join(" "), [c, d]), S = n(() => Array.from({ length: 80 }, (e, t) => {
24
+ }).join(" "), [c, d]), T = n(() => Array.from({ length: 80 }, (e, t) => {
25
25
  let n = t / 79 * o * 2, r = d / 2 - d * .22 * Math.sin(t / 79 * 4 * Math.PI);
26
26
  return `${n.toFixed(2)},${r.toFixed(2)}`;
27
27
  }).join(" "), [d]);
28
28
  return /* @__PURE__ */ a("svg", {
29
- ref: g,
30
- role: "img",
31
- "aria-hidden": "true",
29
+ ref: v,
32
30
  viewBox: `0 0 ${o} ${d}`,
33
31
  width: "100%",
34
32
  height: d,
@@ -38,21 +36,24 @@ var o = 100, s = .05, c = t.forwardRef(({ mode: t = "bars", data: c, isActive: l
38
36
  height: `${d}px`,
39
37
  ...m
40
38
  },
41
- ...h,
42
- children: [t === "bars" && b.map(({ x: t, barH: n, norm: a }, o) => /* @__PURE__ */ i("rect", {
43
- className: r(e.bar, _ && e.idle),
44
- style: _ ? { "--delay": `${(o / u * .5).toFixed(3)}s` } : void 0,
39
+ ..._,
40
+ role: b ? "img" : void 0,
41
+ "aria-label": b,
42
+ "aria-hidden": b ? void 0 : !0,
43
+ children: [t === "bars" && C.map(({ x: t, barH: n, norm: a }, o) => /* @__PURE__ */ i("rect", {
44
+ className: r(e.bar, y && e.idle),
45
+ style: y ? { "--delay": `${(o / u * .5).toFixed(3)}s` } : void 0,
45
46
  x: t,
46
47
  y: a > s ? d - n : d * .45,
47
- width: v,
48
+ width: x,
48
49
  height: a > s ? n : d * .1,
49
- rx: v * .5
50
+ rx: x * .5
50
51
  }, o)), t === "waveform" && /* @__PURE__ */ i("g", {
51
- className: r(e.waveGroup, _ && e.idle),
52
+ className: r(e.waveGroup, y && e.idle),
52
53
  style: { overflow: "hidden" },
53
54
  children: /* @__PURE__ */ i("polyline", {
54
55
  className: e.wave,
55
- points: x ?? S,
56
+ points: w ?? T,
56
57
  fill: "none",
57
58
  strokeLinecap: "round",
58
59
  strokeLinejoin: "round"
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.23.2 — 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).
7
+ **wimui** v0.23.4 — 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
 
@@ -3141,6 +3141,8 @@ For bars: one value per bar. For waveform: time-domain samples.
3141
3141
  - `height: number` = 40 — Rendered height in pixels (default 40)
3142
3142
  - `className: string` — Additional CSS class
3143
3143
  - `sentiment: "neutral" | "positive" | "caution" | "negative" | "informative"` = "neutral" — Sentiment context for coloring (default 'neutral')
3144
+ - `ariaLabel: string` — Accessible label describing the audio; when omitted the visualizer is
3145
+ hidden from assistive tech
3144
3146
 
3145
3147
  ## Not in scope — deliberately not provided
3146
3148
 
package/dist/llms.txt CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.23.2 — 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).
7
+ **wimui** v0.23.4 — 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