etudes 6.1.1 → 6.2.1

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Études [![npm](https://img.shields.io/npm/v/etudes.svg)](https://www.npmjs.com/package/etudes) [![CI](https://github.com/andrewscwei/etudes/workflows/CI/badge.svg)](https://github.com/andrewscwei/etudes/actions?query=workflow%3ACI) [![CD](https://github.com/andrewscwei/etudes/workflows/CD/badge.svg)](https://github.com/andrewscwei/etudes/actions?query=workflow%3ACD)
1
+ # Études [![npm](https://img.shields.io/npm/v/etudes.svg)](https://www.npmjs.com/package/etudes) [![CD](https://github.com/andrewscwei/etudes/workflows/CD/badge.svg)](https://github.com/andrewscwei/etudes/actions?query=workflow%3ACD)
2
2
 
3
3
  A study of headless React components.
@@ -53,7 +53,7 @@ export const Dropdown = forwardRef(({ children, className, style, collapsesOnSel
53
53
  const numItems = items.length;
54
54
  const numVisibleItems = maxVisibleItems < 0 ? numItems : Math.min(numItems, maxVisibleItems);
55
55
  const menuLength = itemLength * numVisibleItems + itemPadding * (numVisibleItems - 1);
56
- const fixedStyles = getFixedStyles({ isCollapsed, isInverted, maxVisibleItems, menuLength, numItems, orientation });
56
+ const fixedStyles = getFixedStyles({ isCollapsed, collectionPadding, isInverted, maxVisibleItems, menuLength, numItems, orientation });
57
57
  const components = asComponentDict(children, {
58
58
  collapseIcon: DropdownCollapseIcon,
59
59
  expandIcon: DropdownExpandIcon,
@@ -11,7 +11,7 @@ export type SwipeContainerProps = HTMLAttributes<HTMLDivElement> & {
11
11
  * An empty component with a backing `<div>` element that detects swipe
12
12
  * gestures.
13
13
  */
14
- export declare const SwipeContainer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
14
+ export declare const SwipeRegion: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
15
15
  isEnabled?: boolean;
16
16
  threshold?: number;
17
17
  onSwipeDown?: () => void;
@@ -5,7 +5,7 @@ import { Point } from 'spase';
5
5
  * An empty component with a backing `<div>` element that detects swipe
6
6
  * gestures.
7
7
  */
8
- export const SwipeContainer = forwardRef(({ children, isEnabled = true, threshold = 0.5, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, ...props }, ref) => {
8
+ export const SwipeRegion = forwardRef(({ children, isEnabled = true, threshold = 0.5, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, ...props }, ref) => {
9
9
  const [dragStartPosition, setDragStartPosition] = useState(undefined);
10
10
  const [dragEndPosition, setDragEndPosition] = useState(undefined);
11
11
  const [dragStartTime, setDragStartTime] = useState(NaN);
@@ -64,4 +64,4 @@ export const SwipeContainer = forwardRef(({ children, isEnabled = true, threshol
64
64
  };
65
65
  return (_jsx("div", { ...props, ref: ref, onMouseDown: event => onDragStart(event.clientX, event.clientY), onMouseLeave: () => onDragCancel(), onMouseMove: event => onDragMove(event.clientX, event.clientY), onMouseUp: () => onDragEnd(), onTouchEnd: () => onDragEnd(), onTouchMove: event => onDragMove(event.targetTouches[0].clientX, event.targetTouches[0].clientY), onTouchStart: event => onDragStart(event.targetTouches[0].clientX, event.targetTouches[0].clientY), children: children }));
66
66
  });
67
- Object.defineProperty(SwipeContainer, 'displayName', { value: 'SwipeContainer', writable: false });
67
+ Object.defineProperty(SwipeRegion, 'displayName', { value: 'SwipeRegion', writable: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "6.1.1",
3
+ "version": "6.2.1",
4
4
  "description": "A study of headless React components",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -74,5 +74,6 @@
74
74
  "optionalDependencies": {
75
75
  "react-router": "^6.26.2",
76
76
  "react-router-dom": "^6.26.2"
77
- }
77
+ },
78
+ "packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
78
79
  }