wimui 0.44.0 → 0.45.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/data-display/PivotTable/PivotTable.cjs +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.d.ts +58 -1
- package/dist/components/data-display/PivotTable/PivotTable.js +140 -78
- package/dist/components/data-display/PivotTable/layoutPivot.cjs +1 -1
- package/dist/components/data-display/PivotTable/layoutPivot.d.ts +7 -2
- package/dist/components/data-display/PivotTable/layoutPivot.js +13 -12
- package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.js +13 -7
- package/dist/components/media/Video/hooks/useVideoPlayer.cjs +1 -1
- package/dist/components/media/Video/hooks/useVideoPlayer.js +83 -71
- package/dist/llms-full.txt +12 -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 +5 -5
- package/package.json +1 -1
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e, { useCallback as t, useEffect as n, useState as r } from "react";
|
|
3
3
|
//#region src/components/media/Video/hooks/useVideoPlayer.ts
|
|
4
|
-
function i({ src: i, autoPlay: a, loop: o, muted: s, fit:
|
|
5
|
-
let
|
|
4
|
+
function i({ src: i, autoPlay: a, loop: o, muted: s, fit: ee, videoId: c, resumePlayback: l, playlist: u, autoPlayNext: te, qualities: d, customControls: f, advancedControls: p, poster: m, containerRef: h }) {
|
|
5
|
+
let g = e.useRef(null), ne = e.useRef(null), _ = h ?? ne, v = e.useRef(/* @__PURE__ */ new Set()), y = t((e, t) => {
|
|
6
|
+
let n = setTimeout(() => {
|
|
7
|
+
v.current.delete(n), e();
|
|
8
|
+
}, t);
|
|
9
|
+
v.current.add(n);
|
|
10
|
+
}, []);
|
|
11
|
+
n(() => {
|
|
12
|
+
let e = v.current;
|
|
13
|
+
return () => {
|
|
14
|
+
e.forEach(clearTimeout), e.clear();
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
let [b, x] = r(!1), [S, C] = r(0), [w, T] = r(0), [E, D] = r(1), [O, k] = r(s), [A, j] = r(!1), [M, N] = r(1), [P, F] = r(ee), [I, L] = r(0), [R, z] = r(0), [B, V] = r(null), [H, U] = r(null), [W, G] = r({
|
|
6
18
|
show: !1,
|
|
7
19
|
direction: "forward"
|
|
8
|
-
}), K =
|
|
20
|
+
}), K = d && d.length > 0 ? d[R].src : u && u.length > 0 ? u[I].src : i, q = u && u.length > 0 && u[I].poster || m, J = !(f || p);
|
|
9
21
|
n(() => {
|
|
10
|
-
if (
|
|
11
|
-
let e =
|
|
12
|
-
t && (
|
|
22
|
+
if (c && l && g.current) {
|
|
23
|
+
let e = u && u.length > 0 ? `${c}-${I}` : c, t = localStorage.getItem(`wimui-video-resume-${e}`);
|
|
24
|
+
t && (g.current.currentTime = parseFloat(t));
|
|
13
25
|
}
|
|
14
26
|
}, [
|
|
27
|
+
c,
|
|
15
28
|
l,
|
|
16
|
-
u,
|
|
17
29
|
I,
|
|
18
|
-
|
|
30
|
+
u
|
|
19
31
|
]), n(() => {
|
|
20
|
-
a &&
|
|
32
|
+
a && g.current && g.current.play().catch((e) => {});
|
|
21
33
|
}, [a, K]), n(() => {
|
|
22
|
-
|
|
34
|
+
g.current && (g.current.volume = E, g.current.muted = O, g.current.playbackRate = M, g.current.loop = o && (!u || u.length <= 1));
|
|
23
35
|
}, [
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
E,
|
|
37
|
+
O,
|
|
26
38
|
M,
|
|
27
39
|
o,
|
|
28
|
-
|
|
40
|
+
u
|
|
29
41
|
]), n(() => {
|
|
30
42
|
let e = () => {
|
|
31
43
|
j(!!document.fullscreenElement);
|
|
@@ -33,36 +45,36 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
33
45
|
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
34
46
|
}, []);
|
|
35
47
|
let Y = t((e) => {
|
|
36
|
-
if (
|
|
37
|
-
let t = Math.max(0, Math.min(
|
|
38
|
-
|
|
48
|
+
if (g.current) {
|
|
49
|
+
let t = Math.max(0, Math.min(g.current.currentTime + e, w));
|
|
50
|
+
g.current.currentTime = t, C(t);
|
|
39
51
|
}
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
}, [
|
|
47
|
-
if (
|
|
48
|
-
document.pictureInPictureElement ? await document.exitPictureInPicture() : document.pictureInPictureEnabled && await
|
|
52
|
+
}, [w]), X = t(() => {
|
|
53
|
+
g.current && (b ? g.current.pause() : g.current.play(), x(!b));
|
|
54
|
+
}, [b]), Z = t(() => {
|
|
55
|
+
k(!O);
|
|
56
|
+
}, [O]), Q = t(() => {
|
|
57
|
+
_.current && (document.fullscreenElement ? (document.exitFullscreen(), j(!1)) : (_.current.requestFullscreen().catch((e) => {}), j(!0)));
|
|
58
|
+
}, [_]), $ = t(async () => {
|
|
59
|
+
if (g.current) try {
|
|
60
|
+
document.pictureInPictureElement ? await document.exitPictureInPicture() : document.pictureInPictureEnabled && await g.current.requestPictureInPicture();
|
|
49
61
|
} catch {}
|
|
50
|
-
}, []),
|
|
51
|
-
if (!
|
|
52
|
-
let t =
|
|
53
|
-
z(e),
|
|
54
|
-
|
|
62
|
+
}, []), re = (e) => {
|
|
63
|
+
if (!g.current) return;
|
|
64
|
+
let t = g.current.currentTime, n = !g.current.paused;
|
|
65
|
+
z(e), y(() => {
|
|
66
|
+
g.current && (g.current.currentTime = t, n && g.current.play());
|
|
55
67
|
}, 50), V("main");
|
|
56
|
-
},
|
|
57
|
-
L(e),
|
|
58
|
-
}, []);
|
|
68
|
+
}, ie = t((e) => {
|
|
69
|
+
L(e), g.current && (g.current.currentTime = 0, y(() => g.current?.play(), 100));
|
|
70
|
+
}, [y]);
|
|
59
71
|
return n(() => {
|
|
60
72
|
let e = (e) => {
|
|
61
73
|
if (![
|
|
62
74
|
"INPUT",
|
|
63
75
|
"TEXTAREA",
|
|
64
76
|
"SELECT"
|
|
65
|
-
].includes(e.target.tagName) && (
|
|
77
|
+
].includes(e.target.tagName) && (f || p) && (_.current?.contains(document.activeElement) || document.fullscreenElement === _.current || document.activeElement === document.body)) switch (e.key.toLowerCase()) {
|
|
66
78
|
case " ":
|
|
67
79
|
case "k":
|
|
68
80
|
e.preventDefault(), X();
|
|
@@ -75,14 +87,14 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
75
87
|
break;
|
|
76
88
|
case "arrowup": {
|
|
77
89
|
e.preventDefault();
|
|
78
|
-
let t = Math.min(1,
|
|
79
|
-
|
|
90
|
+
let t = Math.min(1, E + .1);
|
|
91
|
+
D(t), t > 0 && k(!1);
|
|
80
92
|
break;
|
|
81
93
|
}
|
|
82
94
|
case "arrowdown": {
|
|
83
95
|
e.preventDefault();
|
|
84
|
-
let t = Math.max(0,
|
|
85
|
-
|
|
96
|
+
let t = Math.max(0, E - .1);
|
|
97
|
+
D(t);
|
|
86
98
|
break;
|
|
87
99
|
}
|
|
88
100
|
case "m":
|
|
@@ -96,26 +108,26 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
96
108
|
};
|
|
97
109
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
98
110
|
}, [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
b,
|
|
112
|
+
E,
|
|
113
|
+
w,
|
|
114
|
+
f,
|
|
115
|
+
p,
|
|
104
116
|
Y,
|
|
105
117
|
Z,
|
|
106
118
|
X,
|
|
107
119
|
Q,
|
|
108
120
|
$,
|
|
109
|
-
|
|
121
|
+
_
|
|
110
122
|
]), {
|
|
111
|
-
videoRef:
|
|
112
|
-
containerRef:
|
|
113
|
-
isPlaying:
|
|
114
|
-
currentTime:
|
|
115
|
-
duration:
|
|
116
|
-
volume:
|
|
117
|
-
isMuted:
|
|
118
|
-
isFullscreen:
|
|
123
|
+
videoRef: g,
|
|
124
|
+
containerRef: _,
|
|
125
|
+
isPlaying: b,
|
|
126
|
+
currentTime: S,
|
|
127
|
+
duration: w,
|
|
128
|
+
volume: E,
|
|
129
|
+
isMuted: O,
|
|
130
|
+
isFullscreen: A,
|
|
119
131
|
playbackRate: M,
|
|
120
132
|
activeFit: P,
|
|
121
133
|
currentPlayIndex: I,
|
|
@@ -125,8 +137,8 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
125
137
|
activeSrc: K,
|
|
126
138
|
activePoster: q,
|
|
127
139
|
showNativeControls: J,
|
|
128
|
-
setVolume:
|
|
129
|
-
setIsMuted:
|
|
140
|
+
setVolume: D,
|
|
141
|
+
setIsMuted: k,
|
|
130
142
|
setPlaybackRate: N,
|
|
131
143
|
setActiveFit: F,
|
|
132
144
|
setCurrentPlayIndex: L,
|
|
@@ -136,39 +148,39 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
136
148
|
toggleFullscreen: Q,
|
|
137
149
|
togglePiP: $,
|
|
138
150
|
skip: Y,
|
|
139
|
-
handleQualityChange:
|
|
140
|
-
playPlaylistItem:
|
|
151
|
+
handleQualityChange: re,
|
|
152
|
+
playPlaylistItem: ie,
|
|
141
153
|
handleTimeUpdate: () => {
|
|
142
|
-
if (
|
|
143
|
-
let e =
|
|
144
|
-
if (
|
|
145
|
-
let t =
|
|
154
|
+
if (g.current) {
|
|
155
|
+
let e = g.current.currentTime;
|
|
156
|
+
if (C(e), c && l && Math.floor(e) % 5 == 0 && w > 0 && e < w - 2) {
|
|
157
|
+
let t = u && u.length > 0 ? `${c}-${I}` : c;
|
|
146
158
|
localStorage.setItem(`wimui-video-resume-${t}`, e.toString());
|
|
147
159
|
}
|
|
148
160
|
}
|
|
149
161
|
},
|
|
150
162
|
handleLoadedMetadata: () => {
|
|
151
|
-
|
|
163
|
+
g.current && T(g.current.duration);
|
|
152
164
|
},
|
|
153
165
|
handleEnded: () => {
|
|
154
|
-
if (
|
|
155
|
-
let e =
|
|
166
|
+
if (c && l) {
|
|
167
|
+
let e = u && u.length > 0 ? `${c}-${I}` : c;
|
|
156
168
|
localStorage.removeItem(`wimui-video-resume-${e}`);
|
|
157
169
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}, 100)) :
|
|
170
|
+
u && u.length > 0 && te && I < u.length - 1 ? (L((e) => e + 1), g.current && y(() => {
|
|
171
|
+
g.current?.play();
|
|
172
|
+
}, 100)) : x(!1);
|
|
161
173
|
},
|
|
162
174
|
handleSeek: (e) => {
|
|
163
175
|
let t = parseFloat(e.target.value);
|
|
164
|
-
|
|
176
|
+
g.current && (g.current.currentTime = t, C(t));
|
|
165
177
|
},
|
|
166
178
|
handleVolumeChange: (e) => {
|
|
167
179
|
let t = parseFloat(e.target.value);
|
|
168
|
-
|
|
180
|
+
D(t), t > 0 && k(!1);
|
|
169
181
|
},
|
|
170
182
|
handleVideoClick: (e) => {
|
|
171
|
-
if (!
|
|
183
|
+
if (!f && !p) return;
|
|
172
184
|
let t = (/* @__PURE__ */ new Date()).getTime(), n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, i = n.width;
|
|
173
185
|
H && t - H.time < 300 ? (r > i / 2 ? (Y(10), G({
|
|
174
186
|
show: !0,
|
|
@@ -176,13 +188,13 @@ function i({ src: i, autoPlay: a, loop: o, muted: s, fit: c, videoId: l, resumeP
|
|
|
176
188
|
})) : (Y(-10), G({
|
|
177
189
|
show: !0,
|
|
178
190
|
direction: "backward"
|
|
179
|
-
})),
|
|
191
|
+
})), y(() => G({
|
|
180
192
|
show: !1,
|
|
181
193
|
direction: "forward"
|
|
182
194
|
}), 600), U(null)) : (U({
|
|
183
195
|
time: t,
|
|
184
196
|
x: r
|
|
185
|
-
}),
|
|
197
|
+
}), y(() => {
|
|
186
198
|
Date.now() - t >= 290 && X();
|
|
187
199
|
}, 300));
|
|
188
200
|
},
|
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.45.0 — a React 19 component library: 228 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
|
|
|
@@ -2499,6 +2499,17 @@ for that group's subtotal and `null` asks for the grand total of that axis. Retu
|
|
|
2499
2499
|
`null` or `undefined` for an empty cell.
|
|
2500
2500
|
- `rowAxisLabel: React.ReactNode` — Heading of the row axis, shown in the top-left corner.
|
|
2501
2501
|
- `caption: React.ReactNode` — Visible title of the table, also its accessible name.
|
|
2502
|
+
- `expandedValues: string[]` — Keys of the expanded row groups (controlled). A group that is not listed shows only
|
|
2503
|
+
its own row, which carries its subtotal.
|
|
2504
|
+
- `defaultExpandedValues: string[]` — Row groups expanded on first render (uncontrolled). Defaults to every group.
|
|
2505
|
+
- `onExpandedChange: (values: string[]) => void` — Called with the new list of expanded row groups when a group is expanded or collapsed.
|
|
2506
|
+
- `maxHeight: string | number` — Maximum height of the table (a number is px). Past it the table scrolls vertically
|
|
2507
|
+
inside its own box.
|
|
2508
|
+
- `stickyHeader: boolean` = false — Keeps the column headings in view while the table scrolls vertically. Every heading
|
|
2509
|
+
level stays, stacked in order. Only has an effect together with `maxHeight`.
|
|
2510
|
+
- `stickyRowHeaders: boolean` = false — Keeps the row headings in view while the table scrolls sideways. The column is only
|
|
2511
|
+
pinned while it takes at most half of the visible width; in a narrower container it
|
|
2512
|
+
scrolls with the rest, so that the values stay readable.
|
|
2502
2513
|
- `columnSubtotals: boolean` = false — Adds a subtotal column after the columns of each column group.
|
|
2503
2514
|
- `totalRow: boolean` = false — Adds a grand total row at the bottom.
|
|
2504
2515
|
- `totalColumn: boolean` = false — Adds a grand total column at the right edge.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.45.0 — a React 19 component library: 228 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
|
|