@expo/ui 0.2.0-alpha.9 → 0.2.0-beta.0
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 +11 -0
- package/android/build.gradle +2 -2
- package/build/swift-ui/Layout/index.d.ts +4 -0
- package/build/swift-ui/Layout/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +122 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/ExpoUIModule.swift +1 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +113 -0
- package/ios/ZStackView.swift +29 -0
- package/jetpack-compose-primitives.js +1 -1
- package/jetpack-compose.js +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.module → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module} +17 -17
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.pom → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +26 -4
- package/src/swift-ui/Layout/index.tsx +30 -0
- package/src/swift-ui/modifiers/index.ts +123 -0
- package/swift-ui/index.js +1 -1
- package/swift-ui/modifiers.js +1 -1
- package/tsconfig.json +1 -1
- package/build/jetpack-compose/AlertDialog/index.js +0 -11
- package/build/jetpack-compose/AlertDialog/index.js.map +0 -1
- package/build/jetpack-compose/Button/index.js +0 -33
- package/build/jetpack-compose/Button/index.js.map +0 -1
- package/build/jetpack-compose/Button/types.js +0 -2
- package/build/jetpack-compose/Button/types.js.map +0 -1
- package/build/jetpack-compose/ContextMenu/index.js +0 -38
- package/build/jetpack-compose/ContextMenu/index.js.map +0 -1
- package/build/jetpack-compose/ContextMenu/utils.js +0 -79
- package/build/jetpack-compose/ContextMenu/utils.js.map +0 -1
- package/build/jetpack-compose/DatePicker/index.js +0 -33
- package/build/jetpack-compose/DatePicker/index.js.map +0 -1
- package/build/jetpack-compose/Picker/index.js +0 -30
- package/build/jetpack-compose/Picker/index.js.map +0 -1
- package/build/jetpack-compose/Progress/index.js +0 -17
- package/build/jetpack-compose/Progress/index.js.map +0 -1
- package/build/jetpack-compose/Shape/index.js +0 -31
- package/build/jetpack-compose/Shape/index.js.map +0 -1
- package/build/jetpack-compose/Slider/index.js +0 -33
- package/build/jetpack-compose/Slider/index.js.map +0 -1
- package/build/jetpack-compose/Switch/index.js +0 -40
- package/build/jetpack-compose/Switch/index.js.map +0 -1
- package/build/jetpack-compose/TextInput/index.js +0 -23
- package/build/jetpack-compose/TextInput/index.js.map +0 -1
- package/build/jetpack-compose/index.js +0 -12
- package/build/jetpack-compose/index.js.map +0 -1
- package/build/jetpack-compose/modifiers.js +0 -15
- package/build/jetpack-compose/modifiers.js.map +0 -1
- package/build/jetpack-compose-primitives/index.js +0 -39
- package/build/jetpack-compose-primitives/index.js.map +0 -1
- package/build/swift-ui/BottomSheet/index.js +0 -18
- package/build/swift-ui/BottomSheet/index.js.map +0 -1
- package/build/swift-ui/Button/index.js +0 -38
- package/build/swift-ui/Button/index.js.map +0 -1
- package/build/swift-ui/Chart/index.js +0 -11
- package/build/swift-ui/Chart/index.js.map +0 -1
- package/build/swift-ui/ColorPicker/index.js +0 -16
- package/build/swift-ui/ColorPicker/index.js.map +0 -1
- package/build/swift-ui/ContentUnavailableView/index.js +0 -19
- package/build/swift-ui/ContentUnavailableView/index.js.map +0 -1
- package/build/swift-ui/ContextMenu/Submenu.js +0 -8
- package/build/swift-ui/ContextMenu/Submenu.js.map +0 -1
- package/build/swift-ui/ContextMenu/index.js +0 -57
- package/build/swift-ui/ContextMenu/index.js.map +0 -1
- package/build/swift-ui/ContextMenu/types.js +0 -2
- package/build/swift-ui/ContextMenu/types.js.map +0 -1
- package/build/swift-ui/ContextMenu/utils.js +0 -85
- package/build/swift-ui/ContextMenu/utils.js.map +0 -1
- package/build/swift-ui/DatePicker/index.js +0 -22
- package/build/swift-ui/DatePicker/index.js.map +0 -1
- package/build/swift-ui/DisclosureGroup/index.js +0 -16
- package/build/swift-ui/DisclosureGroup/index.js.map +0 -1
- package/build/swift-ui/Form/index.js +0 -15
- package/build/swift-ui/Form/index.js.map +0 -1
- package/build/swift-ui/Gauge/index.js +0 -11
- package/build/swift-ui/Gauge/index.js.map +0 -1
- package/build/swift-ui/GlassEffectContainer/index.js +0 -8
- package/build/swift-ui/GlassEffectContainer/index.js.map +0 -1
- package/build/swift-ui/Host/index.js +0 -27
- package/build/swift-ui/Host/index.js.map +0 -1
- package/build/swift-ui/Image/index.js +0 -16
- package/build/swift-ui/Image/index.js.map +0 -1
- package/build/swift-ui/Label/index.js +0 -15
- package/build/swift-ui/Label/index.js.map +0 -1
- package/build/swift-ui/Layout/index.js +0 -34
- package/build/swift-ui/Layout/index.js.map +0 -1
- package/build/swift-ui/List/index.js +0 -25
- package/build/swift-ui/List/index.js.map +0 -1
- package/build/swift-ui/Namespace.js +0 -31
- package/build/swift-ui/Namespace.js.map +0 -1
- package/build/swift-ui/Picker/index.js +0 -20
- package/build/swift-ui/Picker/index.js.map +0 -1
- package/build/swift-ui/Progress/index.js +0 -18
- package/build/swift-ui/Progress/index.js.map +0 -1
- package/build/swift-ui/Section/index.js +0 -13
- package/build/swift-ui/Section/index.js.map +0 -1
- package/build/swift-ui/SecureField/index.js +0 -22
- package/build/swift-ui/SecureField/index.js.map +0 -1
- package/build/swift-ui/ShareLink/index.js +0 -15
- package/build/swift-ui/ShareLink/index.js.map +0 -1
- package/build/swift-ui/Slider/index.js +0 -23
- package/build/swift-ui/Slider/index.js.map +0 -1
- package/build/swift-ui/Spacer/index.js +0 -15
- package/build/swift-ui/Spacer/index.js.map +0 -1
- package/build/swift-ui/Switch/index.js +0 -23
- package/build/swift-ui/Switch/index.js.map +0 -1
- package/build/swift-ui/Text/index.js +0 -16
- package/build/swift-ui/Text/index.js.map +0 -1
- package/build/swift-ui/TextField/index.js +0 -22
- package/build/swift-ui/TextField/index.js.map +0 -1
- package/build/swift-ui/index.js +0 -28
- package/build/swift-ui/index.js.map +0 -1
- package/build/swift-ui/modifiers/animation/constants.js +0 -2
- package/build/swift-ui/modifiers/animation/constants.js.map +0 -1
- package/build/swift-ui/modifiers/animation/index.js +0 -58
- package/build/swift-ui/modifiers/animation/index.js.map +0 -1
- package/build/swift-ui/modifiers/animation/types.js +0 -2
- package/build/swift-ui/modifiers/animation/types.js.map +0 -1
- package/build/swift-ui/modifiers/createModifier.js +0 -8
- package/build/swift-ui/modifiers/createModifier.js.map +0 -1
- package/build/swift-ui/modifiers/index.js +0 -230
- package/build/swift-ui/modifiers/index.js.map +0 -1
- package/build/swift-ui/modifiers/utils.js +0 -23
- package/build/swift-ui/modifiers/utils.js.map +0 -1
- package/build/swift-ui/types.js +0 -2
- package/build/swift-ui/types.js.map +0 -1
- package/build/types.js +0 -2
- package/build/types.js.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9-sources.jar → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9-sources.jar.md5 → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9-sources.jar.sha1 → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9-sources.jar.sha256 → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.9/expo.modules.ui-0.2.0-alpha.9-sources.jar.sha512 → 0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.2.0-beta.0 — 2025-09-10
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- [iOS] Add `foregroundStyle` modifier, deprecated `foregroundColor` ([#39183](https://github.com/expo/expo/pull/39183) by [@hirbod](https://github.com/hirbod))
|
|
18
|
+
- [iOS] Add `matchedGeometryEffect` modifier and `ZStack` ([#39463](https://github.com/expo/expo/pull/39463) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
19
|
+
|
|
20
|
+
### 💡 Others
|
|
21
|
+
|
|
22
|
+
- Use typescript files as source and add `packages:exports`. ([#39377](https://github.com/expo/expo/pull/39377) by [@kudo](https://github.com/kudo))
|
|
23
|
+
|
|
13
24
|
## 0.2.0-alpha.9 — 2025-09-03
|
|
14
25
|
|
|
15
26
|
_This version does not introduce any user-facing 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 = '0.2.0-
|
|
15
|
+
version = '0.2.0-beta.0'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "0.2.0-
|
|
21
|
+
versionName "0.2.0-beta.0"
|
|
22
22
|
}
|
|
23
23
|
buildFeatures {
|
|
24
24
|
compose true
|
|
@@ -29,5 +29,9 @@ export interface GroupProps extends CommonViewModifierProps {
|
|
|
29
29
|
onPress?: () => void;
|
|
30
30
|
}
|
|
31
31
|
export declare function Group(props: GroupProps): import("react").JSX.Element;
|
|
32
|
+
export interface ZStackProps extends StackBaseProps {
|
|
33
|
+
alignment?: 'center' | 'leading' | 'trailing' | 'top' | 'bottom' | 'topLeading' | 'topTrailing' | 'bottomLeading' | 'bottomTrailing' | 'centerFirstTextBaseline' | 'centerLastTextBaseline' | 'leadingFirstTextBaseline' | 'leadingLastTextBaseline' | 'trailingFirstTextBaseline' | 'trailingLastTextBaseline';
|
|
34
|
+
}
|
|
35
|
+
export declare function ZStack(props: ZStackProps): import("react").JSX.Element;
|
|
32
36
|
export {};
|
|
33
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,KAAK,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,UAAU,cAAe,SAAQ,uBAAuB;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AACD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;AAa1E,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,m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AAW,+BAExC;AAID,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC/C;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC;AAID,MAAM,WAAW,UAAW,SAAQ,uBAAuB;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAkBD,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAEtC;AAID,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EACN,QAAQ,GACR,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,YAAY,GACZ,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,yBAAyB,GACzB,wBAAwB,GACxB,0BAA0B,GAC1B,yBAAyB,GACzB,2BAA2B,GAC3B,0BAA0B,CAAC;CAChC;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
|
|
@@ -23,6 +23,10 @@ export declare const shadow: (params: {
|
|
|
23
23
|
y?: number;
|
|
24
24
|
color?: string;
|
|
25
25
|
}) => ModifierConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Adds a matched geometry effect to a view.
|
|
28
|
+
*/
|
|
29
|
+
export declare const matchedGeometryEffect: (id: string, namespaceId: string) => ModifierConfig;
|
|
26
30
|
/**
|
|
27
31
|
* Sets the frame properties of a view.
|
|
28
32
|
*/
|
|
@@ -104,8 +108,125 @@ export declare const offset: (params: {
|
|
|
104
108
|
/**
|
|
105
109
|
* Sets the foreground color/tint of a view.
|
|
106
110
|
* @param color - The foreground color (hex string)
|
|
111
|
+
* @deprecated Use foregroundStyle instead
|
|
107
112
|
*/
|
|
108
113
|
export declare const foregroundColor: (color: string) => ModifierConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Sets the foreground style of a view with comprehensive styling options.
|
|
116
|
+
*
|
|
117
|
+
* Replaces the deprecated `foregroundColor` modifier with enhanced capabilities including
|
|
118
|
+
* colors, gradients, and semantic hierarchical styles that adapt to system appearance.
|
|
119
|
+
*
|
|
120
|
+
* @param style - The foreground style configuration. Can be:
|
|
121
|
+
*
|
|
122
|
+
* **Simple Color (string):**
|
|
123
|
+
* - Hex colors: `'#FF0000'`, `'#RGB'`, `'#RRGGBB'`, `'#AARRGGBB'`
|
|
124
|
+
* - Named colors: `'red'`, `'blue'`, `'green'`, etc.
|
|
125
|
+
*
|
|
126
|
+
* **Explicit Color Object:**
|
|
127
|
+
* ```typescript
|
|
128
|
+
* { type: 'color', color: '#FF0000' }
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* **Hierarchical Styles (Semantic):**
|
|
132
|
+
* Auto-adapting semantic styles that respond to light/dark mode and accessibility settings:
|
|
133
|
+
* ```typescript
|
|
134
|
+
* { type: 'hierarchical', style: 'primary' } // Most prominent (main content, headlines)
|
|
135
|
+
* { type: 'hierarchical', style: 'secondary' } // Supporting text, subheadlines
|
|
136
|
+
* { type: 'hierarchical', style: 'tertiary' } // Less important text, captions
|
|
137
|
+
* { type: 'hierarchical', style: 'quaternary' } // Subtle text, disabled states
|
|
138
|
+
* { type: 'hierarchical', style: 'quinary' } // Most subtle (iOS 16+, fallback to quaternary)
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* **Linear Gradient:**
|
|
142
|
+
* ```typescript
|
|
143
|
+
* {
|
|
144
|
+
* type: 'linearGradient',
|
|
145
|
+
* colors: ['#FF0000', '#0000FF', '#00FF00'],
|
|
146
|
+
* startPoint: { x: 0, y: 0 }, // Top-left
|
|
147
|
+
* endPoint: { x: 1, y: 1 } // Bottom-right
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* **Radial Gradient:**
|
|
152
|
+
* ```typescript
|
|
153
|
+
* {
|
|
154
|
+
* type: 'radialGradient',
|
|
155
|
+
* colors: ['#FF0000', '#0000FF'],
|
|
156
|
+
* center: { x: 0.5, y: 0.5 }, // Center of view
|
|
157
|
+
* startRadius: 0, // Inner radius
|
|
158
|
+
* endRadius: 100 // Outer radius
|
|
159
|
+
* }
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* **Angular Gradient (Conic):**
|
|
163
|
+
* ```typescript
|
|
164
|
+
* {
|
|
165
|
+
* type: 'angularGradient',
|
|
166
|
+
* colors: ['#FF0000', '#00FF00', '#0000FF'],
|
|
167
|
+
* center: { x: 0.5, y: 0.5 } // Rotation center
|
|
168
|
+
* }
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* // Simple usage
|
|
174
|
+
* <Text modifiers={[foregroundStyle('#FF0000')]}>Red Text</Text>
|
|
175
|
+
*
|
|
176
|
+
* // Adaptive hierarchical styling
|
|
177
|
+
* <Text modifiers={[foregroundStyle({ type: 'hierarchical', style: 'secondary' })]}>
|
|
178
|
+
* Supporting Text
|
|
179
|
+
* </Text>
|
|
180
|
+
*
|
|
181
|
+
* // Linear gradient
|
|
182
|
+
* <Text modifiers={[foregroundStyle({
|
|
183
|
+
* type: 'linearGradient',
|
|
184
|
+
* colors: ['#FF6B35', '#F7931E', '#FFD23F'],
|
|
185
|
+
* startPoint: { x: 0, y: 0 },
|
|
186
|
+
* endPoint: { x: 1, y: 0 }
|
|
187
|
+
* })]}>
|
|
188
|
+
* Gradient Text
|
|
189
|
+
* </Text>
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @returns A view modifier that applies the specified foreground style
|
|
193
|
+
* @since iOS 15.0+ (hierarchical quinary requires iOS 16.0+)
|
|
194
|
+
* @see https://developer.apple.com/documentation/swiftui/view/foregroundstyle(_:)
|
|
195
|
+
*/
|
|
196
|
+
export declare const foregroundStyle: (style: string | {
|
|
197
|
+
type: "color";
|
|
198
|
+
color: string;
|
|
199
|
+
} | {
|
|
200
|
+
type: "hierarchical";
|
|
201
|
+
style: "primary" | "secondary" | "tertiary" | "quaternary" | "quinary";
|
|
202
|
+
} | {
|
|
203
|
+
type: "linearGradient";
|
|
204
|
+
colors: string[];
|
|
205
|
+
startPoint: {
|
|
206
|
+
x: number;
|
|
207
|
+
y: number;
|
|
208
|
+
};
|
|
209
|
+
endPoint: {
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
};
|
|
213
|
+
} | {
|
|
214
|
+
type: "radialGradient";
|
|
215
|
+
colors: string[];
|
|
216
|
+
center: {
|
|
217
|
+
x: number;
|
|
218
|
+
y: number;
|
|
219
|
+
};
|
|
220
|
+
startRadius: number;
|
|
221
|
+
endRadius: number;
|
|
222
|
+
} | {
|
|
223
|
+
type: "angularGradient";
|
|
224
|
+
colors: string[];
|
|
225
|
+
center: {
|
|
226
|
+
x: number;
|
|
227
|
+
y: number;
|
|
228
|
+
};
|
|
229
|
+
}) => ModifierConfig;
|
|
109
230
|
/**
|
|
110
231
|
* Sets the tint color of a view.
|
|
111
232
|
* @param color - The tint color (hex string)
|
|
@@ -233,7 +354,7 @@ export declare const glassEffectId: (id: string, namespaceId: string) => Modifie
|
|
|
233
354
|
* Union type of all built-in modifier return types.
|
|
234
355
|
* This provides type safety for the modifiers array.
|
|
235
356
|
*/
|
|
236
|
-
export type BuiltInModifier = ReturnType<typeof background> | ReturnType<typeof cornerRadius> | ReturnType<typeof shadow> | ReturnType<typeof frame> | ReturnType<typeof padding> | ReturnType<typeof fixedSize> | ReturnType<typeof onTapGesture> | ReturnType<typeof onLongPressGesture> | ReturnType<typeof opacity> | ReturnType<typeof clipShape> | ReturnType<typeof border> | ReturnType<typeof scaleEffect> | ReturnType<typeof rotationEffect> | ReturnType<typeof offset> | ReturnType<typeof foregroundColor> | ReturnType<typeof tint> | ReturnType<typeof hidden> | ReturnType<typeof zIndex> | ReturnType<typeof blur> | ReturnType<typeof brightness> | ReturnType<typeof contrast> | ReturnType<typeof saturation> | ReturnType<typeof hueRotation> | ReturnType<typeof colorInvert> | ReturnType<typeof grayscale> | ReturnType<typeof accessibilityLabel> | ReturnType<typeof accessibilityHint> | ReturnType<typeof accessibilityValue> | ReturnType<typeof layoutPriority> | ReturnType<typeof mask> | ReturnType<typeof overlay> | ReturnType<typeof backgroundOverlay> | ReturnType<typeof aspectRatio> | ReturnType<typeof clipped> | ReturnType<typeof glassEffect> | ReturnType<typeof glassEffectId> | ReturnType<typeof animation>;
|
|
357
|
+
export type BuiltInModifier = ReturnType<typeof background> | ReturnType<typeof cornerRadius> | ReturnType<typeof shadow> | ReturnType<typeof frame> | ReturnType<typeof padding> | ReturnType<typeof fixedSize> | ReturnType<typeof onTapGesture> | ReturnType<typeof onLongPressGesture> | ReturnType<typeof opacity> | ReturnType<typeof clipShape> | ReturnType<typeof border> | ReturnType<typeof scaleEffect> | ReturnType<typeof rotationEffect> | ReturnType<typeof offset> | ReturnType<typeof foregroundColor> | ReturnType<typeof foregroundStyle> | ReturnType<typeof tint> | ReturnType<typeof hidden> | ReturnType<typeof zIndex> | ReturnType<typeof blur> | ReturnType<typeof brightness> | ReturnType<typeof contrast> | ReturnType<typeof saturation> | ReturnType<typeof hueRotation> | ReturnType<typeof colorInvert> | ReturnType<typeof grayscale> | ReturnType<typeof accessibilityLabel> | ReturnType<typeof accessibilityHint> | ReturnType<typeof accessibilityValue> | ReturnType<typeof layoutPriority> | ReturnType<typeof mask> | ReturnType<typeof overlay> | ReturnType<typeof backgroundOverlay> | ReturnType<typeof aspectRatio> | ReturnType<typeof clipped> | ReturnType<typeof glassEffect> | ReturnType<typeof glassEffectId> | ReturnType<typeof animation>;
|
|
237
358
|
/**
|
|
238
359
|
* Main ViewModifier type that supports both built-in and 3rd party modifiers.
|
|
239
360
|
* 3rd party modifiers should return ModifierConfig objects with their own type strings.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/modifiers/index.ts"],"names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AU,CAAC,OAAO,WAAW,CAAC,GAC9B,UAAU,CAAC,OAAO,SAAS,CAAC,GAC5B,UAAU,CAAC,OAAO,kBAAkB,CAAC,GACrC,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,kBAAkB,CAAC,GACrC,UAAU,CAAC,OAAO,cAAc,CAAC,GACjC,UAAU,CAAC,OAAO,IAAI,CAAC,GACvB,UAAU,CAAC,OAAO,OAAO,CAAC,GAC1B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,WAAW,CAAC,GAC9B,UAAU,CAAC,OAAO,OAAO,CAAC,GAC1B,UAAU,CAAC,OAAO,WAAW,CAAC,GAC9B,UAAU,CAAC,OAAO,aAAa,CAAC,GAChC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC;AAM5D;;;;;;;;;;GAUG;AACH,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,cAEhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,OAAO,EAAE,KAAG,cAAc,EAEpE,CAAC;AAEF,cAAc,mBAAmB,CAAC"}
|
package/expo-module.config.json
CHANGED
package/ios/ExpoUIModule.swift
CHANGED
|
@@ -134,6 +134,98 @@ internal struct ForegroundColorModifier: ViewModifier, Record {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
internal enum ForegroundStyleType: String, Enumerable {
|
|
138
|
+
case color
|
|
139
|
+
case hierarchical
|
|
140
|
+
case linearGradient
|
|
141
|
+
case radialGradient
|
|
142
|
+
case angularGradient
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
internal enum ForegroundHierarchicalStyleType: String, Enumerable {
|
|
146
|
+
case primary
|
|
147
|
+
case secondary
|
|
148
|
+
case tertiary
|
|
149
|
+
case quaternary
|
|
150
|
+
case quinary
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
internal struct ForegroundStyleModifier: ViewModifier, Record {
|
|
154
|
+
@Field var styleType: ForegroundStyleType = .color
|
|
155
|
+
@Field var hierarchicalStyle: ForegroundHierarchicalStyleType = .primary
|
|
156
|
+
@Field var color: Color?
|
|
157
|
+
@Field var colors: [Color]?
|
|
158
|
+
@Field var startPoint: UnitPoint?
|
|
159
|
+
@Field var endPoint: UnitPoint?
|
|
160
|
+
@Field var center: UnitPoint?
|
|
161
|
+
@Field var startRadius: CGFloat?
|
|
162
|
+
@Field var endRadius: CGFloat?
|
|
163
|
+
|
|
164
|
+
func body(content: Content) -> some View {
|
|
165
|
+
switch styleType {
|
|
166
|
+
case .color:
|
|
167
|
+
if let color {
|
|
168
|
+
content.foregroundStyle(color)
|
|
169
|
+
} else {
|
|
170
|
+
content
|
|
171
|
+
}
|
|
172
|
+
case .hierarchical:
|
|
173
|
+
switch hierarchicalStyle {
|
|
174
|
+
case .primary:
|
|
175
|
+
content.foregroundStyle(.primary)
|
|
176
|
+
case .secondary:
|
|
177
|
+
content.foregroundStyle(.secondary)
|
|
178
|
+
case .tertiary:
|
|
179
|
+
content.foregroundStyle(.tertiary)
|
|
180
|
+
case .quaternary:
|
|
181
|
+
content.foregroundStyle(.quaternary)
|
|
182
|
+
case .quinary:
|
|
183
|
+
if #available(iOS 16.0, *) {
|
|
184
|
+
content.foregroundStyle(.quinary)
|
|
185
|
+
} else {
|
|
186
|
+
content.foregroundStyle(.quaternary)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
case .linearGradient:
|
|
190
|
+
if let colors, let startPoint, let endPoint {
|
|
191
|
+
content.foregroundStyle(
|
|
192
|
+
LinearGradient(
|
|
193
|
+
colors: colors,
|
|
194
|
+
startPoint: startPoint,
|
|
195
|
+
endPoint: endPoint
|
|
196
|
+
)
|
|
197
|
+
)
|
|
198
|
+
} else {
|
|
199
|
+
content
|
|
200
|
+
}
|
|
201
|
+
case .radialGradient:
|
|
202
|
+
if let colors, let center, let startRadius, let endRadius {
|
|
203
|
+
content.foregroundStyle(
|
|
204
|
+
RadialGradient(
|
|
205
|
+
colors: colors,
|
|
206
|
+
center: center,
|
|
207
|
+
startRadius: startRadius,
|
|
208
|
+
endRadius: endRadius
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
} else {
|
|
212
|
+
content
|
|
213
|
+
}
|
|
214
|
+
case .angularGradient:
|
|
215
|
+
if let colors, let center {
|
|
216
|
+
content.foregroundStyle(
|
|
217
|
+
AngularGradient(
|
|
218
|
+
colors: colors,
|
|
219
|
+
center: center
|
|
220
|
+
)
|
|
221
|
+
)
|
|
222
|
+
} else {
|
|
223
|
+
content
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
137
229
|
internal struct TintModifier: ViewModifier, Record {
|
|
138
230
|
@Field var color: Color?
|
|
139
231
|
|
|
@@ -671,6 +763,19 @@ internal class ViewModifierRegistry {
|
|
|
671
763
|
}
|
|
672
764
|
}
|
|
673
765
|
|
|
766
|
+
internal struct MatchedGeometryEffectModifier: ViewModifier, Record {
|
|
767
|
+
@Field var id: String?
|
|
768
|
+
@Field var namespaceId: String?
|
|
769
|
+
|
|
770
|
+
func body(content: Content) -> some View {
|
|
771
|
+
if let namespaceId, let namespace = NamespaceRegistry.shared.namespace(forKey: namespaceId) {
|
|
772
|
+
content.matchedGeometryEffect(id: id, in: namespace)
|
|
773
|
+
} else {
|
|
774
|
+
content
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
674
779
|
// MARK: - Built-in Modifier Registration
|
|
675
780
|
|
|
676
781
|
// swiftlint:disable:next no_grouping_extension
|
|
@@ -716,6 +821,10 @@ extension ViewModifierRegistry {
|
|
|
716
821
|
return try ForegroundColorModifier(from: params, appContext: appContext)
|
|
717
822
|
}
|
|
718
823
|
|
|
824
|
+
register("foregroundStyle") { params, appContext, _ in
|
|
825
|
+
return try ForegroundStyleModifier(from: params, appContext: appContext)
|
|
826
|
+
}
|
|
827
|
+
|
|
719
828
|
register("tint") { params, appContext, _ in
|
|
720
829
|
return try TintModifier(from: params, appContext: appContext)
|
|
721
830
|
}
|
|
@@ -819,5 +928,9 @@ extension ViewModifierRegistry {
|
|
|
819
928
|
register("glassEffectId") { params, appContext, _ in
|
|
820
929
|
return try GlassEffectIdModifier.init(from: params, appContext: appContext)
|
|
821
930
|
}
|
|
931
|
+
|
|
932
|
+
register("matchedGeometryEffect") { params, appContext, _ in
|
|
933
|
+
return try MatchedGeometryEffectModifier.init(from: params, appContext: appContext)
|
|
934
|
+
}
|
|
822
935
|
}
|
|
823
936
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import SwiftUI
|
|
4
|
+
import ExpoModulesCore
|
|
5
|
+
|
|
6
|
+
internal final class ZStackViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
7
|
+
@Field var fixedSize: Bool?
|
|
8
|
+
@Field var frame: FrameOptions?
|
|
9
|
+
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
13
|
+
@Field var useTapGesture: Bool?
|
|
14
|
+
@Field var alignment: AlignmentOptions?
|
|
15
|
+
@Field var backgroundColor: Color?
|
|
16
|
+
var onTap = EventDispatcher()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
internal struct ZStackView: ExpoSwiftUI.View {
|
|
20
|
+
@ObservedObject var props: ZStackViewProps
|
|
21
|
+
|
|
22
|
+
var body: some View {
|
|
23
|
+
ZStack(alignment: props.alignment?.toAlignment() ?? .center) {
|
|
24
|
+
Children()
|
|
25
|
+
}
|
|
26
|
+
.modifier(CommonViewModifiers(props: props))
|
|
27
|
+
.applyOnTapGesture(useTapGesture: props.useTapGesture, eventDispatcher: props.onTap, useContentShape: true)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './src/jetpack-compose-primitives';
|
package/jetpack-compose.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './src/jetpack-compose';
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7af71bb5bcbff7e9f188026f342b300b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
36d879db9ac35ea3a9ebbd51217ccb375ec59311
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "0.2.0-
|
|
6
|
+
"version": "0.2.0-beta.0",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-0.2.0-
|
|
28
|
-
"url": "expo.modules.ui-0.2.0-
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-0.2.0-beta.0.aar",
|
|
28
|
+
"url": "expo.modules.ui-0.2.0-beta.0.aar",
|
|
29
|
+
"size": 291011,
|
|
30
|
+
"sha512": "6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6",
|
|
31
|
+
"sha256": "58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f",
|
|
32
|
+
"sha1": "36d879db9ac35ea3a9ebbd51217ccb375ec59311",
|
|
33
|
+
"md5": "7af71bb5bcbff7e9f188026f342b300b"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
],
|
|
103
103
|
"files": [
|
|
104
104
|
{
|
|
105
|
-
"name": "expo.modules.ui-0.2.0-
|
|
106
|
-
"url": "expo.modules.ui-0.2.0-
|
|
107
|
-
"size":
|
|
108
|
-
"sha512": "
|
|
109
|
-
"sha256": "
|
|
110
|
-
"sha1": "
|
|
111
|
-
"md5": "
|
|
105
|
+
"name": "expo.modules.ui-0.2.0-beta.0.aar",
|
|
106
|
+
"url": "expo.modules.ui-0.2.0-beta.0.aar",
|
|
107
|
+
"size": 291011,
|
|
108
|
+
"sha512": "6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6",
|
|
109
|
+
"sha256": "58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f",
|
|
110
|
+
"sha1": "36d879db9ac35ea3a9ebbd51217ccb375ec59311",
|
|
111
|
+
"md5": "7af71bb5bcbff7e9f188026f342b300b"
|
|
112
112
|
}
|
|
113
113
|
]
|
|
114
114
|
},
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
},
|
|
123
123
|
"files": [
|
|
124
124
|
{
|
|
125
|
-
"name": "expo.modules.ui-0.2.0-
|
|
126
|
-
"url": "expo.modules.ui-0.2.0-
|
|
125
|
+
"name": "expo.modules.ui-0.2.0-beta.0-sources.jar",
|
|
126
|
+
"url": "expo.modules.ui-0.2.0-beta.0-sources.jar",
|
|
127
127
|
"size": 18894,
|
|
128
128
|
"sha512": "b6fd029855da3e7ceb97e20cf9dbcbf73f0b81342a24eb9e1988d7d05734fb038080702280129e643d1acab4b1ca0d9d2147d54f64906f6824659640bcc12b46",
|
|
129
129
|
"sha256": "ab99988e09f8bda506deaa7eded3b45bfa56f444c6f55c78d7814cfb6c40918b",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fcff4bb7c37a1b1ca4309a66e494d021
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cfc0c8c425f99d82a84baeb15635e42d858ad8da
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5d3185389a12aaaf816139b7fc828fe7a2091aa8327105ddf68d6755421f92ca
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7a47fecf74767a09ddf626951308f2b11b8ee7e92463f824fc65f10684c186edee5cf6d8f214863234cb329cc0870cdb2f3411d3d14bcd945dfe3bd7d775e2e4
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>0.2.0-
|
|
12
|
+
<version>0.2.0-beta.0</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5894db93bc34a98ae780df3cfe4b2534
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0570918fef3c297de4e1d8975afd0ef849bedee1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
56e36ab4ccc46af602f0a076fbb3d89e4bdefde72e4199b3d584d1f1da781580
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f6ede85483da148e5c17c467162570a2ac8308325390be56e811502f213a26f036c68e862caa927b3938c3ddcfb2694924cbc85150da42e950612cedee6efbe0
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>0.2.0-
|
|
7
|
-
<release>0.2.0-
|
|
6
|
+
<latest>0.2.0-beta.0</latest>
|
|
7
|
+
<release>0.2.0-beta.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>0.2.0-
|
|
9
|
+
<version>0.2.0-beta.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250910183907</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
dbf3205149ca30c6a46668d9691f009b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d501989b8a9de5c4b65ece81effa74f17ce4f203
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c15378d73f02ff83387ad8d1f3e6bb8e49f9ceef68a59d4b6aad8d8167022d9c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
cad5ce054bcf736c04e22ea4541453c5f57d94957538fad7d57e53643a89ce2138dbf7ca3e1ea2dcc664c018c7576463b72abdce354c9048367fb06ac27248e2
|
package/package.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "0.2.0-
|
|
3
|
+
"version": "0.2.0-beta.0",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
"./swift-ui": {
|
|
9
|
+
"types": "./build/swift-ui/index.d.ts",
|
|
10
|
+
"default": "./src/swift-ui/index.tsx"
|
|
11
|
+
},
|
|
12
|
+
"./swift-ui/modifiers": {
|
|
13
|
+
"types": "./build/swift-ui/modifiers/index.d.ts",
|
|
14
|
+
"default": "./src/swift-ui/modifiers/index.ts"
|
|
15
|
+
},
|
|
16
|
+
"./jetpack-compose": {
|
|
17
|
+
"types": "./build/jetpack-compose/index.d.ts",
|
|
18
|
+
"default": "./src/jetpack-compose/index.ts"
|
|
19
|
+
},
|
|
20
|
+
"./jetpack-compose-primitives": {
|
|
21
|
+
"types": "./build/jetpack-compose-primitives/index.d.ts",
|
|
22
|
+
"default": "./src/jetpack-compose-primitives/index.tsx"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
5
25
|
"scripts": {
|
|
6
26
|
"build": "expo-module build",
|
|
7
27
|
"clean": "expo-module clean",
|
|
@@ -20,19 +40,21 @@
|
|
|
20
40
|
"keywords": [
|
|
21
41
|
"react-native",
|
|
22
42
|
"expo",
|
|
23
|
-
"UI components"
|
|
43
|
+
"UI components",
|
|
44
|
+
"SwiftUI",
|
|
45
|
+
"Jetpack Compose"
|
|
24
46
|
],
|
|
25
47
|
"author": "650 Industries, Inc.",
|
|
26
48
|
"license": "MIT",
|
|
27
49
|
"dependencies": {},
|
|
28
50
|
"devDependencies": {
|
|
29
51
|
"@types/react": "~19.1.10",
|
|
30
|
-
"expo-module-scripts": "^5.0.
|
|
52
|
+
"expo-module-scripts": "^5.0.7"
|
|
31
53
|
},
|
|
32
54
|
"peerDependencies": {
|
|
33
55
|
"expo": "*",
|
|
34
56
|
"react": "*",
|
|
35
57
|
"react-native": "*"
|
|
36
58
|
},
|
|
37
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "87186d10c8239c6469e055417e67bd4d0ed63efb"
|
|
38
60
|
}
|