@sia.soul/sia-react-ui 0.1.145 → 0.1.147
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/{Button-C8W8ZHWV.d.ts → Button-B59TIes7.d.ts} +1 -1
- package/dist/{Button-CxKBjLda.d.cts → Button-xLR4Yt57.d.cts} +1 -1
- package/dist/{Select-bKLket9n.d.cts → Select-DKfT3fJR.d.cts} +1 -1
- package/dist/{Select-CTSd8zum.d.ts → Select-Wolx4zNc.d.ts} +1 -1
- package/dist/chart.cjs +2 -23
- package/dist/chart.js +5 -5
- package/dist/{chunk-ORSQAJ22.js → chunk-4PYHSNRA.js} +5 -5
- package/dist/{chunk-F52O2MOV.js → chunk-6SSZVJO4.js} +3 -3
- package/dist/{chunk-WCYVBO2N.js → chunk-EZTF5TA2.js} +4 -4
- package/dist/{chunk-LKLPCYEP.js → chunk-NRLIOMXY.js} +2 -2
- package/dist/{chunk-7SEGBB6V.js → chunk-PU2V3VB5.js} +1 -24
- package/dist/{chunk-566S64IP.js → chunk-QLS2IXU4.js} +4 -4
- package/dist/{chunk-4OHS7RXE.js → chunk-SRWUDTCS.js} +2 -0
- package/dist/{chunk-MD4CGSOR.js → chunk-TH7BNDV4.js} +6 -6
- package/dist/{chunk-4TYHSAR3.js → chunk-W4HDN7MD.js} +5 -5
- package/dist/{chunk-PD3K5U5Y.js → chunk-XXFYFLZA.js} +2 -2
- package/dist/{chunk-JRXYM5YH.js → chunk-YHVFLSZW.js} +2 -2
- package/dist/{chunk-ETQJ2DQ2.js → chunk-YO5OJQEH.js} +1 -1
- package/dist/{core-CvfsQGuT.d.ts → core-BJa8K9R8.d.ts} +5 -5
- package/dist/{core-COaZfusa.d.cts → core-DC4cb_KT.d.cts} +5 -5
- package/dist/core.cjs +2 -23
- package/dist/core.css +74 -1
- package/dist/core.d.cts +3 -3
- package/dist/core.d.ts +3 -3
- package/dist/core.js +8 -8
- package/dist/game.cjs +2 -23
- package/dist/game.css +74 -1
- package/dist/game.d.cts +1 -1
- package/dist/game.d.ts +1 -1
- package/dist/game.js +3 -3
- package/dist/index.cjs +1403 -1316
- package/dist/index.css +84 -1
- package/dist/index.d.cts +55 -9
- package/dist/index.d.ts +55 -9
- package/dist/index.js +167 -61
- package/dist/markdown-editor.cjs +2 -0
- package/dist/markdown-editor.js +3 -3
- package/dist/rich-text-editor.cjs +2 -23
- package/dist/rich-text-editor.js +7 -7
- package/dist/{select-date-range-Dad0IdD4.d.cts → select-date-range-C5bNGxaY.d.cts} +1 -1
- package/dist/{select-date-range-C8cacfmb.d.ts → select-date-range-DfhpX7vv.d.ts} +1 -1
- package/dist/select-date-range.cjs +2 -23
- package/dist/select-date-range.d.cts +3 -3
- package/dist/select-date-range.d.ts +3 -3
- package/dist/select-date-range.js +8 -8
- package/package.json +1 -1
|
@@ -502,6 +502,7 @@ function startFloatingScrollbars(targetRef) {
|
|
|
502
502
|
const onResize = () => scheduleScan();
|
|
503
503
|
window.addEventListener("resize", onResize);
|
|
504
504
|
window.addEventListener("scroll", scheduleUpdateAll, true);
|
|
505
|
+
window.addEventListener("sia-overlay-motion-end", scheduleUpdateAll);
|
|
505
506
|
scheduleScan();
|
|
506
507
|
return () => {
|
|
507
508
|
releaseProximity();
|
|
@@ -509,6 +510,7 @@ function startFloatingScrollbars(targetRef) {
|
|
|
509
510
|
resizeObserver.disconnect();
|
|
510
511
|
window.removeEventListener("resize", onResize);
|
|
511
512
|
window.removeEventListener("scroll", scheduleUpdateAll, true);
|
|
513
|
+
window.removeEventListener("sia-overlay-motion-end", scheduleUpdateAll);
|
|
512
514
|
if (scanFrame) window.cancelAnimationFrame(scanFrame);
|
|
513
515
|
if (updateFrame) window.cancelAnimationFrame(updateFrame);
|
|
514
516
|
entries.forEach((entry) => entry.cleanup());
|
|
@@ -3183,32 +3185,10 @@ var Button = (0, import_react11.forwardRef)(function Button2({
|
|
|
3183
3185
|
}, forwardedRef) {
|
|
3184
3186
|
const size = useControlSize(sizeProp);
|
|
3185
3187
|
const localRef = (0, import_react11.useRef)(null);
|
|
3186
|
-
const bounceRef = (0, import_react11.useRef)(null);
|
|
3187
3188
|
const waveTimerRef = (0, import_react11.useRef)();
|
|
3188
3189
|
(0, import_react11.useEffect)(() => () => {
|
|
3189
|
-
bounceRef.current?.cancel();
|
|
3190
3190
|
window.clearTimeout(waveTimerRef.current);
|
|
3191
3191
|
}, []);
|
|
3192
|
-
function playBounce(button) {
|
|
3193
|
-
if (!button.animate || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
3194
|
-
const current = getComputedStyle(button).scale;
|
|
3195
|
-
bounceRef.current?.cancel();
|
|
3196
|
-
const base = getComputedStyle(button).scale;
|
|
3197
|
-
const [x = 1, y = x] = base === "none" ? [] : base.split(/\s+/).map(Number);
|
|
3198
|
-
const scaled = (factor) => `${x * factor} ${y * factor}`;
|
|
3199
|
-
const animation = button.animate([
|
|
3200
|
-
{ scale: current === "none" ? "1" : current, offset: 0 },
|
|
3201
|
-
// 宽按钮保持等比缩放,以更明显的过冲表现弹性但不改变布局占位。
|
|
3202
|
-
{ scale: scaled(0.9), offset: 0.2 },
|
|
3203
|
-
{ scale: scaled(1.09), offset: 0.52 },
|
|
3204
|
-
{ scale: scaled(0.96), offset: 0.78 },
|
|
3205
|
-
{ scale: scaled(1), offset: 1 }
|
|
3206
|
-
], { duration: 320, easing: "cubic-bezier(.3, 0, .25, 1)" });
|
|
3207
|
-
bounceRef.current = animation;
|
|
3208
|
-
animation.onfinish = () => {
|
|
3209
|
-
if (bounceRef.current === animation) bounceRef.current = null;
|
|
3210
|
-
};
|
|
3211
|
-
}
|
|
3212
3192
|
function setRef(node) {
|
|
3213
3193
|
localRef.current = node;
|
|
3214
3194
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -3217,7 +3197,6 @@ var Button = (0, import_react11.forwardRef)(function Button2({
|
|
|
3217
3197
|
function handleClick(event) {
|
|
3218
3198
|
const button = localRef.current;
|
|
3219
3199
|
if (disabled || loading) return;
|
|
3220
|
-
if (button) playBounce(button);
|
|
3221
3200
|
if (button && variant === "primary") {
|
|
3222
3201
|
const rect = button.getBoundingClientRect();
|
|
3223
3202
|
button.style.setProperty("--sia-wave-x", `${event.detail === 0 ? button.offsetWidth / 2 : (event.clientX - rect.left) * button.offsetWidth / rect.width}px`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-C5bNGxaY.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import './Select-
|
|
5
|
-
import './Button-
|
|
4
|
+
import './Select-DKfT3fJR.cjs';
|
|
5
|
+
import './Button-xLR4Yt57.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DfhpX7vv.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.js';
|
|
4
|
-
import './Select-
|
|
5
|
-
import './Button-
|
|
4
|
+
import './Select-Wolx4zNc.js';
|
|
5
|
+
import './Button-B59TIes7.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QLS2IXU4.js";
|
|
4
|
+
import "./chunk-4PYHSNRA.js";
|
|
5
|
+
import "./chunk-EZTF5TA2.js";
|
|
6
|
+
import "./chunk-NRLIOMXY.js";
|
|
7
|
+
import "./chunk-YHVFLSZW.js";
|
|
8
|
+
import "./chunk-PU2V3VB5.js";
|
|
9
|
+
import "./chunk-YO5OJQEH.js";
|
|
10
10
|
import {
|
|
11
11
|
initializeDefaultScrollbars
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SRWUDTCS.js";
|
|
13
13
|
|
|
14
14
|
// src/select-date-range.ts
|
|
15
15
|
initializeDefaultScrollbars();
|