clox-view-switcher 0.1.3 → 0.1.4

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.
@@ -93,23 +93,20 @@ class AppCardView(
93
93
  marginEnd = (8 * density).toInt()
94
94
  }
95
95
  scaleType = ImageView.ScaleType.CENTER_CROP
96
-
97
- // Transparent background - no placeholder color
98
- setBackgroundColor(Color.TRANSPARENT)
99
96
  clipToOutline = true
100
-
101
- if (item.icon.isNotEmpty()) {
102
- visibility = View.VISIBLE
103
- load(item.icon) {
104
- crossfade(true)
105
- transformations(RoundedCornersTransformation(ICON_CORNER_DP * density))
106
- }
107
- } else {
108
- // Hide icon container if no icon provided
109
- visibility = View.GONE
97
+ // No background at all
98
+ background = null
99
+ }
100
+
101
+ // Only add icon to header if icon URL is provided
102
+ if (item.icon.isNotEmpty()) {
103
+ iconImageView.load(item.icon) {
104
+ crossfade(true)
105
+ transformations(RoundedCornersTransformation(ICON_CORNER_DP * density))
110
106
  }
107
+ headerContainer.addView(iconImageView)
111
108
  }
112
- headerContainer.addView(iconImageView)
109
+ // If no icon, don't add iconImageView to header at all
113
110
 
114
111
  // App title
