silvery 0.21.0 → 0.23.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 (224) hide show
  1. package/README.md +1 -1
  2. package/dist/{Text-Lq0dmj8-.mjs → Text-Ci6UCSTL.mjs} +46 -48
  3. package/dist/Text-Ci6UCSTL.mjs.map +1 -0
  4. package/dist/{render-string-DkQacASz.mjs → ag-q9lRlKlt.mjs} +5322 -4259
  5. package/dist/ag-q9lRlKlt.mjs.map +1 -0
  6. package/dist/{animation-ZMN2_XKv.mjs → animation-CZ4x2R7C.mjs} +1 -1
  7. package/dist/{animation-ZMN2_XKv.mjs.map → animation-CZ4x2R7C.mjs.map} +1 -1
  8. package/dist/{ansi-D1KQMAbf.mjs → ansi-CLmIMnop.mjs} +1 -1
  9. package/dist/{ansi-D1KQMAbf.mjs.map → ansi-CLmIMnop.mjs.map} +1 -1
  10. package/dist/{ansi-2Xn0yatP.d.mts → ansi-zmNzgkPB.d.mts} +1 -1
  11. package/dist/{ansi-2Xn0yatP.d.mts.map → ansi-zmNzgkPB.d.mts.map} +1 -1
  12. package/dist/{backend-B-WYLUib.mjs → backend-DSiSIc-h.mjs} +2 -2
  13. package/dist/{backend-B-WYLUib.mjs.map → backend-DSiSIc-h.mjs.map} +1 -1
  14. package/dist/chain-bridge-CkYcMxlq.mjs +4149 -0
  15. package/dist/chain-bridge-CkYcMxlq.mjs.map +1 -0
  16. package/dist/{chunk-BSw8zbkd.mjs → chunk-BEJ448es.mjs} +1 -3
  17. package/dist/cli-VNqUKlXw.mjs +4 -0
  18. package/dist/{context-BU5LkkIy.mjs → context-CEhuD1R_.mjs} +1 -1
  19. package/dist/{context-BU5LkkIy.mjs.map → context-CEhuD1R_.mjs.map} +1 -1
  20. package/dist/devtools-BF4IMumr.mjs +2 -0
  21. package/dist/{devtools-DcQjgyjL.mjs → devtools-td2AjFwc.mjs} +5 -5
  22. package/dist/{devtools-DcQjgyjL.mjs.map → devtools-td2AjFwc.mjs.map} +1 -1
  23. package/dist/{easing-BI-ASGMO.d.mts → easing-C5MrdO7V.d.mts} +1 -1
  24. package/dist/{easing-BI-ASGMO.d.mts.map → easing-C5MrdO7V.d.mts.map} +1 -1
  25. package/dist/{eta-CJlGH06n.mjs → eta-BwYWEjfS.mjs} +1 -1
  26. package/dist/{eta-CJlGH06n.mjs.map → eta-BwYWEjfS.mjs.map} +1 -1
  27. package/dist/{flexily-zero-adapter-C4lW_Ov5.mjs → flexily-zero-adapter-DktX3HsX.mjs} +1 -1
  28. package/dist/{flexily-zero-adapter-C3Vj0fPt.mjs → flexily-zero-adapter-VoBGHG14.mjs} +1 -1
  29. package/dist/{flexily-zero-adapter-C3Vj0fPt.mjs.map → flexily-zero-adapter-VoBGHG14.mjs.map} +1 -1
  30. package/dist/hit-registry-D_nxOivS.d.mts +71 -0
  31. package/dist/hit-registry-D_nxOivS.d.mts.map +1 -0
  32. package/dist/{UPNG-DosRPdF4.mjs → image-CIF75xMr.mjs} +891 -6
  33. package/dist/image-CIF75xMr.mjs.map +1 -0
  34. package/dist/{index-CSQf13CI.d.mts → index-377zdPLP.d.mts} +35 -12
  35. package/dist/index-377zdPLP.d.mts.map +1 -0
  36. package/dist/{index-Cl9KKjQ_.d.mts → index-BcSr0RAQ.d.mts} +8670 -10659
  37. package/dist/index-BcSr0RAQ.d.mts.map +1 -0
  38. package/dist/{index-XbNrPhWl.d.mts → index-DLnpxDAm.d.mts} +2 -2
  39. package/dist/{index-XbNrPhWl.d.mts.map → index-DLnpxDAm.d.mts.map} +1 -1
  40. package/dist/{index-BUMxS65f.d.mts → index-DlNmckTq.d.mts} +2 -2
  41. package/dist/{index-BUMxS65f.d.mts.map → index-DlNmckTq.d.mts.map} +1 -1
  42. package/dist/index.d.mts +12 -8
  43. package/dist/index.d.mts.map +1 -1
  44. package/dist/index.mjs +18 -15
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/{layout-engine-C2px0RJE.mjs → layout-engine-BgR58vL0.mjs} +3 -3
  47. package/dist/{layout-engine-C2px0RJE.mjs.map → layout-engine-BgR58vL0.mjs.map} +1 -1
  48. package/dist/{layout-engine-C07LEXWT.mjs → layout-engine-DNjTha8f.mjs} +1 -1
  49. package/dist/{layout-signals-Cnw6xk8Q.mjs → layout-signals-CGYbHmxy.mjs} +146 -23
  50. package/dist/layout-signals-CGYbHmxy.mjs.map +1 -0
  51. package/dist/{bound-term-0sPrrzH1.d.mts → mouse-events-B2z5tbsL.d.mts} +780 -379
  52. package/dist/mouse-events-B2z5tbsL.d.mts.map +1 -0
  53. package/dist/{mouse-events-Dki3ISIp.mjs → mouse-events-WQ2h-uqG.mjs} +45 -10
  54. package/dist/mouse-events-WQ2h-uqG.mjs.map +1 -0
  55. package/dist/{multi-progress-DHZ2xUT2.d.mts → multi-progress-BaEFfHKP.d.mts} +2 -2
  56. package/dist/{multi-progress-DHZ2xUT2.d.mts.map → multi-progress-BaEFfHKP.d.mts.map} +1 -1
  57. package/dist/{multi-progress-CIRjrzma.mjs → multi-progress-zCWHEm9P.mjs} +3 -3
  58. package/dist/{multi-progress-CIRjrzma.mjs.map → multi-progress-zCWHEm9P.mjs.map} +1 -1
  59. package/dist/{node-CjM5Rt-M.mjs → node-CJ3J_rW-.mjs} +1 -1
  60. package/dist/{node-CjM5Rt-M.mjs.map → node-CJ3J_rW-.mjs.map} +1 -1
  61. package/dist/{progress-DB_Xo071.mjs → progress-6vJ7nxUg.mjs} +4 -4
  62. package/dist/{progress-DB_Xo071.mjs.map → progress-6vJ7nxUg.mjs.map} +1 -1
  63. package/dist/{progress-bar-oJwq22CR.mjs → progress-bar-BlFNsZL8.mjs} +4 -4
  64. package/dist/{progress-bar-oJwq22CR.mjs.map → progress-bar-BlFNsZL8.mjs.map} +1 -1
  65. package/dist/{reconciler-DldIJB93.mjs → reconciler--_-biN23.mjs} +190 -134
  66. package/dist/reconciler--_-biN23.mjs.map +1 -0
  67. package/dist/{render-string-BcoCpjCB.mjs → render-string-DaghHpLN.mjs} +1 -1
  68. package/dist/render-string-DtHZP0cU.mjs +215 -0
  69. package/dist/render-string-DtHZP0cU.mjs.map +1 -0
  70. package/dist/runtime.d.mts +4 -3
  71. package/dist/runtime.mjs +4 -3
  72. package/dist/schemes-DWQPxXAi.mjs +2516 -0
  73. package/dist/{schemes-JjNp4aSl.mjs.map → schemes-DWQPxXAi.mjs.map} +1 -1
  74. package/dist/{spinner-D9lrHr8s.mjs → spinner-B50hILqx.mjs} +19 -4
  75. package/dist/{spinner-D9lrHr8s.mjs.map → spinner-B50hILqx.mjs.map} +1 -1
  76. package/dist/{spinner-CZINHpkV.d.mts → spinner-DN10UfF0.d.mts} +2 -2
  77. package/dist/{spinner-CZINHpkV.d.mts.map → spinner-DN10UfF0.d.mts.map} +1 -1
  78. package/dist/{src-BNTToU7l.mjs → src-B8lf1kiR.mjs} +1507 -1166
  79. package/dist/src-B8lf1kiR.mjs.map +1 -0
  80. package/dist/{src-5w9QR6_8.mjs → src-BOLdi3WG.mjs} +105 -237
  81. package/dist/src-BOLdi3WG.mjs.map +1 -0
  82. package/dist/{src-BR4xNwdG.mjs → src-BXeTHHlL.mjs} +20240 -25437
  83. package/dist/src-BXeTHHlL.mjs.map +1 -0
  84. package/dist/{src-DKp-_OFG.mjs → src-BqeBFB3X.mjs} +90 -47
  85. package/dist/src-BqeBFB3X.mjs.map +1 -0
  86. package/dist/src-DbqcSrhy.mjs +3901 -0
  87. package/dist/src-DbqcSrhy.mjs.map +1 -0
  88. package/dist/{steps-Bp2uNqnn.d.mts → steps-B2kBmFpb.d.mts} +1 -1
  89. package/dist/{steps-Bp2uNqnn.d.mts.map → steps-B2kBmFpb.d.mts.map} +1 -1
  90. package/dist/{svg-Cz0UXcDj.mjs → svg-NmV9dgB9.mjs} +1 -1
  91. package/dist/{svg-Cz0UXcDj.mjs.map → svg-NmV9dgB9.mjs.map} +1 -1
  92. package/dist/{svg-g1D6ErwR.d.mts → svg-VUr78l5d.d.mts} +1 -1
  93. package/dist/{svg-g1D6ErwR.d.mts.map → svg-VUr78l5d.d.mts.map} +1 -1
  94. package/dist/term.d.mts +2 -2
  95. package/dist/term.mjs +3 -8
  96. package/dist/test.d.mts +673 -0
  97. package/dist/test.d.mts.map +1 -0
  98. package/dist/test.mjs +2829 -0
  99. package/dist/test.mjs.map +1 -0
  100. package/dist/theme.d.mts +2 -2
  101. package/dist/theme.d.mts.map +1 -1
  102. package/dist/theme.mjs +3 -8
  103. package/dist/{types-kt_fKR37.d.mts → types-D_E0FbqA.d.mts} +1 -1
  104. package/dist/{types-kt_fKR37.d.mts.map → types-D_E0FbqA.d.mts.map} +1 -1
  105. package/dist/ui/animation.d.mts +2 -2
  106. package/dist/ui/animation.mjs +1 -1
  107. package/dist/ui/ansi.d.mts +1 -1
  108. package/dist/ui/ansi.mjs +1 -1
  109. package/dist/ui/cli.d.mts +3 -3
  110. package/dist/ui/cli.mjs +5 -5
  111. package/dist/ui/image.d.mts +1 -1
  112. package/dist/ui/image.mjs +1 -1
  113. package/dist/ui/progress.d.mts +4 -4
  114. package/dist/ui/progress.mjs +4 -4
  115. package/dist/ui/react.d.mts +1 -1
  116. package/dist/ui/react.mjs +2 -2
  117. package/dist/ui/recording-chrome-react.d.mts +1 -1
  118. package/dist/ui/recording-chrome-react.mjs +2 -2
  119. package/dist/ui/recording-chrome.d.mts +1 -1
  120. package/dist/ui/recording-chrome.mjs +1 -1
  121. package/dist/ui/utils.mjs +1 -1
  122. package/dist/ui/wrappers.d.mts +2 -2
  123. package/dist/ui/wrappers.mjs +1 -1
  124. package/dist/ui.d.mts +6 -6
  125. package/dist/ui.mjs +7 -7
  126. package/dist/unicode-CxyxVGmB.mjs +11077 -0
  127. package/dist/unicode-CxyxVGmB.mjs.map +1 -0
  128. package/dist/{useLatest-DRDDVwjh.d.mts → useLatest-UOvWy0ZW.d.mts} +2 -2
  129. package/dist/{useLatest-DRDDVwjh.d.mts.map → useLatest-UOvWy0ZW.d.mts.map} +1 -1
  130. package/dist/useLayout-D5cE8OCI.mjs +424 -0
  131. package/dist/useLayout-D5cE8OCI.mjs.map +1 -0
  132. package/dist/{with-text-input-YeohVLeo.d.mts → with-text-input-DLoSCBrm.d.mts} +3 -3
  133. package/dist/{with-text-input-YeohVLeo.d.mts.map → with-text-input-DLoSCBrm.d.mts.map} +1 -1
  134. package/dist/wrap-measurer-registration-IV2HtcCd.d.mts +3106 -0
  135. package/dist/wrap-measurer-registration-IV2HtcCd.d.mts.map +1 -0
  136. package/dist/{wrapper-C70ATkVv.mjs → wrapper-CD29afOs.mjs} +59 -17
  137. package/dist/wrapper-CD29afOs.mjs.map +1 -0
  138. package/dist/{wrappers-BCUYITrY.mjs → wrappers-CInBJm44.mjs} +18 -8
  139. package/dist/wrappers-CInBJm44.mjs.map +1 -0
  140. package/dist/{yoga-adapter-BnZX1PAY.mjs → yoga-adapter-9uab5Qn-.mjs} +2 -2
  141. package/dist/{yoga-adapter-BnZX1PAY.mjs.map → yoga-adapter-9uab5Qn-.mjs.map} +1 -1
  142. package/dist/yoga-adapter-yqTl1aXK.mjs +2 -0
  143. package/package.json +59 -14
  144. package/dist/Text-Lq0dmj8-.mjs.map +0 -1
  145. package/dist/UPNG-Bo33r8rA.mjs +0 -3
  146. package/dist/UPNG-DosRPdF4.mjs.map +0 -1
  147. package/dist/__vite-browser-external-2447137e-D_JM6skp.mjs +0 -6
  148. package/dist/__vite-browser-external-2447137e-D_JM6skp.mjs.map +0 -1
  149. package/dist/ansi-yC4RyBNY.mjs +0 -22441
  150. package/dist/ansi-yC4RyBNY.mjs.map +0 -1
  151. package/dist/apng-CR08rIaH.mjs +0 -58
  152. package/dist/apng-CR08rIaH.mjs.map +0 -1
  153. package/dist/apng-DaHfVaVI.mjs +0 -3
  154. package/dist/assets/resvgjs.darwin-arm64-BtufyGW1.node +0 -0
  155. package/dist/assets/skia.darwin-arm64-DQs5sT6N.node +0 -0
  156. package/dist/backends-CUtan80W.mjs +0 -3
  157. package/dist/backends-DIVYzKqd.mjs +0 -1083
  158. package/dist/backends-DIVYzKqd.mjs.map +0 -1
  159. package/dist/bound-term-0sPrrzH1.d.mts.map +0 -1
  160. package/dist/canvas-1v7dPT-_.mjs +0 -3
  161. package/dist/canvas-CSuPOMNt.mjs +0 -1442
  162. package/dist/canvas-CSuPOMNt.mjs.map +0 -1
  163. package/dist/cli-dvo0r2fs.mjs +0 -4
  164. package/dist/compare-CQodSH4G.mjs +0 -376
  165. package/dist/compare-CQodSH4G.mjs.map +0 -1
  166. package/dist/compare-DHlcxEYA.mjs +0 -3
  167. package/dist/devtools-CJdt5H0X.mjs +0 -2
  168. package/dist/fonts-BFmhXDv7.mjs +0 -88
  169. package/dist/fonts-BFmhXDv7.mjs.map +0 -1
  170. package/dist/gif-C_AjaT9d.mjs +0 -188
  171. package/dist/gif-C_AjaT9d.mjs.map +0 -1
  172. package/dist/gif-DaC4XrxA.mjs +0 -3
  173. package/dist/gifenc-BOUT-KFB.mjs +0 -730
  174. package/dist/gifenc-BOUT-KFB.mjs.map +0 -1
  175. package/dist/image-C2Birh2x.mjs +0 -1252
  176. package/dist/image-C2Birh2x.mjs.map +0 -1
  177. package/dist/index-CSQf13CI.d.mts.map +0 -1
  178. package/dist/index-Cl9KKjQ_.d.mts.map +0 -1
  179. package/dist/key-mapping-CS-YD_cD.mjs +0 -132
  180. package/dist/key-mapping-CS-YD_cD.mjs.map +0 -1
  181. package/dist/key-mapping-Yn-Jgrij.mjs +0 -3
  182. package/dist/layout-signals-Cnw6xk8Q.mjs.map +0 -1
  183. package/dist/mouse-events-Dki3ISIp.mjs.map +0 -1
  184. package/dist/playwright-D5YiZcNS.mjs +0 -76397
  185. package/dist/playwright-D5YiZcNS.mjs.map +0 -1
  186. package/dist/png-codec-Dp84742B.mjs +0 -36
  187. package/dist/png-codec-Dp84742B.mjs.map +0 -1
  188. package/dist/png-codec-QwOtJ8Zs.mjs +0 -3
  189. package/dist/rasterizer-BRXrDdWx.mjs +0 -3
  190. package/dist/rasterizer-CpEhJvdR.mjs +0 -296
  191. package/dist/rasterizer-CpEhJvdR.mjs.map +0 -1
  192. package/dist/reconciler-DldIJB93.mjs.map +0 -1
  193. package/dist/render-string-DkQacASz.mjs.map +0 -1
  194. package/dist/resvg-js-DkOndZI3.mjs +0 -203
  195. package/dist/resvg-js-DkOndZI3.mjs.map +0 -1
  196. package/dist/schemes-JjNp4aSl.mjs +0 -2611
  197. package/dist/src-5w9QR6_8.mjs.map +0 -1
  198. package/dist/src-BNTToU7l.mjs.map +0 -1
  199. package/dist/src-BR4xNwdG.mjs.map +0 -1
  200. package/dist/src-DKp-_OFG.mjs.map +0 -1
  201. package/dist/src-bt8wSrfJ.mjs +0 -258
  202. package/dist/src-bt8wSrfJ.mjs.map +0 -1
  203. package/dist/src-e33Y6kNJ.mjs +0 -3
  204. package/dist/src-iDwu25UD.mjs +0 -1814
  205. package/dist/src-iDwu25UD.mjs.map +0 -1
  206. package/dist/svg-15lZZzxq.mjs +0 -486
  207. package/dist/svg-15lZZzxq.mjs.map +0 -1
  208. package/dist/svg-DY72a4HK.mjs +0 -3
  209. package/dist/term.mjs.map +0 -1
  210. package/dist/theme.mjs.map +0 -1
  211. package/dist/ui/display.d.mts +0 -35
  212. package/dist/ui/display.d.mts.map +0 -1
  213. package/dist/ui/display.mjs +0 -123
  214. package/dist/ui/display.mjs.map +0 -1
  215. package/dist/ui/input.d.mts +0 -184
  216. package/dist/ui/input.d.mts.map +0 -1
  217. package/dist/ui/input.mjs +0 -285
  218. package/dist/ui/input.mjs.map +0 -1
  219. package/dist/wrapper-C70ATkVv.mjs.map +0 -1
  220. package/dist/wrappers-BCUYITrY.mjs.map +0 -1
  221. package/dist/yoga-adapter-DxgsQ_gg.mjs +0 -2
  222. package/dist/zipBundle-3nqeDRtm.mjs +0 -3
  223. package/dist/zipBundle-VNAYFmqJ.mjs +0 -2003
  224. package/dist/zipBundle-VNAYFmqJ.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { n as EasingName, t as EasingFn } from "./easing-BI-ASGMO.mjs";
