@xhub-reels/sdk 0.2.15 → 0.2.17

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/index.cjs CHANGED
@@ -1267,7 +1267,7 @@ function usePointerGesture(config = {}) {
1267
1267
  };
1268
1268
  }
1269
1269
  function useSnapAnimation(config = {}) {
1270
- const { duration = 280, easing = "cubic-bezier(0.25, 0.46, 0.45, 0.94)" } = config;
1270
+ const { duration = 280, easing = "ease-out" } = config;
1271
1271
  const activeAnimations = react.useRef([]);
1272
1272
  const cancelAnimation = react.useCallback(() => {
1273
1273
  for (const anim of activeAnimations.current) {
@@ -2584,7 +2584,7 @@ function ReelsFeed({
2584
2584
  activeIndexRef.current = focusedIndex;
2585
2585
  const { animateSnap, animateBounceBack, cancelAnimation } = useSnapAnimation({
2586
2586
  duration: snapConfig?.duration ?? 260,
2587
- easing: snapConfig?.easing ?? "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
2587
+ easing: snapConfig?.easing ?? "ease-out"
2588
2588
  });
2589
2589
  react.useEffect(() => {
2590
2590
  loadInitial();
@@ -3007,7 +3007,7 @@ function ReelsFeedThumbnail({
3007
3007
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: content });
3008
3008
  }
3009
3009
  var DEFAULT_DURATION = 300;
3010
- var DEFAULT_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
3010
+ var DEFAULT_EASING = "ease-out";
3011
3011
  var DEFAULT_DIRECTION = "up";
3012
3012
  var DEFAULT_Z_INDEX = 1e3;
3013
3013
  var DEFAULT_PREWARM_FORWARD = 2;
@@ -3163,12 +3163,12 @@ function ReelsModal({
3163
3163
  const panel = panelRef.current;
3164
3164
  if (!panel) return;
3165
3165
  const first = panel.querySelector(FOCUSABLE);
3166
- (first ?? panel).focus();
3166
+ (first ?? panel).focus({ preventScroll: true });
3167
3167
  });
3168
3168
  return () => cancelAnimationFrame(id);
3169
3169
  }
3170
3170
  if (phase === "closed") {
3171
- previouslyFocusedRef.current?.focus?.();
3171
+ previouslyFocusedRef.current?.focus?.({ preventScroll: true });
3172
3172
  previouslyFocusedRef.current = null;
3173
3173
  }
3174
3174
  return void 0;
package/dist/index.d.cts CHANGED
@@ -858,7 +858,7 @@ declare function usePointerGesture(config?: PointerGestureConfig): {
858
858
  interface SnapAnimationConfig {
859
859
  /** Duration in ms (default: 280) */
860
860
  duration?: number;
861
- /** CSS easing (default: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)') */
861
+ /** CSS easing (default: 'ease-out') */
862
862
  easing?: string;
863
863
  }
864
864
  interface SnapTarget {
@@ -951,7 +951,7 @@ declare function ReelsFeedThumbnail({ renderThumbnail, onThumbnailClick, renderL
951
951
  interface ReelsModalAnimationConfig {
952
952
  /** Enter/exit duration in ms (default: 300) */
953
953
  duration?: number;
954
- /** CSS easing (default: 'cubic-bezier(0.22, 1, 0.36, 1)') */
954
+ /** CSS easing (default: 'ease-out') */
955
955
  easing?: string;
956
956
  /**
957
957
  * Panel travel direction:
package/dist/index.d.ts CHANGED
@@ -858,7 +858,7 @@ declare function usePointerGesture(config?: PointerGestureConfig): {
858
858
  interface SnapAnimationConfig {
859
859
  /** Duration in ms (default: 280) */
860
860
  duration?: number;
861
- /** CSS easing (default: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)') */
861
+ /** CSS easing (default: 'ease-out') */
862
862
  easing?: string;
863
863
  }
864
864
  interface SnapTarget {
@@ -951,7 +951,7 @@ declare function ReelsFeedThumbnail({ renderThumbnail, onThumbnailClick, renderL
951
951
  interface ReelsModalAnimationConfig {
952
952
  /** Enter/exit duration in ms (default: 300) */
953
953
  duration?: number;
954
- /** CSS easing (default: 'cubic-bezier(0.22, 1, 0.36, 1)') */
954
+ /** CSS easing (default: 'ease-out') */
955
955
  easing?: string;
956
956
  /**
957
957
  * Panel travel direction:
package/dist/index.js CHANGED
@@ -1261,7 +1261,7 @@ function usePointerGesture(config = {}) {
1261
1261
  };
1262
1262
  }
1263
1263
  function useSnapAnimation(config = {}) {
1264
- const { duration = 280, easing = "cubic-bezier(0.25, 0.46, 0.45, 0.94)" } = config;
1264
+ const { duration = 280, easing = "ease-out" } = config;
1265
1265
  const activeAnimations = useRef([]);
1266
1266
  const cancelAnimation = useCallback(() => {
1267
1267
  for (const anim of activeAnimations.current) {
@@ -2578,7 +2578,7 @@ function ReelsFeed({
2578
2578
  activeIndexRef.current = focusedIndex;
2579
2579
  const { animateSnap, animateBounceBack, cancelAnimation } = useSnapAnimation({
2580
2580
  duration: snapConfig?.duration ?? 260,
2581
- easing: snapConfig?.easing ?? "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
2581
+ easing: snapConfig?.easing ?? "ease-out"
2582
2582
  });
2583
2583
  useEffect(() => {
2584
2584
  loadInitial();
@@ -3001,7 +3001,7 @@ function ReelsFeedThumbnail({
3001
3001
  return /* @__PURE__ */ jsx("div", { className, children: content });
3002
3002
  }
3003
3003
  var DEFAULT_DURATION = 300;
3004
- var DEFAULT_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
3004
+ var DEFAULT_EASING = "ease-out";
3005
3005
  var DEFAULT_DIRECTION = "up";
3006
3006
  var DEFAULT_Z_INDEX = 1e3;
3007
3007
  var DEFAULT_PREWARM_FORWARD = 2;
@@ -3157,12 +3157,12 @@ function ReelsModal({
3157
3157
  const panel = panelRef.current;
3158
3158
  if (!panel) return;
3159
3159
  const first = panel.querySelector(FOCUSABLE);
3160
- (first ?? panel).focus();
3160
+ (first ?? panel).focus({ preventScroll: true });
3161
3161
  });
3162
3162
  return () => cancelAnimationFrame(id);
3163
3163
  }
3164
3164
  if (phase === "closed") {
3165
- previouslyFocusedRef.current?.focus?.();
3165
+ previouslyFocusedRef.current?.focus?.({ preventScroll: true });
3166
3166
  previouslyFocusedRef.current = null;
3167
3167
  }
3168
3168
  return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xhub-reels/sdk",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "description": "High-performance Short Video / Reels SDK for React — optimized for Flutter WebView",
5
5
  "license": "MIT",
6
6
  "type": "module",