115
112
  titleTextView = TextView(context).apply {
@@ -6,8 +6,8 @@ export interface ViewSwitcherItem {
6
6
  title: string;
7
7
  /** Main image/screenshot for the app card */
8
8
  image: ImageSourcePropType;
9
- /** Small icon displayed above the card */
10
- icon: ImageSourcePropType;
9
+ /** Small icon displayed next to the title (optional) */
10
+ icon?: ImageSourcePropType;
11
11
  }
12
12
  export interface CloxViewSwitcherViewProps {
13
13
  /** Style for the view container */
@@ -1 +1 @@
1
- {"version":3,"file":"CloxViewSwitcher.types.d.ts","sourceRoot":"","sources":["../src/CloxViewSwitcher.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAG9E,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,EAA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DAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iHAAiH;IACjH,eAAe,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;CACxE;AAGD,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,WAAW,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CloxViewSwitcher.types.js","sourceRoot":"","sources":["../src/CloxViewSwitcher.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';\n\n// Item in the view switcher\nexport interface ViewSwitcherItem {\n /** Unique identifier for the item */\n id: string;\n /** Title displayed below the app icon */\n title: string;\n /** Main image/screenshot for the app card */\n image: ImageSourcePropType;\n /** Small icon displayed above the card */\n icon: ImageSourcePropType;\n}\n\n// View Props\nexport interface CloxViewSwitcherViewProps {\n /** Style for the view container */\n style?: StyleProp<ViewStyle>;\n /** List of items to display in the switcher */\n items: ViewSwitcherItem[];\n /** Callback when an item is pressed */\n onItemPress?: (id: string) => void;\n /** Callback when a new card comes into view (title becomes visible) */\n onCardChange?: (id: string) => void;\n /** Callback when an item is swiped up to remove */\n onItemRemove?: (id: string) => void;\n /** Spring animation response (duration) - default 0.5. Lower = faster */\n springResponse?: number;\n /** Spring animation damping fraction - default 0.85. Lower = more bounce */\n springDamping?: number;\n /** Scroll speed multiplier - default 1.0. Lower = less sensitive (0.5), Higher = more sensitive (2.0) */\n scrollSpeed?: number;\n /** Background color for cards before images load - default #FFFFFF */\n cardBackgroundColor?: string;\n /** Border radius for the cards - default 20 */\n cardBorderRadius?: number;\n /** Font color for the card title - default #FFFFFF */\n titleFontColor?: string;\n /** Font size for the card title - default 14 */\n titleFontSize?: number;\n /** Font weight for the card title - default 'bold'. Options: 'regular', 'medium', 'semibold', 'bold', 'heavy' */\n titleFontWeight?: 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy';\n}\n\n// Module Events\nexport type CloxViewSwitcherModuleEvents = {\n onChange: (params: ChangeEventPayload) => void;\n onItemPress: (params: ItemPressEventPayload) => void;\n};\n\nexport type ChangeEventPayload = {\n value: string;\n};\n\nexport type ItemPressEventPayload = {\n id: string;\n};\n"]}
1
+ {"version":3,"file":"CloxViewSwitcher.types.js","sourceRoot":"","sources":["../src/CloxViewSwitcher.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';\n\n// Item in the view switcher\nexport interface ViewSwitcherItem {\n /** Unique identifier for the item */\n id: string;\n /** Title displayed below the app icon */\n title: string;\n /** Main image/screenshot for the app card */\n image: ImageSourcePropType;\n /** Small icon displayed next to the title (optional) */\n icon?: ImageSourcePropType;\n}\n\n// View Props\nexport interface CloxViewSwitcherViewProps {\n /** Style for the view container */\n style?: StyleProp<ViewStyle>;\n /** List of items to display in the switcher */\n items: ViewSwitcherItem[];\n /** Callback when an item is pressed */\n onItemPress?: (id: string) => void;\n /** Callback when a new card comes into view (title becomes visible) */\n onCardChange?: (id: string) => void;\n /** Callback when an item is swiped up to remove */\n onItemRemove?: (id: string) => void;\n /** Spring animation response (duration) - default 0.5. Lower = faster */\n springResponse?: number;\n /** Spring animation damping fraction - default 0.85. Lower = more bounce */\n springDamping?: number;\n /** Scroll speed multiplier - default 1.0. Lower = less sensitive (0.5), Higher = more sensitive (2.0) */\n scrollSpeed?: number;\n /** Background color for cards before images load - default #FFFFFF */\n cardBackgroundColor?: string;\n /** Border radius for the cards - default 20 */\n cardBorderRadius?: number;\n /** Font color for the card title - default #FFFFFF */\n titleFontColor?: string;\n /** Font size for the card title - default 14 */\n titleFontSize?: number;\n /** Font weight for the card title - default 'bold'. Options: 'regular', 'medium', 'semibold', 'bold', 'heavy' */\n titleFontWeight?: 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy';\n}\n\n// Module Events\nexport type CloxViewSwitcherModuleEvents = {\n onChange: (params: ChangeEventPayload) => void;\n onItemPress: (params: ItemPressEventPayload) => void;\n};\n\nexport type ChangeEventPayload = {\n value: string;\n};\n\nexport type ItemPressEventPayload = {\n id: string;\n};\n"]}
@@ -9,7 +9,7 @@ export default function CloxViewSwitcherView(props) {
9
9
  id: item.id,
10
10
  title: item.title,
11
11
  image: Image.resolveAssetSource(item.image)?.uri ?? '',
12
- icon: Image.resolveAssetSource(item.icon)?.uri ?? '',
12
+ icon: item.icon ? (Image.resolveAssetSource(item.icon)?.uri ?? '') : '',
13
13
  }));
14
14
  const handleItemPress = (event) => {
15
15
  onItemPress?.(event.nativeEvent.id);
@@ -1 +1 @@
1
- {"version":3,"file":"CloxViewSwitcherView.js","sourceRoot":"","sources":["../src/CloxViewSwitcherView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,MAAM,UAAU,GAA6B,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAEnF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAgC;IAC3E,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,GAAG,GAAG,EAAE,aAAa,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG,EAAE,mBAAmB,GAAG,SAAS,EAAE,gBAAgB,GAAG,EAAE,EAAE,cAAc,GAAG,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,eAAe,GAAG,MAAM,EAAE,G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,CAC/B,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\nimport { Image } from 'react-native';\n\nimport { CloxViewSwitcherViewProps } from './CloxViewSwitcher.types';\n\nconst NativeView: React.ComponentType<any> = requireNativeView('CloxViewSwitcher');\n\nexport default function CloxViewSwitcherView(props: CloxViewSwitcherViewProps) {\n const { items, onItemPress, onCardChange, onItemRemove, springResponse = 0.5, springDamping = 0.85, scrollSpeed = 1.0, cardBackgroundColor = '#FFFFFF', cardBorderRadius = 20, titleFontColor = '#FFFFFF', titleFontSize = 14, titleFontWeight = 'bold', ...rest } = props;\n\n // Resolve image sources to URIs for native\n const resolvedItems = items.map((item) => ({\n id: item.id,\n title: item.title,\n image: Image.resolveAssetSource(item.image)?.uri ?? '',\n icon: Image.resolveAssetSource(item.icon)?.uri ?? '',\n }));\n\n const handleItemPress = (event: { nativeEvent: { id: string } }) => {\n onItemPress?.(event.nativeEvent.id);\n };\n\n const handleCardChange = (event: { nativeEvent: { id: string } }) => {\n onCardChange?.(event.nativeEvent.id);\n };\n\n const handleItemRemove = (event: { nativeEvent: { id: string } }) => {\n onItemRemove?.(event.nativeEvent.id);\n };\n\n return (\n <NativeView\n items={resolvedItems}\n onItemPress={handleItemPress}\n onCardChange={handleCardChange}\n onItemRemove={handleItemRemove}\n springResponse={springResponse}\n springDamping={springDamping}\n scrollSpeed={scrollSpeed}\n cardBackgroundColor={cardBackgroundColor}\n cardBorderRadius={cardBorderRadius}\n titleFontColor={titleFontColor}\n titleFontSize={titleFontSize}\n titleFontWeight={titleFontWeight}\n {...rest}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"CloxViewSwitcherView.js","sourceRoot":"","sources":["../src/CloxViewSwitcherView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM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,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,CAAC,KAAsC,EAAE,EAAE;QAClE,YAAY,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,WAAW,CAAC,CAAC,eAAe,CAAC,CAC7B,YAAY,CAAC,CAAC,gBAAgB,CAAC,CAC/B,YAAY,CAAC,CAAC,gBAAgB,CAAC,CAC/B,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\nimport { Image } from 'react-native';\n\nimport { CloxViewSwitcherViewProps } from './CloxViewSwitcher.types';\n\nconst NativeView: React.ComponentType<any> = requireNativeView('CloxViewSwitcher');\n\nexport default function CloxViewSwitcherView(props: CloxViewSwitcherViewProps) {\n const { items, onItemPress, onCardChange, onItemRemove, springResponse = 0.5, springDamping = 0.85, scrollSpeed = 1.0, cardBackgroundColor = '#FFFFFF', cardBorderRadius = 20, titleFontColor = '#FFFFFF', titleFontSize = 14, titleFontWeight = 'bold', ...rest } = props;\n\n // Resolve image sources to URIs for native\n const resolvedItems = items.map((item) => ({\n id: item.id,\n title: item.title,\n image: Image.resolveAssetSource(item.image)?.uri ?? '',\n icon: item.icon ? (Image.resolveAssetSource(item.icon)?.uri ?? '') : '',\n }));\n\n const handleItemPress = (event: { nativeEvent: { id: string } }) => {\n onItemPress?.(event.nativeEvent.id);\n };\n\n const handleCardChange = (event: { nativeEvent: { id: string } }) => {\n onCardChange?.(event.nativeEvent.id);\n };\n\n const handleItemRemove = (event: { nativeEvent: { id: string } }) => {\n onItemRemove?.(event.nativeEvent.id);\n };\n\n return (\n <NativeView\n items={resolvedItems}\n onItemPress={handleItemPress}\n onCardChange={handleCardChange}\n onItemRemove={handleItemRemove}\n springResponse={springResponse}\n springDamping={springDamping}\n scrollSpeed={scrollSpeed}\n cardBackgroundColor={cardBackgroundColor}\n cardBorderRadius={cardBorderRadius}\n titleFontColor={titleFontColor}\n titleFontSize={titleFontSize}\n titleFontWeight={titleFontWeight}\n {...rest}\n />\n );\n}\n"]}
package/example/App.tsx CHANGED
@@ -8,25 +8,25 @@ const sampleItems: ViewSwitcherItem[] = [
8
8
  id: '1',
9
9
  title: 'Messages',
10
10
  image: { uri: 'https://picsum.photos/260/540?random=1' },
11
- icon: { uri: 'https://picsum.photos/60/60?random=11' },
11
+ // icon: { uri: 'https://picsum.photos/60/60?random=11' },
12
12
  },
13
13
  {
14
14
  id: '2',
15
15
  title: 'Photos',
16
16
  image: { uri: 'https://picsum.photos/260/540?random=2' },
17
- icon: { uri: 'https://picsum.photos/60/60?random=12' },
17
+ // icon: { uri: 'https://picsum.photos/60/60?random=12' },
18
18
  },
19
19
  {
20
20
  id: '3',
21
21
  title: 'Safari',
22
22
  image: { uri: 'https://picsum.photos/260/540?random=3' },
23
- icon: { uri: 'https://picsum.photos/60/60?random=13' },
23
+ // icon: { uri: 'https://picsum.photos/60/60?random=13' },
24
24
  },
25
25
  {
26
26
  id: '4',
27
27
  title: 'Mail',
28
28
  image: { uri: 'https://picsum.photos/260/540?random=4' },
29
- icon: { uri: 'https://picsum.photos/60/60?random=14' },
29
+ // icon: { uri: 'https://picsum.photos/60/60?random=14' },
30
30
  },
31
31
  {
32
32
  id: '5',
@@ -1,5 +1,5 @@
1
1
  PODS:
2
- - CloxViewSwitcher (0.1.2):
2
+ - CloxViewSwitcher (0.1.3):
3
3
  - ExpoModulesCore
4
4
  - EXConstants (18.0.13):
5
5
  - ExpoModulesCore
@@ -2123,7 +2123,7 @@ EXTERNAL SOURCES:
2123
2123
  :path: "../node_modules/react-native/ReactCommon/yoga"
2124
2124
 
2125
2125
  SPEC CHECKSUMS:
2126
- CloxViewSwitcher: 0b284cea884aa7abae8831910d594d563ea1b606
2126
+ CloxViewSwitcher: e69dddeb30c0cf96ccb360d8b737c39740883e63
2127
2127
  EXConstants: 3feb66fd1d94202fc1f0946d74e029d8b224b60e
2128
2128
  EXJSONUtils: 1d3e4590438c3ee593684186007028a14b3686cd
2129
2129
  EXManifests: 83ef0844fcf06d6099b12a7bdbd7d36fc0e1dd16
@@ -7,26 +7,26 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 03A2AE3683165326CCE4670F /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CED9E8606AD646A7957A9BB /* ExpoModulesProvider.swift */; };
11
10
  13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
11
+ 25BE30B6E825A66ABF2B4F61 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = E72065D1D97D44D2B3922F33 /* PrivacyInfo.xcprivacy */; };
12
+ 3CAFB7756A0C38BDE594E782 /* libPods-cloxviewswitcherexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CABD0F80240152F813748BB5 /* libPods-cloxviewswitcherexample.a */; };
12
13
  3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
13
- 548822241B25FB99372B7D5D /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5C216FAE8C95D9AE919589AC /* PrivacyInfo.xcprivacy */; };
14
14
  BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
15
+ E30C5691BC6CA599F59A4FCE /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98487FBB45AF974DC5B450E1 /* ExpoModulesProvider.swift */; };
15
16
  F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11748412D0307B40044C1D9 /* AppDelegate.swift */; };
