etudes 28.2.2 → 29.0.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/build/animations/easing.d.ts +18 -0
- package/build/animations/useAnimatedValue.d.ts +45 -0
- package/build/components/PanoramaSlider.d.ts +1 -1
- package/build/etudes.js +3971 -2722
- package/build/etudes.umd.cjs +7 -7
- package/build/hooks/useDrag.d.ts +3 -3
- package/build/hooks/useImageSize.d.ts +1 -1
- package/build/hooks/useInertiaDrag.d.ts +3 -3
- package/build/hooks/useRect.d.ts +2 -2
- package/build/hooks/useScrollPosition.d.ts +4 -4
- package/build/hooks/useSize.d.ts +2 -2
- package/build/hooks/useVideoSize.d.ts +1 -1
- package/build/hooks/useViewportSize.d.ts +1 -1
- package/build/index.d.ts +2 -0
- package/build/primitives/Carousel.d.ts +99 -30
- package/build/primitives/Image.d.ts +1 -1
- package/build/primitives/Panorama.d.ts +1 -1
- package/build/primitives/ScrollableCarousel.d.ts +82 -0
- package/build/primitives/Select.d.ts +1 -1
- package/build/primitives/Video.d.ts +1 -1
- package/build/utils/measureIntrinsicSize.d.ts +1 -1
- package/package.json +19 -18
package/build/hooks/useDrag.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type UseDragOptions = {
|
|
|
17
17
|
*
|
|
18
18
|
* @param startPosition The element that was dragged.
|
|
19
19
|
*/
|
|
20
|
-
onDragStart?: (startPosition: Point) => void;
|
|
20
|
+
onDragStart?: (startPosition: Point.Point) => void;
|
|
21
21
|
/**
|
|
22
22
|
* Handler invoked when dragging.
|
|
23
23
|
*
|
|
@@ -27,7 +27,7 @@ export type UseDragOptions = {
|
|
|
27
27
|
* at.
|
|
28
28
|
* @param startPosition The position (in pixels) where the drag started.
|
|
29
29
|
*/
|
|
30
|
-
onDragMove?: (displacement: Point, currentPosition: Point, startPosition: Point) => void;
|
|
30
|
+
onDragMove?: (displacement: Point.Point, currentPosition: Point.Point, startPosition: Point.Point) => void;
|
|
31
31
|
/**
|
|
32
32
|
* Handler invoked when dragging ends.
|
|
33
33
|
*
|
|
@@ -36,7 +36,7 @@ export type UseDragOptions = {
|
|
|
36
36
|
* @param endPosition The position (in pixels) where the drag ended.
|
|
37
37
|
* @param startPosition The position (in pixels) where the drag started.
|
|
38
38
|
*/
|
|
39
|
-
onDragEnd?: (displacement: Point, endPosition: Point, startPosition: Point) => void;
|
|
39
|
+
onDragEnd?: (displacement: Point.Point, endPosition: Point.Point, startPosition: Point.Point) => void;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Hook for adding dragging interaction to an element.
|
|
@@ -23,4 +23,4 @@ export type UseImageSizeOptions = {
|
|
|
23
23
|
* @returns The actual size of the image if loading was successful, `undefined`
|
|
24
24
|
* otherwise.
|
|
25
25
|
*/
|
|
26
|
-
export declare function useImageSize({ sizes, src, srcSet, }: UseImageSizeParams, { preservesSizeBetweenLoads, onError, onLoad, onLoadStart, }?: UseImageSizeOptions): Size | undefined;
|
|
26
|
+
export declare function useImageSize({ sizes, src, srcSet, }: UseImageSizeParams, { preservesSizeBetweenLoads, onError, onLoad, onLoadStart, }?: UseImageSizeOptions): Size.Size | undefined;
|
|
@@ -12,7 +12,7 @@ export type UseInertiaDragOptions = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Handler invoked when dragging starts.
|
|
14
14
|
*/
|
|
15
|
-
onDragStart?: (startPosition: Point) => void;
|
|
15
|
+
onDragStart?: (startPosition: Point.Point) => void;
|
|
16
16
|
/**
|
|
17
17
|
* Handler invoked when dragging.
|
|
18
18
|
*
|
|
@@ -22,14 +22,14 @@ export type UseInertiaDragOptions = {
|
|
|
22
22
|
* currently at.
|
|
23
23
|
* @param startPosition The position (in pixels) where the drag started.
|
|
24
24
|
*/
|
|
25
|
-
onDragMove?: (displacement: Point, currentPosition: Point, startPosition: Point) => void;
|
|
25
|
+
onDragMove?: (displacement: Point.Point, currentPosition: Point.Point, startPosition: Point.Point) => void;
|
|
26
26
|
/**
|
|
27
27
|
* Handler invoked when dragging ends.
|
|
28
28
|
*
|
|
29
29
|
* @param endPosition The position (in pixels) where the drag ended.
|
|
30
30
|
* @param startPosition The position (in pixels) where the drag started.
|
|
31
31
|
*/
|
|
32
|
-
onDragEnd?: (endPosition: Point, startPosition: Point) => void;
|
|
32
|
+
onDragEnd?: (endPosition: Point.Point, startPosition: Point.Point) => void;
|
|
33
33
|
} & Omit<InteractDraggableOptions, 'onend' | 'onmove' | 'onstart'>;
|
|
34
34
|
/**
|
|
35
35
|
* Hook for adding dragging interaction to an element.
|
package/build/hooks/useRect.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ import { Rect } from 'spase';
|
|
|
6
6
|
*
|
|
7
7
|
* @param target The target element or reference.
|
|
8
8
|
*
|
|
9
|
-
* @returns The most current
|
|
9
|
+
* @returns The most current rect of the target element.
|
|
10
10
|
*/
|
|
11
|
-
export declare function useRect(target: HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined): Rect;
|
|
11
|
+
export declare function useRect(target: HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined): Rect.Rect;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DependencyList, RefObject } from 'react';
|
|
2
2
|
import { Point } from 'spase';
|
|
3
3
|
export type ScrollPositionInfo = {
|
|
4
|
-
current: Point;
|
|
5
|
-
end: Point;
|
|
6
|
-
progress: Point;
|
|
7
|
-
start: Point;
|
|
4
|
+
current: Point.Point;
|
|
5
|
+
end: Point.Point;
|
|
6
|
+
progress: Point.Point;
|
|
7
|
+
start: Point.Point;
|
|
8
8
|
};
|
|
9
9
|
type Target = HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined;
|
|
10
10
|
/**
|
package/build/hooks/useSize.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ import { Size } from 'spase';
|
|
|
5
5
|
*
|
|
6
6
|
* @param target Reference to the target element.
|
|
7
7
|
*
|
|
8
|
-
* @returns The most current
|
|
8
|
+
* @returns The most current size of the target element.
|
|
9
9
|
*/
|
|
10
|
-
export declare function useSize(target: HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined): Size;
|
|
10
|
+
export declare function useSize(target: HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined): Size.Size;
|
|
@@ -19,5 +19,5 @@ type UseVideoSizeOptions = {
|
|
|
19
19
|
* @returns The actual size of the video if loading was successful, `undefined`
|
|
20
20
|
* otherwise.
|
|
21
21
|
*/
|
|
22
|
-
export declare function useVideoSize(src?: string, { preservesSizeBetweenLoads, onError, onLoad, onLoadStart, }?: UseVideoSizeOptions): Size | undefined;
|
|
22
|
+
export declare function useVideoSize(src?: string, { preservesSizeBetweenLoads, onError, onLoad, onLoadStart, }?: UseVideoSizeOptions): Size.Size | undefined;
|
|
23
23
|
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './animations/useAnimatedValue.js';
|
|
1
2
|
export * from './components/Burger.js';
|
|
2
3
|
export * from './components/BurgerButton.js';
|
|
3
4
|
export * from './components/CoverImage.js';
|
|
@@ -58,6 +59,7 @@ export * from './primitives/MasonryGrid.js';
|
|
|
58
59
|
export * from './primitives/Panorama.js';
|
|
59
60
|
export * from './primitives/Picture.js';
|
|
60
61
|
export * from './primitives/RangeSlider.js';
|
|
62
|
+
export * from './primitives/ScrollableCarousel.js';
|
|
61
63
|
export * from './primitives/Select.js';
|
|
62
64
|
export * from './primitives/Slider.js';
|
|
63
65
|
export * from './primitives/StepSlider.js';
|
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLAttributes, Ref } from 'react';
|
|
2
|
+
type CarouselItemContextValue = {
|
|
3
|
+
exposure: number | undefined;
|
|
4
|
+
index: number;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A headless carousel component that displays a list of items and lets the user
|
|
9
|
+
* drag (mouse or touch) to switch between them.
|
|
10
|
+
*
|
|
11
|
+
* Notable features:
|
|
12
|
+
* - Supports horizontal and vertical orientations.
|
|
13
|
+
* - Supports auto-advancing to the next item after a specified interval.
|
|
14
|
+
* - Supports tracking item exposure (0-1) to determine how much of the
|
|
15
|
+
* current item is visible in the viewport.
|
|
16
|
+
* - Supports rubber-band resistance when dragging past the first or last
|
|
17
|
+
* item.
|
|
18
|
+
*
|
|
19
|
+
* The root element is rendered with `role='region'`. To meet accessibility
|
|
20
|
+
* requirements for landmark regions, pass `aria-label` (or `aria-labelledby`)
|
|
21
|
+
* so the region has an accessible name.
|
|
22
|
+
*
|
|
23
|
+
* @exports Carousel.Viewport Component for the viewport.
|
|
24
|
+
* @exports Carousel.Content Component for the list holding all items.
|
|
25
|
+
* @exports Carousel.ItemContainer Component containing each item.
|
|
26
|
+
* @exports useCarouselItem Hook for reading the current item's index, exposure,
|
|
27
|
+
* and active state from within an item's subtree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Carousel({ ref, animationDuration, autoAdvanceInterval, children, dragSpeed, dragThreshold, index, orientation, overscrollResistance, swipeLiftWindow, swipeVelocityThreshold, shouldTrackExposure, onAutoAdvancePause, onAutoAdvanceResume, onIndexChange, ...props }: Carousel.Props): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Carousel {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
2
33
|
export declare namespace Carousel {
|
|
3
34
|
/**
|
|
4
35
|
* Type describing the orientation of {@link Carousel}.
|
|
@@ -7,39 +38,68 @@ export declare namespace Carousel {
|
|
|
7
38
|
/**
|
|
8
39
|
* Type describing the props of {@link Carousel}.
|
|
9
40
|
*/
|
|
10
|
-
type Props
|
|
41
|
+
type Props = {
|
|
11
42
|
/**
|
|
12
|
-
*
|
|
43
|
+
* Reference to the root element.
|
|
13
44
|
*/
|
|
14
|
-
|
|
45
|
+
ref?: Ref<HTMLDivElement>;
|
|
46
|
+
/**
|
|
47
|
+
* The duration in milliseconds for the animation when changing items. This
|
|
48
|
+
* is used when the user drags and releases, or when the index changes
|
|
49
|
+
* without dragging (e.g. auto advance or external index change). The
|
|
50
|
+
* default value is `200` ms.
|
|
51
|
+
*/
|
|
52
|
+
animationDuration?: number;
|
|
15
53
|
/**
|
|
16
54
|
* The interval in milliseconds to wait before automatically advancing to
|
|
17
55
|
* the next item (auto loops).
|
|
18
56
|
*/
|
|
19
57
|
autoAdvanceInterval?: number;
|
|
20
58
|
/**
|
|
21
|
-
*
|
|
59
|
+
* The drag speed multiplier. Higher values result in faster dragging. The
|
|
60
|
+
* default value is `1`.
|
|
61
|
+
*/
|
|
62
|
+
dragSpeed?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Minimum pixel distance the pointer must travel between pointer-down and
|
|
65
|
+
* pointer-up for the gesture to be classified as a drag. Movements within
|
|
66
|
+
* this threshold are treated as a click and are allowed to propagate.
|
|
22
67
|
*/
|
|
23
|
-
|
|
68
|
+
dragThreshold?: number;
|
|
24
69
|
/**
|
|
25
|
-
*
|
|
70
|
+
* Current item index.
|
|
26
71
|
*/
|
|
27
|
-
|
|
72
|
+
index?: number;
|
|
28
73
|
/**
|
|
29
74
|
* Orientation of the carousel.
|
|
30
75
|
*/
|
|
31
76
|
orientation?: Orientation;
|
|
32
77
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
78
|
+
* Resistance applied when the user drags past the first or last item. `0`
|
|
79
|
+
* lets the overshoot track the pointer 1:1 (no resistance); `1` clamps hard
|
|
80
|
+
* at the boundary (max resistance, no overshoot). Values in between produce
|
|
81
|
+
* a rubber-band effect—higher means more resistance.
|
|
36
82
|
*/
|
|
37
|
-
|
|
83
|
+
overscrollResistance?: number;
|
|
38
84
|
/**
|
|
39
85
|
* Whether to track item exposure (0-1, 0 meaning the item is fully scrolled
|
|
40
86
|
* out of view, 1 meaning the item is fully scrolled into view).
|
|
41
87
|
*/
|
|
42
88
|
shouldTrackExposure?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Maximum gap in milliseconds between the last pointer move and the pointer
|
|
91
|
+
* release for the gesture to register as a swipe. If the pointer was held
|
|
92
|
+
* stationary longer than this before release, no swipe is detected and the
|
|
93
|
+
* release falls back to position-based snapping.
|
|
94
|
+
*/
|
|
95
|
+
swipeLiftWindow?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Minimum axial pointer velocity (in pixels per millisecond) at release for
|
|
98
|
+
* the gesture to register as a swipe. A detected swipe advances the index
|
|
99
|
+
* by one in the swipe direction, regardless of how far the displacement has
|
|
100
|
+
* traveled.
|
|
101
|
+
*/
|
|
102
|
+
swipeVelocityThreshold?: number;
|
|
43
103
|
/**
|
|
44
104
|
* Handler invoked when auto advance pauses. This is invoked only when
|
|
45
105
|
* {@link autoAdvanceInterval} is greater than 0.
|
|
@@ -56,24 +116,33 @@ export declare namespace Carousel {
|
|
|
56
116
|
* @param index The item index.
|
|
57
117
|
*/
|
|
58
118
|
onIndexChange?: (index: number) => void;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
119
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp' | 'role'>;
|
|
120
|
+
/**
|
|
121
|
+
* Component for the viewport of a {@link Carousel}.
|
|
122
|
+
*/
|
|
123
|
+
const Viewport: {
|
|
124
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
displayName: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Component for the list holding all items inside a {@link Carousel}.
|
|
129
|
+
*/
|
|
130
|
+
const Content: {
|
|
131
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
132
|
+
displayName: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Component containing each item in a {@link Carousel}.
|
|
136
|
+
*/
|
|
137
|
+
const ItemContainer: {
|
|
138
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
139
|
+
displayName: string;
|
|
140
|
+
};
|
|
65
141
|
}
|
|
66
142
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* - Supports horizontal and vertical orientations.
|
|
71
|
-
* - Supports auto-advancing to the next item after a specified interval.
|
|
72
|
-
* - Supports auto-snapping to each item when scrolling.
|
|
73
|
-
* - Supports tracking item exposure (0-1) to determine how much of the
|
|
74
|
-
* current item is visible in the viewport.
|
|
143
|
+
* Hook for reading the current item's `index`, `exposure`, and `isActive` state
|
|
144
|
+
* from within a {@link Carousel} item's subtree. Throws when called outside of
|
|
145
|
+
* an item.
|
|
75
146
|
*/
|
|
76
|
-
export declare function
|
|
77
|
-
export
|
|
78
|
-
var displayName: string;
|
|
79
|
-
}
|
|
147
|
+
export declare function useCarouselItem(): CarouselItemContextValue;
|
|
148
|
+
export {};
|
|
@@ -45,7 +45,7 @@ export declare namespace Image {
|
|
|
45
45
|
*
|
|
46
46
|
* @param size Size of the loaded image.
|
|
47
47
|
*/
|
|
48
|
-
onSizeChange?: (size?: Size) => void;
|
|
48
|
+
onSizeChange?: (size?: Size.Size) => void;
|
|
49
49
|
} & Omit<ImgHTMLAttributes<HTMLImageElement>, 'alt' | 'loading' | 'onError' | 'onLoad' | 'onLoadStart' | 'sizes' | 'src' | 'srcSet'>;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -77,7 +77,7 @@ export declare namespace Panorama {
|
|
|
77
77
|
* @param size The actual size of the loaded image. If no images are loaded
|
|
78
78
|
* yet, the size is `undefined`.
|
|
79
79
|
*/
|
|
80
|
-
onImageSizeChange?: (size?: Size) => void;
|
|
80
|
+
onImageSizeChange?: (size?: Size.Size) => void;
|
|
81
81
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow' | 'role'>;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ComponentType, HTMLAttributes, Ref } from 'react';
|
|
2
|
+
export declare namespace ScrollableCarousel {
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the orientation of {@link ScrollableCarousel}.
|
|
5
|
+
*/
|
|
6
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
7
|
+
/**
|
|
8
|
+
* Type describing the props of {@link ScrollableCarousel}.
|
|
9
|
+
*/
|
|
10
|
+
type Props<I> = {
|
|
11
|
+
/**
|
|
12
|
+
* Reference to the root element.
|
|
13
|
+
*/
|
|
14
|
+
ref?: Ref<HTMLDivElement>;
|
|
15
|
+
/**
|
|
16
|
+
* Current item index.
|
|
17
|
+
*/
|
|
18
|
+
index?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The interval in milliseconds to wait before automatically advancing to
|
|
21
|
+
* the next item (auto loops).
|
|
22
|
+
*/
|
|
23
|
+
autoAdvanceInterval?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the carousel is draggable.
|
|
26
|
+
*/
|
|
27
|
+
isDragEnabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Props for each item component
|
|
30
|
+
*/
|
|
31
|
+
items?: Omit<I, 'exposure'>[];
|
|
32
|
+
/**
|
|
33
|
+
* Orientation of the carousel.
|
|
34
|
+
*/
|
|
35
|
+
orientation?: Orientation;
|
|
36
|
+
/**
|
|
37
|
+
* The drag speed multiplier. Higher values result in faster dragging. The
|
|
38
|
+
* default value is `1`. This is only applicable when dragging with a
|
|
39
|
+
* non-touch pointer (e.g. mouse).
|
|
40
|
+
*/
|
|
41
|
+
dragSpeed?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to track item exposure (0-1, 0 meaning the item is fully scrolled
|
|
44
|
+
* out of view, 1 meaning the item is fully scrolled into view).
|
|
45
|
+
*/
|
|
46
|
+
shouldTrackExposure?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Handler invoked when auto advance pauses. This is invoked only when
|
|
49
|
+
* {@link autoAdvanceInterval} is greater than 0.
|
|
50
|
+
*/
|
|
51
|
+
onAutoAdvancePause?: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Handler invoked when auto advance resumes. This is invoked only when
|
|
54
|
+
* {@link autoAdvanceInterval} is greater than 0.
|
|
55
|
+
*/
|
|
56
|
+
onAutoAdvanceResume?: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* Handler invoked when the item index changes.
|
|
59
|
+
*
|
|
60
|
+
* @param index The item index.
|
|
61
|
+
*/
|
|
62
|
+
onIndexChange?: (index: number) => void;
|
|
63
|
+
/**
|
|
64
|
+
* The component to render for each item.
|
|
65
|
+
*/
|
|
66
|
+
ItemComponent: ComponentType<I>;
|
|
67
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'onPointerCancel' | 'onPointerDown' | 'onPointerLeave' | 'onPointerUp' | 'role'>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A carousel component that displays a list of items in a scrollable view.
|
|
71
|
+
*
|
|
72
|
+
* Notable features:
|
|
73
|
+
* - Supports horizontal and vertical orientations.
|
|
74
|
+
* - Supports auto-advancing to the next item after a specified interval.
|
|
75
|
+
* - Supports auto-snapping to each item when scrolling.
|
|
76
|
+
* - Supports tracking item exposure (0-1) to determine how much of the
|
|
77
|
+
* current item is visible in the viewport.
|
|
78
|
+
*/
|
|
79
|
+
export declare function ScrollableCarousel<I extends HTMLAttributes<HTMLElement>>({ ref, autoAdvanceInterval, dragSpeed, index, ItemComponent, items, orientation, isDragEnabled, shouldTrackExposure, onAutoAdvancePause, onAutoAdvanceResume, onIndexChange, ...props }: ScrollableCarousel.Props<I>): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export declare namespace ScrollableCarousel {
|
|
81
|
+
var displayName: string;
|
|
82
|
+
}
|
|
@@ -7,7 +7,7 @@ import { HTMLAttributes, Ref } from 'react';
|
|
|
7
7
|
* @exports Select.Option Component for each option.
|
|
8
8
|
* @exports Select.Toggle Component for the toggle.
|
|
9
9
|
*/
|
|
10
|
-
export declare function Select<T extends string>({ id, ref, children,
|
|
10
|
+
export declare function Select<T extends string>({ id, ref, children, name, options, placeholder, value, isRequired, formatValue, onChange, ...props }: Select.Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare namespace Select {
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
@@ -9,4 +9,4 @@ import { Size } from 'spase';
|
|
|
9
9
|
* @returns The intrinsic size of the element, considering the max width
|
|
10
10
|
* constraint if provided.
|
|
11
11
|
*/
|
|
12
|
-
export declare function measureIntrinsicSize(element: HTMLElement, maxWidth?: number): Size;
|
|
12
|
+
export declare function measureIntrinsicSize(element: HTMLElement, maxWidth?: number): Size.Size;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "etudes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "29.0.0",
|
|
4
4
|
"description": "A study of headless React components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"prepages": "rimraf .gh-pages",
|
|
25
25
|
"pages": "vite build -c demo/vite.config.ts",
|
|
26
26
|
"dev": "concurrently \"vite build -w\" \"wait-on build && vite dev --host -c demo/vite.config.ts --port 8080\"",
|
|
27
|
-
"test": "
|
|
27
|
+
"test": "npm run test:unit",
|
|
28
|
+
"test:unit": "vitest run --coverage",
|
|
28
29
|
"typecheck": "tsc --noEmit",
|
|
29
30
|
"lint": "eslint",
|
|
30
31
|
"lint:fix": "eslint --fix"
|
|
@@ -42,40 +43,40 @@
|
|
|
42
43
|
"author": "Andrew Wei <andrewscwei@gmail.com>",
|
|
43
44
|
"license": "MIT",
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@commitlint/config-conventional": "^20.5.
|
|
46
|
+
"@commitlint/config-conventional": "^20.5.3",
|
|
46
47
|
"@eslint/js": "^10.0.1",
|
|
47
48
|
"@semantic-release/git": "^10.0.1",
|
|
48
49
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
49
|
-
"@tailwindcss/vite": "^4.2.
|
|
50
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
50
51
|
"@testing-library/react": "^16.3.2",
|
|
51
52
|
"@testing-library/user-event": "^14.6.1",
|
|
52
|
-
"@types/node": "^25.6.
|
|
53
|
+
"@types/node": "^25.6.2",
|
|
53
54
|
"@types/react": "^19.2.14",
|
|
54
55
|
"@types/react-dom": "^19.2.3",
|
|
55
56
|
"@vitejs/plugin-react": "^6.0.1",
|
|
56
|
-
"@vitest/coverage-v8": "^4.1.
|
|
57
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
57
58
|
"concurrently": "^9.2.1",
|
|
58
|
-
"eslint": "^10.
|
|
59
|
-
"eslint-plugin-perfectionist": "^5.
|
|
59
|
+
"eslint": "^10.3.0",
|
|
60
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
60
61
|
"happy-dom": "^20.9.0",
|
|
61
|
-
"react": "^19.2.
|
|
62
|
-
"react-dom": "^19.2.
|
|
62
|
+
"react": "^19.2.6",
|
|
63
|
+
"react-dom": "^19.2.6",
|
|
63
64
|
"rimraf": "^6.1.3",
|
|
64
65
|
"semantic-release": "^25.0.3",
|
|
65
|
-
"tailwindcss": "^4.2.
|
|
66
|
-
"typescript": "^6.0.
|
|
67
|
-
"typescript-eslint": "^8.
|
|
68
|
-
"vite": "^8.0.
|
|
69
|
-
"vite-plugin-dts": "^
|
|
70
|
-
"vitest": "^4.1.
|
|
66
|
+
"tailwindcss": "^4.2.4",
|
|
67
|
+
"typescript": "^6.0.3",
|
|
68
|
+
"typescript-eslint": "^8.59.2",
|
|
69
|
+
"vite": "^8.0.11",
|
|
70
|
+
"vite-plugin-dts": "^5.0.0",
|
|
71
|
+
"vitest": "^4.1.5",
|
|
71
72
|
"wait-on": "^9.0.5"
|
|
72
73
|
},
|
|
73
74
|
"dependencies": {
|
|
74
75
|
"clsx": "^2.1.1",
|
|
75
76
|
"fast-deep-equal": "^3.1.3",
|
|
76
|
-
"fast-xml-parser": "^5.
|
|
77
|
+
"fast-xml-parser": "^5.7.3",
|
|
77
78
|
"interactjs": "^1.10.27",
|
|
78
|
-
"spase": "^
|
|
79
|
+
"spase": "^13.1.0"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|
|
81
82
|
"react": "^19.0.0"
|