{
  "mappings": "AAAA,cAAc,cAAc,eAAe,wBAAiC;;;;;;;;;;;;;;;;;;AAoB5E,OAAO,cAAM,0BAA0B;AAsDvC,OAAO,cAAM,gBAAgB,SAAS,OAAO,eAAe;;AAgC5D,OAAO,cAAM,yBAAyB;;AAMtC,OAAO,cAAM,uBAAuB;;AAWpC,OAAO,cAAM,sBAAsB",
  "names": [],
  "sources": [
    "src/tables/nativeBacking.ts"
  ],
  "version": 3,
  "sourcesContent": [
    "import type { DefaultStyle, NativeBacking, NativeBackingRow, TagName } from './types'\n\n/**\n * The native backing table: what each tag becomes after the DOM compiler runs.\n *\n * On native the compiler is required. Tag classification, primitive injection\n * and literal-text wrapping are build-time structural rewrites, so there is no\n * runtime child scan and no untransformed fallback: a missing compiler is a\n * native build failure.\n *\n * The block and flex constants below are the browser layout defaults React\n * Native does not have. The COMPILER applies them while flattening styles —\n * they depend on the parent's resolved display, which the compiler resolves\n * statically (same-module parent) or by the defined block-flow boundary rule\n * (component root). Static primitives stay hook-free; compiler-marked refs,\n * inherited text and dynamic style() clauses enter narrow runtime paths. See\n * `contract.ts` and plans/v3-dom-native-lowering-design.md.\n */\n\n/** the module the compiler injects primitive imports from */\nexport const NATIVE_PRIMITIVE_MODULE = '@tamagui/core/dom'\n\nconst VIEW_TAGS: readonly TagName[] = [\n  'article',\n  'aside',\n  'blockquote',\n  'button',\n  'div',\n  'fieldset',\n  'footer',\n  'form',\n  'header',\n  'hr',\n  'li',\n  'main',\n  'nav',\n  'ol',\n  'optgroup',\n  'section',\n  'select',\n  'ul',\n]\n\nconst TEXT_TAGS: readonly TagName[] = [\n  'a',\n  'b',\n  'bdi',\n  'bdo',\n  'br',\n  'code',\n  'del',\n  'em',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'i',\n  'ins',\n  'kbd',\n  'label',\n  'mark',\n  'option',\n  'p',\n  'pre',\n  's',\n  'span',\n  'strong',\n  'sub',\n  'sup',\n  'u',\n]\n\nexport const NATIVE_BACKING: Readonly<Record<NativeBacking, NativeBackingRow>> = {\n  view: {\n    primitive: 'DOMView',\n    host: 'View',\n    tags: VIEW_TAGS,\n    wrapsLiteralText: true,\n    note: 'a direct literal string or number child is wrapped in DOMText at compile time, because a native view cannot render raw text',\n  },\n  text: {\n    primitive: 'DOMText',\n    host: 'Text',\n    tags: TEXT_TAGS,\n    wrapsLiteralText: false,\n    note: 'inherits text styles from the nearest DOMText ancestor, and renders raw text directly',\n  },\n  image: {\n    primitive: 'DOMImage',\n    host: 'Image',\n    tags: ['img'],\n    wrapsLiteralText: false,\n    note: 'width and height props become an aspect ratio so layout matches the browser before the image loads',\n  },\n  textinput: {\n    primitive: 'DOMTextInput',\n    host: 'TextInput',\n    tags: ['input', 'textarea'],\n    wrapsLiteralText: false,\n    note: 'textarea sets multiline, and rows becomes numberOfLines',\n  },\n}\n\n/** browser defaults every element has and react native does not */\nexport const NATIVE_ELEMENT_DEFAULTS: DefaultStyle = {\n  boxSizing: 'content-box',\n  position: 'static',\n}\n\n/** what `display: block` means once emulated on native */\nexport const NATIVE_BLOCK_DEFAULTS: DefaultStyle = {\n  alignItems: 'stretch',\n  display: 'flex',\n  flexBasis: 'auto',\n  flexDirection: 'column',\n  flexShrink: 0,\n  flexWrap: 'nowrap',\n  justifyContent: 'flex-start',\n}\n\n/** what an authored `display: flex` means on native, matching css defaults */\nexport const NATIVE_FLEX_DEFAULTS: DefaultStyle = {\n  alignContent: 'stretch',\n  alignItems: 'stretch',\n  flexBasis: 'auto',\n  flexDirection: 'row',\n  flexShrink: 1,\n  flexWrap: 'nowrap',\n  justifyContent: 'flex-start',\n}\n"
  ]
}