@silverpoint/react 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/dist/activity-grid.js +4 -2
  2. package/dist/area-chart.js +4 -2
  3. package/dist/bar-chart.js +4 -2
  4. package/dist/base-C6zY78Va.d.ts +8 -0
  5. package/dist/bubble-chart.js +4 -2
  6. package/dist/bullet-chart.js +4 -2
  7. package/dist/candlestick-chart.js +4 -2
  8. package/dist/chord-ring.js +4 -2
  9. package/dist/chunk-2JWLXUY5.js +16 -0
  10. package/dist/chunk-2JWLXUY5.js.map +1 -0
  11. package/dist/{chunk-6FZO4SMF.js → chunk-3BREGZ7C.js} +2 -2
  12. package/dist/{chunk-LOIVX5IV.js → chunk-3U3Z5U6H.js} +2 -2
  13. package/dist/chunk-3WUPWJP2.js +17 -0
  14. package/dist/chunk-3WUPWJP2.js.map +1 -0
  15. package/dist/chunk-43AIURD6.js +21 -0
  16. package/dist/chunk-43AIURD6.js.map +1 -0
  17. package/dist/{chunk-INZGRNO3.js → chunk-46S63XYT.js} +10 -3
  18. package/dist/chunk-46S63XYT.js.map +1 -0
  19. package/dist/chunk-4GQ5X2WK.js +10 -0
  20. package/dist/chunk-4GQ5X2WK.js.map +1 -0
  21. package/dist/chunk-5FKONGCL.js +16 -0
  22. package/dist/chunk-5FKONGCL.js.map +1 -0
  23. package/dist/chunk-67FND3TB.js +26 -0
  24. package/dist/chunk-67FND3TB.js.map +1 -0
  25. package/dist/{chunk-PBT76UXS.js → chunk-6EFRIK7Q.js} +2 -2
  26. package/dist/{chunk-CXXCUD4B.js → chunk-6M4REUJE.js} +2 -2
  27. package/dist/chunk-6NXL245Z.js +16 -0
  28. package/dist/chunk-6NXL245Z.js.map +1 -0
  29. package/dist/{chunk-O2DNGRM7.js → chunk-6S6VKQ3E.js} +2 -2
  30. package/dist/{chunk-2JXPSUCK.js → chunk-AEU6UHVG.js} +2 -2
  31. package/dist/chunk-ART7CMBL.js +16 -0
  32. package/dist/chunk-ART7CMBL.js.map +1 -0
  33. package/dist/{chunk-Y7WZS3VB.js → chunk-C3NHZ4N5.js} +2 -2
  34. package/dist/chunk-CWFUPKSS.js +20 -0
  35. package/dist/chunk-CWFUPKSS.js.map +1 -0
  36. package/dist/chunk-DO4VUIUU.js +61 -0
  37. package/dist/chunk-DO4VUIUU.js.map +1 -0
  38. package/dist/{chunk-FDROMD5U.js → chunk-ESFN6FJY.js} +2 -2
  39. package/dist/{chunk-BHZNDYU3.js → chunk-FBJLA3P7.js} +32 -56
  40. package/dist/chunk-FBJLA3P7.js.map +1 -0
  41. package/dist/{chunk-NOVLEZPR.js → chunk-FHX2HWN3.js} +2 -2
  42. package/dist/{chunk-2Q2ZZTUW.js → chunk-FZ46YSJA.js} +2 -2
  43. package/dist/chunk-G7C4CH54.js +17 -0
  44. package/dist/chunk-G7C4CH54.js.map +1 -0
  45. package/dist/{chunk-KTBGRGB7.js → chunk-GSJYA76X.js} +2 -2
  46. package/dist/{chunk-DYK3SUIZ.js → chunk-GUKXFITX.js} +2 -2
  47. package/dist/{chunk-HYQLSAEO.js → chunk-I72JGA6Q.js} +2 -2
  48. package/dist/{chunk-AQMWZQ2P.js → chunk-J3E6IUUQ.js} +2 -2
  49. package/dist/{chunk-4DUH2UHE.js → chunk-JPTK2AAT.js} +2 -2
  50. package/dist/{chunk-YS5YVHK5.js → chunk-JWCVL7VE.js} +2 -2
  51. package/dist/{chunk-KPWHWNZH.js → chunk-KVOBNPDN.js} +2 -2
  52. package/dist/chunk-LSA5XU52.js +18 -0
  53. package/dist/chunk-LSA5XU52.js.map +1 -0
  54. package/dist/chunk-M56MDRNT.js +17 -0
  55. package/dist/chunk-M56MDRNT.js.map +1 -0
  56. package/dist/{chunk-HH2RZCH6.js → chunk-MC7N4KQA.js} +2 -2
  57. package/dist/{chunk-RUC577P7.js → chunk-MYKZWY2E.js} +2 -2
  58. package/dist/{chunk-5LQGSI6N.js → chunk-NA6K372D.js} +2 -2
  59. package/dist/{chunk-JCIEWEQC.js → chunk-NWK6VBCJ.js} +2 -2
  60. package/dist/{chunk-CI4PGKUI.js → chunk-NWRCFNYB.js} +2 -2
  61. package/dist/{chunk-WLHXHAEV.js → chunk-OAH7AEGE.js} +2 -2
  62. package/dist/chunk-OD6N2ATZ.js +45 -0
  63. package/dist/chunk-OD6N2ATZ.js.map +1 -0
  64. package/dist/chunk-OP2WE7MA.js +31 -0
  65. package/dist/chunk-OP2WE7MA.js.map +1 -0
  66. package/dist/{chunk-DZPDZGM7.js → chunk-PRVJKYEQ.js} +2 -2
  67. package/dist/chunk-QRYI7BEO.js +21 -0
  68. package/dist/chunk-QRYI7BEO.js.map +1 -0
  69. package/dist/{chunk-V3PBT4XB.js → chunk-RAATAHXZ.js} +2 -2
  70. package/dist/{chunk-R6PUPQUI.js → chunk-RIGQTEKW.js} +2 -2
  71. package/dist/{chunk-G2A5PWIR.js → chunk-RMIIFPXA.js} +2 -2
  72. package/dist/chunk-SQ6GWXDK.js +48 -0
  73. package/dist/chunk-SQ6GWXDK.js.map +1 -0
  74. package/dist/chunk-TH6Q4E7C.js +21 -0
  75. package/dist/chunk-TH6Q4E7C.js.map +1 -0
  76. package/dist/{chunk-NAYUAF7O.js → chunk-TSQWTDBK.js} +2 -2
  77. package/dist/{chunk-ORIH4UQP.js → chunk-U3LT444G.js} +2 -2
  78. package/dist/{chunk-BIIINOXE.js → chunk-UOOHQAJU.js} +2 -2
  79. package/dist/{chunk-CCFFHU7V.js → chunk-VKNGQ4NW.js} +2 -2
  80. package/dist/{chunk-M3X7JONW.js → chunk-WFO6BICV.js} +2 -2
  81. package/dist/chunk-WMU6O6KZ.js +21 -0
  82. package/dist/chunk-WMU6O6KZ.js.map +1 -0
  83. package/dist/chunk-WZZA2IGN.js +44 -0
  84. package/dist/chunk-WZZA2IGN.js.map +1 -0
  85. package/dist/{chunk-2OAPH7JN.js → chunk-X2F56RYM.js} +2 -2
  86. package/dist/chunk-ZBSCLF56.js +33 -0
  87. package/dist/chunk-ZBSCLF56.js.map +1 -0
  88. package/dist/chunk-ZOB6BH7H.js +21 -0
  89. package/dist/chunk-ZOB6BH7H.js.map +1 -0
  90. package/dist/composed-chart.js +4 -2
  91. package/dist/coxcomb-chart.js +4 -2
  92. package/dist/create-server-chart-DJQCtKVM.d.ts +17 -0
  93. package/dist/dashboard-link.d.ts +20 -0
  94. package/dist/dashboard-link.js +27 -0
  95. package/dist/dashboard-link.js.map +1 -0
  96. package/dist/dashboard-markup-_EoDs-s-.d.ts +21 -0
  97. package/dist/dashboard.d.ts +22 -0
  98. package/dist/dashboard.js +18 -0
  99. package/dist/dashboard.js.map +1 -0
  100. package/dist/donut-chart.js +4 -2
  101. package/dist/funnel-chart.js +4 -2
  102. package/dist/gauge-arc.js +4 -2
  103. package/dist/heatmap-chart.js +4 -2
  104. package/dist/index.js +36 -34
  105. package/dist/index.js.map +1 -1
  106. package/dist/kpi-card.js +4 -2
  107. package/dist/line-chart.js +4 -2
  108. package/dist/meter-chart.js +4 -2
  109. package/dist/orbit-chart.js +4 -2
  110. package/dist/polar-bar-chart.js +4 -2
  111. package/dist/pyramid-chart.js +4 -2
  112. package/dist/radar-chart.js +4 -2
  113. package/dist/radial-arc-group.js +4 -2
  114. package/dist/radial-rings.js +4 -2
  115. package/dist/range-band-chart.js +4 -2
  116. package/dist/sankey-chart.js +4 -2
  117. package/dist/scatter-chart.js +4 -2
  118. package/dist/server/activity-grid.d.ts +9 -2
  119. package/dist/server/activity-grid.js +1 -1
  120. package/dist/server/area-chart.d.ts +9 -2
  121. package/dist/server/area-chart.js +1 -1
  122. package/dist/server/bar-chart.d.ts +9 -2
  123. package/dist/server/bar-chart.js +1 -1
  124. package/dist/server/bubble-chart.d.ts +9 -2
  125. package/dist/server/bubble-chart.js +1 -1
  126. package/dist/server/bullet-chart.d.ts +9 -2
  127. package/dist/server/bullet-chart.js +1 -1
  128. package/dist/server/candlestick-chart.d.ts +9 -2
  129. package/dist/server/candlestick-chart.js +1 -1
  130. package/dist/server/chord-ring.d.ts +9 -2
  131. package/dist/server/chord-ring.js +1 -1
  132. package/dist/server/composed-chart.d.ts +9 -2
  133. package/dist/server/composed-chart.js +1 -1
  134. package/dist/server/coxcomb-chart.d.ts +9 -2
  135. package/dist/server/coxcomb-chart.js +1 -1
  136. package/dist/server/dashboard.d.ts +15 -0
  137. package/dist/server/dashboard.js +15 -0
  138. package/dist/server/dashboard.js.map +1 -0
  139. package/dist/server/donut-chart.d.ts +9 -2
  140. package/dist/server/donut-chart.js +1 -1
  141. package/dist/server/funnel-chart.d.ts +9 -2
  142. package/dist/server/funnel-chart.js +1 -1
  143. package/dist/server/gauge-arc.d.ts +9 -2
  144. package/dist/server/gauge-arc.js +1 -1
  145. package/dist/server/heatmap-chart.d.ts +9 -2
  146. package/dist/server/heatmap-chart.js +1 -1
  147. package/dist/server/kpi-card.d.ts +9 -2
  148. package/dist/server/kpi-card.js +1 -1
  149. package/dist/server/line-chart.d.ts +9 -2
  150. package/dist/server/line-chart.js +1 -1
  151. package/dist/server/meter-chart.d.ts +9 -2
  152. package/dist/server/meter-chart.js +1 -1
  153. package/dist/server/orbit-chart.d.ts +9 -2
  154. package/dist/server/orbit-chart.js +1 -1
  155. package/dist/server/polar-bar-chart.d.ts +9 -2
  156. package/dist/server/polar-bar-chart.js +1 -1
  157. package/dist/server/pyramid-chart.d.ts +9 -2
  158. package/dist/server/pyramid-chart.js +1 -1
  159. package/dist/server/radar-chart.d.ts +9 -2
  160. package/dist/server/radar-chart.js +1 -1
  161. package/dist/server/radial-arc-group.d.ts +9 -2
  162. package/dist/server/radial-arc-group.js +1 -1
  163. package/dist/server/radial-rings.d.ts +9 -2
  164. package/dist/server/radial-rings.js +1 -1
  165. package/dist/server/range-band-chart.d.ts +9 -2
  166. package/dist/server/range-band-chart.js +1 -1
  167. package/dist/server/sankey-chart.d.ts +9 -2
  168. package/dist/server/sankey-chart.js +1 -1
  169. package/dist/server/scatter-chart.d.ts +9 -2
  170. package/dist/server/scatter-chart.js +1 -1
  171. package/dist/server/sparkline-rows.d.ts +9 -2
  172. package/dist/server/sparkline-rows.js +1 -1
  173. package/dist/server/stacked-bar-chart.d.ts +9 -2
  174. package/dist/server/stacked-bar-chart.js +1 -1
  175. package/dist/server/step-chart.d.ts +9 -2
  176. package/dist/server/step-chart.js +1 -1
  177. package/dist/server/stream-chart.d.ts +9 -2
  178. package/dist/server/stream-chart.js +1 -1
  179. package/dist/server/treemap-chart.d.ts +9 -2
  180. package/dist/server/treemap-chart.js +1 -1
  181. package/dist/server/ui/alert.d.ts +17 -0
  182. package/dist/server/ui/alert.js +13 -0
  183. package/dist/server/ui/alert.js.map +1 -0
  184. package/dist/server/ui/badge.d.ts +15 -0
  185. package/dist/server/ui/badge.js +14 -0
  186. package/dist/server/ui/badge.js.map +1 -0
  187. package/dist/server/ui/card.d.ts +18 -0
  188. package/dist/server/ui/card.js +14 -0
  189. package/dist/server/ui/card.js.map +1 -0
  190. package/dist/server/ui/divider.d.ts +12 -0
  191. package/dist/server/ui/divider.js +13 -0
  192. package/dist/server/ui/divider.js.map +1 -0
  193. package/dist/server/ui/progress.d.ts +14 -0
  194. package/dist/server/ui/progress.js +13 -0
  195. package/dist/server/ui/progress.js.map +1 -0
  196. package/dist/server/ui/skeleton.d.ts +14 -0
  197. package/dist/server/ui/skeleton.js +13 -0
  198. package/dist/server/ui/skeleton.js.map +1 -0
  199. package/dist/server/ui/steps.d.ts +14 -0
  200. package/dist/server/ui/steps.js +13 -0
  201. package/dist/server/ui/steps.js.map +1 -0
  202. package/dist/server/ui/tag.d.ts +17 -0
  203. package/dist/server/ui/tag.js +14 -0
  204. package/dist/server/ui/tag.js.map +1 -0
  205. package/dist/server/volvelle-chart.d.ts +9 -2
  206. package/dist/server/volvelle-chart.js +1 -1
  207. package/dist/server/waterfall-chart.d.ts +9 -2
  208. package/dist/server/waterfall-chart.js +1 -1
  209. package/dist/server/wind-rose.d.ts +9 -2
  210. package/dist/server/wind-rose.js +1 -1
  211. package/dist/sparkline-rows.js +4 -2
  212. package/dist/stacked-bar-chart.js +4 -2
  213. package/dist/step-chart.js +4 -2
  214. package/dist/stream-chart.js +4 -2
  215. package/dist/treemap-chart.js +4 -2
  216. package/dist/ui/alert.d.ts +14 -0
  217. package/dist/ui/alert.js +10 -0
  218. package/dist/ui/alert.js.map +1 -0
  219. package/dist/ui/badge.d.ts +12 -0
  220. package/dist/ui/badge.js +10 -0
  221. package/dist/ui/badge.js.map +1 -0
  222. package/dist/ui/button.d.ts +14 -0
  223. package/dist/ui/button.js +10 -0
  224. package/dist/ui/button.js.map +1 -0
  225. package/dist/ui/card.d.ts +14 -0
  226. package/dist/ui/card.js +10 -0
  227. package/dist/ui/card.js.map +1 -0
  228. package/dist/ui/checkbox.d.ts +14 -0
  229. package/dist/ui/checkbox.js +10 -0
  230. package/dist/ui/checkbox.js.map +1 -0
  231. package/dist/ui/divider.d.ts +11 -0
  232. package/dist/ui/divider.js +10 -0
  233. package/dist/ui/divider.js.map +1 -0
  234. package/dist/ui/input.d.ts +19 -0
  235. package/dist/ui/input.js +10 -0
  236. package/dist/ui/input.js.map +1 -0
  237. package/dist/ui/progress.d.ts +11 -0
  238. package/dist/ui/progress.js +10 -0
  239. package/dist/ui/progress.js.map +1 -0
  240. package/dist/ui/radio-group.d.ts +16 -0
  241. package/dist/ui/radio-group.js +10 -0
  242. package/dist/ui/radio-group.js.map +1 -0
  243. package/dist/ui/rate.d.ts +15 -0
  244. package/dist/ui/rate.js +10 -0
  245. package/dist/ui/rate.js.map +1 -0
  246. package/dist/ui/segmented.d.ts +16 -0
  247. package/dist/ui/segmented.js +10 -0
  248. package/dist/ui/segmented.js.map +1 -0
  249. package/dist/ui/skeleton.d.ts +11 -0
  250. package/dist/ui/skeleton.js +10 -0
  251. package/dist/ui/skeleton.js.map +1 -0
  252. package/dist/ui/slider.d.ts +15 -0
  253. package/dist/ui/slider.js +10 -0
  254. package/dist/ui/slider.js.map +1 -0
  255. package/dist/ui/steps.d.ts +11 -0
  256. package/dist/ui/steps.js +10 -0
  257. package/dist/ui/steps.js.map +1 -0
  258. package/dist/ui/switch.d.ts +14 -0
  259. package/dist/ui/switch.js +10 -0
  260. package/dist/ui/switch.js.map +1 -0
  261. package/dist/ui/tabs.d.ts +25 -0
  262. package/dist/ui/tabs.js +12 -0
  263. package/dist/ui/tabs.js.map +1 -0
  264. package/dist/ui/tag.d.ts +14 -0
  265. package/dist/ui/tag.js +10 -0
  266. package/dist/ui/tag.js.map +1 -0
  267. package/dist/ui.d.ts +21 -0
  268. package/dist/ui.js +76 -0
  269. package/dist/ui.js.map +1 -0
  270. package/dist/volvelle-chart.js +4 -2
  271. package/dist/waterfall-chart.js +4 -2
  272. package/dist/wind-rose.js +4 -2
  273. package/package.json +177 -3
  274. package/dist/chunk-BHZNDYU3.js.map +0 -1
  275. package/dist/chunk-INZGRNO3.js.map +0 -1
  276. package/dist/create-server-chart-B0LbkpQP.d.ts +0 -16
  277. /package/dist/{chunk-6FZO4SMF.js.map → chunk-3BREGZ7C.js.map} +0 -0
  278. /package/dist/{chunk-LOIVX5IV.js.map → chunk-3U3Z5U6H.js.map} +0 -0
  279. /package/dist/{chunk-PBT76UXS.js.map → chunk-6EFRIK7Q.js.map} +0 -0
  280. /package/dist/{chunk-CXXCUD4B.js.map → chunk-6M4REUJE.js.map} +0 -0
  281. /package/dist/{chunk-O2DNGRM7.js.map → chunk-6S6VKQ3E.js.map} +0 -0
  282. /package/dist/{chunk-2JXPSUCK.js.map → chunk-AEU6UHVG.js.map} +0 -0
  283. /package/dist/{chunk-Y7WZS3VB.js.map → chunk-C3NHZ4N5.js.map} +0 -0
  284. /package/dist/{chunk-FDROMD5U.js.map → chunk-ESFN6FJY.js.map} +0 -0
  285. /package/dist/{chunk-NOVLEZPR.js.map → chunk-FHX2HWN3.js.map} +0 -0
  286. /package/dist/{chunk-2Q2ZZTUW.js.map → chunk-FZ46YSJA.js.map} +0 -0
  287. /package/dist/{chunk-KTBGRGB7.js.map → chunk-GSJYA76X.js.map} +0 -0
  288. /package/dist/{chunk-DYK3SUIZ.js.map → chunk-GUKXFITX.js.map} +0 -0
  289. /package/dist/{chunk-HYQLSAEO.js.map → chunk-I72JGA6Q.js.map} +0 -0
  290. /package/dist/{chunk-AQMWZQ2P.js.map → chunk-J3E6IUUQ.js.map} +0 -0
  291. /package/dist/{chunk-4DUH2UHE.js.map → chunk-JPTK2AAT.js.map} +0 -0
  292. /package/dist/{chunk-YS5YVHK5.js.map → chunk-JWCVL7VE.js.map} +0 -0
  293. /package/dist/{chunk-KPWHWNZH.js.map → chunk-KVOBNPDN.js.map} +0 -0
  294. /package/dist/{chunk-HH2RZCH6.js.map → chunk-MC7N4KQA.js.map} +0 -0
  295. /package/dist/{chunk-RUC577P7.js.map → chunk-MYKZWY2E.js.map} +0 -0
  296. /package/dist/{chunk-5LQGSI6N.js.map → chunk-NA6K372D.js.map} +0 -0
  297. /package/dist/{chunk-JCIEWEQC.js.map → chunk-NWK6VBCJ.js.map} +0 -0
  298. /package/dist/{chunk-CI4PGKUI.js.map → chunk-NWRCFNYB.js.map} +0 -0
  299. /package/dist/{chunk-WLHXHAEV.js.map → chunk-OAH7AEGE.js.map} +0 -0
  300. /package/dist/{chunk-DZPDZGM7.js.map → chunk-PRVJKYEQ.js.map} +0 -0
  301. /package/dist/{chunk-V3PBT4XB.js.map → chunk-RAATAHXZ.js.map} +0 -0
  302. /package/dist/{chunk-R6PUPQUI.js.map → chunk-RIGQTEKW.js.map} +0 -0
  303. /package/dist/{chunk-G2A5PWIR.js.map → chunk-RMIIFPXA.js.map} +0 -0
  304. /package/dist/{chunk-NAYUAF7O.js.map → chunk-TSQWTDBK.js.map} +0 -0
  305. /package/dist/{chunk-ORIH4UQP.js.map → chunk-U3LT444G.js.map} +0 -0
  306. /package/dist/{chunk-BIIINOXE.js.map → chunk-UOOHQAJU.js.map} +0 -0
  307. /package/dist/{chunk-CCFFHU7V.js.map → chunk-VKNGQ4NW.js.map} +0 -0
  308. /package/dist/{chunk-M3X7JONW.js.map → chunk-WFO6BICV.js.map} +0 -0
  309. /package/dist/{chunk-2OAPH7JN.js.map → chunk-X2F56RYM.js.map} +0 -0
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import {
3
+ renderUi,
4
+ useUi,
5
+ useValue
6
+ } from "./chunk-DO4VUIUU.js";
7
+
8
+ // src/ui/input.tsx
9
+ import { uiInputView } from "@silverpoint/core/ui";
10
+ import { forwardRef } from "react";
11
+ var SpInput = forwardRef(function SpInput2({ value, defaultValue, onChange, prefix, suffix, dashboardCell, ...props }, ref) {
12
+ const [current, set] = useValue(value, defaultValue ?? "", onChange);
13
+ const view = uiInputView(props, useUi(props, dashboardCell), { value: current, prefix: prefix != null, suffix: suffix != null });
14
+ const native = { ref, value: current, onChange: (event) => set(event.target.value) };
15
+ return renderUi(view, { native, slots: { prefix, suffix } });
16
+ });
17
+
18
+ export {
19
+ SpInput
20
+ };
21
+ //# sourceMappingURL=chunk-QRYI7BEO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/input.tsx"],"sourcesContent":["import { uiInputView, type SpInputProps as CoreProps } from '@silverpoint/core/ui';\nimport { forwardRef, type ChangeEvent, type ReactNode, type ReactElement } from 'react';\nimport { useUi, useValue, type UiCellProps } from './base';\nimport { renderUi } from './render';\n\nexport interface SpInputProps extends CoreProps, UiCellProps {\n /** Controlled value. */\n readonly value?: string;\n readonly defaultValue?: string;\n /** The new value, not the DOM event (REQ-322). */\n readonly onChange?: (value: string) => void;\n readonly prefix?: ReactNode;\n readonly suffix?: ReactNode;\n}\n\n/** `SpInput`: a native `<input>` in a framed box; its ref is the input (REQ-314, REQ-334). */\nexport const SpInput = forwardRef<HTMLInputElement, SpInputProps>(function SpInput(\n { value, defaultValue, onChange, prefix, suffix, dashboardCell, ...props },\n ref,\n) {\n const [current, set] = useValue(value, defaultValue ?? '', onChange);\n const view = uiInputView(props, useUi(props, dashboardCell), { value: current, prefix: prefix != null, suffix: suffix != null });\n const native = { ref, value: current, onChange: (event: ChangeEvent<HTMLInputElement>) => set(event.target.value) };\n return renderUi(view, { native, slots: { prefix, suffix } }) as ReactElement;\n});\n"],"mappings":";;;;;;;;AAAA,SAAS,mBAAmD;AAC5D,SAAS,kBAAuE;AAezE,IAAM,UAAU,WAA2C,SAASA,SACzE,EAAE,OAAO,cAAc,UAAU,QAAQ,QAAQ,eAAe,GAAG,MAAM,GACzE,KACA;AACA,QAAM,CAAC,SAAS,GAAG,IAAI,SAAS,OAAO,gBAAgB,IAAI,QAAQ;AACnE,QAAM,OAAO,YAAY,OAAO,MAAM,OAAO,aAAa,GAAG,EAAE,OAAO,SAAS,QAAQ,UAAU,MAAM,QAAQ,UAAU,KAAK,CAAC;AAC/H,QAAM,SAAS,EAAE,KAAK,OAAO,SAAS,UAAU,CAAC,UAAyC,IAAI,MAAM,OAAO,KAAK,EAAE;AAClH,SAAO,SAAS,MAAM,EAAE,QAAQ,OAAO,EAAE,QAAQ,OAAO,EAAE,CAAC;AAC7D,CAAC;","names":["SpInput"]}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/sankey-chart.tsx
7
7
  import { sankeyChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var SankeyChart = createClientChart(sankeyChart);
10
10
  export {
11
11
  SankeyChart
12
12
  };
13
- //# sourceMappingURL=chunk-V3PBT4XB.js.map
13
+ //# sourceMappingURL=chunk-RAATAHXZ.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/funnel-chart.tsx
7
7
  import { funnelChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var FunnelChart = createClientChart(funnelChart);
10
10
  export {
11
11
  FunnelChart
12
12
  };
13
- //# sourceMappingURL=chunk-R6PUPQUI.js.map
13
+ //# sourceMappingURL=chunk-RIGQTEKW.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/coxcomb-chart.tsx
7
7
  import { coxcombChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var CoxcombChart = createClientChart(coxcombChart);
10
10
  export {
11
11
  CoxcombChart
12
12
  };
13
- //# sourceMappingURL=chunk-G2A5PWIR.js.map
13
+ //# sourceMappingURL=chunk-RMIIFPXA.js.map
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+
3
+ // src/context.ts
4
+ import { createContext } from "react";
5
+ var SilverpointContext = createContext({});
6
+
7
+ // src/environment.ts
8
+ import { checkTypeface, FORCED_PRECISION_QUERY } from "@silverpoint/core";
9
+ import { useEffect, useState } from "react";
10
+ function useForcedPrecision() {
11
+ const [forced, setForced] = useState(false);
12
+ useEffect(() => {
13
+ if (typeof matchMedia !== "function") return;
14
+ const query = matchMedia(FORCED_PRECISION_QUERY);
15
+ const update = () => setForced(query.matches);
16
+ update();
17
+ query.addEventListener?.("change", update);
18
+ return () => query.removeEventListener?.("change", update);
19
+ }, []);
20
+ return forced;
21
+ }
22
+ function useMeasuredWidth(ref, enabled) {
23
+ const [width, setWidth] = useState(void 0);
24
+ useEffect(() => {
25
+ const element = ref.current;
26
+ if (!enabled || !element || typeof ResizeObserver !== "function") return;
27
+ const observer = new ResizeObserver((entries) => {
28
+ const entry = entries[0];
29
+ if (entry) setWidth(entry.contentRect.width);
30
+ });
31
+ observer.observe(element);
32
+ return () => observer.disconnect();
33
+ }, [ref, enabled]);
34
+ return width;
35
+ }
36
+ function useTypefaceCheck(chart) {
37
+ useEffect(() => {
38
+ if (typeof document !== "undefined" && document.fonts) void checkTypeface(document.fonts, chart);
39
+ }, [chart]);
40
+ }
41
+
42
+ export {
43
+ SilverpointContext,
44
+ useForcedPrecision,
45
+ useMeasuredWidth,
46
+ useTypefaceCheck
47
+ };
48
+ //# sourceMappingURL=chunk-SQ6GWXDK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/context.ts","../src/environment.ts"],"sourcesContent":["import type { ProviderConfig } from '@silverpoint/core';\nimport { createContext } from 'react';\n\n/** Application-wide configuration (API Spec §8.1); a chart prop always wins over it. */\nexport const SilverpointContext = createContext<ProviderConfig>({});\n","import { checkTypeface, FORCED_PRECISION_QUERY } from '@silverpoint/core';\nimport { useEffect, useState, type RefObject } from 'react';\n\n/**\n * Whether the environment forces `precision` (REQ-123). Read after hydration, so the server\n * render and the first client render agree (REQ-103).\n */\nexport function useForcedPrecision(): boolean {\n const [forced, setForced] = useState(false);\n useEffect(() => {\n if (typeof matchMedia !== 'function') return;\n const query = matchMedia(FORCED_PRECISION_QUERY);\n const update = () => setForced(query.matches);\n update();\n query.addEventListener?.('change', update);\n return () => query.removeEventListener?.('change', update);\n }, []);\n return forced;\n}\n\n/** Width of the container, measured with ResizeObserver; `undefined` until measured (REQ-009). */\nexport function useMeasuredWidth(ref: RefObject<HTMLElement | null>, enabled: boolean): number | undefined {\n const [width, setWidth] = useState<number | undefined>(undefined);\n useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof ResizeObserver !== 'function') return;\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setWidth(entry.contentRect.width);\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled]);\n return width;\n}\n\n/** Reports SP013 when the display typeface fails to load; never blocks the render (REQ-032). */\nexport function useTypefaceCheck(chart: string): void {\n useEffect(() => {\n if (typeof document !== 'undefined' && document.fonts) void checkTypeface(document.fonts, chart);\n }, [chart]);\n}\n"],"mappings":";;;AACA,SAAS,qBAAqB;AAGvB,IAAM,qBAAqB,cAA8B,CAAC,CAAC;;;ACJlE,SAAS,eAAe,8BAA8B;AACtD,SAAS,WAAW,gBAAgC;AAM7C,SAAS,qBAA8B;AAC5C,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,YAAU,MAAM;AACd,QAAI,OAAO,eAAe,WAAY;AACtC,UAAM,QAAQ,WAAW,sBAAsB;AAC/C,UAAM,SAAS,MAAM,UAAU,MAAM,OAAO;AAC5C,WAAO;AACP,UAAM,mBAAmB,UAAU,MAAM;AACzC,WAAO,MAAM,MAAM,sBAAsB,UAAU,MAAM;AAAA,EAC3D,GAAG,CAAC,CAAC;AACL,SAAO;AACT;AAGO,SAAS,iBAAiB,KAAoC,SAAsC;AACzG,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA6B,MAAS;AAChE,YAAU,MAAM;AACd,UAAM,UAAU,IAAI;AACpB,QAAI,CAAC,WAAW,CAAC,WAAW,OAAO,mBAAmB,WAAY;AAClE,UAAM,WAAW,IAAI,eAAe,CAAC,YAAY;AAC/C,YAAM,QAAQ,QAAQ,CAAC;AACvB,UAAI,MAAO,UAAS,MAAM,YAAY,KAAK;AAAA,IAC7C,CAAC;AACD,aAAS,QAAQ,OAAO;AACxB,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,KAAK,OAAO,CAAC;AACjB,SAAO;AACT;AAGO,SAAS,iBAAiB,OAAqB;AACpD,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,eAAe,SAAS,MAAO,MAAK,cAAc,SAAS,OAAO,KAAK;AAAA,EACjG,GAAG,CAAC,KAAK,CAAC;AACZ;","names":[]}
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import {
3
+ renderUi,
4
+ useUi,
5
+ useValue
6
+ } from "./chunk-DO4VUIUU.js";
7
+
8
+ // src/ui/segmented.tsx
9
+ import { uiRovingFocus, uiSegmentedView } from "@silverpoint/core/ui";
10
+ function SpSegmented({ value, defaultValue, onChange, dashboardCell, ...props }) {
11
+ const [current, set] = useValue(value, defaultValue, onChange);
12
+ const view = uiSegmentedView(props, useUi(props, dashboardCell), { value: current ?? null });
13
+ const native = (node) => ({ checked: node.attrs.checked === true, onChange: (event) => set(event.target.value) });
14
+ const onKeyDown = (event) => uiRovingFocus(event, event.currentTarget, "input.sp-ui-native", "both", true);
15
+ return renderUi(view, { root: { onKeyDown }, native });
16
+ }
17
+
18
+ export {
19
+ SpSegmented
20
+ };
21
+ //# sourceMappingURL=chunk-TH6Q4E7C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/segmented.tsx"],"sourcesContent":["import { uiRovingFocus, uiSegmentedView, type SpSegmentedProps as CoreProps, type UiElement } from '@silverpoint/core/ui';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport { useUi, useValue, type UiCellProps } from './base';\nimport { renderUi } from './render';\n\nexport interface SpSegmentedProps extends CoreProps, UiCellProps {\n /** Controlled key; an unknown one shows the first enabled segment. */\n readonly value?: string;\n readonly defaultValue?: string;\n /** The key selected, not the DOM event (REQ-322). */\n readonly onChange?: (value: string) => void;\n}\n\n/** `SpSegmented`: native radios in one frame; arrows move and select through the core (REQ-315). */\nexport function SpSegmented({ value, defaultValue, onChange, dashboardCell, ...props }: SpSegmentedProps) {\n const [current, set] = useValue<string | undefined>(value, defaultValue, onChange as (next: string | undefined) => void);\n const view = uiSegmentedView(props, useUi(props, dashboardCell), { value: current ?? null });\n const native = (node: UiElement) => ({ checked: node.attrs.checked === true, onChange: (event: ChangeEvent<HTMLInputElement>) => set(event.target.value) });\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => uiRovingFocus(event, event.currentTarget, 'input.sp-ui-native', 'both', true);\n return renderUi(view, { root: { onKeyDown }, native }) as ReactElement;\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe,uBAA2E;AAc5F,SAAS,YAAY,EAAE,OAAO,cAAc,UAAU,eAAe,GAAG,MAAM,GAAqB;AACxG,QAAM,CAAC,SAAS,GAAG,IAAI,SAA6B,OAAO,cAAc,QAA8C;AACvH,QAAM,OAAO,gBAAgB,OAAO,MAAM,OAAO,aAAa,GAAG,EAAE,OAAO,WAAW,KAAK,CAAC;AAC3F,QAAM,SAAS,CAAC,UAAqB,EAAE,SAAS,KAAK,MAAM,YAAY,MAAM,UAAU,CAAC,UAAyC,IAAI,MAAM,OAAO,KAAK,EAAE;AACzJ,QAAM,YAAY,CAAC,UAAsC,cAAc,OAAO,MAAM,eAAe,sBAAsB,QAAQ,IAAI;AACrI,SAAO,SAAS,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;AACvD;","names":[]}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/orbit-chart.tsx
7
7
  import { orbitChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var OrbitChart = createClientChart(orbitChart);
10
10
  export {
11
11
  OrbitChart
12
12
  };
13
- //# sourceMappingURL=chunk-NAYUAF7O.js.map
13
+ //# sourceMappingURL=chunk-TSQWTDBK.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/area-chart.tsx
7
7
  import { areaChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var AreaChart = createClientChart(areaChart);
10
10
  export {
11
11
  AreaChart
12
12
  };
13
- //# sourceMappingURL=chunk-ORIH4UQP.js.map
13
+ //# sourceMappingURL=chunk-U3LT444G.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/stream-chart.tsx
7
7
  import { streamChart } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var StreamChart = createClientChart(streamChart);
10
10
  export {
11
11
  StreamChart
12
12
  };
13
- //# sourceMappingURL=chunk-BIIINOXE.js.map
13
+ //# sourceMappingURL=chunk-UOOHQAJU.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/kpi-card.tsx
7
7
  import { kpiCard } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var KpiCard = createClientChart(kpiCard);
10
10
  export {
11
11
  KpiCard
12
12
  };
13
- //# sourceMappingURL=chunk-CCFFHU7V.js.map
13
+ //# sourceMappingURL=chunk-VKNGQ4NW.js.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/radial-rings.tsx
7
7
  import { radialRings } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var RadialRings = createClientChart(radialRings);
10
10
  export {
11
11
  RadialRings
12
12
  };
13
- //# sourceMappingURL=chunk-M3X7JONW.js.map
13
+ //# sourceMappingURL=chunk-WFO6BICV.js.map
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import {
3
+ renderUi,
4
+ useUi,
5
+ useValue
6
+ } from "./chunk-DO4VUIUU.js";
7
+
8
+ // src/ui/slider.tsx
9
+ import { uiSliderView } from "@silverpoint/core/ui";
10
+ import { forwardRef } from "react";
11
+ var SpSlider = forwardRef(function SpSlider2({ value, defaultValue, onChange, dashboardCell, ...props }, ref) {
12
+ const [current, set] = useValue(value, defaultValue ?? props.min ?? 0, onChange);
13
+ const view = uiSliderView(props, useUi(props, dashboardCell), { value: current });
14
+ const native = { ref, onChange: (event) => set(event.target.valueAsNumber) };
15
+ return renderUi(view, { native });
16
+ });
17
+
18
+ export {
19
+ SpSlider
20
+ };
21
+ //# sourceMappingURL=chunk-WMU6O6KZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/slider.tsx"],"sourcesContent":["import { uiSliderView, type SpSliderProps as CoreProps } from '@silverpoint/core/ui';\nimport { forwardRef, type ChangeEvent, type ReactElement } from 'react';\nimport { useUi, useValue, type UiCellProps } from './base';\nimport { renderUi } from './render';\n\nexport interface SpSliderProps extends CoreProps, UiCellProps {\n readonly value?: number;\n readonly defaultValue?: number;\n /** The number, not the DOM event (REQ-322). */\n readonly onChange?: (value: number) => void;\n}\n\n/** `SpSlider`: a native range over the exact drawing; its ref is the input (REQ-314, DD-025). */\nexport const SpSlider = forwardRef<HTMLInputElement, SpSliderProps>(function SpSlider({ value, defaultValue, onChange, dashboardCell, ...props }, ref) {\n const [current, set] = useValue(value, defaultValue ?? props.min ?? 0, onChange);\n const view = uiSliderView(props, useUi(props, dashboardCell), { value: current });\n const native = { ref, onChange: (event: ChangeEvent<HTMLInputElement>) => set(event.target.valueAsNumber) };\n return renderUi(view, { native }) as ReactElement;\n});\n"],"mappings":";;;;;;;;AAAA,SAAS,oBAAqD;AAC9D,SAAS,kBAAuD;AAYzD,IAAM,WAAW,WAA4C,SAASA,UAAS,EAAE,OAAO,cAAc,UAAU,eAAe,GAAG,MAAM,GAAG,KAAK;AACrJ,QAAM,CAAC,SAAS,GAAG,IAAI,SAAS,OAAO,gBAAgB,MAAM,OAAO,GAAG,QAAQ;AAC/E,QAAM,OAAO,aAAa,OAAO,MAAM,OAAO,aAAa,GAAG,EAAE,OAAO,QAAQ,CAAC;AAChF,QAAM,SAAS,EAAE,KAAK,UAAU,CAAC,UAAyC,IAAI,MAAM,OAAO,aAAa,EAAE;AAC1G,SAAO,SAAS,MAAM,EAAE,OAAO,CAAC;AAClC,CAAC;","names":["SpSlider"]}
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import {
3
+ renderUi,
4
+ useUi,
5
+ useValue
6
+ } from "./chunk-DO4VUIUU.js";
7
+
8
+ // src/ui/checkbox.tsx
9
+ import { uiCheckboxView } from "@silverpoint/core/ui";
10
+ import { forwardRef } from "react";
11
+
12
+ // src/ui/checkable.ts
13
+ import { useCallback, useEffect, useRef } from "react";
14
+ function useNativeRef(forwarded, indeterminate) {
15
+ const own = useRef(null);
16
+ useEffect(() => {
17
+ if (own.current) own.current.indeterminate = indeterminate;
18
+ }, [indeterminate]);
19
+ return useCallback(
20
+ (node) => {
21
+ own.current = node;
22
+ if (typeof forwarded === "function") forwarded(node);
23
+ else if (forwarded) forwarded.current = node;
24
+ },
25
+ [forwarded]
26
+ );
27
+ }
28
+
29
+ // src/ui/checkbox.tsx
30
+ var SpCheckbox = forwardRef(function SpCheckbox2({ checked, defaultChecked, onChange, dashboardCell, ...props }, ref) {
31
+ const [current, set] = useValue(checked, defaultChecked ?? false, onChange);
32
+ const view = uiCheckboxView(props, useUi(props, dashboardCell), { checked: current });
33
+ const native = {
34
+ ref: useNativeRef(ref, props.indeterminate === true),
35
+ checked: current,
36
+ onChange: (event) => set(event.target.checked)
37
+ };
38
+ return renderUi(view, { native });
39
+ });
40
+
41
+ export {
42
+ SpCheckbox
43
+ };
44
+ //# sourceMappingURL=chunk-WZZA2IGN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/checkbox.tsx","../src/ui/checkable.ts"],"sourcesContent":["import { uiCheckboxView, type SpCheckboxProps as CoreProps } from '@silverpoint/core/ui';\nimport { forwardRef, type ChangeEvent, type ReactElement } from 'react';\nimport { useUi, useValue, type UiCellProps } from './base';\nimport { useNativeRef } from './checkable';\nimport { renderUi } from './render';\n\nexport interface SpCheckboxProps extends CoreProps, UiCellProps {\n readonly checked?: boolean;\n readonly defaultChecked?: boolean;\n readonly onChange?: (checked: boolean) => void;\n}\n\n/** `SpCheckbox`: a native checkbox, hidden for sight, in its `<label>`; its ref is the input. */\nexport const SpCheckbox = forwardRef<HTMLInputElement, SpCheckboxProps>(function SpCheckbox(\n { checked, defaultChecked, onChange, dashboardCell, ...props },\n ref,\n) {\n const [current, set] = useValue(checked, defaultChecked ?? false, onChange);\n const view = uiCheckboxView(props, useUi(props, dashboardCell), { checked: current });\n const native = {\n ref: useNativeRef(ref, props.indeterminate === true),\n checked: current,\n onChange: (event: ChangeEvent<HTMLInputElement>) => set(event.target.checked),\n };\n return renderUi(view, { native }) as ReactElement;\n});\n","import { useCallback, useEffect, useRef, type ForwardedRef } from 'react';\n\n/** One ref for the native checkbox: the consumer's, and ours for the `indeterminate` property. */\nexport function useNativeRef(forwarded: ForwardedRef<HTMLInputElement>, indeterminate: boolean): (node: HTMLInputElement | null) => void {\n const own = useRef<HTMLInputElement | null>(null);\n // `indeterminate` is a property, not an attribute: set after hydration, so both renders agree.\n useEffect(() => {\n if (own.current) own.current.indeterminate = indeterminate;\n }, [indeterminate]);\n return useCallback(\n (node: HTMLInputElement | null) => {\n own.current = node;\n if (typeof forwarded === 'function') forwarded(node);\n else if (forwarded) forwarded.current = node;\n },\n [forwarded],\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,sBAAyD;AAClE,SAAS,kBAAuD;;;ACDhE,SAAS,aAAa,WAAW,cAAiC;AAG3D,SAAS,aAAa,WAA2C,eAAiE;AACvI,QAAM,MAAM,OAAgC,IAAI;AAEhD,YAAU,MAAM;AACd,QAAI,IAAI,QAAS,KAAI,QAAQ,gBAAgB;AAAA,EAC/C,GAAG,CAAC,aAAa,CAAC;AAClB,SAAO;AAAA,IACL,CAAC,SAAkC;AACjC,UAAI,UAAU;AACd,UAAI,OAAO,cAAc,WAAY,WAAU,IAAI;AAAA,eAC1C,UAAW,WAAU,UAAU;AAAA,IAC1C;AAAA,IACA,CAAC,SAAS;AAAA,EACZ;AACF;;;ADJO,IAAM,aAAa,WAA8C,SAASA,YAC/E,EAAE,SAAS,gBAAgB,UAAU,eAAe,GAAG,MAAM,GAC7D,KACA;AACA,QAAM,CAAC,SAAS,GAAG,IAAI,SAAS,SAAS,kBAAkB,OAAO,QAAQ;AAC1E,QAAM,OAAO,eAAe,OAAO,MAAM,OAAO,aAAa,GAAG,EAAE,SAAS,QAAQ,CAAC;AACpF,QAAM,SAAS;AAAA,IACb,KAAK,aAAa,KAAK,MAAM,kBAAkB,IAAI;AAAA,IACnD,SAAS;AAAA,IACT,UAAU,CAAC,UAAyC,IAAI,MAAM,OAAO,OAAO;AAAA,EAC9E;AACA,SAAO,SAAS,MAAM,EAAE,OAAO,CAAC;AAClC,CAAC;","names":["SpCheckbox"]}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  createClientChart
4
- } from "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-FBJLA3P7.js";
5
5
 
6
6
  // src/chord-ring.tsx
7
7
  import { chordRing } from "@silverpoint/core";
@@ -10,4 +10,4 @@ var ChordRing = createClientChart(chordRing);
10
10
  export {
11
11
  ChordRing
12
12
  };
13
- //# sourceMappingURL=chunk-2OAPH7JN.js.map
13
+ //# sourceMappingURL=chunk-X2F56RYM.js.map
@@ -0,0 +1,33 @@
1
+ // src/ui/render.tsx
2
+ import { createElement } from "react";
3
+ var PROPS = { class: "className", for: "htmlFor", readonly: "readOnly", tabindex: "tabIndex" };
4
+ function styleObject(value) {
5
+ const out = {};
6
+ for (const declaration of value.split(";")) {
7
+ const at = declaration.indexOf(":");
8
+ if (at > 0) out[declaration.slice(0, at).trim()] = declaration.slice(at + 1).trim();
9
+ }
10
+ return out;
11
+ }
12
+ function renderUi(node, bindings, root = true) {
13
+ if ("text" in node) return node.text;
14
+ if ("slot" in node) return bindings.slots?.[node.slot] ?? null;
15
+ const props = {};
16
+ for (const [name, value] of Object.entries(node.attrs)) {
17
+ props[PROPS[name] ?? name] = name === "style" && typeof value === "string" ? styleObject(value) : value;
18
+ }
19
+ if (root) Object.assign(props, bindings.root);
20
+ if (node.bind === "native") Object.assign(props, typeof bindings.native === "function" ? bindings.native(node) : bindings.native);
21
+ if (node.bind === "close") Object.assign(props, bindings.close);
22
+ return createElement(node.tag, props, ...node.children.map((child) => renderUi(child, bindings, false)));
23
+ }
24
+ function textOf(children) {
25
+ if (typeof children === "string" || typeof children === "number") return String(children);
26
+ return children === void 0 || children === null || children === false ? void 0 : "\xB7";
27
+ }
28
+
29
+ export {
30
+ renderUi,
31
+ textOf
32
+ };
33
+ //# sourceMappingURL=chunk-ZBSCLF56.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/render.tsx"],"sourcesContent":["import type { UiElement, UiNode, UiSlot } from '@silverpoint/core/ui';\nimport { createElement, type ReactNode } from 'react';\n\n/** HTML attribute names React spells differently. */\nconst PROPS: Readonly<Record<string, string>> = { class: 'className', for: 'htmlFor', readonly: 'readOnly', tabindex: 'tabIndex' };\n\n/** `--a:1;b:2` as React's style object; custom properties keep their names. */\nfunction styleObject(value: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const declaration of value.split(';')) {\n const at = declaration.indexOf(':');\n if (at > 0) out[declaration.slice(0, at).trim()] = declaration.slice(at + 1).trim();\n }\n return out;\n}\n\nexport interface UiBindings {\n /** Props added to the root element: a ref, a click handler. */\n readonly root?: Readonly<Record<string, unknown>>;\n /**\n * Props added to each element the core marks `native`: value, handlers, a ref. A function when a\n * composite has several (one radio per item), each told apart by its own attributes.\n */\n readonly native?: Readonly<Record<string, unknown>> | ((node: UiElement) => Readonly<Record<string, unknown>>);\n /** Props added to the close button of a Tag or an Alert. */\n readonly close?: Readonly<Record<string, unknown>>;\n readonly slots?: Partial<Record<UiSlot, ReactNode>>;\n}\n\n/**\n * Writes the core's view tree as React elements (API delta §4): the markup is the core's, attribute\n * for attribute; this adds only the bindings. No hooks, so a server entry uses it as well (REQ-104).\n */\nexport function renderUi(node: UiNode, bindings: UiBindings, root = true): ReactNode {\n if ('text' in node) return node.text;\n if ('slot' in node) return bindings.slots?.[node.slot] ?? null;\n const props: Record<string, unknown> = {};\n for (const [name, value] of Object.entries(node.attrs)) {\n props[PROPS[name] ?? name] = name === 'style' && typeof value === 'string' ? styleObject(value) : value;\n }\n if (root) Object.assign(props, bindings.root);\n if (node.bind === 'native') Object.assign(props, typeof bindings.native === 'function' ? bindings.native(node) : bindings.native);\n if (node.bind === 'close') Object.assign(props, bindings.close);\n return createElement(node.tag, props, ...node.children.map((child) => renderUi(child, bindings, false)));\n}\n\n/** Text content, when the children are text: what the accessible-name check reads (REQ-319). */\nexport function textOf(children: unknown): string | undefined {\n if (typeof children === 'string' || typeof children === 'number') return String(children);\n return children === undefined || children === null || children === false ? undefined : '·';\n}\n"],"mappings":";AACA,SAAS,qBAAqC;AAG9C,IAAM,QAA0C,EAAE,OAAO,aAAa,KAAK,WAAW,UAAU,YAAY,UAAU,WAAW;AAGjI,SAAS,YAAY,OAAuC;AAC1D,QAAM,MAA8B,CAAC;AACrC,aAAW,eAAe,MAAM,MAAM,GAAG,GAAG;AAC1C,UAAM,KAAK,YAAY,QAAQ,GAAG;AAClC,QAAI,KAAK,EAAG,KAAI,YAAY,MAAM,GAAG,EAAE,EAAE,KAAK,CAAC,IAAI,YAAY,MAAM,KAAK,CAAC,EAAE,KAAK;AAAA,EACpF;AACA,SAAO;AACT;AAmBO,SAAS,SAAS,MAAc,UAAsB,OAAO,MAAiB;AACnF,MAAI,UAAU,KAAM,QAAO,KAAK;AAChC,MAAI,UAAU,KAAM,QAAO,SAAS,QAAQ,KAAK,IAAI,KAAK;AAC1D,QAAM,QAAiC,CAAC;AACxC,aAAW,CAAC,MAAM,KAAK,KAAK,OAAO,QAAQ,KAAK,KAAK,GAAG;AACtD,UAAM,MAAM,IAAI,KAAK,IAAI,IAAI,SAAS,WAAW,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI;AAAA,EACpG;AACA,MAAI,KAAM,QAAO,OAAO,OAAO,SAAS,IAAI;AAC5C,MAAI,KAAK,SAAS,SAAU,QAAO,OAAO,OAAO,OAAO,SAAS,WAAW,aAAa,SAAS,OAAO,IAAI,IAAI,SAAS,MAAM;AAChI,MAAI,KAAK,SAAS,QAAS,QAAO,OAAO,OAAO,SAAS,KAAK;AAC9D,SAAO,cAAc,KAAK,KAAK,OAAO,GAAG,KAAK,SAAS,IAAI,CAAC,UAAU,SAAS,OAAO,UAAU,KAAK,CAAC,CAAC;AACzG;AAGO,SAAS,OAAO,UAAuC;AAC5D,MAAI,OAAO,aAAa,YAAY,OAAO,aAAa,SAAU,QAAO,OAAO,QAAQ;AACxF,SAAO,aAAa,UAAa,aAAa,QAAQ,aAAa,QAAQ,SAAY;AACzF;","names":[]}
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import {
3
+ renderUi,
4
+ useUi,
5
+ useValue
6
+ } from "./chunk-DO4VUIUU.js";
7
+
8
+ // src/ui/radio-group.tsx
9
+ import { uiRadioGroupView, uiRovingFocus } from "@silverpoint/core/ui";
10
+ function SpRadioGroup({ value, defaultValue, onChange, dashboardCell, ...props }) {
11
+ const [current, set] = useValue(value, defaultValue ?? null, onChange);
12
+ const view = uiRadioGroupView(props, useUi(props, dashboardCell), { value: current });
13
+ const native = (node) => ({ checked: node.attrs.checked === true, onChange: (event) => set(event.target.value) });
14
+ const onKeyDown = (event) => uiRovingFocus(event, event.currentTarget, "input.sp-ui-native", "both", true);
15
+ return renderUi(view, { root: { onKeyDown }, native });
16
+ }
17
+
18
+ export {
19
+ SpRadioGroup
20
+ };
21
+ //# sourceMappingURL=chunk-ZOB6BH7H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/radio-group.tsx"],"sourcesContent":["import { uiRadioGroupView, uiRovingFocus, type SpRadioGroupProps as CoreProps, type UiElement } from '@silverpoint/core/ui';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport { useUi, useValue, type UiCellProps } from './base';\nimport { renderUi } from './render';\n\nexport interface SpRadioGroupProps extends CoreProps, UiCellProps {\n /** Controlled key; `null` checks none. */\n readonly value?: string | null;\n readonly defaultValue?: string | null;\n /** The key checked, not the DOM event (REQ-322). */\n readonly onChange?: (value: string) => void;\n}\n\n/** `SpRadioGroup`: a `<fieldset>` of native radios; arrows move and select through the core (REQ-315). */\nexport function SpRadioGroup({ value, defaultValue, onChange, dashboardCell, ...props }: SpRadioGroupProps) {\n const [current, set] = useValue<string | null>(value, defaultValue ?? null, onChange as (next: string | null) => void);\n const view = uiRadioGroupView(props, useUi(props, dashboardCell), { value: current });\n const native = (node: UiElement) => ({ checked: node.attrs.checked === true, onChange: (event: ChangeEvent<HTMLInputElement>) => set(event.target.value) });\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => uiRovingFocus(event, event.currentTarget, 'input.sp-ui-native', 'both', true);\n return renderUi(view, { root: { onKeyDown }, native }) as ReactElement;\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,kBAAkB,qBAA0E;AAc9F,SAAS,aAAa,EAAE,OAAO,cAAc,UAAU,eAAe,GAAG,MAAM,GAAsB;AAC1G,QAAM,CAAC,SAAS,GAAG,IAAI,SAAwB,OAAO,gBAAgB,MAAM,QAAyC;AACrH,QAAM,OAAO,iBAAiB,OAAO,MAAM,OAAO,aAAa,GAAG,EAAE,OAAO,QAAQ,CAAC;AACpF,QAAM,SAAS,CAAC,UAAqB,EAAE,SAAS,KAAK,MAAM,YAAY,MAAM,UAAU,CAAC,UAAyC,IAAI,MAAM,OAAO,KAAK,EAAE;AACzJ,QAAM,YAAY,CAAC,UAAsC,cAAc,OAAO,MAAM,eAAe,sBAAsB,QAAQ,IAAI;AACrI,SAAO,SAAS,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;AACvD;","names":[]}
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
  import {
3
3
  ComposedChart
4
- } from "./chunk-Y7WZS3VB.js";
5
- import "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-C3NHZ4N5.js";
5
+ import "./chunk-FBJLA3P7.js";
6
+ import "./chunk-4GQ5X2WK.js";
7
+ import "./chunk-SQ6GWXDK.js";
6
8
  export {
7
9
  ComposedChart
8
10
  };
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
  import {
3
3
  CoxcombChart
4
- } from "./chunk-G2A5PWIR.js";
5
- import "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-RMIIFPXA.js";
5
+ import "./chunk-FBJLA3P7.js";
6
+ import "./chunk-4GQ5X2WK.js";
7
+ import "./chunk-SQ6GWXDK.js";
6
8
  export {
7
9
  CoxcombChart
8
10
  };
@@ -0,0 +1,17 @@
1
+ import { CommonChartProps } from '@silverpoint/core';
2
+
3
+ /**
4
+ * Props of a server chart: pure SVG, no client JavaScript (REQ-104); interaction props do not
5
+ * exist here. Nothing can be measured on the server and a server component has no mount position
6
+ * to derive a unique id from (TD §6), so a chart standing alone passes `id`, `width` and `height`;
7
+ * inside a `Dashboard` the cell supplies them (REQ-206, REQ-209).
8
+ */
9
+ type ServerChartProps<P extends CommonChartProps> = Omit<P, 'id' | 'width' | 'height'> & {
10
+ readonly id?: string;
11
+ readonly width?: number;
12
+ readonly height?: number;
13
+ readonly onActiveChange?: never;
14
+ readonly onSelect?: never;
15
+ };
16
+
17
+ export type { ServerChartProps as S };
@@ -0,0 +1,20 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { DashboardLink as DashboardLink$1 } from '@silverpoint/core';
4
+
5
+ interface DashboardLinkProps {
6
+ readonly link: DashboardLink$1;
7
+ /** The linked value changed; `null` when the source cleared (API Spec §9, REQ-218). */
8
+ readonly onLinkChange?: (link: {
9
+ key: string;
10
+ value: unknown;
11
+ } | null) => void;
12
+ readonly children?: ReactNode;
13
+ }
14
+ /**
15
+ * The client boundary of a linked dashboard (REQ-104, REQ-219): the one linked value its charts
16
+ * share. The dashboard renders it only when `link` is given; it adds no element of its own.
17
+ */
18
+ declare function DashboardLink({ link, onLinkChange, children }: DashboardLinkProps): react.JSX.Element;
19
+
20
+ export { DashboardLink, type DashboardLinkProps };
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ import {
3
+ DashboardLinkContext
4
+ } from "./chunk-4GQ5X2WK.js";
5
+
6
+ // src/dashboard-link.tsx
7
+ import { useMemo, useState } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function DashboardLink({ link, onLinkChange, children }) {
10
+ const [state, setState] = useState(null);
11
+ const value = useMemo(
12
+ () => ({
13
+ key: link.key,
14
+ state,
15
+ set(next) {
16
+ setState(next);
17
+ onLinkChange?.(next && { key: next.key, value: next.value });
18
+ }
19
+ }),
20
+ [link.key, state, onLinkChange]
21
+ );
22
+ return /* @__PURE__ */ jsx(DashboardLinkContext.Provider, { value, children });
23
+ }
24
+ export {
25
+ DashboardLink
26
+ };
27
+ //# sourceMappingURL=dashboard-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dashboard-link.tsx"],"sourcesContent":["import type { DashboardLink as Link, LinkState } from '@silverpoint/core';\nimport { useMemo, useState, type ReactNode } from 'react';\nimport { DashboardLinkContext } from './link-context';\n\nexport interface DashboardLinkProps {\n readonly link: Link;\n /** The linked value changed; `null` when the source cleared (API Spec §9, REQ-218). */\n readonly onLinkChange?: (link: { key: string; value: unknown } | null) => void;\n readonly children?: ReactNode;\n}\n\n/**\n * The client boundary of a linked dashboard (REQ-104, REQ-219): the one linked value its charts\n * share. The dashboard renders it only when `link` is given; it adds no element of its own.\n */\nexport function DashboardLink({ link, onLinkChange, children }: DashboardLinkProps) {\n const [state, setState] = useState<LinkState | null>(null);\n const value = useMemo(\n () => ({\n key: link.key,\n state,\n set(next: LinkState | null) {\n setState(next);\n onLinkChange?.(next && { key: next.key, value: next.value });\n },\n }),\n [link.key, state, onLinkChange],\n );\n return <DashboardLinkContext.Provider value={value}>{children}</DashboardLinkContext.Provider>;\n}\n"],"mappings":";;;;;;AACA,SAAS,SAAS,gBAAgC;AA2BzC;AAbF,SAAS,cAAc,EAAE,MAAM,cAAc,SAAS,GAAuB;AAClF,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA2B,IAAI;AACzD,QAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,MACL,KAAK,KAAK;AAAA,MACV;AAAA,MACA,IAAI,MAAwB;AAC1B,iBAAS,IAAI;AACb,uBAAe,QAAQ,EAAE,KAAK,KAAK,KAAK,OAAO,KAAK,MAAM,CAAC;AAAA,MAC7D;AAAA,IACF;AAAA,IACA,CAAC,KAAK,KAAK,OAAO,YAAY;AAAA,EAChC;AACA,SAAO,oBAAC,qBAAqB,UAArB,EAA8B,OAAe,UAAS;AAChE;","names":[]}
@@ -0,0 +1,21 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { DashboardCellContext } from '@silverpoint/core';
4
+
5
+ interface DashboardCellProps {
6
+ /** The layout cell this child fills. Omitted: next in source order, span 1 (API Spec §7.1). */
7
+ readonly cell?: string;
8
+ /** The chart. A single element receives the cell's id, size and configuration. */
9
+ readonly children?: ReactNode;
10
+ }
11
+ /**
12
+ * Marks a child of `Dashboard` with its layout cell. Rendered on its own it is its children; inside
13
+ * a dashboard, the dashboard reads its `cell` and emits it as an `article` (REQ-200).
14
+ */
15
+ declare function DashboardCell({ children }: DashboardCellProps): react.JSX.Element;
16
+ /** The internal prop through which a cell hands its chart id, box and config (TD §3.3). */
17
+ interface CellChartProps {
18
+ readonly dashboardCell?: DashboardCellContext;
19
+ }
20
+
21
+ export { type CellChartProps as C, DashboardCell as D, type DashboardCellProps as a };
@@ -0,0 +1,22 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { DashboardProps } from '@silverpoint/core';
4
+ export { DashboardCellLayout, DashboardLayout, DashboardLink } from '@silverpoint/core';
5
+ export { D as DashboardCell, a as DashboardCellProps } from './dashboard-markup-_EoDs-s-.js';
6
+
7
+ type ClientDashboardProps = DashboardProps & {
8
+ readonly children?: ReactNode;
9
+ /** The linked value changed; `null` when the source cleared (API Spec §9, REQ-216). */
10
+ readonly onLinkChange?: (link: {
11
+ key: string;
12
+ value: unknown;
13
+ } | null) => void;
14
+ };
15
+ /**
16
+ * `Dashboard` (REQ-200): a declarative grid of cards, laid out in the core from a data-only
17
+ * layout (API Spec §7.1). No `"use client"` of its own (REQ-104): it renders in a Server Component
18
+ * as well as on the client, and its charts are the client components the consumer passes in.
19
+ */
20
+ declare function Dashboard({ onLinkChange, ...props }: ClientDashboardProps): react.JSX.Element;
21
+
22
+ export { type ClientDashboardProps, Dashboard };
@@ -0,0 +1,18 @@
1
+ import {
2
+ DashboardCell,
3
+ DashboardMarkup
4
+ } from "./chunk-OD6N2ATZ.js";
5
+
6
+ // src/dashboard.tsx
7
+ import { DashboardLink } from "@silverpoint/react/dashboard-link";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function Dashboard({ onLinkChange, ...props }) {
10
+ const { link } = props;
11
+ const wrapGrid = link ? (grid) => /* @__PURE__ */ jsx(DashboardLink, { link, onLinkChange, children: grid }) : void 0;
12
+ return /* @__PURE__ */ jsx(DashboardMarkup, { ...props, wrapGrid });
13
+ }
14
+ export {
15
+ Dashboard,
16
+ DashboardCell
17
+ };
18
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dashboard.tsx"],"sourcesContent":["import type { DashboardProps } from '@silverpoint/core';\n// A package self-reference, kept external: the link keeps its own \"use client\" boundary (REQ-104).\nimport { DashboardLink } from '@silverpoint/react/dashboard-link';\nimport type { ReactNode } from 'react';\nimport { DashboardCell, DashboardMarkup, type DashboardCellProps } from './dashboard-markup';\n\nexport { DashboardCell, type DashboardCellProps };\nexport type { DashboardLayout, DashboardCellLayout, DashboardLink } from '@silverpoint/core';\n\nexport type ClientDashboardProps = DashboardProps & {\n readonly children?: ReactNode;\n /** The linked value changed; `null` when the source cleared (API Spec §9, REQ-216). */\n readonly onLinkChange?: (link: { key: string; value: unknown } | null) => void;\n};\n\n/**\n * `Dashboard` (REQ-200): a declarative grid of cards, laid out in the core from a data-only\n * layout (API Spec §7.1). No `\"use client\"` of its own (REQ-104): it renders in a Server Component\n * as well as on the client, and its charts are the client components the consumer passes in.\n */\nexport function Dashboard({ onLinkChange, ...props }: ClientDashboardProps) {\n const { link } = props;\n // Only a linked dashboard crosses into client code: the boundary is the link, not the grid.\n const wrapGrid = link\n ? (grid: ReactNode) => (\n <DashboardLink link={link} onLinkChange={onLinkChange}>\n {grid}\n </DashboardLink>\n )\n : undefined;\n return <DashboardMarkup {...props} wrapGrid={wrapGrid} />;\n}\n"],"mappings":";;;;;;AAEA,SAAS,qBAAqB;AAuBtB;AALD,SAAS,UAAU,EAAE,cAAc,GAAG,MAAM,GAAyB;AAC1E,QAAM,EAAE,KAAK,IAAI;AAEjB,QAAM,WAAW,OACb,CAAC,SACC,oBAAC,iBAAc,MAAY,cACxB,gBACH,IAEF;AACJ,SAAO,oBAAC,mBAAiB,GAAG,OAAO,UAAoB;AACzD;","names":[]}
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
  import {
3
3
  DonutChart
4
- } from "./chunk-YS5YVHK5.js";
5
- import "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-JWCVL7VE.js";
5
+ import "./chunk-FBJLA3P7.js";
6
+ import "./chunk-4GQ5X2WK.js";
7
+ import "./chunk-SQ6GWXDK.js";
6
8
  export {
7
9
  DonutChart
8
10
  };
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
  import {
3
3
  FunnelChart
4
- } from "./chunk-R6PUPQUI.js";
5
- import "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-RIGQTEKW.js";
5
+ import "./chunk-FBJLA3P7.js";
6
+ import "./chunk-4GQ5X2WK.js";
7
+ import "./chunk-SQ6GWXDK.js";
6
8
  export {
7
9
  FunnelChart
8
10
  };
package/dist/gauge-arc.js CHANGED
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
  import {
3
3
  GaugeArc
4
- } from "./chunk-AQMWZQ2P.js";
5
- import "./chunk-BHZNDYU3.js";
4
+ } from "./chunk-J3E6IUUQ.js";
5
+ import "./chunk-FBJLA3P7.js";
6
+ import "./chunk-4GQ5X2WK.js";
7
+ import "./chunk-SQ6GWXDK.js";
6
8
  export {
7
9
  GaugeArc
8
10
  };