@apple-pie/slice 0.1.9 → 0.1.10
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/cjs/chunks/{IndexedDB-BxQn7aHU.js → IndexedDB-BaVmQgkK.js} +12 -10
- package/dist/cjs/chunks/{PromptInput-B-Wlfnhx.js → PromptInput-D317oh1e.js} +1 -1
- package/dist/cjs/chunks/{TextArea-D7E8loob.js → TextArea-2w4E6d2H.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-Bfrwzo4O.js → UploadArea-CxYAAs7Q.js} +1 -1
- package/dist/cjs/chunks/localDBStore-BHEk_9fJ.js +257 -0
- package/dist/cjs/components/PromptInput/index.js +1 -1
- package/dist/cjs/components/TextArea/index.js +1 -1
- package/dist/cjs/components/UploadArea/index.js +7 -8
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/stores/LocalDB.js +6 -5
- package/dist/cjs/stores.js +7 -7
- package/dist/cjs/utils/index.js +1 -1
- package/dist/cjs/utils/objects/index.js +1 -1
- package/dist/css/flexBox.module.css +85 -0
- package/dist/css/type.module.css +206 -0
- package/dist/esm/chunks/{IndexedDB-CNOziQ6p.mjs → IndexedDB-CJgzPHPB.mjs} +12 -10
- package/dist/esm/chunks/{TextArea-Ff5hxF1H.mjs → TextArea-DKRF4Irr.mjs} +1 -1
- package/dist/esm/chunks/localDBStore-C-Ch2MFq.mjs +265 -0
- package/dist/esm/components/PromptInput/index.mjs +1 -1
- package/dist/esm/components/TextArea/index.mjs +1 -1
- package/dist/esm/components/UploadArea/index.mjs +6 -6
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/stores/LocalDB.mjs +6 -2
- package/dist/esm/stores.mjs +6 -2
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/objects/index.mjs +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +3 -0
- package/dist/types/components/Avatar/_types.d.ts +22 -0
- package/dist/types/components/Avatar/index.d.ts +2 -0
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +3 -0
- package/dist/types/components/AvatarGroup/_types.d.ts +25 -0
- package/dist/types/components/AvatarGroup/index.d.ts +2 -0
- package/dist/types/components/Badge/Badge.d.ts +3 -0
- package/dist/types/components/Badge/_types.d.ts +8 -0
- package/dist/types/components/Badge/index.d.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +76 -0
- package/dist/types/components/Button/_types.d.ts +45 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/ButtonBar/ButtonBar.d.ts +17 -0
- package/dist/types/components/ButtonBar/_types.d.ts +27 -0
- package/dist/types/components/ButtonBar/index.d.ts +2 -0
- package/dist/types/components/Camera/Camera.d.ts +11 -0
- package/dist/types/components/Camera/_types.d.ts +79 -0
- package/dist/types/components/Camera/index.d.ts +2 -0
- package/dist/types/components/CheckBox/CheckBox.d.ts +3 -0
- package/dist/types/components/CheckBox/_types.d.ts +11 -0
- package/dist/types/components/CheckBox/index.d.ts +2 -0
- package/dist/types/components/Chip/Chip.d.ts +3 -0
- package/dist/types/components/Chip/_types.d.ts +31 -0
- package/dist/types/components/Chip/index.d.ts +3 -0
- package/dist/types/components/DivInput/DivInput.d.ts +3 -0
- package/dist/types/components/DivInput/_types.d.ts +23 -0
- package/dist/types/components/DivInput/index.d.ts +2 -0
- package/dist/types/components/Dot/Dot.d.ts +3 -0
- package/dist/types/components/Dot/_types.d.ts +19 -0
- package/dist/types/components/Dot/index.d.ts +2 -0
- package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +44 -0
- package/dist/types/components/DraggablePanel/_types.d.ts +5 -0
- package/dist/types/components/DraggablePanel/index.d.ts +1 -0
- package/dist/types/components/DropDown/DropDown.d.ts +4 -0
- package/dist/types/components/DropDown/_types.d.ts +34 -0
- package/dist/types/components/DropDown/index.d.ts +2 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +4 -0
- package/dist/types/components/ErrorSummary/_types.d.ts +12 -0
- package/dist/types/components/ErrorSummary/index.d.ts +2 -0
- package/dist/types/components/FileIcon/FileIcon.d.ts +3 -0
- package/dist/types/components/FileIcon/_types.d.ts +27 -0
- package/dist/types/components/FileIcon/fileIconRegistry.d.ts +4 -0
- package/dist/types/components/FileIcon/index.d.ts +3 -0
- package/dist/types/components/FileList/FileList.d.ts +3 -0
- package/dist/types/components/FileList/_types.d.ts +24 -0
- package/dist/types/components/FileList/index.d.ts +2 -0
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +60 -0
- package/dist/types/components/FlexDiv/_types.d.ts +34 -0
- package/dist/types/components/FlexDiv/index.d.ts +2 -0
- package/dist/types/components/Grouper/Grouper.d.ts +3 -0
- package/dist/types/components/Grouper/_types.d.ts +20 -0
- package/dist/types/components/Grouper/index.d.ts +2 -0
- package/dist/types/components/Icon/Icon.d.ts +3 -0
- package/dist/types/components/Icon/_types.d.ts +131 -0
- package/dist/types/components/Icon/iconRegistry.d.ts +17 -0
- package/dist/types/components/Icon/index.d.ts +2 -0
- package/dist/types/components/IconButton/IconButton.d.ts +3 -0
- package/dist/types/components/IconButton/_types.d.ts +34 -0
- package/dist/types/components/IconButton/index.d.ts +2 -0
- package/dist/types/components/Label/Label.d.ts +2 -0
- package/dist/types/components/Label/_types.d.ts +16 -0
- package/dist/types/components/Label/index.d.ts +2 -0
- package/dist/types/components/Overlay/Overlay.d.ts +3 -0
- package/dist/types/components/Overlay/_types.d.ts +12 -0
- package/dist/types/components/Overlay/index.d.ts +2 -0
- package/dist/types/components/Pager/Pager.d.ts +3 -0
- package/dist/types/components/Pager/_types.d.ts +13 -0
- package/dist/types/components/Pager/index.d.ts +2 -0
- package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +3 -0
- package/dist/types/components/Progress/DoneCheck/_types.d.ts +13 -0
- package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +3 -0
- package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +14 -0
- package/dist/types/components/Progress/index.d.ts +4 -0
- package/dist/types/components/PromptInput/PromptInput.d.ts +63 -0
- package/dist/types/components/PromptInput/_types.d.ts +35 -0
- package/dist/types/components/PromptInput/index.d.ts +2 -0
- package/dist/types/components/RadioButton/RadioButton.d.ts +3 -0
- package/dist/types/components/RadioButton/_types.d.ts +26 -0
- package/dist/types/components/RadioButton/index.d.ts +2 -0
- package/dist/types/components/RadioButtonList/RadioButtonList.d.ts +3 -0
- package/dist/types/components/RadioButtonList/_types.d.ts +24 -0
- package/dist/types/components/RadioButtonList/index.d.ts +2 -0
- package/dist/types/components/Slider/Slider.d.ts +3 -0
- package/dist/types/components/Slider/_types.d.ts +18 -0
- package/dist/types/components/Slider/index.d.ts +2 -0
- package/dist/types/components/Spacer/Spacer.d.ts +3 -0
- package/dist/types/components/Spacer/_types.d.ts +6 -0
- package/dist/types/components/Spacer/index.d.ts +2 -0
- package/dist/types/components/Switch/Switch.d.ts +3 -0
- package/dist/types/components/Switch/Switch.stories.d.ts +5 -0
- package/dist/types/components/Switch/_types.d.ts +13 -0
- package/dist/types/components/Switch/index.d.ts +2 -0
- package/dist/types/components/TabBar/TabBar.d.ts +3 -0
- package/dist/types/components/TabBar/_types.d.ts +52 -0
- package/dist/types/components/TabBar/index.d.ts +2 -0
- package/dist/types/components/TextArea/TextArea.d.ts +3 -0
- package/dist/types/components/TextArea/_types.d.ts +41 -0
- package/dist/types/components/TextArea/index.d.ts +2 -0
- package/dist/types/components/Textfield/TextField.d.ts +3 -0
- package/dist/types/components/Textfield/_types.d.ts +79 -0
- package/dist/types/components/Textfield/index.d.ts +2 -0
- package/dist/types/components/Tip/Tip.d.ts +3 -0
- package/dist/types/components/Tip/_types.d.ts +28 -0
- package/dist/types/components/Tip/index.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +3 -0
- package/dist/types/components/Toast/_types.d.ts +24 -0
- package/dist/types/components/Toast/index.d.ts +2 -0
- package/dist/types/components/UploadArea/UploadArea.d.ts +54 -0
- package/dist/types/components/UploadArea/_types.d.ts +46 -0
- package/dist/types/components/UploadArea/index.d.ts +3 -0
- package/dist/types/components/playHelpers.d.ts +35 -0
- package/dist/types/components/sharedTypes.d.ts +21 -0
- package/dist/types/hooks/index.d.ts +9 -0
- package/dist/types/hooks/useDoubleClick/useDoubleClick.d.ts +1 -0
- package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.d.ts +9 -0
- package/dist/types/hooks/useLastUpdated/useLastUpdated.d.ts +4 -0
- package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -0
- package/dist/types/hooks/useObserveResize/useObserveResize.d.ts +9 -0
- package/dist/types/hooks/useObserveTheme/useObserveTheme.d.ts +2 -0
- package/dist/types/hooks/useTheme/useTheme.d.ts +47 -0
- package/dist/types/hooks/useToolTip/useToolTip.d.ts +6 -0
- package/dist/types/hooks/useTrackRenders/useTrackRenders.d.ts +5 -0
- package/dist/types/hooks/useWindow/useWindow.d.ts +43 -0
- package/dist/types/index.d.ts +74 -0
- package/dist/types/providers/ThemeProvider.d.ts +13 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/stores/LocalDB/_types.d.ts +43 -0
- package/dist/types/stores/LocalDB/index.d.ts +2 -0
- package/dist/types/stores/LocalDB/localDBStore.d.ts +18 -0
- package/dist/types/stores/SSE/_types.d.ts +17 -0
- package/dist/types/stores/SSE/index.d.ts +2 -0
- package/dist/types/stores/SSE/sseStore.d.ts +28 -0
- package/dist/types/stores/WS/_types.d.ts +17 -0
- package/dist/types/stores/WS/index.d.ts +2 -0
- package/dist/types/stores/WS/wsStore.d.ts +19 -0
- package/dist/types/stores/index.d.ts +6 -0
- package/dist/types/stores/tip/_types.d.ts +8 -0
- package/dist/types/stores/tip/index.d.ts +2 -0
- package/dist/types/stores/tip/tipStore.d.ts +12 -0
- package/dist/types/stores/toast/_types.d.ts +14 -0
- package/dist/types/stores/toast/index.d.ts +2 -0
- package/dist/types/stores/toast/toastStore.d.ts +12 -0
- package/dist/types/stores/uploads/_types.d.ts +16 -0
- package/dist/types/stores/uploads/index.d.ts +2 -0
- package/dist/types/stores/uploads/uploadsStore.d.ts +22 -0
- package/dist/types/stores/window/_types.d.ts +33 -0
- package/dist/types/stores/window/index.d.ts +3 -0
- package/dist/types/stores/window/windowStore.d.ts +25 -0
- package/dist/types/theme/colors/colors.d.ts +6 -0
- package/dist/types/theme/colors/types.d.ts +174 -0
- package/dist/types/theme/corners/corners.d.ts +2 -0
- package/dist/types/theme/corners/types.d.ts +10 -0
- package/dist/types/theme/elevations/_types.d.ts +10 -0
- package/dist/types/theme/elevations/elevations.d.ts +5 -0
- package/dist/types/theme/index.d.ts +9 -0
- package/dist/types/theme/motion/_types.d.ts +8 -0
- package/dist/types/theme/motion/motion.d.ts +5 -0
- package/dist/types/theme/themes.d.ts +16 -0
- package/dist/types/theme/type/type.d.ts +5 -0
- package/dist/types/theme/type/types.d.ts +25 -0
- package/dist/types/utils/functions/colors.d.ts +8 -0
- package/dist/types/utils/functions/debounce.d.ts +9 -0
- package/dist/types/utils/functions/files.d.ts +15 -0
- package/dist/types/utils/functions/misc.d.ts +61 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/objects/IndexedDB/IndexedDB.d.ts +62 -0
- package/dist/types/utils/objects/SSEConnection/SSEConnection.d.ts +187 -0
- package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +159 -0
- package/dist/types/utils/objects/index.d.ts +6 -0
- package/dist/types/workers/uploads/uploads-worker.d.ts +129 -0
- package/dist/types/workers/uploads/uploads.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chunks/localDBStore-Cl1YFPIe.js +0 -182
- package/dist/esm/chunks/localDBStore-CbCoeN66.mjs +0 -186
- package/dist/esm/chunks/{PromptInput-Cmist_vy.mjs → PromptInput-C6liKbFf.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-6z-mVZs3.mjs → UploadArea-DNAH-Bu5.mjs} +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
export type AvatarInfo = {
|
|
4
|
+
first?: string;
|
|
5
|
+
last?: string;
|
|
6
|
+
image?: any;
|
|
7
|
+
avatar?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
bgColor?: string;
|
|
11
|
+
};
|
|
12
|
+
export type AvatarGroupBaseProps = {
|
|
13
|
+
avatars?: AvatarInfo[] | null;
|
|
14
|
+
size?: number;
|
|
15
|
+
overlap?: number;
|
|
16
|
+
borderSize?: number;
|
|
17
|
+
borderColor?: string;
|
|
18
|
+
borderColorHover?: string;
|
|
19
|
+
gap?: number;
|
|
20
|
+
margin?: number;
|
|
21
|
+
outerBorderSize?: number;
|
|
22
|
+
outerBorderColor?: string;
|
|
23
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
24
|
+
};
|
|
25
|
+
export type AvatarGroupProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof AvatarGroupBaseProps> & AvatarGroupBaseProps;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
import type { ButtonHandle } from './_types';
|
|
4
|
+
export declare const Button: React.NamedExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
size?: "large" | "medium" | "small";
|
|
7
|
+
variant?: "solid" | "outline" | "text";
|
|
8
|
+
state?: "normal" | "hover" | "disabled";
|
|
9
|
+
width?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
iconRight?: string;
|
|
12
|
+
iconLeft?: string;
|
|
13
|
+
fill?: boolean;
|
|
14
|
+
count?: number;
|
|
15
|
+
showDot?: boolean;
|
|
16
|
+
round?: boolean;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
borderRadius?: number;
|
|
20
|
+
iconColor?: string;
|
|
21
|
+
bgColor?: string;
|
|
22
|
+
bgColorDisabled?: string;
|
|
23
|
+
labelColor?: string;
|
|
24
|
+
labelSize?: "s" | "m" | "l";
|
|
25
|
+
transition?: import("framer-motion").Transition;
|
|
26
|
+
variants?: import("framer-motion").Variants;
|
|
27
|
+
initial?: string;
|
|
28
|
+
animate?: string;
|
|
29
|
+
exit?: string;
|
|
30
|
+
underline?: boolean;
|
|
31
|
+
progress?: boolean;
|
|
32
|
+
working?: boolean;
|
|
33
|
+
duration?: number;
|
|
34
|
+
trigger?: boolean;
|
|
35
|
+
destructive?: boolean;
|
|
36
|
+
paddingRight?: number;
|
|
37
|
+
paddingLeft?: number;
|
|
38
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
39
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void;
|
|
40
|
+
}> & {
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
size?: "large" | "medium" | "small";
|
|
43
|
+
variant?: "solid" | "outline" | "text";
|
|
44
|
+
state?: "normal" | "hover" | "disabled";
|
|
45
|
+
width?: string;
|
|
46
|
+
label?: string;
|
|
47
|
+
iconRight?: string;
|
|
48
|
+
iconLeft?: string;
|
|
49
|
+
fill?: boolean;
|
|
50
|
+
count?: number;
|
|
51
|
+
showDot?: boolean;
|
|
52
|
+
round?: boolean;
|
|
53
|
+
tooltip?: string;
|
|
54
|
+
iconSize?: number;
|
|
55
|
+
borderRadius?: number;
|
|
56
|
+
iconColor?: string;
|
|
57
|
+
bgColor?: string;
|
|
58
|
+
bgColorDisabled?: string;
|
|
59
|
+
labelColor?: string;
|
|
60
|
+
labelSize?: "s" | "m" | "l";
|
|
61
|
+
transition?: import("framer-motion").Transition;
|
|
62
|
+
variants?: import("framer-motion").Variants;
|
|
63
|
+
initial?: string;
|
|
64
|
+
animate?: string;
|
|
65
|
+
exit?: string;
|
|
66
|
+
underline?: boolean;
|
|
67
|
+
progress?: boolean;
|
|
68
|
+
working?: boolean;
|
|
69
|
+
duration?: number;
|
|
70
|
+
trigger?: boolean;
|
|
71
|
+
destructive?: boolean;
|
|
72
|
+
paddingRight?: number;
|
|
73
|
+
paddingLeft?: number;
|
|
74
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
75
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void;
|
|
76
|
+
} & React.RefAttributes<ButtonHandle>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Transition, Variants } from 'motion/react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ToolTip } from '../sharedTypes';
|
|
4
|
+
type ButtonBaseProps = {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
size?: 'large' | 'medium' | 'small';
|
|
7
|
+
variant?: 'solid' | 'outline' | 'text';
|
|
8
|
+
state?: 'normal' | 'hover' | 'disabled';
|
|
9
|
+
width?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
iconRight?: string;
|
|
12
|
+
iconLeft?: string;
|
|
13
|
+
fill?: boolean;
|
|
14
|
+
count?: number;
|
|
15
|
+
showDot?: boolean;
|
|
16
|
+
round?: boolean;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
borderRadius?: number;
|
|
20
|
+
iconColor?: string;
|
|
21
|
+
bgColor?: string;
|
|
22
|
+
bgColorDisabled?: string;
|
|
23
|
+
labelColor?: string;
|
|
24
|
+
labelSize?: 's' | 'm' | 'l';
|
|
25
|
+
transition?: Transition;
|
|
26
|
+
variants?: Variants;
|
|
27
|
+
initial?: string;
|
|
28
|
+
animate?: string;
|
|
29
|
+
exit?: string;
|
|
30
|
+
underline?: boolean;
|
|
31
|
+
progress?: boolean;
|
|
32
|
+
working?: boolean;
|
|
33
|
+
duration?: number;
|
|
34
|
+
trigger?: boolean;
|
|
35
|
+
destructive?: boolean;
|
|
36
|
+
paddingRight?: number;
|
|
37
|
+
paddingLeft?: number;
|
|
38
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
39
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void;
|
|
40
|
+
};
|
|
41
|
+
export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonBaseProps> & ButtonBaseProps;
|
|
42
|
+
export interface ButtonHandle {
|
|
43
|
+
triggerClick: () => void;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
import type { ButtonBarProps } from './_types';
|
|
4
|
+
export declare const ButtonBar: React.NamedExoticComponent<Readonly<ButtonBarProps>>;
|
|
5
|
+
interface ButtonProps {
|
|
6
|
+
classNames?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconSize: number;
|
|
9
|
+
iconColor?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
onMouseEnter?: () => void;
|
|
12
|
+
onMouseLeave?: () => void;
|
|
13
|
+
toolTip?: string;
|
|
14
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const BarButton: React.NamedExoticComponent<Readonly<ButtonProps>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
export type BarButton = {
|
|
4
|
+
icon?: string;
|
|
5
|
+
action?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
tip: string;
|
|
8
|
+
};
|
|
9
|
+
type ButtonBarBaseProps = {
|
|
10
|
+
buttons?: BarButton[];
|
|
11
|
+
buttonSize?: number;
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
toggle?: boolean;
|
|
14
|
+
selected?: number;
|
|
15
|
+
borderRadius?: number | string;
|
|
16
|
+
borderSize?: number;
|
|
17
|
+
borderColor?: string;
|
|
18
|
+
bgColor?: string;
|
|
19
|
+
bgColorHover?: string;
|
|
20
|
+
bgColorActive?: string;
|
|
21
|
+
labelColor?: string;
|
|
22
|
+
onClick?: (button: BarButton) => void;
|
|
23
|
+
onChange?: (option: BarButton) => void;
|
|
24
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
25
|
+
};
|
|
26
|
+
export type ButtonBarProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof ButtonBarBaseProps> & ButtonBarBaseProps;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CameraElement, DefaultNoVideoPosterProps, ToolbarButtonProps } from './_types';
|
|
3
|
+
export declare const Camera: React.NamedExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, keyof import("./_types").BaseCameraProps> & import("./_types").BaseCameraProps & React.RefAttributes<CameraElement>>;
|
|
4
|
+
/**
|
|
5
|
+
* Custom toolbar button with labels for controlling video / audio / etc.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ToolbarButton(props: Readonly<ToolbarButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* the default poster image when no video is available
|
|
10
|
+
*/
|
|
11
|
+
export declare function DefaultNoVideoPoster(props: Readonly<DefaultNoVideoPosterProps>): string | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface DefaultNoVideoPosterProps {
|
|
3
|
+
size?: number | string;
|
|
4
|
+
user?: UserProfile;
|
|
5
|
+
message?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ToolbarButtonProps {
|
|
8
|
+
icon: string;
|
|
9
|
+
iconActive?: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onMouseOver?: (e: React.MouseEvent<HTMLDivElement> | React.FocusEvent<HTMLDivElement>) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface CameraElement {
|
|
17
|
+
container?: HTMLDivElement;
|
|
18
|
+
video?: HTMLVideoElement;
|
|
19
|
+
stream?: MediaStream;
|
|
20
|
+
videoTrack?: MediaStreamTrack;
|
|
21
|
+
audioTrack?: MediaStreamTrack;
|
|
22
|
+
snapshot?: (options?: CameraSnapshotOptions) => Blob | undefined;
|
|
23
|
+
startCamera?: () => Promise<MediaStream | Error>;
|
|
24
|
+
stopCamera?: () => Promise<boolean | Error>;
|
|
25
|
+
enableVideo?: () => MediaStream | Error;
|
|
26
|
+
disableVideo?: () => boolean | Error;
|
|
27
|
+
muteMic?: () => boolean | Error;
|
|
28
|
+
unmuteMic?: () => boolean | Error;
|
|
29
|
+
toggleVideo?: () => Promise<MediaStream | boolean | Error>;
|
|
30
|
+
toggleMic?: () => boolean | Error;
|
|
31
|
+
devices?: () => Promise<MediaDeviceInfo[] | Error>;
|
|
32
|
+
}
|
|
33
|
+
export interface CameraSnapshotOptions {
|
|
34
|
+
width?: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
toggle?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface Controls {
|
|
39
|
+
mic?: boolean;
|
|
40
|
+
camera?: boolean;
|
|
41
|
+
play?: boolean;
|
|
42
|
+
stop?: boolean;
|
|
43
|
+
pause?: boolean;
|
|
44
|
+
videoDevices?: boolean;
|
|
45
|
+
audioDevices?: boolean;
|
|
46
|
+
flipCamera?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface UserProfile {
|
|
49
|
+
name?: string;
|
|
50
|
+
email?: string;
|
|
51
|
+
avatar?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface Settings {
|
|
54
|
+
micDeviceId?: string;
|
|
55
|
+
micVolume?: number;
|
|
56
|
+
videoDeviceId?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface BaseCameraProps {
|
|
59
|
+
width?: number | string;
|
|
60
|
+
height?: number | string;
|
|
61
|
+
noVideoPoster?: React.ReactNode;
|
|
62
|
+
videoFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
63
|
+
startCameraOff?: boolean;
|
|
64
|
+
startAudioMuted?: boolean;
|
|
65
|
+
playLocalAudio?: boolean;
|
|
66
|
+
userProfile?: UserProfile;
|
|
67
|
+
sessionSettings?: Settings;
|
|
68
|
+
onVideoStream?: (stream: MediaStream) => void;
|
|
69
|
+
onSnapshot?: (blob: Blob | undefined) => void;
|
|
70
|
+
onNoVideo?: (reason?: string | Error) => void;
|
|
71
|
+
onNoAudio?: (reason?: string | Error) => void;
|
|
72
|
+
onChangeProfile?: (profile?: UserProfile) => void;
|
|
73
|
+
onChangeSettings?: (settings?: Settings, devices?: MediaDeviceInfo[] | Error) => void;
|
|
74
|
+
showControlBar?: boolean;
|
|
75
|
+
autoHideControlBar?: boolean;
|
|
76
|
+
controls?: Controls;
|
|
77
|
+
pipSnapshot?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export type CameraProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof BaseCameraProps> & BaseCameraProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type CheckBoxBaseProps = {
|
|
3
|
+
children?: React.ReactNode | string;
|
|
4
|
+
size?: number;
|
|
5
|
+
checked?: 'mixed' | boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
color?: string;
|
|
8
|
+
onChange?: (state: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export type CheckBoxProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof CheckBoxBaseProps> & CheckBoxBaseProps;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
type ChipBaseProps = {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
labelSize?: 's' | 'm' | 'l';
|
|
7
|
+
labelColor?: string;
|
|
8
|
+
labelColorHover?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
iconSize?: number;
|
|
11
|
+
iconPosition?: 'left' | 'right';
|
|
12
|
+
iconColor?: string;
|
|
13
|
+
iconColorHover?: string;
|
|
14
|
+
bgColor?: string;
|
|
15
|
+
bgColorHover?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
focused?: boolean;
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
borderSize?: number;
|
|
20
|
+
borderColor?: string;
|
|
21
|
+
borderColorHover?: string;
|
|
22
|
+
borderColorDisabled?: string;
|
|
23
|
+
borderRadius?: number;
|
|
24
|
+
gap?: number;
|
|
25
|
+
paddingTops?: number;
|
|
26
|
+
paddingSides?: number;
|
|
27
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
28
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement> | undefined) => void;
|
|
29
|
+
};
|
|
30
|
+
export type ChipProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof ChipBaseProps> & ChipBaseProps;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type DivInputBaseProps = {
|
|
3
|
+
name?: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
onDblClick?: () => void;
|
|
6
|
+
onChange?: (value: string | null) => void;
|
|
7
|
+
onSubmit?: (value: string) => void;
|
|
8
|
+
onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
9
|
+
onBlur?: (value: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
isEditable?: boolean;
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
focus?: boolean;
|
|
15
|
+
width?: number | string;
|
|
16
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
17
|
+
clamp?: number;
|
|
18
|
+
padding?: string;
|
|
19
|
+
radius?: number;
|
|
20
|
+
bgColor?: string;
|
|
21
|
+
};
|
|
22
|
+
export type DivInputProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof DivInputBaseProps> & DivInputBaseProps;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Transition, Variants } from 'motion/react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
type DotBaseProps = {
|
|
4
|
+
size?: number;
|
|
5
|
+
topOffset?: number;
|
|
6
|
+
rightOffset?: number;
|
|
7
|
+
border?: number;
|
|
8
|
+
position?: 'inline' | 'corner';
|
|
9
|
+
state?: 'red' | 'yellow' | 'green' | 'blue' | 'grey';
|
|
10
|
+
color?: string;
|
|
11
|
+
transition?: Transition;
|
|
12
|
+
motionValues?: Variants;
|
|
13
|
+
motion?: Variants;
|
|
14
|
+
show?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type DotProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof DotBaseProps> & DotBaseProps;
|
|
17
|
+
export declare const DEFAULT_VARIANTS: Variants;
|
|
18
|
+
export declare const DEFAULT_TRANSITION: Transition;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
|
+
import type { Constraint } from './_types';
|
|
3
|
+
type Info = {
|
|
4
|
+
div: RefObject<HTMLDivElement | null>;
|
|
5
|
+
divWidth: number;
|
|
6
|
+
divHeight: number;
|
|
7
|
+
deltaWidth: number;
|
|
8
|
+
};
|
|
9
|
+
type ResizeHandle = {
|
|
10
|
+
width?: number;
|
|
11
|
+
color?: string;
|
|
12
|
+
offsetX?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type DraggablePanelBaseProps = {
|
|
15
|
+
children?: any;
|
|
16
|
+
onResize?: (info: Info) => void;
|
|
17
|
+
onResizeEnd?: (info: Info) => void;
|
|
18
|
+
onResizeStart?: (info: Info) => void;
|
|
19
|
+
containerRef?: React.RefObject<HTMLDivElement | null>;
|
|
20
|
+
sizeConstraints?: Constraint;
|
|
21
|
+
dragsRight?: boolean;
|
|
22
|
+
isClosed?: boolean;
|
|
23
|
+
resizeHandle?: Partial<ResizeHandle>;
|
|
24
|
+
borderRight?: any;
|
|
25
|
+
borderLeft?: any;
|
|
26
|
+
bgColor?: string;
|
|
27
|
+
drags?: boolean;
|
|
28
|
+
dragHandle?: boolean;
|
|
29
|
+
dragHandleStyle?: DragHandleProps;
|
|
30
|
+
disableOnContext?: boolean;
|
|
31
|
+
isTouchDevice?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type DraggablePanelProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof DraggablePanelBaseProps> & DraggablePanelBaseProps;
|
|
34
|
+
export declare const DraggablePanel: React.MemoExoticComponent<(props: DraggablePanelProps) => import("react/jsx-runtime").JSX.Element>;
|
|
35
|
+
export type DragHandleProps = {
|
|
36
|
+
width?: number;
|
|
37
|
+
height?: number;
|
|
38
|
+
radius?: number;
|
|
39
|
+
stroke?: number;
|
|
40
|
+
strokeColor?: string;
|
|
41
|
+
color?: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const DragHandle: React.MemoExoticComponent<(props: Readonly<DragHandleProps>) => import("react/jsx-runtime").JSX.Element>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DraggablePanel, type DraggablePanelProps } from './DrggablePanel';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type DropDownOption = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
};
|
|
7
|
+
type DropDownBaseProps = {
|
|
8
|
+
name?: string;
|
|
9
|
+
options?: DropDownOption[];
|
|
10
|
+
selectedIndex?: number;
|
|
11
|
+
selectedValue?: string;
|
|
12
|
+
placeholder?: boolean;
|
|
13
|
+
borderRadius?: number;
|
|
14
|
+
validate?: boolean;
|
|
15
|
+
iconColor?: string;
|
|
16
|
+
bgColor?: string;
|
|
17
|
+
width?: string;
|
|
18
|
+
height?: string;
|
|
19
|
+
paddingLeft?: number | string;
|
|
20
|
+
paddingRight?: number | string;
|
|
21
|
+
paddingTops?: number | string;
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
unframed?: boolean;
|
|
25
|
+
focused?: boolean;
|
|
26
|
+
gap?: number;
|
|
27
|
+
size?: 'small' | 'medium' | 'large';
|
|
28
|
+
onChange?: (index: number, option: DropDownOption) => void;
|
|
29
|
+
onBlur?: (value: string) => void;
|
|
30
|
+
onValidate?: (state: boolean) => void;
|
|
31
|
+
onFocus?: () => void;
|
|
32
|
+
};
|
|
33
|
+
export type DropDownProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof DropDownBaseProps> & DropDownBaseProps;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type ErrorMessage = {
|
|
3
|
+
id?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
bullets?: string[];
|
|
6
|
+
};
|
|
7
|
+
type ErrorSummaryBaseProps = {
|
|
8
|
+
entries?: ErrorMessage[];
|
|
9
|
+
errors?: any[];
|
|
10
|
+
};
|
|
11
|
+
export type ErrorSummaryProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof ErrorSummaryBaseProps> & ErrorSummaryBaseProps;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type FileIconBaseProps = {
|
|
3
|
+
name?: string;
|
|
4
|
+
size?: number;
|
|
5
|
+
pointer?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: (e: React.MouseEvent<SVGElement, MouseEvent> | React.KeyboardEvent<SVGSVGElement>) => void;
|
|
8
|
+
};
|
|
9
|
+
export type FileIconProps = Omit<React.SVGAttributes<SVGSVGElement>, keyof FileIconBaseProps> & FileIconBaseProps;
|
|
10
|
+
export declare enum FileIconNames {
|
|
11
|
+
pdf = "pdf",
|
|
12
|
+
text = "text",
|
|
13
|
+
sheet = "sheet",
|
|
14
|
+
preso = "preso",
|
|
15
|
+
md = "md",
|
|
16
|
+
code = "code",
|
|
17
|
+
image = "image",
|
|
18
|
+
audio = "audio",
|
|
19
|
+
video = "video",
|
|
20
|
+
other = "other"
|
|
21
|
+
}
|
|
22
|
+
type Scheme = {
|
|
23
|
+
dark: string;
|
|
24
|
+
light: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const iconColorSchemes: Record<string, Scheme>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
export type FileItem = {
|
|
4
|
+
file: File | string;
|
|
5
|
+
uploading?: boolean;
|
|
6
|
+
progress?: number;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
type FileListBaseProps = {
|
|
10
|
+
files?: FileItem[];
|
|
11
|
+
direction?: 'row' | 'column';
|
|
12
|
+
gap?: number;
|
|
13
|
+
size?: 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
14
|
+
maxWidth?: number | string;
|
|
15
|
+
minWidth?: number | string;
|
|
16
|
+
padding?: number | string;
|
|
17
|
+
iconSize?: number;
|
|
18
|
+
onChange?: (files: FileItem[]) => void;
|
|
19
|
+
bgColor?: string;
|
|
20
|
+
canRemove?: boolean;
|
|
21
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
22
|
+
};
|
|
23
|
+
export type FileListProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof FileListBaseProps> & FileListBaseProps;
|
|
24
|
+
export {};
|