@weaverse/react 0.7.58 → 0.7.59
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.d.ts +25 -2
- package/dist/index.js +287 -140
- package/dist/index.mjs +260 -114
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { WeaverseType, Weaverse, ElementCSS, WeaverseItemStore, WeaverseElement
|
|
|
2
2
|
export * from '@weaverse/core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { HTMLAttributes, CSSProperties, ReactElement, ReactNode } from 'react';
|
|
5
|
+
import * as keen_slider_react from 'keen-slider/react';
|
|
6
|
+
import { KeenSliderPlugin } from 'keen-slider/react';
|
|
5
7
|
import * as _radix_ui_react_dialog from '@radix-ui/react-dialog';
|
|
6
8
|
import { DialogContentProps, DialogProps, DialogTitleProps, DialogCloseProps } from '@radix-ui/react-dialog';
|
|
7
9
|
import { KeenSliderInstance } from 'keen-slider';
|
|
@@ -59,16 +61,21 @@ interface SliderProps {
|
|
|
59
61
|
children: React.ReactNode;
|
|
60
62
|
className?: string;
|
|
61
63
|
gap?: number;
|
|
64
|
+
arrowOffset: number;
|
|
62
65
|
}
|
|
63
66
|
interface SliderArrowsProps {
|
|
64
67
|
currentSlide: number;
|
|
65
68
|
instanceRef: React.MutableRefObject<KeenSliderInstance | null>;
|
|
69
|
+
offset: number;
|
|
66
70
|
className?: string;
|
|
67
71
|
}
|
|
68
72
|
interface SliderDotsProps {
|
|
69
73
|
currentSlide: number;
|
|
70
74
|
instanceRef: React.MutableRefObject<KeenSliderInstance | null>;
|
|
71
75
|
className?: string;
|
|
76
|
+
absolute?: boolean;
|
|
77
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
78
|
+
color: 'light' | 'dark';
|
|
72
79
|
}
|
|
73
80
|
interface OverlayProps {
|
|
74
81
|
enableOverlay: boolean;
|
|
@@ -98,6 +105,7 @@ interface PlaceholderProps {
|
|
|
98
105
|
element: string;
|
|
99
106
|
children: ReactElement | ReactElement[] | ReactNode | ReactNode[];
|
|
100
107
|
style?: CSSProperties;
|
|
108
|
+
className?: string;
|
|
101
109
|
}
|
|
102
110
|
interface ButtonElementProps extends WeaverseElementProps {
|
|
103
111
|
type: 'button' | 'submit' | 'reset';
|
|
@@ -208,11 +216,14 @@ interface SlideshowProps extends WeaverseElementProps {
|
|
|
208
216
|
showArrows: boolean;
|
|
209
217
|
showDots: boolean;
|
|
210
218
|
dotsPosition: 'top' | 'bottom' | 'left' | 'right';
|
|
219
|
+
dotsColor: 'light' | 'dark';
|
|
220
|
+
loop: boolean;
|
|
211
221
|
autoRotate: boolean;
|
|
212
222
|
changeSlidesEvery: number;
|
|
213
223
|
}
|
|
214
224
|
interface SlideProps extends WeaverseElementProps, BackgroundProps, OverlayProps {
|
|
215
225
|
contentPosition: string;
|
|
226
|
+
children: ReactElement[];
|
|
216
227
|
}
|
|
217
228
|
|
|
218
229
|
declare let Modal: (props: DialogProps) => JSX.Element;
|
|
@@ -242,12 +253,18 @@ declare function Icon({ name, className, ...props }: WeaverseIconProps): JSX.Ele
|
|
|
242
253
|
|
|
243
254
|
declare function Tooltip({ children }: TooltipProps): JSX.Element;
|
|
244
255
|
|
|
245
|
-
declare function Slider(
|
|
256
|
+
declare function Slider(props: SliderProps): JSX.Element;
|
|
246
257
|
|
|
247
258
|
declare function Background(props: BackgroundProps): JSX.Element | null;
|
|
248
259
|
|
|
249
260
|
declare function Overlay(props: OverlayProps): JSX.Element | null;
|
|
250
261
|
|
|
262
|
+
declare function Arrows(props: SliderArrowsProps): JSX.Element;
|
|
263
|
+
|
|
264
|
+
declare function Dots(props: SliderDotsProps): JSX.Element;
|
|
265
|
+
|
|
266
|
+
declare function AutoplayPlugin(changeSlidesEvery: number): KeenSliderPlugin;
|
|
267
|
+
|
|
251
268
|
declare let Components: {
|
|
252
269
|
Background: typeof Background;
|
|
253
270
|
Icon: typeof Icon;
|
|
@@ -258,9 +275,15 @@ declare let Components: {
|
|
|
258
275
|
Slider: typeof Slider;
|
|
259
276
|
Tooltip: typeof Tooltip;
|
|
260
277
|
};
|
|
278
|
+
declare let SliderComponents: {
|
|
279
|
+
Arrows: typeof Arrows;
|
|
280
|
+
Dots: typeof Dots;
|
|
281
|
+
ResizePlugin: keen_slider_react.KeenSliderPlugin<{}, {}, keen_slider_react.KeenSliderHooks>;
|
|
282
|
+
AutoplayPlugin: typeof AutoplayPlugin;
|
|
283
|
+
};
|
|
261
284
|
|
|
262
285
|
declare const Elements: Record<string, WeaverseElement>;
|
|
263
286
|
|
|
264
287
|
declare let WeaverseRoot: ({ context }: WeaverseRootPropsType) => JSX.Element | null;
|
|
265
288
|
|
|
266
|
-
export { BackgroundProps, ButtonElementProps, Components, ContainerElementProps, CountdownElementProps, CountdownTimeKey, CountdownTimerType, Elements, GridContentElementProps, ImageElementProps, InstagramElementProps, InstagramMedia, ItemComponentProps, LayoutBackgroundProps, LayoutElementProps, MapElementProps, ModalContentProps, OverlayProps, PlaceholderProps, SlideProps, SliderArrowsProps, SliderDotsProps, SliderProps, SlideshowProps, TextElementProps, TimerBlockProps, TooltipProps, VideoCommonProps, VideoElementProps, VimeoElementProps, WeaverseContext, WeaverseContextConsumer, WeaverseContextProvider, WeaverseElementProps, WeaverseIcon, WeaverseIconProps, WeaverseRoot, WeaverseRootPropsType, YoutubeElementProps, createRootContext };
|
|
289
|
+
export { BackgroundProps, ButtonElementProps, Components, ContainerElementProps, CountdownElementProps, CountdownTimeKey, CountdownTimerType, Elements, GridContentElementProps, ImageElementProps, InstagramElementProps, InstagramMedia, ItemComponentProps, LayoutBackgroundProps, LayoutElementProps, MapElementProps, ModalContentProps, OverlayProps, PlaceholderProps, SlideProps, SliderArrowsProps, SliderComponents, SliderDotsProps, SliderProps, SlideshowProps, TextElementProps, TimerBlockProps, TooltipProps, VideoCommonProps, VideoElementProps, VimeoElementProps, WeaverseContext, WeaverseContextConsumer, WeaverseContextProvider, WeaverseElementProps, WeaverseIcon, WeaverseIconProps, WeaverseRoot, WeaverseRootPropsType, YoutubeElementProps, createRootContext };
|