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
package/dist/index.mjs CHANGED
@@ -1,17 +1,20 @@
1
- import { i as FocusManagerContext, l as TermContext, n as CapabilityRegistryContext, o as RuntimeContext, r as ChainAppContext, s as StderrContext, t as CacheBackendContext } from "./context-BU5LkkIy.mjs";
2
- import { a as Box, i as useTheme, n as ActiveSchemeContext, t as Text } from "./Text-Lq0dmj8-.mjs";
3
- import { $a as computeIndexTrailingSpacer, $i as useExit, $n as Diff, $r as variantFgToken, $t as createCompositeClipboard, Aa as setCursorStyle, Ai as createCopyProvider, An as dispatchFocusEvent, Ar as H5, At as isInspectorEnabled, Ba as getPaneIds, Bi as supportsScrollRegions, Bn as calcEdgeBasedScrollOffset, Br as Strong, Bt as queryModes, Ca as notifyITerm2, Ci as useListItem, Cn as usePopover, Cr as Code, Ct as createPipeline, Da as resetCursorStyle, Di as useFindState, Dn as useResponsiveValue, Dr as H2, Dt as enableInspector, Ea as reportDirectory, Ei as useCopyModeState, En as DEFAULT_BREAKPOINTS, Er as H1, Et as disableInspector, Fa as lastModifierState, Fi as moveCursor, Fn as SilveryErrorBoundary, Fr as Lead, Ft as queryCellSize, Ga as swapPanes, Gi as useInputLayerContext, Gn as usePositionRegistry, Gr as SelectList, Gt as queryTertiaryDA, Ha as removePane, Hi as InputLayerContext, Hn as useGridPosition, Hr as Divider, Ht as queryPrimaryDA, Ia as useModifierKeys, Ii as resetScrollRegion, In as Static, Ir as Muted, It as queryTextAreaPixels, Ja as ListView, Ji as useFocusable, Jn as RadioGroup, Jr as ProgressBar, Jt as TERMTEST_SECTIONS, Ka as SplitView, Ki as useFocusManager, Kn as Terminal, Kr as Pulse, Kt as queryCursorFromStdio, La as Fill, Li as scrollDown, Ln as Spacer, Lr as OL, Lt as queryTextAreaSize, Ma as setWindowAndIconTitle, Mi as getInternalClipboard, Mn as createFocusManager, Mr as HR, Mt as resolveNonTTYMode, Na as setWindowTitle, Ni as PasteProvider, Nn as ScopeProvider, Nr as Kbd, Nt as createInputEvents, Oa as resetMouseCursorShape, Oi as useSelection, On as createFocusEvent, Or as H3, Ot as inspectFrame, Pa as getModifierState, Pi as usePaste, Pn as usePanic, Pr as LI, Pt as isTerm, Qa as computeMatchRanges, Qi as useAppScope, Qn as AnimatedNumber, Qr as VARIANT_ICONS, Qt as OSC133, Ra as createLeaf, Ri as scrollUp, Rn as Newline, Rr as P, Rt as DecMode, Sa as notify, Si as useColorScheme, Sn as PopoverProvider, Sr as Blockquote, St as withCommands, Ta as queryKittyKeyboard, Ti as useDragState, Tn as useResponsiveBoxProps, Tr as Em, Tt as autoEnableInspector, Ua as resizeSplit, Ui as InputLayerProvider, Un as PositionRegistryProvider, Ur as Badge, Ut as querySecondaryDA, Va as getTabOrder, Vi as useTerminalFocused, Vn as GridCell, Vr as UL, Vt as queryDeviceAttributes, Wa as splitPane, Wi as useInputLayer, Wn as createPositionRegistry, Wr as Table, Wt as queryTerminalVersion, Xa as useSearch, Xi as useStderr, Xn as TextReveal, Xr as SearchBar, Xt as detectKittyFromStdio, Ya as SearchProvider, Yi as useFocus, Yn as TimeToFirstDraw, Yr as Spinner, Yt as runTermtest, Za as useSearchOptional, Zi as useStdout, Zn as TextShimmer, Zr as Button, Zt as detectKittySupport, _a as KittyFlags, _i as cursorToRowCol, _n as createCursorStore, _o as Viewport, _r as useToast, _t as renderSync, a as ReactiveThemeProvider, aa as useHotkeyMap, ai as PickerList, an as injectDOMStyles, ao as ScrollArea, ar as Tab, at as InputBoundary, ba as enableKittyKeyboard, bi as TextInput, bn as HIDE_DELAY_MS, br as Heading, bt as withDiagnostics, ca as useAgNode, ci as formatTitleWithHotkey, cn as HitRegistryContext, co as useKineticScroll, cr as Tabs, ct as useEditContext, da as useConsole, di as TextArea, dn as useHitRegistry, do as MeasuredBox, dr as CommandPalette, dt as mergeTextOps, ea as useApp, ei as variantFillTokens, en as createInternalClipboardBackend, eo as mapChildIndexToItem, er as LineNumber, fa as ErrorBoundary, fi as clampScroll, fn as HitRegistry, fo as Island, fr as Alert, ft as createTermEditContext, ga as BEL, gi as cursorMoveUp, gn as CursorProvider, go as ScopeContext, gr as ToastItem, gt as renderStatic, ha as ANSI, hi as cursorMoveDown, hn as ThemeProvider, ho as AppScopeContext, hr as ToastContainer, ht as render$1, i as useActiveScheme, ia as useHotkey, ii as PickerDialog, in as createDOMAdapter, io as useVirtualizer, ir as Tooltip, it as collect, ja as setMouseCursorShape, ji as createPasteEvent, jn as dispatchKeyEvent, jr as H6, jt as isTTY, ka as resetWindowTitle, ki as usePasteEvents, kn as createKeyEvent, kr as H4, kt as inspectTree, la as Screen, li as CursorLine, ln as useHitRegion, lo as Scrollbar, lr as Breadcrumb, lt as applyTextOp, ma as useMouseCursor, mi as countVisualLines, mn as resetHitRegionIdCounter, mo as useScope, mr as InlineAlert, mt as measureElement, n as useId, na as useRawKeyEvent, ni as variantSubtleTokens, nn as parseClipboardResponse, no as shouldKeepHeightModelSnapshot, nr as Skeleton, nt as useTea, oa as useBoxMetrics, oi as Backdrop, on as CanvasRenderBuffer, oo as useScrollController, or as TabList, ot as activeEditContextRef, pa as Link, pi as useTextArea, pn as Z_INDEX, po as useScopeEffect, pr as Banner, pt as renderScreenReaderOutput, qa as HorizontalVirtualList, qi as useFocusWithin, qn as encodeTerminalRow, qr as usePulse, qt as queryCursorPosition, r as useTransition$1, ra as useTextInput, ri as Toggle, rn as DOMRenderBuffer, ro as useInput, rr as AnchoredOverlay, rt as fx, sa as useSignal, si as ModalDialog, sn as createCanvasAdapter, so as SCROLLBAR_FADE_AFTER_MS, sr as TabPanel, st as activeEditTargetRef, t as useDeferredValue, ta as useRuntime, ti as variantIcon, tn as createOsc52Backend, to as createHeightModel, tr as Accordion, ua as Console, ui as EditContextDisplay, un as useHitRegionCallback, uo as useHover, ur as TreeView, ut as invertTextOp, va as disableKittyKeyboard, vi as getWrappedLines, vn as resetCursorState, vr as Form, vt as withRender, wa as notifyKitty, wi as useInteractiveState, wn as usePopoverHandlers, wr as CodeBlock, wt as withMeasurer, xa as enableMouse, xi as useReadline, xn as HOVER_SHOW_DELAY_MS, xr as Prose, xt as withKeybindings, ya as disableMouse, yi as rowColToCursor, yn as useCursor, yr as FormField, yt as VirtualTerminal, za as findAdjacentPane, zi as setScrollRegion, zn as Transform, zr as Small, zt as queryMode } from "./src-BR4xNwdG.mjs";
4
- import { C as useScrollRectInFlight, S as useScrollRect, _ as useOnBoxRectCommitted, a as deleteKittyImage, b as useScreenRect, c as isKittyGraphicsSupported, d as shallow, f as useTerm, h as useBoxRectInFlight, i as isSixelSupported, l as placeKittyImage, m as useBoxRectDangerously, o as deleteKittyPlacement, p as useBoxRect, r as encodeSixel, s as encodeKittyImage, t as Image, u as useWindowSize, v as useOnScreenRectCommitted, x as useScreenRectInFlight, y as useOnScrollRectCommitted } from "./image-C2Birh2x.mjs";
5
- import { $ as queryMultiplePaletteColors, B as detectColorScheme, F as pickColorLevel, G as resetCursorColor, H as queryCursorColor, I as quantizeHex, J as setCursorColor, K as resetForegroundColor, L as detectTerminalScheme, M as createTerminalProfile, N as probeTerminalProfile, Q as parsePaletteResponse, R as detectTheme, U as queryForegroundColor, V as queryBackgroundColor, W as resetBackgroundColor, Y as setForegroundColor, c as detectScheme, et as queryPaletteColor, ft as defaultCaps, it as deriveTheme, l as detectSchemeTheme, m as resolveThemeColor, o as generateTheme, q as setBackgroundColor, tt as setPaletteColor, z as probeColors } from "./src-BNTToU7l.mjs";
6
- import { a as defaultDarkTheme, c as getThemeByName, i as builtinThemes, n as ansi16LightTheme, o as defaultLightTheme, t as ansi16DarkTheme } from "./schemes-JjNp4aSl.mjs";
7
- import { At as keyToName, B as isTextSizingEnabled, C as IncrementalRenderMismatchError, D as displayWidth, E as createMeasurer, F as hasWideCharacters, G as normalizeText, I as hasZeroWidthCharacters, J as runWithMeasurer, K as padText, L as isCJK, M as graphemeCount, Mt as parseHotkey, N as graphemeWidth, Nt as parseKey, O as displayWidthAnsi, P as hasAnsi, Pt as parseKeypress, Q as splitGraphemes, R as isLikelyEmoji, T as constrainText, Tt as emptyKey, U as isZeroWidthGrapheme, V as isWideGrapheme, W as measureText, X as sliceByWidthFromEnd, Y as sliceByWidth, Z as sliceByWidthRange, _ as enableBracketedPaste, at as writeLinesToBuffer, b as parseMouseSequence, ct as detectTextSizingSupport, d as disableFocusReporting, dt as isPrivateUseArea, et as stripAnsi, f as enableFocusReporting, ft as textSized, g as disableBracketedPaste, h as PASTE_START, i as createConsole, j as getFirstCodePoint, jt as matchHotkey, k as ensureEmojiPresentation, kt as keyToModifiers, m as PASTE_END, n as createTerm, nt as truncateText, ot as writeTextToBuffer, p as parseFocusEvent, q as parseAnsiText, rt as wrapText, st as writeTextTruncated, t as term, tt as truncateAnsi, ut as getTerminalFingerprint, v as parseBracketedPaste, x as createOutputPhase, y as isMouseSequence } from "./ansi-yC4RyBNY.mjs";
8
- import { i as isLayoutEngineInitialized, o as setLayoutEngine } from "./layout-engine-C2px0RJE.mjs";
9
- import { n as renderStringSync, t as renderString } from "./render-string-DkQacASz.mjs";
10
- import { a as useAnimation, i as useTransition, n as useTimeout, o as easings, r as useInterval, s as resolveEasing, t as useLatest } from "./animation-ZMN2_XKv.mjs";
11
- import { C as findSpatialTarget, S as findFocusableAncestor, T as getTabOrder$1, a as createDoubleClickState, b as findByTestID, c as createWheelEvent, d as hitTest, f as processMouseEvent, l as dispatchMouseEvent, n as checkDoubleClick, o as createMouseEvent, r as computeEnterLeave, s as createMouseEventProcessor, w as getExplicitFocusLink, x as findEnclosingScope } from "./mouse-events-Dki3ISIp.mjs";
12
- import { n as createYogaEngine, r as initYogaEngine, t as YogaLayoutEngine } from "./yoga-adapter-BnZX1PAY.mjs";
13
- import { n as createFlexilyZeroEngine, t as FlexilyZeroLayoutEngine } from "./flexily-zero-adapter-C3Vj0fPt.mjs";
14
- import { n as connectDevTools, r as isDevToolsConnected } from "./devtools-DcQjgyjL.mjs";
1
+ import { C as findFocusableAncestor, E as getTabOrder$1, S as findEnclosingScope, T as getExplicitFocusLink, a as createDoubleClickState, c as createWheelEvent, d as hitTest, f as processMouseEvent, l as dispatchMouseEvent, n as checkDoubleClick, o as createMouseEvent, r as computeEnterLeave, s as createMouseEventProcessor, w as findSpatialTarget, x as findByTestID } from "./mouse-events-WQ2h-uqG.mjs";
2
+ import { $ as DecMode, A as withMeasurer, B as resolveNonTTYMode, C as resetScrollRegion, Ct as CursorProvider, D as supportsScrollRegions, E as setScrollRegion, Et as useCursor, F as inspectTree, G as createInputEvents, H as Z_INDEX, I as isInspectorEnabled, K as isTerm, M as disableInspector, N as enableInspector, Nt as createFocusManager, O as calcEdgeBasedScrollOffset, P as inspectFrame, Q as queryTextAreaSize, S as moveCursor, St as createCanvasAdapter, T as scrollUp, Tt as resetCursorState, V as HitRegistry, W as resetHitRegionIdCounter, X as queryCellSize, Z as queryTextAreaPixels, _ as getTabOrder, at as queryTerminalVersion, b as splitPane, bt as injectDOMStyles, dt as TERMTEST_SECTIONS, et as queryMode, ft as runTermtest, g as getPaneIds, gt as OSC133, h as findAdjacentPane, it as querySecondaryDA, j as autoEnableInspector, k as createPipeline, lt as queryCursorFromStdio, m as createLeaf, mt as detectKittySupport, nt as queryDeviceAttributes, ot as queryTertiaryDA, pt as detectKittyFromStdio, rt as queryPrimaryDA, t as computeMatchRanges, tt as queryModes, ut as queryCursorPosition, v as removePane, vt as DOMRenderBuffer, w as scrollDown, wt as createCursorStore, x as swapPanes, xt as CanvasRenderBuffer, y as resizeSplit, yt as createDOMAdapter, z as isTTY } from "./src-DbqcSrhy.mjs";
3
+ import { G as pipe, J as dispatchFocusEvent, K as createFocusEvent, L as withKeybindings, M as withRender, N as VirtualTerminal, P as withDiagnostics, R as withCommands, Y as dispatchKeyEvent, c as ScopeProvider, j as createBaseApp, l as AppScopeContext, q as createKeyEvent, u as ScopeContext } from "./chain-bridge-CkYcMxlq.mjs";
4
+ import { $ as GLIMMER_PERIOD_MS, $i as rowColToCursor, $n as useInputLayer, $r as useScope, $t as Divider, A as PopoverProvider, Ai as withSlice, An as EditContextDisplay, Ar as SplitView, At as Prose, B as Spacer, Bn as useCopyModeState, Br as shouldKeepHeightModelSnapshot, Bt as H4, C as renderSync, Cn as PickerDialog, Cr as useModifierKeys, Ct as InlineAlert, D as useHitRegistry, Dn as ModalDialog, Dr as resolveSplitPaneLayout, Dt as Form, E as useHitRegionCallback, En as ModalOverlay, Er as clampSplitPaneRatio, Et as useToast, F as useResponsiveBoxProps, Fn as useReadline, Fr as useSearchOptional, Ft as CodeBlock, G as PositionRegistryProvider, Gi as applyTextOp, Gn as createCopyProvider, Gr as Scrollbar, Gt as LI, H as Transform, Hn as useSelectionActions, Hr as useScrollController, Ht as H6, I as DEFAULT_BREAKPOINTS, In as useColorScheme, Ir as computeIndexTrailingSpacer, It as Em, J as Terminal, Ji as countVisualLines, Jn as PasteProvider, Jr as sandbox, Jt as OL, K as createPositionRegistry, Ki as invertTextOp, Kn as createPasteEvent, Kr as useHover, Kt as Lead, L as useResponsiveValue, Ln as useListItem, Lr as mapChildIndexToItem, Lt as H1, M as usePopoverHandlers, Mn as clampScroll, Mr as ListView, Mt as formatNounId, N as DEFAULT_COMPACT_MAX_WIDTH, Nn as useTextArea, Nr as SearchProvider, Nt as Blockquote, O as HIDE_DELAY_MS, Oi as useSlice, On as formatTitleWithHotkey, Or as splitPaneRatioAfterDrag, Ot as FormField, P as densityForWidth, Pn as TextInput, Pr as useSearch, Pt as Code, Q as TextReveal, Qi as getWrappedLines, Qn as InputLayerProvider, Qr as useScopeEffect, Qt as UL, R as useMouseCursor, Rn as useInteractiveState, Rr as useVirtualizer, Rt as H2, S as renderStatic, Sn as Toggle, Sr as lastModifierState, St as Banner, T as useHitRegion, Tn as Backdrop, Tr as SplitPane, Tt as ToastItem, U as GridCell, Un as useSelection, Ur as SCROLLBAR_FADE_AFTER_MS, Ut as HR, V as Newline, Vn as useFindState, Vr as ScrollArea, Vt as H5, W as useGridPosition, Wn as usePasteEvents, Wr as useKineticScroll, Wt as Kbd, X as RadioGroup, Xi as cursorMoveUp, Xn as useTerminalFocused, Xr as synthesizeOSCResponse, Xt as Small, Y as encodeTerminalRow, Yi as cursorMoveDown, Yn as usePaste, Yr as snapshotGuest, Yt as P, Z as TimeToFirstDraw, Zi as cursorToRowCol, Zn as InputLayerContext, Zr as Island, Zt as Strong, _ as useEditContext, _n as variantIcon, _r as Console, _t as Tabs, ai as usePanic, an as useSynchronizedPhase, ar as useStderr, at as isGlimmerCell, b as measureElement, bn as TogglePillGroup, br as Link, bt as CommandPalette, c as useDeferredValue, ci as ThemeProvider, cn as fitSegmentLabel, cr as useApp, ct as Diff, d as useActiveScheme, dn as Spinner, dr as useTextInput, dt as Skeleton, ea as fx, ei as createIsland, en as Badge, er as useInputLayerContext, et as GLIMMER_REFERENCE_COLUMNS, f as ReactiveThemeProvider, fn as SearchBar, fr as useHotkey, ft as AnchoredOverlay, g as activeEditTargetRef, gn as variantFillTokens, gr as Screen, gt as TabPanel, h as activeEditContextRef, hn as variantFgToken, hr as useAgNode, ht as TabList, in as usePulse, ir as useFocus, it as glimmerPeriod, j as usePopover, ji as withSource, jn as TextArea, jr as HorizontalVirtualList, jt as NounId, k as HOVER_SHOW_DELAY_MS, ki as withRunners, kn as CursorLine, kr as PaneDivider, kt as Heading, l as useId, ln as leadingUnitLabelCandidates, lr as useRuntime, lt as LineNumber, m as InputBoundary, mn as VARIANT_ICONS, mr as useSignal, mt as Tab, ni as createCellBuffer, nn as SelectList, nr as useFocusWithin, nt as GlimmerText, oi as useExit, on as ProgressBar, or as useStdout, ot as TextShimmer, p as useTea, pn as Button, pr as useHotkeyMap, pt as Tooltip, q as usePositionRegistry, qi as mergeTextOps, qn as getInternalClipboard, qr as MeasuredBox, qt as Muted, rn as Pulse, rr as useFocusable, rt as glimmerCycleLength, si as useInput, sn as Meter, sr as useAppScope, st as AnimatedNumber, ta as collect, ti as Viewport, tn as Table, tr as useFocusManager, tt as GLIMMER_SPAN, u as useTransition$1, un as meterFilledCells, ur as useRawKeyEvent, ut as Accordion, v as createTermEditContext, vn as variantSubtleTokens, vr as useConsole, vt as Breadcrumb, w as HitRegistryContext, wn as PickerList, wr as Fill, wt as ToastContainer, x as render$1, xn as togglePillColor, xr as getModifierState, xt as Alert, y as renderScreenReaderOutput, yi as SilveryErrorBoundary, yn as TogglePill, yr as ErrorBoundary, yt as TreeView, z as Static, zn as useDragState, zr as createHeightModel, zt as H3 } from "./src-BXeTHHlL.mjs";
5
+ import { $ as disableFocusReporting, A as sliceByWidthRange, At as BEL, B as writeTextTruncated, Bt as resetCursorStyle, C as measureText, D as runWithMeasurer, Dt as isPrivateUseArea, E as parseAnsiText, Et as getTerminalFingerprint, F as truncateText, Ft as enableMouse, Gt as setWindowAndIconTitle, H as createTerm, Ht as resetWindowTitle, I as wrapText, Kt as setWindowTitle, Mt as disableKittyKeyboard, N as stripAnsi, Nt as disableMouse, O as sliceByWidth, Ot as textSized, P as truncateAnsi, Pt as enableKittyKeyboard, R as writeLinesToBuffer, Rt as queryKittyKeyboard, S as isZeroWidthGrapheme, T as padText, Ut as setCursorStyle, V as term, Vt as resetMouseCursorShape, W as createConsole, Wt as setMouseCursorShape, _ as isLikelyEmoji, a as displayWidthAnsi, at as parseClipboardResponse, b as isWideGrapheme, ct as disableBracketedPaste, d as graphemeCount, dn as keyToModifiers, dt as isMouseSequence, et as enableFocusReporting, f as graphemeWidth, fn as keyToName, ft as parseMouseSequence, g as isCJK, gn as parseKeypress, h as hasZeroWidthCharacters, hn as parseKey, i as displayWidth, it as createOsc52Backend, j as splitGraphemes, jt as KittyFlags, k as sliceByWidthFromEnd, kt as ANSI, lt as enableBracketedPaste, m as hasWideCharacters, mn as parseHotkey, mt as createOutputPhase, n as constrainText, nt as createCompositeClipboard, o as ensureEmojiPresentation, ot as PASTE_END, p as hasAnsi, pn as matchHotkey, r as createMeasurer, rt as createInternalClipboardBackend, sn as emptyKey, st as PASTE_START, tt as parseFocusEvent, u as getFirstCodePoint, ut as parseBracketedPaste, vt as IncrementalRenderMismatchError, w as normalizeText, wt as detectTextSizingSupport, y as isTextSizingEnabled, z as writeTextToBuffer, zt as reportDirectory } from "./unicode-CxyxVGmB.mjs";
6
+ import { $ as setForegroundColor, G as queryBackgroundColor, H as detectTheme, J as resetBackgroundColor, K as queryCursorColor, N as probeTerminalProfile, Q as setCursorColor, R as pickColorLevel, U as probeColors, V as detectTerminalScheme, W as detectColorScheme, X as resetForegroundColor, Y as resetCursorColor, Z as setBackgroundColor, at as setPaletteColor, c as detectSchemeTheme, ct as deriveTheme, gt as defaultCaps, i as generateTheme, it as queryPaletteColor, j as createTerminalProfile, nt as parsePaletteResponse, p as resolveThemeColor, q as queryForegroundColor, rt as queryMultiplePaletteColors, s as detectScheme, z as quantizeHex } from "./src-B8lf1kiR.mjs";
7
+ import { i as isLayoutEngineInitialized, o as setLayoutEngine } from "./layout-engine-BgR58vL0.mjs";
8
+ import { a as defaultDarkTheme, c as getThemeByName, i as builtinThemes, n as ansi16LightTheme, o as defaultLightTheme, t as ansi16DarkTheme } from "./schemes-DWQPxXAi.mjs";
9
+ import { i as FocusManagerContext, l as TermContext, n as CapabilityRegistryContext, o as RuntimeContext, r as ChainAppContext, s as StderrContext, t as CacheBackendContext } from "./context-CEhuD1R_.mjs";
10
+ import { a as useOnBoxRectCommitted, c as useScreenRect, d as useScrollRectInFlight, l as useScreenRectInFlight, n as useBoxRectDangerously, o as useOnScreenRectCommitted, r as useBoxRectInFlight, s as useOnScrollRectCommitted, t as useBoxRect, u as useScrollRect } from "./useLayout-D5cE8OCI.mjs";
11
+ import { a as useTheme, n as Box, r as ActiveSchemeContext, t as Text } from "./Text-Ci6UCSTL.mjs";
12
+ import { n as renderStringSync, t as renderString } from "./render-string-DtHZP0cU.mjs";
13
+ import { a as deleteKittyImage, c as isKittyGraphicsSupported, d as shallow, f as useTerm, i as isSixelSupported, l as placeKittyImage, o as deleteKittyPlacement, r as encodeSixel, s as encodeKittyImage, t as Image, u as useWindowSize } from "./image-CIF75xMr.mjs";
14
+ import { a as useAnimation, i as useTransition, n as useTimeout, o as easings, r as useInterval, s as resolveEasing, t as useLatest } from "./animation-CZ4x2R7C.mjs";
15
+ import { n as createYogaEngine, r as initYogaEngine, t as YogaLayoutEngine } from "./yoga-adapter-9uab5Qn-.mjs";
16
+ import { n as createFlexilyZeroEngine, t as FlexilyZeroLayoutEngine } from "./flexily-zero-adapter-VoBGHG14.mjs";
17
+ import { n as connectDevTools, r as isDevToolsConnected } from "./devtools-td2AjFwc.mjs";
15
18
  //#region src/index.ts
