@weaverse/react 0.7.57 → 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 +64 -5
- package/dist/index.js +757 -392
- package/dist/index.mjs +747 -383
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { WeaverseType, Weaverse, ElementCSS, WeaverseItemStore, WeaverseElement } from '@weaverse/core';
|
|
2
2
|
export * from '@weaverse/core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { HTMLAttributes, ReactElement, ReactNode
|
|
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,10 +61,32 @@ 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;
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
interface SliderDotsProps {
|
|
73
|
+
currentSlide: number;
|
|
74
|
+
instanceRef: React.MutableRefObject<KeenSliderInstance | null>;
|
|
75
|
+
className?: string;
|
|
76
|
+
absolute?: boolean;
|
|
77
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
78
|
+
color: 'light' | 'dark';
|
|
79
|
+
}
|
|
80
|
+
interface OverlayProps {
|
|
81
|
+
enableOverlay: boolean;
|
|
82
|
+
overlayOpacity: number;
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
interface BackgroundProps {
|
|
86
|
+
backgroundColor?: string;
|
|
87
|
+
backgroundImage?: string;
|
|
88
|
+
backgroundFit?: CSSProperties['objectFit'];
|
|
89
|
+
backgroundPosition?: CSSProperties['objectPosition'];
|
|
66
90
|
className?: string;
|
|
67
91
|
}
|
|
68
92
|
|
|
@@ -81,6 +105,7 @@ interface PlaceholderProps {
|
|
|
81
105
|
element: string;
|
|
82
106
|
children: ReactElement | ReactElement[] | ReactNode | ReactNode[];
|
|
83
107
|
style?: CSSProperties;
|
|
108
|
+
className?: string;
|
|
84
109
|
}
|
|
85
110
|
interface ButtonElementProps extends WeaverseElementProps {
|
|
86
111
|
type: 'button' | 'submit' | 'reset';
|
|
@@ -184,6 +209,22 @@ type InstagramMedia = {
|
|
|
184
209
|
caption: string;
|
|
185
210
|
thumbnail_url: string;
|
|
186
211
|
};
|
|
212
|
+
interface SlideshowProps extends WeaverseElementProps {
|
|
213
|
+
animation: 'slide' | 'fade';
|
|
214
|
+
slidesPerView: number;
|
|
215
|
+
spacing: number;
|
|
216
|
+
showArrows: boolean;
|
|
217
|
+
showDots: boolean;
|
|
218
|
+
dotsPosition: 'top' | 'bottom' | 'left' | 'right';
|
|
219
|
+
dotsColor: 'light' | 'dark';
|
|
220
|
+
loop: boolean;
|
|
221
|
+
autoRotate: boolean;
|
|
222
|
+
changeSlidesEvery: number;
|
|
223
|
+
}
|
|
224
|
+
interface SlideProps extends WeaverseElementProps, BackgroundProps, OverlayProps {
|
|
225
|
+
contentPosition: string;
|
|
226
|
+
children: ReactElement[];
|
|
227
|
+
}
|
|
187
228
|
|
|
188
229
|
declare let Modal: (props: DialogProps) => JSX.Element;
|
|
189
230
|
declare let ModalTrigger: React__default.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
@@ -212,19 +253,37 @@ declare function Icon({ name, className, ...props }: WeaverseIconProps): JSX.Ele
|
|
|
212
253
|
|
|
213
254
|
declare function Tooltip({ children }: TooltipProps): JSX.Element;
|
|
214
255
|
|
|
215
|
-
declare function Slider(
|
|
256
|
+
declare function Slider(props: SliderProps): JSX.Element;
|
|
257
|
+
|
|
258
|
+
declare function Background(props: BackgroundProps): JSX.Element | null;
|
|
259
|
+
|
|
260
|
+
declare function Overlay(props: OverlayProps): JSX.Element | null;
|
|
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;
|
|
216
267
|
|
|
217
268
|
declare let Components: {
|
|
269
|
+
Background: typeof Background;
|
|
270
|
+
Icon: typeof Icon;
|
|
271
|
+
ModalComponents: typeof ModalComponents;
|
|
272
|
+
Overlay: typeof Overlay;
|
|
218
273
|
Placeholder: React$1.ForwardRefExoticComponent<PlaceholderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
219
274
|
Spinner: typeof Spinner;
|
|
220
|
-
ModalComponents: typeof ModalComponents;
|
|
221
|
-
Icon: typeof Icon;
|
|
222
275
|
Slider: typeof Slider;
|
|
223
276
|
Tooltip: typeof Tooltip;
|
|
224
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
|
+
};
|
|
225
284
|
|
|
226
285
|
declare const Elements: Record<string, WeaverseElement>;
|
|
227
286
|
|
|
228
287
|
declare let WeaverseRoot: ({ context }: WeaverseRootPropsType) => JSX.Element | null;
|
|
229
288
|
|
|
230
|
-
export { ButtonElementProps, Components, ContainerElementProps, CountdownElementProps, CountdownTimeKey, CountdownTimerType, Elements, GridContentElementProps, ImageElementProps, InstagramElementProps, InstagramMedia, ItemComponentProps, LayoutBackgroundProps, LayoutElementProps, MapElementProps, ModalContentProps, PlaceholderProps, SliderArrowsProps, SliderProps, 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 };
|