@ankhorage/surface 4.2.0 → 4.3.0

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.
Files changed (623) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/field/Field.js +1 -1
  3. package/dist/components/field/Field.js.map +1 -1
  4. package/dist/components/helper-text/HelperText.js +1 -1
  5. package/dist/components/helper-text/HelperText.js.map +1 -1
  6. package/dist/components/label/Label.js +1 -1
  7. package/dist/components/label/Label.js.map +1 -1
  8. package/dist/components/list-item/ListItem.js +2 -2
  9. package/dist/components/list-item/ListItem.js.map +1 -1
  10. package/dist/components/menu/Menu.d.ts.map +1 -1
  11. package/dist/components/menu/Menu.js +4 -2
  12. package/dist/components/menu/Menu.js.map +1 -1
  13. package/dist/components/modal/Modal.d.ts.map +1 -1
  14. package/dist/components/modal/Modal.js +2 -1
  15. package/dist/components/modal/Modal.js.map +1 -1
  16. package/dist/components/switch/Switch.js +2 -2
  17. package/dist/components/switch/Switch.js.map +1 -1
  18. package/dist/components/tabs/Tab.js +2 -2
  19. package/dist/components/tabs/Tab.js.map +1 -1
  20. package/dist/components/tabs/TabList.js +1 -1
  21. package/dist/components/tabs/TabList.js.map +1 -1
  22. package/dist/components/tabs/Tabs.js +1 -1
  23. package/dist/components/tabs/Tabs.js.map +1 -1
  24. package/dist/components/textarea/Textarea.js +1 -1
  25. package/dist/components/textarea/Textarea.js.map +1 -1
  26. package/dist/components/textarea/types.d.ts +1 -1
  27. package/dist/components/textarea/types.d.ts.map +1 -1
  28. package/dist/components/textarea/types.js.map +1 -1
  29. package/dist/components/toast/Toast.d.ts.map +1 -1
  30. package/dist/components/toast/Toast.js +4 -2
  31. package/dist/components/toast/Toast.js.map +1 -1
  32. package/dist/components/toast/ToastProvider.js +1 -1
  33. package/dist/components/toast/ToastProvider.js.map +1 -1
  34. package/dist/components/tooltip/Tooltip.js +2 -2
  35. package/dist/components/tooltip/Tooltip.js.map +1 -1
  36. package/dist/examples/DocsExamples.js +6 -6
  37. package/dist/examples/DocsExamples.js.map +1 -1
  38. package/dist/features/accordion/adapters/inbound/Accordion.d.ts +5 -0
  39. package/dist/features/accordion/adapters/inbound/Accordion.d.ts.map +1 -0
  40. package/dist/features/accordion/adapters/inbound/Accordion.js +46 -0
  41. package/dist/features/accordion/adapters/inbound/Accordion.js.map +1 -0
  42. package/dist/features/accordion/adapters/inbound/AccordionContent.d.ts +5 -0
  43. package/dist/features/accordion/adapters/inbound/AccordionContent.d.ts.map +1 -0
  44. package/dist/features/accordion/adapters/inbound/AccordionContent.js +16 -0
  45. package/dist/features/accordion/adapters/inbound/AccordionContent.js.map +1 -0
  46. package/dist/features/accordion/adapters/inbound/AccordionContext.d.ts +4 -0
  47. package/dist/features/accordion/adapters/inbound/AccordionContext.d.ts.map +1 -0
  48. package/dist/features/accordion/adapters/inbound/AccordionContext.js +3 -0
  49. package/dist/features/accordion/adapters/inbound/AccordionContext.js.map +1 -0
  50. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts +5 -0
  51. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts.map +1 -0
  52. package/dist/features/accordion/adapters/inbound/AccordionItem.js +28 -0
  53. package/dist/features/accordion/adapters/inbound/AccordionItem.js.map +1 -0
  54. package/dist/features/accordion/adapters/inbound/AccordionItemContext.d.ts +4 -0
  55. package/dist/features/accordion/adapters/inbound/AccordionItemContext.d.ts.map +1 -0
  56. package/dist/features/accordion/adapters/inbound/AccordionItemContext.js +3 -0
  57. package/dist/features/accordion/adapters/inbound/AccordionItemContext.js.map +1 -0
  58. package/dist/features/accordion/adapters/inbound/AccordionTrigger.d.ts +5 -0
  59. package/dist/features/accordion/adapters/inbound/AccordionTrigger.d.ts.map +1 -0
  60. package/dist/features/accordion/adapters/inbound/AccordionTrigger.js +17 -0
  61. package/dist/features/accordion/adapters/inbound/AccordionTrigger.js.map +1 -0
  62. package/dist/features/accordion/public.d.ts +6 -0
  63. package/dist/features/accordion/public.d.ts.map +1 -0
  64. package/dist/features/accordion/public.js +5 -0
  65. package/dist/features/accordion/public.js.map +1 -0
  66. package/dist/features/accordion/utils/resolveAccordionToggle.d.ts +11 -0
  67. package/dist/features/accordion/utils/resolveAccordionToggle.d.ts.map +1 -0
  68. package/dist/features/accordion/utils/resolveAccordionToggle.js +13 -0
  69. package/dist/features/accordion/utils/resolveAccordionToggle.js.map +1 -0
  70. package/dist/features/badge/adapters/inbound/Badge.d.ts +5 -0
  71. package/dist/features/badge/adapters/inbound/Badge.d.ts.map +1 -0
  72. package/dist/features/badge/adapters/inbound/Badge.js +30 -0
  73. package/dist/features/badge/adapters/inbound/Badge.js.map +1 -0
  74. package/dist/features/badge/public.d.ts +3 -0
  75. package/dist/features/badge/public.d.ts.map +1 -0
  76. package/dist/features/badge/public.js +2 -0
  77. package/dist/features/badge/public.js.map +1 -0
  78. package/dist/{components/button → features/button/adapters/inbound}/Button.d.ts +2 -1
  79. package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -0
  80. package/dist/features/button/adapters/inbound/Button.js +60 -0
  81. package/dist/features/button/adapters/inbound/Button.js.map +1 -0
  82. package/dist/{components/icon-button → features/button/adapters/inbound}/IconButton.d.ts +2 -1
  83. package/dist/features/button/adapters/inbound/IconButton.d.ts.map +1 -0
  84. package/dist/features/button/adapters/inbound/IconButton.js +33 -0
  85. package/dist/features/button/adapters/inbound/IconButton.js.map +1 -0
  86. package/dist/features/button/public.d.ts +4 -0
  87. package/dist/features/button/public.d.ts.map +1 -0
  88. package/dist/features/button/public.js +3 -0
  89. package/dist/features/button/public.js.map +1 -0
  90. package/dist/features/card/adapters/inbound/Card.d.ts +5 -0
  91. package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -0
  92. package/dist/features/card/adapters/inbound/Card.js +44 -0
  93. package/dist/features/card/adapters/inbound/Card.js.map +1 -0
  94. package/dist/features/card/public.d.ts +3 -0
  95. package/dist/features/card/public.d.ts.map +1 -0
  96. package/dist/features/card/public.js +2 -0
  97. package/dist/features/card/public.js.map +1 -0
  98. package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts +5 -0
  99. package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts.map +1 -0
  100. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +88 -0
  101. package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -0
  102. package/dist/features/form/checkbox/public.d.ts +3 -0
  103. package/dist/features/form/checkbox/public.d.ts.map +1 -0
  104. package/dist/features/form/checkbox/public.js +2 -0
  105. package/dist/features/form/checkbox/public.js.map +1 -0
  106. package/dist/features/form/radio/adapters/inbound/Radio.d.ts +5 -0
  107. package/dist/features/form/radio/adapters/inbound/Radio.d.ts.map +1 -0
  108. package/dist/features/form/radio/adapters/inbound/Radio.js +91 -0
  109. package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -0
  110. package/dist/features/form/radio/public.d.ts +3 -0
  111. package/dist/features/form/radio/public.d.ts.map +1 -0
  112. package/dist/features/form/radio/public.js +2 -0
  113. package/dist/features/form/radio/public.js.map +1 -0
  114. package/dist/features/form/radio/utils/isRadioTextContent.d.ts +4 -0
  115. package/dist/features/form/radio/utils/isRadioTextContent.d.ts.map +1 -0
  116. package/dist/features/form/radio/utils/isRadioTextContent.js +5 -0
  117. package/dist/features/form/radio/utils/isRadioTextContent.js.map +1 -0
  118. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts +5 -0
  119. package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -0
  120. package/dist/features/form/text-input/adapters/inbound/TextInput.js +41 -0
  121. package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -0
  122. package/dist/features/form/text-input/public.d.ts +3 -0
  123. package/dist/features/form/text-input/public.d.ts.map +1 -0
  124. package/dist/features/form/text-input/public.js +2 -0
  125. package/dist/features/form/text-input/public.js.map +1 -0
  126. package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts +15 -0
  127. package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts.map +1 -0
  128. package/dist/features/form/text-input/utils/resolveTextInputPresentation.js +56 -0
  129. package/dist/features/form/text-input/utils/resolveTextInputPresentation.js.map +1 -0
  130. package/dist/features/icon/adapters/inbound/Icon.d.ts +4 -0
  131. package/dist/features/icon/adapters/inbound/Icon.d.ts.map +1 -0
  132. package/dist/{primitives/icon → features/icon/adapters/inbound}/Icon.js +3 -3
  133. package/dist/features/icon/adapters/inbound/Icon.js.map +1 -0
  134. package/dist/features/icon/adapters/inbound/PortableIcon.d.ts +19 -0
  135. package/dist/features/icon/adapters/inbound/PortableIcon.d.ts.map +1 -0
  136. package/dist/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.js +37 -43
  137. package/dist/features/icon/adapters/inbound/PortableIcon.js.map +1 -0
  138. package/dist/features/icon/constants.d.ts +2 -0
  139. package/dist/features/icon/constants.d.ts.map +1 -0
  140. package/dist/features/icon/constants.js +8 -0
  141. package/dist/features/icon/constants.js.map +1 -0
  142. package/dist/features/icon/public.d.ts +4 -0
  143. package/dist/features/icon/public.d.ts.map +1 -0
  144. package/dist/features/icon/public.js +3 -0
  145. package/dist/features/icon/public.js.map +1 -0
  146. package/dist/{primitives/image → features/image/adapters/inbound}/Image.d.ts +2 -1
  147. package/dist/features/image/adapters/inbound/Image.d.ts.map +1 -0
  148. package/dist/features/image/adapters/inbound/Image.js +28 -0
  149. package/dist/features/image/adapters/inbound/Image.js.map +1 -0
  150. package/dist/features/image/public.d.ts +3 -0
  151. package/dist/features/image/public.d.ts.map +1 -0
  152. package/dist/features/image/public.js +2 -0
  153. package/dist/features/image/public.js.map +1 -0
  154. package/dist/features/image/utils/getSourceKey.d.ts +4 -0
  155. package/dist/features/image/utils/getSourceKey.d.ts.map +1 -0
  156. package/dist/features/image/utils/getSourceKey.js +33 -0
  157. package/dist/features/image/utils/getSourceKey.js.map +1 -0
  158. package/dist/features/image/utils/normalizeSource.d.ts +5 -0
  159. package/dist/features/image/utils/normalizeSource.d.ts.map +1 -0
  160. package/dist/features/image/utils/normalizeSource.js +9 -0
  161. package/dist/features/image/utils/normalizeSource.js.map +1 -0
  162. package/dist/features/image/utils/resolveAccessibilityLabel.d.ts +4 -0
  163. package/dist/features/image/utils/resolveAccessibilityLabel.d.ts.map +1 -0
  164. package/dist/features/image/utils/resolveAccessibilityLabel.js +5 -0
  165. package/dist/features/image/utils/resolveAccessibilityLabel.js.map +1 -0
  166. package/dist/features/image/utils/resolveAlt.d.ts +4 -0
  167. package/dist/features/image/utils/resolveAlt.d.ts.map +1 -0
  168. package/dist/features/image/utils/resolveAlt.js +5 -0
  169. package/dist/features/image/utils/resolveAlt.js.map +1 -0
  170. package/dist/features/image/utils/resolveImageStyle.d.ts +6 -0
  171. package/dist/features/image/utils/resolveImageStyle.d.ts.map +1 -0
  172. package/dist/features/image/utils/resolveImageStyle.js +15 -0
  173. package/dist/features/image/utils/resolveImageStyle.js.map +1 -0
  174. package/dist/features/image/utils/resolveRenderedSource.d.ts +4 -0
  175. package/dist/features/image/utils/resolveRenderedSource.d.ts.map +1 -0
  176. package/dist/features/image/utils/resolveRenderedSource.js +7 -0
  177. package/dist/features/image/utils/resolveRenderedSource.js.map +1 -0
  178. package/dist/features/image/utils/resolveResizeMode.d.ts +5 -0
  179. package/dist/features/image/utils/resolveResizeMode.d.ts.map +1 -0
  180. package/dist/features/image/utils/resolveResizeMode.js +5 -0
  181. package/dist/features/image/utils/resolveResizeMode.js.map +1 -0
  182. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts +5 -0
  183. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts.map +1 -0
  184. package/dist/{layout → features/keyboard-avoiding-view/adapters/inbound}/KeyboardAvoidingView.js +2 -2
  185. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js.map +1 -0
  186. package/dist/features/keyboard-avoiding-view/public.d.ts +3 -0
  187. package/dist/features/keyboard-avoiding-view/public.d.ts.map +1 -0
  188. package/dist/features/keyboard-avoiding-view/public.js +2 -0
  189. package/dist/features/keyboard-avoiding-view/public.js.map +1 -0
  190. package/dist/features/layout/adapters/inbound/Box.d.ts +5 -0
  191. package/dist/features/layout/adapters/inbound/Box.d.ts.map +1 -0
  192. package/dist/{layout → features/layout/adapters/inbound}/Box.js +5 -4
  193. package/dist/features/layout/adapters/inbound/Box.js.map +1 -0
  194. package/dist/features/layout/adapters/inbound/Container.d.ts +5 -0
  195. package/dist/features/layout/adapters/inbound/Container.d.ts.map +1 -0
  196. package/dist/features/layout/adapters/inbound/Container.js +28 -0
  197. package/dist/features/layout/adapters/inbound/Container.js.map +1 -0
  198. package/dist/features/layout/adapters/inbound/Divider.d.ts +5 -0
  199. package/dist/features/layout/adapters/inbound/Divider.d.ts.map +1 -0
  200. package/dist/{layout → features/layout/adapters/inbound}/Divider.js +1 -0
  201. package/dist/features/layout/adapters/inbound/Divider.js.map +1 -0
  202. package/dist/features/layout/adapters/inbound/Grid.d.ts +5 -0
  203. package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -0
  204. package/dist/features/layout/adapters/inbound/Grid.js +48 -0
  205. package/dist/features/layout/adapters/inbound/Grid.js.map +1 -0
  206. package/dist/features/layout/adapters/inbound/Stack.d.ts +5 -0
  207. package/dist/features/layout/adapters/inbound/Stack.d.ts.map +1 -0
  208. package/dist/{layout → features/layout/adapters/inbound}/Stack.js +4 -3
  209. package/dist/features/layout/adapters/inbound/Stack.js.map +1 -0
  210. package/dist/features/layout/public.d.ts +7 -0
  211. package/dist/features/layout/public.d.ts.map +1 -0
  212. package/dist/features/layout/public.js +6 -0
  213. package/dist/features/layout/public.js.map +1 -0
  214. package/dist/features/surface/adapters/inbound/Surface.d.ts +5 -0
  215. package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -0
  216. package/dist/{layout → features/surface/adapters/inbound}/Surface.js +17 -28
  217. package/dist/features/surface/adapters/inbound/Surface.js.map +1 -0
  218. package/dist/features/surface/public.d.ts +3 -0
  219. package/dist/features/surface/public.d.ts.map +1 -0
  220. package/dist/features/surface/public.js +2 -0
  221. package/dist/features/surface/public.js.map +1 -0
  222. package/dist/features/typography/adapters/inbound/Heading.d.ts +5 -0
  223. package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -0
  224. package/dist/features/typography/adapters/inbound/Heading.js +29 -0
  225. package/dist/features/typography/adapters/inbound/Heading.js.map +1 -0
  226. package/dist/{primitives/text → features/typography/adapters/inbound}/Text.d.ts +2 -1
  227. package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -0
  228. package/dist/{primitives/text → features/typography/adapters/inbound}/Text.js +18 -25
  229. package/dist/features/typography/adapters/inbound/Text.js.map +1 -0
  230. package/dist/features/typography/public.d.ts +4 -0
  231. package/dist/features/typography/public.d.ts.map +1 -0
  232. package/dist/features/typography/public.js +3 -0
  233. package/dist/features/typography/public.js.map +1 -0
  234. package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts +7 -0
  235. package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts.map +1 -0
  236. package/dist/features/typography/utils/resolveHeadingTextStyle.js +10 -0
  237. package/dist/features/typography/utils/resolveHeadingTextStyle.js.map +1 -0
  238. package/dist/index.d.ts +26 -22
  239. package/dist/index.d.ts.map +1 -1
  240. package/dist/index.js +13 -11
  241. package/dist/index.js.map +1 -1
  242. package/dist/layout/AppBar.d.ts +1 -1
  243. package/dist/layout/AppBar.d.ts.map +1 -1
  244. package/dist/layout/AppBar.js +1 -2
  245. package/dist/layout/AppBar.js.map +1 -1
  246. package/dist/layout/Center.d.ts +1 -1
  247. package/dist/layout/Center.d.ts.map +1 -1
  248. package/dist/layout/Center.js +1 -1
  249. package/dist/layout/Center.js.map +1 -1
  250. package/dist/layout/Inline.d.ts +1 -1
  251. package/dist/layout/Inline.d.ts.map +1 -1
  252. package/dist/layout/Inline.js +1 -1
  253. package/dist/layout/Inline.js.map +1 -1
  254. package/dist/layout/ScrollArea.d.ts +1 -1
  255. package/dist/layout/ScrollArea.d.ts.map +1 -1
  256. package/dist/layout/ScrollArea.js +1 -1
  257. package/dist/layout/ScrollArea.js.map +1 -1
  258. package/dist/layout/Spacer.d.ts +1 -1
  259. package/dist/layout/Spacer.d.ts.map +1 -1
  260. package/dist/layout/Spacer.js +1 -1
  261. package/dist/layout/Spacer.js.map +1 -1
  262. package/dist/layout/Template.d.ts +2 -2
  263. package/dist/layout/Template.d.ts.map +1 -1
  264. package/dist/layout/Template.js +2 -2
  265. package/dist/layout/Template.js.map +1 -1
  266. package/dist/layout/index.d.ts +0 -14
  267. package/dist/layout/index.d.ts.map +1 -1
  268. package/dist/layout/index.js +0 -7
  269. package/dist/layout/index.js.map +1 -1
  270. package/dist/primitives/button-base/ButtonBase.js +1 -1
  271. package/dist/primitives/button-base/ButtonBase.js.map +1 -1
  272. package/dist/primitives/button-base/types.d.ts +1 -1
  273. package/dist/primitives/button-base/types.d.ts.map +1 -1
  274. package/dist/primitives/button-base/types.js.map +1 -1
  275. package/dist/types/accordion.d.ts +54 -0
  276. package/dist/types/accordion.d.ts.map +1 -0
  277. package/dist/types/accordion.js +2 -0
  278. package/dist/types/accordion.js.map +1 -0
  279. package/dist/types/badge.d.ts +12 -0
  280. package/dist/types/badge.d.ts.map +1 -0
  281. package/dist/types/badge.js +2 -0
  282. package/dist/types/badge.js.map +1 -0
  283. package/dist/types/button.d.ts +25 -0
  284. package/dist/types/button.d.ts.map +1 -0
  285. package/dist/types/button.js +2 -0
  286. package/dist/types/button.js.map +1 -0
  287. package/dist/{components/card/types.d.ts → types/card.d.ts} +2 -2
  288. package/dist/types/card.d.ts.map +1 -0
  289. package/dist/types/card.js +2 -0
  290. package/dist/types/card.js.map +1 -0
  291. package/dist/{components/checkbox/types.d.ts → types/checkbox.d.ts} +4 -4
  292. package/dist/types/checkbox.d.ts.map +1 -0
  293. package/dist/types/checkbox.js +2 -0
  294. package/dist/types/checkbox.js.map +1 -0
  295. package/dist/types/icon.d.ts +66 -0
  296. package/dist/types/icon.d.ts.map +1 -0
  297. package/dist/types/icon.js +2 -0
  298. package/dist/types/icon.js.map +1 -0
  299. package/dist/{primitives/image/types.d.ts → types/image.d.ts} +3 -4
  300. package/dist/types/image.d.ts.map +1 -0
  301. package/dist/types/image.js +2 -0
  302. package/dist/types/image.js.map +1 -0
  303. package/dist/types/keyboard-avoiding-view.d.ts +4 -0
  304. package/dist/types/keyboard-avoiding-view.d.ts.map +1 -0
  305. package/dist/types/keyboard-avoiding-view.js +2 -0
  306. package/dist/types/keyboard-avoiding-view.js.map +1 -0
  307. package/dist/{layout/helpers.d.ts → types/layout.d.ts} +39 -5
  308. package/dist/types/layout.d.ts.map +1 -0
  309. package/dist/types/layout.js +2 -0
  310. package/dist/types/layout.js.map +1 -0
  311. package/dist/{components/radio/types.d.ts → types/radio.d.ts} +4 -4
  312. package/dist/types/radio.d.ts.map +1 -0
  313. package/dist/types/radio.js +2 -0
  314. package/dist/types/radio.js.map +1 -0
  315. package/dist/types/surface.d.ts +6 -0
  316. package/dist/types/surface.d.ts.map +1 -0
  317. package/dist/types/surface.js +2 -0
  318. package/dist/types/surface.js.map +1 -0
  319. package/dist/{components/text-input/types.d.ts → types/text-input.d.ts} +3 -3
  320. package/dist/types/text-input.d.ts.map +1 -0
  321. package/dist/types/text-input.js +2 -0
  322. package/dist/types/text-input.js.map +1 -0
  323. package/dist/types/typography.d.ts +29 -0
  324. package/dist/types/typography.d.ts.map +1 -0
  325. package/dist/types/typography.js +2 -0
  326. package/dist/types/typography.js.map +1 -0
  327. package/dist/utils/resolveBoxStyles.d.ts +7 -0
  328. package/dist/utils/resolveBoxStyles.d.ts.map +1 -0
  329. package/dist/utils/resolveBoxStyles.js +83 -0
  330. package/dist/utils/resolveBoxStyles.js.map +1 -0
  331. package/dist/utils/resolveSpacing.d.ts +5 -0
  332. package/dist/utils/resolveSpacing.d.ts.map +1 -0
  333. package/dist/utils/resolveSpacing.js +6 -0
  334. package/dist/utils/resolveSpacing.js.map +1 -0
  335. package/package.json +1 -1
  336. package/src/components/field/Field.tsx +1 -1
  337. package/src/components/helper-text/HelperText.tsx +1 -1
  338. package/src/components/label/Label.tsx +1 -1
  339. package/src/components/list-item/ListItem.tsx +2 -2
  340. package/src/components/menu/Menu.tsx +4 -2
  341. package/src/components/modal/Modal.tsx +2 -1
  342. package/src/components/switch/Switch.tsx +2 -2
  343. package/src/components/tabs/Tab.tsx +2 -2
  344. package/src/components/tabs/TabList.tsx +1 -1
  345. package/src/components/tabs/Tabs.tsx +1 -1
  346. package/src/components/textarea/Textarea.tsx +1 -1
  347. package/src/components/textarea/types.ts +1 -1
  348. package/src/components/toast/Toast.tsx +4 -2
  349. package/src/components/toast/ToastProvider.tsx +1 -1
  350. package/src/components/tooltip/Tooltip.tsx +2 -2
  351. package/src/examples/DocsExamples.tsx +6 -6
  352. package/src/features/accordion/adapters/inbound/Accordion.tsx +83 -0
  353. package/src/features/accordion/adapters/inbound/AccordionContent.tsx +30 -0
  354. package/src/features/accordion/adapters/inbound/AccordionContext.ts +5 -0
  355. package/src/features/accordion/adapters/inbound/AccordionItem.tsx +42 -0
  356. package/src/features/accordion/adapters/inbound/AccordionItemContext.ts +5 -0
  357. package/src/features/accordion/adapters/inbound/AccordionTrigger.tsx +34 -0
  358. package/src/features/accordion/public.ts +13 -0
  359. package/src/features/accordion/utils/resolveAccordionToggle.test.ts +57 -0
  360. package/src/features/accordion/utils/resolveAccordionToggle.ts +28 -0
  361. package/src/features/badge/adapters/inbound/Badge.tsx +58 -0
  362. package/src/features/badge/public.ts +2 -0
  363. package/src/features/button/adapters/inbound/Button.tsx +159 -0
  364. package/src/features/button/adapters/inbound/IconButton.tsx +69 -0
  365. package/src/features/button/public.ts +3 -0
  366. package/src/features/card/adapters/inbound/Card.tsx +88 -0
  367. package/src/features/card/public.ts +2 -0
  368. package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +207 -0
  369. package/src/features/form/checkbox/public.ts +2 -0
  370. package/src/{components/radio → features/form/radio/adapters/inbound}/Radio.test.ts +5 -5
  371. package/src/features/form/radio/adapters/inbound/Radio.tsx +214 -0
  372. package/src/features/form/radio/public.ts +2 -0
  373. package/src/{components/radio → features/form/radio/utils}/isRadioTextContent.ts +1 -3
  374. package/src/features/form/text-input/adapters/inbound/TextInput.tsx +72 -0
  375. package/src/features/form/text-input/public.ts +2 -0
  376. package/src/features/form/text-input/utils/resolveTextInputPresentation.ts +91 -0
  377. package/src/features/icon/adapters/inbound/Icon.tsx +14 -0
  378. package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.tsx +41 -97
  379. package/src/{primitives/icon → features/icon/adapters/inbound}/PortableIcon.web.test.tsx +6 -10
  380. package/src/features/icon/constants.ts +9 -0
  381. package/src/features/icon/public.ts +10 -0
  382. package/src/features/image/adapters/inbound/Image.tsx +55 -0
  383. package/src/features/image/public.ts +2 -0
  384. package/src/features/image/utils/getSourceKey.ts +32 -0
  385. package/src/features/image/utils/normalizeSource.ts +12 -0
  386. package/src/features/image/utils/resolveAccessibilityLabel.ts +9 -0
  387. package/src/features/image/utils/resolveAlt.ts +9 -0
  388. package/src/{primitives/image → features/image/utils}/resolveImageProps.test.ts +10 -22
  389. package/src/features/image/utils/resolveImageStyle.ts +23 -0
  390. package/src/features/image/utils/resolveRenderedSource.ts +11 -0
  391. package/src/features/image/utils/resolveResizeMode.ts +11 -0
  392. package/src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx +9 -0
  393. package/src/features/keyboard-avoiding-view/public.ts +5 -0
  394. package/src/{layout → features/layout/adapters/inbound}/Box.tsx +7 -15
  395. package/src/features/layout/adapters/inbound/Container.tsx +43 -0
  396. package/src/{layout → features/layout/adapters/inbound}/Divider.tsx +3 -8
  397. package/src/features/layout/adapters/inbound/Grid.tsx +78 -0
  398. package/src/{layout → features/layout/adapters/inbound}/Stack.test.ts +0 -1
  399. package/src/{layout → features/layout/adapters/inbound}/Stack.tsx +6 -15
  400. package/src/features/layout/public.ts +12 -0
  401. package/src/{layout → features/surface/adapters/inbound}/Surface.tsx +24 -41
  402. package/src/features/surface/public.ts +2 -0
  403. package/src/{primitives/heading → features/typography/adapters/inbound}/Heading.tsx +35 -38
  404. package/src/{primitives/text → features/typography/adapters/inbound}/Text.tsx +25 -35
  405. package/src/features/typography/public.ts +3 -0
  406. package/src/{primitives/heading/resolveHeadingStyle.test.ts → features/typography/utils/resolveHeadingTextStyle.test.ts} +5 -12
  407. package/src/features/typography/utils/resolveHeadingTextStyle.ts +21 -0
  408. package/src/index.test.ts +58 -28
  409. package/src/index.ts +52 -26
  410. package/src/layout/AppBar.tsx +1 -2
  411. package/src/layout/Center.tsx +1 -1
  412. package/src/layout/Inline.tsx +1 -1
  413. package/src/layout/ScrollArea.tsx +2 -1
  414. package/src/layout/Spacer.tsx +2 -2
  415. package/src/layout/Template.tsx +3 -2
  416. package/src/layout/index.ts +0 -17
  417. package/src/primitives/button-base/ButtonBase.tsx +1 -1
  418. package/src/primitives/button-base/types.ts +1 -1
  419. package/src/types/accordion.ts +69 -0
  420. package/src/{components/badge/types.ts → types/badge.ts} +3 -3
  421. package/src/types/button.ts +34 -0
  422. package/src/{components/card/types.ts → types/card.ts} +1 -1
  423. package/src/{components/checkbox/types.ts → types/checkbox.ts} +3 -3
  424. package/src/types/icon.ts +52 -0
  425. package/src/{primitives/image/types.ts → types/image.ts} +3 -3
  426. package/src/types/keyboard-avoiding-view.ts +6 -0
  427. package/src/types/layout.ts +96 -0
  428. package/src/{components/radio/types.ts → types/radio.ts} +3 -3
  429. package/src/types/surface.ts +7 -0
  430. package/src/{components/text-input/types.ts → types/text-input.ts} +2 -2
  431. package/src/types/typography.ts +32 -0
  432. package/src/{layout/helpers.test.ts → utils/resolveBoxStyles.test.ts} +8 -25
  433. package/src/utils/resolveBoxStyles.ts +135 -0
  434. package/src/utils/resolveSpacing.ts +11 -0
  435. package/src/webAcceptance.test.tsx +2 -3
  436. package/dist/components/badge/Badge.d.ts +0 -4
  437. package/dist/components/badge/Badge.d.ts.map +0 -1
  438. package/dist/components/badge/Badge.js +0 -30
  439. package/dist/components/badge/Badge.js.map +0 -1
  440. package/dist/components/badge/index.d.ts +0 -3
  441. package/dist/components/badge/index.d.ts.map +0 -1
  442. package/dist/components/badge/index.js +0 -2
  443. package/dist/components/badge/index.js.map +0 -1
  444. package/dist/components/badge/types.d.ts +0 -12
  445. package/dist/components/badge/types.d.ts.map +0 -1
  446. package/dist/components/badge/types.js +0 -2
  447. package/dist/components/badge/types.js.map +0 -1
  448. package/dist/components/button/Button.d.ts.map +0 -1
  449. package/dist/components/button/Button.js +0 -51
  450. package/dist/components/button/Button.js.map +0 -1
  451. package/dist/components/button/index.d.ts +0 -3
  452. package/dist/components/button/index.d.ts.map +0 -1
  453. package/dist/components/button/index.js +0 -2
  454. package/dist/components/button/index.js.map +0 -1
  455. package/dist/components/button/types.d.ts +0 -18
  456. package/dist/components/button/types.d.ts.map +0 -1
  457. package/dist/components/button/types.js +0 -2
  458. package/dist/components/button/types.js.map +0 -1
  459. package/dist/components/card/Card.d.ts +0 -4
  460. package/dist/components/card/Card.d.ts.map +0 -1
  461. package/dist/components/card/Card.js +0 -46
  462. package/dist/components/card/Card.js.map +0 -1
  463. package/dist/components/card/index.d.ts +0 -3
  464. package/dist/components/card/index.d.ts.map +0 -1
  465. package/dist/components/card/index.js +0 -2
  466. package/dist/components/card/index.js.map +0 -1
  467. package/dist/components/card/types.d.ts.map +0 -1
  468. package/dist/components/card/types.js +0 -2
  469. package/dist/components/card/types.js.map +0 -1
  470. package/dist/components/checkbox/Checkbox.d.ts +0 -4
  471. package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
  472. package/dist/components/checkbox/Checkbox.js +0 -69
  473. package/dist/components/checkbox/Checkbox.js.map +0 -1
  474. package/dist/components/checkbox/index.d.ts +0 -3
  475. package/dist/components/checkbox/index.d.ts.map +0 -1
  476. package/dist/components/checkbox/index.js +0 -2
  477. package/dist/components/checkbox/index.js.map +0 -1
  478. package/dist/components/checkbox/types.d.ts.map +0 -1
  479. package/dist/components/checkbox/types.js +0 -2
  480. package/dist/components/checkbox/types.js.map +0 -1
  481. package/dist/components/icon-button/IconButton.d.ts.map +0 -1
  482. package/dist/components/icon-button/IconButton.js +0 -28
  483. package/dist/components/icon-button/IconButton.js.map +0 -1
  484. package/dist/components/icon-button/index.d.ts +0 -3
  485. package/dist/components/icon-button/index.d.ts.map +0 -1
  486. package/dist/components/icon-button/index.js +0 -2
  487. package/dist/components/icon-button/index.js.map +0 -1
  488. package/dist/components/icon-button/types.d.ts +0 -13
  489. package/dist/components/icon-button/types.d.ts.map +0 -1
  490. package/dist/components/icon-button/types.js +0 -2
  491. package/dist/components/icon-button/types.js.map +0 -1
  492. package/dist/components/radio/Radio.d.ts +0 -7
  493. package/dist/components/radio/Radio.d.ts.map +0 -1
  494. package/dist/components/radio/Radio.js +0 -75
  495. package/dist/components/radio/Radio.js.map +0 -1
  496. package/dist/components/radio/index.d.ts +0 -3
  497. package/dist/components/radio/index.d.ts.map +0 -1
  498. package/dist/components/radio/index.js +0 -2
  499. package/dist/components/radio/index.js.map +0 -1
  500. package/dist/components/radio/isRadioTextContent.d.ts +0 -6
  501. package/dist/components/radio/isRadioTextContent.d.ts.map +0 -1
  502. package/dist/components/radio/isRadioTextContent.js +0 -7
  503. package/dist/components/radio/isRadioTextContent.js.map +0 -1
  504. package/dist/components/radio/types.d.ts.map +0 -1
  505. package/dist/components/radio/types.js +0 -2
  506. package/dist/components/radio/types.js.map +0 -1
  507. package/dist/components/text-input/TextInput.d.ts +0 -4
  508. package/dist/components/text-input/TextInput.d.ts.map +0 -1
  509. package/dist/components/text-input/TextInput.js +0 -72
  510. package/dist/components/text-input/TextInput.js.map +0 -1
  511. package/dist/components/text-input/index.d.ts +0 -3
  512. package/dist/components/text-input/index.d.ts.map +0 -1
  513. package/dist/components/text-input/index.js +0 -2
  514. package/dist/components/text-input/index.js.map +0 -1
  515. package/dist/components/text-input/types.d.ts.map +0 -1
  516. package/dist/components/text-input/types.js +0 -2
  517. package/dist/components/text-input/types.js.map +0 -1
  518. package/dist/layout/Box.d.ts +0 -14
  519. package/dist/layout/Box.d.ts.map +0 -1
  520. package/dist/layout/Box.js.map +0 -1
  521. package/dist/layout/Container.d.ts +0 -11
  522. package/dist/layout/Container.d.ts.map +0 -1
  523. package/dist/layout/Container.js +0 -24
  524. package/dist/layout/Container.js.map +0 -1
  525. package/dist/layout/Divider.d.ts +0 -10
  526. package/dist/layout/Divider.d.ts.map +0 -1
  527. package/dist/layout/Divider.js.map +0 -1
  528. package/dist/layout/Grid.d.ts +0 -14
  529. package/dist/layout/Grid.d.ts.map +0 -1
  530. package/dist/layout/Grid.js +0 -51
  531. package/dist/layout/Grid.js.map +0 -1
  532. package/dist/layout/KeyboardAvoidingView.d.ts +0 -7
  533. package/dist/layout/KeyboardAvoidingView.d.ts.map +0 -1
  534. package/dist/layout/KeyboardAvoidingView.js.map +0 -1
  535. package/dist/layout/Stack.d.ts +0 -14
  536. package/dist/layout/Stack.d.ts.map +0 -1
  537. package/dist/layout/Stack.js.map +0 -1
  538. package/dist/layout/Surface.d.ts +0 -8
  539. package/dist/layout/Surface.d.ts.map +0 -1
  540. package/dist/layout/Surface.js.map +0 -1
  541. package/dist/layout/helpers.d.ts.map +0 -1
  542. package/dist/layout/helpers.js +0 -91
  543. package/dist/layout/helpers.js.map +0 -1
  544. package/dist/primitives/heading/Heading.d.ts +0 -4
  545. package/dist/primitives/heading/Heading.d.ts.map +0 -1
  546. package/dist/primitives/heading/Heading.js +0 -30
  547. package/dist/primitives/heading/Heading.js.map +0 -1
  548. package/dist/primitives/heading/index.d.ts +0 -3
  549. package/dist/primitives/heading/index.d.ts.map +0 -1
  550. package/dist/primitives/heading/index.js +0 -2
  551. package/dist/primitives/heading/index.js.map +0 -1
  552. package/dist/primitives/heading/resolveHeadingStyle.d.ts +0 -6
  553. package/dist/primitives/heading/resolveHeadingStyle.d.ts.map +0 -1
  554. package/dist/primitives/heading/resolveHeadingStyle.js +0 -9
  555. package/dist/primitives/heading/resolveHeadingStyle.js.map +0 -1
  556. package/dist/primitives/heading/types.d.ts +0 -15
  557. package/dist/primitives/heading/types.d.ts.map +0 -1
  558. package/dist/primitives/heading/types.js +0 -2
  559. package/dist/primitives/heading/types.js.map +0 -1
  560. package/dist/primitives/icon/Icon.d.ts +0 -16
  561. package/dist/primitives/icon/Icon.d.ts.map +0 -1
  562. package/dist/primitives/icon/Icon.js.map +0 -1
  563. package/dist/primitives/icon/PortableIcon.d.ts +0 -70
  564. package/dist/primitives/icon/PortableIcon.d.ts.map +0 -1
  565. package/dist/primitives/icon/PortableIcon.js.map +0 -1
  566. package/dist/primitives/icon/index.d.ts +0 -4
  567. package/dist/primitives/icon/index.d.ts.map +0 -1
  568. package/dist/primitives/icon/index.js +0 -3
  569. package/dist/primitives/icon/index.js.map +0 -1
  570. package/dist/primitives/image/Image.d.ts.map +0 -1
  571. package/dist/primitives/image/Image.js +0 -26
  572. package/dist/primitives/image/Image.js.map +0 -1
  573. package/dist/primitives/image/index.d.ts +0 -3
  574. package/dist/primitives/image/index.d.ts.map +0 -1
  575. package/dist/primitives/image/index.js +0 -2
  576. package/dist/primitives/image/index.js.map +0 -1
  577. package/dist/primitives/image/resolveImageProps.d.ts +0 -12
  578. package/dist/primitives/image/resolveImageProps.d.ts.map +0 -1
  579. package/dist/primitives/image/resolveImageProps.js +0 -67
  580. package/dist/primitives/image/resolveImageProps.js.map +0 -1
  581. package/dist/primitives/image/types.d.ts.map +0 -1
  582. package/dist/primitives/image/types.js +0 -2
  583. package/dist/primitives/image/types.js.map +0 -1
  584. package/dist/primitives/text/Text.d.ts.map +0 -1
  585. package/dist/primitives/text/Text.js.map +0 -1
  586. package/dist/primitives/text/index.d.ts +0 -3
  587. package/dist/primitives/text/index.d.ts.map +0 -1
  588. package/dist/primitives/text/index.js +0 -2
  589. package/dist/primitives/text/index.js.map +0 -1
  590. package/dist/primitives/text/types.d.ts +0 -17
  591. package/dist/primitives/text/types.d.ts.map +0 -1
  592. package/dist/primitives/text/types.js +0 -2
  593. package/dist/primitives/text/types.js.map +0 -1
  594. package/src/components/badge/Badge.tsx +0 -52
  595. package/src/components/badge/index.ts +0 -2
  596. package/src/components/button/Button.tsx +0 -98
  597. package/src/components/button/index.ts +0 -2
  598. package/src/components/button/types.ts +0 -23
  599. package/src/components/card/Card.tsx +0 -81
  600. package/src/components/card/index.ts +0 -2
  601. package/src/components/checkbox/Checkbox.tsx +0 -120
  602. package/src/components/checkbox/index.ts +0 -2
  603. package/src/components/icon-button/IconButton.tsx +0 -55
  604. package/src/components/icon-button/index.ts +0 -2
  605. package/src/components/icon-button/types.ts +0 -16
  606. package/src/components/radio/Radio.tsx +0 -124
  607. package/src/components/radio/index.ts +0 -2
  608. package/src/components/text-input/TextInput.tsx +0 -124
  609. package/src/components/text-input/index.ts +0 -2
  610. package/src/layout/Container.tsx +0 -43
  611. package/src/layout/Grid.tsx +0 -83
  612. package/src/layout/KeyboardAvoidingView.tsx +0 -16
  613. package/src/layout/helpers.ts +0 -205
  614. package/src/primitives/heading/index.ts +0 -2
  615. package/src/primitives/heading/resolveHeadingStyle.ts +0 -20
  616. package/src/primitives/heading/types.ts +0 -17
  617. package/src/primitives/icon/Icon.tsx +0 -34
  618. package/src/primitives/icon/index.ts +0 -10
  619. package/src/primitives/image/Image.tsx +0 -65
  620. package/src/primitives/image/index.ts +0 -2
  621. package/src/primitives/image/resolveImageProps.ts +0 -92
  622. package/src/primitives/text/index.ts +0 -2
  623. package/src/primitives/text/types.ts +0 -18
