@apple-pie/slice 0.1.26 → 0.1.28
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/{AudioBubble-Bqb2Jexf.js → AudioBubble-DisHuKIC.js} +1 -1
- package/dist/cjs/chunks/{Button-D3wZtdtj.js → Button-Dic9Rfkr.js} +10 -8
- package/dist/cjs/chunks/{ButtonBar-EH8fHFhS.js → ButtonBar-C7tJ6pDM.js} +1 -1
- package/dist/cjs/chunks/{Camera-BnsGhOrt.js → Camera-DfnOBHeI.js} +1 -1
- package/dist/cjs/chunks/{CheckBox-CEWLxffo.js → CheckBox-Cxzt7DJo.js} +1 -1
- package/dist/cjs/chunks/{Chip-BrQgOmJc.js → Chip-DKbhpeho.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-Duv0nmOm.js → DrggablePanel-DuOxkekq.js} +14 -11
- package/dist/cjs/chunks/{DropDown-Bf_pm-Go.js → DropDown-BcRH7Fle.js} +10 -8
- package/dist/cjs/chunks/{FileList-DobAcOSH.js → FileList-S0Hf82-C.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-C-3ahI-j.js → FlexDiv-BPnptnPL.js} +60 -20
- package/dist/cjs/chunks/{Grouper-D9G8PKoM.js → Grouper-CgkPu4sa.js} +1 -1
- package/dist/cjs/chunks/{Icon-fRM3E0N6.js → Icon-UFrKtcYJ.js} +184 -11
- package/dist/cjs/chunks/{IconButton-Cf2RBUKA.js → IconButton-CaQ0SioJ.js} +14 -11
- package/dist/cjs/chunks/{ProgressIndicator-t-jv4OhI.js → ProgressIndicator-n9CfW6jd.js} +1 -1
- package/dist/cjs/chunks/{PromptInput-B1WG22xz.js → PromptInput-CI0iSYKL.js} +1 -1
- package/dist/cjs/chunks/{RadioButton-BAIMCshV.js → RadioButton-JBNaNihZ.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-Bsg5oFaC.js → RadioButtonList-CW2pDNIq.js} +1 -1
- package/dist/cjs/chunks/{TabBar-BfyfjmPQ.js → TabBar-Bpngr90Q.js} +1 -1
- package/dist/cjs/chunks/{TextArea-CHNWsfWH.js → TextArea-BZgwajEC.js} +1 -1
- package/dist/cjs/chunks/{TextField-2xzSdIx3.js → TextField-x1MWESCA.js} +5 -5
- package/dist/cjs/chunks/{Tip-DceuNR6k.js → Tip-BZQhRyng.js} +1 -1
- package/dist/cjs/chunks/{Toast-C8Hc9ZKI.js → Toast-cda-RInJ.js} +1 -1
- package/dist/cjs/chunks/ToggleButton-CuX1nQk4.js +40 -0
- package/dist/cjs/chunks/{UploadArea-UFWRQ-nW.js → UploadArea-CiiKnWe7.js} +1 -1
- package/dist/cjs/chunks/{_types-VoADvwjb.js → _types-Cqkxw-yc.js} +10 -2
- package/dist/cjs/chunks/microphoneStore-CgFohRfy.js +124 -0
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- package/dist/cjs/components/Button/index.js +7 -6
- package/dist/cjs/components/ButtonBar/index.js +7 -7
- package/dist/cjs/components/Camera/index.js +8 -8
- package/dist/cjs/components/CheckBox/index.js +7 -7
- package/dist/cjs/components/Chip/index.js +8 -7
- package/dist/cjs/components/DraggablePanel/index.js +6 -6
- package/dist/cjs/components/DropDown/index.js +7 -7
- package/dist/cjs/components/ErrorSummary/index.js +2 -2
- package/dist/cjs/components/FileIcon/index.js +6 -5
- package/dist/cjs/components/FileList/index.js +6 -6
- package/dist/cjs/components/FlexDiv/index.js +1 -1
- package/dist/cjs/components/Grouper/index.js +4 -4
- package/dist/cjs/components/Icon/index.js +7 -6
- package/dist/cjs/components/IconButton/index.js +7 -6
- package/dist/cjs/components/Progress/index.js +4 -4
- package/dist/cjs/components/PromptInput/index.js +7 -7
- package/dist/cjs/components/RadioButton/index.js +7 -7
- package/dist/cjs/components/RadioButtonList/index.js +4 -4
- package/dist/cjs/components/TabBar/index.js +9 -9
- package/dist/cjs/components/TextArea/index.js +7 -7
- package/dist/cjs/components/Textfield/index.js +6 -6
- package/dist/cjs/components/Tip/index.js +1 -1
- package/dist/cjs/components/Toast/index.js +4 -4
- package/dist/cjs/components/ToggleButton/index.js +13 -0
- package/dist/cjs/components/UploadArea/index.js +9 -9
- package/dist/cjs/hooks/useMicrophone.js +19 -13
- package/dist/cjs/hooks/useTheme.js +25 -16
- package/dist/cjs/hooks/useToolTip.js +9 -6
- package/dist/cjs/hooks.js +4 -4
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/providers/ThemeProvider.js +36 -19
- package/dist/cjs/stores/microphone.js +12 -0
- package/dist/cjs/stores.js +9 -2
- package/dist/cjs/theme/colors.js +2 -2
- package/dist/esm/chunks/{AudioBubble-DZfzkdlq.mjs → AudioBubble-D052QyPH.mjs} +1 -1
- package/dist/esm/chunks/{Button-YER9dCLE.mjs → Button-BIbAGVV8.mjs} +11 -9
- package/dist/esm/chunks/{ButtonBar-BH4pcEpN.mjs → ButtonBar-B-1YFX9u.mjs} +1 -1
- package/dist/esm/chunks/{Camera-BJJpDuuA.mjs → Camera-BQBo2g52.mjs} +1 -1
- package/dist/esm/chunks/{CheckBox-Cf2l3-D9.mjs → CheckBox-DDwE1wkX.mjs} +1 -1
- package/dist/esm/chunks/{Chip-DWp7p2BF.mjs → Chip-BuHc883v.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-DA7pYWg6.mjs → DrggablePanel-Dc6lqqfO.mjs} +14 -11
- package/dist/esm/chunks/{DropDown-BQ2tNN3_.mjs → DropDown-CdkEVTRk.mjs} +10 -8
- package/dist/esm/chunks/{FileList-BQ9X5YnB.mjs → FileList-DN4Ubroe.mjs} +2 -2
- package/dist/esm/chunks/{FlexDiv-BFrVoFhC.mjs → FlexDiv-BWZ7f8mA.mjs} +61 -21
- package/dist/esm/chunks/{Grouper-CvPYEsF_.mjs → Grouper-C4A3qYot.mjs} +1 -1
- package/dist/esm/chunks/{Icon-DI32kOA1.mjs → Icon-DRzjkybv.mjs} +185 -12
- package/dist/esm/chunks/{IconButton-Dciw5CLn.mjs → IconButton-b1v9Me0P.mjs} +14 -11
- package/dist/esm/chunks/{ProgressIndicator-CB_oazMD.mjs → ProgressIndicator-D5e7406q.mjs} +1 -1
- package/dist/esm/chunks/{PromptInput-plgRiAb7.mjs → PromptInput-Dmx4sQZ3.mjs} +3 -3
- package/dist/esm/chunks/{RadioButton-B6ImCUYY.mjs → RadioButton-D2T-SsVw.mjs} +1 -1
- package/dist/esm/chunks/{RadioButtonList-Cf6gk8yp.mjs → RadioButtonList-BSPuAYoh.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-0zpJ9GtN.mjs → TabBar-DBoZ8aoV.mjs} +2 -2
- package/dist/esm/chunks/{TextArea-B64bIPHm.mjs → TextArea-CSUDfcYd.mjs} +1 -1
- package/dist/esm/chunks/{TextField-BZeoN_ye.mjs → TextField-Z1O858hB.mjs} +7 -7
- package/dist/esm/chunks/{Tip-C5LB54J9.mjs → Tip-B8YrmJEt.mjs} +1 -1
- package/dist/esm/chunks/{Toast-Bl4s4tRo.mjs → Toast-QQ6GMr5F.mjs} +1 -1
- package/dist/esm/chunks/ToggleButton-B5oobnXJ.mjs +51 -0
- package/dist/esm/chunks/{UploadArea-D3g2g1LK.mjs → UploadArea-CJAQmqOS.mjs} +4 -4
- package/dist/esm/chunks/{_types-DeEhv4Y5.mjs → _types-fSW-DudT.mjs} +10 -2
- package/dist/esm/chunks/microphoneStore-t16oxjGB.mjs +121 -0
- package/dist/esm/components/AudioBubble/index.mjs +5 -5
- package/dist/esm/components/Button/index.mjs +5 -5
- package/dist/esm/components/ButtonBar/index.mjs +6 -6
- package/dist/esm/components/Camera/index.mjs +6 -6
- package/dist/esm/components/CheckBox/index.mjs +6 -6
- package/dist/esm/components/Chip/index.mjs +6 -6
- package/dist/esm/components/DraggablePanel/index.mjs +5 -5
- package/dist/esm/components/DropDown/index.mjs +6 -6
- package/dist/esm/components/ErrorSummary/index.mjs +4 -4
- package/dist/esm/components/FileIcon/index.mjs +4 -4
- package/dist/esm/components/FileList/index.mjs +7 -7
- package/dist/esm/components/FlexDiv/index.mjs +1 -1
- package/dist/esm/components/Grouper/index.mjs +6 -6
- package/dist/esm/components/Icon/index.mjs +6 -6
- package/dist/esm/components/IconButton/index.mjs +4 -4
- package/dist/esm/components/Progress/index.mjs +6 -6
- package/dist/esm/components/PromptInput/index.mjs +9 -9
- package/dist/esm/components/RadioButton/index.mjs +6 -6
- package/dist/esm/components/RadioButtonList/index.mjs +7 -7
- package/dist/esm/components/TabBar/index.mjs +7 -7
- package/dist/esm/components/TextArea/index.mjs +6 -6
- package/dist/esm/components/Textfield/index.mjs +9 -9
- package/dist/esm/components/Tip/index.mjs +1 -1
- package/dist/esm/components/Toast/index.mjs +6 -6
- package/dist/esm/components/ToggleButton/index.mjs +45 -0
- package/dist/esm/components/UploadArea/index.mjs +11 -11
- package/dist/esm/hooks/useMicrophone.mjs +19 -13
- package/dist/esm/hooks/useTheme.mjs +26 -15
- package/dist/esm/hooks/useToolTip.mjs +9 -6
- package/dist/esm/hooks.mjs +6 -6
- package/dist/esm/index.mjs +26 -24
- package/dist/esm/providers/ThemeProvider.mjs +37 -20
- package/dist/esm/stores/microphone.mjs +7 -0
- package/dist/esm/stores.mjs +2 -0
- package/dist/esm/theme/colors.mjs +2 -2
- package/dist/types/components/Button/Button.d.ts +2 -0
- package/dist/types/components/Button/_types.d.ts +1 -0
- package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +1 -2
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -0
- package/dist/types/components/FlexDiv/_types.d.ts +35 -7
- package/dist/types/components/Icon/_types.d.ts +9 -0
- package/dist/types/components/IconButton/_types.d.ts +1 -0
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -0
- package/dist/types/components/ToggleButton/_types.d.ts +24 -0
- package/dist/types/components/ToggleButton/index.d.ts +2 -0
- package/dist/types/hooks/useMicrophone/useMicrophone.d.ts +2 -1
- package/dist/types/hooks/useTheme/useTheme.d.ts +5 -1
- package/dist/types/hooks/useWindow/useWindow.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/providers/ThemeProvider.d.ts +2 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/microphone/_types.d.ts +28 -0
- package/dist/types/stores/microphone/index.d.ts +2 -0
- package/dist/types/stores/microphone/microphoneStore.d.ts +24 -0
- package/dist/types/stores/window/windowStore.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { g as getMicrophoneState, m as microphoneActions, u as useMicActive, a as useMicError, b as useMicMuted, c as useMicOptions, d as useMicRequesting, e as useMicStream, f as useMicSupported, h as useMicTrack, i as useMicrophoneStore, j as useMicrophoneStoreActions, k as useMicrophones, l as useSyncMicrophoneStore } from "../chunks/microphoneStore-t16oxjGB.mjs";
|
|
2
|
+
|
|
3
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
4
|
+
|
|
5
|
+
import "react";
|
|
6
|
+
|
|
7
|
+
import "zustand";
|
package/dist/esm/stores.mjs
CHANGED
|
@@ -2,6 +2,8 @@ export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as
|
|
|
2
2
|
|
|
3
3
|
export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "./chunks/uploadsStore-B7VECR5Q.mjs";
|
|
4
4
|
|
|
5
|
+
export { g as getMicrophoneState, m as microphoneActions, u as useMicActive, a as useMicError, b as useMicMuted, c as useMicOptions, d as useMicRequesting, e as useMicStream, f as useMicSupported, h as useMicTrack, i as useMicrophoneStore, j as useMicrophoneStoreActions, k as useMicrophones, l as useSyncMicrophoneStore } from "./chunks/microphoneStore-t16oxjGB.mjs";
|
|
6
|
+
|
|
5
7
|
export { g as getTip, t as tipActions, u as useTip, a as useTipActions, b as useTipStore } from "./chunks/tipStore-CL5a95Bl.mjs";
|
|
6
8
|
|
|
7
9
|
export { g as getToast, t as toastActions, u as useToast, a as useToastActions, b as useToastStore } from "./chunks/toastStore-D2PEIqCo.mjs";
|
|
@@ -133,7 +133,7 @@ const coreColors = {
|
|
|
133
133
|
"core-icon-primary": coreColors["brand-grey-950"],
|
|
134
134
|
"core-icon-secondary": coreColors["brand-grey-700"],
|
|
135
135
|
"core-icon-tertiary": coreColors["brand-sea-500"],
|
|
136
|
-
"core-outline-secondary": coreColors["brand-grey-
|
|
136
|
+
"core-outline-secondary": coreColors["brand-grey-100"],
|
|
137
137
|
"core-outline-primary": coreColors["brand-grey-100"],
|
|
138
138
|
"core-outline-special": coreColors["brand-sea-100"],
|
|
139
139
|
"core-outline-tertiary": coreColors["brand-sea-500"],
|
|
@@ -199,7 +199,7 @@ const coreColors = {
|
|
|
199
199
|
"core-icon-primary": coreColors["brand-white-0"],
|
|
200
200
|
"core-icon-secondary": coreColors["brand-grey-200"],
|
|
201
201
|
"core-icon-tertiary": coreColors["brand-sky-300"],
|
|
202
|
-
"core-outline-secondary": coreColors["brand-grey-
|
|
202
|
+
"core-outline-secondary": coreColors["brand-grey-900"],
|
|
203
203
|
"core-outline-primary": coreColors["brand-grey-700"],
|
|
204
204
|
"core-outline-special": coreColors["brand-sky-900"],
|
|
205
205
|
"core-outline-tertiary": coreColors["brand-sky-300"],
|
|
@@ -10,6 +10,7 @@ export declare const Button: React.NamedExoticComponent<Omit<React.ButtonHTMLAtt
|
|
|
10
10
|
label?: string;
|
|
11
11
|
iconRight?: string;
|
|
12
12
|
iconLeft?: string;
|
|
13
|
+
iconFill?: boolean;
|
|
13
14
|
fill?: boolean;
|
|
14
15
|
count?: number;
|
|
15
16
|
showDot?: boolean;
|
|
@@ -48,6 +49,7 @@ export declare const Button: React.NamedExoticComponent<Omit<React.ButtonHTMLAtt
|
|
|
48
49
|
label?: string;
|
|
49
50
|
iconRight?: string;
|
|
50
51
|
iconLeft?: string;
|
|
52
|
+
iconFill?: boolean;
|
|
51
53
|
fill?: boolean;
|
|
52
54
|
count?: number;
|
|
53
55
|
showDot?: boolean;
|
|
@@ -18,13 +18,12 @@ type DraggablePanelBaseProps = {
|
|
|
18
18
|
onResizeStart?: (info: Info) => void;
|
|
19
19
|
containerRef?: React.RefObject<HTMLDivElement | null>;
|
|
20
20
|
sizeConstraints?: Constraint;
|
|
21
|
-
dragsRight?: boolean;
|
|
22
21
|
isClosed?: boolean;
|
|
23
22
|
resizeHandle?: Partial<ResizeHandle>;
|
|
24
23
|
borderRight?: any;
|
|
25
24
|
borderLeft?: any;
|
|
26
25
|
bgColor?: string;
|
|
27
|
-
drags?:
|
|
26
|
+
drags?: 'left' | 'right' | false;
|
|
28
27
|
dragHandle?: boolean;
|
|
29
28
|
dragHandleStyle?: DragHandleProps;
|
|
30
29
|
disableOnContext?: boolean;
|
|
@@ -3,6 +3,7 @@ export declare const FlexDiv: React.NamedExoticComponent<Omit<React.HTMLAttribut
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: any;
|
|
5
5
|
preset?: import("./_types").Preset;
|
|
6
|
+
scrollBox?: boolean;
|
|
6
7
|
scrollY?: boolean;
|
|
7
8
|
scrollX?: boolean;
|
|
8
9
|
absolute?: boolean;
|
|
@@ -33,6 +34,7 @@ export declare const FlexDiv: React.NamedExoticComponent<Omit<React.HTMLAttribut
|
|
|
33
34
|
className?: string;
|
|
34
35
|
children?: any;
|
|
35
36
|
preset?: import("./_types").Preset;
|
|
37
|
+
scrollBox?: boolean;
|
|
36
38
|
scrollY?: boolean;
|
|
37
39
|
scrollX?: boolean;
|
|
38
40
|
absolute?: boolean;
|
|
@@ -10,10 +10,11 @@ export declare enum Size {
|
|
|
10
10
|
export declare enum Preset {
|
|
11
11
|
FillScroll = "fill-scroll",
|
|
12
12
|
FillCenter = "fill-center",
|
|
13
|
+
FillStart = "fill-start",
|
|
13
14
|
Window = "window",
|
|
14
15
|
Row = "row",
|
|
15
16
|
RowBetween = "row-between",
|
|
16
|
-
Column = "
|
|
17
|
+
Column = "column",
|
|
17
18
|
Default = "default",
|
|
18
19
|
Draggable = "draggable"
|
|
19
20
|
}
|
|
@@ -24,6 +25,8 @@ export declare const layoutSets: {
|
|
|
24
25
|
justify: string;
|
|
25
26
|
align: string;
|
|
26
27
|
scrollY: boolean;
|
|
28
|
+
scrollX: boolean;
|
|
29
|
+
overflow: string;
|
|
27
30
|
direction: string;
|
|
28
31
|
};
|
|
29
32
|
"fill-center": {
|
|
@@ -32,6 +35,18 @@ export declare const layoutSets: {
|
|
|
32
35
|
justify: string;
|
|
33
36
|
align: string;
|
|
34
37
|
scrollY: boolean;
|
|
38
|
+
scrollX: boolean;
|
|
39
|
+
overflow: string;
|
|
40
|
+
direction: string;
|
|
41
|
+
};
|
|
42
|
+
"fill-start": {
|
|
43
|
+
width: string;
|
|
44
|
+
height: string;
|
|
45
|
+
justify: string;
|
|
46
|
+
align: string;
|
|
47
|
+
scrollY: boolean;
|
|
48
|
+
scrollX: boolean;
|
|
49
|
+
overflow: string;
|
|
35
50
|
direction: string;
|
|
36
51
|
};
|
|
37
52
|
window: {
|
|
@@ -40,6 +55,8 @@ export declare const layoutSets: {
|
|
|
40
55
|
justify: string;
|
|
41
56
|
align: string;
|
|
42
57
|
scrollY: boolean;
|
|
58
|
+
scrollX: boolean;
|
|
59
|
+
overflow: string;
|
|
43
60
|
direction: string;
|
|
44
61
|
};
|
|
45
62
|
row: {
|
|
@@ -47,7 +64,9 @@ export declare const layoutSets: {
|
|
|
47
64
|
height: string;
|
|
48
65
|
justify: string;
|
|
49
66
|
align: string;
|
|
50
|
-
scrollY:
|
|
67
|
+
scrollY: undefined;
|
|
68
|
+
scrollX: undefined;
|
|
69
|
+
overflow: string;
|
|
51
70
|
direction: string;
|
|
52
71
|
};
|
|
53
72
|
"row-between": {
|
|
@@ -55,15 +74,19 @@ export declare const layoutSets: {
|
|
|
55
74
|
height: string;
|
|
56
75
|
justify: string;
|
|
57
76
|
align: string;
|
|
58
|
-
scrollY:
|
|
77
|
+
scrollY: undefined;
|
|
78
|
+
scrollX: undefined;
|
|
79
|
+
overflow: string;
|
|
59
80
|
direction: string;
|
|
60
81
|
};
|
|
61
|
-
|
|
82
|
+
column: {
|
|
62
83
|
width: string;
|
|
63
84
|
height: string;
|
|
64
85
|
justify: string;
|
|
65
86
|
align: string;
|
|
66
|
-
scrollY:
|
|
87
|
+
scrollY: undefined;
|
|
88
|
+
scrollX: undefined;
|
|
89
|
+
overflow: string;
|
|
67
90
|
direction: string;
|
|
68
91
|
};
|
|
69
92
|
default: {
|
|
@@ -71,7 +94,9 @@ export declare const layoutSets: {
|
|
|
71
94
|
height: string;
|
|
72
95
|
justify: string;
|
|
73
96
|
align: string;
|
|
74
|
-
scrollY:
|
|
97
|
+
scrollY: undefined;
|
|
98
|
+
scrollX: undefined;
|
|
99
|
+
overflow: string;
|
|
75
100
|
direction: string;
|
|
76
101
|
};
|
|
77
102
|
draggable: {
|
|
@@ -79,7 +104,9 @@ export declare const layoutSets: {
|
|
|
79
104
|
height: string;
|
|
80
105
|
justify: string;
|
|
81
106
|
align: string;
|
|
82
|
-
scrollY:
|
|
107
|
+
scrollY: undefined;
|
|
108
|
+
scrollX: undefined;
|
|
109
|
+
overflow: string;
|
|
83
110
|
direction: string;
|
|
84
111
|
};
|
|
85
112
|
};
|
|
@@ -87,6 +114,7 @@ type FlexDivBaseProps = {
|
|
|
87
114
|
className?: string;
|
|
88
115
|
children?: any;
|
|
89
116
|
preset?: Preset;
|
|
117
|
+
scrollBox?: boolean;
|
|
90
118
|
scrollY?: boolean;
|
|
91
119
|
scrollX?: boolean;
|
|
92
120
|
absolute?: boolean;
|
|
@@ -9,6 +9,7 @@ type IconBaseProps = {
|
|
|
9
9
|
toggle?: boolean;
|
|
10
10
|
pointer?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
fill?: boolean;
|
|
12
13
|
onClick?: (e: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
13
14
|
};
|
|
14
15
|
export type IconProps = Omit<React.SVGAttributes<SVGSVGElement>, keyof IconBaseProps> & IconBaseProps;
|
|
@@ -52,6 +53,8 @@ export declare const SliceIcons: {
|
|
|
52
53
|
readonly videoOff: "video off";
|
|
53
54
|
readonly download: "download";
|
|
54
55
|
readonly upload: "upload";
|
|
56
|
+
readonly speaker: "speaker";
|
|
57
|
+
readonly speakerMuted: "speaker muted";
|
|
55
58
|
};
|
|
56
59
|
readonly files: {
|
|
57
60
|
readonly document: "document";
|
|
@@ -68,6 +71,7 @@ export declare const SliceIcons: {
|
|
|
68
71
|
readonly invoice: "invoice";
|
|
69
72
|
readonly payment: "payment";
|
|
70
73
|
readonly wallet: "wallet";
|
|
74
|
+
readonly laptop: "laptop";
|
|
71
75
|
};
|
|
72
76
|
readonly charts: {
|
|
73
77
|
readonly barChart: "bar chart";
|
|
@@ -107,6 +111,10 @@ export declare const SliceIcons: {
|
|
|
107
111
|
readonly fontSmaller: "font smaller";
|
|
108
112
|
readonly characterBeam: "character beam";
|
|
109
113
|
};
|
|
114
|
+
readonly weather: {
|
|
115
|
+
readonly sun: "sun";
|
|
116
|
+
readonly moonFull: "moon full";
|
|
117
|
+
};
|
|
110
118
|
readonly ai: {
|
|
111
119
|
readonly sparkle: "sparkle";
|
|
112
120
|
readonly wand: "wand";
|
|
@@ -126,6 +134,7 @@ export declare const SliceIcons: {
|
|
|
126
134
|
readonly menu: "menu";
|
|
127
135
|
readonly more: "more";
|
|
128
136
|
readonly sidebar: "sidebar";
|
|
137
|
+
readonly keyboard: "keyboard";
|
|
129
138
|
readonly x: "x";
|
|
130
139
|
};
|
|
131
140
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ToolTip } from '../sharedTypes';
|
|
3
|
+
export interface ToggleButtonProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
textSize?: 's' | 'm' | 'l';
|
|
7
|
+
buttonSize?: 's' | 'm' | 'l' | 'xl';
|
|
8
|
+
frameSize?: number;
|
|
9
|
+
icon?: string;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
iconColorOn?: string;
|
|
13
|
+
bgColor?: string;
|
|
14
|
+
bgColorOn?: string;
|
|
15
|
+
onChange?: (state: boolean) => void;
|
|
16
|
+
onSelect?: () => void;
|
|
17
|
+
onToolTip?: (tip: ToolTip | null) => void;
|
|
18
|
+
gap?: number;
|
|
19
|
+
iconSize?: number;
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
fill?: boolean;
|
|
22
|
+
unselect?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
@@ -6,6 +6,7 @@ export type MicOption = {
|
|
|
6
6
|
export type UseMicrophoneReturn = {
|
|
7
7
|
micStream: RefObject<MediaStream | null>;
|
|
8
8
|
micTrack: RefObject<MediaStreamTrack | null>;
|
|
9
|
+
isActive: boolean;
|
|
9
10
|
muted: boolean;
|
|
10
11
|
isSupported: boolean;
|
|
11
12
|
isRequesting: boolean;
|
|
@@ -20,4 +21,4 @@ export type UseMicrophoneReturn = {
|
|
|
20
21
|
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
21
22
|
setMicrophone: (deviceId: string | DropDownOption<MicOption>) => Promise<void>;
|
|
22
23
|
};
|
|
23
|
-
export declare function useMicrophone(startMuted?: boolean, microphoneDeviceId?: string): UseMicrophoneReturn;
|
|
24
|
+
export declare function useMicrophone(startMuted?: boolean, microphoneDeviceId?: string, autoRequest?: boolean): UseMicrophoneReturn;
|
|
@@ -37,11 +37,15 @@ export declare function useTheme(): {
|
|
|
37
37
|
*/
|
|
38
38
|
set: (newTheme: SliceTheme | string) => void;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Togglebetween light and dark themes
|
|
41
41
|
*/
|
|
42
42
|
toggle: () => void;
|
|
43
43
|
/**
|
|
44
44
|
* If the currently active theme is the Slice's default dark theme'
|
|
45
45
|
*/
|
|
46
46
|
isDark: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* True when the current theme is still being derived from the OS preference
|
|
49
|
+
*/
|
|
50
|
+
systemTheme: boolean;
|
|
47
51
|
};
|
|
@@ -34,7 +34,7 @@ export declare function useWindow(breakpoints?: BreakPoints, top?: boolean): {
|
|
|
34
34
|
isElectron: boolean;
|
|
35
35
|
isAppleDevice: boolean;
|
|
36
36
|
formFactor: FormFactor;
|
|
37
|
-
dpr:
|
|
37
|
+
dpr: 2 | 1 | 3;
|
|
38
38
|
geolocationSupported: boolean;
|
|
39
39
|
location: WindowGeolocation | null;
|
|
40
40
|
locationError: Error | null;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export type { SliderProps } from './components/Slider';
|
|
|
48
48
|
export { Spacer } from './components/Spacer';
|
|
49
49
|
export { Switch } from './components/Switch';
|
|
50
50
|
export type { SwitchProps } from './components/Switch';
|
|
51
|
+
export { ToggleButton } from './components/ToggleButton';
|
|
52
|
+
export type { ToggleButtonProps } from './components/ToggleButton';
|
|
51
53
|
export { TabBar } from './components/TabBar';
|
|
52
54
|
export type { TabOption, TabBarProps } from './components/TabBar';
|
|
53
55
|
export { TextArea } from './components/TextArea';
|
|
@@ -14,6 +14,8 @@ interface ThemeProviderProps {
|
|
|
14
14
|
}
|
|
15
15
|
type ThemeContextValue = {
|
|
16
16
|
initialTheme: string;
|
|
17
|
+
systemTheme: boolean;
|
|
18
|
+
setSystemTheme: (value: boolean) => void;
|
|
17
19
|
};
|
|
18
20
|
export declare function useThemeContext(): ThemeContextValue;
|
|
19
21
|
export declare function ThemeProvider(props: Readonly<ThemeProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { DropDownOption } from '../../components/DropDown';
|
|
3
|
+
import type { MicOption, UseMicrophoneReturn } from '../../hooks';
|
|
4
|
+
export type MicrophoneStoreState = {
|
|
5
|
+
micStream: RefObject<MediaStream | null>;
|
|
6
|
+
micTrack: RefObject<MediaStreamTrack | null>;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
muted: boolean;
|
|
9
|
+
isSupported: boolean;
|
|
10
|
+
isRequesting: boolean;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
microphones: MediaDeviceInfo[];
|
|
13
|
+
micOptions: DropDownOption<MicOption>[];
|
|
14
|
+
};
|
|
15
|
+
export type MicrophoneStoreActions = {
|
|
16
|
+
sync: (microphone: UseMicrophoneReturn | null) => void;
|
|
17
|
+
clear: () => void;
|
|
18
|
+
requestMicrophone: () => Promise<MediaStream | null>;
|
|
19
|
+
stopMicrophone: () => void;
|
|
20
|
+
muteMic: () => boolean;
|
|
21
|
+
unmuteMic: () => boolean;
|
|
22
|
+
toggleMute: () => void;
|
|
23
|
+
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
24
|
+
setMicrophone: (deviceId: string | DropDownOption<MicOption>) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
export type MicrophoneStore = MicrophoneStoreState & {
|
|
27
|
+
actions: MicrophoneStoreActions;
|
|
28
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useMicrophoneStore, useSyncMicrophoneStore, useMicStream, useMicTrack, useMicActive, useMicMuted, useMicSupported, useMicRequesting, useMicError, useMicrophones, useMicOptions, useMicrophoneStoreActions, microphoneActions, getMicrophoneState, } from './microphoneStore';
|
|
2
|
+
export type { MicrophoneStore, MicrophoneStoreActions, MicrophoneStoreState, } from './_types';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { DropDownOption } from '../../components/DropDown';
|
|
3
|
+
import type { MicOption, UseMicrophoneReturn } from '../../hooks';
|
|
4
|
+
import type { MicrophoneStore, MicrophoneStoreActions } from './_types';
|
|
5
|
+
/**
|
|
6
|
+
* Store factory that creates the store state based on a sync or a clear
|
|
7
|
+
*/
|
|
8
|
+
export declare const useMicrophoneStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MicrophoneStore>>;
|
|
9
|
+
/**
|
|
10
|
+
* Bind the value of useMicrophone hook to the useMicrophoneStore. Use this to update the store with a new mic object.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSyncMicrophoneStore(microphone: UseMicrophoneReturn | null): void;
|
|
13
|
+
export declare const useMicStream: () => RefObject<MediaStream | null>;
|
|
14
|
+
export declare const useMicTrack: () => RefObject<MediaStreamTrack | null>;
|
|
15
|
+
export declare const useMicActive: () => boolean;
|
|
16
|
+
export declare const useMicMuted: () => boolean;
|
|
17
|
+
export declare const useMicSupported: () => boolean;
|
|
18
|
+
export declare const useMicRequesting: () => boolean;
|
|
19
|
+
export declare const useMicError: () => Error | null;
|
|
20
|
+
export declare const useMicrophones: () => MediaDeviceInfo[];
|
|
21
|
+
export declare const useMicOptions: () => DropDownOption<MicOption>[];
|
|
22
|
+
export declare const useMicrophoneStoreActions: () => MicrophoneStoreActions;
|
|
23
|
+
export declare const microphoneActions: MicrophoneStoreActions;
|
|
24
|
+
export declare const getMicrophoneState: () => MicrophoneStore;
|
|
@@ -7,7 +7,7 @@ export declare const useViewportHeight: () => number;
|
|
|
7
7
|
export declare const useIsAppleDevice: () => boolean;
|
|
8
8
|
export declare const useIsTouchDevice: () => boolean;
|
|
9
9
|
export declare const useIsElectron: () => boolean;
|
|
10
|
-
export declare const useDpr: () =>
|
|
10
|
+
export declare const useDpr: () => 2 | 1 | 3;
|
|
11
11
|
export declare const useLocation: () => WindowGeolocation | null;
|
|
12
12
|
export declare const useLocationError: () => Error | null;
|
|
13
13
|
export declare const useGettingLocation: () => boolean;
|
|
@@ -19,7 +19,7 @@ export declare const viewportHeight: () => number;
|
|
|
19
19
|
export declare const isAppleDevice: () => boolean;
|
|
20
20
|
export declare const isTouchDevice: () => boolean;
|
|
21
21
|
export declare const isElectron: () => boolean;
|
|
22
|
-
export declare const dpr: () =>
|
|
22
|
+
export declare const dpr: () => 2 | 1 | 3;
|
|
23
23
|
export declare const location: () => WindowGeolocation | null;
|
|
24
24
|
export declare const locationError: () => Error | null;
|
|
25
25
|
export declare const gettingLocation: () => boolean;
|