{"version":3,"sources":["../src/stack/index.native.tsx"],"names":["forwardRef","Stack","spacing","View"],"mappings":";;;;;;;;AAaA,IAAM,QAAA,GAAwD;AAAA,EAC5D,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA,EAAK,UAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,QAAA,EAAU;AACZ,CAAA;AACA,IAAM,UAAA,GAAgE;AAAA,EACpE,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,GAAA,EAAK,UAAA;AAAA,EACL,OAAA,EAAS,eAAA;AAAA,EACT,MAAA,EAAQ,cAAA;AAAA,EACR,MAAA,EAAQ;AACV,CAAA;AAYO,IAAM,QAAQA,gBAAA,CAA6B,SAASC,MAAAA,CACzD,EAAE,YAAY,QAAA,EAAU,GAAA,GAAM,CAAA,EAAG,KAAA,EAAO,SAAS,IAAA,EAAM,KAAA,EAAO,UAAU,GAAG,IAAA,IAC3E,GAAA,EACA;AACA,EAAA,MAAM,QAAA,GAAsB;AAAA,IAC1B,aAAA,EAAe,SAAA;AAAA,IACf,GAAA,EAAKC,aAAQ,GAAG,CAAA;AAAA,IAChB,GAAI,KAAA,GAAQ,EAAE,YAAY,QAAA,CAAS,KAAK,GAAE,GAAI,IAAA;AAAA,IAC9C,GAAI,OAAA,GAAU,EAAE,gBAAgB,UAAA,CAAW,OAAO,GAAE,GAAI,IAAA;AAAA,IACxD,GAAI,IAAA,GAAO,EAAE,QAAA,EAAU,QAAO,GAAI,IAAA;AAAA,IAClC,GAAG;AAAA,GACL;AACA,EAAA,sCACGC,gBAAA,EAAA,EAAK,GAAA,EAAU,OAAO,QAAA,EAAW,GAAG,MAClC,QAAA,EACH,CAAA;AAEJ,CAAC","file":"stack.native.cjs","sourcesContent":["/**\n * Stack (native). Same prop shape, RN View under the hood.\n *\n * `gap` is supported natively on RN 0.71+; we use it directly.\n */\nimport { forwardRef, type ReactNode } from \"react\";\nimport { View, type ViewStyle, type ViewProps } from \"react-native\";\nimport { spacing, type SpacingKey } from \"@plyxui/core\";\n\nexport type StackDirection = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\";\nexport type StackAlign = \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\nexport type StackJustify = \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\";\n\nconst alignMap: Record<StackAlign, ViewStyle[\"alignItems\"]> = {\n  start: \"flex-start\",\n  center: \"center\",\n  end: \"flex-end\",\n  stretch: \"stretch\",\n  baseline: \"baseline\",\n};\nconst justifyMap: Record<StackJustify, ViewStyle[\"justifyContent\"]> = {\n  start: \"flex-start\",\n  center: \"center\",\n  end: \"flex-end\",\n  between: \"space-between\",\n  around: \"space-around\",\n  evenly: \"space-evenly\",\n};\n\nexport interface StackProps extends Omit<ViewProps, \"style\"> {\n  direction?: StackDirection;\n  gap?: SpacingKey;\n  align?: StackAlign;\n  justify?: StackJustify;\n  wrap?: boolean;\n  style?: ViewStyle;\n  children?: ReactNode;\n}\n\nexport const Stack = forwardRef<View, StackProps>(function Stack(\n  { direction = \"column\", gap = 0, align, justify, wrap, style, children, ...rest },\n  ref,\n) {\n  const computed: ViewStyle = {\n    flexDirection: direction,\n    gap: spacing[gap],\n    ...(align ? { alignItems: alignMap[align] } : null),\n    ...(justify ? { justifyContent: justifyMap[justify] } : null),\n    ...(wrap ? { flexWrap: \"wrap\" } : null),\n    ...style,\n  };\n  return (\n    <View ref={ref} style={computed} {...rest}>\n      {children}\n    </View>\n  );\n});\n"]}