@@ -0,0 +1,56 @@
1
+ import { resolveControlSize, resolveFieldState, resolveInputColors, resolveTextStyles, } from '../../../../internal/resolvers';
2
+ /*** Resolves layout, colors, and editability for one TextInput state. */
3
+ export function resolveTextInputPresentation(theme, props, focused) {
4
+ const controlSize = resolveControlSize(theme, props.size ?? 'm');
5
+ const disabled = props.disabled ?? false;
6
+ const readOnly = props.readOnly ?? false;
7
+ const fieldState = resolveFieldState({
8
+ disabled,
9
+ focused,
10
+ invalid: props.invalid ?? false,
11
+ readOnly,
12
+ });
13
+ const colors = resolveInputColors(theme, fieldState);
14
+ const textStyle = resolveTextStyles(theme, { variant: controlSize.textVariant });
15
+ const heights = resolveTextInputHeights(controlSize, props.multiline, props.numberOfLines, textStyle.lineHeight);
16
+ return {
17
+ accessorySpacing: theme.spacing.s,
18
+ containerStyle: {
19
+ alignItems: props.multiline ? 'flex-start' : 'center',
20
+ backgroundColor: colors.backgroundColor,
21
+ borderColor: colors.borderColor,
22
+ borderRadius: controlSize.borderRadius,
23
+ borderWidth: 1,
24
+ flexDirection: 'row',
25
+ minHeight: heights.container,
26
+ opacity: colors.opacity,
27
+ paddingHorizontal: controlSize.paddingHorizontal,
28
+ paddingVertical: controlSize.paddingVertical,
29
+ },
30
+ editable: props.interactionPolicy === 'passive' ? false : !disabled && !readOnly,
31
+ inputStyle: {
32
+ color: colors.contentColor,
33
+ flex: 1,
34
+ minHeight: heights.input,
35
+ padding: 0,
36
+ textAlignVertical: props.multiline ? 'top' : 'center',
37
+ },
38
+ numberOfLines: props.multiline ? props.numberOfLines : 1,
39
+ placeholderColor: colors.placeholderColor,
40
+ };
41
+ }
42
+ /*** Resolves input and container heights from control typography and multiline state. */
43
+ function resolveTextInputHeights(controlSize, multiline, numberOfLines, lineHeight) {
44
+ const resolvedLineHeight = typeof lineHeight === 'number'
45
+ ? lineHeight
46
+ : controlSize.minHeight - controlSize.paddingVertical * 2;
47
+ const lineCount = Math.max(numberOfLines ?? 1, 1);
48
+ const input = multiline
49
+ ? resolvedLineHeight * lineCount
50
+ : controlSize.minHeight - controlSize.paddingVertical * 2;
51
+ return {
52
+ input,
53
+ container: multiline ? input + controlSize.paddingVertical * 2 : controlSize.minHeight,
54
+ };
55
+ }
56
+ //# sourceMappingURL=resolveTextInputPresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTextInputPresentation.js","sourceRoot":"","sources":["../../../../../src/features/form/text-input/utils/resolveTextInputPresentation.ts"],"names":[],"mapp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F,CAAC;AACJ,CAAC","sourcesContent":["import type { TextStyle, ViewStyle } from 'react-native';\n\nimport {\n resolveControlSize,\n resolveFieldState,\n resolveInputColors,\n resolveTextStyles,\n} from '../../../../internal/resolvers';\nimport type { SurfaceTheme } from '../../../../theme/types';\nimport type { TextInputProps } from '../../../../types/text-input';\n\n/*** Resolves layout, colors, and editability for one TextInput state. */\nexport function resolveTextInputPresentation(\n theme: SurfaceTheme,\n props: TextInputProps,\n focused: boolean,\n): TextInputPresentation {\n const controlSize = resolveControlSize(theme, props.size ?? 'm');\n const disabled = props.disabled ?? false;\n const readOnly = props.readOnly ?? false;\n const fieldState = resolveFieldState({\n disabled,\n focused,\n invalid: props.invalid ?? false,\n readOnly,\n });\n const colors = resolveInputColors(theme, fieldState);\n const textStyle = resolveTextStyles(theme, { variant: controlSize.textVariant });\n const heights = resolveTextInputHeights(\n controlSize,\n props.multiline,\n props.numberOfLines,\n textStyle.lineHeight,\n );\n\n return {\n accessorySpacing: theme.spacing.s,\n containerStyle: {\n alignItems: props.multiline ? 'flex-start' : 'center',\n backgroundColor: colors.backgroundColor,\n borderColor: colors.borderColor,\n borderRadius: controlSize.borderRadius,\n borderWidth: 1,\n flexDirection: 'row',\n minHeight: heights.container,\n opacity: colors.opacity,\n paddingHorizontal: controlSize.paddingHorizontal,\n paddingVertical: controlSize.paddingVertical,\n },\n editable: props.interactionPolicy === 'passive' ? false : !disabled && !readOnly,\n inputStyle: {\n color: colors.contentColor,\n flex: 1,\n minHeight: heights.input,\n padding: 0,\n textAlignVertical: props.multiline ? 'top' : 'center',\n },\n numberOfLines: props.multiline ? props.numberOfLines : 1,\n placeholderColor: colors.placeholderColor,\n };\n}\n\n/*** Resolves input and container heights from control typography and multiline state. */\nfunction resolveTextInputHeights(\n controlSize: ReturnType<typeof resolveControlSize>,\n multiline: boolean | undefined,\n numberOfLines: number | undefined,\n lineHeight: TextStyle['lineHeight'],\n) {\n const resolvedLineHeight =\n typeof lineHeight === 'number'\n ? lineHeight\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n const lineCount = Math.max(numberOfLines ?? 1, 1);\n const input = multiline\n ? resolvedLineHeight * lineCount\n : controlSize.minHeight - controlSize.paddingVertical * 2;\n return {\n input,\n container: multiline ? input + controlSize.paddingVertical * 2 : controlSize.minHeight,\n };\n}\n\ninterface TextInputPresentation {\n accessorySpacing: number;\n containerStyle: ViewStyle;\n editable: boolean;\n inputStyle: TextStyle;\n numberOfLines: number | undefined;\n placeholderColor: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { IconProps } from '../../../../types/icon';
2
+ /*** Renders a theme-aware font or SVG icon through the portable icon adapter. */
3
+ export declare function Icon(props: IconProps): import("react").JSX.Element;
4
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../src/features/icon/adapters/inbound/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,iFAAiF;AACjF,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAOpC"}
@@ -1,7 +1,7 @@
1
- import {} from 'react-native';
2
- import { resolveToken } from '../../theme/resolveToken';
3
- import { useTheme } from '../../theme/ThemeContext';
1
+ import { resolveToken } from '../../../../theme/resolveToken';
2
+ import { useTheme } from '../../../../theme/ThemeContext';
4
3
  import { PortableIcon } from './PortableIcon';