1
+ import { n as EasingName, t as EasingFn } from "./easing-C5MrdO7V.mjs";
2
2
 
3
3
  //#region packages/ag-react/src/ui/animation/useAnimation.d.ts
4
4
  interface UseAnimationOptions {
@@ -131,4 +131,4 @@ declare function useLatest<T>(value: T): {
131
131
  };
132
132
  //#endregion
133
133
  export { useTransition as a, useAnimation as c, UseTransitionOptions as i, useTimeout as n, UseAnimationOptions as o, useInterval as r, UseAnimationResult as s, useLatest as t };
134
- //# sourceMappingURL=useLatest-DRDDVwjh.d.mts.map
134
+ //# sourceMappingURL=useLatest-UOvWy0ZW.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLatest-DRDDVwjh.d.mts","names":[],"sources":["../packages/ag-react/src/ui/animation/useAnimation.ts","../packages/ag-react/src/ui/animation/useTransition.ts","../packages/ag-react/src/ui/animation/useInterval.ts","../packages/ag-react/src/ui/animation/useTimeout.ts","../packages/ag-react/src/ui/animation/useLatest.ts"],"mappings":";;;UAeiB,mBAAA;EAIN;EAFT,QAAA;EAIA;EAFA,MAAA,GAAS,UAAA,GAAa,QAAA;EAMtB;EAJA,KAAA;EAIO;EAFP,UAAA;EAKiC;EAHjC,OAAA;AAAA;AAAA,UAGe,kBAAA;EAIf;EAFA,KAAA;EAIK;EAFL,WAAA;EA2Bc;EAzBd,KAAA;AAAA;;;;;;;;;;ACnBF;;iBD4CgB,YAAA,CAAa,OAAA,EAAS,mBAAA,GAAsB,kBAAA;;;UC5C3C,oBAAA;EDIN;ECFT,QAAA;EDIA;ECFA,MAAA,GAAS,UAAA,GAAa,QAAA;AAAA;;;ADSxB;;;;;;;;;AA+BA;;;;iBCXgB,aAAA,CAAc,WAAA,UAAqB,OAAA,GAAU,oBAAA;;;;;;ADjC7D;;;;;;;;;;;;;iBEQgB,WAAA,CAAY,QAAA,cAAsB,EAAA,UAAY,OAAA;;;;;;AFR9D;;;;;;;;;;;;;AAaA;;;iBGFgB,UAAA,CACd,QAAA,cACA,EAAA,UACA,OAAA;EACG,KAAA;EAAmB,KAAA;AAAA;;;;;;AHfxB;;;;;;;;;;;;;AAaA;;;;;;;iBIEgB,SAAA,GAAA,CAAa,KAAA,EAAO,CAAA;EAAA,SAAe,OAAA,EAAS,CAAA;AAAA"}
1
+ {"version":3,"file":"useLatest-UOvWy0ZW.d.mts","names":[],"sources":["../packages/ag-react/src/ui/animation/useAnimation.ts","../packages/ag-react/src/ui/animation/useTransition.ts","../packages/ag-react/src/ui/animation/useInterval.ts","../packages/ag-react/src/ui/animation/useTimeout.ts","../packages/ag-react/src/ui/animation/useLatest.ts"],"mappings":";;;UAeiB,mBAAA;EAIN;EAFT,QAAA;EAIA;EAFA,MAAA,GAAS,UAAA,GAAa,QAAA;EAMtB;EAJA,KAAA;EAIO;EAFP,UAAA;EAKiC;EAHjC,OAAA;AAAA;AAAA,UAGe,kBAAA;EAIf;EAFA,KAAA;EAIK;EAFL,WAAA;EA2Bc;EAzBd,KAAA;AAAA;;;;;;;;;;ACnBF;;iBD4CgB,YAAA,CAAa,OAAA,EAAS,mBAAA,GAAsB,kBAAA;;;UC5C3C,oBAAA;EDIN;ECFT,QAAA;EDIA;ECFA,MAAA,GAAS,UAAA,GAAa,QAAA;AAAA;;;ADSxB;;;;;;;;;AA+BA;;;;iBCXgB,aAAA,CAAc,WAAA,UAAqB,OAAA,GAAU,oBAAA;;;;;;ADjC7D;;;;;;;;;;;;;iBEQgB,WAAA,CAAY,QAAA,cAAsB,EAAA,UAAY,OAAA;;;;;;AFR9D;;;;;;;;;;;;;AAaA;;;iBGFgB,UAAA,CACd,QAAA,cACA,EAAA,UACA,OAAA;EACG,KAAA;EAAmB,KAAA;AAAA;;;;;;AHfxB;;;;;;;;;;;;;AAaA;;;;;;;iBIEgB,SAAA,GAAA,CAAa,KAAA,EAAO,CAAA;EAAA,SAAe,OAAA,EAAS,CAAA;AAAA"}
@@ -0,0 +1,424 @@
1
+ import { r as effect } from "./src-BqeBFB3X.mjs";
2
+ import { _ as rectEqual, l as markObservedLayoutSignal, o as getLayoutSignals } from "./layout-signals-CGYbHmxy.mjs";
3
+ import { a as NodeContext } from "./context-CEhuD1R_.mjs";
4
+ import { useContext, useLayoutEffect, useReducer, useRef } from "react";
5
+ //#region packages/ag-react/src/hooks/useLayout.ts
6
+ /**
7
+ * Layout Hooks — three coordinate systems for positioning in silvery.
8
+ *
9
+ * Every silvery node has three rects that differ only by how scroll and
10
+ * sticky offsets are applied. Pick the one that matches your use case:
11
+ *
12
+ * - `useBoxRect()` — layout position (border-box sized, minus padding/border).
13
+ * Use for responsive sizing inside a component. Matches
14
+ * CSS `clientWidth`/`clientHeight` for the content area.
15
+ * - `useScrollRect()` — scroll-adjusted position, **pre** sticky clamping.
16
+ * Use when you need the "natural" position of a node
17
+ * in scrolled coordinates (can go off-screen).
18
+ * - `useScreenRect()` — actual paint position on the terminal screen.
19
+ * Use for hit testing, cursor positioning, and
20
+ * cross-component visual navigation. The CSS
21
+ * `getBoundingClientRect()` analogue.
22
+ *
23
+ * ## Deferred semantics (the only contract)
24
+ *
25
+ * Each hook returns the rect as of the **most recent committed layout** —
26
+ * the value as of the last event-batch commit boundary. Within a single
27
+ * batch, the returned value is invariant across every convergence pass;
28
+ * React renders see one value per batch. After the batch's commit boundary
29
+ * fires, the next batch sees the new value.
30
+ *
31
+ * This is the structural fix for the "render reads useBoxRect AND writes
32
+ * a layout-affecting prop based on it" feedback loop. Under the in-flight
33
+ * model that preceded this hook (pre 2026-05-06), the read returned the
34
+ * latest measurement during the same batch, which could differ between
35
+ * the first and second convergence passes — causing the write to flip
36
+ * between branches and the loop to ping-pong until `MAX_CONVERGENCE_PASSES`
37
+ * capped it. Under deferred semantics the read is invariant for the
38
+ * batch, so the loop completes in one pass.
39
+ *
40
+ * **One-frame-late by design.** A component that mounts shows the
41
+ * empty-rect fallback (`{ x: 0, y: 0, width: 0, height: 0 }`) on its
42
+ * first render and the real rect on the next commit boundary. Layout
43
+ * effects that run on the second render see the real rect and can write
44
+ * positioned terminal escapes (Image, decorations) into the next
45
+ * paintFrame.
46
+ *
47
+ * Components that need same-frame measurements must read `node.boxRect`
48
+ * etc. directly via `useAgNode()` and gate on `useLayoutEffect` —
49
+ * recommended only for leaf primitives in the silvery framework itself.
50
+ *
51
+ * For breakpoint logic, prefer `useResponsiveValue()` or
52
+ * `useResponsiveBoxProps()` — bucketing into stable zones gives more
53
+ * predictable behavior than branching on raw widths.
54
+ *
55
+ * See bead `@km/silvery/use-deferred-box-rect-and-post-commit-observers`.
56
+ */
57
+ const EMPTY_RECT = {
58
+ x: 0,
59
+ y: 0,
60
+ width: 0,
61
+ height: 0
62
+ };
63
+ const EMPTY_SIZE = {
64
+ width: 0,
65
+ height: 0
66
+ };
67
+ /**
68
+ * Get the inner content dimensions of a node (border-box minus padding and border).
69
+ * This is the space available for the node's children.
70
+ *
71
+ * `boxRect` is passed in explicitly so the helper derives the inner rect
72
+ * from the committed signal value rather than re-reading `node.boxRect`
73
+ * (which holds the in-flight value mid-batch).
74
+ */
75
+ function deriveInnerRect(node, boxRect) {
76
+ if (!boxRect) return null;
77
+ const props = node.props;
78
+ if (!props || node.type === "silvery-text") return boxRect;
79
+ const pTop = props.paddingTop ?? props.paddingY ?? props.padding ?? 0;
80
+ const pBottom = props.paddingBottom ?? props.paddingY ?? props.padding ?? 0;
81
+ const pLeft = props.paddingLeft ?? props.paddingX ?? props.padding ?? 0;
82
+ const pRight = props.paddingRight ?? props.paddingX ?? props.padding ?? 0;
83
+ let bTop = 0;
84
+ let bBottom = 0;
85
+ let bLeft = 0;
86
+ let bRight = 0;
87
+ if (props.borderStyle) {
88
+ bTop = props.borderTop !== false ? 1 : 0;
89
+ bBottom = props.borderBottom !== false ? 1 : 0;
90
+ bLeft = props.borderLeft !== false ? 1 : 0;
91
+ bRight = props.borderRight !== false ? 1 : 0;
92
+ }
93
+ return {
94
+ x: boxRect.x + pLeft + bLeft,
95
+ y: boxRect.y + pTop + bTop,
96
+ width: Math.max(0, boxRect.width - pLeft - pRight - bLeft - bRight),
97
+ height: Math.max(0, boxRect.height - pTop - pBottom - bTop - bBottom)
98
+ };
99
+ }
100
+ const COMMITTED_RECT_OBSERVED_KEY = {
101
+ boxRectCommitted: "boxRect",
102
+ scrollRectCommitted: "scrollRect",
103
+ screenRectCommitted: "screenRect"
104
+ };
105
+ const IN_FLIGHT_RECT_OBSERVED_KEY = {
106
+ boxRect: "boxRect",
107
+ scrollRect: "scrollRect",
108
+ screenRect: "screenRect"
109
+ };
110
+ /**
111
+ * Reactive rect hook (deferred): subscribes to a committed rect signal and
112
+ * re-renders when the value advances at a commit boundary. Returns the
113
+ * rect derived from the committed value via `getCommittedRect`.
114
+ *
115
+ * Within a single event batch the committed signal does not change — every
116
+ * convergence pass sees the same value, so a render that reads useBoxRect
117
+ * and writes a layout-affecting prop converges in one pass. After the
118
+ * batch's commit boundary (handled by the runtime via
119
+ * `commitLayoutSnapshot`), the next batch's first render sees the new
120
+ * value.
121
+ */
122
+ function useReactiveRect(getCommittedRect, committedSignalKey) {
123
+ const node = useContext(NodeContext);
124
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
125
+ const prevRef = useRef(null);
126
+ useLayoutEffect(() => {
127
+ if (!node) return;
128
+ markObservedLayoutSignal(node, COMMITTED_RECT_OBSERVED_KEY[committedSignalKey]);
129
+ const rectSignal = getLayoutSignals(node)[committedSignalKey];
130
+ return effect(() => {
131
+ const next = getCommittedRect(rectSignal(), node) ?? null;
132
+ if (!rectEqual(prevRef.current, next)) {
133
+ prevRef.current = next;
134
+ forceUpdate();
135
+ }
136
+ });
137
+ }, [node]);
138
+ if (!node) return EMPTY_RECT;
139
+ markObservedLayoutSignal(node, COMMITTED_RECT_OBSERVED_KEY[committedSignalKey]);
140
+ return getCommittedRect(getLayoutSignals(node)[committedSignalKey](), node) ?? EMPTY_RECT;
141
+ }
142
+ /**
143
+ * **DANGEROUS — measurement read on the render path.** Prefer a declarative
144
+ * primitive (`<Box fitWidth>`, `useResponsiveBoxProps`, `useResponsiveValue`,
145
+ * `useOnBoxRectCommitted`) before reaching for this hook.
146
+ *
147
+ * Returns the inner content dimensions for the current component's nearest
148
+ * Box, as of the most recent committed layout. Width and height reflect
149
+ * the space available for children (border-box minus padding and border),
150
+ * like CSS `clientWidth`/`clientHeight`.
151
+ *
152
+ * ```tsx
153
+ * function Header() {
154
+ * const { width } = useBoxRectDangerously()
155
+ * return <Text>{'='.repeat(Math.max(0, width))}</Text>
156
+ * }
157
+ * ```
158
+ *
159
+ * On first render returns `{ x: 0, y: 0, width: 0, height: 0 }`. After the
160
+ * first commit boundary, automatically re-renders with the measured
161
+ * dimensions. This **first-paint zero-rect transition** is the social cost
162
+ * the rename announces — components that branch layout on this hook see a
163
+ * flush-left / collapsed first paint, then re-flow when the real rect
164
+ * commits one event-loop tick later. Visible jank under streaming / dynamic
165
+ * mount / SIGWINCH burst.
166
+ *
167
+ * Use only when:
168
+ * - You need a measurement read in JS control flow (animation, autoscroll
169
+ * thresholds, hit-testing) that **doesn't drive layout-affecting props**.
170
+ * - No declarative primitive covers the case.
171
+ *
172
+ * Deferred semantics — see this file's docstring for the contract and the
173
+ * one-frame-late behavior.
174
+ *
175
+ * Bead: `@km/silvery/responsive-layout-architecture-reframe` (Phase A.1
176
+ * lands this rename; the full Phase A migrates each consumer to a
177
+ * declarative primitive or, where genuinely needed, to a Suspense-friendly
178
+ * `Promise<Rect>` form coordinated via `RectReadBarrier`).
179
+ */
180
+ function useBoxRectDangerously() {
181
+ return useReactiveRect((committed, node) => deriveInnerRect(node, committed), "boxRectCommitted");
182
+ }
183
+ /**
184
+ * @deprecated Renamed to `useBoxRectDangerously`. The original name read as
185
+ * "the normal hook for getting your rect" — exactly the framing the Phase
186
+ * A.1 rename is intended to break. App authors should reach for declarative
187
+ * primitives first; this alias remains for one release cycle and logs a
188
+ * dev-time warning per call site. Will be removed in the next major.
189
+ *
190
+ * Bead: `@km/silvery/responsive-layout-architecture-reframe`.
191
+ */
192
+ function useBoxRect() {
193
+ if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test") warnUseBoxRectDeprecation();
194
+ return useReactiveRect((committed, node) => deriveInnerRect(node, committed), "boxRectCommitted");
195
+ }
196
+ /**
197
+ * Internal dimensions-only variant of the deferred box rect read.
198
+ *
199
+ * This is for framework primitives that build width/height-derived text
200
+ * (Divider, ProgressBar, TextArea wrapping) but do not care where their
201
+ * parent sits on screen. It subscribes to the same committed boxRect signal
202
+ * as `useBoxRect()`, but only re-renders when the derived inner
203
+ * `{width,height}` changes. Scrolling and virtual-window spacer movement
204
+ * often change x/y without changing dimensions; full-rect subscriptions wake
205
+ * these primitives on every such frame and steal scroll budget.
206
+ */
207
+ function useBoxSize() {
208
+ const node = useContext(NodeContext);
209
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
210
+ const prevRef = useRef(null);
211
+ useLayoutEffect(() => {
212
+ if (!node) return;
213
+ markObservedLayoutSignal(node, "boxSize");
214
+ const signals = getLayoutSignals(node);
215
+ return effect(() => {
216
+ const rect = deriveInnerRect(node, signals.boxRectCommitted());
217
+ const next = rect ? {
218
+ width: rect.width,
219
+ height: rect.height
220
+ } : EMPTY_SIZE;
221
+ const prev = prevRef.current;
222
+ if (!prev || prev.width !== next.width || prev.height !== next.height) {
223
+ prevRef.current = next;
224
+ forceUpdate();
225
+ }
226
+ });
227
+ }, [node]);
228
+ if (!node) return EMPTY_SIZE;
229
+ markObservedLayoutSignal(node, "boxSize");
230
+ const rect = deriveInnerRect(node, getLayoutSignals(node).boxRectCommitted());
231
+ return rect ? {
232
+ width: rect.width,
233
+ height: rect.height
234
+ } : EMPTY_SIZE;
235
+ }
236
+ const useBoxRectWarnedCallSites = /* @__PURE__ */ new Set();
237
+ function warnUseBoxRectDeprecation() {
238
+ const lines = ((/* @__PURE__ */ new Error()).stack ?? "").split("\n");
239
+ let consumerFrame = "";
240
+ for (let i = 1; i < lines.length; i++) {
241
+ const line = lines[i] ?? "";
242
+ if (!line.includes("useLayout.ts") && line.trim().startsWith("at ")) {
243
+ consumerFrame = line.trim();
244
+ break;
245
+ }
246
+ }
247
+ const key = consumerFrame || "<unknown>";
248
+ if (useBoxRectWarnedCallSites.has(key)) return;
249
+ useBoxRectWarnedCallSites.add(key);
250
+ console.warn(`[silvery] useBoxRect() is deprecated — rename to useBoxRectDangerously(), or migrate to a declarative primitive (<Box fitWidth>, useResponsiveBoxProps, useResponsiveValue, useOnBoxRectCommitted). See @km/silvery/responsive-layout-architecture-reframe. Call site: ${key}`);
251
+ }
252
+ /**
253
+ * Returns the scroll-adjusted position for the current component, as of
254
+ * the most recent committed layout.
255
+ *
256
+ * This is the node's position in scroll coordinates, *before* sticky
257
+ * clamping. For non-sticky nodes it equals `useScreenRect()`. For sticky
258
+ * nodes, the scrollRect reflects where the node would be without sticky
259
+ * adjustment — so it can go off-screen (negative y, etc.) when scrolled
260
+ * past.
261
+ *
262
+ * ```tsx
263
+ * function Card({ id }) {
264
+ * const { y } = useScrollRect()
265
+ * return <Box>Scroll y: {y}</Box>
266
+ * }
267
+ * ```
268
+ *
269
+ * Deferred semantics — see this file's docstring.
270
+ */
271
+ function useScrollRect() {
272
+ return useReactiveRect((committed) => committed, "scrollRectCommitted");
273
+ }
274
+ /**
275
+ * Returns the actual paint position on the terminal screen as of the most
276
+ * recent committed layout — the silvery analogue of
277
+ * `getBoundingClientRect()`.
278
+ *
279
+ * For non-sticky nodes this equals `useScrollRect()`. For sticky nodes
280
+ * (`position="sticky"`), it reflects the clamped position where pixels
281
+ * actually land on screen.
282
+ *
283
+ * ```tsx
284
+ * function StickyHeader() {
285
+ * const { y } = useScreenRect()
286
+ * return <Box position="sticky" stickyTop={0}>Header at row {y}</Box>
287
+ * }
288
+ * ```
289
+ *
290
+ * Deferred semantics — see this file's docstring.
291
+ */
292
+ function useScreenRect() {
293
+ return useReactiveRect((committed) => committed, "screenRectCommitted");
294
+ }
295
+ /**
296
+ * In-flight reactive rect hook (escape hatch): subscribes to the LIVE rect
297
+ * signal — the value as written by the most recent layout pass within the
298
+ * current convergence cycle. Re-renders when the in-flight value advances,
299
+ * which can happen multiple times per event batch as the convergence loop
300
+ * iterates.
301
+ *
302
+ * Use only inside silvery framework internals where first-paint measurement
303
+ * is required and the consumer does not write layout-affecting props
304
+ * derived from the read. App code must use the deferred form
305
+ * (`useBoxRect()` / `useScrollRect()` / `useScreenRect()`) or
306
+ * `useResponsiveBoxProps`/`useResponsiveValue` instead.
307
+ */
308
+ function useReactiveRectInFlight(getDerivedRect, inFlightSignalKey) {
309
+ const node = useContext(NodeContext);
310
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
311
+ const prevRef = useRef(null);
312
+ useLayoutEffect(() => {
313
+ if (!node) return;
314
+ markObservedLayoutSignal(node, IN_FLIGHT_RECT_OBSERVED_KEY[inFlightSignalKey]);
315
+ const rectSignal = getLayoutSignals(node)[inFlightSignalKey];
316
+ return effect(() => {
317
+ const next = getDerivedRect(rectSignal(), node) ?? null;
318
+ if (!rectEqual(prevRef.current, next)) {
319
+ prevRef.current = next;
320
+ forceUpdate();
321
+ }
322
+ });
323
+ }, [node]);
324
+ if (!node) return EMPTY_RECT;
325
+ markObservedLayoutSignal(node, IN_FLIGHT_RECT_OBSERVED_KEY[inFlightSignalKey]);
326
+ return getDerivedRect(getLayoutSignals(node)[inFlightSignalKey](), node) ?? EMPTY_RECT;
327
+ }
328
+ /**
329
+ * Returns the inner content dimensions of the current Box from the IN-FLIGHT
330
+ * signal — the value as of the most recent layout pass, which may change
331
+ * between convergence passes within an event batch.
332
+ *
333
+ * Silvery framework internals only — app code must use {@link useBoxRect}
334
+ * (deferred) or `useResponsiveBoxProps`/`useResponsiveValue` instead.
335
+ *
336
+ * Unlike {@link useBoxRect} (the deferred form), this hook returns the
337
+ * measured value on the first render after layout — there is no one-frame
338
+ * fallback. The cost is that a render reading this hook AND writing a
339
+ * layout-affecting prop can form a convergence-loop feedback edge; the
340
+ * lint rule `silvery/no-in-flight-rect-in-app` enforces the call-site
341
+ * scope.
342
+ */
343
+ function useBoxRectInFlight() {
344
+ return useReactiveRectInFlight((raw, node) => deriveInnerRect(node, raw), "boxRect");
345
+ }
346
+ /**
347
+ * Returns the scroll-adjusted position from the IN-FLIGHT signal — the
348
+ * value as of the most recent layout pass, which may change between
349
+ * convergence passes within an event batch.
350
+ *
351
+ * Silvery framework internals only — see {@link useBoxRectInFlight} for
352
+ * the contract and the lint rule that gates app-code use.
353
+ */
354
+ function useScrollRectInFlight() {
355
+ return useReactiveRectInFlight((raw) => raw, "scrollRect");
356
+ }
357
+ /**
358
+ * Returns the actual paint position from the IN-FLIGHT signal — the value
359
+ * as of the most recent layout pass, which may change between convergence
360
+ * passes within an event batch.
361
+ *
362
+ * Silvery framework internals only — see {@link useBoxRectInFlight} for
363
+ * the contract and the lint rule that gates app-code use.
364
+ */
365
+ function useScreenRectInFlight() {
366
+ return useReactiveRectInFlight((raw) => raw, "screenRect");
367
+ }
368
+ /**
369
+ * Subscribes to the committed rect signal and fires `cb(rect)` at each
370
+ * commit boundary, **without** triggering a re-render of the consumer.
371
+ *
372
+ * Use for hot paths where a rect change drives an imperative side effect
373
+ * (cursor store update, registry write, ANSI emission) and there is no
374
+ * render path that needs to reflect the rect.
375
+ *
376
+ * The callback is invoked synchronously from a commit-boundary effect(),
377
+ * with the derived rect (`getDerivedRect` applied to the committed signal
378
+ * value). It is NOT invoked when the derived rect is null. The caller may
379
+ * close over component state via refs; see `useCursor` / `useGridPosition`
380
+ * for canonical patterns.
381
+ */
382
+ function useOnRectCommitted(cb, getDerivedRect, committedSignalKey) {
383
+ const node = useContext(NodeContext);
384
+ const cbRef = useRef(cb);
385
+ cbRef.current = cb;
386
+ useLayoutEffect(() => {
387
+ if (!node) return;
388
+ const rectSignal = getLayoutSignals(node)[committedSignalKey];
389
+ let prev = null;
390
+ return effect(() => {
391
+ const next = getDerivedRect(rectSignal(), node) ?? null;
392
+ if (next == null) return;
393
+ if (rectEqual(prev, next)) return;
394
+ prev = next;
395
+ cbRef.current(next);
396
+ });
397
+ }, [node]);
398
+ }
399
+ /**
400
+ * Subscribes to the committed boxRect (inner content) and fires `cb` at
401
+ * each commit boundary without re-rendering. See {@link useBoxRect} for
402
+ * the deferred-rect contract; this is the observer form.
403
+ */
404
+ function useOnBoxRectCommitted(cb) {
405
+ useOnRectCommitted(cb, (committed, node) => deriveInnerRect(node, committed), "boxRectCommitted");
406
+ }
407
+ /**
408
+ * Subscribes to the committed scrollRect and fires `cb` at each commit
409
+ * boundary without re-rendering.
410
+ */
411
+ function useOnScrollRectCommitted(cb) {
412
+ useOnRectCommitted(cb, (committed) => committed, "scrollRectCommitted");
413
+ }
414
+ /**
415
+ * Subscribes to the committed screenRect and fires `cb` at each commit
416
+ * boundary without re-rendering.
417
+ */
418
+ function useOnScreenRectCommitted(cb) {
419
+ useOnRectCommitted(cb, (committed) => committed, "screenRectCommitted");
420
+ }
421
+ //#endregion
422
+ export { useOnBoxRectCommitted as a, useScreenRect as c, useScrollRectInFlight as d, useBoxSize as i, useScreenRectInFlight as l, useBoxRectDangerously as n, useOnScreenRectCommitted as o, useBoxRectInFlight as r, useOnScrollRectCommitted as s, useBoxRect as t, useScrollRect as u };
423
+
424
+ //# sourceMappingURL=useLayout-D5cE8OCI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLayout-D5cE8OCI.mjs","names":[],"sources":["../packages/ag-react/src/hooks/useLayout.ts"],"sourcesContent":["/**\n * Layout Hooks — three coordinate systems for positioning in silvery.\n *\n * Every silvery node has three rects that differ only by how scroll and\n * sticky offsets are applied. Pick the one that matches your use case:\n *\n * - `useBoxRect()` — layout position (border-box sized, minus padding/border).\n * Use for responsive sizing inside a component. Matches\n * CSS `clientWidth`/`clientHeight` for the content area.\n * - `useScrollRect()` — scroll-adjusted position, **pre** sticky clamping.\n * Use when you need the \"natural\" position of a node\n * in scrolled coordinates (can go off-screen).\n * - `useScreenRect()` — actual paint position on the terminal screen.\n * Use for hit testing, cursor positioning, and\n * cross-component visual navigation. The CSS\n * `getBoundingClientRect()` analogue.\n *\n * ## Deferred semantics (the only contract)\n *\n * Each hook returns the rect as of the **most recent committed layout** —\n * the value as of the last event-batch commit boundary. Within a single\n * batch, the returned value is invariant across every convergence pass;\n * React renders see one value per batch. After the batch's commit boundary\n * fires, the next batch sees the new value.\n *\n * This is the structural fix for the \"render reads useBoxRect AND writes\n * a layout-affecting prop based on it\" feedback loop. Under the in-flight\n * model that preceded this hook (pre 2026-05-06), the read returned the\n * latest measurement during the same batch, which could differ between\n * the first and second convergence passes — causing the write to flip\n * between branches and the loop to ping-pong until `MAX_CONVERGENCE_PASSES`\n * capped it. Under deferred semantics the read is invariant for the\n * batch, so the loop completes in one pass.\n *\n * **One-frame-late by design.** A component that mounts shows the\n * empty-rect fallback (`{ x: 0, y: 0, width: 0, height: 0 }`) on its\n * first render and the real rect on the next commit boundary. Layout\n * effects that run on the second render see the real rect and can write\n * positioned terminal escapes (Image, decorations) into the next\n * paintFrame.\n *\n * Components that need same-frame measurements must read `node.boxRect`\n * etc. directly via `useAgNode()` and gate on `useLayoutEffect` —\n * recommended only for leaf primitives in the silvery framework itself.\n *\n * For breakpoint logic, prefer `useResponsiveValue()` or\n * `useResponsiveBoxProps()` — bucketing into stable zones gives more\n * predictable behavior than branching on raw widths.\n *\n * See bead `@km/silvery/use-deferred-box-rect-and-post-commit-observers`.\n */\n\nimport { useContext, useLayoutEffect, useReducer, useRef } from \"react\"\nimport { effect } from \"@silvery/signals\"\nimport { NodeContext } from \"../context\"\nimport { type AgNode, type BoxProps, type Rect, rectEqual } from \"@silvery/ag/types\"\nimport {\n getLayoutSignals,\n markObservedLayoutSignal,\n type ObservedLayoutSignalKey,\n} from \"@silvery/ag/layout-signals\"\n\nexport type { Rect }\n\nconst EMPTY_RECT: Rect = { x: 0, y: 0, width: 0, height: 0 }\nconst EMPTY_SIZE: BoxSize = { width: 0, height: 0 }\n\nexport interface BoxSize {\n width: number\n height: number\n}\n\n/**\n * Get the inner content dimensions of a node (border-box minus padding and border).\n * This is the space available for the node's children.\n *\n * `boxRect` is passed in explicitly so the helper derives the inner rect\n * from the committed signal value rather than re-reading `node.boxRect`\n * (which holds the in-flight value mid-batch).\n */\nfunction deriveInnerRect(node: AgNode, boxRect: Rect | null | undefined): Rect | null {\n if (!boxRect) return null\n\n const props = node.props as BoxProps\n if (!props || node.type === \"silvery-text\") return boxRect\n\n // Compute padding\n const pTop = props.paddingTop ?? props.paddingY ?? props.padding ?? 0\n const pBottom = props.paddingBottom ?? props.paddingY ?? props.padding ?? 0\n const pLeft = props.paddingLeft ?? props.paddingX ?? props.padding ?? 0\n const pRight = props.paddingRight ?? props.paddingX ?? props.padding ?? 0\n\n // Compute border (1px per side if borderStyle is set)\n let bTop = 0\n let bBottom = 0\n let bLeft = 0\n let bRight = 0\n if (props.borderStyle) {\n bTop = props.borderTop !== false ? 1 : 0\n bBottom = props.borderBottom !== false ? 1 : 0\n bLeft = props.borderLeft !== false ? 1 : 0\n bRight = props.borderRight !== false ? 1 : 0\n }\n\n return {\n x: boxRect.x + pLeft + bLeft,\n y: boxRect.y + pTop + bTop,\n width: Math.max(0, boxRect.width - pLeft - pRight - bLeft - bRight),\n height: Math.max(0, boxRect.height - pTop - pBottom - bTop - bBottom),\n }\n}\n\n/** Selector that picks which committed rect signal to subscribe to. */\ntype CommittedRectSignalKey = \"boxRectCommitted\" | \"scrollRectCommitted\" | \"screenRectCommitted\"\n\n/** Selector that picks which in-flight rect signal to subscribe to. */\ntype InFlightRectSignalKey = \"boxRect\" | \"scrollRect\" | \"screenRect\"\n\nconst COMMITTED_RECT_OBSERVED_KEY: Record<CommittedRectSignalKey, ObservedLayoutSignalKey> = {\n boxRectCommitted: \"boxRect\",\n scrollRectCommitted: \"scrollRect\",\n screenRectCommitted: \"screenRect\",\n}\n\nconst IN_FLIGHT_RECT_OBSERVED_KEY: Record<InFlightRectSignalKey, ObservedLayoutSignalKey> = {\n boxRect: \"boxRect\",\n scrollRect: \"scrollRect\",\n screenRect: \"screenRect\",\n}\n\n/**\n * Reactive rect hook (deferred): subscribes to a committed rect signal and\n * re-renders when the value advances at a commit boundary. Returns the\n * rect derived from the committed value via `getCommittedRect`.\n *\n * Within a single event batch the committed signal does not change — every\n * convergence pass sees the same value, so a render that reads useBoxRect\n * and writes a layout-affecting prop converges in one pass. After the\n * batch's commit boundary (handled by the runtime via\n * `commitLayoutSnapshot`), the next batch's first render sees the new\n * value.\n */\nfunction useReactiveRect(\n getCommittedRect: (committed: Rect | null, node: AgNode) => Rect | null | undefined,\n committedSignalKey: CommittedRectSignalKey,\n): Rect {\n const node = useContext(NodeContext)\n const [, forceUpdate] = useReducer((x: number) => x + 1, 0)\n const prevRef = useRef<Rect | null>(null)\n\n useLayoutEffect(() => {\n if (!node) return\n\n markObservedLayoutSignal(node, COMMITTED_RECT_OBSERVED_KEY[committedSignalKey])\n const signals = getLayoutSignals(node)\n const rectSignal = signals[committedSignalKey]\n\n // effect() subscribes to the COMMITTED signal — re-runs when the signal\n // value changes. The committed signal advances only at event-batch\n // commit boundaries (see `commitLayoutSnapshot`), so this fires at most\n // once per batch — never mid-batch — making it impossible to form a\n // feedback edge with a render that branches on the read value.\n const dispose = effect(() => {\n const committed = rectSignal()\n const next = getCommittedRect(committed, node) ?? null\n if (!rectEqual(prevRef.current, next)) {\n prevRef.current = next\n forceUpdate()\n }\n })\n\n return dispose\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [node])\n\n if (!node) return EMPTY_RECT\n // Synchronous read (called during render): use the committed signal's\n // current value, NOT `node.boxRect` etc. The in-flight rect on the node\n // may have been updated by an earlier convergence pass within this batch\n // — reading it would re-introduce the feedback edge this hook exists to\n // eliminate. The committed signal is invariant for the batch.\n markObservedLayoutSignal(node, COMMITTED_RECT_OBSERVED_KEY[committedSignalKey])\n const signals = getLayoutSignals(node)\n const committed = signals[committedSignalKey]()\n return getCommittedRect(committed, node) ?? EMPTY_RECT\n}\n\n// ============================================================================\n// boxRect — layout position (border-box minus padding/border)\n// ============================================================================\n\n/**\n * **DANGEROUS — measurement read on the render path.** Prefer a declarative\n * primitive (`<Box fitWidth>`, `useResponsiveBoxProps`, `useResponsiveValue`,\n * `useOnBoxRectCommitted`) before reaching for this hook.\n *\n * Returns the inner content dimensions for the current component's nearest\n * Box, as of the most recent committed layout. Width and height reflect\n * the space available for children (border-box minus padding and border),\n * like CSS `clientWidth`/`clientHeight`.\n *\n * ```tsx\n * function Header() {\n * const { width } = useBoxRectDangerously()\n * return <Text>{'='.repeat(Math.max(0, width))}</Text>\n * }\n * ```\n *\n * On first render returns `{ x: 0, y: 0, width: 0, height: 0 }`. After the\n * first commit boundary, automatically re-renders with the measured\n * dimensions. This **first-paint zero-rect transition** is the social cost\n * the rename announces — components that branch layout on this hook see a\n * flush-left / collapsed first paint, then re-flow when the real rect\n * commits one event-loop tick later. Visible jank under streaming / dynamic\n * mount / SIGWINCH burst.\n *\n * Use only when:\n * - You need a measurement read in JS control flow (animation, autoscroll\n * thresholds, hit-testing) that **doesn't drive layout-affecting props**.\n * - No declarative primitive covers the case.\n *\n * Deferred semantics — see this file's docstring for the contract and the\n * one-frame-late behavior.\n *\n * Bead: `@km/silvery/responsive-layout-architecture-reframe` (Phase A.1\n * lands this rename; the full Phase A migrates each consumer to a\n * declarative primitive or, where genuinely needed, to a Suspense-friendly\n * `Promise<Rect>` form coordinated via `RectReadBarrier`).\n */\nexport function useBoxRectDangerously(): Rect {\n return useReactiveRect((committed, node) => deriveInnerRect(node, committed), \"boxRectCommitted\")\n}\n\n/**\n * @deprecated Renamed to `useBoxRectDangerously`. The original name read as\n * \"the normal hook for getting your rect\" — exactly the framing the Phase\n * A.1 rename is intended to break. App authors should reach for declarative\n * primitives first; this alias remains for one release cycle and logs a\n * dev-time warning per call site. Will be removed in the next major.\n *\n * Bead: `@km/silvery/responsive-layout-architecture-reframe`.\n */\nexport function useBoxRect(): Rect {\n // Deprecation warning fires once per call site in development. Skipped in\n // production (won't ship) AND test (vitest's fail-on-console policy would\n // trip on every test that exercises the legacy alias — including the very\n // tests that verify backward-compat). Silvery's own internal call sites\n // are migrated to `useBoxRectDangerously` as part of Phase A.1, so test\n // suites don't see the warning either way.\n if (process.env.NODE_ENV !== \"production\" && process.env.NODE_ENV !== \"test\") {\n warnUseBoxRectDeprecation()\n }\n return useReactiveRect((committed, node) => deriveInnerRect(node, committed), \"boxRectCommitted\")\n}\n\n/**\n * Internal dimensions-only variant of the deferred box rect read.\n *\n * This is for framework primitives that build width/height-derived text\n * (Divider, ProgressBar, TextArea wrapping) but do not care where their\n * parent sits on screen. It subscribes to the same committed boxRect signal\n * as `useBoxRect()`, but only re-renders when the derived inner\n * `{width,height}` changes. Scrolling and virtual-window spacer movement\n * often change x/y without changing dimensions; full-rect subscriptions wake\n * these primitives on every such frame and steal scroll budget.\n */\nexport function useBoxSize(): BoxSize {\n const node = useContext(NodeContext)\n const [, forceUpdate] = useReducer((x: number) => x + 1, 0)\n const prevRef = useRef<BoxSize | null>(null)\n\n useLayoutEffect(() => {\n if (!node) return\n\n markObservedLayoutSignal(node, \"boxSize\")\n const signals = getLayoutSignals(node)\n\n const dispose = effect(() => {\n const rect = deriveInnerRect(node, signals.boxRectCommitted())\n const next = rect ? { width: rect.width, height: rect.height } : EMPTY_SIZE\n const prev = prevRef.current\n if (!prev || prev.width !== next.width || prev.height !== next.height) {\n prevRef.current = next\n forceUpdate()\n }\n })\n\n return dispose\n }, [node])\n\n if (!node) return EMPTY_SIZE\n markObservedLayoutSignal(node, \"boxSize\")\n const rect = deriveInnerRect(node, getLayoutSignals(node).boxRectCommitted())\n return rect ? { width: rect.width, height: rect.height } : EMPTY_SIZE\n}\n\nconst useBoxRectWarnedCallSites = new Set<string>()\n\nfunction warnUseBoxRectDeprecation(): void {\n // Dedupe per-call-site so the warning fires once per source location, not\n // once per render. The first stack frame outside this file is the consumer.\n const stack = new Error().stack ?? \"\"\n const lines = stack.split(\"\\n\")\n let consumerFrame = \"\"\n for (let i = 1; i < lines.length; i++) {\n const line = lines[i] ?? \"\"\n if (!line.includes(\"useLayout.ts\") && line.trim().startsWith(\"at \")) {\n consumerFrame = line.trim()\n break\n }\n }\n const key = consumerFrame || \"<unknown>\"\n if (useBoxRectWarnedCallSites.has(key)) return\n useBoxRectWarnedCallSites.add(key)\n // eslint-disable-next-line no-console\n console.warn(\n `[silvery] useBoxRect() is deprecated — rename to useBoxRectDangerously(), or migrate to a declarative primitive ` +\n `(<Box fitWidth>, useResponsiveBoxProps, useResponsiveValue, useOnBoxRectCommitted). ` +\n `See @km/silvery/responsive-layout-architecture-reframe. Call site: ${key}`,\n )\n}\n\n// ============================================================================\n// scrollRect — scroll-adjusted position (pre-sticky clamping)\n// ============================================================================\n\n/**\n * Returns the scroll-adjusted position for the current component, as of\n * the most recent committed layout.\n *\n * This is the node's position in scroll coordinates, *before* sticky\n * clamping. For non-sticky nodes it equals `useScreenRect()`. For sticky\n * nodes, the scrollRect reflects where the node would be without sticky\n * adjustment — so it can go off-screen (negative y, etc.) when scrolled\n * past.\n *\n * ```tsx\n * function Card({ id }) {\n * const { y } = useScrollRect()\n * return <Box>Scroll y: {y}</Box>\n * }\n * ```\n *\n * Deferred semantics — see this file's docstring.\n */\nexport function useScrollRect(): Rect {\n return useReactiveRect((committed) => committed, \"scrollRectCommitted\")\n}\n\n// ============================================================================\n// screenRect — actual paint position on the terminal screen\n// ============================================================================\n\n/**\n * Returns the actual paint position on the terminal screen as of the most\n * recent committed layout — the silvery analogue of\n * `getBoundingClientRect()`.\n *\n * For non-sticky nodes this equals `useScrollRect()`. For sticky nodes\n * (`position=\"sticky\"`), it reflects the clamped position where pixels\n * actually land on screen.\n *\n * ```tsx\n * function StickyHeader() {\n * const { y } = useScreenRect()\n * return <Box position=\"sticky\" stickyTop={0}>Header at row {y}</Box>\n * }\n * ```\n *\n * Deferred semantics — see this file's docstring.\n */\nexport function useScreenRect(): Rect {\n return useReactiveRect((committed) => committed, \"screenRectCommitted\")\n}\n\n// ============================================================================\n// In-flight escape hatches — read the live (mid-batch) rect signal\n// ============================================================================\n//\n// The reactive `useBoxRect()` / `useScrollRect()` / `useScreenRect()` hooks\n// return the COMMITTED rect (one frame deferred) — see this file's docstring\n// for the contract. The committed-only contract eliminates render → write →\n// re-measure feedback loops by construction, but it forces components that\n// genuinely need first-paint dimensions to wait one frame.\n//\n// `useBoxRectInFlight()` / `useScrollRectInFlight()` / `useScreenRectInFlight()`\n// subscribe to the IN-FLIGHT signal — the rect as written by the most recent\n// layout pass within the current convergence cycle. The value can change\n// between convergence passes within a single event batch, so a render that\n// reads it AND writes a layout-affecting prop CAN form a feedback edge.\n//\n// **For silvery framework internals only.** Image, useCursor, useGridPosition,\n// and ListView's viewport-tracking path are the real consumers — leaf\n// primitives whose first-paint measurement is critical for scroll, decoration,\n// or absolute-positioning math, and which don't drive layout-affecting props\n// back into the React tree. (Lane snapping, once an in-flight consumer here,\n// now lives in the engine as the `fitWidth` Box prop and doesn't reach for\n// these hooks at all.)\n//\n// **Lint-gated.** App code (silvercode, km-tui, downstream consumers) must\n// not import these hooks — the ESLint rule `silvery/no-in-flight-rect-in-app`\n// blocks imports from outside `vendor/silvery/`. App code that needs\n// first-paint layout decisions must use `useResponsiveBoxProps` /\n// `useResponsiveValue` (declarative, no measurement reads) — the path\n// documented in [The Silvery Way §2](../../docs/guide/the-silvery-way.md).\n//\n// **Why both forms exist.** The deferred form is the safe default; the\n// in-flight form is an explicit escape hatch acknowledging that silvery's\n// own primitives can't always wait one frame for measurement. Naming the\n// escape hatch `*InFlight` makes the cost legible at the call site.\n//\n// See bead `@km/silvery/usebox-rect-deferred-only-breaks-first-paint`.\n\n/**\n * In-flight reactive rect hook (escape hatch): subscribes to the LIVE rect\n * signal — the value as written by the most recent layout pass within the\n * current convergence cycle. Re-renders when the in-flight value advances,\n * which can happen multiple times per event batch as the convergence loop\n * iterates.\n *\n * Use only inside silvery framework internals where first-paint measurement\n * is required and the consumer does not write layout-affecting props\n * derived from the read. App code must use the deferred form\n * (`useBoxRect()` / `useScrollRect()` / `useScreenRect()`) or\n * `useResponsiveBoxProps`/`useResponsiveValue` instead.\n */\nfunction useReactiveRectInFlight(\n getDerivedRect: (raw: Rect | null, node: AgNode) => Rect | null | undefined,\n inFlightSignalKey: InFlightRectSignalKey,\n): Rect {\n const node = useContext(NodeContext)\n const [, forceUpdate] = useReducer((x: number) => x + 1, 0)\n const prevRef = useRef<Rect | null>(null)\n\n useLayoutEffect(() => {\n if (!node) return\n\n markObservedLayoutSignal(node, IN_FLIGHT_RECT_OBSERVED_KEY[inFlightSignalKey])\n const signals = getLayoutSignals(node)\n const rectSignal = signals[inFlightSignalKey]\n\n // effect() subscribes to the IN-FLIGHT signal — re-runs whenever the\n // signal advances, including mid-batch as the convergence loop iterates.\n // This is intentionally permissive vs the committed form; consumers that\n // can't accept first-paint zero-rect (Image, useCursor, useGridPosition)\n // opt in via this hook.\n const dispose = effect(() => {\n const raw = rectSignal()\n const next = getDerivedRect(raw, node) ?? null\n if (!rectEqual(prevRef.current, next)) {\n prevRef.current = next\n forceUpdate()\n }\n })\n\n return dispose\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [node])\n\n if (!node) return EMPTY_RECT\n // Synchronous read (called during render): use the in-flight signal\n // directly (NOT `node.boxRect` — that bypasses the reactive subscription\n // edge and would let the render see one value while the effect sees\n // another). The in-flight signal value reflects the most recent layout\n // pass; it may differ between convergence passes within a batch.\n markObservedLayoutSignal(node, IN_FLIGHT_RECT_OBSERVED_KEY[inFlightSignalKey])\n const signals = getLayoutSignals(node)\n const raw = signals[inFlightSignalKey]()\n return getDerivedRect(raw, node) ?? EMPTY_RECT\n}\n\n/**\n * Returns the inner content dimensions of the current Box from the IN-FLIGHT\n * signal — the value as of the most recent layout pass, which may change\n * between convergence passes within an event batch.\n *\n * Silvery framework internals only — app code must use {@link useBoxRect}\n * (deferred) or `useResponsiveBoxProps`/`useResponsiveValue` instead.\n *\n * Unlike {@link useBoxRect} (the deferred form), this hook returns the\n * measured value on the first render after layout — there is no one-frame\n * fallback. The cost is that a render reading this hook AND writing a\n * layout-affecting prop can form a convergence-loop feedback edge; the\n * lint rule `silvery/no-in-flight-rect-in-app` enforces the call-site\n * scope.\n */\nexport function useBoxRectInFlight(): Rect {\n return useReactiveRectInFlight((raw, node) => deriveInnerRect(node, raw), \"boxRect\")\n}\n\n/**\n * Returns the scroll-adjusted position from the IN-FLIGHT signal — the\n * value as of the most recent layout pass, which may change between\n * convergence passes within an event batch.\n *\n * Silvery framework internals only — see {@link useBoxRectInFlight} for\n * the contract and the lint rule that gates app-code use.\n */\nexport function useScrollRectInFlight(): Rect {\n return useReactiveRectInFlight((raw) => raw, \"scrollRect\")\n}\n\n/**\n * Returns the actual paint position from the IN-FLIGHT signal — the value\n * as of the most recent layout pass, which may change between convergence\n * passes within an event batch.\n *\n * Silvery framework internals only — see {@link useBoxRectInFlight} for\n * the contract and the lint rule that gates app-code use.\n */\nexport function useScreenRectInFlight(): Rect {\n return useReactiveRectInFlight((raw) => raw, \"screenRect\")\n}\n\n// ============================================================================\n// Callback observers — fire on commit boundary without triggering re-render\n// ============================================================================\n//\n// The reactive `useBoxRect()` / `useScrollRect()` / `useScreenRect()` hooks\n// re-render the consuming component every time the committed rect advances.\n// For hot paths where the rect change should NOT re-render the consumer\n// (cursor positioning, grid registry, decoration emission), the callback\n// observers below subscribe directly to the committed signal and invoke\n// `cb(rect)` at every commit boundary — no React state churn, no re-render.\n//\n// Restored 2026-05-10 to address the perf regression introduced by removing\n// the callback overload from `useBoxRect()` in silvery `63938779b6`. The\n// previous callback form was `useBoxRect((rect) => …)` overloaded on the\n// reactive hook; that fused two distinct contracts into one signature. The\n// observer hooks below split them: reactive read + commit-boundary observer.\n\n/**\n * Subscribes to the committed rect signal and fires `cb(rect)` at each\n * commit boundary, **without** triggering a re-render of the consumer.\n *\n * Use for hot paths where a rect change drives an imperative side effect\n * (cursor store update, registry write, ANSI emission) and there is no\n * render path that needs to reflect the rect.\n *\n * The callback is invoked synchronously from a commit-boundary effect(),\n * with the derived rect (`getDerivedRect` applied to the committed signal\n * value). It is NOT invoked when the derived rect is null. The caller may\n * close over component state via refs; see `useCursor` / `useGridPosition`\n * for canonical patterns.\n */\nfunction useOnRectCommitted(\n cb: (rect: Rect) => void,\n getDerivedRect: (committed: Rect | null, node: AgNode) => Rect | null | undefined,\n committedSignalKey: CommittedRectSignalKey,\n): void {\n const node = useContext(NodeContext)\n const cbRef = useRef(cb)\n cbRef.current = cb\n\n useLayoutEffect(() => {\n if (!node) return\n\n const signals = getLayoutSignals(node)\n const rectSignal = signals[committedSignalKey]\n let prev: Rect | null = null\n\n const dispose = effect(() => {\n const committed = rectSignal()\n const next = getDerivedRect(committed, node) ?? null\n if (next == null) return\n if (rectEqual(prev, next)) return\n prev = next\n cbRef.current(next)\n })\n\n return dispose\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [node])\n}\n\n/**\n * Subscribes to the committed boxRect (inner content) and fires `cb` at\n * each commit boundary without re-rendering. See {@link useBoxRect} for\n * the deferred-rect contract; this is the observer form.\n */\nexport function useOnBoxRectCommitted(cb: (rect: Rect) => void): void {\n useOnRectCommitted(cb, (committed, node) => deriveInnerRect(node, committed), \"boxRectCommitted\")\n}\n\n/**\n * Subscribes to the committed scrollRect and fires `cb` at each commit\n * boundary without re-rendering.\n */\nexport function useOnScrollRectCommitted(cb: (rect: Rect) => void): void {\n useOnRectCommitted(cb, (committed) => committed, \"scrollRectCommitted\")\n}\n\n/**\n * Subscribes to the committed screenRect and fires `cb` at each commit\n * boundary without re-rendering.\n */\nexport function useOnScreenRectCommitted(cb: (rect: Rect) => void): void {\n useOnRectCommitted(cb, (committed) => committed, \"screenRectCommitted\")\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAM,aAAmB;CAAE,GAAG;CAAG,GAAG;CAAG,OAAO;CAAG,QAAQ;CAAG;AAC5D,MAAM,aAAsB;CAAE,OAAO;CAAG,QAAQ;CAAG;;;;;;;;;AAenD,SAAS,gBAAg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;IAID,CAAC,KAAK,CAAC;AAEV,KAAI,CAAC,KAAM,QAAO;AAMlB,0BAAyB,MAAM,4BAA4B,mBAAmB;AAG9E,QAAO,eAFS,iBAAiB,KAAK,CAClB,oBAAoB,EACb,KAAK,IAAI;;;;;;;;;;;;;;;;;AAkBtC,SAAgB,qBAA2B;AACzC,QAAO,yBAAyB,KAAK,SAAS,gBAAgB,MAAM,IAAI,EAAE,UAAU;;;;;;;;;;AAWtF,SAAgB,wBAA8B;AAC5C,QAAO,yBAAyB,QAAQ,KAAK,aAAa;;;;;;;;;;AAW5D,SAAgB,wBAA8B;AAC5C,QAAO,yBAAyB,QAAQ,KAAK,aAAa;;;;;;;;;;;;;;;;AAkC5D,SAAS,mBACP,IACA,gBACA,oBACM;CACN,MAAM,OAAO,WAAW,YAAY;CACpC,MAAM,QAAQ,OAAO,GAAG;AACxB,OAAM,UAAU;AAEhB,uBAAsB;AACpB,MAAI,CAAC,KAAM;EAGX,MAAM,aADU,iBAAiB,KAAK,CACX;EAC3B,IAAI,OAAoB;AAWxB,SATgB,aAAa;GAE3B,MAAM,OAAO,eADK,YAAY,EACS,KAAK,IAAI;AAChD,OAAI,QAAQ,KAAM;AAClB,OAAI,UAAU,MAAM,KAAK,CAAE;AAC3B,UAAO;AACP,SAAM,QAAQ,KAAK;IACnB;IAID,CAAC,KAAK,CAAC;;;;;;;AAQZ,SAAgB,sBAAsB,IAAgC;AACpE,oBAAmB,KAAK,WAAW,SAAS,gBAAgB,MAAM,UAAU,EAAE,mBAAmB;;;;;;AAOnG,SAAgB,yBAAyB,IAAgC;AACvE,oBAAmB,KAAK,cAAc,WAAW,sBAAsB;;;;;;AAOzE,SAAgB,yBAAyB,IAAgC;AACvE,oBAAmB,KAAK,cAAc,WAAW,sBAAsB"}
@@ -1,5 +1,5 @@
1
- import { _ as TextInputOptions, b as WithSpinnerOptions, i as ProgressGenerator, o as SelectOption, y as WithSelectOptions } from "./types-kt_fKR37.mjs";
2
- import { r as Spinner } from "./spinner-CZINHpkV.mjs";
1
+ import { _ as TextInputOptions, b as WithSpinnerOptions, i as ProgressGenerator, o as SelectOption, y as WithSelectOptions } from "./types-D_E0FbqA.mjs";
2
+ import { r as Spinner } from "./spinner-DN10UfF0.mjs";
3
3
  import { EventEmitter } from "events";
4
4
 
5
5
  //#region packages/ag-react/src/ui/wrappers/with-spinner.d.ts
@@ -230,4 +230,4 @@ interface TextInputInstance {
230
230
  }
231
231
  //#endregion
232
232
  export { waitForEvent as a, wrapGenerator as c, withSelect as i, attachSpinner as l, withTextInput as n, wrapEmitter as o, createSelect as r, withIterableProgress as s, createTextInput as t, withSpinner as u };
233
- //# sourceMappingURL=with-text-input-YeohVLeo.d.mts.map
233
+ //# sourceMappingURL=with-text-input-DLoSCBrm.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"with-text-input-YeohVLeo.d.mts","names":[],"sources":["../packages/ag-react/src/ui/wrappers/with-spinner.ts","../packages/ag-react/src/ui/wrappers/wrap-generator.ts","../packages/ag-react/src/ui/wrappers/wrap-emitter.ts","../packages/ag-react/src/ui/wrappers/with-select.ts","../packages/ag-react/src/ui/wrappers/with-text-input.ts"],"mappings":";;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAsB,WAAA,GAAA,CACpB,OAAA,EAAS,OAAA,CAAQ,CAAA,WAAY,CAAA,GAAI,OAAA,CAAQ,CAAA,IACzC,IAAA,aAAiB,cAAA,sBACjB,OAAA,GAAS,kBAAA,GACR,OAAA,CAAQ,CAAA;;;;;;AAmDX;;;;;;;iBAAgB,aAAA,GAAA,CACd,OAAA,EAAS,OAAA,CAAQ,CAAA,GACjB,IAAA,UACA,OAAA,GAAS,kBAAA,IACP,OAAA,CAAQ,CAAA,GAAI,OAAA;;;;AA3DhB;;;;;;;;;;;;;;;;;iBCHsB,aAAA,GAAA,CACpB,SAAA,EAAW,iBAAA,CAAkB,CAAA,GAC7B,YAAA,aAAyB,QAAA;EAAY,OAAA;EAAiB,KAAA;AAA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/RiB;EIiSjB,MAAA;EJhSA;EIkSA,MAAA,CAAO,IAAA;EJjSP;EImSA,SAAA;EJlSU;EIoSV,MAAA;EJpSqB;EIsSrB,KAAA;;EAEA,gBAAA;AAAA"}
1
+ {"version":3,"file":"with-text-input-DLoSCBrm.d.mts","names":[],"sources":["../packages/ag-react/src/ui/wrappers/with-spinner.ts","../packages/ag-react/src/ui/wrappers/wrap-generator.ts","../packages/ag-react/src/ui/wrappers/wrap-emitter.ts","../packages/ag-react/src/ui/wrappers/with-select.ts","../packages/ag-react/src/ui/wrappers/with-text-input.ts"],"mappings":";;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAsB,WAAA,GAAA,CACpB,OAAA,EAAS,OAAA,CAAQ,CAAA,WAAY,CAAA,GAAI,OAAA,CAAQ,CAAA,IACzC,IAAA,aAAiB,cAAA,sBACjB,OAAA,GAAS,kBAAA,GACR,OAAA,CAAQ,CAAA;;;;;;AAmDX;;;;;;;iBAAgB,aAAA,GAAA,CACd,OAAA,EAAS,OAAA,CAAQ,CAAA,GACjB,IAAA,UACA,OAAA,GAAS,kBAAA,IACP,OAAA,CAAQ,CAAA,GAAI,OAAA;;;;AA3DhB;;;;;;;;;;;;;;;;;iBCHsB,aAAA,GAAA,CACpB,SAAA,EAAW,iBAAA,CAAkB,CAAA,GAC7B,YAAA,aAAyB,QAAA;EAAY,OAAA;EAAiB,KAAA;AAAA,eACtD,OAAA;EAAW,eAAA;AAAA,IACV,OAAA,CAAQ,CAAA;;;;;;ADsDX;;;;;;iBCeuB,oBAAA,GAAA,CACrB,QAAA,EAAU,QAAA,CAAS,CAAA,IAAK,aAAA,CAAc,CAAA,GACtC,KAAA,UACA,OAAA;EAAW,eAAA;AAAA,IACV,cAAA,CAAe,CAAA;;;;UC/FR,WAAA;EFqBuB;EEnB/B,IAAA;EFoBiB;EElBjB,OAAA,IAAW,IAAA;EFkBkB;EEhB7B,OAAA;EFgBiC;EEdjC,IAAA;EFiBS;EEfT,IA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