@expo/ui 58.0.23 → 58.0.24
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/CHANGELOG.md +16 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +6 -4
- package/android/src/main/java/expo/modules/ui/HostView.kt +33 -7
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +138 -2
- package/android/src/main/java/expo/modules/ui/SliderView.kt +5 -4
- package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +5 -4
- package/build/community/bottom-sheet/BottomSheet.android.js +2 -0
- package/build/community/bottom-sheet/BottomSheet.android.js.map +1 -1
- package/build/community/menu/MenuView.ios.js +2 -1
- package/build/community/menu/MenuView.ios.js.map +1 -1
- package/build/jetpack-compose/Text/index.js +5 -4
- package/build/jetpack-compose/Text/index.js.map +1 -1
- package/build/swift-ui/ContentUnavailableView/index.d.ts +5 -0
- package/build/swift-ui/ContentUnavailableView/index.js +7 -2
- package/build/swift-ui/ContentUnavailableView/index.js.map +1 -1
- package/build/swift-ui/RNHostView.d.ts +7 -1
- package/build/swift-ui/RNHostView.js +2 -1
- package/build/swift-ui/RNHostView.js.map +1 -1
- package/build/swift-ui/Text/index.js +2 -1
- package/build/swift-ui/Text/index.js.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +18 -0
- package/build/swift-ui/modifiers/index.js +9 -0
- package/build/swift-ui/modifiers/index.js.map +1 -1
- package/build/universal/BottomSheet/index.android.js +5 -5
- package/build/universal/BottomSheet/index.android.js.map +1 -1
- package/build/utils/flattenFragments.d.ts +7 -0
- package/build/utils/flattenFragments.js +17 -0
- package/build/utils/flattenFragments.js.map +1 -0
- package/ios/ContentUnavailableView.swift +9 -1
- package/ios/Modifiers/FontModifier.swift +27 -0
- package/ios/Modifiers/SectionIndexLabelModifier.swift +21 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +22 -0
- package/ios/RNHostView.swift +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23-sources.jar → 58.0.24/expo.modules.ui-58.0.24-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23.module → 58.0.24/expo.modules.ui-58.0.24.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23.pom → 58.0.24/expo.modules.ui-58.0.24.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha512 +1 -0
- package/package.json +1 -1
- package/src/community/bottom-sheet/BottomSheet.android.tsx +2 -1
- package/src/community/menu/MenuView.ios.tsx +3 -2
- package/src/jetpack-compose/Text/index.tsx +5 -4
- package/src/swift-ui/ContentUnavailableView/index.tsx +19 -4
- package/src/swift-ui/RNHostView.tsx +8 -1
- package/src/swift-ui/Text/index.tsx +2 -1
- package/src/swift-ui/modifiers/index.ts +19 -0
- package/src/universal/BottomSheet/index.android.tsx +3 -1
- package/src/utils/flattenFragments.ts +22 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha512 +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
2
3
|
import { type SFSymbol } from 'sf-symbols-typescript';
|
|
3
4
|
|
|
5
|
+
import { Slot } from '../SlotView';
|
|
4
6
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
7
|
import { type CommonViewModifierProps } from '../types';
|
|
6
8
|
|
|
@@ -19,15 +21,24 @@ export interface ContentUnavailableViewProps extends CommonViewModifierProps {
|
|
|
19
21
|
* Description of why the content is not available.
|
|
20
22
|
*/
|
|
21
23
|
description?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Controls shown below the description, such as a `Button` that tries again.
|
|
27
|
+
*/
|
|
28
|
+
actions?: ReactNode;
|
|
22
29
|
}
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
type NativeContentUnavailableViewProps = Omit<ContentUnavailableViewProps, 'actions'> & {
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ContentUnavailableViewNativeView: React.ComponentType<NativeContentUnavailableViewProps> =
|
|
25
36
|
requireNativeView('ExpoUI', 'ContentUnavailableView');
|
|
26
37
|
|
|
27
38
|
function transformContentUnavailableViewProps(
|
|
28
39
|
props: ContentUnavailableViewProps
|
|
29
|
-
):
|
|
30
|
-
const { modifiers, ...restProps } = props;
|
|
40
|
+
): NativeContentUnavailableViewProps {
|
|
41
|
+
const { modifiers, actions, ...restProps } = props;
|
|
31
42
|
return {
|
|
32
43
|
modifiers,
|
|
33
44
|
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
@@ -41,5 +52,9 @@ function transformContentUnavailableViewProps(
|
|
|
41
52
|
* @platform tvos 17.0+
|
|
42
53
|
*/
|
|
43
54
|
export function ContentUnavailableView(props: ContentUnavailableViewProps) {
|
|
44
|
-
return
|
|
55
|
+
return (
|
|
56
|
+
<ContentUnavailableViewNativeView {...transformContentUnavailableViewProps(props)}>
|
|
57
|
+
{props.actions != null ? <Slot name="actions">{props.actions}</Slot> : null}
|
|
58
|
+
</ContentUnavailableViewNativeView>
|
|
59
|
+
);
|
|
45
60
|
}
|
|
@@ -19,13 +19,19 @@ export interface RNHostViewProps {
|
|
|
19
19
|
*/
|
|
20
20
|
matchContents?: boolean | { vertical?: boolean; horizontal?: boolean };
|
|
21
21
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Measures the children within the space Yoga gives the `Host`. SwiftUI layout between the
|
|
24
|
+
* `Host` and this view (padding, siblings, scroll views) is not taken into account.
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
boundedByHost?: boolean;
|
|
22
28
|
/**
|
|
23
29
|
* The RN View to be hosted.
|
|
24
30
|
*/
|
|
25
31
|
children: React.ReactElement;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
|
|
34
|
+
export function RNHostView({ matchContents, boundedByHost, ...props }: RNHostViewProps) {
|
|
29
35
|
// A sheet or popover presents its content in its own view controller, where the React Native
|
|
30
36
|
// surface root is not an ancestor and so touch dispatches don't work.
|
|
31
37
|
// Hosted content there owns its touches and is the origin it is measured from; native reads
|
|
@@ -41,6 +47,7 @@ export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
|
|
|
41
47
|
matchContentsHorizontal={matchContentsHorizontal}
|
|
42
48
|
matchContentsVertical={matchContentsVertical}
|
|
43
49
|
expoInternalSizeFromChildren={matchContentsHorizontal || matchContentsVertical}
|
|
50
|
+
expoInternalBoundedByHost={boundedByHost}
|
|
44
51
|
// `matchContents` can only be used once on mount
|
|
45
52
|
// So we force unmount when it changes to prevent unexpected layout
|
|
46
53
|
key={`${matchContentsHorizontal}-${matchContentsVertical}`}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
+
import { flattenFragments } from '../../utils/flattenFragments';
|
|
4
5
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
6
|
import { type ClosedRangeDate, type CommonViewModifierProps } from '../types';
|
|
6
7
|
|
|
@@ -98,7 +99,7 @@ export function Text(props: TextProps) {
|
|
|
98
99
|
return null;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
const childArray =
|
|
102
|
+
const childArray = flattenFragments(children);
|
|
102
103
|
if (childArray.length === 0) return null;
|
|
103
104
|
|
|
104
105
|
const isSimpleText = childArray.every(
|
|
@@ -1458,6 +1458,16 @@ export const font = (params: {
|
|
|
1458
1458
|
| 'footnote'
|
|
1459
1459
|
| 'caption'
|
|
1460
1460
|
| 'caption2';
|
|
1461
|
+
/**
|
|
1462
|
+
* Draws both lowercase and uppercase letters as small capitals.
|
|
1463
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/smallcaps()).
|
|
1464
|
+
*/
|
|
1465
|
+
smallCaps?: boolean;
|
|
1466
|
+
/**
|
|
1467
|
+
* The space between lines of text, relative to the font's standard leading.
|
|
1468
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/leading(_:)).
|
|
1469
|
+
*/
|
|
1470
|
+
leading?: 'standard' | 'tight' | 'loose';
|
|
1461
1471
|
}) => createModifier('font', params);
|
|
1462
1472
|
/**
|
|
1463
1473
|
* A standard size for Dynamic Type, from `xSmall` through the five
|
|
@@ -1734,6 +1744,15 @@ export type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grou
|
|
|
1734
1744
|
*/
|
|
1735
1745
|
export const listStyle = (style: ListStyle) => createModifier('listStyle', { style });
|
|
1736
1746
|
|
|
1747
|
+
/**
|
|
1748
|
+
* Sets the label that a list's section index shows for this `Section`. People tap or drag along
|
|
1749
|
+
* the index to scroll the list to the section. On versions before iOS 26 it does nothing.
|
|
1750
|
+
* @param label - The label for the section, usually a single letter.
|
|
1751
|
+
* @platform ios 26.0+
|
|
1752
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/sectionindexlabel(_:)).
|
|
1753
|
+
*/
|
|
1754
|
+
export const sectionIndexLabel = (label: string) => createModifier('sectionIndexLabel', { label });
|
|
1755
|
+
|
|
1737
1756
|
/**
|
|
1738
1757
|
* Adds a luminance to alpha effect to this view.
|
|
1739
1758
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/SwiftUI/View/luminanceToAlpha()).
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
type ModifierConfig,
|
|
7
7
|
} from '@expo/ui/jetpack-compose/modifiers';
|
|
8
8
|
import { useEffect, useRef, useState } from 'react';
|
|
9
|
+
import { StyleSheet } from 'react-native';
|
|
9
10
|
|
|
10
11
|
import { useIsInsideNativeTree } from '../../NativeTreeContext';
|
|
11
12
|
import type { BottomSheetProps, SnapPoint } from './types';
|
|
@@ -102,7 +103,8 @@ export function BottomSheet({
|
|
|
102
103
|
return sheet;
|
|
103
104
|
}
|
|
104
105
|
return (
|
|
105
|
-
|
|
106
|
+
// Fill the parent, so `removeClippedSubviews` doesn't detach a zero-size host.
|
|
107
|
+
<Host style={StyleSheet.absoluteFill} pointerEvents="none">
|
|
106
108
|
{sheet}
|
|
107
109
|
</Host>
|
|
108
110
|
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Like `React.Children.toArray`, but also flattens `React.Fragment` children so
|
|
5
|
+
* their contents are treated as direct children. Keys of nested elements are
|
|
6
|
+
* prefixed with the fragment's key to stay unique.
|
|
7
|
+
*/
|
|
8
|
+
export function flattenFragments(children: React.ReactNode): React.ReactNode[] {
|
|
9
|
+
return React.Children.toArray(children).flatMap((child) => {
|
|
10
|
+
if (
|
|
11
|
+
React.isValidElement<{ children?: React.ReactNode }>(child) &&
|
|
12
|
+
child.type === React.Fragment
|
|
13
|
+
) {
|
|
14
|
+
return flattenFragments(child.props.children).map((nested) =>
|
|
15
|
+
React.isValidElement(nested)
|
|
16
|
+
? React.cloneElement(nested, { key: `${child.key}${nested.key}` })
|
|
17
|
+
: nested
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return child;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4363fa4b990255ed9fb723cae45368cf
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ab9fe4d79b8ab44c10f285cdc817c2772b1628be
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4ee2c0ad4fd1bd658bdb798f98175ff9e2aa611111d7903ecf08100e6a30993b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b26a89fb05660b23803476e429d601d1748e326174f8e14f1cf41b81136ee433430b89e6f8ff8a0416fe395849622e90460ace881524eb25ee7535e9e8145349
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e67ac71a9fce6fac7aecbd8d681af3b9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cacbac944e97aa2e56e6e7095d5ab64bff82fe73
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f671f187a74250ba996b92e17f0c80993c0d8108de7bdd9acd90d7b489025e97
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
af535bbaf8b95e60596de23f669fba4cdd80bdc7a0348baea99c16ce43bcc01cc5ffa1e7b84a5b90c5dc4e63be193ad6b91ce972d114e353f38b3e9605d3f37b
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1f7365033b3d90d1a6c159539e4873ee
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ac6c7e9eb38f62047ab9db03a8e2d95e3fe6b0a1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
418e45206f42efb489f42ed18e5b723cc3f1f9fb1abbf3f32d17033b7119049d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b80563b657625ec8904ed747a0050cf9e9d5a07d616ec2d96aa1857dd88b3bcbe7152aade79b0d4766b1b31546b24adf6acc05ec77a11b082bd8a03db2265071
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
33803d7b5efb8d4960860cb0afd385b7
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
084a07045eafbc0189dba01de4090f037c9e0877
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f8dba5118733f8693617b5734eded16d6561fb4b99a775f24474d5a0cae715c4
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
346a85307de71e2c04a7d8de5d73695d9fbe064b6363bd6bbe24819c477a9b737b2173358ae0c2a7377a55c4644cc22f0489095cd93a7cfb052e7a35b83d2324
|