4
+ /*** Renders a theme-aware font or SVG icon through the portable icon adapter. */
5
5
  export function Icon(props) {
6
6
  const { theme } = useTheme();
7
7
  const size = props.size ?? 'm';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../../src/features/icon/adapters/inbound/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,iFAAiF;AACjF,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC;IACpC,MAAM,YAAY,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzF,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACxD,OAAO,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,EAAG,CAAC;AAC/E,CAAC","sourcesContent":["import { resolveToken } from '../../../../theme/resolveToken';\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { IconProps } from '../../../../types/icon';\nimport { PortableIcon } from './PortableIcon';\n\n/*** Renders a theme-aware font or SVG icon through the portable icon adapter. */\nexport function Icon(props: IconProps) {\n const { theme } = useTheme();\n const size = props.size ?? 'm';\n const color = props.color ?? 'text';\n const resolvedSize = typeof size === 'number' ? size : resolveToken(theme.spacing, size);\n const resolvedColor = resolveToken(theme.colors, color);\n return <PortableIcon {...props} color={resolvedColor} size={resolvedSize} />;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ import type { FontIconSource, SvgIconSource } from '../../../../types/icon';
4
+ /*** Renders a resolved portable icon using the configured font or SVG runtime. */
5
+ export declare function PortableIcon(props: PortableIconProps): React.JSX.Element;
6
+ interface PortableIconPresentationProps {
7
+ color: string;
8
+ size: number;
9
+ testID?: string;
10
+ }
11
+ type FontPortableIconProps = FontIconSource & PortableIconPresentationProps & {
12
+ style?: StyleProp<TextStyle>;
13
+ };
14
+ type SvgPortableIconProps = SvgIconSource & PortableIconPresentationProps & {
15
+ style?: StyleProp<ViewStyle>;
16
+ };
17
+ type PortableIconProps = FontPortableIconProps | SvgPortableIconProps;
18
+ export {};
19
+ //# sourceMappingURL=PortableIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortableIcon.d.ts","sourceRoot":"","sources":["../../../../../src/features/icon/adapters/inbound/PortableIcon.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,cAAc,EAAc,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGxF,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA0BpD;AAED,UAAU,6BAA6B;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,qBAAqB,GAAG,cAAc,GACzC,6BAA6B,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC;AACnE,KAAK,oBAAoB,GAAG,aAAa,GACvC,6BAA6B,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC;AACnE,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC"}
@@ -1,22 +1,40 @@
1
- import { FontAwesome, } from '@react-native-vector-icons/fontawesome/static';
2
- import { FontAwesome5, } from '@react-native-vector-icons/fontawesome5/static';
3
- import { FontAwesome6, } from '@react-native-vector-icons/fontawesome6/static';
1
+ import { FontAwesome } from '@react-native-vector-icons/fontawesome/static';
2
+ import { FontAwesome5 } from '@react-native-vector-icons/fontawesome5/static';
3
+ import { FontAwesome6 } from '@react-native-vector-icons/fontawesome6/static';
4
4
  import { Ionicons } from '@react-native-vector-icons/ionicons/static';
5
- import { MaterialDesignIcons, } from '@react-native-vector-icons/material-design-icons/static';
5
+ import { MaterialDesignIcons } from '@react-native-vector-icons/material-design-icons/static';
6
6
  import React from 'react';
7
7
  import { Image, StyleSheet, View, } from 'react-native';
8
8
  import { SvgUri } from 'react-native-svg';
9
- export const SUPPORTED_ICON_PROVIDERS = [
10
- 'Ionicons',
11
- 'FontAwesome',
12
- 'FontAwesome5',
13
- 'FontAwesome6',
14
- 'MaterialDesignIcons',
15
- ];
16
- const styles = StyleSheet.create({
17
- bundledSvgImage: { height: '100%', width: '100%' },
18
- });
19
- /*** Resolve an SVG URI directly or through React Native's native bundled-asset API when available. */
9
+ /*** Renders a resolved portable icon using the configured font or SVG runtime. */
10
+ export function PortableIcon(props) {
11
+ if ('source' in props)
12
+ return renderSvgIcon(props);
13
+ const { provider } = props;
14
+ const sharedProps = {
15
+ color: props.color,
16
+ size: props.size,
17
+ style: props.style,
18
+ testID: props.testID,
19
+ };
20
+ switch (provider) {
21
+ case undefined:
22
+ case 'Ionicons':
23
+ return <Ionicons {...sharedProps} name={props.name}/>;
24
+ case 'FontAwesome':
25
+ return <FontAwesome {...sharedProps} name={props.name}/>;
26
+ case 'FontAwesome5':
27
+ return renderFontAwesome5(props, sharedProps);
28
+ case 'FontAwesome6':
29
+ return renderFontAwesome6(props, sharedProps);
30
+ case 'MaterialDesignIcons':
31
+ return <MaterialDesignIcons {...sharedProps} name={props.name}/>;
32
+ default:
33
+ return assertNever(provider, 'provider');
34
+ }
35
+ }
36
+ const styles = StyleSheet.create({ bundledSvgImage: { height: '100%', width: '100%' } });
37
+ /*** Resolves an SVG URI directly or through React Native's bundled-asset API. */
20
38
  function resolveSvgIconUri(source) {
21
39
  if (typeof source === 'string')
22
40
  return source;
@@ -27,7 +45,7 @@ function resolveSvgIconUri(source) {
27
45
  return null;
28
46
  return Image.resolveAssetSource(source).uri;
29
47
  }
30
- /*** Render URI-backed SVGs through SvgUri and let React Native Web resolve bundled numeric assets through Image. */
48
+ /*** Renders URI-backed SVGs and bundled SVG image assets. */
31
49
  function renderSvgIcon(props) {
32
50
  const uri = resolveSvgIconUri(props.source);
33
51
  if (uri) {
@@ -38,9 +56,11 @@ function renderSvgIcon(props) {
38
56
  <Image source={imageSource} style={styles.bundledSvgImage} tintColor={props.color}/>
39
57
  </View>);
40
58
  }
59
+ /*** Rejects unsupported icon configuration at runtime. */
41
60
  function assertNever(value, configuration) {
42
61
  throw new Error(`Unsupported icon ${configuration}: ${String(value)}`);
43
62
  }
63
+ /*** Renders one FontAwesome5 variant. */
44
64
  function renderFontAwesome5(props, sharedProps) {
45
65
  const { variant } = props;
46
66
  switch (variant) {
@@ -54,6 +74,7 @@ function renderFontAwesome5(props, sharedProps) {
54
74
  return assertNever(variant, 'FontAwesome5 variant');
55
75
  }
56
76
  }
77
+ /*** Renders one FontAwesome6 variant. */
57
78
  function renderFontAwesome6(props, sharedProps) {
58
79
  const { variant } = props;
59
80
  switch (variant) {
@@ -67,31 +88,4 @@ function renderFontAwesome6(props, sharedProps) {
67
88
  return assertNever(variant, 'FontAwesome6 variant');
68
89
  }
69
90
  }
70
- export function PortableIcon(props) {
71
- if ('source' in props) {
72
- return renderSvgIcon(props);
73
- }
74
- const { provider } = props;
75
- const sharedProps = {
76
- color: props.color,
77
- size: props.size,
78
- style: props.style,
79
- testID: props.testID,
80
- };
81
- switch (provider) {
82
- case undefined:
83
- case 'Ionicons':
84
- return <Ionicons {...sharedProps} name={props.name}/>;
85
- case 'FontAwesome':
86
- return <FontAwesome {...sharedProps} name={props.name}/>;
87
- case 'FontAwesome5':
88
- return renderFontAwesome5(props, sharedProps);
89
- case 'FontAwesome6':
90
- return renderFontAwesome6(props, sharedProps);
91
- case 'MaterialDesignIcons':
92
- return <MaterialDesignIcons {...sharedProps} name={props.name}/>;
93
- default:
94
- return assertNever(provider, 'provider');
95
- }
96
- }
97
91
  //# sourceMappingURL=PortableIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortableIcon.js","sourceRoot":"","sources":["../../../../../src/features/icon/adapters/inbound/PortableIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,EAEL,UAAU,EAEV,IAAI,GAEL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK1C,kFAAkF;AAClF,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,IAAI,QAAQ,IAAI,KAAK;QAAE,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;IAEnD,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,WAAW,GAAG;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;IAEF,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS,CAAC;QACf,KAAK,UAAU;YACb,OAAO,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAG,CAAC;QACzD,KAAK,aAAa;YAChB,OAAO,CAAC,WAAW,CAAC,IA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-vector-icons/fontawesome5/static';\nimport { FontAwesome6 } from '@react-native-vector-icons/fontawesome6/static';\nimport { Ionicons } from '@react-native-vector-icons/ionicons/static';\nimport { MaterialDesignIcons } from '@react-native-vector-icons/material-design-icons/static';\nimport React from 'react';\nimport {\n Image,\n type StyleProp,\n StyleSheet,\n type TextStyle,\n View,\n type ViewStyle,\n} from 'react-native';\nimport { SvgUri } from 'react-native-svg';\n\nimport type { FontIconSource, IconSource, SvgIconSource } from '../../../../types/icon';\nimport type { SurfaceImageSource } from '../../../../types/image';\n\n/*** Renders a resolved portable icon using the configured font or SVG runtime. */\nexport function PortableIcon(props: PortableIconProps) {\n if ('source' in props) return renderSvgIcon(props);\n\n const { provider } = props;\n const sharedProps = {\n color: props.color,\n size: props.size,\n style: props.style,\n testID: props.testID,\n };\n\n switch (provider) {\n case undefined:\n case 'Ionicons':\n return <Ionicons {...sharedProps} name={props.name} />;\n case 'FontAwesome':\n return <FontAwesome {...sharedProps} name={props.name} />;\n case 'FontAwesome5':\n return renderFontAwesome5(props, sharedProps);\n case 'FontAwesome6':\n return renderFontAwesome6(props, sharedProps);\n case 'MaterialDesignIcons':\n return <MaterialDesignIcons {...sharedProps} name={props.name} />;\n default:\n return assertNever(provider, 'provider');\n }\n}\n\ninterface PortableIconPresentationProps {\n color: string;\n size: number;\n testID?: string;\n}\n\ntype FontPortableIconProps = FontIconSource &\n PortableIconPresentationProps & { style?: StyleProp<TextStyle> };\ntype SvgPortableIconProps = SvgIconSource &\n PortableIconPresentationProps & { style?: StyleProp<ViewStyle> };\ntype PortableIconProps = FontPortableIconProps | SvgPortableIconProps;\ntype SharedIconProps = PortableIconPresentationProps & { style?: StyleProp<TextStyle> };\n\nconst styles = StyleSheet.create({ bundledSvgImage: { height: '100%', width: '100%' } });\n\n/*** Resolves an SVG URI directly or through React Native's bundled-asset API. */\nfunction resolveSvgIconUri(source: SurfaceImageSource): string | null {\n if (typeof source === 'string') return source;\n if (!Array.isArray(source) && typeof source === 'object' && typeof source.uri === 'string') {\n return source.uri;\n }\n if (typeof Image.resolveAssetSource !== 'function') return null;\n return Image.resolveAssetSource(source).uri;\n}\n\n/*** Renders URI-backed SVGs and bundled SVG image assets. */\nfunction renderSvgIcon(props: SvgPortableIconProps) {\n const uri = resolveSvgIconUri(props.source);\n if (uri) {\n return (\n <SvgUri\n color={props.color}\n height={props.size}\n style={props.style}\n testID={props.testID}\n uri={uri}\n width={props.size}\n />\n );\n }\n\n const imageSource = typeof props.source === 'string' ? { uri: props.source } : props.source;\n return (\n <View style={[{ height: props.size, width: props.size }, props.style]} testID={props.testID}>\n <Image source={imageSource} style={styles.bundledSvgImage} tintColor={props.color} />\n </View>\n );\n}\n\n/*** Rejects unsupported icon configuration at runtime. */\nfunction assertNever(value: never, configuration: string): never {\n throw new Error(`Unsupported icon ${configuration}: ${String(value)}`);\n}\n\n/*** Renders one FontAwesome5 variant. */\nfunction renderFontAwesome5(\n props: Extract<IconSource, { provider: 'FontAwesome5' }>,\n sharedProps: SharedIconProps,\n) {\n const { variant } = props;\n\n switch (variant) {\n case 'brand':\n return <FontAwesome5 {...sharedProps} iconStyle=\"brand\" name={props.name} />;\n case 'regular':\n return <FontAwesome5 {...sharedProps} iconStyle=\"regular\" name={props.name} />;\n case 'solid':\n return <FontAwesome5 {...sharedProps} iconStyle=\"solid\" name={props.name} />;\n default:\n return assertNever(variant, 'FontAwesome5 variant');\n }\n}\n\n/*** Renders one FontAwesome6 variant. */\nfunction renderFontAwesome6(\n props: Extract<IconSource, { provider: 'FontAwesome6' }>,\n sharedProps: SharedIconProps,\n) {\n const { variant } = props;\n\n switch (variant) {\n case 'brand':\n return <FontAwesome6 {...sharedProps} iconStyle=\"brand\" name={props.name} />;\n case 'regular':\n return <FontAwesome6 {...sharedProps} iconStyle=\"regular\" name={props.name} />;\n case 'solid':\n return <FontAwesome6 {...sharedProps} iconStyle=\"solid\" name={props.name} />;\n default:\n return assertNever(variant, 'FontAwesome6 variant');\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const SUPPORTED_ICON_PROVIDERS: readonly ["Ionicons", "FontAwesome", "FontAwesome5", "FontAwesome6", "MaterialDesignIcons"];
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/features/icon/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,6FAMO,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const SUPPORTED_ICON_PROVIDERS = [
2
+ 'Ionicons',
3
+ 'FontAwesome',
4
+ 'FontAwesome5',
5
+ 'FontAwesome6',
6
+ 'MaterialDesignIcons',
7
+ ];
8
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/features/icon/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU;IACV,aAAa;IACb,cAAc;IACd,cAAc;IACd,qBAAqB;CACqB,CAAC","sourcesContent":["import type { IconProvider } from '../../types/icon';\n\nexport const SUPPORTED_ICON_PROVIDERS = [\n 'Ionicons',\n 'FontAwesome',\n 'FontAwesome5',\n 'FontAwesome6',\n 'MaterialDesignIcons',\n] as const satisfies readonly IconProvider[];\n"]}
@@ -0,0 +1,4 @@
1
+ export type { FontIconSource, IconProps, IconProvider, IconSource, IconVariant, SvgIconSource, } from '../../types/icon';
2
+ export { Icon } from './adapters/inbound/Icon';
3
+ export { SUPPORTED_ICON_PROVIDERS } from './constants';
4
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/icon/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Icon } from './adapters/inbound/Icon';
2
+ export { SUPPORTED_ICON_PROVIDERS } from './constants';
3
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/icon/public.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export type {\n FontIconSource,\n IconProps,\n IconProvider,\n IconSource,\n IconVariant,\n SvgIconSource,\n} from '../../types/icon';\nexport { Icon } from './adapters/inbound/Icon';\nexport { SUPPORTED_ICON_PROVIDERS } from './constants';\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- import type { ImageProps } from './types';
2
+ import type { ImageProps } from '../../../../types/image';
3
+ /*** Renders a token-aware accessible image with optional fallback source. */
3
4
  export declare function Image({ source, fallbackSource, alt, accessibilityLabel, width, height, aspectRatio, fit, resizeMode, radius, style, testID, onError, }: ImageProps): React.JSX.Element | null;
4
5
  //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/features/image/adapters/inbound/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAS1D,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,cAAc,EACd,GAAG,EACH,kBAAkB,EAClB,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,EACH,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE,UAAU,4BA0BZ"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Image as ReactNativeImage } from 'react-native';
3
+ import { useTheme } from '../../../../theme/ThemeContext';
4
+ import { getSourceKey } from '../../utils/getSourceKey';
5
+ import { normalizeSource } from '../../utils/normalizeSource';
6
+ import { resolveAccessibilityLabel } from '../../utils/resolveAccessibilityLabel';
7
+ import { resolveAlt } from '../../utils/resolveAlt';
8
+ import { resolveImageStyle } from '../../utils/resolveImageStyle';
9
+ import { resolveRenderedSource } from '../../utils/resolveRenderedSource';
10
+ import { resolveResizeMode } from '../../utils/resolveResizeMode';
11
+ /*** Renders a token-aware accessible image with optional fallback source. */
12
+ export function Image({ source, fallbackSource, alt, accessibilityLabel, width, height, aspectRatio, fit, resizeMode, radius, style, testID, onError, }) {
13
+ const { theme } = useTheme();
14
+ const primaryKey = React.useMemo(() => getSourceKey(source), [source]);
15
+ const [failedPrimaryKey, setFailedPrimaryKey] = React.useState(null);
16
+ const showFallback = primaryKey !== null && failedPrimaryKey === primaryKey;
17
+ const normalizedPrimary = normalizeSource(source);
18
+ const normalizedFallback = normalizeSource(fallbackSource);
19
+ const resolvedSource = resolveRenderedSource(normalizedPrimary, normalizedFallback, showFallback);
20
+ if (!resolvedSource)
21
+ return null;
22
+ return (<ReactNativeImage accessibilityLabel={resolveAccessibilityLabel(alt, accessibilityLabel)} accessibilityRole="image" alt={resolveAlt(alt, accessibilityLabel)} onError={(event) => {
23
+ onError?.(event);
24
+ if (!showFallback && normalizedFallback)
25
+ setFailedPrimaryKey(primaryKey);
26
+ }} resizeMode={resolveResizeMode(fit, resizeMode)} source={resolvedSource} style={[resolveImageStyle(theme, { width, height, aspectRatio, radius }), style]} testID={testID}/>);
27
+ }
28
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../../src/features/image/adapters/inbound/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM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IAEjC,OAAO,CACL,CAAC,gBAAgB,CACf,kBAAkB,CAAC,CAAC,yBAAyB,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,CACvE,iBAAiB,CAAC,OAAO,CACzB,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC,CACzC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;YACjB,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YACjB,IAAI,CAAC,YAAY,IAAI,kBAAkB;gBAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAC3E,CAAC,CAAC,CACF,UAAU,CAAC,CAAC,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAC/C,MAAM,CAAC,CAAC,cAAc,CAAC,CACvB,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CACjF,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Image as ReactNativeImage } from 'react-native';\n\nimport { useTheme } from '../../../../theme/ThemeContext';\nimport type { ImageProps } from '../../../../types/image';\nimport { getSourceKey } from '../../utils/getSourceKey';\nimport { normalizeSource } from '../../utils/normalizeSource';\nimport { resolveAccessibilityLabel } from '../../utils/resolveAccessibilityLabel';\nimport { resolveAlt } from '../../utils/resolveAlt';\nimport { resolveImageStyle } from '../../utils/resolveImageStyle';\nimport { resolveRenderedSource } from '../../utils/resolveRenderedSource';\nimport { resolveResizeMode } from '../../utils/resolveResizeMode';\n\n/*** Renders a token-aware accessible image with optional fallback source. */\nexport function Image({\n source,\n fallbackSource,\n alt,\n accessibilityLabel,\n width,\n height,\n aspectRatio,\n fit,\n resizeMode,\n radius,\n style,\n testID,\n onError,\n}: ImageProps) {\n const { theme } = useTheme();\n const primaryKey = React.useMemo(() => getSourceKey(source), [source]);\n const [failedPrimaryKey, setFailedPrimaryKey] = React.useState<string | null>(null);\n const showFallback = primaryKey !== null && failedPrimaryKey === primaryKey;\n const normalizedPrimary = normalizeSource(source);\n const normalizedFallback = normalizeSource(fallbackSource);\n const resolvedSource = resolveRenderedSource(normalizedPrimary, normalizedFallback, showFallback);\n\n if (!resolvedSource) return null;\n\n return (\n <ReactNativeImage\n accessibilityLabel={resolveAccessibilityLabel(alt, accessibilityLabel)}\n accessibilityRole=\"image\"\n alt={resolveAlt(alt, accessibilityLabel)}\n onError={(event) => {\n onError?.(event);\n if (!showFallback && normalizedFallback) setFailedPrimaryKey(primaryKey);\n }}\n resizeMode={resolveResizeMode(fit, resizeMode)}\n source={resolvedSource}\n style={[resolveImageStyle(theme, { width, height, aspectRatio, radius }), style]}\n testID={testID}\n />\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export type { ImageFit, ImageProps, SurfaceImageSource } from '../../types/image';
2
+ export { Image } from './adapters/inbound/Image';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/image/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Image } from './adapters/inbound/Image';
2
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/image/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export type { ImageFit, ImageProps, SurfaceImageSource } from '../../types/image';\nexport { Image } from './adapters/inbound/Image';\n"]}
@@ -0,0 +1,4 @@
1
+ import type { SurfaceImageSource } from '../../../types/image';
2
+ /*** Derives a stable runtime key for one Surface image source. */
3
+ export declare function getSourceKey(source: SurfaceImageSource | null | undefined): string | null;
4
+ //# sourceMappingURL=getSourceKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSourceKey.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/getSourceKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAmBzF"}
@@ -0,0 +1,33 @@
1
+ /*** Derives a stable runtime key for one Surface image source. */
2
+ export function getSourceKey(source) {
3
+ if (source === null || source === undefined)
4
+ return null;
5
+ if (typeof source === 'string')
6
+ return `uri:${source}`;
7
+ if (typeof source === 'number')
8
+ return `asset:${source}`;
9
+ if (Array.isArray(source)) {
10
+ const parts = source
11
+ .map((item) => item.uri)
12
+ .filter((value) => typeof value === 'string');
13
+ return `uri-set:${parts.join('|')}`;
14
+ }
15
+ const uri = getUriFromSource(source);
16
+ if (uri)
17
+ return `uri:${uri}`;
18
+ try {
19
+ return `src:${JSON.stringify(source)}`;
20
+ }
21
+ catch {
22
+ return 'src:unknown';
23
+ }
24
+ }
25
+ /*** Reads the first URI represented by a React Native image source. */
26
+ function getUriFromSource(source) {
27
+ if (Array.isArray(source))
28
+ return source[0]?.uri;
29
+ if (typeof source === 'number')
30
+ return undefined;
31
+ return source.uri;
32
+ }
33
+ //# sourceMappingURL=getSourceKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSourceKey.js","sourceRoot":"","sources":["../../../../src/features/image/utils/getSourceKey.ts"],"names":[],"mappings":"AAIA,kEAAkE;AAClE,MAAM,UAAU,YAAY,CAAC,MAA6C;IACxE,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzD,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,OAAO,MAAM,EAAE,CAAC;IACvD,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,SAAS,MAAM,EAAE,CAAC;IACzD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,MAAM;aACjB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;aACvB,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;QACjE,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,GAAG,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,GAAG;QAAE,OAAO,OAAO,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,OAAO,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,aAAa,CAAC;IACvB,CAAC;AACH,CAAC;AAED,uEAAuE;AACvE,SAAS,gBAAgB,CAAC,MAA2B;IACnD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACjD,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACjD,OAAO,MAAM,CAAC,GAAG,CAAC;AACpB,CAAC","sourcesContent":["import type { ImageSourcePropType } from 'react-native';\n\nimport type { SurfaceImageSource } from '../../../types/image';\n\n/*** Derives a stable runtime key for one Surface image source. */\nexport function getSourceKey(source: SurfaceImageSource | null | undefined): string | null {\n if (source === null || source === undefined) return null;\n if (typeof source === 'string') return `uri:${source}`;\n if (typeof source === 'number') return `asset:${source}`;\n if (Array.isArray(source)) {\n const parts = source\n .map((item) => item.uri)\n .filter((value): value is string => typeof value === 'string');\n return `uri-set:${parts.join('|')}`;\n }\n\n const uri = getUriFromSource(source);\n if (uri) return `uri:${uri}`;\n\n try {\n return `src:${JSON.stringify(source)}`;\n } catch {\n return 'src:unknown';\n }\n}\n\n/*** Reads the first URI represented by a React Native image source. */\nfunction getUriFromSource(source: ImageSourcePropType): string | undefined {\n if (Array.isArray(source)) return source[0]?.uri;\n if (typeof source === 'number') return undefined;\n return source.uri;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { ImageSourcePropType } from 'react-native';
2
+ import type { SurfaceImageSource } from '../../../types/image';
3
+ /*** Normalizes a Surface image source into React Native's source shape. */
4
+ export declare function normalizeSource(source: SurfaceImageSource | null | undefined): ImageSourcePropType | undefined;
5
+ //# sourceMappingURL=normalizeSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeSource.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/normalizeSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,2EAA2E;AAC3E,wBAAgB,eAAe,CAC7B,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAC5C,mBAAmB,GAAG,SAAS,CAIjC"}
@@ -0,0 +1,9 @@
1
+ /*** Normalizes a Surface image source into React Native's source shape. */
2
+ export function normalizeSource(source) {
3
+ if (source === null || source === undefined)
4
+ return undefined;
5
+ if (typeof source === 'string')
6
+ return { uri: source };
7
+ return source;
8
+ }
9
+ //# sourceMappingURL=normalizeSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeSource.js","sourceRoot":"","sources":["../../../../src/features/image/utils/normalizeSource.ts"],"names":[],"mappings":"AAIA,2EAA2E;AAC3E,MAAM,UAAU,eAAe,CAC7B,MAA6C;IAE7C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9D,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;IACvD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { ImageSourcePropType } from 'react-native';\n\nimport type { SurfaceImageSource } from '../../../types/image';\n\n/*** Normalizes a Surface image source into React Native's source shape. */\nexport function normalizeSource(\n source: SurfaceImageSource | null | undefined,\n): ImageSourcePropType | undefined {\n if (source === null || source === undefined) return undefined;\n if (typeof source === 'string') return { uri: source };\n return source;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { ImageProps } from '../../../types/image';
2
+ /*** Resolves the accessible image label from explicit label or alt text. */
3
+ export declare function resolveAccessibilityLabel(alt: ImageProps['alt'], accessibilityLabel: ImageProps['accessibilityLabel']): string | undefined;
4
+ //# sourceMappingURL=resolveAccessibilityLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveAccessibilityLabel.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveAccessibilityLabel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,CAAC,GACnD,MAAM,GAAG,SAAS,CAEpB"}
@@ -0,0 +1,5 @@
1
+ /*** Resolves the accessible image label from explicit label or alt text. */
2
+ export function resolveAccessibilityLabel(alt, accessibilityLabel) {
3
+ return accessibilityLabel ?? alt;
4
+ }
5
+ //# sourceMappingURL=resolveAccessibilityLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveAccessibilityLabel.js","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveAccessibilityLabel.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,MAAM,UAAU,yBAAyB,CACvC,GAAsB,EACtB,kBAAoD;IAEpD,OAAO,kBAAkB,IAAI,GAAG,CAAC;AACnC,CAAC","sourcesContent":["import type { ImageProps } from '../../../types/image';\n\n/*** Resolves the accessible image label from explicit label or alt text. */\nexport function resolveAccessibilityLabel(\n alt: ImageProps['alt'],\n accessibilityLabel: ImageProps['accessibilityLabel'],\n): string | undefined {\n return accessibilityLabel ?? alt;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { ImageProps } from '../../../types/image';
2
+ /*** Resolves web alt text from alt or the accessible label. */
3
+ export declare function resolveAlt(alt: ImageProps['alt'], accessibilityLabel: ImageProps['accessibilityLabel']): string | undefined;
4
+ //# sourceMappingURL=resolveAlt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveAlt.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveAlt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,+DAA+D;AAC/D,wBAAgB,UAAU,CACxB,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,CAAC,GACnD,MAAM,GAAG,SAAS,CAEpB"}
@@ -0,0 +1,5 @@
1
+ /*** Resolves web alt text from alt or the accessible label. */
2
+ export function resolveAlt(alt, accessibilityLabel) {
3
+ return alt ?? accessibilityLabel;
4
+ }
5
+ //# sourceMappingURL=resolveAlt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveAlt.js","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveAlt.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,UAAU,UAAU,CACxB,GAAsB,EACtB,kBAAoD;IAEpD,OAAO,GAAG,IAAI,kBAAkB,CAAC;AACnC,CAAC","sourcesContent":["import type { ImageProps } from '../../../types/image';\n\n/*** Resolves web alt text from alt or the accessible label. */\nexport function resolveAlt(\n alt: ImageProps['alt'],\n accessibilityLabel: ImageProps['accessibilityLabel'],\n): string | undefined {\n return alt ?? accessibilityLabel;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ImageStyle } from 'react-native';
2
+ import type { SurfaceTheme } from '../../../theme/types';
3
+ import type { ImageProps } from '../../../types/image';
4
+ /*** Resolves token-aware dimensions and radius for a Surface image. */
5
+ export declare function resolveImageStyle(theme: SurfaceTheme, props: Pick<ImageProps, 'width' | 'height' | 'aspectRatio' | 'radius'>): ImageStyle;
6
+ //# sourceMappingURL=resolveImageStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveImageStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveImageStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CAAC,GACrE,UAAU,CAYZ"}
@@ -0,0 +1,15 @@
1
+ import { resolveToken } from '../../../theme/resolveToken';
2
+ /*** Resolves token-aware dimensions and radius for a Surface image. */
3
+ export function resolveImageStyle(theme, props) {
4
+ const width = resolveToken(theme.spacing, props.width);
5
+ const height = resolveToken(theme.spacing, props.height);
6
+ const borderRadius = resolveToken(theme.radii, props.radius);
7
+ return {
8
+ width,
9
+ height,
10
+ aspectRatio: props.aspectRatio,
11
+ borderRadius,
12
+ overflow: borderRadius !== undefined ? 'hidden' : undefined,
13
+ };
14
+ }
15
+ //# sourceMappingURL=resolveImageStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveImageStyle.js","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveImageStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAC/B,KAAmB,EACnB,KAAsE;IAEtE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7D,OAAO;QACL,KAAK;QACL,MAAM;QACN,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY;QACZ,QAAQ,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;KAC5D,CAAC;AACJ,CAAC","sourcesContent":["import type { ImageStyle } from 'react-native';\n\nimport { resolveToken } from '../../../theme/resolveToken';\nimport type { SurfaceTheme } from '../../../theme/types';\nimport type { ImageProps } from '../../../types/image';\n\n/*** Resolves token-aware dimensions and radius for a Surface image. */\nexport function resolveImageStyle(\n theme: SurfaceTheme,\n props: Pick<ImageProps, 'width' | 'height' | 'aspectRatio' | 'radius'>,\n): ImageStyle {\n const width = resolveToken(theme.spacing, props.width);\n const height = resolveToken(theme.spacing, props.height);\n const borderRadius = resolveToken(theme.radii, props.radius);\n\n return {\n width,\n height,\n aspectRatio: props.aspectRatio,\n borderRadius,\n overflow: borderRadius !== undefined ? 'hidden' : undefined,\n };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { ImageSourcePropType } from 'react-native';
2
+ /*** Chooses the primary or fallback normalized image source. */
3
+ export declare function resolveRenderedSource(normalizedPrimary: ImageSourcePropType | undefined, normalizedFallback: ImageSourcePropType | undefined, showFallback: boolean): ImageSourcePropType | undefined;
4
+ //# sourceMappingURL=resolveRenderedSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRenderedSource.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveRenderedSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,gEAAgE;AAChE,wBAAgB,qBAAqB,CACnC,iBAAiB,EAAE,mBAAmB,GAAG,SAAS,EAClD,kBAAkB,EAAE,mBAAmB,GAAG,SAAS,EACnD,YAAY,EAAE,OAAO,GACpB,mBAAmB,GAAG,SAAS,CAGjC"}
@@ -0,0 +1,7 @@
1
+ /*** Chooses the primary or fallback normalized image source. */
2
+ export function resolveRenderedSource(normalizedPrimary, normalizedFallback, showFallback) {
3
+ if (showFallback || !normalizedPrimary)
4
+ return normalizedFallback;
5
+ return normalizedPrimary;
6
+ }
7
+ //# sourceMappingURL=resolveRenderedSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRenderedSource.js","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveRenderedSource.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,UAAU,qBAAqB,CACnC,iBAAkD,EAClD,kBAAmD,EACnD,YAAqB;IAErB,IAAI,YAAY,IAAI,CAAC,iBAAiB;QAAE,OAAO,kBAAkB,CAAC;IAClE,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["import type { ImageSourcePropType } from 'react-native';\n\n/*** Chooses the primary or fallback normalized image source. */\nexport function resolveRenderedSource(\n normalizedPrimary: ImageSourcePropType | undefined,\n normalizedFallback: ImageSourcePropType | undefined,\n showFallback: boolean,\n): ImageSourcePropType | undefined {\n if (showFallback || !normalizedPrimary) return normalizedFallback;\n return normalizedPrimary;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { ImageResizeMode } from 'react-native';
2
+ import type { ImageProps } from '../../../types/image';
3
+ /*** Resolves the canonical resize mode, preferring the Surface fit alias. */
4
+ export declare function resolveResizeMode(fit: ImageProps['fit'], resizeMode: ImageProps['resizeMode']): ImageResizeMode;
5
+ //# sourceMappingURL=resolveResizeMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveResizeMode.d.ts","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveResizeMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,GACnC,eAAe,CAEjB"}
@@ -0,0 +1,5 @@
1
+ /*** Resolves the canonical resize mode, preferring the Surface fit alias. */
2
+ export function resolveResizeMode(fit, resizeMode) {
3
+ return fit ?? resizeMode ?? 'cover';
4
+ }
5
+ //# sourceMappingURL=resolveResizeMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveResizeMode.js","sourceRoot":"","sources":["../../../../src/features/image/utils/resolveResizeMode.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,MAAM,UAAU,iBAAiB,CAC/B,GAAsB,EACtB,UAAoC;IAEpC,OAAO,GAAG,IAAI,UAAU,IAAI,OAAO,CAAC;AACtC,CAAC","sourcesContent":["import type { ImageResizeMode } from 'react-native';\n\nimport type { ImageProps } from '../../../types/image';\n\n/*** Resolves the canonical resize mode, preferring the Surface fit alias. */\nexport function resolveResizeMode(\n fit: ImageProps['fit'],\n resizeMode: ImageProps['resizeMode'],\n): ImageResizeMode {\n return fit ?? resizeMode ?? 'cover';\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { KeyboardAvoidingViewProps } from '../../../../types/keyboard-avoiding-view';
3
+ /*** Preserves React Native keyboard avoidance behind the stable Surface feature boundary. */
4
+ export declare function KeyboardAvoidingView(props: KeyboardAvoidingViewProps): React.JSX.Element;
5
+ //# sourceMappingURL=KeyboardAvoidingView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyboardAvoidingView.d.ts","sourceRoot":"","sources":["../../../../../src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAE1F,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAEpE"}