16
19
  const VERSION = "0.0.1";
17
20
  /**
@@ -66,6 +69,6 @@ function render(element, termOrDef, options) {
66
69
  return render$1(element, termOrDef, options);
67
70
  }
68
71
  //#endregion
69
- export { ANSI, Accordion, ActiveSchemeContext, Alert, AnchoredOverlay, AnimatedNumber, AppScopeContext, BEL, Backdrop, Badge, Badge as Tag, Banner, Blockquote, Box, Breadcrumb, Button, CacheBackendContext, CanvasRenderBuffer, CapabilityRegistryContext, ChainAppContext, Code, CodeBlock, CommandPalette, Console, CursorLine, CursorProvider, DEFAULT_BREAKPOINTS, DOMRenderBuffer, DecMode, Diff, Divider, EditContextDisplay, Em, ErrorBoundary, Fill, FlexilyZeroLayoutEngine as FlexilyLayoutEngine, FocusManagerContext, Form, FormField, GridCell, H1, H2, H3, H4, H5, H6, HIDE_DELAY_MS, HOVER_SHOW_DELAY_MS, HR, Heading, HitRegistry, HitRegistryContext, HorizontalVirtualList, Image, IncrementalRenderMismatchError, InlineAlert, InputBoundary, InputLayerContext, InputLayerProvider, Island, Kbd, KittyFlags, LI, Lead, LineNumber, Link, ListView, MeasuredBox, ModalDialog, Muted, Newline, OL, OSC133, P, PASTE_END, PASTE_START, PasteProvider, PickerDialog, PickerList, PopoverProvider, PositionRegistryProvider, ProgressBar, Prose, Pulse, RadioGroup, ReactiveThemeProvider, RuntimeContext, SCROLLBAR_FADE_AFTER_MS, ScopeContext, ScopeProvider, Screen, ScrollArea, Scrollbar, SearchBar, SearchProvider, SelectList, SilveryErrorBoundary, Skeleton, Small, Spacer, Spinner, SplitView, Static, StderrContext, Strong, Toggle as Switch, Toggle, TERMTEST_SECTIONS, Tab, TabList, TabPanel, Table, Tabs, TermContext, Terminal, Text, TextArea, TextInput, TextReveal, TextShimmer, ThemeProvider, TimeToFirstDraw, ToastContainer, ToastItem, Tooltip, Transform, TreeView, UL, VARIANT_ICONS, VERSION, Viewport, VirtualTerminal, YogaLayoutEngine, Z_INDEX, activeEditContextRef, activeEditTargetRef, ansi16DarkTheme, ansi16LightTheme, applyTextOp, autoEnableInspector, builtinThemes, calcEdgeBasedScrollOffset, checkDoubleClick, clampScroll, collect, computeEnterLeave, computeIndexTrailingSpacer, computeMatchRanges, connectDevTools, constrainText, countVisualLines, createCanvasAdapter, createCompositeClipboard, createConsole, createCopyProvider, createCursorStore, createDOMAdapter, createDoubleClickState, createFlexilyZeroEngine as createFlexilyEngine, createFocusEvent, createFocusManager, createHeightModel, createInputEvents, createInternalClipboardBackend, createKeyEvent, createLeaf, createMeasurer, createMouseEvent, createMouseEventProcessor, createOsc52Backend, createOutputPhase, createPasteEvent, createPipeline, createPositionRegistry, createTerm, createTermEditContext, createTerminalProfile, createWheelEvent, createYogaEngine, cursorMoveDown, cursorMoveUp, cursorToRowCol, defaultCaps, defaultDarkTheme, defaultLightTheme, deleteKittyImage, deleteKittyPlacement, deriveTheme, detectColorScheme, detectKittyFromStdio, detectKittySupport, detectScheme, detectSchemeTheme, detectTerminalScheme, detectTextSizingSupport, detectTheme, disableBracketedPaste, disableFocusReporting, disableInspector, disableKittyKeyboard, disableMouse, dispatchFocusEvent, dispatchKeyEvent, dispatchMouseEvent, displayWidth, displayWidthAnsi, easings, emptyKey, enableBracketedPaste, enableFocusReporting, enableInspector, enableKittyKeyboard, enableMouse, encodeKittyImage, encodeSixel, encodeTerminalRow, ensureEmojiPresentation, findAdjacentPane, findByTestID, findEnclosingScope, findFocusableAncestor, findSpatialTarget, formatTitleWithHotkey, fx, generateTheme, getExplicitFocusLink, getFirstCodePoint, getInternalClipboard, getModifierState, getPaneIds, getTabOrder as getSplitTabOrder, getTabOrder$1 as getTabOrder, getTerminalFingerprint, getThemeByName, getWrappedLines, graphemeCount, graphemeWidth, hasAnsi, hasWideCharacters, hasZeroWidthCharacters, hitTest, initYogaEngine, injectDOMStyles, inspectFrame, inspectTree, invertTextOp, isCJK, isDevToolsConnected, isInspectorEnabled, isKittyGraphicsSupported, isLayoutEngineInitialized, isLikelyEmoji, isMouseSequence, isPrivateUseArea, isSixelSupported, isTTY, isTerm, isTextSizingEnabled, isWideGrapheme, isZeroWidthGrapheme, keyToModifiers, keyToName, lastModifierState, mapChildIndexToItem, matchHotkey, measureElement, measureText, mergeTextOps, moveCursor, normalizeText, notify, notifyITerm2, notifyKitty, padText, parseAnsiText, parseBracketedPaste, parseClipboardResponse, parseFocusEvent, parseHotkey, parseKey, parseKeypress, parseMouseSequence, parsePaletteResponse, pickColorLevel, placeKittyImage, probeColors, probeTerminalProfile, processMouseEvent, quantizeHex, queryBackgroundColor, queryCellSize, queryCursorColor, queryCursorFromStdio, queryCursorPosition, queryDeviceAttributes, queryForegroundColor, queryKittyKeyboard, queryMode, queryModes, queryMultiplePaletteColors, queryPaletteColor, queryPrimaryDA, querySecondaryDA, queryTerminalVersion, queryTertiaryDA, queryTextAreaPixels, queryTextAreaSize, removePane, render, renderScreenReaderOutput, renderStatic, renderString, renderStringSync, renderSync, reportDirectory, resetBackgroundColor, resetCursorColor, resetCursorState, resetCursorStyle, resetForegroundColor, resetHitRegionIdCounter, resetMouseCursorShape, resetScrollRegion, resetWindowTitle, resizeSplit, resolveEasing, resolveNonTTYMode, resolveThemeColor, rowColToCursor, runTermtest, runWithMeasurer, scrollDown, scrollUp, setBackgroundColor, setCursorColor, setCursorStyle, setForegroundColor, setLayoutEngine, setMouseCursorShape, setPaletteColor, setScrollRegion, setWindowAndIconTitle, setWindowTitle, shallow, shouldKeepHeightModelSnapshot, sliceByWidth, sliceByWidthFromEnd, sliceByWidthRange, splitGraphemes, splitPane, stripAnsi, stripAnsi as stripAnsiUnicode, supportsScrollRegions, swapPanes, term, textSized, truncateAnsi, truncateText, useActiveScheme, useAgNode, useTransition as useAnimatedTransition, useAnimation, useApp, useAppScope, useBoxMetrics, useBoxRect, useBoxRectDangerously, useBoxRectInFlight, useColorScheme, useConsole, useCopyModeState, useCursor, useDeferredValue, useDragState, useEditContext, useExit, useFindState, useFocus, useFocusManager, useFocusWithin, useFocusable, useGridPosition, useHitRegion, useHitRegionCallback, useHitRegistry, useHotkey, useHotkeyMap, useHover, useId, useInput, useInputLayer, useInputLayerContext, useInteractiveState, useInterval, useKineticScroll, useLatest, useListItem, useModifierKeys, useMouseCursor, useOnBoxRectCommitted, useOnScreenRectCommitted, useOnScrollRectCommitted, usePanic, usePaste, usePasteEvents, usePopover, usePopoverHandlers, usePositionRegistry, usePulse, useRawKeyEvent, useReadline, useResponsiveBoxProps, useResponsiveValue, useRuntime, useScope, useScopeEffect, useScreenRect, useScreenRectInFlight, useScrollController, useScrollRect, useScrollRectInFlight, useSearch, useSearchOptional, useSelection, useSignal, useStderr, useStdout, useTea, useTerm, useTerminalFocused, useTextArea, useTextInput, useTheme, useTimeout, useToast, useTransition$1 as useTransition, useVirtualizer, useWindowSize, variantFgToken, variantFillTokens, variantIcon, variantSubtleTokens, withCommands, withDiagnostics, withKeybindings, withMeasurer, withRender, wrapText, writeLinesToBuffer, writeTextToBuffer, writeTextTruncated };
72
+ export { ANSI, Accordion, ActiveSchemeContext, Alert, AnchoredOverlay, AnimatedNumber, AppScopeContext, BEL, Backdrop, Badge, Badge as Tag, Banner, Blockquote, Box, Breadcrumb, Button, CacheBackendContext, CanvasRenderBuffer, CapabilityRegistryContext, ChainAppContext, Code, CodeBlock, CommandPalette, Console, CursorLine, CursorProvider, DEFAULT_BREAKPOINTS, DEFAULT_COMPACT_MAX_WIDTH, DOMRenderBuffer, DecMode, Diff, Divider, EditContextDisplay, Em, ErrorBoundary, Fill, FlexilyZeroLayoutEngine as FlexilyLayoutEngine, FocusManagerContext, Form, FormField, GLIMMER_PERIOD_MS, GLIMMER_REFERENCE_COLUMNS, GLIMMER_SPAN, GlimmerText, GridCell, H1, H2, H3, H4, H5, H6, HIDE_DELAY_MS, HOVER_SHOW_DELAY_MS, HR, Heading, HitRegistry, HitRegistryContext, HorizontalVirtualList, Image, IncrementalRenderMismatchError, InlineAlert, InputBoundary, InputLayerContext, InputLayerProvider, Island, Kbd, KittyFlags, LI, Lead, LineNumber, Link, ListView, MeasuredBox, Meter, ModalDialog, ModalOverlay, Muted, Newline, NounId, OL, OSC133, P, PASTE_END, PASTE_START, PaneDivider, PasteProvider, PickerDialog, PickerList, PopoverProvider, PositionRegistryProvider, ProgressBar, Prose, Pulse, RadioGroup, ReactiveThemeProvider, RuntimeContext, SCROLLBAR_FADE_AFTER_MS, ScopeContext, ScopeProvider, Screen, ScrollArea, Scrollbar, SearchBar, SearchProvider, SelectList, SilveryErrorBoundary, Skeleton, Small, Spacer, Spinner, SplitPane, SplitView, Static, StderrContext, Strong, Toggle as Switch, Toggle, TERMTEST_SECTIONS, Tab, TabList, TabPanel, Table, Tabs, TermContext, Terminal, Text, TextArea, TextInput, TextReveal, TextShimmer, ThemeProvider, TimeToFirstDraw, ToastContainer, ToastItem, TogglePill, TogglePillGroup, Tooltip, Transform, TreeView, UL, VARIANT_ICONS, VERSION, Viewport, VirtualTerminal, YogaLayoutEngine, Z_INDEX, activeEditContextRef, activeEditTargetRef, ansi16DarkTheme, ansi16LightTheme, applyTextOp, autoEnableInspector, builtinThemes, calcEdgeBasedScrollOffset, checkDoubleClick, clampScroll, clampSplitPaneRatio, collect, computeEnterLeave, computeIndexTrailingSpacer, computeMatchRanges, connectDevTools, constrainText, countVisualLines, createBaseApp, createCanvasAdapter, createCellBuffer, createCompositeClipboard, createConsole, createCopyProvider, createCursorStore, createDOMAdapter, createDoubleClickState, createFlexilyZeroEngine as createFlexilyEngine, createFocusEvent, createFocusManager, createHeightModel, createInputEvents, createInternalClipboardBackend, createIsland, createKeyEvent, createLeaf, createMeasurer, createMouseEvent, createMouseEventProcessor, createOsc52Backend, createOutputPhase, createPasteEvent, createPipeline, createPositionRegistry, createTerm, createTermEditContext, createTerminalProfile, createWheelEvent, createYogaEngine, cursorMoveDown, cursorMoveUp, cursorToRowCol, defaultCaps, defaultDarkTheme, defaultLightTheme, deleteKittyImage, deleteKittyPlacement, densityForWidth, deriveTheme, detectColorScheme, detectKittyFromStdio, detectKittySupport, detectScheme, detectSchemeTheme, detectTerminalScheme, detectTextSizingSupport, detectTheme, disableBracketedPaste, disableFocusReporting, disableInspector, disableKittyKeyboard, disableMouse, dispatchFocusEvent, dispatchKeyEvent, dispatchMouseEvent, displayWidth, displayWidthAnsi, easings, emptyKey, enableBracketedPaste, enableFocusReporting, enableInspector, enableKittyKeyboard, enableMouse, encodeKittyImage, encodeSixel, encodeTerminalRow, ensureEmojiPresentation, findAdjacentPane, findByTestID, findEnclosingScope, findFocusableAncestor, findSpatialTarget, fitSegmentLabel, formatNounId, formatTitleWithHotkey, fx, generateTheme, getExplicitFocusLink, getFirstCodePoint, getInternalClipboard, getModifierState, getPaneIds, getTabOrder as getSplitTabOrder, getTabOrder$1 as getTabOrder, getTerminalFingerprint, getThemeByName, getWrappedLines, glimmerCycleLength, glimmerPeriod, graphemeCount, graphemeWidth, hasAnsi, hasWideCharacters, hasZeroWidthCharacters, hitTest, initYogaEngine, injectDOMStyles, inspectFrame, inspectTree, invertTextOp, isCJK, isDevToolsConnected, isGlimmerCell, isInspectorEnabled, isKittyGraphicsSupported, isLayoutEngineInitialized, isLikelyEmoji, isMouseSequence, isPrivateUseArea, isSixelSupported, isTTY, isTerm, isTextSizingEnabled, isWideGrapheme, isZeroWidthGrapheme, keyToModifiers, keyToName, lastModifierState, leadingUnitLabelCandidates, mapChildIndexToItem, matchHotkey, measureElement, measureText, mergeTextOps, meterFilledCells, moveCursor, normalizeText, padText, parseAnsiText, parseBracketedPaste, parseClipboardResponse, parseFocusEvent, parseHotkey, parseKey, parseKeypress, parseMouseSequence, parsePaletteResponse, pickColorLevel, pipe, placeKittyImage, probeColors, probeTerminalProfile, processMouseEvent, quantizeHex, queryBackgroundColor, queryCellSize, queryCursorColor, queryCursorFromStdio, queryCursorPosition, queryDeviceAttributes, queryForegroundColor, queryKittyKeyboard, queryMode, queryModes, queryMultiplePaletteColors, queryPaletteColor, queryPrimaryDA, querySecondaryDA, queryTerminalVersion, queryTertiaryDA, queryTextAreaPixels, queryTextAreaSize, removePane, render, renderScreenReaderOutput, renderStatic, renderString, renderStringSync, renderSync, reportDirectory, resetBackgroundColor, resetCursorColor, resetCursorState, resetCursorStyle, resetForegroundColor, resetHitRegionIdCounter, resetMouseCursorShape, resetScrollRegion, resetWindowTitle, resizeSplit, resolveEasing, resolveNonTTYMode, resolveSplitPaneLayout, resolveThemeColor, rowColToCursor, runTermtest, runWithMeasurer, sandbox, scrollDown, scrollUp, setBackgroundColor, setCursorColor, setCursorStyle, setForegroundColor, setLayoutEngine, setMouseCursorShape, setPaletteColor, setScrollRegion, setWindowAndIconTitle, setWindowTitle, shallow, shouldKeepHeightModelSnapshot, sliceByWidth, sliceByWidthFromEnd, sliceByWidthRange, snapshotGuest, splitGraphemes, splitPane, splitPaneRatioAfterDrag, stripAnsi, stripAnsi as stripAnsiUnicode, supportsScrollRegions, swapPanes, synthesizeOSCResponse, term, textSized, togglePillColor, truncateAnsi, truncateText, useActiveScheme, useAgNode, useTransition as useAnimatedTransition, useAnimation, useApp, useAppScope, useBoxRect, useBoxRectDangerously, useBoxRectInFlight, useColorScheme, useConsole, useCopyModeState, useCursor, useDeferredValue, useDragState, useEditContext, useExit, useFindState, useFocus, useFocusManager, useFocusWithin, useFocusable, useGridPosition, useHitRegion, useHitRegionCallback, useHitRegistry, useHotkey, useHotkeyMap, useHover, useId, useInput, useInputLayer, useInputLayerContext, useInteractiveState, useInterval, useKineticScroll, useLatest, useListItem, useModifierKeys, useMouseCursor, useOnBoxRectCommitted, useOnScreenRectCommitted, useOnScrollRectCommitted, usePanic, usePaste, usePasteEvents, usePopover, usePopoverHandlers, usePositionRegistry, usePulse, useRawKeyEvent, useReadline, useResponsiveBoxProps, useResponsiveValue, useRuntime, useScope, useScopeEffect, useScreenRect, useScreenRectInFlight, useScrollController, useScrollRect, useScrollRectInFlight, useSearch, useSearchOptional, useSelection, useSelectionActions, useSignal, useSlice, useStderr, useStdout, useSynchronizedPhase, useTea, useTerm, useTerminalFocused, useTextArea, useTextInput, useTheme, useTimeout, useToast, useTransition$1 as useTransition, useVirtualizer, useWindowSize, variantFgToken, variantFillTokens, variantIcon, variantSubtleTokens, withCommands, withDiagnostics, withKeybindings, withMeasurer, withRender, withRunners, withSlice, withSource, wrapText, writeLinesToBuffer, writeTextToBuffer, writeTextTruncated };
70
73
 
71
74
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["reactRender"],"sources":["../src/index.ts"],"sourcesContent":["// silvery — multi-target rendering framework for React\n// Re-exports from @silvery/* packages\n\nexport const VERSION = \"0.0.1\"\n\n// Re-export everything from @silvery/ag-react — local `render` below shadows the re-exported one\nexport * from \"@silvery/ag-react\"\n\nimport type { ReactElement } from \"react\"\nimport { render as reactRender, type RenderOptions } from \"@silvery/ag-react\"\nimport type { Term } from \"@silvery/ag-react\"\nimport type { TermDef } from \"@silvery/ag-term/term-def\"\n\n/**\n * Render a React element to the terminal.\n *\n * Zero-ceremony entry point — auto-detects the terminal and starts an\n * interactive app when stdin is a TTY. No need to create a Term first.\n *\n * @example Hello World (2 lines)\n * ```tsx\n * import { render, Text } from \"silvery\"\n * await render(<Text>Hello!</Text>).run()\n * ```\n *\n * @example Interactive counter\n * ```tsx\n * import { useState } from \"react\"\n * import { render, Box, Text, useInput } from \"silvery\"\n *\n * function Counter() {\n * const [count, setCount] = useState(0)\n * useInput((input) => {\n * if (input === \"j\") setCount((c) => c + 1)\n * })\n * return (\n * <Box borderStyle=\"round\" padding={1}>\n * <Text>Count: {count}</Text>\n * </Box>\n * )\n * }\n *\n * await render(<Counter />).run()\n * ```\n *\n * @example Static render (explicit)\n * ```tsx\n * import { render, Text } from \"silvery\"\n * await render(<Text>Report</Text>, { width: 120 })\n * ```\n *\n * When called without a Term or TermDef:\n * - **TTY detected** → interactive mode (stdin + stdout auto-wired)\n * - **No TTY** → static mode (renders once and returns)\n *\n * Pass a Term or TermDef explicitly to override auto-detection.\n */\nexport function render(\n element: ReactElement,\n termOrDef?: Term | TermDef,\n options?: RenderOptions,\n): ReturnType<typeof reactRender> {\n // When no term/def is provided and we're in a TTY, auto-wire stdin/stdout\n // so the app runs interactively (useInput works, app stays alive until exit).\n if (!termOrDef && process.stdin?.isTTY && process.stdout?.isTTY) {\n const ttyDef: TermDef = {\n stdin: process.stdin,\n stdout: process.stdout,\n }\n return reactRender(element, ttyDef, options)\n }\n return reactRender(element, termOrDef, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDvB,SAAgB,OACd,SACA,WACA,SACgC;AAGhC,KAAI,CAAC,aAAa,QAAQ,OAAO,SAAS,QAAQ,QAAQ,MAKxD,QAAOA,SAAY,SAJK;EACtB,OAAO,QAAQ;EACf,QAAQ,QAAQ;EACjB,EACmC,QAAQ;AAE9C,QAAOA,SAAY,SAAS,WAAW,QAAQ"}
1
+ {"version":3,"file":"index.mjs","names":["reactRender"],"sources":["../src/index.ts"],"sourcesContent":["// silvery — multi-target rendering framework for React\n// Re-exports from @silvery/* packages\n\nexport const VERSION = \"0.0.1\"\n\n// Curated app-composition surface. @silvery/create remains internal; keep\n// legacy tea()/definePlugin/createSlice out of the public umbrella.\nexport { createBaseApp, pipe, useSlice, withRunners, withSlice, withSource } from \"@silvery/create\"\nexport type {\n BaseApp,\n EffectRunnerMap,\n PumpScope,\n SliceHandle,\n SliceHandler,\n SliceHandlers,\n SliceResult,\n SourceApp,\n SourceInput,\n SourcePump,\n WithSliceSpec,\n} from \"@silvery/create\"\nexport type Effect = import(\"@silvery/create/types\").Effect\nexport type Op = import(\"@silvery/create/types\").Op\n\n// Target-neutral notification domain. The terminal implementation currently\n// lives in @silvery/ag-term; a future DOM target implements this same shape.\nexport type {\n NotificationAction,\n NotificationActivation,\n NotificationDelivery,\n NotificationRequest,\n NotificationTarget,\n NotificationUnsupportedReason,\n NotificationUrgency,\n} from \"@silvery/ag-term\"\n\n// Re-export everything from @silvery/ag-react — local `render` below shadows the re-exported one\nexport * from \"@silvery/ag-react\"\n\nimport type { ReactElement } from \"react\"\nimport { render as reactRender, type RenderOptions } from \"@silvery/ag-react\"\nimport type { Term } from \"@silvery/ag-react\"\nimport type { TermDef } from \"@silvery/ag-term/term-def\"\n\n/**\n * Render a React element to the terminal.\n *\n * Zero-ceremony entry point — auto-detects the terminal and starts an\n * interactive app when stdin is a TTY. No need to create a Term first.\n *\n * @example Hello World (2 lines)\n * ```tsx\n * import { render, Text } from \"silvery\"\n * await render(<Text>Hello!</Text>).run()\n * ```\n *\n * @example Interactive counter\n * ```tsx\n * import { useState } from \"react\"\n * import { render, Box, Text, useInput } from \"silvery\"\n *\n * function Counter() {\n * const [count, setCount] = useState(0)\n * useInput((input) => {\n * if (input === \"j\") setCount((c) => c + 1)\n * })\n * return (\n * <Box borderStyle=\"round\" padding={1}>\n * <Text>Count: {count}</Text>\n * </Box>\n * )\n * }\n *\n * await render(<Counter />).run()\n * ```\n *\n * @example Static render (explicit)\n * ```tsx\n * import { render, Text } from \"silvery\"\n * await render(<Text>Report</Text>, { width: 120 })\n * ```\n *\n * When called without a Term or TermDef:\n * - **TTY detected** → interactive mode (stdin + stdout auto-wired)\n * - **No TTY** → static mode (renders once and returns)\n *\n * Pass a Term or TermDef explicitly to override auto-detection.\n */\nexport function render(\n element: ReactElement,\n termOrDef?: Term | TermDef,\n options?: RenderOptions,\n): ReturnType<typeof reactRender> {\n // When no term/def is provided and we're in a TTY, auto-wire stdin/stdout\n // so the app runs interactively (useInput works, app stays alive until exit).\n if (!termOrDef && process.stdin?.isTTY && process.stdout?.isTTY) {\n const ttyDef: TermDef = {\n stdin: process.stdin,\n stdout: process.stdout,\n }\n return reactRender(element, ttyDef, options)\n }\n return reactRender(element, termOrDef, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA,MAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFvB,SAAgB,OACd,SACA,WACA,SACgC;AAGhC,KAAI,CAAC,aAAa,QAAQ,OAAO,SAAS,QAAQ,QAAQ,MAKxD,QAAOA,SAAY,SAJK;EACtB,OAAO,QAAQ;EACf,QAAQ,QAAQ;EACjB,EACmC,QAAQ;AAE9C,QAAOA,SAAY,SAAS,WAAW,QAAQ"}
@@ -54,14 +54,14 @@ function requireCapability(name, consumer) {
54
54
  async function ensureDefaultLayoutEngine(engineType) {
55
55
  if (isLayoutEngineInitialized()) return;
56
56
  if ((engineType ?? process.env.SILVERY_ENGINE?.toLowerCase() ?? "flexily") === "yoga") {
57
- const { initYogaEngine } = await import("./yoga-adapter-DxgsQ_gg.mjs");
57
+ const { initYogaEngine } = await import("./yoga-adapter-yqTl1aXK.mjs");
58
58
  setLayoutEngine(await initYogaEngine());
59
59
  } else {
60
- const { createFlexilyZeroEngine } = await import("./flexily-zero-adapter-C4lW_Ov5.mjs");
60
+ const { createFlexilyZeroEngine } = await import("./flexily-zero-adapter-DktX3HsX.mjs");
61
61
  setLayoutEngine(createFlexilyZeroEngine());
62
62
  }
63
63
  }
64
64
  //#endregion
65
65
  export { requireCapability as a, isLayoutEngineInitialized as i, getConstants as n, setLayoutEngine as o, getLayoutEngine as r, ensureDefaultLayoutEngine as t };
66
66
 
67
- //# sourceMappingURL=layout-engine-C2px0RJE.mjs.map
67
+ //# sourceMappingURL=layout-engine-BgR58vL0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout-engine-C2px0RJE.mjs","names":[],"sources":["../packages/ag-term/src/layout-engine.ts"],"sourcesContent":["/**\n * Layout Engine Abstraction\n *\n * Provides a pluggable interface for layout engines (Yoga, Flexily, etc.)\n * This allows silvery to use different layout backends without code changes.\n *\n * Core type interfaces (LayoutNode, MeasureFunc, MeasureMode) live in\n * @silvery/ag/layout-types. This file contains the runtime engine management.\n */\n\nimport type { LayoutNode } from \"@silvery/ag/layout-types\"\n\n// ============================================================================\n// Branded Types for Type Safety\n// ============================================================================\n\n/**\n * Branded types prevent accidentally mixing up layout constant categories.\n * E.g., you can't pass an AlignValue where a FlexDirectionValue is expected.\n */\nexport type FlexDirectionValue = number & { readonly __brand: \"FlexDirection\" }\nexport type WrapValue = number & { readonly __brand: \"Wrap\" }\nexport type AlignValue = number & { readonly __brand: \"Align\" }\nexport type JustifyValue = number & { readonly __brand: \"Justify\" }\nexport type EdgeValue = number & { readonly __brand: \"Edge\" }\nexport type GutterValue = number & { readonly __brand: \"Gutter\" }\nexport type DisplayValue = number & { readonly __brand: \"Display\" }\nexport type PositionTypeValue = number & { readonly __brand: \"PositionType\" }\nexport type OverflowValue = number & { readonly __brand: \"Overflow\" }\nexport type DirectionValue = number & { readonly __brand: \"Direction\" }\nexport type MeasureModeValue = number & { readonly __brand: \"MeasureMode\" }\n\n// ============================================================================\n// Layout Constants Interface\n// ============================================================================\n\n/**\n * Constants for layout configuration.\n * These are the same across Yoga and Flexily.\n * Uses branded types for compile-time safety.\n */\nexport interface LayoutConstants {\n // Flex Direction\n FLEX_DIRECTION_COLUMN: FlexDirectionValue\n FLEX_DIRECTION_COLUMN_REVERSE: FlexDirectionValue\n FLEX_DIRECTION_ROW: FlexDirectionValue\n FLEX_DIRECTION_ROW_REVERSE: FlexDirectionValue\n\n // Wrap\n WRAP_NO_WRAP: WrapValue\n WRAP_WRAP: WrapValue\n WRAP_WRAP_REVERSE: WrapValue\n\n // Align\n ALIGN_AUTO: AlignValue\n ALIGN_FLEX_START: AlignValue\n ALIGN_CENTER: AlignValue\n ALIGN_FLEX_END: AlignValue\n ALIGN_STRETCH: AlignValue\n ALIGN_BASELINE: AlignValue\n ALIGN_SPACE_BETWEEN: AlignValue\n ALIGN_SPACE_AROUND: AlignValue\n ALIGN_SPACE_EVENLY: AlignValue\n\n // Justify\n JUSTIFY_FLEX_START: JustifyValue\n JUSTIFY_CENTER: JustifyValue\n JUSTIFY_FLEX_END: JustifyValue\n JUSTIFY_SPACE_BETWEEN: JustifyValue\n JUSTIFY_SPACE_AROUND: JustifyValue\n JUSTIFY_SPACE_EVENLY: JustifyValue\n\n // Edge\n EDGE_LEFT: EdgeValue\n EDGE_TOP: EdgeValue\n EDGE_RIGHT: EdgeValue\n EDGE_BOTTOM: EdgeValue\n EDGE_HORIZONTAL: EdgeValue\n EDGE_VERTICAL: EdgeValue\n EDGE_ALL: EdgeValue\n\n // Gutter\n GUTTER_COLUMN: GutterValue\n GUTTER_ROW: GutterValue\n GUTTER_ALL: GutterValue\n\n // Display\n DISPLAY_FLEX: DisplayValue\n DISPLAY_NONE: DisplayValue\n\n // Position Type\n POSITION_TYPE_STATIC: PositionTypeValue\n POSITION_TYPE_RELATIVE: PositionTypeValue\n POSITION_TYPE_ABSOLUTE: PositionTypeValue\n\n // Overflow\n OVERFLOW_VISIBLE: OverflowValue\n OVERFLOW_HIDDEN: OverflowValue\n OVERFLOW_SCROLL: OverflowValue\n\n // Direction\n DIRECTION_LTR: DirectionValue\n\n // Measure Mode\n MEASURE_MODE_UNDEFINED: MeasureModeValue\n MEASURE_MODE_EXACTLY: MeasureModeValue\n MEASURE_MODE_AT_MOST: MeasureModeValue\n}\n\n// ============================================================================\n// Engine Capabilities (Phase A0.0.5 of @km/silvery/responsive-layout-architecture-reframe)\n// ============================================================================\n\n/**\n * Declares which engine-native primitives a `LayoutEngine` supports.\n *\n * silvery is engine-pluggable — `flexily` (pure JS) and `yoga` (WASM) ship as peer\n * adapters. The responsive-layout reframe (Phase A0.1+) adds engine-native container\n * queries, fitWidth, size containment, cq* units, and CSS math functions. These\n * primitives can only be implemented in `flexily` (yoga's WASM boundary doesn't expose\n * inter-pass child-style mutation).\n *\n * Each adapter declares which capabilities it supports. Consumers (`<Box fitWidth>`,\n * `<Box containerQueries>`, etc.) gate on capability presence via `requireCapability()`\n * — under yoga, those primitives THROW at first paint with a one-line fix instruction\n * (switch via `SILVERY_ENGINE=flexily`).\n */\nexport interface EngineCapabilities {\n /** Container queries: `<Box containerQueries={...}>` + `containerType` / `containerName` */\n readonly containerQueries: boolean\n /** Size containment: `<Box containSize>` */\n readonly containSize: boolean\n /** Container-query units in style values: `cqi`, `cqmin`, `cqb`, `cqmax` */\n readonly containerQueryUnits: boolean\n /** fitWidth Box prop: `<Box fitWidth={[80, 120, \"100cqi\"]}>` */\n readonly fitWidth: boolean\n /** CSS math functions in style values: `min()`, `max()`, `clamp()` */\n readonly styleMathFunctions: boolean\n /** Inter-pass child-style mutation hook (underlying mechanism for CQ + fitWidth) */\n readonly childStyleMutation: boolean\n}\n\n// ============================================================================\n// Layout Engine Interface\n// ============================================================================\n\n/**\n * Abstract layout engine interface.\n * Implementations can wrap Yoga, Flexily, or other layout engines.\n */\nexport interface LayoutEngine {\n /** Create a new layout node */\n createNode(): LayoutNode\n\n /** Layout constants for this engine */\n readonly constants: LayoutConstants\n\n /** Engine name for debugging */\n readonly name: string\n\n /** Which engine-native primitives this adapter supports (Phase A0.0.5+). */\n readonly capabilities: EngineCapabilities\n}\n\n// ============================================================================\n// Global Layout Engine Management\n// ============================================================================\n\nlet layoutEngine: LayoutEngine | null = null\n\n/**\n * Set the global layout engine instance.\n * Must be called before rendering.\n */\nexport function setLayoutEngine(engine: LayoutEngine): void {\n layoutEngine = engine\n}\n\n/**\n * Get the global layout engine instance.\n * Throws if not initialized.\n */\nexport function getLayoutEngine(): LayoutEngine {\n if (!layoutEngine) {\n throw new Error(\n \"Layout engine not initialized. Call setLayoutEngine() or initYoga()/initFlexily() first.\",\n )\n }\n return layoutEngine\n}\n\n/**\n * Check if a layout engine is initialized.\n */\nexport function isLayoutEngineInitialized(): boolean {\n return layoutEngine !== null\n}\n\n/**\n * Get the layout constants from the current engine.\n * Convenience function for accessing constants.\n */\nexport function getConstants(): LayoutConstants {\n return getLayoutEngine().constants\n}\n\n/**\n * Runtime guard: throws if the active layout engine doesn't advertise the named capability.\n *\n * Used by Phase A0.1+ primitives (`<Box fitWidth>`, `<Box containerQueries>`, cq* units,\n * style math functions) at their first-paint resolution path. Under `yoga` (or pre-A0.1\n * flexily), the throw happens at first paint with a one-line fix instruction in the error\n * message. No silent fallback — silent fallback under yoga would look like a fresh render\n * bug and cost hours of debugging.\n *\n * @param name The capability key being checked (e.g. `\"fitWidth\"`, `\"containerQueries\"`).\n * @param consumer A human-readable label for the call site, e.g. `\"<Box fitWidth>\"` or\n * `\"cqi unit in 'padding'\"`. Surfaces in the error message.\n */\nexport function requireCapability(name: keyof EngineCapabilities, consumer: string): void {\n const engine = getLayoutEngine()\n if (!engine.capabilities[name]) {\n throw new Error(\n `${consumer} requires layout engine capability \"${name}\" — current engine \"${engine.name}\" doesn't support it. ` +\n `Switch to flexily: set SILVERY_ENGINE=flexily, OR call ensureDefaultLayoutEngine(\"flexily\") before render.`,\n )\n }\n}\n\n// ============================================================================\n// Default Engine Initialization\n// ============================================================================\n\n/**\n * Layout engine type for configuration.\n *\n * - 'flexily': Zero-allocation Flexily (default, optimized for high-frequency layout)\n * - 'flexily-classic': Classic Flexily algorithm (for debugging/compatibility)\n * - 'yoga': Facebook's WASM-based flexbox (most mature)\n */\nexport type LayoutEngineType = \"flexily\" | \"yoga\"\n\n/**\n * Initialize the layout engine if not already set.\n *\n * @param engineType - 'flexily', 'flexily-classic', or 'yoga'. If not provided, checks\n * SILVERY_ENGINE env var, then defaults to 'flexily'.\n */\nexport async function ensureDefaultLayoutEngine(engineType?: LayoutEngineType): Promise<void> {\n if (isLayoutEngineInitialized()) {\n return\n }\n\n // Resolve engine type: option → env → 'flexily'\n const resolved =\n engineType ?? (process.env.SILVERY_ENGINE?.toLowerCase() as LayoutEngineType) ?? \"flexily\"\n\n if (resolved === \"yoga\") {\n const { initYogaEngine } = await import(\"./adapters/yoga-adapter.js\")\n setLayoutEngine(await initYogaEngine())\n } else {\n // 'flexily' (default) uses zero-allocation engine with CSS-correct defaults\n const { createFlexilyZeroEngine } = await import(\"./adapters/flexily-zero-adapter.js\")\n setLayoutEngine(createFlexilyZeroEngine())\n }\n}\n"],"mappings":";AAwKA,IAAI,eAAoC;;;;;AAMxC,SAAgB,gBAAgB,QAA4B;AAC1D,gBAAe;;;;;;AAOjB,SAAgB,kBAAgC;AAC9C,KAAI,CAAC,aACH,OAAM,IAAI,MACR,2FACD;AAEH,QAAO;;;;;AAMT,SAAgB,4BAAqC;AACnD,QAAO,iBAAiB;;;;;;AAO1B,SAAgB,eAAgC;AAC9C,QAAO,iBAAiB,CAAC;;;;;;;;;;;;;;;AAgB3B,SAAgB,kBAAkB,MAAgC,UAAwB;CACxF,MAAM,SAAS,iBAAiB;AAChC,KAAI,CAAC,OAAO,aAAa,MACvB,OAAM,IAAI,MACR,GAAG,SAAS,sCAAsC,KAAK,sBAAsB,OAAO,KAAK,kIAE1F;;;;;;;;AAuBL,eAAsB,0BAA0B,YAA8C;AAC5F,KAAI,2BAA2B,CAC7B;AAOF,MAFE,cAAe,QAAQ,IAAI,gBAAgB,aAAa,IAAyB,eAElE,QAAQ;EACvB,MAAM,EAAE,mBAAmB,MAAM,OAAO;AACxC,kBAAgB,MAAM,gBAAgB,CAAC;QAClC;EAEL,MAAM,EAAE,4BAA4B,MAAM,OAAO;AACjD,kBAAgB,yBAAyB,CAAC"}
1
+ {"version":3,"file":"layout-engine-BgR58vL0.mjs","names":[],"sources":["../packages/ag-term/src/layout-engine.ts"],"sourcesContent":["/**\n * Layout Engine Abstraction\n *\n * Provides a pluggable interface for layout engines (Yoga, Flexily, etc.)\n * This allows silvery to use different layout backends without code changes.\n *\n * Core type interfaces (LayoutNode, MeasureFunc, MeasureMode) live in\n * @silvery/ag/layout-types. This file contains the runtime engine management.\n */\n\nimport type { LayoutNode } from \"@silvery/ag/layout-types\"\n\n// ============================================================================\n// Branded Types for Type Safety\n// ============================================================================\n\n/**\n * Branded types prevent accidentally mixing up layout constant categories.\n * E.g., you can't pass an AlignValue where a FlexDirectionValue is expected.\n */\nexport type FlexDirectionValue = number & { readonly __brand: \"FlexDirection\" }\nexport type WrapValue = number & { readonly __brand: \"Wrap\" }\nexport type AlignValue = number & { readonly __brand: \"Align\" }\nexport type JustifyValue = number & { readonly __brand: \"Justify\" }\nexport type EdgeValue = number & { readonly __brand: \"Edge\" }\nexport type GutterValue = number & { readonly __brand: \"Gutter\" }\nexport type DisplayValue = number & { readonly __brand: \"Display\" }\nexport type PositionTypeValue = number & { readonly __brand: \"PositionType\" }\nexport type OverflowValue = number & { readonly __brand: \"Overflow\" }\nexport type DirectionValue = number & { readonly __brand: \"Direction\" }\nexport type MeasureModeValue = number & { readonly __brand: \"MeasureMode\" }\n\n// ============================================================================\n// Layout Constants Interface\n// ============================================================================\n\n/**\n * Constants for layout configuration.\n * These are the same across Yoga and Flexily.\n * Uses branded types for compile-time safety.\n */\nexport interface LayoutConstants {\n // Flex Direction\n FLEX_DIRECTION_COLUMN: FlexDirectionValue\n FLEX_DIRECTION_COLUMN_REVERSE: FlexDirectionValue\n FLEX_DIRECTION_ROW: FlexDirectionValue\n FLEX_DIRECTION_ROW_REVERSE: FlexDirectionValue\n\n // Wrap\n WRAP_NO_WRAP: WrapValue\n WRAP_WRAP: WrapValue\n WRAP_WRAP_REVERSE: WrapValue\n\n // Align\n ALIGN_AUTO: AlignValue\n ALIGN_FLEX_START: AlignValue\n ALIGN_CENTER: AlignValue\n ALIGN_FLEX_END: AlignValue\n ALIGN_STRETCH: AlignValue\n ALIGN_BASELINE: AlignValue\n ALIGN_SPACE_BETWEEN: AlignValue\n ALIGN_SPACE_AROUND: AlignValue\n ALIGN_SPACE_EVENLY: AlignValue\n\n // Justify\n JUSTIFY_FLEX_START: JustifyValue\n JUSTIFY_CENTER: JustifyValue\n JUSTIFY_FLEX_END: JustifyValue\n JUSTIFY_SPACE_BETWEEN: JustifyValue\n JUSTIFY_SPACE_AROUND: JustifyValue\n JUSTIFY_SPACE_EVENLY: JustifyValue\n\n // Edge\n EDGE_LEFT: EdgeValue\n EDGE_TOP: EdgeValue\n EDGE_RIGHT: EdgeValue\n EDGE_BOTTOM: EdgeValue\n EDGE_HORIZONTAL: EdgeValue\n EDGE_VERTICAL: EdgeValue\n EDGE_ALL: EdgeValue\n\n // Gutter\n GUTTER_COLUMN: GutterValue\n GUTTER_ROW: GutterValue\n GUTTER_ALL: GutterValue\n\n // Display\n DISPLAY_FLEX: DisplayValue\n DISPLAY_NONE: DisplayValue\n\n // Position Type\n POSITION_TYPE_STATIC: PositionTypeValue\n POSITION_TYPE_RELATIVE: PositionTypeValue\n POSITION_TYPE_ABSOLUTE: PositionTypeValue\n\n // Overflow\n OVERFLOW_VISIBLE: OverflowValue\n OVERFLOW_HIDDEN: OverflowValue\n OVERFLOW_SCROLL: OverflowValue\n\n // Direction\n DIRECTION_LTR: DirectionValue\n\n // Measure Mode\n MEASURE_MODE_UNDEFINED: MeasureModeValue\n MEASURE_MODE_EXACTLY: MeasureModeValue\n MEASURE_MODE_AT_MOST: MeasureModeValue\n}\n\n// ============================================================================\n// Engine Capabilities (Phase A0.0.5 of @km/silvery/responsive-layout-architecture-reframe)\n// ============================================================================\n\n/**\n * Declares which engine-native primitives a `LayoutEngine` supports.\n *\n * silvery is engine-pluggable — `flexily` (pure JS) and `yoga` (WASM) ship as peer\n * adapters. The responsive-layout reframe (Phase A0.1+) adds engine-native container\n * queries, fitWidth, size containment, cq* units, and CSS math functions. These\n * primitives can only be implemented in `flexily` (yoga's WASM boundary doesn't expose\n * inter-pass child-style mutation).\n *\n * Each adapter declares which capabilities it supports. Consumers (`<Box fitWidth>`,\n * `<Box containerQueries>`, etc.) gate on capability presence via `requireCapability()`\n * — under yoga, those primitives THROW at first paint with a one-line fix instruction\n * (switch via `SILVERY_ENGINE=flexily`).\n */\nexport interface EngineCapabilities {\n /** Container queries: `<Box containerQueries={...}>` + `containerType` / `containerName` */\n readonly containerQueries: boolean\n /** Size containment: `<Box containSize>` */\n readonly containSize: boolean\n /** Container-query units in style values: `cqi`, `cqmin`, `cqb`, `cqmax` */\n readonly containerQueryUnits: boolean\n /** fitWidth Box prop: `<Box fitWidth={[80, 120, \"100cqi\"]}>` */\n readonly fitWidth: boolean\n /** CSS math functions in style values: `min()`, `max()`, `clamp()` */\n readonly styleMathFunctions: boolean\n /** Inter-pass child-style mutation hook (underlying mechanism for CQ + fitWidth) */\n readonly childStyleMutation: boolean\n}\n\n// ============================================================================\n// Layout Engine Interface\n// ============================================================================\n\n/**\n * Abstract layout engine interface.\n * Implementations can wrap Yoga, Flexily, or other layout engines.\n */\nexport interface LayoutEngine {\n /** Create a new layout node */\n createNode(): LayoutNode\n\n /** Layout constants for this engine */\n readonly constants: LayoutConstants\n\n /** Engine name for debugging */\n readonly name: string\n\n /** Which engine-native primitives this adapter supports (Phase A0.0.5+). */\n readonly capabilities: EngineCapabilities\n}\n\n// ============================================================================\n// Global Layout Engine Management\n// ============================================================================\n\nlet layoutEngine: LayoutEngine | null = null\n\n/**\n * Set the global layout engine instance.\n * Must be called before rendering.\n */\nexport function setLayoutEngine(engine: LayoutEngine): void {\n layoutEngine = engine\n}\n\n/**\n * Get the global layout engine instance.\n * Throws if not initialized.\n */\nexport function getLayoutEngine(): LayoutEngine {\n if (!layoutEngine) {\n throw new Error(\n \"Layout engine not initialized. Call setLayoutEngine() or initYoga()/initFlexily() first.\",\n )\n }\n return layoutEngine\n}\n\n/**\n * Check if a layout engine is initialized.\n */\nexport function isLayoutEngineInitialized(): boolean {\n return layoutEngine !== null\n}\n\n/**\n * Get the layout constants from the current engine.\n * Convenience function for accessing constants.\n */\nexport function getConstants(): LayoutConstants {\n return getLayoutEngine().constants\n}\n\n/**\n * Runtime guard: throws if the active layout engine doesn't advertise the named capability.\n *\n * Used by Phase A0.1+ primitives (`<Box fitWidth>`, `<Box containerQueries>`, cq* units,\n * style math functions) at their first-paint resolution path. Under `yoga` (or pre-A0.1\n * flexily), the throw happens at first paint with a one-line fix instruction in the error\n * message. No silent fallback — silent fallback under yoga would look like a fresh render\n * bug and cost hours of debugging.\n *\n * @param name The capability key being checked (e.g. `\"fitWidth\"`, `\"containerQueries\"`).\n * @param consumer A human-readable label for the call site, e.g. `\"<Box fitWidth>\"` or\n * `\"cqi unit in 'padding'\"`. Surfaces in the error message.\n */\nexport function requireCapability(name: keyof EngineCapabilities, consumer: string): void {\n const engine = getLayoutEngine()\n if (!engine.capabilities[name]) {\n throw new Error(\n `${consumer} requires layout engine capability \"${name}\" — current engine \"${engine.name}\" doesn't support it. ` +\n `Switch to flexily: set SILVERY_ENGINE=flexily, OR call ensureDefaultLayoutEngine(\"flexily\") before render.`,\n )\n }\n}\n\n// ============================================================================\n// Default Engine Initialization\n// ============================================================================\n\n/**\n * Layout engine type for configuration.\n *\n * - 'flexily': Zero-allocation Flexily (default, optimized for high-frequency layout)\n * - 'flexily-classic': Classic Flexily algorithm (for debugging/compatibility)\n * - 'yoga': Facebook's WASM-based flexbox (most mature)\n */\nexport type LayoutEngineType = \"flexily\" | \"yoga\"\n\n/**\n * Initialize the layout engine if not already set.\n *\n * @param engineType - 'flexily', 'flexily-classic', or 'yoga'. If not provided, checks\n * SILVERY_ENGINE env var, then defaults to 'flexily'.\n */\nexport async function ensureDefaultLayoutEngine(engineType?: LayoutEngineType): Promise<void> {\n if (isLayoutEngineInitialized()) {\n return\n }\n\n // Resolve engine type: option → env → 'flexily'\n const resolved =\n engineType ?? (process.env.SILVERY_ENGINE?.toLowerCase() as LayoutEngineType) ?? \"flexily\"\n\n if (resolved === \"yoga\") {\n const { initYogaEngine } = await import(\"./adapters/yoga-adapter.js\")\n setLayoutEngine(await initYogaEngine())\n } else {\n // 'flexily' (default) uses zero-allocation engine with CSS-correct defaults\n const { createFlexilyZeroEngine } = await import(\"./adapters/flexily-zero-adapter.js\")\n setLayoutEngine(createFlexilyZeroEngine())\n }\n}\n"],"mappings":";AAwKA,IAAI,eAAoC;;;;;AAMxC,SAAgB,gBAAgB,QAA4B;AAC1D,gBAAe;;;;;;AAOjB,SAAgB,kBAAgC;AAC9C,KAAI,CAAC,aACH,OAAM,IAAI,MACR,2FACD;AAEH,QAAO;;;;;AAMT,SAAgB,4BAAqC;AACnD,QAAO,iBAAiB;;;;;;AAO1B,SAAgB,eAAgC;AAC9C,QAAO,iBAAiB,CAAC;;;;;;;;;;;;;;;AAgB3B,SAAgB,kBAAkB,MAAgC,UAAwB;CACxF,MAAM,SAAS,iBAAiB;AAChC,KAAI,CAAC,OAAO,aAAa,MACvB,OAAM,IAAI,MACR,GAAG,SAAS,sCAAsC,KAAK,sBAAsB,OAAO,KAAK,kIAE1F;;;;;;;;AAuBL,eAAsB,0BAA0B,YAA8C;AAC5F,KAAI,2BAA2B,CAC7B;AAOF,MAFE,cAAe,QAAQ,IAAI,gBAAgB,aAAa,IAAyB,eAElE,QAAQ;EACvB,MAAM,EAAE,mBAAmB,MAAM,OAAO;AACxC,kBAAgB,MAAM,gBAAgB,CAAC;QAClC;EAEL,MAAM,EAAE,4BAA4B,MAAM,OAAO;AACjD,kBAAgB,yBAAyB,CAAC"}
@@ -1,2 +1,2 @@
1
- import { t as ensureDefaultLayoutEngine } from "./layout-engine-C2px0RJE.mjs";
1
+ import { t as ensureDefaultLayoutEngine } from "./layout-engine-BgR58vL0.mjs";
2
2
  export { ensureDefaultLayoutEngine };
@@ -1,4 +1,4 @@
1
- import { i as signal } from "./src-DKp-_OFG.mjs";
1
+ import { i as signal } from "./src-BqeBFB3X.mjs";
2
2
  //#region packages/ag/src/types.ts
3
3
  /**
4
4
  * Check if two rects are equal (same position and size).
@@ -321,6 +321,7 @@ function getLayoutSignals(node) {
321
321
  selectionFragments: signal(computeSelectionFragments(node)),
322
322
  scrollState: signal(snapshotScrollState(node)),
323
323
  anchorRect: signal(computeAnchorRect(node)),
324
+ parkRect: signal(computeParkRect(node)),
324
325
  decorationRects: signal(EMPTY_DECORATION_RECTS),
325
326
  textContent: signal(node.textContent),
326
327
  focused: signal(node.interactiveState?.focused ?? false)
@@ -451,6 +452,55 @@ function computeAnchorRect(node) {
451
452
  return computeContentRect(node);
452
453
  }
453
454
  /**
455
+ * Compute the absolute HARDWARE-PARK rect for a node from its `parkOffset` prop
456
+ * and current `contentRect`. The park rect is the 1×1 cell where a managed
457
+ * terminal frame parks (then hides) the hardware cursor when this node owns the
458
+ * frame — position-only (the visible caret is `cursorOffset`/`computeCursorRect`'s
459
+ * job, so `visible`/`shape` on the offset are ignored here).
460
+ *
461
+ * UNLIKE `computeCursorRect`, this is consumed **non-focus-gated** (see
462
+ * `findActiveParkRect`): an editable declares its input cell whether or not it
463
+ * is focused, so a managed frame ALWAYS has a benign park cell and never falls
464
+ * back to the box origin or home (@km/code/v0.2/19702). Mirrors
465
+ * `computeAnchorRect`'s content-origin delegation.
466
+ *
467
+ * Returns null when the node has no `parkOffset` prop or `contentRect` is
468
+ * unavailable (pre-layout / clipped to zero size).
469
+ */
470
+ function computeParkRect(node) {
471
+ const offset = node.props?.parkOffset;
472
+ if (!offset) return null;
473
+ const content = computeContentRect(node);
474
+ if (!content) return null;
475
+ return {
476
+ x: content.x + offset.col,
477
+ y: content.y + offset.row,
478
+ width: 1,
479
+ height: 1
480
+ };
481
+ }
482
+ /**
483
+ * Walk the tree and return the deepest declared hardware-park rect, or null when
484
+ * no node declares `parkOffset`. Post-order deepest-wins (mirrors `findAnchor`),
485
+ * and deliberately **non-focus-gated and non-visibility-gated** — the park
486
+ * target exists regardless of focus so `managedCursorSuffix` always has a benign
487
+ * cell to park the hardware cursor at, never the box origin / `home(0,0)`
488
+ * (@km/code/v0.2/19702). Signal-or-compute per node so it works before signals
489
+ * are allocated (first frame after mount).
490
+ */
491
+ function findActiveParkRect(root) {
492
+ let result = null;
493
+ function walk(node) {
494
+ for (const child of node.children) walk(child);
495
+ if (!node.props?.parkOffset) return;
496
+ const s = signalMap.get(node);
497
+ const rect = s ? s.parkRect() : computeParkRect(node);
498
+ if (rect) result = rect;
499
+ }
500
+ walk(root);
501
+ return result;
502
+ }
503
+ /**
454
504
  * Walk the tree and find the rect for an anchor by id. Returns `null` when
455
505
  * no Box declares `anchorRef` with a matching id, or when the matching Box's
456
506
  * `contentRect` is unavailable this frame (pre-layout / clipped).
@@ -827,6 +877,8 @@ function syncRectSignals(node) {
827
877
  if (!selectionFragmentsEqual(nextFragments, s.selectionFragments())) s.selectionFragments(nextFragments);
828
878
  const nextAnchorRect = computeAnchorRect(node);
829
879
  if (!rectEqual$1(nextAnchorRect, s.anchorRect())) s.anchorRect(nextAnchorRect);
880
+ const nextParkRect = computeParkRect(node);
881
+ if (!rectEqual$1(nextParkRect, s.parkRect())) s.parkRect(nextParkRect);
830
882
  const nextScrollState = snapshotScrollState(node);
831
883
  if (!scrollStateEqual(nextScrollState, s.scrollState())) s.scrollState(nextScrollState);
832
884
  }
@@ -881,39 +933,61 @@ function syncDecorationRects(root) {
881
933
  * (i.e. nodes with at least one consumer); a tree with no rect subscribers
882
934
  * pays only the WeakMap probe per node.
883
935
  *
936
+ * **Return value**: `true` when the commit promoted at least one committed
937
+ * rect signal — i.e. it fired at least one reactive subscriber's forceUpdate.
938
+ * Those forceUpdates are React-scheduled (deferred-lane) updates that do NOT
939
+ * surface as the runtime's `pendingRerender` flag and are NOT drained by
940
+ * `reconciler.flushSyncWork()`; only a subsequent `doRender()`
941
+ * (`updateContainerSync`) processes them. The runtime's post-commit drain uses
942
+ * this return so it can run the documented "exactly one additional pass" that
943
+ * paints the subscriber update WITHIN the same event — instead of leaking a
944
+ * stale frame to a later macrotask (the @si/render/19436 boxSize signature).
945
+ *
884
946
  * See bead `@km/silvery/use-deferred-box-rect-and-post-commit-observers`.
885
947
  */
886
948
  function commitLayoutSnapshot(root) {
949
+ let promoted = false;
887
950
  function walk(node) {
888
951
  const s = signalMap.get(node);
889
952
  if (s) {
890
953
  const nextBox = s.boxRect();
891
- if (!rectEqual$1(nextBox, s.boxRectCommitted())) s.boxRectCommitted(nextBox);
954
+ if (!rectEqual$1(nextBox, s.boxRectCommitted())) {
955
+ s.boxRectCommitted(nextBox);
956
+ if (hasObservedLayoutSignal(node, "boxRect") || hasObservedLayoutSignal(node, "boxSize")) promoted = true;
957
+ }
892
958
  const nextScroll = s.scrollRect();
893
- if (!rectEqual$1(nextScroll, s.scrollRectCommitted())) s.scrollRectCommitted(nextScroll);
959
+ if (!rectEqual$1(nextScroll, s.scrollRectCommitted())) {
960
+ s.scrollRectCommitted(nextScroll);
961
+ if (hasObservedLayoutSignal(node, "scrollRect")) promoted = true;
962
+ }
894
963
  const nextScreen = s.screenRect();
895
- if (!rectEqual$1(nextScreen, s.screenRectCommitted())) s.screenRectCommitted(nextScreen);
964
+ if (!rectEqual$1(nextScreen, s.screenRectCommitted())) {
965
+ s.screenRectCommitted(nextScreen);
966
+ if (hasObservedLayoutSignal(node, "screenRect")) promoted = true;
967
+ }
896
968
  }
897
969
  for (const child of node.children) walk(child);
898
970
  }
899
971
  walk(root);
972
+ return promoted;
900
973
  }
901
974
  /**
902
975
  * Walk the tree and find the active caret rect — the caret to render this
903
976
  * frame, applying the precedence + clipping rules locked by bead
904
- * `km-silvery.cursor-invariants`. Returns null when no caret should be
905
- * shown.
977
+ * `km-silvery.cursor-invariants`. Returns null when no cursor owner is
978
+ * present; focused hidden owners return a rect with `visible: false`.
906
979
  *
907
980
  * **Precedence (invariant 1)**:
908
- * 1. **Focused-editable wins**: a Box with `cursorOffset.visible !== false`
909
- * AND `interactiveState.focused === true`. If multiple focused-editables
910
- * exist (rare typically one input is focused at a time), the deepest
911
- * one in paint order wins.
912
- * 2. **Otherwise deepest-in-paint-order**: if no node is focused-editable,
913
- * fall back to the deepest visible declarer (post-order tree walk).
914
- * This covers Ink-compat consumers and `useCursor` callers that don't
915
- * participate in the focus tree.
916
- * 3. **Otherwise null**: no visible caret declared anywhere.
981
+ * 1. **Focused cursor owner wins**: a Box with `cursorOffset` AND either
982
+ * `focused === true` or `interactiveState.focused === true` wins even
983
+ * when `cursorOffset.visible === false`. If the rect is visible,
984
+ * renderers show it; if it is hidden, renderers move there and hide the
985
+ * hardware cursor. Either way it suppresses non-focused fallback cursors.
986
+ * 2. **Otherwise deepest visible in paint order**: if no node is a focused
987
+ * cursor owner, fall back to the deepest visible declarer (post-order
988
+ * tree walk). This covers Ink-compat consumers and `useCursor` callers
989
+ * that don't participate in the focus tree.
990
+ * 3. **Otherwise null**: no visible cursor owner is present.
917
991
  *
918
992
  * **Clipping (invariant 4)**: at each scroll/clip ancestor (a Box with
919
993
  * `overflow="scroll"` / `"hidden"` / `overflowY="hidden"`), the caret's
@@ -923,12 +997,25 @@ function commitLayoutSnapshot(root) {
923
997
  * caret rect at the exact clip edge is treated as visible.
924
998
  *
925
999
  * Visited in tree order (depth-first, post-order). Per-node cost is one
926
- * `props.cursorOffset` check + one signal lookup; trees without any caret
1000
+ * `props.cursorOffset` check + one signal lookup; trees without any cursor
927
1001
  * declarer return null after a single traversal.
928
1002
  */
929
1003
  function findActiveCursorRect(root) {
1004
+ return findActiveCursorRectWithProvenance(root)?.rect ?? null;
1005
+ }
1006
+ /**
1007
+ * Walk the tree once and return the active cursor rect WITH its provenance.
1008
+ * `findActiveCursorRect` is the value-only projection of this. See
1009
+ * `CursorProvenance` for the source categories and why the terminal layer needs
1010
+ * them (one walk, no parallel island-blind re-derivation in the compositing
1011
+ * gate). Precedence and clipping match `findActiveCursorRect`'s documented
1012
+ * invariants exactly — this IS that walk.
1013
+ */
1014
+ function findActiveCursorRectWithProvenance(root) {
930
1015
  let focusedResult = null;
1016
+ let focusedSuppressesFallback = false;
931
1017
  let fallbackResult = null;
1018
+ let fallbackProvenance = "declarative-fallback";
932
1019
  const clipStack = [];
933
1020
  function isClipped(rect) {
934
1021
  for (let i = clipStack.length - 1; i >= 0; i--) {
@@ -949,18 +1036,54 @@ function findActiveCursorRect(root) {
949
1036
  const isClip = isClipAncestor(node);
950
1037
  if (isClip) clipStack.push(node.scrollRect ?? null);
951
1038
  for (const child of node.children) walk(child);
952
- if (node.props?.cursorOffset) {
1039
+ const props = node.props;
1040
+ if (props?.cursorOffset) {
953
1041
  const s = signalMap.get(node);
954
1042
  const rect = s ? s.cursorRect() : computeCursorRect(node);
955
- if (rect && rect.visible && !isClipped(rect)) {
956
- fallbackResult = rect;
957
- if (node.interactiveState?.focused) focusedResult = rect;
1043
+ const isFocusedCursorOwner = props.focused === true || node.interactiveState?.focused === true;
1044
+ if (rect) {
1045
+ const clipped = isClipped(rect);
1046
+ if (isFocusedCursorOwner) {
1047
+ focusedSuppressesFallback = true;
1048
+ if (!clipped) focusedResult = rect;
1049
+ }
1050
+ if (!clipped) {
1051
+ if (rect.visible) {
1052
+ fallbackResult = rect;
1053
+ fallbackProvenance = "declarative-fallback";
1054
+ }
1055
+ }
1056
+ } else if (isFocusedCursorOwner) focusedSuppressesFallback = true;
1057
+ }
1058
+ if (node.type === "silvery-island" && node.islandState?.cursorActive) {
1059
+ const out = node.islandState.handle?.output;
1060
+ const cur = out?.cursor;
1061
+ const base = node.screenRect ?? node.boxRect;
1062
+ if (cur && out?.cursorVisible && base) {
1063
+ const rect = {
1064
+ x: base.x + cur.col,
1065
+ y: base.y + cur.row,
1066
+ visible: true,
1067
+ shape: cur.style
1068
+ };
1069
+ if (!focusedSuppressesFallback && !isClipped(rect)) {
1070
+ fallbackResult = rect;
1071
+ fallbackProvenance = "island";
1072
+ }
958
1073
  }
959
1074
  }
960
1075
  if (isClip) clipStack.pop();
961
1076
  }
962
1077
  walk(root);
963
- return focusedResult ?? fallbackResult;
1078
+ if (focusedResult) return {
1079
+ rect: focusedResult,
1080
+ provenance: "focused-declarative"
1081
+ };
1082
+ if (focusedSuppressesFallback || !fallbackResult) return null;
1083
+ return {
1084
+ rect: fallbackResult,
1085
+ provenance: fallbackProvenance
1086
+ };
964
1087
  }
965
1088
  /**
966
1089
  * Sync textContent signal from the node's current value.
@@ -983,6 +1106,6 @@ function syncFocusedSignal(node, focused) {
983
1106
  if (focused !== s.focused()) s.focused(focused);
984
1107
  }
985
1108
  //#endregion
986
- export { hasObservedLayoutSignal as a, syncDecorationRects as c, syncTextContentSignal as d, getWrapMeasurer as f, hasLayoutSignals as i, syncFocusedSignal as l, rectEqual$1 as m, findActiveCursorRect as n, markObservedLayoutSignal as o, setWrapMeasurer as p, getLayoutSignals as r, observeLayoutSignal as s, commitLayoutSnapshot as t, syncRectSignals as u };
1109
+ export { rectEqual$1 as _, findActiveParkRect as a, hasObservedLayoutSignal as c, syncDecorationRects as d, syncFocusedSignal as f, setWrapMeasurer as g, getWrapMeasurer as h, findActiveCursorRectWithProvenance as i, markObservedLayoutSignal as l, syncTextContentSignal as m, computeContentRect as n, getLayoutSignals as o, syncRectSignals as p, findActiveCursorRect as r, hasLayoutSignals as s, commitLayoutSnapshot as t, observeLayoutSignal as u };
987
1110
 
988
- //# sourceMappingURL=layout-signals-Cnw6xk8Q.mjs.map
1111
+ //# sourceMappingURL=layout-signals-CGYbHmxy.mjs.map