16
- F389E5D83F5440737DBEC1B8 /* libPods-cloxviewswitcherexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EA0C9C4AD0F4448CAA6465E /* libPods-cloxviewswitcherexample.a */; };
17
17
  /* End PBXBuildFile section */
18
18
 
19
19
  /* Begin PBXFileReference section */
20
20
  13B07F961A680F5B00A75B9A /* cloxviewswitcherexample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = cloxviewswitcherexample.app; sourceTree = BUILT_PRODUCTS_DIR; };
21
21
  13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = cloxviewswitcherexample/Images.xcassets; sourceTree = "<group>"; };
22
22
  13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = cloxviewswitcherexample/Info.plist; sourceTree = "<group>"; };
23
- 2EA0C9C4AD0F4448CAA6465E /* libPods-cloxviewswitcherexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-cloxviewswitcherexample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
24
- 4CED9E8606AD646A7957A9BB /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-cloxviewswitcherexample/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
25
- 5C216FAE8C95D9AE919589AC /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = cloxviewswitcherexample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
26
- 660886996142DEE670A5984E /* Pods-cloxviewswitcherexample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cloxviewswitcherexample.debug.xcconfig"; path = "Target Support Files/Pods-cloxviewswitcherexample/Pods-cloxviewswitcherexample.debug.xcconfig"; sourceTree = "<group>"; };
27
- 8EDA09CD3577DC6A191E2EB8 /* Pods-cloxviewswitcherexample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cloxviewswitcherexample.release.xcconfig"; path = "Target Support Files/Pods-cloxviewswitcherexample/Pods-cloxviewswitcherexample.release.xcconfig"; sourceTree = "<group>"; };
23
+ 26B791276E2FBA39171C7D87 /* Pods-cloxviewswitcherexample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cloxviewswitcherexample.release.xcconfig"; path = "Target Support Files/Pods-cloxviewswitcherexample/Pods-cloxviewswitcherexample.release.xcconfig"; sourceTree = "<group>"; };
24
+ 9359119764483FC5366A282C /* Pods-cloxviewswitcherexample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-cloxviewswitcherexample.debug.xcconfig"; path = "Target Support Files/Pods-cloxviewswitcherexample/Pods-cloxviewswitcherexample.debug.xcconfig"; sourceTree = "<group>"; };
25
+ 98487FBB45AF974DC5B450E1 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-cloxviewswitcherexample/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
28
26
  AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = cloxviewswitcherexample/SplashScreen.storyboard; sourceTree = "<group>"; };
29
27
  BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
28
+ CABD0F80240152F813748BB5 /* libPods-cloxviewswitcherexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-cloxviewswitcherexample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
29
+ E72065D1D97D44D2B3922F33 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = cloxviewswitcherexample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
30
30
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
31
31
  F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = cloxviewswitcherexample/AppDelegate.swift; sourceTree = "<group>"; };
32
32
  F11748442D0722820044C1D9 /* cloxviewswitcherexample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "cloxviewswitcherexample-Bridging-Header.h"; path = "cloxviewswitcherexample/cloxviewswitcherexample-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -37,13 +37,21 @@
37
37
  isa = PBXFrameworksBuildPhase;
38
38
  buildActionMask = 2147483647;
39
39
  files = (
40
- F389E5D83F5440737DBEC1B8 /* libPods-cloxviewswitcherexample.a in Frameworks */,
40
+ 3CAFB7756A0C38BDE594E782 /* libPods-cloxviewswitcherexample.a in Frameworks */,
41
41
  );
