@apple-pie/slice 0.1.26 → 0.1.29
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/{Avatar-Dg8ZHnw6.js → Avatar-vIquH-Uk.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-F8eSiMwn.js → AvatarGroup-DYN73N5x.js} +1 -1
- package/dist/cjs/chunks/{Button-D3wZtdtj.js → Button-B1qbfQgN.js} +10 -8
- package/dist/cjs/chunks/{ButtonBar-EH8fHFhS.js → ButtonBar-zpC3sClM.js} +1 -1
- package/dist/cjs/chunks/{Camera-BnsGhOrt.js → Camera-CCzynmXT.js} +2 -2
- package/dist/cjs/chunks/{CheckBox-CEWLxffo.js → CheckBox-DNctUlTA.js} +1 -1
- package/dist/cjs/chunks/{Chip-BrQgOmJc.js → Chip-BN4qBz6w.js} +1 -1
- package/dist/cjs/chunks/{DivInput-DWPwVUs_.js → DivInput-932r3bvF.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-Duv0nmOm.js → DrggablePanel-u8C-Y4dA.js} +16 -13
- package/dist/cjs/chunks/{DropDown-Bf_pm-Go.js → DropDown-BZbrZOkx.js} +17 -14
- package/dist/cjs/chunks/{FileIcon-DgRlhqzv.js → FileIcon-Dxn9OL10.js} +1 -1
- package/dist/cjs/chunks/{FileList-DobAcOSH.js → FileList-D5_igVaC.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-C-3ahI-j.js → FlexDiv-D4aSJC_G.js} +61 -21
- package/dist/cjs/chunks/{Grouper-D9G8PKoM.js → Grouper-D6rSl9nK.js} +1 -1
- package/dist/cjs/chunks/{Icon-fRM3E0N6.js → Icon-BFiN8Wzm.js} +267 -12
- package/dist/cjs/chunks/{IconButton-Cf2RBUKA.js → IconButton-Cv-po19M.js} +14 -11
- package/dist/cjs/chunks/{Label-Bxp2pCXf.js → Label-BQ6flU4-.js} +1 -1
- package/dist/cjs/chunks/{MdStreamBuffer-DObxjnAm.js → MdStreamBuffer-CvLO7CVi.js} +37 -3
- package/dist/cjs/chunks/{Pager-DO197OyC.js → Pager-GH2y7l5h.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-t-jv4OhI.js → ProgressIndicator-7pLk4Dvn.js} +1 -1
- package/dist/cjs/chunks/{PromptInput-B1WG22xz.js → PromptInput-C8-V67sS.js} +1 -1
- package/dist/cjs/chunks/{RadioButton-BAIMCshV.js → RadioButton-3CzhKBn6.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-Bsg5oFaC.js → RadioButtonList-DvJV6Qdg.js} +1 -1
- package/dist/cjs/chunks/{Slider-BAcaZUs2.js → Slider-D8OYGFsN.js} +25 -28
- package/dist/cjs/chunks/{TabBar-BfyfjmPQ.js → TabBar-VzxuAesC.js} +10 -7
- package/dist/cjs/chunks/{TextArea-CHNWsfWH.js → TextArea-CBNHvcK3.js} +1 -1
- package/dist/cjs/chunks/{TextField-2xzSdIx3.js → TextField-BpoLF6pZ.js} +6 -6
- package/dist/cjs/chunks/{Tip-DceuNR6k.js → Tip-CUKFhP9K.js} +2 -2
- package/dist/cjs/chunks/{Toast-C8Hc9ZKI.js → Toast-CKqGjsEk.js} +7 -6
- package/dist/cjs/chunks/ToggleButton-BdCsChJM.js +40 -0
- package/dist/cjs/chunks/{UploadArea-UFWRQ-nW.js → UploadArea-M9oc-No2.js} +1 -1
- package/dist/cjs/chunks/{_types-VoADvwjb.js → _types-Bdqd2vHh.js} +15 -3
- package/dist/cjs/chunks/microphoneStore-D1fV_8QQ.js +141 -0
- package/dist/cjs/chunks/{misc-BTF7BCZW.js → misc-CTl4GDxI.js} +2 -2
- package/dist/cjs/chunks/volumeStore-oYwlRVN0.js +95 -0
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- package/dist/cjs/components/Avatar/index.js +2 -2
- package/dist/cjs/components/AvatarGroup/index.js +2 -2
- 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/DivInput/index.js +2 -2
- 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 +7 -6
- package/dist/cjs/components/FileList/index.js +7 -7
- 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/Label/index.js +2 -2
- package/dist/cjs/components/Pager/index.js +2 -2
- 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/Slider/index.js +2 -2
- 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 +2 -2
- 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 +7 -7
- package/dist/cjs/hooks/useMdStreamBuffer.js +1 -1
- package/dist/cjs/hooks/useMicrophone.js +71 -21
- package/dist/cjs/hooks/useTheme.js +25 -16
- package/dist/cjs/hooks/useToolTip.js +9 -6
- package/dist/cjs/hooks/useTrackRenders.js +1 -1
- package/dist/cjs/hooks.js +4 -4
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/providers/ThemeProvider.js +37 -20
- package/dist/cjs/stores/microphone.js +14 -0
- package/dist/cjs/stores/volume.js +10 -0
- package/dist/cjs/stores.js +16 -2
- package/dist/cjs/theme/colors.js +8 -2
- package/dist/cjs/utils/index.js +1 -1
- package/dist/cjs/utils/objects/index.js +1 -1
- package/dist/esm/chunks/{AudioBubble-DZfzkdlq.mjs → AudioBubble-D052QyPH.mjs} +1 -1
- package/dist/esm/chunks/{Avatar-m5-zleDk.mjs → Avatar-Ds6MWC2c.mjs} +1 -1
- package/dist/esm/chunks/{AvatarGroup-DlgP4lTS.mjs → AvatarGroup-CBGi99eo.mjs} +1 -1
- package/dist/esm/chunks/{Button-YER9dCLE.mjs → Button-CYFpitCp.mjs} +11 -9
- package/dist/esm/chunks/{ButtonBar-BH4pcEpN.mjs → ButtonBar-ieMA0SHi.mjs} +2 -2
- package/dist/esm/chunks/{Camera-BJJpDuuA.mjs → Camera-jn9CcaD0.mjs} +3 -3
- package/dist/esm/chunks/{CheckBox-Cf2l3-D9.mjs → CheckBox-CoOmnGWD.mjs} +2 -2
- package/dist/esm/chunks/{Chip-DWp7p2BF.mjs → Chip-ClG6cUX0.mjs} +2 -2
- package/dist/esm/chunks/{DivInput-WJltaCra.mjs → DivInput-BVhcU0y0.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-DA7pYWg6.mjs → DrggablePanel-G5HHlntD.mjs} +16 -13
- package/dist/esm/chunks/{DropDown-BQ2tNN3_.mjs → DropDown-AuQW_DWv.mjs} +18 -15
- package/dist/esm/chunks/{FileIcon-Cufsp1gn.mjs → FileIcon-fJV_Cl6v.mjs} +1 -1
- package/dist/esm/chunks/{FileList-BQ9X5YnB.mjs → FileList-CxHaEEUi.mjs} +4 -4
- package/dist/esm/chunks/{FlexDiv-BFrVoFhC.mjs → FlexDiv-DnY1_qk4.mjs} +62 -22
- package/dist/esm/chunks/{Grouper-CvPYEsF_.mjs → Grouper-CyWZ8tfm.mjs} +1 -1
- package/dist/esm/chunks/{Icon-DI32kOA1.mjs → Icon-BOJAk-hM.mjs} +267 -12
- package/dist/esm/chunks/{IconButton-Dciw5CLn.mjs → IconButton-Ck0IMn4i.mjs} +14 -11
- package/dist/esm/chunks/{Label-CvCDAg1y.mjs → Label-DSfCcKtQ.mjs} +1 -1
- package/dist/esm/chunks/{MdStreamBuffer-DNXE4XbN.mjs → MdStreamBuffer-By7pHJQL.mjs} +37 -3
- package/dist/esm/chunks/{Pager-BoDLaKFh.mjs → Pager-ByJ2Cr0n.mjs} +1 -1
- package/dist/esm/chunks/{ProgressIndicator-CB_oazMD.mjs → ProgressIndicator-d2JGUDW_.mjs} +1 -1
- package/dist/esm/chunks/{PromptInput-plgRiAb7.mjs → PromptInput-COJnOFZf.mjs} +2 -2
- package/dist/esm/chunks/{RadioButton-B6ImCUYY.mjs → RadioButton-BB73OY2a.mjs} +2 -2
- package/dist/esm/chunks/{RadioButtonList-Cf6gk8yp.mjs → RadioButtonList-XqlqadYn.mjs} +2 -2
- package/dist/esm/chunks/{Slider-Cav86rU6.mjs → Slider-CU0Zdlpu.mjs} +25 -28
- package/dist/esm/chunks/{TabBar-0zpJ9GtN.mjs → TabBar-v8Dp4dr-.mjs} +11 -8
- package/dist/esm/chunks/{TextArea-B64bIPHm.mjs → TextArea-DGF43RON.mjs} +1 -1
- package/dist/esm/chunks/{TextField-BZeoN_ye.mjs → TextField-j4q0RUzH.mjs} +8 -8
- package/dist/esm/chunks/{Tip-C5LB54J9.mjs → Tip-Bj9d-230.mjs} +2 -2
- package/dist/esm/chunks/{Toast-Bl4s4tRo.mjs → Toast-CoioLlEG.mjs} +7 -6
- package/dist/esm/chunks/ToggleButton-CwTm8Yx0.mjs +51 -0
- package/dist/esm/chunks/{UploadArea-D3g2g1LK.mjs → UploadArea-DAwoJxtr.mjs} +4 -4
- package/dist/esm/chunks/{_types-DeEhv4Y5.mjs → _types-BVrr_Khp.mjs} +15 -3
- package/dist/esm/chunks/microphoneStore-Dr3lxoWX.mjs +135 -0
- package/dist/esm/chunks/{misc-BeEWwOaJ.mjs → misc-Bjbro8Xe.mjs} +2 -2
- package/dist/esm/chunks/volumeStore-GZnCDBMU.mjs +90 -0
- package/dist/esm/components/AudioBubble/index.mjs +5 -5
- package/dist/esm/components/Avatar/index.mjs +2 -2
- package/dist/esm/components/AvatarGroup/index.mjs +3 -3
- package/dist/esm/components/Button/index.mjs +6 -6
- package/dist/esm/components/ButtonBar/index.mjs +7 -7
- package/dist/esm/components/Camera/index.mjs +8 -8
- package/dist/esm/components/CheckBox/index.mjs +7 -7
- package/dist/esm/components/Chip/index.mjs +7 -7
- package/dist/esm/components/DivInput/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +6 -6
- package/dist/esm/components/DropDown/index.mjs +7 -7
- package/dist/esm/components/ErrorSummary/index.mjs +4 -4
- package/dist/esm/components/FileIcon/index.mjs +6 -6
- package/dist/esm/components/FileList/index.mjs +9 -9
- package/dist/esm/components/FlexDiv/index.mjs +1 -1
- package/dist/esm/components/Grouper/index.mjs +7 -7
- package/dist/esm/components/Icon/index.mjs +7 -7
- package/dist/esm/components/IconButton/index.mjs +5 -5
- package/dist/esm/components/Label/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +2 -2
- package/dist/esm/components/Progress/index.mjs +7 -7
- package/dist/esm/components/PromptInput/index.mjs +11 -11
- package/dist/esm/components/RadioButton/index.mjs +7 -7
- package/dist/esm/components/RadioButtonList/index.mjs +8 -8
- package/dist/esm/components/Slider/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +8 -8
- package/dist/esm/components/TextArea/index.mjs +7 -7
- package/dist/esm/components/Textfield/index.mjs +10 -10
- package/dist/esm/components/Tip/index.mjs +2 -2
- package/dist/esm/components/Toast/index.mjs +7 -7
- package/dist/esm/components/ToggleButton/index.mjs +45 -0
- package/dist/esm/components/UploadArea/index.mjs +10 -10
- package/dist/esm/hooks/useMdStreamBuffer.mjs +1 -1
- package/dist/esm/hooks/useMicrophone.mjs +71 -21
- package/dist/esm/hooks/useTheme.mjs +26 -15
- package/dist/esm/hooks/useToolTip.mjs +9 -6
- package/dist/esm/hooks/useTrackRenders.mjs +1 -1
- package/dist/esm/hooks.mjs +7 -7
- package/dist/esm/index.mjs +35 -33
- package/dist/esm/providers/ThemeProvider.mjs +38 -21
- package/dist/esm/stores/microphone.mjs +7 -0
- package/dist/esm/stores/volume.mjs +5 -0
- package/dist/esm/stores.mjs +4 -0
- package/dist/esm/theme/colors.mjs +8 -2
- package/dist/esm/utils/index.mjs +2 -2
- package/dist/esm/utils/objects/index.mjs +1 -1
- 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/DropDown/_types.d.ts +1 -0
- 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 +13 -0
- package/dist/types/components/IconButton/_types.d.ts +1 -0
- package/dist/types/components/Slider/_types.d.ts +5 -0
- package/dist/types/components/TabBar/_types.d.ts +2 -0
- package/dist/types/components/Toast/_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 +6 -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 +2 -0
- package/dist/types/stores/microphone/_types.d.ts +32 -0
- package/dist/types/stores/microphone/index.d.ts +2 -0
- package/dist/types/stores/microphone/microphoneStore.d.ts +27 -0
- package/dist/types/stores/volume/_types.d.ts +19 -0
- package/dist/types/stores/volume/index.d.ts +3 -0
- package/dist/types/stores/volume/volumeStore.d.ts +32 -0
- package/dist/types/stores/window/windowStore.d.ts +2 -2
- package/dist/types/theme/colors/types.d.ts +3 -0
- package/dist/types/utils/functions/misc.d.ts +1 -1
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +3 -0
- package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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,10 @@ 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";
|
|
58
|
+
readonly speakerHigh: "speaker high";
|
|
59
|
+
readonly speakerLow: "speaker low";
|
|
55
60
|
};
|
|
56
61
|
readonly files: {
|
|
57
62
|
readonly document: "document";
|
|
@@ -61,6 +66,7 @@ export declare const SliceIcons: {
|
|
|
61
66
|
readonly people: {
|
|
62
67
|
readonly people: "people";
|
|
63
68
|
readonly person: "person";
|
|
69
|
+
readonly talk: "talk";
|
|
64
70
|
};
|
|
65
71
|
readonly business: {
|
|
66
72
|
readonly briefcase: "briefcase";
|
|
@@ -68,6 +74,7 @@ export declare const SliceIcons: {
|
|
|
68
74
|
readonly invoice: "invoice";
|
|
69
75
|
readonly payment: "payment";
|
|
70
76
|
readonly wallet: "wallet";
|
|
77
|
+
readonly laptop: "laptop";
|
|
71
78
|
};
|
|
72
79
|
readonly charts: {
|
|
73
80
|
readonly barChart: "bar chart";
|
|
@@ -107,6 +114,10 @@ export declare const SliceIcons: {
|
|
|
107
114
|
readonly fontSmaller: "font smaller";
|
|
108
115
|
readonly characterBeam: "character beam";
|
|
109
116
|
};
|
|
117
|
+
readonly weather: {
|
|
118
|
+
readonly sun: "sun";
|
|
119
|
+
readonly moonFull: "moon full";
|
|
120
|
+
};
|
|
110
121
|
readonly ai: {
|
|
111
122
|
readonly sparkle: "sparkle";
|
|
112
123
|
readonly wand: "wand";
|
|
@@ -126,6 +137,8 @@ export declare const SliceIcons: {
|
|
|
126
137
|
readonly menu: "menu";
|
|
127
138
|
readonly more: "more";
|
|
128
139
|
readonly sidebar: "sidebar";
|
|
140
|
+
readonly sidebarSplit: "sidebar split";
|
|
141
|
+
readonly keyboard: "keyboard";
|
|
129
142
|
readonly x: "x";
|
|
130
143
|
};
|
|
131
144
|
};
|
|
@@ -10,6 +10,11 @@ type SliderBaseProps = {
|
|
|
10
10
|
headColor?: string;
|
|
11
11
|
trackColor?: string;
|
|
12
12
|
progressColor?: string;
|
|
13
|
+
trackHeadBorderSize?: number;
|
|
14
|
+
trackHeadBorderColor?: string;
|
|
15
|
+
step?: number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
disabledOpacity?: number;
|
|
13
18
|
cursor?: 'default' | 'grab' | 'grabbing' | 'pointer';
|
|
14
19
|
onChange?: (value: number, percent: number) => void;
|
|
15
20
|
onDragChange?: (value: number, percent: number) => void;
|
|
@@ -21,6 +21,7 @@ type TabBarBaseProps = {
|
|
|
21
21
|
closeWidth?: number | string;
|
|
22
22
|
padding?: number | string;
|
|
23
23
|
iconSize?: number;
|
|
24
|
+
iconFill?: boolean;
|
|
24
25
|
iconGap?: number;
|
|
25
26
|
tabGap?: number;
|
|
26
27
|
disabled?: boolean;
|
|
@@ -42,6 +43,7 @@ export interface TabOptionProps {
|
|
|
42
43
|
iconGap?: number;
|
|
43
44
|
disabled?: boolean;
|
|
44
45
|
count?: number;
|
|
46
|
+
iconFill?: boolean;
|
|
45
47
|
tabWidth?: 'compact' | 'fill' | number;
|
|
46
48
|
underline?: boolean;
|
|
47
49
|
onClick?: (value: number) => void;
|
|
@@ -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
|
+
}
|
|
@@ -5,7 +5,11 @@ export type MicOption = {
|
|
|
5
5
|
};
|
|
6
6
|
export type UseMicrophoneReturn = {
|
|
7
7
|
micStream: RefObject<MediaStream | null>;
|
|
8
|
+
processedMicStream: RefObject<MediaStream | null>;
|
|
8
9
|
micTrack: RefObject<MediaStreamTrack | null>;
|
|
10
|
+
currentDeviceId: string | null;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
inputVolume: number;
|
|
9
13
|
muted: boolean;
|
|
10
14
|
isSupported: boolean;
|
|
11
15
|
isRequesting: boolean;
|
|
@@ -17,7 +21,8 @@ export type UseMicrophoneReturn = {
|
|
|
17
21
|
muteMic: () => boolean;
|
|
18
22
|
unmuteMic: () => boolean;
|
|
19
23
|
toggleMute: () => void;
|
|
24
|
+
setInputVolume: (volume: number) => number;
|
|
20
25
|
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
21
26
|
setMicrophone: (deviceId: string | DropDownOption<MicOption>) => Promise<void>;
|
|
22
27
|
};
|
|
23
|
-
export declare function useMicrophone(startMuted?: boolean, microphoneDeviceId?: string): UseMicrophoneReturn;
|
|
28
|
+
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,32 @@
|
|
|
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
|
+
processedMicStream: RefObject<MediaStream | null>;
|
|
7
|
+
micTrack: RefObject<MediaStreamTrack | null>;
|
|
8
|
+
currentDeviceId: string | null;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
inputVolume: number;
|
|
11
|
+
muted: boolean;
|
|
12
|
+
isSupported: boolean;
|
|
13
|
+
isRequesting: boolean;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
microphones: MediaDeviceInfo[];
|
|
16
|
+
micOptions: DropDownOption<MicOption>[];
|
|
17
|
+
};
|
|
18
|
+
export type MicrophoneStoreActions = {
|
|
19
|
+
sync: (microphone: UseMicrophoneReturn | null) => void;
|
|
20
|
+
clear: () => void;
|
|
21
|
+
requestMicrophone: () => Promise<MediaStream | null>;
|
|
22
|
+
stopMicrophone: () => void;
|
|
23
|
+
muteMic: () => boolean;
|
|
24
|
+
unmuteMic: () => boolean;
|
|
25
|
+
toggleMute: () => void;
|
|
26
|
+
setInputVolume: (volume: number) => number;
|
|
27
|
+
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
28
|
+
setMicrophone: (deviceId: string | DropDownOption<MicOption>) => Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
export type MicrophoneStore = MicrophoneStoreState & {
|
|
31
|
+
actions: MicrophoneStoreActions;
|
|
32
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useMicrophoneStore, useSyncMicrophoneStore, useMicStream, useProcessedMicStream, useMicTrack, useCurrentMicDeviceId, useMicActive, useMicInputVolume, useMicMuted, useMicSupported, useMicRequesting, useMicError, useMicrophones, useMicOptions, useMicrophoneStoreActions, microphoneActions, getMicrophoneState, } from './microphoneStore';
|
|
2
|
+
export type { MicrophoneStore, MicrophoneStoreActions, MicrophoneStoreState, } from './_types';
|
|
@@ -0,0 +1,27 @@
|
|
|
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 useProcessedMicStream: () => RefObject<MediaStream | null>;
|
|
15
|
+
export declare const useMicTrack: () => RefObject<MediaStreamTrack | null>;
|
|
16
|
+
export declare const useCurrentMicDeviceId: () => string | null;
|
|
17
|
+
export declare const useMicActive: () => boolean;
|
|
18
|
+
export declare const useMicInputVolume: () => number;
|
|
19
|
+
export declare const useMicMuted: () => boolean;
|
|
20
|
+
export declare const useMicSupported: () => boolean;
|
|
21
|
+
export declare const useMicRequesting: () => boolean;
|
|
22
|
+
export declare const useMicError: () => Error | null;
|
|
23
|
+
export declare const useMicrophones: () => MediaDeviceInfo[];
|
|
24
|
+
export declare const useMicOptions: () => DropDownOption<MicOption>[];
|
|
25
|
+
export declare const useMicrophoneStoreActions: () => MicrophoneStoreActions;
|
|
26
|
+
export declare const microphoneActions: MicrophoneStoreActions;
|
|
27
|
+
export declare const getMicrophoneState: () => MicrophoneStore;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type VolumeStore = {
|
|
2
|
+
volume: number;
|
|
3
|
+
storedVolume: number;
|
|
4
|
+
muted: boolean;
|
|
5
|
+
elements: Set<AudioElement>;
|
|
6
|
+
feedbackElement: AudioElement | null;
|
|
7
|
+
actions: {
|
|
8
|
+
attachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
9
|
+
detachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
10
|
+
attachFeedbackElement: (element: AudioElement) => void;
|
|
11
|
+
detachFeedbackElement: (element: AudioElement) => void;
|
|
12
|
+
playFeedback: (volume?: number) => Promise<void>;
|
|
13
|
+
setVolume: (volume: number) => void;
|
|
14
|
+
mute: () => Promise<void>;
|
|
15
|
+
unmute: () => Promise<void>;
|
|
16
|
+
clearMedia: () => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type AudioElement = HTMLAudioElement | HTMLVideoElement;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useVolumeStore } from './volumeStore';
|
|
2
|
+
export { getAttachedMedia, getMuted, getStoredVolume, getVolume, useAttachedMedia, useMuted, useStoredVolume, useVolume, useVolumeActions, volumeActions, } from './volumeStore';
|
|
3
|
+
export type { AudioElement, VolumeStore } from './_types';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AudioElement, VolumeStore } from './_types';
|
|
2
|
+
export declare const useVolumeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<VolumeStore>>;
|
|
3
|
+
export declare const useVolume: () => number;
|
|
4
|
+
export declare const useStoredVolume: () => number;
|
|
5
|
+
export declare const useMuted: () => boolean;
|
|
6
|
+
export declare const useAttachedMedia: () => Set<AudioElement>;
|
|
7
|
+
export declare const useVolumeActions: () => {
|
|
8
|
+
attachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
9
|
+
detachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
10
|
+
attachFeedbackElement: (element: AudioElement) => void;
|
|
11
|
+
detachFeedbackElement: (element: AudioElement) => void;
|
|
12
|
+
playFeedback: (volume?: number) => Promise<void>;
|
|
13
|
+
setVolume: (volume: number) => void;
|
|
14
|
+
mute: () => Promise<void>;
|
|
15
|
+
unmute: () => Promise<void>;
|
|
16
|
+
clearMedia: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const volumeActions: {
|
|
19
|
+
attachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
20
|
+
detachMedia: (elements: AudioElement[] | AudioElement) => void;
|
|
21
|
+
attachFeedbackElement: (element: AudioElement) => void;
|
|
22
|
+
detachFeedbackElement: (element: AudioElement) => void;
|
|
23
|
+
playFeedback: (volume?: number) => Promise<void>;
|
|
24
|
+
setVolume: (volume: number) => void;
|
|
25
|
+
mute: () => Promise<void>;
|
|
26
|
+
unmute: () => Promise<void>;
|
|
27
|
+
clearMedia: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const getVolume: () => number;
|
|
30
|
+
export declare const getStoredVolume: () => number;
|
|
31
|
+
export declare const getMuted: () => boolean;
|
|
32
|
+
export declare const getAttachedMedia: () => Set<AudioElement>;
|
|
@@ -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;
|
|
@@ -100,6 +100,8 @@ export type CoreColors = {
|
|
|
100
100
|
'scroll-bar-dark': string;
|
|
101
101
|
'scroll-bar-hover-light': string;
|
|
102
102
|
'scroll-bar-hover-dark': string;
|
|
103
|
+
'surface-primary-tint-light': string;
|
|
104
|
+
'surface-primary-tint-dark': string;
|
|
103
105
|
'surface-shadow-soft-light': string;
|
|
104
106
|
'surface-shadow-soft-dark': string;
|
|
105
107
|
'surface-shadow-strong-light': string;
|
|
@@ -141,6 +143,7 @@ export type Colors = {
|
|
|
141
143
|
'core-surface-coverup-translucent': string;
|
|
142
144
|
'core-surface-overlay-translucent': string;
|
|
143
145
|
'core-surface-primary': string;
|
|
146
|
+
'core-surface-primary-tint': string;
|
|
144
147
|
'core-surface-secondary': string;
|
|
145
148
|
'core-surface-special': string;
|
|
146
149
|
'core-text-dark': string;
|
|
@@ -34,7 +34,7 @@ export declare function setProps(props: any, mount?: boolean, unmount?: boolean)
|
|
|
34
34
|
/**
|
|
35
35
|
* Convert a hex color into an RGB string literal.
|
|
36
36
|
*/
|
|
37
|
-
export declare const hexToRgb: (hex: string | undefined) => string | undefined;
|
|
37
|
+
export declare const hexToRgb: (hex: string | undefined, opacity?: number) => string | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Trigger a click-like callback when one of the configured keys is pressed.
|
|
40
40
|
*/
|
|
@@ -4,6 +4,7 @@ import type { MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot } from '
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class MdBuffer {
|
|
6
6
|
private readonly endOfStreamToken?;
|
|
7
|
+
private readonly healthyEndMarker?;
|
|
7
8
|
private readonly htmlHandling;
|
|
8
9
|
private readonly includeLinksAndImages;
|
|
9
10
|
private readonly onFlush?;
|
|
@@ -47,7 +48,9 @@ export declare class MdBuffer {
|
|
|
47
48
|
private scheduleFlush;
|
|
48
49
|
private commitStableLines;
|
|
49
50
|
private buildHealthyOutput;
|
|
51
|
+
private applyHealthyEndMarker;
|
|
50
52
|
private buildHealthyTail;
|
|
53
|
+
private closeTrailingInlineSelect;
|
|
51
54
|
private closeInlineMarkdown;
|
|
52
55
|
private closeLinksAndImages;
|
|
53
56
|
private getPairedRules;
|
|
@@ -16,6 +16,7 @@ export interface MarkdownAutoCloseRule {
|
|
|
16
16
|
}
|
|
17
17
|
export interface MarkdownStreamBufferOptions {
|
|
18
18
|
endOfStreamToken?: string;
|
|
19
|
+
healthyEndMarker?: string;
|
|
19
20
|
htmlHandling?: 'ignore' | 'strip';
|
|
20
21
|
includeLinksAndImages?: boolean;
|
|
21
22
|
onFlush?: (snapshot: MarkdownStreamBufferSnapshot) => void;
|