@expo/ui 0.1.1-alpha.0 → 0.1.1-alpha.1
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/BottomSheet/index.tsx +16 -0
- package/Button/index.tsx +7 -6
- package/CHANGELOG.md +5 -0
- package/ColorPicker/index.tsx +6 -5
- package/ContextMenu/index.tsx +4 -7
- package/DatePicker/index.tsx +14 -11
- package/Gauge/index.tsx +17 -11
- package/Label/index.tsx +1 -1
- package/Picker/index.tsx +0 -3
- package/Progress/index.tsx +33 -5
- package/Switch/index.tsx +1 -1
- package/TextInput/index.tsx +4 -4
- package/android/build.gradle +2 -2
- package/build/BottomSheet/index.d.ts +25 -0
- package/build/BottomSheet/index.d.ts.map +1 -0
- package/build/Button/index.d.ts +7 -6
- package/build/Button/index.d.ts.map +1 -1
- package/build/ColorPicker/index.d.ts +29 -0
- package/build/ColorPicker/index.d.ts.map +1 -0
- package/build/ContextMenu/index.d.ts +3 -3
- package/build/ContextMenu/index.d.ts.map +1 -1
- package/build/DatePicker/index.d.ts +75 -0
- package/build/DatePicker/index.d.ts.map +1 -0
- package/build/Gauge/index.d.ts +64 -0
- package/build/Gauge/index.d.ts.map +1 -0
- package/build/Label/index.d.ts +1 -1
- package/build/Picker/index.d.ts +0 -3
- package/build/Picker/index.d.ts.map +1 -1
- package/build/Progress/index.d.ts +56 -0
- package/build/Progress/index.d.ts.map +1 -0
- package/build/Switch/index.d.ts +1 -1
- package/build/TextInput/index.d.ts +70 -0
- package/build/TextInput/index.d.ts.map +1 -0
- package/build/components/SwiftUI/index.d.ts +80 -0
- package/build/components/SwiftUI/index.d.ts.map +1 -0
- package/build/src/types.d.ts +8 -2
- package/build/src/types.d.ts.map +1 -1
- package/components/SwiftUI/index.tsx +208 -0
- package/expo-module.config.json +1 -1
- package/ios/ExpoUIModule.swift +10 -0
- package/ios/List.swift +1 -1
- package/ios/SwiftUIButton.swift +24 -0
- package/ios/SwiftUIContainer.swift +13 -0
- package/ios/SwiftUIForm.swift +23 -0
- package/ios/SwiftUIHStack.swift +34 -0
- package/ios/SwiftUIPicker.swift +54 -0
- package/ios/SwiftUISection.swift +18 -0
- package/ios/SwiftUISwitch.swift +31 -0
- package/ios/SwiftUIText.swift +50 -0
- package/ios/SwiftUIVStack.swift +34 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.module → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.module} +7 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.pom → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +2 -2
- package/src/types.ts +8 -2
- package/swift-ui.ts +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0-sources.jar → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0-sources.jar.md5 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0-sources.jar.sha1 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0-sources.jar.sha256 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0-sources.jar.sha512 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.aar → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.aar} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.aar.md5 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.aar.sha1 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.aar.sha256 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.1.1-alpha.0/expo.modules.ui-0.1.1-alpha.0.aar.sha512 → 0.1.1-alpha.1/expo.modules.ui-0.1.1-alpha.1.aar.sha512} +0 -0
package/BottomSheet/index.tsx
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
2
|
|
|
3
3
|
export type BottomSheetProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Optional styles to apply to the `BottomSheet` component.
|
|
6
|
+
*/
|
|
4
7
|
style?: StyleProp<ViewStyle>;
|
|
8
|
+
/**
|
|
9
|
+
* The children of the `BottomSheet` component.
|
|
10
|
+
*/
|
|
5
11
|
children: any;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the `BottomSheet` is opened.
|
|
14
|
+
*/
|
|
6
15
|
isOpened: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Callback function that is called when the `BottomSheet` is opened.
|
|
18
|
+
*/
|
|
7
19
|
onIsOpenedChange: (isOpened: boolean) => void;
|
|
8
20
|
};
|
|
9
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Renders a native `BottomSheet` component.
|
|
24
|
+
* @platform ios
|
|
25
|
+
*/
|
|
10
26
|
export function BottomSheet({ children }: BottomSheetProps) {
|
|
11
27
|
return children;
|
|
12
28
|
}
|
package/Button/index.tsx
CHANGED
|
@@ -18,21 +18,22 @@ export type ButtonRole = 'default' | 'cancel' | 'destructive';
|
|
|
18
18
|
*
|
|
19
19
|
* Common styles:
|
|
20
20
|
* - `default` - The default system button style.
|
|
21
|
-
* - `bordered` - A button with a light fill. On Android equivalent to `FilledTonalButton`.
|
|
22
|
-
* - `borderless` - A button with no background or border. On Android equivalent to `TextButton`.
|
|
21
|
+
* - `bordered` - A button with a light fill. On Android, equivalent to `FilledTonalButton`.
|
|
22
|
+
* - `borderless` - A button with no background or border. On Android, equivalent to `TextButton`.
|
|
23
|
+
*
|
|
24
|
+
* Android-only styles:
|
|
25
|
+
* - `outlined` - A button with an outline.
|
|
26
|
+
* - `elevated` - A filled button with a shadow.
|
|
23
27
|
*
|
|
24
28
|
* Apple-only styles:
|
|
25
29
|
* - `borderedProminent` - A bordered button with a prominent appearance.
|
|
26
30
|
* - `plain` - A button with no border or background and a less prominent text.
|
|
27
|
-
*
|
|
31
|
+
* macOS-only styles:
|
|
28
32
|
* - `accessoryBar` - A button style for accessory bars.
|
|
29
33
|
* - `accessoryBarAction` - A button style for accessory bar actions.
|
|
30
34
|
* - `card` - A button style for cards.
|
|
31
35
|
* - `link` - A button style for links.
|
|
32
36
|
*
|
|
33
|
-
* Android-only styles:
|
|
34
|
-
* - `outlined` - A button with an outline.
|
|
35
|
-
* - `elevated` - A filled button with a shadow.
|
|
36
37
|
*/
|
|
37
38
|
export type ButtonVariant =
|
|
38
39
|
// Common
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.1.1-alpha.1 — 2025-04-11
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
13
17
|
## 0.1.1-alpha.0 — 2025-04-10
|
|
14
18
|
|
|
15
19
|
_This version does not introduce any user-facing changes._
|
|
@@ -46,6 +50,7 @@ _This version does not introduce any user-facing changes._
|
|
|
46
50
|
- Standardize platform key ordering in `expo-module.config.json`. ([#35003](https://github.com/expo/expo/pull/35003) by [@reichhartd](https://github.com/reichhartd))
|
|
47
51
|
- Dismiss context menu when a menu item is tapped on Android ([#35365](https://github.com/expo/expo/pull/35365) by [@fobos531](https://github.com/fobos531))
|
|
48
52
|
- Migrated SwiftUI views with backward compatible `WithHostingView`. ([#35553](https://github.com/expo/expo/pull/35553) by [@kudo](https://github.com/kudo))
|
|
53
|
+
- Introduced `SwiftUI` components. ([#35555](https://github.com/expo/expo/pull/35555) by [@kudo](https://github.com/kudo))
|
|
49
54
|
|
|
50
55
|
## 0.0.2 — 2025-02-11
|
|
51
56
|
|
package/ColorPicker/index.tsx
CHANGED
|
@@ -2,16 +2,13 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import { NativeSyntheticEvent, processColor, StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Props for the ColorPicker component.
|
|
7
|
-
*/
|
|
8
5
|
export type ColorPickerProps = {
|
|
9
6
|
/**
|
|
10
7
|
* The currently selected color in the format `#RRGGBB` or `#RRGGBBAA`.
|
|
11
8
|
*/
|
|
12
9
|
selection: string | null;
|
|
13
10
|
/**
|
|
14
|
-
* A label displayed on the ColorPicker
|
|
11
|
+
* A label displayed on the `ColorPicker`.
|
|
15
12
|
*/
|
|
16
13
|
label?: string;
|
|
17
14
|
/**
|
|
@@ -19,7 +16,7 @@ export type ColorPickerProps = {
|
|
|
19
16
|
*/
|
|
20
17
|
onValueChanged?: (value: string) => void;
|
|
21
18
|
/**
|
|
22
|
-
* Optional style to apply to the ColorPicker component.
|
|
19
|
+
* Optional style to apply to the `ColorPicker` component.
|
|
23
20
|
*/
|
|
24
21
|
style?: StyleProp<ViewStyle>;
|
|
25
22
|
/**
|
|
@@ -37,6 +34,10 @@ const ColorPickerNativeView: React.ComponentType<
|
|
|
37
34
|
}
|
|
38
35
|
> = requireNativeView('ExpoUI', 'ColorPickerView');
|
|
39
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Renders a `ColorPicker` component using SwiftUI.
|
|
39
|
+
* @platform ios
|
|
40
|
+
*/
|
|
40
41
|
export function ColorPicker({ selection, onValueChanged, ...restProps }: ColorPickerProps) {
|
|
41
42
|
const onNativeValueChanged = useCallback(
|
|
42
43
|
(event: OnValueChangedEvent) => {
|
package/ContextMenu/index.tsx
CHANGED
|
@@ -7,10 +7,7 @@ import { ButtonProps } from '../Button';
|
|
|
7
7
|
import { PickerProps } from '../Picker';
|
|
8
8
|
import { SwitchProps } from '../Switch';
|
|
9
9
|
|
|
10
|
-
const MenuNativeView: ComponentType<NativeMenuProps> = requireNativeView(
|
|
11
|
-
'ExpoUI',
|
|
12
|
-
'ContextMenu'
|
|
13
|
-
);
|
|
10
|
+
const MenuNativeView: ComponentType<NativeMenuProps> = requireNativeView('ExpoUI', 'ContextMenu');
|
|
14
11
|
|
|
15
12
|
const MenuNativeTriggerView: ComponentType<object> = requireNativeView(
|
|
16
13
|
'ExpoUI',
|
|
@@ -77,7 +74,7 @@ export type ContextMenuProps = {
|
|
|
77
74
|
color?: string;
|
|
78
75
|
|
|
79
76
|
/**
|
|
80
|
-
* Optional styles to apply to the `ContextMenu
|
|
77
|
+
* Optional styles to apply to the `ContextMenu`.
|
|
81
78
|
*/
|
|
82
79
|
style?: StyleProp<ViewStyle>;
|
|
83
80
|
};
|
|
@@ -155,8 +152,8 @@ export function Preview(props: { children: React.ReactNode }) {
|
|
|
155
152
|
* `ContextMenu` allows you to create a context menu, which can be used to provide additional options to the user.
|
|
156
153
|
*
|
|
157
154
|
* There are some platform-specific differences in the behavior of the context menu:
|
|
158
|
-
* - On Android the expansion of the context menu is controlled by the
|
|
159
|
-
* - On iOS the context menu can be triggered by a single press or a long press. The `activationMethod` prop allows you to choose between these two options.
|
|
155
|
+
* - On Android, the expansion of the context menu is controlled by the `expanded` prop. iOS, does not allow for manual control of the expansion state.
|
|
156
|
+
* - On iOS, the context menu can be triggered by a single press or a long press. The `activationMethod` prop allows you to choose between these two options.
|
|
160
157
|
* - Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple sections. The `title` prop of the `Button`, which opens the submenu on iOS will be used as a section title.
|
|
161
158
|
* - Android does not support showing a `Picker` element in the context menu.
|
|
162
159
|
*/
|
package/DatePicker/index.tsx
CHANGED
|
@@ -4,16 +4,13 @@ import { StyleProp, ViewStyle } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
import { ViewEvent } from '../src/types';
|
|
6
6
|
|
|
7
|
-
type AndroidVariant = 'picker' | 'input';
|
|
7
|
+
export type AndroidVariant = 'picker' | 'input';
|
|
8
8
|
|
|
9
|
-
type IOSVariant = 'wheel' | 'automatic' | 'graphical' | 'compact';
|
|
9
|
+
export type IOSVariant = 'wheel' | 'automatic' | 'graphical' | 'compact';
|
|
10
10
|
|
|
11
|
-
type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
|
|
11
|
+
export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
* Props for the DatePicker component.
|
|
15
|
-
*/
|
|
16
|
-
export type DatePickerProps = {
|
|
13
|
+
export type DateTimePickerProps = {
|
|
17
14
|
/**
|
|
18
15
|
* The initial date to display on the picker.
|
|
19
16
|
*/
|
|
@@ -70,13 +67,16 @@ export type DatePickerProps = {
|
|
|
70
67
|
};
|
|
71
68
|
|
|
72
69
|
type NativeDatePickerProps = Omit<
|
|
73
|
-
|
|
70
|
+
DateTimePickerProps,
|
|
74
71
|
'iosVariant' | 'androidVariant' | 'onDateSelected'
|
|
75
72
|
> & {
|
|
76
73
|
variant?: IOSVariant | AndroidVariant;
|
|
77
74
|
} & ViewEvent<'onDateSelected', { date: Date }>;
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
79
|
+
export function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps {
|
|
80
80
|
const { iosVariant, androidVariant, ...rest } = props;
|
|
81
81
|
return {
|
|
82
82
|
...rest,
|
|
@@ -92,6 +92,9 @@ const DatePickerNativeView: React.ComponentType<NativeDatePickerProps> = require
|
|
|
92
92
|
'DateTimePickerView'
|
|
93
93
|
);
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Renders a `DateTimePicker` component.
|
|
97
|
+
*/
|
|
98
|
+
export function DateTimePicker(props: DateTimePickerProps) {
|
|
99
|
+
return <DatePickerNativeView {...transformDateTimePickerProps(props)} />;
|
|
97
100
|
}
|
package/Gauge/index.tsx
CHANGED
|
@@ -2,11 +2,16 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import { ColorValue, Platform, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* The type of `Gauge`.
|
|
6
|
+
* @platform ios
|
|
6
7
|
*/
|
|
7
|
-
type
|
|
8
|
+
export type GaugeType = 'default' | 'circular' | 'circularCapacity' | 'linear' | 'linearCapacity';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Value options for the `Gauge` component.
|
|
12
|
+
* @platform ios
|
|
13
|
+
*/
|
|
14
|
+
export type ValueOptions = {
|
|
10
15
|
/**
|
|
11
16
|
* Value of the element.
|
|
12
17
|
*/
|
|
@@ -21,12 +26,9 @@ type ValueOptions = {
|
|
|
21
26
|
color?: ColorValue;
|
|
22
27
|
};
|
|
23
28
|
|
|
24
|
-
/**
|
|
25
|
-
* Props for the Gauge component.
|
|
26
|
-
*/
|
|
27
29
|
export type GaugeProps = {
|
|
28
30
|
/**
|
|
29
|
-
* A label displayed on the Gauge
|
|
31
|
+
* A label displayed on the `Gauge`.
|
|
30
32
|
*/
|
|
31
33
|
label?: string;
|
|
32
34
|
/**
|
|
@@ -46,15 +48,15 @@ export type GaugeProps = {
|
|
|
46
48
|
*/
|
|
47
49
|
max?: ValueOptions;
|
|
48
50
|
/**
|
|
49
|
-
*
|
|
51
|
+
* The type of `Gauge`.
|
|
50
52
|
*/
|
|
51
|
-
type?:
|
|
53
|
+
type?: GaugeType;
|
|
52
54
|
/**
|
|
53
|
-
* Color (or array of colors for gradient) of the Gauge
|
|
55
|
+
* Color (or array of colors for gradient) of the `Gauge`.
|
|
54
56
|
*/
|
|
55
57
|
color?: ColorValue | ColorValue[];
|
|
56
58
|
/**
|
|
57
|
-
* Optional style to apply to the
|
|
59
|
+
* Optional style to apply to the `Gauge` component.
|
|
58
60
|
*/
|
|
59
61
|
style?: StyleProp<ViewStyle>;
|
|
60
62
|
};
|
|
@@ -65,6 +67,10 @@ if (Platform.OS === 'ios') {
|
|
|
65
67
|
GaugeNativeView = requireNativeView('ExpoUI', 'GaugeView');
|
|
66
68
|
}
|
|
67
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Renders a native `Gauge` component.
|
|
72
|
+
* @platform ios
|
|
73
|
+
*/
|
|
68
74
|
export function Gauge({ type = 'default', ...props }: GaugeProps) {
|
|
69
75
|
if (!GaugeNativeView) {
|
|
70
76
|
return null;
|
package/Label/index.tsx
CHANGED
|
@@ -23,7 +23,7 @@ export type LabelProps = {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Renders a native label view, which could be used in a list or section.
|
|
26
|
+
* Renders a native label view, which could be used in a [`List`](#list) or [`Section`](#section).
|
|
27
27
|
*
|
|
28
28
|
* @param {LabelProps} props - The properties passed to the Label component.
|
|
29
29
|
* @returns {JSX.Element} The rendered native Label component.
|
package/Picker/index.tsx
CHANGED
package/Progress/index.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export type ProgressElementColors = {
|
|
|
10
10
|
trackColor?: ColorValue;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export type
|
|
13
|
+
export type CircularProgressProps = {
|
|
14
14
|
/**
|
|
15
15
|
* Custom styles for the progress component.
|
|
16
16
|
*/
|
|
@@ -30,19 +30,47 @@ export type ProgressProps = {
|
|
|
30
30
|
elementColors?: ProgressElementColors;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
type
|
|
34
|
-
|
|
33
|
+
export type LinearProgressProps = {
|
|
34
|
+
/**
|
|
35
|
+
* Custom styles for the progress component.
|
|
36
|
+
*/
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
/**
|
|
39
|
+
* The current progress value of the slider. This is a number between `0` and `1`.
|
|
40
|
+
*/
|
|
41
|
+
progress?: number | null;
|
|
42
|
+
/**
|
|
43
|
+
* Progress color.
|
|
44
|
+
*/
|
|
45
|
+
color?: ColorValue;
|
|
46
|
+
/**
|
|
47
|
+
* Colors for switch's core elements.
|
|
48
|
+
* @platform android
|
|
49
|
+
*/
|
|
50
|
+
elementColors?: ProgressElementColors;
|
|
35
51
|
};
|
|
36
52
|
|
|
53
|
+
type NativeProgressProps =
|
|
54
|
+
| CircularProgressProps
|
|
55
|
+
| (LinearProgressProps & {
|
|
56
|
+
variant: 'linear' | 'circular';
|
|
57
|
+
});
|
|
58
|
+
|
|
37
59
|
const NativeProgressView: React.ComponentType<NativeProgressProps> = requireNativeView(
|
|
38
60
|
'ExpoUI',
|
|
39
61
|
'ProgressView'
|
|
40
62
|
);
|
|
41
63
|
|
|
42
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Renders a `CircularProgress` component.
|
|
66
|
+
*/
|
|
67
|
+
export function CircularProgress(props: CircularProgressProps) {
|
|
43
68
|
return <NativeProgressView {...props} variant="circular" />;
|
|
44
69
|
}
|
|
45
70
|
|
|
46
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Renders a `LinearProgress` component.
|
|
73
|
+
*/
|
|
74
|
+
export function LinearProgress(props: LinearProgressProps) {
|
|
47
75
|
return <NativeProgressView {...props} variant="linear" />;
|
|
48
76
|
}
|
package/Switch/index.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export type SwitchProps = {
|
|
|
33
33
|
/**
|
|
34
34
|
* Label for the switch.
|
|
35
35
|
*
|
|
36
|
-
* > On Android the label has an effect only when the `Switch` is used inside a `ContextMenu`.
|
|
36
|
+
* > On Android, the label has an effect only when the `Switch` is used inside a `ContextMenu`.
|
|
37
37
|
* @platform ios
|
|
38
38
|
*/
|
|
39
39
|
label?: string;
|
package/TextInput/index.tsx
CHANGED
|
@@ -8,9 +8,6 @@ import { ViewEvent } from '../src/types';
|
|
|
8
8
|
*/
|
|
9
9
|
export type TextInputRole = 'default' | 'cancel' | 'destructive';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Props for the TextInput component.
|
|
13
|
-
*/
|
|
14
11
|
export type TextInputProps = {
|
|
15
12
|
/**
|
|
16
13
|
* Additional styles to apply to the TextInput.
|
|
@@ -36,7 +33,7 @@ export type TextInputProps = {
|
|
|
36
33
|
*/
|
|
37
34
|
numberOfLines?: number;
|
|
38
35
|
/**
|
|
39
|
-
* Determines which keyboard to open,
|
|
36
|
+
* Determines which keyboard to open. For example, `'numeric'`.
|
|
40
37
|
*
|
|
41
38
|
* Types that work on both platforms:
|
|
42
39
|
* - default
|
|
@@ -103,6 +100,9 @@ function transformTextInputProps(props: TextInputProps): NativeTextInputProps {
|
|
|
103
100
|
};
|
|
104
101
|
}
|
|
105
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Renders a `TextInput` component.
|
|
105
|
+
*/
|
|
106
106
|
export function TextInput(props: TextInputProps) {
|
|
107
107
|
return <TextInputNativeView {...transformTextInputProps(props)} style={props.style} />;
|
|
108
108
|
}
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '0.1.1-alpha.
|
|
15
|
+
version = '0.1.1-alpha.1'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "0.1.1-alpha.
|
|
21
|
+
versionName "0.1.1-alpha.1"
|
|
22
22
|
}
|
|
23
23
|
buildFeatures {
|
|
24
24
|
compose true
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type BottomSheetProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Optional styles to apply to the `BottomSheet` component.
|
|
5
|
+
*/
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
/**
|
|
8
|
+
* The children of the `BottomSheet` component.
|
|
9
|
+
*/
|
|
10
|
+
children: any;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the `BottomSheet` is opened.
|
|
13
|
+
*/
|
|
14
|
+
isOpened: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Callback function that is called when the `BottomSheet` is opened.
|
|
17
|
+
*/
|
|
18
|
+
onIsOpenedChange: (isOpened: boolean) => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders a native `BottomSheet` component.
|
|
22
|
+
* @platform ios
|
|
23
|
+
*/
|
|
24
|
+
export declare function BottomSheet({ children }: BottomSheetProps): any;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../BottomSheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,OAEzD"}
|
package/build/Button/index.d.ts
CHANGED
|
@@ -14,21 +14,22 @@ export type ButtonRole = 'default' | 'cancel' | 'destructive';
|
|
|
14
14
|
*
|
|
15
15
|
* Common styles:
|
|
16
16
|
* - `default` - The default system button style.
|
|
17
|
-
* - `bordered` - A button with a light fill. On Android equivalent to `FilledTonalButton`.
|
|
18
|
-
* - `borderless` - A button with no background or border. On Android equivalent to `TextButton`.
|
|
17
|
+
* - `bordered` - A button with a light fill. On Android, equivalent to `FilledTonalButton`.
|
|
18
|
+
* - `borderless` - A button with no background or border. On Android, equivalent to `TextButton`.
|
|
19
|
+
*
|
|
20
|
+
* Android-only styles:
|
|
21
|
+
* - `outlined` - A button with an outline.
|
|
22
|
+
* - `elevated` - A filled button with a shadow.
|
|
19
23
|
*
|
|
20
24
|
* Apple-only styles:
|
|
21
25
|
* - `borderedProminent` - A bordered button with a prominent appearance.
|
|
22
26
|
* - `plain` - A button with no border or background and a less prominent text.
|
|
23
|
-
*
|
|
27
|
+
* macOS-only styles:
|
|
24
28
|
* - `accessoryBar` - A button style for accessory bars.
|
|
25
29
|
* - `accessoryBarAction` - A button style for accessory bar actions.
|
|
26
30
|
* - `card` - A button style for cards.
|
|
27
31
|
* - `link` - A button style for links.
|
|
28
32
|
*
|
|
29
|
-
* Android-only styles:
|
|
30
|
-
* - `outlined` - A button with an outline.
|
|
31
|
-
* - `elevated` - A filled button with a shadow.
|
|
32
33
|
*/
|
|
33
34
|
export type ButtonVariant = 'default' | 'bordered' | 'plain' | 'borderedProminent' | 'borderless' | 'accessoryBar' | 'accessoryBarAction' | 'card' | 'link' | 'outlined' | 'elevated';
|
|
34
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,MAA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C,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAQvC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAgB1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAWxC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type ColorPickerProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The currently selected color in the format `#RRGGBB` or `#RRGGBBAA`.
|
|
5
|
+
*/
|
|
6
|
+
selection: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* A label displayed on the `ColorPicker`.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback function that is called when a new color is selected.
|
|
13
|
+
*/
|
|
14
|
+
onValueChanged?: (value: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Optional style to apply to the `ColorPicker` component.
|
|
17
|
+
*/
|
|
18
|
+
style?: StyleProp<ViewStyle>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the color picker should support opacity.
|
|
21
|
+
*/
|
|
22
|
+
supportsOpacity?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Renders a `ColorPicker` component using SwiftUI.
|
|
26
|
+
* @platform ios
|
|
27
|
+
*/
|
|
28
|
+
export declare function ColorPicker({ selection, onValueChanged, ...restProps }: ColorPickerProps): import("react").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ColorPicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAExF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAWF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,EAAE,gBAAgB,+BAcxF"}
|
|
@@ -46,7 +46,7 @@ export type ContextMenuProps = {
|
|
|
46
46
|
*/
|
|
47
47
|
color?: string;
|
|
48
48
|
/**
|
|
49
|
-
* Optional styles to apply to the `ContextMenu
|
|
49
|
+
* Optional styles to apply to the `ContextMenu`.
|
|
50
50
|
*/
|
|
51
51
|
style?: StyleProp<ViewStyle>;
|
|
52
52
|
};
|
|
@@ -114,8 +114,8 @@ export declare function Preview(props: {
|
|
|
114
114
|
* `ContextMenu` allows you to create a context menu, which can be used to provide additional options to the user.
|
|
115
115
|
*
|
|
116
116
|
* There are some platform-specific differences in the behavior of the context menu:
|
|
117
|
-
* - On Android the expansion of the context menu is controlled by the
|
|
118
|
-
* - On iOS the context menu can be triggered by a single press or a long press. The `activationMethod` prop allows you to choose between these two options.
|
|
117
|
+
* - On Android, the expansion of the context menu is controlled by the `expanded` prop. iOS, does not allow for manual control of the expansion state.
|
|
118
|
+
* - On iOS, the context menu can be triggered by a single press or a long press. The `activationMethod` prop allows you to choose between these two options.
|
|
119
119
|
* - Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple sections. The `title` prop of the `Button`, which opens the submenu on iOS will be used as a section title.
|
|
120
120
|
* - Android does not support showing a `Picker` element in the context menu.
|
|
121
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAmC,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAmC,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAcxC,KAAK,cAAc,GACf,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,YAAY,CAAC,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,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,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAEzD;yBAFe,KAAK;;;AAIrB;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED;;;;;;;;GAQG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BA4B3C;kBA5BQ,WAAW;;;;;AAkCpB,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { ViewEvent } from '../src/types';
|
|
3
|
+
export type AndroidVariant = 'picker' | 'input';
|
|
4
|
+
export type IOSVariant = 'wheel' | 'automatic' | 'graphical' | 'compact';
|
|
5
|
+
export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
|
|
6
|
+
export type DateTimePickerProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The initial date to display on the picker.
|
|
9
|
+
*/
|
|
10
|
+
initialDate?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* A title displayed on the picker on iOS.
|
|
13
|
+
* @platform ios
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Callback function that is called when a date is selected.
|
|
18
|
+
*/
|
|
19
|
+
onDateSelected?: (date: Date) => void;
|
|
20
|
+
/**
|
|
21
|
+
* The variant of the picker, which determines its appearance and behavior.
|
|
22
|
+
* @platform ios
|
|
23
|
+
* @default 'automatic'
|
|
24
|
+
*/
|
|
25
|
+
iosVariant?: IOSVariant;
|
|
26
|
+
/**
|
|
27
|
+
* The variant of the picker, which determines its appearance and behavior.
|
|
28
|
+
* @platform android
|
|
29
|
+
* @default 'picker'
|
|
30
|
+
*/
|
|
31
|
+
androidVariant?: AndroidVariant;
|
|
32
|
+
/**
|
|
33
|
+
* Show to button to toggle between variants on Android.
|
|
34
|
+
* @platform android
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
showVariantToggle?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The components that the picker should display.
|
|
40
|
+
* On Android, you can have a picker that selects just the date or just the time.
|
|
41
|
+
* `dateAndTime` is only available on iOS and will result in a date picker on Android.
|
|
42
|
+
* On iOS, you can have a picker that selects both date and time.
|
|
43
|
+
* @default 'date'
|
|
44
|
+
*/
|
|
45
|
+
displayedComponents?: DisplayedComponents;
|
|
46
|
+
/**
|
|
47
|
+
* Optional style to apply to the component.
|
|
48
|
+
*/
|
|
49
|
+
style?: StyleProp<ViewStyle>;
|
|
50
|
+
/**
|
|
51
|
+
* The tint color to use on the picker elements.
|
|
52
|
+
*/
|
|
53
|
+
color?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Determines what format the clock should be displayed in on Android.
|
|
56
|
+
* @platform android
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
is24Hour?: boolean;
|
|
60
|
+
};
|
|
61
|
+
type NativeDatePickerProps = Omit<DateTimePickerProps, 'iosVariant' | 'androidVariant' | 'onDateSelected'> & {
|
|
62
|
+
variant?: IOSVariant | AndroidVariant;
|
|
63
|
+
} & ViewEvent<'onDateSelected', {
|
|
64
|
+
date: Date;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
export declare function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps;
|
|
70
|
+
/**
|
|
71
|
+
* Renders a `DateTimePicker` component.
|
|
72
|
+
*/
|
|
73
|
+
export declare function DateTimePicker(props: DateTimePickerProps): import("react").JSX.Element;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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