42
42
  runOnlyForDeploymentPostprocessing = 0;
43
43
  };
44
44
  /* End PBXFrameworksBuildPhase section */
45
45
 
46
46
  /* Begin PBXGroup section */
47
+ 1253E1A6A8B4DD4305EC09B3 /* ExpoModulesProviders */ = {
48
+ isa = PBXGroup;
49
+ children = (
50
+ 230A347A72EDD83778167BFE /* cloxviewswitcherexample */,
51
+ );
52
+ name = ExpoModulesProviders;
53
+ sourceTree = "<group>";
54
+ };
47
55
  13B07FAE1A68108700A75B9A /* cloxviewswitcherexample */ = {
48
56
  isa = PBXGroup;
49
57
  children = (
@@ -53,15 +61,15 @@
53
61
  13B07FB51A68108700A75B9A /* Images.xcassets */,
54
62
  13B07FB61A68108700A75B9A /* Info.plist */,
55
63
  AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
56
- 5C216FAE8C95D9AE919589AC /* PrivacyInfo.xcprivacy */,
64
+ E72065D1D97D44D2B3922F33 /* PrivacyInfo.xcprivacy */,
57
65
  );
58
66
  name = cloxviewswitcherexample;
59
67
  sourceTree = "<group>";
60
68
  };
