@razorpay/blade 12.111.0 → 12.120.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 (352) hide show
  1. package/assets/spark/colorama-center-gradient-map-dark.jpg +0 -0
  2. package/assets/spark/colorama-gradient-map-dark.png +0 -0
  3. package/build/lib/native/components/Button/BaseButton/BaseButton.js +3 -3
  4. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  5. package/build/lib/native/components/Button/BaseButton/buttonTokens.js +1 -1
  6. package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
  7. package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js +2 -1
  8. package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js.map +1 -1
  9. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js +2 -2
  10. package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js.map +1 -1
  11. package/build/lib/native/components/Charts/CommonChartComponents/index.js +1 -1
  12. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js +2 -2
  13. package/build/lib/native/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  14. package/build/lib/native/components/Charts/LineChart/LineChart.native.js +4 -2
  15. package/build/lib/native/components/Charts/LineChart/LineChart.native.js.map +1 -1
  16. package/build/lib/native/components/Charts/utils/nullBridgeUtils.js +4 -0
  17. package/build/lib/native/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  18. package/build/lib/native/components/Charts/utils/referenceBandUtils.js +6 -0
  19. package/build/lib/native/components/Charts/utils/referenceBandUtils.js.map +1 -0
  20. package/build/lib/native/components/CounterInput/CounterInput.native.js +3 -2
  21. package/build/lib/native/components/CounterInput/CounterInput.native.js.map +1 -1
  22. package/build/lib/native/components/CounterInput/token.js +2 -2
  23. package/build/lib/native/components/CounterInput/token.js.map +1 -1
  24. package/build/lib/native/components/DatePicker/Calendar.native.js +2 -2
  25. package/build/lib/native/components/DatePicker/Calendar.native.js.map +1 -1
  26. package/build/lib/native/components/DatePicker/utils.js +2 -2
  27. package/build/lib/native/components/DatePicker/utils.js.map +1 -1
  28. package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
  29. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  30. package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js +1 -1
  31. package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js.map +1 -1
  32. package/build/lib/native/components/Dropdown/dropdownUtils.js +1 -1
  33. package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
  34. package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js +1 -1
  35. package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  36. package/build/lib/native/components/Dropdown/useDropdown.js +1 -1
  37. package/build/lib/native/components/Dropdown/useDropdown.js.map +1 -1
  38. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js +14 -0
  39. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  40. package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js +20 -0
  41. package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js.map +1 -0
  42. package/build/lib/native/components/FloatingActionButton/index.js +2 -0
  43. package/build/lib/native/components/FloatingActionButton/index.js.map +1 -0
  44. package/build/lib/native/components/GenUI/GenUIContext.native.js +2 -2
  45. package/build/lib/native/components/GenUI/GenUIContext.native.js.map +1 -1
  46. package/build/lib/native/components/GenUI/index.js +1 -1
  47. package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +14 -0
  48. package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  49. package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js +2 -0
  50. package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  51. package/build/lib/native/components/Icons/index.js +1 -0
  52. package/build/lib/native/components/Icons/index.js.map +1 -1
  53. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
  54. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  55. package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
  56. package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
  57. package/build/lib/native/components/Spark/RzpGlass/utils.native.js +1 -1
  58. package/build/lib/native/components/Spark/RzpGlass/utils.native.js.map +1 -1
  59. package/build/lib/native/components/TreeView/TreeView.native.js +4 -0
  60. package/build/lib/native/components/TreeView/TreeView.native.js.map +1 -0
  61. package/build/lib/native/components/TreeView/index.native.js +2 -0
  62. package/build/lib/native/components/TreeView/index.native.js.map +1 -0
  63. package/build/lib/native/components/index.js +7 -2
  64. package/build/lib/native/components/index.js.map +1 -1
  65. package/build/lib/native/tokens/global/colors.js +1 -1
  66. package/build/lib/native/tokens/global/colors.js.map +1 -1
  67. package/build/lib/native/tokens/index.js +1 -0
  68. package/build/lib/native/tokens/index.js.map +1 -1
  69. package/build/lib/native/tokens/theme/bladeNeutralTheme.js +15 -0
  70. package/build/lib/native/tokens/theme/bladeNeutralTheme.js.map +1 -0
  71. package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
  72. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
  73. package/build/lib/native/tokens/theme/index.js +1 -0
  74. package/build/lib/native/tokens/theme/index.js.map +1 -1
  75. package/build/lib/native/tokens/theme/theme.js.map +1 -1
  76. package/build/lib/native/utils/componentZIndices.js +1 -1
  77. package/build/lib/native/utils/componentZIndices.js.map +1 -1
  78. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  79. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  80. package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js +1 -1
  81. package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  82. package/build/lib/web/development/_virtual/cloneDeep.js +1 -1
  83. package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
  84. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +124 -73
  85. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  86. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +68 -2
  87. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  88. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +206 -18
  89. package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  90. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  91. package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  92. package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +1 -1
  93. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +15 -2
  94. package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  95. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +272 -15
  96. package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
  97. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js +195 -0
  98. package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  99. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js +175 -0
  100. package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  101. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js +66 -0
  102. package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js.map +1 -0
  103. package/build/lib/web/development/components/CounterInput/CounterInput.web.js +29 -5
  104. package/build/lib/web/development/components/CounterInput/CounterInput.web.js.map +1 -1
  105. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js +20 -4
  106. package/build/lib/web/development/components/CounterInput/StyledCounterInput.js.map +1 -1
  107. package/build/lib/web/development/components/CounterInput/token.js +6 -1
  108. package/build/lib/web/development/components/CounterInput/token.js.map +1 -1
  109. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +20 -0
  110. package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  111. package/build/lib/web/development/components/DatePicker/Calendar.web.js +9 -2
  112. package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
  113. package/build/lib/web/development/components/DatePicker/utils.js +21 -1
  114. package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
  115. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
  116. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  117. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  118. package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  119. package/build/lib/web/development/components/Dropdown/dropdownUtils.js +28 -2
  120. package/build/lib/web/development/components/Dropdown/dropdownUtils.js.map +1 -1
  121. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  122. package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  123. package/build/lib/web/development/components/Dropdown/useDropdown.js +91 -5
  124. package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
  125. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js +126 -0
  126. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  127. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  128. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  129. package/build/lib/web/development/components/FloatingActionButton/index.js +2 -0
  130. package/build/lib/web/development/components/FloatingActionButton/index.js.map +1 -0
  131. package/build/lib/web/development/components/GenUI/GenUIComponents.web.js.map +1 -1
  132. package/build/lib/web/development/components/GenUI/GenUIContext.web.js +9 -1
  133. package/build/lib/web/development/components/GenUI/GenUIContext.web.js.map +1 -1
  134. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js +17 -0
  135. package/build/lib/web/development/components/GenUI/GenUIProvider.web.js.map +1 -1
  136. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  137. package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  138. package/build/lib/web/development/components/GenUI/index.js +1 -1
  139. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  140. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  141. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js +2 -0
  142. package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  143. package/build/lib/web/development/components/Icons/index.js +1 -0
  144. package/build/lib/web/development/components/Icons/index.js.map +1 -1
  145. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +3 -0
  146. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  147. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js +7 -1
  148. package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js.map +1 -1
  149. package/build/lib/web/development/components/RollingText/RollingText.web.js +27 -20
  150. package/build/lib/web/development/components/RollingText/RollingText.web.js.map +1 -1
  151. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js +16 -7
  152. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  153. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  154. package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  155. package/build/lib/web/development/components/Spark/RzpGlass/presets.js +30 -1
  156. package/build/lib/web/development/components/Spark/RzpGlass/presets.js.map +1 -1
  157. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  158. package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  159. package/build/lib/web/development/components/Spark/RzpGlass/utils.js +26 -10
  160. package/build/lib/web/development/components/Spark/RzpGlass/utils.js.map +1 -1
  161. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +31 -18
  162. package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  163. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  164. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  165. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  166. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  167. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +58 -1
  168. package/build/lib/web/development/components/SpotlightPopoverTour/utils.js.map +1 -1
  169. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js +41 -0
  170. package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  171. package/build/lib/web/development/components/TreeView/TreeView.web.js +696 -0
  172. package/build/lib/web/development/components/TreeView/TreeView.web.js.map +1 -0
  173. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js +184 -0
  174. package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  175. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js +73 -0
  176. package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js.map +1 -0
  177. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js +295 -0
  178. package/build/lib/web/development/components/TreeView/TreeViewItem.web.js.map +1 -0
  179. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js +173 -0
  180. package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  181. package/build/lib/web/development/components/TreeView/componentIds.js +8 -0
  182. package/build/lib/web/development/components/TreeView/componentIds.js.map +1 -0
  183. package/build/lib/web/development/components/TreeView/index.web.js +4 -0
  184. package/build/lib/web/development/components/TreeView/index.web.js.map +1 -0
  185. package/build/lib/web/development/components/TreeView/treeViewUtils.js +475 -0
  186. package/build/lib/web/development/components/TreeView/treeViewUtils.js.map +1 -0
  187. package/build/lib/web/development/components/TreeView/useTreeView.js +24 -0
  188. package/build/lib/web/development/components/TreeView/useTreeView.js.map +1 -0
  189. package/build/lib/web/development/components/index.js +9 -2
  190. package/build/lib/web/development/components/index.js.map +1 -1
  191. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  192. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  193. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  194. package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  195. package/build/lib/web/development/tokens/global/colors.js +2 -2
  196. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  197. package/build/lib/web/development/tokens/index.js +1 -0
  198. package/build/lib/web/development/tokens/index.js.map +1 -1
  199. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js +1439 -0
  200. package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js.map +1 -0
  201. package/build/lib/web/development/tokens/theme/bladeTheme.js +48 -12
  202. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
  203. package/build/lib/web/development/tokens/theme/index.js +1 -0
  204. package/build/lib/web/development/tokens/theme/index.js.map +1 -1
  205. package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
  206. package/build/lib/web/development/utils/componentZIndices.js +2 -0
  207. package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
  208. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +4 -0
  209. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  210. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  211. package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  212. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  213. package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  214. package/build/lib/web/production/_virtual/flatten.js +1 -1
  215. package/build/lib/web/production/_virtual/flatten3.js +1 -1
  216. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +124 -73
  217. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  218. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +68 -2
  219. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  220. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +206 -18
  221. package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
  222. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
  223. package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
  224. package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +1 -1
  225. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +15 -2
  226. package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
  227. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +272 -15
  228. package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
  229. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js +195 -0
  230. package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js.map +1 -0
  231. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js +175 -0
  232. package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js.map +1 -0
  233. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js +66 -0
  234. package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js.map +1 -0
  235. package/build/lib/web/production/components/CounterInput/CounterInput.web.js +29 -5
  236. package/build/lib/web/production/components/CounterInput/CounterInput.web.js.map +1 -1
  237. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js +20 -4
  238. package/build/lib/web/production/components/CounterInput/StyledCounterInput.js.map +1 -1
  239. package/build/lib/web/production/components/CounterInput/token.js +6 -1
  240. package/build/lib/web/production/components/CounterInput/token.js.map +1 -1
  241. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +20 -0
  242. package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
  243. package/build/lib/web/production/components/DatePicker/Calendar.web.js +9 -2
  244. package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
  245. package/build/lib/web/production/components/DatePicker/utils.js +21 -1
  246. package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
  247. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
  248. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  249. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +20 -12
  250. package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
  251. package/build/lib/web/production/components/Dropdown/dropdownUtils.js +28 -2
  252. package/build/lib/web/production/components/Dropdown/dropdownUtils.js.map +1 -1
  253. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js +15 -1
  254. package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js.map +1 -1
  255. package/build/lib/web/production/components/Dropdown/useDropdown.js +91 -5
  256. package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
  257. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js +126 -0
  258. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
  259. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
  260. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
  261. package/build/lib/web/production/components/FloatingActionButton/index.js +2 -0
  262. package/build/lib/web/production/components/FloatingActionButton/index.js.map +1 -0
  263. package/build/lib/web/production/components/GenUI/GenUIComponents.web.js.map +1 -1
  264. package/build/lib/web/production/components/GenUI/GenUIContext.web.js +9 -1
  265. package/build/lib/web/production/components/GenUI/GenUIContext.web.js.map +1 -1
  266. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js +17 -0
  267. package/build/lib/web/production/components/GenUI/GenUIProvider.web.js.map +1 -1
  268. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js +31 -6
  269. package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
  270. package/build/lib/web/production/components/GenUI/index.js +1 -1
  271. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
  272. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
  273. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js +2 -0
  274. package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
  275. package/build/lib/web/production/components/Icons/index.js +1 -0
  276. package/build/lib/web/production/components/Icons/index.js.map +1 -1
  277. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +3 -0
  278. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  279. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js +7 -1
  280. package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js.map +1 -1
  281. package/build/lib/web/production/components/RollingText/RollingText.web.js +27 -20
  282. package/build/lib/web/production/components/RollingText/RollingText.web.js.map +1 -1
  283. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js +16 -7
  284. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
  285. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
  286. package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
  287. package/build/lib/web/production/components/Spark/RzpGlass/presets.js +30 -1
  288. package/build/lib/web/production/components/Spark/RzpGlass/presets.js.map +1 -1
  289. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
  290. package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
  291. package/build/lib/web/production/components/Spark/RzpGlass/utils.js +26 -10
  292. package/build/lib/web/production/components/Spark/RzpGlass/utils.js.map +1 -1
  293. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +31 -18
  294. package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
  295. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +14 -3
  296. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  297. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
  298. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  299. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +58 -1
  300. package/build/lib/web/production/components/SpotlightPopoverTour/utils.js.map +1 -1
  301. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js +41 -0
  302. package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
  303. package/build/lib/web/production/components/TreeView/TreeView.web.js +696 -0
  304. package/build/lib/web/production/components/TreeView/TreeView.web.js.map +1 -0
  305. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js +184 -0
  306. package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js.map +1 -0
  307. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js +73 -0
  308. package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js.map +1 -0
  309. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js +295 -0
  310. package/build/lib/web/production/components/TreeView/TreeViewItem.web.js.map +1 -0
  311. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js +173 -0
  312. package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
  313. package/build/lib/web/production/components/TreeView/componentIds.js +8 -0
  314. package/build/lib/web/production/components/TreeView/componentIds.js.map +1 -0
  315. package/build/lib/web/production/components/TreeView/index.web.js +4 -0
  316. package/build/lib/web/production/components/TreeView/index.web.js.map +1 -0
  317. package/build/lib/web/production/components/TreeView/treeViewUtils.js +475 -0
  318. package/build/lib/web/production/components/TreeView/treeViewUtils.js.map +1 -0
  319. package/build/lib/web/production/components/TreeView/useTreeView.js +24 -0
  320. package/build/lib/web/production/components/TreeView/useTreeView.js.map +1 -0
  321. package/build/lib/web/production/components/index.js +9 -2
  322. package/build/lib/web/production/components/index.js.map +1 -1
  323. package/build/lib/web/production/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  324. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  325. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  326. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  327. package/build/lib/web/production/tokens/global/colors.js +2 -2
  328. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  329. package/build/lib/web/production/tokens/index.js +1 -0
  330. package/build/lib/web/production/tokens/index.js.map +1 -1
  331. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js +1439 -0
  332. package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js.map +1 -0
  333. package/build/lib/web/production/tokens/theme/bladeTheme.js +48 -12
  334. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
  335. package/build/lib/web/production/tokens/theme/index.js +1 -0
  336. package/build/lib/web/production/tokens/theme/index.js.map +1 -1
  337. package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
  338. package/build/lib/web/production/utils/componentZIndices.js +2 -0
  339. package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
  340. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +4 -0
  341. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  342. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
  343. package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
  344. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
  345. package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
  346. package/build/types/components/index.d.ts +557 -18
  347. package/build/types/components/index.native.d.ts +463 -16
  348. package/build/types/tokens/index.d.ts +11 -4
  349. package/build/types/tokens/index.native.d.ts +11 -4
  350. package/build/types/utils/index.d.ts +8 -3
  351. package/build/types/utils/index.native.d.ts +8 -3
  352. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { componentId } from './tokens.js';
2
2
  import '../../../utils/assignWithoutSideEffects/index.js';
3
3
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
4
4
 
