@askdkc/dsh-cli 0.11.3

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 (1978) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +321 -0
  3. package/bin/dsh-tui.js +1366 -0
  4. package/cordis.patch.yml +482 -0
  5. package/cordis.yml +250 -0
  6. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
  7. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
  8. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
  9. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
  10. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
  11. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
  12. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
  13. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
  14. package/dsh-ecosystem-spec/registry/README.md +14 -0
  15. package/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
  16. package/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
  17. package/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
  18. package/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
  19. package/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
  20. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
  21. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
  22. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
  23. package/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
  24. package/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
  25. package/dsh-ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
  26. package/lib/types/activityPrefs.d.ts +63 -0
  27. package/lib/types/activityPrefs.d.ts.map +1 -0
  28. package/lib/types/activityPrefs.js +126 -0
  29. package/lib/types/adapter/channel/actions.d.ts +17 -0
  30. package/lib/types/adapter/channel/actions.d.ts.map +1 -0
  31. package/lib/types/adapter/channel/actions.js +28 -0
  32. package/lib/types/adapter/channel/consumer.d.ts +34 -0
  33. package/lib/types/adapter/channel/consumer.d.ts.map +1 -0
  34. package/lib/types/adapter/channel/consumer.js +87 -0
  35. package/lib/types/adapter/channel/features.d.ts +12 -0
  36. package/lib/types/adapter/channel/features.d.ts.map +1 -0
  37. package/lib/types/adapter/channel/features.js +41 -0
  38. package/lib/types/adapter/channel/host-registry.d.ts +40 -0
  39. package/lib/types/adapter/channel/host-registry.d.ts.map +1 -0
  40. package/lib/types/adapter/channel/host-registry.js +120 -0
  41. package/lib/types/adapter/channel/index.d.ts +22 -0
  42. package/lib/types/adapter/channel/index.d.ts.map +1 -0
  43. package/lib/types/adapter/channel/index.js +21 -0
  44. package/lib/types/adapter/channel/internal-token.d.ts +12 -0
  45. package/lib/types/adapter/channel/internal-token.d.ts.map +1 -0
  46. package/lib/types/adapter/channel/internal-token.js +11 -0
  47. package/lib/types/adapter/channel/plugins.d.ts +17 -0
  48. package/lib/types/adapter/channel/plugins.d.ts.map +1 -0
  49. package/lib/types/adapter/channel/plugins.js +47 -0
  50. package/lib/types/adapter/channel/projection.d.ts +15 -0
  51. package/lib/types/adapter/channel/projection.d.ts.map +1 -0
  52. package/lib/types/adapter/channel/projection.js +59 -0
  53. package/lib/types/adapter/channel/provider.d.ts +52 -0
  54. package/lib/types/adapter/channel/provider.d.ts.map +1 -0
  55. package/lib/types/adapter/channel/provider.js +231 -0
  56. package/lib/types/adapter/channel/read-view.d.ts +4 -0
  57. package/lib/types/adapter/channel/read-view.d.ts.map +1 -0
  58. package/lib/types/adapter/channel/read-view.js +132 -0
  59. package/lib/types/adapter/channel/session-projection.d.ts +56 -0
  60. package/lib/types/adapter/channel/session-projection.d.ts.map +1 -0
  61. package/lib/types/adapter/channel/session-projection.js +249 -0
  62. package/lib/types/adapter/channel/state.d.ts +11 -0
  63. package/lib/types/adapter/channel/state.d.ts.map +1 -0
  64. package/lib/types/adapter/channel/state.js +57 -0
  65. package/lib/types/adapter/channel/transcript.d.ts +15 -0
  66. package/lib/types/adapter/channel/transcript.d.ts.map +1 -0
  67. package/lib/types/adapter/channel/transcript.js +22 -0
  68. package/lib/types/adapter/channel/ui-policy.d.ts +109 -0
  69. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
  70. package/lib/types/adapter/channel/ui-policy.js +170 -0
  71. package/lib/types/adapter/channel/ui.d.ts +16 -0
  72. package/lib/types/adapter/channel/ui.d.ts.map +1 -0
  73. package/lib/types/adapter/channel/ui.js +173 -0
  74. package/lib/types/adapter/index.d.ts +20 -0
  75. package/lib/types/adapter/index.d.ts.map +1 -0
  76. package/lib/types/adapter/index.js +19 -0
  77. package/lib/types/adapter/kernel/contract-catalog.d.ts +12 -0
  78. package/lib/types/adapter/kernel/contract-catalog.d.ts.map +1 -0
  79. package/lib/types/adapter/kernel/contract-catalog.js +11 -0
  80. package/lib/types/adapter/kernel/diagnostics.d.ts +18 -0
  81. package/lib/types/adapter/kernel/diagnostics.d.ts.map +1 -0
  82. package/lib/types/adapter/kernel/diagnostics.js +16 -0
  83. package/lib/types/adapter/kernel/driver-types.d.ts +16 -0
  84. package/lib/types/adapter/kernel/driver-types.d.ts.map +1 -0
  85. package/lib/types/adapter/kernel/driver-types.js +8 -0
  86. package/lib/types/adapter/kernel/host-facade.d.ts +65 -0
  87. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -0
  88. package/lib/types/adapter/kernel/host-facade.js +216 -0
  89. package/lib/types/adapter/kernel/host-probe-access.d.ts +71 -0
  90. package/lib/types/adapter/kernel/host-probe-access.d.ts.map +1 -0
  91. package/lib/types/adapter/kernel/host-probe-access.js +121 -0
  92. package/lib/types/adapter/kernel/index.d.ts +20 -0
  93. package/lib/types/adapter/kernel/index.d.ts.map +1 -0
  94. package/lib/types/adapter/kernel/index.js +19 -0
  95. package/lib/types/adapter/kernel/kernel-runtime.d.ts +138 -0
  96. package/lib/types/adapter/kernel/kernel-runtime.d.ts.map +1 -0
  97. package/lib/types/adapter/kernel/kernel-runtime.js +572 -0
  98. package/lib/types/adapter/kernel/ledger.d.ts +55 -0
  99. package/lib/types/adapter/kernel/ledger.d.ts.map +1 -0
  100. package/lib/types/adapter/kernel/ledger.js +33 -0
  101. package/lib/types/adapter/kernel/legacy-facade.d.ts +22 -0
  102. package/lib/types/adapter/kernel/legacy-facade.d.ts.map +1 -0
  103. package/lib/types/adapter/kernel/legacy-facade.js +34 -0
  104. package/lib/types/adapter/kernel/lifecycle.d.ts +38 -0
  105. package/lib/types/adapter/kernel/lifecycle.d.ts.map +1 -0
  106. package/lib/types/adapter/kernel/lifecycle.js +53 -0
  107. package/lib/types/adapter/kernel/replay-isolation.d.ts +27 -0
  108. package/lib/types/adapter/kernel/replay-isolation.d.ts.map +1 -0
  109. package/lib/types/adapter/kernel/replay-isolation.js +45 -0
  110. package/lib/types/adapter/kernel/replay.d.ts +132 -0
  111. package/lib/types/adapter/kernel/replay.d.ts.map +1 -0
  112. package/lib/types/adapter/kernel/replay.js +428 -0
  113. package/lib/types/adapter/kernel/runtime-context.d.ts +15 -0
  114. package/lib/types/adapter/kernel/runtime-context.d.ts.map +1 -0
  115. package/lib/types/adapter/kernel/runtime-context.js +24 -0
  116. package/lib/types/adapter/kernel/runtime.d.ts +70 -0
  117. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -0
  118. package/lib/types/adapter/kernel/runtime.js +327 -0
  119. package/lib/types/adapter/kernel/slices/channel.d.ts +3 -0
  120. package/lib/types/adapter/kernel/slices/channel.d.ts.map +1 -0
  121. package/lib/types/adapter/kernel/slices/channel.js +8 -0
  122. package/lib/types/adapter/kernel/slices/decisions.d.ts +3 -0
  123. package/lib/types/adapter/kernel/slices/decisions.d.ts.map +1 -0
  124. package/lib/types/adapter/kernel/slices/decisions.js +10 -0
  125. package/lib/types/adapter/kernel/slices/extensions.d.ts +8 -0
  126. package/lib/types/adapter/kernel/slices/extensions.d.ts.map +1 -0
  127. package/lib/types/adapter/kernel/slices/extensions.js +43 -0
  128. package/lib/types/adapter/kernel/slices/index.d.ts +19 -0
  129. package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -0
  130. package/lib/types/adapter/kernel/slices/index.js +36 -0
  131. package/lib/types/adapter/kernel/slices/presentation.d.ts +3 -0
  132. package/lib/types/adapter/kernel/slices/presentation.d.ts.map +1 -0
  133. package/lib/types/adapter/kernel/slices/presentation.js +14 -0
  134. package/lib/types/adapter/kernel/slices/scenes.d.ts +3 -0
  135. package/lib/types/adapter/kernel/slices/scenes.d.ts.map +1 -0
  136. package/lib/types/adapter/kernel/slices/scenes.js +14 -0
  137. package/lib/types/adapter/kernel/slices/settings.d.ts +3 -0
  138. package/lib/types/adapter/kernel/slices/settings.d.ts.map +1 -0
  139. package/lib/types/adapter/kernel/slices/settings.js +12 -0
  140. package/lib/types/adapter/kernel/slices/types.d.ts +20 -0
  141. package/lib/types/adapter/kernel/slices/types.d.ts.map +1 -0
  142. package/lib/types/adapter/kernel/slices/types.js +12 -0
  143. package/lib/types/adapter/kernel/slices/workspace.d.ts +3 -0
  144. package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -0
  145. package/lib/types/adapter/kernel/slices/workspace.js +16 -0
  146. package/lib/types/adapter/ports/channel-catalog.d.ts +90 -0
  147. package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -0
  148. package/lib/types/adapter/ports/channel-catalog.js +2 -0
  149. package/lib/types/adapter/ports/channel-display.d.ts +90 -0
  150. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -0
  151. package/lib/types/adapter/ports/channel-display.js +2 -0
  152. package/lib/types/adapter/ports/channel-session.d.ts +229 -0
  153. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -0
  154. package/lib/types/adapter/ports/channel-session.js +2 -0
  155. package/lib/types/adapter/ports/channel-settings.d.ts +279 -0
  156. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -0
  157. package/lib/types/adapter/ports/channel-settings.js +1 -0
  158. package/lib/types/adapter/ports/channel-ui.d.ts +593 -0
  159. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -0
  160. package/lib/types/adapter/ports/channel-ui.js +1 -0
  161. package/lib/types/adapter/ports/channel-view.d.ts +663 -0
  162. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -0
  163. package/lib/types/adapter/ports/channel-view.js +2 -0
  164. package/lib/types/adapter/ports/channel-workspace.d.ts +68 -0
  165. package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -0
  166. package/lib/types/adapter/ports/channel-workspace.js +2 -0
  167. package/lib/types/adapter/ports/channel.d.ts +148 -0
  168. package/lib/types/adapter/ports/channel.d.ts.map +1 -0
  169. package/lib/types/adapter/ports/channel.js +22 -0
  170. package/lib/types/adapter/ports/decisions.d.ts +18 -0
  171. package/lib/types/adapter/ports/decisions.d.ts.map +1 -0
  172. package/lib/types/adapter/ports/decisions.js +9 -0
  173. package/lib/types/adapter/ports/descriptor.d.ts +25 -0
  174. package/lib/types/adapter/ports/descriptor.d.ts.map +1 -0
  175. package/lib/types/adapter/ports/descriptor.js +11 -0
  176. package/lib/types/adapter/ports/extensions.d.ts +86 -0
  177. package/lib/types/adapter/ports/extensions.d.ts.map +1 -0
  178. package/lib/types/adapter/ports/extensions.js +9 -0
  179. package/lib/types/adapter/ports/index.d.ts +23 -0
  180. package/lib/types/adapter/ports/index.d.ts.map +1 -0
  181. package/lib/types/adapter/ports/index.js +14 -0
  182. package/lib/types/adapter/ports/owner.d.ts +19 -0
  183. package/lib/types/adapter/ports/owner.d.ts.map +1 -0
  184. package/lib/types/adapter/ports/owner.js +9 -0
  185. package/lib/types/adapter/ports/presentation.d.ts +81 -0
  186. package/lib/types/adapter/ports/presentation.d.ts.map +1 -0
  187. package/lib/types/adapter/ports/presentation.js +10 -0
  188. package/lib/types/adapter/ports/scenes.d.ts +24 -0
  189. package/lib/types/adapter/ports/scenes.d.ts.map +1 -0
  190. package/lib/types/adapter/ports/scenes.js +8 -0
  191. package/lib/types/adapter/ports/settings.d.ts +44 -0
  192. package/lib/types/adapter/ports/settings.d.ts.map +1 -0
  193. package/lib/types/adapter/ports/settings.js +9 -0
  194. package/lib/types/adapter/ports/workspace.d.ts +62 -0
  195. package/lib/types/adapter/ports/workspace.d.ts.map +1 -0
  196. package/lib/types/adapter/ports/workspace.js +8 -0
  197. package/lib/types/adapter/spec/index.d.ts +11 -0
  198. package/lib/types/adapter/spec/index.d.ts.map +1 -0
  199. package/lib/types/adapter/spec/index.js +10 -0
  200. package/lib/types/adapter/spec/profile.d.ts +10 -0
  201. package/lib/types/adapter/spec/profile.d.ts.map +1 -0
  202. package/lib/types/adapter/spec/profile.js +9 -0
  203. package/lib/types/adapter/spec/protocol-constants.d.ts +60 -0
  204. package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -0
  205. package/lib/types/adapter/spec/protocol-constants.js +129 -0
  206. package/lib/types/adapter/spec/tui-contributions.d.ts +18 -0
  207. package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -0
  208. package/lib/types/adapter/spec/tui-contributions.js +19 -0
  209. package/lib/types/adapter/standard/admission.d.ts +11 -0
  210. package/lib/types/adapter/standard/admission.d.ts.map +1 -0
  211. package/lib/types/adapter/standard/admission.js +10 -0
  212. package/lib/types/adapter/standard/descriptor.d.ts +74 -0
  213. package/lib/types/adapter/standard/descriptor.d.ts.map +1 -0
  214. package/lib/types/adapter/standard/descriptor.js +356 -0
  215. package/lib/types/adapter/standard/grants.d.ts +30 -0
  216. package/lib/types/adapter/standard/grants.d.ts.map +1 -0
  217. package/lib/types/adapter/standard/grants.js +219 -0
  218. package/lib/types/adapter/standard/index.d.ts +25 -0
  219. package/lib/types/adapter/standard/index.d.ts.map +1 -0
  220. package/lib/types/adapter/standard/index.js +24 -0
  221. package/lib/types/adapter/standard/negotiate.d.ts +11 -0
  222. package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
  223. package/lib/types/adapter/standard/negotiate.js +97 -0
  224. package/lib/types/adapter/standard/permission-scope.d.ts +27 -0
  225. package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
  226. package/lib/types/adapter/standard/permission-scope.js +68 -0
  227. package/lib/types/adapter/standard/protocols.d.ts +12 -0
  228. package/lib/types/adapter/standard/protocols.d.ts.map +1 -0
  229. package/lib/types/adapter/standard/protocols.js +11 -0
  230. package/lib/types/adapter/standard/registry.d.ts +23 -0
  231. package/lib/types/adapter/standard/registry.d.ts.map +1 -0
  232. package/lib/types/adapter/standard/registry.js +240 -0
  233. package/lib/types/adapter/standard/schema-check.d.ts +17 -0
  234. package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
  235. package/lib/types/adapter/standard/schema-check.js +167 -0
  236. package/lib/types/adapter/standard/tui-extension.d.ts +25 -0
  237. package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -0
  238. package/lib/types/adapter/standard/tui-extension.js +45 -0
  239. package/lib/types/adapter/standard/types.d.ts +108 -0
  240. package/lib/types/adapter/standard/types.d.ts.map +1 -0
  241. package/lib/types/adapter/standard/types.js +10 -0
  242. package/lib/types/adapter/standard/validate.d.ts +21 -0
  243. package/lib/types/adapter/standard/validate.d.ts.map +1 -0
  244. package/lib/types/adapter/standard/validate.js +139 -0
  245. package/lib/types/adapter/upstream/channel-driver.d.ts +22 -0
  246. package/lib/types/adapter/upstream/channel-driver.d.ts.map +1 -0
  247. package/lib/types/adapter/upstream/channel-driver.js +424 -0
  248. package/lib/types/adapter/upstream/decisions-driver.d.ts +15 -0
  249. package/lib/types/adapter/upstream/decisions-driver.d.ts.map +1 -0
  250. package/lib/types/adapter/upstream/decisions-driver.js +141 -0
  251. package/lib/types/adapter/upstream/detection.d.ts +26 -0
  252. package/lib/types/adapter/upstream/detection.d.ts.map +1 -0
  253. package/lib/types/adapter/upstream/detection.js +9 -0
  254. package/lib/types/adapter/upstream/driver.d.ts +50 -0
  255. package/lib/types/adapter/upstream/driver.d.ts.map +1 -0
  256. package/lib/types/adapter/upstream/driver.js +8 -0
  257. package/lib/types/adapter/upstream/extensions-driver.d.ts +24 -0
  258. package/lib/types/adapter/upstream/extensions-driver.d.ts.map +1 -0
  259. package/lib/types/adapter/upstream/extensions-driver.js +697 -0
  260. package/lib/types/adapter/upstream/host-descriptor-driver.d.ts +45 -0
  261. package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -0
  262. package/lib/types/adapter/upstream/host-descriptor-driver.js +606 -0
  263. package/lib/types/adapter/upstream/index.d.ts +18 -0
  264. package/lib/types/adapter/upstream/index.d.ts.map +1 -0
  265. package/lib/types/adapter/upstream/index.js +15 -0
  266. package/lib/types/adapter/upstream/presentation-driver.d.ts +17 -0
  267. package/lib/types/adapter/upstream/presentation-driver.d.ts.map +1 -0
  268. package/lib/types/adapter/upstream/presentation-driver.js +129 -0
  269. package/lib/types/adapter/upstream/scenes-driver.d.ts +18 -0
  270. package/lib/types/adapter/upstream/scenes-driver.d.ts.map +1 -0
  271. package/lib/types/adapter/upstream/scenes-driver.js +170 -0
  272. package/lib/types/adapter/upstream/settings-driver.d.ts +20 -0
  273. package/lib/types/adapter/upstream/settings-driver.d.ts.map +1 -0
  274. package/lib/types/adapter/upstream/settings-driver.js +173 -0
  275. package/lib/types/adapter/upstream/workspace-driver.d.ts +19 -0
  276. package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -0
  277. package/lib/types/adapter/upstream/workspace-driver.js +198 -0
  278. package/lib/types/api.d.ts +7 -0
  279. package/lib/types/api.d.ts.map +1 -0
  280. package/lib/types/api.js +1 -0
  281. package/lib/types/bootstrap/state.d.ts +11 -0
  282. package/lib/types/bootstrap/state.d.ts.map +1 -0
  283. package/lib/types/bootstrap/state.js +10 -0
  284. package/lib/types/command-trees.d.ts +4 -0
  285. package/lib/types/command-trees.d.ts.map +1 -0
  286. package/lib/types/command-trees.js +4 -0
  287. package/lib/types/commands.d.ts +87 -0
  288. package/lib/types/commands.d.ts.map +1 -0
  289. package/lib/types/commands.js +218 -0
  290. package/lib/types/components/ActivityLine.d.ts +34 -0
  291. package/lib/types/components/ActivityLine.d.ts.map +1 -0
  292. package/lib/types/components/ActivityLine.js +39 -0
  293. package/lib/types/components/ActivityPicker.d.ts +16 -0
  294. package/lib/types/components/ActivityPicker.d.ts.map +1 -0
  295. package/lib/types/components/ActivityPicker.js +23 -0
  296. package/lib/types/components/AutoRecapRow.d.ts +23 -0
  297. package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
  298. package/lib/types/components/AutoRecapRow.js +23 -0
  299. package/lib/types/components/BalanceReportRow.d.ts +24 -0
  300. package/lib/types/components/BalanceReportRow.d.ts.map +1 -0
  301. package/lib/types/components/BalanceReportRow.js +87 -0
  302. package/lib/types/components/BtwPanel.d.ts +16 -0
  303. package/lib/types/components/BtwPanel.d.ts.map +1 -0
  304. package/lib/types/components/BtwPanel.js +47 -0
  305. package/lib/types/components/Chat/JobCard.d.ts +23 -0
  306. package/lib/types/components/Chat/JobCard.d.ts.map +1 -0
  307. package/lib/types/components/Chat/JobCard.js +93 -0
  308. package/lib/types/components/Chat/SubagentMessage.d.ts +20 -0
  309. package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -0
  310. package/lib/types/components/Chat/SubagentMessage.js +83 -0
  311. package/lib/types/components/ColorPicker.d.ts +17 -0
  312. package/lib/types/components/ColorPicker.d.ts.map +1 -0
  313. package/lib/types/components/ColorPicker.js +20 -0
  314. package/lib/types/components/CommandSuggestions.d.ts +34 -0
  315. package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
  316. package/lib/types/components/CommandSuggestions.js +61 -0
  317. package/lib/types/components/ContextBarView.d.ts +41 -0
  318. package/lib/types/components/ContextBarView.d.ts.map +1 -0
  319. package/lib/types/components/ContextBarView.js +50 -0
  320. package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
  321. package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
  322. package/lib/types/components/EffortChargeGlyph.js +70 -0
  323. package/lib/types/components/EffortInputBorder.d.ts +47 -0
  324. package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
  325. package/lib/types/components/EffortInputBorder.js +90 -0
  326. package/lib/types/components/EffortSlider.d.ts +18 -0
  327. package/lib/types/components/EffortSlider.d.ts.map +1 -0
  328. package/lib/types/components/EffortSlider.js +19 -0
  329. package/lib/types/components/EffortTierBadge.d.ts +26 -0
  330. package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
  331. package/lib/types/components/EffortTierBadge.js +97 -0
  332. package/lib/types/components/ExtensionDialog.d.ts +40 -0
  333. package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
  334. package/lib/types/components/ExtensionDialog.js +253 -0
  335. package/lib/types/components/FileActionsPanel.d.ts +22 -0
  336. package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
  337. package/lib/types/components/FileActionsPanel.js +28 -0
  338. package/lib/types/components/FileSuggestions.d.ts +18 -0
  339. package/lib/types/components/FileSuggestions.d.ts.map +1 -0
  340. package/lib/types/components/FileSuggestions.js +78 -0
  341. package/lib/types/components/GoalTodoPanel.d.ts +38 -0
  342. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
  343. package/lib/types/components/GoalTodoPanel.js +131 -0
  344. package/lib/types/components/HelpMenu.d.ts +29 -0
  345. package/lib/types/components/HelpMenu.d.ts.map +1 -0
  346. package/lib/types/components/HelpMenu.js +39 -0
  347. package/lib/types/components/HistorySearchDialog.d.ts +18 -0
  348. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
  349. package/lib/types/components/HistorySearchDialog.js +47 -0
  350. package/lib/types/components/ImagePreviewOverlay.d.ts +51 -0
  351. package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -0
  352. package/lib/types/components/ImagePreviewOverlay.js +269 -0
  353. package/lib/types/components/JobsPanel.d.ts +17 -0
  354. package/lib/types/components/JobsPanel.d.ts.map +1 -0
  355. package/lib/types/components/JobsPanel.js +111 -0
  356. package/lib/types/components/LangPicker.d.ts +14 -0
  357. package/lib/types/components/LangPicker.d.ts.map +1 -0
  358. package/lib/types/components/LangPicker.js +17 -0
  359. package/lib/types/components/LoadedContextPanel.d.ts +20 -0
  360. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
  361. package/lib/types/components/LoadedContextPanel.js +32 -0
  362. package/lib/types/components/LogoV2.d.ts +48 -0
  363. package/lib/types/components/LogoV2.d.ts.map +1 -0
  364. package/lib/types/components/LogoV2.js +239 -0
  365. package/lib/types/components/Markdown.d.ts +46 -0
  366. package/lib/types/components/Markdown.d.ts.map +1 -0
  367. package/lib/types/components/Markdown.js +178 -0
  368. package/lib/types/components/MarkdownTable.d.ts +13 -0
  369. package/lib/types/components/MarkdownTable.d.ts.map +1 -0
  370. package/lib/types/components/MarkdownTable.js +155 -0
  371. package/lib/types/components/MermaidDiagram.d.ts +13 -0
  372. package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
  373. package/lib/types/components/MermaidDiagram.js +61 -0
  374. package/lib/types/components/MessageList.d.ts +144 -0
  375. package/lib/types/components/MessageList.d.ts.map +1 -0
  376. package/lib/types/components/MessageList.js +1170 -0
  377. package/lib/types/components/MigratePicker.d.ts +30 -0
  378. package/lib/types/components/MigratePicker.d.ts.map +1 -0
  379. package/lib/types/components/MigratePicker.js +38 -0
  380. package/lib/types/components/ModelPicker.d.ts +42 -0
  381. package/lib/types/components/ModelPicker.d.ts.map +1 -0
  382. package/lib/types/components/ModelPicker.js +51 -0
  383. package/lib/types/components/OverlayAbove.d.ts +48 -0
  384. package/lib/types/components/OverlayAbove.d.ts.map +1 -0
  385. package/lib/types/components/OverlayAbove.js +98 -0
  386. package/lib/types/components/PageMargin.d.ts +58 -0
  387. package/lib/types/components/PageMargin.d.ts.map +1 -0
  388. package/lib/types/components/PageMargin.js +38 -0
  389. package/lib/types/components/PermissionsPicker.d.ts +20 -0
  390. package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
  391. package/lib/types/components/PermissionsPicker.js +33 -0
  392. package/lib/types/components/PlanPicker.d.ts +15 -0
  393. package/lib/types/components/PlanPicker.d.ts.map +1 -0
  394. package/lib/types/components/PlanPicker.js +18 -0
  395. package/lib/types/components/PluginSceneBoundary.d.ts +31 -0
  396. package/lib/types/components/PluginSceneBoundary.d.ts.map +1 -0
  397. package/lib/types/components/PluginSceneBoundary.js +29 -0
  398. package/lib/types/components/PluginStatusViewBoundary.d.ts +26 -0
  399. package/lib/types/components/PluginStatusViewBoundary.d.ts.map +1 -0
  400. package/lib/types/components/PluginStatusViewBoundary.js +22 -0
  401. package/lib/types/components/PresetPicker.d.ts +20 -0
  402. package/lib/types/components/PresetPicker.d.ts.map +1 -0
  403. package/lib/types/components/PresetPicker.js +24 -0
  404. package/lib/types/components/PromptEditor.d.ts +48 -0
  405. package/lib/types/components/PromptEditor.d.ts.map +1 -0
  406. package/lib/types/components/PromptEditor.js +75 -0
  407. package/lib/types/components/PromptInput.d.ts +163 -0
  408. package/lib/types/components/PromptInput.d.ts.map +1 -0
  409. package/lib/types/components/PromptInput.js +3503 -0
  410. package/lib/types/components/RecapPanel.d.ts +25 -0
  411. package/lib/types/components/RecapPanel.d.ts.map +1 -0
  412. package/lib/types/components/RecapPanel.js +55 -0
  413. package/lib/types/components/RewindPicker.d.ts +37 -0
  414. package/lib/types/components/RewindPicker.d.ts.map +1 -0
  415. package/lib/types/components/RewindPicker.js +66 -0
  416. package/lib/types/components/ScrollbarGutter.d.ts +43 -0
  417. package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
  418. package/lib/types/components/ScrollbarGutter.js +197 -0
  419. package/lib/types/components/SearchBox.d.ts +24 -0
  420. package/lib/types/components/SearchBox.d.ts.map +1 -0
  421. package/lib/types/components/SearchBox.js +132 -0
  422. package/lib/types/components/Select.d.ts +29 -0
  423. package/lib/types/components/Select.d.ts.map +1 -0
  424. package/lib/types/components/Select.js +21 -0
  425. package/lib/types/components/SkillsPicker.d.ts +21 -0
  426. package/lib/types/components/SkillsPicker.d.ts.map +1 -0
  427. package/lib/types/components/SkillsPicker.js +52 -0
  428. package/lib/types/components/Spinner/GlimmerMessage.d.ts +16 -0
  429. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
  430. package/lib/types/components/Spinner/GlimmerMessage.js +57 -0
  431. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +33 -0
  432. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
  433. package/lib/types/components/Spinner/SpinnerAnimationRow.js +168 -0
  434. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
  435. package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
  436. package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
  437. package/lib/types/components/Spinner/spinnerMode.d.ts +2 -0
  438. package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
  439. package/lib/types/components/Spinner/spinnerMode.js +1 -0
  440. package/lib/types/components/Spinner/spinnerUtils.d.ts +36 -0
  441. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
  442. package/lib/types/components/Spinner/spinnerUtils.js +94 -0
  443. package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
  444. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
  445. package/lib/types/components/Spinner/useStalledAnimation.js +52 -0
  446. package/lib/types/components/SplitDiffView.d.ts +25 -0
  447. package/lib/types/components/SplitDiffView.d.ts.map +1 -0
  448. package/lib/types/components/SplitDiffView.js +279 -0
  449. package/lib/types/components/StreamingMarkdown.d.ts +6 -0
  450. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
  451. package/lib/types/components/StreamingMarkdown.js +279 -0
  452. package/lib/types/components/SubagentCard.d.ts +10 -0
  453. package/lib/types/components/SubagentCard.d.ts.map +1 -0
  454. package/lib/types/components/SubagentCard.js +39 -0
  455. package/lib/types/components/SubagentDashboard.d.ts +17 -0
  456. package/lib/types/components/SubagentDashboard.d.ts.map +1 -0
  457. package/lib/types/components/SubagentDashboard.js +58 -0
  458. package/lib/types/components/SubagentDetailScene.d.ts +16 -0
  459. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -0
  460. package/lib/types/components/SubagentDetailScene.js +147 -0
  461. package/lib/types/components/SuggestionCard.d.ts +65 -0
  462. package/lib/types/components/SuggestionCard.d.ts.map +1 -0
  463. package/lib/types/components/SuggestionCard.js +77 -0
  464. package/lib/types/components/SyntaxText.d.ts +15 -0
  465. package/lib/types/components/SyntaxText.d.ts.map +1 -0
  466. package/lib/types/components/SyntaxText.js +34 -0
  467. package/lib/types/components/ThemePicker.d.ts +27 -0
  468. package/lib/types/components/ThemePicker.d.ts.map +1 -0
  469. package/lib/types/components/ThemePicker.js +55 -0
  470. package/lib/types/components/ThinkingToggle.d.ts +13 -0
  471. package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
  472. package/lib/types/components/ThinkingToggle.js +25 -0
  473. package/lib/types/components/TimelineRail.d.ts +53 -0
  474. package/lib/types/components/TimelineRail.d.ts.map +1 -0
  475. package/lib/types/components/TimelineRail.js +197 -0
  476. package/lib/types/components/TipsPanel.d.ts +14 -0
  477. package/lib/types/components/TipsPanel.d.ts.map +1 -0
  478. package/lib/types/components/TipsPanel.js +37 -0
  479. package/lib/types/components/ToolUseLoader.d.ts +18 -0
  480. package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
  481. package/lib/types/components/ToolUseLoader.js +51 -0
  482. package/lib/types/components/Tooltip.d.ts +67 -0
  483. package/lib/types/components/Tooltip.d.ts.map +1 -0
  484. package/lib/types/components/Tooltip.js +266 -0
  485. package/lib/types/components/TurnInterruptedRow.d.ts +6 -0
  486. package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -0
  487. package/lib/types/components/TurnInterruptedRow.js +9 -0
  488. package/lib/types/components/Whale.d.ts +42 -0
  489. package/lib/types/components/Whale.d.ts.map +1 -0
  490. package/lib/types/components/Whale.js +108 -0
  491. package/lib/types/components/WorkingSpinner.d.ts +26 -0
  492. package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
  493. package/lib/types/components/WorkingSpinner.js +67 -0
  494. package/lib/types/components/WorkspaceFlowPicker.d.ts +20 -0
  495. package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
  496. package/lib/types/components/WorkspaceFlowPicker.js +21 -0
  497. package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
  498. package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
  499. package/lib/types/components/WorkspaceMenuPicker.js +19 -0
  500. package/lib/types/components/WorkspacePicker.d.ts +12 -0
  501. package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
  502. package/lib/types/components/WorkspacePicker.js +13 -0
  503. package/lib/types/components/activityFrames.d.ts +23 -0
  504. package/lib/types/components/activityFrames.d.ts.map +1 -0
  505. package/lib/types/components/activityFrames.js +31 -0
  506. package/lib/types/components/approvals/ApprovalPanel.d.ts +24 -0
  507. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -0
  508. package/lib/types/components/approvals/ApprovalPanel.js +53 -0
  509. package/lib/types/components/bigfont.d.ts +28 -0
  510. package/lib/types/components/bigfont.d.ts.map +1 -0
  511. package/lib/types/components/bigfont.js +91 -0
  512. package/lib/types/components/design-system/Byline.d.ts +14 -0
  513. package/lib/types/components/design-system/Byline.d.ts.map +1 -0
  514. package/lib/types/components/design-system/Byline.js +17 -0
  515. package/lib/types/components/design-system/Divider.d.ts +61 -0
  516. package/lib/types/components/design-system/Divider.d.ts.map +1 -0
  517. package/lib/types/components/design-system/Divider.js +115 -0
  518. package/lib/types/components/design-system/HintLine.d.ts +11 -0
  519. package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
  520. package/lib/types/components/design-system/HintLine.js +14 -0
  521. package/lib/types/components/design-system/ListItem.d.ts +42 -0
  522. package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
  523. package/lib/types/components/design-system/ListItem.js +84 -0
  524. package/lib/types/components/design-system/LoadingState.d.ts +19 -0
  525. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
  526. package/lib/types/components/design-system/LoadingState.js +22 -0
  527. package/lib/types/components/design-system/Pane.d.ts +17 -0
  528. package/lib/types/components/design-system/Pane.d.ts.map +1 -0
  529. package/lib/types/components/design-system/Pane.js +15 -0
  530. package/lib/types/components/design-system/ProgressBar.d.ts +21 -0
  531. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
  532. package/lib/types/components/design-system/ProgressBar.js +26 -0
  533. package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
  534. package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
  535. package/lib/types/components/design-system/StatusIcon.js +20 -0
  536. package/lib/types/components/design-system/ThemeProvider.d.ts +21 -0
  537. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
  538. package/lib/types/components/design-system/ThemeProvider.js +256 -0
  539. package/lib/types/components/design-system/ThemedBox.d.ts +60 -0
  540. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
  541. package/lib/types/components/design-system/ThemedBox.js +29 -0
  542. package/lib/types/components/design-system/ThemedText.d.ts +61 -0
  543. package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
  544. package/lib/types/components/design-system/ThemedText.js +42 -0
  545. package/lib/types/components/listWindow.d.ts +26 -0
  546. package/lib/types/components/listWindow.d.ts.map +1 -0
  547. package/lib/types/components/listWindow.js +47 -0
  548. package/lib/types/components/messages/AssistantTextMessage.d.ts +20 -0
  549. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
  550. package/lib/types/components/messages/AssistantTextMessage.js +18 -0
  551. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +40 -0
  552. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
  553. package/lib/types/components/messages/AssistantThinkingMessage.js +84 -0
  554. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +72 -0
  555. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
  556. package/lib/types/components/messages/AssistantToolUseMessage.js +517 -0
  557. package/lib/types/components/messages/MessageMetadata.d.ts +14 -0
  558. package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
  559. package/lib/types/components/messages/MessageMetadata.js +19 -0
  560. package/lib/types/components/messages/TranscriptImages.d.ts +21 -0
  561. package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -0
  562. package/lib/types/components/messages/TranscriptImages.js +83 -0
  563. package/lib/types/components/messages/UserPromptMessage.d.ts +18 -0
  564. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
  565. package/lib/types/components/messages/UserPromptMessage.js +28 -0
  566. package/lib/types/components/messages/imageInspection.d.ts +33 -0
  567. package/lib/types/components/messages/imageInspection.d.ts.map +1 -0
  568. package/lib/types/components/messages/imageInspection.js +107 -0
  569. package/lib/types/components/messages/originalImage.d.ts +5 -0
  570. package/lib/types/components/messages/originalImage.d.ts.map +1 -0
  571. package/lib/types/components/messages/originalImage.js +56 -0
  572. package/lib/types/components/messages/transcriptImageDecode.d.ts +9 -0
  573. package/lib/types/components/messages/transcriptImageDecode.d.ts.map +1 -0
  574. package/lib/types/components/messages/transcriptImageDecode.js +144 -0
  575. package/lib/types/components/messages/useImageInspection.d.ts +10 -0
  576. package/lib/types/components/messages/useImageInspection.d.ts.map +1 -0
  577. package/lib/types/components/messages/useImageInspection.js +91 -0
  578. package/lib/types/components/overlayBudget.d.ts +39 -0
  579. package/lib/types/components/overlayBudget.d.ts.map +1 -0
  580. package/lib/types/components/overlayBudget.js +43 -0
  581. package/lib/types/components/promptDraftCache.d.ts +102 -0
  582. package/lib/types/components/promptDraftCache.d.ts.map +1 -0
  583. package/lib/types/components/promptDraftCache.js +76 -0
  584. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +94 -0
  585. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
  586. package/lib/types/components/questions/AskUserQuestionPanel.js +527 -0
  587. package/lib/types/components/questions/PlanReviewPanel.d.ts +55 -0
  588. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -0
  589. package/lib/types/components/questions/PlanReviewPanel.js +351 -0
  590. package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
  591. package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
  592. package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
  593. package/lib/types/components/sessions/SessionListRow.d.ts +58 -0
  594. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -0
  595. package/lib/types/components/sessions/SessionListRow.js +108 -0
  596. package/lib/types/components/sessions/SessionPreview.d.ts +25 -0
  597. package/lib/types/components/sessions/SessionPreview.d.ts.map +1 -0
  598. package/lib/types/components/sessions/SessionPreview.js +62 -0
  599. package/lib/types/components/sessions/WorkspaceListRow.d.ts +17 -0
  600. package/lib/types/components/sessions/WorkspaceListRow.d.ts.map +1 -0
  601. package/lib/types/components/sessions/WorkspaceListRow.js +27 -0
  602. package/lib/types/components/shimmer.d.ts +35 -0
  603. package/lib/types/components/shimmer.d.ts.map +1 -0
  604. package/lib/types/components/shimmer.js +43 -0
  605. package/lib/types/components/smoothReveal.d.ts +57 -0
  606. package/lib/types/components/smoothReveal.d.ts.map +1 -0
  607. package/lib/types/components/smoothReveal.js +305 -0
  608. package/lib/types/components/trajectory/HotspotView.d.ts +20 -0
  609. package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
  610. package/lib/types/components/trajectory/HotspotView.js +89 -0
  611. package/lib/types/components/trajectory/Inspector.d.ts +31 -0
  612. package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
  613. package/lib/types/components/trajectory/Inspector.js +67 -0
  614. package/lib/types/components/trajectory/Ledger.d.ts +28 -0
  615. package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
  616. package/lib/types/components/trajectory/Ledger.js +130 -0
  617. package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
  618. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
  619. package/lib/types/components/trajectory/MiniWake.js +99 -0
  620. package/lib/types/components/trajectory/WaveBand.d.ts +42 -0
  621. package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
  622. package/lib/types/components/trajectory/WaveBand.js +150 -0
  623. package/lib/types/components/whaleFrames.d.ts +81 -0
  624. package/lib/types/components/whaleFrames.d.ts.map +1 -0
  625. package/lib/types/components/whaleFrames.js +768 -0
  626. package/lib/types/components/whaleIdle.d.ts +66 -0
  627. package/lib/types/components/whaleIdle.d.ts.map +1 -0
  628. package/lib/types/components/whaleIdle.js +174 -0
  629. package/lib/types/components/whaleLayers.d.ts +28 -0
  630. package/lib/types/components/whaleLayers.d.ts.map +1 -0
  631. package/lib/types/components/whaleLayers.js +90 -0
  632. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
  633. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
  634. package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
  635. package/lib/types/customTheme.d.ts +108 -0
  636. package/lib/types/customTheme.d.ts.map +1 -0
  637. package/lib/types/customTheme.js +281 -0
  638. package/lib/types/deepseekBalance.d.ts +19 -0
  639. package/lib/types/deepseekBalance.d.ts.map +1 -0
  640. package/lib/types/deepseekBalance.js +72 -0
  641. package/lib/types/deepseekPricing.d.ts +83 -0
  642. package/lib/types/deepseekPricing.d.ts.map +1 -0
  643. package/lib/types/deepseekPricing.js +140 -0
  644. package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
  645. package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
  646. package/lib/types/dsh-adapter/activity-store.js +359 -0
  647. package/lib/types/dsh-adapter/agent-view.d.ts +66 -0
  648. package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -0
  649. package/lib/types/dsh-adapter/agent-view.js +153 -0
  650. package/lib/types/dsh-adapter/approvals.d.ts +225 -0
  651. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
  652. package/lib/types/dsh-adapter/approvals.js +465 -0
  653. package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
  654. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
  655. package/lib/types/dsh-adapter/bundled-presets.js +80 -0
  656. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +20 -0
  657. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -0
  658. package/lib/types/dsh-adapter/channel/action-readiness.js +86 -0
  659. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +64 -0
  660. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -0
  661. package/lib/types/dsh-adapter/channel/agent-view-projection.js +312 -0
  662. package/lib/types/dsh-adapter/channel/background-action.d.ts +41 -0
  663. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -0
  664. package/lib/types/dsh-adapter/channel/background-action.js +110 -0
  665. package/lib/types/dsh-adapter/channel/binding-events.d.ts +67 -0
  666. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
  667. package/lib/types/dsh-adapter/channel/binding-events.js +170 -0
  668. package/lib/types/dsh-adapter/channel/binding.d.ts +58 -0
  669. package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
  670. package/lib/types/dsh-adapter/channel/binding.js +287 -0
  671. package/lib/types/dsh-adapter/channel/command-completions.d.ts +29 -0
  672. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -0
  673. package/lib/types/dsh-adapter/channel/command-completions.js +94 -0
  674. package/lib/types/dsh-adapter/channel/commands.d.ts +8 -0
  675. package/lib/types/dsh-adapter/channel/commands.d.ts.map +1 -0
  676. package/lib/types/dsh-adapter/channel/commands.js +9 -0
  677. package/lib/types/dsh-adapter/channel/compaction.d.ts +18 -0
  678. package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
  679. package/lib/types/dsh-adapter/channel/compaction.js +114 -0
  680. package/lib/types/dsh-adapter/channel/composer-images.d.ts +62 -0
  681. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
  682. package/lib/types/dsh-adapter/channel/composer-images.js +316 -0
  683. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts +15 -0
  684. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -0
  685. package/lib/types/dsh-adapter/channel/composer-mentions.js +200 -0
  686. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +34 -0
  687. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
  688. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +31 -0
  689. package/lib/types/dsh-adapter/channel/decisions.d.ts +19 -0
  690. package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -0
  691. package/lib/types/dsh-adapter/channel/decisions.js +90 -0
  692. package/lib/types/dsh-adapter/channel/emitter.d.ts +10 -0
  693. package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -0
  694. package/lib/types/dsh-adapter/channel/emitter.js +71 -0
  695. package/lib/types/dsh-adapter/channel/external-commands.d.ts +31 -0
  696. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -0
  697. package/lib/types/dsh-adapter/channel/external-commands.js +187 -0
  698. package/lib/types/dsh-adapter/channel/file-actions.d.ts +20 -0
  699. package/lib/types/dsh-adapter/channel/file-actions.d.ts.map +1 -0
  700. package/lib/types/dsh-adapter/channel/file-actions.js +45 -0
  701. package/lib/types/dsh-adapter/channel/ide-selection.d.ts +58 -0
  702. package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
  703. package/lib/types/dsh-adapter/channel/ide-selection.js +226 -0
  704. package/lib/types/dsh-adapter/channel/input-actions.d.ts +13 -0
  705. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -0
  706. package/lib/types/dsh-adapter/channel/input-actions.js +135 -0
  707. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +42 -0
  708. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
  709. package/lib/types/dsh-adapter/channel/input-delivery.js +313 -0
  710. package/lib/types/dsh-adapter/channel/job-projection.d.ts +28 -0
  711. package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -0
  712. package/lib/types/dsh-adapter/channel/job-projection.js +150 -0
  713. package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts +9 -0
  714. package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts.map +1 -0
  715. package/lib/types/dsh-adapter/channel/lifetime-resources.js +33 -0
  716. package/lib/types/dsh-adapter/channel/loaded-context.d.ts +40 -0
  717. package/lib/types/dsh-adapter/channel/loaded-context.d.ts.map +1 -0
  718. package/lib/types/dsh-adapter/channel/loaded-context.js +62 -0
  719. package/lib/types/dsh-adapter/channel/local-actions.d.ts +54 -0
  720. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
  721. package/lib/types/dsh-adapter/channel/local-actions.js +109 -0
  722. package/lib/types/dsh-adapter/channel/mentions.d.ts +29 -0
  723. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -0
  724. package/lib/types/dsh-adapter/channel/mentions.js +235 -0
  725. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +30 -0
  726. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -0
  727. package/lib/types/dsh-adapter/channel/mode-actions.js +247 -0
  728. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +35 -0
  729. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -0
  730. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +199 -0
  731. package/lib/types/dsh-adapter/channel/mode-permission.d.ts +58 -0
  732. package/lib/types/dsh-adapter/channel/mode-permission.d.ts.map +1 -0
  733. package/lib/types/dsh-adapter/channel/mode-permission.js +240 -0
  734. package/lib/types/dsh-adapter/channel/mode-roster.d.ts +51 -0
  735. package/lib/types/dsh-adapter/channel/mode-roster.d.ts.map +1 -0
  736. package/lib/types/dsh-adapter/channel/mode-roster.js +119 -0
  737. package/lib/types/dsh-adapter/channel/model-actions.d.ts +49 -0
  738. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
  739. package/lib/types/dsh-adapter/channel/model-actions.js +351 -0
  740. package/lib/types/dsh-adapter/channel/model-switch.d.ts +31 -0
  741. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
  742. package/lib/types/dsh-adapter/channel/model-switch.js +116 -0
  743. package/lib/types/dsh-adapter/channel/notifications.d.ts +9 -0
  744. package/lib/types/dsh-adapter/channel/notifications.d.ts.map +1 -0
  745. package/lib/types/dsh-adapter/channel/notifications.js +24 -0
  746. package/lib/types/dsh-adapter/channel/owner.d.ts +18 -0
  747. package/lib/types/dsh-adapter/channel/owner.d.ts.map +1 -0
  748. package/lib/types/dsh-adapter/channel/owner.js +73 -0
  749. package/lib/types/dsh-adapter/channel/paths.d.ts +31 -0
  750. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -0
  751. package/lib/types/dsh-adapter/channel/paths.js +147 -0
  752. package/lib/types/dsh-adapter/channel/permissions.d.ts +40 -0
  753. package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -0
  754. package/lib/types/dsh-adapter/channel/permissions.js +187 -0
  755. package/lib/types/dsh-adapter/channel/preferences.d.ts +3 -0
  756. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -0
  757. package/lib/types/dsh-adapter/channel/preferences.js +103 -0
  758. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts +13 -0
  759. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -0
  760. package/lib/types/dsh-adapter/channel/projection-helpers.js +63 -0
  761. package/lib/types/dsh-adapter/channel/projection.d.ts +44 -0
  762. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
  763. package/lib/types/dsh-adapter/channel/projection.js +1031 -0
  764. package/lib/types/dsh-adapter/channel/reports.d.ts +32 -0
  765. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -0
  766. package/lib/types/dsh-adapter/channel/reports.js +163 -0
  767. package/lib/types/dsh-adapter/channel/session-actions.d.ts +13 -0
  768. package/lib/types/dsh-adapter/channel/session-actions.d.ts.map +1 -0
  769. package/lib/types/dsh-adapter/channel/session-actions.js +29 -0
  770. package/lib/types/dsh-adapter/channel/session-adoption.d.ts +32 -0
  771. package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -0
  772. package/lib/types/dsh-adapter/channel/session-adoption.js +36 -0
  773. package/lib/types/dsh-adapter/channel/session-fork.d.ts +19 -0
  774. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -0
  775. package/lib/types/dsh-adapter/channel/session-fork.js +109 -0
  776. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +35 -0
  777. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -0
  778. package/lib/types/dsh-adapter/channel/session-live-adoption.js +64 -0
  779. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +91 -0
  780. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
  781. package/lib/types/dsh-adapter/channel/session-metadata.js +220 -0
  782. package/lib/types/dsh-adapter/channel/session-reset.d.ts +11 -0
  783. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -0
  784. package/lib/types/dsh-adapter/channel/session-reset.js +43 -0
  785. package/lib/types/dsh-adapter/channel/session-resume.d.ts +65 -0
  786. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
  787. package/lib/types/dsh-adapter/channel/session-resume.js +438 -0
  788. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +19 -0
  789. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -0
  790. package/lib/types/dsh-adapter/channel/session-rewind.js +146 -0
  791. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +19 -0
  792. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -0
  793. package/lib/types/dsh-adapter/channel/session-tree-actions.js +154 -0
  794. package/lib/types/dsh-adapter/channel/session-tree.d.ts +10 -0
  795. package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -0
  796. package/lib/types/dsh-adapter/channel/session-tree.js +503 -0
  797. package/lib/types/dsh-adapter/channel/settings-host.d.ts +4 -0
  798. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -0
  799. package/lib/types/dsh-adapter/channel/settings-host.js +257 -0
  800. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +33 -0
  801. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -0
  802. package/lib/types/dsh-adapter/channel/skill-catalog.js +215 -0
  803. package/lib/types/dsh-adapter/channel/state.d.ts +51 -0
  804. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -0
  805. package/lib/types/dsh-adapter/channel/state.js +31 -0
  806. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +67 -0
  807. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
  808. package/lib/types/dsh-adapter/channel/subagent-projection.js +307 -0
  809. package/lib/types/dsh-adapter/channel/transcript.d.ts +73 -0
  810. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -0
  811. package/lib/types/dsh-adapter/channel/transcript.js +306 -0
  812. package/lib/types/dsh-adapter/channel/types.d.ts +167 -0
  813. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -0
  814. package/lib/types/dsh-adapter/channel/types.js +1 -0
  815. package/lib/types/dsh-adapter/channel/usage.d.ts +13 -0
  816. package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -0
  817. package/lib/types/dsh-adapter/channel/usage.js +48 -0
  818. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +23 -0
  819. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
  820. package/lib/types/dsh-adapter/channel/workspace-actions.js +96 -0
  821. package/lib/types/dsh-adapter/channel-facade-actions.d.ts +25 -0
  822. package/lib/types/dsh-adapter/channel-facade-actions.d.ts.map +1 -0
  823. package/lib/types/dsh-adapter/channel-facade-actions.js +55 -0
  824. package/lib/types/dsh-adapter/channel-scene-outlet.d.ts +6 -0
  825. package/lib/types/dsh-adapter/channel-scene-outlet.d.ts.map +1 -0
  826. package/lib/types/dsh-adapter/channel-scene-outlet.js +13 -0
  827. package/lib/types/dsh-adapter/channel-ui.d.ts +9 -0
  828. package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -0
  829. package/lib/types/dsh-adapter/channel-ui.js +128 -0
  830. package/lib/types/dsh-adapter/channel.d.ts +23 -0
  831. package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
  832. package/lib/types/dsh-adapter/channel.js +999 -0
  833. package/lib/types/dsh-adapter/childStderr.d.ts +63 -0
  834. package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
  835. package/lib/types/dsh-adapter/childStderr.js +180 -0
  836. package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
  837. package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
  838. package/lib/types/dsh-adapter/command-attribution.js +93 -0
  839. package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
  840. package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
  841. package/lib/types/dsh-adapter/command-errors.js +63 -0
  842. package/lib/types/dsh-adapter/command-trees.d.ts +34 -0
  843. package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
  844. package/lib/types/dsh-adapter/command-trees.js +111 -0
  845. package/lib/types/dsh-adapter/compat/index.d.ts +29 -0
  846. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
  847. package/lib/types/dsh-adapter/compat/index.js +28 -0
  848. package/lib/types/dsh-adapter/compat/liveSession.d.ts +79 -0
  849. package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -0
  850. package/lib/types/dsh-adapter/compat/liveSession.js +223 -0
  851. package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
  852. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
  853. package/lib/types/dsh-adapter/compat/messages.js +15 -0
  854. package/lib/types/dsh-adapter/compat/persistence.d.ts +21 -0
  855. package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -0
  856. package/lib/types/dsh-adapter/compat/persistence.js +17 -0
  857. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +309 -0
  858. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
  859. package/lib/types/dsh-adapter/compat/sessionLog.js +1177 -0
  860. package/lib/types/dsh-adapter/compat/settings.d.ts +35 -0
  861. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
  862. package/lib/types/dsh-adapter/compat/settings.js +57 -0
  863. package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
  864. package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
  865. package/lib/types/dsh-adapter/compat/shell.js +11 -0
  866. package/lib/types/dsh-adapter/component-identity.d.ts +33 -0
  867. package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
  868. package/lib/types/dsh-adapter/component-identity.js +108 -0
  869. package/lib/types/dsh-adapter/contract.d.ts +91 -0
  870. package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
  871. package/lib/types/dsh-adapter/contract.js +276 -0
  872. package/lib/types/dsh-adapter/credentialRefGuard.d.ts +40 -0
  873. package/lib/types/dsh-adapter/credentialRefGuard.d.ts.map +1 -0
  874. package/lib/types/dsh-adapter/credentialRefGuard.js +43 -0
  875. package/lib/types/dsh-adapter/decision-guard.d.ts +128 -0
  876. package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
  877. package/lib/types/dsh-adapter/decision-guard.js +460 -0
  878. package/lib/types/dsh-adapter/dialogs.d.ts +145 -0
  879. package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
  880. package/lib/types/dsh-adapter/dialogs.js +329 -0
  881. package/lib/types/dsh-adapter/effect-ledger.d.ts +96 -0
  882. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
  883. package/lib/types/dsh-adapter/effect-ledger.js +290 -0
  884. package/lib/types/dsh-adapter/extension-events.d.ts +186 -0
  885. package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
  886. package/lib/types/dsh-adapter/extension-events.js +187 -0
  887. package/lib/types/dsh-adapter/extensions.d.ts +36 -0
  888. package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
  889. package/lib/types/dsh-adapter/extensions.js +51 -0
  890. package/lib/types/dsh-adapter/host-access.d.ts +37 -0
  891. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -0
  892. package/lib/types/dsh-adapter/host-access.js +652 -0
  893. package/lib/types/dsh-adapter/host-grants.d.ts +23 -0
  894. package/lib/types/dsh-adapter/host-grants.d.ts.map +1 -0
  895. package/lib/types/dsh-adapter/host-grants.js +45 -0
  896. package/lib/types/dsh-adapter/ide-channel.d.ts +224 -0
  897. package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
  898. package/lib/types/dsh-adapter/ide-channel.js +556 -0
  899. package/lib/types/dsh-adapter/index.d.ts +151 -0
  900. package/lib/types/dsh-adapter/index.d.ts.map +1 -0
  901. package/lib/types/dsh-adapter/index.js +119 -0
  902. package/lib/types/dsh-adapter/inject-channel.d.ts +108 -0
  903. package/lib/types/dsh-adapter/inject-channel.d.ts.map +1 -0
  904. package/lib/types/dsh-adapter/inject-channel.js +247 -0
  905. package/lib/types/dsh-adapter/invariant.d.ts +20 -0
  906. package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
  907. package/lib/types/dsh-adapter/invariant.js +26 -0
  908. package/lib/types/dsh-adapter/jobs.d.ts +101 -0
  909. package/lib/types/dsh-adapter/jobs.d.ts.map +1 -0
  910. package/lib/types/dsh-adapter/jobs.js +177 -0
  911. package/lib/types/dsh-adapter/message-observer.d.ts +186 -0
  912. package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
  913. package/lib/types/dsh-adapter/message-observer.js +682 -0
  914. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
  915. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
  916. package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +191 -0
  917. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
  918. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
  919. package/lib/types/dsh-adapter/migrate/adapters/codex.js +133 -0
  920. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
  921. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
  922. package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +175 -0
  923. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
  924. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
  925. package/lib/types/dsh-adapter/migrate/adapters/omp.js +132 -0
  926. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +6 -0
  927. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
  928. package/lib/types/dsh-adapter/migrate/adapters/scan.js +38 -0
  929. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
  930. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
  931. package/lib/types/dsh-adapter/migrate/adapters/zcode.js +107 -0
  932. package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
  933. package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
  934. package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
  935. package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
  936. package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
  937. package/lib/types/dsh-adapter/migrate/cli.js +105 -0
  938. package/lib/types/dsh-adapter/migrate/index.d.ts +29 -0
  939. package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
  940. package/lib/types/dsh-adapter/migrate/index.js +108 -0
  941. package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
  942. package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
  943. package/lib/types/dsh-adapter/migrate/picker.js +86 -0
  944. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
  945. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
  946. package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
  947. package/lib/types/dsh-adapter/migrate/sessionize.d.ts +19 -0
  948. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
  949. package/lib/types/dsh-adapter/migrate/sessionize.js +101 -0
  950. package/lib/types/dsh-adapter/migrate/types.d.ts +52 -0
  951. package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
  952. package/lib/types/dsh-adapter/migrate/types.js +11 -0
  953. package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
  954. package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
  955. package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
  956. package/lib/types/dsh-adapter/packaged-presets.d.ts +22 -0
  957. package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -0
  958. package/lib/types/dsh-adapter/packaged-presets.js +94 -0
  959. package/lib/types/dsh-adapter/plugin-host.d.ts +205 -0
  960. package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
  961. package/lib/types/dsh-adapter/plugin-host.js +762 -0
  962. package/lib/types/dsh-adapter/plugin-storage.d.ts +118 -0
  963. package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
  964. package/lib/types/dsh-adapter/plugin-storage.js +536 -0
  965. package/lib/types/dsh-adapter/plugin.d.ts +70 -0
  966. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
  967. package/lib/types/dsh-adapter/plugin.js +2140 -0
  968. package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
  969. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
  970. package/lib/types/dsh-adapter/plugins-info.js +293 -0
  971. package/lib/types/dsh-adapter/preset-resolution.d.ts +57 -0
  972. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -0
  973. package/lib/types/dsh-adapter/preset-resolution.js +52 -0
  974. package/lib/types/dsh-adapter/presets.d.ts +110 -0
  975. package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
  976. package/lib/types/dsh-adapter/presets.js +161 -0
  977. package/lib/types/dsh-adapter/promptDebug.d.ts +4 -0
  978. package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -0
  979. package/lib/types/dsh-adapter/promptDebug.js +163 -0
  980. package/lib/types/dsh-adapter/providerGuard.d.ts +75 -0
  981. package/lib/types/dsh-adapter/providerGuard.d.ts.map +1 -0
  982. package/lib/types/dsh-adapter/providerGuard.js +104 -0
  983. package/lib/types/dsh-adapter/providerWizard.d.ts +42 -0
  984. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
  985. package/lib/types/dsh-adapter/providerWizard.js +921 -0
  986. package/lib/types/dsh-adapter/questions-answerer.d.ts +51 -0
  987. package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -0
  988. package/lib/types/dsh-adapter/questions-answerer.js +64 -0
  989. package/lib/types/dsh-adapter/questions.d.ts +130 -0
  990. package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
  991. package/lib/types/dsh-adapter/questions.js +282 -0
  992. package/lib/types/dsh-adapter/recap.d.ts +41 -0
  993. package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
  994. package/lib/types/dsh-adapter/recap.js +111 -0
  995. package/lib/types/dsh-adapter/renderers.d.ts +58 -0
  996. package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
  997. package/lib/types/dsh-adapter/renderers.js +198 -0
  998. package/lib/types/dsh-adapter/sanitize.d.ts +45 -0
  999. package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
  1000. package/lib/types/dsh-adapter/sanitize.js +84 -0
  1001. package/lib/types/dsh-adapter/scenes.d.ts +87 -0
  1002. package/lib/types/dsh-adapter/scenes.d.ts.map +1 -0
  1003. package/lib/types/dsh-adapter/scenes.js +223 -0
  1004. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
  1005. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
  1006. package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
  1007. package/lib/types/dsh-adapter/sessionTree.d.ts +232 -0
  1008. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
  1009. package/lib/types/dsh-adapter/sessionTree.js +984 -0
  1010. package/lib/types/dsh-adapter/sessions/digest.d.ts +54 -0
  1011. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -0
  1012. package/lib/types/dsh-adapter/sessions/digest.js +478 -0
  1013. package/lib/types/dsh-adapter/sessions/frames.d.ts +103 -0
  1014. package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -0
  1015. package/lib/types/dsh-adapter/sessions/frames.js +263 -0
  1016. package/lib/types/dsh-adapter/sessions/header.d.ts +56 -0
  1017. package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -0
  1018. package/lib/types/dsh-adapter/sessions/header.js +85 -0
  1019. package/lib/types/dsh-adapter/sessions/index.d.ts +17 -0
  1020. package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -0
  1021. package/lib/types/dsh-adapter/sessions/index.js +15 -0
  1022. package/lib/types/dsh-adapter/sessions/list.d.ts +64 -0
  1023. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -0
  1024. package/lib/types/dsh-adapter/sessions/list.js +331 -0
  1025. package/lib/types/dsh-adapter/sessions/recovery.d.ts +17 -0
  1026. package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
  1027. package/lib/types/dsh-adapter/sessions/recovery.js +109 -0
  1028. package/lib/types/dsh-adapter/sessions/store.d.ts +60 -0
  1029. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -0
  1030. package/lib/types/dsh-adapter/sessions/store.js +221 -0
  1031. package/lib/types/dsh-adapter/sessions/types.d.ts +21 -0
  1032. package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -0
  1033. package/lib/types/dsh-adapter/sessions/types.js +1 -0
  1034. package/lib/types/dsh-adapter/settings-sections.d.ts +48 -0
  1035. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -0
  1036. package/lib/types/dsh-adapter/settings-sections.js +253 -0
  1037. package/lib/types/dsh-adapter/settingsEditor.d.ts +100 -0
  1038. package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -0
  1039. package/lib/types/dsh-adapter/settingsEditor.js +238 -0
  1040. package/lib/types/dsh-adapter/sharp.d.ts +10 -0
  1041. package/lib/types/dsh-adapter/sharp.d.ts.map +1 -0
  1042. package/lib/types/dsh-adapter/sharp.js +59 -0
  1043. package/lib/types/dsh-adapter/shortcuts.d.ts +82 -0
  1044. package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
  1045. package/lib/types/dsh-adapter/shortcuts.js +252 -0
  1046. package/lib/types/dsh-adapter/sideQuestion.d.ts +36 -0
  1047. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
  1048. package/lib/types/dsh-adapter/sideQuestion.js +59 -0
  1049. package/lib/types/dsh-adapter/status.d.ts +148 -0
  1050. package/lib/types/dsh-adapter/status.d.ts.map +1 -0
  1051. package/lib/types/dsh-adapter/status.js +435 -0
  1052. package/lib/types/dsh-adapter/subagents.d.ts +64 -0
  1053. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -0
  1054. package/lib/types/dsh-adapter/subagents.js +366 -0
  1055. package/lib/types/dsh-adapter/themes.d.ts +52 -0
  1056. package/lib/types/dsh-adapter/themes.d.ts.map +1 -0
  1057. package/lib/types/dsh-adapter/themes.js +307 -0
  1058. package/lib/types/dsh-adapter/toast.d.ts +80 -0
  1059. package/lib/types/dsh-adapter/toast.d.ts.map +1 -0
  1060. package/lib/types/dsh-adapter/toast.js +171 -0
  1061. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +47 -0
  1062. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
  1063. package/lib/types/dsh-adapter/trajectory/aggregate.js +208 -0
  1064. package/lib/types/dsh-adapter/trajectory/guards.d.ts +196 -0
  1065. package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
  1066. package/lib/types/dsh-adapter/trajectory/guards.js +273 -0
  1067. package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
  1068. package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
  1069. package/lib/types/dsh-adapter/trajectory/index.js +15 -0
  1070. package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
  1071. package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
  1072. package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
  1073. package/lib/types/dsh-adapter/trajectory/projection.d.ts +146 -0
  1074. package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
  1075. package/lib/types/dsh-adapter/trajectory/projection.js +710 -0
  1076. package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
  1077. package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
  1078. package/lib/types/dsh-adapter/trajectory/types.js +70 -0
  1079. package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
  1080. package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
  1081. package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
  1082. package/lib/types/dsh-adapter/transcript-images.d.ts +17 -0
  1083. package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -0
  1084. package/lib/types/dsh-adapter/transcript-images.js +96 -0
  1085. package/lib/types/dsh-adapter/types.d.ts +23 -0
  1086. package/lib/types/dsh-adapter/types.d.ts.map +1 -0
  1087. package/lib/types/dsh-adapter/types.js +1 -0
  1088. package/lib/types/dsh-adapter/workspace.d.ts +22 -0
  1089. package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
  1090. package/lib/types/dsh-adapter/workspace.js +16 -0
  1091. package/lib/types/dsh-adapter/workspaces.d.ts +125 -0
  1092. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
  1093. package/lib/types/dsh-adapter/workspaces.js +543 -0
  1094. package/lib/types/effortPrefs.d.ts +48 -0
  1095. package/lib/types/effortPrefs.d.ts.map +1 -0
  1096. package/lib/types/effortPrefs.js +95 -0
  1097. package/lib/types/extensions.d.ts +18 -0
  1098. package/lib/types/extensions.d.ts.map +1 -0
  1099. package/lib/types/extensions.js +27 -0
  1100. package/lib/types/force-production-react.d.ts +1 -0
  1101. package/lib/types/force-production-react.d.ts.map +1 -0
  1102. package/lib/types/force-production-react.js +12 -0
  1103. package/lib/types/herdr.d.ts +28 -0
  1104. package/lib/types/herdr.d.ts.map +1 -0
  1105. package/lib/types/herdr.js +133 -0
  1106. package/lib/types/history.d.ts +39 -0
  1107. package/lib/types/history.d.ts.map +1 -0
  1108. package/lib/types/history.js +177 -0
  1109. package/lib/types/homePrefs.d.ts +15 -0
  1110. package/lib/types/homePrefs.d.ts.map +1 -0
  1111. package/lib/types/homePrefs.js +53 -0
  1112. package/lib/types/hooks/useBlink.d.ts +10 -0
  1113. package/lib/types/hooks/useBlink.d.ts.map +1 -0
  1114. package/lib/types/hooks/useBlink.js +19 -0
  1115. package/lib/types/hooks/useExternalVersion.d.ts +32 -0
  1116. package/lib/types/hooks/useExternalVersion.d.ts.map +1 -0
  1117. package/lib/types/hooks/useExternalVersion.js +53 -0
  1118. package/lib/types/hooks/useRevealVersion.d.ts +21 -0
  1119. package/lib/types/hooks/useRevealVersion.d.ts.map +1 -0
  1120. package/lib/types/hooks/useRevealVersion.js +33 -0
  1121. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts +10 -0
  1122. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts.map +1 -0
  1123. package/lib/types/hooks/useRuntimeThemeSnapshot.js +32 -0
  1124. package/lib/types/i18n.d.ts +4433 -0
  1125. package/lib/types/i18n.d.ts.map +1 -0
  1126. package/lib/types/i18n.js +1493 -0
  1127. package/lib/types/index.d.ts +3 -0
  1128. package/lib/types/index.d.ts.map +1 -0
  1129. package/lib/types/index.js +4 -0
  1130. package/lib/types/ink/Ansi.d.ts +9 -0
  1131. package/lib/types/ink/Ansi.d.ts.map +1 -0
  1132. package/lib/types/ink/Ansi.js +45 -0
  1133. package/lib/types/ink/bidi.d.ts +18 -0
  1134. package/lib/types/ink/bidi.d.ts.map +1 -0
  1135. package/lib/types/ink/bidi.js +119 -0
  1136. package/lib/types/ink/clearTerminal.d.ts +22 -0
  1137. package/lib/types/ink/clearTerminal.d.ts.map +1 -0
  1138. package/lib/types/ink/clearTerminal.js +72 -0
  1139. package/lib/types/ink/colorize.d.ts +43 -0
  1140. package/lib/types/ink/colorize.d.ts.map +1 -0
  1141. package/lib/types/ink/colorize.js +233 -0
  1142. package/lib/types/ink/components/AlternateScreen.d.ts +8 -0
  1143. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
  1144. package/lib/types/ink/components/AlternateScreen.js +29 -0
  1145. package/lib/types/ink/components/App.d.ts +149 -0
  1146. package/lib/types/ink/components/App.d.ts.map +1 -0
  1147. package/lib/types/ink/components/App.js +1027 -0
  1148. package/lib/types/ink/components/AppContext.d.ts +17 -0
  1149. package/lib/types/ink/components/AppContext.d.ts.map +1 -0
  1150. package/lib/types/ink/components/AppContext.js +12 -0
  1151. package/lib/types/ink/components/Box.d.ts +85 -0
  1152. package/lib/types/ink/components/Box.d.ts.map +1 -0
  1153. package/lib/types/ink/components/Box.js +22 -0
  1154. package/lib/types/ink/components/Button.d.ts +37 -0
  1155. package/lib/types/ink/components/Button.d.ts.map +1 -0
  1156. package/lib/types/ink/components/Button.js +23 -0
  1157. package/lib/types/ink/components/ClockContext.d.ts +17 -0
  1158. package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
  1159. package/lib/types/ink/components/ClockContext.js +99 -0
  1160. package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
  1161. package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
  1162. package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
  1163. package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
  1164. package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
  1165. package/lib/types/ink/components/ErrorOverview.js +49 -0
  1166. package/lib/types/ink/components/Image.d.ts +28 -0
  1167. package/lib/types/ink/components/Image.d.ts.map +1 -0
  1168. package/lib/types/ink/components/Image.js +44 -0
  1169. package/lib/types/ink/components/Link.d.ts +8 -0
  1170. package/lib/types/ink/components/Link.d.ts.map +1 -0
  1171. package/lib/types/ink/components/Link.js +7 -0
  1172. package/lib/types/ink/components/Newline.d.ts +7 -0
  1173. package/lib/types/ink/components/Newline.d.ts.map +1 -0
  1174. package/lib/types/ink/components/Newline.js +5 -0
  1175. package/lib/types/ink/components/NoSelect.d.ts +9 -0
  1176. package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
  1177. package/lib/types/ink/components/NoSelect.js +6 -0
  1178. package/lib/types/ink/components/RawAnsi.d.ts +9 -0
  1179. package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
  1180. package/lib/types/ink/components/RawAnsi.js +7 -0
  1181. package/lib/types/ink/components/ScrollBox.d.ts +78 -0
  1182. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
  1183. package/lib/types/ink/components/ScrollBox.js +309 -0
  1184. package/lib/types/ink/components/Spacer.d.ts +4 -0
  1185. package/lib/types/ink/components/Spacer.d.ts.map +1 -0
  1186. package/lib/types/ink/components/Spacer.js +6 -0
  1187. package/lib/types/ink/components/StdinContext.d.ts +32 -0
  1188. package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
  1189. package/lib/types/ink/components/StdinContext.js +16 -0
  1190. package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
  1191. package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
  1192. package/lib/types/ink/components/TerminalFocusContext.js +11 -0
  1193. package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
  1194. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
  1195. package/lib/types/ink/components/TerminalSizeContext.js +2 -0
  1196. package/lib/types/ink/components/Text.d.ts +64 -0
  1197. package/lib/types/ink/components/Text.d.ts.map +1 -0
  1198. package/lib/types/ink/components/Text.js +19 -0
  1199. package/lib/types/ink/constants.d.ts +12 -0
  1200. package/lib/types/ink/constants.d.ts.map +1 -0
  1201. package/lib/types/ink/constants.js +11 -0
  1202. package/lib/types/ink/cursor.d.ts +11 -0
  1203. package/lib/types/ink/cursor.d.ts.map +1 -0
  1204. package/lib/types/ink/cursor.js +1 -0
  1205. package/lib/types/ink/devtools.d.ts +7 -0
  1206. package/lib/types/ink/devtools.d.ts.map +1 -0
  1207. package/lib/types/ink/devtools.js +1 -0
  1208. package/lib/types/ink/dom.d.ts +194 -0
  1209. package/lib/types/ink/dom.d.ts.map +1 -0
  1210. package/lib/types/ink/dom.js +424 -0
  1211. package/lib/types/ink/events/click-event.d.ts +23 -0
  1212. package/lib/types/ink/events/click-event.d.ts.map +1 -0
  1213. package/lib/types/ink/events/click-event.js +33 -0
  1214. package/lib/types/ink/events/context-menu-event.d.ts +19 -0
  1215. package/lib/types/ink/events/context-menu-event.d.ts.map +1 -0
  1216. package/lib/types/ink/events/context-menu-event.js +20 -0
  1217. package/lib/types/ink/events/dispatcher.d.ts +63 -0
  1218. package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
  1219. package/lib/types/ink/events/dispatcher.js +194 -0
  1220. package/lib/types/ink/events/drag-event.d.ts +44 -0
  1221. package/lib/types/ink/events/drag-event.d.ts.map +1 -0
  1222. package/lib/types/ink/events/drag-event.js +39 -0
  1223. package/lib/types/ink/events/emitter.d.ts +20 -0
  1224. package/lib/types/ink/events/emitter.d.ts.map +1 -0
  1225. package/lib/types/ink/events/emitter.js +43 -0
  1226. package/lib/types/ink/events/event-handlers.d.ts +65 -0
  1227. package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
  1228. package/lib/types/ink/events/event-handlers.js +40 -0
  1229. package/lib/types/ink/events/event.d.ts +19 -0
  1230. package/lib/types/ink/events/event.d.ts.map +1 -0
  1231. package/lib/types/ink/events/event.js +22 -0
  1232. package/lib/types/ink/events/focus-event.d.ts +19 -0
  1233. package/lib/types/ink/events/focus-event.d.ts.map +1 -0
  1234. package/lib/types/ink/events/focus-event.js +21 -0
  1235. package/lib/types/ink/events/input-event.d.ts +72 -0
  1236. package/lib/types/ink/events/input-event.d.ts.map +1 -0
  1237. package/lib/types/ink/events/input-event.js +185 -0
  1238. package/lib/types/ink/events/keyboard-event.d.ts +40 -0
  1239. package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
  1240. package/lib/types/ink/events/keyboard-event.js +65 -0
  1241. package/lib/types/ink/events/paste-event.d.ts +11 -0
  1242. package/lib/types/ink/events/paste-event.d.ts.map +1 -0
  1243. package/lib/types/ink/events/paste-event.js +13 -0
  1244. package/lib/types/ink/events/pointer-event.d.ts +61 -0
  1245. package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
  1246. package/lib/types/ink/events/pointer-event.js +61 -0
  1247. package/lib/types/ink/events/resize-event.d.ts +13 -0
  1248. package/lib/types/ink/events/resize-event.d.ts.map +1 -0
  1249. package/lib/types/ink/events/resize-event.js +16 -0
  1250. package/lib/types/ink/events/terminal-event.d.ts +112 -0
  1251. package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
  1252. package/lib/types/ink/events/terminal-event.js +131 -0
  1253. package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
  1254. package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
  1255. package/lib/types/ink/events/terminal-focus-event.js +18 -0
  1256. package/lib/types/ink/events/wheel-event.d.ts +17 -0
  1257. package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
  1258. package/lib/types/ink/events/wheel-event.js +20 -0
  1259. package/lib/types/ink/flush-tick.d.ts +26 -0
  1260. package/lib/types/ink/flush-tick.d.ts.map +1 -0
  1261. package/lib/types/ink/flush-tick.js +31 -0
  1262. package/lib/types/ink/focus.d.ts +74 -0
  1263. package/lib/types/ink/focus.d.ts.map +1 -0
  1264. package/lib/types/ink/focus.js +188 -0
  1265. package/lib/types/ink/frame.d.ts +128 -0
  1266. package/lib/types/ink/frame.d.ts.map +1 -0
  1267. package/lib/types/ink/frame.js +43 -0
  1268. package/lib/types/ink/geometry-trace.d.ts +51 -0
  1269. package/lib/types/ink/geometry-trace.d.ts.map +1 -0
  1270. package/lib/types/ink/geometry-trace.js +83 -0
  1271. package/lib/types/ink/get-max-width.d.ts +12 -0
  1272. package/lib/types/ink/get-max-width.d.ts.map +1 -0
  1273. package/lib/types/ink/get-max-width.js +12 -0
  1274. package/lib/types/ink/hit-test.d.ts +181 -0
  1275. package/lib/types/ink/hit-test.d.ts.map +1 -0
  1276. package/lib/types/ink/hit-test.js +540 -0
  1277. package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
  1278. package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
  1279. package/lib/types/ink/hooks/use-animation-frame.js +48 -0
  1280. package/lib/types/ink/hooks/use-app.d.ts +7 -0
  1281. package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
  1282. package/lib/types/ink/hooks/use-app.js +7 -0
  1283. package/lib/types/ink/hooks/use-copy-on-select.d.ts +26 -0
  1284. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
  1285. package/lib/types/ink/hooks/use-copy-on-select.js +54 -0
  1286. package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
  1287. package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
  1288. package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
  1289. package/lib/types/ink/hooks/use-input.d.ts +41 -0
  1290. package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
  1291. package/lib/types/ink/hooks/use-input.js +81 -0
  1292. package/lib/types/ink/hooks/use-interval.d.ts +23 -0
  1293. package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
  1294. package/lib/types/ink/hooks/use-interval.js +58 -0
  1295. package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
  1296. package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
  1297. package/lib/types/ink/hooks/use-search-highlight.js +35 -0
  1298. package/lib/types/ink/hooks/use-selection.d.ts +44 -0
  1299. package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
  1300. package/lib/types/ink/hooks/use-selection.js +64 -0
  1301. package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
  1302. package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
  1303. package/lib/types/ink/hooks/use-stdin.js +8 -0
  1304. package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
  1305. package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
  1306. package/lib/types/ink/hooks/use-tab-status.js +58 -0
  1307. package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
  1308. package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
  1309. package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
  1310. package/lib/types/ink/hooks/use-terminal-images.d.ts +14 -0
  1311. package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -0
  1312. package/lib/types/ink/hooks/use-terminal-images.js +22 -0
  1313. package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
  1314. package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
  1315. package/lib/types/ink/hooks/use-terminal-size.js +12 -0
  1316. package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
  1317. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
  1318. package/lib/types/ink/hooks/use-terminal-title.js +30 -0
  1319. package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
  1320. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
  1321. package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
  1322. package/lib/types/ink/ink.d.ts +571 -0
  1323. package/lib/types/ink/ink.d.ts.map +1 -0
  1324. package/lib/types/ink/ink.js +2818 -0
  1325. package/lib/types/ink/input-suppression.d.ts +20 -0
  1326. package/lib/types/ink/input-suppression.d.ts.map +1 -0
  1327. package/lib/types/ink/input-suppression.js +26 -0
  1328. package/lib/types/ink/instances.d.ts +10 -0
  1329. package/lib/types/ink/instances.d.ts.map +1 -0
  1330. package/lib/types/ink/instances.js +13 -0
  1331. package/lib/types/ink/kitty-graphics.d.ts +41 -0
  1332. package/lib/types/ink/kitty-graphics.d.ts.map +1 -0
  1333. package/lib/types/ink/kitty-graphics.js +229 -0
  1334. package/lib/types/ink/layout/engine.d.ts +7 -0
  1335. package/lib/types/ink/layout/engine.d.ts.map +1 -0
  1336. package/lib/types/ink/layout/engine.js +8 -0
  1337. package/lib/types/ink/layout/geometry.d.ts +86 -0
  1338. package/lib/types/ink/layout/geometry.d.ts.map +1 -0
  1339. package/lib/types/ink/layout/geometry.js +95 -0
  1340. package/lib/types/ink/layout/node.d.ts +153 -0
  1341. package/lib/types/ink/layout/node.d.ts.map +1 -0
  1342. package/lib/types/ink/layout/node.js +72 -0
  1343. package/lib/types/ink/layout/yoga.d.ts +70 -0
  1344. package/lib/types/ink/layout/yoga.d.ts.map +1 -0
  1345. package/lib/types/ink/layout/yoga.js +252 -0
  1346. package/lib/types/ink/line-width-cache.d.ts +9 -0
  1347. package/lib/types/ink/line-width-cache.d.ts.map +1 -0
  1348. package/lib/types/ink/line-width-cache.js +45 -0
  1349. package/lib/types/ink/log-update.d.ts +57 -0
  1350. package/lib/types/ink/log-update.d.ts.map +1 -0
  1351. package/lib/types/ink/log-update.js +1000 -0
  1352. package/lib/types/ink/measure-element.d.ts +19 -0
  1353. package/lib/types/ink/measure-element.d.ts.map +1 -0
  1354. package/lib/types/ink/measure-element.js +10 -0
  1355. package/lib/types/ink/measure-text.d.ts +13 -0
  1356. package/lib/types/ink/measure-text.d.ts.map +1 -0
  1357. package/lib/types/ink/measure-text.js +38 -0
  1358. package/lib/types/ink/node-cache.d.ts +54 -0
  1359. package/lib/types/ink/node-cache.d.ts.map +1 -0
  1360. package/lib/types/ink/node-cache.js +45 -0
  1361. package/lib/types/ink/optimizer.d.ts +18 -0
  1362. package/lib/types/ink/optimizer.d.ts.map +1 -0
  1363. package/lib/types/ink/optimizer.js +83 -0
  1364. package/lib/types/ink/output.d.ts +300 -0
  1365. package/lib/types/ink/output.d.ts.map +1 -0
  1366. package/lib/types/ink/output.js +1205 -0
  1367. package/lib/types/ink/parse-keypress.d.ts +217 -0
  1368. package/lib/types/ink/parse-keypress.d.ts.map +1 -0
  1369. package/lib/types/ink/parse-keypress.js +1550 -0
  1370. package/lib/types/ink/reconciler.d.ts +43 -0
  1371. package/lib/types/ink/reconciler.d.ts.map +1 -0
  1372. package/lib/types/ink/reconciler.js +414 -0
  1373. package/lib/types/ink/render-border.d.ts +41 -0
  1374. package/lib/types/ink/render-border.d.ts.map +1 -0
  1375. package/lib/types/ink/render-border.js +159 -0
  1376. package/lib/types/ink/render-node-to-output.d.ts +199 -0
  1377. package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
  1378. package/lib/types/ink/render-node-to-output.js +1758 -0
  1379. package/lib/types/ink/render-to-screen.d.ts +65 -0
  1380. package/lib/types/ink/render-to-screen.d.ts.map +1 -0
  1381. package/lib/types/ink/render-to-screen.js +189 -0
  1382. package/lib/types/ink/renderer.d.ts +34 -0
  1383. package/lib/types/ink/renderer.d.ts.map +1 -0
  1384. package/lib/types/ink/renderer.js +181 -0
  1385. package/lib/types/ink/root.d.ts +109 -0
  1386. package/lib/types/ink/root.d.ts.map +1 -0
  1387. package/lib/types/ink/root.js +96 -0
  1388. package/lib/types/ink/screen.d.ts +545 -0
  1389. package/lib/types/ink/screen.d.ts.map +1 -0
  1390. package/lib/types/ink/screen.js +1607 -0
  1391. package/lib/types/ink/selection.d.ts +529 -0
  1392. package/lib/types/ink/selection.d.ts.map +1 -0
  1393. package/lib/types/ink/selection.js +1292 -0
  1394. package/lib/types/ink/sixel-codec.d.ts +41 -0
  1395. package/lib/types/ink/sixel-codec.d.ts.map +1 -0
  1396. package/lib/types/ink/sixel-codec.js +128 -0
  1397. package/lib/types/ink/sixel-graphics.d.ts +74 -0
  1398. package/lib/types/ink/sixel-graphics.d.ts.map +1 -0
  1399. package/lib/types/ink/sixel-graphics.js +498 -0
  1400. package/lib/types/ink/sixel-worker.d.ts +2 -0
  1401. package/lib/types/ink/sixel-worker.d.ts.map +1 -0
  1402. package/lib/types/ink/sixel-worker.js +12 -0
  1403. package/lib/types/ink/squash-text-nodes.d.ts +30 -0
  1404. package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
  1405. package/lib/types/ink/squash-text-nodes.js +63 -0
  1406. package/lib/types/ink/stringWidth.d.ts +3 -0
  1407. package/lib/types/ink/stringWidth.d.ts.map +1 -0
  1408. package/lib/types/ink/stringWidth.js +248 -0
  1409. package/lib/types/ink/styles.d.ts +346 -0
  1410. package/lib/types/ink/styles.d.ts.map +1 -0
  1411. package/lib/types/ink/styles.js +307 -0
  1412. package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
  1413. package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
  1414. package/lib/types/ink/supports-hyperlinks.js +44 -0
  1415. package/lib/types/ink/tabstops.d.ts +10 -0
  1416. package/lib/types/ink/tabstops.d.ts.map +1 -0
  1417. package/lib/types/ink/tabstops.js +47 -0
  1418. package/lib/types/ink/terminal-focus-state.d.ts +35 -0
  1419. package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
  1420. package/lib/types/ink/terminal-focus-state.js +57 -0
  1421. package/lib/types/ink/terminal-image-protocol.d.ts +4 -0
  1422. package/lib/types/ink/terminal-image-protocol.d.ts.map +1 -0
  1423. package/lib/types/ink/terminal-image-protocol.js +8 -0
  1424. package/lib/types/ink/terminal-image.d.ts +102 -0
  1425. package/lib/types/ink/terminal-image.d.ts.map +1 -0
  1426. package/lib/types/ink/terminal-image.js +223 -0
  1427. package/lib/types/ink/terminal-querier.d.ts +203 -0
  1428. package/lib/types/ink/terminal-querier.d.ts.map +1 -0
  1429. package/lib/types/ink/terminal-querier.js +286 -0
  1430. package/lib/types/ink/terminal.d.ts +192 -0
  1431. package/lib/types/ink/terminal.d.ts.map +1 -0
  1432. package/lib/types/ink/terminal.js +436 -0
  1433. package/lib/types/ink/termio/ansi.d.ts +75 -0
  1434. package/lib/types/ink/termio/ansi.d.ts.map +1 -0
  1435. package/lib/types/ink/termio/ansi.js +79 -0
  1436. package/lib/types/ink/termio/csi.d.ts +263 -0
  1437. package/lib/types/ink/termio/csi.d.ts.map +1 -0
  1438. package/lib/types/ink/termio/csi.js +367 -0
  1439. package/lib/types/ink/termio/dec.d.ts +61 -0
  1440. package/lib/types/ink/termio/dec.d.ts.map +1 -0
  1441. package/lib/types/ink/termio/dec.js +76 -0
  1442. package/lib/types/ink/termio/esc.d.ts +15 -0
  1443. package/lib/types/ink/termio/esc.d.ts.map +1 -0
  1444. package/lib/types/ink/termio/esc.js +57 -0
  1445. package/lib/types/ink/termio/osc.d.ts +198 -0
  1446. package/lib/types/ink/termio/osc.d.ts.map +1 -0
  1447. package/lib/types/ink/termio/osc.js +475 -0
  1448. package/lib/types/ink/termio/parser.d.ts +46 -0
  1449. package/lib/types/ink/termio/parser.d.ts.map +1 -0
  1450. package/lib/types/ink/termio/parser.js +366 -0
  1451. package/lib/types/ink/termio/sgr.d.ts +17 -0
  1452. package/lib/types/ink/termio/sgr.d.ts.map +1 -0
  1453. package/lib/types/ink/termio/sgr.js +300 -0
  1454. package/lib/types/ink/termio/tokenize.d.ts +56 -0
  1455. package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
  1456. package/lib/types/ink/termio/tokenize.js +290 -0
  1457. package/lib/types/ink/termio/types.d.ts +211 -0
  1458. package/lib/types/ink/termio/types.d.ts.map +1 -0
  1459. package/lib/types/ink/termio/types.js +68 -0
  1460. package/lib/types/ink/termio.d.ts +25 -0
  1461. package/lib/types/ink/termio.d.ts.map +1 -0
  1462. package/lib/types/ink/termio.js +24 -0
  1463. package/lib/types/ink/timeline-rail.d.ts +134 -0
  1464. package/lib/types/ink/timeline-rail.d.ts.map +1 -0
  1465. package/lib/types/ink/timeline-rail.js +175 -0
  1466. package/lib/types/ink/transcript-highlight.d.ts +25 -0
  1467. package/lib/types/ink/transcript-highlight.d.ts.map +1 -0
  1468. package/lib/types/ink/transcript-highlight.js +82 -0
  1469. package/lib/types/ink/truncateToWidth.d.ts +7 -0
  1470. package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
  1471. package/lib/types/ink/truncateToWidth.js +18 -0
  1472. package/lib/types/ink/update-overflow-guard.d.ts +62 -0
  1473. package/lib/types/ink/update-overflow-guard.d.ts.map +1 -0
  1474. package/lib/types/ink/update-overflow-guard.js +164 -0
  1475. package/lib/types/ink/useTerminalNotification.d.ts +45 -0
  1476. package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
  1477. package/lib/types/ink/useTerminalNotification.js +70 -0
  1478. package/lib/types/ink/warn.d.ts +7 -0
  1479. package/lib/types/ink/warn.d.ts.map +1 -0
  1480. package/lib/types/ink/warn.js +15 -0
  1481. package/lib/types/ink/widest-line.d.ts +7 -0
  1482. package/lib/types/ink/widest-line.d.ts.map +1 -0
  1483. package/lib/types/ink/widest-line.js +19 -0
  1484. package/lib/types/ink/wrap-text.d.ts +10 -0
  1485. package/lib/types/ink/wrap-text.d.ts.map +1 -0
  1486. package/lib/types/ink/wrap-text.js +103 -0
  1487. package/lib/types/ink/wrapAnsi.d.ts +17 -0
  1488. package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
  1489. package/lib/types/ink/wrapAnsi.js +38 -0
  1490. package/lib/types/jsx-runtime.d.ts +2 -0
  1491. package/lib/types/jsx-runtime.d.ts.map +1 -0
  1492. package/lib/types/jsx-runtime.js +13 -0
  1493. package/lib/types/migrationPrefs.d.ts +60 -0
  1494. package/lib/types/migrationPrefs.d.ts.map +1 -0
  1495. package/lib/types/migrationPrefs.js +97 -0
  1496. package/lib/types/minimalMode.d.ts +13 -0
  1497. package/lib/types/minimalMode.d.ts.map +1 -0
  1498. package/lib/types/minimalMode.js +17 -0
  1499. package/lib/types/modelGroups.d.ts +72 -0
  1500. package/lib/types/modelGroups.d.ts.map +1 -0
  1501. package/lib/types/modelGroups.js +97 -0
  1502. package/lib/types/modelPrefs.d.ts +37 -0
  1503. package/lib/types/modelPrefs.d.ts.map +1 -0
  1504. package/lib/types/modelPrefs.js +66 -0
  1505. package/lib/types/modelRecents.d.ts +39 -0
  1506. package/lib/types/modelRecents.d.ts.map +1 -0
  1507. package/lib/types/modelRecents.js +97 -0
  1508. package/lib/types/modelRoute.d.ts +87 -0
  1509. package/lib/types/modelRoute.d.ts.map +1 -0
  1510. package/lib/types/modelRoute.js +125 -0
  1511. package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
  1512. package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
  1513. package/lib/types/native-ts/yoga-layout/enums.js +150 -0
  1514. package/lib/types/native-ts/yoga-layout/index.d.ts +804 -0
  1515. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
  1516. package/lib/types/native-ts/yoga-layout/index.js +2614 -0
  1517. package/lib/types/oauth.d.ts +15 -0
  1518. package/lib/types/oauth.d.ts.map +1 -0
  1519. package/lib/types/oauth.js +14 -0
  1520. package/lib/types/plugin-host.d.ts +14 -0
  1521. package/lib/types/plugin-host.d.ts.map +1 -0
  1522. package/lib/types/plugin-host.js +19 -0
  1523. package/lib/types/presetPrefs.d.ts +30 -0
  1524. package/lib/types/presetPrefs.d.ts.map +1 -0
  1525. package/lib/types/presetPrefs.js +66 -0
  1526. package/lib/types/reload.d.ts +109 -0
  1527. package/lib/types/reload.d.ts.map +1 -0
  1528. package/lib/types/reload.js +118 -0
  1529. package/lib/types/scenes.d.ts +4 -0
  1530. package/lib/types/scenes.d.ts.map +1 -0
  1531. package/lib/types/scenes.js +4 -0
  1532. package/lib/types/screens/Chat.d.ts +82 -0
  1533. package/lib/types/screens/Chat.d.ts.map +1 -0
  1534. package/lib/types/screens/Chat.js +4299 -0
  1535. package/lib/types/screens/SessionSupervisor.d.ts +84 -0
  1536. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
  1537. package/lib/types/screens/SessionSupervisor.js +350 -0
  1538. package/lib/types/screens/SessionTree.d.ts +27 -0
  1539. package/lib/types/screens/SessionTree.d.ts.map +1 -0
  1540. package/lib/types/screens/SessionTree.js +583 -0
  1541. package/lib/types/screens/Settings.d.ts +22 -0
  1542. package/lib/types/screens/Settings.d.ts.map +1 -0
  1543. package/lib/types/screens/Settings.js +592 -0
  1544. package/lib/types/screens/StatusLine.d.ts +48 -0
  1545. package/lib/types/screens/StatusLine.d.ts.map +1 -0
  1546. package/lib/types/screens/StatusLine.js +453 -0
  1547. package/lib/types/screens/StatusMetrics.d.ts +176 -0
  1548. package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
  1549. package/lib/types/screens/StatusMetrics.js +372 -0
  1550. package/lib/types/screens/TrajectoryScene.d.ts +16 -0
  1551. package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
  1552. package/lib/types/screens/TrajectoryScene.js +374 -0
  1553. package/lib/types/screens/chatOverlay.d.ts +267 -0
  1554. package/lib/types/screens/chatOverlay.d.ts.map +1 -0
  1555. package/lib/types/screens/chatOverlay.js +132 -0
  1556. package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
  1557. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
  1558. package/lib/types/screens/sessionSupervisor/model.js +69 -0
  1559. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
  1560. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
  1561. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +639 -0
  1562. package/lib/types/sessionHistory.d.ts +59 -0
  1563. package/lib/types/sessionHistory.d.ts.map +1 -0
  1564. package/lib/types/sessionHistory.js +223 -0
  1565. package/lib/types/sessionModes.d.ts +83 -0
  1566. package/lib/types/sessionModes.d.ts.map +1 -0
  1567. package/lib/types/sessionModes.js +141 -0
  1568. package/lib/types/sessionMounts.d.ts +272 -0
  1569. package/lib/types/sessionMounts.d.ts.map +1 -0
  1570. package/lib/types/sessionMounts.js +706 -0
  1571. package/lib/types/sessionPins.d.ts +33 -0
  1572. package/lib/types/sessionPins.d.ts.map +1 -0
  1573. package/lib/types/sessionPins.js +181 -0
  1574. package/lib/types/sessions/format.d.ts +125 -0
  1575. package/lib/types/sessions/format.d.ts.map +1 -0
  1576. package/lib/types/sessions/format.js +276 -0
  1577. package/lib/types/sessions/resumeFailure.d.ts +38 -0
  1578. package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
  1579. package/lib/types/sessions/resumeFailure.js +58 -0
  1580. package/lib/types/sessions/view.d.ts +162 -0
  1581. package/lib/types/sessions/view.d.ts.map +1 -0
  1582. package/lib/types/sessions/view.js +350 -0
  1583. package/lib/types/settings-sections.d.ts +4 -0
  1584. package/lib/types/settings-sections.d.ts.map +1 -0
  1585. package/lib/types/settings-sections.js +4 -0
  1586. package/lib/types/terminal-utils/cliHighlight.d.ts +20 -0
  1587. package/lib/types/terminal-utils/cliHighlight.d.ts.map +1 -0
  1588. package/lib/types/terminal-utils/cliHighlight.js +53 -0
  1589. package/lib/types/terminal-utils/figures.d.ts +26 -0
  1590. package/lib/types/terminal-utils/figures.d.ts.map +1 -0
  1591. package/lib/types/terminal-utils/figures.js +36 -0
  1592. package/lib/types/terminal-utils/format.d.ts +35 -0
  1593. package/lib/types/terminal-utils/format.d.ts.map +1 -0
  1594. package/lib/types/terminal-utils/format.js +63 -0
  1595. package/lib/types/terminal-utils/hash.d.ts +25 -0
  1596. package/lib/types/terminal-utils/hash.d.ts.map +1 -0
  1597. package/lib/types/terminal-utils/hash.js +41 -0
  1598. package/lib/types/terminal-utils/hyperlink.d.ts +27 -0
  1599. package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -0
  1600. package/lib/types/terminal-utils/hyperlink.js +70 -0
  1601. package/lib/types/terminal-utils/markdown.d.ts +58 -0
  1602. package/lib/types/terminal-utils/markdown.d.ts.map +1 -0
  1603. package/lib/types/terminal-utils/markdown.js +441 -0
  1604. package/lib/types/terminal-utils/mermaid.d.ts +44 -0
  1605. package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
  1606. package/lib/types/terminal-utils/mermaid.js +83 -0
  1607. package/lib/types/terminal-utils/sessionColors.d.ts +27 -0
  1608. package/lib/types/terminal-utils/sessionColors.d.ts.map +1 -0
  1609. package/lib/types/terminal-utils/sessionColors.js +39 -0
  1610. package/lib/types/terminal-utils/spinnerVerbs.d.ts +3 -0
  1611. package/lib/types/terminal-utils/spinnerVerbs.d.ts.map +1 -0
  1612. package/lib/types/terminal-utils/spinnerVerbs.js +21 -0
  1613. package/lib/types/terminal-utils/syntaxRuns.d.ts +16 -0
  1614. package/lib/types/terminal-utils/syntaxRuns.d.ts.map +1 -0
  1615. package/lib/types/terminal-utils/syntaxRuns.js +79 -0
  1616. package/lib/types/terminal-utils/syntaxTheme.d.ts +12 -0
  1617. package/lib/types/terminal-utils/syntaxTheme.d.ts.map +1 -0
  1618. package/lib/types/terminal-utils/syntaxTheme.js +76 -0
  1619. package/lib/types/theme.d.ts +201 -0
  1620. package/lib/types/theme.d.ts.map +1 -0
  1621. package/lib/types/theme.js +525 -0
  1622. package/lib/types/themeCatalog.d.ts +36 -0
  1623. package/lib/types/themeCatalog.d.ts.map +1 -0
  1624. package/lib/types/themeCatalog.js +159 -0
  1625. package/lib/types/themePrefs.d.ts +28 -0
  1626. package/lib/types/themePrefs.d.ts.map +1 -0
  1627. package/lib/types/themePrefs.js +59 -0
  1628. package/lib/types/tips.d.ts +30 -0
  1629. package/lib/types/tips.d.ts.map +1 -0
  1630. package/lib/types/tips.js +899 -0
  1631. package/lib/types/trajectory/effortIgnition.d.ts +66 -0
  1632. package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
  1633. package/lib/types/trajectory/effortIgnition.js +142 -0
  1634. package/lib/types/trajectory/format.d.ts +100 -0
  1635. package/lib/types/trajectory/format.d.ts.map +1 -0
  1636. package/lib/types/trajectory/format.js +213 -0
  1637. package/lib/types/trajectory/motion.d.ts +99 -0
  1638. package/lib/types/trajectory/motion.d.ts.map +1 -0
  1639. package/lib/types/trajectory/motion.js +143 -0
  1640. package/lib/types/trajectory/query.d.ts +83 -0
  1641. package/lib/types/trajectory/query.d.ts.map +1 -0
  1642. package/lib/types/trajectory/query.js +187 -0
  1643. package/lib/types/trajectoryPrefs.d.ts +36 -0
  1644. package/lib/types/trajectoryPrefs.d.ts.map +1 -0
  1645. package/lib/types/trajectoryPrefs.js +65 -0
  1646. package/lib/types/tuiDisplayPrefs.d.ts +49 -0
  1647. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -0
  1648. package/lib/types/tuiDisplayPrefs.js +168 -0
  1649. package/lib/types/ui.d.ts +29 -0
  1650. package/lib/types/ui.d.ts.map +1 -0
  1651. package/lib/types/ui.js +25 -0
  1652. package/lib/types/update.d.ts +550 -0
  1653. package/lib/types/update.d.ts.map +1 -0
  1654. package/lib/types/update.js +1751 -0
  1655. package/lib/types/utils/clipboard.d.ts +122 -0
  1656. package/lib/types/utils/clipboard.d.ts.map +1 -0
  1657. package/lib/types/utils/clipboard.js +577 -0
  1658. package/lib/types/utils/credentials.d.ts +13 -0
  1659. package/lib/types/utils/credentials.d.ts.map +1 -0
  1660. package/lib/types/utils/credentials.js +41 -0
  1661. package/lib/types/utils/debug.d.ts +18 -0
  1662. package/lib/types/utils/debug.d.ts.map +1 -0
  1663. package/lib/types/utils/debug.js +37 -0
  1664. package/lib/types/utils/earlyInput.d.ts +6 -0
  1665. package/lib/types/utils/earlyInput.d.ts.map +1 -0
  1666. package/lib/types/utils/earlyInput.js +5 -0
  1667. package/lib/types/utils/env.d.ts +8 -0
  1668. package/lib/types/utils/env.d.ts.map +1 -0
  1669. package/lib/types/utils/env.js +7 -0
  1670. package/lib/types/utils/envUtils.d.ts +8 -0
  1671. package/lib/types/utils/envUtils.d.ts.map +1 -0
  1672. package/lib/types/utils/envUtils.js +13 -0
  1673. package/lib/types/utils/execFileNoThrow.d.ts +17 -0
  1674. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
  1675. package/lib/types/utils/execFileNoThrow.js +65 -0
  1676. package/lib/types/utils/externalEditor.d.ts +116 -0
  1677. package/lib/types/utils/externalEditor.d.ts.map +1 -0
  1678. package/lib/types/utils/externalEditor.js +270 -0
  1679. package/lib/types/utils/fileSuggestions.d.ts +12 -0
  1680. package/lib/types/utils/fileSuggestions.d.ts.map +1 -0
  1681. package/lib/types/utils/fileSuggestions.js +40 -0
  1682. package/lib/types/utils/fileTarget.d.ts +46 -0
  1683. package/lib/types/utils/fileTarget.d.ts.map +1 -0
  1684. package/lib/types/utils/fileTarget.js +178 -0
  1685. package/lib/types/utils/fold-long-lines.d.ts +38 -0
  1686. package/lib/types/utils/fold-long-lines.d.ts.map +1 -0
  1687. package/lib/types/utils/fold-long-lines.js +91 -0
  1688. package/lib/types/utils/fullscreen.d.ts +7 -0
  1689. package/lib/types/utils/fullscreen.d.ts.map +1 -0
  1690. package/lib/types/utils/fullscreen.js +9 -0
  1691. package/lib/types/utils/imageResize.d.ts +90 -0
  1692. package/lib/types/utils/imageResize.d.ts.map +1 -0
  1693. package/lib/types/utils/imageResize.js +272 -0
  1694. package/lib/types/utils/intl.d.ts +7 -0
  1695. package/lib/types/utils/intl.d.ts.map +1 -0
  1696. package/lib/types/utils/intl.js +9 -0
  1697. package/lib/types/utils/keymap.d.ts +138 -0
  1698. package/lib/types/utils/keymap.d.ts.map +1 -0
  1699. package/lib/types/utils/keymap.js +351 -0
  1700. package/lib/types/utils/loaded-context.d.ts +25 -0
  1701. package/lib/types/utils/loaded-context.d.ts.map +1 -0
  1702. package/lib/types/utils/loaded-context.js +72 -0
  1703. package/lib/types/utils/log.d.ts +7 -0
  1704. package/lib/types/utils/log.d.ts.map +1 -0
  1705. package/lib/types/utils/log.js +9 -0
  1706. package/lib/types/utils/mentions.d.ts +53 -0
  1707. package/lib/types/utils/mentions.d.ts.map +1 -0
  1708. package/lib/types/utils/mentions.js +133 -0
  1709. package/lib/types/utils/modifiers.d.ts +43 -0
  1710. package/lib/types/utils/modifiers.d.ts.map +1 -0
  1711. package/lib/types/utils/modifiers.js +45 -0
  1712. package/lib/types/utils/narration.d.ts +11 -0
  1713. package/lib/types/utils/narration.d.ts.map +1 -0
  1714. package/lib/types/utils/narration.js +16 -0
  1715. package/lib/types/utils/openExternal.d.ts +50 -0
  1716. package/lib/types/utils/openExternal.d.ts.map +1 -0
  1717. package/lib/types/utils/openExternal.js +170 -0
  1718. package/lib/types/utils/pastedImagePath.d.ts +51 -0
  1719. package/lib/types/utils/pastedImagePath.d.ts.map +1 -0
  1720. package/lib/types/utils/pastedImagePath.js +194 -0
  1721. package/lib/types/utils/paths.d.ts +16 -0
  1722. package/lib/types/utils/paths.d.ts.map +1 -0
  1723. package/lib/types/utils/paths.js +19 -0
  1724. package/lib/types/utils/semver.d.ts +9 -0
  1725. package/lib/types/utils/semver.d.ts.map +1 -0
  1726. package/lib/types/utils/semver.js +24 -0
  1727. package/lib/types/utils/shellQuote.d.ts +14 -0
  1728. package/lib/types/utils/shellQuote.d.ts.map +1 -0
  1729. package/lib/types/utils/shellQuote.js +39 -0
  1730. package/lib/types/utils/sliceAnsi.d.ts +12 -0
  1731. package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
  1732. package/lib/types/utils/sliceAnsi.js +79 -0
  1733. package/lib/types/utils/truncateMiddle.d.ts +9 -0
  1734. package/lib/types/utils/truncateMiddle.d.ts.map +1 -0
  1735. package/lib/types/utils/truncateMiddle.js +28 -0
  1736. package/lib/types/utils/urlGuard.d.ts +28 -0
  1737. package/lib/types/utils/urlGuard.d.ts.map +1 -0
  1738. package/lib/types/utils/urlGuard.js +21 -0
  1739. package/lib/types/utils/workspaceRoot.d.ts +21 -0
  1740. package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
  1741. package/lib/types/utils/workspaceRoot.js +47 -0
  1742. package/lib/types/working-activity.d.ts +32 -0
  1743. package/lib/types/working-activity.d.ts.map +1 -0
  1744. package/lib/types/working-activity.js +38 -0
  1745. package/lib/types/workspaces.d.ts +5 -0
  1746. package/lib/types/workspaces.d.ts.map +1 -0
  1747. package/lib/types/workspaces.js +4 -0
  1748. package/node_modules/@askdkc/dsh-auth/LICENSE +21 -0
  1749. package/node_modules/@askdkc/dsh-auth/README.ja.md +164 -0
  1750. package/node_modules/@askdkc/dsh-auth/README.md +163 -0
  1751. package/node_modules/@askdkc/dsh-auth/cordis.patch.yml +11 -0
  1752. package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +44 -0
  1753. package/node_modules/@askdkc/dsh-auth/lib/command.d.ts +14 -0
  1754. package/node_modules/@askdkc/dsh-auth/lib/command.js +70 -0
  1755. package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +63 -0
  1756. package/node_modules/@askdkc/dsh-auth/lib/credentials.js +204 -0
  1757. package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.d.ts +26 -0
  1758. package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.js +142 -0
  1759. package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +96 -0
  1760. package/node_modules/@askdkc/dsh-auth/lib/index.js +263 -0
  1761. package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +68 -0
  1762. package/node_modules/@askdkc/dsh-auth/lib/interaction.js +193 -0
  1763. package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.d.ts +5 -0
  1764. package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.js +112 -0
  1765. package/node_modules/@askdkc/dsh-auth/lib/opener.d.ts +32 -0
  1766. package/node_modules/@askdkc/dsh-auth/lib/opener.js +101 -0
  1767. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +23 -0
  1768. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +27 -0
  1769. package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +45 -0
  1770. package/node_modules/@askdkc/dsh-auth/lib/profiles.js +110 -0
  1771. package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +80 -0
  1772. package/node_modules/@askdkc/dsh-auth/lib/service.js +224 -0
  1773. package/node_modules/@askdkc/dsh-auth/package.json +70 -0
  1774. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -0
  1775. package/node_modules/@dsh-std/command/LICENSE +21 -0
  1776. package/node_modules/@dsh-std/command/README.md +26 -0
  1777. package/node_modules/@dsh-std/command/README.zh.md +28 -0
  1778. package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
  1779. package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
  1780. package/node_modules/@dsh-std/command/lib/index.js +252 -0
  1781. package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
  1782. package/node_modules/@dsh-std/command/package.json +22 -0
  1783. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1784. package/node_modules/@dsh-std/connection/LICENSE +21 -0
  1785. package/node_modules/@dsh-std/connection/README.md +42 -0
  1786. package/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1787. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1788. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1789. package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1790. package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1791. package/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1792. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1793. package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1794. package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1795. package/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1796. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1797. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1798. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1799. package/node_modules/@dsh-std/connection/package.json +20 -0
  1800. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1801. package/node_modules/@dsh-std/core/LICENSE +21 -0
  1802. package/node_modules/@dsh-std/core/README.md +13 -0
  1803. package/node_modules/@dsh-std/core/README.zh.md +13 -0
  1804. package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1805. package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1806. package/node_modules/@dsh-std/core/lib/index.js +424 -0
  1807. package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1808. package/node_modules/@dsh-std/core/package.json +21 -0
  1809. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  1810. package/node_modules/@dsh-std/manifest/LICENSE +21 -0
  1811. package/node_modules/@dsh-std/manifest/README.md +5 -0
  1812. package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  1813. package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  1814. package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  1815. package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  1816. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  1817. package/node_modules/@dsh-std/manifest/package.json +20 -0
  1818. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  1819. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -0
  1820. package/node_modules/@dsh-std/messages/LICENSE +21 -0
  1821. package/node_modules/@dsh-std/messages/README.md +5 -0
  1822. package/node_modules/@dsh-std/messages/README.zh.md +7 -0
  1823. package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
  1824. package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
  1825. package/node_modules/@dsh-std/messages/lib/index.js +151 -0
  1826. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
  1827. package/node_modules/@dsh-std/messages/package.json +20 -0
  1828. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
  1829. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  1830. package/node_modules/@dsh-std/presentation/LICENSE +21 -0
  1831. package/node_modules/@dsh-std/presentation/README.md +27 -0
  1832. package/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  1833. package/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  1834. package/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  1835. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  1836. package/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  1837. package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  1838. package/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  1839. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  1840. package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  1841. package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  1842. package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  1843. package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  1844. package/node_modules/@dsh-std/presentation/package.json +25 -0
  1845. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -0
  1846. package/node_modules/@dsh-std/storage/LICENSE +21 -0
  1847. package/node_modules/@dsh-std/storage/README.md +5 -0
  1848. package/node_modules/@dsh-std/storage/README.zh.md +7 -0
  1849. package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
  1850. package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
  1851. package/node_modules/@dsh-std/storage/lib/index.js +104 -0
  1852. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
  1853. package/node_modules/@dsh-std/storage/package.json +20 -0
  1854. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
  1855. package/package.json +492 -0
  1856. package/presets/liangshen/.dsh-tui-managed.json +5 -0
  1857. package/presets/liangshen/agent.cordis.yml +425 -0
  1858. package/presets/liangshen/compaction-epoch.mjs +83 -0
  1859. package/presets/liangshen/custom-bash.mjs +301 -0
  1860. package/presets/liangshen/instruction-hint.mjs +190 -0
  1861. package/presets/liangshen/preset.yml +3 -0
  1862. package/presets/liangshen/session-events.mjs +8 -0
  1863. package/presets/liangshen/skill-search.mjs +141 -0
  1864. package/presets/liangshen/tool-bootstrap.mjs +300 -0
  1865. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1866. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
  1867. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
  1868. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1869. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1870. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1871. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1872. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1873. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1874. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1875. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1876. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1877. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1878. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1879. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1880. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1881. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
  1882. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1883. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
  1884. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
  1885. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
  1886. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1887. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1888. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
  1889. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1890. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
  1891. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  1892. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
  1893. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
  1894. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  1895. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  1896. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  1897. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  1898. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  1899. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
  1900. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  1901. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  1902. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
  1903. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -0
  1904. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  1905. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  1906. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  1907. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  1908. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  1909. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  1910. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  1911. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  1912. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  1913. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  1914. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  1915. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  1916. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -0
  1917. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1918. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
  1919. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
  1920. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
  1921. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1922. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1923. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
  1924. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1925. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
  1926. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1927. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
  1928. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
  1929. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
  1930. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1931. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1932. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
  1933. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1934. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
  1935. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1936. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
  1937. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
  1938. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
  1939. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1940. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1941. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
  1942. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1943. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
  1944. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1945. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
  1946. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
  1947. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1948. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1949. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1950. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1951. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1952. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1953. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1954. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1955. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1956. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1957. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1958. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1959. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1960. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
  1961. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1962. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
  1963. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
  1964. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
  1965. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1966. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1967. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
  1968. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1969. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
  1970. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1971. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
  1972. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
  1973. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
  1974. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1975. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1976. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
  1977. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1978. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
