etudes 32.1.0 → 32.3.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/components/Burger.d.ts +2 -2
- package/build/components/BurgerButton.d.ts +2 -2
- package/build/components/CoverImage.d.ts +3 -3
- package/build/components/CoverVideo.d.ts +3 -3
- package/build/components/OptionButton.d.ts +1 -1
- package/build/components/PanoramaSlider.d.ts +4 -4
- package/build/components/SelectableButton.d.ts +1 -1
- package/build/etudes.js +36 -25
- package/build/etudes.umd.cjs +2 -2
- package/build/flows/Conditional.d.ts +1 -1
- package/build/flows/Each.d.ts +1 -1
- package/build/flows/Repeat.d.ts +1 -1
- package/build/flows/Switch.d.ts +1 -1
- package/build/hocs/WithTooltip.d.ts +1 -1
- package/build/primitives/Accordion.d.ts +6 -6
- package/build/primitives/Button.d.ts +1 -1
- package/build/primitives/Carousel.d.ts +4 -4
- package/build/primitives/CodeInput.d.ts +2 -2
- package/build/primitives/Collection.d.ts +2 -2
- package/build/primitives/Counter.d.ts +4 -4
- package/build/primitives/Dial.d.ts +3 -3
- package/build/primitives/Dropdown.d.ts +5 -5
- package/build/primitives/Form.d.ts +1 -1
- package/build/primitives/Image.d.ts +1 -1
- package/build/primitives/MasonryGrid.d.ts +1 -1
- package/build/primitives/Panorama.d.ts +1 -1
- package/build/primitives/Picture.d.ts +1 -1
- package/build/primitives/RangeSlider.d.ts +6 -6
- package/build/primitives/ScrollableCarousel.d.ts +1 -1
- package/build/primitives/Select.d.ts +4 -4
- package/build/primitives/Slider.d.ts +5 -5
- package/build/primitives/StepSlider.d.ts +5 -5
- package/build/primitives/SwipeRegion.d.ts +1 -1
- package/build/primitives/TextArea.d.ts +1 -1
- package/build/primitives/TextField.d.ts +1 -1
- package/build/primitives/Toggle.d.ts +3 -3
- package/build/primitives/Video.d.ts +1 -1
- package/build/providers/ScrollPositionProvider.d.ts +9 -4
- package/build/utils/ExtractChildren.d.ts +1 -1
- package/build/utils/NoSSR.d.ts +1 -1
- package/package.json +17 -17
|
@@ -4,7 +4,7 @@ import { HTMLAttributes, Ref } from 'react';
|
|
|
4
4
|
*
|
|
5
5
|
* @exports Burger.Bar Component for each bar in the burger.
|
|
6
6
|
*/
|
|
7
|
-
export declare function Burger({ className, ref, children, numberOfBars, isActive, isSplit, isTailHidden, ...props }: Burger.Props): import("react
|
|
7
|
+
export declare function Burger({ className, ref, children, numberOfBars, isActive, isSplit, isTailHidden, ...props }: Burger.Props): import("react").JSX.Element;
|
|
8
8
|
export declare namespace Burger {
|
|
9
9
|
var displayName: string;
|
|
10
10
|
}
|
|
@@ -39,7 +39,7 @@ export declare namespace Burger {
|
|
|
39
39
|
* Component for each bar in a {@link Burger}.
|
|
40
40
|
*/
|
|
41
41
|
const Bar: {
|
|
42
|
-
({ ...props }: HTMLAttributes<HTMLSpanElement>): import("react
|
|
42
|
+
({ ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
43
43
|
displayName: string;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -6,7 +6,7 @@ import { Burger } from './Burger.js';
|
|
|
6
6
|
*
|
|
7
7
|
* @exports BurgerButton.Bar Component for each bar in the burger button.
|
|
8
8
|
*/
|
|
9
|
-
export declare function BurgerButton({ className, ref, style, children, numberOfBars, isActive, isSplit, isTailHidden, onActivate, onDeactivate, onToggle, ...props }: BurgerButton.Props): import("react
|
|
9
|
+
export declare function BurgerButton({ className, ref, style, children, numberOfBars, isActive, isSplit, isTailHidden, onActivate, onDeactivate, onToggle, ...props }: BurgerButton.Props): import("react").JSX.Element;
|
|
10
10
|
export declare namespace BurgerButton {
|
|
11
11
|
var displayName: string;
|
|
12
12
|
}
|
|
@@ -38,7 +38,7 @@ export declare namespace BurgerButton {
|
|
|
38
38
|
* Component for each bar in a {@link BurgerButton}.
|
|
39
39
|
*/
|
|
40
40
|
const Bar: {
|
|
41
|
-
({ ...props }: import("react").HTMLAttributes<HTMLSpanElement>): import("react
|
|
41
|
+
({ ...props }: import("react").HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
42
42
|
displayName: string;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -7,7 +7,7 @@ import { Picture } from '../primitives/Picture.js';
|
|
|
7
7
|
* @exports CoverImage.Content Component for optional content inside the image.
|
|
8
8
|
* @exports CoverImage.Viewport Component for the viewport.
|
|
9
9
|
*/
|
|
10
|
-
export declare function CoverImage({ ref, style, alt, aspectRatio: externalAspectRatio, children, loadingMode, source, onError, onLoad, onLoadStart, ...props }: Readonly<CoverImage.Props>): import("react
|
|
10
|
+
export declare function CoverImage({ ref, style, alt, aspectRatio: externalAspectRatio, children, loadingMode, source, onError, onLoad, onLoadStart, ...props }: Readonly<CoverImage.Props>): import("react").JSX.Element;
|
|
11
11
|
export declare namespace CoverImage {
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
@@ -30,14 +30,14 @@ export declare namespace CoverImage {
|
|
|
30
30
|
* Component for optional content inside a {@link CoverImage}.
|
|
31
31
|
*/
|
|
32
32
|
const Content: {
|
|
33
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
33
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
34
34
|
displayName: string;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Component for the viewport of a {@link CoverImage}.
|
|
38
38
|
*/
|
|
39
39
|
const Viewport: {
|
|
40
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
40
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -7,7 +7,7 @@ import { Video } from '../primitives/Video.js';
|
|
|
7
7
|
* @exports CoverVideo.Content Component for optional content inside the video.
|
|
8
8
|
* @exports CoverVideo.Viewport Component for the viewport.
|
|
9
9
|
*/
|
|
10
|
-
export declare function CoverVideo({ className, ref, style, aspectRatio: externalAspectRatio, autoLoop, autoPlay, children, playsInline, poster, source, hasControls, isMuted, onCanPlay, onEnd, onFullscreenChange, onLoadMetadata, onLoadMetadataComplete, onLoadMetadataError, onPause, onPlay, onSizeChange, ...props }: Readonly<CoverVideo.Props>): import("react
|
|
10
|
+
export declare function CoverVideo({ className, ref, style, aspectRatio: externalAspectRatio, autoLoop, autoPlay, children, playsInline, poster, source, hasControls, isMuted, onCanPlay, onEnd, onFullscreenChange, onLoadMetadata, onLoadMetadataComplete, onLoadMetadataError, onPause, onPlay, onSizeChange, ...props }: Readonly<CoverVideo.Props>): import("react").JSX.Element;
|
|
11
11
|
export declare namespace CoverVideo {
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
@@ -30,14 +30,14 @@ export declare namespace CoverVideo {
|
|
|
30
30
|
* Component for optional content inside a {@link CoverVideo}.
|
|
31
31
|
*/
|
|
32
32
|
const Content: {
|
|
33
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
33
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
34
34
|
displayName: string;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Component for the viewport of a {@link CoverVideo}.
|
|
38
38
|
*/
|
|
39
39
|
const Viewport: {
|
|
40
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
40
|
+
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -35,7 +35,7 @@ export declare namespace OptionButton {
|
|
|
35
35
|
/**
|
|
36
36
|
* A button component that cycles through a list of options when clicked.
|
|
37
37
|
*/
|
|
38
|
-
export declare function OptionButton({ ref, index, options, isDisabled, onChange, ...props }: OptionButton.Props): import("react
|
|
38
|
+
export declare function OptionButton({ ref, index, options, isDisabled, onChange, ...props }: OptionButton.Props): import("react").JSX.Element;
|
|
39
39
|
export declare namespace OptionButton {
|
|
40
40
|
var displayName: string;
|
|
41
41
|
}
|
|
@@ -10,7 +10,7 @@ import { Panorama } from '../primitives/Panorama.js';
|
|
|
10
10
|
* FOV of the backing {@link Panorama}.
|
|
11
11
|
* @exports Panorama.SliderTrack Component for the slide track.
|
|
12
12
|
*/
|
|
13
|
-
export declare function PanoramaSlider({ className, ref, style, angle, autoDimension, children, fov, speed, src, viewportSize, zeroAnchor, onAngleChange, onDragEnd, onDragStart, onImageSizeChange, onLoadImageComplete, onLoadImageError, onLoadImageStart, onPositionChange, ...props }: Readonly<PanoramaSlider.Props>): import("react
|
|
13
|
+
export declare function PanoramaSlider({ className, ref, style, angle, autoDimension, children, fov, speed, src, viewportSize, zeroAnchor, onAngleChange, onDragEnd, onDragStart, onImageSizeChange, onLoadImageComplete, onLoadImageError, onLoadImageStart, onPositionChange, ...props }: Readonly<PanoramaSlider.Props>): import("react").JSX.Element;
|
|
14
14
|
export declare namespace PanoramaSlider {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -49,21 +49,21 @@ export declare namespace PanoramaSlider {
|
|
|
49
49
|
* Component for the active indicator of a {@link PanoramaSlider}.
|
|
50
50
|
*/
|
|
51
51
|
const Indicator: {
|
|
52
|
-
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
52
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
53
53
|
displayName: string;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* Component for the active reticle of a {@link PanoramaSlider}.
|
|
57
57
|
*/
|
|
58
58
|
const Reticle: {
|
|
59
|
-
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
59
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
60
60
|
displayName: string;
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
63
63
|
* Component for the slide track of a {@link PanoramaSlider}.
|
|
64
64
|
*/
|
|
65
65
|
const Track: {
|
|
66
|
-
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
66
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
67
67
|
displayName: string;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
@@ -43,7 +43,7 @@ export declare namespace SelectableButton {
|
|
|
43
43
|
/**
|
|
44
44
|
* A button component that can be selected or deselected.
|
|
45
45
|
*/
|
|
46
|
-
export declare function SelectableButton({ className, ref, children, label, isDeselectable, isDisabled, isSelected, onDeselect, onSelect, onToggle, ...props }: SelectableButton.Props): import("react
|
|
46
|
+
export declare function SelectableButton({ className, ref, children, label, isDeselectable, isDisabled, isSelected, onDeselect, onSelect, onToggle, ...props }: SelectableButton.Props): import("react").JSX.Element;
|
|
47
47
|
export declare namespace SelectableButton {
|
|
48
48
|
var displayName: string;
|
|
49
49
|
}
|
package/build/etudes.js
CHANGED
|
@@ -8900,53 +8900,64 @@ function si({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n
|
|
|
8900
8900
|
process.env.NODE_ENV === "development" && (ai.displayName = "Toggle", ai.Knob.displayName = "Toggle.Knob", ai.Track.displayName = "Toggle.Track");
|
|
8901
8901
|
//#endregion
|
|
8902
8902
|
//#region src/providers/ScrollPositionProvider.tsx
|
|
8903
|
-
var ci =
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8903
|
+
var ci = {
|
|
8904
|
+
current: K.zero,
|
|
8905
|
+
end: K.zero,
|
|
8906
|
+
progress: K.zero,
|
|
8907
|
+
start: K.zero
|
|
8908
|
+
}, li = a(ci), ui = a(!0), di = a(!1);
|
|
8909
|
+
function fi({ children: e, scrollBottomOffset: t = 0, scrollTopOffset: n = 0, target: r }) {
|
|
8910
|
+
let [i, a] = p(!0), [o, s] = p(!1), [c, l] = p(ci);
|
|
8911
|
+
return fn(r, (e) => {
|
|
8912
|
+
l(e), a(e.current.y <= e.start.y + n), s(e.current.y >= e.end.y - t);
|
|
8913
|
+
}), /* @__PURE__ */ (0, O.jsx)(ui.Provider, {
|
|
8914
|
+
value: i,
|
|
8915
|
+
children: /* @__PURE__ */ (0, O.jsx)(di.Provider, {
|
|
8916
|
+
value: o,
|
|
8917
|
+
children: /* @__PURE__ */ (0, O.jsx)(li.Provider, {
|
|
8918
|
+
value: c,
|
|
8914
8919
|
children: e
|
|
8915
8920
|
})
|
|
8916
8921
|
})
|
|
8917
8922
|
});
|
|
8918
8923
|
}
|
|
8919
|
-
function fi() {
|
|
8920
|
-
let e = s(li);
|
|
8921
|
-
return e === void 0 && console.warn("[etudes::useIsScrollTop] `useIsScrollTop` must be used within a `ScrollPositionProvider`"), e;
|
|
8922
|
-
}
|
|
8923
8924
|
function pi() {
|
|
8924
8925
|
let e = s(ui);
|
|
8925
|
-
return e === void 0 && console.warn("[etudes::
|
|
8926
|
+
return e === void 0 && console.warn("[etudes::useIsScrollTop] `useIsScrollTop` must be used within a `ScrollPositionProvider`"), e ?? !0;
|
|
8926
8927
|
}
|
|
8927
8928
|
function mi() {
|
|
8928
|
-
let e = s(
|
|
8929
|
-
return e
|
|
8929
|
+
let e = s(di);
|
|
8930
|
+
return e === void 0 && console.warn("[etudes::useIsScrollBottom] `useIsScrollBottom` must be used within a `ScrollPositionProvider`"), e ?? !1;
|
|
8931
|
+
}
|
|
8932
|
+
function hi() {
|
|
8933
|
+
let e = s(li);
|
|
8934
|
+
return e || console.warn("[etudes::useScrollPosition] `useScrollPosition` must be used within a `ScrollPositionProvider`"), e ?? {
|
|
8935
|
+
current: K.zero,
|
|
8936
|
+
end: K.zero,
|
|
8937
|
+
progress: K.zero,
|
|
8938
|
+
start: K.zero
|
|
8939
|
+
};
|
|
8930
8940
|
}
|
|
8941
|
+
process.env.NODE_ENV === "development" && (fi.displayName = "ScrollPositionProvider", li.displayName = "ScrollPositionContext", ui.displayName = "ScrollTopContext", di.displayName = "ScrollBottomContext");
|
|
8931
8942
|
//#endregion
|
|
8932
8943
|
//#region src/utils/createKeyDeep.ts
|
|
8933
|
-
function
|
|
8934
|
-
return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(
|
|
8944
|
+
function gi(e) {
|
|
8945
|
+
return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(gi)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, gi(t)])) : _t(e);
|
|
8935
8946
|
}
|
|
8936
8947
|
//#endregion
|
|
8937
8948
|
//#region src/utils/ExtractChildren.tsx
|
|
8938
|
-
function
|
|
8949
|
+
function _i({ children: e, ...n }) {
|
|
8939
8950
|
return /* @__PURE__ */ (0, O.jsx)(O.Fragment, { children: t.map(e, (e) => o(e) ? N(e, { ...n }) : e) });
|
|
8940
8951
|
}
|
|
8941
|
-
process.env.NODE_ENV === "development" && (
|
|
8952
|
+
process.env.NODE_ENV === "development" && (_i.displayName = "ExtractChildren");
|
|
8942
8953
|
//#endregion
|
|
8943
8954
|
//#region src/utils/getSystemColorScheme.ts
|
|
8944
|
-
function
|
|
8955
|
+
function vi() {
|
|
8945
8956
|
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
8946
8957
|
}
|
|
8947
8958
|
//#endregion
|
|
8948
8959
|
//#region src/utils/NoSSR.tsx
|
|
8949
|
-
function
|
|
8960
|
+
function yi({ children: e, fallback: t = void 0 }) {
|
|
8950
8961
|
let [n, i] = p(!1);
|
|
8951
8962
|
if (l(() => {
|
|
8952
8963
|
i(typeof window < "u");
|
|
@@ -8956,4 +8967,4 @@ function vi({ children: e, fallback: t = void 0 }) {
|
|
|
8956
8967
|
});
|
|
8957
8968
|
}
|
|
8958
8969
|
//#endregion
|
|
8959
|
-
export { Q as Accordion, I as Burger, R as BurgerButton, ft as Button, qn as Carousel, er as CodeInput, kn as Collection, kt as Conditional, or as Counter, it as CoverImage, ut as CoverVideo, cr as Dial, fr as Dropdown, At as Each, Nt as ExtractChild,
|
|
8970
|
+
export { Q as Accordion, I as Burger, R as BurgerButton, ft as Button, qn as Carousel, er as CodeInput, kn as Collection, kt as Conditional, or as Counter, it as CoverImage, ut as CoverVideo, cr as Dial, fr as Dropdown, At as Each, Nt as ExtractChild, _i as ExtractChildren, vr as Form, nt as Image, Qe as ImageSource, br as MasonryGrid, yi as NoSSR, ht as OptionButton, bt as Panorama, Et as PanoramaSlider, rt as Picture, $ as RangeSlider, k as Repeat, fi as ScrollPositionProvider, Lr as ScrollableCarousel, Hr as Select, Ot as SelectableButton, Wr as Slider, Yr as StepSlider, P as Styled, ri as SwipeRegion, jt as Switch, ii as TextArea, ar as TextField, ai as Toggle, lt as Video, It as WithTooltip, A as asClassNameDict, j as asComponentDict, M as asStyleDict, N as cloneStyledElement, _t as createKey, gi as createKeyDeep, tn as createLocalCache, _n as createSessionCache, Cn as getStyle, vi as getSystemColorScheme, Zt as isTouchDevice, Pt as measureIntrinsicSize, wn as setStyle, Ft as setStyles, F as styles, Vt as useClassName, Ht as useClickOutside, Ut as useCopyBlobToClipboard, Kt as useDPR, Wt as useDownloadBlob, qt as useDrag, Jt as useDropzone, $e as useImageLoader, et as useImageSize, vt as useInertiaDrag, Je as useIntersectionObserver, Yt as useInterval, Xt as useIsMounted, mi as useIsScrollBottom, pi as useIsScrollTop, Qt as useIsTouchDevice, $t as useKeyboardShortcut, Z as useLatest, sn as useLocalCache, cn as useMouseEnter, ln as useMouseLeave, un as useOS, dn as usePrevious, Ze as useRect, hi as useScrollPosition, fn as useScrollPositionObserver, Sn as useSessionCache, yt as useSize, Ye as useSizeObserver, Tn as useStyle, En as useSystemColorScheme, Dn as useTimeout, ot as useVideoMetadataLoader, st as useVideoSize, Xe as useViewportSize };
|