61
- 1A67C8D737D2DEE27A35AD59 /* cloxviewswitcherexample */ = {
69
+ 230A347A72EDD83778167BFE /* cloxviewswitcherexample */ = {
62
70
  isa = PBXGroup;
63
71
  children = (
64
- 4CED9E8606AD646A7957A9BB /* ExpoModulesProvider.swift */,
72
+ 98487FBB45AF974DC5B450E1 /* ExpoModulesProvider.swift */,
65
73
  );
66
74
  name = cloxviewswitcherexample;
67
75
  sourceTree = "<group>";
@@ -70,17 +78,19 @@
70
78
  isa = PBXGroup;
71
79
  children = (
72
80
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
73
- 2EA0C9C4AD0F4448CAA6465E /* libPods-cloxviewswitcherexample.a */,
81
+ CABD0F80240152F813748BB5 /* libPods-cloxviewswitcherexample.a */,
74
82
  );
75
83
  name = Frameworks;
76
84
  sourceTree = "<group>";
77
85
  };
78
- 7E0C4FC28F1496D5A25C633E /* ExpoModulesProviders */ = {
86
+ 76D4071DC52E28F8018C6DCB /* Pods */ = {
79
87
  isa = PBXGroup;
80
88
  children = (
81
- 1A67C8D737D2DEE27A35AD59 /* cloxviewswitcherexample */,
89
+ 9359119764483FC5366A282C /* Pods-cloxviewswitcherexample.debug.xcconfig */,
90
+ 26B791276E2FBA39171C7D87 /* Pods-cloxviewswitcherexample.release.xcconfig */,
82
91
  );
83
- name = ExpoModulesProviders;
92
+ name = Pods;
93
+ path = Pods;
84
94
  sourceTree = "<group>";
85
95
  };
86
96
  832341AE1AAA6A7D00B99B32 /* Libraries */ = {
@@ -97,8 +107,8 @@
97
107
  832341AE1AAA6A7D00B99B32 /* Libraries */,
98
108
  83CBBA001A601CBA00E9B192 /* Products */,
99
109
  2D16E6871FA4F8E400B85C8A /* Frameworks */,
100
- DB2785C99B00FD254EEEAB39 /* Pods */,
101
- 7E0C4FC28F1496D5A25C633E /* ExpoModulesProviders */,
110
+ 76D4071DC52E28F8018C6DCB /* Pods */,
111
+ 1253E1A6A8B4DD4305EC09B3 /* ExpoModulesProviders */,
102
112
  );
103
113
  indentWidth = 2;
104
114
  sourceTree = "<group>";
@@ -122,16 +132,6 @@
122
132
  path = cloxviewswitcherexample/Supporting;
123
133
  sourceTree = "<group>";
124
134
  };
125
- DB2785C99B00FD254EEEAB39 /* Pods */ = {
126
- isa = PBXGroup;
127
- children = (
128
- 660886996142DEE670A5984E /* Pods-cloxviewswitcherexample.debug.xcconfig */,
129
- 8EDA09CD3577DC6A191E2EB8 /* Pods-cloxviewswitcherexample.release.xcconfig */,
130
- );
131
- name = Pods;
132
- path = Pods;
133
- sourceTree = "<group>";
134
- };
135
135
  /* End PBXGroup section */
136
136
 
137
137
  /* Begin PBXNativeTarget section */
@@ -140,13 +140,13 @@
140
140
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "cloxviewswitcherexample" */;
141
141
  buildPhases = (
142
142
  08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
143
- 8809AF297A718373CB84867F /* [Expo] Configure project */,
143
+ 524619DBC96435151DC5F29D /* [Expo] Configure project */,
144
144
  13B07F871A680F5B00A75B9A /* Sources */,
145
145
  13B07F8C1A680F5B00A75B9A /* Frameworks */,
146
146
  13B07F8E1A680F5B00A75B9A /* Resources */,
147
147
  00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
148
148
  800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
149
- 31297F6E513C42C03FAD0C12 /* [CP] Embed Pods Frameworks */,
149
+ 604A73200153064265110997 /* [CP] Embed Pods Frameworks */,
150
150
  );
151
151
  buildRules = (
152
152
  );
@@ -167,6 +167,8 @@
167
167
  TargetAttributes = {
168
168
  13B07F861A680F5B00A75B9A = {
169
169
  LastSwiftMigration = 1250;
170
+ DevelopmentTeam = "R4V52R83RZ";
171
+ ProvisioningStyle = Automatic;
170
172
  };
171
173
  };
172
174
  };
