From a089c97eb7861f1a86a3ba41a4f82a708abfbba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nishan=20=28o=5E=E2=96=BD=5Eo=29?= Date: Tue, 17 Feb 2026 09:48:57 +0530 Subject: [PATCH 1/6] [ui][ios] Fix ColorPicker onSelectionChange callback never firing (#43180) --- packages/expo-ui/CHANGELOG.md | 1 + packages/expo-ui/ios/ColorPickerView.swift | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/expo-ui/CHANGELOG.md b/packages/expo-ui/CHANGELOG.md index 735d5926f52fb1..478de0db4809e8 100644 --- a/packages/expo-ui/CHANGELOG.md +++ b/packages/expo-ui/CHANGELOG.md @@ -20,6 +20,7 @@ ### šŸ› Bug fixes +- [iOS] Fix `ColorPicker` `onSelectionChange` callback never firing due to native event name mismatch. ([#43180](https://github.com/expo/expo/pull/43180) by [@nishan](https://github.com/intergalacticspacehighway)) - [iOS] Fix `clipShape` and `mask` modifiers silently falling through to `Rectangle()` for `capsule` and `ellipse` shapes. ([#43158](https://github.com/expo/expo/pull/43158) by [@ramonclaudio](https://github.com/ramonclaudio)) - [iOS] Fix rendering `0` in SwiftUI Text. ([#43036](https://github.com/expo/expo/pull/43036) by [@jakex7](https://github.com/jakex7)) - [iOS] Set initial state in `init` instead of `onAppear` in `DatePicker`, `Section`, `DisclosureGroup`, `Popover`, and `ColorPicker` components. ([#42933](https://github.com/expo/expo/pull/42933) by [@nishan](https://github.com/intergalacticspacehighway)) diff --git a/packages/expo-ui/ios/ColorPickerView.swift b/packages/expo-ui/ios/ColorPickerView.swift index 524b2418df3f27..12128c2b4882d5 100644 --- a/packages/expo-ui/ios/ColorPickerView.swift +++ b/packages/expo-ui/ios/ColorPickerView.swift @@ -7,7 +7,7 @@ final class ColorPickerProps: UIBaseViewProps { @Field var selection: Color = .clear @Field var label: String? @Field var supportsOpacity: Bool = true - var onValueChanged = EventDispatcher() + var onSelectionChange = EventDispatcher() } struct ColorPickerView: ExpoSwiftUI.View { @@ -29,7 +29,7 @@ struct ColorPickerView: ExpoSwiftUI.View { if newHex != previousHex { previousHex = newHex let payload = ["value": newHex] - props.onValueChanged(payload) + props.onSelectionChange(payload) } } #else From ac5109b95c99d4ce196f2d84febf56c465df51b5 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Tue, 17 Feb 2026 08:23:53 +0100 Subject: [PATCH 2/6] [notifications] add custom sound existence validation (#43189) # Why adds custom sound validation (closes #40954), and improves a push token warning on simulators this validates sound resource existence on iOS when calling `scheduleNotificationAsync`, and on Android when creating a `channel`. # How - notification tester app # Test Plan via the added examples # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --- .../scripts/prebuild-android.sh | 2 +- .../scripts/prebuild-ios.sh | 2 +- .../notification-tester/src/app/scenarios.tsx | 28 +++++++++ packages/expo-notifications/CHANGELOG.md | 2 + .../notifications/SoundResolver.java | 58 ------------------ .../notifications/SoundResolver.kt | 59 +++++++++++++++++++ .../NotificationChannelManagerModule.kt | 6 ++ .../AndroidXNotificationsChannelManager.java | 11 ++++ .../managers/NotificationsChannelManager.java | 2 + .../build/Notifications.types.d.ts | 5 +- .../build/Notifications.types.d.ts.map | 2 +- .../build/Notifications.types.js.map | 2 +- .../Notifications/NotificationRecords.swift | 23 ++++++++ .../Scheduling/SchedulerModule.swift | 7 +++ .../PushToken/PushTokenModule.swift | 8 ++- .../src/Notifications.types.ts | 5 +- 16 files changed, 156 insertions(+), 66 deletions(-) delete mode 100644 packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/SoundResolver.java create mode 100644 packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/SoundResolver.kt diff --git a/apps/notification-tester/scripts/prebuild-android.sh b/apps/notification-tester/scripts/prebuild-android.sh index 0bd7395cedb728..6e79b9519952fb 100755 --- a/apps/notification-tester/scripts/prebuild-android.sh +++ b/apps/notification-tester/scripts/prebuild-android.sh @@ -1,6 +1,6 @@ #!/bin/bash -RELEASE=1 MICROFOAM_GOOGLE_SERVICES_JSON=~/google-services-microfoam-vonovak.json EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p android --template expo-template-bare-minimum@canary +RELEASE=1 MICROFOAM_GOOGLE_SERVICES_JSON=~/google-services-microfoam-vonovak.json EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p android --template expo-template-bare-minimum@55 echo 'include(":expo-modules-test-core")' >> ./android/settings.gradle diff --git a/apps/notification-tester/scripts/prebuild-ios.sh b/apps/notification-tester/scripts/prebuild-ios.sh index 2bffde3f1edbbd..4fb85fc14c1c49 100755 --- a/apps/notification-tester/scripts/prebuild-ios.sh +++ b/apps/notification-tester/scripts/prebuild-ios.sh @@ -1,3 +1,3 @@ #!/bin/bash -EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p ios --template expo-template-bare-minimum@canary && xed ios +EXPO_NO_GIT_STATUS=1 EXPO_DEBUG=1 npx expo prebuild --clean -p ios --template expo-template-bare-minimum@55 && xed ios diff --git a/apps/notification-tester/src/app/scenarios.tsx b/apps/notification-tester/src/app/scenarios.tsx index 11a457e9339a37..a44f87d7947764 100644 --- a/apps/notification-tester/src/app/scenarios.tsx +++ b/apps/notification-tester/src/app/scenarios.tsx @@ -9,6 +9,34 @@ import { ScrollView } from '../misc/Themed'; export default function ScenariosPage() { return ( + Local notification with custom sound + { + await Notifications.scheduleNotificationAsync({ + content: { + title: 'Custom sound test', + body: 'This should play bells_sound.wav', + sound: 'bells_sound.wav', + }, + trigger: null, + }); + }} + /> + { + await Notifications.scheduleNotificationAsync({ + content: { + title: 'Missing sound test', + body: 'This should warn about missing sound', + sound: 'does_not_exist.wav', + }, + trigger: null, + }); + }} + /> + Send push notification with deep link if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (!channelManager.customSoundExists(channelOptions)) { + appContext.jsLogger?.error( + "expo-notifications: Custom sound '${channelOptions.getString("sound", null)}' not found in native app. " + + "Make sure the sound file (e.g. 'custom_sound.wav') is included in the expo-notifications config plugin sounds array in app config." + ) + } val channel = channelManager.createNotificationChannel( channelId, getNameFromOptions(channelOptions), diff --git a/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelManager.java b/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelManager.java index 829c565ecf7ba7..a45668c5298e6c 100644 --- a/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelManager.java +++ b/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/AndroidXNotificationsChannelManager.java @@ -138,6 +138,17 @@ protected void configureChannelWithOptions(Object maybeChannel, ReadableArgument } } + public boolean customSoundExists(ReadableArguments args) { + if (!args.containsKey(SOUND_KEY)) { + return true; + } + String filename = args.getString(SOUND_KEY); + if (filename == null) { + return true; + } + return mSoundResolver.resourceExists(filename); + } + @Nullable protected Uri createSoundUriFromArguments(ReadableArguments args) { // The default is... the default sound. diff --git a/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelManager.java b/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelManager.java index 8f384b107a8134..851d9cf59d86c0 100644 --- a/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelManager.java +++ b/packages/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/channels/managers/NotificationsChannelManager.java @@ -25,4 +25,6 @@ public interface NotificationsChannelManager { @RequiresApi(api = Build.VERSION_CODES.O) NotificationChannel createNotificationChannel(@NonNull String channelId, CharSequence name, int importance, ReadableArguments channelOptions); + + boolean customSoundExists(ReadableArguments channelOptions); } diff --git a/packages/expo-notifications/build/Notifications.types.d.ts b/packages/expo-notifications/build/Notifications.types.d.ts index 0e759ca8b0b431..14c3b55597eb5e 100644 --- a/packages/expo-notifications/build/Notifications.types.d.ts +++ b/packages/expo-notifications/build/Notifications.types.d.ts @@ -520,7 +520,10 @@ export type NotificationContentInput = { * The notification sound. Use `false` for a silent notification. * On Android version 8 and later, control the sounds via [notification channels](#setNotificationChannelAsync). * `defaultCritical` and `defaultRingtone` are applicable only on iOS, with `defaultCritical` requiring the critical alerts entitlement. - * */ + * + * On iOS, you can also provide a custom sound filename including the extension. The file needs to be added + * to the `expo-notifications` config plugin `sounds` array in your app config. + */ sound?: boolean | 'default' | 'defaultCritical' | 'defaultRingtone' | (string & {}); /** * The name of the image or storyboard to use when your app launches because of the notification. diff --git a/packages/expo-notifications/build/Notifications.types.d.ts.map b/packages/expo-notifications/build/Notifications.types.d.ts.map index dd8073bdf6093f..ac6f3323f785b8 100644 --- a/packages/expo-notifications/build/Notifications.types.d.ts.map +++ b/packages/expo-notifications/build/Notifications.types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE;QACd,GAAG,CAAC,EAAE,MAAM,CAAC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;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;KAEK;AACL,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;AAEhF;;KAEK;AACL,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B;;;KAGK;AACL,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C;;OAEG;IACH,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,CAAC"} \ No newline at end of file +{"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;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EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;KAEK;AACL,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;AAEhF;;KAEK;AACL,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B;;;KAGK;AACL,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C;;OAEG;IACH,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,CAAC"} \ No newline at end of file diff --git a/packages/expo-notifications/build/Notifications.types.js.map b/packages/expo-notifications/build/Notifications.types.js.map index 0bf26b58893850..707ee80aad65bd 100644 --- a/packages/expo-notifications/build/Notifications.types.js.map +++ b/packages/expo-notifications/build/Notifications.types.js.map @@ -1 +1 @@ -{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAkQA;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;IACjB,6CAAa,CAAA;IACb,8DAA8B,CAAA;AAChC,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAmID;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AA0YD,OAAO,EAIL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * An object which represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html).\n */\nimport type { EventSubscription } from 'expo-modules-core';\n\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n isRepeatedDay: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * Indicates whether notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * Indicates whether notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a monthly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface MonthlyNotificationTrigger {\n type: 'monthly';\n day: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | LocationNotificationTrigger\n | NotificationTriggerInput\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n/**\n * Schedulable trigger inputs (that are not a plain date value or time value)\n * must have the \"type\" property set to one of these values.\n */\nexport enum SchedulableTriggerInputTypes {\n CALENDAR = 'calendar',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n MONTHLY = 'monthly',\n YEARLY = 'yearly',\n DATE = 'date',\n TIME_INTERVAL = 'timeInterval',\n}\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (controlled by the value of `repeats`)\n * when the date components match the specified values.\n * Corresponds to native\n * [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = {\n type: SchedulableTriggerInputTypes.CALENDAR;\n channelId?: string;\n repeats?: boolean;\n seconds?: number;\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per day\n * when the `hour` and `minute` date components match the specified values.\n */\nexport type DailyTriggerInput = {\n type: SchedulableTriggerInputTypes.DAILY;\n channelId?: string;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every week\n * when the `weekday`, `hour`, and `minute` date components match the specified values.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport type WeeklyTriggerInput = {\n type: SchedulableTriggerInputTypes.WEEKLY;\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per month\n * when the `day`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type MonthlyTriggerInput = {\n type: SchedulableTriggerInputTypes.MONTHLY;\n channelId?: string;\n day: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every year\n * when the `day`, `month`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type YearlyTriggerInput = {\n type: SchedulableTriggerInputTypes.YEARLY;\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once\n * on the specified value of the `date` property. The value of `repeats` will be ignored\n * for this trigger type.\n */\nexport type DateTriggerInput = {\n type: SchedulableTriggerInputTypes.DATE;\n date: Date | number;\n channelId?: string;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater.\n * Otherwise, the notification won't be triggered.\n */\nexport type TimeIntervalTriggerInput = {\n type: SchedulableTriggerInputTypes.TIME_INTERVAL;\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n};\n\n/**\n * Input for time-based, schedulable triggers.\n * For these triggers you can check the next trigger date with [`getNextTriggerDateAsync`](#getnexttriggerdateasynctrigger).\n * If you pass in a `number` (Unix timestamp) or `Date`, it will be processed as a\n * trigger input of type [`SchedulableTriggerInputTypes.DATE`](#date). Otherwise, the input must be\n * an object, with a `type` value set to one of the allowed values in [`SchedulableTriggerInputTypes`](#schedulabletriggerinputtypes).\n * If the input is an object, date components passed in will be validated, and\n * an error is thrown if they are outside their allowed range (for example, the `minute` and\n * `second` components must be between 0 and 59 inclusive).\n */\nexport type SchedulableNotificationTriggerInput =\n | CalendarTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | MonthlyTriggerInput\n | YearlyTriggerInput\n | DateTriggerInput;\n\n/**\n * A type which represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n * @platform android\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object representing notification's content when reading a notification (on the \"output\", when it is presented by the system). For the input type, see [`NotificationContentInput`](#notificationcontentinput).\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data?: Record;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | 'defaultRingtone' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\nexport type InterruptionLevel = 'passive' | 'active' | 'timeSensitive' | 'critical';\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n * @platform ios\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n\n interruptionLevel?: InterruptionLevel;\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n * @platform android\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object which represents notification content that you pass in as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * The notification sound. Use `false` for a silent notification.\n * On Android version 8 and later, control the sounds via [notification channels](#setNotificationChannelAsync).\n * `defaultCritical` and `defaultRingtone` are applicable only on iOS, with `defaultCritical` requiring the critical alerts entitlement.\n * */\n sound?: boolean | 'default' | 'defaultCritical' | 'defaultRingtone' | (string & {});\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n /*\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: InterruptionLevel;\n};\n\n/**\n * An object which represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object which represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object which represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification, `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object which represents behavior that should be applied to the incoming notification. On Android, this influences whether the notification is shown, a sound is played, and priority. On iOS, this maps directly to [`UNNotificationPresentationOptions`](https://developer.apple.com/documentation/usernotifications/unnotificationpresentationoptions).\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n /**\n * @deprecated instead, specify `shouldShowBanner` and / or `shouldShowList`\n * */\n shouldShowAlert?: boolean;\n shouldShowBanner: boolean;\n shouldShowList: boolean;\n shouldPlaySound: boolean;\n /**\n * @platform ios\n */\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n/**\n * Defines a group of notification actions and their behavior. Categories allow you to create custom\n * action buttons that appear with notifications, enabling users to respond to notifications.\n *\n * Categories must be registered with [`setNotificationCategoryAsync`](#notificationssetnotificationcategoryasyncidentifier-actions-options)\n * before they can be used. When scheduling a notification, reference the category by its `identifier` in the\n * [`NotificationContentInput.categoryIdentifier`](#notificationcontentinput) field.\n */\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * Indicates whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * Indicates whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * Indicates whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * Indicates whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * @deprecated the option is ignored by iOS. This option will be removed in a future release.\n * Indicates whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\n/**\n * @hidden\n * */\nexport type MaybeNotificationResponse = NotificationResponse | null | undefined;\n\n/**\n * @deprecated use the [`EventSubscription`](#eventsubscription) type instead\n * */\nexport type Subscription = EventSubscription;\n\nexport {\n PermissionExpiration,\n PermissionResponse,\n EventSubscription,\n PermissionStatus,\n} from 'expo-modules-core';\n\n/**\n * Payload for the background notification handler task.\n * [Read more](#run-javascript-in-response-to-incoming-notifications).\n * */\nexport type NotificationTaskPayload =\n | NotificationResponse\n | {\n /**\n * Object describing the remote notification. `null` for headless background notifications.\n */\n notification: Record | null;\n /**\n * `dataString` carries the data payload of the notification as JSON string.\n */\n data: {\n dataString?: string;\n [key: string]: unknown;\n };\n /**\n * Detailed, raw object describing the remote notification. [See more](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification#Payload-key-reference).\n * @platform ios\n */\n aps?: Record;\n };\n"]} \ No newline at end of file +{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAkQA;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;IACjB,6CAAa,CAAA;IACb,8DAA8B,CAAA;AAChC,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAmID;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AA6YD,OAAO,EAIL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * An object which represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html).\n */\nimport type { EventSubscription } from 'expo-modules-core';\n\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n isRepeatedDay: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * Indicates whether notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * Indicates whether notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a monthly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface MonthlyNotificationTrigger {\n type: 'monthly';\n day: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | LocationNotificationTrigger\n | NotificationTriggerInput\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n/**\n * Schedulable trigger inputs (that are not a plain date value or time value)\n * must have the \"type\" property set to one of these values.\n */\nexport enum SchedulableTriggerInputTypes {\n CALENDAR = 'calendar',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n MONTHLY = 'monthly',\n YEARLY = 'yearly',\n DATE = 'date',\n TIME_INTERVAL = 'timeInterval',\n}\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (controlled by the value of `repeats`)\n * when the date components match the specified values.\n * Corresponds to native\n * [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = {\n type: SchedulableTriggerInputTypes.CALENDAR;\n channelId?: string;\n repeats?: boolean;\n seconds?: number;\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per day\n * when the `hour` and `minute` date components match the specified values.\n */\nexport type DailyTriggerInput = {\n type: SchedulableTriggerInputTypes.DAILY;\n channelId?: string;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every week\n * when the `weekday`, `hour`, and `minute` date components match the specified values.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport type WeeklyTriggerInput = {\n type: SchedulableTriggerInputTypes.WEEKLY;\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per month\n * when the `day`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type MonthlyTriggerInput = {\n type: SchedulableTriggerInputTypes.MONTHLY;\n channelId?: string;\n day: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every year\n * when the `day`, `month`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type YearlyTriggerInput = {\n type: SchedulableTriggerInputTypes.YEARLY;\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once\n * on the specified value of the `date` property. The value of `repeats` will be ignored\n * for this trigger type.\n */\nexport type DateTriggerInput = {\n type: SchedulableTriggerInputTypes.DATE;\n date: Date | number;\n channelId?: string;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater.\n * Otherwise, the notification won't be triggered.\n */\nexport type TimeIntervalTriggerInput = {\n type: SchedulableTriggerInputTypes.TIME_INTERVAL;\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n};\n\n/**\n * Input for time-based, schedulable triggers.\n * For these triggers you can check the next trigger date with [`getNextTriggerDateAsync`](#getnexttriggerdateasynctrigger).\n * If you pass in a `number` (Unix timestamp) or `Date`, it will be processed as a\n * trigger input of type [`SchedulableTriggerInputTypes.DATE`](#date). Otherwise, the input must be\n * an object, with a `type` value set to one of the allowed values in [`SchedulableTriggerInputTypes`](#schedulabletriggerinputtypes).\n * If the input is an object, date components passed in will be validated, and\n * an error is thrown if they are outside their allowed range (for example, the `minute` and\n * `second` components must be between 0 and 59 inclusive).\n */\nexport type SchedulableNotificationTriggerInput =\n | CalendarTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | MonthlyTriggerInput\n | YearlyTriggerInput\n | DateTriggerInput;\n\n/**\n * A type which represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n * @platform android\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object representing notification's content when reading a notification (on the \"output\", when it is presented by the system). For the input type, see [`NotificationContentInput`](#notificationcontentinput).\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data?: Record;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | 'defaultRingtone' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\nexport type InterruptionLevel = 'passive' | 'active' | 'timeSensitive' | 'critical';\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n * @platform ios\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n\n interruptionLevel?: InterruptionLevel;\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n * @platform android\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object which represents notification content that you pass in as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * The notification sound. Use `false` for a silent notification.\n * On Android version 8 and later, control the sounds via [notification channels](#setNotificationChannelAsync).\n * `defaultCritical` and `defaultRingtone` are applicable only on iOS, with `defaultCritical` requiring the critical alerts entitlement.\n *\n * On iOS, you can also provide a custom sound filename including the extension. The file needs to be added\n * to the `expo-notifications` config plugin `sounds` array in your app config.\n */\n sound?: boolean | 'default' | 'defaultCritical' | 'defaultRingtone' | (string & {});\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n /*\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: InterruptionLevel;\n};\n\n/**\n * An object which represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object which represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object which represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification, `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object which represents behavior that should be applied to the incoming notification. On Android, this influences whether the notification is shown, a sound is played, and priority. On iOS, this maps directly to [`UNNotificationPresentationOptions`](https://developer.apple.com/documentation/usernotifications/unnotificationpresentationoptions).\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n /**\n * @deprecated instead, specify `shouldShowBanner` and / or `shouldShowList`\n * */\n shouldShowAlert?: boolean;\n shouldShowBanner: boolean;\n shouldShowList: boolean;\n shouldPlaySound: boolean;\n /**\n * @platform ios\n */\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n/**\n * Defines a group of notification actions and their behavior. Categories allow you to create custom\n * action buttons that appear with notifications, enabling users to respond to notifications.\n *\n * Categories must be registered with [`setNotificationCategoryAsync`](#notificationssetnotificationcategoryasyncidentifier-actions-options)\n * before they can be used. When scheduling a notification, reference the category by its `identifier` in the\n * [`NotificationContentInput.categoryIdentifier`](#notificationcontentinput) field.\n */\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * Indicates whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * Indicates whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * Indicates whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * Indicates whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * @deprecated the option is ignored by iOS. This option will be removed in a future release.\n * Indicates whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\n/**\n * @hidden\n * */\nexport type MaybeNotificationResponse = NotificationResponse | null | undefined;\n\n/**\n * @deprecated use the [`EventSubscription`](#eventsubscription) type instead\n * */\nexport type Subscription = EventSubscription;\n\nexport {\n PermissionExpiration,\n PermissionResponse,\n EventSubscription,\n PermissionStatus,\n} from 'expo-modules-core';\n\n/**\n * Payload for the background notification handler task.\n * [Read more](#run-javascript-in-response-to-incoming-notifications).\n * */\nexport type NotificationTaskPayload =\n | NotificationResponse\n | {\n /**\n * Object describing the remote notification. `null` for headless background notifications.\n */\n notification: Record | null;\n /**\n * `dataString` carries the data payload of the notification as JSON string.\n */\n data: {\n dataString?: string;\n [key: string]: unknown;\n };\n /**\n * Detailed, raw object describing the remote notification. [See more](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification#Payload-key-reference).\n * @platform ios\n */\n aps?: Record;\n };\n"]} \ No newline at end of file diff --git a/packages/expo-notifications/ios/ExpoNotifications/Notifications/NotificationRecords.swift b/packages/expo-notifications/ios/ExpoNotifications/Notifications/NotificationRecords.swift index 2d35e87c1d428e..58f69014923a0d 100644 --- a/packages/expo-notifications/ios/ExpoNotifications/Notifications/NotificationRecords.swift +++ b/packages/expo-notifications/ios/ExpoNotifications/Notifications/NotificationRecords.swift @@ -86,6 +86,7 @@ enum NotificationSoundEnum: String, Enumerable { return UNNotificationSound(named: UNNotificationSoundName(rawValue: soundName)) } } + } public struct ThumbnailClipAreaRecord: Record { @@ -386,6 +387,28 @@ public struct NotificationContentRecord: Record { return content } + + func customSoundExists() -> Bool { + guard let sound = sound, + let soundName = try? sound.as(String.self) else { + return true + } + let soundEnum = NotificationSoundEnum(rawValue: soundName) ?? .custom + guard soundEnum == .custom else { + return true + } + return notificationSoundExists(named: soundName) + } + + private func notificationSoundExists(named name: String) -> Bool { + let last = (name as NSString).lastPathComponent + let base = (last as NSString).deletingPathExtension + let ext = (last as NSString).pathExtension + + guard !base.isEmpty, !ext.isEmpty else { return false } + + return Bundle.main.url(forResource: base, withExtension: ext) != nil + } } public struct NotificationRequestRecord: Record { diff --git a/packages/expo-notifications/ios/ExpoNotifications/Notifications/Scheduling/SchedulerModule.swift b/packages/expo-notifications/ios/ExpoNotifications/Notifications/Scheduling/SchedulerModule.swift index 2409b367d05c2c..bd35ec37b046b0 100644 --- a/packages/expo-notifications/ios/ExpoNotifications/Notifications/Scheduling/SchedulerModule.swift +++ b/packages/expo-notifications/ios/ExpoNotifications/Notifications/Scheduling/SchedulerModule.swift @@ -123,6 +123,13 @@ open class SchedulerModule: Module { guard let appContext = appContext else { return nil } + if !content.customSoundExists() { + let soundName = (try? content.sound?.as(String.self)) ?? "unknown" + appContext.jsLogger.error( + "expo-notifications: Custom sound '\(soundName)' not found in native app. " + + "Make sure the sound file (e.g. 'custom_sound.wav') is included in the expo-notifications config plugin sounds array in app config." + ) + } return try UNNotificationRequest( identifier: identifier, content: content.toUNMutableNotificationContent(), diff --git a/packages/expo-notifications/ios/ExpoNotifications/PushToken/PushTokenModule.swift b/packages/expo-notifications/ios/ExpoNotifications/PushToken/PushTokenModule.swift index a3c082533516dc..b527e3de0dbf86 100644 --- a/packages/expo-notifications/ios/ExpoNotifications/PushToken/PushTokenModule.swift +++ b/packages/expo-notifications/ios/ExpoNotifications/PushToken/PushTokenModule.swift @@ -32,8 +32,12 @@ To obtain the push token, await the result of the newer call. } #if targetEnvironment(simulator) - if let appContext = appContext { - appContext.jsLogger.warn("expo-notifications: obtaining a push token may not work on iOS simulators due to an iOS issue. To obtain a push token, use a real device. Read more: https://developer.apple.com/forums/thread/795433") + // Log warning only for iOS 26.0 simulator due to known issue + let os = ProcessInfo.processInfo.operatingSystemVersion + if os.majorVersion == 26 && os.minorVersion == 0 { + if let appContext = appContext { + appContext.jsLogger.warn("expo-notifications: obtaining a push token may not reliably work on the iOS 26.0 simulator due to an iOS issue. To obtain a push token, use a real device. Read more: https://developer.apple.com/forums/thread/795433") + } } #endif promiseNotYetResolved = promise diff --git a/packages/expo-notifications/src/Notifications.types.ts b/packages/expo-notifications/src/Notifications.types.ts index 479816e761b92a..c1d95260161757 100644 --- a/packages/expo-notifications/src/Notifications.types.ts +++ b/packages/expo-notifications/src/Notifications.types.ts @@ -569,7 +569,10 @@ export type NotificationContentInput = { * The notification sound. Use `false` for a silent notification. * On Android version 8 and later, control the sounds via [notification channels](#setNotificationChannelAsync). * `defaultCritical` and `defaultRingtone` are applicable only on iOS, with `defaultCritical` requiring the critical alerts entitlement. - * */ + * + * On iOS, you can also provide a custom sound filename including the extension. The file needs to be added + * to the `expo-notifications` config plugin `sounds` array in your app config. + */ sound?: boolean | 'default' | 'defaultCritical' | 'defaultRingtone' | (string & {}); /** * The name of the image or storyboard to use when your app launches because of the notification. From 217157960eaf7bcca3c217f6b91d2366c9ad87fe Mon Sep 17 00:00:00 2001 From: Jakub Tkacz <32908614+Ubax@users.noreply.github.com> Date: Tue, 17 Feb 2026 08:29:54 +0100 Subject: [PATCH 3/6] [expo-router][ios] add support for renderingMode of xcassets in header items and bottom tabs (#43185) # Why Before the `xcasset` prop was not adjustable for react-native-screens components. By utilizing the `react-native` loader for loading them we can now unify the API between toolbar and native tabs Simulator Screenshot - iPhone 17 Pro - 2026-02-16
at 19 32 48 # How When xcasset is rendered in the left or right placement of toolbar or in native tabs, then pass `src={{ uri: xcasset }}` to `react-native-screens` # Test Plan # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --- .../native-navigation/app/header-items.tsx | 6 +- docs/pages/router/advanced/native-tabs.mdx | 4 +- .../unversioned/expo-router-native-tabs.json | 2 +- .../static/data/unversioned/expo-router.json | 2 +- .../data/v55.0.0/expo-router-native-tabs.json | 2 +- .../static/data/v55.0.0/expo-router.json | 2 +- packages/expo-router/CHANGELOG.md | 2 + .../stack-utils/toolbar/StackToolbarButton.js | 2 +- .../toolbar/StackToolbarButton.js.map | 2 +- .../stack-utils/toolbar/StackToolbarMenu.d.ts | 2 +- .../toolbar/StackToolbarMenu.d.ts.map | 2 +- .../stack-utils/toolbar/StackToolbarMenu.js | 6 +- .../toolbar/StackToolbarMenu.js.map | 2 +- .../layouts/stack-utils/toolbar/shared.d.ts | 2 +- .../stack-utils/toolbar/shared.d.ts.map | 2 +- .../layouts/stack-utils/toolbar/shared.js | 29 ++--- .../layouts/stack-utils/toolbar/shared.js.map | 2 +- .../toolbar/toolbar-primitives.d.ts | 3 - .../toolbar/toolbar-primitives.d.ts.map | 2 +- .../toolbar/toolbar-primitives.js.map | 2 +- .../build/native-tabs/common/elements.d.ts | 7 +- .../native-tabs/common/elements.d.ts.map | 2 +- .../build/native-tabs/common/elements.js.map | 2 +- .../build/native-tabs/utils/icon.d.ts.map | 2 +- .../build/native-tabs/utils/icon.js | 18 ++- .../build/native-tabs/utils/icon.js.map | 2 +- .../__tests__/StackToolbarButton.test.ios.tsx | 5 +- .../stack-utils/__tests__/shared.test.ios.tsx | 114 ++++++++++-------- .../toolbar/StackToolbarButton.tsx | 2 +- .../stack-utils/toolbar/StackToolbarMenu.tsx | 7 +- .../src/layouts/stack-utils/toolbar/shared.ts | 36 +++--- .../toolbar/toolbar-primitives.tsx | 3 - .../src/native-tabs/common/elements.tsx | 7 +- .../expo-router/src/native-tabs/utils/icon.ts | 19 ++- 34 files changed, 147 insertions(+), 157 deletions(-) diff --git a/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx b/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx index 986a6b8a67860e..40b65ec7dcad34 100644 --- a/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx +++ b/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx @@ -321,7 +321,6 @@ export default function HeaderItemsScreen() { {/* Xcasset icon buttons */} @@ -333,10 +332,7 @@ export default function HeaderItemsScreen() { {/* Xcasset icon menus */} - ); } diff --git a/apps/native-component-list/src/screens/UI/JetpackComposePrimitivesScreen.android.tsx b/apps/native-component-list/src/screens/UI/JetpackComposePrimitivesScreen.android.tsx index 2efb07789d5ae9..a74bbed3438f5a 100644 --- a/apps/native-component-list/src/screens/UI/JetpackComposePrimitivesScreen.android.tsx +++ b/apps/native-component-list/src/screens/UI/JetpackComposePrimitivesScreen.android.tsx @@ -23,7 +23,7 @@ export default function JetpackComposePrimitivesScreen() { horizontalArrangement="spaceBetween" verticalAlignment="center" modifiers={[testID('leftTextRow')]}> - + Left Text @@ -33,7 +33,7 @@ export default function JetpackComposePrimitivesScreen() { horizontalArrangement="spaceBetween" verticalAlignment="center" modifiers={[testID('interpolatedTextRow')]}> - + {/* eslint-disable-next-line */} Hello {'world'} {123} @@ -42,23 +42,20 @@ export default function JetpackComposePrimitivesScreen() { {/* Example 2: Column with different Text styles */} Large Bold Text Medium Normal Text Small Light Text @@ -77,10 +74,12 @@ export default function JetpackComposePrimitivesScreen() { modifiers={[background('#ff0000'), weight(2), testID('nestedColumn1')]} verticalArrangement="center" horizontalAlignment="center"> - + Nested - + Column 1 @@ -88,10 +87,12 @@ export default function JetpackComposePrimitivesScreen() { verticalArrangement="center" horizontalAlignment="center" modifiers={[testID('nestedColumn2')]}> - + Nested - + Column 2 @@ -99,10 +100,12 @@ export default function JetpackComposePrimitivesScreen() { modifiers={[background('#ff0000'), weight(4), testID('nestedColumn3')]} verticalArrangement="center" horizontalAlignment="center"> - + Nested - + Column 3 @@ -110,10 +113,12 @@ export default function JetpackComposePrimitivesScreen() { verticalArrangement="center" horizontalAlignment="center" modifiers={[testID('nestedColumn4')]}> - + Nested - + Column 4 diff --git a/packages/expo-modules-core/CHANGELOG.md b/packages/expo-modules-core/CHANGELOG.md index 2f66fcfa224049..5ecc13653c6b49 100644 --- a/packages/expo-modules-core/CHANGELOG.md +++ b/packages/expo-modules-core/CHANGELOG.md @@ -51,6 +51,8 @@ - [iOS] Fixed a crash in Fabric when unmounting a view while a geometry change event is being dispatched. ([#42628](https://github.com/expo/expo/issues/42628) by [@danishshaik](https://github.com/danishshaik)) ([#42634](https://github.com/expo/expo/pull/42634) by [@danishshaik](https://github.com/danishshaik)) - [iOS] Fix crashes when converting a single JSValue into an Array. ([#42694](https://github.com/expo/expo/pull/42694) by [@behenate](https://github.com/behenate)) +- Added more Jetpack Compose support. ([#42734](https://github.com/expo/expo/pull/42734) by [@kudo](https://github.com/kudo)) + ## 55.0.5 — 2026-01-27 _This version does not introduce any user-facing changes._ diff --git a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeAndroidView.kt b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeAndroidView.kt index baf13175d3126c..72c1f498faf89d 100644 --- a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeAndroidView.kt +++ b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeAndroidView.kt @@ -10,6 +10,13 @@ import androidx.compose.ui.viewinterop.AndroidView import com.facebook.react.uimanager.PixelUtil.pxToDp import expo.modules.kotlin.AppContext +/** + * Marks a view as capable of crossing the Jetpack Compose -> React Native boundary. + */ +interface RNHostViewInterface { + var matchContents: Boolean +} + /** * An ExpoComposeView for [AndroidView] wrapping with existing view */ @@ -17,7 +24,9 @@ import expo.modules.kotlin.AppContext internal class ExpoComposeAndroidView( private val view: View, appContext: AppContext -) : ExpoComposeView(view.context, appContext) { +) : ExpoComposeView(view.context, appContext), RNHostViewInterface { + override var matchContents = false + @Composable override fun ComposableScope.Content() { AndroidView( diff --git a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeView.kt b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeView.kt index 5b288df1343af1..5ce32dfd680772 100644 --- a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeView.kt +++ b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ExpoComposeView.kt @@ -12,20 +12,30 @@ import androidx.compose.runtime.RecomposeScope import androidx.compose.runtime.currentRecomposeScope import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.platform.ViewCompositionStrategy import androidx.core.view.size import expo.modules.kotlin.AppContext import expo.modules.kotlin.viewevent.CoalescingKey import expo.modules.kotlin.viewevent.EventDispatcher +import expo.modules.kotlin.viewevent.ViewEvent import expo.modules.kotlin.viewevent.ViewEventDelegate data class ComposableScope( val rowScope: RowScope? = null, val columnScope: ColumnScope? = null, - val boxScope: BoxScope? = null + val boxScope: BoxScope? = null, + val nestedScrollConnection: NestedScrollConnection? = null ) +inline fun ComposableScope.withIf( + condition: Boolean, + block: ComposableScope.() -> ComposableScope +): ComposableScope { + return if (condition) block() else this +} + fun ComposableScope.with(rowScope: RowScope?): ComposableScope { return this.copy(rowScope = rowScope) } @@ -38,6 +48,10 @@ fun ComposableScope.with(boxScope: BoxScope?): ComposableScope { return this.copy(boxScope = boxScope) } +fun ComposableScope.with(nestedScrollConnection: NestedScrollConnection?): ComposableScope { + return this.copy(nestedScrollConnection = nestedScrollConnection) +} + /** * A base class that should be used by compose views. */ @@ -49,6 +63,15 @@ abstract class ExpoComposeView( open val props: T? = null protected var recomposeScope: RecomposeScope? = null + private val globalEvent = ViewEvent>>(GLOBAL_EVENT_NAME, this, null) + + /** + * A global event dispatcher + */ + val globalEventDispatcher: (String, Map) -> Unit = { name, params -> + globalEvent.invoke(Pair(name, params)) + } + @Composable abstract fun ComposableScope.Content() @@ -92,6 +115,22 @@ abstract class ExpoComposeView( } } + @Composable + fun Children(composableScope: ComposableScope?, filter: (child: ExpoComposeView<*>) -> Boolean) { + recomposeScope = currentRecomposeScope + for (index in 0.. ?: continue + if (!filter(child)) { + continue + } + with(composableScope ?: ComposableScope()) { + with(child) { + Content() + } + } + } + } + @Composable fun Child(composableScope: ComposableScope, index: Int) { recomposeScope = currentRecomposeScope @@ -138,7 +177,7 @@ abstract class ExpoComposeView( } override fun addView(child: View, index: Int, params: ViewGroup.LayoutParams) { - val view = if (child !is ExpoComposeView<*> && child !is ComposeView) { + val view = if (child !is ExpoComposeView<*> && child !is ComposeView && this !is RNHostViewInterface) { ExpoComposeAndroidView(child, appContext) } else { child @@ -168,6 +207,7 @@ class FunctionalComposableScope( val composableScope: ComposableScope ) { val appContext = view.appContext + val globalEventDispatcher = view.globalEventDispatcher @Composable fun Child(composableScope: ComposableScope, index: Int) { @@ -184,6 +224,11 @@ class FunctionalComposableScope( view.Children(composableScope) } + @Composable + fun Children(composableScope: ComposableScope?, filter: (child: ExpoComposeView<*>) -> Boolean) { + view.Children(composableScope, filter) + } + inline fun EventDispatcher(noinline coalescingKey: CoalescingKey? = null): ViewEventDelegate { return view.EventDispatcher(coalescingKey) } diff --git a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ModuleDefinitionBuilderComposeExtension.kt b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ModuleDefinitionBuilderComposeExtension.kt index 10a041cfdc4711..33a75bd2d72b38 100644 --- a/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ModuleDefinitionBuilderComposeExtension.kt +++ b/packages/expo-modules-core/android/src/compose/expo/modules/kotlin/views/ModuleDefinitionBuilderComposeExtension.kt @@ -14,6 +14,11 @@ import kotlin.reflect.full.createInstance import kotlin.reflect.full.memberProperties import kotlin.reflect.typeOf +/** + * The name for the global event dispatcher + */ +internal const val GLOBAL_EVENT_NAME = "onGlobalEvent" + open class ModuleDefinitionBuilderWithCompose( module: Module? = null ) : InternalModuleDefinitionBuilder(module) { @@ -54,7 +59,7 @@ class ComposeViewFunctionDefinitionBuilder( val propsClass: KClass, val viewFunction: @Composable FunctionalComposableScope.(props: Props) -> Unit ) { - private var callbacksDefinition: CallbacksDefinition? = null + private var callbacksDefinition: CallbacksDefinition = CallbacksDefinition(arrayOf(GLOBAL_EVENT_NAME)) fun build(): ViewManagerDefinition { return ViewManagerDefinition( @@ -80,7 +85,9 @@ class ComposeViewFunctionDefinitionBuilder( * Defines prop names that should be treated as callbacks. */ fun Events(vararg callbacks: String) { - callbacksDefinition = CallbacksDefinition(callbacks) + callbacksDefinition = CallbacksDefinition( + arrayOf(GLOBAL_EVENT_NAME, *callbacks) + ) } /** @@ -88,6 +95,8 @@ class ComposeViewFunctionDefinitionBuilder( */ @JvmName("EventsWithArray") fun Events(callbacks: Array) { - callbacksDefinition = CallbacksDefinition(callbacks) + callbacksDefinition = CallbacksDefinition( + arrayOf(GLOBAL_EVENT_NAME, *callbacks) + ) } } diff --git a/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/records/RecordTypeConverter.kt b/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/records/RecordTypeConverter.kt index e683354b1ed0a3..ec5516ec2c067a 100644 --- a/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/records/RecordTypeConverter.kt +++ b/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/records/RecordTypeConverter.kt @@ -55,6 +55,11 @@ class RecordTypeConverter( return convertFromReadableMap(value, context, forceConversion) } + if (value is Map<*, *>) { + @Suppress("UNCHECKED_CAST") + return convertFromMap(value as Map, context, forceConversion) + } + @Suppress("UNCHECKED_CAST") return value as T } diff --git a/packages/expo-ui/CHANGELOG.md b/packages/expo-ui/CHANGELOG.md index 478de0db4809e8..024ba85ad34443 100644 --- a/packages/expo-ui/CHANGELOG.md +++ b/packages/expo-ui/CHANGELOG.md @@ -10,6 +10,8 @@ ### šŸ’” Others +- [jetpack-compose] Added more views and modifiers. ([#42734](https://github.com/expo/expo/pull/42734) by [@kudo](https://github.com/kudo)) + ## 55.0.0-preview.6 — 2026-02-16 ### šŸŽ‰ New features diff --git a/packages/expo-ui/android/build.gradle b/packages/expo-ui/android/build.gradle index 8e5214055a6418..b29b425232a818 100644 --- a/packages/expo-ui/android/build.gradle +++ b/packages/expo-ui/android/build.gradle @@ -19,6 +19,7 @@ android { defaultConfig { versionCode 1 versionName "55.0.0-preview.6" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { compose true @@ -26,14 +27,32 @@ android { lintOptions { abortOnError false } + testOptions { + unitTests { + includeAndroidResources = true + } + } } dependencies { - implementation 'androidx.compose.foundation:foundation-android:1.9.1' - implementation 'androidx.compose.ui:ui-android:1.9.1' - implementation "androidx.compose.material3:material3:1.5.0-alpha08" - implementation 'androidx.compose.material3:material3-android:1.5.0-alpha08' - implementation 'androidx.lifecycle:lifecycle-runtime:2.9.3' + implementation 'com.facebook.react:react-android' + + implementation 'androidx.compose.foundation:foundation-android:1.10.2' + implementation 'androidx.compose.ui:ui-android:1.10.2' + implementation "androidx.compose.material3:material3:1.5.0-alpha13" + implementation 'androidx.compose.material3:material3-android:1.5.0-alpha13' + implementation 'androidx.lifecycle:lifecycle-runtime:2.10.0' implementation 'androidx.fragment:fragment-ktx:1.8.9' - implementation "androidx.graphics:graphics-shapes:1.0.1" + implementation "androidx.graphics:graphics-shapes:1.1.0" + implementation "com.squareup.okhttp3:okhttp:4.9.2" + implementation "androidx.core:core-ktx:1.17.0" + + // Testing + testImplementation 'junit:junit:4.13.2' + testImplementation 'com.google.truth:truth:1.4.5' + testImplementation 'org.robolectric:robolectric:4.16.1' + testImplementation 'androidx.test:core:1.7.0' + testImplementation 'androidx.test:runner:1.7.0' + testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.2' + testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2' } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt new file mode 100644 index 00000000000000..da427fd5ce1e6b --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt @@ -0,0 +1,26 @@ +package expo.modules.ui + +import androidx.compose.material3.BasicAlertDialog +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class BasicAlertDialogProps( + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun FunctionalComposableScope.BasicAlertDialogContent( + props: BasicAlertDialogProps, + onDismissRequest: () -> Unit +) { + BasicAlertDialog( + onDismissRequest = { onDismissRequest() }, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) { + Children(ComposableScope()) + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/BottomSheetView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/BottomSheetView.kt index 2d29701d8472bc..8f84c0d2bbffb3 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/BottomSheetView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/BottomSheetView.kt @@ -1,54 +1,29 @@ +@file:OptIn(ExperimentalMaterial3Api::class) + package expo.modules.ui -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import expo.modules.kotlin.records.Field -import expo.modules.kotlin.records.Record import expo.modules.kotlin.views.ComposableScope import expo.modules.kotlin.views.ComposeProps import expo.modules.kotlin.views.FunctionalComposableScope -import java.io.Serializable - -open class IsOpenedChangeEvent( - @Field open val isOpened: Boolean = false -) : Record, Serializable - -@OptIn(ExperimentalMaterial3Api::class) -@Composable -fun BottomSheetComposable(skipPartiallyExpanded: Boolean, isOpened: Boolean, onIsOpenedChange: (Boolean) -> Unit, content: @Composable () -> Unit) { - val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded) - if (isOpened) { - ModalBottomSheet( - sheetState = sheetState, - modifier = Modifier.fillMaxHeight(), - onDismissRequest = { onIsOpenedChange(false) } - ) { - content() - } - } -} - -data class BottomSheetProps( - val isOpened: Boolean = false, +data class ModalBottomSheetProps( val skipPartiallyExpanded: Boolean = false, val modifiers: ModifierList = emptyList() ) : ComposeProps @Composable -fun FunctionalComposableScope.BottomSheetContent(props: BottomSheetProps, onIsOpenedChange: (IsOpenedChangeEvent) -> Unit) { - Box { - BottomSheetComposable( - props.skipPartiallyExpanded, - props.isOpened, - onIsOpenedChange = { value -> onIsOpenedChange(IsOpenedChangeEvent(value)) } - ) { - Children(ComposableScope()) - } +fun FunctionalComposableScope.ModalBottomSheetContent(props: ModalBottomSheetProps, onDismissRequest: () -> Unit) { + val sheetState = rememberModalBottomSheetState(props.skipPartiallyExpanded) + + ModalBottomSheet( + sheetState = sheetState, + onDismissRequest = { onDismissRequest() }, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) { + Children(ComposableScope()) } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/CardView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/CardView.kt new file mode 100644 index 00000000000000..76b9a46c8a4f0c --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/CardView.kt @@ -0,0 +1,72 @@ +package expo.modules.ui + +import android.graphics.Color +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ElevatedCard +import androidx.compose.material3.OutlinedCard +import androidx.compose.runtime.Composable +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope +import expo.modules.kotlin.views.with + +data class CardElementColors( + @Field val containerColor: Color? = null, + @Field val contentColor: Color? = null +) : Record + +data class CardProps( + val variant: String = "default", + val color: Color? = null, + val elementColors: CardElementColors? = null, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.CardContent(props: CardProps) { + val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + + val colors = when { + props.elementColors != null -> CardDefaults.cardColors( + containerColor = props.elementColors.containerColor?.compose ?: androidx.compose.ui.graphics.Color.Unspecified, + contentColor = props.elementColors.contentColor?.compose ?: androidx.compose.ui.graphics.Color.Unspecified + ) + props.color != null -> CardDefaults.cardColors( + containerColor = props.color.compose + ) + else -> CardDefaults.cardColors() + } + + val content: @Composable ColumnScope.() -> Unit = { + val scope = ComposableScope().with(columnScope = this) + Children(scope) + } + + when (props.variant) { + "elevated" -> { + ElevatedCard( + modifier = modifier, + colors = colors, + content = content + ) + } + "outlined" -> { + OutlinedCard( + modifier = modifier, + colors = colors, + content = content + ) + } + else -> { + Card( + modifier = modifier, + colors = colors, + content = content + ) + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/CarouselView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/CarouselView.kt index b9111049c1f2ca..0c7f79ab9fe452 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/CarouselView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/CarouselView.kt @@ -110,7 +110,7 @@ fun FunctionalComposableScope.CarouselContent(props: CarouselProps) { HorizontalMultiBrowseCarousel( state = carouselState, preferredItemWidth = preferredItemWidth, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), itemSpacing = itemSpacing, flingBehavior = flingBehavior, minSmallItemWidth = minSmallItemWidth, @@ -126,7 +126,7 @@ fun FunctionalComposableScope.CarouselContent(props: CarouselProps) { HorizontalUncontainedCarousel( state = carouselState, itemWidth = itemWidth, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), itemSpacing = itemSpacing, flingBehavior = flingBehavior, contentPadding = contentPadding diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ComposeViews.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ComposeViews.kt index 4a3ff55e93c2d9..e9eb3a594b09cd 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/ComposeViews.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ComposeViews.kt @@ -1,176 +1,138 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class, EitherType::class, ExperimentalLayoutApi::class) + package expo.modules.ui import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.Row -import androidx.compose.material3.Text +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.FloatingToolbarDefaults +import androidx.compose.material3.FloatingToolbarExitDirection import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.nestedscroll.nestedScroll +import expo.modules.kotlin.apifeatures.EitherType import expo.modules.kotlin.types.Enumerable import expo.modules.kotlin.views.ComposableScope import expo.modules.kotlin.views.ComposeProps import expo.modules.kotlin.views.FunctionalComposableScope import expo.modules.kotlin.views.with -import android.graphics.Color as AndroidColor - -enum class HorizontalArrangement(val value: String) : Enumerable { - START("start"), - END("end"), - CENTER("center"), - SPACE_BETWEEN("spaceBetween"), - SPACE_AROUND("spaceAround"), - SPACE_EVENLY("spaceEvenly"); - - fun toComposeArrangement(): Arrangement.Horizontal { - return when (this) { - START -> Arrangement.Start - END -> Arrangement.End - CENTER -> Arrangement.Center - SPACE_BETWEEN -> Arrangement.SpaceBetween - SPACE_AROUND -> Arrangement.SpaceAround - SPACE_EVENLY -> Arrangement.SpaceEvenly - } - } -} - -enum class VerticalArrangement(val value: String) : Enumerable { +import expo.modules.kotlin.views.withIf +import expo.modules.ui.convertibles.HorizontalAlignment +import expo.modules.ui.convertibles.HorizontalArrangement +import expo.modules.ui.convertibles.VerticalAlignment +import expo.modules.ui.convertibles.ContentAlignment +import expo.modules.ui.convertibles.VerticalArrangement +import expo.modules.ui.convertibles.toComposeArrangement + +enum class FloatingToolbarExitAlwaysScrollBehavior(val value: String) : Enumerable { TOP("top"), BOTTOM("bottom"), - CENTER("center"), - SPACE_BETWEEN("spaceBetween"), - SPACE_AROUND("spaceAround"), - SPACE_EVENLY("spaceEvenly"); - - fun toComposeArrangement(): Arrangement.Vertical { - return when (this) { - TOP -> Arrangement.Top - BOTTOM -> Arrangement.Bottom - CENTER -> Arrangement.Center - SPACE_BETWEEN -> Arrangement.SpaceBetween - SPACE_AROUND -> Arrangement.SpaceAround - SPACE_EVENLY -> Arrangement.SpaceEvenly - } - } -} - -enum class HorizontalAlignment(val value: String) : Enumerable { START("start"), - END("end"), - CENTER("center"); + END("end"); - fun toComposeAlignment(): Alignment.Horizontal { + fun toComposeExitDirection(): FloatingToolbarExitDirection { return when (this) { - START -> Alignment.Start - END -> Alignment.End - CENTER -> Alignment.CenterHorizontally - } - } -} - -enum class VerticalAlignment(val value: String) : Enumerable { - TOP("top"), - BOTTOM("bottom"), - CENTER("center"); - - fun toComposeAlignment(): Alignment.Vertical { - return when (this) { - TOP -> Alignment.Top - BOTTOM -> Alignment.Bottom - CENTER -> Alignment.CenterVertically + TOP -> FloatingToolbarExitDirection.Top + BOTTOM -> FloatingToolbarExitDirection.Bottom + START -> FloatingToolbarExitDirection.Start + END -> FloatingToolbarExitDirection.End } } } data class LayoutProps( - val horizontalArrangement: HorizontalArrangement = HorizontalArrangement.START, - val verticalArrangement: VerticalArrangement = VerticalArrangement.TOP, - val horizontalAlignment: HorizontalAlignment = HorizontalAlignment.START, - val verticalAlignment: VerticalAlignment = VerticalAlignment.TOP, + val horizontalArrangement: HorizontalArrangement? = null, + val verticalArrangement: VerticalArrangement? = null, + val horizontalAlignment: HorizontalAlignment? = null, + val verticalAlignment: VerticalAlignment? = null, + val contentAlignment: ContentAlignment? = null, + val floatingToolbarExitAlwaysScrollBehavior: FloatingToolbarExitAlwaysScrollBehavior? = null, val modifiers: ModifierList = emptyList() ) : ComposeProps @Composable internal fun FunctionalComposableScope.RowContent(props: LayoutProps) { + val scrollBehavior = props.floatingToolbarExitAlwaysScrollBehavior + ?.toComposeExitDirection() + ?.let { + FloatingToolbarDefaults.exitAlwaysScrollBehavior(exitDirection = it) + } Row( - horizontalArrangement = props.horizontalArrangement.toComposeArrangement(), - verticalAlignment = props.verticalAlignment.toComposeAlignment(), - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + horizontalArrangement = props.horizontalArrangement?.toComposeArrangement() ?: Arrangement.Start, + verticalAlignment = props.verticalAlignment?.toComposeAlignment() ?: Alignment.Top, + modifier = ModifierRegistry + .applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + .then(if (scrollBehavior != null) Modifier.nestedScroll(scrollBehavior) else Modifier) ) { - Children(ComposableScope().with(rowScope = this@Row)) + val scope = ComposableScope() + .with(rowScope = this@Row) + .withIf(scrollBehavior != null) { + with(nestedScrollConnection = scrollBehavior) + } + Children(scope) } } @Composable -internal fun FunctionalComposableScope.ColumnContent(props: LayoutProps) { - Column( - verticalArrangement = props.verticalArrangement.toComposeArrangement(), - horizontalAlignment = props.horizontalAlignment.toComposeAlignment(), - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) +internal fun FunctionalComposableScope.FlowRowContent(props: LayoutProps) { + FlowRow( + horizontalArrangement = props.horizontalArrangement?.toComposeArrangement() ?: Arrangement.Start, + verticalArrangement = props.verticalArrangement?.toComposeArrangement() ?: Arrangement.Top, + modifier = ModifierRegistry + .applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) ) { - Children(ComposableScope().with(columnScope = this@Column)) + val scope = ComposableScope() + .with(rowScope = this@FlowRow) + Children(scope) } } @Composable -fun FunctionalComposableScope.BoxContent(props: LayoutProps) { - Box( - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) +internal fun FunctionalComposableScope.ColumnContent(props: LayoutProps) { + val scrollBehavior = props.floatingToolbarExitAlwaysScrollBehavior + ?.toComposeExitDirection() + ?.let { + FloatingToolbarDefaults.exitAlwaysScrollBehavior(exitDirection = it) + } + Column( + verticalArrangement = props.verticalArrangement?.toComposeArrangement() ?: Arrangement.Top, + horizontalAlignment = props.horizontalAlignment?.toComposeAlignment() ?: Alignment.Start, + modifier = ModifierRegistry + .applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + .then(if (scrollBehavior != null) Modifier.nestedScroll(scrollBehavior) else Modifier) ) { - Children(ComposableScope().with(boxScope = this@Box)) + val scope = ComposableScope() + .with(columnScope = this@Column) + .withIf(scrollBehavior != null) { + with(nestedScrollConnection = scrollBehavior) + } + Children(scope) } } -enum class TextFontWeight(val value: String) : Enumerable { - NORMAL("normal"), - BOLD("bold"), - W100("100"), - W200("200"), - W300("300"), - W400("400"), - W500("500"), - W600("600"), - W700("700"), - W800("800"), - W900("900"); - - fun toComposeFontWeight(): FontWeight { - return when (this) { - NORMAL -> FontWeight.Normal - BOLD -> FontWeight.Bold - W100 -> FontWeight.W100 - W200 -> FontWeight.W200 - W300 -> FontWeight.W300 - W400 -> FontWeight.W400 - W500 -> FontWeight.W500 - W600 -> FontWeight.W600 - W700 -> FontWeight.W700 - W800 -> FontWeight.W800 - W900 -> FontWeight.W900 +@Composable +fun FunctionalComposableScope.BoxContent(props: LayoutProps) { + val scrollBehavior = props.floatingToolbarExitAlwaysScrollBehavior + ?.toComposeExitDirection() + ?.let { + FloatingToolbarDefaults.exitAlwaysScrollBehavior(exitDirection = it) } + Box( + contentAlignment = props.contentAlignment?.toComposeAlignment() ?: Alignment.TopStart, + modifier = ModifierRegistry + .applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + .then(if (scrollBehavior != null) Modifier.nestedScroll(scrollBehavior) else Modifier) + ) { + val scope = ComposableScope() + .with(boxScope = this@Box) + .withIf(scrollBehavior != null) { + with(nestedScrollConnection = scrollBehavior) + } + Children(scope) } } - -data class TextProps( - val text: String = "", - val color: AndroidColor? = null, - val fontSize: Float = 16f, - val fontWeight: TextFontWeight = TextFontWeight.NORMAL, - val modifiers: ModifierList = emptyList() -) : ComposeProps - -@Composable -fun FunctionalComposableScope.TextContent(props: TextProps) { - Text( - text = props.text, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), - color = colorToComposeColor(props.color), - style = TextStyle( - fontSize = props.fontSize.sp, - fontWeight = props.fontWeight.toComposeFontWeight() - ) - ) -} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/DatePickerView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/DatePickerView.kt index ebe26fa238249d..d61cde2d3d9484 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/DatePickerView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/DatePickerView.kt @@ -62,11 +62,11 @@ data class DateTimePickerProps( @Composable fun FunctionalComposableScope.DateTimePickerContent(props: DateTimePickerProps, onDateSelected: (DatePickerResult) -> Unit) { if (props.displayedComponents == DisplayedComponents.HOUR_AND_MINUTE) { - ExpoTimePicker(props = props, modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope)) { + ExpoTimePicker(props = props, modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)) { onDateSelected(it) } } else { - ExpoDatePicker(props = props, modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope)) { + ExpoDatePicker(props = props, modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)) { onDateSelected(it) } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/DividerView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/DividerView.kt index cb7ae08bbc5856..dcb988d34bc113 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/DividerView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/DividerView.kt @@ -11,5 +11,5 @@ data class DividerProps( @Composable fun FunctionalComposableScope.DividerContent(props: DividerProps) { - HorizontalDivider(modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope)) + HorizontalDivider(modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)) } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/DockedSearchBarView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/DockedSearchBarView.kt new file mode 100644 index 00000000000000..e70240240ea887 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/DockedSearchBarView.kt @@ -0,0 +1,53 @@ +@file:OptIn(ExperimentalMaterial3Api::class) + +package expo.modules.ui + +import androidx.compose.foundation.text.input.rememberTextFieldState +import androidx.compose.material3.DockedSearchBar +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.SearchBarDefaults +import androidx.compose.material3.rememberSearchBarState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.snapshotFlow +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class DockedSearchBarProps( + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.DockedSearchBarContent( + props: DockedSearchBarProps, + onQueryChange: (GenericEventPayload1) -> Unit +) { + val searchBarState = rememberSearchBarState() + val textFieldState = rememberTextFieldState() + + LaunchedEffect(Unit) { + snapshotFlow { textFieldState.text.toString() } + .collect { onQueryChange(GenericEventPayload1(it)) } + } + + DockedSearchBar( + expanded = false, + onExpandedChange = {}, + inputField = @Composable { + SearchBarDefaults.InputField( + searchBarState = searchBarState, + textFieldState = textFieldState, + onSearch = {}, + placeholder = { + Children(ComposableScope(), filter = { isSlotWithName(it, "placeholder") }) + }, + leadingIcon = { + Children(ComposableScope(), filter = { isSlotWithName(it, "leadingIcon") }) + } + ) + }, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) {} +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ExpoUIModule.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ExpoUIModule.kt index cb78f54a5fa7e5..8dd4099e987c3a 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ExpoUIModule.kt @@ -1,5 +1,10 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + package expo.modules.ui +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.SwitchDefaults +import androidx.compose.material3.ToggleButtonDefaults import androidx.compose.runtime.remember import expo.modules.kotlin.modules.Module import expo.modules.kotlin.modules.ModuleDefinition @@ -9,16 +14,32 @@ import expo.modules.ui.button.ButtonPressedEvent import expo.modules.ui.button.ButtonProps import expo.modules.ui.button.IconButtonContent import expo.modules.ui.button.IconButtonProps +import expo.modules.ui.icon.IconView import expo.modules.ui.menu.ContextMenuButtonPressedEvent import expo.modules.ui.menu.ContextMenuContent import expo.modules.ui.menu.ContextMenuProps import expo.modules.ui.menu.ContextMenuSwitchValueChangeEvent import expo.modules.ui.menu.ExpandedChangedEvent +import okhttp3.OkHttpClient class ExpoUIModule : Module() { + var okHttpClient: OkHttpClient? = null + private set + override fun definition() = ModuleDefinition { Name("ExpoUI") + OnCreate { + okHttpClient = OkHttpClient.Builder().build() + } + + OnDestroy { + okHttpClient?.dispatcher?.executorService?.shutdown() + okHttpClient?.connectionPool?.evictAll() + okHttpClient?.cache?.close() + okHttpClient = null + } + //region Views use expo-modules-core DSL for uncommon features View(HostView::class) { @@ -29,15 +50,45 @@ class ExpoUIModule : Module() { } } + Constant("SwitchDefaultIconSize") { + return@Constant SwitchDefaults.IconSize.value + } + Constant("ToggleButtonIconSpacing") { + return@Constant ToggleButtonDefaults.IconSpacing.value + } + Constant("ToggleButtonIconSize") { + return@Constant ToggleButtonDefaults.IconSize.value + } + + View(RNHostView::class) + + View(TextInputView::class) { + Events("onValueChanged") + Prop("defaultValue", "") { view: TextInputView, text: String -> + if (view.text == null) { + view.text = text + } + } + AsyncFunction("setText") { view: TextInputView, text: String -> + view.text = text + } + } + + View(SlotView::class) { + Events("onSlotEvent") + } + View(IconView::class) + View(LazyColumnView::class) + //endregion Views use expo-modules-core DSL for uncommon features //region Expo UI views - ExpoUIView("BottomSheetView", events = { - Events("onIsOpenedChange") - }) { props: BottomSheetProps -> - val onIsOpenedChange by remember { EventDispatcher() } - BottomSheetContent(props) { onIsOpenedChange(it) } + ExpoUIView("ModalBottomSheetView", events = { + Events("onDismissRequest") + }) { props: ModalBottomSheetProps -> + val onDismissRequest by remember { EventDispatcher() } + ModalBottomSheetContent(props) { onDismissRequest(Unit) } } // Defines a single view for now – a single choice segmented control @@ -112,18 +163,6 @@ class ExpoUIModule : Module() { ProgressContent(props) } - View(TextInputView::class) { - Events("onValueChanged") - Prop("defaultValue", "") { view: TextInputView, text: String -> - if (view.text == null) { - view.text = text - } - } - AsyncFunction("setText") { view: TextInputView, text: String -> - view.text = text - } - } - ExpoUIView("BoxView") { props: LayoutProps -> BoxContent(props) } @@ -132,6 +171,10 @@ class ExpoUIModule : Module() { RowContent(props) } + ExpoUIView("FlowRowView") { props: LayoutProps -> + FlowRowContent(props) + } + ExpoUIView("ColumnView") { props: LayoutProps -> ColumnContent(props) } @@ -140,6 +183,31 @@ class ExpoUIModule : Module() { TextContent(props) } + ExpoUIView("SearchBarView", events = { + Events("onSearch") + }) { props: SearchBarProps -> + val onSearch by remember { EventDispatcher>() } + SearchBarContent(props) { onSearch(it) } + } + + ExpoUIView("DockedSearchBarView", events = { + Events("onQueryChange") + }) { props: DockedSearchBarProps -> + val onQueryChange by remember { EventDispatcher>() } + DockedSearchBarContent(props) { onQueryChange(it) } + } + + ExpoUIView("HorizontalFloatingToolbarView") { props: HorizontalFloatingToolbarProps -> + HorizontalFloatingToolbarContent(props) + } + + ExpoUIView("PullToRefreshBoxView", events = { + Events("onRefresh") + }) { props: PullToRefreshBoxProps -> + val onRefresh by remember { EventDispatcher() } + PullToRefreshBoxContent(props) { onRefresh(Unit) } + } + ExpoUIView("CarouselView") { props: CarouselProps -> CarouselContent(props) } @@ -170,6 +238,57 @@ class ExpoUIModule : Module() { ChipContent(props, { onPress(it) }, { onDismiss(it) }) } + ExpoUIView("FilterChipView", events = { + Events("onPress") + }) { props: FilterChipProps -> + val onPress by remember { EventDispatcher() } + FilterChipContent(props) { onPress(it) } + } + + ExpoUIView("TextButtonView", events = { + Events("onButtonPressed") + }) { props: TextButtonProps -> + val onButtonPressed by remember { EventDispatcher() } + TextButtonContent(props) { onButtonPressed(it) } + } + + ExpoUIView("ToggleButtonView", events = { + Events("onCheckedChange") + }) { props: ToggleButtonProps -> + val onCheckedChange by remember { EventDispatcher() } + ToggleButtonContent(props) { onCheckedChange(it) } + } + + ExpoUIView("CardView") { props: CardProps -> + CardContent(props) + } + + ExpoUIView("ListItemView") { props: ListItemProps -> + ListItemContent(props) + } + + ExpoUIView("SpacerView") { props: SpacerProps -> + SpacerContent(props) + } + + ExpoUIView("BasicAlertDialogView", events = { + Events("onDismissRequest") + }) { props: BasicAlertDialogProps -> + val onDismissRequest by remember { EventDispatcher() } + BasicAlertDialogContent(props) { onDismissRequest(Unit) } + } + + ExpoUIView("SurfaceView") { props: SurfaceProps -> + SurfaceContent(props) + } + + ExpoUIView("RadioButtonView", events = { + Events("onNativeClick") + }) { props: RadioButtonProps -> + val onNativeClick by remember { EventDispatcher() } + RadioButtonContent(props) { onNativeClick(Unit) } + } + //endregion Expo UI views } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/FilterChipView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/FilterChipView.kt new file mode 100644 index 00000000000000..1653417b6831da --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/FilterChipView.kt @@ -0,0 +1,59 @@ +package expo.modules.ui + +import androidx.compose.material3.FilterChip +import androidx.compose.material3.FilterChipDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope +import java.io.Serializable + +open class FilterChipPressedEvent : Record, Serializable + +data class FilterChipProps( + val selected: Boolean = false, + val label: String = "", + val enabled: Boolean = true, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.FilterChipContent( + props: FilterChipProps, + onPress: (FilterChipPressedEvent) -> Unit +) { + val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + + val leadingIconSlotView = findChildSlotView(view, "leadingIcon") + val trailingIconSlotView = findChildSlotView(view, "trailingIcon") + + FilterChip( + selected = props.selected, + onClick = { onPress(FilterChipPressedEvent()) }, + label = { Text(props.label) }, + enabled = props.enabled, + leadingIcon = leadingIconSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + }, + trailingIcon = trailingIconSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + }, + colors = FilterChipDefaults.filterChipColors(), + border = FilterChipDefaults.filterChipBorder(enabled = props.enabled, selected = props.selected), + modifier = modifier + ) +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt new file mode 100644 index 00000000000000..b06854f93968c5 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt @@ -0,0 +1,63 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + +package expo.modules.ui + +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.FloatingToolbarDefaults +import androidx.compose.material3.FloatingToolbarScrollBehavior +import androidx.compose.material3.HorizontalFloatingToolbar +import androidx.compose.runtime.Composable +import expo.modules.kotlin.types.Enumerable +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +enum class HorizontalFloatingToolbarVariant(val value: String) : Enumerable { + STANDARD("standard"), + VIBRANT("vibrant") +} + +data class HorizontalFloatingToolbarProps( + val variant: HorizontalFloatingToolbarVariant? = + HorizontalFloatingToolbarVariant.STANDARD, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.HorizontalFloatingToolbarContent(props: HorizontalFloatingToolbarProps) { + val colors = when (props.variant) { + HorizontalFloatingToolbarVariant.VIBRANT -> FloatingToolbarDefaults.vibrantFloatingToolbarColors() + else -> FloatingToolbarDefaults.standardFloatingToolbarColors() + } + + // Find the FAB slot and extract its onClick handler + val fabSlotView = findChildSlotView(view, "floatingActionButton") + val fabOnClick: () -> Unit = { + fabSlotView?.onSlotEvent?.invoke(Unit) + } + + val floatingActionButton = @Composable { + when (props.variant) { + HorizontalFloatingToolbarVariant.VIBRANT -> FloatingToolbarDefaults.VibrantFloatingActionButton( + onClick = fabOnClick + ) { + Children(ComposableScope(), filter = { isSlotWithName(it, "floatingActionButton") }) + } + + else -> FloatingToolbarDefaults.StandardFloatingActionButton(onClick = fabOnClick) { + Children(ComposableScope(), filter = { isSlotWithName(it, "floatingActionButton") }) + } + } + } + + val scrollBehavior = composableScope.nestedScrollConnection as? FloatingToolbarScrollBehavior + HorizontalFloatingToolbar( + expanded = true, + colors = colors, + scrollBehavior = scrollBehavior, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), + floatingActionButton = floatingActionButton + ) { + Children(ComposableScope(), filter = { !isSlotView(it) }) + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/LazyColumnView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/LazyColumnView.kt new file mode 100644 index 00000000000000..8068fde86d70a1 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/LazyColumnView.kt @@ -0,0 +1,98 @@ +@file:OptIn(EitherType::class) + +package expo.modules.ui + +import android.annotation.SuppressLint +import android.content.Context +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.lazy.LazyColumn +import android.view.View +import androidx.compose.runtime.Composable +import androidx.compose.runtime.MutableIntState +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.currentRecomposeScope +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.Alignment +import androidx.compose.ui.unit.dp +import expo.modules.kotlin.AppContext +import expo.modules.kotlin.apifeatures.EitherType +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.ExpoComposeView +import expo.modules.ui.convertibles.VerticalArrangement +import expo.modules.ui.convertibles.toComposeArrangement + +data class ContentPadding( + @Field val start: Int = 0, + @Field val top: Int = 0, + @Field val end: Int = 0, + @Field val bottom: Int = 0 +) : Record + +data class LazyColumnProps( + val verticalArrangement: MutableState = mutableStateOf(null), + val horizontalAlignment: MutableState = mutableStateOf(null), + val contentPadding: MutableState = mutableStateOf(null), + val modifiers: MutableState = mutableStateOf(emptyList()) +) : ComposeProps + +@SuppressLint("ViewConstructor") +class LazyColumnView(context: Context, appContext: AppContext) : + ExpoComposeView(context, appContext) { + override val props = LazyColumnProps() + + private val composableChildCount: MutableIntState = mutableIntStateOf(0) + + override fun onViewAdded(child: View?) { + super.onViewAdded(child) + composableChildCount.intValue = childCount + } + + override fun onViewRemoved(child: View?) { + super.onViewRemoved(child) + composableChildCount.intValue = childCount + } + + @Composable + override fun ComposableScope.Content() { + recomposeScope = currentRecomposeScope + val verticalArrangement = props.verticalArrangement.value?.toComposeArrangement() ?: Arrangement.Top + + val horizontalAlignment = when (props.horizontalAlignment.value) { + "start" -> Alignment.Start + "end" -> Alignment.End + "center" -> Alignment.CenterHorizontally + else -> Alignment.Start + } + + val padding = props.contentPadding.value + + LazyColumn( + modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content, globalEventDispatcher), + verticalArrangement = verticalArrangement, + horizontalAlignment = horizontalAlignment, + contentPadding = PaddingValues( + start = (padding?.start ?: 0).dp, + top = (padding?.top ?: 0).dp, + end = (padding?.end ?: 0).dp, + bottom = (padding?.bottom ?: 0).dp + ) + ) { + val count = composableChildCount.intValue + for (index in 0.. ?: continue + item { + with(this@Content) { + with(child) { + Content() + } + } + } + } + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ListItemView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ListItemView.kt new file mode 100644 index 00000000000000..ca8e067277c5b4 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ListItemView.kt @@ -0,0 +1,89 @@ +package expo.modules.ui + +import android.graphics.Color +import androidx.compose.material3.ListItem +import androidx.compose.material3.ListItemDefaults +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class ListItemColors( + @Field val containerColor: Color? = null, + @Field val headlineColor: Color? = null, + @Field val leadingIconColor: Color? = null, + @Field val trailingIconColor: Color? = null, + @Field val supportingColor: Color? = null, + @Field val overlineColor: Color? = null +) : Record + +data class ListItemProps( + val headline: String = "", + val supportingText: String? = null, + val overlineText: String? = null, + val color: Color? = null, + val colors: ListItemColors? = null, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.ListItemContent(props: ListItemProps) { + val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + + val defaultColors = ListItemDefaults.colors() + val colors = ListItemDefaults.colors( + containerColor = props.colors?.containerColor.composeOrNull + ?: defaultColors.containerColor, + contentColor = props.colors?.headlineColor.composeOrNull + ?: defaultColors.contentColor, + leadingContentColor = props.colors?.leadingIconColor.composeOrNull + ?: defaultColors.leadingContentColor, + trailingContentColor = props.colors?.trailingIconColor.composeOrNull + ?: defaultColors.trailingContentColor, + supportingContentColor = props.colors?.supportingColor.composeOrNull + ?: defaultColors.supportingContentColor, + overlineContentColor = props.colors?.overlineColor.composeOrNull + ?: defaultColors.overlineContentColor + ) + + val leadingSlotView = findChildSlotView(view, "leading") + val trailingSlotView = findChildSlotView(view, "trailing") + val supportingContentSlotView = findChildSlotView(view, "supportingContent") + + ListItem( + headlineContent = { Text(text = props.headline) }, + modifier = modifier, + overlineContent = props.overlineText?.let { { Text(text = it) } }, + supportingContent = supportingContentSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + } ?: props.supportingText?.let { { Text(text = it) } }, + leadingContent = leadingSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + }, + trailingContent = trailingSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + }, + colors = colors + ) +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/MaterialShapes.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/MaterialShapes.kt new file mode 100644 index 00000000000000..0c4dcfd0ab6ec1 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/MaterialShapes.kt @@ -0,0 +1,77 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + +package expo.modules.ui + +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialShapes +import androidx.graphics.shapes.RoundedPolygon +import expo.modules.kotlin.types.Enumerable + +enum class MaterialShapeType(val value: String) : Enumerable { + COOKIE_4_SIDED("cookie4Sided"), + COOKIE_6_SIDED("cookie6Sided"), + COOKIE_7_SIDED("cookie7Sided"), + COOKIE_9_SIDED("cookie9Sided"), + COOKIE_12_SIDED("cookie12Sided"), + + CLOVER_4_LEAF("clover4Leaf"), + CLOVER_8_LEAF("clover8Leaf"), + + SOFT_BURST("softBurst"), + BOOM("boom"), + + OVAL("oval"), + PILL("pill"), + TRIANGLE("triangle"), + DIAMOND("diamond"), + PENTAGON("pentagon"), + SUNNY("sunny"), + VERY_SUNNY("verySunny"), + + FAN("fan"), + + PIXEL_CIRCLE("pixelCircle"), + PIXEL_TRIANGLE("pixelTriangle"), + + GHOSTISH("ghostish"), + + BUN("bun"), + + HEART("heart"), + + ARCH("arch"), + + SLANTED("slanted"), + + PUFFY("puffy"), + PUFFY_DIAMOND("puffyDiamond"); + + fun toRoundedPolygon(): RoundedPolygon = when (this) { + COOKIE_4_SIDED -> MaterialShapes.Cookie4Sided + COOKIE_6_SIDED -> MaterialShapes.Cookie6Sided + COOKIE_7_SIDED -> MaterialShapes.Cookie7Sided + COOKIE_9_SIDED -> MaterialShapes.Cookie9Sided + COOKIE_12_SIDED -> MaterialShapes.Cookie12Sided + CLOVER_4_LEAF -> MaterialShapes.Clover4Leaf + CLOVER_8_LEAF -> MaterialShapes.Clover8Leaf + SOFT_BURST -> MaterialShapes.SoftBurst + BOOM -> MaterialShapes.Boom + OVAL -> MaterialShapes.Oval + PILL -> MaterialShapes.Pill + TRIANGLE -> MaterialShapes.Triangle + DIAMOND -> MaterialShapes.Diamond + PENTAGON -> MaterialShapes.Pentagon + SUNNY -> MaterialShapes.Sunny + VERY_SUNNY -> MaterialShapes.VerySunny + FAN -> MaterialShapes.Fan + PIXEL_CIRCLE -> MaterialShapes.PixelCircle + PIXEL_TRIANGLE -> MaterialShapes.PixelTriangle + GHOSTISH -> MaterialShapes.Ghostish + BUN -> MaterialShapes.Bun + HEART -> MaterialShapes.Heart + ARCH -> MaterialShapes.Arch + SLANTED -> MaterialShapes.Slanted + PUFFY -> MaterialShapes.Puffy + PUFFY_DIAMOND -> MaterialShapes.PuffyDiamond + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ModifierRegistry.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ModifierRegistry.kt index c11e750a361796..e2c520d7faa7aa 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ModifierRegistry.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + package expo.modules.ui import android.graphics.Color @@ -11,26 +13,41 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.selection.selectable +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.CutCornerShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.toShape +import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.draw.blur import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.rotate import androidx.compose.ui.draw.shadow +import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import expo.modules.kotlin.AppContext import expo.modules.kotlin.records.Field import expo.modules.kotlin.records.Record import expo.modules.kotlin.records.recordFromMap +import expo.modules.kotlin.types.Enumerable import expo.modules.kotlin.views.ComposableScope +import expo.modules.ui.convertibles.AlignmentType typealias ModifierType = Map typealias ModifierList = List -typealias ModifierFactory = (ModifierType, ComposableScope?, AppContext?) -> Modifier +typealias ModifierEventDispatcher = (String, Map) -> Unit +typealias ModifierFactory = @Composable (ModifierType, ComposableScope?, AppContext?, ModifierEventDispatcher) -> Modifier // region Modifier Params @@ -62,6 +79,22 @@ internal data class FillMaxHeightParams( @Field val fraction: Float = 1.0f ) : Record +internal data class WidthParams( + @Field val width: Int = 0 +) : Record + +internal data class HeightParams( + @Field val height: Int = 0 +) : Record + +internal data class WrapContentWidthParams( + @Field val alignment: AlignmentType? = null +) : Record + +internal data class WrapContentHeightParams( + @Field val alignment: AlignmentType? = null +) : Record + internal data class OffsetParams( @Field val x: Int = 0, @Field val y: Int = 0 @@ -105,12 +138,38 @@ internal data class WeightParams( @Field val weight: Float = 1f ) : Record +internal data class AlignParams( + @Field val alignment: AlignmentType? = null +) : Record + internal data class TestIDParams( @Field val testID: String? = null ) : Record +internal enum class BuiltinShapeType(val value: String) : Enumerable { + RECTANGLE("rectangle"), + CIRCLE("circle"), + ROUNDED_CORNER("roundedCorner"), + CUT_CORNER("cutCorner"), + MATERIAL("material") +} + +internal data class BuiltinShapeRecord( + @Field val type: BuiltinShapeType = BuiltinShapeType.RECTANGLE, + @Field val radius: Float? = null, + @Field val topStart: Float? = null, + @Field val topEnd: Float? = null, + @Field val bottomStart: Float? = null, + @Field val bottomEnd: Float? = null, + @Field val name: MaterialShapeType? = null +) : Record + internal data class ClipParams( - @Field val shape: ShapeRecord? = null + @Field val shape: BuiltinShapeRecord? = null +) : Record + +internal data class SelectableParams( + @Field val selected: Boolean = false ) : Record // endregion @@ -124,7 +183,7 @@ internal data class ClipParams( * * Usage in Native: * ```kotlin - * modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + * modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) * ``` * ``` */ @@ -150,15 +209,17 @@ object ModifierRegistry { /** * Applies an array of modifier configs to build a Compose Modifier chain. */ + @Composable fun applyModifiers( modifiers: List?, appContext: AppContext, - scope: ComposableScope + scope: ComposableScope, + eventDispatcher: ModifierEventDispatcher ): Modifier { if (modifiers.isNullOrEmpty()) return Modifier return modifiers.fold(Modifier as Modifier) { acc, config -> val type = config["\$type"] as? String ?: return@fold acc - val modifier = modifierFactories[type]?.invoke(config, scope, appContext) ?: Modifier + val modifier = modifierFactories[type]?.invoke(config, scope, appContext, eventDispatcher) ?: Modifier acc.then(modifier) } } @@ -179,12 +240,12 @@ object ModifierRegistry { private fun registerBuiltInModifiers() { // Padding modifiers - register("paddingAll") { map, _, _ -> + register("paddingAll") { map, _, _, _ -> val params = recordFromMap(map) Modifier.padding(params.all.dp) } - register("padding") { map, _, _ -> + register("padding") { map, _, _, _ -> val params = recordFromMap(map) Modifier.padding( params.start.dp, @@ -195,75 +256,99 @@ object ModifierRegistry { } // Size modifiers - register("size") { map, _, _ -> + register("size") { map, _, _, _ -> val params = recordFromMap(map) Modifier.size(params.width.dp, params.height.dp) } - register("fillMaxSize") { map, _, _ -> + register("fillMaxSize") { map, _, _, _ -> val params = recordFromMap(map) Modifier.fillMaxSize(fraction = params.fraction) } - register("fillMaxWidth") { map, _, _ -> + register("fillMaxWidth") { map, _, _, _ -> val params = recordFromMap(map) Modifier.fillMaxWidth(fraction = params.fraction) } - register("fillMaxHeight") { map, _, _ -> + register("fillMaxHeight") { map, _, _, _ -> val params = recordFromMap(map) Modifier.fillMaxHeight(fraction = params.fraction) } + register("width") { map, _, _, _ -> + val params = recordFromMap(map) + Modifier.width(params.width.dp) + } + + register("height") { map, _, _, _ -> + val params = recordFromMap(map) + Modifier.height(params.height.dp) + } + + register("wrapContentWidth") { map, _, _, _ -> + val params = recordFromMap(map) + params.alignment?.toHorizontalAlignment()?.let { alignment -> + Modifier.wrapContentWidth(align = alignment) + } ?: Modifier.wrapContentWidth() + } + + register("wrapContentHeight") { map, _, _, _ -> + val params = recordFromMap(map) + params.alignment?.toVerticalAlignment()?.let { alignment -> + Modifier.wrapContentHeight(align = alignment) + } ?: Modifier.wrapContentHeight() + } + // Position modifiers - register("offset") { map, _, _ -> + register("offset") { map, _, _, _ -> val params = recordFromMap(map) Modifier.offset(params.x.dp, params.y.dp) } // Appearance modifiers - register("background") { map, _, _ -> + register("background") { map, _, _, _ -> val params = recordFromMap(map) params.color?.let { color -> Modifier.background(color.compose) } ?: Modifier } - register("border") { map, _, _ -> + register("border") { map, _, _, _ -> val params = recordFromMap(map) params.borderColor?.let { borderColor -> Modifier.border(BorderStroke(params.borderWidth.dp, borderColor.compose)) } ?: Modifier } - register("shadow") { map, _, _ -> + register("shadow") { map, _, _, _ -> val params = recordFromMap(map) Modifier.shadow(params.elevation.dp) } - register("alpha") { map, _, _ -> + register("alpha") { map, _, _, _ -> val params = recordFromMap(map) Modifier.alpha(params.alpha) } - register("blur") { map, _, _ -> + register("blur") { map, _, _, _ -> val params = recordFromMap(map) Modifier.blur(params.radius.dp) } // Transform modifiers - register("rotate") { map, _, _ -> + register("rotate") { map, _, _, _ -> val params = recordFromMap(map) Modifier.rotate(params.degrees) } - register("zIndex") { map, _, _ -> + register("zIndex") { map, _, _, _ -> val params = recordFromMap(map) Modifier.zIndex(params.index) } // Animation modifiers - register("animateContentSize") { map, _, _ -> + register("animateContentSize") { map, _, _, _ -> val params = recordFromMap(map) Modifier.animateContentSize( spring(dampingRatio = params.dampingRatio, stiffness = params.stiffness) @@ -271,7 +356,7 @@ object ModifierRegistry { } // Scope-dependent modifiers - register("weight") { map, scope, _ -> + register("weight") { map, scope, _, _ -> val params = recordFromMap(map) scope?.rowScope?.run { Modifier.weight(params.weight) @@ -280,32 +365,85 @@ object ModifierRegistry { } ?: Modifier } - register("matchParentSize") { _, scope, _ -> + register("align") { map, scope, _, _ -> + val params = recordFromMap(map) + scope?.boxScope?.run { + params.alignment?.toAlignment()?.let { alignment -> Modifier.align(alignment) } + } ?: scope?.rowScope?.run { + params.alignment?.toVerticalAlignment()?.let { alignment -> Modifier.align(alignment) } + } ?: scope?.columnScope?.run { + params.alignment?.toHorizontalAlignment()?.let { alignment -> Modifier.align(alignment) } + } ?: Modifier + } + + register("matchParentSize") { _, scope, _, _ -> scope?.boxScope?.run { Modifier.matchParentSize() } ?: Modifier } // Utility modifiers - register("testID") { map, _, _ -> + register("testID") { map, _, _, _ -> val params = recordFromMap(map) params.testID?.let { testID -> Modifier.applyTestTag(testID) } ?: Modifier } - register("clip") { map, _, _ -> + register("clip") { map, _, _, _ -> val params = recordFromMap(map) - params.shape?.let { shapeRecord -> - shapeFromShapeRecord(shapeRecord)?.let { shape -> - Modifier.clip(shape) + params.shape?.let { shape -> + val composeShape = when (shape.type) { + BuiltinShapeType.RECTANGLE -> RectangleShape + BuiltinShapeType.CIRCLE -> CircleShape + BuiltinShapeType.ROUNDED_CORNER -> { + val hasPerCorner = shape.topStart != null || shape.topEnd != null || shape.bottomStart != null || shape.bottomEnd != null + if (hasPerCorner) { + RoundedCornerShape( + topStart = (shape.topStart ?: 0f).dp, + topEnd = (shape.topEnd ?: 0f).dp, + bottomStart = (shape.bottomStart ?: 0f).dp, + bottomEnd = (shape.bottomEnd ?: 0f).dp + ) + } else { + RoundedCornerShape((shape.radius ?: 0f).dp) + } + } + BuiltinShapeType.CUT_CORNER -> { + val hasPerCorner = shape.topStart != null || shape.topEnd != null || shape.bottomStart != null || shape.bottomEnd != null + if (hasPerCorner) { + CutCornerShape( + topStart = (shape.topStart ?: 0f).dp, + topEnd = (shape.topEnd ?: 0f).dp, + bottomStart = (shape.bottomStart ?: 0f).dp, + bottomEnd = (shape.bottomEnd ?: 0f).dp + ) + } else { + CutCornerShape((shape.radius ?: 0f).dp) + } + } + BuiltinShapeType.MATERIAL -> { + shape.name?.toRoundedPolygon()?.toShape() + } + } + composeShape?.let { + Modifier.clip(it) } } ?: Modifier } - // Callback modifiers - register("clickable") { _, _, _ -> - Modifier.clickable { } + register("clickable") { _, _, _, eventDispatcher -> + Modifier.clickable { + eventDispatcher("clickable", emptyMap()) + } + } + + register("selectable") { map, _, _, eventDispatcher -> + val params = recordFromMap(map) + Modifier.selectable( + selected = params.selected, + onClick = { eventDispatcher("selectable", emptyMap()) } + ) } } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/PickerView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/PickerView.kt index d7cb672c27e713..68656f43b7599a 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/PickerView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/PickerView.kt @@ -88,7 +88,7 @@ fun FunctionalComposableScope.PickerContent( @Composable fun SegmentedComposable() { SingleChoiceSegmentedButtonRow( - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) ) { options.forEachIndexed { index, label -> SegmentedButton( @@ -99,7 +99,7 @@ fun FunctionalComposableScope.PickerContent( onClick = { onOptionSelected(PickerOptionSelectedEvent(index, label)) }, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), selected = index == selectedIndex, label = { Text(label) }, colors = SegmentedButtonDefaults.colors( diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ProgressView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ProgressView.kt index 299e90a95cd60f..19df724f569a93 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/ProgressView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ProgressView.kt @@ -41,7 +41,7 @@ fun FunctionalComposableScope.ProgressContent(props: ProgressProps) { val progress = props.progress val color = props.color val colors = props.elementColors - val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) when (props.variant) { ProgressVariant.LINEAR -> { diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt new file mode 100644 index 00000000000000..fdad12ba1492bf --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt @@ -0,0 +1,40 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + +package expo.modules.ui + +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.pulltorefresh.PullToRefreshBox +import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults +import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState +import androidx.compose.runtime.Composable +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class PullToRefreshBoxProps( + val isRefreshing: Boolean = false, + val modifiers: ModifierList = emptyList(), + val loadingIndicatorModifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.PullToRefreshBoxContent(props: PullToRefreshBoxProps, onRefresh: () -> Unit) { + val isRefreshing = props.isRefreshing + val pullToRefreshState = rememberPullToRefreshState() + + PullToRefreshBox( + isRefreshing = isRefreshing, + onRefresh = { onRefresh() }, + state = pullToRefreshState, + indicator = { + PullToRefreshDefaults.LoadingIndicator( + isRefreshing = isRefreshing, + state = pullToRefreshState, + modifier = ModifierRegistry.applyModifiers(props.loadingIndicatorModifiers, appContext, composableScope, globalEventDispatcher) + ) + }, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) { + Children(ComposableScope()) + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/RNHostView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/RNHostView.kt new file mode 100644 index 00000000000000..6004027b6c3f43 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/RNHostView.kt @@ -0,0 +1,87 @@ +package expo.modules.ui + +import android.annotation.SuppressLint +import android.content.Context +import android.view.View +import android.view.ViewGroup +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.runtime.Composable +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.Modifier +import androidx.compose.ui.viewinterop.AndroidView +import com.facebook.react.ReactRootView +import expo.modules.kotlin.AppContext +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.ExpoComposeView +import expo.modules.kotlin.views.RNHostViewInterface +import expo.modules.kotlin.views.ShadowNodeProxy +import java.lang.ref.WeakReference + +internal data class RNHostProps( + val matchContents: MutableState = mutableStateOf(null), + val verticalScrollEnabled: MutableState = mutableStateOf(null), + val modifiers: MutableState = mutableStateOf(emptyList()) +) : ComposeProps + +@SuppressLint("ViewConstructor") +internal class RNHostView(context: Context, appContext: AppContext) : + ExpoComposeView(context, appContext), RNHostViewInterface { + override val props = RNHostProps() + override var matchContents: Boolean = false + get() = props.matchContents.value ?: false + + private val container = RNHostContainerView(context, WeakReference(shadowNodeProxy)) + + @Composable + override fun ComposableScope.Content() { + val (verticalScrollEnabled) = props.verticalScrollEnabled + val (modifiers) = props.modifiers + + AndroidView( + factory = { + container + }, + modifier = ModifierRegistry.applyModifiers(modifiers, appContext, this@Content, globalEventDispatcher) + .then(if (verticalScrollEnabled == true) Modifier.verticalScroll(rememberScrollState()) else Modifier) + ) + } + + override fun addView(child: View, index: Int, params: ViewGroup.LayoutParams) { + container.addView(child, index, params) + } + + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + container.measure(widthMeasureSpec, heightMeasureSpec) + } + + override fun onLayout( + changed: Boolean, + left: Int, + top: Int, + right: Int, + bottom: Int + ) { + super.onLayout(changed, left, top, right, bottom) + val offsetX = paddingLeft + val offsetY = paddingRight + container.layout(offsetX, offsetY, offsetX + width, offsetY + height) + } +} + +internal class RNHostContainerView(context: Context, private val shadowNodeProxy: WeakReference) : ReactRootView(context) { + var matchContents = false + + override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) { + super.onLayout(changed, left, top, right, bottom) + if (matchContents && childCount > 1) { + val subview = getChildAt(0) + shadowNodeProxy.get()?.setViewSize(subview.width.toDouble(), subview.height.toDouble()) + } else { + shadowNodeProxy.get()?.setViewSize(width.toDouble(), height.toDouble()) + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/RadioButtonView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/RadioButtonView.kt new file mode 100644 index 00000000000000..cf84daa55000b4 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/RadioButtonView.kt @@ -0,0 +1,28 @@ +package expo.modules.ui + +import androidx.compose.material3.RadioButton +import androidx.compose.runtime.Composable +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class RadioButtonProps( + val selected: Boolean = false, + val nativeClickable: Boolean = true, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.RadioButtonContent( + props: RadioButtonProps, + onNativeClick: () -> Unit +) { + RadioButton( + selected = props.selected, + onClick = if (props.nativeClickable) { + { onNativeClick() } + } else { + null + }, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/SearchBarView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/SearchBarView.kt new file mode 100644 index 00000000000000..3dafaac3ee9296 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/SearchBarView.kt @@ -0,0 +1,60 @@ +@file:OptIn(ExperimentalMaterial3Api::class) + +package expo.modules.ui + +import androidx.compose.foundation.text.input.rememberTextFieldState +import androidx.compose.material3.ExpandedFullScreenSearchBar +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.SearchBar +import androidx.compose.material3.SearchBarDefaults +import androidx.compose.material3.rememberSearchBarState +import androidx.compose.runtime.Composable +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class SearchBarProps( + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.SearchBarContent(props: SearchBarProps, onSearch: (GenericEventPayload1) -> Unit) { + val searchBarState = rememberSearchBarState() + val textFieldState = rememberTextFieldState() + + val inputField = + @Composable { + SearchBarDefaults.InputField( + searchBarState = searchBarState, + textFieldState = textFieldState, + onSearch = { value -> onSearch.invoke(GenericEventPayload1(value)) }, + placeholder = { + Children(ComposableScope(), filter = { isSlotWithName(it, "placeholder") }) + } + ) + } + SearchBar( + state = searchBarState, + inputField = inputField, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) + + val expandedFullScreenSearchBarView = findChildSlotView(view, "expandedFullScreenSearchBar") + expandedFullScreenSearchBarView?.let { slotView -> + ExpandedFullScreenSearchBar( + state = searchBarState, + inputField = inputField + ) { + ExpandedFullScreenSearchBarView(ComposableScope(), slotView) + } + } +} + +@Composable +private fun ExpandedFullScreenSearchBarView(composableScope: ComposableScope, view: SlotView) { + with(composableScope) { + with(view) { + Content() + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ShapeView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ShapeView.kt index 3c4342859541f5..808a848c7f67b1 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/ShapeView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ShapeView.kt @@ -12,6 +12,8 @@ import androidx.compose.ui.graphics.Shape import androidx.compose.ui.graphics.asComposePath import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.ui.unit.dp import androidx.graphics.shapes.CornerRounding import androidx.graphics.shapes.RoundedPolygon import androidx.graphics.shapes.circle @@ -33,15 +35,24 @@ enum class ShapeType(val value: String) : Enumerable { PILL("pill"), CIRCLE("circle"), RECTANGLE("rectangle"), - POLYGON("polygon") + POLYGON("polygon"), + ROUNDED_CORNER("roundedCorner") } +data class CornerRadii( + @Field val topStart: Float = 0f, + @Field val topEnd: Float = 0f, + @Field val bottomStart: Float = 0f, + @Field val bottomEnd: Float = 0f +) : Record + data class ShapeProps( val cornerRounding: Float = 0.0f, val smoothing: Float = 0.0f, val verticesCount: Int = 6, val innerRadius: Float = 0.0f, val radius: Float = 0.0f, + val cornerRadii: CornerRadii? = null, val type: ShapeType = ShapeType.CIRCLE, val color: GraphicsColor? = null, val modifiers: ModifierList = emptyList() @@ -116,6 +127,21 @@ private fun createRectanglePath(size: Size, cornerRounding: Float, smoothing: Fl ).toPath().asComposePath() } +private fun createRoundedCornerPath(size: Size, cornerRadii: CornerRadii?, density: Density): Path { + val radii = cornerRadii ?: CornerRadii() + val shape = RoundedCornerShape( + topStart = radii.topStart.dp, + topEnd = radii.topEnd.dp, + bottomStart = radii.bottomStart.dp, + bottomEnd = radii.bottomEnd.dp + ) + return when (val outline = shape.createOutline(size, LayoutDirection.Ltr, density)) { + is Outline.Rectangle -> Path().apply { addRect(outline.rect) } + is Outline.Rounded -> Path().apply { addRoundRect(outline.roundRect) } + is Outline.Generic -> outline.path + } +} + data class ShapeRecord( @Field val cornerRounding: Float = 0.0f, @@ -128,10 +154,12 @@ data class ShapeRecord( @Field val radius: Float = 0.0f, @Field + val cornerRadii: CornerRadii? = null, + @Field val type: ShapeType = ShapeType.CIRCLE ) : Record -fun pathFromShapeRecord(record: ShapeRecord, size: Size): Path { +fun pathFromShapeRecord(record: ShapeRecord, size: Size, density: Density): Path { return runCatching { when (record.type) { ShapeType.STAR -> createStarPath(size = size, cornerRounding = record.cornerRounding, smoothing = record.smoothing, innerRadius = record.innerRadius, radius = record.radius, verticesCount = record.verticesCount) @@ -140,6 +168,7 @@ fun pathFromShapeRecord(record: ShapeRecord, size: Size): Path { ShapeType.CIRCLE -> createCirclePath(size = size, radius = record.radius, verticesCount = record.verticesCount) ShapeType.RECTANGLE -> createRectanglePath(size = size, cornerRounding = record.cornerRounding, smoothing = record.smoothing) ShapeType.POLYGON -> createPolygonPath(size = size, cornerRounding = record.cornerRounding, smoothing = record.smoothing, verticesCount = record.verticesCount) + ShapeType.ROUNDED_CORNER -> createRoundedCornerPath(size = size, cornerRadii = record.cornerRadii, density = density) } }.getOrNull() ?: Path() } @@ -148,7 +177,7 @@ fun shapeFromShapeRecord(shapeRecord: ShapeRecord?): Shape? { if (shapeRecord == null) return null return object : Shape { override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline { - val path = pathFromShapeRecord(shapeRecord, size) + val path = pathFromShapeRecord(shapeRecord, size, density) return Outline.Generic(path) } } @@ -157,7 +186,7 @@ fun shapeFromShapeRecord(shapeRecord: ShapeRecord?): Shape? { @Composable fun FunctionalComposableScope.ShapeContent(props: ShapeProps) { Box( - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) .drawWithCache { val path = pathFromShapeRecord( ShapeRecord( @@ -165,10 +194,12 @@ fun FunctionalComposableScope.ShapeContent(props: ShapeProps) { smoothing = props.smoothing, innerRadius = props.innerRadius, radius = props.radius, + cornerRadii = props.cornerRadii, type = props.type, verticesCount = props.verticesCount ), - size + size, + this ) onDrawBehind { diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/SliderView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/SliderView.kt index a8e5a5cebc4456..c8748e86a27854 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/SliderView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/SliderView.kt @@ -59,6 +59,6 @@ fun FunctionalComposableScope.SliderContent(props: SliderProps) { activeTickColor = colors.activeTickColor.compose, inactiveTickColor = colors.inactiveTickColor.compose ), - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) ) } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/SlotView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/SlotView.kt new file mode 100644 index 00000000000000..3ec2a620e7f921 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/SlotView.kt @@ -0,0 +1,53 @@ +package expo.modules.ui + +import android.annotation.SuppressLint +import android.content.Context +import android.view.ViewGroup +import androidx.compose.runtime.Composable +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.mutableStateOf +import androidx.core.view.size +import expo.modules.kotlin.AppContext +import expo.modules.kotlin.viewevent.EventDispatcher +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.ExpoComposeView + +data class SlotProps( + val slotName: MutableState = mutableStateOf("") +) : ComposeProps + +/** + * A generic slot marker view that can be used to mark children for specific slots. + * This view is not rendered directly but used as a marker to identify which children + * should be placed in which composable slots. + */ +@SuppressLint("ViewConstructor") +class SlotView(context: Context, appContext: AppContext) : + ExpoComposeView(context, appContext) { + override val props = SlotProps() + internal val onSlotEvent by EventDispatcher() + + @Composable + override fun ComposableScope.Content() { + Children(this) + } +} + +fun isSlotWithName(view: ExpoComposeView<*>, slotName: String): Boolean { + return view is SlotView && view.props.slotName.value == slotName +} + +fun isSlotView(view: ExpoComposeView<*>): Boolean { + return view is SlotView +} + +fun findChildSlotView(viewGroup: ViewGroup, slotName: String): SlotView? { + for (index in 0.. Unit)?, colors: SwitchColors, modifier: Modifier = Modifier) { +fun SwitchComposable( + checked: Boolean, + onCheckedChange: ((Boolean) -> Unit)?, + colors: SwitchColors, + modifier: Modifier = Modifier, + thumbContent: (@Composable () -> Unit)? = null +) { Switch( checked = checked, onCheckedChange = onCheckedChange, modifier = modifier, + thumbContent = thumbContent, colors = SwitchDefaults.colors( // For some reason the default way of passing colors using `compose` results in a transparent view checkedThumbColor = colors.checkedThumbColor.composeOrNull @@ -99,10 +107,11 @@ fun ThemedHybridSwitch( checked: Boolean, onCheckedChange: ((Boolean) -> Unit)?, colors: SwitchColors, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, + thumbContent: (@Composable () -> Unit)? = null ) { when (variant) { - "switch" -> SwitchComposable(checked, onCheckedChange, colors, modifier) + "switch" -> SwitchComposable(checked, onCheckedChange, colors, modifier, thumbContent) else -> CheckboxComposable(checked, onCheckedChange, colors, modifier) } } @@ -112,11 +121,22 @@ fun FunctionalComposableScope.SwitchContent( props: SwitchProps, onValueChange: (ValueChangeEvent) -> Unit ) { + val thumbContentSlotView = findChildSlotView(view, "thumbContent") + ThemedHybridSwitch( props.variant, props.value, { newChecked -> onValueChange(ValueChangeEvent(newChecked)) }, props.elementColors, - ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope) + ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), + thumbContent = thumbContentSlotView?.let { + { + with(ComposableScope()) { + with(it) { + Content() + } + } + } + } ) } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/TextButtonView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextButtonView.kt new file mode 100644 index 00000000000000..c7a69927a26422 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextButtonView.kt @@ -0,0 +1,33 @@ +package expo.modules.ui + +import android.graphics.Color +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope +import expo.modules.ui.button.ButtonPressedEvent + +data class TextButtonProps( + val text: String = "", + val color: Color? = null, + val disabled: Boolean = false, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.TextButtonContent( + props: TextButtonProps, + onButtonPressed: (ButtonPressedEvent) -> Unit +) { + TextButton( + onClick = { onButtonPressed(ButtonPressedEvent()) }, + enabled = !props.disabled, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + ) { + Text( + text = props.text, + color = props.color.composeOrNull ?: androidx.compose.ui.graphics.Color.Unspecified + ) + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/TextInputView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextInputView.kt index bd492552a2f4bd..46ffff564c298c 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/TextInputView.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextInputView.kt @@ -7,7 +7,6 @@ import androidx.compose.material3.TextField import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf -import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.KeyboardCapitalization import androidx.compose.ui.text.input.KeyboardType import expo.modules.kotlin.AppContext @@ -83,7 +82,7 @@ class TextInputView(context: Context, appContext: AppContext) : autoCorrectEnabled = props.autocorrection.value, capitalization = props.autoCapitalize.value.autoCapitalize() ), - modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content) + modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content, globalEventDispatcher) ) } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/TextView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextView.kt new file mode 100644 index 00000000000000..34f54fd74a7bdb --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/TextView.kt @@ -0,0 +1,194 @@ +package expo.modules.ui + +import android.graphics.Color +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.sp +import expo.modules.kotlin.types.Enumerable +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +enum class TextFontWeight(val value: String) : Enumerable { + NORMAL("normal"), + BOLD("bold"), + W100("100"), + W200("200"), + W300("300"), + W400("400"), + W500("500"), + W600("600"), + W700("700"), + W800("800"), + W900("900"); + + fun toComposeFontWeight(): FontWeight { + return when (this) { + NORMAL -> FontWeight.Normal + BOLD -> FontWeight.Bold + W100 -> FontWeight.W100 + W200 -> FontWeight.W200 + W300 -> FontWeight.W300 + W400 -> FontWeight.W400 + W500 -> FontWeight.W500 + W600 -> FontWeight.W600 + W700 -> FontWeight.W700 + W800 -> FontWeight.W800 + W900 -> FontWeight.W900 + } + } +} + +enum class TextFontStyle(val value: String) : Enumerable { + NORMAL("normal"), + ITALIC("italic"); + + fun toComposeFontStyle(): FontStyle { + return when (this) { + NORMAL -> FontStyle.Normal + ITALIC -> FontStyle.Italic + } + } +} + +enum class TextAlignType(val value: String) : Enumerable { + LEFT("left"), + RIGHT("right"), + CENTER("center"), + JUSTIFY("justify"), + START("start"), + END("end"); + + fun toComposeTextAlign(): TextAlign { + return when (this) { + LEFT -> TextAlign.Left + RIGHT -> TextAlign.Right + CENTER -> TextAlign.Center + JUSTIFY -> TextAlign.Justify + START -> TextAlign.Start + END -> TextAlign.End + } + } +} + +enum class TextDecorationType(val value: String) : Enumerable { + NONE("none"), + UNDERLINE("underline"), + LINE_THROUGH("lineThrough"); + + fun toComposeTextDecoration(): TextDecoration { + return when (this) { + NONE -> TextDecoration.None + UNDERLINE -> TextDecoration.Underline + LINE_THROUGH -> TextDecoration.LineThrough + } + } +} + +enum class TextOverflowType(val value: String) : Enumerable { + CLIP("clip"), + ELLIPSIS("ellipsis"), + VISIBLE("visible"); + + fun toComposeTextOverflow(): TextOverflow { + return when (this) { + CLIP -> TextOverflow.Clip + ELLIPSIS -> TextOverflow.Ellipsis + VISIBLE -> TextOverflow.Visible + } + } +} + +enum class TypographyStyle(val value: String) : Enumerable { + DISPLAY_LARGE("displayLarge"), + DISPLAY_MEDIUM("displayMedium"), + DISPLAY_SMALL("displaySmall"), + HEADLINE_LARGE("headlineLarge"), + HEADLINE_MEDIUM("headlineMedium"), + HEADLINE_SMALL("headlineSmall"), + TITLE_LARGE("titleLarge"), + TITLE_MEDIUM("titleMedium"), + TITLE_SMALL("titleSmall"), + BODY_LARGE("bodyLarge"), + BODY_MEDIUM("bodyMedium"), + BODY_SMALL("bodySmall"), + LABEL_LARGE("labelLarge"), + LABEL_MEDIUM("labelMedium"), + LABEL_SMALL("labelSmall"); + + @Composable + fun toTextStyle(): TextStyle { + val typography = MaterialTheme.typography + return when (this) { + DISPLAY_LARGE -> typography.displayLarge + DISPLAY_MEDIUM -> typography.displayMedium + DISPLAY_SMALL -> typography.displaySmall + HEADLINE_LARGE -> typography.headlineLarge + HEADLINE_MEDIUM -> typography.headlineMedium + HEADLINE_SMALL -> typography.headlineSmall + TITLE_LARGE -> typography.titleLarge + TITLE_MEDIUM -> typography.titleMedium + TITLE_SMALL -> typography.titleSmall + BODY_LARGE -> typography.bodyLarge + BODY_MEDIUM -> typography.bodyMedium + BODY_SMALL -> typography.bodySmall + LABEL_LARGE -> typography.labelLarge + LABEL_MEDIUM -> typography.labelMedium + LABEL_SMALL -> typography.labelSmall + } + } +} + +data class TextProps( + val text: String = "", + val color: Color? = null, + val typography: TypographyStyle? = null, + val fontSize: Float? = null, + val fontWeight: TextFontWeight? = null, + val fontStyle: TextFontStyle? = null, + val textAlign: TextAlignType? = null, + val textDecoration: TextDecorationType? = null, + val letterSpacing: Float? = null, + val lineHeight: Float? = null, + val overflow: TextOverflowType? = null, + val softWrap: Boolean? = null, + val maxLines: Int? = null, + val minLines: Int? = null, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +@Composable +fun FunctionalComposableScope.TextContent(props: TextProps) { + // Start with typography style if provided, otherwise use default + val baseStyle = props.typography?.toTextStyle() ?: TextStyle.Default + + // Merge base style with custom properties + val mergedStyle = baseStyle.merge( + TextStyle( + fontSize = props.fontSize?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified, + fontWeight = props.fontWeight?.toComposeFontWeight(), + fontStyle = props.fontStyle?.toComposeFontStyle(), + textDecoration = props.textDecoration?.toComposeTextDecoration(), + letterSpacing = props.letterSpacing?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified, + lineHeight = props.lineHeight?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified + ) + ) + + Text( + text = props.text, + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), + color = colorToComposeColor(props.color), + textAlign = props.textAlign?.toComposeTextAlign(), + overflow = props.overflow?.toComposeTextOverflow() ?: TextOverflow.Clip, + softWrap = props.softWrap ?: true, + maxLines = props.maxLines ?: Int.MAX_VALUE, + minLines = props.minLines ?: 1, + style = mergedStyle + ) +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/ToggleButtonView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/ToggleButtonView.kt new file mode 100644 index 00000000000000..0a91bf9bdfb46c --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/ToggleButtonView.kt @@ -0,0 +1,96 @@ +@file:OptIn(ExperimentalMaterial3ExpressiveApi::class) + +package expo.modules.ui + +import android.graphics.Color +import androidx.compose.foundation.layout.RowScope +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.FilledIconToggleButton +import androidx.compose.material3.IconToggleButton +import androidx.compose.material3.OutlinedIconToggleButton +import androidx.compose.material3.Text +import androidx.compose.material3.ToggleButton +import androidx.compose.material3.ToggleButtonDefaults +import androidx.compose.runtime.Composable +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.FunctionalComposableScope + +data class ToggleButtonProps( + val checked: Boolean = false, + val text: String? = null, + val variant: String = "default", + val color: Color? = null, + val disabled: Boolean = false, + val modifiers: ModifierList = emptyList() +) : ComposeProps + +data class ToggleButtonValueChangeEvent( + @Field val checked: Boolean = false +) : Record + +@Composable +fun FunctionalComposableScope.ToggleButtonContent( + props: ToggleButtonProps, + onCheckedChange: (ToggleButtonValueChangeEvent) -> Unit +) { + val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher) + + val scope = this + + val content: @Composable () -> Unit = { + when { + props.text != null -> Text(text = props.text) + else -> scope.Children(composableScope) + } + } + + // RowScope content for ToggleButton + val rowContent: @Composable RowScope.() -> Unit = { + when { + props.text != null -> Text(text = props.text) + else -> scope.Children(composableScope) + } + } + + when (props.variant) { + "icon" -> { + IconToggleButton( + checked = props.checked, + onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) }, + enabled = !props.disabled, + modifier = modifier, + content = content + ) + } + "filledIcon" -> { + FilledIconToggleButton( + checked = props.checked, + onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) }, + enabled = !props.disabled, + modifier = modifier, + content = content + ) + } + "outlinedIcon" -> { + OutlinedIconToggleButton( + checked = props.checked, + onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) }, + enabled = !props.disabled, + modifier = modifier, + content = content + ) + } + else -> { + ToggleButton( + checked = props.checked, + onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) }, + enabled = !props.disabled, + modifier = modifier, + colors = ToggleButtonDefaults.toggleButtonColors(), + content = rowContent + ) + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/Utils.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/Utils.kt index 8658c02eff7f00..6e2a77d09f4314 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/Utils.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/Utils.kt @@ -4,6 +4,8 @@ import android.graphics.Color import android.os.Build import android.util.Log import androidx.compose.ui.graphics.vector.ImageVector +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record fun colorToComposeColorOrNull(color: Color?): androidx.compose.ui.graphics.Color? { return color?.let { @@ -39,3 +41,7 @@ fun getImageVector(icon: String?): ImageVector? { return null } } + +data class GenericEventPayload1( + @Field val value: T +) : Record diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/button/Button.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/button/Button.kt index 51cb028ecc9d00..dd585c0a613e3a 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/button/Button.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/button/Button.kt @@ -174,7 +174,7 @@ fun FunctionalComposableScope.ButtonContent( // Also fire the button pressed event onButtonPressed(ButtonPressedEvent()) }, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), shape = shapeFromShapeRecord(props.shape) ) { Row(verticalAlignment = Alignment.CenterVertically) { diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/button/IconButton.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/button/IconButton.kt index 26cb6154a13632..b1a3e0590d281a 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/button/IconButton.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/button/IconButton.kt @@ -1,7 +1,5 @@ package expo.modules.ui.button -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.FilledTonalIconButton import androidx.compose.material3.IconButton @@ -102,11 +100,9 @@ fun FunctionalComposableScope.IconButtonContent( colors, disabled ?: false, onPress = { onButtonPressed(ButtonPressedEvent()) }, - modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope), + modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher), shape = shapeFromShapeRecord(props.shape) ) { - Box(modifier = Modifier.fillMaxSize()) { - Children(ComposableScope()) - } + Children(ComposableScope()) } } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Alignment.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Alignment.kt new file mode 100644 index 00000000000000..af98b043fb1206 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Alignment.kt @@ -0,0 +1,112 @@ +package expo.modules.ui.convertibles + +import androidx.compose.ui.Alignment +import expo.modules.kotlin.types.Enumerable + +/** + * Generic alignment type that for modifier.clip() + */ +enum class AlignmentType(val value: String) : Enumerable { + TOP_START("topStart"), + TOP_CENTER("topCenter"), + TOP_END("topEnd"), + CENTER_START("centerStart"), + CENTER("center"), + CENTER_END("centerEnd"), + BOTTOM_START("bottomStart"), + BOTTOM_CENTER("bottomCenter"), + BOTTOM_END("bottomEnd"), + TOP("top"), + CENTER_VERTICALLY("centerVertically"), + BOTTOM("bottom"), + START("start"), + CENTER_HORIZONTALLY("centerHorizontally"), + END("end"); + + fun toAlignment(): Alignment? { + return when (this) { + TOP_START -> Alignment.TopStart + TOP_CENTER -> Alignment.TopCenter + TOP_END -> Alignment.TopEnd + CENTER_START -> Alignment.CenterStart + CENTER -> Alignment.Center + CENTER_END -> Alignment.CenterEnd + BOTTOM_START -> Alignment.BottomStart + BOTTOM_CENTER -> Alignment.BottomCenter + BOTTOM_END -> Alignment.BottomEnd + else -> null + } + } + + fun toVerticalAlignment(): Alignment.Vertical? { + return when (this) { + TOP -> Alignment.Top + CENTER_VERTICALLY -> Alignment.CenterVertically + BOTTOM -> Alignment.Bottom + else -> null + } + } + + fun toHorizontalAlignment(): Alignment.Horizontal? { + return when (this) { + START -> Alignment.Start + CENTER_HORIZONTALLY -> Alignment.CenterHorizontally + END -> Alignment.End + else -> null + } + } +} + +enum class HorizontalAlignment(val value: String) : Enumerable { + START("start"), + END("end"), + CENTER("center"); + + fun toComposeAlignment(): Alignment.Horizontal { + return when (this) { + START -> Alignment.Start + END -> Alignment.End + CENTER -> Alignment.CenterHorizontally + } + } +} + +enum class VerticalAlignment(val value: String) : Enumerable { + TOP("top"), + BOTTOM("bottom"), + CENTER("center"); + + fun toComposeAlignment(): Alignment.Vertical { + return when (this) { + TOP -> Alignment.Top + BOTTOM -> Alignment.Bottom + CENTER -> Alignment.CenterVertically + } + } +} + +enum class ContentAlignment(val value: String) : Enumerable { + TOP_START("topStart"), + TOP_CENTER("topCenter"), + TOP_END("topEnd"), + CENTER_START("centerStart"), + CENTER("center"), + CENTER_END("centerEnd"), + BOTTOM_START("bottomStart"), + BOTTOM_CENTER("bottomCenter"), + BOTTOM_END("bottomEnd"); + + fun toComposeAlignment(): Alignment { + return when (this) { + TOP_START -> Alignment.TopStart + TOP_CENTER -> Alignment.TopCenter + TOP_END -> Alignment.TopEnd + CENTER_START -> Alignment.CenterStart + CENTER -> Alignment.Center + CENTER_END -> Alignment.CenterEnd + BOTTOM_START -> Alignment.BottomStart + BOTTOM_CENTER -> Alignment.BottomCenter + BOTTOM_END -> Alignment.BottomEnd + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Arrangement.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Arrangement.kt new file mode 100644 index 00000000000000..b086da287a1104 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/convertibles/Arrangement.kt @@ -0,0 +1,75 @@ +@file:OptIn(EitherType::class) + +package expo.modules.ui.convertibles + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.ui.unit.dp +import expo.modules.kotlin.apifeatures.EitherType +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.types.Either +import expo.modules.kotlin.types.Enumerable + +typealias HorizontalArrangement = Either + +enum class HorizontalArrangementDefault(val value: String) : Enumerable { + START("start"), + END("end"), + CENTER("center"), + SPACE_BETWEEN("spaceBetween"), + SPACE_AROUND("spaceAround"), + SPACE_EVENLY("spaceEvenly"); + + fun toComposeArrangement(): Arrangement.Horizontal { + return when (this) { + START -> Arrangement.Start + END -> Arrangement.End + CENTER -> Arrangement.Center + SPACE_BETWEEN -> Arrangement.SpaceBetween + SPACE_AROUND -> Arrangement.SpaceAround + SPACE_EVENLY -> Arrangement.SpaceEvenly + } + } +} + +data class HorizontalArrangementCustom( + @Field val spacedBy: Int? = null +) : Record + +fun HorizontalArrangement.toComposeArrangement(): Arrangement.Horizontal = + when { + `is`(HorizontalArrangementDefault::class) -> first().toComposeArrangement() + else -> second().spacedBy?.let { Arrangement.spacedBy(it.dp) } ?: Arrangement.Start + } + +typealias VerticalArrangement = Either + +enum class VerticalArrangementDefault(val value: String) : Enumerable { + TOP("top"), + BOTTOM("bottom"), + CENTER("center"), + SPACE_BETWEEN("spaceBetween"), + SPACE_AROUND("spaceAround"), + SPACE_EVENLY("spaceEvenly"); + + fun toComposeArrangement(): Arrangement.Vertical { + return when (this) { + TOP -> Arrangement.Top + BOTTOM -> Arrangement.Bottom + CENTER -> Arrangement.Center + SPACE_BETWEEN -> Arrangement.SpaceBetween + SPACE_AROUND -> Arrangement.SpaceAround + SPACE_EVENLY -> Arrangement.SpaceEvenly + } + } +} + +data class VerticalArrangementCustom( + @Field val spacedBy: Int? = null +) : Record + +fun VerticalArrangement.toComposeArrangement(): Arrangement.Vertical = + when { + `is`(VerticalArrangementDefault::class) -> first().toComposeArrangement() + else -> second().spacedBy?.let { Arrangement.spacedBy(it.dp) } ?: Arrangement.Top + } diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/IconView.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/IconView.kt new file mode 100644 index 00000000000000..f86fbb79c33639 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/IconView.kt @@ -0,0 +1,159 @@ +package expo.modules.ui.icon + +import android.content.Context +import android.graphics.Color +import android.graphics.drawable.BitmapDrawable +import android.graphics.drawable.Drawable +import android.net.Uri +import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.graphics.drawscope.DrawScope +import androidx.compose.ui.graphics.drawscope.drawIntoCanvas +import androidx.compose.ui.graphics.nativeCanvas +import androidx.compose.ui.graphics.painter.BitmapPainter +import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.unit.dp +import expo.modules.kotlin.AppContext +import expo.modules.kotlin.records.Field +import expo.modules.kotlin.records.Record +import expo.modules.kotlin.views.ComposableScope +import expo.modules.kotlin.views.ComposeProps +import expo.modules.kotlin.views.ExpoComposeView +import expo.modules.ui.ExpoUIModule +import expo.modules.ui.ModifierList +import expo.modules.ui.ModifierRegistry +import expo.modules.ui.compose + +data class Source( + @Field val uri: String, + @Field val width: Int = 0, + @Field val height: Int = 0, + @Field val scale: Double = 1.0 +) : Record + +data class IconProps( + val source: MutableState = mutableStateOf(null), + val tintColor: MutableState = mutableStateOf(null), + val size: MutableState = mutableStateOf(null), + val contentDescription: MutableState = mutableStateOf(null), + val modifiers: MutableState = mutableStateOf(emptyList()) +) : ComposeProps + +class IconView(context: Context, appContext: AppContext) : + ExpoComposeView(context, appContext) { + + override val props = IconProps() + + private val iconLoader by lazy { + val module = appContext.registry.getModule() + val okHttpClient = requireNotNull(module?.okHttpClient) { "ExpoUIModule.okHttpClient is not initialized" } + VectorIconLoader( + context = context, + okHttpClient = okHttpClient + ) + } + + @Composable + override fun ComposableScope.Content() { + val (source) = props.source + val (tint) = props.tintColor + val (iconSize) = props.size + val (contentDescription) = props.contentDescription + val (modifiers) = props.modifiers + + var imageVector by remember { mutableStateOf(null) } + var drawable by remember { mutableStateOf(null) } + + // Load icon from URI asynchronously + LaunchedEffect(source) { + imageVector = null + drawable = null + + val uriString = source?.let { resolveUri(it) } + if (uriString != null) { + // loadFromUri is already a suspend function that handles dispatchers + val result = iconLoader.loadFromUri(uriString) + imageVector = result.imageVector + drawable = result.drawable + } + } + + // Convert to Painter (prioritize ImageVector over Drawable) + val painter = imageVector?.let { rememberVectorPainter(it) } + ?: rememberDrawableAsPainter(drawable) + + // Render icon if painter available + if (painter != null) { + Icon( + painter = painter, + contentDescription = contentDescription, + tint = tint?.compose ?: androidx.compose.ui.graphics.Color.Unspecified, + modifier = Modifier + .then(iconSize?.let { Modifier.size(it.dp) } ?: Modifier) + .then(ModifierRegistry.applyModifiers(modifiers, appContext, this@Content, globalEventDispatcher)) + ) + } + } + + /** + * Resolve Source to URI string, handling resource IDs and local resources. + */ + private fun resolveUri(source: Source): String? { + val stringUri = source.uri + return try { + val uri = Uri.parse(stringUri) + + // If no scheme, try to resolve as local resource + if (uri.scheme == null) { + ResourceIdHelper.getResourceUri(context, stringUri)?.toString() + } else { + stringUri + } + } catch (e: Exception) { + // Fallback to resource ID helper + ResourceIdHelper.getResourceUri(context, stringUri)?.toString() + } + } + + @Composable + private fun rememberDrawableAsPainter(drawable: Drawable?): Painter? { + return remember(drawable) { + when (drawable) { + null -> null + is BitmapDrawable -> BitmapPainter(drawable.bitmap.asImageBitmap()) + else -> DrawablePainter(drawable.mutate()) + } + } + } + + private class DrawablePainter( + private val drawable: Drawable + ) : Painter() { + override val intrinsicSize: Size + get() = Size( + drawable.intrinsicWidth.toFloat().takeIf { it > 0 } ?: Size.Unspecified.width, + drawable.intrinsicHeight.toFloat().takeIf { it > 0 } ?: Size.Unspecified.height + ) + + override fun DrawScope.onDraw() { + drawIntoCanvas { canvas -> + with(drawable) { + setBounds(0, 0, size.width.toInt(), size.height.toInt()) + draw(canvas.nativeCanvas) + } + } + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/ResourceIdHelper.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/ResourceIdHelper.kt new file mode 100644 index 00000000000000..7f37655d4fee27 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/ResourceIdHelper.kt @@ -0,0 +1,47 @@ +package expo.modules.ui.icon + +import android.annotation.SuppressLint +import android.content.Context +import android.net.Uri +import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper +import java.util.Locale + +internal object ResourceIdHelper { + private val idMap = mutableMapOf() + + @SuppressLint("DiscouragedApi") + private fun getResourceRawId(context: Context, name: String): Int { + if (name.isEmpty()) { + return -1 + } + + val normalizedName = name.lowercase(Locale.ROOT).replace("-", "_") + synchronized(this) { + val id = idMap[normalizedName] + if (id != null) { + return id + } + + return context + .resources + .getIdentifier(normalizedName, "raw", context.packageName) + .also { + idMap[normalizedName] = it + } + } + } + + fun getResourceUri(context: Context, name: String): Uri? { + val drawableUri = ResourceDrawableIdHelper.getResourceDrawableUri(context, name) + if (drawableUri != Uri.EMPTY) { + return drawableUri + } + + val resId = getResourceRawId(context, name) + return if (resId > 0) { + Uri.Builder().scheme("res").path(resId.toString()).build() + } else { + null + } + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/VectorIconLoader.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/VectorIconLoader.kt new file mode 100644 index 00000000000000..202c2e55693f15 --- /dev/null +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/icon/VectorIconLoader.kt @@ -0,0 +1,369 @@ +package expo.modules.ui.icon + +import android.content.Context +import android.content.res.XmlResourceParser +import android.graphics.drawable.Drawable +import android.net.Uri +import android.util.Log +import android.util.Xml +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.PathParser +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import androidx.core.graphics.toColorInt +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import okhttp3.OkHttpClient +import okhttp3.Request +import org.xmlpull.v1.XmlPullParser +import java.io.File +import java.io.InputStream + +/** + * Loads and parses vector icons from various sources (HTTP, file, content provider). + * Supports XML vector drawables (Android format) and bitmap images. + * + * All loading operations are suspend functions and run on appropriate dispatchers. + */ +class VectorIconLoader( + private val context: Context, + private val okHttpClient: OkHttpClient +) { + + /** + * Result of icon loading operation. + */ + data class IconResult( + val imageVector: ImageVector? = null, + val drawable: Drawable? = null + ) + + /** + * Load an icon from a URI string. + * Returns an IconResult containing either an ImageVector (for XML) or Drawable (for bitmaps). + * + * This is a suspend function that performs I/O operations on the IO dispatcher. + */ + suspend fun loadFromUri(uriString: String?): IconResult = withContext(Dispatchers.IO) { + if (uriString.isNullOrEmpty()) return@withContext IconResult() + + val uri = try { + Uri.parse(uriString) + } catch (e: Exception) { + Log.e(TAG, "Failed to parse URI: $uriString", e) + return@withContext IconResult() + } + + try { + // For resource URIs, use Android's XmlResourceParser which handles compiled binary XML + if (uri.scheme == "res") { + return@withContext loadFromResourceId(uri) + } + + val inputStream = getInputStreamForUri(uri) ?: return@withContext IconResult() + inputStream.use { stream -> + parseIconFromStream(stream) + } + } catch (e: Exception) { + Log.e(TAG, "Failed to load icon from URI: $uri", e) + IconResult() + } + } + + /** + * Get input stream for different URI schemes. + */ + private fun getInputStreamForUri(uri: Uri): InputStream? { + return when (uri.scheme) { + "file" -> { + val path = uri.path ?: return null + File(path).inputStream() + } + "content" -> { + context.contentResolver.openInputStream(uri) + } + "http", "https" -> { + downloadFromHttp(uri.toString()) + } + "android.resource" -> { + context.contentResolver.openInputStream(uri) + } + else -> { + context.contentResolver.openInputStream(uri) + } + } + } + + /** + * Download icon from HTTP/HTTPS URL using OkHttp. + * Uses OkHttp's blocking call which is safe on IO dispatcher. + */ + private fun downloadFromHttp(url: String): InputStream? { + return try { + val request = Request.Builder() + .url(url) + .build() + + // OkHttp's execute() is blocking, which is fine on IO dispatcher + val response = okHttpClient.newCall(request).execute() + if (!response.isSuccessful) { + Log.e(TAG, "Failed to download icon from $url: ${response.code}") + response.close() + return null + } + + response.body?.byteStream() + } catch (e: Exception) { + Log.e(TAG, "HTTP download failed: $url", e) + null + } + } + + /** + * Load icon from an Android resource ID extracted from a `res:/` URI. + * Uses [XmlResourceParser] which handles compiled (binary) XML in release builds. + */ + private fun loadFromResourceId(uri: Uri): IconResult { + val resourceId = uri.lastPathSegment?.toIntOrNull() + ?: uri.path?.trimStart('/')?.toIntOrNull() + if (resourceId == null || resourceId <= 0) { + Log.w(TAG, "Invalid resource ID in URI: $uri") + return IconResult() + } + + // Try parsing as XML (handles both text and compiled binary XML) + try { + val xmlParser: XmlResourceParser = context.resources.getXml(resourceId) + xmlParser.use { parser -> + val imageVector = parseXmlToImageVector(parser) + if (imageVector != null) { + return IconResult(imageVector = imageVector) + } + } + } catch (e: Exception) { + Log.d(TAG, "Resource $resourceId is not XML, trying as raw resource", e) + } + + // Fall back to raw resource stream (bitmap images, etc.) + try { + context.resources.openRawResource(resourceId).use { stream -> + val drawable = Drawable.createFromStream(stream, null) + return IconResult(drawable = drawable) + } + } catch (e: Exception) { + Log.e(TAG, "Failed to load resource $resourceId", e) + return IconResult() + } + } + + /** + * Parse icon from input stream. + * Detects format (XML or bitmap) and returns appropriate result. + */ + private fun parseIconFromStream(inputStream: InputStream): IconResult { + val bytes = inputStream.readBytes() + + return if (isXmlContent(bytes)) { + val imageVector = parseXmlToImageVector(bytes) + IconResult(imageVector = imageVector) + } else { + val drawable = Drawable.createFromStream(bytes.inputStream(), null) + IconResult(drawable = drawable) + } + } + + /** + * Detect if byte array contains XML content. + */ + private fun isXmlContent(bytes: ByteArray): Boolean { + if (bytes.size < 5) return false + + // Check for UTF-8 BOM + var offset = 0 + if (bytes.size >= 3 && + bytes[0] == 0xEF.toByte() && + bytes[1] == 0xBB.toByte() && + bytes[2] == 0xBF.toByte() + ) { + offset = 3 + } + + // Check if content starts with '<' (possibly with leading whitespace) + for (i in offset until minOf(offset + 10, bytes.size)) { + val b = bytes[i] + if (b == '<'.code.toByte()) return true + if (b != ' '.code.toByte() && b != '\t'.code.toByte() && + b != '\n'.code.toByte() && b != '\r'.code.toByte() + ) { + return false + } + } + return false + } + + /** + * Parse Android VectorDrawable XML to Compose ImageVector from raw bytes (text XML). + */ + fun parseXmlToImageVector(bytes: ByteArray): ImageVector? { + return try { + val parser = Xml.newPullParser() + parser.setInput(bytes.inputStream(), "UTF-8") + parseXmlToImageVector(parser) + } catch (e: Exception) { + Log.e(TAG, "Failed to parse XML to ImageVector", e) + null + } + } + + /** + * Parse Android VectorDrawable XML to Compose ImageVector from any [XmlPullParser]. + * Works with both text XML parsers and [XmlResourceParser] (compiled binary XML). + */ + fun parseXmlToImageVector(parser: XmlPullParser): ImageVector? { + return try { + var eventType = parser.eventType + while (eventType != XmlPullParser.END_DOCUMENT) { + if (eventType == XmlPullParser.START_TAG && parser.name == "vector") { + return parseVectorElement(parser) + } + eventType = parser.next() + } + Log.w(TAG, "No element found in XML") + null + } catch (e: Exception) { + Log.e(TAG, "Failed to parse XML to ImageVector", e) + null + } + } + + /** + * Parse element and its children. + */ + private fun parseVectorElement(parser: XmlPullParser): ImageVector? { + return try { + // Parse attributes + var width = 24.dp + var height = 24.dp + var viewportWidth = 24f + var viewportHeight = 24f + + for (i in 0 until parser.attributeCount) { + when (parser.getAttributeName(i)) { + "width" -> width = parseDimension(parser.getAttributeValue(i)) + "height" -> height = parseDimension(parser.getAttributeValue(i)) + "viewportWidth" -> viewportWidth = parser.getAttributeValue(i).toFloatOrNull() ?: 24f + "viewportHeight" -> viewportHeight = parser.getAttributeValue(i).toFloatOrNull() ?: 24f + } + } + + // Build ImageVector + val builder = ImageVector.Builder( + defaultWidth = width, + defaultHeight = height, + viewportWidth = viewportWidth, + viewportHeight = viewportHeight + ) + + // Parse child elements + var eventType = parser.next() + while (eventType != XmlPullParser.END_DOCUMENT) { + when (eventType) { + XmlPullParser.START_TAG -> { + when (parser.name) { + "path" -> parsePathElement(parser, builder) + // Note: groups, clips, gradients not yet supported + } + } + XmlPullParser.END_TAG -> { + if (parser.name == "vector") { + return builder.build() + } + } + } + eventType = parser.next() + } + + builder.build() + } catch (e: Exception) { + Log.e(TAG, "Failed to parse element", e) + null + } + } + + /** + * Parse element and add to ImageVector builder. + */ + private fun parsePathElement(parser: XmlPullParser, builder: ImageVector.Builder) { + try { + var pathData = "" + var fillColor: androidx.compose.ui.graphics.Color? = null + + for (i in 0 until parser.attributeCount) { + when (parser.getAttributeName(i)) { + "pathData" -> pathData = parser.getAttributeValue(i) + "fillColor" -> { + fillColor = parseColor(parser.getAttributeValue(i)) + } + // Note: stroke properties, fillType, opacity not yet supported + } + } + + if (pathData.isNotEmpty()) { + val nodes = PathParser().parsePathString(pathData).toNodes() + builder.addPath( + pathData = nodes, + fill = fillColor?.let { SolidColor(it) } + ) + } + } catch (e: Exception) { + Log.e(TAG, "Failed to parse element", e) + } + } + + /** + * Parse dimension string (e.g., "24dp") to Compose Dp. + */ + private fun parseDimension(value: String): Dp { + return try { + val numericValue = value + .replace("dp", "") + .replace("dip", "") + .replace("px", "") + .toFloat() + numericValue.dp + } catch (e: Exception) { + Log.w(TAG, "Failed to parse dimension: $value, using default 24dp") + 24.dp + } + } + + /** + * Parse color string to Compose Color. + */ + private fun parseColor(colorValue: String): androidx.compose.ui.graphics.Color { + return try { + when { + colorValue.startsWith("#") -> { + androidx.compose.ui.graphics.Color(colorValue.toColorInt()) + } + colorValue.startsWith("@android:color/") || colorValue.startsWith("?attr/") -> { + // Theme attributes default to black (could be enhanced to resolve theme colors) + Log.d(TAG, "Theme color attribute not resolved: $colorValue, using black") + androidx.compose.ui.graphics.Color.Black + } + else -> { + Log.w(TAG, "Unknown color format: $colorValue, using black") + androidx.compose.ui.graphics.Color.Black + } + } + } catch (e: Exception) { + Log.e(TAG, "Failed to parse color: $colorValue", e) + androidx.compose.ui.graphics.Color.Black + } + } + + companion object { + private const val TAG = "VectorIconLoader" + } +} diff --git a/packages/expo-ui/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt b/packages/expo-ui/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt index 5122371c1bac82..d8dfba550cafec 100644 --- a/packages/expo-ui/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +++ b/packages/expo-ui/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt @@ -152,7 +152,7 @@ fun FunctionalComposableScope.ContextMenuContent( // Provide expanded state to children via CompositionLocal // This allows Button children to trigger menu expansion CompositionLocalProvider(LocalContextMenuExpanded provides expanded) { - Box(modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope)) { + Box(modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)) { // Trigger button - Button will automatically expand menu when clicked Children(ComposableScope()) diff --git a/packages/expo-ui/android/src/test/java/expo/modules/ui/icon/VectorIconLoaderTest.kt b/packages/expo-ui/android/src/test/java/expo/modules/ui/icon/VectorIconLoaderTest.kt new file mode 100644 index 00000000000000..c97078ae2bbf9b --- /dev/null +++ b/packages/expo-ui/android/src/test/java/expo/modules/ui/icon/VectorIconLoaderTest.kt @@ -0,0 +1,399 @@ +package expo.modules.ui.icon + +import android.content.Context +import android.util.Xml +import androidx.test.core.app.ApplicationProvider +import com.google.common.truth.Truth.assertThat +import kotlinx.coroutines.runBlocking +import okhttp3.OkHttpClient +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer +import org.junit.After +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(sdk = [28]) +class VectorIconLoaderTest { + + private lateinit var context: Context + private lateinit var okHttpClient: OkHttpClient + private lateinit var loader: VectorIconLoader + private lateinit var mockWebServer: MockWebServer + + @Before + fun setup() { + context = ApplicationProvider.getApplicationContext() + okHttpClient = OkHttpClient.Builder().build() + loader = VectorIconLoader(context, okHttpClient) + mockWebServer = MockWebServer() + mockWebServer.start() + } + + @After + fun tearDown() { + mockWebServer.shutdown() + } + + // ========== XML Parsing Tests ========== + + @Test + fun `should parse simple material symbol xml to ImageVector`() { + val xml = """ + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + assertThat(imageVector!!.defaultWidth.value).isWithin(0.01f).of(24f) + assertThat(imageVector.defaultHeight.value).isWithin(0.01f).of(24f) + assertThat(imageVector.viewportWidth).isWithin(0.01f).of(960f) + assertThat(imageVector.viewportHeight).isWithin(0.01f).of(960f) + } + + @Test + fun `should parse xml with multiple paths`() { + val xml = """ + + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + assertThat(imageVector!!.viewportWidth).isWithin(0.01f).of(24f) + assertThat(imageVector.viewportHeight).isWithin(0.01f).of(24f) + } + + @Test + fun `should handle xml with different dimension units`() { + val xml = """ + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + assertThat(imageVector!!.defaultWidth.value).isWithin(0.01f).of(48f) + assertThat(imageVector.defaultHeight.value).isWithin(0.01f).of(48f) + } + + @Test + fun `should return null for invalid xml`() { + val invalidXml = "not xml content" + + val imageVector = loader.parseXmlToImageVector(invalidXml.toByteArray()) + + assertThat(imageVector).isNull() + } + + @Test + fun `should return null for xml without vector element`() { + val xml = """ + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNull() + } + + @Test + fun `should handle empty path data gracefully`() { + val xml = """ + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + } + + // ========== URI Loading Tests ========== + + @Test + fun `should return empty result for null uri`() = runBlocking { + val result = loader.loadFromUri(null) + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should return empty result for empty uri`() = runBlocking { + val result = loader.loadFromUri("") + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should load xml from http url`() = runBlocking { + val xml = """ + + + + """.trimIndent() + + mockWebServer.enqueue(MockResponse().setBody(xml).setResponseCode(200)) + + val result = loader.loadFromUri(mockWebServer.url("/icon.xml").toString()) + + assertThat(result.imageVector).isNotNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should handle http download failure`() = runBlocking { + mockWebServer.enqueue(MockResponse().setResponseCode(404)) + + val result = loader.loadFromUri(mockWebServer.url("/notfound.xml").toString()) + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should handle http server error`() = runBlocking { + mockWebServer.enqueue(MockResponse().setResponseCode(500)) + + val result = loader.loadFromUri(mockWebServer.url("/error.xml").toString()) + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + // ========== XML Detection Tests ========== + + @Test + fun `should detect xml content`() { + val xmlBytes = "".toByteArray() + val loader = VectorIconLoader(context, okHttpClient) + + // Use reflection to access private method for testing + val method = VectorIconLoader::class.java.getDeclaredMethod("isXmlContent", ByteArray::class.java) + method.isAccessible = true + + val result = method.invoke(loader, xmlBytes) as Boolean + + assertThat(result).isTrue() + } + + @Test + fun `should detect xml with bom`() { + val bom = byteArrayOf(0xEF.toByte(), 0xBB.toByte(), 0xBF.toByte()) + val xmlContent = "".toByteArray() + val xmlBytes = bom + xmlContent + + val method = VectorIconLoader::class.java.getDeclaredMethod("isXmlContent", ByteArray::class.java) + method.isAccessible = true + + val result = method.invoke(loader, xmlBytes) as Boolean + + assertThat(result).isTrue() + } + + @Test + fun `should not detect non-xml content`() { + val pngHeader = byteArrayOf(0x89.toByte(), 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A) + + val method = VectorIconLoader::class.java.getDeclaredMethod("isXmlContent", ByteArray::class.java) + method.isAccessible = true + + val result = method.invoke(loader, pngHeader) as Boolean + + assertThat(result).isFalse() + } + + @Test + fun `should handle very small byte arrays`() { + val tinyBytes = byteArrayOf(0x01, 0x02) + + val method = VectorIconLoader::class.java.getDeclaredMethod("isXmlContent", ByteArray::class.java) + method.isAccessible = true + + val result = method.invoke(loader, tinyBytes) as Boolean + + assertThat(result).isFalse() + } + + // ========== Color Parsing Tests ========== + + @Test + fun `should parse hex colors`() { + val xml = """ + + + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + } + + @Test + fun `should handle theme color attributes`() { + val xml = """ + + + + """.trimIndent() + + val imageVector = loader.parseXmlToImageVector(xml.toByteArray()) + + assertThat(imageVector).isNotNull() + } + + // ========== XmlPullParser Overload Tests ========== + + @Test + fun `should parse ImageVector from XmlPullParser`() { + val xml = """ + + + + """.trimIndent() + + val parser = Xml.newPullParser() + parser.setInput(xml.byteInputStream(), "UTF-8") + + val imageVector = loader.parseXmlToImageVector(parser) + + assertThat(imageVector).isNotNull() + assertThat(imageVector!!.defaultWidth.value).isWithin(0.01f).of(24f) + assertThat(imageVector.viewportWidth).isWithin(0.01f).of(960f) + } + + @Test + fun `should return null from XmlPullParser without vector element`() { + val xml = """ + + + + """.trimIndent() + + val parser = Xml.newPullParser() + parser.setInput(xml.byteInputStream(), "UTF-8") + + val imageVector = loader.parseXmlToImageVector(parser) + + assertThat(imageVector).isNull() + } + + // ========== Resource URI Loading Tests ========== + + @Test + fun `should return empty result for res uri with invalid resource id`() = runBlocking { + val result = loader.loadFromUri("res:/notanumber") + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should return empty result for res uri with zero resource id`() = runBlocking { + val result = loader.loadFromUri("res:/0") + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should return empty result for res uri with negative resource id`() = runBlocking { + val result = loader.loadFromUri("res:/-1") + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + @Test + fun `should return empty result for res uri with nonexistent resource`() = runBlocking { + val result = loader.loadFromUri("res:/99999999") + + assertThat(result.imageVector).isNull() + assertThat(result.drawable).isNull() + } + + // ========== Integration Tests ========== + + @Test + fun `should handle complete material symbol workflow`() = runBlocking { + val materialSymbolXml = """ + + + + """.trimIndent() + + mockWebServer.enqueue(MockResponse().setBody(materialSymbolXml).setResponseCode(200)) + + val result = loader.loadFromUri(mockWebServer.url("/symbol.xml").toString()) + + assertThat(result.imageVector).isNotNull() + assertThat(result.imageVector!!.defaultWidth.value).isWithin(0.01f).of(24f) + assertThat(result.imageVector.viewportWidth).isWithin(0.01f).of(960f) + } +} diff --git a/packages/expo-ui/build/jetpack-compose/AlertDialog/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/AlertDialog/index.d.ts.map index 67448c77ce29eb..00d3a20c677893 100644 --- a/packages/expo-ui/build/jetpack-compose/AlertDialog/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/AlertDialog/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/AlertDialog/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;OAEG;IACH,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAOtD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/AlertDialog/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;OAEG;IACH,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAgBtD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts b/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts new file mode 100644 index 00000000000000..18b52588224e51 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts @@ -0,0 +1,22 @@ +import { type ExpoModifier } from '../../types'; +export type BasicAlertDialogProps = { + /** + * The content to display inside the dialog. + */ + children?: React.ReactNode; + /** + * Callback that is called when the user tries to dismiss the dialog + * (e.g. by tapping outside of it or pressing the back button). + */ + onDismissRequest?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A basic alert dialog that provides a blank container for custom content. + * Unlike `AlertDialog`, this component does not have structured title/text/buttons slots. + */ +export declare function BasicAlertDialog(props: BasicAlertDialogProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts.map new file mode 100644 index 00000000000000..fda65a074b80ac --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/BasicAlertDialog/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/BasicAlertDialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAyBF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts b/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts deleted file mode 100644 index 1a8a157c8f1484..00000000000000 --- a/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -export type BottomSheetProps = { - /** - * The children of the `BottomSheet` component. - */ - children: React.ReactNode; - /** - * Whether the `BottomSheet` is opened. - */ - isOpened: boolean; - /** - * Callback function that is called when the `BottomSheet` is opened. - */ - onIsOpenedChange: (isOpened: boolean) => void; - /** - * Immediately opens the bottom sheet in full screen. - */ - skipPartiallyExpanded?: boolean; -}; -export declare function BottomSheet(props: BottomSheetProps): React.JSX.Element; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts.map deleted file mode 100644 index c5264669f5e909..00000000000000 --- a/packages/expo-ui/build/jetpack-compose/BottomSheet/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/BottomSheet/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAsBF,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAElD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Button/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Button/index.d.ts.map index 33d87a6c76207d..094c7696db86cf 100644 --- a/packages/expo-ui/build/jetpack-compose/Button/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Button/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACjD;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,WAAW,EACX,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,OAAO,CAC9E,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAQvC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAsB1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5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KAAK,EAAE,WAAW,GAAG,iBAAiB,CAiC1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Card/index.d.ts b/packages/expo-ui/build/jetpack-compose/Card/index.d.ts new file mode 100644 index 00000000000000..9cfaf731d7a22b --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Card/index.d.ts @@ -0,0 +1,40 @@ +import { type ColorValue } from 'react-native'; +import { ExpoModifier } from '../../types'; +/** + * Colors for card's core elements. + */ +export type CardElementColors = { + containerColor?: ColorValue; + contentColor?: ColorValue; +}; +export type CardProps = { + /** + * The content to display inside the card. + */ + children?: React.ReactNode; + /** + * The variant of the card. + * - 'default' - A filled card with no outline. + * - 'elevated' - A filled card with elevation/shadow. + * - 'outlined' - A card with an outline border. + * @default 'default' + */ + variant?: 'default' | 'elevated' | 'outlined'; + /** + * The background color of the card. + */ + color?: ColorValue; + /** + * Colors for card's core elements. + */ + elementColors?: CardElementColors; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A card component that provides a surface for content. + */ +export declare function Card(props: CardProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Card/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Card/index.d.ts.map new file mode 100644 index 00000000000000..783fb8d064f875 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Card/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC9C;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAiBF;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAEpC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Carousel/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Carousel/index.d.ts.map index 8ee2e1ac86fe69..6299c463be2bd0 100644 --- a/packages/expo-ui/build/jetpack-compose/Carousel/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Carousel/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Carousel/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,eAAe,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,uBAAuB;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;IAC9C,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,wDAAwD;IACxD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,mBAAmB,GAAG,aAAa,CAAC;AAOzC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,mBAAmB,CAEhF;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAE5C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Carousel/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,eAAe,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,uBAAuB;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;IAC9C,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,wDAAwD;IACxD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,mBAAmB,GAAG,aAAa,CAAC;AAOzC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,mBAAmB,CAOhF;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAE5C"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts b/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts index fd92ec3d6aa0b6..597ef6ecfc52eb 100644 --- a/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts @@ -50,10 +50,6 @@ export interface ChipProps { */ onDismiss?: () => void; } -/** - * @hidden - */ -export declare function transformChipProps(props: ChipProps): ChipProps; /** * Displays a native chip component. */ diff --git a/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts.map index 6bd1a5700e0998..a1f59ea9014728 100644 --- a/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Chip/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Chip/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAKD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAE9D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAExD"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Chip/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAkBD;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAExD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ContextMenu/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/ContextMenu/index.d.ts.map index c6fc7569608ec7..ffb590b6f4f852 100644 --- a/packages/expo-ui/build/jetpack-compose/ContextMenu/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/ContextMenu/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3F,OAA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AE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAoC3C;kBApCQ,WAAW;;;;;AA0CpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQxC,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,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAyBF,wBAAgB,KAAK,CAAC,KAAK,EAAE,uBAAuB,+BAEnD;yBAFe,KAAK;;;AAKrB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;yBAFe,OAAO;;;AAKvB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAsC3C;kBAtCQ,WAAW;;;;;AA4CpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts b/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts index f3fd86aac9d2fd..5f65881f895bc5 100644 --- a/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts @@ -1,5 +1,5 @@ import { type ColorValue } from 'react-native'; -import { ExpoModifier, ViewEvent } from '../../types'; +import { ExpoModifier } from '../../types'; export type AndroidVariant = 'picker' | 'input'; export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime'; export type DateTimePickerProps = { @@ -43,19 +43,8 @@ export type DateTimePickerProps = { */ modifiers?: ExpoModifier[]; }; -type NativeDatePickerProps = Omit & { - variant?: AndroidVariant; - initialDate?: number | null; -} & ViewEvent<'onDateSelected', { - date: Date; -}>; -/** - * @hidden - */ -export declare function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps; /** * Renders a `DateTimePicker` component. */ export declare function DateTimePicker(props: DateTimePickerProps): import("react").JSX.Element; -export {}; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts.map index bca52cfe2b5ac7..e9f155b60de46e 100644 --- a/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/DatePicker/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAC/B,mBAAmB,EACnB,SAAS,GAAG,gBAAgB,GAAG,aAAa,CAC7C,GAAG;IACF,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GAAG,SAAS,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAEhD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,CAc9F;AAOD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAGtD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAiCF;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Divider/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Divider/index.d.ts.map index de82b0de15ff4a..d74dff25931b29 100644 --- a/packages/expo-ui/build/jetpack-compose/Divider/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Divider/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Divider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAOF;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAE1C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Divider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAiBF;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAE1C"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts b/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts new file mode 100644 index 00000000000000..878fa45c74fdda --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts @@ -0,0 +1,30 @@ +import { type ExpoModifier } from '../../types'; +export type DockedSearchBarProps = { + /** + * Callback function that is called when the search query changes. + */ + onQueryChange?: (query: string) => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * The children of the component. + */ + children?: React.ReactNode; +}; +type PlaceholderProps = { + children: React.ReactNode; +}; +type LeadingIconProps = { + children: React.ReactNode; +}; +export declare function DockedSearchBarPlaceholder(props: PlaceholderProps): import("react").JSX.Element; +export declare function DockedSearchBarLeadingIcon(props: LeadingIconProps): import("react").JSX.Element; +declare function DockedSearchBar(props: DockedSearchBarProps): import("react").JSX.Element; +declare namespace DockedSearchBar { + var Placeholder: typeof DockedSearchBarPlaceholder; + var LeadingIcon: typeof DockedSearchBarLeadingIcon; +} +export { DockedSearchBar }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts.map new file mode 100644 index 00000000000000..822fcdee05af53 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/DockedSearchBar/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DockedSearchBar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAC;AAGhE,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAkBF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,+BAEjE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,+BAEjE;AAcD,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAMnD;kBANQ,eAAe;;;;AAWxB,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts b/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts new file mode 100644 index 00000000000000..ee44ac30855d00 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts @@ -0,0 +1,2 @@ +export declare const ExpoUIModule: any; +//# sourceMappingURL=ExpoUIModule.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts.map b/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts.map new file mode 100644 index 00000000000000..b49f0d046d1ecd --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ExpoUIModule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExpoUIModule.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/ExpoUIModule.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,KAAgC,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts b/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts new file mode 100644 index 00000000000000..9a90fce4c422b0 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts @@ -0,0 +1,49 @@ +import { ExpoModifier } from '../../types'; +export type FilterChipProps = { + /** + * Whether the chip is currently selected. + */ + selected: boolean; + /** + * The text label to display on the chip. + */ + label: string; + /** + * Whether the chip is enabled and can be interacted with. + */ + enabled?: boolean; + /** + * Callback fired when the chip is clicked. + */ + onPress?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * Children containing LeadingIcon and TrailingIcon slots. + */ + children?: React.ReactNode; +}; +type SlotChildProps = { + children: React.ReactNode; +}; +/** + * Leading icon slot for FilterChip. + */ +declare function FilterChipLeadingIcon(props: SlotChildProps): import("react").JSX.Element; +/** + * Trailing icon slot for FilterChip. + */ +declare function FilterChipTrailingIcon(props: SlotChildProps): import("react").JSX.Element; +/** + * A filter chip component following Material 3 design guidelines. + * Supports slot-based `LeadingIcon` and `TrailingIcon` children. + */ +declare function FilterChipComponent(props: FilterChipProps): import("react").JSX.Element; +declare namespace FilterChipComponent { + var LeadingIcon: typeof FilterChipLeadingIcon; + var TrailingIcon: typeof FilterChipTrailingIcon; +} +export { FilterChipComponent as FilterChip }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts.map new file mode 100644 index 00000000000000..011d850fde66ed --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/FilterChip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/FilterChip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAmBF;;GAEG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,cAAc,+BAEnD;AAED;;GAEG;AACH,iBAAS,sBAAsB,CAAC,KAAK,EAAE,cAAc,+BAEpD;AAED;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,KAAK,EAAE,eAAe,+BAYlD;kBAZQ,mBAAmB;;;;AAiB5B,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts b/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts new file mode 100644 index 00000000000000..289084faf3081a --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts @@ -0,0 +1,41 @@ +import { ExpoModifier } from '../../types'; +export type HorizontalFloatingToolbarProps = { + /** + * The variant of the horizontal floating toolbar. + * @default 'standard' + */ + variant?: 'standard' | 'vibrant'; + /** + * The children of the component. + */ + children: React.ReactNode; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +export type FloatingActionButtonProps = { + /** + * A callback that is called when the button is pressed. + */ + onPress?: () => void; + /** + * The children of the component. + */ + children: React.ReactNode; +}; +/** + * FloatingActionButton component for HorizontalFloatingToolbar. + * This component marks its children to be rendered in the FAB slot. + */ +export declare function HorizontalFloatingToolbarFloatingActionButton(props: FloatingActionButtonProps): import("react").JSX.Element; +/** + * Renders a `HorizontalFloatingToolbar` component. + * A horizontal toolbar that floats above content, typically used for action buttons. + */ +declare function HorizontalFloatingToolbar(props: HorizontalFloatingToolbarProps): import("react").JSX.Element; +declare namespace HorizontalFloatingToolbar { + var FloatingActionButton: typeof HorizontalFloatingToolbarFloatingActionButton; +} +export { HorizontalFloatingToolbar }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map new file mode 100644 index 00000000000000..b02ffbf8eacebd --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/HorizontalFloatingToolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,8BAA8B,GAAG;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAmBF;;;GAGG;AACH,wBAAgB,6CAA6C,CAAC,KAAK,EAAE,yBAAyB,+BAM7F;AAaD;;;GAGG;AACH,iBAAS,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,+BAMvE;kBANQ,yBAAyB;;;AAUlC,OAAO,EAAE,yBAAyB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts b/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts new file mode 100644 index 00000000000000..7fe3703f3cdf2d --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts @@ -0,0 +1,112 @@ +import { type ColorValue, type ImageSourcePropType, type ImageResolvedAssetSource } from 'react-native'; +import { ExpoModifier } from '../../types'; +export type IconProps = { + /** + * The source of the icon. Can be a URI string or the result of `require()`. + * On Android, supports XML vector drawables loaded via Metro bundler. + * + * @example + * ```tsx + * + * + * ``` + */ + source: ImageSourcePropType; + /** + * The tint color to apply to the icon. + * Accepts hex strings, named colors, or RGB arrays. + * + * @example + * ```tsx + * + * + * ``` + */ + tintColor?: ColorValue; + /** + * The size of the icon in density-independent pixels (dp). + * If not specified, the icon will use its intrinsic size. + * + * @example + * ```tsx + * + * ``` + */ + size?: number; + /** + * Accessibility label for the icon. + * Used by screen readers to describe the icon to users. + * + * @example + * ```tsx + * + * ``` + */ + contentDescription?: string; + /** + * Modifiers for the component. + * Allows you to apply layout and styling modifiers to the icon. + * + * @example + * ```tsx + * + * ``` + */ + modifiers?: ExpoModifier[]; +}; +/** + * @hidden + */ +export type NativeIconProps = Omit & { + source: ImageResolvedAssetSource; +}; +/** + * Displays an icon from an XML vector drawable or other image source. + * + * The Icon component renders vector graphics and images with support for + * tinting, sizing, and accessibility features. On Android, it natively + * supports XML vector drawables loaded via Metro bundler using `require()`. + * + * @example + * Basic usage: + * ```tsx + * import { Icon } from 'expo-ui'; + * + * + * ``` + * + * @example + * With styling: + * ```tsx + * + * ``` + * + * @example + * With modifiers: + * ```tsx + * + * ``` + */ +export declare function Icon(props: IconProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts.map new file mode 100644 index 00000000000000..105a81840ea116 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Icon/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Icon/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAE9B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,SAAS,GAAG;IACtB;;;;;;;;;OASG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAE5B;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG;IACxD,MAAM,EAAE,wBAAwB,CAAC;CAClC,CAAC;AAkBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAEpC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts b/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts index 270d2f6445e2fd..e4c8da50b2c62c 100644 --- a/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts @@ -46,10 +46,6 @@ export type IconButtonProps = { export type NativeIconButtonProps = Omit & { shape?: ShapeRecordProps; } & ViewEvent<'onButtonPressed', void>; -/** - * @hidden - */ -export declare function transformIconButtonProps(props: IconButtonProps): NativeIconButtonProps; /** * Displays a native button component. */ diff --git a/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts.map index e84c86e6ba759e..c8280182c082cd 100644 --- a/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/IconButton/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG;IACxF,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAQvC;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,qBAAqB,CAgBtF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG;IACxF,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AA4BvC;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts b/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts new file mode 100644 index 00000000000000..851e99a8a89e2f --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts @@ -0,0 +1,55 @@ +import { ExpoModifier } from '../../types'; +/** + * Content padding values for LazyColumn. + */ +export type ContentPadding = { + /** + * Start padding in dp. + */ + start?: number; + /** + * Top padding in dp. + */ + top?: number; + /** + * End padding in dp. + */ + end?: number; + /** + * Bottom padding in dp. + */ + bottom?: number; +}; +export type LazyColumnProps = { + /** + * The content to display inside the lazy column. + */ + children?: React.ReactNode; + /** + * The vertical arrangement of items. + * Can be a preset string or an object with `spacedBy` to specify spacing in dp. + * @example + * verticalArrangement="center" + * verticalArrangement={{ spacedBy: 8 }} + */ + verticalArrangement?: 'top' | 'bottom' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly' | { + spacedBy: number; + }; + /** + * The horizontal alignment of items. + */ + horizontalAlignment?: 'start' | 'end' | 'center'; + /** + * Content padding in dp. + */ + contentPadding?: ContentPadding; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A lazy column component that efficiently displays a vertically scrolling list. + */ +export declare function LazyColumn(props: LazyColumnProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts.map new file mode 100644 index 00000000000000..f619dda34b4dbe --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/LazyColumn/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/LazyColumn/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAChB,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,GACb;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACjD;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAiBF;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts b/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts new file mode 100644 index 00000000000000..2d6b1c0b0c564e --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts @@ -0,0 +1,81 @@ +import { type ColorValue } from 'react-native'; +import { ExpoModifier } from '../../types'; +/** + * Colors for list item's core elements. + */ +export type ListItemColors = { + containerColor?: ColorValue; + headlineColor?: ColorValue; + leadingIconColor?: ColorValue; + trailingIconColor?: ColorValue; + supportingColor?: ColorValue; + overlineColor?: ColorValue; +}; +export type ListItemProps = { + /** + * The main text content of the list item. + */ + headline: string; + /** + * Optional supporting text displayed below the headline. + */ + supportingText?: string; + /** + * Optional overline text displayed above the headline. + */ + overlineText?: string; + /** + * The background color of the list item. + */ + color?: ColorValue; + /** + * Colors for list item's core elements. + */ + colors?: ListItemColors; + /** + * Callback that is called when the list item is pressed. + */ + onPress?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * Children containing Leading and Trailing slots. + */ + children?: React.ReactNode; +}; +type LeadingProps = { + children: React.ReactNode; +}; +type TrailingProps = { + children: React.ReactNode; +}; +type SupportingContentProps = { + children: React.ReactNode; +}; +/** + * Leading content slot for ListItem. + */ +export declare function ListItemLeading(props: LeadingProps): import("react").JSX.Element; +/** + * Trailing content slot for ListItem. + */ +export declare function ListItemTrailing(props: TrailingProps): import("react").JSX.Element; +/** + * Custom supporting content slot for ListItem. + * When provided, this takes precedence over the `supportingText` prop. + * @platform android + */ +export declare function ListItemSupportingContent(props: SupportingContentProps): import("react").JSX.Element; +/** + * A list item component following Material 3 design guidelines. + */ +declare function ListItemComponent(props: ListItemProps): import("react").JSX.Element; +declare namespace ListItemComponent { + var Leading: typeof ListItemLeading; + var Trailing: typeof ListItemTrailing; + var SupportingContent: typeof ListItemSupportingContent; +} +export { ListItemComponent as ListItem }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts.map new file mode 100644 index 00000000000000..3972a98544f0a4 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ListItem/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ListItem/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,aAAa,CAAC,EAAE,UAAU,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAqBF;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,+BAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,+BAEpD;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,sBAAsB,+BAEtE;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,aAAa,+BAY9C;kBAZQ,iBAAiB;;;;;AAkB1B,OAAO,EAAE,iBAAiB,IAAI,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts b/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts new file mode 100644 index 00000000000000..02c90f616c47a1 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=MaterialSymbolsAssetsTransformer.fx.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts.map b/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts.map new file mode 100644 index 00000000000000..6a046773dfa3ce --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MaterialSymbolsAssetsTransformer.fx.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts b/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts new file mode 100644 index 00000000000000..073e85a22dc478 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts @@ -0,0 +1,34 @@ +import React from 'react'; +import { type ExpoModifier } from '../../types'; +export type ModalBottomSheetProps = { + /** + * The children of the `ModalBottomSheet` component. + */ + children: React.ReactNode; + /** + * Callback function that is called when the bottom sheet is dismissed. + */ + onDismissRequest: () => void; + /** + * Immediately opens the bottom sheet in full screen. + * @default false + */ + skipPartiallyExpanded?: boolean; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A Material Design modal bottom sheet. + */ +export declare function ModalBottomSheet(props: ModalBottomSheetProps): React.JSX.Element; +/** + * @deprecated Use `ModalBottomSheet` instead. + */ +export declare const BottomSheet: typeof ModalBottomSheet; +/** + * @deprecated Use `ModalBottomSheetProps` instead. + */ +export type BottomSheetProps = ModalBottomSheetProps; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts.map new file mode 100644 index 00000000000000..d0b4192f137a8a --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ModalBottomSheet/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ModalBottomSheet/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAC;AAGhE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAqBF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAE5D;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,yBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts b/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts index 8ea4752accca0e..d6275707d575cb 100644 --- a/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts @@ -55,14 +55,8 @@ export type PickerProps = { /** Modifiers for the individual buttons */ buttonModifiers?: ExpoModifier[]; }; -type NativePickerProps = PickerProps; -/** - * @hidden - */ -export declare function transformPickerProps(props: PickerProps): NativePickerProps; /** * Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button. */ export declare function Picker(props: PickerProps): import("react").JSX.Element; -export {}; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts.map index 9ba270a53e47fb..dd094561180fe1 100644 --- a/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Picker/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index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C,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC,CAAC;AAOF,KAAK,iBAAiB,GAAG,WAAW,CAAC;AAErC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAa1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Picker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC,0BAA0B,CAAC,EAAE,UAAU,CAAC;IACxC,2BAA2B,CAAC,EAAE,UAAU,CAAC;IACzC,4BAA4B,CAAC,EAAE,UAAU,CAAC;IAC1C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,4BAA4B,CAAC,EAAE,UAAU,CAAC;IAC1C,8BAA8B,CAAC,EAAE,UAAU,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC,CAAC;AA2BF;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Progress/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Progress/index.d.ts.map index 573d17d0520d9c..052a2bdd1dbfcc 100644 --- a/packages/expo-ui/build/jetpack-compose/Progress/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Progress/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAaF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,+BAEhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,+BAE5D"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAsBF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,+BAEhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,+BAE5D"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts b/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts new file mode 100644 index 00000000000000..cf3074a7970a3f --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts @@ -0,0 +1,31 @@ +import { type ExpoModifier } from '../../types'; +export type PullToRefreshBoxProps = { + /** + * Whether the content is refreshing. + * @default false + */ + isRefreshing?: boolean; + /** + * Callback to call when the content is refreshed. + */ + onRefresh?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * Modifiers for the loading indicator. + * @default [align('topCenter'), padding(0, 10, 0, 0)] + */ + loadingIndicatorModifiers?: ExpoModifier[]; + /** + * The content to refresh. + */ + children: React.ReactNode; +}; +/** + * Renders a `PullToRefreshBox` component. + * A box that allows the user to pull down to refresh the content. + */ +export declare function PullToRefreshBox(props: PullToRefreshBoxProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts.map new file mode 100644 index 00000000000000..a9682b4af14220 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/PullToRefreshBox/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/PullToRefreshBox/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AA4BF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts b/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts new file mode 100644 index 00000000000000..64d4447418646e --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts @@ -0,0 +1,28 @@ +import React from 'react'; +import { ExpoModifier } from '../../types'; +import { PrimitiveBaseProps } from '../layout'; +interface RNHostProps extends PrimitiveBaseProps { + /** + * When true, the RNHost will update its size in the Jetpack Compose view tree to match the children's size. + * When false, the RNHost will use the size of the parent Jetpack Compose View. + * Can be only set once on mount. + * @default false + */ + matchContents?: boolean; + /** + * The RN View to be hosted. + */ + children: React.ReactElement; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * When true, the RNHost will enable vertical scrolling. + * @see Official [Jetpack Compose documentation](androidx.compose.ui.Modifier).verticalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean) + */ + verticalScrollEnabled?: boolean; +} +export declare function RNHostView(props: RNHostProps): React.JSX.Element; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts.map new file mode 100644 index 00000000000000..450148847e556d --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/RNHostView/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RNHostView/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,UAAU,WAAY,SAAQ,kBAAkB;IAC9C;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAiBD,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,qBAS5C"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts b/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts new file mode 100644 index 00000000000000..d480bc6cc74ca9 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts @@ -0,0 +1,20 @@ +import { type ExpoModifier } from '../../types'; +export type RadioButtonProps = { + /** + * Whether the radio button is selected. + */ + selected: boolean; + /** + * Callback that is called when the radio button is clicked. + */ + onClick?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A Material Design radio button. + */ +export declare function RadioButton(props: RadioButtonProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts.map new file mode 100644 index 00000000000000..25aec680618100 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/RadioButton/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RadioButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAC;AAGhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAwBF;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts b/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts new file mode 100644 index 00000000000000..ca55d5fd2418a3 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts @@ -0,0 +1,47 @@ +import { type ExpoModifier } from '../../types'; +export type SearchBarProps = { + /** + * Callback function that is called when the search text is submitted. + */ + onSearch?: (searchText: string) => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * The children of the component. + */ + children?: React.ReactNode; +}; +type PlaceholderProps = { + /** + * The children of the component. + */ + children: React.ReactNode; +}; +type ExpandedFullScreenSearchBarProps = { + /** + * The children of the component. + */ + children: React.ReactNode; +}; +/** + * Placeholder component for SearchBar. + * This component marks its children to be rendered in the placeholder slot. + */ +export declare function SearchBarPlaceholder(props: PlaceholderProps): import("react").JSX.Element; +/** + * ExpandedFullScreenSearchBar component for SearchBar. + * This component marks its children to be rendered in the expanded full-screen search bar. + */ +export declare function ExpandedFullScreenSearchBar(props: ExpandedFullScreenSearchBarProps): import("react").JSX.Element; +/** + * Renders a `SearchBar` component. + */ +declare function SearchBar(props: SearchBarProps): import("react").JSX.Element; +declare namespace SearchBar { + var Placeholder: typeof SearchBarPlaceholder; + var ExpandedFullScreenSearchBar: typeof import(".").ExpandedFullScreenSearchBar; +} +export { SearchBar }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts.map new file mode 100644 index 00000000000000..095523fc9f22ef --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/SearchBar/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/SearchBar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAC;AAGhE,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,gCAAgC,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAqBF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,+BAE3D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,+BAElF;AAcD;;GAEG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,+BAIvC;kBAJQ,SAAS;;;;AASlB,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts b/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts index 7761d2e1a39d45..41b49e0f9bac10 100644 --- a/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts @@ -1,6 +1,27 @@ import { type ColorValue } from 'react-native'; import { ExpoModifier } from '../../types'; -type ShapeType = 'star' | 'pillStar' | 'pill' | 'circle' | 'rectangle' | 'polygon'; +type ShapeType = 'star' | 'pillStar' | 'pill' | 'circle' | 'rectangle' | 'polygon' | 'roundedCorner'; +/** + * Corner radii for RoundedCorner shape. + */ +export type CornerRadii = { + /** + * Top-start corner radius in dp. + */ + topStart?: number; + /** + * Top-end corner radius in dp. + */ + topEnd?: number; + /** + * Bottom-start corner radius in dp. + */ + bottomStart?: number; + /** + * Bottom-end corner radius in dp. + */ + bottomEnd?: number; +}; export type ShapeProps = { /** * Corner rounding percentage. Multiplied by the shorter dimension of the view to produce pixel values. @@ -27,6 +48,10 @@ export type ShapeProps = { * @default 1.0 */ radius?: number; + /** + * Corner radii for RoundedCorner shape. Values are in dp. + */ + cornerRadii?: CornerRadii; /** Color of the shape */ color?: ColorValue; /** @@ -38,7 +63,7 @@ type NativeShapeProps = Omit & { type: ShapeType; modifiers?: unknown; }; -export type ShapeRecordProps = Pick; +export type ShapeRecordProps = Pick; export type ShapeJSXElement = React.ReactElement & { __expo_shape_jsx_element_marker: true; }; @@ -48,6 +73,7 @@ declare function Pill(props: Pick): ShapeJSXElement; declare function Rectangle(props: Pick): ShapeJSXElement; declare function Polygon(props: Pick): ShapeJSXElement; +declare function RoundedCorner(props: Pick): ShapeJSXElement; export declare const Shape: { Star: typeof Star; PillStar: typeof PillStar; @@ -55,6 +81,7 @@ export declare const Shape: { Circle: typeof Circle; Rectangle: typeof Rectangle; Polygon: typeof Polygon; + RoundedCorner: typeof RoundedCorner; }; export declare function parseJSXShape(shape: ShapeJSXElement): ShapeRecordProps; export declare function parseJSXShape(shape?: ShapeJSXElement): ShapeRecordProps | undefined; diff --git a/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts.map index d116fedd923b95..480b4079e3c1c7 100644 --- a/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Shape/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnF,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG;IACtD,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,gBAAgB,EAChB,gBAAgB,GAAG,WAAW,GAAG,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CACrF,CAAC;AAOF,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,GAAG;IACnE,+BAA+B,EAAE,IAAI,CAAC;CACvC,CAAC;AAEF,iBAAS,IAAI,CAAC,KAAK,EAAE,UAAU,GAGxB,eAAe,CACrB;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,UAAU,GAG5B,eAAe,CACrB;AAED,iBAAS,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC,GAGnE,eAAe,CACrB;AAED,iBAAS,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,WAAW,CAAC,GAGpF,eAAe,CACrB;AAED,iBAAS,SAAS,CAChB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC,GAI1E,eAAe,CACrB;AAED,iBAAS,OAAO,CACd,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,WAAW,CAAC,GAI5F,eAAe,CACrB;AAED,eAAO,MAAM,KAAK;;;;;;;CAOjB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC;AACxE,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,KAAK,SAAS,GACV,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,WAAW,GACX,SAAS,GACT,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,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AW,GAAG,OAAO,GAAG,WAAW,CAAC,GACD,eAAe,CACvF;AAED,iBAAS,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,WAAW,CAAC,GAChB,eAAe,CACzF;AAED,iBAAS,SAAS,CAChB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC,GAEH,eAAe,CAC5F;AAED,iBAAS,OAAO,CACd,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,WAAW,CAAC,GAEvB,eAAe,CAC1F;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,GAAG,WAAW,CAAC,GACH,eAAe,CAChG;AAED,eAAO,MAAM,KAAK;;;;;;;;CAQjB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC;AACxE,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts b/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts index 309998ebe701b4..9cf1c4e8fbb247 100644 --- a/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts @@ -1,5 +1,5 @@ import { type ColorValue } from 'react-native'; -import { ExpoModifier, ViewEvent } from '../../types'; +import { ExpoModifier } from '../../types'; /** * Colors for slider's core elements. * @platform android @@ -50,13 +50,5 @@ export type SliderProps = { */ modifiers?: ExpoModifier[]; }; -type NativeSliderProps = Omit & ViewEvent<'onValueChanged', { - value: number; -}>; -/** - * @hidden - */ -export declare function transformSliderProps(props: SliderProps): NativeSliderProps; export declare function Slider(props: SliderProps): import("react").JSX.Element; -export {}; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts.map index a56477b7c5201d..2f265edfa45f0a 100644 --- a/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Slider/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Slider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,GACzD,SAAS,CAAC,gBAAgB,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAOjD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAqB1E;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Slider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAGtD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAoCF,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts b/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts new file mode 100644 index 00000000000000..eab400a7a35e6a --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts @@ -0,0 +1,22 @@ +import { ExpoModifier } from '../../types'; +export type SpacerProps = { + /** + * Modifiers for the component. Use weight() modifier to make the spacer flexible. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A spacer component that fills available space. + * Use with the weight() modifier to create flexible spacing in Row or Column layouts. + * + * @example + * ```tsx + * + * Left + * + * Right + * + * ``` + */ +export declare function Spacer(props: SpacerProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts.map new file mode 100644 index 00000000000000..235be1caa98c2c --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Spacer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Spacer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAiBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts b/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts new file mode 100644 index 00000000000000..20bc3501907678 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts @@ -0,0 +1,44 @@ +import React from 'react'; +import { type ColorValue } from 'react-native'; +import { type ExpoModifier } from '../../types'; +export type SurfaceProps = { + /** + * The content to display inside the surface. + */ + children?: React.ReactNode; + /** + * The background color of the surface. + * Defaults to `MaterialTheme.colorScheme.surface`. + */ + color?: ColorValue; + /** + * The color of the content inside the surface. + * Defaults to `contentColorFor(color)`. + */ + contentColor?: ColorValue; + /** + * The tonal elevation of the surface, which affects its background color + * based on the color scheme. Value in dp. + * + * @default 0 + */ + tonalElevation?: number; + /** + * The shadow elevation of the surface. Value in dp. + * + * @default 0 + */ + shadowElevation?: number; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A Material Design surface container. Surface is responsible for: + * - Clipping content to the shape + * - Applying background color based on tonal elevation + * - Providing content color to its children + */ +export declare function Surface(props: SurfaceProps): React.JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts.map new file mode 100644 index 00000000000000..24b7d16184cce6 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Surface/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Surface/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAkBF;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,qBAE1C"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts b/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts index dcfbd643530446..472a18a5a4ed3d 100644 --- a/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts @@ -1,4 +1,4 @@ -import { NativeSyntheticEvent, type ColorValue } from 'react-native'; +import { type ColorValue } from 'react-native'; import { ExpoModifier } from '../../types'; /** * Only for switch. @@ -48,6 +48,11 @@ export type SwitchProps = { * Modifiers for the component. */ modifiers?: ExpoModifier[]; + /** + * Children containing ThumbContent slot. + * @platform android + */ + children?: React.ReactNode; } & (SwitchSwitchVariantProps | SwitchCheckboxVariantProps | SwitchButtonVariantProps); export type SwitchSwitchVariantProps = { variant?: 'switch'; @@ -69,15 +74,18 @@ export type SwitchButtonVariantProps = { variant: 'button'; elementColors?: undefined; }; -type NativeSwitchProps = Omit & { - onValueChange: (event: NativeSyntheticEvent<{ - value: boolean; - }>) => void; +type ThumbContentProps = { + children: React.ReactNode; }; /** - * @hidden + * Custom content to be displayed inside the switch thumb. + * @platform android */ -export declare function transformSwitchProps(props: SwitchProps): NativeSwitchProps; -export declare function Switch(props: SwitchProps): import("react").JSX.Element; -export {}; +export declare function SwitchThumbContent(props: ThumbContentProps): import("react").JSX.Element; +declare function SwitchComponent(props: SwitchProps): import("react").JSX.Element; +declare namespace SwitchComponent { + var ThumbContent: typeof SwitchThumbContent; + var DefaultIconSize: any; +} +export { SwitchComponent as Switch }; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts.map index bf731a4379cbab..00e3e6964462d7 100644 --- a/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/Switch/index.d.ts.map @@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H,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,QAAQ,CAAC;IAClB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG;IAC5D,aAAa,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CAC1E,CAAC;AAyBF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAU1E;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C;;GAEG;AACH,KAAK,mBAAmB,GAAG;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,mBAAmB,CAAC,EAAE,UAAU,CAAC;CAClC,CAAC;AAGF;;GAEG;AACH,KAAK,qBAAqB,GAAG;IAC3B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,cAAc,CAAC,EAAE,UA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end of file diff --git a/packages/expo-ui/build/jetpack-compose/Text/index.d.ts b/packages/expo-ui/build/jetpack-compose/Text/index.d.ts new file mode 100644 index 00000000000000..e233c646233fd0 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Text/index.d.ts @@ -0,0 +1,182 @@ +import { ExpoModifier } from '../../types'; +/** + * Font weight options for text styling. + */ +export type TextFontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; +/** + * Font style options for text styling. + */ +export type TextFontStyle = 'normal' | 'italic'; +/** + * Text alignment options. + */ +export type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end'; +/** + * Text decoration options. + */ +export type TextDecoration = 'none' | 'underline' | 'lineThrough'; +/** + * Text overflow behavior options. + */ +export type TextOverflow = 'clip' | 'ellipsis' | 'visible'; +/** + * Material 3 Typography scale styles. + * Corresponds to MaterialTheme.typography in Jetpack Compose. + */ +export type TypographyStyle = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | 'labelLarge' | 'labelMedium' | 'labelSmall'; +/** + * Text style properties that can be applied to text. + * Corresponds to Jetpack Compose's TextStyle. + */ +export type TextStyle = { + /** + * Material 3 Typography style to use as the base style. + * When specified, applies the predefined Material 3 typography style. + * Other properties in this style object will override specific values from the typography. + * + * @example + * ```tsx + * style={{ typography: "bodyLarge" }} + * style={{ typography: "headlineMedium", fontWeight: "bold" }} + * ``` + */ + typography?: TypographyStyle; + /** + * The font size in sp (scale-independent pixels). + */ + fontSize?: number; + /** + * The font weight of the text. + */ + fontWeight?: TextFontWeight; + /** + * The font style of the text. + */ + fontStyle?: TextFontStyle; + /** + * The text alignment. + */ + textAlign?: TextAlign; + /** + * The text decoration. + */ + textDecoration?: TextDecoration; + /** + * The letter spacing in sp. + */ + letterSpacing?: number; + /** + * The line height in sp. + */ + lineHeight?: number; +}; +export type TextProps = { + /** + * The text content to display. + */ + children?: React.ReactNode; + /** + * The color of the text. + */ + color?: string; + /** + * How visual overflow should be handled. + * - 'clip': Clips the overflowing text to fix its container + * - 'ellipsis': Uses an ellipsis to indicate that the text has overflowed + * - 'visible': Renders overflow text outside its container + */ + overflow?: TextOverflow; + /** + * Whether the text should break at soft line breaks. + * If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. + */ + softWrap?: boolean; + /** + * An optional maximum number of lines for the text to span, wrapping if necessary. + * If the text exceeds the given number of lines, it will be truncated according to overflow. + */ + maxLines?: number; + /** + * The minimum height in terms of minimum number of visible lines. + */ + minLines?: number; + /** + * Style configuration for the text. + * Corresponds to Jetpack Compose's TextStyle parameter. + */ + style?: TextStyle; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * Renders a Text component using Jetpack Compose. + * + * The Text component provides comprehensive text styling capabilities. + * The API is aligned with Jetpack Compose's Text composable, where: + * - Top-level props (color, maxLines, etc.) match Compose's Text parameters + * - `style` object corresponds to TextStyle, including typography, fontSize, fontWeight, textAlign, etc. + * - `style.typography` applies Material 3 typography styles (like MaterialTheme.typography) + * + * @example + * Basic usage: + * ```tsx + * import { Text } from 'expo-ui'; + * + * Hello World + * ``` + * + * @example + * Using Material 3 Typography (matches Jetpack Compose MaterialTheme.typography): + * ```tsx + * Body text + * Headline + * Small title + * ``` + * + * @example + * Typography with style overrides: + * ```tsx + * + * Custom styled body text + * + * ``` + * + * @example + * With custom style object (matches Jetpack Compose TextStyle): + * ```tsx + * + * Styled text + * + * ``` + * + * @example + * Text truncation with ellipsis: + * ```tsx + * + * This is a very long text that will be truncated after two lines + * with an ellipsis at the end to indicate there's more content... + * + * ``` + */ +export declare function Text(props: TextProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/Text/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/Text/index.d.ts.map new file mode 100644 index 00000000000000..3a6c1c154af26d --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/Text/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Text/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,eAAe,GACf,cAAc,GACd,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,aAAa,GACb,YAAY,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAwCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAEpC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts b/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts new file mode 100644 index 00000000000000..eeae46c5599e77 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts @@ -0,0 +1,29 @@ +import { type ColorValue } from 'react-native'; +import { ExpoModifier } from '../../types'; +export type TextButtonProps = { + /** + * The text content to display in the button. + */ + children?: string | string[] | React.JSX.Element; + /** + * The color of the button text. + */ + color?: ColorValue; + /** + * Whether the button is disabled. + */ + disabled?: boolean; + /** + * Callback that is called when the button is pressed. + */ + onPress?: () => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; +}; +/** + * A text button component that displays a clickable text label. + */ +export declare function TextButton(props: TextButtonProps): import("react").JSX.Element; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts.map new file mode 100644 index 00000000000000..71d5a8d35e6385 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/TextButton/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAItD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAqBF;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/TextInput/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/TextInput/index.d.ts.map index 29c80e473904dc..29c88f6320803d 100644 --- a/packages/expo-ui/build/jetpack-compose/TextInput/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/TextInput/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO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,+BAE9C"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts b/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts new file mode 100644 index 00000000000000..952dc5eb9fa3c9 --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts @@ -0,0 +1,54 @@ +import { type ColorValue } from 'react-native'; +import { type ExpoModifier } from '../../types'; +export type ToggleButtonProps = { + /** + * Whether the toggle button is checked. + */ + checked: boolean; + /** + * Text to display in the button. + */ + text?: string; + /** + * The variant of the toggle button. + * - `'default'` - Material 3 ToggleButton + * - `'icon'` - Icon toggle button + * - `'filledIcon'` - Filled icon toggle button + * - `'outlinedIcon'` - Outlined icon toggle button + * @default 'default' + */ + variant?: 'default' | 'icon' | 'filledIcon' | 'outlinedIcon'; + /** + * The color of the toggle button when checked. + */ + color?: ColorValue; + /** + * Whether the button is disabled. + */ + disabled?: boolean; + /** + * Callback that is called when the checked state changes. + */ + onCheckedChange?: (checked: boolean) => void; + /** + * Modifiers for the component. + */ + modifiers?: ExpoModifier[]; + /** + * The content to display inside the toggle button. + */ + children?: React.ReactNode; +}; +/** + * A toggle button component that can be toggled on and off. + * + * When `text` prop is provided, it displays the text. + * Otherwise, custom children can be passed to render custom content. + */ +declare function ToggleButton(props: ToggleButtonProps): import("react").JSX.Element; +declare namespace ToggleButton { + var DefaultIconSpacing: any; + var DefaultIconSize: any; +} +export { ToggleButton }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts.map new file mode 100644 index 00000000000000..b9b2188bfbd64a --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/ToggleButton/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ToggleButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,aAAa,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,cAAc,CAAC;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAqBF;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAI7C;kBAJQ,YAAY;;;;AASrB,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/index.d.ts b/packages/expo-ui/build/jetpack-compose/index.d.ts index 4c459c4165c4f1..dbdfe1a71979e7 100644 --- a/packages/expo-ui/build/jetpack-compose/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/index.d.ts @@ -1,18 +1,37 @@ +import './MaterialSymbolsAssetsTransformer.fx'; export * from './AlertDialog'; +export * from './BasicAlertDialog'; +export * from './Card'; export * from './Chip'; +export * from './FilterChip'; export * from './Button'; +export * from './Icon'; export * from './IconButton'; export * from './ContextMenu'; export * from './Divider'; export * from './Host'; +export * from './LazyColumn'; +export * from './ListItem'; +export * from './RNHostView'; export * from './DatePicker'; export * from './Picker'; export * from './Progress'; export * from './Slider'; +export * from './Spacer'; export * from './Switch'; +export * from './TextButton'; export * from './TextInput'; +export * from './ToggleButton'; export * from './Shape'; -export * from './BottomSheet'; +export * from './ModalBottomSheet'; export * from './Carousel'; +export * from './SearchBar'; +export * from './DockedSearchBar'; +export * from './HorizontalFloatingToolbar'; +export * from './PullToRefreshBox'; +export * from './RadioButton'; +export * from './Surface'; +export * from './Text'; export * from './layout'; +export { ViewEvent } from '../types'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/index.d.ts.map b/packages/expo-ui/build/jetpack-compose/index.d.ts.map index adbbfd08eee41c..cb6dc181f13d5b 100644 --- a/packages/expo-ui/build/jetpack-compose/index.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAE3B,cAAc,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,OAAO,uCAAuC,CAAC;AAE/C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/layout.d.ts b/packages/expo-ui/build/jetpack-compose/layout.d.ts index 79e4666ac02588..efac9e33e845e9 100644 --- a/packages/expo-ui/build/jetpack-compose/layout.d.ts +++ b/packages/expo-ui/build/jetpack-compose/layout.d.ts @@ -1,4 +1,3 @@ -import { ColorValue } from 'react-native'; import { ExpoModifier } from '../types'; export type PrimitiveBaseProps = { /** @@ -6,35 +5,33 @@ export type PrimitiveBaseProps = { */ modifiers?: ExpoModifier[]; }; -export type HorizontalArrangement = 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly'; -export type VerticalArrangement = 'top' | 'bottom' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly'; +export type HorizontalArrangement = 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly' | { + spacedBy: number; +}; +export type VerticalArrangement = 'top' | 'bottom' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly' | { + spacedBy: number; +}; export type HorizontalAlignment = 'start' | 'end' | 'center'; export type VerticalAlignment = 'top' | 'bottom' | 'center'; +export type ContentAlignment = 'topStart' | 'topCenter' | 'topEnd' | 'centerStart' | 'center' | 'centerEnd' | 'bottomStart' | 'bottomCenter' | 'bottomEnd'; +export type FloatingToolbarExitAlwaysScrollBehavior = 'top' | 'bottom' | 'start' | 'end'; type LayoutBaseProps = { children?: React.ReactNode; horizontalArrangement?: HorizontalArrangement; verticalArrangement?: VerticalArrangement; horizontalAlignment?: HorizontalAlignment; verticalAlignment?: VerticalAlignment; + contentAlignment?: ContentAlignment; + floatingToolbarExitAlwaysScrollBehavior?: FloatingToolbarExitAlwaysScrollBehavior; modifiers?: ExpoModifier[]; } & PrimitiveBaseProps; -export type BoxProps = Pick; -export declare function Box(props: BoxProps): import("react").JSX.Element | null; +export type BoxProps = Pick; +export declare function Box(props: BoxProps): import("react").JSX.Element; export type RowProps = LayoutBaseProps; -export declare function Row(props: RowProps): import("react").JSX.Element | null; +export declare function Row(props: RowProps): import("react").JSX.Element; +export type FlowRowProps = Pick; +export declare function FlowRow(props: FlowRowProps): import("react").JSX.Element; export type ColumnProps = LayoutBaseProps; -export declare function Column(props: ColumnProps): import("react").JSX.Element | null; -export type TextFontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; -export type TextProps = { - /** - * The children of the text. - * Only string and number are supported. - */ - children?: React.ReactNode; - color?: ColorValue; - fontSize?: number; - fontWeight?: TextFontWeight; -} & PrimitiveBaseProps; -export declare function Text(props: TextProps): import("react").JSX.Element | null; +export declare function Column(props: ColumnProps): import("react").JSX.Element; export {}; //# sourceMappingURL=layout.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/layout.d.ts.map b/packages/expo-ui/build/jetpack-compose/layout.d.ts.map index 2cd3af5fef0c17..39b1e1f8394ac1 100644 --- a/packages/expo-ui/build/jetpack-compose/layout.d.ts.map +++ b/packages/expo-ui/build/jetpack-compose/layout.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,KAAK,GACL,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,CAAC;AAClB,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,CAAC;AAClB,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,GAAG,kBAAkB,CAAC;AAGvB,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC;AAGvE,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,sCAKlC;AAID,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC;AAGvC,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,sCAKlC;AAID,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAG1C,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,sCAKxC;AAKD,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,GAAG,kBAAkB,CAAC;AAevB,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,sCAKpC"} \ No newline at end of file +{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/layout.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,KAAK,GACL,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,GACb;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AACzB,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,GACb;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AACzB,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,GA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at end of file diff --git a/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts b/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts new file mode 100644 index 00000000000000..35feb06463964a --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts @@ -0,0 +1,18 @@ +/** + * Base interface for all view modifiers. + * All modifiers must have a type field and can include arbitrary parameters. + */ +export interface ModifierConfig { + $type: string; + [key: string]: any; + eventListener?: (args: any) => void; +} +/** + * Factory function to create modifier configuration objects. + */ +export declare function createModifier(type: string, params?: Record): ModifierConfig; +/** + * Creates a modifier with an event listener. + */ +export declare function createModifierWithEventListener(type: string, eventListener: (args: any) => void, params?: Record): ModifierConfig; +//# sourceMappingURL=createModifier.d.ts.map \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts.map b/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts.map new file mode 100644 index 00000000000000..88cde6901ace3c --- /dev/null +++ b/packages/expo-ui/build/jetpack-compose/modifiers/createModifier.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createModifier.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/modifiers/createModifier.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,cAAc,CAE7F;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,EAClC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC/B,cAAc,CAEhB"} \ No newline at end of file diff --git a/packages/expo-ui/build/jetpack-compose/modifiers/index.d.ts b/packages/expo-ui/build/jetpack-compose/modifiers/index.d.ts index b69f4321832cb9..b4704f6d0ece0f 100644 --- a/packages/expo-ui/build/jetpack-compose/modifiers/index.d.ts +++ b/packages/expo-ui/build/jetpack-compose/modifiers/index.d.ts @@ -1,26 +1,11 @@ import { type ColorValue } from 'react-native'; -import { ShapeJSXElement } from '../Shape'; -/** - * Modifier configuration for Jetpack Compose views. - * This follows the JSON Config pattern (same as iOS SwiftUI modifiers). - * - * @example - * ```tsx - * import { Button, paddingAll, background } from 'expo-ui'; - * - *