{"version":3,"file":"index.web.mjs","sources":["../../../src/runtime/utils/constants.ts","../../../src/runtime/index.web.ts"],"sourcesContent":["/**\n * Maps CSS-like `userSelect` values to React Native's `selectable` prop.\n */\nexport const userSelectToSelectableMap = {\n  auto: true,\n  text: true,\n  none: false,\n  contain: true,\n  all: true,\n};\n\n/**\n * Maps CSS-like `verticalAlign` values to React Native's `textAlignVertical`.\n */\nexport const verticalAlignToTextAlignVerticalMap = {\n  auto: 'auto',\n  top: 'top',\n  bottom: 'bottom',\n  middle: 'center',\n};\n\n/**\n * Clamps a `numberOfLines` value exactly as `Text` does at runtime: a negative number (or `NaN`) becomes\n * `0`, while `null`/`undefined` pass through untouched (`!(value >= 0)` is `true` for negatives and `NaN`,\n * `false` otherwise).\n */\nexport const clampNumberOfLines = (value?: number | null): number | null | undefined =>\n  value != null && !(value >= 0) ? 0 : value;\n","// This is a dummy file to ensure that nothing breaks when using the runtime in a web environment.\n\nimport { ActivityIndicator as NativeActivityIndicator } from 'react-native';\nimport type { ActivityIndicatorProps, TextProps, TextStyle } from 'react-native';\nimport { GenericStyleProp } from './types';\n\nexport const textDefaultOverflowStyle = { overflow: 'hidden' } as const;\n\nexport const processTextStyle = (style: GenericStyleProp<TextStyle>, _includesDefaultStyle?: boolean) =>\n  ({ style }) as Partial<TextProps>;\n\n// react-native-web's `Text` accepts `selectionColor` and resolves colors itself, so there is no native\n// int to pack — pass the value through untouched (mirroring the other web shims). Keeping the\n// `{}`-on-null omission means the injected spread is a no-op when the prop is absent.\nexport function processSelectionColor(selectionColor?: unknown): { selectionColor?: unknown } {\n  return selectionColor == null ? {} : { selectionColor };\n}\n\nexport function resolveActivityIndicatorDefault<T>(value: T | undefined, fallback: T): T {\n  return value === undefined ? fallback : value;\n}\n\nexport const activityIndicatorStyles = {\n  container: { alignItems: 'center', justifyContent: 'center' },\n  small: { width: 20, height: 20 },\n  large: { width: 36, height: 36 },\n} as const;\n\nexport function processActivityIndicatorStyle(style: ActivityIndicatorProps['style']): ActivityIndicatorProps['style'] {\n  return style ? [activityIndicatorStyles.container, style] : activityIndicatorStyles.container;\n}\n\nexport function processActivityIndicatorSize(size: ActivityIndicatorProps['size'] = 'small') {\n  if (size === 'small') return { style: activityIndicatorStyles.small, size };\n  if (size === 'large') return { style: activityIndicatorStyles.large, size };\n  return { style: { height: size, width: size }, size: undefined };\n}\n\nexport { NativeActivityIndicator };\n\n// On Web there is no platform-specific `accessible` default to apply; react-native-web's `Text`\n// derives accessibility from the rendered DOM. Returning `undefined` makes the injected\n// `accessible={getDefaultTextAccessible()}` a no-op.\nexport const getDefaultTextAccessible = (): boolean | undefined => undefined;\n\n// Web has no native Text host, so there is no `overflow: 'hidden'` default to replicate.\nexport const getDefaultTextStyle = (): undefined => undefined;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processTextAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  return props;\n}\n\n// On Web the native components fall back to react-native-web's `View`, which performs its own\n// aria→accessibility translation, so the runtime helper passes props through untouched to avoid\n// double-translation.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processViewAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  return props;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processImageAccessibilityProps(props: Record<string, any>): Record<string, any> {\n  return props;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function processImageSourceProps(props: Record<string, any>): Record<string, any> {\n  return props;\n}\n\n// The plugin skips `Image` entirely on web, so these gates are never emitted into a web build. They\n// exist so the web shim still exposes the full native runtime surface if a natively-transformed file\n// is bundled for web; react-native-web reads neither a top-level `headers` prop nor these dimensions.\nexport const processImageObjectSourceHeaders = <T>(headers: T): T => headers;\nexport const processImageArraySourceDimensions = <T>(dimensions: T): T => dimensions;\n\nexport * from './types';\nexport * from './utils/constants';\n\n// On Web, the native components are not available, so we use the standard components that'll be replaced by their DOM\n// equivalents by react-native-web.\n/* eslint-disable @typescript-eslint/no-require-imports,unicorn/prefer-module */\nexport const NativeText = require('react-native').Text;\nexport const NativeView = require('react-native').View;\nexport const NativeViewWithContext = NativeView;\nexport const NativeImage = require('react-native').Image;\n/* eslint-enable @typescript-eslint/no-require-imports,unicorn/prefer-module */\n"],"names":[],"mappings":";;AAGO,MAAM,yBAAA,GAA4B;AAAA,EACvC,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,IAAA,EAAM,KAAA;AAAA,EACN,OAAA,EAAS,IAAA;AAAA,EACT,GAAA,EAAK;AACP;AAKO,MAAM,mCAAA,GAAsC;AAAA,EACjD,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK,KAAA;AAAA,EACL,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ;AACV;AAOO,MAAM,kBAAA,GAAqB,CAAC,KAAA,KACjC,KAAA,IAAS,QAAQ,EAAE,KAAA,IAAS,KAAK,CAAA,GAAI;;ACrBhC,MAAM,wBAAA,GAA2B,EAAE,QAAA,EAAU,QAAA;AAE7C,MAAM,gBAAA,GAAmB,CAAC,KAAA,EAAoC,qBAAA,MAClE,EAAE,KAAA,EAAM;AAKJ,SAAS,sBAAsB,cAAA,EAAwD;AAC5F,EAAA,OAAO,cAAA,IAAkB,IAAA,GAAO,EAAC,GAAI,EAAE,cAAA,EAAe;AACxD;AAEO,SAAS,+BAAA,CAAmC,OAAsB,QAAA,EAAgB;AACvF,EAAA,OAAO,KAAA,KAAU,SAAY,QAAA,GAAW,KAAA;AAC1C;AAEO,MAAM,uBAAA,GAA0B;AAAA,EACrC,SAAA,EAAW,EAAE,UAAA,EAAY,QAAA,EAAU,gBAAgB,QAAA,EAAS;AAAA,EAC5D,KAAA,EAAO,EAAE,KAAA,EAAO,EAAA,EAAI,QAAQ,EAAA,EAAG;AAAA,EAC/B,KAAA,EAAO,EAAE,KAAA,EAAO,EAAA,EAAI,QAAQ,EAAA;AAC9B;AAEO,SAAS,8BAA8B,KAAA,EAAyE;AACrH,E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