{
  "mappings": "AAAA,cAAc,gBAAyB;AAoCvC,OAAO,cAAM,QAAQ,SAAS,eAAe;AA2I7C,OAAO,cAAM",
  "names": [],
  "sources": [
    "src/tables/events.ts"
  ],
  "version": 3,
  "sourcesContent": [
    "import type { EventRow, TagName } from './types'\n\n/**\n * The event table: every event prop in the Tamagui DOM contract.\n *\n * Capture-phase props are deliberately absent. React Strict DOM excludes them\n * from the strict surface and DOM mode follows: a capture listener needs the\n * event target api on the platforms that have one.\n *\n * `payload` names the handler argument type the prop-interface generator emits.\n * `unknown` marks a pass-through handler whose event shape differs per platform,\n * so nothing may be promised about it cross-platform.\n */\n\nconst TEXT_ENTRY: readonly TagName[] = ['input', 'textarea']\nconst FORM_CONTROLS: readonly TagName[] = ['input', 'select', 'textarea']\n\n/** react native carries these pointer, mouse and scroll events on host views */\nconst nativeHost = (nativeProp: string): EventRow => ({\n  tags: '*',\n  payload: 'unknown',\n  nativeProp,\n  web: 'host',\n  native: 'host',\n})\n\n/** web-only events with no react native equivalent at all */\nconst webOnly = (note: string): EventRow => ({\n  tags: '*',\n  payload: 'unknown',\n  nativeProp: null,\n  web: 'host',\n  native: 'none',\n  note,\n})\n\nexport const EVENTS: Readonly<Record<string, EventRow>> = {\n  // pointer and touch\n  onPointerCancel: nativeHost('onPointerCancel'),\n  onPointerDown: nativeHost('onPointerDown'),\n  onPointerEnter: nativeHost('onPointerEnter'),\n  onPointerLeave: nativeHost('onPointerLeave'),\n  onPointerMove: nativeHost('onPointerMove'),\n  onPointerOut: nativeHost('onPointerOut'),\n  onPointerOver: nativeHost('onPointerOver'),\n  onPointerUp: nativeHost('onPointerUp'),\n  onGotPointerCapture: nativeHost('onGotPointerCapture'),\n  onLostPointerCapture: nativeHost('onLostPointerCapture'),\n  onTouchCancel: nativeHost('onTouchCancel'),\n  onTouchEnd: nativeHost('onTouchEnd'),\n  onTouchMove: nativeHost('onTouchMove'),\n  onTouchStart: nativeHost('onTouchStart'),\n\n  // press\n  onClick: {\n    tags: '*',\n    payload: 'DOMClickEvent',\n    nativeProp: 'onPress',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native builds the click payload from the press event; preventDefault and stopPropagation are no-ops because there is nothing to cancel',\n  },\n  onAuxClick: webOnly('native has no secondary pointer button'),\n  onContextMenu: webOnly('native has no context menu event; use a long press'),\n\n  // focus\n  onBlur: {\n    tags: '*',\n    payload: 'unknown',\n    nativeProp: 'onBlur',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native focus events only fire on elements that can hold focus, which is text entry and pressable elements',\n  },\n  onFocus: {\n    tags: '*',\n    payload: 'unknown',\n    nativeProp: 'onFocus',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native focus events only fire on elements that can hold focus, which is text entry and pressable elements',\n  },\n  onFocusIn: webOnly('native has no bubbling focus event; use onFocus'),\n  onFocusOut: webOnly('native has no bubbling blur event; use onBlur'),\n\n  // keyboard\n  onKeyDown: {\n    tags: '*',\n    payload: 'DOMKeyEvent',\n    nativeProp: 'onKeyPress',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native only reports key presses inside a text-entry control, and reports the submit key as Enter',\n  },\n  onKeyUp: webOnly('react native reports key presses, not key releases'),\n\n  // clipboard\n  onCopy: webOnly('native has no clipboard events'),\n  onCut: webOnly('native has no clipboard events'),\n  onPaste: webOnly('native has no clipboard events'),\n\n  // document and viewport\n  onFullscreenChange: webOnly('fullscreen is a browser api'),\n  onFullscreenError: webOnly('fullscreen is a browser api'),\n  onScroll: nativeHost('onScroll'),\n  onWheel: webOnly('native has no wheel input'),\n\n  // React Native desktop carries the mouse subset that React Strict DOM forwards.\n  onMouseDown: nativeHost('onMouseDown'),\n  onMouseEnter: nativeHost('onMouseEnter'),\n  onMouseLeave: nativeHost('onMouseLeave'),\n  onMouseMove: webOnly('use onPointerMove for cross-platform pointer input'),\n  onMouseOut: nativeHost('onMouseOut'),\n  onMouseOver: nativeHost('onMouseOver'),\n  onMouseUp: nativeHost('onMouseUp'),\n\n  // image\n  onError: {\n    tags: ['img'],\n    payload: 'DOMImageErrorEvent',\n    nativeProp: 'onError',\n    web: 'host',\n    native: 'polyfill',\n  },\n  onLoad: {\n    tags: ['img'],\n    payload: 'DOMImageLoadEvent',\n    nativeProp: 'onLoad',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native reports naturalWidth and naturalHeight from the decoded source',\n  },\n\n  // form controls\n  onChange: {\n    tags: FORM_CONTROLS,\n    payload: 'DOMChangeEvent',\n    nativeProp: 'onChange',\n    web: 'host',\n    native: 'polyfill',\n    note: 'native fires on every keystroke like onInput, because there is no commit-on-blur change event',\n  },\n  onInput: {\n    tags: FORM_CONTROLS,\n    payload: 'DOMInputEvent',\n    nativeProp: 'onChange',\n    web: 'host',\n    native: 'polyfill',\n  },\n  onBeforeInput: {\n    tags: FORM_CONTROLS,\n    payload: 'unknown',\n    nativeProp: null,\n    web: 'host',\n    native: 'none',\n    note: 'native text entry reports changes only after they are applied',\n  },\n  onInvalid: {\n    tags: FORM_CONTROLS,\n    payload: 'unknown',\n    nativeProp: null,\n    web: 'host',\n    native: 'none',\n    note: 'native has no form validation',\n  },\n  onSelect: {\n    tags: FORM_CONTROLS,\n    payload: 'unknown',\n    nativeProp: null,\n    web: 'host',\n    native: 'none',\n    note: 'read the selection through the element ref instead',\n  },\n}\n\nexport const EVENT_NAMES: readonly string[] = Object.keys(EVENTS)\n"
  ]
}