wimui 0.37.3 → 0.37.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
- 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,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;
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=4,c=3,l=n.default.forwardRef(({mode:e=`bars`,data:l,isActive:u=!0,barCount:d=24,height:f=40,className:p,sentiment:m=`neutral`,style:h,ariaLabel:g,"aria-label":_,...v},y)=>{let b=u&&!l,x=g??(typeof _==`string`?_:void 0),S=d*s+(d-1)*c,C=(0,n.useMemo)(()=>Array.from({length:d},(e,t)=>{let n=b?1:l?Math.min(1,Math.max(o,l[t]??o)):o,r=n*f;return{x:t*7-S/2,barH:r,norm:n}}),[l,d,f,b,S]),w=(0,n.useMemo)(()=>!l||l.length<2?null:l.map((e,t)=>{let n=t/(l.length-1)*a,r=f*(1-Math.min(1,Math.max(0,e)));return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[l,f]),T=(0,n.useMemo)(()=>Array.from({length:80},(e,t)=>{let n=t/79*a*2,r=f/2-f*.22*Math.sin(t/79*4*Math.PI);return`${n.toFixed(2)},${r.toFixed(2)}`}).join(` `),[f]);return(0,i.jsxs)(`svg`,{ref:y,viewBox:e===`waveform`?`0 0 ${a} ${f}`:void 0,width:`100%`,height:f,preserveAspectRatio:e===`waveform`?`none`:void 0,className:(0,r.default)(`wim-voice-visualizer`,t.default.root,t.default[e],t.default[m],u&&t.default.active,!u&&t.default.muted,p),style:{height:`${f}px`,...h},...v,role:x?`img`:void 0,"aria-label":x,"aria-hidden":!x||void 0,children:[e===`bars`&&(0,i.jsx)(`svg`,{x:`50%`,y:0,width:1,height:f,overflow:`visible`,children:C.map(({x:e,barH:n,norm:a},c)=>(0,i.jsx)(`rect`,{className:(0,r.default)(t.default.bar,b&&t.default.idle),style:b?{"--delay":`${(c/d*.5).toFixed(3)}s`}:void 0,x:e,y:a>o?f-n:f*.45,width:s,height:a>o?n:f*.1,rx:s/2},c))}),e===`waveform`&&(0,i.jsx)(`g`,{className:(0,r.default)(t.default.waveGroup,b&&t.default.idle),style:{overflow:`hidden`},children:(0,i.jsx)(`polyline`,{className:t.default.wave,points:w??T,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})});l.displayName=`VoiceVisualizer`,exports.VoiceVisualizer=l;
@@ -4,56 +4,63 @@ 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, 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
- let n = c ? Math.min(1, Math.max(s, c[t] ?? s)) : s, r = n * d;
7
+ var o = 100, s = .05, c = 4, l = 3, u = t.forwardRef(({ mode: t = "bars", data: u, isActive: d = !0, barCount: f = 24, height: p = 40, className: m, sentiment: h = "neutral", style: g, ariaLabel: _, "aria-label": v, ...y }, b) => {
8
+ let x = d && !u, S = _ ?? (typeof v == "string" ? v : void 0), C = f * c + (f - 1) * l, w = n(() => Array.from({ length: f }, (e, t) => {
9
+ let n = x ? 1 : u ? Math.min(1, Math.max(s, u[t] ?? s)) : s, r = n * p;
10
10
  return {
11
- x: t * (x + S) + S / 2,
11
+ x: t * 7 - C / 2,
12
12
  barH: r,
13
13
  norm: n
14
14
  };
15
15
  }), [
16
- c,
17
16
  u,
18
- d,
17
+ f,
18
+ p,
19
19
  x,
20
- S
21
- ]), w = n(() => !c || c.length < 2 ? null : c.map((e, t) => {
22
- let n = t / (c.length - 1) * o, r = d * (1 - Math.min(1, Math.max(0, e)));
20
+ C
21
+ ]), T = n(() => !u || u.length < 2 ? null : u.map((e, t) => {
22
+ let n = t / (u.length - 1) * o, r = p * (1 - Math.min(1, Math.max(0, e)));
23
23
  return `${n.toFixed(2)},${r.toFixed(2)}`;
24
- }).join(" "), [c, d]), T = n(() => Array.from({ length: 80 }, (e, t) => {
25
- let n = t / 79 * o * 2, r = d / 2 - d * .22 * Math.sin(t / 79 * 4 * Math.PI);
24
+ }).join(" "), [u, p]), E = n(() => Array.from({ length: 80 }, (e, t) => {
25
+ let n = t / 79 * o * 2, r = p / 2 - p * .22 * Math.sin(t / 79 * 4 * Math.PI);
26
26
  return `${n.toFixed(2)},${r.toFixed(2)}`;
27
- }).join(" "), [d]);
27
+ }).join(" "), [p]);
28
28
  return /* @__PURE__ */ a("svg", {
29
- ref: v,
30
- viewBox: `0 0 ${o} ${d}`,
29
+ ref: b,
30
+ viewBox: t === "waveform" ? `0 0 ${o} ${p}` : void 0,
31
31
  width: "100%",
32
- height: d,
33
- preserveAspectRatio: "none",
34
- className: r("wim-voice-visualizer", e.root, e[t], e[p], l && e.active, !l && e.muted, f),
32
+ height: p,
33
+ preserveAspectRatio: t === "waveform" ? "none" : void 0,
34
+ className: r("wim-voice-visualizer", e.root, e[t], e[h], d && e.active, !d && e.muted, m),
35
35
  style: {
36
- height: `${d}px`,
37
- ...m
36
+ height: `${p}px`,
37
+ ...g
38
38
  },
39
- ..._,
40
- role: b ? "img" : void 0,
41
- "aria-label": b,
42
- "aria-hidden": !b || void 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,
46
- x: t,
47
- y: a > s ? d - n : d * .45,
48
- width: x,
49
- height: a > s ? n : d * .1,
50
- rx: x * .5
51
- }, o)), t === "waveform" && /* @__PURE__ */ i("g", {
52
- className: r(e.waveGroup, y && e.idle),
39
+ ...y,
40
+ role: S ? "img" : void 0,
41
+ "aria-label": S,
42
+ "aria-hidden": !S || void 0,
43
+ children: [t === "bars" && /* @__PURE__ */ i("svg", {
44
+ x: "50%",
45
+ y: 0,
46
+ width: 1,
47
+ height: p,
48
+ overflow: "visible",
49
+ children: w.map(({ x: t, barH: n, norm: a }, o) => /* @__PURE__ */ i("rect", {
50
+ className: r(e.bar, x && e.idle),
51
+ style: x ? { "--delay": `${(o / f * .5).toFixed(3)}s` } : void 0,
52
+ x: t,
53
+ y: a > s ? p - n : p * .45,
54
+ width: c,
55
+ height: a > s ? n : p * .1,
56
+ rx: c / 2
57
+ }, o))
58
+ }), t === "waveform" && /* @__PURE__ */ i("g", {
59
+ className: r(e.waveGroup, x && e.idle),
53
60
  style: { overflow: "hidden" },
54
61
  children: /* @__PURE__ */ i("polyline", {
55
62
  className: e.wave,
56
- points: w ?? T,
63
+ points: T ?? E,
57
64
  fill: "none",
58
65
  strokeLinecap: "round",
59
66
  strokeLinejoin: "round"
@@ -61,6 +68,6 @@ var o = 100, s = .05, c = t.forwardRef(({ mode: t = "bars", data: c, isActive: l
61
68
  })]
62
69
  });
63
70
  });
64
- c.displayName = "VoiceVisualizer";
71
+ u.displayName = "VoiceVisualizer";
65
72
  //#endregion
66
- export { c as VoiceVisualizer };
73
+ export { u as VoiceVisualizer };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1rpgw_3`,t=`_active_1rpgw_9`,n=`_muted_1rpgw_12`,r=`_bar_1rpgw_16`,i=`_wave_1rpgw_19`,a=`_positive_1rpgw_26`,o=`_caution_1rpgw_29`,s=`_negative_1rpgw_32`,c=`_informative_1rpgw_35`,l=`_idle_1rpgw_44`,u=`_waveGroup_1rpgw_56`,d={root:e,active:t,muted:n,bar:r,"voice-muted-breath":`_voice-muted-breath_1rpgw_1`,wave:i,positive:a,caution:o,negative:s,informative:c,idle:l,"voice-bar-idle":`_voice-bar-idle_1rpgw_1`,waveGroup:u,"voice-wave-scroll":`_voice-wave-scroll_1rpgw_1`};exports.active=t,exports.bar=r,exports.caution=o,exports.default=d,exports.idle=l,exports.informative=c,exports.muted=n,exports.negative=s,exports.positive=a,exports.root=e,exports.wave=i,exports.waveGroup=u;
2
+ var e=`_root_1osrn_3`,t=`_active_1osrn_9`,n=`_muted_1osrn_12`,r=`_wave_1osrn_16`,i=`_positive_1osrn_22`,a=`_caution_1osrn_25`,o=`_negative_1osrn_28`,s=`_informative_1osrn_31`,c=`_bar_1osrn_35`,l=`_idle_1osrn_41`,u=`_waveGroup_1osrn_54`,d={root:e,active:t,muted:n,wave:r,positive:i,caution:a,negative:o,informative:s,bar:c,idle:l,"voice-bar-idle":`_voice-bar-idle_1osrn_1`,waveGroup:u,"voice-wave-scroll":`_voice-wave-scroll_1osrn_1`};exports.active=t,exports.bar=c,exports.caution=a,exports.default=d,exports.idle=l,exports.informative=s,exports.muted=n,exports.negative=o,exports.positive=i,exports.root=e,exports.wave=r,exports.waveGroup=u;
@@ -1,20 +1,19 @@
1
1
  "use client";
2
2
  //#region src/components/ai/VoiceVisualizer/voice-visualizer.module.scss
3
- var e = "_root_1rpgw_3", t = "_active_1rpgw_9", n = "_muted_1rpgw_12", r = "_bar_1rpgw_16", i = "_wave_1rpgw_19", a = "_positive_1rpgw_26", o = "_caution_1rpgw_29", s = "_negative_1rpgw_32", c = "_informative_1rpgw_35", l = "_idle_1rpgw_44", u = "_waveGroup_1rpgw_56", d = {
3
+ var e = "_root_1osrn_3", t = "_active_1osrn_9", n = "_muted_1osrn_12", r = "_wave_1osrn_16", i = "_positive_1osrn_22", a = "_caution_1osrn_25", o = "_negative_1osrn_28", s = "_informative_1osrn_31", c = "_bar_1osrn_35", l = "_idle_1osrn_41", u = "_waveGroup_1osrn_54", d = {
4
4
  root: e,
5
5
  active: t,
6
6
  muted: n,
7
- bar: r,
8
- "voice-muted-breath": "_voice-muted-breath_1rpgw_1",
9
- wave: i,
10
- positive: a,
11
- caution: o,
12
- negative: s,
13
- informative: c,
7
+ wave: r,
8
+ positive: i,
9
+ caution: a,
10
+ negative: o,
11
+ informative: s,
12
+ bar: c,
14
13
  idle: l,
15
- "voice-bar-idle": "_voice-bar-idle_1rpgw_1",
14
+ "voice-bar-idle": "_voice-bar-idle_1osrn_1",
16
15
  waveGroup: u,
17
- "voice-wave-scroll": "_voice-wave-scroll_1rpgw_1"
16
+ "voice-wave-scroll": "_voice-wave-scroll_1osrn_1"
18
17
  };
19
18
  //#endregion
20
- export { t as active, r as bar, o as caution, d as default, l as idle, c as informative, n as muted, s as negative, a as positive, e as root, i as wave, u as waveGroup };
19
+ export { t as active, c as bar, a as caution, d as default, l as idle, s as informative, n as muted, o as negative, i as positive, e as root, r as wave, u as waveGroup };
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.37.3 — a React 19 component library: 225 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.37.4 — a React 19 component library: 225 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.37.3 — a React 19 component library: 225 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.37.4 — a React 19 component library: 225 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