@expo/ui 58.0.11 → 58.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +1 -0
- package/build/State/index.d.ts +1 -0
- package/build/State/index.js +1 -0
- package/build/State/index.js.map +1 -1
- package/build/State/useWorkletCallback.d.ts +31 -0
- package/build/State/useWorkletCallback.js +30 -0
- package/build/State/useWorkletCallback.js.map +1 -0
- package/build/jetpack-compose/index.d.ts +1 -1
- package/build/jetpack-compose/index.js +1 -1
- package/build/jetpack-compose/index.js.map +1 -1
- package/build/swift-ui/ArrangementView/index.d.ts +48 -0
- package/build/swift-ui/ArrangementView/index.js +56 -0
- package/build/swift-ui/ArrangementView/index.js.map +1 -0
- package/build/swift-ui/index.d.ts +2 -1
- package/build/swift-ui/index.js +2 -1
- package/build/swift-ui/index.js.map +1 -1
- package/build/swift-ui/modifiers/animation/index.d.ts +6 -1
- package/build/swift-ui/modifiers/animation/index.js +24 -14
- package/build/swift-ui/modifiers/animation/index.js.map +1 -1
- package/build/swift-ui/modifiers/animation/types.d.ts +15 -1
- package/build/swift-ui/modifiers/animation/types.js.map +1 -1
- package/build/swift-ui/modifiers/arrangementModifiers.d.ts +109 -0
- package/build/swift-ui/modifiers/arrangementModifiers.js +35 -0
- package/build/swift-ui/modifiers/arrangementModifiers.js.map +1 -0
- package/build/swift-ui/modifiers/hingeObservation.d.ts +73 -0
- package/build/swift-ui/modifiers/hingeObservation.js +45 -0
- package/build/swift-ui/modifiers/hingeObservation.js.map +1 -0
- package/build/swift-ui/modifiers/index.d.ts +34 -2
- package/build/swift-ui/modifiers/index.js +20 -0
- package/build/swift-ui/modifiers/index.js.map +1 -1
- package/ios/ArrangementViewView.swift +40 -0
- package/ios/ExpoUIModule.swift +1 -0
- package/ios/Modifiers/AnimationConfig.swift +20 -0
- package/ios/Modifiers/ArrangementModifiers.swift +157 -0
- package/ios/Modifiers/HingeObservationModifiers.swift +82 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +109 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.11/expo.modules.ui-58.0.11-sources.jar → 58.0.13/expo.modules.ui-58.0.13-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.11/expo.modules.ui-58.0.11.module → 58.0.13/expo.modules.ui-58.0.13.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.11/expo.modules.ui-58.0.11.pom → 58.0.13/expo.modules.ui-58.0.13.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha512 +1 -0
- package/package.json +3 -3
- package/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
- package/src/State/index.ts +1 -0
- package/src/State/useWorkletCallback.ts +48 -0
- package/src/jetpack-compose/index.ts +1 -1
- package/src/swift-ui/ArrangementView/index.tsx +70 -0
- package/src/swift-ui/index.tsx +2 -1
- package/src/swift-ui/modifiers/animation/index.ts +24 -11
- package/src/swift-ui/modifiers/animation/types.ts +18 -0
- package/src/swift-ui/modifiers/arrangementModifiers.ts +142 -0
- package/src/swift-ui/modifiers/hingeObservation.ts +91 -0
- package/src/swift-ui/modifiers/index.ts +43 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.11/expo.modules.ui-58.0.11.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [iOS] Add `ArrangementView` component and `arrangementViewStyle`, `splitArrangementLayoutRatio`, `splitArrangementLayoutSize`, `splitArrangementFixedLayoutSize`, and `overlayArrangementEdge` modifiers. ([#50893](https://github.com/expo/expo/pull/50893) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
8
|
+
- [Android] Fix `TimePickerDialog` ignoring `elementColors.containerColor`. ([#51116](https://github.com/expo/expo/pull/51116) by [@expo-bot](https://github.com/expo-bot))
|
|
9
|
+
- [iOS][tvOS] Fix the tvOS build failing to compile with `'inlineLarge' is unavailable in tvOS` when `@expo/ui` is linked. `ToolbarTitleDisplayMode.inlineLarge` is unavailable on tvOS, but the `inlineLarge` case of the `toolbarTitleDisplayMode` modifier was only gated behind an OS version check that listed `tvOS 18.0`, so it was compiled into the tvOS slice. It is now guarded by platform and returns `nil` on tvOS. The same check also required iOS 18.0 / macOS 15.0, so `inlineLarge` silently fell back to `automatic` on iOS 17 and macOS 14 even though it is available there; it now applies on those versions. ([#51007](https://github.com/expo/expo/pull/51007) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
10
|
+
- [iOS] `onHingeChange` also accepts a callback from `useWorkletCallback`, which runs on the UI thread to track the hinge angle without a JS-thread round trip. ([#50910](https://github.com/expo/expo/pull/50910) by [@huntie](https://github.com/huntie))
|
|
11
|
+
- [iOS] Added the `onHingeChange` modifier, which reports the device hinge angle and status on iPhone Duo (iOS 27.1+). ([#50909](https://github.com/expo/expo/pull/50909) by [@huntie](https://github.com/huntie))
|
|
12
|
+
- Added the `useWorkletCallback` hook, which wraps a worklet function so a modifier that accepts one can run it synchronously on the UI thread. ([#51108](https://github.com/expo/expo/pull/51108) by [@huntie](https://github.com/huntie))
|
|
13
|
+
|
|
14
|
+
## 58.0.12
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [iOS] Added the `smooth`, `snappy`, and `bouncy` spring presets to `Animation`. Like their SwiftUI counterparts, they take an optional `duration` and `extraBounce`. ([#50984](https://github.com/expo/expo/pull/50984) by [@Den1Marshall](https://github.com/Den1Marshall))
|
|
19
|
+
- [iOS] Fixed `delay()` and `repeat()` modifying the animation they are called on. Chaining from a shared animation, such as `Animation.default` or one stored in a constant, no longer changes that animation everywhere else it is used. ([#50927](https://github.com/expo/expo/pull/50927) by [@Den1Marshall](https://github.com/Den1Marshall))
|
|
20
|
+
- [iOS] Added the `navigationBarTitleDisplayMode` and `toolbarTitleDisplayMode` modifiers for controlling navigation and toolbar title presentation. ([#50687](https://github.com/expo/expo/pull/50687) by [@0x5bfa](https://github.com/0x5bfa))
|
|
21
|
+
|
|
3
22
|
## 58.0.11
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '58.0.
|
|
15
|
+
version = '58.0.13'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "58.0.
|
|
21
|
+
versionName "58.0.13"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -451,6 +451,7 @@ fun ExpoTimePickerDialogContent(props: TimePickerDialogProps, onDateSelected: (D
|
|
|
451
451
|
Text(props.dismissButtonLabel ?: stringResource(android.R.string.cancel))
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
|
+
containerColor = timePickerColors.containerColor,
|
|
454
455
|
text = {
|
|
455
456
|
TimePicker(
|
|
456
457
|
state = state,
|
package/build/State/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './index.fx';
|
|
2
2
|
export { useNativeState, type ObservableState } from './useNativeState';
|
|
3
3
|
export { useWorkletProp } from './useWorkletProp';
|
|
4
|
+
export { useWorkletCallback, type WorkletCallback } from './useWorkletCallback';
|
|
4
5
|
export { worklets } from './optionalWorklets';
|
|
5
6
|
export { getStateId } from './utils';
|
package/build/State/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import './index.fx';
|
|
6
6
|
export { useNativeState } from './useNativeState';
|
|
7
7
|
export { useWorkletProp } from './useWorkletProp';
|
|
8
|
+
export { useWorkletCallback } from './useWorkletCallback';
|
|
8
9
|
export { worklets } from './optionalWorklets';
|
|
9
10
|
export { getStateId } from './utils';
|
|
10
11
|
|
package/build/State/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["State/index.ts"],"sourcesContent":[null],"names":["useNativeState","useWorkletProp","worklets","getStateId"],"mappings":"AAAA,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,mDAAmD;AACnD,OAAO,aAAa;AAEpB,SAASA,cAAc,QAA8B,mBAAmB;AACxE,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,UAAU,QAAQ,UAAU"}
|
|
1
|
+
{"version":3,"sources":["State/index.ts"],"sourcesContent":[null],"names":["useNativeState","useWorkletProp","useWorkletCallback","worklets","getStateId"],"mappings":"AAAA,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,mDAAmD;AACnD,OAAO,aAAa;AAEpB,SAASA,cAAc,QAA8B,mBAAmB;AACxE,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,kBAAkB,QAA8B,uBAAuB;AAChF,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,UAAU,QAAQ,UAAU"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SharedObject } from 'expo';
|
|
2
|
+
/**
|
|
3
|
+
* A worklet function wrapped for native code, returned by [`useWorkletCallback`](#useworkletcallback).
|
|
4
|
+
* Pass it to a modifier or prop that accepts worklet callbacks, which then runs it synchronously on
|
|
5
|
+
* the UI thread.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkletCallback<T extends (...args: never[]) => void> = SharedObject & {
|
|
8
|
+
/** @hidden */
|
|
9
|
+
readonly __workletCallbackType?: T;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a worklet function so native code can run it synchronously on the UI thread, with no
|
|
13
|
+
* JS-thread round trip. Pass the result to a modifier that accepts worklet callbacks, such as
|
|
14
|
+
* `onHingeChange`. The callback must start with the `'worklet'` directive, and
|
|
15
|
+
* [`react-native-worklets`](https://docs.swmansion.com/react-native-worklets/) must be installed.
|
|
16
|
+
*
|
|
17
|
+
* The native callback is updated when `callback` changes and released when the component unmounts,
|
|
18
|
+
* so call it at the top of your component like any hook.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const angle = useNativeState(180);
|
|
23
|
+
* const onHinge = useWorkletCallback((_, newContext) => {
|
|
24
|
+
* 'worklet';
|
|
25
|
+
* angle.value = newContext.hinge?.angle ?? 180;
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* <VStack modifiers={[onHingeChange(onHinge)]} />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useWorkletCallback<T extends (...args: never[]) => void>(callback: T): WorkletCallback<T>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { worklets } from './optionalWorklets';
|
|
2
|
+
import { useWorkletProp } from './useWorkletProp';
|
|
3
|
+
/**
|
|
4
|
+
* Wraps a worklet function so native code can run it synchronously on the UI thread, with no
|
|
5
|
+
* JS-thread round trip. Pass the result to a modifier that accepts worklet callbacks, such as
|
|
6
|
+
* `onHingeChange`. The callback must start with the `'worklet'` directive, and
|
|
7
|
+
* [`react-native-worklets`](https://docs.swmansion.com/react-native-worklets/) must be installed.
|
|
8
|
+
*
|
|
9
|
+
* The native callback is updated when `callback` changes and released when the component unmounts,
|
|
10
|
+
* so call it at the top of your component like any hook.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const angle = useNativeState(180);
|
|
15
|
+
* const onHinge = useWorkletCallback((_, newContext) => {
|
|
16
|
+
* 'worklet';
|
|
17
|
+
* angle.value = newContext.hinge?.angle ?? 180;
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* <VStack modifiers={[onHingeChange(onHinge)]} />
|
|
21
|
+
* ```
|
|
22
|
+
*/ export function useWorkletCallback(callback) {
|
|
23
|
+
const workletCallback = useWorkletProp(callback);
|
|
24
|
+
if (!worklets || !workletCallback) {
|
|
25
|
+
throw new Error("useWorkletCallback needs the 'react-native-worklets' package, which couldn't be loaded. " + 'Install react-native-worklets and rebuild the native app, or pass a plain function ' + 'where the API accepts one.');
|
|
26
|
+
}
|
|
27
|
+
return workletCallback;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=useWorkletCallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["State/useWorkletCallback.ts"],"sourcesContent":[null],"names":["worklets","useWorkletProp","useWorkletCallback","callback","workletCallback","Error"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,cAAc,QAAQ,mBAAmB;AAYlD;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASC,mBACdC,QAAW;IAEX,MAAMC,kBAAkBH,eAAeE;IACvC,IAAI,CAACH,YAAY,CAACI,iBAAiB;QACjC,MAAM,IAAIC,MACR,6FACE,wFACA;IAEN;IACA,OAAOD;AACT"}
|
|
@@ -49,6 +49,6 @@ export * from './Box';
|
|
|
49
49
|
export * from './Row';
|
|
50
50
|
export * from './Column';
|
|
51
51
|
export * from './FlowRow';
|
|
52
|
-
export { useNativeState } from '../State';
|
|
52
|
+
export { useNativeState, useWorkletCallback, type WorkletCallback } from '../State';
|
|
53
53
|
export type { ViewEvent } from '../types';
|
|
54
54
|
export type { PrimitiveBaseProps } from './layout-types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,SAASC,cAAc,
|
|
1
|
+
{"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState","useWorkletCallback"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,SAASC,cAAc,EAAEC,kBAAkB,QAA8B,WAAW"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
|
+
export interface ArrangementViewProps extends CommonViewModifierProps {
|
|
3
|
+
/**
|
|
4
|
+
* The views to arrange. Provide `ArrangementView.Primary` and `ArrangementView.Secondary`.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The primary view of the arrangement.
|
|
10
|
+
*/
|
|
11
|
+
declare function ArrangementViewPrimary(props: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* The secondary view of the arrangement.
|
|
16
|
+
*/
|
|
17
|
+
declare function ArrangementViewSecondary(props: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* ArrangementView uses the native [ArrangementView](https://developer.apple.com/documentation/swiftui/arrangementview) view.
|
|
22
|
+
*
|
|
23
|
+
* A view that arranges primary and secondary content using an adaptive layout that responds to
|
|
24
|
+
* the environment.
|
|
25
|
+
*
|
|
26
|
+
* > **Note:** Below iOS 27.1, the children render without a container.
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Host style={{ flex: 1 }}>
|
|
30
|
+
* <ArrangementView modifiers={[arrangementViewStyle('split')]}>
|
|
31
|
+
* <ArrangementView.Primary>
|
|
32
|
+
* <NowPlaying />
|
|
33
|
+
* </ArrangementView.Primary>
|
|
34
|
+
* <ArrangementView.Secondary>
|
|
35
|
+
* <Lyrics />
|
|
36
|
+
* </ArrangementView.Secondary>
|
|
37
|
+
* </ArrangementView>
|
|
38
|
+
* </Host>
|
|
39
|
+
* ```
|
|
40
|
+
* @platform ios 27.1+
|
|
41
|
+
* @platform tvos 27.1+
|
|
42
|
+
*/
|
|
43
|
+
export declare function ArrangementView(props: ArrangementViewProps): import("react").JSX.Element;
|
|
44
|
+
export declare namespace ArrangementView {
|
|
45
|
+
var Primary: typeof ArrangementViewPrimary;
|
|
46
|
+
var Secondary: typeof ArrangementViewSecondary;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { requireNativeView } from 'expo';
|
|
3
|
+
import { Slot } from '../SlotView';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
const ArrangementViewNativeView = requireNativeView('ExpoUI', 'ArrangementViewView');
|
|
6
|
+
/**
|
|
7
|
+
* The primary view of the arrangement.
|
|
8
|
+
*/ function ArrangementViewPrimary(props) {
|
|
9
|
+
return /*#__PURE__*/ _jsx(Slot, {
|
|
10
|
+
name: "primary",
|
|
11
|
+
children: props.children
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The secondary view of the arrangement.
|
|
16
|
+
*/ function ArrangementViewSecondary(props) {
|
|
17
|
+
return /*#__PURE__*/ _jsx(Slot, {
|
|
18
|
+
name: "secondary",
|
|
19
|
+
children: props.children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
ArrangementView.Primary = ArrangementViewPrimary;
|
|
23
|
+
ArrangementView.Secondary = ArrangementViewSecondary;
|
|
24
|
+
/**
|
|
25
|
+
* ArrangementView uses the native [ArrangementView](https://developer.apple.com/documentation/swiftui/arrangementview) view.
|
|
26
|
+
*
|
|
27
|
+
* A view that arranges primary and secondary content using an adaptive layout that responds to
|
|
28
|
+
* the environment.
|
|
29
|
+
*
|
|
30
|
+
* > **Note:** Below iOS 27.1, the children render without a container.
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Host style={{ flex: 1 }}>
|
|
34
|
+
* <ArrangementView modifiers={[arrangementViewStyle('split')]}>
|
|
35
|
+
* <ArrangementView.Primary>
|
|
36
|
+
* <NowPlaying />
|
|
37
|
+
* </ArrangementView.Primary>
|
|
38
|
+
* <ArrangementView.Secondary>
|
|
39
|
+
* <Lyrics />
|
|
40
|
+
* </ArrangementView.Secondary>
|
|
41
|
+
* </ArrangementView>
|
|
42
|
+
* </Host>
|
|
43
|
+
* ```
|
|
44
|
+
* @platform ios 27.1+
|
|
45
|
+
* @platform tvos 27.1+
|
|
46
|
+
*/ export function ArrangementView(props) {
|
|
47
|
+
const { modifiers, children, ...restProps } = props;
|
|
48
|
+
return /*#__PURE__*/ _jsx(ArrangementViewNativeView, {
|
|
49
|
+
modifiers: modifiers,
|
|
50
|
+
...modifiers ? createViewModifierEventListener(modifiers) : undefined,
|
|
51
|
+
...restProps,
|
|
52
|
+
children: children
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["swift-ui/ArrangementView/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","Slot","createViewModifierEventListener","ArrangementViewNativeView","ArrangementViewPrimary","props","name","children","ArrangementViewSecondary","ArrangementView","Primary","Secondary","modifiers","restProps","undefined"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAEzC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,+BAA+B,QAAQ,qBAAqB;AAUrE,MAAMC,4BAAuEH,kBAC3E,UACA;AAGF;;CAEC,GACD,SAASI,uBAAuBC,KAAoC;IAClE,qBAAO,KAACJ;QAAKK,MAAK;kBAAWD,MAAME,QAAQ;;AAC7C;AAEA;;CAEC,GACD,SAASC,yBAAyBH,KAAoC;IACpE,qBAAO,KAACJ;QAAKK,MAAK;kBAAaD,MAAME,QAAQ;;AAC/C;AAEAE,gBAAgBC,OAAO,GAAGN;AAC1BK,gBAAgBE,SAAS,GAAGH;AAE5B;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,OAAO,SAASC,gBAAgBJ,KAA2B;IACzD,MAAM,EAAEO,SAAS,EAAEL,QAAQ,EAAE,GAAGM,WAAW,GAAGR;IAE9C,qBACE,KAACF;QACCS,WAAWA;QACV,GAAIA,YAAYV,gCAAgCU,aAAaE,SAAS;QACtE,GAAGD,SAAS;kBACZN;;AAGP"}
|
|
@@ -29,6 +29,7 @@ export * from './Menu';
|
|
|
29
29
|
export * from './NavigationDestination';
|
|
30
30
|
export * from './NavigationLink';
|
|
31
31
|
export * from './NavigationSplitView';
|
|
32
|
+
export * from './ArrangementView';
|
|
32
33
|
export * from './NavigationStack';
|
|
33
34
|
export * from './Picker';
|
|
34
35
|
export * from './ProgressView';
|
|
@@ -39,7 +40,7 @@ export * from './Spacer';
|
|
|
39
40
|
export * from './Stepper';
|
|
40
41
|
export * from './SwipeActions';
|
|
41
42
|
export * from './Text';
|
|
42
|
-
export { useNativeState } from '../State';
|
|
43
|
+
export { useNativeState, useWorkletCallback, type WorkletCallback } from '../State';
|
|
43
44
|
export { withAnimation, type WithAnimationCompletionCriteria } from './withAnimation';
|
|
44
45
|
export * from './SyncToggle';
|
|
45
46
|
export * from './TabView';
|
package/build/swift-ui/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export * from './Menu';
|
|
|
28
28
|
export * from './NavigationDestination';
|
|
29
29
|
export * from './NavigationLink';
|
|
30
30
|
export * from './NavigationSplitView';
|
|
31
|
+
export * from './ArrangementView';
|
|
31
32
|
export * from './NavigationStack';
|
|
32
33
|
export * from './Picker';
|
|
33
34
|
export * from './ProgressView';
|
|
@@ -38,7 +39,7 @@ export * from './Spacer';
|
|
|
38
39
|
export * from './Stepper';
|
|
39
40
|
export * from './SwipeActions';
|
|
40
41
|
export * from './Text';
|
|
41
|
-
export { useNativeState } from '../State';
|
|
42
|
+
export { useNativeState, useWorkletCallback } from '../State';
|
|
42
43
|
export { withAnimation } from './withAnimation';
|
|
43
44
|
export * from './SyncToggle';
|
|
44
45
|
export * from './TabView';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["swift-ui/index.tsx"],"sourcesContent":[null],"names":["useNativeState","withAnimation","TextField"],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,2BAA2B;AACzC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAE7B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,SAASA,cAAc,
|
|
1
|
+
{"version":3,"sources":["swift-ui/index.tsx"],"sourcesContent":[null],"names":["useNativeState","useWorkletCallback","withAnimation","TextField"],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,2BAA2B;AACzC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAE7B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,SAASA,cAAc,EAAEC,kBAAkB,QAA8B,WAAW;AACpF,SAASC,aAAa,QAA8C,kBAAkB;AACtF,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,SACEC,SAAS,QAIJ,cAAc;AACrB,cAAc,gBAAgB;AAC9B,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,SAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnimationObject, ChainableAnimationType, InterpolatingSpringAnimationParams, SpringAnimationParams, TimingAnimationParams } from './types';
|
|
1
|
+
import type { AnimationObject, ChainableAnimationType, InterpolatingSpringAnimationParams, SpringAnimationParams, SpringPresetAnimationParams, TimingAnimationParams } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Built-in animation presets for the `animation` modifier.
|
|
4
4
|
* Presets:
|
|
@@ -7,6 +7,8 @@ import type { AnimationObject, ChainableAnimationType, InterpolatingSpringAnimat
|
|
|
7
7
|
* - `spring` accepts [`SpringAnimationParams`](#springanimationparams).
|
|
8
8
|
* - `interpolatingSpring` accepts
|
|
9
9
|
* [`InterpolatingSpringAnimationParams`](#interpolatingspringanimationparams).
|
|
10
|
+
* - Spring presets (`smooth`, `snappy`, `bouncy`) accept
|
|
11
|
+
* [`SpringPresetAnimationParams`](#springpresetanimationparams).
|
|
10
12
|
* - Chaining returns [`ChainableAnimationType`](#chainableanimationtype).
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
@@ -35,6 +37,9 @@ export declare const Animation: {
|
|
|
35
37
|
linear: (params?: TimingAnimationParams) => ChainableAnimationType;
|
|
36
38
|
spring: (params?: SpringAnimationParams) => ChainableAnimationType;
|
|
37
39
|
interpolatingSpring: (params?: InterpolatingSpringAnimationParams) => ChainableAnimationType;
|
|
40
|
+
smooth: (params?: SpringPresetAnimationParams) => ChainableAnimationType;
|
|
41
|
+
snappy: (params?: SpringPresetAnimationParams) => ChainableAnimationType;
|
|
42
|
+
bouncy: (params?: SpringPresetAnimationParams) => ChainableAnimationType;
|
|
38
43
|
default: ChainableAnimationType;
|
|
39
44
|
};
|
|
40
45
|
declare function ChainableAnimation(animation: AnimationObject): ChainableAnimationType;
|
|
@@ -8,6 +8,8 @@ import { VALUE_SYMBOL } from './constants';
|
|
|
8
8
|
* - `spring` accepts [`SpringAnimationParams`](#springanimationparams).
|
|
9
9
|
* - `interpolatingSpring` accepts
|
|
10
10
|
* [`InterpolatingSpringAnimationParams`](#interpolatingspringanimationparams).
|
|
11
|
+
* - Spring presets (`smooth`, `snappy`, `bouncy`) accept
|
|
12
|
+
* [`SpringPresetAnimationParams`](#springpresetanimationparams).
|
|
11
13
|
* - Chaining returns [`ChainableAnimationType`](#chainableanimationtype).
|
|
12
14
|
*
|
|
13
15
|
* @example
|
|
@@ -64,28 +66,36 @@ import { VALUE_SYMBOL } from './constants';
|
|
|
64
66
|
duration: params?.duration,
|
|
65
67
|
bounce: params?.bounce
|
|
66
68
|
}),
|
|
69
|
+
smooth: (params)=>ChainableAnimation({
|
|
70
|
+
type: 'smooth',
|
|
71
|
+
duration: params?.duration,
|
|
72
|
+
extraBounce: params?.extraBounce
|
|
73
|
+
}),
|
|
74
|
+
snappy: (params)=>ChainableAnimation({
|
|
75
|
+
type: 'snappy',
|
|
76
|
+
duration: params?.duration,
|
|
77
|
+
extraBounce: params?.extraBounce
|
|
78
|
+
}),
|
|
79
|
+
bouncy: (params)=>ChainableAnimation({
|
|
80
|
+
type: 'bouncy',
|
|
81
|
+
duration: params?.duration,
|
|
82
|
+
extraBounce: params?.extraBounce
|
|
83
|
+
}),
|
|
67
84
|
default: ChainableAnimation({
|
|
68
85
|
type: 'default'
|
|
69
86
|
})
|
|
70
87
|
};
|
|
71
88
|
function ChainableAnimation(animation) {
|
|
72
|
-
let _animation = animation;
|
|
73
89
|
return {
|
|
74
|
-
delay: (delay)=>{
|
|
75
|
-
|
|
76
|
-
..._animation,
|
|
90
|
+
delay: (delay)=>ChainableAnimation({
|
|
91
|
+
...animation,
|
|
77
92
|
delay
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
repeat: (params)=>{
|
|
82
|
-
_animation = {
|
|
83
|
-
..._animation,
|
|
93
|
+
}),
|
|
94
|
+
repeat: (params)=>ChainableAnimation({
|
|
95
|
+
...animation,
|
|
84
96
|
...params
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
[VALUE_SYMBOL]: ()=>_animation
|
|
97
|
+
}),
|
|
98
|
+
[VALUE_SYMBOL]: ()=>animation
|
|
89
99
|
};
|
|
90
100
|
}
|
|
91
101
|
export const animation = (animationObject, animatedValue)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["swift-ui/modifiers/animation/index.ts"],"sourcesContent":[null],"names":["createModifier","VALUE_SYMBOL","Animation","easeInOut","params","ChainableAnimation","type","duration","easeIn","easeOut","linear","spring","response","dampingFraction","blendDuration","bounce","interpolatingSpring","mass","stiffness","damping","initialVelocity","
|
|
1
|
+
{"version":3,"sources":["swift-ui/modifiers/animation/index.ts"],"sourcesContent":[null],"names":["createModifier","VALUE_SYMBOL","Animation","easeInOut","params","ChainableAnimation","type","duration","easeIn","easeOut","linear","spring","response","dampingFraction","blendDuration","bounce","interpolatingSpring","mass","stiffness","damping","initialVelocity","smooth","extraBounce","snappy","bouncy","default","animation","delay","repeat","animationObject","animatedValue"],"mappings":"AAAA,SAASA,cAAc,QAAQ,oBAAoB;AACnD,SAASC,YAAY,QAAQ,cAAc;AAU3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,GACD,OAAO,MAAMC,YAAY;IACvB,oBAAoB;IACpBC,WAAW,CAACC,SACVC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;QACpB;IACFC,QAAQ,CAACJ,SACPC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;QACpB;IACFE,SAAS,CAACL,SACRC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;QACpB;IACFG,QAAQ,CAACN,SACPC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;QACpB;IAEF,oBAAoB;IACpBI,QAAQ,CAACP,SACPC,mBAAmB;YACjBC,MAAM;YACNM,UAAUR,QAAQQ;YAClBC,iBAAiBT,QAAQS;YACzBC,eAAeV,QAAQU;YACvBP,UAAUH,QAAQG;YAClBQ,QAAQX,QAAQW;QAClB;IACFC,qBAAqB,CAACZ,SACpBC,mBAAmB;YACjBC,MAAM;YACNW,MAAMb,QAAQa;YACdC,WAAWd,QAAQc;YACnBC,SAASf,QAAQe;YACjBC,iBAAiBhB,QAAQgB;YACzBb,UAAUH,QAAQG;YAClBQ,QAAQX,QAAQW;QAClB;IACFM,QAAQ,CAACjB,SACPC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;YAClBe,aAAalB,QAAQkB;QACvB;IACFC,QAAQ,CAACnB,SACPC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;YAClBe,aAAalB,QAAQkB;QACvB;IACFE,QAAQ,CAACpB,SACPC,mBAAmB;YACjBC,MAAM;YACNC,UAAUH,QAAQG;YAClBe,aAAalB,QAAQkB;QACvB;IAEFG,SAASpB,mBAAmB;QAAEC,MAAM;IAAU;AAChD,EAAE;AAEF,SAASD,mBAAmBqB,SAA0B;IACpD,OAAO;QACLC,OAAO,CAACA,QAAUtB,mBAAmB;gBAAE,GAAGqB,SAAS;gBAAEC;YAAM;QAC3DC,QAAQ,CAACxB,SAAWC,mBAAmB;gBAAE,GAAGqB,SAAS;gBAAE,GAAGtB,MAAM;YAAC;QACjE,CAACH,aAAa,EAAE,IAAMyB;IACxB;AACF;AAEA,OAAO,MAAMA,YAAY,CACvBG,iBACAC;IAEA,OAAO9B,eAAe,aAAa;QAAE0B,WAAWG,eAAe,CAAC5B,aAAa;QAAI6B;IAAc;AACjG,EAAE"}
|
|
@@ -4,7 +4,7 @@ import { VALUE_SYMBOL } from './constants';
|
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
6
|
export type AnimationObject = {
|
|
7
|
-
type: 'easeInOut' | 'easeIn' | 'easeOut' | 'linear' | 'spring' | 'interpolatingSpring' | 'default';
|
|
7
|
+
type: 'easeInOut' | 'easeIn' | 'easeOut' | 'linear' | 'spring' | 'interpolatingSpring' | 'smooth' | 'snappy' | 'bouncy' | 'default';
|
|
8
8
|
duration?: number;
|
|
9
9
|
response?: number;
|
|
10
10
|
dampingFraction?: number;
|
|
@@ -14,6 +14,7 @@ export type AnimationObject = {
|
|
|
14
14
|
stiffness?: number;
|
|
15
15
|
damping?: number;
|
|
16
16
|
initialVelocity?: number;
|
|
17
|
+
extraBounce?: number;
|
|
17
18
|
delay?: number;
|
|
18
19
|
repeatCount?: number;
|
|
19
20
|
autoreverses?: boolean;
|
|
@@ -72,6 +73,19 @@ export type InterpolatingSpringAnimationParams = {
|
|
|
72
73
|
*/
|
|
73
74
|
bounce?: number;
|
|
74
75
|
};
|
|
76
|
+
export type SpringPresetAnimationParams = {
|
|
77
|
+
/**
|
|
78
|
+
* The perceptual duration, which defines the pace of the spring (in seconds). This is
|
|
79
|
+
* approximately equal to the settling duration, but for very bouncy springs, it is the period of
|
|
80
|
+
* oscillation of the spring.
|
|
81
|
+
*/
|
|
82
|
+
duration?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Bounce added to the base bounce of the preset: 0 for `smooth`, 0.15 for `snappy`, and 0.3 for
|
|
85
|
+
* `bouncy`. Keep the total below 1: at 1 and above, the spring oscillates without settling.
|
|
86
|
+
*/
|
|
87
|
+
extraBounce?: number;
|
|
88
|
+
};
|
|
75
89
|
export type ChainableAnimationType = {
|
|
76
90
|
/** Adds a delay before the animation starts (in seconds). */
|
|
77
91
|
delay: (delay: number) => ChainableAnimationType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["swift-ui/modifiers/animation/types.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["swift-ui/modifiers/animation/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAwGA,WAME"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { createModifier } from './createModifier';
|
|
2
|
+
/**
|
|
3
|
+
* A style that configures an `ArrangementView` with an arrangement.
|
|
4
|
+
* - `'automatic'`: The default style, which resolves to `'split'`.
|
|
5
|
+
* - `'split'`: An arrangement view style that places the primary and secondary views side by side along one or more axes.
|
|
6
|
+
* - `'overlay'`: An arrangement view style that layers the primary view over the secondary view in z-order.
|
|
7
|
+
*/
|
|
8
|
+
export type ArrangementViewStyle = 'automatic' | 'split' | 'overlay';
|
|
9
|
+
/**
|
|
10
|
+
* Sets the style for arrangement views within this view.
|
|
11
|
+
* @param style - The style to apply.
|
|
12
|
+
* @param options - The `axes` the arrangement supports. With `'split'`, creates a split arrangement
|
|
13
|
+
* that supports the given axes. With `'overlay'`, creates an overlay arrangement that supports
|
|
14
|
+
* laying out its views along the given axes.
|
|
15
|
+
* @platform ios 27.1+
|
|
16
|
+
* @platform tvos 27.1+
|
|
17
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/arrangementviewstyle(_:)).
|
|
18
|
+
*/
|
|
19
|
+
export declare function arrangementViewStyle(style: 'automatic'): ReturnType<typeof createModifier>;
|
|
20
|
+
export declare function arrangementViewStyle(style: 'split' | 'overlay', options?: {
|
|
21
|
+
axes?: 'horizontal' | 'vertical' | 'both';
|
|
22
|
+
}): ReturnType<typeof createModifier>;
|
|
23
|
+
/**
|
|
24
|
+
* The minimum, ideal, and maximum ratios for `splitArrangementLayoutRatio`.
|
|
25
|
+
*/
|
|
26
|
+
export type SplitArrangementLayoutRatioParams = {
|
|
27
|
+
minHorizontal?: number;
|
|
28
|
+
idealHorizontal?: number;
|
|
29
|
+
maxHorizontal?: number;
|
|
30
|
+
minVertical?: number;
|
|
31
|
+
idealVertical?: number;
|
|
32
|
+
maxVertical?: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Sets the preferred size ratio for the content of `ArrangementView.Primary` or
|
|
36
|
+
* `ArrangementView.Secondary` in a split arrangement.
|
|
37
|
+
* @platform ios 27.1+
|
|
38
|
+
* @platform tvos 27.1+
|
|
39
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementlayoutratio(_:)).
|
|
40
|
+
*/
|
|
41
|
+
export declare function splitArrangementLayoutRatio(ratio: number): ReturnType<typeof createModifier>;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the size ratio for the content of `ArrangementView.Primary` or `ArrangementView.Secondary`
|
|
44
|
+
* in a split arrangement.
|
|
45
|
+
* @platform ios 27.1+
|
|
46
|
+
* @platform tvos 27.1+
|
|
47
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementlayoutratio(minhorizontal:idealhorizontal:maxhorizontal:minvertical:idealvertical:maxvertical:)).
|
|
48
|
+
*/
|
|
49
|
+
export declare function splitArrangementLayoutRatio(ratios: SplitArrangementLayoutRatioParams): ReturnType<typeof createModifier>;
|
|
50
|
+
/**
|
|
51
|
+
* The minimum, ideal, and maximum sizes for `splitArrangementLayoutSize`.
|
|
52
|
+
*/
|
|
53
|
+
export type SplitArrangementLayoutSizeParams = {
|
|
54
|
+
minWidth?: number;
|
|
55
|
+
idealWidth?: number;
|
|
56
|
+
maxWidth?: number;
|
|
57
|
+
minHeight?: number;
|
|
58
|
+
idealHeight?: number;
|
|
59
|
+
maxHeight?: number;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Sets the size constraints for the content of `ArrangementView.Primary` or
|
|
63
|
+
* `ArrangementView.Secondary` in a split arrangement.
|
|
64
|
+
* @platform ios 27.1+
|
|
65
|
+
* @platform tvos 27.1+
|
|
66
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementlayoutsize(minwidth:idealwidth:maxwidth:minheight:idealheight:maxheight:)).
|
|
67
|
+
*/
|
|
68
|
+
export declare const splitArrangementLayoutSize: (constraints: SplitArrangementLayoutSizeParams) => import("./createModifier").ModifierConfig;
|
|
69
|
+
/**
|
|
70
|
+
* The split axes on which `splitArrangementFixedLayoutSize` prefers the ideal size of the view.
|
|
71
|
+
*/
|
|
72
|
+
export type SplitArrangementFixedLayoutSizeParams = {
|
|
73
|
+
/**
|
|
74
|
+
* Whether to prefer a fixed width for the view in a horizontal split.
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
horizontal?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to prefer a fixed height for the view in a vertical split.
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
vertical?: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Sets the preferred size constraint for the content of `ArrangementView.Primary` or
|
|
86
|
+
* `ArrangementView.Secondary` in a split arrangement to the ideal size of the view within its
|
|
87
|
+
* container. The arrangement view prefers this size, but may resize to a smaller size depending on
|
|
88
|
+
* the priority of the view.
|
|
89
|
+
* @platform ios 27.1+
|
|
90
|
+
* @platform tvos 27.1+
|
|
91
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementfixedlayoutsize(horizontal:vertical:)).
|
|
92
|
+
*/
|
|
93
|
+
export declare const splitArrangementFixedLayoutSize: (options?: SplitArrangementFixedLayoutSizeParams) => import("./createModifier").ModifierConfig;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the horizontal edge that a view in an overlay arrangement occupies when the arrangement
|
|
96
|
+
* transitions to a horizontal layout.
|
|
97
|
+
* @platform ios 27.1+
|
|
98
|
+
* @platform tvos 27.1+
|
|
99
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/overlayarrangementedge(_:)).
|
|
100
|
+
*/
|
|
101
|
+
export declare function overlayArrangementEdge(edge: 'leading' | 'trailing'): ReturnType<typeof createModifier>;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the vertical edge that a view in an overlay arrangement occupies when the arrangement
|
|
104
|
+
* transitions to a vertical layout.
|
|
105
|
+
* @platform ios 27.1+
|
|
106
|
+
* @platform tvos 27.1+
|
|
107
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/overlayarrangementedge(_:)-4tjwn).
|
|
108
|
+
*/
|
|
109
|
+
export declare function overlayArrangementEdge(edge: 'top' | 'bottom'): ReturnType<typeof createModifier>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createModifier } from './createModifier';
|
|
2
|
+
export function arrangementViewStyle(style, options) {
|
|
3
|
+
return createModifier('arrangementViewStyle', {
|
|
4
|
+
style,
|
|
5
|
+
axes: options?.axes
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export function splitArrangementLayoutRatio(ratioOrParams) {
|
|
9
|
+
return createModifier('splitArrangementLayoutRatio', typeof ratioOrParams === 'number' ? {
|
|
10
|
+
ratio: ratioOrParams
|
|
11
|
+
} : ratioOrParams);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sets the size constraints for the content of `ArrangementView.Primary` or
|
|
15
|
+
* `ArrangementView.Secondary` in a split arrangement.
|
|
16
|
+
* @platform ios 27.1+
|
|
17
|
+
* @platform tvos 27.1+
|
|
18
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementlayoutsize(minwidth:idealwidth:maxwidth:minheight:idealheight:maxheight:)).
|
|
19
|
+
*/ export const splitArrangementLayoutSize = (constraints)=>createModifier('splitArrangementLayoutSize', constraints);
|
|
20
|
+
/**
|
|
21
|
+
* Sets the preferred size constraint for the content of `ArrangementView.Primary` or
|
|
22
|
+
* `ArrangementView.Secondary` in a split arrangement to the ideal size of the view within its
|
|
23
|
+
* container. The arrangement view prefers this size, but may resize to a smaller size depending on
|
|
24
|
+
* the priority of the view.
|
|
25
|
+
* @platform ios 27.1+
|
|
26
|
+
* @platform tvos 27.1+
|
|
27
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/splitarrangementfixedlayoutsize(horizontal:vertical:)).
|
|
28
|
+
*/ export const splitArrangementFixedLayoutSize = (options)=>createModifier('splitArrangementFixedLayoutSize', options);
|
|
29
|
+
export function overlayArrangementEdge(edge) {
|
|
30
|
+
return createModifier('overlayArrangementEdge', {
|
|
31
|
+
edge
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=arrangementModifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["swift-ui/modifiers/arrangementModifiers.ts"],"sourcesContent":[null],"names":["createModifier","arrangementViewStyle","style","options","axes","splitArrangementLayoutRatio","ratioOrParams","ratio","splitArrangementLayoutSize","constraints","splitArrangementFixedLayoutSize","overlayArrangementEdge","edge"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAyBlD,OAAO,SAASC,qBACdC,KAA2B,EAC3BC,OAAuD;IAEvD,OAAOH,eAAe,wBAAwB;QAAEE;QAAOE,MAAMD,SAASC;IAAK;AAC7E;AAgCA,OAAO,SAASC,4BACdC,aAAyD;IAEzD,OAAON,eACL,+BACA,OAAOM,kBAAkB,WAAW;QAAEC,OAAOD;IAAc,IAAIA;AAEnE;AAcA;;;;;;CAMC,GACD,OAAO,MAAME,6BAA6B,CAACC,cACzCT,eAAe,8BAA8BS,aAAa;AAkB5D;;;;;;;;CAQC,GACD,OAAO,MAAMC,kCAAkC,CAACP,UAC9CH,eAAe,mCAAmCG,SAAS;AAoB7D,OAAO,SAASQ,uBAAuBC,IAA+C;IACpF,OAAOZ,eAAe,0BAA0B;QAAEY;IAAK;AACzD"}
|