@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.
Files changed (46) hide show
  1. package/dist/{Button-C8W8ZHWV.d.ts → Button-B59TIes7.d.ts} +1 -1
  2. package/dist/{Button-CxKBjLda.d.cts → Button-xLR4Yt57.d.cts} +1 -1
  3. package/dist/{Select-bKLket9n.d.cts → Select-DKfT3fJR.d.cts} +1 -1
  4. package/dist/{Select-CTSd8zum.d.ts → Select-Wolx4zNc.d.ts} +1 -1
  5. package/dist/chart.cjs +2 -23
  6. package/dist/chart.js +5 -5
  7. package/dist/{chunk-ORSQAJ22.js → chunk-4PYHSNRA.js} +5 -5
  8. package/dist/{chunk-F52O2MOV.js → chunk-6SSZVJO4.js} +3 -3
  9. package/dist/{chunk-WCYVBO2N.js → chunk-EZTF5TA2.js} +4 -4
  10. package/dist/{chunk-LKLPCYEP.js → chunk-NRLIOMXY.js} +2 -2
  11. package/dist/{chunk-7SEGBB6V.js → chunk-PU2V3VB5.js} +1 -24
  12. package/dist/{chunk-566S64IP.js → chunk-QLS2IXU4.js} +4 -4
  13. package/dist/{chunk-4OHS7RXE.js → chunk-SRWUDTCS.js} +2 -0
  14. package/dist/{chunk-MD4CGSOR.js → chunk-TH7BNDV4.js} +6 -6
  15. package/dist/{chunk-4TYHSAR3.js → chunk-W4HDN7MD.js} +5 -5
  16. package/dist/{chunk-PD3K5U5Y.js → chunk-XXFYFLZA.js} +2 -2
  17. package/dist/{chunk-JRXYM5YH.js → chunk-YHVFLSZW.js} +2 -2
  18. package/dist/{chunk-ETQJ2DQ2.js → chunk-YO5OJQEH.js} +1 -1
  19. package/dist/{core-CvfsQGuT.d.ts → core-BJa8K9R8.d.ts} +5 -5
  20. package/dist/{core-COaZfusa.d.cts → core-DC4cb_KT.d.cts} +5 -5
  21. package/dist/core.cjs +2 -23
  22. package/dist/core.css +74 -1
  23. package/dist/core.d.cts +3 -3
  24. package/dist/core.d.ts +3 -3
  25. package/dist/core.js +8 -8
  26. package/dist/game.cjs +2 -23
  27. package/dist/game.css +74 -1
  28. package/dist/game.d.cts +1 -1
  29. package/dist/game.d.ts +1 -1
  30. package/dist/game.js +3 -3
  31. package/dist/index.cjs +1403 -1316
  32. package/dist/index.css +84 -1
  33. package/dist/index.d.cts +55 -9
  34. package/dist/index.d.ts +55 -9
  35. package/dist/index.js +167 -61
  36. package/dist/markdown-editor.cjs +2 -0
  37. package/dist/markdown-editor.js +3 -3
  38. package/dist/rich-text-editor.cjs +2 -23
  39. package/dist/rich-text-editor.js +7 -7
  40. package/dist/{select-date-range-Dad0IdD4.d.cts → select-date-range-C5bNGxaY.d.cts} +1 -1
  41. package/dist/{select-date-range-C8cacfmb.d.ts → select-date-range-DfhpX7vv.d.ts} +1 -1
  42. package/dist/select-date-range.cjs +2 -23
  43. package/dist/select-date-range.d.cts +3 -3
  44. package/dist/select-date-range.d.ts +3 -3
  45. package/dist/select-date-range.js +8 -8
  46. 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-Dad0IdD4.cjs';
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-bKLket9n.cjs';
5
- import './Button-CxKBjLda.cjs';
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-C8cacfmb.js';
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-CTSd8zum.js';
5
- import './Button-C8W8ZHWV.js';
4
+ import './Select-Wolx4zNc.js';
5
+ import './Button-B59TIes7.js';
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-566S64IP.js";
4
- import "./chunk-ORSQAJ22.js";
5
- import "./chunk-WCYVBO2N.js";
6
- import "./chunk-LKLPCYEP.js";
7
- import "./chunk-JRXYM5YH.js";
8
- import "./chunk-7SEGBB6V.js";
9
- import "./chunk-ETQJ2DQ2.js";
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-4OHS7RXE.js";
12
+ } from "./chunk-SRWUDTCS.js";
13
13
 
14
14
  // src/select-date-range.ts
15
15
  initializeDefaultScrollbars();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.145",
3
+ "version": "0.1.147",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",