@drawo-app/drawo 2.0.7 → 2.0.9
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/drawo.css +1 -1
- package/dist/index.cjs +147 -147
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +16099 -15998
- package/dist/index.js.map +1 -1
- package/package.json +8 -15
package/dist/index.d.cts
CHANGED
|
@@ -32,6 +32,32 @@ export interface DrawoProps {
|
|
|
32
32
|
children?: ReactNode;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export interface DrawoEmptyStateConfig {
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
render?: (params: {
|
|
38
|
+
messages: LocaleMessages;
|
|
39
|
+
onInsertImage: () => void;
|
|
40
|
+
}) => ReactNode;
|
|
41
|
+
style?: React.CSSProperties;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface DrawoTopBarProps {
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
left?: ReactNode;
|
|
48
|
+
right?: ReactNode;
|
|
49
|
+
showMenuBar?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DrawoCanvasProps {
|
|
53
|
+
showDefaultEmptyState?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface DrawoEmptyStateProps {
|
|
57
|
+
children?: ReactNode;
|
|
58
|
+
config?: DrawoEmptyStateConfig;
|
|
59
|
+
}
|
|
60
|
+
|
|
35
61
|
export interface Camera {
|
|
36
62
|
x: number;
|
|
37
63
|
y: number;
|
|
@@ -137,18 +163,20 @@ export function useDrawo(): DrawoContextValue;
|
|
|
137
163
|
export function DrawoProvider(props: DrawoProps & { children: ReactNode }): JSX.Element;
|
|
138
164
|
|
|
139
165
|
export const Drawo: React.FC<DrawoProps> & {
|
|
140
|
-
TopBar: React.FC<
|
|
141
|
-
Canvas: React.FC
|
|
166
|
+
TopBar: React.FC<DrawoTopBarProps>;
|
|
167
|
+
Canvas: React.FC<DrawoCanvasProps>;
|
|
142
168
|
ToolBar: React.FC;
|
|
143
169
|
UndoBar: React.FC;
|
|
144
170
|
ZoomBar: React.FC;
|
|
171
|
+
EmptyState: React.FC<DrawoEmptyStateProps>;
|
|
145
172
|
};
|
|
146
173
|
|
|
147
|
-
export function DrawoTopBar(props:
|
|
148
|
-
export function DrawoCanvas(): JSX.Element;
|
|
174
|
+
export function DrawoTopBar(props: DrawoTopBarProps): JSX.Element;
|
|
175
|
+
export function DrawoCanvas(props: DrawoCanvasProps): JSX.Element;
|
|
149
176
|
export function DrawoToolBar(): JSX.Element;
|
|
150
177
|
export function DrawoUndoBar(): JSX.Element;
|
|
151
178
|
export function DrawoZoomBar(): JSX.Element;
|
|
179
|
+
export function DrawoEmptyState(props: DrawoEmptyStateProps): JSX.Element;
|
|
152
180
|
|
|
153
181
|
export function Timer(props: { isOpen: boolean; onOpenChange: (next: boolean) => void; messages: LocaleMessages }): JSX.Element;
|
|
154
182
|
export function MusicBar(props: { isOpen: boolean; onOpenChange: (next: boolean) => void; messages: LocaleMessages }): JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,32 @@ export interface DrawoProps {
|
|
|
32
32
|
children?: ReactNode;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export interface DrawoEmptyStateConfig {
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
render?: (params: {
|
|
38
|
+
messages: LocaleMessages;
|
|
39
|
+
onInsertImage: () => void;
|
|
40
|
+
}) => ReactNode;
|
|
41
|
+
style?: React.CSSProperties;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface DrawoTopBarProps {
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
left?: ReactNode;
|
|
48
|
+
right?: ReactNode;
|
|
49
|
+
showMenuBar?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DrawoCanvasProps {
|
|
53
|
+
showDefaultEmptyState?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface DrawoEmptyStateProps {
|
|
57
|
+
children?: ReactNode;
|
|
58
|
+
config?: DrawoEmptyStateConfig;
|
|
59
|
+
}
|
|
60
|
+
|
|
35
61
|
export interface Camera {
|
|
36
62
|
x: number;
|
|
37
63
|
y: number;
|
|
@@ -137,18 +163,20 @@ export function useDrawo(): DrawoContextValue;
|
|
|
137
163
|
export function DrawoProvider(props: DrawoProps & { children: ReactNode }): JSX.Element;
|
|
138
164
|
|
|
139
165
|
export const Drawo: React.FC<DrawoProps> & {
|
|
140
|
-
TopBar: React.FC<
|
|
141
|
-
Canvas: React.FC
|
|
166
|
+
TopBar: React.FC<DrawoTopBarProps>;
|
|
167
|
+
Canvas: React.FC<DrawoCanvasProps>;
|
|
142
168
|
ToolBar: React.FC;
|
|
143
169
|
UndoBar: React.FC;
|
|
144
170
|
ZoomBar: React.FC;
|
|
171
|
+
EmptyState: React.FC<DrawoEmptyStateProps>;
|
|
145
172
|
};
|
|
146
173
|
|
|
147
|
-
export function DrawoTopBar(props:
|
|
148
|
-
export function DrawoCanvas(): JSX.Element;
|
|
174
|
+
export function DrawoTopBar(props: DrawoTopBarProps): JSX.Element;
|
|
175
|
+
export function DrawoCanvas(props: DrawoCanvasProps): JSX.Element;
|
|
149
176
|
export function DrawoToolBar(): JSX.Element;
|
|
150
177
|
export function DrawoUndoBar(): JSX.Element;
|
|
151
178
|
export function DrawoZoomBar(): JSX.Element;
|
|
179
|
+
export function DrawoEmptyState(props: DrawoEmptyStateProps): JSX.Element;
|
|
152
180
|
|
|
153
181
|
export function Timer(props: { isOpen: boolean; onOpenChange: (next: boolean) => void; messages: LocaleMessages }): JSX.Element;
|
|
154
182
|
export function MusicBar(props: { isOpen: boolean; onOpenChange: (next: boolean) => void; messages: LocaleMessages }): JSX.Element;
|