@weaverse/react 0.7.56 → 0.7.58
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 +46 -9
- package/dist/index.js +618 -396
- package/dist/index.mjs +610 -388
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
5
|
import * as _radix_ui_react_dialog from '@radix-ui/react-dialog';
|
|
6
6
|
import { DialogContentProps, DialogProps, DialogTitleProps, DialogCloseProps } from '@radix-ui/react-dialog';
|
|
7
7
|
import { KeenSliderInstance } from 'keen-slider';
|
|
@@ -58,12 +58,30 @@ interface TooltipProps {
|
|
|
58
58
|
interface SliderProps {
|
|
59
59
|
children: React.ReactNode;
|
|
60
60
|
className?: string;
|
|
61
|
+
gap?: number;
|
|
61
62
|
}
|
|
62
63
|
interface SliderArrowsProps {
|
|
63
64
|
currentSlide: number;
|
|
64
65
|
instanceRef: React.MutableRefObject<KeenSliderInstance | null>;
|
|
65
66
|
className?: string;
|
|
66
67
|
}
|
|
68
|
+
interface SliderDotsProps {
|
|
69
|
+
currentSlide: number;
|
|
70
|
+
instanceRef: React.MutableRefObject<KeenSliderInstance | null>;
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
interface OverlayProps {
|
|
74
|
+
enableOverlay: boolean;
|
|
75
|
+
overlayOpacity: number;
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
interface BackgroundProps {
|
|
79
|
+
backgroundColor?: string;
|
|
80
|
+
backgroundImage?: string;
|
|
81
|
+
backgroundFit?: CSSProperties['objectFit'];
|
|
82
|
+
backgroundPosition?: CSSProperties['objectPosition'];
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
67
85
|
|
|
68
86
|
interface WeaverseElementProps extends Partial<ReactElement> {
|
|
69
87
|
css?: ElementCSS;
|
|
@@ -94,8 +112,8 @@ interface ContainerElementProps extends WeaverseElementProps {
|
|
|
94
112
|
interface ImageElementProps extends WeaverseElementProps {
|
|
95
113
|
src: string;
|
|
96
114
|
alt: string;
|
|
97
|
-
objectFit: '
|
|
98
|
-
objectPosition: '
|
|
115
|
+
objectFit: CSSProperties['objectFit'];
|
|
116
|
+
objectPosition: CSSProperties['objectPosition'];
|
|
99
117
|
clickAction: 'none' | 'openLightbox' | 'openLink';
|
|
100
118
|
linkTo?: string;
|
|
101
119
|
openLinkInNewTab?: boolean;
|
|
@@ -109,8 +127,8 @@ interface GridContentElementProps extends WeaverseElementProps {
|
|
|
109
127
|
interface BackgroundDataProps {
|
|
110
128
|
backgroundColor?: string;
|
|
111
129
|
backgroundImage?: string;
|
|
112
|
-
objectFit?: '
|
|
113
|
-
objectPosition?:
|
|
130
|
+
objectFit?: CSSProperties['objectFit'];
|
|
131
|
+
objectPosition?: CSSProperties['objectPosition'];
|
|
114
132
|
}
|
|
115
133
|
interface LayoutElementProps extends BackgroundDataProps, WeaverseElementProps {
|
|
116
134
|
contentSize: number;
|
|
@@ -183,6 +201,19 @@ type InstagramMedia = {
|
|
|
183
201
|
caption: string;
|
|
184
202
|
thumbnail_url: string;
|
|
185
203
|
};
|
|
204
|
+
interface SlideshowProps extends WeaverseElementProps {
|
|
205
|
+
animation: 'slide' | 'fade';
|
|
206
|
+
slidesPerView: number;
|
|
207
|
+
spacing: number;
|
|
208
|
+
showArrows: boolean;
|
|
209
|
+
showDots: boolean;
|
|
210
|
+
dotsPosition: 'top' | 'bottom' | 'left' | 'right';
|
|
211
|
+
autoRotate: boolean;
|
|
212
|
+
changeSlidesEvery: number;
|
|
213
|
+
}
|
|
214
|
+
interface SlideProps extends WeaverseElementProps, BackgroundProps, OverlayProps {
|
|
215
|
+
contentPosition: string;
|
|
216
|
+
}
|
|
186
217
|
|
|
187
218
|
declare let Modal: (props: DialogProps) => JSX.Element;
|
|
188
219
|
declare let ModalTrigger: React__default.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
@@ -211,13 +242,19 @@ declare function Icon({ name, className, ...props }: WeaverseIconProps): JSX.Ele
|
|
|
211
242
|
|
|
212
243
|
declare function Tooltip({ children }: TooltipProps): JSX.Element;
|
|
213
244
|
|
|
214
|
-
declare function Slider({ children, className }: SliderProps): JSX.Element;
|
|
245
|
+
declare function Slider({ children, className, gap }: SliderProps): JSX.Element;
|
|
246
|
+
|
|
247
|
+
declare function Background(props: BackgroundProps): JSX.Element | null;
|
|
248
|
+
|
|
249
|
+
declare function Overlay(props: OverlayProps): JSX.Element | null;
|
|
215
250
|
|
|
216
251
|
declare let Components: {
|
|
252
|
+
Background: typeof Background;
|
|
253
|
+
Icon: typeof Icon;
|
|
254
|
+
ModalComponents: typeof ModalComponents;
|
|
255
|
+
Overlay: typeof Overlay;
|
|
217
256
|
Placeholder: React$1.ForwardRefExoticComponent<PlaceholderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
218
257
|
Spinner: typeof Spinner;
|
|
219
|
-
ModalComponents: typeof ModalComponents;
|
|
220
|
-
Icon: typeof Icon;
|
|
221
258
|
Slider: typeof Slider;
|
|
222
259
|
Tooltip: typeof Tooltip;
|
|
223
260
|
};
|
|
@@ -226,4 +263,4 @@ declare const Elements: Record<string, WeaverseElement>;
|
|
|
226
263
|
|
|
227
264
|
declare let WeaverseRoot: ({ context }: WeaverseRootPropsType) => JSX.Element | null;
|
|
228
265
|
|
|
229
|
-
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 };
|
|
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 };
|