@@ -196,7 +198,7 @@
196
198
  BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
197
199
  13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
198
200
  3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
199
- 548822241B25FB99372B7D5D /* PrivacyInfo.xcprivacy in Resources */,
201
+ 25BE30B6E825A66ABF2B4F61 /* PrivacyInfo.xcprivacy in Resources */,
200
202
  );
201
203
  runOnlyForDeploymentPostprocessing = 0;
202
204
  };
@@ -242,7 +244,31 @@
242
244
  shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
243
245
  showEnvVarsInLog = 0;
244
246
  };
245
- 31297F6E513C42C03FAD0C12 /* [CP] Embed Pods Frameworks */ = {
247
+ 524619DBC96435151DC5F29D /* [Expo] Configure project */ = {
248
+ isa = PBXShellScriptBuildPhase;
249
+ alwaysOutOfDate = 1;
250
+ buildActionMask = 2147483647;
251
+ files = (
252
+ );
253
+ inputFileListPaths = (
254
+ );
255
+ inputPaths = (
256
+ "$(SRCROOT)/.xcode.env",
257
+ "$(SRCROOT)/.xcode.env.local",
258
+ "$(SRCROOT)/cloxviewswitcherexample/cloxviewswitcherexample.entitlements",
259
+ "$(SRCROOT)/Pods/Target Support Files/Pods-cloxviewswitcherexample/expo-configure-project.sh",
260
+ );
261
+ name = "[Expo] Configure project";
262
+ outputFileListPaths = (
263
+ );
264
+ outputPaths = (
265
+ "$(SRCROOT)/Pods/Target Support Files/Pods-cloxviewswitcherexample/ExpoModulesProvider.swift",
266
+ );
267
+ runOnlyForDeploymentPostprocessing = 0;
268
+ shellPath = /bin/sh;
269
+ shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-cloxviewswitcherexample/expo-configure-project.sh\"\n";
270
+ };
271
+ 604A73200153064265110997 /* [CP] Embed Pods Frameworks */ = {
246
272
  isa = PBXShellScriptBuildPhase;
247
273
  buildActionMask = 2147483647;
248
274
  files = (
@@ -294,30 +320,6 @@
294
320
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-cloxviewswitcherexample/Pods-cloxviewswitcherexample-resources.sh\"\n";
295
321
  showEnvVarsInLog = 0;
296
322
  };
297
- 8809AF297A718373CB84867F /* [Expo] Configure project */ = {
298
- isa = PBXShellScriptBuildPhase;
299
- alwaysOutOfDate = 1;
300
- buildActionMask = 2147483647;
301
- files = (
302
- );
303
- inputFileListPaths = (
304
- );
305
- inputPaths = (
306
- "$(SRCROOT)/.xcode.env",
307
- "$(SRCROOT)/.xcode.env.local",
308
- "$(SRCROOT)/cloxviewswitcherexample/cloxviewswitcherexample.entitlements",
309
- "$(SRCROOT)/Pods/Target Support Files/Pods-cloxviewswitcherexample/expo-configure-project.sh",
310
- );
311
- name = "[Expo] Configure project";
312
- outputFileListPaths = (
313
- );
314
- outputPaths = (
315
- "$(SRCROOT)/Pods/Target Support Files/Pods-cloxviewswitcherexample/ExpoModulesProvider.swift",
316
- );
317
- runOnlyForDeploymentPostprocessing = 0;
318
- shellPath = /bin/sh;
319
- shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-cloxviewswitcherexample/expo-configure-project.sh\"\n";
320
- };
321
323
  /* End PBXShellScriptBuildPhase section */
322
324
 
323
325
  /* Begin PBXSourcesBuildPhase section */
@@ -326,7 +328,7 @@
326
328
  buildActionMask = 2147483647;
327
329
  files = (
328
330
  F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */,
329
- 03A2AE3683165326CCE4670F /* ExpoModulesProvider.swift in Sources */,
331
+ E30C5691BC6CA599F59A4FCE /* ExpoModulesProvider.swift in Sources */,
330
332
  );
331
333
  runOnlyForDeploymentPostprocessing = 0;
332
334
  };
@@ -335,7 +337,7 @@
335
337
  /* Begin XCBuildConfiguration section */
336
338
  13B07F941A680F5B00A75B9A /* Debug */ = {
337
339
  isa = XCBuildConfiguration;
338
- baseConfigurationReference = 660886996142DEE670A5984E /* Pods-cloxviewswitcherexample.debug.xcconfig */;
340
+ baseConfigurationReference = 9359119764483FC5366A282C /* Pods-cloxviewswitcherexample.debug.xcconfig */;
339
341
  buildSettings = {
340
342
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
341
343
  CLANG_ENABLE_MODULES = YES;
@@ -366,12 +368,15 @@
366
368
  SWIFT_VERSION = 5.0;
367
369
  TARGETED_DEVICE_FAMILY = "1,2";
368
370
  VERSIONING_SYSTEM = "apple-generic";
371
+ DEVELOPMENT_TEAM = "R4V52R83RZ";
372
+ CODE_SIGN_IDENTITY = "Apple Development";
373
+ CODE_SIGN_STYLE = Automatic;
369
374
  };
370
375
  name = Debug;
371
376
  };
372
377
  13B07F951A680F5B00A75B9A /* Release */ = {
373
378
  isa = XCBuildConfiguration;
374
- baseConfigurationReference = 8EDA09CD3577DC6A191E2EB8 /* Pods-cloxviewswitcherexample.release.xcconfig */;
379
+ baseConfigurationReference = 26B791276E2FBA39171C7D87 /* Pods-cloxviewswitcherexample.release.xcconfig */;
375
380
  buildSettings = {
376
381
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
377
382
  CLANG_ENABLE_MODULES = YES;
@@ -396,6 +401,9 @@
396
401
  SWIFT_VERSION = 5.0;
397
402
  TARGETED_DEVICE_FAMILY = "1,2";
398
403
  VERSIONING_SYSTEM = "apple-generic";
404
+ DEVELOPMENT_TEAM = "R4V52R83RZ";
405
+ CODE_SIGN_IDENTITY = "Apple Development";
406
+ CODE_SIGN_STYLE = Automatic;
399
407
  };
400
408
  name = Release;
401
409
  };
package/ios/AppView.swift CHANGED
@@ -50,20 +50,22 @@ struct AppCardView: View {
50
50
  VStack(alignment: .leading) {
51
51
  // Header with icon and title
52
52
  HStack {
53
- // App icon
54
- AsyncImage(url: URL(string: item.iconURL)) { phase in
55
- switch phase {
56
- case .success(let image):
57
- image
58
- .resizable()
59
- .aspectRatio(contentMode: .fill)
60
- default:
61
- RoundedRectangle(cornerRadius: 6)
62
- .fill(colorFromHex(backgroundColor))
53
+ // App icon - only show if iconURL is provided
54
+ if !item.iconURL.isEmpty {
55
+ AsyncImage(url: URL(string: item.iconURL)) { phase in
56
+ switch phase {
57
+ case .success(let image):
58
+ image
59
+ .resizable()
60
+ .aspectRatio(contentMode: .fill)
61
+ default:
62
+ // Transparent placeholder while loading
63
+ Color.clear
64
+ }
63
65
  }
66
+ .frame(width: 30, height: 30)
67
+ .clipShape(RoundedRectangle(cornerRadius: 6))
64
68
  }
65
- .frame(width: 30, height: 30)
66
- .clipShape(RoundedRectangle(cornerRadius: 6))
67
69
 
68
70
  Text(item.title)
69
71
  .font(.system(size: CGFloat(titleFontSize), weight: fontWeight(from: titleFontWeight)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clox-view-switcher",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "A native Expo module for view switching animations",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -8,8 +8,8 @@ export interface ViewSwitcherItem {
8
8
  title: string;
9
9
  /** Main image/screenshot for the app card */
10
10
  image: ImageSourcePropType;
11
- /** Small icon displayed above the card */
12
- icon: ImageSourcePropType;
11
+ /** Small icon displayed next to the title (optional) */
12
+ icon?: ImageSourcePropType;
13
13
  }
14
14
 
15
15
  // View Props
@@ -14,7 +14,7 @@ export default function CloxViewSwitcherView(props: CloxViewSwitcherViewProps) {
14
14
  id: item.id,
15
15
  title: item.title,
16
16
  image: Image.resolveAssetSource(item.image)?.uri ?? '',
17
- icon: Image.resolveAssetSource(item.icon)?.uri ?? '',
17
+ icon: item.icon ? (Image.resolveAssetSource(item.icon)?.uri ?? '') : '',
18
18
  }));
19
19
 
20
20
  const handleItemPress = (event: { nativeEvent: { id: string } }) => {