5
- var _ChartXAxis=function _ChartXAxis(_props){return null;};var ChartXAxis=assignWithoutSideEffects(_ChartXAxis,{componentId:componentId.chartXAxis});var _ChartYAxis=function _ChartYAxis(_props){return null;};var ChartYAxis=assignWithoutSideEffects(_ChartYAxis,{componentId:componentId.chartYAxis});var _ChartCartesianGrid=function _ChartCartesianGrid(_props){return null;};var ChartCartesianGrid=assignWithoutSideEffects(_ChartCartesianGrid,{componentId:componentId.chartCartesianGrid});var _ChartTooltip=function _ChartTooltip(_props){return null;};var ChartTooltip=assignWithoutSideEffects(_ChartTooltip,{componentId:componentId.chartTooltip});var _ChartLegend=function _ChartLegend(_props){return null;};var ChartLegend=assignWithoutSideEffects(_ChartLegend,{componentId:componentId.chartLegend});var _ChartReferenceLine=function _ChartReferenceLine(_props){return null;};var ChartReferenceLine=assignWithoutSideEffects(_ChartReferenceLine,{componentId:componentId.chartReferenceLine});
5
+ var _ChartXAxis=function _ChartXAxis(_props){return null;};var ChartXAxis=assignWithoutSideEffects(_ChartXAxis,{componentId:componentId.chartXAxis});var _ChartYAxis=function _ChartYAxis(_props){return null;};var ChartYAxis=assignWithoutSideEffects(_ChartYAxis,{componentId:componentId.chartYAxis});var _ChartCartesianGrid=function _ChartCartesianGrid(_props){return null;};var ChartCartesianGrid=assignWithoutSideEffects(_ChartCartesianGrid,{componentId:componentId.chartCartesianGrid});var _ChartTooltip=function _ChartTooltip(_props){return null;};var ChartTooltip=assignWithoutSideEffects(_ChartTooltip,{componentId:componentId.chartTooltip});var _ChartLegend=function _ChartLegend(_props){return null;};var ChartLegend=assignWithoutSideEffects(_ChartLegend,{componentId:componentId.chartLegend});var _ChartReferenceLine=function _ChartReferenceLine(_props){return null;};var ChartReferenceLine=assignWithoutSideEffects(_ChartReferenceLine,{componentId:componentId.chartReferenceLine});var _ChartReferenceBand=function _ChartReferenceBand(_props){return null;};var ChartReferenceBand=assignWithoutSideEffects(_ChartReferenceBand,{componentId:componentId.chartReferenceBand});
6
6
 
7
- export { ChartCartesianGrid, ChartLegend, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis };
7
+ export { ChartCartesianGrid, ChartLegend, ChartReferenceBand, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis };
8
8
  //# sourceMappingURL=CommonChartComponents.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommonChartComponents.native.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/CommonChartComponents.native.tsx"],"sourcesContent":["import type React from 'react';\nimport type {\n ChartReferenceLineProps,\n ChartXAxisProps,\n ChartYAxisProps,\n ChartTooltipProps,\n ChartLegendProps,\n ChartCartesianGridProps,\n} from './types';\nimport { componentId } from './tokens';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\n/**\n * On native, common chart components are *marker* components.\n * Chart wrappers (ChartBarWrapper, ChartLineWrapper, ...) read their props\n * via `React.Children.forEach` + `getComponentId(child)` and render the chart\n * themselves with `react-native-svg`. The marker components themselves render\n * nothing.\n *\n * ChartTooltip is consumed by ChartBarWrapper today. Other chart wrappers\n * that haven't yet implemented tooltip rendering will silently ignore it\n * until support lands.\n */\nconst _ChartXAxis = (_props: ChartXAxisProps): React.ReactElement | null => null;\nconst ChartXAxis = assignWithoutSideEffects(_ChartXAxis, {\n componentId: componentId.chartXAxis,\n});\n\nconst _ChartYAxis = (_props: ChartYAxisProps): React.ReactElement | null => null;\nconst ChartYAxis = assignWithoutSideEffects(_ChartYAxis, {\n componentId: componentId.chartYAxis,\n});\n\nconst _ChartCartesianGrid = (_props: ChartCartesianGridProps): React.ReactElement | null => null;\nconst ChartCartesianGrid = assignWithoutSideEffects(_ChartCartesianGrid, {\n componentId: componentId.chartCartesianGrid,\n});\n\nconst _ChartTooltip = (_props: ChartTooltipProps): React.ReactElement | null => null;\nconst ChartTooltip = assignWithoutSideEffects(_ChartTooltip, {\n componentId: componentId.chartTooltip,\n});\n\nconst _ChartLegend = (_props: ChartLegendProps): React.ReactElement | null => null;\nconst ChartLegend = assignWithoutSideEffects(_ChartLegend, {\n componentId: componentId.chartLegend,\n});\n\nconst _ChartReferenceLine = (_props: ChartReferenceLineProps): React.ReactElement | null => null;\nconst ChartReferenceLine = assignWithoutSideEffects(_ChartReferenceLine, {\n componentId: componentId.chartReferenceLine,\n});\n\nexport type {\n ChartReferenceLineProps,\n ChartXAxisProps,\n ChartYAxisProps,\n ChartTooltipProps,\n ChartLegendProps,\n ChartCartesianGridProps,\n};\nexport {\n ChartXAxis,\n ChartYAxis,\n ChartCartesianGrid,\n ChartLegend,\n ChartTooltip,\n ChartReferenceLine,\n};\n"],"names":["_ChartXAxis","_props","ChartXAxis","assignWithoutSideEffects","componentId","chartXAxis","_ChartYAxis","ChartYAxis","chartYAxis","_ChartCartesianGrid","ChartCartesianGrid","chartCartesianGrid","_ChartTooltip","ChartTooltip","chartTooltip","_ChartLegend","ChartLegend","chartLegend","_ChartReferenceLine","ChartReferenceLine","chartReferenceLine"],"mappings":";;;;AAuBA,IAAMA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAuB,CAAgC,CAAA,OAAA,IAAI,GAC1E,IAAAC,UAAU,CAAGC,wBAAwB,CAACH,WAAW,CAAE,CACvDI,WAAW,CAAEA,WAAW,CAACC,UAC3B,CAAC,EAED,IAAMC,WAAW,CAAG,SAAdA,WAAWA,CAAIL,MAAuB,SAAoC,IAAA,CAAA,CAAA,CAC1E,IAAAM,UAAU,CAAGJ,wBAAwB,CAACG,WAAW,CAAE,CACvDF,WAAW,CAAEA,WAAW,CAACI,UAC3B,CAAC,EAED,IAAMC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIR,MAA+B,CAAA,CAAA,WAAoC,CAChG,CAAA,CAAM,IAAAS,kBAAkB,CAAGP,wBAAwB,CAACM,mBAAmB,CAAE,CACvEL,WAAW,CAAEA,WAAW,CAACO,kBAC3B,CAAC,EAED,IAAMC,aAAa,CAAG,SAAhBA,aAAaA,CAAIX,MAAyB,SAAoC,IAAA,CAAA,CAAA,CAC9E,IAAAY,YAAY,CAAGV,wBAAwB,CAACS,aAAa,CAAE,CAC3DR,WAAW,CAAEA,WAAW,CAACU,YAC3B,CAAC,EAED,IAAMC,YAAY,CAAG,SAAfA,YAAYA,CAAId,MAAwB,CAAA,CAAA,WAAoC,CAClF,CAAA,CAAM,IAAAe,WAAW,CAAGb,wBAAwB,CAACY,YAAY,CAAE,CACzDX,WAAW,CAAEA,WAAW,CAACa,WAC3B,CAAC,EAED,IAAMC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIjB,MAA+B,CAAgC,CAAA,OAAA,IAAI,GAC1F,IAAAkB,kBAAkB,CAAGhB,wBAAwB,CAACe,mBAAmB,CAAE,CACvEd,WAAW,CAAEA,WAAW,CAACgB,kBAC3B,CAAC;;;;"}
1
+ {"version":3,"file":"CommonChartComponents.native.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/CommonChartComponents.native.tsx"],"sourcesContent":["import type React from 'react';\nimport type {\n ChartReferenceLineProps,\n ChartReferenceBandProps,\n ChartXAxisProps,\n ChartYAxisProps,\n ChartTooltipProps,\n ChartLegendProps,\n ChartCartesianGridProps,\n} from './types';\nimport { componentId } from './tokens';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\n/**\n * On native, common chart components are *marker* components.\n * Chart wrappers (ChartBarWrapper, ChartLineWrapper, ...) read their props\n * via `React.Children.forEach` + `getComponentId(child)` and render the chart\n * themselves with `react-native-svg`. The marker components themselves render\n * nothing.\n *\n * ChartTooltip is consumed by ChartBarWrapper today. Other chart wrappers\n * that haven't yet implemented tooltip rendering will silently ignore it\n * until support lands.\n */\nconst _ChartXAxis = (_props: ChartXAxisProps): React.ReactElement | null => null;\nconst ChartXAxis = assignWithoutSideEffects(_ChartXAxis, {\n componentId: componentId.chartXAxis,\n});\n\nconst _ChartYAxis = (_props: ChartYAxisProps): React.ReactElement | null => null;\nconst ChartYAxis = assignWithoutSideEffects(_ChartYAxis, {\n componentId: componentId.chartYAxis,\n});\n\nconst _ChartCartesianGrid = (_props: ChartCartesianGridProps): React.ReactElement | null => null;\nconst ChartCartesianGrid = assignWithoutSideEffects(_ChartCartesianGrid, {\n componentId: componentId.chartCartesianGrid,\n});\n\nconst _ChartTooltip = (_props: ChartTooltipProps): React.ReactElement | null => null;\nconst ChartTooltip = assignWithoutSideEffects(_ChartTooltip, {\n componentId: componentId.chartTooltip,\n});\n\nconst _ChartLegend = (_props: ChartLegendProps): React.ReactElement | null => null;\nconst ChartLegend = assignWithoutSideEffects(_ChartLegend, {\n componentId: componentId.chartLegend,\n});\n\nconst _ChartReferenceLine = (_props: ChartReferenceLineProps): React.ReactElement | null => null;\nconst ChartReferenceLine = assignWithoutSideEffects(_ChartReferenceLine, {\n componentId: componentId.chartReferenceLine,\n});\n\nconst _ChartReferenceBand = (_props: ChartReferenceBandProps): React.ReactElement | null => null;\nconst ChartReferenceBand = assignWithoutSideEffects(_ChartReferenceBand, {\n componentId: componentId.chartReferenceBand,\n});\n\nexport type {\n ChartReferenceLineProps,\n ChartReferenceBandProps,\n ChartXAxisProps,\n ChartYAxisProps,\n ChartTooltipProps,\n ChartLegendProps,\n ChartCartesianGridProps,\n};\nexport {\n ChartXAxis,\n ChartYAxis,\n ChartCartesianGrid,\n ChartLegend,\n ChartTooltip,\n ChartReferenceLine,\n ChartReferenceBand,\n};\n"],"names":["_ChartXAxis","_props","ChartXAxis","assignWithoutSideEffects","componentId","chartXAxis","_ChartYAxis","ChartYAxis","chartYAxis","_ChartCartesianGrid","ChartCartesianGrid","chartCartesianGrid","_ChartTooltip","ChartTooltip","chartTooltip","_ChartLegend","ChartLegend","chartLegend","_ChartReferenceLine","ChartReferenceLine","chartReferenceLine","_ChartReferenceBand","ChartReferenceBand","chartReferenceBand"],"mappings":";;;;AAwBA,IAAMA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAuB,CAAA,CAAA,OAAoC,IAAA,CAAA,CAAA,CAC1E,IAAAC,UAAU,CAAGC,wBAAwB,CAACH,WAAW,CAAE,CACvDI,WAAW,CAAEA,WAAW,CAACC,UAC3B,CAAC,EAED,IAAMC,WAAW,CAAG,SAAdA,WAAWA,CAAIL,MAAuB,CAAgC,CAAA,OAAA,IAAI,CAChF,CAAA,CAAM,IAAAM,UAAU,CAAGJ,wBAAwB,CAACG,WAAW,CAAE,CACvDF,WAAW,CAAEA,WAAW,CAACI,UAC3B,CAAC,EAED,IAAMC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIR,MAA+B,CAAA,CAAA,OAAoC,IAAA,CAAA,CAAA,CAC1F,IAAAS,kBAAkB,CAAGP,wBAAwB,CAACM,mBAAmB,CAAE,CACvEL,WAAW,CAAEA,WAAW,CAACO,kBAC3B,CAAC,EAED,IAAMC,aAAa,CAAG,SAAhBA,aAAaA,CAAIX,MAAyB,CAAgC,CAAA,OAAA,IAAI,GAC9E,IAAAY,YAAY,CAAGV,wBAAwB,CAACS,aAAa,CAAE,CAC3DR,WAAW,CAAEA,WAAW,CAACU,YAC3B,CAAC,EAED,IAAMC,YAAY,CAAG,SAAfA,YAAYA,CAAId,MAAwB,CAAA,CAAA,WAAoC,CAClF,CAAA,CAAM,IAAAe,WAAW,CAAGb,wBAAwB,CAACY,YAAY,CAAE,CACzDX,WAAW,CAAEA,WAAW,CAACa,WAC3B,CAAC,EAED,IAAMC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIjB,MAA+B,SAAoC,IAAA,CAAA,CAAA,CAC1F,IAAAkB,kBAAkB,CAAGhB,wBAAwB,CAACe,mBAAmB,CAAE,CACvEd,WAAW,CAAEA,WAAW,CAACgB,kBAC3B,CAAC,EAED,IAAMC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIpB,MAA+B,CAAgC,CAAA,OAAA,IAAI,CAChG,CAAA,CAAM,IAAAqB,kBAAkB,CAAGnB,wBAAwB,CAACkB,mBAAmB,CAAE,CACvEjB,WAAW,CAAEA,WAAW,CAACmB,kBAC3B,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- export { ChartCartesianGrid, ChartLegend, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis } from './CommonChartComponents.native.js';
1
+ export { ChartCartesianGrid, ChartLegend, ChartReferenceBand, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis } from './CommonChartComponents.native.js';
2
2
  export { CommonChartComponentsContext, useCommonChartComponentsContext } from './CommonChartComponentsContext.js';
3
3
  export { DEFAULT_COLOR, componentId } from './tokens.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- var RECT_WIDTH=80;var RECT_HEIGHT=30;var TEXT_BASELINE=15;var PADDING_VERTICAL=4;var PADDING_HORIZONTAL=8;var X_OFFSET=32;var Y_OFFSET=14.5;var X_AXIS_TEXT_BASELINE=24;var X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL=48;var X_AXIS_TICK_LINE_HEIGHT=14.5;var X_AXIS_TICK_START_DY=8;var X_AXIS_LABEL_GAP=4;var X_AXIS_BOTTOM_PADDING=8;var X_AXIS_LABEL_OFFSET=8;var X_AXIS_LABEL_HEIGHT=16;var LEGEND_MARGIN_TOP=8;var MIN_WIDTH=RECT_WIDTH;var MAX_WIDTH=200;var DEFAULT_COLOR='data.background.categorical.blue.moderate';var componentId={chartLegend:'chart-legend',chartXAxis:'chart-x-axis',chartYAxis:'chart-y-axis',chartCartesianGrid:'chart-cartesian-grid',chartTooltip:'chart-tooltip',chartReferenceLine:'chart-reference-line'};
1
+ var RECT_WIDTH=80;var RECT_HEIGHT=30;var TEXT_BASELINE=15;var PADDING_VERTICAL=4;var PADDING_HORIZONTAL=8;var X_OFFSET=32;var Y_OFFSET=14.5;var X_AXIS_TEXT_BASELINE=24;var X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL=48;var X_AXIS_TICK_LINE_HEIGHT=14.5;var X_AXIS_TICK_START_DY=8;var X_AXIS_LABEL_GAP=4;var X_AXIS_BOTTOM_PADDING=8;var X_AXIS_LABEL_OFFSET=8;var X_AXIS_LABEL_HEIGHT=16;var LEGEND_MARGIN_TOP=8;var MIN_WIDTH=RECT_WIDTH;var MAX_WIDTH=200;var DEFAULT_COLOR='data.background.categorical.blue.moderate';var REFERENCE_BAND_DEFAULT_COLOR='data.background.categorical.blue.faint';var REFERENCE_BAND_FILL_OPACITY=0.5;var REFERENCE_BAND_LOWER_CLASS='blade-reference-band-lower';var REFERENCE_BAND_UPPER_CLASS='blade-reference-band-upper';var REFERENCE_BAND_LAYER_CLASS='blade-reference-band-layer';var componentId={chartLegend:'chart-legend',chartXAxis:'chart-x-axis',chartYAxis:'chart-y-axis',chartCartesianGrid:'chart-cartesian-grid',chartTooltip:'chart-tooltip',chartReferenceLine:'chart-reference-line',chartReferenceBand:'chart-reference-band'};
2
2
 
