@namiml/expo-sdk 3.4.4-dev.202607011943 → 3.4.4-dev.202607012039

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namiml/expo-sdk",
3
- "version": "3.4.4-dev.202607011943",
3
+ "version": "3.4.4-dev.202607012039",
4
4
  "type": "module",
5
5
  "description": "Nami Expo SDK — paywall and subscription management for Expo apps",
6
6
  "main": "./dist/index.cjs",
@@ -29,8 +29,8 @@
29
29
  "prepublishOnly": "yarn clean && yarn build:prod"
30
30
  },
31
31
  "dependencies": {
32
- "@namiml/expo-nami-iap": "3.4.4-dev.202607011943",
33
- "@namiml/sdk-core": "3.4.4-dev.202607011943",
32
+ "@namiml/expo-nami-iap": "3.4.4-dev.202607012039",
33
+ "@namiml/sdk-core": "3.4.4-dev.202607012039",
34
34
  "react-native-qrcode-svg": "^6.3.21",
35
35
  "react-native-safe-area-context": "^5.6.0",
36
36
  "react-native-svg": "^15.15.4"
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useMemo, useRef } from 'react';
2
2
  import { Pressable, ActivityIndicator, StyleSheet, View, Linking as RNLinking } from 'react-native';
3
3
  import { useFirstFocusReadyContext, usePaywallContext } from '../../context/PaywallContext';
4
- import { applyStyles, parseColor, childSpacingStyle, extractPrefixedStyles, focusedStyleOverrides, parseSize } from '../../utils/styles';
4
+ import { applyStyles, parseColor, childSpacingStyle, extractPrefixedStyles, focusedStyleOverrides, parseSize, buttonFlexDirection } from '../../utils/styles';
5
5
  import {
6
6
  handleAction,
7
7
  shouldHoist,
@@ -200,6 +200,9 @@ export const NamiButton: React.FC<Props> = ({ component, scaleFactor, onClose, p
200
200
  if (base.borderRadius != null) {
201
201
  base.overflow = 'hidden';
202
202
  }
203
+ // NAM-2417: a directionless button defaults to horizontal (row). applyStyles uses the
204
+ // shared flexDirectionFromConfig whose default is 'column'; override for buttons here.
205
+ base.flexDirection = buttonFlexDirection(component.direction);
203
206
  return base;
204
207
  }, [component, scaleFactor, disabled, backgroundColor, borderOverride, parentDirection, isFocused ]);
205
208
 
@@ -209,7 +212,7 @@ export const NamiButton: React.FC<Props> = ({ component, scaleFactor, onClose, p
209
212
  component.sku?.id === (ctx.state as any).productBeingPurchased?.id;
210
213
  const renderedChildren = useMemo(() => resolvedChildren.map((child: TComponent, i: number) => {
211
214
  const resolvedChild = withDisabledChildStyles(child, disabled);
212
- const buttonDirection = component.direction ?? "vertical";
215
+ const buttonDirection = component.direction ?? "horizontal";
213
216
  const spacingStyle =
214
217
  i === 0
215
218
  ? {}
@@ -189,6 +189,12 @@ export function flexDirectionFromConfig(dir?: string): ViewStyle['flexDirection'
189
189
  }
190
190
  }
191
191
 
192
+ // NAM-2417: a directionless `button` component defaults to horizontal (icon left of
193
+ // label), unlike containers which default to vertical via flexDirectionFromConfig.
194
+ export function buttonFlexDirection(dir?: string): ViewStyle['flexDirection'] {
195
+ return flexDirectionFromConfig(dir ?? 'horizontal');
196
+ }
197
+
192
198
  const ALIGNMENT_VALUE_MAP: Record<string, ViewStyle['alignItems']> = {
193
199
  top: 'flex-start',
194
200
  left: 'flex-start',