@@ -0,0 +1,2614 @@
1
+ /**
2
+ * Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
3
+ *
4
+ * This matches the `yoga-layout/load` API surface used by src/ink/layout/yoga.ts.
5
+ * The upstream C++ source is ~2500 lines in CalculateLayout.cpp alone; this port
6
+ * is a simplified single-pass flexbox implementation that covers the subset of
7
+ * features Ink actually uses:
8
+ * - flex-direction (row/column + reverse)
9
+ * - flex-grow / flex-shrink / flex-basis
10
+ * - align-items / align-self (stretch, flex-start, center, flex-end)
11
+ * - justify-content (all six values)
12
+ * - margin / padding / border / gap
13
+ * - width / height / min / max (point, percent, auto)
14
+ * - position: relative / absolute
15
+ * - display: flex / none
16
+ * - measure functions (for text nodes)
17
+ *
18
+ * Also implemented for spec parity (not used by Ink):
19
+ * - margin: auto (main + cross axis, overrides justify/align)
20
+ * - multi-pass flex clamping when children hit min/max constraints
21
+ * - flex-grow/shrink against container min/max when size is indefinite
22
+ *
23
+ * Also implemented for spec parity (not used by Ink):
24
+ * - flex-wrap: wrap / wrap-reverse (multi-line flex)
25
+ * - align-content (positions wrapped lines on cross axis)
26
+ *
27
+ * Also implemented for spec parity (not used by Ink):
28
+ * - display: contents (children lifted to grandparent, box removed)
29
+ *
30
+ * Also implemented for spec parity (not used by Ink):
31
+ * - baseline alignment (align-items/align-self: baseline)
32
+ *
33
+ * Not implemented (not used by Ink):
34
+ * - aspect-ratio
35
+ * - box-sizing: content-box
36
+ * - RTL direction (Ink always passes Direction.LTR)
37
+ *
38
+ * Upstream: https://github.com/facebook/yoga
39
+ */
40
+ import { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap, } from './enums.js';
41
+ export { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap, };
42
+ const UNDEFINED_VALUE = { unit: Unit.Undefined, value: NaN };
43
+ const AUTO_VALUE = { unit: Unit.Auto, value: NaN };
44
+ function pointValue(v) {
45
+ return { unit: Unit.Point, value: v };
46
+ }
47
+ function percentValue(v) {
48
+ return { unit: Unit.Percent, value: v };
49
+ }
50
+ function resolveValue(v, ownerSize) {
51
+ switch (v.unit) {
52
+ case Unit.Point:
53
+ return v.value;
54
+ case Unit.Percent:
55
+ return isNaN(ownerSize) ? NaN : (v.value * ownerSize) / 100;
56
+ default:
57
+ return NaN;
58
+ }
59
+ }
60
+ function isDefined(n) {
61
+ return !isNaN(n);
62
+ }
63
+ // NaN-safe equality for layout-cache input comparison
64
+ function sameFloat(a, b) {
65
+ return a === b || (a !== a && b !== b);
66
+ }
67
+ function defaultStyle() {
68
+ return {
69
+ direction: Direction.Inherit,
70
+ flexDirection: FlexDirection.Column,
71
+ justifyContent: Justify.FlexStart,
72
+ alignItems: Align.Stretch,
73
+ alignSelf: Align.Auto,
74
+ alignContent: Align.FlexStart,
75
+ flexWrap: Wrap.NoWrap,
76
+ overflow: Overflow.Visible,
77
+ display: Display.Flex,
78
+ positionType: PositionType.Relative,
79
+ flexGrow: 0,
80
+ flexShrink: 0,
81
+ flexBasis: AUTO_VALUE,
82
+ margin: new Array(9).fill(UNDEFINED_VALUE),
83
+ padding: new Array(9).fill(UNDEFINED_VALUE),
84
+ border: new Array(9).fill(UNDEFINED_VALUE),
85
+ position: new Array(9).fill(UNDEFINED_VALUE),
86
+ gap: new Array(3).fill(UNDEFINED_VALUE),
87
+ width: AUTO_VALUE,
88
+ height: AUTO_VALUE,
89
+ minWidth: UNDEFINED_VALUE,
90
+ minHeight: UNDEFINED_VALUE,
91
+ maxWidth: UNDEFINED_VALUE,
92
+ maxHeight: UNDEFINED_VALUE,
93
+ };
94
+ }
95
+ // --
96
+ // Edge resolution — yoga's 9-edge model collapsed to 4 physical edges
97
+ const EDGE_LEFT = 0;
98
+ const EDGE_TOP = 1;
99
+ const EDGE_RIGHT = 2;
100
+ const EDGE_BOTTOM = 3;
101
+ function resolveEdge(edges, physicalEdge, ownerSize,
102
+ // For margin/position we allow auto; for padding/border auto resolves to 0
103
+ allowAuto = false) {
104
+ // Precedence: specific edge > horizontal/vertical > all
105
+ let v = edges[physicalEdge];
106
+ if (v.unit === Unit.Undefined) {
107
+ if (physicalEdge === EDGE_LEFT || physicalEdge === EDGE_RIGHT) {
108
+ v = edges[Edge.Horizontal];
109
+ }
110
+ else {
111
+ v = edges[Edge.Vertical];
112
+ }
113
+ }
114
+ if (v.unit === Unit.Undefined) {
115
+ v = edges[Edge.All];
116
+ }
117
+ // Start/End map to Left/Right for LTR (Ink is always LTR)
118
+ if (v.unit === Unit.Undefined) {
119
+ if (physicalEdge === EDGE_LEFT)
120
+ v = edges[Edge.Start];
121
+ if (physicalEdge === EDGE_RIGHT)
122
+ v = edges[Edge.End];
123
+ }
124
+ if (v.unit === Unit.Undefined)
125
+ return 0;
126
+ if (v.unit === Unit.Auto)
127
+ return allowAuto ? NaN : 0;
128
+ return resolveValue(v, ownerSize);
129
+ }
130
+ function resolveEdgeRaw(edges, physicalEdge) {
131
+ let v = edges[physicalEdge];
132
+ if (v.unit === Unit.Undefined) {
133
+ if (physicalEdge === EDGE_LEFT || physicalEdge === EDGE_RIGHT) {
134
+ v = edges[Edge.Horizontal];
135
+ }
136
+ else {
137
+ v = edges[Edge.Vertical];
138
+ }
139
+ }
140
+ if (v.unit === Unit.Undefined)
141
+ v = edges[Edge.All];
142
+ if (v.unit === Unit.Undefined) {
143
+ if (physicalEdge === EDGE_LEFT)
144
+ v = edges[Edge.Start];
145
+ if (physicalEdge === EDGE_RIGHT)
146
+ v = edges[Edge.End];
147
+ }
148
+ return v;
149
+ }
150
+ function isMarginAuto(edges, physicalEdge) {
151
+ return resolveEdgeRaw(edges, physicalEdge).unit === Unit.Auto;
152
+ }
153
+ // Setter helpers for the _hasAutoMargin / _hasPosition fast-path flags.
154
+ // Unit.Undefined = 0, Unit.Auto = 3.
155
+ function hasAnyAutoEdge(edges) {
156
+ for (let i = 0; i < 9; i++)
157
+ if (edges[i].unit === 3)
158
+ return true;
159
+ return false;
160
+ }
161
+ function hasAnyDefinedEdge(edges) {
162
+ for (let i = 0; i < 9; i++)
163
+ if (edges[i].unit !== 0)
164
+ return true;
165
+ return false;
166
+ }
167
+ // Hot path: resolve all 4 physical edges in one pass, writing into `out`.
168
+ // Equivalent to calling resolveEdge() 4× with allowAuto=false, but hoists the
169
+ // shared fallback lookups (Horizontal/Vertical/All/Start/End) and avoids
170
+ // allocating a fresh 4-array on every layoutNode() call.
171
+ function resolveEdges4Into(edges, ownerSize, out) {
172
+ // Hoist fallbacks once — the 4 per-edge chains share these reads.
173
+ const eH = edges[6]; // Edge.Horizontal
174
+ const eV = edges[7]; // Edge.Vertical
175
+ const eA = edges[8]; // Edge.All
176
+ const eS = edges[4]; // Edge.Start
177
+ const eE = edges[5]; // Edge.End
178
+ const pctDenom = isNaN(ownerSize) ? NaN : ownerSize / 100;
179
+ // Left: edges[0] → Horizontal → All → Start
180
+ let v = edges[0];
181
+ if (v.unit === 0)
182
+ v = eH;
183
+ if (v.unit === 0)
184
+ v = eA;
185
+ if (v.unit === 0)
186
+ v = eS;
187
+ out[0] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0;
188
+ // Top: edges[1] → Vertical → All
189
+ v = edges[1];
190
+ if (v.unit === 0)
191
+ v = eV;
192
+ if (v.unit === 0)
193
+ v = eA;
194
+ out[1] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0;
195
+ // Right: edges[2] → Horizontal → All → End
196
+ v = edges[2];
197
+ if (v.unit === 0)
198
+ v = eH;
199
+ if (v.unit === 0)
200
+ v = eA;
201
+ if (v.unit === 0)
202
+ v = eE;
203
+ out[2] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0;
204
+ // Bottom: edges[3] → Vertical → All
205
+ v = edges[3];
206
+ if (v.unit === 0)
207
+ v = eV;
208
+ if (v.unit === 0)
209
+ v = eA;
210
+ out[3] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0;
211
+ }
212
+ // --
213
+ // Axis helpers
214
+ function isRow(dir) {
215
+ return dir === FlexDirection.Row || dir === FlexDirection.RowReverse;
216
+ }
217
+ function isReverse(dir) {
218
+ return dir === FlexDirection.RowReverse || dir === FlexDirection.ColumnReverse;
219
+ }
220
+ function crossAxis(dir) {
221
+ return isRow(dir) ? FlexDirection.Column : FlexDirection.Row;
222
+ }
223
+ function leadingEdge(dir) {
224
+ switch (dir) {
225
+ case FlexDirection.Row:
226
+ return EDGE_LEFT;
227
+ case FlexDirection.RowReverse:
228
+ return EDGE_RIGHT;
229
+ case FlexDirection.Column:
230
+ return EDGE_TOP;
231
+ case FlexDirection.ColumnReverse:
232
+ return EDGE_BOTTOM;
233
+ }
234
+ }
235
+ function trailingEdge(dir) {
236
+ switch (dir) {
237
+ case FlexDirection.Row:
238
+ return EDGE_RIGHT;
239
+ case FlexDirection.RowReverse:
240
+ return EDGE_LEFT;
241
+ case FlexDirection.Column:
242
+ return EDGE_BOTTOM;
243
+ case FlexDirection.ColumnReverse:
244
+ return EDGE_TOP;
245
+ }
246
+ }
247
+ function createConfig() {
248
+ const config = {
249
+ pointScaleFactor: 1,
250
+ errata: Errata.None,
251
+ useWebDefaults: false,
252
+ free() { },
253
+ isExperimentalFeatureEnabled() {
254
+ return false;
255
+ },
256
+ setExperimentalFeatureEnabled() { },
257
+ setPointScaleFactor(f) {
258
+ config.pointScaleFactor = f;
259
+ },
260
+ getErrata() {
261
+ return config.errata;
262
+ },
263
+ setErrata(e) {
264
+ config.errata = e;
265
+ },
266
+ setUseWebDefaults(v) {
267
+ config.useWebDefaults = v;
268
+ },
269
+ };
270
+ return config;
271
+ }
272
+ // --
273
+ // Node implementation
274
+ /**
275
+ * A node in the flexbox layout tree. Holds style inputs, computed layout
276
+ * results, the parent/children tree, and layout caches. Mirrors the
277
+ * yoga-layout/load Node API.
278
+ */
279
+ export class Node {
280
+ /** The node's input style values. */
281
+ style;
282
+ /** The node's computed layout result: position, size, and resolved border, padding, and margin. */
283
+ layout;
284
+ /** The parent node, or null for a root node. */
285
+ parent;
286
+ /** Child nodes in insertion order. */
287
+ children;
288
+ /** Measure function for text-like leaf nodes, or null when unset. */
289
+ measureFunc;
290
+ /** The config this node was created with. */
291
+ config;
292
+ /** Whether this node or its subtree changed since the last layout. */
293
+ isDirty_;
294
+ /** Whether this node is its parent's baseline reference. */
295
+ isReferenceBaseline_;
296
+ /**
297
+ * Per-layout scratch (not public API)
298
+ * Flex-basis of this node for the current layout pass.
299
+ */
300
+ _flexBasis = 0;
301
+ /** Main size of this node for the current layout pass. */
302
+ _mainSize = 0;
303
+ /** Cross size of this node for the current layout pass. */
304
+ _crossSize = 0;
305
+ /** Index of the flex line this node was placed on. */
306
+ _lineIndex = 0;
307
+ /**
308
+ * Whether any margin edge is auto. Fast-path flag maintained by style
309
+ * setters. Per CPU profile, the positioning loop calls isMarginAuto 6× and
310
+ * resolveEdgeRaw(position) 4× per child per layout pass — ~11k calls for
311
+ * the 1000-node bench, nearly all of which return false/undefined since
312
+ * most nodes have no auto margins and no position insets. These flags let
313
+ * us skip straight to the common case with a single branch.
314
+ */
315
+ _hasAutoMargin = false;
316
+ /** Whether any position inset is set. */
317
+ _hasPosition = false;
318
+ /**
319
+ * Whether any padding edge is set. Same pattern for the 3× resolveEdges4Into
320
+ * calls at the top of every layoutNode(). In the 1000-node bench ~67% of
321
+ * those calls operate on all-undefined edge arrays (most nodes have no
322
+ * border; only cols have padding; only leaf cells have margin) — a
323
+ * single-branch skip beats ~20 property reads + ~15 compares + 4 writes of
324
+ * zeros.
325
+ */
326
+ _hasPadding = false;
327
+ /** Whether any border edge is set. */
328
+ _hasBorder = false;
329
+ /** Whether any margin edge is set. */
330
+ _hasMargin = false;
331
+ /**
332
+ * Cached available width of the last layout call. Dirty-flag layout cache:
333
+ * mirrors upstream CalculateLayout.cpp's layoutNodeInternal, skipping a
334
+ * subtree entirely when it's clean and we're asking the same question we
335
+ * cached the answer to. Two slots since each node typically sees a measure
336
+ * call (performLayout=false, from computeFlexBasis) followed by a layout
337
+ * call (performLayout=true) with different inputs per parent pass — a
338
+ * single slot thrashes. Re-layout bench (dirty one leaf, recompute root)
339
+ * went 2.7x→1.1x with this: clean siblings skip straight through, only the
340
+ * dirty chain recomputes.
341
+ */
342
+ _lW = NaN;
343
+ /** Cached available height of the last layout call. */
344
+ _lH = NaN;
345
+ /** Cached width measure mode of the last layout call. */
346
+ _lWM = 0;
347
+ /** Cached height measure mode of the last layout call. */
348
+ _lHM = 0;
349
+ /** Cached owner width of the last layout call. */
350
+ _lOW = NaN;
351
+ /** Cached owner height of the last layout call. */
352
+ _lOH = NaN;
353
+ /** Whether width was forced on the last layout call. */
354
+ _lFW = false;
355
+ /** Whether height was forced on the last layout call. */
356
+ _lFH = false;
357
+ /**
358
+ * Cached layout-pass output width restored on a cache hit. _hasL stores
359
+ * INPUTS early (before compute) but layout.width/height are mutated by the
360
+ * multi-entry cache and by subsequent compute calls with different inputs.
361
+ * Without storing OUTPUTS, a _hasL hit returns whatever
362
+ * layout.width/height happened to be left by the last call — the scrollbox
363
+ * vpH=33→2624 bug. Store + restore outputs like the multi-entry cache does.
364
+ */
365
+ _lOutW = NaN;
366
+ /** Cached layout-pass output height restored on a cache hit. */
367
+ _lOutH = NaN;
368
+ _lOutMeasuredWidth = NaN;
369
+ /** Whether the single-slot layout cache holds a valid entry. */
370
+ _hasL = false;
371
+ /** Cached available width of the last measure call. */
372
+ _mW = NaN;
373
+ /** Cached available height of the last measure call. */
374
+ _mH = NaN;
375
+ /** Cached width measure mode of the last measure call. */
376
+ _mWM = 0;
377
+ /** Cached height measure mode of the last measure call. */
378
+ _mHM = 0;
379
+ /** Cached owner width of the last measure call. */
380
+ _mOW = NaN;
381
+ /** Cached owner height of the last measure call. */
382
+ _mOH = NaN;
383
+ /** Cached measure-pass output width restored on a cache hit. */
384
+ _mOutW = NaN;
385
+ /** Cached measure-pass output height restored on a cache hit. */
386
+ _mOutH = NaN;
387
+ _mOutMeasuredWidth = NaN;
388
+ /** Whether the single-slot measure cache holds a valid entry. */
389
+ _hasM = false;
390
+ /**
391
+ * Flex-basis of this node for the current layout pass, cached from
392
+ * computeFlexBasis. For clean children, basis only depends on the
393
+ * container's inner dimensions — if those haven't changed, skip the
394
+ * layoutNode(performLayout=false) recursion entirely. This is the hot path
395
+ * for scroll: 500-message content container is dirty, its 499 clean
396
+ * children each get measured ~20× as the dirty chain's measure/layout
397
+ * passes cascade. Basis cache short-circuits at the child boundary.
398
+ */
399
+ _fbBasis = NaN;
400
+ /** Cached owner width the basis was computed against. */
401
+ _fbOwnerW = NaN;
402
+ /** Cached owner height the basis was computed against. */
403
+ _fbOwnerH = NaN;
404
+ /** Cached available main size the basis was computed against. */
405
+ _fbAvailMain = NaN;
406
+ /** Cached available cross size the basis was computed against. */
407
+ _fbAvailCross = NaN;
408
+ /** Cached cross measure mode the basis was computed against. */
409
+ _fbCrossMode = 0;
410
+ /**
411
+ * Generation at which _fbBasis was written. Dirty nodes from a PREVIOUS
412
+ * generation have stale cache (subtree changed), but within the SAME
413
+ * generation the cache is fresh — the dirty chain's measure→layout
414
+ * cascade invokes computeFlexBasis ≥2^depth times per calculateLayout on
415
+ * fresh-mounted items, and the subtree doesn't change between calls.
416
+ * Gating on generation instead of isDirty_ lets fresh mounts (virtual
417
+ * scroll) cache-hit after first compute: 105k visits → ~10k.
418
+ */
419
+ _fbGen = -1;
420
+ /**
421
+ * Input matrix of the multi-entry layout cache — stores (inputs → computed
422
+ * w,h) so hits with different inputs than _hasL can restore the right
423
+ * dimensions. Upstream yoga uses 16; 4 covers Ink's dirty-chain depth.
424
+ * Packed as flat arrays to avoid per-entry object allocs. Slot i uses
425
+ * indices [i*8, i*8+8) in _cIn (aW,aH,wM,hM,oW,oH,fW,fH) and [i*3, i*3+3)
426
+ * in _cOut (w,h,measuredWidth).
427
+ */
428
+ _cIn = null;
429
+ /** Cached dimensions and the leaf width used to measure them. */
430
+ _cOut = null;
431
+ /** Generation at which the multi-entry cache was last written. */
432
+ _cGen = -1;
433
+ /** Number of populated cache slots. */
434
+ _cN = 0;
435
+ /**
436
+ * Generation of the last MEASURE-pass call that actually computed (cache
437
+ * miss with performLayout=false). Such a call recurses and overwrites the
438
+ * subtree's layout.* fields as scratch for whatever available size it was
439
+ * probing — which may differ from the node's final size. A subsequent
440
+ * layout-pass cache hit would restore only this node's own w/h and skip
441
+ * the child recursion, leaving descendants at the scratch geometry (the
442
+ * warm-resize 106-vs-105 wrap drift). Layout-pass early returns must
443
+ * therefore refuse to hit while _scratchGen === _generation.
444
+ */
445
+ _scratchGen = -1;
446
+ /** LRU write index into the cache arrays. */
447
+ _cWr = 0;
448
+ constructor(config) {
449
+ this.style = defaultStyle();
450
+ this.layout = {
451
+ left: 0,
452
+ top: 0,
453
+ width: 0,
454
+ height: 0,
455
+ measuredWidth: NaN,
456
+ border: [0, 0, 0, 0],
457
+ padding: [0, 0, 0, 0],
458
+ margin: [0, 0, 0, 0],
459
+ };
460
+ this.parent = null;
461
+ this.children = [];
462
+ this.measureFunc = null;
463
+ this.config = config ?? DEFAULT_CONFIG;
464
+ this.isDirty_ = true;
465
+ this.isReferenceBaseline_ = false;
466
+ _yogaLiveNodes++;
467
+ }
468
+ // -- Tree
469
+ /**
470
+ * Insert a child at the given index and mark this node dirty.
471
+ * @param child - the child node to insert.
472
+ * @param index - the position in the children array.
473
+ */
474
+ insertChild(child, index) {
475
+ child.parent = this;
476
+ this.children.splice(index, 0, child);
477
+ this.markDirty();
478
+ }
479
+ /**
480
+ * Remove a child from this node and mark this node dirty. No-op when the
481
+ * child is not a direct child.
482
+ * @param child - the child node to remove.
483
+ */
484
+ removeChild(child) {
485
+ const idx = this.children.indexOf(child);
486
+ if (idx >= 0) {
487
+ this.children.splice(idx, 1);
488
+ child.parent = null;
489
+ this.markDirty();
490
+ }
491
+ }
492
+ /**
493
+ * Get the child at the given index.
494
+ * @param index - the child position.
495
+ * @returns the child node.
496
+ */
497
+ getChild(index) {
498
+ return this.children[index];
499
+ }
500
+ /**
501
+ * Get the number of children.
502
+ * @returns the child count.
503
+ */
504
+ getChildCount() {
505
+ return this.children.length;
506
+ }
507
+ /**
508
+ * Get the parent node.
509
+ * @returns the parent, or null for a root node.
510
+ */
511
+ getParent() {
512
+ return this.parent;
513
+ }
514
+ // -- Lifecycle
515
+ /**
516
+ * Release this node's references and decrement the live-node counter.
517
+ */
518
+ free() {
519
+ this.parent = null;
520
+ this.children = [];
521
+ this.measureFunc = null;
522
+ this._cIn = null;
523
+ this._cOut = null;
524
+ _yogaLiveNodes--;
525
+ }
526
+ /**
527
+ * Recursively free this node and all descendants.
528
+ */
529
+ freeRecursive() {
530
+ for (const c of this.children)
531
+ c.freeRecursive();
532
+ this.free();
533
+ }
534
+ /**
535
+ * Reset this node to its default style, empty child list, and initial
536
+ * layout-cache state.
537
+ */
538
+ reset() {
539
+ this.style = defaultStyle();
540
+ this.layout.measuredWidth = NaN;
541
+ this.children = [];
542
+ this.parent = null;
543
+ this.measureFunc = null;
544
+ this.isDirty_ = true;
545
+ this._hasAutoMargin = false;
546
+ this._hasPosition = false;
547
+ this._hasPadding = false;
548
+ this._hasBorder = false;
549
+ this._hasMargin = false;
550
+ this._hasL = false;
551
+ this._hasM = false;
552
+ this._cN = 0;
553
+ this._cWr = 0;
554
+ this._fbBasis = NaN;
555
+ }
556
+ // -- Dirty tracking
557
+ /**
558
+ * Mark this node and its ancestors dirty so the next layout recomputes them.
559
+ */
560
+ markDirty() {
561
+ this.isDirty_ = true;
562
+ if (this.parent && !this.parent.isDirty_)
563
+ this.parent.markDirty();
564
+ }
565
+ /**
566
+ * Whether this node or its subtree needs re-layout.
567
+ * @returns the dirty flag.
568
+ */
569
+ isDirty() {
570
+ return this.isDirty_;
571
+ }
572
+ /**
573
+ * Whether a new layout result is available. Always true in this port.
574
+ * @returns true.
575
+ */
576
+ hasNewLayout() {
577
+ return true;
578
+ }
579
+ /**
580
+ * Mark the current layout as seen. No-op in this port.
581
+ */
582
+ markLayoutSeen() { }
583
+ // -- Measure function
584
+ /**
585
+ * Set the measure function used to size this leaf node, and mark dirty.
586
+ * @param fn - the measure function, or null to clear it.
587
+ */
588
+ setMeasureFunc(fn) {
589
+ this.measureFunc = fn;
590
+ this.markDirty();
591
+ }
592
+ /**
593
+ * Clear the measure function and mark this node dirty.
594
+ */
595
+ unsetMeasureFunc() {
596
+ this.measureFunc = null;
597
+ this.markDirty();
598
+ }
599
+ // -- Computed layout getters
600
+ /**
601
+ * Get the computed left position.
602
+ * @returns the left offset in pixels.
603
+ */
604
+ getComputedLeft() {
605
+ return this.layout.left;
606
+ }
607
+ /**
608
+ * Get the computed top position.
609
+ * @returns the top offset in pixels.
610
+ */
611
+ getComputedTop() {
612
+ return this.layout.top;
613
+ }
614
+ /**
615
+ * Get the computed width.
616
+ * @returns the width in pixels.
617
+ */
618
+ getComputedWidth() {
619
+ return this.layout.width;
620
+ }
621
+ /** Content width used by the leaf measure function, before pixel rounding. */
622
+ getComputedMeasureWidth() {
623
+ return this.layout.measuredWidth;
624
+ }
625
+ /**
626
+ * Get the computed height.
627
+ * @returns the height in pixels.
628
+ */
629
+ getComputedHeight() {
630
+ return this.layout.height;
631
+ }
632
+ /**
633
+ * Get the computed right inset: the parent's width minus this node's right
634
+ * edge. Zero for a root node.
635
+ * @returns the right inset in pixels.
636
+ */
637
+ getComputedRight() {
638
+ const p = this.parent;
639
+ return p ? p.layout.width - this.layout.left - this.layout.width : 0;
640
+ }
641
+ /**
642
+ * Get the computed bottom inset: the parent's height minus this node's
643
+ * bottom edge. Zero for a root node.
644
+ * @returns the bottom inset in pixels.
645
+ */
646
+ getComputedBottom() {
647
+ const p = this.parent;
648
+ return p ? p.layout.height - this.layout.top - this.layout.height : 0;
649
+ }
650
+ /**
651
+ * Get the full computed layout box.
652
+ * @returns left, top, right, bottom, width, and height in pixels.
653
+ */
654
+ getComputedLayout() {
655
+ return {
656
+ left: this.layout.left,
657
+ top: this.layout.top,
658
+ right: this.getComputedRight(),
659
+ bottom: this.getComputedBottom(),
660
+ width: this.layout.width,
661
+ height: this.layout.height,
662
+ };
663
+ }
664
+ /**
665
+ * Get the computed border width for an edge.
666
+ * @param edge - the edge to read.
667
+ * @returns the border width in pixels.
668
+ */
669
+ getComputedBorder(edge) {
670
+ return this.layout.border[physicalEdge(edge)];
671
+ }
672
+ /**
673
+ * Get the computed padding for an edge.
674
+ * @param edge - the edge to read.
675
+ * @returns the padding in pixels.
676
+ */
677
+ getComputedPadding(edge) {
678
+ return this.layout.padding[physicalEdge(edge)];
679
+ }
680
+ /**
681
+ * Get the computed margin for an edge.
682
+ * @param edge - the edge to read.
683
+ * @returns the margin in pixels.
684
+ */
685
+ getComputedMargin(edge) {
686
+ return this.layout.margin[physicalEdge(edge)];
687
+ }
688
+ // -- Style setters: dimensions
689
+ /**
690
+ * Set the width from a number, an 'auto' or percent string, or undefined.
691
+ * @param v - the width value.
692
+ */
693
+ setWidth(v) {
694
+ this.style.width = parseDimension(v);
695
+ this.markDirty();
696
+ }
697
+ /**
698
+ * Set the width as a percentage of the owner's width.
699
+ * @param v - the percentage value.
700
+ */
701
+ setWidthPercent(v) {
702
+ this.style.width = percentValue(v);
703
+ this.markDirty();
704
+ }
705
+ /**
706
+ * Set the width to auto.
707
+ */
708
+ setWidthAuto() {
709
+ this.style.width = AUTO_VALUE;
710
+ this.markDirty();
711
+ }
712
+ /**
713
+ * Set the height from a number, an 'auto' or percent string, or undefined.
714
+ * @param v - the height value.
715
+ */
716
+ setHeight(v) {
717
+ this.style.height = parseDimension(v);
718
+ this.markDirty();
719
+ }
720
+ /**
721
+ * Set the height as a percentage of the owner's height.
722
+ * @param v - the percentage value.
723
+ */
724
+ setHeightPercent(v) {
725
+ this.style.height = percentValue(v);
726
+ this.markDirty();
727
+ }
728
+ /**
729
+ * Set the height to auto.
730
+ */
731
+ setHeightAuto() {
732
+ this.style.height = AUTO_VALUE;
733
+ this.markDirty();
734
+ }
735
+ /**
736
+ * Set the min width from a number, a percent string, or undefined.
737
+ * @param v - the min width value.
738
+ */
739
+ setMinWidth(v) {
740
+ this.style.minWidth = parseDimension(v);
741
+ this.markDirty();
742
+ }
743
+ /**
744
+ * Set the min width as a percentage of the owner's width.
745
+ * @param v - the percentage value.
746
+ */
747
+ setMinWidthPercent(v) {
748
+ this.style.minWidth = percentValue(v);
749
+ this.markDirty();
750
+ }
751
+ /**
752
+ * Set the min height from a number, a percent string, or undefined.
753
+ * @param v - the min height value.
754
+ */
755
+ setMinHeight(v) {
756
+ this.style.minHeight = parseDimension(v);
757
+ this.markDirty();
758
+ }
759
+ /**
760
+ * Set the min height as a percentage of the owner's height.
761
+ * @param v - the percentage value.
762
+ */
763
+ setMinHeightPercent(v) {
764
+ this.style.minHeight = percentValue(v);
765
+ this.markDirty();
766
+ }
767
+ /**
768
+ * Set the max width from a number, a percent string, or undefined.
769
+ * @param v - the max width value.
770
+ */
771
+ setMaxWidth(v) {
772
+ this.style.maxWidth = parseDimension(v);
773
+ this.markDirty();
774
+ }
775
+ /**
776
+ * Set the max width as a percentage of the owner's width.
777
+ * @param v - the percentage value.
778
+ */
779
+ setMaxWidthPercent(v) {
780
+ this.style.maxWidth = percentValue(v);
781
+ this.markDirty();
782
+ }
783
+ /**
784
+ * Set the max height from a number, a percent string, or undefined.
785
+ * @param v - the max height value.
786
+ */
787
+ setMaxHeight(v) {
788
+ this.style.maxHeight = parseDimension(v);
789
+ this.markDirty();
790
+ }
791
+ /**
792
+ * Set the max height as a percentage of the owner's height.
793
+ * @param v - the percentage value.
794
+ */
795
+ setMaxHeightPercent(v) {
796
+ this.style.maxHeight = percentValue(v);
797
+ this.markDirty();
798
+ }
799
+ // -- Style setters: flex
800
+ /**
801
+ * Set the flex direction (main axis).
802
+ * @param dir - the flex direction value.
803
+ */
804
+ setFlexDirection(dir) {
805
+ this.style.flexDirection = dir;
806
+ this.markDirty();
807
+ }
808
+ /**
809
+ * Set the flex grow factor.
810
+ * @param v - the grow factor; undefined resets to 0.
811
+ */
812
+ setFlexGrow(v) {
813
+ this.style.flexGrow = v ?? 0;
814
+ this.markDirty();
815
+ }
816
+ /**
817
+ * Set the flex shrink factor.
818
+ * @param v - the shrink factor; undefined resets to 0.
819
+ */
820
+ setFlexShrink(v) {
821
+ this.style.flexShrink = v ?? 0;
822
+ this.markDirty();
823
+ }
824
+ /**
825
+ * Set the flex shorthand. Positive values set grow to v and shrink to 1
826
+ * with basis 0; negative values set shrink to -v; zero or undefined resets
827
+ * both factors.
828
+ * @param v - the flex value.
829
+ */
830
+ setFlex(v) {
831
+ if (v === undefined || isNaN(v)) {
832
+ this.style.flexGrow = 0;
833
+ this.style.flexShrink = 0;
834
+ }
835
+ else if (v > 0) {
836
+ this.style.flexGrow = v;
837
+ this.style.flexShrink = 1;
838
+ this.style.flexBasis = pointValue(0);
839
+ }
840
+ else if (v < 0) {
841
+ this.style.flexGrow = 0;
842
+ this.style.flexShrink = -v;
843
+ }
844
+ else {
845
+ this.style.flexGrow = 0;
846
+ this.style.flexShrink = 0;
847
+ }
848
+ this.markDirty();
849
+ }
850
+ /**
851
+ * Set the flex basis from a number, an 'auto' or percent string, or
852
+ * undefined.
853
+ * @param v - the basis value.
854
+ */
855
+ setFlexBasis(v) {
856
+ this.style.flexBasis = parseDimension(v);
857
+ this.markDirty();
858
+ }
859
+ /**
860
+ * Set the flex basis as a percentage of the owner's main size.
861
+ * @param v - the percentage value.
862
+ */
863
+ setFlexBasisPercent(v) {
864
+ this.style.flexBasis = percentValue(v);
865
+ this.markDirty();
866
+ }
867
+ /**
868
+ * Set the flex basis to auto.
869
+ */
870
+ setFlexBasisAuto() {
871
+ this.style.flexBasis = AUTO_VALUE;
872
+ this.markDirty();
873
+ }
874
+ /**
875
+ * Set the flex wrap mode.
876
+ * @param wrap - the wrap value.
877
+ */
878
+ setFlexWrap(wrap) {
879
+ this.style.flexWrap = wrap;
880
+ this.markDirty();
881
+ }
882
+ // -- Style setters: alignment
883
+ /**
884
+ * Set the align-items value for this container's children.
885
+ * @param a - the alignment value.
886
+ */
887
+ setAlignItems(a) {
888
+ this.style.alignItems = a;
889
+ this.markDirty();
890
+ }
891
+ /**
892
+ * Set this node's align-self value.
893
+ * @param a - the alignment value.
894
+ */
895
+ setAlignSelf(a) {
896
+ this.style.alignSelf = a;
897
+ this.markDirty();
898
+ }
899
+ /**
900
+ * Set the align-content value for wrapped lines.
901
+ * @param a - the alignment value.
902
+ */
903
+ setAlignContent(a) {
904
+ this.style.alignContent = a;
905
+ this.markDirty();
906
+ }
907
+ /**
908
+ * Set the justify-content value for the main axis.
909
+ * @param j - the justification value.
910
+ */
911
+ setJustifyContent(j) {
912
+ this.style.justifyContent = j;
913
+ this.markDirty();
914
+ }
915
+ // -- Style setters: display / position / overflow
916
+ /**
917
+ * Set the display mode.
918
+ * @param d - the display value.
919
+ */
920
+ setDisplay(d) {
921
+ this.style.display = d;
922
+ this.markDirty();
923
+ }
924
+ /**
925
+ * Get the display mode.
926
+ * @returns the display value.
927
+ */
928
+ getDisplay() {
929
+ return this.style.display;
930
+ }
931
+ /**
932
+ * Set the position type.
933
+ * @param t - the position type value.
934
+ */
935
+ setPositionType(t) {
936
+ this.style.positionType = t;
937
+ this.markDirty();
938
+ }
939
+ /**
940
+ * Set a position inset from a number, a percent string, or undefined.
941
+ * @param edge - the edge to set.
942
+ * @param v - the inset value.
943
+ */
944
+ setPosition(edge, v) {
945
+ this.style.position[edge] = parseDimension(v);
946
+ this._hasPosition = hasAnyDefinedEdge(this.style.position);
947
+ this.markDirty();
948
+ }
949
+ /**
950
+ * Set a position inset as a percentage of the owner's size.
951
+ * @param edge - the edge to set.
952
+ * @param v - the percentage value.
953
+ */
954
+ setPositionPercent(edge, v) {
955
+ this.style.position[edge] = percentValue(v);
956
+ this._hasPosition = true;
957
+ this.markDirty();
958
+ }
959
+ /**
960
+ * Set a position inset to auto.
961
+ * @param edge - the edge to set.
962
+ */
963
+ setPositionAuto(edge) {
964
+ this.style.position[edge] = AUTO_VALUE;
965
+ this._hasPosition = true;
966
+ this.markDirty();
967
+ }
968
+ /**
969
+ * Set the overflow behavior.
970
+ * @param o - the overflow value.
971
+ */
972
+ setOverflow(o) {
973
+ this.style.overflow = o;
974
+ this.markDirty();
975
+ }
976
+ /**
977
+ * Set the text direction.
978
+ * @param d - the direction value.
979
+ */
980
+ setDirection(d) {
981
+ this.style.direction = d;
982
+ this.markDirty();
983
+ }
984
+ /**
985
+ * Set the box-sizing mode. Accepted for API parity; content-box is not
986
+ * implemented in this port.
987
+ * @param _ - the box-sizing value.
988
+ */
989
+ setBoxSizing(_) {
990
+ // Not implemented — Ink doesn't use content-box
991
+ }
992
+ // -- Style setters: spacing
993
+ /**
994
+ * Set a margin from a number, an 'auto' or percent string, or undefined.
995
+ * @param edge - the edge to set.
996
+ * @param v - the margin value.
997
+ */
998
+ setMargin(edge, v) {
999
+ const val = parseDimension(v);
1000
+ this.style.margin[edge] = val;
1001
+ if (val.unit === Unit.Auto)
1002
+ this._hasAutoMargin = true;
1003
+ else
1004
+ this._hasAutoMargin = hasAnyAutoEdge(this.style.margin);
1005
+ this._hasMargin =
1006
+ this._hasAutoMargin || hasAnyDefinedEdge(this.style.margin);
1007
+ this.markDirty();
1008
+ }
1009
+ /**
1010
+ * Set a margin as a percentage of the owner's width.
1011
+ * @param edge - the edge to set.
1012
+ * @param v - the percentage value.
1013
+ */
1014
+ setMarginPercent(edge, v) {
1015
+ this.style.margin[edge] = percentValue(v);
1016
+ this._hasAutoMargin = hasAnyAutoEdge(this.style.margin);
1017
+ this._hasMargin = true;
1018
+ this.markDirty();
1019
+ }
1020
+ /**
1021
+ * Set a margin to auto.
1022
+ * @param edge - the edge to set.
1023
+ */
1024
+ setMarginAuto(edge) {
1025
+ this.style.margin[edge] = AUTO_VALUE;
1026
+ this._hasAutoMargin = true;
1027
+ this._hasMargin = true;
1028
+ this.markDirty();
1029
+ }
1030
+ /**
1031
+ * Set padding from a number, a percent string, or undefined.
1032
+ * @param edge - the edge to set.
1033
+ * @param v - the padding value.
1034
+ */
1035
+ setPadding(edge, v) {
1036
+ this.style.padding[edge] = parseDimension(v);
1037
+ this._hasPadding = hasAnyDefinedEdge(this.style.padding);
1038
+ this.markDirty();
1039
+ }
1040
+ /**
1041
+ * Set padding as a percentage of the owner's width.
1042
+ * @param edge - the edge to set.
1043
+ * @param v - the percentage value.
1044
+ */
1045
+ setPaddingPercent(edge, v) {
1046
+ this.style.padding[edge] = percentValue(v);
1047
+ this._hasPadding = true;
1048
+ this.markDirty();
1049
+ }
1050
+ /**
1051
+ * Set a border width in points; undefined clears the edge.
1052
+ * @param edge - the edge to set.
1053
+ * @param v - the border width.
1054
+ */
1055
+ setBorder(edge, v) {
1056
+ this.style.border[edge] = v === undefined ? UNDEFINED_VALUE : pointValue(v);
1057
+ this._hasBorder = hasAnyDefinedEdge(this.style.border);
1058
+ this.markDirty();
1059
+ }
1060
+ /**
1061
+ * Set a gap from a number, a percent string, or undefined.
1062
+ * @param gutter - the gutter axis to set.
1063
+ * @param v - the gap value.
1064
+ */
1065
+ setGap(gutter, v) {
1066
+ this.style.gap[gutter] = parseDimension(v);
1067
+ this.markDirty();
1068
+ }
1069
+ /**
1070
+ * Set a gap as a percentage of the owner's size.
1071
+ * @param gutter - the gutter axis to set.
1072
+ * @param v - the percentage value.
1073
+ */
1074
+ setGapPercent(gutter, v) {
1075
+ this.style.gap[gutter] = percentValue(v);
1076
+ this.markDirty();
1077
+ }
1078
+ // -- Style getters (partial — only what tests need)
1079
+ /**
1080
+ * Get the flex direction.
1081
+ * @returns the flex direction value.
1082
+ */
1083
+ getFlexDirection() {
1084
+ return this.style.flexDirection;
1085
+ }
1086
+ /**
1087
+ * Get the justify-content value.
1088
+ * @returns the justification value.
1089
+ */
1090
+ getJustifyContent() {
1091
+ return this.style.justifyContent;
1092
+ }
1093
+ /**
1094
+ * Get the align-items value.
1095
+ * @returns the alignment value.
1096
+ */
1097
+ getAlignItems() {
1098
+ return this.style.alignItems;
1099
+ }
1100
+ /**
1101
+ * Get the align-self value.
1102
+ * @returns the alignment value.
1103
+ */
1104
+ getAlignSelf() {
1105
+ return this.style.alignSelf;
1106
+ }
1107
+ /**
1108
+ * Get the align-content value.
1109
+ * @returns the alignment value.
1110
+ */
1111
+ getAlignContent() {
1112
+ return this.style.alignContent;
1113
+ }
1114
+ /**
1115
+ * Get the flex grow factor.
1116
+ * @returns the grow factor.
1117
+ */
1118
+ getFlexGrow() {
1119
+ return this.style.flexGrow;
1120
+ }
1121
+ /**
1122
+ * Get the flex shrink factor.
1123
+ * @returns the shrink factor.
1124
+ */
1125
+ getFlexShrink() {
1126
+ return this.style.flexShrink;
1127
+ }
1128
+ /**
1129
+ * Get the flex basis value.
1130
+ * @returns the flex basis.
1131
+ */
1132
+ getFlexBasis() {
1133
+ return this.style.flexBasis;
1134
+ }
1135
+ /**
1136
+ * Get the flex wrap mode.
1137
+ * @returns the wrap value.
1138
+ */
1139
+ getFlexWrap() {
1140
+ return this.style.flexWrap;
1141
+ }
1142
+ /**
1143
+ * Get the width value.
1144
+ * @returns the width style value.
1145
+ */
1146
+ getWidth() {
1147
+ return this.style.width;
1148
+ }
1149
+ /**
1150
+ * Get the height value.
1151
+ * @returns the height style value.
1152
+ */
1153
+ getHeight() {
1154
+ return this.style.height;
1155
+ }
1156
+ /**
1157
+ * Get the overflow behavior.
1158
+ * @returns the overflow value.
1159
+ */
1160
+ getOverflow() {
1161
+ return this.style.overflow;
1162
+ }
1163
+ /**
1164
+ * Get the position type.
1165
+ * @returns the position type value.
1166
+ */
1167
+ getPositionType() {
1168
+ return this.style.positionType;
1169
+ }
1170
+ /**
1171
+ * Get the text direction.
1172
+ * @returns the direction value.
1173
+ */
1174
+ getDirection() {
1175
+ return this.style.direction;
1176
+ }
1177
+ // -- Unused API stubs (present for API parity)
1178
+ /**
1179
+ * Copy another node's style into this node. Accepted for API parity; no-op
1180
+ * in this port.
1181
+ * @param _ - the source node.
1182
+ */
1183
+ copyStyle(_) { }
1184
+ /**
1185
+ * Set a callback invoked when the node becomes dirty. Accepted for API
1186
+ * parity; no-op in this port.
1187
+ * @param _ - the callback.
1188
+ */
1189
+ setDirtiedFunc(_) { }
1190
+ /**
1191
+ * Clear the dirtied callback. Accepted for API parity; no-op in this port.
1192
+ */
1193
+ unsetDirtiedFunc() { }
1194
+ /**
1195
+ * Set whether this node is its parent's baseline reference.
1196
+ * @param v - the reference-baseline flag.
1197
+ */
1198
+ setIsReferenceBaseline(v) {
1199
+ this.isReferenceBaseline_ = v;
1200
+ this.markDirty();
1201
+ }
1202
+ /**
1203
+ * Whether this node is its parent's baseline reference.
1204
+ * @returns the reference-baseline flag.
1205
+ */
1206
+ isReferenceBaseline() {
1207
+ return this.isReferenceBaseline_;
1208
+ }
1209
+ /**
1210
+ * Set the aspect ratio. Accepted for API parity; aspect-ratio is not
1211
+ * implemented in this port.
1212
+ * @param _ - the aspect ratio.
1213
+ */
1214
+ setAspectRatio(_) { }
1215
+ /**
1216
+ * Get the aspect ratio. Always NaN in this port.
1217
+ * @returns the aspect ratio.
1218
+ */
1219
+ getAspectRatio() {
1220
+ return NaN;
1221
+ }
1222
+ /**
1223
+ * Set whether this node always forms a containing block. Accepted for API
1224
+ * parity; no-op in this port.
1225
+ * @param _ - the flag.
1226
+ */
1227
+ setAlwaysFormsContainingBlock(_) { }
1228
+ // -- Layout entry point
1229
+ /**
1230
+ * Run layout on this node's subtree. Resets the profiling counters, then
1231
+ * computes and writes layout results into this node and all descendants.
1232
+ * @param ownerWidth - the containing block's width; undefined when unbounded.
1233
+ * @param ownerHeight - the containing block's height; undefined when unbounded.
1234
+ * @param _direction - accepted for API parity; this port is always LTR.
1235
+ */
1236
+ calculateLayout(ownerWidth, ownerHeight, _direction) {
1237
+ _yogaNodesVisited = 0;
1238
+ _yogaMeasureCalls = 0;
1239
+ _yogaCacheHits = 0;
1240
+ _generation++;
1241
+ const w = ownerWidth === undefined ? NaN : ownerWidth;
1242
+ const h = ownerHeight === undefined ? NaN : ownerHeight;
1243
+ layoutNode(this, w, h, isDefined(w) ? MeasureMode.Exactly : MeasureMode.Undefined, isDefined(h) ? MeasureMode.Exactly : MeasureMode.Undefined, w, h, true);
1244
+ // Root's own position = margin + position insets (yoga applies position
1245
+ // to the root even without a parent container; this matters for rounding
1246
+ // since the root's abs top/left seeds the pixel-grid walk).
1247
+ const mar = this.layout.margin;
1248
+ const posL = resolveValue(resolveEdgeRaw(this.style.position, EDGE_LEFT), isDefined(w) ? w : 0);
1249
+ const posT = resolveValue(resolveEdgeRaw(this.style.position, EDGE_TOP), isDefined(w) ? w : 0);
1250
+ this.layout.left = mar[EDGE_LEFT] + (isDefined(posL) ? posL : 0);
1251
+ this.layout.top = mar[EDGE_TOP] + (isDefined(posT) ? posT : 0);
1252
+ roundLayout(this, this.config.pointScaleFactor, 0, 0);
1253
+ }
1254
+ }
1255
+ const DEFAULT_CONFIG = createConfig();
1256
+ const CACHE_SLOTS = 4;
1257
+ function cacheWrite(node, aW, aH, wM, hM, oW, oH, fW, fH, wasDirty) {
1258
+ if (!node._cIn) {
1259
+ node._cIn = new Float64Array(CACHE_SLOTS * 8);
1260
+ node._cOut = new Float64Array(CACHE_SLOTS * 3);
1261
+ }
1262
+ // First write after a dirty clears stale entries from before the dirty.
1263
+ // _cGen < _generation means entries are from a previous calculateLayout;
1264
+ // if wasDirty, the subtree changed since then → old dimensions invalid.
1265
+ // Clean nodes' old entries stay — same subtree → same result for same
1266
+ // inputs, so cross-generation caching works (the scroll hot path where
1267
+ // 499 clean messages cache-hit while one dirty leaf recomputes).
1268
+ if (wasDirty && node._cGen !== _generation) {
1269
+ node._cN = 0;
1270
+ node._cWr = 0;
1271
+ }
1272
+ // LRU write index wraps; _cN stays at CACHE_SLOTS so the read scan always
1273
+ // checks all populated slots (not just those since last wrap).
1274
+ const i = node._cWr++ % CACHE_SLOTS;
1275
+ if (node._cN < CACHE_SLOTS)
1276
+ node._cN = node._cWr;
1277
+ const o = i * 8;
1278
+ const cIn = node._cIn;
1279
+ cIn[o] = aW;
1280
+ cIn[o + 1] = aH;
1281
+ cIn[o + 2] = wM;
1282
+ cIn[o + 3] = hM;
1283
+ cIn[o + 4] = oW;
1284
+ cIn[o + 5] = oH;
1285
+ cIn[o + 6] = fW ? 1 : 0;
1286
+ cIn[o + 7] = fH ? 1 : 0;
1287
+ node._cOut[i * 3] = node.layout.width;
1288
+ node._cOut[i * 3 + 1] = node.layout.height;
1289
+ node._cOut[i * 3 + 2] = node.layout.measuredWidth;
1290
+ node._cGen = _generation;
1291
+ }
1292
+ // Store computed layout.width/height into the single-slot cache output fields.
1293
+ // _hasL/_hasM inputs are committed at the TOP of layoutNode (before compute);
1294
+ // outputs must be committed HERE (after compute) so a cache hit can restore
1295
+ // the correct dimensions. Without this, a _hasL hit returns whatever
1296
+ // layout.width/height was left by the last call — which may be the intrinsic
1297
+ // content height from a heightMode=Undefined measure pass rather than the
1298
+ // constrained viewport height from the layout pass. That's the scrollbox
1299
+ // vpH=33→2624 bug: scrollTop clamps to 0, viewport goes blank.
1300
+ function commitCacheOutputs(node, performLayout) {
1301
+ if (performLayout) {
1302
+ node._lOutW = node.layout.width;
1303
+ node._lOutH = node.layout.height;
1304
+ node._lOutMeasuredWidth = node.layout.measuredWidth;
1305
+ // A completed layout pass re-laid the whole subtree at the final
1306
+ // constraints — any measure-pass scratch below has been overwritten,
1307
+ // so this node may serve layout-cache hits again.
1308
+ node._scratchGen = -1;
1309
+ }
1310
+ else {
1311
+ node._mOutW = node.layout.width;
1312
+ node._mOutH = node.layout.height;
1313
+ node._mOutMeasuredWidth = node.layout.measuredWidth;
1314
+ // This measure call actually computed: its recursion overwrote the
1315
+ // subtree's layout.* as scratch for the probed size. Until a layout
1316
+ // pass re-lays this subtree, layout-cache hits here must be refused
1317
+ // (see _scratchGen). Leaves have no subtree to corrupt — skip them so
1318
+ // measure-heavy text nodes keep their layout-cache hits.
1319
+ if (node.children.length > 0)
1320
+ node._scratchGen = _generation;
1321
+ }
1322
+ }
1323
+ // --
1324
+ // Core flexbox algorithm
1325
+ // Profiling counters — reset per calculateLayout, read via getYogaCounters.
1326
+ // Incremented on each calculateLayout(). Nodes stamp _fbGen/_cGen when
1327
+ // their cache is written; a cache entry with gen === _generation was
1328
+ // computed THIS pass and is fresh regardless of isDirty_ state.
1329
+ let _generation = 0;
1330
+ let _yogaNodesVisited = 0;
1331
+ let _yogaMeasureCalls = 0;
1332
+ let _yogaCacheHits = 0;
1333
+ let _yogaLiveNodes = 0;
1334
+ /**
1335
+ * Get the profiling counters accumulated since the last calculateLayout.
1336
+ * @returns the visited, measured, cacheHits, and live counts.
1337
+ */
1338
+ export function getYogaCounters() {
1339
+ return {
1340
+ visited: _yogaNodesVisited,
1341
+ measured: _yogaMeasureCalls,
1342
+ cacheHits: _yogaCacheHits,
1343
+ live: _yogaLiveNodes,
1344
+ };
1345
+ }
1346
+ function layoutNode(node, availableWidth, availableHeight, widthMode, heightMode, ownerWidth, ownerHeight, performLayout,
1347
+ // When true, ignore style dimension on this axis — the flex container
1348
+ // has already determined the main size (flex-basis + grow/shrink result).
1349
+ forceWidth = false, forceHeight = false) {
1350
+ _yogaNodesVisited++;
1351
+ const style = node.style;
1352
+ const layout = node.layout;
1353
+ // Dirty-flag skip: clean subtree + matching inputs → layout object already
1354
+ // holds the answer. A cached layout result also satisfies a measure request
1355
+ // (positions are a superset of dimensions); the reverse does not hold.
1356
+ // Same-generation entries are fresh regardless of isDirty_ — they were
1357
+ // computed THIS calculateLayout, the subtree hasn't changed since.
1358
+ // Previous-generation entries need !isDirty_ (a dirty node's cache from
1359
+ // before the dirty is stale).
1360
+ // sameGen bypass only for MEASURE calls — a layout-pass cache hit would
1361
+ // skip the child-positioning recursion (STEP 5), leaving children at
1362
+ // stale positions. Measure calls only need w/h which the cache stores.
1363
+ const sameGen = node._cGen === _generation && !performLayout;
1364
+ if (!node.isDirty_ || sameGen) {
1365
+ if (!node.isDirty_ &&
1366
+ node._hasL &&
1367
+ // A layout-pass hit restores only this node's own w/h and skips the
1368
+ // child recursion — illegal while a same-generation measure compute
1369
+ // has left the subtree at scratch geometry for a different probe size.
1370
+ !(performLayout && node._scratchGen === _generation) &&
1371
+ node._lWM === widthMode &&
1372
+ node._lHM === heightMode &&
1373
+ node._lFW === forceWidth &&
1374
+ node._lFH === forceHeight &&
1375
+ sameFloat(node._lW, availableWidth) &&
1376
+ sameFloat(node._lH, availableHeight) &&
1377
+ sameFloat(node._lOW, ownerWidth) &&
1378
+ sameFloat(node._lOH, ownerHeight)) {
1379
+ _yogaCacheHits++;
1380
+ layout.width = node._lOutW;
1381
+ layout.height = node._lOutH;
1382
+ layout.measuredWidth = node._lOutMeasuredWidth;
1383
+ return;
1384
+ }
1385
+ // Multi-entry cache: scan for matching inputs, restore cached w/h on hit.
1386
+ // Covers the scroll case where a dirty ancestor's measure→layout cascade
1387
+ // produces N>1 distinct input combos per clean child — the single _hasL
1388
+ // slot thrashed, forcing full subtree recursion. With 500-message
1389
+ // scrollbox and one dirty leaf, this took dirty-leaf relayout from
1390
+ // 76k layoutNode calls (21.7×nodes) to 4k (1.2×nodes), 6.86ms → 550µs.
1391
+ // Same-generation check covers fresh-mounted (dirty) nodes during
1392
+ // virtual scroll — the dirty chain invokes them ≥2^depth times, first
1393
+ // call writes cache, rest hit: 105k visits → ~10k for 1593-node tree.
1394
+ if (node._cN > 0 &&
1395
+ (sameGen || !node.isDirty_) &&
1396
+ // Same scratch guard as _hasL: a layout-pass hit must not skip child
1397
+ // recursion over a measure-scratched subtree.
1398
+ !(performLayout && node._scratchGen === _generation)) {
1399
+ const cIn = node._cIn;
1400
+ for (let i = 0; i < node._cN; i++) {
1401
+ const o = i * 8;
1402
+ if (cIn[o + 2] === widthMode &&
1403
+ cIn[o + 3] === heightMode &&
1404
+ cIn[o + 6] === (forceWidth ? 1 : 0) &&
1405
+ cIn[o + 7] === (forceHeight ? 1 : 0) &&
1406
+ sameFloat(cIn[o], availableWidth) &&
1407
+ sameFloat(cIn[o + 1], availableHeight) &&
1408
+ sameFloat(cIn[o + 4], ownerWidth) &&
1409
+ sameFloat(cIn[o + 5], ownerHeight)) {
1410
+ layout.width = node._cOut[i * 3];
1411
+ layout.height = node._cOut[i * 3 + 1];
1412
+ layout.measuredWidth = node._cOut[i * 3 + 2];
1413
+ _yogaCacheHits++;
1414
+ return;
1415
+ }
1416
+ }
1417
+ }
1418
+ if (!node.isDirty_ &&
1419
+ !performLayout &&
1420
+ node._hasM &&
1421
+ node._mWM === widthMode &&
1422
+ node._mHM === heightMode &&
1423
+ sameFloat(node._mW, availableWidth) &&
1424
+ sameFloat(node._mH, availableHeight) &&
1425
+ sameFloat(node._mOW, ownerWidth) &&
1426
+ sameFloat(node._mOH, ownerHeight)) {
1427
+ layout.width = node._mOutW;
1428
+ layout.height = node._mOutH;
1429
+ layout.measuredWidth = node._mOutMeasuredWidth;
1430
+ _yogaCacheHits++;
1431
+ return;
1432
+ }
1433
+ }
1434
+ // Commit cache inputs up front so every return path leaves a valid entry.
1435
+ // Only clear isDirty_ on the LAYOUT pass — the measure pass (computeFlexBasis
1436
+ // → layoutNode(performLayout=false)) runs before the layout pass in the same
1437
+ // calculateLayout call. Clearing dirty during measure lets the subsequent
1438
+ // layout pass hit the STALE _hasL cache from the previous calculateLayout
1439
+ // (before children were inserted), so ScrollBox content height never grows
1440
+ // and sticky-scroll never follows new content. A dirty node's _hasL entry is
1441
+ // stale by definition — invalidate it so the layout pass recomputes.
1442
+ const wasDirty = node.isDirty_;
1443
+ if (performLayout) {
1444
+ node._lW = availableWidth;
1445
+ node._lH = availableHeight;
1446
+ node._lWM = widthMode;
1447
+ node._lHM = heightMode;
1448
+ node._lOW = ownerWidth;
1449
+ node._lOH = ownerHeight;
1450
+ node._lFW = forceWidth;
1451
+ node._lFH = forceHeight;
1452
+ node._hasL = true;
1453
+ node.isDirty_ = false;
1454
+ // Previous approach cleared _cN here to prevent stale pre-dirty entries
1455
+ // from hitting (long-continuous blank-screen bug). Now replaced by
1456
+ // generation stamping: the cache check requires sameGen || !isDirty_, so
1457
+ // previous-generation entries from a dirty node can't hit. Clearing here
1458
+ // would wipe fresh same-generation entries from an earlier measure call,
1459
+ // forcing recompute on the layout call.
1460
+ if (wasDirty)
1461
+ node._hasM = false;
1462
+ }
1463
+ else {
1464
+ node._mW = availableWidth;
1465
+ node._mH = availableHeight;
1466
+ node._mWM = widthMode;
1467
+ node._mHM = heightMode;
1468
+ node._mOW = ownerWidth;
1469
+ node._mOH = ownerHeight;
1470
+ node._hasM = true;
1471
+ // Don't clear isDirty_. For DIRTY nodes, invalidate _hasL so the upcoming
1472
+ // performLayout=true call recomputes with the new child set (otherwise
1473
+ // sticky-scroll never follows new content — the bug from 4557bc9f9c).
1474
+ // Clean nodes keep _hasL: their layout from the previous generation is
1475
+ // still valid, they're only here because an ancestor is dirty and called
1476
+ // with different inputs than cached.
1477
+ if (wasDirty)
1478
+ node._hasL = false;
1479
+ }
1480
+ // Resolve padding/border/margin against ownerWidth (yoga uses ownerWidth for %)
1481
+ // Write directly into the pre-allocated layout arrays — avoids 3 allocs per
1482
+ // layoutNode call and 12 resolveEdge calls (was the #1 hotspot per CPU profile).
1483
+ // Skip entirely when no edges are set — the 4-write zero is cheaper than
1484
+ // the ~20 reads + ~15 compares resolveEdges4Into does to produce zeros.
1485
+ const pad = layout.padding;
1486
+ const bor = layout.border;
1487
+ const mar = layout.margin;
1488
+ if (node._hasPadding)
1489
+ resolveEdges4Into(style.padding, ownerWidth, pad);
1490
+ else
1491
+ pad[0] = pad[1] = pad[2] = pad[3] = 0;
1492
+ if (node._hasBorder)
1493
+ resolveEdges4Into(style.border, ownerWidth, bor);
1494
+ else
1495
+ bor[0] = bor[1] = bor[2] = bor[3] = 0;
1496
+ if (node._hasMargin)
1497
+ resolveEdges4Into(style.margin, ownerWidth, mar);
1498
+ else
1499
+ mar[0] = mar[1] = mar[2] = mar[3] = 0;
1500
+ const paddingBorderWidth = pad[0] + pad[2] + bor[0] + bor[2];
1501
+ const paddingBorderHeight = pad[1] + pad[3] + bor[1] + bor[3];
1502
+ // Resolve style dimensions
1503
+ const styleWidth = forceWidth ? NaN : resolveValue(style.width, ownerWidth);
1504
+ const styleHeight = forceHeight
1505
+ ? NaN
1506
+ : resolveValue(style.height, ownerHeight);
1507
+ // If style dimension is defined, it overrides the available size
1508
+ let width = availableWidth;
1509
+ let height = availableHeight;
1510
+ let wMode = widthMode;
1511
+ let hMode = heightMode;
1512
+ if (isDefined(styleWidth)) {
1513
+ width = styleWidth;
1514
+ wMode = MeasureMode.Exactly;
1515
+ }
1516
+ if (isDefined(styleHeight)) {
1517
+ height = styleHeight;
1518
+ hMode = MeasureMode.Exactly;
1519
+ }
1520
+ // Apply min/max constraints to the node's own dimensions
1521
+ width = boundAxis(style, true, width, ownerWidth, ownerHeight);
1522
+ height = boundAxis(style, false, height, ownerWidth, ownerHeight);
1523
+ // Measure-func leaf node
1524
+ if (node.measureFunc && node.children.length === 0) {
1525
+ const innerW = wMode === MeasureMode.Undefined
1526
+ ? NaN
1527
+ : Math.max(0, width - paddingBorderWidth);
1528
+ const innerH = hMode === MeasureMode.Undefined
1529
+ ? NaN
1530
+ : Math.max(0, height - paddingBorderHeight);
1531
+ _yogaMeasureCalls++;
1532
+ const measured = node.measureFunc(innerW, wMode, innerH, hMode);
1533
+ node.layout.measuredWidth = wMode === MeasureMode.Undefined ? measured.width : innerW;
1534
+ node.layout.width =
1535
+ wMode === MeasureMode.Exactly
1536
+ ? width
1537
+ : boundAxis(style, true, (measured.width ?? 0) + paddingBorderWidth, ownerWidth, ownerHeight);
1538
+ node.layout.height =
1539
+ hMode === MeasureMode.Exactly
1540
+ ? height
1541
+ : boundAxis(style, false, (measured.height ?? 0) + paddingBorderHeight, ownerWidth, ownerHeight);
1542
+ commitCacheOutputs(node, performLayout);
1543
+ // Write cache even for dirty nodes — fresh-mounted items during virtual
1544
+ // scroll are dirty on first layout, but the dirty chain's measure→layout
1545
+ // cascade invokes them ≥2^depth times per calculateLayout. Writing here
1546
+ // lets the 2nd+ calls hit cache (isDirty_ was cleared in the layout pass
1547
+ // above). Measured: 105k visits → 10k for a 1593-node fresh-mount tree.
1548
+ cacheWrite(node, availableWidth, availableHeight, widthMode, heightMode, ownerWidth, ownerHeight, forceWidth, forceHeight, wasDirty);
1549
+ return;
1550
+ }
1551
+ // Leaf node with no children and no measure func
1552
+ if (node.children.length === 0) {
1553
+ node.layout.width =
1554
+ wMode === MeasureMode.Exactly
1555
+ ? width
1556
+ : boundAxis(style, true, paddingBorderWidth, ownerWidth, ownerHeight);
1557
+ node.layout.height =
1558
+ hMode === MeasureMode.Exactly
1559
+ ? height
1560
+ : boundAxis(style, false, paddingBorderHeight, ownerWidth, ownerHeight);
1561
+ commitCacheOutputs(node, performLayout);
1562
+ // Write cache even for dirty nodes — fresh-mounted items during virtual
1563
+ // scroll are dirty on first layout, but the dirty chain's measure→layout
1564
+ // cascade invokes them ≥2^depth times per calculateLayout. Writing here
1565
+ // lets the 2nd+ calls hit cache (isDirty_ was cleared in the layout pass
1566
+ // above). Measured: 105k visits → 10k for a 1593-node fresh-mount tree.
1567
+ cacheWrite(node, availableWidth, availableHeight, widthMode, heightMode, ownerWidth, ownerHeight, forceWidth, forceHeight, wasDirty);
1568
+ return;
1569
+ }
1570
+ // Container with children — run flexbox algorithm
1571
+ const mainAxis = style.flexDirection;
1572
+ const crossAx = crossAxis(mainAxis);
1573
+ const isMainRow = isRow(mainAxis);
1574
+ const mainSize = isMainRow ? width : height;
1575
+ const crossSize = isMainRow ? height : width;
1576
+ const mainMode = isMainRow ? wMode : hMode;
1577
+ const crossMode = isMainRow ? hMode : wMode;
1578
+ const mainPadBorder = isMainRow ? paddingBorderWidth : paddingBorderHeight;
1579
+ const crossPadBorder = isMainRow ? paddingBorderHeight : paddingBorderWidth;
1580
+ const innerMainSize = isDefined(mainSize)
1581
+ ? Math.max(0, mainSize - mainPadBorder)
1582
+ : NaN;
1583
+ const innerCrossSize = isDefined(crossSize)
1584
+ ? Math.max(0, crossSize - crossPadBorder)
1585
+ : NaN;
1586
+ // Resolve gap
1587
+ const gapMain = resolveGap(style, isMainRow ? Gutter.Column : Gutter.Row, innerMainSize);
1588
+ // Partition children into flow vs absolute. display:contents nodes are
1589
+ // transparent — their children are lifted into the grandparent's child list
1590
+ // (recursively), and the contents node itself gets zero layout.
1591
+ const flowChildren = [];
1592
+ const absChildren = [];
1593
+ collectLayoutChildren(node, flowChildren, absChildren);
1594
+ // ownerW/H are the reference sizes for resolving children's percentage
1595
+ // values. Per CSS, a % width resolves against the parent's content-box
1596
+ // width. If this node's width is indefinite, children's % widths are also
1597
+ // indefinite — do NOT fall through to the grandparent's size.
1598
+ const ownerW = isDefined(width) ? width : NaN;
1599
+ const ownerH = isDefined(height) ? height : NaN;
1600
+ const isWrap = style.flexWrap !== Wrap.NoWrap;
1601
+ const gapCross = resolveGap(style, isMainRow ? Gutter.Row : Gutter.Column, innerCrossSize);
1602
+ // STEP 1: Compute flex-basis for each flow child and break into lines.
1603
+ // Single-line (NoWrap) containers always get one line; multi-line containers
1604
+ // break when accumulated basis+margin+gap exceeds innerMainSize.
1605
+ for (const c of flowChildren) {
1606
+ c._flexBasis = computeFlexBasis(c, mainAxis, innerMainSize, innerCrossSize, crossMode, ownerW, ownerH);
1607
+ }
1608
+ const lines = [];
1609
+ if (!isWrap || !isDefined(innerMainSize) || flowChildren.length === 0) {
1610
+ for (const c of flowChildren)
1611
+ c._lineIndex = 0;
1612
+ lines.push(flowChildren);
1613
+ }
1614
+ else {
1615
+ // Line-break decisions use the min/max-clamped basis (flexbox spec §9.3.5:
1616
+ // "hypothetical main size"), not the raw flex-basis.
1617
+ let lineStart = 0;
1618
+ let lineLen = 0;
1619
+ for (let i = 0; i < flowChildren.length; i++) {
1620
+ const c = flowChildren[i];
1621
+ const hypo = boundAxis(c.style, isMainRow, c._flexBasis, ownerW, ownerH);
1622
+ const outer = Math.max(0, hypo) + childMarginForAxis(c, mainAxis, ownerW);
1623
+ const withGap = i > lineStart ? gapMain : 0;
1624
+ if (i > lineStart && lineLen + withGap + outer > innerMainSize) {
1625
+ lines.push(flowChildren.slice(lineStart, i));
1626
+ lineStart = i;
1627
+ lineLen = outer;
1628
+ }
1629
+ else {
1630
+ lineLen += withGap + outer;
1631
+ }
1632
+ c._lineIndex = lines.length;
1633
+ }
1634
+ lines.push(flowChildren.slice(lineStart));
1635
+ }
1636
+ const lineCount = lines.length;
1637
+ const isBaseline = isBaselineLayout(node, flowChildren);
1638
+ // STEP 2+3: For each line, resolve flexible lengths and lay out children to
1639
+ // measure cross sizes. Track per-line consumed main and max cross.
1640
+ const lineConsumedMain = new Array(lineCount);
1641
+ const lineCrossSizes = new Array(lineCount);
1642
+ // Baseline layout tracks max ascent (baseline + leading margin) per line so
1643
+ // baseline-aligned items can be positioned at maxAscent - childBaseline.
1644
+ const lineMaxAscent = isBaseline ? new Array(lineCount).fill(0) : [];
1645
+ let maxLineMain = 0;
1646
+ let totalLinesCross = 0;
1647
+ for (let li = 0; li < lineCount; li++) {
1648
+ const line = lines[li];
1649
+ const lineGap = line.length > 1 ? gapMain * (line.length - 1) : 0;
1650
+ let lineBasis = lineGap;
1651
+ for (const c of line) {
1652
+ lineBasis += c._flexBasis + childMarginForAxis(c, mainAxis, ownerW);
1653
+ }
1654
+ // Resolve flexible lengths against available inner main. For indefinite
1655
+ // containers with min/max, flex against the clamped size.
1656
+ let availMain = innerMainSize;
1657
+ if (!isDefined(availMain)) {
1658
+ const mainOwner = isMainRow ? ownerWidth : ownerHeight;
1659
+ const minM = resolveValue(isMainRow ? style.minWidth : style.minHeight, mainOwner);
1660
+ const maxM = resolveValue(isMainRow ? style.maxWidth : style.maxHeight, mainOwner);
1661
+ if (isDefined(maxM) && lineBasis > maxM - mainPadBorder) {
1662
+ availMain = Math.max(0, maxM - mainPadBorder);
1663
+ }
1664
+ else if (isDefined(minM) && lineBasis < minM - mainPadBorder) {
1665
+ availMain = Math.max(0, minM - mainPadBorder);
1666
+ }
1667
+ }
1668
+ resolveFlexibleLengths(line, availMain, lineBasis, isMainRow, ownerW, ownerH);
1669
+ // Lay out each child in this line to measure cross
1670
+ let lineCross = 0;
1671
+ for (const c of line) {
1672
+ const cStyle = c.style;
1673
+ const childAlign = cStyle.alignSelf === Align.Auto ? style.alignItems : cStyle.alignSelf;
1674
+ const cMarginCross = childMarginForAxis(c, crossAx, ownerW);
1675
+ let childCrossSize = NaN;
1676
+ let childCrossMode = MeasureMode.Undefined;
1677
+ const resolvedCrossStyle = resolveValue(isMainRow ? cStyle.height : cStyle.width, isMainRow ? ownerH : ownerW);
1678
+ const crossLeadE = isMainRow ? EDGE_TOP : EDGE_LEFT;
1679
+ const crossTrailE = isMainRow ? EDGE_BOTTOM : EDGE_RIGHT;
1680
+ const hasCrossAutoMargin = c._hasAutoMargin &&
1681
+ (isMarginAuto(cStyle.margin, crossLeadE) ||
1682
+ isMarginAuto(cStyle.margin, crossTrailE));
1683
+ // Single-line stretch goes directly to the container cross size.
1684
+ // Multi-line wrap measures intrinsic cross (Undefined mode) so
1685
+ // flex-grow grandchildren don't expand to the container — the line
1686
+ // cross size is determined first, then items are re-stretched.
1687
+ if (isDefined(resolvedCrossStyle)) {
1688
+ childCrossSize = resolvedCrossStyle;
1689
+ childCrossMode = MeasureMode.Exactly;
1690
+ }
1691
+ else if (childAlign === Align.Stretch &&
1692
+ !hasCrossAutoMargin &&
1693
+ !isWrap &&
1694
+ isDefined(innerCrossSize) &&
1695
+ crossMode === MeasureMode.Exactly) {
1696
+ childCrossSize = Math.max(0, innerCrossSize - cMarginCross);
1697
+ childCrossMode = MeasureMode.Exactly;
1698
+ }
1699
+ else if (!isWrap && isDefined(innerCrossSize)) {
1700
+ childCrossSize = Math.max(0, innerCrossSize - cMarginCross);
1701
+ childCrossMode = MeasureMode.AtMost;
1702
+ }
1703
+ const cw = isMainRow ? c._mainSize : childCrossSize;
1704
+ const ch = isMainRow ? childCrossSize : c._mainSize;
1705
+ layoutNode(c, cw, ch, isMainRow ? MeasureMode.Exactly : childCrossMode, isMainRow ? childCrossMode : MeasureMode.Exactly, ownerW, ownerH, performLayout, isMainRow, !isMainRow);
1706
+ c._crossSize = isMainRow ? c.layout.height : c.layout.width;
1707
+ lineCross = Math.max(lineCross, c._crossSize + cMarginCross);
1708
+ }
1709
+ // Baseline layout: line cross size must fit maxAscent + maxDescent of
1710
+ // baseline-aligned children (yoga STEP 8). Only applies to row direction.
1711
+ if (isBaseline) {
1712
+ let maxAscent = 0;
1713
+ let maxDescent = 0;
1714
+ for (const c of line) {
1715
+ if (resolveChildAlign(node, c) !== Align.Baseline)
1716
+ continue;
1717
+ const mTop = resolveEdge(c.style.margin, EDGE_TOP, ownerW);
1718
+ const mBot = resolveEdge(c.style.margin, EDGE_BOTTOM, ownerW);
1719
+ const ascent = calculateBaseline(c) + mTop;
1720
+ const descent = c.layout.height + mTop + mBot - ascent;
1721
+ if (ascent > maxAscent)
1722
+ maxAscent = ascent;
1723
+ if (descent > maxDescent)
1724
+ maxDescent = descent;
1725
+ }
1726
+ lineMaxAscent[li] = maxAscent;
1727
+ if (maxAscent + maxDescent > lineCross) {
1728
+ lineCross = maxAscent + maxDescent;
1729
+ }
1730
+ }
1731
+ // The child layoutNode(c) pass already resolved c.layout.margin[] via
1732
+ // resolveEdges4Into with the same ownerW — read directly instead of
1733
+ // re-resolving through childMarginForAxis → 2× resolveEdge.
1734
+ const mainLead = leadingEdge(mainAxis);
1735
+ const mainTrail = trailingEdge(mainAxis);
1736
+ let consumed = lineGap;
1737
+ for (const c of line) {
1738
+ const cm = c.layout.margin;
1739
+ consumed += c._mainSize + cm[mainLead] + cm[mainTrail];
1740
+ }
1741
+ lineConsumedMain[li] = consumed;
1742
+ lineCrossSizes[li] = lineCross;
1743
+ maxLineMain = Math.max(maxLineMain, consumed);
1744
+ totalLinesCross += lineCross;
1745
+ }
1746
+ const totalCrossGap = lineCount > 1 ? gapCross * (lineCount - 1) : 0;
1747
+ totalLinesCross += totalCrossGap;
1748
+ // STEP 4: Determine container dimensions. Per yoga's STEP 9, for both
1749
+ // AtMost (FitContent) and Undefined (MaxContent) the node sizes to its
1750
+ // content — AtMost is NOT a hard clamp, items may overflow the available
1751
+ // space (CSS "fit-content" behavior). Only Scroll overflow clamps to the
1752
+ // available size. Wrap containers that broke into multiple lines under
1753
+ // AtMost fill the available main size since they wrapped at that boundary.
1754
+ const isScroll = style.overflow === Overflow.Scroll;
1755
+ const contentMain = maxLineMain + mainPadBorder;
1756
+ const finalMainSize = mainMode === MeasureMode.Exactly
1757
+ ? mainSize
1758
+ : mainMode === MeasureMode.AtMost && isScroll
1759
+ ? Math.max(Math.min(mainSize, contentMain), mainPadBorder)
1760
+ : isWrap && lineCount > 1 && mainMode === MeasureMode.AtMost
1761
+ ? mainSize
1762
+ : contentMain;
1763
+ const contentCross = totalLinesCross + crossPadBorder;
1764
+ const finalCrossSize = crossMode === MeasureMode.Exactly
1765
+ ? crossSize
1766
+ : crossMode === MeasureMode.AtMost && isScroll
1767
+ ? Math.max(Math.min(crossSize, contentCross), crossPadBorder)
1768
+ : contentCross;
1769
+ node.layout.width = boundAxis(style, true, isMainRow ? finalMainSize : finalCrossSize, ownerWidth, ownerHeight);
1770
+ node.layout.height = boundAxis(style, false, isMainRow ? finalCrossSize : finalMainSize, ownerWidth, ownerHeight);
1771
+ commitCacheOutputs(node, performLayout);
1772
+ // Write cache even for dirty nodes — fresh-mounted items during virtual scroll
1773
+ cacheWrite(node, availableWidth, availableHeight, widthMode, heightMode, ownerWidth, ownerHeight, forceWidth, forceHeight, wasDirty);
1774
+ if (!performLayout)
1775
+ return;
1776
+ // STEP 5: Position lines (align-content) and children (justify-content +
1777
+ // align-items + auto margins).
1778
+ const actualInnerMain = (isMainRow ? node.layout.width : node.layout.height) - mainPadBorder;
1779
+ const actualInnerCross = (isMainRow ? node.layout.height : node.layout.width) - crossPadBorder;
1780
+ const mainLeadEdgePhys = leadingEdge(mainAxis);
1781
+ const mainTrailEdgePhys = trailingEdge(mainAxis);
1782
+ const crossLeadEdgePhys = isMainRow ? EDGE_TOP : EDGE_LEFT;
1783
+ const crossTrailEdgePhys = isMainRow ? EDGE_BOTTOM : EDGE_RIGHT;
1784
+ const reversed = isReverse(mainAxis);
1785
+ const mainContainerSize = isMainRow ? node.layout.width : node.layout.height;
1786
+ const crossLead = pad[crossLeadEdgePhys] + bor[crossLeadEdgePhys];
1787
+ // Align-content: distribute free cross space among lines. Single-line
1788
+ // containers use the full cross size for the one line (align-items handles
1789
+ // positioning within it).
1790
+ let lineCrossOffset = crossLead;
1791
+ let betweenLines = gapCross;
1792
+ const freeCross = actualInnerCross - totalLinesCross;
1793
+ if (lineCount === 1 && !isWrap && !isBaseline) {
1794
+ lineCrossSizes[0] = actualInnerCross;
1795
+ }
1796
+ else {
1797
+ const remCross = Math.max(0, freeCross);
1798
+ switch (style.alignContent) {
1799
+ case Align.FlexStart:
1800
+ break;
1801
+ case Align.Center:
1802
+ lineCrossOffset += freeCross / 2;
1803
+ break;
1804
+ case Align.FlexEnd:
1805
+ lineCrossOffset += freeCross;
1806
+ break;
1807
+ case Align.Stretch:
1808
+ if (lineCount > 0 && remCross > 0) {
1809
+ const add = remCross / lineCount;
1810
+ for (let i = 0; i < lineCount; i++)
1811
+ lineCrossSizes[i] += add;
1812
+ }
1813
+ break;
1814
+ case Align.SpaceBetween:
1815
+ if (lineCount > 1)
1816
+ betweenLines += remCross / (lineCount - 1);
1817
+ break;
1818
+ case Align.SpaceAround:
1819
+ if (lineCount > 0) {
1820
+ betweenLines += remCross / lineCount;
1821
+ lineCrossOffset += remCross / lineCount / 2;
1822
+ }
1823
+ break;
1824
+ case Align.SpaceEvenly:
1825
+ if (lineCount > 0) {
1826
+ betweenLines += remCross / (lineCount + 1);
1827
+ lineCrossOffset += remCross / (lineCount + 1);
1828
+ }
1829
+ break;
1830
+ default:
1831
+ break;
1832
+ }
1833
+ }
1834
+ // For wrap-reverse, lines stack from the trailing cross edge. Walk lines in
1835
+ // order but flip the cross position within the container.
1836
+ const wrapReverse = style.flexWrap === Wrap.WrapReverse;
1837
+ const crossContainerSize = isMainRow ? node.layout.height : node.layout.width;
1838
+ let lineCrossPos = lineCrossOffset;
1839
+ for (let li = 0; li < lineCount; li++) {
1840
+ const line = lines[li];
1841
+ const lineCross = lineCrossSizes[li];
1842
+ const consumedMain = lineConsumedMain[li];
1843
+ const n = line.length;
1844
+ // Re-stretch auto-cross children with Align.Stretch to the resolved line
1845
+ // cross size. Wrapped lines need their intrinsic cross size measured first.
1846
+ // Single-line initial stretch requires Exactly: AtMost/Undefined skip it
1847
+ // even when innerCrossSize is defined.
1848
+ if (isWrap || crossMode !== MeasureMode.Exactly) {
1849
+ for (const c of line) {
1850
+ const cStyle = c.style;
1851
+ const childAlign = cStyle.alignSelf === Align.Auto ? style.alignItems : cStyle.alignSelf;
1852
+ const crossStyleDef = isDefined(resolveValue(isMainRow ? cStyle.height : cStyle.width, isMainRow ? ownerH : ownerW));
1853
+ const hasCrossAutoMargin = c._hasAutoMargin &&
1854
+ (isMarginAuto(cStyle.margin, crossLeadEdgePhys) ||
1855
+ isMarginAuto(cStyle.margin, crossTrailEdgePhys));
1856
+ if (childAlign === Align.Stretch &&
1857
+ !crossStyleDef &&
1858
+ !hasCrossAutoMargin) {
1859
+ const cMarginCross = childMarginForAxis(c, crossAx, ownerW);
1860
+ const target = Math.max(0, lineCross - cMarginCross);
1861
+ if (c._crossSize !== target) {
1862
+ const cw = isMainRow ? c._mainSize : target;
1863
+ const ch = isMainRow ? target : c._mainSize;
1864
+ layoutNode(c, cw, ch, MeasureMode.Exactly, MeasureMode.Exactly, ownerW, ownerH, performLayout, isMainRow, !isMainRow);
1865
+ c._crossSize = target;
1866
+ }
1867
+ }
1868
+ }
1869
+ }
1870
+ // Justify-content + auto margins for this line
1871
+ let mainOffset = pad[mainLeadEdgePhys] + bor[mainLeadEdgePhys];
1872
+ let betweenMain = gapMain;
1873
+ let numAutoMarginsMain = 0;
1874
+ for (const c of line) {
1875
+ if (!c._hasAutoMargin)
1876
+ continue;
1877
+ if (isMarginAuto(c.style.margin, mainLeadEdgePhys))
1878
+ numAutoMarginsMain++;
1879
+ if (isMarginAuto(c.style.margin, mainTrailEdgePhys))
1880
+ numAutoMarginsMain++;
1881
+ }
1882
+ const freeMain = actualInnerMain - consumedMain;
1883
+ const remainingMain = Math.max(0, freeMain);
1884
+ const autoMarginMainSize = numAutoMarginsMain > 0 && remainingMain > 0
1885
+ ? remainingMain / numAutoMarginsMain
1886
+ : 0;
1887
+ if (numAutoMarginsMain === 0) {
1888
+ switch (style.justifyContent) {
1889
+ case Justify.FlexStart:
1890
+ break;
1891
+ case Justify.Center:
1892
+ mainOffset += freeMain / 2;
1893
+ break;
1894
+ case Justify.FlexEnd:
1895
+ mainOffset += freeMain;
1896
+ break;
1897
+ case Justify.SpaceBetween:
1898
+ if (n > 1)
1899
+ betweenMain += remainingMain / (n - 1);
1900
+ break;
1901
+ case Justify.SpaceAround:
1902
+ if (n > 0) {
1903
+ betweenMain += remainingMain / n;
1904
+ mainOffset += remainingMain / n / 2;
1905
+ }
1906
+ break;
1907
+ case Justify.SpaceEvenly:
1908
+ if (n > 0) {
1909
+ betweenMain += remainingMain / (n + 1);
1910
+ mainOffset += remainingMain / (n + 1);
1911
+ }
1912
+ break;
1913
+ }
1914
+ }
1915
+ const effectiveLineCrossPos = wrapReverse
1916
+ ? crossContainerSize - lineCrossPos - lineCross
1917
+ : lineCrossPos;
1918
+ let pos = mainOffset;
1919
+ for (const c of line) {
1920
+ const cMargin = c.style.margin;
1921
+ // c.layout.margin[] was populated by resolveEdges4Into inside the
1922
+ // layoutNode(c) call above (same ownerW). Read resolved values directly
1923
+ // instead of re-running the edge fallback chain 4× via resolveEdge.
1924
+ // Auto margins resolve to 0 in layout.margin, so autoMarginMainSize
1925
+ // substitution still uses the isMarginAuto check against style.
1926
+ const cLayoutMargin = c.layout.margin;
1927
+ let autoMainLead = false;
1928
+ let autoMainTrail = false;
1929
+ let autoCrossLead = false;
1930
+ let autoCrossTrail = false;
1931
+ let mMainLead;
1932
+ let mMainTrail;
1933
+ let mCrossLead;
1934
+ let mCrossTrail;
1935
+ if (c._hasAutoMargin) {
1936
+ autoMainLead = isMarginAuto(cMargin, mainLeadEdgePhys);
1937
+ autoMainTrail = isMarginAuto(cMargin, mainTrailEdgePhys);
1938
+ autoCrossLead = isMarginAuto(cMargin, crossLeadEdgePhys);
1939
+ autoCrossTrail = isMarginAuto(cMargin, crossTrailEdgePhys);
1940
+ mMainLead = autoMainLead
1941
+ ? autoMarginMainSize
1942
+ : cLayoutMargin[mainLeadEdgePhys];
1943
+ mMainTrail = autoMainTrail
1944
+ ? autoMarginMainSize
1945
+ : cLayoutMargin[mainTrailEdgePhys];
1946
+ mCrossLead = autoCrossLead ? 0 : cLayoutMargin[crossLeadEdgePhys];
1947
+ mCrossTrail = autoCrossTrail ? 0 : cLayoutMargin[crossTrailEdgePhys];
1948
+ }
1949
+ else {
1950
+ // Fast path: no auto margins — read resolved values directly.
1951
+ mMainLead = cLayoutMargin[mainLeadEdgePhys];
1952
+ mMainTrail = cLayoutMargin[mainTrailEdgePhys];
1953
+ mCrossLead = cLayoutMargin[crossLeadEdgePhys];
1954
+ mCrossTrail = cLayoutMargin[crossTrailEdgePhys];
1955
+ }
1956
+ const mainPos = reversed
1957
+ ? mainContainerSize - (pos + mMainLead) - c._mainSize
1958
+ : pos + mMainLead;
1959
+ const childAlign = c.style.alignSelf === Align.Auto ? style.alignItems : c.style.alignSelf;
1960
+ let crossPos = effectiveLineCrossPos + mCrossLead;
1961
+ const crossFree = lineCross - c._crossSize - mCrossLead - mCrossTrail;
1962
+ if (autoCrossLead && autoCrossTrail) {
1963
+ crossPos += Math.max(0, crossFree) / 2;
1964
+ }
1965
+ else if (autoCrossLead) {
1966
+ crossPos += Math.max(0, crossFree);
1967
+ }
1968
+ else if (autoCrossTrail) {
1969
+ // stays at leading
1970
+ }
1971
+ else {
1972
+ switch (childAlign) {
1973
+ case Align.FlexStart:
1974
+ case Align.Stretch:
1975
+ if (wrapReverse)
1976
+ crossPos += crossFree;
1977
+ break;
1978
+ case Align.Center:
1979
+ crossPos += crossFree / 2;
1980
+ break;
1981
+ case Align.FlexEnd:
1982
+ if (!wrapReverse)
1983
+ crossPos += crossFree;
1984
+ break;
1985
+ case Align.Baseline:
1986
+ // Row direction only (isBaselineLayout checked this). Position so
1987
+ // the child's baseline aligns with the line's max ascent. Per
1988
+ // yoga: top = currentLead + maxAscent - childBaseline + leadingPosition.
1989
+ if (isBaseline) {
1990
+ crossPos =
1991
+ effectiveLineCrossPos +
1992
+ lineMaxAscent[li] -
1993
+ calculateBaseline(c);
1994
+ }
1995
+ break;
1996
+ default:
1997
+ break;
1998
+ }
1999
+ }
2000
+ // Relative position offsets. Fast path: no position insets set →
2001
+ // skip 4× resolveEdgeRaw + 4× resolveValue + 4× isDefined.
2002
+ let relX = 0;
2003
+ let relY = 0;
2004
+ if (c._hasPosition) {
2005
+ const relLeft = resolveValue(resolveEdgeRaw(c.style.position, EDGE_LEFT), ownerW);
2006
+ const relRight = resolveValue(resolveEdgeRaw(c.style.position, EDGE_RIGHT), ownerW);
2007
+ const relTop = resolveValue(resolveEdgeRaw(c.style.position, EDGE_TOP), ownerW);
2008
+ const relBottom = resolveValue(resolveEdgeRaw(c.style.position, EDGE_BOTTOM), ownerW);
2009
+ relX = isDefined(relLeft)
2010
+ ? relLeft
2011
+ : isDefined(relRight)
2012
+ ? -relRight
2013
+ : 0;
2014
+ relY = isDefined(relTop)
2015
+ ? relTop
2016
+ : isDefined(relBottom)
2017
+ ? -relBottom
2018
+ : 0;
2019
+ }
2020
+ if (isMainRow) {
2021
+ c.layout.left = mainPos + relX;
2022
+ c.layout.top = crossPos + relY;
2023
+ }
2024
+ else {
2025
+ c.layout.left = crossPos + relX;
2026
+ c.layout.top = mainPos + relY;
2027
+ }
2028
+ pos += c._mainSize + mMainLead + mMainTrail + betweenMain;
2029
+ }
2030
+ lineCrossPos += lineCross + betweenLines;
2031
+ }
2032
+ // STEP 6: Absolute-positioned children
2033
+ for (const c of absChildren) {
2034
+ layoutAbsoluteChild(node, c, node.layout.width, node.layout.height, pad, bor);
2035
+ }
2036
+ }
2037
+ function layoutAbsoluteChild(parent, child, parentWidth, parentHeight, pad, bor) {
2038
+ const cs = child.style;
2039
+ const posLeft = resolveEdgeRaw(cs.position, EDGE_LEFT);
2040
+ const posRight = resolveEdgeRaw(cs.position, EDGE_RIGHT);
2041
+ const posTop = resolveEdgeRaw(cs.position, EDGE_TOP);
2042
+ const posBottom = resolveEdgeRaw(cs.position, EDGE_BOTTOM);
2043
+ const rLeft = resolveValue(posLeft, parentWidth);
2044
+ const rRight = resolveValue(posRight, parentWidth);
2045
+ const rTop = resolveValue(posTop, parentHeight);
2046
+ const rBottom = resolveValue(posBottom, parentHeight);
2047
+ // Absolute children's percentage dimensions resolve against the containing
2048
+ // block's padding-box (parent size minus border), per CSS §10.1.
2049
+ const paddingBoxW = parentWidth - bor[0] - bor[2];
2050
+ const paddingBoxH = parentHeight - bor[1] - bor[3];
2051
+ let cw = resolveValue(cs.width, paddingBoxW);
2052
+ let ch = resolveValue(cs.height, paddingBoxH);
2053
+ // If both left+right defined and width not, derive width
2054
+ if (!isDefined(cw) && isDefined(rLeft) && isDefined(rRight)) {
2055
+ cw = paddingBoxW - rLeft - rRight;
2056
+ }
2057
+ if (!isDefined(ch) && isDefined(rTop) && isDefined(rBottom)) {
2058
+ ch = paddingBoxH - rTop - rBottom;
2059
+ }
2060
+ layoutNode(child, cw, ch, isDefined(cw) ? MeasureMode.Exactly : MeasureMode.Undefined, isDefined(ch) ? MeasureMode.Exactly : MeasureMode.Undefined, paddingBoxW, paddingBoxH, true);
2061
+ // Margin of absolute child (applied in addition to insets)
2062
+ const mL = resolveEdge(cs.margin, EDGE_LEFT, parentWidth);
2063
+ const mT = resolveEdge(cs.margin, EDGE_TOP, parentWidth);
2064
+ const mR = resolveEdge(cs.margin, EDGE_RIGHT, parentWidth);
2065
+ const mB = resolveEdge(cs.margin, EDGE_BOTTOM, parentWidth);
2066
+ const mainAxis = parent.style.flexDirection;
2067
+ const reversed = isReverse(mainAxis);
2068
+ const mainRow = isRow(mainAxis);
2069
+ const wrapReverse = parent.style.flexWrap === Wrap.WrapReverse;
2070
+ // alignSelf overrides alignItems for absolute children (same as flow items)
2071
+ const alignment = cs.alignSelf === Align.Auto ? parent.style.alignItems : cs.alignSelf;
2072
+ // Position
2073
+ let left;
2074
+ if (isDefined(rLeft)) {
2075
+ left = bor[0] + rLeft + mL;
2076
+ }
2077
+ else if (isDefined(rRight)) {
2078
+ left = parentWidth - bor[2] - rRight - child.layout.width - mR;
2079
+ }
2080
+ else if (mainRow) {
2081
+ // Main axis — justify-content, flipped for reversed
2082
+ const lead = pad[0] + bor[0];
2083
+ const trail = parentWidth - pad[2] - bor[2];
2084
+ left = reversed
2085
+ ? trail - child.layout.width - mR
2086
+ : justifyAbsolute(parent.style.justifyContent, lead, trail, child.layout.width) + mL;
2087
+ }
2088
+ else {
2089
+ left =
2090
+ alignAbsolute(alignment, pad[0] + bor[0], parentWidth - pad[2] - bor[2], child.layout.width, wrapReverse) + mL;
2091
+ }
2092
+ let top;
2093
+ if (isDefined(rTop)) {
2094
+ top = bor[1] + rTop + mT;
2095
+ }
2096
+ else if (isDefined(rBottom)) {
2097
+ top = parentHeight - bor[3] - rBottom - child.layout.height - mB;
2098
+ }
2099
+ else if (mainRow) {
2100
+ top =
2101
+ alignAbsolute(alignment, pad[1] + bor[1], parentHeight - pad[3] - bor[3], child.layout.height, wrapReverse) + mT;
2102
+ }
2103
+ else {
2104
+ const lead = pad[1] + bor[1];
2105
+ const trail = parentHeight - pad[3] - bor[3];
2106
+ top = reversed
2107
+ ? trail - child.layout.height - mB
2108
+ : justifyAbsolute(parent.style.justifyContent, lead, trail, child.layout.height) + mT;
2109
+ }
2110
+ child.layout.left = left;
2111
+ child.layout.top = top;
2112
+ }
2113
+ function justifyAbsolute(justify, leadEdge, trailEdge, childSize) {
2114
+ switch (justify) {
2115
+ case Justify.Center:
2116
+ return leadEdge + (trailEdge - leadEdge - childSize) / 2;
2117
+ case Justify.FlexEnd:
2118
+ return trailEdge - childSize;
2119
+ default:
2120
+ return leadEdge;
2121
+ }
2122
+ }
2123
+ function alignAbsolute(align, leadEdge, trailEdge, childSize, wrapReverse) {
2124
+ // Wrap-reverse flips the cross axis: flex-start/stretch go to trailing,
2125
+ // flex-end goes to leading (yoga's absoluteLayoutChild flips the align value
2126
+ // when the containing block has wrap-reverse).
2127
+ switch (align) {
2128
+ case Align.Center:
2129
+ return leadEdge + (trailEdge - leadEdge - childSize) / 2;
2130
+ case Align.FlexEnd:
2131
+ return wrapReverse ? leadEdge : trailEdge - childSize;
2132
+ default:
2133
+ return wrapReverse ? trailEdge - childSize : leadEdge;
2134
+ }
2135
+ }
2136
+ function computeFlexBasis(child, mainAxis, availableMain, availableCross, crossMode, ownerWidth, ownerHeight) {
2137
+ // Same-generation cache hit: basis was computed THIS calculateLayout, so
2138
+ // it's fresh regardless of isDirty_. Covers both clean children (scrolling
2139
+ // past unchanged messages) AND fresh-mounted dirty children (virtual
2140
+ // scroll mounts new items — the dirty chain's measure→layout cascade
2141
+ // invokes this ≥2^depth times, but the child's subtree doesn't change
2142
+ // between calls within one calculateLayout). For clean children with
2143
+ // cache from a PREVIOUS generation, also hit if inputs match — isDirty_
2144
+ // gates since a dirty child's previous-gen cache is stale.
2145
+ const sameGen = child._fbGen === _generation;
2146
+ if ((sameGen || !child.isDirty_) &&
2147
+ child._fbCrossMode === crossMode &&
2148
+ sameFloat(child._fbOwnerW, ownerWidth) &&
2149
+ sameFloat(child._fbOwnerH, ownerHeight) &&
2150
+ sameFloat(child._fbAvailMain, availableMain) &&
2151
+ sameFloat(child._fbAvailCross, availableCross)) {
2152
+ return child._fbBasis;
2153
+ }
2154
+ const cs = child.style;
2155
+ const isMainRow = isRow(mainAxis);
2156
+ // Explicit flex-basis
2157
+ const basis = resolveValue(cs.flexBasis, availableMain);
2158
+ if (isDefined(basis)) {
2159
+ const b = Math.max(0, basis);
2160
+ child._fbBasis = b;
2161
+ child._fbOwnerW = ownerWidth;
2162
+ child._fbOwnerH = ownerHeight;
2163
+ child._fbAvailMain = availableMain;
2164
+ child._fbAvailCross = availableCross;
2165
+ child._fbCrossMode = crossMode;
2166
+ child._fbGen = _generation;
2167
+ return b;
2168
+ }
2169
+ // Style dimension on main axis
2170
+ const mainStyleDim = isMainRow ? cs.width : cs.height;
2171
+ const mainOwner = isMainRow ? ownerWidth : ownerHeight;
2172
+ const resolved = resolveValue(mainStyleDim, mainOwner);
2173
+ if (isDefined(resolved)) {
2174
+ const b = Math.max(0, resolved);
2175
+ child._fbBasis = b;
2176
+ child._fbOwnerW = ownerWidth;
2177
+ child._fbOwnerH = ownerHeight;
2178
+ child._fbAvailMain = availableMain;
2179
+ child._fbAvailCross = availableCross;
2180
+ child._fbCrossMode = crossMode;
2181
+ child._fbGen = _generation;
2182
+ return b;
2183
+ }
2184
+ // Need to measure the child to get its natural size
2185
+ const crossStyleDim = isMainRow ? cs.height : cs.width;
2186
+ const crossOwner = isMainRow ? ownerHeight : ownerWidth;
2187
+ let crossConstraint = resolveValue(crossStyleDim, crossOwner);
2188
+ let crossConstraintMode = isDefined(crossConstraint)
2189
+ ? MeasureMode.Exactly
2190
+ : MeasureMode.Undefined;
2191
+ if (!isDefined(crossConstraint) && isDefined(availableCross)) {
2192
+ crossConstraint = availableCross;
2193
+ crossConstraintMode =
2194
+ crossMode === MeasureMode.Exactly && isStretchAlign(child)
2195
+ ? MeasureMode.Exactly
2196
+ : MeasureMode.AtMost;
2197
+ }
2198
+ // Upstream yoga (YGNodeComputeFlexBasisForChild) passes the available inner
2199
+ // width with mode AtMost when the subtree will call a measure-func — so text
2200
+ // nodes don't report unconstrained intrinsic width as flex-basis, which
2201
+ // would force siblings to shrink and the text to wrap at the wrong width.
2202
+ // Passing Undefined here made Ink's <Text> inside <Box flexGrow={1}> get
2203
+ // width = intrinsic instead of available, dropping chars at wrap boundaries.
2204
+ //
2205
+ // Two constraints on when this applies:
2206
+ // - Width only. Height is never constrained during basis measurement —
2207
+ // column containers must measure children at natural height so
2208
+ // scrollable content can overflow (constraining height clips ScrollBox).
2209
+ // - Subtree has a measure-func. Pure layout subtrees (no measure-func)
2210
+ // with flex-grow children would grow into the AtMost constraint,
2211
+ // inflating the basis (breaks YGMinMaxDimensionTest flex_grow_in_at_most
2212
+ // where a flexGrow:1 child should stay at basis 0, not grow to 100).
2213
+ let mainConstraint = NaN;
2214
+ let mainConstraintMode = MeasureMode.Undefined;
2215
+ if (isMainRow && isDefined(availableMain) && hasMeasureFuncInSubtree(child)) {
2216
+ mainConstraint = availableMain;
2217
+ mainConstraintMode = MeasureMode.AtMost;
2218
+ }
2219
+ const mw = isMainRow ? mainConstraint : crossConstraint;
2220
+ const mh = isMainRow ? crossConstraint : mainConstraint;
2221
+ const mwMode = isMainRow ? mainConstraintMode : crossConstraintMode;
2222
+ const mhMode = isMainRow ? crossConstraintMode : mainConstraintMode;
2223
+ layoutNode(child, mw, mh, mwMode, mhMode, ownerWidth, ownerHeight, false);
2224
+ const b = isMainRow ? child.layout.width : child.layout.height;
2225
+ child._fbBasis = b;
2226
+ child._fbOwnerW = ownerWidth;
2227
+ child._fbOwnerH = ownerHeight;
2228
+ child._fbAvailMain = availableMain;
2229
+ child._fbAvailCross = availableCross;
2230
+ child._fbCrossMode = crossMode;
2231
+ child._fbGen = _generation;
2232
+ return b;
2233
+ }
2234
+ function hasMeasureFuncInSubtree(node) {
2235
+ if (node.measureFunc)
2236
+ return true;
2237
+ for (const c of node.children) {
2238
+ if (hasMeasureFuncInSubtree(c))
2239
+ return true;
2240
+ }
2241
+ return false;
2242
+ }
2243
+ function resolveFlexibleLengths(children, availableInnerMain, totalFlexBasis, isMainRow, ownerW, ownerH) {
2244
+ // Multi-pass flex distribution per CSS flexbox spec §9.7 "Resolving Flexible
2245
+ // Lengths": distribute free space, detect min/max violations, freeze all
2246
+ // violators, redistribute among unfrozen children. Repeat until stable.
2247
+ const n = children.length;
2248
+ const frozen = new Array(n).fill(false);
2249
+ const initialFree = isDefined(availableInnerMain)
2250
+ ? availableInnerMain - totalFlexBasis
2251
+ : 0;
2252
+ // Freeze inflexible items at their clamped basis
2253
+ for (let i = 0; i < n; i++) {
2254
+ const c = children[i];
2255
+ const clamped = boundAxis(c.style, isMainRow, c._flexBasis, ownerW, ownerH);
2256
+ const inflexible = !isDefined(availableInnerMain) ||
2257
+ (initialFree >= 0 ? c.style.flexGrow === 0 : c.style.flexShrink === 0);
2258
+ if (inflexible) {
2259
+ c._mainSize = Math.max(0, clamped);
2260
+ frozen[i] = true;
2261
+ }
2262
+ else {
2263
+ c._mainSize = c._flexBasis;
2264
+ }
2265
+ }
2266
+ // Iteratively distribute until no violations. Free space is recomputed each
2267
+ // pass: initial free space minus the delta frozen children consumed beyond
2268
+ // (or below) their basis.
2269
+ const unclamped = new Array(n);
2270
+ for (let iter = 0; iter <= n; iter++) {
2271
+ let frozenDelta = 0;
2272
+ let totalGrow = 0;
2273
+ let totalShrinkScaled = 0;
2274
+ let unfrozenCount = 0;
2275
+ for (let i = 0; i < n; i++) {
2276
+ const c = children[i];
2277
+ if (frozen[i]) {
2278
+ frozenDelta += c._mainSize - c._flexBasis;
2279
+ }
2280
+ else {
2281
+ totalGrow += c.style.flexGrow;
2282
+ totalShrinkScaled += c.style.flexShrink * c._flexBasis;
2283
+ unfrozenCount++;
2284
+ }
2285
+ }
2286
+ if (unfrozenCount === 0)
2287
+ break;
2288
+ let remaining = initialFree - frozenDelta;
2289
+ // Spec §9.7 step 4c: if sum of flex factors < 1, only distribute
2290
+ // initialFree × sum, not the full remaining space (partial flex).
2291
+ if (remaining > 0 && totalGrow > 0 && totalGrow < 1) {
2292
+ const scaled = initialFree * totalGrow;
2293
+ if (scaled < remaining)
2294
+ remaining = scaled;
2295
+ }
2296
+ else if (remaining < 0 && totalShrinkScaled > 0) {
2297
+ let totalShrink = 0;
2298
+ for (let i = 0; i < n; i++) {
2299
+ if (!frozen[i])
2300
+ totalShrink += children[i].style.flexShrink;
2301
+ }
2302
+ if (totalShrink < 1) {
2303
+ const scaled = initialFree * totalShrink;
2304
+ if (scaled > remaining)
2305
+ remaining = scaled;
2306
+ }
2307
+ }
2308
+ // Compute targets + violations for all unfrozen children
2309
+ let totalViolation = 0;
2310
+ for (let i = 0; i < n; i++) {
2311
+ if (frozen[i])
2312
+ continue;
2313
+ const c = children[i];
2314
+ let t = c._flexBasis;
2315
+ if (remaining > 0 && totalGrow > 0) {
2316
+ t += (remaining * c.style.flexGrow) / totalGrow;
2317
+ }
2318
+ else if (remaining < 0 && totalShrinkScaled > 0) {
2319
+ t +=
2320
+ (remaining * (c.style.flexShrink * c._flexBasis)) / totalShrinkScaled;
2321
+ }
2322
+ unclamped[i] = t;
2323
+ const clamped = Math.max(0, boundAxis(c.style, isMainRow, t, ownerW, ownerH));
2324
+ c._mainSize = clamped;
2325
+ totalViolation += clamped - t;
2326
+ }
2327
+ // Freeze per spec §9.7 step 5: if totalViolation is zero freeze all; if
2328
+ // positive freeze min-violators; if negative freeze max-violators.
2329
+ if (totalViolation === 0)
2330
+ break;
2331
+ let anyFrozen = false;
2332
+ for (let i = 0; i < n; i++) {
2333
+ if (frozen[i])
2334
+ continue;
2335
+ const v = children[i]._mainSize - unclamped[i];
2336
+ if ((totalViolation > 0 && v > 0) || (totalViolation < 0 && v < 0)) {
2337
+ frozen[i] = true;
2338
+ anyFrozen = true;
2339
+ }
2340
+ }
2341
+ if (!anyFrozen)
2342
+ break;
2343
+ }
2344
+ }
2345
+ function isStretchAlign(child) {
2346
+ const p = child.parent;
2347
+ if (!p)
2348
+ return false;
2349
+ const align = child.style.alignSelf === Align.Auto
2350
+ ? p.style.alignItems
2351
+ : child.style.alignSelf;
2352
+ return align === Align.Stretch;
2353
+ }
2354
+ function resolveChildAlign(parent, child) {
2355
+ return child.style.alignSelf === Align.Auto
2356
+ ? parent.style.alignItems
2357
+ : child.style.alignSelf;
2358
+ }
2359
+ // Baseline of a node per CSS Flexbox §8.5 / yoga's YGBaseline. Leaf nodes
2360
+ // (no children) use their own height. Containers recurse into the first
2361
+ // baseline-aligned child on the first line (or the first flow child if none
2362
+ // are baseline-aligned), returning that child's baseline + its top offset.
2363
+ function calculateBaseline(node) {
2364
+ let baselineChild = null;
2365
+ for (const c of node.children) {
2366
+ if (c._lineIndex > 0)
2367
+ break;
2368
+ if (c.style.positionType === PositionType.Absolute)
2369
+ continue;
2370
+ if (c.style.display === Display.None)
2371
+ continue;
2372
+ if (resolveChildAlign(node, c) === Align.Baseline ||
2373
+ c.isReferenceBaseline_) {
2374
+ baselineChild = c;
2375
+ break;
2376
+ }
2377
+ if (baselineChild === null)
2378
+ baselineChild = c;
2379
+ }
2380
+ if (baselineChild === null)
2381
+ return node.layout.height;
2382
+ return calculateBaseline(baselineChild) + baselineChild.layout.top;
2383
+ }
2384
+ // A container uses baseline layout only for row direction, when either
2385
+ // align-items is baseline or any flow child has align-self: baseline.
2386
+ function isBaselineLayout(node, flowChildren) {
2387
+ if (!isRow(node.style.flexDirection))
2388
+ return false;
2389
+ if (node.style.alignItems === Align.Baseline)
2390
+ return true;
2391
+ for (const c of flowChildren) {
2392
+ if (c.style.alignSelf === Align.Baseline)
2393
+ return true;
2394
+ }
2395
+ return false;
2396
+ }
2397
+ function childMarginForAxis(child, axis, ownerWidth) {
2398
+ if (!child._hasMargin)
2399
+ return 0;
2400
+ const lead = resolveEdge(child.style.margin, leadingEdge(axis), ownerWidth);
2401
+ const trail = resolveEdge(child.style.margin, trailingEdge(axis), ownerWidth);
2402
+ return lead + trail;
2403
+ }
2404
+ function resolveGap(style, gutter, ownerSize) {
2405
+ let v = style.gap[gutter];
2406
+ if (v.unit === Unit.Undefined)
2407
+ v = style.gap[Gutter.All];
2408
+ const r = resolveValue(v, ownerSize);
2409
+ return isDefined(r) ? Math.max(0, r) : 0;
2410
+ }
2411
+ function boundAxis(style, isWidth, value, ownerWidth, ownerHeight) {
2412
+ const minV = isWidth ? style.minWidth : style.minHeight;
2413
+ const maxV = isWidth ? style.maxWidth : style.maxHeight;
2414
+ const minU = minV.unit;
2415
+ const maxU = maxV.unit;
2416
+ // Fast path: no min/max constraints set. Per CPU profile this is the
2417
+ // overwhelmingly common case (~32k calls/layout on the 1000-node bench,
2418
+ // nearly all with undefined min/max) — skipping 2× resolveValue + 2× isNaN
2419
+ // that always no-op. Unit.Undefined = 0.
2420
+ if (minU === 0 && maxU === 0)
2421
+ return value;
2422
+ const owner = isWidth ? ownerWidth : ownerHeight;
2423
+ let v = value;
2424
+ // Inlined resolveValue: Unit.Point=1, Unit.Percent=2. `m === m` is !isNaN.
2425
+ if (maxU === 1) {
2426
+ if (v > maxV.value)
2427
+ v = maxV.value;
2428
+ }
2429
+ else if (maxU === 2) {
2430
+ const m = (maxV.value * owner) / 100;
2431
+ if (m === m && v > m)
2432
+ v = m;
2433
+ }
2434
+ if (minU === 1) {
2435
+ if (v < minV.value)
2436
+ v = minV.value;
2437
+ }
2438
+ else if (minU === 2) {
2439
+ const m = (minV.value * owner) / 100;
2440
+ if (m === m && v < m)
2441
+ v = m;
2442
+ }
2443
+ return v;
2444
+ }
2445
+ function zeroLayoutRecursive(node) {
2446
+ for (const c of node.children) {
2447
+ c.layout.left = 0;
2448
+ c.layout.top = 0;
2449
+ c.layout.width = 0;
2450
+ c.layout.height = 0;
2451
+ // Invalidate layout cache — without this, unhide → calculateLayout finds
2452
+ // the child clean (!isDirty_) with _hasL intact, restores cached
2453
+ // _lOutW/_lOutH, and returns before positioning children. Grandchildren
2454
+ // stay at (0,0,0,0) and render invisible. isDirty_=true also gates _cN and
2455
+ // _fbBasis via their (sameGen || !isDirty_) checks — _cGen/_fbGen freeze
2456
+ // during hide so sameGen is false on unhide.
2457
+ c.isDirty_ = true;
2458
+ c._hasL = false;
2459
+ c._hasM = false;
2460
+ zeroLayoutRecursive(c);
2461
+ }
2462
+ }
2463
+ function collectLayoutChildren(node, flow, abs) {
2464
+ // Partition a node's children into flow and absolute lists, flattening
2465
+ // display:contents subtrees so their children are laid out as direct
2466
+ // children of this node (per CSS display:contents spec — the box is removed
2467
+ // from the layout tree but its children remain, lifted to the grandparent).
2468
+ for (const c of node.children) {
2469
+ const disp = c.style.display;
2470
+ if (disp === Display.None) {
2471
+ c.layout.left = 0;
2472
+ c.layout.top = 0;
2473
+ c.layout.width = 0;
2474
+ c.layout.height = 0;
2475
+ zeroLayoutRecursive(c);
2476
+ }
2477
+ else if (disp === Display.Contents) {
2478
+ c.layout.left = 0;
2479
+ c.layout.top = 0;
2480
+ c.layout.width = 0;
2481
+ c.layout.height = 0;
2482
+ // Recurse — nested display:contents lifts all the way up. The contents
2483
+ // node's own margin/padding/position/dimensions are ignored.
2484
+ collectLayoutChildren(c, flow, abs);
2485
+ }
2486
+ else if (c.style.positionType === PositionType.Absolute) {
2487
+ abs.push(c);
2488
+ }
2489
+ else {
2490
+ flow.push(c);
2491
+ }
2492
+ }
2493
+ }
2494
+ function roundLayout(node, scale, absLeft, absTop) {
2495
+ if (scale === 0)
2496
+ return;
2497
+ const l = node.layout;
2498
+ const nodeLeft = l.left;
2499
+ const nodeTop = l.top;
2500
+ const nodeWidth = l.width;
2501
+ const nodeHeight = l.height;
2502
+ const absNodeLeft = absLeft + nodeLeft;
2503
+ const absNodeTop = absTop + nodeTop;
2504
+ // Upstream YGRoundValueToPixelGrid: text nodes (has measureFunc) floor their
2505
+ // positions so wrapped text never starts past its allocated column. Width
2506
+ // uses ceil-if-fractional to avoid clipping the last glyph. Non-text nodes
2507
+ // use standard round. Matches yoga's PixelGrid.cpp — without this, justify
2508
+ // center/space-evenly positions are off-by-one vs WASM and flex-shrink
2509
+ // overflow places siblings at the wrong column.
2510
+ const isText = node.measureFunc !== null;
2511
+ l.left = roundValue(nodeLeft, scale, false, isText);
2512
+ l.top = roundValue(nodeTop, scale, false, isText);
2513
+ // Width/height rounded via absolute edges to avoid cumulative drift
2514
+ const absRight = absNodeLeft + nodeWidth;
2515
+ const absBottom = absNodeTop + nodeHeight;
2516
+ const hasFracW = !isWholeNumber(nodeWidth * scale);
2517
+ const hasFracH = !isWholeNumber(nodeHeight * scale);
2518
+ l.width =
2519
+ roundValue(absRight, scale, isText && hasFracW, isText && !hasFracW) -
2520
+ roundValue(absNodeLeft, scale, false, isText);
2521
+ l.height =
2522
+ roundValue(absBottom, scale, isText && hasFracH, isText && !hasFracH) -
2523
+ roundValue(absNodeTop, scale, false, isText);
2524
+ for (const c of node.children) {
2525
+ roundLayout(c, scale, absNodeLeft, absNodeTop);
2526
+ }
2527
+ }
2528
+ function isWholeNumber(v) {
2529
+ const frac = v - Math.floor(v);
2530
+ return frac < 0.0001 || frac > 0.9999;
2531
+ }
2532
+ function roundValue(v, scale, forceCeil, forceFloor) {
2533
+ let scaled = v * scale;
2534
+ let frac = scaled - Math.floor(scaled);
2535
+ if (frac < 0)
2536
+ frac += 1;
2537
+ // Float-epsilon tolerance matches upstream YGDoubleEqual (1e-4)
2538
+ if (frac < 0.0001) {
2539
+ scaled = Math.floor(scaled);
2540
+ }
2541
+ else if (frac > 0.9999) {
2542
+ scaled = Math.ceil(scaled);
2543
+ }
2544
+ else if (forceCeil) {
2545
+ scaled = Math.ceil(scaled);
2546
+ }
2547
+ else if (forceFloor) {
2548
+ scaled = Math.floor(scaled);
2549
+ }
2550
+ else {
2551
+ // Round half-up (>= 0.5 goes up), per upstream
2552
+ scaled = Math.floor(scaled) + (frac >= 0.4999 ? 1 : 0);
2553
+ }
2554
+ return scaled / scale;
2555
+ }
2556
+ // --
2557
+ // Helpers
2558
+ function parseDimension(v) {
2559
+ if (v === undefined)
2560
+ return UNDEFINED_VALUE;
2561
+ if (v === 'auto')
2562
+ return AUTO_VALUE;
2563
+ if (typeof v === 'number') {
2564
+ // WASM yoga's YGFloatIsUndefined treats NaN and ±Infinity as undefined.
2565
+ // Ink passes height={Infinity} (e.g. LogSelector maxHeight default) and
2566
+ // expects it to mean "unconstrained" — storing it as a literal point value
2567
+ // makes the node height Infinity and breaks all downstream layout.
2568
+ return Number.isFinite(v) ? pointValue(v) : UNDEFINED_VALUE;
2569
+ }
2570
+ if (typeof v === 'string' && v.endsWith('%')) {
2571
+ return percentValue(parseFloat(v));
2572
+ }
2573
+ const n = parseFloat(v);
2574
+ return isNaN(n) ? UNDEFINED_VALUE : pointValue(n);
2575
+ }
2576
+ function physicalEdge(edge) {
2577
+ switch (edge) {
2578
+ case Edge.Left:
2579
+ case Edge.Start:
2580
+ return EDGE_LEFT;
2581
+ case Edge.Top:
2582
+ return EDGE_TOP;
2583
+ case Edge.Right:
2584
+ case Edge.End:
2585
+ return EDGE_RIGHT;
2586
+ case Edge.Bottom:
2587
+ return EDGE_BOTTOM;
2588
+ default:
2589
+ return EDGE_LEFT;
2590
+ }
2591
+ }
2592
+ /**
2593
+ * The shared module instance returned by loadYoga and the default export.
2594
+ */
2595
+ const YOGA_INSTANCE = {
2596
+ Config: {
2597
+ create: createConfig,
2598
+ destroy() { },
2599
+ },
2600
+ Node: {
2601
+ create: (config) => new Node(config),
2602
+ createDefault: () => new Node(),
2603
+ createWithConfig: (config) => new Node(config),
2604
+ destroy() { },
2605
+ },
2606
+ };
2607
+ /**
2608
+ * Resolve the yoga module instance, matching the yoga-layout/load API.
2609
+ * @returns a promise of the module API.
2610
+ */
2611
+ export function loadYoga() {
2612
+ return Promise.resolve(YOGA_INSTANCE);
2613
+ }
2614
+ export default YOGA_INSTANCE;