3
- export { DEFAULT_COLOR, LEGEND_MARGIN_TOP, MAX_WIDTH, MIN_WIDTH, PADDING_HORIZONTAL, PADDING_VERTICAL, RECT_HEIGHT, RECT_WIDTH, TEXT_BASELINE, X_AXIS_BOTTOM_PADDING, X_AXIS_LABEL_GAP, X_AXIS_LABEL_HEIGHT, X_AXIS_LABEL_OFFSET, X_AXIS_TEXT_BASELINE, X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL, X_AXIS_TICK_LINE_HEIGHT, X_AXIS_TICK_START_DY, X_OFFSET, Y_OFFSET, componentId };
3
+ export { DEFAULT_COLOR, LEGEND_MARGIN_TOP, MAX_WIDTH, MIN_WIDTH, PADDING_HORIZONTAL, PADDING_VERTICAL, RECT_HEIGHT, RECT_WIDTH, REFERENCE_BAND_DEFAULT_COLOR, REFERENCE_BAND_FILL_OPACITY, REFERENCE_BAND_LAYER_CLASS, REFERENCE_BAND_LOWER_CLASS, REFERENCE_BAND_UPPER_CLASS, TEXT_BASELINE, X_AXIS_BOTTOM_PADDING, X_AXIS_LABEL_GAP, X_AXIS_LABEL_HEIGHT, X_AXIS_LABEL_OFFSET, X_AXIS_TEXT_BASELINE, X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL, X_AXIS_TICK_LINE_HEIGHT, X_AXIS_TICK_START_DY, X_OFFSET, Y_OFFSET, componentId };
4
4
  //# sourceMappingURL=tokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/tokens.ts"],"sourcesContent":["const RECT_WIDTH = 80;\nconst RECT_HEIGHT = 30;\nconst TEXT_BASELINE = 15;\n\n// Padding for text inside the rectangle (4px vertical, 8px horizontal)\nconst PADDING_VERTICAL = 4;\nconst PADDING_HORIZONTAL = 8;\n\nconst X_OFFSET = 32;\nconst Y_OFFSET = 14.5;\nconst X_AXIS_TEXT_BASELINE = 24;\nconst X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL = 48;\n\n// X-axis tick label constants\nconst X_AXIS_TICK_LINE_HEIGHT = 14.5;\nconst X_AXIS_TICK_START_DY = 8;\nconst X_AXIS_LABEL_GAP = 4;\nconst X_AXIS_BOTTOM_PADDING = 8;\n\n// Gap between tick labels and X-axis label (e.g., \"Month\")\nconst X_AXIS_LABEL_OFFSET = 8;\n// Height of the X-axis label text\nconst X_AXIS_LABEL_HEIGHT = 16;\n\n// Legend spacing from X-axis label (or tick labels if no label)\nconst LEGEND_MARGIN_TOP = 8;\n\nconst MIN_WIDTH = RECT_WIDTH;\nconst MAX_WIDTH = 200;\n\nconst DEFAULT_COLOR = 'data.background.categorical.blue.moderate';\n\nconst componentId = {\n chartLegend: 'chart-legend',\n chartXAxis: 'chart-x-axis',\n chartYAxis: 'chart-y-axis',\n chartCartesianGrid: 'chart-cartesian-grid',\n chartTooltip: 'chart-tooltip',\n chartReferenceLine: 'chart-reference-line',\n};\n\nexport {\n componentId,\n RECT_WIDTH,\n RECT_HEIGHT,\n TEXT_BASELINE,\n PADDING_VERTICAL,\n PADDING_HORIZONTAL,\n X_OFFSET,\n Y_OFFSET,\n X_AXIS_TEXT_BASELINE,\n X_AXIS_TICK_LINE_HEIGHT,\n X_AXIS_TICK_START_DY,\n X_AXIS_LABEL_GAP,\n X_AXIS_BOTTOM_PADDING,\n X_AXIS_LABEL_OFFSET,\n X_AXIS_LABEL_HEIGHT,\n LEGEND_MARGIN_TOP,\n MIN_WIDTH,\n MAX_WIDTH,\n DEFAULT_COLOR,\n X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL,\n};\n"],"names":["RECT_WIDTH","RECT_HEIGHT","TEXT_BASELINE","PADDING_VERTICAL","PADDING_HORIZONTAL","X_OFFSET","Y_OFFSET","X_AXIS_TEXT_BASELINE","X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL","X_AXIS_TICK_LINE_HEIGHT","X_AXIS_TICK_START_DY","X_AXIS_LABEL_GAP","X_AXIS_BOTTOM_PADDING","X_AXIS_LABEL_OFFSET","X_AXIS_LABEL_HEIGHT","LEGEND_MARGIN_TOP","MIN_WIDTH","MAX_WIDTH","DEFAULT_COLOR","componentId","chartLegend","chartXAxis","chartYAxis","chartCartesianGrid","chartTooltip","chartReferenceLine"],"mappings":"AAAM,IAAAA,UAAU,CAAG,GACb,IAAAC,WAAW,CAAG,GACd,IAAAC,aAAa,CAAG,GAGhB,IAAAC,gBAAgB,CAAG,EACnB,IAAAC,kBAAkB,CAAG,EAErB,IAAAC,QAAQ,CAAG,GACX,IAAAC,QAAQ,CAAG,KACX,IAAAC,oBAAoB,CAAG,GACvB,IAAAC,yCAAyC,CAAG,GAG5C,IAAAC,uBAAuB,CAAG,KAC1B,IAAAC,oBAAoB,CAAG,EACvB,IAAAC,gBAAgB,CAAG,EACnB,IAAAC,qBAAqB,CAAG,EAGxB,IAAAC,mBAAmB,CAAG,EAEtB,IAAAC,mBAAmB,CAAG,GAGtB,IAAAC,iBAAiB,CAAG,EAEpB,IAAAC,SAAS,CAAGhB,WACZ,IAAAiB,SAAS,CAAG,IAEZ,IAAAC,aAAa,CAAG,4CAEhB,IAAAC,WAAW,CAAG,CAClBC,WAAW,CAAE,cAAc,CAC3BC,UAAU,CAAE,cAAc,CAC1BC,UAAU,CAAE,cAAc,CAC1BC,kBAAkB,CAAE,sBAAsB,CAC1CC,YAAY,CAAE,eAAe,CAC7BC,kBAAkB,CAAE,sBACtB;;;;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/tokens.ts"],"sourcesContent":["const RECT_WIDTH = 80;\nconst RECT_HEIGHT = 30;\nconst TEXT_BASELINE = 15;\n\n// Padding for text inside the rectangle (4px vertical, 8px horizontal)\nconst PADDING_VERTICAL = 4;\nconst PADDING_HORIZONTAL = 8;\n\nconst X_OFFSET = 32;\nconst Y_OFFSET = 14.5;\nconst X_AXIS_TEXT_BASELINE = 24;\nconst X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL = 48;\n\n// X-axis tick label constants\nconst X_AXIS_TICK_LINE_HEIGHT = 14.5;\nconst X_AXIS_TICK_START_DY = 8;\nconst X_AXIS_LABEL_GAP = 4;\nconst X_AXIS_BOTTOM_PADDING = 8;\n\n// Gap between tick labels and X-axis label (e.g., \"Month\")\nconst X_AXIS_LABEL_OFFSET = 8;\n// Height of the X-axis label text\nconst X_AXIS_LABEL_HEIGHT = 16;\n\n// Legend spacing from X-axis label (or tick labels if no label)\nconst LEGEND_MARGIN_TOP = 8;\n\nconst MIN_WIDTH = RECT_WIDTH;\nconst MAX_WIDTH = 200;\n\nconst DEFAULT_COLOR = 'data.background.categorical.blue.moderate';\n\n// Default fill colour + opacity for the reference band. A faint categorical blue rendered at a\n// low opacity reads as a subtle shaded range behind the trend line (matches the Figma design).\nconst REFERENCE_BAND_DEFAULT_COLOR = 'data.background.categorical.blue.faint';\nconst REFERENCE_BAND_FILL_OPACITY = 0.5;\n\n// Stable classNames applied to the band's invisible bound lines (web) so ChartLineWrapper can find\n// their rendered curves and paint the filled band between them.\nconst REFERENCE_BAND_LOWER_CLASS = 'blade-reference-band-lower';\nconst REFERENCE_BAND_UPPER_CLASS = 'blade-reference-band-upper';\n// className on the <g> layer that holds the painted band path.\nconst REFERENCE_BAND_LAYER_CLASS = 'blade-reference-band-layer';\n\nconst componentId = {\n chartLegend: 'chart-legend',\n chartXAxis: 'chart-x-axis',\n chartYAxis: 'chart-y-axis',\n chartCartesianGrid: 'chart-cartesian-grid',\n chartTooltip: 'chart-tooltip',\n chartReferenceLine: 'chart-reference-line',\n chartReferenceBand: 'chart-reference-band',\n};\n\nexport {\n componentId,\n RECT_WIDTH,\n RECT_HEIGHT,\n TEXT_BASELINE,\n PADDING_VERTICAL,\n PADDING_HORIZONTAL,\n X_OFFSET,\n Y_OFFSET,\n X_AXIS_TEXT_BASELINE,\n X_AXIS_TICK_LINE_HEIGHT,\n X_AXIS_TICK_START_DY,\n X_AXIS_LABEL_GAP,\n X_AXIS_BOTTOM_PADDING,\n X_AXIS_LABEL_OFFSET,\n X_AXIS_LABEL_HEIGHT,\n LEGEND_MARGIN_TOP,\n MIN_WIDTH,\n MAX_WIDTH,\n DEFAULT_COLOR,\n REFERENCE_BAND_DEFAULT_COLOR,\n REFERENCE_BAND_FILL_OPACITY,\n REFERENCE_BAND_LOWER_CLASS,\n REFERENCE_BAND_UPPER_CLASS,\n REFERENCE_BAND_LAYER_CLASS,\n X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL,\n};\n"],"names":["RECT_WIDTH","RECT_HEIGHT","TEXT_BASELINE","PADDING_VERTICAL","PADDING_HORIZONTAL","X_OFFSET","Y_OFFSET","X_AXIS_TEXT_BASELINE","X_AXIS_TEXT_BASELINE_WITH_SECONDARY_LABEL","X_AXIS_TICK_LINE_HEIGHT","X_AXIS_TICK_START_DY","X_AXIS_LABEL_GAP","X_AXIS_BOTTOM_PADDING","X_AXIS_LABEL_OFFSET","X_AXIS_LABEL_HEIGHT","LEGEND_MARGIN_TOP","MIN_WIDTH","MAX_WIDTH","DEFAULT_COLOR","REFERENCE_BAND_DEFAULT_COLOR","REFERENCE_BAND_FILL_OPACITY","REFERENCE_BAND_LOWER_CLASS","REFERENCE_BAND_UPPER_CLASS","REFERENCE_BAND_LAYER_CLASS","componentId","chartLegend","chartXAxis","chartYAxis","chartCartesianGrid","chartTooltip","chartReferenceLine","chartReferenceBand"],"mappings":"AAAM,IAAAA,UAAU,CAAG,GACb,IAAAC,WAAW,CAAG,GACd,IAAAC,aAAa,CAAG,GAGhB,IAAAC,gBAAgB,CAAG,EACnB,IAAAC,kBAAkB,CAAG,EAErB,IAAAC,QAAQ,CAAG,GACX,IAAAC,QAAQ,CAAG,KACX,IAAAC,oBAAoB,CAAG,GACvB,IAAAC,yCAAyC,CAAG,GAG5C,IAAAC,uBAAuB,CAAG,KAC1B,IAAAC,oBAAoB,CAAG,EACvB,IAAAC,gBAAgB,CAAG,EACnB,IAAAC,qBAAqB,CAAG,EAGxB,IAAAC,mBAAmB,CAAG,EAEtB,IAAAC,mBAAmB,CAAG,GAGtB,IAAAC,iBAAiB,CAAG,EAEpB,IAAAC,SAAS,CAAGhB,WACZ,IAAAiB,SAAS,CAAG,IAEZ,IAAAC,aAAa,CAAG,4CAIhB,IAAAC,4BAA4B,CAAG,yCAC/B,IAAAC,2BAA2B,CAAG,IAI9B,IAAAC,0BAA0B,CAAG,6BAC7B,IAAAC,0BAA0B,CAAG,6BAE7B,IAAAC,0BAA0B,CAAG,6BAE7B,IAAAC,WAAW,CAAG,CAClBC,WAAW,CAAE,cAAc,CAC3BC,UAAU,CAAE,cAAc,CAC1BC,UAAU,CAAE,cAAc,CAC1BC,kBAAkB,CAAE,sBAAsB,CAC1CC,YAAY,CAAE,eAAe,CAC7BC,kBAAkB,CAAE,sBAAsB,CAC1CC,kBAAkB,CAAE,sBACtB;;;;"}
@@ -7,8 +7,11 @@ import { View, Pressable } from 'react-native';
7
7
  import Animated, { useSharedValue, withDelay, withTiming, Easing, useAnimatedProps } from 'react-native-reanimated';
8
8
  import '../utils/index.js';
9
9
  import '../CommonChartComponents/index.js';
10
+ import { componentId, REFERENCE_BAND_DEFAULT_COLOR, REFERENCE_BAND_FILL_OPACITY } from '../CommonChartComponents/tokens.js';
10
11
  import { componentIds } from './componentIds.js';
11
12
  import { LineChartContext } from './LineChartContext.js';
13
+ import { monotoneInterpolate } from '../utils/nullBridgeUtils.js';
14
+ import { buildBandAreaPath } from '../utils/referenceBandUtils.js';
12
15
  import '../../BladeProvider/index.js';
13
16
  import '../../Typography/index.js';
14
17
  import '../../Box/BaseBox/index.js';
@@ -23,7 +26,6 @@ import '../../../utils/metaAttribute/index.js';
23
26
  import { useControllableState } from '../../../utils/useControllable.js';
24
27
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
25
28
  import { getComponentId } from '../../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
26
- import { componentId } from '../CommonChartComponents/tokens.js';
27
29
  import useTheme from '../../BladeProvider/useTheme.js';
28
30
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
29
31
  import { logger } from '../../../utils/logger/logger.js';
@@ -36,7 +38,7 @@ import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/ma
36
38
  import { Box } from '../../Box/Box.js';
37
39
  import { Text } from '../../Typography/Text/Text.js';
38
40
 
