@chipmobilesdk/rn-chart 0.4.0 → 0.5.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 (343) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +1 -1
  3. package/lib/commonjs/a11y/summary.js +190 -0
  4. package/lib/commonjs/a11y/summary.js.map +1 -0
  5. package/lib/commonjs/contract/datasource.js +64 -0
  6. package/lib/commonjs/contract/datasource.js.map +1 -0
  7. package/lib/commonjs/contract/distribution.js +45 -0
  8. package/lib/commonjs/contract/distribution.js.map +1 -0
  9. package/lib/commonjs/contract/errors.js +88 -0
  10. package/lib/commonjs/contract/errors.js.map +1 -0
  11. package/lib/commonjs/contract/format.js +133 -0
  12. package/lib/commonjs/contract/format.js.map +1 -0
  13. package/lib/commonjs/contract/interaction.js +24 -0
  14. package/lib/commonjs/contract/interaction.js.map +1 -0
  15. package/lib/commonjs/contract/marker.js +55 -0
  16. package/lib/commonjs/contract/marker.js.map +1 -0
  17. package/lib/commonjs/contract/props.js +6 -0
  18. package/lib/commonjs/contract/props.js.map +1 -0
  19. package/lib/commonjs/contract/state.js +68 -0
  20. package/lib/commonjs/contract/state.js.map +1 -0
  21. package/lib/commonjs/contract/strings.js +54 -0
  22. package/lib/commonjs/contract/strings.js.map +1 -0
  23. package/lib/commonjs/contract/theme.js +116 -0
  24. package/lib/commonjs/contract/theme.js.map +1 -0
  25. package/lib/commonjs/contract/value.js +112 -0
  26. package/lib/commonjs/contract/value.js.map +1 -0
  27. package/lib/commonjs/geometry/bar.js +257 -0
  28. package/lib/commonjs/geometry/bar.js.map +1 -0
  29. package/lib/commonjs/geometry/distribution.js +197 -0
  30. package/lib/commonjs/geometry/distribution.js.map +1 -0
  31. package/lib/commonjs/geometry/heatmap.js +186 -0
  32. package/lib/commonjs/geometry/heatmap.js.map +1 -0
  33. package/lib/commonjs/geometry/hitTest.js +117 -0
  34. package/lib/commonjs/geometry/hitTest.js.map +1 -0
  35. package/lib/commonjs/geometry/layout.js +134 -0
  36. package/lib/commonjs/geometry/layout.js.map +1 -0
  37. package/lib/commonjs/geometry/markers.js +59 -0
  38. package/lib/commonjs/geometry/markers.js.map +1 -0
  39. package/lib/commonjs/geometry/path.js +166 -0
  40. package/lib/commonjs/geometry/path.js.map +1 -0
  41. package/lib/commonjs/geometry/progress.js +203 -0
  42. package/lib/commonjs/geometry/progress.js.map +1 -0
  43. package/lib/commonjs/geometry/scale.js +127 -0
  44. package/lib/commonjs/geometry/scale.js.map +1 -0
  45. package/lib/commonjs/geometry/ticks.js +120 -0
  46. package/lib/commonjs/geometry/ticks.js.map +1 -0
  47. package/lib/commonjs/geometry/timeSeries.js +157 -0
  48. package/lib/commonjs/geometry/timeSeries.js.map +1 -0
  49. package/lib/commonjs/geometry/types.js +43 -0
  50. package/lib/commonjs/geometry/types.js.map +1 -0
  51. package/lib/commonjs/index.js +284 -0
  52. package/lib/commonjs/index.js.map +1 -0
  53. package/lib/commonjs/package.json +1 -0
  54. package/lib/commonjs/react/ChartBoundary.js +82 -0
  55. package/lib/commonjs/react/ChartBoundary.js.map +1 -0
  56. package/lib/commonjs/react/ChartFrame.js +270 -0
  57. package/lib/commonjs/react/ChartFrame.js.map +1 -0
  58. package/lib/commonjs/react/ChartLegend.js +242 -0
  59. package/lib/commonjs/react/ChartLegend.js.map +1 -0
  60. package/lib/commonjs/react/ChartPlot.js +62 -0
  61. package/lib/commonjs/react/ChartPlot.js.map +1 -0
  62. package/lib/commonjs/react/ChartStateOverlay.js +89 -0
  63. package/lib/commonjs/react/ChartStateOverlay.js.map +1 -0
  64. package/lib/commonjs/react/ChartThemeProvider.js +51 -0
  65. package/lib/commonjs/react/ChartThemeProvider.js.map +1 -0
  66. package/lib/commonjs/react/charts.js +108 -0
  67. package/lib/commonjs/react/charts.js.map +1 -0
  68. package/lib/commonjs/react/pointEvent.js +35 -0
  69. package/lib/commonjs/react/pointEvent.js.map +1 -0
  70. package/lib/commonjs/react/useChartA11y.js +97 -0
  71. package/lib/commonjs/react/useChartA11y.js.map +1 -0
  72. package/lib/commonjs/react/useChartFormatters.js +66 -0
  73. package/lib/commonjs/react/useChartFormatters.js.map +1 -0
  74. package/lib/commonjs/react/useChartLayout.js +100 -0
  75. package/lib/commonjs/react/useChartLayout.js.map +1 -0
  76. package/lib/commonjs/react/useChartSelection.js +131 -0
  77. package/lib/commonjs/react/useChartSelection.js.map +1 -0
  78. package/lib/commonjs/react/useChartStatus.js +74 -0
  79. package/lib/commonjs/react/useChartStatus.js.map +1 -0
  80. package/lib/commonjs/render/Axis.js +88 -0
  81. package/lib/commonjs/render/Axis.js.map +1 -0
  82. package/lib/commonjs/render/Marks.js +184 -0
  83. package/lib/commonjs/render/Marks.js.map +1 -0
  84. package/lib/commonjs/validation/budgets.js +106 -0
  85. package/lib/commonjs/validation/budgets.js.map +1 -0
  86. package/lib/commonjs/validation/validateDatasource.js +189 -0
  87. package/lib/commonjs/validation/validateDatasource.js.map +1 -0
  88. package/lib/module/a11y/summary.js +184 -0
  89. package/lib/module/a11y/summary.js.map +1 -0
  90. package/lib/module/contract/datasource.js +57 -0
  91. package/lib/module/contract/datasource.js.map +1 -0
  92. package/lib/module/contract/distribution.js +40 -0
  93. package/lib/module/contract/distribution.js.map +1 -0
  94. package/lib/module/contract/errors.js +80 -0
  95. package/lib/module/contract/errors.js.map +1 -0
  96. package/lib/module/contract/format.js +123 -0
  97. package/lib/module/contract/format.js.map +1 -0
  98. package/lib/module/contract/interaction.js +20 -0
  99. package/lib/module/contract/interaction.js.map +1 -0
  100. package/lib/module/contract/marker.js +49 -0
  101. package/lib/module/contract/marker.js.map +1 -0
  102. package/lib/module/contract/props.js +4 -0
  103. package/lib/module/contract/props.js.map +1 -0
  104. package/lib/module/contract/state.js +61 -0
  105. package/lib/module/contract/state.js.map +1 -0
  106. package/lib/module/contract/strings.js +49 -0
  107. package/lib/module/contract/strings.js.map +1 -0
  108. package/lib/module/contract/theme.js +109 -0
  109. package/lib/module/contract/theme.js.map +1 -0
  110. package/lib/module/contract/value.js +101 -0
  111. package/lib/module/contract/value.js.map +1 -0
  112. package/lib/module/geometry/bar.js +253 -0
  113. package/lib/module/geometry/bar.js.map +1 -0
  114. package/lib/module/geometry/distribution.js +193 -0
  115. package/lib/module/geometry/distribution.js.map +1 -0
  116. package/lib/module/geometry/heatmap.js +182 -0
  117. package/lib/module/geometry/heatmap.js.map +1 -0
  118. package/lib/module/geometry/hitTest.js +110 -0
  119. package/lib/module/geometry/hitTest.js.map +1 -0
  120. package/lib/module/geometry/layout.js +122 -0
  121. package/lib/module/geometry/layout.js.map +1 -0
  122. package/lib/module/geometry/markers.js +53 -0
  123. package/lib/module/geometry/markers.js.map +1 -0
  124. package/lib/module/geometry/path.js +157 -0
  125. package/lib/module/geometry/path.js.map +1 -0
  126. package/lib/module/geometry/progress.js +199 -0
  127. package/lib/module/geometry/progress.js.map +1 -0
  128. package/lib/module/geometry/scale.js +119 -0
  129. package/lib/module/geometry/scale.js.map +1 -0
  130. package/lib/module/geometry/ticks.js +112 -0
  131. package/lib/module/geometry/ticks.js.map +1 -0
  132. package/lib/module/geometry/timeSeries.js +153 -0
  133. package/lib/module/geometry/timeSeries.js.map +1 -0
  134. package/lib/module/geometry/types.js +39 -0
  135. package/lib/module/geometry/types.js.map +1 -0
  136. package/lib/module/index.js +85 -0
  137. package/lib/module/index.js.map +1 -0
  138. package/lib/module/package.json +1 -0
  139. package/lib/module/react/ChartBoundary.js +75 -0
  140. package/lib/module/react/ChartBoundary.js.map +1 -0
  141. package/lib/module/react/ChartFrame.js +263 -0
  142. package/lib/module/react/ChartFrame.js.map +1 -0
  143. package/lib/module/react/ChartLegend.js +234 -0
  144. package/lib/module/react/ChartLegend.js.map +1 -0
  145. package/lib/module/react/ChartPlot.js +56 -0
  146. package/lib/module/react/ChartPlot.js.map +1 -0
  147. package/lib/module/react/ChartStateOverlay.js +82 -0
  148. package/lib/module/react/ChartStateOverlay.js.map +1 -0
  149. package/lib/module/react/ChartThemeProvider.js +44 -0
  150. package/lib/module/react/ChartThemeProvider.js.map +1 -0
  151. package/lib/module/react/charts.js +102 -0
  152. package/lib/module/react/charts.js.map +1 -0
  153. package/lib/module/react/pointEvent.js +30 -0
  154. package/lib/module/react/pointEvent.js.map +1 -0
  155. package/lib/module/react/useChartA11y.js +92 -0
  156. package/lib/module/react/useChartA11y.js.map +1 -0
  157. package/lib/module/react/useChartFormatters.js +61 -0
  158. package/lib/module/react/useChartFormatters.js.map +1 -0
  159. package/lib/module/react/useChartLayout.js +95 -0
  160. package/lib/module/react/useChartLayout.js.map +1 -0
  161. package/lib/module/react/useChartSelection.js +125 -0
  162. package/lib/module/react/useChartSelection.js.map +1 -0
  163. package/lib/module/react/useChartStatus.js +69 -0
  164. package/lib/module/react/useChartStatus.js.map +1 -0
  165. package/lib/module/render/Axis.js +80 -0
  166. package/lib/module/render/Axis.js.map +1 -0
  167. package/lib/module/render/Marks.js +173 -0
  168. package/lib/module/render/Marks.js.map +1 -0
  169. package/lib/module/validation/budgets.js +97 -0
  170. package/lib/module/validation/budgets.js.map +1 -0
  171. package/lib/module/validation/validateDatasource.js +184 -0
  172. package/lib/module/validation/validateDatasource.js.map +1 -0
  173. package/lib/typescript/commonjs/a11y/summary.d.ts +38 -0
  174. package/lib/typescript/commonjs/a11y/summary.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/contract/datasource.d.ts +94 -0
  176. package/lib/typescript/commonjs/contract/datasource.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/contract/distribution.d.ts +17 -0
  178. package/lib/typescript/commonjs/contract/distribution.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/contract/errors.d.ts +53 -0
  180. package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/contract/format.d.ts +63 -0
  182. package/lib/typescript/commonjs/contract/format.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/contract/interaction.d.ts +53 -0
  184. package/lib/typescript/commonjs/contract/interaction.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/contract/marker.d.ts +39 -0
  186. package/lib/typescript/commonjs/contract/marker.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/contract/props.d.ts +58 -0
  188. package/lib/typescript/commonjs/contract/props.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/contract/state.d.ts +45 -0
  190. package/lib/typescript/commonjs/contract/state.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/contract/strings.d.ts +39 -0
  192. package/lib/typescript/commonjs/contract/strings.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/contract/theme.d.ts +85 -0
  194. package/lib/typescript/commonjs/contract/theme.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/contract/value.d.ts +69 -0
  196. package/lib/typescript/commonjs/contract/value.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/geometry/bar.d.ts +18 -0
  198. package/lib/typescript/commonjs/geometry/bar.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/geometry/distribution.d.ts +23 -0
  200. package/lib/typescript/commonjs/geometry/distribution.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/geometry/heatmap.d.ts +24 -0
  202. package/lib/typescript/commonjs/geometry/heatmap.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/geometry/hitTest.d.ts +68 -0
  204. package/lib/typescript/commonjs/geometry/hitTest.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/geometry/layout.d.ts +67 -0
  206. package/lib/typescript/commonjs/geometry/layout.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/geometry/markers.d.ts +29 -0
  208. package/lib/typescript/commonjs/geometry/markers.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/geometry/path.d.ts +66 -0
  210. package/lib/typescript/commonjs/geometry/path.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/geometry/progress.d.ts +17 -0
  212. package/lib/typescript/commonjs/geometry/progress.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/geometry/scale.d.ts +55 -0
  214. package/lib/typescript/commonjs/geometry/scale.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/geometry/ticks.d.ts +48 -0
  216. package/lib/typescript/commonjs/geometry/ticks.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/geometry/timeSeries.d.ts +20 -0
  218. package/lib/typescript/commonjs/geometry/timeSeries.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/geometry/types.d.ts +91 -0
  220. package/lib/typescript/commonjs/geometry/types.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/index.d.ts +47 -0
  222. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/package.json +1 -0
  224. package/lib/typescript/commonjs/react/ChartBoundary.d.ts +47 -0
  225. package/lib/typescript/commonjs/react/ChartBoundary.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/react/ChartFrame.d.ts +31 -0
  227. package/lib/typescript/commonjs/react/ChartFrame.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/react/ChartLegend.d.ts +31 -0
  229. package/lib/typescript/commonjs/react/ChartLegend.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/react/ChartPlot.d.ts +19 -0
  231. package/lib/typescript/commonjs/react/ChartPlot.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/react/ChartStateOverlay.d.ts +25 -0
  233. package/lib/typescript/commonjs/react/ChartStateOverlay.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/react/ChartThemeProvider.d.ts +21 -0
  235. package/lib/typescript/commonjs/react/ChartThemeProvider.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/react/charts.d.ts +51 -0
  237. package/lib/typescript/commonjs/react/charts.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/react/pointEvent.d.ts +13 -0
  239. package/lib/typescript/commonjs/react/pointEvent.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/react/useChartA11y.d.ts +37 -0
  241. package/lib/typescript/commonjs/react/useChartA11y.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/react/useChartFormatters.d.ts +21 -0
  243. package/lib/typescript/commonjs/react/useChartFormatters.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/react/useChartLayout.d.ts +27 -0
  245. package/lib/typescript/commonjs/react/useChartLayout.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/react/useChartSelection.d.ts +52 -0
  247. package/lib/typescript/commonjs/react/useChartSelection.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/react/useChartStatus.d.ts +22 -0
  249. package/lib/typescript/commonjs/react/useChartStatus.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/render/Axis.d.ts +31 -0
  251. package/lib/typescript/commonjs/render/Axis.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/render/Marks.d.ts +44 -0
  253. package/lib/typescript/commonjs/render/Marks.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/validation/budgets.d.ts +24 -0
  255. package/lib/typescript/commonjs/validation/budgets.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/validation/validateDatasource.d.ts +26 -0
  257. package/lib/typescript/commonjs/validation/validateDatasource.d.ts.map +1 -0
  258. package/lib/typescript/module/a11y/summary.d.ts +38 -0
  259. package/lib/typescript/module/a11y/summary.d.ts.map +1 -0
  260. package/lib/typescript/module/contract/datasource.d.ts +94 -0
  261. package/lib/typescript/module/contract/datasource.d.ts.map +1 -0
  262. package/lib/typescript/module/contract/distribution.d.ts +17 -0
  263. package/lib/typescript/module/contract/distribution.d.ts.map +1 -0
  264. package/lib/typescript/module/contract/errors.d.ts +53 -0
  265. package/lib/typescript/module/contract/errors.d.ts.map +1 -0
  266. package/lib/typescript/module/contract/format.d.ts +63 -0
  267. package/lib/typescript/module/contract/format.d.ts.map +1 -0
  268. package/lib/typescript/module/contract/interaction.d.ts +53 -0
  269. package/lib/typescript/module/contract/interaction.d.ts.map +1 -0
  270. package/lib/typescript/module/contract/marker.d.ts +39 -0
  271. package/lib/typescript/module/contract/marker.d.ts.map +1 -0
  272. package/lib/typescript/module/contract/props.d.ts +58 -0
  273. package/lib/typescript/module/contract/props.d.ts.map +1 -0
  274. package/lib/typescript/module/contract/state.d.ts +45 -0
  275. package/lib/typescript/module/contract/state.d.ts.map +1 -0
  276. package/lib/typescript/module/contract/strings.d.ts +39 -0
  277. package/lib/typescript/module/contract/strings.d.ts.map +1 -0
  278. package/lib/typescript/module/contract/theme.d.ts +85 -0
  279. package/lib/typescript/module/contract/theme.d.ts.map +1 -0
  280. package/lib/typescript/module/contract/value.d.ts +69 -0
  281. package/lib/typescript/module/contract/value.d.ts.map +1 -0
  282. package/lib/typescript/module/geometry/bar.d.ts +18 -0
  283. package/lib/typescript/module/geometry/bar.d.ts.map +1 -0
  284. package/lib/typescript/module/geometry/distribution.d.ts +23 -0
  285. package/lib/typescript/module/geometry/distribution.d.ts.map +1 -0
  286. package/lib/typescript/module/geometry/heatmap.d.ts +24 -0
  287. package/lib/typescript/module/geometry/heatmap.d.ts.map +1 -0
  288. package/lib/typescript/module/geometry/hitTest.d.ts +68 -0
  289. package/lib/typescript/module/geometry/hitTest.d.ts.map +1 -0
  290. package/lib/typescript/module/geometry/layout.d.ts +67 -0
  291. package/lib/typescript/module/geometry/layout.d.ts.map +1 -0
  292. package/lib/typescript/module/geometry/markers.d.ts +29 -0
  293. package/lib/typescript/module/geometry/markers.d.ts.map +1 -0
  294. package/lib/typescript/module/geometry/path.d.ts +66 -0
  295. package/lib/typescript/module/geometry/path.d.ts.map +1 -0
  296. package/lib/typescript/module/geometry/progress.d.ts +17 -0
  297. package/lib/typescript/module/geometry/progress.d.ts.map +1 -0
  298. package/lib/typescript/module/geometry/scale.d.ts +55 -0
  299. package/lib/typescript/module/geometry/scale.d.ts.map +1 -0
  300. package/lib/typescript/module/geometry/ticks.d.ts +48 -0
  301. package/lib/typescript/module/geometry/ticks.d.ts.map +1 -0
  302. package/lib/typescript/module/geometry/timeSeries.d.ts +20 -0
  303. package/lib/typescript/module/geometry/timeSeries.d.ts.map +1 -0
  304. package/lib/typescript/module/geometry/types.d.ts +91 -0
  305. package/lib/typescript/module/geometry/types.d.ts.map +1 -0
  306. package/lib/typescript/module/index.d.ts +47 -0
  307. package/lib/typescript/module/index.d.ts.map +1 -0
  308. package/lib/typescript/module/package.json +1 -0
  309. package/lib/typescript/module/react/ChartBoundary.d.ts +47 -0
  310. package/lib/typescript/module/react/ChartBoundary.d.ts.map +1 -0
  311. package/lib/typescript/module/react/ChartFrame.d.ts +31 -0
  312. package/lib/typescript/module/react/ChartFrame.d.ts.map +1 -0
  313. package/lib/typescript/module/react/ChartLegend.d.ts +31 -0
  314. package/lib/typescript/module/react/ChartLegend.d.ts.map +1 -0
  315. package/lib/typescript/module/react/ChartPlot.d.ts +19 -0
  316. package/lib/typescript/module/react/ChartPlot.d.ts.map +1 -0
  317. package/lib/typescript/module/react/ChartStateOverlay.d.ts +25 -0
  318. package/lib/typescript/module/react/ChartStateOverlay.d.ts.map +1 -0
  319. package/lib/typescript/module/react/ChartThemeProvider.d.ts +21 -0
  320. package/lib/typescript/module/react/ChartThemeProvider.d.ts.map +1 -0
  321. package/lib/typescript/module/react/charts.d.ts +51 -0
  322. package/lib/typescript/module/react/charts.d.ts.map +1 -0
  323. package/lib/typescript/module/react/pointEvent.d.ts +13 -0
  324. package/lib/typescript/module/react/pointEvent.d.ts.map +1 -0
  325. package/lib/typescript/module/react/useChartA11y.d.ts +37 -0
  326. package/lib/typescript/module/react/useChartA11y.d.ts.map +1 -0
  327. package/lib/typescript/module/react/useChartFormatters.d.ts +21 -0
  328. package/lib/typescript/module/react/useChartFormatters.d.ts.map +1 -0
  329. package/lib/typescript/module/react/useChartLayout.d.ts +27 -0
  330. package/lib/typescript/module/react/useChartLayout.d.ts.map +1 -0
  331. package/lib/typescript/module/react/useChartSelection.d.ts +52 -0
  332. package/lib/typescript/module/react/useChartSelection.d.ts.map +1 -0
  333. package/lib/typescript/module/react/useChartStatus.d.ts +22 -0
  334. package/lib/typescript/module/react/useChartStatus.d.ts.map +1 -0
  335. package/lib/typescript/module/render/Axis.d.ts +31 -0
  336. package/lib/typescript/module/render/Axis.d.ts.map +1 -0
  337. package/lib/typescript/module/render/Marks.d.ts +44 -0
  338. package/lib/typescript/module/render/Marks.d.ts.map +1 -0
  339. package/lib/typescript/module/validation/budgets.d.ts +24 -0
  340. package/lib/typescript/module/validation/budgets.d.ts.map +1 -0
  341. package/lib/typescript/module/validation/validateDatasource.d.ts +26 -0
  342. package/lib/typescript/module/validation/validateDatasource.d.ts.map +1 -0
  343. package/package.json +40 -15
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Everything the chart draws from its geometry.
3
+ *
4
+ * Memoized on the geometry: selecting a point re-renders the frame and moves
5
+ * the highlight, and this subtree — the long path strings — is skipped
6
+ * (CHT-08). It used to be reconciled again on every tap.
7
+ */
8
+ import React from 'react';
9
+ import type { ChartTheme } from '../contract/theme.js';
10
+ import type { ResolvedGeometry } from '../geometry/types.js';
11
+ /** `labels` names rows and columns without drawing axis lines or a grid. */
12
+ export type ChartAxes = 'full' | 'labels' | 'none';
13
+ export declare const ChartPlot: React.NamedExoticComponent<{
14
+ readonly geometry: ResolvedGeometry;
15
+ readonly theme: ChartTheme;
16
+ readonly fontSize: number;
17
+ readonly axes: ChartAxes;
18
+ }>;
19
+ //# sourceMappingURL=ChartPlot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartPlot.d.ts","sourceRoot":"","sources":["../../../../src/react/ChartPlot.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAmB,CAAC;AAI1D,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnD,eAAO,MAAM,SAAS;uBAMF,gBAAgB;oBACnB,UAAU;uBACP,MAAM;mBACV,SAAS;EA8BvB,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * What a chart shows in place of data: the app's own content for the state,
3
+ * or a terse built-in line. Apps are expected to supply their own copy — the
4
+ * package must not impose product voice.
5
+ */
6
+ import React from 'react';
7
+ import type { ChartError } from '../contract/errors.js';
8
+ import type { ChartStatus } from '../contract/state.js';
9
+ import type { ChartStrings } from '../contract/strings.js';
10
+ import type { ChartTheme } from '../contract/theme.js';
11
+ export declare function ChartStateOverlay({ status, supplied, strings, theme, error, }: {
12
+ readonly status: ChartStatus;
13
+ /** The app's content for this state, when it gave any. */
14
+ readonly supplied?: React.ReactNode;
15
+ readonly strings: ChartStrings;
16
+ readonly theme: ChartTheme;
17
+ readonly error?: ChartError;
18
+ }): React.JSX.Element | null;
19
+ /** The message a contained render failure shows where the plot was. */
20
+ export declare function ChartFailureOverlay({ supplied, theme, error, }: {
21
+ readonly supplied?: React.ReactNode;
22
+ readonly theme: ChartTheme;
23
+ readonly error: ChartError;
24
+ }): React.JSX.Element;
25
+ //# sourceMappingURL=ChartStateOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartStateOverlay.d.ts","sourceRoot":"","sources":["../../../../src/react/ChartStateOverlay.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAqBpD,wBAAgB,iBAAiB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;CAC5B,4BAeA;AAED,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,EACnC,QAAQ,EACR,KAAK,EACL,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC3B,qBAUA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Theme resolution: prop -> context -> built-in default keyed on the OS scheme.
3
+ *
4
+ * The dependency is inverted on purpose. The package declares a `ChartTheme`
5
+ * value type and any design system can satisfy it, which is what keeps
6
+ * `@chipmobilesdk/rn-theme` and `react-native-unistyles` out of this package
7
+ * entirely (FR-065, LIB-004).
8
+ */
9
+ import React from 'react';
10
+ import { type ChartTheme } from '../contract/theme.js';
11
+ export declare function ChartThemeProvider({ theme, children, }: {
12
+ readonly theme: ChartTheme;
13
+ readonly children: React.ReactNode;
14
+ }): React.JSX.Element;
15
+ /**
16
+ * An explicit prop wins, then context, then the built-in default for the
17
+ * current OS colour scheme — so a chart renders correctly with no theme
18
+ * configuration at all.
19
+ */
20
+ export declare function useChartTheme(explicit?: ChartTheme): ChartTheme;
21
+ //# sourceMappingURL=ChartThemeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/react/ChartThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAGlE,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAIvE,wBAAgB,kBAAkB,CAAC,EAClC,KAAK,EACL,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC,qBAEA;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,CAa/D"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The five chart family components.
3
+ *
4
+ * Each is a thin wrapper over `ChartFrame` plus its own geometry builder, so
5
+ * validation, state handling, theming, selection, accessibility, and failure
6
+ * containment behave identically across every family.
7
+ *
8
+ * All five are wrapped in `React.memo`: value-identical props stop at the memo
9
+ * boundary and never reach geometry (FR-073, SC-017).
10
+ */
11
+ import React from 'react';
12
+ import type { DistributionValues } from '../contract/distribution.js';
13
+ import type { BaseChartProps } from '../contract/props.js';
14
+ import { type BarGrouping } from '../geometry/bar.js';
15
+ import { type DistributionShape } from '../geometry/distribution.js';
16
+ export type ProgressChartProps<M = unknown> = BaseChartProps<M>;
17
+ export interface DistributionChartProps<M = unknown> extends BaseChartProps<M> {
18
+ readonly shape?: DistributionShape;
19
+ readonly innerRadiusRatio?: number;
20
+ /**
21
+ * What the values mean. `proportions`: shares of a whole in 0..1, drawn short
22
+ * and marked incomplete when they do not reach 1. `absolute`: counts or
23
+ * amounts, normalised by their total. Inferred from the data when omitted;
24
+ * say it when small counts (1 and 1) could be read as shares.
25
+ */
26
+ readonly valuesAre?: DistributionValues;
27
+ }
28
+ export interface TimeSeriesChartProps<M = unknown> extends BaseChartProps<M> {
29
+ /** A window the app supplies. Users cannot pan or zoom (out of scope). */
30
+ readonly range?: {
31
+ readonly from: number;
32
+ readonly to: number;
33
+ };
34
+ }
35
+ export interface BarChartProps<M = unknown> extends BaseChartProps<M> {
36
+ readonly grouping?: BarGrouping;
37
+ }
38
+ export interface HeatmapChartProps<M = unknown> extends BaseChartProps<M> {
39
+ readonly buckets?: number;
40
+ }
41
+ /**
42
+ * `React.memo` erases the generic parameter, so each component is re-cast to a
43
+ * generic function type. This keeps `<BarChart<MyMeta> ... />` working for
44
+ * consumers while still getting the memo boundary.
45
+ */
46
+ export declare const ProgressChart: <M = unknown>(props: ProgressChartProps<M>) => React.ReactElement;
47
+ export declare const DistributionChart: <M = unknown>(props: DistributionChartProps<M>) => React.ReactElement;
48
+ export declare const TimeSeriesChart: <M = unknown>(props: TimeSeriesChartProps<M>) => React.ReactElement;
49
+ export declare const BarChart: <M = unknown>(props: BarChartProps<M>) => React.ReactElement;
50
+ export declare const HeatmapChart: <M = unknown>(props: HeatmapChartProps<M>) => React.ReactElement;
51
+ //# sourceMappingURL=charts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../../../../src/react/charts.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AACxD,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,oBAAiB,CAAC;AACrE,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,6BAA0B,CAAC;AAO7F,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAmBhE,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAyBD,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,cAAc,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import type { ChartDatasource, DataPoint, Series } from '../contract/datasource.js';
6
+ import type { PointInteractionEvent } from '../contract/interaction.js';
7
+ export interface ResolvedPoint<M> {
8
+ readonly series: Series<M>;
9
+ readonly point: DataPoint<M>;
10
+ }
11
+ export declare function findPoint<M>(datasource: ChartDatasource<M>, seriesId: string, pointId: string | undefined): ResolvedPoint<M> | undefined;
12
+ export declare function pointEventFor<M>(datasource: ChartDatasource<M>, seriesId: string, pointId: string): PointInteractionEvent<M> | undefined;
13
+ //# sourceMappingURL=pointEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointEvent.d.ts","sourceRoot":"","sources":["../../../../src/react/pointEvent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,2BAAwB,CAAC;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAAyB,CAAC;AAErE,MAAM,WAAW,aAAa,CAAC,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CAC7B;AAED,wBAAgB,SAAS,CAAC,CAAC,EAC1B,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GAAG,SAAS,GACzB,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAI9B;AAED,wBAAgB,aAAa,CAAC,CAAC,EAC9B,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACb,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS,CAatC"}
@@ -0,0 +1,37 @@
1
+ import type { ChartDatasource, ChartFamily } from '../contract/datasource.js';
2
+ import type { ChartAccessibility } from '../contract/props.js';
3
+ import type { ChartStatus } from '../contract/state.js';
4
+ import type { ChartStrings } from '../contract/strings.js';
5
+ import type { HitRegion } from '../geometry/hitTest.js';
6
+ import type { ResolvedFormatters } from './useChartFormatters.js';
7
+ import type { ChartSelectionApi } from './useChartSelection.js';
8
+ export interface UseChartA11yArgs<M> {
9
+ readonly datasource: ChartDatasource<M>;
10
+ readonly family: ChartFamily;
11
+ readonly status: ChartStatus;
12
+ readonly title?: string;
13
+ readonly accessibility?: ChartAccessibility<M>;
14
+ readonly interactive: boolean;
15
+ readonly incomplete: boolean;
16
+ readonly hitRegions: readonly HitRegion[];
17
+ readonly selection: ChartSelectionApi<M>;
18
+ readonly formatters: ResolvedFormatters;
19
+ readonly strings: ChartStrings;
20
+ }
21
+ export interface ChartA11y {
22
+ readonly summary: string;
23
+ readonly value: {
24
+ readonly text: string;
25
+ } | undefined;
26
+ readonly actions: readonly {
27
+ readonly name: string;
28
+ readonly label: string;
29
+ }[] | undefined;
30
+ readonly onAction: ((event: {
31
+ nativeEvent: {
32
+ actionName: string;
33
+ };
34
+ }) => void) | undefined;
35
+ }
36
+ export declare function useChartA11y<M>(args: UseChartA11yArgs<M>): ChartA11y;
37
+ //# sourceMappingURL=useChartA11y.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartA11y.d.ts","sourceRoot":"","sources":["../../../../src/react/useChartA11y.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,i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}
@@ -0,0 +1,21 @@
1
+ import type { Position } from '../contract/datasource.js';
2
+ import { type ChartFormatters, type FormatHint, type SeriesRef } from '../contract/format.js';
3
+ import type { ValueState } from '../contract/value.js';
4
+ export interface GeometryFormatters {
5
+ readonly formatValue: (value: number) => string;
6
+ readonly formatCategory: (raw: string) => string;
7
+ readonly formatInstant: (at: number) => string;
8
+ }
9
+ export interface ResolvedFormatters {
10
+ /** A value as the chart draws it. */
11
+ readonly formatValue: (value: ValueState) => string;
12
+ /** A value as the chart speaks it; the app's `summary` formatter when given. */
13
+ readonly formatSummaryValue: (value: ValueState) => string;
14
+ /** A position as the chart speaks it; the app's `axisLabel` formatter when given. */
15
+ readonly formatPosition: (position: Position) => string;
16
+ /** Present only when the app supplies `legendLabel`. */
17
+ readonly legendLabel?: (series: SeriesRef) => string;
18
+ readonly geometry: GeometryFormatters;
19
+ }
20
+ export declare function useChartFormatters(formatters: ChartFormatters | undefined, hint: FormatHint | undefined, instanceKey: string): ResolvedFormatters;
21
+ //# sourceMappingURL=useChartFormatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartFormatters.d.ts","sourceRoot":"","sources":["../../../../src/react/useChartFormatters.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAAwB,CAAC;AACvD,OAAO,EAIN,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,MAAM,uBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IAClC,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;IACpD,gFAAgF;IAChF,QAAQ,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;IAC3D,qFAAqF;IACrF,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,MAAM,CAAC;IACxD,wDAAwD;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACtC;AAED,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,eAAe,GAAG,SAAS,EACvC,IAAI,EAAE,UAAU,GAAG,SAAS,EAC5B,WAAW,EAAE,MAAM,GACjB,kBAAkB,CA2DpB"}
@@ -0,0 +1,27 @@
1
+ import { type LayoutChangeEvent } from 'react-native';
2
+ import type { ChartDatasource, ChartFamily } from '../contract/datasource.js';
3
+ import { type ChartTheme } from '../contract/theme.js';
4
+ import { type ContainerSize, type PlotRect } from '../geometry/layout.js';
5
+ import type { GeometryInput } from '../geometry/types.js';
6
+ export interface ChartLayout {
7
+ readonly onLayout: (event: LayoutChangeEvent) => void;
8
+ readonly size: ContainerSize;
9
+ readonly measured: boolean;
10
+ readonly plot: PlotRect;
11
+ readonly fontSize: number;
12
+ }
13
+ export declare function useChartLayout(theme: ChartTheme, options?: {
14
+ readonly height?: number;
15
+ readonly xLabels?: readonly string[];
16
+ readonly yLabels?: readonly string[];
17
+ }): ChartLayout;
18
+ /**
19
+ * Builds the geometry input, resolving per-series colours once so geometry
20
+ * modules never reach into the theme themselves.
21
+ */
22
+ export declare function useGeometryInput<M>(datasource: ChartDatasource<M>, theme: ChartTheme, layout: ChartLayout, formatters: {
23
+ readonly formatValue: (value: number) => string;
24
+ readonly formatCategory: (raw: string) => string;
25
+ readonly formatInstant: (at: number) => string;
26
+ }, family?: ChartFamily): GeometryInput;
27
+ //# sourceMappingURL=useChartLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartLayout.d.ts","sourceRoot":"","sources":["../../../../src/react/useChartLayout.ts"],"names":[],"mappings":"AAaA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AAC3E,OAAO,EAA4C,KAAK,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAC9F,OAAO,EAIN,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,MAAM,uBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAmB,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAC7B,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC,GACJ,WAAW,CA6Cb;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EACjC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE;IACX,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C,EACD,MAAM,CAAC,EAAE,WAAW,GAClB,aAAa,CAuBf"}
@@ -0,0 +1,52 @@
1
+ import type { PointInteractionEvent, SelectionRef, SeriesInteractionEvent } from '../contract/interaction.js';
2
+ import { type HitRegion } from '../geometry/hitTest.js';
3
+ export interface UseChartSelectionArgs<M> {
4
+ /** Present (including `null`) means the app owns the selection. */
5
+ readonly controlled?: SelectionRef | null;
6
+ readonly onSelectionChange?: (next: SelectionRef | null, event: PointInteractionEvent<M> | null) => void;
7
+ readonly onSelectionUnresolvable?: (ref: SelectionRef) => void;
8
+ readonly hitRegions: readonly HitRegion[];
9
+ /** Non-ready statuses suppress selection entirely (FR-053). */
10
+ readonly interactionSuppressed: boolean;
11
+ /**
12
+ * False until the container has been measured and geometry exists.
13
+ *
14
+ * Without this, a chart that has not laid out yet has no hit regions, and a
15
+ * perfectly valid app-controlled selection would be reported as
16
+ * unresolvable on first paint — telling the app its state is wrong when it
17
+ * is not.
18
+ */
19
+ readonly geometryReady: boolean;
20
+ }
21
+ export interface SelectOptions {
22
+ /**
23
+ * Selecting what is already selected clears it — the touch gesture. False
24
+ * for screen-reader stepping, where landing on the same point again (a chart
25
+ * with one point) must not switch the selection off and on (CHT-06).
26
+ */
27
+ readonly toggle?: boolean;
28
+ }
29
+ export interface ChartSelectionApi<M> {
30
+ /** What to draw. Never a reference the datasource cannot resolve. */
31
+ readonly resolved: HitRegion | undefined;
32
+ readonly selection: SelectionRef | null;
33
+ readonly select: (ref: SelectionRef | null, event: PointInteractionEvent<M> | null, options?: SelectOptions) => void;
34
+ }
35
+ export declare function useChartSelection<M>(args: UseChartSelectionArgs<M>): ChartSelectionApi<M>;
36
+ export interface UseSeriesVisibilityArgs<M> {
37
+ /** Present means the app owns visibility. */
38
+ readonly controlled?: readonly string[];
39
+ readonly onVisibilityChange?: (event: SeriesInteractionEvent<M>) => void;
40
+ /** Toggling stays off unless the app opts in (FR-049). */
41
+ readonly enabled: boolean;
42
+ /** Series marked hidden in the datasource itself. */
43
+ readonly initiallyHidden: readonly string[];
44
+ }
45
+ export interface SeriesVisibilityApi {
46
+ /** The same Set until the hidden ids change, so memos may depend on it. */
47
+ readonly hidden: ReadonlySet<string>;
48
+ readonly toggle: (seriesId: string, metadata?: unknown) => void;
49
+ readonly enabled: boolean;
50
+ }
51
+ export declare function useSeriesVisibility<M>(args: UseSeriesVisibilityArgs<M>): SeriesVisibilityApi;
52
+ //# sourceMappingURL=useChartSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartSelection.d.ts","sourceRoot":"","sources":["../../../../src/react/useChartSelection.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACX,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EACtB,MAAM,4BAAyB,CAAC;AAEjC,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAqB,CAAC;AAEjE,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAC5B,IAAI,EAAE,YAAY,GAAG,IAAI,EACzB,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI,KAClC,IAAI,CAAC;IACV,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,+DAA+D;IAC/D,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC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,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAoC5F"}
@@ -0,0 +1,22 @@
1
+ import type { ChartDatasource, ChartFamily } from '../contract/datasource.js';
2
+ import type { DistributionValues } from '../contract/distribution.js';
3
+ import { type ChartError, type ChartFailureHandler } from '../contract/errors.js';
4
+ import { type ChartStatus, type DeclarableChartStatus } from '../contract/state.js';
5
+ import { type ValidationResult } from '../validation/validateDatasource.js';
6
+ export interface UseChartStatusArgs<M> {
7
+ readonly datasource: ChartDatasource<M>;
8
+ readonly family: ChartFamily;
9
+ readonly chartId?: string;
10
+ /** `chartId`, or a generated id: what a once-per-chart warning is keyed on. */
11
+ readonly instanceKey: string;
12
+ readonly declared?: DeclarableChartStatus;
13
+ readonly onFailure?: ChartFailureHandler;
14
+ readonly distributionValues?: DistributionValues;
15
+ }
16
+ export interface ChartStatusResult {
17
+ readonly validation: ValidationResult;
18
+ readonly error: ChartError | undefined;
19
+ readonly status: ChartStatus;
20
+ }
21
+ export declare function useChartStatus<M>(args: UseChartStatusArgs<M>): ChartStatusResult;
22
+ //# sourceMappingURL=useChartStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartStatus.d.ts","sourceRoot":"","sources":["../../../../src/react/useChartStatus.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA0B,CAAC;AACnE,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAoB,CAAC;AAC3F,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAmB,CAAC;AAEhG,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,qCAAkC,CAAC;AAE7F,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACjD;AAED,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAsDhF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Axis and grid rendering. Private SVG adapter.
3
+ *
4
+ * Ticks arrive already thinned by `geometry/ticks.ts`, so nothing here decides
5
+ * what fits — this module only draws what the geometry chose.
6
+ */
7
+ import React from 'react';
8
+ import type { ChartTheme } from '../contract/theme.js';
9
+ import type { PlotRect } from '../geometry/layout.js';
10
+ import type { Tick } from '../geometry/ticks.js';
11
+ export declare function Grid({ plot, yTicks, theme, }: {
12
+ readonly plot: PlotRect;
13
+ readonly yTicks: readonly Tick[];
14
+ readonly theme: ChartTheme;
15
+ }): React.JSX.Element;
16
+ export declare function XAxis({ plot, ticks, theme, fontSize, line, }: {
17
+ readonly plot: PlotRect;
18
+ readonly ticks: readonly Tick[];
19
+ readonly theme: ChartTheme;
20
+ readonly fontSize: number;
21
+ /** False for a heatmap: its columns are named, but there is no axis to draw. */
22
+ readonly line?: boolean;
23
+ }): React.JSX.Element;
24
+ export declare function YAxis({ plot, ticks, theme, fontSize, line, }: {
25
+ readonly plot: PlotRect;
26
+ readonly ticks: readonly Tick[];
27
+ readonly theme: ChartTheme;
28
+ readonly fontSize: number;
29
+ readonly line?: boolean;
30
+ }): React.JSX.Element;
31
+ //# sourceMappingURL=Axis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../../src/render/Axis.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAmB,CAAC;AAE9C,wBAAgB,IAAI,CAAC,EACpB,IAAI,EACJ,MAAM,EACN,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC3B,qBAgBA;AAED,wBAAgB,KAAK,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAW,GACX,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACxB,qBA6BA;AAED,wBAAgB,KAAK,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAW,GACX,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACxB,qBA2BA"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Private SVG adapter for resolved geometry.
3
+ *
4
+ * Everything here consumes plain data produced by `geometry/`. Swapping the
5
+ * drawing substrate means rewriting this directory and nothing else.
6
+ */
7
+ import React from 'react';
8
+ import type { SeriesPattern } from '../contract/datasource.js';
9
+ import type { ChartTheme } from '../contract/theme.js';
10
+ import type { GeometryLabel, MarkPath, MarkerLine } from '../geometry/types.js';
11
+ /**
12
+ * Dash patterns give series a second, non-colour identity (FR-064). `undefined`
13
+ * means a solid stroke.
14
+ */
15
+ export declare function dashArrayFor(pattern: SeriesPattern): string | undefined;
16
+ /**
17
+ * Texture definitions for the three non-value classes.
18
+ *
19
+ * Deliberately shape-based rather than colour-based: a reader in greyscale, or
20
+ * with reduced colour perception, must still tell a gap from a hatch from a
21
+ * locked cell (FR-064, SC-012).
22
+ */
23
+ export declare function NonValueTextures({ theme }: {
24
+ readonly theme: ChartTheme;
25
+ }): React.JSX.Element;
26
+ export declare function Marks({ paths }: {
27
+ readonly paths: readonly MarkPath[];
28
+ }): React.JSX.Element;
29
+ export declare function MarkerLines({ markers, theme, }: {
30
+ readonly markers: readonly MarkerLine[];
31
+ readonly theme: ChartTheme;
32
+ }): React.JSX.Element;
33
+ export declare function GeometryLabels({ labels, theme, fontSize, }: {
34
+ readonly labels: readonly GeometryLabel[];
35
+ readonly theme: ChartTheme;
36
+ readonly fontSize: number;
37
+ }): React.JSX.Element;
38
+ /** Marks the currently selected point, when it still resolves. */
39
+ export declare function SelectionHighlight({ x, y, color, }: {
40
+ readonly x: number;
41
+ readonly y: number;
42
+ readonly color: string;
43
+ }): React.JSX.Element;
44
+ //# sourceMappingURL=Marks.d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AAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB,qBAOA"}
@@ -0,0 +1,24 @@
1
+ import type { ChartDatasource, ChartFamily } from '../contract/datasource.js';
2
+ export interface DatasetBudget {
3
+ readonly maxSeries: number;
4
+ readonly maxPointsPerSeries?: number;
5
+ readonly maxCells?: number;
6
+ }
7
+ export declare const DATASET_BUDGETS: Readonly<Record<ChartFamily, DatasetBudget>>;
8
+ export interface BudgetCheck {
9
+ readonly withinBudget: boolean;
10
+ readonly seriesCount: number;
11
+ readonly maxPointsInAnySeries: number;
12
+ readonly totalPoints: number;
13
+ }
14
+ export declare function checkBudget<M>(datasource: ChartDatasource<M>, family: ChartFamily): BudgetCheck;
15
+ /**
16
+ * Warns once per chart instance per mount. De-duplicating matters: a scrolling
17
+ * dashboard would otherwise flood the console on every frame.
18
+ */
19
+ export declare function warnIfOverBudget<M>(datasource: ChartDatasource<M>, family: ChartFamily, instanceKey: string): void;
20
+ /** Called on unmount so a remounted chart can warn again. */
21
+ export declare function releaseBudgetWarning(instanceKey: string): void;
22
+ /** Test-only reset. */
23
+ export declare function __resetBudgetWarnings(): void;
24
+ //# sourceMappingURL=budgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../../../src/validation/budgets.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AAE3E,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAMxE,CAAC;AAEF,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAsB/F;AAOD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EACjC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GACjB,IAAI,CA0BN;AAED,6DAA6D;AAC7D,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,uBAAuB;AACvB,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Datasource validation (FR-015, FR-017, FR-007a).
3
+ *
4
+ * Rules V1-V8 from specs/007-rn-chart-package/data-model.md §6. Every failure
5
+ * returns a `ChartError` built from the fixed message catalogue, so validation
6
+ * output can never carry a data value or a series label.
7
+ *
8
+ * Note V8: an empty datasource is **not** an error. It resolves to the empty
9
+ * state, which is a first-class outcome rather than a failure.
10
+ */
11
+ import { type ChartDatasource, type ChartFamily } from '../contract/datasource.js';
12
+ import { type DistributionValues } from '../contract/distribution.js';
13
+ import { type ChartError } from '../contract/errors.js';
14
+ export interface ValidationResult {
15
+ readonly error?: ChartError;
16
+ /** No points at all across every series (V8). */
17
+ readonly isEmpty: boolean;
18
+ /** Some points are known and others are not (FR-032). */
19
+ readonly isPartial: boolean;
20
+ /** Distribution segments that do not sum to the whole (V6, FR-024). */
21
+ readonly totalIncomplete: boolean;
22
+ }
23
+ export declare function validateDatasource<M>(datasource: ChartDatasource<M>, family: ChartFamily, chartId?: string,
24
+ /** What a distribution's values mean, when the app says; inferred otherwise. */
25
+ distributionValues?: DistributionValues): ValidationResult;
26
+ //# sourceMappingURL=validateDatasource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateDatasource.d.ts","sourceRoot":"","sources":["../../../../src/validation/validateDatasource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAEN,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,MAAM,2BAAwB,CAAC;AAChC,OAAO,EAGN,KAAK,kBAAkB,EACvB,MAAM,6BAA0B,CAAC;AAClC,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,uBAAoB,CAAC;AAGtE,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EACnC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,MAAM;AAChB,gFAAgF;AAChF,kBAAkB,CAAC,EAAE,kBAAkB,GACrC,gBAAgB,CAuIlB"}
package/package.json CHANGED
@@ -1,15 +1,23 @@
1
1
  {
2
2
  "name": "@chipmobilesdk/rn-chart",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
- "main": "src/index.ts",
7
- "types": "src/index.ts",
6
+ "source": "./src/index.ts",
7
+ "main": "./lib/commonjs/index.js",
8
+ "module": "./lib/module/index.js",
9
+ "types": "./lib/typescript/commonjs/index.d.ts",
8
10
  "exports": {
9
11
  ".": {
10
- "types": "./src/index.ts",
11
- "react-native": "./src/index.ts",
12
- "default": "./src/index.ts"
12
+ "chipmobilesdk-source": "./src/index.ts",
13
+ "import": {
14
+ "types": "./lib/typescript/module/index.d.ts",
15
+ "default": "./lib/module/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./lib/typescript/commonjs/index.d.ts",
19
+ "default": "./lib/commonjs/index.js"
20
+ }
13
21
  }
14
22
  },
15
23
  "files": [
@@ -22,28 +30,45 @@
22
30
  "src/validation",
23
31
  "skills",
24
32
  "README.md",
25
- "CHANGELOG.md"
33
+ "CHANGELOG.md",
34
+ "lib"
26
35
  ],
27
36
  "sideEffects": false,
28
37
  "scripts": {
38
+ "build": "bob build",
29
39
  "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.test.json",
30
- "pack:check": "npm pack --dry-run"
40
+ "pack:check": "npm pack --dry-run",
41
+ "prepack": "npm run build"
31
42
  },
32
43
  "dependencies": {
33
- "@chipmobilesdk/rn-core": "^0.1.0"
44
+ "@chipmobilesdk/rn-core": "^0.2.0"
34
45
  },
35
46
  "peerDependencies": {
36
47
  "react": ">=19",
37
48
  "react-native": ">=0.85",
38
- "react-native-svg": ">=15.15"
39
- },
40
- "peerDependenciesMeta": {
41
- "react-native-svg": {
42
- "optional": false
43
- }
49
+ "react-native-svg": "^15.15.0"
44
50
  },
45
51
  "publishConfig": {
46
52
  "access": "public",
47
53
  "registry": "https://registry.npmjs.org/"
54
+ },
55
+ "react-native-builder-bob": {
56
+ "source": "src",
57
+ "output": "lib",
58
+ "targets": [
59
+ [
60
+ "commonjs",
61
+ {
62
+ "esm": true
63
+ }
64
+ ],
65
+ [
66
+ "module",
67
+ {
68
+ "esm": true
69
+ }
70
+ ],
71
+ "typescript"
72
+ ]
48
73
  }
49
74
  }