@weaverse/react 0.7.34 → 0.7.38
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 +43 -5
- package/dist/index.js +1 -1120
- package/dist/index.mjs +1 -1088
- package/package.json +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
1
|
import { WeaverseType, Weaverse, ElementCSS, WeaverseItemStore, WeaverseElement } from '@weaverse/core';
|
|
2
2
|
export * from '@weaverse/core';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { ReactElement, ReactNode, CSSProperties } from 'react';
|
|
4
|
+
import React__default, { HTMLAttributes, ReactElement, ReactNode, CSSProperties } from 'react';
|
|
5
5
|
import * as _radix_ui_react_dialog from '@radix-ui/react-dialog';
|
|
6
|
-
import { DialogContentProps, DialogTitleProps, DialogCloseProps } from '@radix-ui/react-dialog';
|
|
6
|
+
import { DialogContentProps, DialogProps, DialogTitleProps, DialogCloseProps } from '@radix-ui/react-dialog';
|
|
7
7
|
|
|
8
8
|
declare let createRootContext: (configs: WeaverseType) => Weaverse;
|
|
9
9
|
declare let WeaverseContext: React.Context<Weaverse>;
|
|
10
10
|
declare let WeaverseContextProvider: React.Provider<Weaverse>;
|
|
11
11
|
declare let WeaverseContextConsumer: React.Consumer<Weaverse>;
|
|
12
12
|
|
|
13
|
+
declare let CircleNotch: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
14
|
+
declare let X: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
15
|
+
declare let Minus: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
16
|
+
declare let Plus: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
17
|
+
declare let ArrowLeft: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
18
|
+
declare let ArrowRight: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
19
|
+
declare let Image: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
20
|
+
declare let ShoppingCart: (props: HTMLAttributes<SVGElement>) => JSX.Element;
|
|
21
|
+
|
|
22
|
+
declare const PhosphorIcons_CircleNotch: typeof CircleNotch;
|
|
23
|
+
declare const PhosphorIcons_X: typeof X;
|
|
24
|
+
declare const PhosphorIcons_Minus: typeof Minus;
|
|
25
|
+
declare const PhosphorIcons_Plus: typeof Plus;
|
|
26
|
+
declare const PhosphorIcons_ArrowLeft: typeof ArrowLeft;
|
|
27
|
+
declare const PhosphorIcons_ArrowRight: typeof ArrowRight;
|
|
28
|
+
declare const PhosphorIcons_Image: typeof Image;
|
|
29
|
+
declare const PhosphorIcons_ShoppingCart: typeof ShoppingCart;
|
|
30
|
+
declare namespace PhosphorIcons {
|
|
31
|
+
export {
|
|
32
|
+
PhosphorIcons_CircleNotch as CircleNotch,
|
|
33
|
+
PhosphorIcons_X as X,
|
|
34
|
+
PhosphorIcons_Minus as Minus,
|
|
35
|
+
PhosphorIcons_Plus as Plus,
|
|
36
|
+
PhosphorIcons_ArrowLeft as ArrowLeft,
|
|
37
|
+
PhosphorIcons_ArrowRight as ArrowRight,
|
|
38
|
+
PhosphorIcons_Image as Image,
|
|
39
|
+
PhosphorIcons_ShoppingCart as ShoppingCart,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
13
43
|
interface ModalContentProps extends DialogContentProps {
|
|
14
44
|
size?: 'auto' | 'fullscreen';
|
|
15
45
|
portal?: boolean;
|
|
16
46
|
}
|
|
47
|
+
type WeaverseIcon = keyof typeof PhosphorIcons;
|
|
48
|
+
interface WeaverseIconProps extends HTMLAttributes<SVGElement> {
|
|
49
|
+
name: WeaverseIcon;
|
|
50
|
+
}
|
|
17
51
|
|
|
18
52
|
interface WeaverseElementProps extends ReactElement {
|
|
19
53
|
css?: ElementCSS;
|
|
@@ -123,13 +157,14 @@ interface InstagramElementProps extends WeaverseElementProps {
|
|
|
123
157
|
}
|
|
124
158
|
type InstagramMedia = {
|
|
125
159
|
id: string;
|
|
126
|
-
media_type: 'IMAGE' | 'CAROUSEL_ALBUM';
|
|
160
|
+
media_type: 'IMAGE' | 'CAROUSEL_ALBUM' | 'VIDEO';
|
|
127
161
|
media_url: string;
|
|
128
162
|
permalink: string;
|
|
129
163
|
caption: string;
|
|
164
|
+
thumbnail_url: string;
|
|
130
165
|
};
|
|
131
166
|
|
|
132
|
-
declare let Modal:
|
|
167
|
+
declare let Modal: (props: DialogProps) => JSX.Element;
|
|
133
168
|
declare let ModalTrigger: React__default.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
134
169
|
declare let ModalHeader: React__default.ForwardRefExoticComponent<DialogTitleProps & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
135
170
|
declare let ModalContent: React__default.ForwardRefExoticComponent<ModalContentProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -152,14 +187,17 @@ declare namespace ModalComponents {
|
|
|
152
187
|
|
|
153
188
|
declare function Spinner(): JSX.Element;
|
|
154
189
|
|
|
190
|
+
declare function Icon({ name, className, ...props }: WeaverseIconProps): JSX.Element;
|
|
191
|
+
|
|
155
192
|
declare let Components: {
|
|
156
193
|
Placeholder: React.ForwardRefExoticComponent<PlaceholderProps & React.RefAttributes<HTMLDivElement>>;
|
|
157
194
|
Spinner: typeof Spinner;
|
|
158
195
|
ModalComponents: typeof ModalComponents;
|
|
196
|
+
Icon: typeof Icon;
|
|
159
197
|
};
|
|
160
198
|
|
|
161
199
|
declare const Elements: Record<string, WeaverseElement>;
|
|
162
200
|
|
|
163
201
|
declare let WeaverseRoot: ({ context }: WeaverseRootPropsType) => JSX.Element | null;
|
|
164
202
|
|
|
165
|
-
export { ButtonElementProps, Components, ContainerElementProps, CountdownElementProps, CountdownTimeKey, CountdownTimerType, Elements, GridContentElementProps, ImageElementProps, InstagramElementProps, InstagramMedia, ItemComponentProps, LayoutBackgroundProps, LayoutElementProps, MapElementProps, ModalContentProps, PlaceholderProps, TextElementProps, TimerBlockProps, VideoCommonProps, VideoElementProps, VimeoElementProps, WeaverseContext, WeaverseContextConsumer, WeaverseContextProvider, WeaverseElementProps, WeaverseRoot, WeaverseRootPropsType, YoutubeElementProps, createRootContext };
|
|
203
|
+
export { ButtonElementProps, Components, ContainerElementProps, CountdownElementProps, CountdownTimeKey, CountdownTimerType, Elements, GridContentElementProps, ImageElementProps, InstagramElementProps, InstagramMedia, ItemComponentProps, LayoutBackgroundProps, LayoutElementProps, MapElementProps, ModalContentProps, PlaceholderProps, TextElementProps, TimerBlockProps, VideoCommonProps, VideoElementProps, VimeoElementProps, WeaverseContext, WeaverseContextConsumer, WeaverseContextProvider, WeaverseElementProps, WeaverseIcon, WeaverseIconProps, WeaverseRoot, WeaverseRootPropsType, YoutubeElementProps, createRootContext };
|