39
- var _excluded=["children","colorTheme","testID","data"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Charts/LineChart/LineChart.native.tsx";var AnimatedPath=Animated.createAnimatedComponent(Path);var AnimatedRect=Animated.createAnimatedComponent(Rect);var uniqueChartCounter=0;var PLOT_PADDING={top:16,right:16,bottom:32,left:40};var Y_TICK_COUNT=4;var LEGEND_DOT_SIZE=10;var TICK_FONT_SIZE=10;var AXIS_LABEL_FONT_SIZE=11;var SECONDARY_LABEL_FONT_SIZE=10;var X_AXIS_TITLE_GAP=6;var PRIMARY_TO_SECONDARY_GAP=8;var X_TICK_LABEL_GAP=8;var TICK_LINE_HEIGHT=TICK_FONT_SIZE+2;var MAX_TICK_LABEL_LINES=3;var LINE_STROKE_WIDTH=1.5;var DOT_RADIUS=3;var ACTIVE_DOT_OUTER_RADIUS=6;var ACTIVE_DOT_INNER_RADIUS=3.5;var DIM_OPACITY=0.2;var TOOLTIP_WIDTH=160;var TOOLTIP_VALUE_WIDTH=44;var estimateTextWidth=function estimateTextWidth(label,fontSize){return Math.max(1,label.length)*fontSize*0.6;};var estimateTickLabelWidth=function estimateTickLabelWidth(label,fontSize){return Math.max(1,label.length)*fontSize*0.72+X_TICK_LABEL_GAP;};var wrapLabelToLines=function wrapLabelToLines(label,maxWidth,fontSize){var text=String(label).trim();if(!text)return [''];if(maxWidth<=0)return [text];var maxChars=Math.max(1,Math.floor(maxWidth/(fontSize*0.6)));var words=text.split(/\s+/);var lines=[];var current='';var flush=function flush(){if(current){lines.push(current);current='';}};words.forEach(function(word){var remaining=word;while(remaining.length>maxChars){flush();lines.push(remaining.slice(0,maxChars));remaining=remaining.slice(maxChars);}if(!current){current=remaining;}else if(current.length+1+remaining.length<=maxChars){current=`${current} ${remaining}`;}else {flush();current=remaining;}});flush();if(lines.length>MAX_TICK_LABEL_LINES){var kept=lines.slice(0,MAX_TICK_LABEL_LINES);var lastIndex=MAX_TICK_LABEL_LINES-1;var last=kept[lastIndex];kept[lastIndex]=`${last.slice(0,Math.max(1,maxChars-1))}…`;return kept;}return lines;};var selectNonOverlappingXTickIndices=function selectNonOverlappingXTickIndices(pointCount,widths,xForIndex,forcedStep){if(pointCount<=0)return [];if(pointCount===1)return [0];var rightExtent=function rightExtent(i){return xForIndex(i)+(i===0?widths[i]:widths[i]/2);};var leftExtent=function leftExtent(i){return xForIndex(i)-(i===pointCount-1?widths[i]:widths[i]/2);};var fitsAfter=function fitsAfter(prev,next){return leftExtent(next)>=rightExtent(prev);};if(forcedStep!==undefined){var step=Math.max(1,forcedStep);var indices=[];for(var i=0;i<pointCount;i+=step){indices.push(i);}var _last=pointCount-1;if(indices[indices.length-1]!==_last&&fitsAfter(indices[indices.length-1],_last)){indices.push(_last);}return indices;}var first=0;var last=pointCount-1;var firstLastFit=fitsAfter(first,last);var selected=[first];if(firstLastFit){var _prev=first;for(var _i=1;_i<last;_i++){if(fitsAfter(_prev,_i)&&fitsAfter(_i,last)){selected.push(_i);_prev=_i;}}selected.push(last);return selected;}var prev=first;for(var _i2=1;_i2<pointCount;_i2++){if(fitsAfter(prev,_i2)){selected.push(_i2);prev=_i2;}}return selected;};var readChildSlots=function readChildSlots(children){var slots={lines:[],hasXAxis:false,hasYAxis:false,hasLegend:false,legend:{},hasGrid:false,referenceLines:[],hasTooltip:false,tooltipFilterNull:true};React__default.Children.forEach(children,function(child){if(!React__default.isValidElement(child))return;var id=getComponentId(child);if(id===componentIds.ChartLine){var _props$strokeStyle,_props$type,_props$showLegend;var props=child.props;slots.lines.push({dataKey:props.dataKey,name:props.name,color:props.color,strokeStyle:(_props$strokeStyle=props.strokeStyle)!=null?_props$strokeStyle:'solid',type:(_props$type=props.type)!=null?_props$type:'monotone',dot:Boolean(props.dot),activeDot:props.activeDot!==false,connectNulls:Boolean(props.connectNulls),showLegend:(_props$showLegend=props.showLegend)!=null?_props$showLegend:true,hide:props.hide});}else if(id===componentId.chartXAxis){var _props2=child.props;slots.hasXAxis=true;slots.xDataKey=_props2.dataKey;slots.xSecondaryDataKey=_props2.secondaryDataKey;slots.xTickFormatter=_props2.tickFormatter;slots.xInterval=_props2.interval;slots.xLabel=_props2.label;}else if(id===componentId.chartYAxis){var _props3=child.props;slots.hasYAxis=true;slots.yLabel=_props3.label;if(Array.isArray(_props3.domain)&&_props3.domain.length===2){slots.yDomain=[_props3.domain[0],_props3.domain[1]];}slots.yTickFormatter=_props3.tickFormatter;if(typeof _props3.tickCount==='number'){slots.yTickCount=_props3.tickCount;}}else if(id===componentId.chartLegend){var _props4=child.props;slots.hasLegend=true;slots.legend={layout:_props4.layout,align:_props4.align,selectedDataKeys:_props4.selectedDataKeys,defaultSelectedDataKeys:_props4.defaultSelectedDataKeys,onSelectedDataKeysChange:_props4.onSelectedDataKeysChange};}else if(id===componentId.chartCartesianGrid){slots.hasGrid=true;}else if(id===componentId.chartTooltip){slots.hasTooltip=true;var _props5=child.props;if(typeof _props5.formatter==='function'){slots.tooltipFormatter=_props5.formatter;}if(_props5.filterNull!==undefined){slots.tooltipFilterNull=Boolean(_props5.filterNull);}}else if(id===componentId.chartReferenceLine){var _props6=child.props;slots.referenceLines.push({y:typeof _props6.y==='number'?_props6.y:undefined,x:_props6.x,label:typeof _props6.label==='string'?_props6.label:undefined});}});return slots;};var niceCeil=function niceCeil(raw){if(raw<=0)return 1;var exponent=Math.floor(Math.log10(raw));var fraction=raw/10**exponent;var niceFraction=fraction<=1?1:fraction<=2?2:fraction<=5?5:10;return niceFraction*10**exponent;};var niceFloor=function niceFloor(raw){if(raw>=0)return 0;return -niceCeil(-raw);};var toNullableNumber=function toNullableNumber(raw){if(raw===null||raw===undefined)return null;var value=Number(raw);return Number.isNaN(value)||!isFinite(value)?null:value;};var getRowValue=function getRowValue(row,dataKey){return(getIn(row,dataKey));};var getSeriesNumber=function getSeriesNumber(row,dataKey){return toNullableNumber(getRowValue(row,dataKey));};var resolveYMax=function resolveYMax(dataMax){if(dataMax>0)return niceCeil(dataMax);if(dataMax<0)return 0;return 1;};var MISSING_TOOLTIP_VALUE='—';var formatYTick=function formatYTick(value){var abs=Math.abs(value);if(abs>=1000000)return `${(value/1000000).toFixed(abs>=10000000?0:1)}M`;if(abs>=1000)return `${(value/1000).toFixed(abs>=10000?0:1)}K`;return String(value);};var buildLinearPath=function buildLinearPath(points){if(points.length===0)return '';return `M ${points[0].x} ${points[0].y}${points.slice(1).map(function(p){return ` L ${p.x} ${p.y}`;}).join('')}`;};var buildStepPath=function buildStepPath(points,variant){if(points.length===0)return '';var d=`M ${points[0].x} ${points[0].y}`;for(var i=1;i<points.length;i++){var prev=points[i-1];var cur=points[i];if(variant==='stepBefore'){d+=` L ${prev.x} ${cur.y} L ${cur.x} ${cur.y}`;}else if(variant==='stepAfter'){d+=` L ${cur.x} ${prev.y} L ${cur.x} ${cur.y}`;}else {var midX=(prev.x+cur.x)/2;d+=` L ${midX} ${prev.y} L ${midX} ${cur.y} L ${cur.x} ${cur.y}`;}}return d;};var buildMonotonePath=function buildMonotonePath(points){var n=points.length;if(n===0)return '';if(n===1)return `M ${points[0].x} ${points[0].y}`;if(n===2)return `M ${points[0].x} ${points[0].y} L ${points[1].x} ${points[1].y}`;var dxs=[];var ms=[];for(var i=0;i<n-1;i++){var dx=points[i+1].x-points[i].x;var dy=points[i+1].y-points[i].y;dxs.push(dx);ms.push(dx===0?0:dy/dx);}var tangents=[ms[0]];for(var _i3=0;_i3<dxs.length-1;_i3++){var m=ms[_i3];var mNext=ms[_i3+1];if(m*mNext<=0){tangents.push(0);}else {var _dx=dxs[_i3];var dxNext=dxs[_i3+1];var common=_dx+dxNext;tangents.push(3*common/((common+dxNext)/m+(common+_dx)/mNext));}}tangents.push(ms[ms.length-1]);var d=`M ${points[0].x} ${points[0].y}`;for(var _i4=0;_i4<n-1;_i4++){var p0=points[_i4];var p1=points[_i4+1];var _dx2=(p1.x-p0.x)/3;d+=` C ${p0.x+_dx2} ${p0.y+_dx2*tangents[_i4]} ${p1.x-_dx2} ${p1.y-_dx2*tangents[_i4+1]} ${p1.x} ${p1.y}`;}return d;};var buildPath=function buildPath(points,type){switch(type){case'linear':return buildLinearPath(points);case'step':case'stepAfter':case'stepBefore':return buildStepPath(points,type);case'monotone':default:return buildMonotonePath(points);}};var getStrokeDasharray=function getStrokeDasharray(strokeStyle){return strokeStyle==='dashed'?'5 5':strokeStyle==='dotted'?'2 2':undefined;};var buildSegments=function buildSegments(points,connectNulls){var definedPoints=points.filter(function(p){return p.value!==null;});if(connectNulls){return definedPoints.length>0?[definedPoints.map(function(_ref){var x=_ref.x,y=_ref.y;return {x:x,y:y};})]:[];}var segments=[];var current=[];points.forEach(function(p){if(p.value===null){if(current.length>0){segments.push(current);current=[];}}else {current.push({x:p.x,y:p.y});}});if(current.length>0)segments.push(current);return segments;};var LineSeries=function LineSeries(_ref2){var geometry=_ref2.geometry,index=_ref2.index,plotWidth=_ref2.plotWidth,plotHeight=_ref2.plotHeight,hoveredKey=_ref2.hoveredKey,dataSignature=_ref2.dataSignature,chartId=_ref2.chartId;var _useTheme=useTheme(),theme=_useTheme.theme;var line=geometry.line,color=geometry.color,points=geometry.points;var draw=useSharedValue(0);var dim=useSharedValue(1);var duration=getIn(theme.motion,'duration.xgentle');var baseDelay=getIn(theme.motion,'delay.gentle');var beginDelay=line.strokeStyle==='dashed'?baseDelay+duration:baseDelay;var drawEasing=getIn(theme.motion,'easing.standard');var dimDuration=getIn(theme.motion,'duration.gentle');useEffect(function(){draw.value=0;draw.value=withDelay(beginDelay,withTiming(1,{duration:duration,easing:drawEasing}));},[duration,beginDelay,dataSignature]);useEffect(function(){var isOther=hoveredKey!==null&&hoveredKey!==line.dataKey;dim.value=withTiming(isOther?DIM_OPACITY:1,{duration:dimDuration,easing:Easing.bezier(0.42,0,0.58,1)});},[hoveredKey,line.dataKey,dimDuration]);var clipProps=useAnimatedProps(function(){return {width:Math.max(0,plotWidth*draw.value)};});var dimProps=useAnimatedProps(function(){return {strokeOpacity:dim.value};});var segments=useMemo(function(){return buildSegments(points,line.connectNulls);},[points,line.connectNulls]);var dash=getStrokeDasharray(line.strokeStyle);var clipId=`line-${chartId}-reveal-${index}`;return jsxs(G,{children:[jsx(Defs,{children:jsx(ClipPath,{id:clipId,children:jsx(AnimatedRect,{x:0,y:0,height:plotHeight,animatedProps:clipProps})})}),jsxs(G,{clipPath:`url(#${clipId})`,children:[segments.map(function(segment,segmentIndex){return jsx(AnimatedPath,{testID:`line-path-${line.dataKey}`,d:buildPath(segment,line.type),stroke:color,strokeWidth:LINE_STROKE_WIDTH,strokeDasharray:dash,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",animatedProps:dimProps},`segment-${segmentIndex}`);}),line.dot?points.map(function(p,pointIndex){return p.value===null?null:jsx(Circle,{cx:p.x,cy:p.y,r:DOT_RADIUS,fill:color},`dot-${pointIndex}`);}):null]})]});};var _ChartLine=function _ChartLine(_props){return null;};var ChartLine=assignWithoutSideEffects(_ChartLine,{componentId:componentIds.ChartLine});var ChartLineWrapper=function ChartLineWrapper(_ref3){var _slots$legend$default,_slots$yTickCount,_getRowValue2;var children=_ref3.children,_ref3$colorTheme=_ref3.colorTheme,colorTheme=_ref3$colorTheme===void 0?'categorical':_ref3$colorTheme,testID=_ref3.testID,_ref3$data=_ref3.data,data=_ref3$data===void 0?[]:_ref3$data,restProps=_objectWithoutProperties(_ref3,_excluded);var _useTheme2=useTheme(),theme=_useTheme2.theme;var _useState=useState({width:0,height:0}),_useState2=_slicedToArray(_useState,2),size=_useState2[0],setSize=_useState2[1];var _useState3=useState(undefined),_useState4=_slicedToArray(_useState3,2),activeIndex=_useState4[0],setActiveIndex=_useState4[1];var _useState5=useState(null),_useState6=_slicedToArray(_useState5,2),hoveredKey=_useState6[0],setHoveredKey=_useState6[1];var chartIdRef=useRef(undefined);if(chartIdRef.current===undefined){chartIdRef.current=`line-${uniqueChartCounter++}`;}var chartId=chartIdRef.current;var onLayout=function onLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,width=_e$nativeEvent$layout.width,height=_e$nativeEvent$layout.height;if(width!==size.width||height!==size.height){setSize({width:width,height:height});}};var slots=useMemo(function(){return readChildSlots(children);},[children]);var allLines=slots.lines;var yAxisWarnedRef=useRef(false);useEffect(function(){if(!__DEV__)return;if(slots.hasYAxis&&!yAxisWarnedRef.current){var unsupported=[];if(slots.yDomain&&!slots.yDomain.every(function(v){return isNumber(Number(v));})){unsupported.push('domain (non-numeric)');}if(unsupported.length>0){yAxisWarnedRef.current=true;logger({type:'warn',moduleName:'ChartLineWrapper',message:`ChartYAxis prop(s) [${unsupported.join(', ')}] are not fully supported on native. Supported: label, domain (numeric), tickFormatter, tickCount.`});}}},[slots.hasYAxis,slots.yDomain]);var themeColors=useChartsColorTheme({colorTheme:colorTheme,chartName:'line',chartDataIndicators:allLines.length});var dataColorMapping=useMemo(function(){var mapping={};allLines.forEach(function(line){mapping[line.dataKey]={colorToken:line.color,isCustomColor:Boolean(line.color)};});assignDataColorMapping(mapping,themeColors);return mapping;},[allLines,themeColors]);var allDataKeys=useMemo(function(){return Object.keys(dataColorMapping);},[dataColorMapping]);var _useControllableState=useControllableState({value:slots.legend.selectedDataKeys,defaultValue:(_slots$legend$default=slots.legend.defaultSelectedDataKeys)!=null?_slots$legend$default:allDataKeys}),_useControllableState2=_slicedToArray(_useControllableState,2),selectedKeys=_useControllableState2[0],setSelectedKeys=_useControllableState2[1];var hasUserInteractedRef=React__default.useRef(false);var isControlled=slots.legend.selectedDataKeys!==undefined;var shouldAutoSelectAllDataKeys=!isControlled&&slots.legend.defaultSelectedDataKeys===undefined;useEffect(function(){if(!shouldAutoSelectAllDataKeys||hasUserInteractedRef.current||allDataKeys.length===0){return;}var isInSync=selectedKeys.length===allDataKeys.length&&allDataKeys.every(function(dataKey){return selectedKeys.includes(dataKey);});if(!isInSync){setSelectedKeys(function(){return _toConsumableArray(allDataKeys);},true);}},[allDataKeys,selectedKeys,shouldAutoSelectAllDataKeys]);useEffect(function(){if(allDataKeys.length>0&&selectedKeys.length>0){var hasOverlap=selectedKeys.some(function(key){return allDataKeys.includes(key);});if(!hasOverlap){setSelectedKeys(function(){return _toConsumableArray(allDataKeys);});}}},[allDataKeys,selectedKeys]);var isVisible=function isVisible(dataKey){return selectedKeys.includes(dataKey);};var toggleLegend=function toggleLegend(dataKey){hasUserInteractedRef.current=true;var next=selectedKeys.includes(dataKey)?selectedKeys.filter(function(k){return k!==dataKey;}):[].concat(_toConsumableArray(selectedKeys),[dataKey]);setSelectedKeys(function(){return next;});slots.legend.onSelectedDataKeysChange==null?void 0:slots.legend.onSelectedDataKeysChange({dataKey:dataKey,selectedKeysArray:next});};var visibleLines=useMemo(function(){return allLines.filter(function(l){return isVisible(l.dataKey)&&!l.hide;});},[allLines,selectedKeys]);var secondaryLabelMap=useMemo(function(){if(!slots.xSecondaryDataKey||!(data!=null&&data.length))return undefined;var map={};data.forEach(function(row,index){map[index]=getRowValue(row,slots.xSecondaryDataKey);});return map;},[data,slots.xSecondaryDataKey]);var _useMemo=useMemo(function(){if(!data.length)return {dataMin:0,dataMax:0};var linesForDomain=visibleLines.length?visibleLines:allLines;var min=Infinity;var max=-Infinity;data.forEach(function(row){linesForDomain.forEach(function(line){var value=getSeriesNumber(row,line.dataKey);if(value===null)return;if(value<min)min=value;if(value>max)max=value;});});if(min===Infinity)min=0;if(max===-Infinity)max=0;return {dataMin:min,dataMax:max};},[data,visibleLines,allLines]),dataMin=_useMemo.dataMin,dataMax=_useMemo.dataMax;var yMax=slots.yDomain?Number(slots.yDomain[1]):resolveYMax(dataMax);var yMin=slots.yDomain?Number(slots.yDomain[0]):dataMin<0?niceFloor(dataMin):0;var yRange=yMax-yMin;var yTickCount=(_slots$yTickCount=slots.yTickCount)!=null?_slots$yTickCount:Y_TICK_COUNT;var yTicks=useMemo(function(){var ticks=[];for(var i=0;i<=yTickCount;i++){ticks.push(yMin+yRange/yTickCount*i);}return ticks;},[yMin,yRange,yTickCount]);var showAxes=slots.hasXAxis||slots.hasYAxis;var hasSecondaryXLabels=Boolean(slots.xSecondaryDataKey);var secondaryRowHeight=hasSecondaryXLabels?SECONDARY_LABEL_FONT_SIZE+PRIMARY_TO_SECONDARY_GAP:0;var xAxisTitleHeight=slots.xLabel?AXIS_LABEL_FONT_SIZE+X_AXIS_TITLE_GAP:0;var plotWidthForLabels=Math.max(0,size.width-PLOT_PADDING.left-PLOT_PADDING.right);var pointCount=data.length;var columnWidth=pointCount>1?plotWidthForLabels/(pointCount-1):plotWidthForLabels;var xLabels=useMemo(function(){return data.map(function(row,index){var _getRowValue;var rawLabel=slots.xDataKey?String((_getRowValue=getRowValue(row,slots.xDataKey))!=null?_getRowValue:''):String(index);return slots.xTickFormatter?slots.xTickFormatter(rawLabel,index):rawLabel;});},[data,slots.xDataKey,slots.xTickFormatter]);var xLabelLines=useMemo(function(){var maxWidth=Math.max(0,columnWidth*0.6-X_TICK_LABEL_GAP);return xLabels.map(function(label){return wrapLabelToLines(label,maxWidth,TICK_FONT_SIZE);});},[xLabels,columnWidth]);var maxXLabelLines=useMemo(function(){return xLabelLines.reduce(function(max,lines){return Math.max(max,lines.length);},1);},[xLabelLines]);var primaryLabelRowHeight=maxXLabelLines*TICK_LINE_HEIGHT;var padding=showAxes?Object.assign({},PLOT_PADDING,{bottom:Math.max(PLOT_PADDING.bottom,primaryLabelRowHeight+4+secondaryRowHeight+xAxisTitleHeight+4)}):{top:0,right:0,bottom:0,left:0};var plotWidth=Math.max(0,size.width-padding.left-padding.right);var plotHeight=Math.max(0,size.height-padding.top-padding.bottom);var pointSpacing=pointCount>1?plotWidth/(pointCount-1):0;var xForIndex=function xForIndex(index){return pointCount>1?index*pointSpacing:plotWidth/2;};var visibleXTickIndices=useMemo(function(){if(pointCount<=0)return [];var widths=xLabelLines.map(function(lines,index){var primaryWidth=lines.reduce(function(max,line){return Math.max(max,estimateTextWidth(line,TICK_FONT_SIZE));},0);var secondary=secondaryLabelMap==null?void 0:secondaryLabelMap[index];var secondaryWidth=secondary!==undefined&&secondary!==null?estimateTickLabelWidth(String(secondary),SECONDARY_LABEL_FONT_SIZE):0;return Math.max(primaryWidth,secondaryWidth);});var forcedStep=slots.xInterval!==undefined?Math.max(1,slots.xInterval+1):undefined;return selectNonOverlappingXTickIndices(pointCount,widths,xForIndex,forcedStep);},[pointCount,pointSpacing,plotWidth,xLabelLines,secondaryLabelMap,slots.xInterval]);var visibleXTickIndexSet=useMemo(function(){return new Set(visibleXTickIndices);},[visibleXTickIndices]);var tickColor=getIn(theme.colors,'surface.text.gray.muted');var axisLineColor=getIn(theme.colors,'surface.border.gray.muted');var gridColor=getIn(theme.colors,'surface.border.gray.subtle');var resolveColor=function resolveColor(dataKey,fallback){var _dataColorMapping$dat,_dataColorMapping$dat2;var token=(_dataColorMapping$dat=(_dataColorMapping$dat2=dataColorMapping[dataKey])==null?void 0:_dataColorMapping$dat2.colorToken)!=null?_dataColorMapping$dat:fallback;return token?getIn(theme.colors,token):tickColor;};var lineGeometries=useMemo(function(){return visibleLines.map(function(line){var points=data.map(function(row,index){var value=getSeriesNumber(row,line.dataKey);return {x:xForIndex(index),y:value===null?0:plotHeight-(value-yMin)/yRange*plotHeight,value:value};});return {line:line,color:resolveColor(line.dataKey,line.color),points:points};});},[visibleLines,data,plotWidth,plotHeight,yMin,yRange,dataColorMapping,theme.colors]);var dataSignature=useMemo(function(){return `${data.length}:${allDataKeys.join(',')}`;},[data.length,allDataKeys]);var indexAtTouchX=function indexAtTouchX(locationX){if(pointCount===0||plotWidth<=0)return undefined;var localX=locationX-padding.left;return pointCount>1?Math.min(pointCount-1,Math.max(0,Math.round(localX/pointSpacing))):0;};var applyScrub=function applyScrub(e){if(pointCount===0||plotWidth<=0)return undefined;var localX=e.nativeEvent.locationX-padding.left;var localY=e.nativeEvent.locationY-padding.top;var index=pointCount>1?Math.min(pointCount-1,Math.max(0,Math.round(localX/pointSpacing))):0;setActiveIndex(index);var nearestKey=null;var nearestDist=Infinity;lineGeometries.forEach(function(geometry){var point=geometry.points[index];if(!point||point.value===null)return;var dist=Math.abs(point.y-localY);if(dist<nearestDist){nearestDist=dist;nearestKey=geometry.line.dataKey;}});setHoveredKey(nearestKey);return index;};var touchStartActiveRef=React__default.useRef(undefined);var touchStartIndexRef=React__default.useRef(undefined);var touchMovedRef=React__default.useRef(false);var becameResponderRef=React__default.useRef(false);var touchStartLocationRef=React__default.useRef(undefined);var SCRUB_MOVE_THRESHOLD=8;var handleTouchStart=function handleTouchStart(e){if(data.length===0)return;touchStartActiveRef.current=activeIndex;touchStartIndexRef.current=indexAtTouchX(e.nativeEvent.locationX);touchMovedRef.current=false;becameResponderRef.current=false;touchStartLocationRef.current={x:e.nativeEvent.locationX,y:e.nativeEvent.locationY};};var handleScrubStart=function handleScrubStart(e){if(data.length===0)return;becameResponderRef.current=true;touchMovedRef.current=true;applyScrub(e);};var handleScrubMove=function handleScrubMove(e){touchMovedRef.current=true;applyScrub(e);};var handleTouchEnd=function handleTouchEnd(){if(becameResponderRef.current||touchMovedRef.current)return;if(data.length===0)return;if(touchStartActiveRef.current===touchStartIndexRef.current){setActiveIndex(undefined);setHoveredKey(null);}else if(touchStartIndexRef.current!==undefined){var _touchStartLocationRe;setActiveIndex(touchStartIndexRef.current);var tapIndex=touchStartIndexRef.current;var tapY=(_touchStartLocationRe=touchStartLocationRef.current)==null?void 0:_touchStartLocationRe.y;if(tapY!==undefined){var localY=tapY-padding.top;var nearestKey=null;var nearestDist=Infinity;lineGeometries.forEach(function(geometry){var point=geometry.points[tapIndex];if(!point||point.value===null)return;var dist=Math.abs(point.y-localY);if(dist<nearestDist){nearestDist=dist;nearestKey=geometry.line.dataKey;}});setHoveredKey(nearestKey);}}};var handleScrubTerminate=function handleScrubTerminate(){becameResponderRef.current=false;};var activeRow=activeIndex!==undefined?data[activeIndex]:undefined;var activeLabelRaw=activeRow&&slots.xDataKey?String((_getRowValue2=getRowValue(activeRow,slots.xDataKey))!=null?_getRowValue2:activeIndex):undefined;var activeLabel=activeLabelRaw?slots.xTickFormatter?slots.xTickFormatter(activeLabelRaw,activeIndex!=null?activeIndex:0):activeLabelRaw:undefined;var tooltipRows=useMemo(function(){if(!activeRow)return [];var rows=[];visibleLines.forEach(function(line){var _line$name;var rawValue=getSeriesNumber(activeRow,line.dataKey);if(rawValue===null&&slots.tooltipFilterNull)return;var color=resolveColor(line.dataKey,line.color);var displayValue=rawValue===null?MISSING_TOOLTIP_VALUE:String(rawValue);var label=(_line$name=line.name)!=null?_line$name:line.dataKey;var formatter=slots.tooltipFormatter;if(formatter){try{var formatted=formatter(rawValue!=null?rawValue:undefined,line.dataKey,undefined,activeIndex,activeRow);if(Array.isArray(formatted)){if(formatted[0]!==undefined&&formatted[0]!==null){displayValue=String(formatted[0]);}if(formatted[1]!==undefined&&formatted[1]!==null){label=String(formatted[1]);}}else if(formatted!==undefined&&formatted!==null){displayValue=String(formatted);}}catch(_unused){}}rows.push({key:line.dataKey,color:color,displayValue:displayValue,label:label});});return rows;},[activeRow,visibleLines,dataColorMapping,theme.colors,slots.tooltipFormatter,slots.tooltipFilterNull,activeIndex]);var legendLines=allLines.filter(function(line){return line.showLegend;});var lineChartContextValue=useMemo(function(){return {hoveredDataKey:hoveredKey,setHoveredDataKey:setHoveredKey};},[hoveredKey]);var commonChartContextValue=useMemo(function(){return {chartName:'line',dataColorMapping:dataColorMapping,selectedDataKeys:selectedKeys,setSelectedDataKeys:function setSelectedDataKeys(keys){return setSelectedKeys(function(){return keys;});},secondaryLabelMap:secondaryLabelMap,dataLength:data==null?void 0:data.length};},[dataColorMapping,selectedKeys,secondaryLabelMap,data==null?void 0:data.length]);var layoutTestID=testID?`${testID}-layout`:undefined;return jsx(LineChartContext.Provider,{value:lineChartContextValue,children:jsx(CommonChartComponentsContext.Provider,{value:commonChartContextValue,children:jsxs(BaseBox,Object.assign({},metaAttribute({name:'line-chart',testID:testID}),makeAnalyticsAttribute(restProps),{width:"100%",height:"100%",display:"flex",flexDirection:"column"},restProps,{children:[jsxs(View,{testID:layoutTestID,style:{flex:1,width:'100%',overflow:'visible'},onLayout:onLayout,onTouchStart:handleTouchStart,onTouchEnd:handleTouchEnd,onMoveShouldSetResponder:function onMoveShouldSetResponder(e){if(data.length===0)return false;var start=touchStartLocationRef.current;if(!start||!(e!=null&&e.nativeEvent))return false;var dx=Math.abs(e.nativeEvent.locationX-start.x);var dy=Math.abs(e.nativeEvent.locationY-start.y);return dx>=SCRUB_MOVE_THRESHOLD&&dx>dy;},onResponderGrant:handleScrubStart,onResponderMove:handleScrubMove,onResponderTerminationRequest:function onResponderTerminationRequest(){return true;},onResponderTerminate:handleScrubTerminate,children:[data.length===0?jsx(Box,{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"spacing.6",children:jsx(Text,{size:"small",color:"surface.text.gray.muted",children:"No data to display"})}):size.width>0&&size.height>0?jsx(Svg,{width:size.width,height:size.height,pointerEvents:"none",children:jsxs(G,{x:padding.left,y:padding.top,children:[slots.hasGrid&&yTicks.map(function(tick,idx){var y=plotHeight-(tick-yMin)/yRange*plotHeight;return jsx(Line,{x1:0,x2:plotWidth,y1:y,y2:y,stroke:gridColor,strokeWidth:1},`grid-${idx}`);}),slots.hasYAxis&&jsxs(Fragment,{children:[jsx(Line,{x1:0,x2:0,y1:0,y2:plotHeight,stroke:axisLineColor,strokeWidth:1}),yTicks.map(function(tick,idx){var y=plotHeight-(tick-yMin)/yRange*plotHeight;return jsx(Text$1,{x:-6,y:y+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:tickColor,textAnchor:"end",children:slots.yTickFormatter?slots.yTickFormatter(tick,idx):formatYTick(tick)},`ytick-${idx}`);}),slots.yLabel?jsx(Text$1,{x:-(PLOT_PADDING.left-AXIS_LABEL_FONT_SIZE-2),y:plotHeight/2,fontSize:AXIS_LABEL_FONT_SIZE,fill:tickColor,textAnchor:"middle",transform:`rotate(-90 ${-(PLOT_PADDING.left-AXIS_LABEL_FONT_SIZE-2)} ${plotHeight/2})`,children:slots.yLabel}):null]}),lineGeometries.map(function(geometry,idx){return jsx(LineSeries,{geometry:geometry,index:idx,plotWidth:plotWidth,plotHeight:plotHeight,hoveredKey:hoveredKey,dataSignature:dataSignature,chartId:chartId},`line-${geometry.line.dataKey}`);}),activeIndex!==undefined&&hoveredKey!==null?lineGeometries.map(function(geometry){if(geometry.line.dataKey!==hoveredKey)return null;if(!geometry.line.activeDot)return null;var point=geometry.points[activeIndex];if(!point||point.value===null)return null;return jsxs(G,{children:[jsx(Circle,{cx:point.x,cy:point.y,r:ACTIVE_DOT_OUTER_RADIUS,fill:geometry.color,fillOpacity:0.2}),jsx(Circle,{cx:point.x,cy:point.y,r:ACTIVE_DOT_INNER_RADIUS,fill:geometry.color,stroke:getIn(theme.colors,'surface.background.gray.intense'),strokeWidth:1.5})]},`active-dot-${geometry.line.dataKey}`);}):null,slots.referenceLines.map(function(refLine,idx){var isVertical=refLine.x!==undefined&&refLine.x!==null;var stroke=getIn(theme.colors,'data.background.categorical.gray.intense');var chipFill=getIn(theme.colors,'surface.background.gray.subtle');var chipStroke=getIn(theme.colors,'surface.border.gray.muted');var chipTextColor=getIn(theme.colors,'surface.text.gray.normal');var chipWidth=refLine.label?Math.max(40,refLine.label.length*6+16):0;var chipHeight=20;if(isVertical){var index=-1;if(slots.xDataKey){index=data.findIndex(function(row){return String(getRowValue(row,slots.xDataKey))===String(refLine.x);});}if(index<0&&isNumber(Number(refLine.x))){index=Number(refLine.x);}if(index<0||index>pointCount-1)return null;var x=xForIndex(index);return jsxs(G,{children:[jsx(Line,{x1:x,x2:x,y1:0,y2:plotHeight,stroke:stroke,strokeWidth:2,strokeDasharray:"4 4"}),refLine.label?jsxs(G,{children:[jsx(Rect,{x:x-chipWidth/2,y:0,width:chipWidth,height:chipHeight,rx:theme.border.radius.medium,fill:chipFill,stroke:chipStroke,strokeWidth:1}),jsx(Text$1,{x:x,y:chipHeight/2+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:chipTextColor,textAnchor:"middle",children:refLine.label})]}):null]},`refline-${idx}`);}if(refLine.y===undefined||refLine.y>yMax||refLine.y<yMin)return null;var y=plotHeight-(refLine.y-yMin)/yRange*plotHeight;return jsxs(G,{children:[jsx(Line,{x1:0,x2:plotWidth,y1:y,y2:y,stroke:stroke,strokeWidth:2,strokeDasharray:"4 4"}),refLine.label?jsxs(G,{children:[jsx(Rect,{x:plotWidth-chipWidth,y:y-chipHeight/2,width:chipWidth,height:chipHeight,rx:theme.border.radius.medium,fill:chipFill,stroke:chipStroke,strokeWidth:1}),jsx(Text$1,{x:plotWidth-chipWidth/2,y:y+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:chipTextColor,textAnchor:"middle",children:refLine.label})]}):null]},`refline-${idx}`);}),slots.hasXAxis&&jsxs(Fragment,{children:[jsx(Line,{x1:0,x2:plotWidth,y1:plotHeight,y2:plotHeight,stroke:axisLineColor,strokeWidth:1}),data.map(function(row,index){var _xLabelLines$index;if(!visibleXTickIndexSet.has(index))return null;var cx=xForIndex(index);var lines=(_xLabelLines$index=xLabelLines[index])!=null?_xLabelLines$index:[''];var secondary=secondaryLabelMap==null?void 0:secondaryLabelMap[index];var primaryY=plotHeight+TICK_FONT_SIZE+4;var anchor=index===0?'start':index===pointCount-1?'end':'middle';var secondaryY=primaryY+(maxXLabelLines-1)*TICK_LINE_HEIGHT+SECONDARY_LABEL_FONT_SIZE+PRIMARY_TO_SECONDARY_GAP;return jsxs(G,{children:[lines.map(function(line,lineIndex){return jsx(Text$1,{x:cx,y:primaryY+lineIndex*TICK_LINE_HEIGHT,fontSize:TICK_FONT_SIZE,fill:tickColor,textAnchor:anchor,children:line},`xtick-${index}-line-${lineIndex}`);}),secondary!==undefined&&secondary!==null?jsx(Text$1,{x:cx,y:secondaryY,fontSize:SECONDARY_LABEL_FONT_SIZE,fill:tickColor,textAnchor:anchor,children:String(secondary)}):null]},`xtick-${index}`);})]}),slots.xLabel?jsx(Text$1,{x:plotWidth/2,y:plotHeight+padding.bottom-4,fontSize:AXIS_LABEL_FONT_SIZE,fill:tickColor,textAnchor:"middle",children:slots.xLabel}):null]})}):null,slots.hasTooltip&&activeIndex!==undefined&&tooltipRows.length>0&&size.width>0?jsxs(View,{pointerEvents:"none",style:{position:'absolute',top:padding.top,left:Math.max(padding.left,Math.min(size.width-TOOLTIP_WIDTH-padding.right,padding.left+xForIndex(activeIndex)-TOOLTIP_WIDTH/2)),width:TOOLTIP_WIDTH,backgroundColor:getIn(theme.colors,'surface.icon.staticBlack.normal'),borderRadius:theme.border.radius.large,borderWidth:1,borderColor:getIn(theme.colors,'surface.border.gray.muted'),paddingHorizontal:theme.spacing[4],paddingVertical:theme.spacing[4],shadowColor:getIn(theme.colors,'surface.icon.staticBlack.normal'),shadowOpacity:0.2,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:4},children:[activeLabel?jsx(Box,{paddingBottom:"spacing.2",children:jsx(Text,{size:"small",weight:"semibold",color:"surface.text.staticWhite.normal",children:activeLabel})}):null,tooltipRows.map(function(row){return jsxs(View,{style:{flexDirection:'row',alignItems:'flex-start',paddingVertical:theme.spacing[1]},children:[jsx(View,{style:{width:8,height:8,borderRadius:2,backgroundColor:row.color,marginRight:theme.spacing[2],marginTop:3}}),jsx(View,{style:{flex:1,marginRight:theme.spacing[2]},children:jsx(Text,{size:"xsmall",color:"surface.text.staticWhite.normal",children:row.label})}),jsx(View,{style:{width:TOOLTIP_VALUE_WIDTH},children:jsx(Text,{size:"xsmall",weight:"semibold",color:"surface.text.staticWhite.normal",textAlign:"right",children:row.displayValue})})]},row.key);})]}):null]}),slots.hasLegend&&legendLines.length>0?jsx(View,{style:{flexDirection:slots.legend.layout==='vertical'?'column':'row',flexWrap:slots.legend.layout==='vertical'?'nowrap':'wrap',alignItems:slots.legend.layout==='vertical'?'flex-start':'center',justifyContent:slots.legend.align==='left'?'flex-start':slots.legend.align==='right'?'flex-end':'center',paddingTop:theme.spacing[3],paddingHorizontal:theme.spacing[3]},children:legendLines.map(function(line){var _line$name2,_line$name3;var selected=isVisible(line.dataKey);var swatchColor=selected?resolveColor(line.dataKey,line.color):getIn(theme.colors,'surface.text.gray.muted');return jsxs(Pressable,Object.assign({testID:`legend-${line.dataKey}`,onPress:function onPress(){return toggleLegend(line.dataKey);},accessibilityRole:"button",accessibilityLabel:`${(_line$name2=line.name)!=null?_line$name2:line.dataKey}, ${selected?'selected':'deselected'}`,style:{flexDirection:'row',alignItems:'center',opacity:selected?1:0.5,paddingVertical:theme.spacing[1],paddingHorizontal:theme.spacing[2]}},metaAttribute({name:`chart-legend-item-${line.dataKey}`}),{children:[jsx(View,{style:{width:LEGEND_DOT_SIZE,height:LEGEND_DOT_SIZE,borderRadius:theme.border.radius['2xsmall'],backgroundColor:swatchColor,marginRight:theme.spacing[2]}}),jsx(Text,{size:"small",color:"surface.text.gray.muted",children:(_line$name3=line.name)!=null?_line$name3:line.dataKey})]}),`legend-${line.dataKey}`);})}):null]}))})});};
41
+ var _excluded=["children","colorTheme","testID","data"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Charts/LineChart/LineChart.native.tsx";var AnimatedPath=Animated.createAnimatedComponent(Path);var AnimatedRect=Animated.createAnimatedComponent(Rect);var uniqueChartCounter=0;var PLOT_PADDING={top:16,right:16,bottom:32,left:40};var Y_TICK_COUNT=4;var LEGEND_DOT_SIZE=10;var TICK_FONT_SIZE=10;var AXIS_LABEL_FONT_SIZE=11;var SECONDARY_LABEL_FONT_SIZE=10;var X_AXIS_TITLE_GAP=6;var PRIMARY_TO_SECONDARY_GAP=8;var X_TICK_LABEL_GAP=8;var TICK_LINE_HEIGHT=TICK_FONT_SIZE+2;var MAX_TICK_LABEL_LINES=3;var LINE_STROKE_WIDTH=1.5;var DOT_RADIUS=3;var ACTIVE_DOT_OUTER_RADIUS=6;var ACTIVE_DOT_INNER_RADIUS=3.5;var DIM_OPACITY=0.2;var TOOLTIP_WIDTH=160;var TOOLTIP_VALUE_WIDTH=44;var estimateTextWidth=function estimateTextWidth(label,fontSize){return Math.max(1,label.length)*fontSize*0.6;};var estimateTickLabelWidth=function estimateTickLabelWidth(label,fontSize){return Math.max(1,label.length)*fontSize*0.72+X_TICK_LABEL_GAP;};var wrapLabelToLines=function wrapLabelToLines(label,maxWidth,fontSize){var text=String(label).trim();if(!text)return [''];if(maxWidth<=0)return [text];var maxChars=Math.max(1,Math.floor(maxWidth/(fontSize*0.6)));var words=text.split(/\s+/);var lines=[];var current='';var flush=function flush(){if(current){lines.push(current);current='';}};words.forEach(function(word){var remaining=word;while(remaining.length>maxChars){flush();lines.push(remaining.slice(0,maxChars));remaining=remaining.slice(maxChars);}if(!current){current=remaining;}else if(current.length+1+remaining.length<=maxChars){current=`${current} ${remaining}`;}else {flush();current=remaining;}});flush();if(lines.length>MAX_TICK_LABEL_LINES){var kept=lines.slice(0,MAX_TICK_LABEL_LINES);var lastIndex=MAX_TICK_LABEL_LINES-1;var last=kept[lastIndex];kept[lastIndex]=`${last.slice(0,Math.max(1,maxChars-1))}…`;return kept;}return lines;};var selectNonOverlappingXTickIndices=function selectNonOverlappingXTickIndices(pointCount,widths,xForIndex,forcedStep){if(pointCount<=0)return [];if(pointCount===1)return [0];var rightExtent=function rightExtent(i){return xForIndex(i)+(i===0?widths[i]:widths[i]/2);};var leftExtent=function leftExtent(i){return xForIndex(i)-(i===pointCount-1?widths[i]:widths[i]/2);};var fitsAfter=function fitsAfter(prev,next){return leftExtent(next)>=rightExtent(prev);};if(forcedStep!==undefined){var step=Math.max(1,forcedStep);var indices=[];for(var i=0;i<pointCount;i+=step){indices.push(i);}var _last=pointCount-1;if(indices[indices.length-1]!==_last&&fitsAfter(indices[indices.length-1],_last)){indices.push(_last);}return indices;}var first=0;var last=pointCount-1;var firstLastFit=fitsAfter(first,last);var selected=[first];if(firstLastFit){var _prev=first;for(var _i=1;_i<last;_i++){if(fitsAfter(_prev,_i)&&fitsAfter(_i,last)){selected.push(_i);_prev=_i;}}selected.push(last);return selected;}var prev=first;for(var _i2=1;_i2<pointCount;_i2++){if(fitsAfter(prev,_i2)){selected.push(_i2);prev=_i2;}}return selected;};var readChildSlots=function readChildSlots(children){var slots={lines:[],hasXAxis:false,hasYAxis:false,hasLegend:false,legend:{},hasGrid:false,referenceLines:[],hasTooltip:false,tooltipFilterNull:true};React__default.Children.forEach(children,function(child){if(!React__default.isValidElement(child))return;var id=getComponentId(child);if(id===componentIds.ChartLine){var _props$strokeStyle,_props$type,_props$connectNullsSt,_props$showLegend;var props=child.props;slots.lines.push({dataKey:props.dataKey,name:props.name,color:props.color,strokeStyle:(_props$strokeStyle=props.strokeStyle)!=null?_props$strokeStyle:'solid',type:(_props$type=props.type)!=null?_props$type:'monotone',dot:Boolean(props.dot),activeDot:props.activeDot!==false,connectNulls:Boolean(props.connectNulls),connectNullsStyle:(_props$connectNullsSt=props.connectNullsStyle)!=null?_props$connectNullsSt:'solid',showLegend:(_props$showLegend=props.showLegend)!=null?_props$showLegend:true,hide:props.hide,rangeLowerDataKey:props.rangeLowerDataKey,rangeUpperDataKey:props.rangeUpperDataKey,rangeName:props.rangeName,rangeColor:props.rangeColor,showRangeLegend:props.showRangeLegend});}else if(id===componentId.chartXAxis){var _props2=child.props;slots.hasXAxis=true;slots.xDataKey=_props2.dataKey;slots.xSecondaryDataKey=_props2.secondaryDataKey;slots.xTickFormatter=_props2.tickFormatter;slots.xInterval=_props2.interval;slots.xLabel=_props2.label;}else if(id===componentId.chartYAxis){var _props3=child.props;slots.hasYAxis=true;slots.yLabel=_props3.label;if(Array.isArray(_props3.domain)&&_props3.domain.length===2){slots.yDomain=[_props3.domain[0],_props3.domain[1]];}slots.yTickFormatter=_props3.tickFormatter;if(typeof _props3.tickCount==='number'){slots.yTickCount=_props3.tickCount;}}else if(id===componentId.chartLegend){var _props4=child.props;slots.hasLegend=true;slots.legend={layout:_props4.layout,align:_props4.align,selectedDataKeys:_props4.selectedDataKeys,defaultSelectedDataKeys:_props4.defaultSelectedDataKeys,onSelectedDataKeysChange:_props4.onSelectedDataKeysChange};}else if(id===componentId.chartCartesianGrid){slots.hasGrid=true;}else if(id===componentId.chartTooltip){slots.hasTooltip=true;var _props5=child.props;if(typeof _props5.formatter==='function'){slots.tooltipFormatter=_props5.formatter;}if(_props5.filterNull!==undefined){slots.tooltipFilterNull=Boolean(_props5.filterNull);}}else if(id===componentId.chartReferenceLine){var _props6=child.props;slots.referenceLines.push({y:typeof _props6.y==='number'?_props6.y:undefined,x:_props6.x,label:typeof _props6.label==='string'?_props6.label:undefined});}else if(id===componentId.chartReferenceBand){var _props7$name,_props7$color,_props7$showLegend;var _props7=child.props;slots.referenceBand={lowerDataKey:_props7.lowerDataKey,upperDataKey:_props7.upperDataKey,name:(_props7$name=_props7.name)!=null?_props7$name:'Reference band',color:(_props7$color=_props7.color)!=null?_props7$color:REFERENCE_BAND_DEFAULT_COLOR,showLegend:(_props7$showLegend=_props7.showLegend)!=null?_props7$showLegend:true};}});return slots;};var niceCeil=function niceCeil(raw){if(raw<=0)return 1;var exponent=Math.floor(Math.log10(raw));var fraction=raw/10**exponent;var niceFraction=fraction<=1?1:fraction<=2?2:fraction<=5?5:10;return niceFraction*10**exponent;};var niceFloor=function niceFloor(raw){if(raw>=0)return 0;return -niceCeil(-raw);};var toNullableNumber=function toNullableNumber(raw){if(raw===null||raw===undefined)return null;var value=Number(raw);return Number.isNaN(value)||!isFinite(value)?null:value;};var getRowValue=function getRowValue(row,dataKey){return(getIn(row,dataKey));};var getSeriesNumber=function getSeriesNumber(row,dataKey){return toNullableNumber(getRowValue(row,dataKey));};var resolveYMax=function resolveYMax(dataMax){if(dataMax>0)return niceCeil(dataMax);if(dataMax<0)return 0;return 1;};var MISSING_TOOLTIP_VALUE='—';var formatYTick=function formatYTick(value){var abs=Math.abs(value);if(abs>=1000000)return `${(value/1000000).toFixed(abs>=10000000?0:1)}M`;if(abs>=1000)return `${(value/1000).toFixed(abs>=10000?0:1)}K`;return String(value);};var buildLinearPath=function buildLinearPath(points){if(points.length===0)return '';return `M ${points[0].x} ${points[0].y}${points.slice(1).map(function(p){return ` L ${p.x} ${p.y}`;}).join('')}`;};var buildStepPath=function buildStepPath(points,variant){if(points.length===0)return '';var d=`M ${points[0].x} ${points[0].y}`;for(var i=1;i<points.length;i++){var prev=points[i-1];var cur=points[i];if(variant==='stepBefore'){d+=` L ${prev.x} ${cur.y} L ${cur.x} ${cur.y}`;}else if(variant==='stepAfter'){d+=` L ${cur.x} ${prev.y} L ${cur.x} ${cur.y}`;}else {var midX=(prev.x+cur.x)/2;d+=` L ${midX} ${prev.y} L ${midX} ${cur.y} L ${cur.x} ${cur.y}`;}}return d;};var buildMonotonePath=function buildMonotonePath(points){var n=points.length;if(n===0)return '';if(n===1)return `M ${points[0].x} ${points[0].y}`;if(n===2)return `M ${points[0].x} ${points[0].y} L ${points[1].x} ${points[1].y}`;var dxs=[];var ms=[];for(var i=0;i<n-1;i++){var dx=points[i+1].x-points[i].x;var dy=points[i+1].y-points[i].y;dxs.push(dx);ms.push(dx===0?0:dy/dx);}var tangents=[ms[0]];for(var _i3=0;_i3<dxs.length-1;_i3++){var m=ms[_i3];var mNext=ms[_i3+1];if(m*mNext<=0){tangents.push(0);}else {var _dx=dxs[_i3];var dxNext=dxs[_i3+1];var common=_dx+dxNext;tangents.push(3*common/((common+dxNext)/m+(common+_dx)/mNext));}}tangents.push(ms[ms.length-1]);var d=`M ${points[0].x} ${points[0].y}`;for(var _i4=0;_i4<n-1;_i4++){var p0=points[_i4];var p1=points[_i4+1];var _dx2=(p1.x-p0.x)/3;d+=` C ${p0.x+_dx2} ${p0.y+_dx2*tangents[_i4]} ${p1.x-_dx2} ${p1.y-_dx2*tangents[_i4+1]} ${p1.x} ${p1.y}`;}return d;};var buildPath=function buildPath(points,type){switch(type){case'linear':return buildLinearPath(points);case'step':case'stepAfter':case'stepBefore':return buildStepPath(points,type);case'monotone':default:return buildMonotonePath(points);}};var getStrokeDasharray=function getStrokeDasharray(strokeStyle){return strokeStyle==='dashed'?'5 5':strokeStyle==='dotted'?'2 2':undefined;};var buildSegments=function buildSegments(points,connectNulls,connectNullsStyle){if(connectNulls&&connectNullsStyle==='solid'){var definedPoints=points.filter(function(p){return p.value!==null;});return definedPoints.length>0?[{points:definedPoints.map(function(_ref){var x=_ref.x,y=_ref.y;return {x:x,y:y};}),isNullBridge:false}]:[];}var definedXs=[];var definedYs=[];points.forEach(function(p){if(p.value!==null){definedXs.push(p.x);definedYs.push(p.y);}});var dataSegments=[];var current=[];var currentStart=-1;points.forEach(function(p,pos){if(p.value===null){if(current.length>0){dataSegments.push({pts:current,startPos:currentStart,endPos:pos-1});current=[];currentStart=-1;}}else {if(current.length===0)currentStart=pos;current.push({x:p.x,y:p.y});}});if(current.length>0){dataSegments.push({pts:current,startPos:currentStart,endPos:points.length-1});}var segments=[];dataSegments.forEach(function(segment,index){segments.push({points:segment.pts,isNullBridge:false});if(connectNulls&&index<dataSegments.length-1){var nextSegment=dataSegments[index+1];var from=segment.pts[segment.pts.length-1];var to=nextSegment.pts[0];var sampleCount=Math.max(2,Math.round(Math.abs(to.x-from.x)/3));var bridgePoints=[];for(var step=0;step<=sampleCount;step++){var t=step/sampleCount;var x=from.x+(to.x-from.x)*t;bridgePoints.push({x:x,y:monotoneInterpolate(definedXs,definedYs,x)});}segments.push({points:bridgePoints,isNullBridge:true});}});return segments;};var LineSeries=function LineSeries(_ref2){var geometry=_ref2.geometry,index=_ref2.index,plotWidth=_ref2.plotWidth,plotHeight=_ref2.plotHeight,hoveredKey=_ref2.hoveredKey,dataSignature=_ref2.dataSignature,chartId=_ref2.chartId;var _useTheme=useTheme(),theme=_useTheme.theme;var line=geometry.line,color=geometry.color,points=geometry.points;var draw=useSharedValue(0);var dim=useSharedValue(1);var duration=getIn(theme.motion,'duration.xgentle');var baseDelay=getIn(theme.motion,'delay.gentle');var beginDelay=line.strokeStyle==='dashed'?baseDelay+duration:baseDelay;var drawEasing=getIn(theme.motion,'easing.standard');var dimDuration=getIn(theme.motion,'duration.gentle');useEffect(function(){draw.value=0;draw.value=withDelay(beginDelay,withTiming(1,{duration:duration,easing:drawEasing}));},[duration,beginDelay,dataSignature]);useEffect(function(){var isOther=hoveredKey!==null&&hoveredKey!==line.dataKey;dim.value=withTiming(isOther?DIM_OPACITY:1,{duration:dimDuration,easing:Easing.bezier(0.42,0,0.58,1)});},[hoveredKey,line.dataKey,dimDuration]);var clipProps=useAnimatedProps(function(){return {width:Math.max(0,plotWidth*draw.value)};});var dimProps=useAnimatedProps(function(){return {strokeOpacity:dim.value};});var segments=useMemo(function(){return buildSegments(points,line.connectNulls,line.connectNullsStyle);},[points,line.connectNulls,line.connectNullsStyle]);var dash=getStrokeDasharray(line.strokeStyle);var nullBridgeDash='5 5';var clipId=`line-${chartId}-reveal-${index}`;return jsxs(G,{children:[jsx(Defs,{children:jsx(ClipPath,{id:clipId,children:jsx(AnimatedRect,{x:0,y:0,height:plotHeight,animatedProps:clipProps})})}),jsxs(G,{clipPath:`url(#${clipId})`,children:[segments.map(function(segment,segmentIndex){return jsx(AnimatedPath,{testID:`line-path-${line.dataKey}`,d:buildPath(segment.points,line.type),stroke:color,strokeWidth:LINE_STROKE_WIDTH,strokeDasharray:segment.isNullBridge?nullBridgeDash:dash,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",animatedProps:dimProps},`segment-${segmentIndex}`);}),line.dot?points.map(function(p,pointIndex){return p.value===null?null:jsx(Circle,{cx:p.x,cy:p.y,r:DOT_RADIUS,fill:color},`dot-${pointIndex}`);}):null]})]});};var _ChartLine=function _ChartLine(_props){return null;};var ChartLine=assignWithoutSideEffects(_ChartLine,{componentId:componentIds.ChartLine});var ChartLineWrapper=function ChartLineWrapper(_ref3){var _slots$legend$default,_slots$yTickCount,_getRowValue2;var children=_ref3.children,_ref3$colorTheme=_ref3.colorTheme,colorTheme=_ref3$colorTheme===void 0?'categorical':_ref3$colorTheme,testID=_ref3.testID,_ref3$data=_ref3.data,data=_ref3$data===void 0?[]:_ref3$data,restProps=_objectWithoutProperties(_ref3,_excluded);var _useTheme2=useTheme(),theme=_useTheme2.theme;var _useState=useState({width:0,height:0}),_useState2=_slicedToArray(_useState,2),size=_useState2[0],setSize=_useState2[1];var _useState3=useState(undefined),_useState4=_slicedToArray(_useState3,2),activeIndex=_useState4[0],setActiveIndex=_useState4[1];var _useState5=useState(null),_useState6=_slicedToArray(_useState5,2),hoveredKey=_useState6[0],setHoveredKey=_useState6[1];var chartIdRef=useRef(undefined);if(chartIdRef.current===undefined){chartIdRef.current=`line-${uniqueChartCounter++}`;}var chartId=chartIdRef.current;var onLayout=function onLayout(e){var _e$nativeEvent$layout=e.nativeEvent.layout,width=_e$nativeEvent$layout.width,height=_e$nativeEvent$layout.height;if(width!==size.width||height!==size.height){setSize({width:width,height:height});}};var slots=useMemo(function(){return readChildSlots(children);},[children]);var allLines=slots.lines;var yAxisWarnedRef=useRef(false);useEffect(function(){if(!__DEV__)return;if(slots.hasYAxis&&!yAxisWarnedRef.current){var unsupported=[];if(slots.yDomain&&!slots.yDomain.every(function(v){return isNumber(Number(v));})){unsupported.push('domain (non-numeric)');}if(unsupported.length>0){yAxisWarnedRef.current=true;logger({type:'warn',moduleName:'ChartLineWrapper',message:`ChartYAxis prop(s) [${unsupported.join(', ')}] are not fully supported on native. Supported: label, domain (numeric), tickFormatter, tickCount.`});}}},[slots.hasYAxis,slots.yDomain]);var themeColors=useChartsColorTheme({colorTheme:colorTheme,chartName:'line',chartDataIndicators:allLines.length});var dataColorMapping=useMemo(function(){var mapping={};allLines.forEach(function(line){mapping[line.dataKey]={colorToken:line.color,isCustomColor:Boolean(line.color)};});assignDataColorMapping(mapping,themeColors);return mapping;},[allLines,themeColors]);var allDataKeys=useMemo(function(){return Object.keys(dataColorMapping);},[dataColorMapping]);var _useControllableState=useControllableState({value:slots.legend.selectedDataKeys,defaultValue:(_slots$legend$default=slots.legend.defaultSelectedDataKeys)!=null?_slots$legend$default:allDataKeys}),_useControllableState2=_slicedToArray(_useControllableState,2),selectedKeys=_useControllableState2[0],setSelectedKeys=_useControllableState2[1];var hasUserInteractedRef=React__default.useRef(false);var isControlled=slots.legend.selectedDataKeys!==undefined;var shouldAutoSelectAllDataKeys=!isControlled&&slots.legend.defaultSelectedDataKeys===undefined;useEffect(function(){if(!shouldAutoSelectAllDataKeys||hasUserInteractedRef.current||allDataKeys.length===0){return;}var isInSync=selectedKeys.length===allDataKeys.length&&allDataKeys.every(function(dataKey){return selectedKeys.includes(dataKey);});if(!isInSync){setSelectedKeys(function(){return _toConsumableArray(allDataKeys);},true);}},[allDataKeys,selectedKeys,shouldAutoSelectAllDataKeys]);useEffect(function(){if(allDataKeys.length>0&&selectedKeys.length>0){var hasOverlap=selectedKeys.some(function(key){return allDataKeys.includes(key);});if(!hasOverlap){setSelectedKeys(function(){return _toConsumableArray(allDataKeys);});}}},[allDataKeys,selectedKeys]);var isVisible=function isVisible(dataKey){return selectedKeys.includes(dataKey);};var toggleLegend=function toggleLegend(dataKey){hasUserInteractedRef.current=true;var next=selectedKeys.includes(dataKey)?selectedKeys.filter(function(k){return k!==dataKey;}):[].concat(_toConsumableArray(selectedKeys),[dataKey]);setSelectedKeys(function(){return next;});slots.legend.onSelectedDataKeysChange==null?void 0:slots.legend.onSelectedDataKeysChange({dataKey:dataKey,selectedKeysArray:next});};var visibleLines=useMemo(function(){return allLines.filter(function(l){return isVisible(l.dataKey)&&!l.hide;});},[allLines,selectedKeys]);var secondaryLabelMap=useMemo(function(){if(!slots.xSecondaryDataKey||!(data!=null&&data.length))return undefined;var map={};data.forEach(function(row,index){map[index]=getRowValue(row,slots.xSecondaryDataKey);});return map;},[data,slots.xSecondaryDataKey]);var _useMemo=useMemo(function(){if(!data.length)return {dataMin:0,dataMax:0};var linesForDomain=visibleLines.length?visibleLines:allLines;var rangeKeyPairs=[];linesForDomain.forEach(function(line){if(line.rangeLowerDataKey&&line.rangeUpperDataKey){rangeKeyPairs.push({lower:line.rangeLowerDataKey,upper:line.rangeUpperDataKey});}});if(slots.referenceBand){rangeKeyPairs.push({lower:slots.referenceBand.lowerDataKey,upper:slots.referenceBand.upperDataKey});}var min=Infinity;var max=-Infinity;data.forEach(function(row){linesForDomain.forEach(function(line){var value=getSeriesNumber(row,line.dataKey);if(value===null)return;if(value<min)min=value;if(value>max)max=value;});rangeKeyPairs.forEach(function(_ref4){var lowerKey=_ref4.lower,upperKey=_ref4.upper;var lower=getSeriesNumber(row,lowerKey);var upper=getSeriesNumber(row,upperKey);if(lower!==null){if(lower<min)min=lower;if(lower>max)max=lower;}if(upper!==null){if(upper<min)min=upper;if(upper>max)max=upper;}});});if(min===Infinity)min=0;if(max===-Infinity)max=0;return {dataMin:min,dataMax:max};},[data,visibleLines,allLines,slots.referenceBand]),dataMin=_useMemo.dataMin,dataMax=_useMemo.dataMax;var yMax=slots.yDomain?Number(slots.yDomain[1]):resolveYMax(dataMax);var yMin=slots.yDomain?Number(slots.yDomain[0]):dataMin<0?niceFloor(dataMin):0;var yRange=yMax-yMin;var yTickCount=(_slots$yTickCount=slots.yTickCount)!=null?_slots$yTickCount:Y_TICK_COUNT;var yTicks=useMemo(function(){var ticks=[];for(var i=0;i<=yTickCount;i++){ticks.push(yMin+yRange/yTickCount*i);}return ticks;},[yMin,yRange,yTickCount]);var showAxes=slots.hasXAxis||slots.hasYAxis;var hasSecondaryXLabels=Boolean(slots.xSecondaryDataKey);var secondaryRowHeight=hasSecondaryXLabels?SECONDARY_LABEL_FONT_SIZE+PRIMARY_TO_SECONDARY_GAP:0;var xAxisTitleHeight=slots.xLabel?AXIS_LABEL_FONT_SIZE+X_AXIS_TITLE_GAP:0;var plotWidthForLabels=Math.max(0,size.width-PLOT_PADDING.left-PLOT_PADDING.right);var pointCount=data.length;var columnWidth=pointCount>1?plotWidthForLabels/(pointCount-1):plotWidthForLabels;var xLabels=useMemo(function(){return data.map(function(row,index){var _getRowValue;var rawLabel=slots.xDataKey?String((_getRowValue=getRowValue(row,slots.xDataKey))!=null?_getRowValue:''):String(index);return slots.xTickFormatter?slots.xTickFormatter(rawLabel,index):rawLabel;});},[data,slots.xDataKey,slots.xTickFormatter]);var xLabelLines=useMemo(function(){var maxWidth=Math.max(0,columnWidth*0.6-X_TICK_LABEL_GAP);return xLabels.map(function(label){return wrapLabelToLines(label,maxWidth,TICK_FONT_SIZE);});},[xLabels,columnWidth]);var maxXLabelLines=useMemo(function(){return xLabelLines.reduce(function(max,lines){return Math.max(max,lines.length);},1);},[xLabelLines]);var primaryLabelRowHeight=maxXLabelLines*TICK_LINE_HEIGHT;var padding=showAxes?Object.assign({},PLOT_PADDING,{bottom:Math.max(PLOT_PADDING.bottom,primaryLabelRowHeight+4+secondaryRowHeight+xAxisTitleHeight+4)}):{top:0,right:0,bottom:0,left:0};var plotWidth=Math.max(0,size.width-padding.left-padding.right);var plotHeight=Math.max(0,size.height-padding.top-padding.bottom);var pointSpacing=pointCount>1?plotWidth/(pointCount-1):0;var xForIndex=function xForIndex(index){return pointCount>1?index*pointSpacing:plotWidth/2;};var visibleXTickIndices=useMemo(function(){if(pointCount<=0)return [];var widths=xLabelLines.map(function(lines,index){var primaryWidth=lines.reduce(function(max,line){return Math.max(max,estimateTextWidth(line,TICK_FONT_SIZE));},0);var secondary=secondaryLabelMap==null?void 0:secondaryLabelMap[index];var secondaryWidth=secondary!==undefined&&secondary!==null?estimateTickLabelWidth(String(secondary),SECONDARY_LABEL_FONT_SIZE):0;return Math.max(primaryWidth,secondaryWidth);});var forcedStep=slots.xInterval!==undefined?Math.max(1,slots.xInterval+1):undefined;return selectNonOverlappingXTickIndices(pointCount,widths,xForIndex,forcedStep);},[pointCount,pointSpacing,plotWidth,xLabelLines,secondaryLabelMap,slots.xInterval]);var visibleXTickIndexSet=useMemo(function(){return new Set(visibleXTickIndices);},[visibleXTickIndices]);var tickColor=getIn(theme.colors,'surface.text.gray.muted');var axisLineColor=getIn(theme.colors,'surface.border.gray.muted');var gridColor=getIn(theme.colors,'surface.border.gray.subtle');var resolveColor=function resolveColor(dataKey,fallback){var _dataColorMapping$dat,_dataColorMapping$dat2;var token=(_dataColorMapping$dat=(_dataColorMapping$dat2=dataColorMapping[dataKey])==null?void 0:_dataColorMapping$dat2.colorToken)!=null?_dataColorMapping$dat:fallback;return token?getIn(theme.colors,token):tickColor;};var lineGeometries=useMemo(function(){return visibleLines.map(function(line){var points=data.map(function(row,index){var value=getSeriesNumber(row,line.dataKey);return {x:xForIndex(index),y:value===null?0:plotHeight-(value-yMin)/yRange*plotHeight,value:value};});return {line:line,color:resolveColor(line.dataKey,line.color),points:points};});},[visibleLines,data,plotWidth,plotHeight,yMin,yRange,dataColorMapping,theme.colors]);var resolvedBands=useMemo(function(){var bands=[];visibleLines.forEach(function(line){if(line.rangeLowerDataKey&&line.rangeUpperDataKey){var _line$rangeName,_line$showRangeLegend;bands.push({id:line.dataKey,lowerDataKey:line.rangeLowerDataKey,upperDataKey:line.rangeUpperDataKey,name:(_line$rangeName=line.rangeName)!=null?_line$rangeName:'Industry range',fillColor:line.rangeColor?getIn(theme.colors,line.rangeColor):resolveColor(line.dataKey,line.color),showLegend:(_line$showRangeLegend=line.showRangeLegend)!=null?_line$showRangeLegend:line.showLegend});}});if(slots.referenceBand){bands.push({id:'standalone',lowerDataKey:slots.referenceBand.lowerDataKey,upperDataKey:slots.referenceBand.upperDataKey,name:slots.referenceBand.name,fillColor:getIn(theme.colors,slots.referenceBand.color),showLegend:slots.referenceBand.showLegend});}return bands;},[visibleLines,slots.referenceBand,dataColorMapping,theme.colors]);var bandGeometries=useMemo(function(){if(data.length===0||plotWidth<=0||plotHeight<=0||yRange<=0)return [];var toY=function toY(value){return plotHeight-(value-yMin)/yRange*plotHeight;};return resolvedBands.map(function(band){var upper=[];var lower=[];data.forEach(function(row,index){var x=xForIndex(index);var upperValue=getSeriesNumber(row,band.upperDataKey);var lowerValue=getSeriesNumber(row,band.lowerDataKey);if(upperValue!==null)upper.push({x:x,y:toY(upperValue)});if(lowerValue!==null)lower.push({x:x,y:toY(lowerValue)});});var d=buildBandAreaPath(upper,lower);if(!d)return null;return {id:band.id,d:d,color:band.fillColor};}).filter(function(band){return band!==null;});},[resolvedBands,data,plotWidth,plotHeight,yMin,yRange]);var dataSignature=useMemo(function(){return `${data.length}:${allDataKeys.join(',')}`;},[data.length,allDataKeys]);var indexAtTouchX=function indexAtTouchX(locationX){if(pointCount===0||plotWidth<=0)return undefined;var localX=locationX-padding.left;return pointCount>1?Math.min(pointCount-1,Math.max(0,Math.round(localX/pointSpacing))):0;};var applyScrub=function applyScrub(e){if(pointCount===0||plotWidth<=0)return undefined;var localX=e.nativeEvent.locationX-padding.left;var localY=e.nativeEvent.locationY-padding.top;var index=pointCount>1?Math.min(pointCount-1,Math.max(0,Math.round(localX/pointSpacing))):0;setActiveIndex(index);var nearestKey=null;var nearestDist=Infinity;lineGeometries.forEach(function(geometry){var point=geometry.points[index];if(!point||point.value===null)return;var dist=Math.abs(point.y-localY);if(dist<nearestDist){nearestDist=dist;nearestKey=geometry.line.dataKey;}});setHoveredKey(nearestKey);return index;};var touchStartActiveRef=React__default.useRef(undefined);var touchStartIndexRef=React__default.useRef(undefined);var touchMovedRef=React__default.useRef(false);var becameResponderRef=React__default.useRef(false);var touchStartLocationRef=React__default.useRef(undefined);var SCRUB_MOVE_THRESHOLD=8;var handleTouchStart=function handleTouchStart(e){if(data.length===0)return;touchStartActiveRef.current=activeIndex;touchStartIndexRef.current=indexAtTouchX(e.nativeEvent.locationX);touchMovedRef.current=false;becameResponderRef.current=false;touchStartLocationRef.current={x:e.nativeEvent.locationX,y:e.nativeEvent.locationY};};var handleScrubStart=function handleScrubStart(e){if(data.length===0)return;becameResponderRef.current=true;touchMovedRef.current=true;applyScrub(e);};var handleScrubMove=function handleScrubMove(e){touchMovedRef.current=true;applyScrub(e);};var handleTouchEnd=function handleTouchEnd(){if(becameResponderRef.current||touchMovedRef.current)return;if(data.length===0)return;if(touchStartActiveRef.current===touchStartIndexRef.current){setActiveIndex(undefined);setHoveredKey(null);}else if(touchStartIndexRef.current!==undefined){var _touchStartLocationRe;setActiveIndex(touchStartIndexRef.current);var tapIndex=touchStartIndexRef.current;var tapY=(_touchStartLocationRe=touchStartLocationRef.current)==null?void 0:_touchStartLocationRe.y;if(tapY!==undefined){var localY=tapY-padding.top;var nearestKey=null;var nearestDist=Infinity;lineGeometries.forEach(function(geometry){var point=geometry.points[tapIndex];if(!point||point.value===null)return;var dist=Math.abs(point.y-localY);if(dist<nearestDist){nearestDist=dist;nearestKey=geometry.line.dataKey;}});setHoveredKey(nearestKey);}}};var handleScrubTerminate=function handleScrubTerminate(){becameResponderRef.current=false;};var activeRow=activeIndex!==undefined?data[activeIndex]:undefined;var activeLabelRaw=activeRow&&slots.xDataKey?String((_getRowValue2=getRowValue(activeRow,slots.xDataKey))!=null?_getRowValue2:activeIndex):undefined;var activeLabel=activeLabelRaw?slots.xTickFormatter?slots.xTickFormatter(activeLabelRaw,activeIndex!=null?activeIndex:0):activeLabelRaw:undefined;var tooltipRows=useMemo(function(){if(!activeRow)return [];var rows=[];visibleLines.forEach(function(line){var _line$name;var rawValue=getSeriesNumber(activeRow,line.dataKey);if(rawValue===null&&slots.tooltipFilterNull)return;var color=resolveColor(line.dataKey,line.color);var displayValue=rawValue===null?MISSING_TOOLTIP_VALUE:String(rawValue);var label=(_line$name=line.name)!=null?_line$name:line.dataKey;var formatter=slots.tooltipFormatter;if(formatter){try{var formatted=formatter(rawValue!=null?rawValue:undefined,line.dataKey,undefined,activeIndex,activeRow);if(Array.isArray(formatted)){if(formatted[0]!==undefined&&formatted[0]!==null){displayValue=String(formatted[0]);}if(formatted[1]!==undefined&&formatted[1]!==null){label=String(formatted[1]);}}else if(formatted!==undefined&&formatted!==null){displayValue=String(formatted);}}catch(_unused){}}var range;if(line.rangeLowerDataKey&&line.rangeUpperDataKey){var lower=getSeriesNumber(activeRow,line.rangeLowerDataKey);var upper=getSeriesNumber(activeRow,line.rangeUpperDataKey);if(lower!==null&&upper!==null){var _line$rangeName2;range={name:(_line$rangeName2=line.rangeName)!=null?_line$rangeName2:'Industry',text:`${String(lower)}–${String(upper)}`};}}rows.push({key:line.dataKey,color:color,displayValue:displayValue,label:label,range:range});});return rows;},[activeRow,visibleLines,dataColorMapping,theme.colors,slots.tooltipFormatter,slots.tooltipFilterNull,activeIndex]);var legendLines=allLines.filter(function(line){return line.showLegend;});var legendBands=useMemo(function(){var _slots$referenceBand;var bands=[];allLines.forEach(function(line){var _line$showRangeLegend2;if(((_line$showRangeLegend2=line.showRangeLegend)!=null?_line$showRangeLegend2:line.showLegend)&&line.rangeLowerDataKey&&line.rangeUpperDataKey){var _line$rangeName3;bands.push({id:line.dataKey,name:(_line$rangeName3=line.rangeName)!=null?_line$rangeName3:'Industry range',fillColor:line.rangeColor?getIn(theme.colors,line.rangeColor):resolveColor(line.dataKey,line.color)});}});if((_slots$referenceBand=slots.referenceBand)!=null&&_slots$referenceBand.showLegend){bands.push({id:'standalone',name:slots.referenceBand.name,fillColor:getIn(theme.colors,slots.referenceBand.color)});}return bands;},[allLines,slots.referenceBand,dataColorMapping,theme.colors]);var lineChartContextValue=useMemo(function(){return {hoveredDataKey:hoveredKey,setHoveredDataKey:setHoveredKey};},[hoveredKey]);var commonChartContextValue=useMemo(function(){return {chartName:'line',dataColorMapping:dataColorMapping,selectedDataKeys:selectedKeys,setSelectedDataKeys:function setSelectedDataKeys(keys){return setSelectedKeys(function(){return keys;});},secondaryLabelMap:secondaryLabelMap,dataLength:data==null?void 0:data.length};},[dataColorMapping,selectedKeys,secondaryLabelMap,data==null?void 0:data.length]);var layoutTestID=testID?`${testID}-layout`:undefined;return jsx(LineChartContext.Provider,{value:lineChartContextValue,children:jsx(CommonChartComponentsContext.Provider,{value:commonChartContextValue,children:jsxs(BaseBox,Object.assign({},metaAttribute({name:'line-chart',testID:testID}),makeAnalyticsAttribute(restProps),{width:"100%",height:"100%",display:"flex",flexDirection:"column"},restProps,{children:[jsxs(View,{testID:layoutTestID,style:{flex:1,width:'100%',overflow:'visible'},onLayout:onLayout,onTouchStart:handleTouchStart,onTouchEnd:handleTouchEnd,onMoveShouldSetResponder:function onMoveShouldSetResponder(e){if(data.length===0)return false;var start=touchStartLocationRef.current;if(!start||!(e!=null&&e.nativeEvent))return false;var dx=Math.abs(e.nativeEvent.locationX-start.x);var dy=Math.abs(e.nativeEvent.locationY-start.y);return dx>=SCRUB_MOVE_THRESHOLD&&dx>dy;},onResponderGrant:handleScrubStart,onResponderMove:handleScrubMove,onResponderTerminationRequest:function onResponderTerminationRequest(){return true;},onResponderTerminate:handleScrubTerminate,children:[data.length===0?jsx(Box,{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"spacing.6",children:jsx(Text,{size:"small",color:"surface.text.gray.muted",children:"No data to display"})}):size.width>0&&size.height>0?jsx(Svg,{width:size.width,height:size.height,pointerEvents:"none",children:jsxs(G,{x:padding.left,y:padding.top,children:[slots.hasGrid&&yTicks.map(function(tick,idx){var y=plotHeight-(tick-yMin)/yRange*plotHeight;return jsx(Line,{x1:0,x2:plotWidth,y1:y,y2:y,stroke:gridColor,strokeWidth:1},`grid-${idx}`);}),slots.hasYAxis&&jsxs(Fragment,{children:[jsx(Line,{x1:0,x2:0,y1:0,y2:plotHeight,stroke:axisLineColor,strokeWidth:1}),yTicks.map(function(tick,idx){var y=plotHeight-(tick-yMin)/yRange*plotHeight;return jsx(Text$1,{x:-6,y:y+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:tickColor,textAnchor:"end",children:slots.yTickFormatter?slots.yTickFormatter(tick,idx):formatYTick(tick)},`ytick-${idx}`);}),slots.yLabel?jsx(Text$1,{x:-(PLOT_PADDING.left-AXIS_LABEL_FONT_SIZE-2),y:plotHeight/2,fontSize:AXIS_LABEL_FONT_SIZE,fill:tickColor,textAnchor:"middle",transform:`rotate(-90 ${-(PLOT_PADDING.left-AXIS_LABEL_FONT_SIZE-2)} ${plotHeight/2})`,children:slots.yLabel}):null]}),bandGeometries.map(function(band){return jsx(Path,{d:band.d,fill:band.color,fillOpacity:REFERENCE_BAND_FILL_OPACITY,stroke:"none"},`reference-band-${band.id}`);}),lineGeometries.map(function(geometry,idx){return jsx(LineSeries,{geometry:geometry,index:idx,plotWidth:plotWidth,plotHeight:plotHeight,hoveredKey:hoveredKey,dataSignature:dataSignature,chartId:chartId},`line-${geometry.line.dataKey}`);}),activeIndex!==undefined&&hoveredKey!==null?lineGeometries.map(function(geometry){if(geometry.line.dataKey!==hoveredKey)return null;if(!geometry.line.activeDot)return null;var point=geometry.points[activeIndex];if(!point||point.value===null)return null;return jsxs(G,{children:[jsx(Circle,{cx:point.x,cy:point.y,r:ACTIVE_DOT_OUTER_RADIUS,fill:geometry.color,fillOpacity:0.2}),jsx(Circle,{cx:point.x,cy:point.y,r:ACTIVE_DOT_INNER_RADIUS,fill:geometry.color,stroke:getIn(theme.colors,'surface.background.gray.intense'),strokeWidth:1.5})]},`active-dot-${geometry.line.dataKey}`);}):null,slots.referenceLines.map(function(refLine,idx){var isVertical=refLine.x!==undefined&&refLine.x!==null;var stroke=getIn(theme.colors,'data.background.categorical.gray.intense');var chipFill=getIn(theme.colors,'surface.background.gray.subtle');var chipStroke=getIn(theme.colors,'surface.border.gray.muted');var chipTextColor=getIn(theme.colors,'surface.text.gray.normal');var chipWidth=refLine.label?Math.max(40,refLine.label.length*6+16):0;var chipHeight=20;if(isVertical){var index=-1;if(slots.xDataKey){index=data.findIndex(function(row){return String(getRowValue(row,slots.xDataKey))===String(refLine.x);});}if(index<0&&isNumber(Number(refLine.x))){index=Number(refLine.x);}if(index<0||index>pointCount-1)return null;var x=xForIndex(index);return jsxs(G,{children:[jsx(Line,{x1:x,x2:x,y1:0,y2:plotHeight,stroke:stroke,strokeWidth:2,strokeDasharray:"4 4"}),refLine.label?jsxs(G,{children:[jsx(Rect,{x:x-chipWidth/2,y:0,width:chipWidth,height:chipHeight,rx:theme.border.radius.medium,fill:chipFill,stroke:chipStroke,strokeWidth:1}),jsx(Text$1,{x:x,y:chipHeight/2+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:chipTextColor,textAnchor:"middle",children:refLine.label})]}):null]},`refline-${idx}`);}if(refLine.y===undefined||refLine.y>yMax||refLine.y<yMin)return null;var y=plotHeight-(refLine.y-yMin)/yRange*plotHeight;return jsxs(G,{children:[jsx(Line,{x1:0,x2:plotWidth,y1:y,y2:y,stroke:stroke,strokeWidth:2,strokeDasharray:"4 4"}),refLine.label?jsxs(G,{children:[jsx(Rect,{x:plotWidth-chipWidth,y:y-chipHeight/2,width:chipWidth,height:chipHeight,rx:theme.border.radius.medium,fill:chipFill,stroke:chipStroke,strokeWidth:1}),jsx(Text$1,{x:plotWidth-chipWidth/2,y:y+TICK_FONT_SIZE/3,fontSize:TICK_FONT_SIZE,fill:chipTextColor,textAnchor:"middle",children:refLine.label})]}):null]},`refline-${idx}`);}),slots.hasXAxis&&jsxs(Fragment,{children:[jsx(Line,{x1:0,x2:plotWidth,y1:plotHeight,y2:plotHeight,stroke:axisLineColor,strokeWidth:1}),data.map(function(row,index){var _xLabelLines$index;if(!visibleXTickIndexSet.has(index))return null;var cx=xForIndex(index);var lines=(_xLabelLines$index=xLabelLines[index])!=null?_xLabelLines$index:[''];var secondary=secondaryLabelMap==null?void 0:secondaryLabelMap[index];var primaryY=plotHeight+TICK_FONT_SIZE+4;var anchor=index===0?'start':index===pointCount-1?'end':'middle';var secondaryY=primaryY+(maxXLabelLines-1)*TICK_LINE_HEIGHT+SECONDARY_LABEL_FONT_SIZE+PRIMARY_TO_SECONDARY_GAP;return jsxs(G,{children:[lines.map(function(line,lineIndex){return jsx(Text$1,{x:cx,y:primaryY+lineIndex*TICK_LINE_HEIGHT,fontSize:TICK_FONT_SIZE,fill:tickColor,textAnchor:anchor,children:line},`xtick-${index}-line-${lineIndex}`);}),secondary!==undefined&&secondary!==null?jsx(Text$1,{x:cx,y:secondaryY,fontSize:SECONDARY_LABEL_FONT_SIZE,fill:tickColor,textAnchor:anchor,children:String(secondary)}):null]},`xtick-${index}`);})]}),slots.xLabel?jsx(Text$1,{x:plotWidth/2,y:plotHeight+padding.bottom-4,fontSize:AXIS_LABEL_FONT_SIZE,fill:tickColor,textAnchor:"middle",children:slots.xLabel}):null]})}):null,slots.hasTooltip&&activeIndex!==undefined&&tooltipRows.length>0&&size.width>0?jsxs(View,{pointerEvents:"none",style:{position:'absolute',top:padding.top,left:Math.max(padding.left,Math.min(size.width-TOOLTIP_WIDTH-padding.right,padding.left+xForIndex(activeIndex)-TOOLTIP_WIDTH/2)),width:TOOLTIP_WIDTH,backgroundColor:getIn(theme.colors,'surface.icon.staticBlack.normal'),borderRadius:theme.border.radius.large,borderWidth:1,borderColor:getIn(theme.colors,'surface.border.gray.muted'),paddingHorizontal:theme.spacing[4],paddingVertical:theme.spacing[4],shadowColor:getIn(theme.colors,'surface.icon.staticBlack.normal'),shadowOpacity:0.2,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:4},children:[activeLabel?jsx(Box,{paddingBottom:"spacing.2",children:jsx(Text,{size:"small",weight:"semibold",color:"surface.text.staticWhite.normal",children:activeLabel})}):null,tooltipRows.map(function(row){return jsxs(View,{style:{flexDirection:'row',alignItems:'flex-start',paddingVertical:theme.spacing[1]},children:[jsx(View,{style:{width:8,height:8,borderRadius:2,backgroundColor:row.color,marginRight:theme.spacing[2],marginTop:3}}),jsxs(View,{style:{flex:1,marginRight:theme.spacing[2]},children:[jsx(Text,{size:"xsmall",color:"surface.text.staticWhite.normal",children:row.label}),row.range?jsx(Text,{size:"xsmall",color:"surface.text.staticWhite.muted",children:row.range.name}):null]}),jsxs(View,{style:{width:TOOLTIP_VALUE_WIDTH},children:[jsx(Text,{size:"xsmall",weight:"semibold",color:"surface.text.staticWhite.normal",textAlign:"right",children:row.displayValue}),row.range?jsx(Text,{size:"xsmall",color:"surface.text.staticWhite.muted",textAlign:"right",children:row.range.text}):null]})]},row.key);})]}):null]}),slots.hasLegend&&(legendLines.length>0||legendBands.length>0)?jsxs(View,{style:{flexDirection:slots.legend.layout==='vertical'?'column':'row',flexWrap:slots.legend.layout==='vertical'?'nowrap':'wrap',alignItems:slots.legend.layout==='vertical'?'flex-start':'center',justifyContent:slots.legend.align==='left'?'flex-start':slots.legend.align==='right'?'flex-end':'center',paddingTop:theme.spacing[3],paddingHorizontal:theme.spacing[3]},children:[legendLines.map(function(line){var _line$name2,_line$name3;var selected=isVisible(line.dataKey);var swatchColor=selected?resolveColor(line.dataKey,line.color):getIn(theme.colors,'surface.text.gray.muted');return jsxs(Pressable,Object.assign({testID:`legend-${line.dataKey}`,onPress:function onPress(){return toggleLegend(line.dataKey);},accessibilityRole:"button",accessibilityLabel:`${(_line$name2=line.name)!=null?_line$name2:line.dataKey}, ${selected?'selected':'deselected'}`,style:{flexDirection:'row',alignItems:'center',opacity:selected?1:0.5,paddingVertical:theme.spacing[1],paddingHorizontal:theme.spacing[2]}},metaAttribute({name:`chart-legend-item-${line.dataKey}`}),{children:[jsx(View,{style:{width:LEGEND_DOT_SIZE,height:LEGEND_DOT_SIZE,borderRadius:theme.border.radius['2xsmall'],backgroundColor:swatchColor,marginRight:theme.spacing[2]}}),jsx(Text,{size:"small",color:"surface.text.gray.muted",children:(_line$name3=line.name)!=null?_line$name3:line.dataKey})]}),`legend-${line.dataKey}`);}),legendBands.map(function(band){return jsxs(View,Object.assign({testID:`legend-reference-band-${band.id}`,style:{flexDirection:'row',alignItems:'center',paddingVertical:theme.spacing[1],paddingHorizontal:theme.spacing[2]}},metaAttribute({name:`chart-legend-item-reference-band-${band.id}`}),{children:[jsx(View,{style:{width:LEGEND_DOT_SIZE,height:LEGEND_DOT_SIZE,borderRadius:theme.border.radius['2xsmall'],backgroundColor:band.fillColor,opacity:REFERENCE_BAND_FILL_OPACITY,marginRight:theme.spacing[2]}}),jsx(Text,{size:"small",color:"surface.text.gray.muted",children:band.name})]}),`legend-reference-band-${band.id}`);})]}):null]}))})});};
40
42
 
41
43
  export { ChartLine, ChartLineWrapper };
42
44
  //# sourceMappingURL=LineChart.native.js.map