@farm.js/core 0.1.80 → 0.1.82

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 (390) hide show
  1. package/dist/{agent-mcp.d-BPa5n0ld.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +2 -1
  5. package/dist/agent-runtime.d.ts +2 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-LV23T6QN.cjs +17 -0
  8. package/dist/{analyzer-F7CWE5VA.mjs → analyzer-RPU2KG4J.mjs} +3 -2
  9. package/dist/api/client.cjs +1 -1
  10. package/dist/api/client.mjs +1 -1
  11. package/dist/api/client.native.cjs +1 -1
  12. package/dist/api/client.native.mjs +1 -1
  13. package/dist/api/node.cjs +6 -5
  14. package/dist/api/node.d.mts +4 -3
  15. package/dist/api/node.d.ts +4 -3
  16. package/dist/api/node.mjs +5 -4
  17. package/dist/api/route-manager.cjs +7 -6
  18. package/dist/api/route-manager.d.mts +4 -3
  19. package/dist/api/route-manager.d.ts +4 -3
  20. package/dist/api/route-manager.mjs +6 -5
  21. package/dist/api/runtime.cjs +5 -4
  22. package/dist/api/runtime.d.mts +3 -2
  23. package/dist/api/runtime.d.ts +3 -2
  24. package/dist/api/runtime.mjs +4 -3
  25. package/dist/api.cjs +9 -8
  26. package/dist/api.d.mts +5 -4
  27. package/dist/api.d.ts +5 -4
  28. package/dist/api.mjs +8 -7
  29. package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
  30. package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
  31. package/dist/app-markdown.cjs +3 -3
  32. package/dist/app-markdown.d.mts +5 -4
  33. package/dist/app-markdown.d.ts +5 -4
  34. package/dist/app-markdown.mjs +2 -2
  35. package/dist/{app.d-DXeRWZK7.d.mts → app.d-C0ePpuaG.d.mts} +30 -4
  36. package/dist/{app.d-DwX1ePhs.d.ts → app.d-CIoXsAbN.d.ts} +30 -4
  37. package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
  38. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  39. package/dist/chunk-2UYYXSUS.mjs +401 -0
  40. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  41. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  42. package/dist/chunk-3DE6RK7K.cjs +36 -0
  43. package/dist/{chunk-GBW5DU7V.mjs → chunk-47I2MYIR.mjs} +487 -304
  44. package/dist/{chunk-RQBGHHOQ.mjs → chunk-4X7LSGM6.mjs} +1 -1
  45. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  46. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  47. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  48. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  49. package/dist/{chunk-AXA2BSX3.cjs → chunk-5MUFW5UU.cjs} +22 -21
  50. package/dist/{chunk-MQOHYV6L.cjs → chunk-5P65LXGU.cjs} +11 -11
  51. package/dist/{chunk-KEU55O2D.mjs → chunk-63ZE6B6M.mjs} +7 -6
  52. package/dist/{chunk-TS3ZHJN5.cjs → chunk-6BPFIYGY.cjs} +3 -3
  53. package/dist/{chunk-NJ4OASLP.mjs → chunk-6QYPP5KC.mjs} +2 -2
  54. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  55. package/dist/{chunk-G4SZC2WH.cjs → chunk-AIPZDBP6.cjs} +557 -374
  56. package/dist/{chunk-X4TSMQWF.cjs → chunk-ARORZ3MH.cjs} +548 -397
  57. package/dist/{chunk-K3XKEZR6.mjs → chunk-AUFEM3FB.mjs} +1 -1
  58. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  59. package/dist/{chunk-5OAN7BG5.cjs → chunk-B2PGVHBG.cjs} +4 -4
  60. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  61. package/dist/chunk-B7L24VPX.cjs +401 -0
  62. package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
  63. package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
  64. package/dist/{chunk-67MZTLTF.cjs → chunk-BCTHOQPP.cjs} +37 -9
  65. package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
  66. package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
  67. package/dist/{chunk-QHAISITM.mjs → chunk-C3VCYOU4.mjs} +1 -1
  68. package/dist/chunk-C5QHZ626.cjs +85 -0
  69. package/dist/{chunk-3K2E55BJ.mjs → chunk-CA2HBLXP.mjs} +13 -3
  70. package/dist/{chunk-ANZLZNNX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
  71. package/dist/{chunk-4MIDUSIX.mjs → chunk-CJDBTTLB.mjs} +17 -17
  72. package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
  73. package/dist/chunk-D2VAANBS.mjs +48 -0
  74. package/dist/{chunk-XZBBKZGW.mjs → chunk-DAXU2NBE.mjs} +128 -41
  75. package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  76. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  77. package/dist/{chunk-ZVSQN7NC.cjs → chunk-DRO3NXA3.cjs} +40 -43
  78. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  79. package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  80. package/dist/{chunk-MDEFTF63.mjs → chunk-EL2Z6YFZ.mjs} +25 -28
  81. package/dist/chunk-EZYKV24V.mjs +385 -0
  82. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  83. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  84. package/dist/{chunk-V73Y4UBL.mjs → chunk-GXLNARPO.mjs} +151 -16
  85. package/dist/{chunk-ZPEZXQTM.cjs → chunk-HHQEKLZL.cjs} +2 -2
  86. package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
  87. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  88. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  89. package/dist/{chunk-44G4XHEL.mjs → chunk-I4DR3HCH.mjs} +11 -11
  90. package/dist/chunk-I4WZRG73.mjs +54 -0
  91. package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
  92. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  93. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  94. package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
  95. package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
  96. package/dist/{chunk-CCMP4JD2.cjs → chunk-JK26IMT7.cjs} +1 -1
  97. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  98. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  99. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  100. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  101. package/dist/{chunk-LVGB5PYK.cjs → chunk-LM2ZDNDD.cjs} +28 -28
  102. package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
  103. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  104. package/dist/{chunk-DVHFIETW.cjs → chunk-N2EFMN2K.cjs} +18 -18
  105. package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
  106. package/dist/{chunk-KKVRWNDH.mjs → chunk-NAHDG6UX.mjs} +4 -4
  107. package/dist/{chunk-UWOCYINY.cjs → chunk-NEKO3HM2.cjs} +12 -2
  108. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  109. package/dist/{chunk-ZDYYZX73.mjs → chunk-NRCKBDYP.mjs} +266 -115
  110. package/dist/{chunk-EG5YBYHO.mjs → chunk-OMB7UGVW.mjs} +1 -1
  111. package/dist/{chunk-JGEN2FIT.mjs → chunk-OP5VI4TP.mjs} +1 -1
  112. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  113. package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
  114. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  115. package/dist/{chunk-WJ2O2MPP.cjs → chunk-Q2VOT3K2.cjs} +494 -407
  116. package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
  117. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  118. package/dist/{chunk-3JQBQG7K.mjs → chunk-QSMUMK7Y.mjs} +2 -2
  119. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  120. package/dist/{chunk-GCRT6GJG.mjs → chunk-RMLR5RMH.mjs} +30 -2
  121. package/dist/{chunk-XY5OZQF6.cjs → chunk-RMPUEH5T.cjs} +2 -2
  122. package/dist/{chunk-7DD5TNPS.cjs → chunk-S7WZUK3B.cjs} +2 -2
  123. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  124. package/dist/{chunk-Z4SMFUZ7.cjs → chunk-U54REWMJ.cjs} +23 -23
  125. package/dist/chunk-U6XYBTUT.mjs +36 -0
  126. package/dist/chunk-UDMBUTJD.mjs +85 -0
  127. package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
  128. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  129. package/dist/{chunk-SDICLSQU.cjs → chunk-VMBIKDKW.cjs} +10 -10
  130. package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  131. package/dist/chunk-VS7HLH4S.cjs +385 -0
  132. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  133. package/dist/chunk-WMRGIQTA.cjs +48 -0
  134. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  135. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  136. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  137. package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
  138. package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
  139. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  140. package/dist/{chunk-YN3YMSKD.mjs → chunk-ZIZRIZLP.mjs} +3 -3
  141. package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
  142. package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
  143. package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
  144. package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
  145. package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-C1WM3ieD.d.mts} +7 -13
  146. package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-DcmDzcSC.d.ts} +7 -13
  147. package/dist/client-plugins.d.mts +2 -1
  148. package/dist/client-plugins.d.ts +2 -1
  149. package/dist/client.cjs +9 -8
  150. package/dist/client.d.mts +20 -151
  151. package/dist/client.d.ts +20 -151
  152. package/dist/client.mjs +8 -7
  153. package/dist/config.d.mts +2 -1
  154. package/dist/config.d.ts +2 -1
  155. package/dist/cron.cjs +2 -2
  156. package/dist/cron.mjs +1 -1
  157. package/dist/desktop.d.mts +3 -2
  158. package/dist/desktop.d.ts +3 -2
  159. package/dist/{devtools-JJOYTIMS.cjs → devtools-5B7NZE6F.cjs} +15 -14
  160. package/dist/{devtools-F3FDFV26.mjs → devtools-C5GXZZ7E.mjs} +12 -11
  161. package/dist/docs.cjs +14 -13
  162. package/dist/docs.d.mts +4 -3
  163. package/dist/docs.d.ts +4 -3
  164. package/dist/docs.mjs +13 -12
  165. package/dist/environment/vite.cjs +7 -6
  166. package/dist/environment/vite.mjs +6 -5
  167. package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
  168. package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
  169. package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
  170. package/dist/{headers.d-CAW4wPey.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
  171. package/dist/index.cjs +68 -65
  172. package/dist/{index.d-BEVK61zS.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
  173. package/dist/{index.d-ah2c89Wu.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
  174. package/dist/index.d.mts +25 -23
  175. package/dist/index.d.ts +25 -23
  176. package/dist/index.mjs +72 -69
  177. package/dist/instrumentation.cjs +3 -3
  178. package/dist/instrumentation.mjs +2 -2
  179. package/dist/integrations/orm.d.mts +2 -1
  180. package/dist/integrations/orm.d.ts +2 -1
  181. package/dist/integrations.cjs +4 -3
  182. package/dist/integrations.d.mts +2 -1
  183. package/dist/integrations.d.ts +2 -1
  184. package/dist/integrations.mjs +3 -2
  185. package/dist/internal/app-markdown-runtime.cjs +2 -2
  186. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  187. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  188. package/dist/internal/app-markdown-runtime.mjs +1 -1
  189. package/dist/internal/build-runtime.cjs +49 -47
  190. package/dist/internal/build-runtime.d.mts +5 -4
  191. package/dist/internal/build-runtime.d.ts +5 -4
  192. package/dist/internal/build-runtime.mjs +48 -46
  193. package/dist/internal/cli-runtime.cjs +25 -24
  194. package/dist/internal/cli-runtime.d.mts +8 -7
  195. package/dist/internal/cli-runtime.d.ts +8 -7
  196. package/dist/internal/cli-runtime.mjs +26 -25
  197. package/dist/internal/client-error-overlay.cjs +4 -4
  198. package/dist/internal/client-error-overlay.mjs +1 -1
  199. package/dist/internal/client-runtime.cjs +76 -15
  200. package/dist/internal/client-runtime.d.mts +18 -7
  201. package/dist/internal/client-runtime.d.ts +18 -7
  202. package/dist/internal/client-runtime.mjs +67 -6
  203. package/dist/internal/compression-runtime.d.mts +2 -1
  204. package/dist/internal/compression-runtime.d.ts +2 -1
  205. package/dist/internal/config-runtime.cjs +14 -13
  206. package/dist/internal/config-runtime.d.mts +4 -3
  207. package/dist/internal/config-runtime.d.ts +4 -3
  208. package/dist/internal/config-runtime.mjs +13 -12
  209. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  210. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  211. package/dist/internal/form-actions.cjs +3 -3
  212. package/dist/internal/form-actions.mjs +2 -2
  213. package/dist/internal/infra-analytics-runtime.cjs +9 -7
  214. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  215. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  216. package/dist/internal/infra-analytics-runtime.mjs +9 -7
  217. package/dist/internal/island-codec.cjs +3 -3
  218. package/dist/internal/island-codec.mjs +2 -2
  219. package/dist/internal/island-value-store.d.mts +1 -1
  220. package/dist/internal/island-value-store.d.ts +1 -1
  221. package/dist/internal/islands-boot.cjs +63 -23
  222. package/dist/internal/islands-boot.d.mts +5 -3
  223. package/dist/internal/islands-boot.d.ts +5 -3
  224. package/dist/internal/islands-boot.mjs +58 -18
  225. package/dist/internal/islands-runtime.cjs +10 -56
  226. package/dist/internal/islands-runtime.mjs +6 -52
  227. package/dist/internal/islands-server.cjs +4 -4
  228. package/dist/internal/islands-server.mjs +3 -3
  229. package/dist/internal/islx-actions-client.cjs +36 -0
  230. package/dist/internal/islx-actions-client.d.mts +13 -0
  231. package/dist/internal/islx-actions-client.d.ts +13 -0
  232. package/dist/internal/islx-actions-client.mjs +36 -0
  233. package/dist/internal/islx-actions-server.cjs +8 -0
  234. package/dist/internal/islx-actions-server.d.mts +6 -0
  235. package/dist/internal/islx-actions-server.d.ts +6 -0
  236. package/dist/internal/islx-actions-server.mjs +8 -0
  237. package/dist/internal/islx-client.d.mts +0 -4
  238. package/dist/internal/islx-client.d.ts +0 -4
  239. package/dist/internal/isolated-boundary.cjs +3 -3
  240. package/dist/internal/isolated-boundary.d.mts +1 -1
  241. package/dist/internal/isolated-boundary.d.ts +1 -1
  242. package/dist/internal/isolated-boundary.mjs +2 -2
  243. package/dist/internal/metadata-image-runtime.cjs +4 -2
  244. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  245. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  246. package/dist/internal/metadata-image-runtime.mjs +5 -3
  247. package/dist/internal/native-server-fns.cjs +5 -4
  248. package/dist/internal/native-server-fns.mjs +4 -3
  249. package/dist/internal/navigation-neutral.cjs +36 -0
  250. package/dist/internal/navigation-neutral.d.mts +14 -0
  251. package/dist/internal/navigation-neutral.d.ts +14 -0
  252. package/dist/internal/navigation-neutral.mjs +36 -0
  253. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  254. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  255. package/dist/internal/production-runtime.cjs +30 -25
  256. package/dist/internal/production-runtime.d.mts +14 -11
  257. package/dist/internal/production-runtime.d.ts +14 -11
  258. package/dist/internal/production-runtime.mjs +35 -30
  259. package/dist/internal/server-tree.cjs +5 -4
  260. package/dist/internal/server-tree.d.mts +3 -4
  261. package/dist/internal/server-tree.d.ts +3 -4
  262. package/dist/internal/server-tree.mjs +4 -3
  263. package/dist/internal/spa-router.cjs +3 -3
  264. package/dist/internal/spa-router.d.mts +4 -3
  265. package/dist/internal/spa-router.d.ts +4 -3
  266. package/dist/internal/spa-router.mjs +2 -2
  267. package/dist/internal/start-manifest.d.mts +2 -1
  268. package/dist/internal/start-manifest.d.ts +2 -1
  269. package/dist/internal/vercel-edge-middleware.cjs +1 -1
  270. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  271. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  272. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  273. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  274. package/dist/layers-XLOMMQP7.cjs +21 -0
  275. package/dist/markdown.d.mts +2 -1
  276. package/dist/markdown.d.ts +2 -1
  277. package/dist/middleware.cjs +5 -5
  278. package/dist/middleware.d.mts +2 -1
  279. package/dist/middleware.d.ts +2 -1
  280. package/dist/middleware.mjs +4 -4
  281. package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
  282. package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
  283. package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
  284. package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
  285. package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
  286. package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
  287. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  288. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  289. package/dist/navigation.cjs +6 -6
  290. package/dist/navigation.d.mts +7 -6
  291. package/dist/navigation.d.ts +7 -6
  292. package/dist/navigation.mjs +5 -5
  293. package/dist/{nitro-C3MYDX7V.mjs → nitro-FK3SZM4H.mjs} +2 -2
  294. package/dist/{nitro-6UOJXJZ6.cjs → nitro-YDFMH5PY.cjs} +6 -6
  295. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  296. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  297. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  298. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  299. package/dist/plugin.cjs +41 -37
  300. package/dist/plugin.d.mts +6 -5
  301. package/dist/plugin.d.ts +6 -5
  302. package/dist/plugin.mjs +40 -36
  303. package/dist/query/client.cjs +10 -10
  304. package/dist/query/client.mjs +5 -5
  305. package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
  306. package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
  307. package/dist/renderer/none/server.cjs +5 -1
  308. package/dist/renderer/none/server.d.mts +3 -1
  309. package/dist/renderer/none/server.d.ts +3 -1
  310. package/dist/renderer/none/server.mjs +4 -0
  311. package/dist/renderer/react/server.cjs +6 -6
  312. package/dist/renderer/react/server.mjs +3 -3
  313. package/dist/renderer-client.cjs +79 -17
  314. package/dist/renderer-client.d.mts +13 -97
  315. package/dist/renderer-client.d.ts +13 -97
  316. package/dist/renderer-client.mjs +69 -7
  317. package/dist/renderer.cjs +4 -2
  318. package/dist/renderer.d.mts +43 -5
  319. package/dist/renderer.d.ts +43 -5
  320. package/dist/renderer.mjs +3 -1
  321. package/dist/{request.d-RCnCBuWq.d.mts → request.d-BhggxQf3.d.mts} +1 -1
  322. package/dist/{request.d-CE0FIkiM.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
  323. package/dist/request.d.mts +3 -2
  324. package/dist/request.d.ts +3 -2
  325. package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
  326. package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
  327. package/dist/{router.d-BU_WE6Ol.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
  328. package/dist/{router.d-D8Vvwl4i.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
  329. package/dist/routes.cjs +1 -1
  330. package/dist/routes.d.mts +2 -1
  331. package/dist/routes.d.ts +2 -1
  332. package/dist/routes.mjs +1 -1
  333. package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-5AOF64FL.cjs} +19 -18
  334. package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-DNRLYOJ7.mjs} +18 -17
  335. package/dist/{runtime-SQFRHRGJ.mjs → runtime-EHG2FRXZ.mjs} +18 -17
  336. package/dist/{runtime-WZ3CHHGJ.cjs → runtime-ZVHG5SRB.cjs} +20 -19
  337. package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
  338. package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
  339. package/dist/server-action-security.cjs +1 -1
  340. package/dist/server-action-security.mjs +1 -1
  341. package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
  342. package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
  343. package/dist/server-fn.cjs +3 -3
  344. package/dist/server-fn.mjs +2 -2
  345. package/dist/server-plugins.cjs +1 -1
  346. package/dist/server-plugins.d.mts +4 -3
  347. package/dist/server-plugins.d.ts +4 -3
  348. package/dist/server-plugins.mjs +1 -1
  349. package/dist/server-query.cjs +4 -4
  350. package/dist/server-query.mjs +3 -3
  351. package/dist/server.cjs +82 -71
  352. package/dist/server.d.mts +12 -11
  353. package/dist/server.d.ts +12 -11
  354. package/dist/server.mjs +61 -50
  355. package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-Bjgl-Osi.d.ts} +3 -3
  356. package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-l3G38xHa.d.mts} +3 -3
  357. package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
  358. package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
  359. package/dist/store-core.d-BZjuC6Zc.d.mts +309 -0
  360. package/dist/store-core.d-BaOUOPf7.d.ts +309 -0
  361. package/dist/testing.cjs +7 -6
  362. package/dist/testing.d.mts +2 -1
  363. package/dist/testing.d.ts +2 -1
  364. package/dist/testing.mjs +6 -5
  365. package/dist/{utils.d-_dvevm5s.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
  366. package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
  367. package/dist/version.cjs +2 -2
  368. package/dist/version.mjs +1 -1
  369. package/dist/vite.cjs +43 -37
  370. package/dist/vite.d.mts +18 -7
  371. package/dist/vite.d.ts +18 -7
  372. package/dist/vite.mjs +42 -36
  373. package/dist/workflows.cjs +2 -2
  374. package/dist/workflows.mjs +1 -1
  375. package/package.json +17 -2
  376. package/dist/analyzer-I7RBBQ65.cjs +0 -16
  377. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  378. package/dist/chunk-HONTCUK6.mjs +0 -203
  379. package/dist/chunk-K6PGK7DC.cjs +0 -203
  380. package/dist/chunk-NBIVGHAT.mjs +0 -50
  381. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  382. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  383. package/dist/layers-HMEGUEXM.cjs +0 -21
  384. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  385. package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
  386. package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
  387. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  388. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  389. package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
  390. package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
@@ -0,0 +1,309 @@
1
+ import { FarmRouterPathParams, FarmRouterPathParam, FarmRouterBuildOptions, FarmRouterRouteInput } from './router.js';
2
+ import { b as FarmViewTransitionMode, a as FarmNavigationState, c as FarmNavigateOptions } from './spa-router.d-Bjgl-Osi.js';
3
+ import { F as FarmClientCacheStatus } from './client-cache.d-Deoqq-nM.js';
4
+ import { ServerFn } from './server-fn.js';
5
+ import { ServerQuery } from './server-query.js';
6
+ import { S as ServerQueryFetchOptions } from './server-query-runtime.d-DXRNhX_3.js';
7
+ import { F as FarmThemeSnapshot, a as FarmThemePreference } from './types.d-DQnyD3VD.js';
8
+ import { f as FarmI18nLocale, b as FarmI18nClientSnapshot, o as FarmTranslator } from './types.d-euATAbE4.js';
9
+ import './navigation-delegate.d-BLM-8Q3Z.js';
10
+
11
+ /**
12
+ * Prefetch strategy (TanStack Router–style):
13
+ * - "intent": prefetch on hover and touchstart (with prefetchDelay)
14
+ * - "viewport": prefetch when link enters viewport (IntersectionObserver)
15
+ * - "render": prefetch as soon as the link is mounted
16
+ * - "none" | false: no prefetch
17
+ */
18
+ type PrefetchBehavior = false | "intent" | "viewport" | "render" | "none";
19
+ /** @internal Legacy prefetch mode for backward compatibility */
20
+ type PrefetchLegacy = boolean | "hover" | "viewport" | "none";
21
+ /**
22
+ * Augment this interface via the generated farm.d.ts so Link href is typed
23
+ * without passing a generic. Defaults to string when not augmented.
24
+ */
25
+ interface LinkDefaultRoute {
26
+ }
27
+ type DefaultRoutePath = LinkDefaultRoute extends {
28
+ _: infer TRoute extends string;
29
+ } ? TRoute : string;
30
+ type DefaultRoutePattern = LinkDefaultRoute extends {
31
+ pattern: infer TRoute extends string;
32
+ } ? TRoute : DefaultRoutePath;
33
+ type DefaultRouteHref = DefaultRoutePath | DefaultRoutePattern;
34
+ type RouteHref<TRoute extends string> = TRoute | `${TRoute}?${string}` | `${TRoute}#${string}` | `${TRoute}?${string}#${string}`;
35
+ type RouteParamValue = Exclude<FarmRouterPathParam, null | undefined>;
36
+ type RouteOptionalParamValue = FarmRouterPathParam;
37
+ type RouteParams<TRoute extends string> = string extends TRoute ? FarmRouterPathParams : ExtractRouteParams<StripRouteSuffix<TRoute>>;
38
+ /** URI schemes recognized as typed external Link targets. Apps may augment this interface. */
39
+ interface LinkExternalUriSchemes {
40
+ about: true;
41
+ blob: true;
42
+ data: true;
43
+ file: true;
44
+ ftp: true;
45
+ ftps: true;
46
+ geo: true;
47
+ git: true;
48
+ http: true;
49
+ https: true;
50
+ im: true;
51
+ intent: true;
52
+ irc: true;
53
+ ircs: true;
54
+ magnet: true;
55
+ mailto: true;
56
+ market: true;
57
+ sms: true;
58
+ ssh: true;
59
+ tel: true;
60
+ urn: true;
61
+ vscode: true;
62
+ webcal: true;
63
+ ws: true;
64
+ wss: true;
65
+ }
66
+ type ExternalUriScheme = Extract<keyof LinkExternalUriSchemes, string>;
67
+ type UriSchemeLetter = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
68
+ type UriSchemeStart = UriSchemeLetter | Uppercase<UriSchemeLetter>;
69
+ type UriSchemeCharacter = UriSchemeStart | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "+" | "-" | ".";
70
+ type IsUriSchemeTail<TValue extends string> = TValue extends "" ? true : TValue extends `${infer First}${infer Rest}` ? First extends UriSchemeCharacter ? IsUriSchemeTail<Rest> : false : false;
71
+ type IsUriScheme<TValue extends string> = TValue extends `${infer First}${infer Rest}` ? First extends UriSchemeStart ? IsUriSchemeTail<Rest> : false : false;
72
+ type KnownExternalHref = `//${string}` | `${ExternalUriScheme}:${string}`;
73
+ /** External URLs; these are never type-checked as routes. */
74
+ type ExternalHref<THref extends string = string> = string extends THref ? KnownExternalHref : THref extends `//${string}` ? THref : THref extends `${infer Scheme}:${string}` ? IsUriScheme<Scheme> extends true ? THref : never : never;
75
+ type StripRouteSuffix<TRoute extends string> = TRoute extends `${infer Path}?${string}` ? StripRouteSuffix<Path> : TRoute extends `${infer Path}#${string}` ? StripRouteSuffix<Path> : TRoute;
76
+ type ExtractRouteParams<TRoute extends string> = Simplify<ExtractOptionalCatchAllParams<TRoute> & ExtractCatchAllParams<TRoute> & ExtractDynamicParams<TRoute>>;
77
+ type ExtractOptionalCatchAllParams<TRoute extends string> = TRoute extends `${string}[[...${infer Param}]]${infer Rest}` ? {
78
+ [Key in Param]?: RouteOptionalParamValue;
79
+ } & ExtractOptionalCatchAllParams<Rest> : {};
80
+ type ExtractCatchAllParams<TRoute extends string> = TRoute extends `${string}[...${infer Param}]${infer Rest}` ? Param extends `[...${string}` ? ExtractCatchAllParams<Rest> : {
81
+ [Key in Param]: RouteParamValue;
82
+ } & ExtractCatchAllParams<Rest> : {};
83
+ type ExtractDynamicParams<TRoute extends string> = TRoute extends `${string}[${infer Param}]${infer Rest}` ? Param extends `...${string}` | `[...${string}` ? ExtractDynamicParams<Rest> : {
84
+ [Key in Param]: RouteParamValue;
85
+ } & ExtractDynamicParams<Rest> : {};
86
+ type Simplify<T> = {
87
+ [Key in keyof T]: T[Key];
88
+ } & {};
89
+ type HasRouteParams<TRoute extends string> = keyof RouteParams<TRoute> extends never ? false : true;
90
+ type RoutesWithRequiredParams<TRoute extends string> = TRoute extends string ? HasRouteParams<TRoute> extends true ? TRoute : never : never;
91
+ type LinkRouteParamsProps<TRoute extends string> = string extends TRoute ? {
92
+ params?: FarmRouterPathParams;
93
+ } : HasRouteParams<TRoute> extends true ? {
94
+ params: RouteParams<TRoute>;
95
+ } : {
96
+ params?: FarmRouterPathParams;
97
+ };
98
+ type LinkRouteTargetProps<TRoute extends string> = [RoutesWithRequiredParams<TRoute>] extends [
99
+ never
100
+ ] ? {
101
+ /** Internal route path with all params already resolved. */
102
+ href: RouteHref<TRoute>;
103
+ params?: FarmRouterPathParams;
104
+ } : TRoute extends string ? {
105
+ /** Internal route path or route pattern. */
106
+ href: RouteHref<TRoute>;
107
+ } & LinkRouteParamsProps<TRoute> : never;
108
+ type LinkExternalTargetProps<THref extends string = string> = {
109
+ /** External URL; these are never type-checked as app routes. */
110
+ href: ExternalHref<THref>;
111
+ params?: never;
112
+ };
113
+ type LinkTargetProps<TRoute extends string, THref extends string> = LinkExternalTargetProps<THref> | LinkRouteTargetProps<TRoute>;
114
+ /** What a `Link` takes besides its anchor attributes, in every renderer. */
115
+ type FarmLinkOptions<TRoute extends string = DefaultRouteHref, THref extends string = string> = LinkTargetProps<TRoute, THref> & {
116
+ /**
117
+ * When to prefetch. TanStack-style: "intent" (hover+touch), "viewport", "render", or "none".
118
+ * Legacy: true (intent+viewport), "hover" (intent), "viewport", false/"none".
119
+ */
120
+ prefetch?: PrefetchBehavior | PrefetchLegacy;
121
+ /** Search params appended after route params are resolved. */
122
+ query?: FarmRouterBuildOptions["query"];
123
+ /** Hash appended after route params and search params are resolved. */
124
+ hash?: string;
125
+ /** Add a trailing slash to the generated internal href. */
126
+ trailingSlash?: boolean;
127
+ /** Delay in ms before intent-based prefetch (hover/touch). Default 50. */
128
+ prefetchDelay?: number;
129
+ /** Replace current history entry instead of pushing */
130
+ replace?: boolean;
131
+ /** Scroll to top after navigation (default: true) */
132
+ scroll?: boolean;
133
+ /** Wrap this SPA navigation in a browser View Transition when supported. */
134
+ viewTransition?: FarmViewTransitionMode;
135
+ /** Preserve the active locale by default, or navigate using this locale. */
136
+ locale?: FarmI18nLocale;
137
+ };
138
+ /** The keys of {@link FarmLinkOptions}, which a `Link` keeps off its anchor. */
139
+ declare const FARM_LINK_OPTION_KEYS: readonly ["href", "params", "query", "hash", "trailingSlash", "prefetch", "prefetchDelay", "replace", "scroll", "viewTransition", "locale"];
140
+ /**
141
+ * The attributes a `Link` puts on its anchor. The app's router reads them: a click on the anchor
142
+ * navigates with `data-replace`, `data-no-scroll` and `data-view-transition`, and it prefetches
143
+ * as `data-farm-prefetch` says, so an anchor with these attributes behaves as a `Link` without
144
+ * any event handler of its own. `href` is absent for a `javascript:` URL, which never runs.
145
+ */
146
+ interface FarmLinkAttributes {
147
+ href: string | undefined;
148
+ "data-farm-link": "";
149
+ "data-farm-locale": FarmI18nLocale | undefined;
150
+ "data-farm-prefetch": string | undefined;
151
+ "data-farm-prefetch-delay": string | undefined;
152
+ "data-replace": "" | undefined;
153
+ "data-no-scroll": "" | undefined;
154
+ "data-view-transition": "auto" | "true" | undefined;
155
+ }
156
+ /**
157
+ * Resolves `Link` options into the attributes of its anchor: the href with route params, query,
158
+ * hash, locale, trailing slash and base path applied, and the data attributes the app's router
159
+ * reads to navigate and prefetch. Spread them on an `<a>` in any renderer to get a `Link`.
160
+ *
161
+ * ```ts
162
+ * resolveLinkAttributes({ href: "/products/[id]", params: { id: "42" }, prefetch: "intent" });
163
+ * // { href: "/products/42", "data-farm-link": "", "data-farm-prefetch": "intent", ... }
164
+ * ```
165
+ */
166
+ declare function resolveLinkAttributes<TRoute extends string = DefaultRouteHref, THref extends string = string>(options: FarmLinkOptions<TRoute, THref>): FarmLinkAttributes;
167
+
168
+ /**
169
+ * The state contract every renderer binding reads: a snapshot, and a way to hear that it changed.
170
+ * Farm's router, action, query, theme, and i18n stores implement it, and so does `createStore`.
171
+ */
172
+ interface FarmClientStore<TSnapshot> {
173
+ /** Returns the current snapshot. It must return the same value until the state changes. */
174
+ getSnapshot(): TSnapshot;
175
+ /** Calls `listener` after the snapshot changes. Returns a function that unsubscribes. */
176
+ subscribe(listener: () => void): () => void;
177
+ }
178
+
179
+ interface FarmRendererRouterOptions {
180
+ basePath?: string;
181
+ routes?: readonly FarmRouterRouteInput[];
182
+ }
183
+ interface FarmRendererRouterSnapshot {
184
+ pathname: string;
185
+ searchParams: URLSearchParams;
186
+ params: Record<string, string>;
187
+ pageState: unknown;
188
+ navigation: FarmNavigationState;
189
+ }
190
+ interface FarmRendererRouter extends FarmClientStore<FarmRendererRouterSnapshot> {
191
+ push(href: string, options?: Omit<FarmNavigateOptions, "replace">): Promise<void>;
192
+ replace(href: string, options?: Omit<FarmNavigateOptions, "replace">): Promise<void>;
193
+ refresh(options?: Omit<FarmNavigateOptions, "replace" | "refresh">): Promise<void>;
194
+ prefetch(href: string): Promise<void>;
195
+ back(): void;
196
+ forward(): void;
197
+ pushState<TState>(state: TState, href?: string): void;
198
+ replaceState<TState>(state: TState, href?: string): void;
199
+ }
200
+ declare function createRendererRouter(options?: FarmRendererRouterOptions): FarmRendererRouter;
201
+ type FarmActionStatus = "idle" | "pending" | "success" | "error";
202
+ interface FarmActionSnapshot<TResult, TError extends Error = Error> {
203
+ pending: boolean;
204
+ status: FarmActionStatus;
205
+ data: TResult | null;
206
+ error: TError | null;
207
+ }
208
+ interface FarmActionOptions<TInput, TResult, TError extends Error = Error> {
209
+ initialResult?: TResult | null;
210
+ resetOnSubmit?: boolean;
211
+ optimistic?: (context: {
212
+ input: TInput | FormData | undefined;
213
+ formData?: FormData;
214
+ current: TResult | null;
215
+ }) => TResult | null | undefined;
216
+ rollbackOnError?: boolean;
217
+ onSuccess?: (result: TResult) => void;
218
+ onError?: (error: TError) => void;
219
+ onSettled?: (result: TResult | null, error: TError | null) => void;
220
+ }
221
+ type FarmActionSubmit<TInput, TResult> = [unknown] extends [TInput] ? (input?: TInput | FormData) => Promise<TResult> : (input: TInput | FormData) => Promise<TResult>;
222
+ type FarmAction<TInput, TResult, TError extends Error = Error> = FarmClientStore<FarmActionSnapshot<TResult, TError>> & {
223
+ submit: FarmActionSubmit<TInput, TResult>;
224
+ reset(): void;
225
+ };
226
+ type FarmRouteActionTarget<TServerFn extends ServerFn<any, any, any>> = {
227
+ readonly action: TServerFn;
228
+ };
229
+ declare function createRendererAction<TInput, TResult, TError extends Error = Error>(target: ServerFn<TInput, TResult, TError> | FarmRouteActionTarget<ServerFn<TInput, TResult, TError>>, options?: FarmActionOptions<TInput, TResult, TError>): FarmAction<TInput, TResult, TError>;
230
+ /**
231
+ * Submits a form through an action, as React's `useAction().Form` does: the browser's own
232
+ * submission is cancelled, the form's fields and the button that submitted it become the action's
233
+ * `FormData`, a failure stays in the action's `error`, and a successful submission resets the
234
+ * form. Solid's and Vue's `Form` components and Svelte's `enhance` action call it from their
235
+ * `submit` listener. A listener that already cancelled the submission keeps it cancelled.
236
+ */
237
+ declare function submitRendererActionForm(action: Pick<FarmAction<any, any, any>, "submit">, event: Event): Promise<void>;
238
+ interface FarmRendererQueryOptions extends ServerQueryFetchOptions {
239
+ enabled?: boolean;
240
+ refetchOnWindowFocus?: boolean;
241
+ refetchOnReconnect?: boolean;
242
+ }
243
+ interface FarmRendererQuerySnapshot<TData> {
244
+ data: TData | undefined;
245
+ error: Error | null;
246
+ status: FarmClientCacheStatus;
247
+ pending: boolean;
248
+ fetching: boolean;
249
+ stale: boolean;
250
+ }
251
+ interface FarmRendererQuery<TData> extends FarmClientStore<FarmRendererQuerySnapshot<TData>> {
252
+ refetch(): Promise<TData>;
253
+ dispose(): void;
254
+ }
255
+ declare function createRendererQuery<TInput, TData>(query: ServerQuery<TInput, TData>, input: TInput, options?: FarmRendererQueryOptions): FarmRendererQuery<TData>;
256
+ interface FarmRendererTheme extends FarmClientStore<FarmThemeSnapshot> {
257
+ setTheme(theme: FarmThemePreference): void;
258
+ toggleTheme(): FarmThemeSnapshot["resolvedTheme"];
259
+ }
260
+ declare function createRendererTheme(): FarmRendererTheme;
261
+ interface FarmRendererI18n extends FarmClientStore<FarmI18nClientSnapshot | undefined> {
262
+ readonly t: FarmTranslator;
263
+ setLocale(locale: FarmI18nLocale): void;
264
+ }
265
+ declare function createRendererI18n(): FarmRendererI18n;
266
+
267
+ type StoreState = Record<string, any>;
268
+ type StoreValueUpdater<T> = T | ((previous: T) => T);
269
+ type StorePatch<T extends StoreState> = Partial<T> | ((state: T) => Partial<T>);
270
+ type StoreListener<T extends StoreState> = (state: T, previousState: T) => void;
271
+ type StoreKeyListener<T extends StoreState, K extends keyof T> = (value: T[K], previousValue: T[K]) => void;
272
+ type StoreKeysListener<T extends StoreState, K extends keyof T> = (value: Pick<T, K>, previousValue: Pick<T, K>) => void;
273
+ type FieldAccessor<T extends StoreState, K extends keyof T> = {
274
+ /** Reads the field's current value. */
275
+ (): T[K];
276
+ get(): T[K];
277
+ set(value: StoreValueUpdater<T[K]>): T[K];
278
+ subscribe(listener: StoreKeyListener<T, K>): () => void;
279
+ };
280
+ type StoreFields<T extends StoreState> = {
281
+ [K in keyof T]: FieldAccessor<T, K>;
282
+ };
283
+ /**
284
+ * A store's methods without a renderer. It is a `FarmClientStore`, so any renderer binds it the
285
+ * way it binds Farm's router or query stores.
286
+ */
287
+ interface StoreApi<T extends StoreState> extends FarmClientStore<T> {
288
+ get(): T;
289
+ get<K extends keyof T>(key: K): T[K];
290
+ /** The whole state. Its identity changes only when a value changes. */
291
+ getSnapshot(): T;
292
+ set<K extends keyof T>(key: K, value: StoreValueUpdater<T[K]>): T[K];
293
+ set(patch: StorePatch<T>): T;
294
+ replace(nextState: T | ((state: T) => T)): T;
295
+ reset(): T;
296
+ subscribe(listener: StoreListener<T>): () => void;
297
+ subscribe<K extends keyof T>(key: K, listener: StoreKeyListener<T, K>): () => void;
298
+ subscribe<K extends keyof T>(keys: readonly K[], listener: StoreKeysListener<T, K>): () => void;
299
+ }
300
+ type Store<T extends StoreState, TMethods extends Record<string, any> = {}> = StoreApi<T> & StoreFields<T> & TMethods;
301
+ /**
302
+ * Creates an in-memory store that works with every renderer. Read it with `get()` or a field
303
+ * accessor, and bind it with your renderer's binding (`useStore` in Solid and Vue,
304
+ * `createReadable` in Svelte) or with any code that reads a `FarmClientStore`. React apps can
305
+ * import `createStore` from `@farm.js/core/client` instead, which adds the `use()` hook.
306
+ */
307
+ declare function createStore<T extends StoreState, TMethods extends Record<string, any> = {}>(initialState: T, extend?: (store: Store<T>) => TMethods): Store<T, TMethods>;
308
+
309
+ export { type FarmRendererRouterSnapshot as A, type FarmRendererTheme as B, type FarmRouteActionTarget as C, type DefaultRouteHref as D, type ExternalHref as E, type FarmLinkOptions as F, type Store as G, type StoreFields as H, createRendererAction as I, createRendererI18n as J, createRendererQuery as K, type LinkDefaultRoute as L, createRendererRouter as M, createRendererTheme as N, createStore as O, type PrefetchBehavior as P, resolveLinkAttributes as Q, type RouteHref as R, type StoreKeyListener as S, submitRendererActionForm as T, type DefaultRoutePath as a, type DefaultRoutePattern as b, type LinkExternalUriSchemes as c, type RouteOptionalParamValue as d, type RouteParamValue as e, type RouteParams as f, type StoreKeysListener as g, type StoreListener as h, type StorePatch as i, type StoreState as j, type StoreValueUpdater as k, type StoreApi as l, FARM_LINK_OPTION_KEYS as m, type FarmAction as n, type FarmActionOptions as o, type FarmActionSnapshot as p, type FarmActionStatus as q, type FarmActionSubmit as r, type FarmClientStore as s, type FarmLinkAttributes as t, type FarmRendererI18n as u, type FarmRendererQuery as v, type FarmRendererQueryOptions as w, type FarmRendererQuerySnapshot as x, type FarmRendererRouter as y, type FarmRendererRouterOptions as z };
package/dist/testing.cjs CHANGED
@@ -12,7 +12,7 @@ var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
12
12
 
13
13
 
14
14
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
15
- require('./chunk-MQOHYV6L.cjs');
15
+ require('./chunk-5P65LXGU.cjs');
16
16
  require('./chunk-VWIW47FW.cjs');
17
17
  require('./chunk-HS4JPIGR.cjs');
18
18
  require('./chunk-SBDWCDS6.cjs');
@@ -21,21 +21,22 @@ require('./chunk-CYOTNHDF.cjs');
21
21
  require('./chunk-KORZ6PRE.cjs');
22
22
 
23
23
 
24
- var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
24
+ var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
25
25
  require('./chunk-VGVRGGP4.cjs');
26
26
  require('./chunk-GCJ4GNMC.cjs');
27
27
  require('./chunk-4DCWVSL2.cjs');
28
28
  require('./chunk-LQWIIBI2.cjs');
29
29
  require('./chunk-RKQOMG2X.cjs');
30
- require('./chunk-RHI67C2V.cjs');
30
+ require('./chunk-3DE6RK7K.cjs');
31
+ require('./chunk-HUGPJFOC.cjs');
31
32
  require('./chunk-CEVXKJKF.cjs');
32
33
  require('./chunk-YUCU6XB4.cjs');
33
34
  require('./chunk-IUKBPBM7.cjs');
34
35
 
35
36
 
36
37
  var _chunkBIAGSYIZcjs = require('./chunk-BIAGSYIZ.cjs');
37
- require('./chunk-25JGHAGH.cjs');
38
38
  require('./chunk-SNP33A33.cjs');
39
+ require('./chunk-25JGHAGH.cjs');
39
40
  require('./chunk-ZMSVKVI3.cjs');
40
41
  require('./chunk-7U4XF76R.cjs');
41
42
  require('./chunk-2OF5RPVU.cjs');
@@ -60,10 +61,10 @@ require('./chunk-DXUXQP2T.cjs');
60
61
  require('./chunk-UZCMMJJT.cjs');
61
62
  require('./chunk-6CTFVBAT.cjs');
62
63
  require('./chunk-2RSVYJT6.cjs');
63
- require('./chunk-3BIASUGR.cjs');
64
64
  require('./chunk-GYJT2U7J.cjs');
65
65
  require('./chunk-D22BUQKW.cjs');
66
66
  require('./chunk-ML4TOUZP.cjs');
67
+ require('./chunk-3BIASUGR.cjs');
67
68
  require('./chunk-UZM3PDKK.cjs');
68
69
 
69
70
  // src/testing.ts
@@ -317,7 +318,7 @@ function omitEndpointControlOptions(options) {
317
318
  }
318
319
  async function invokeTestEndpoint(endpoint, request, params = {}, throwOnError = false) {
319
320
  try {
320
- return await _chunkWIZRYFB2cjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params);
321
+ return await _chunkJYQ6DGPWcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params);
321
322
  } catch (error) {
322
323
  if (throwOnError) throw error;
323
324
  return jsonErrorResponse(error instanceof Error ? error.message : "Internal Server Error", 500);
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { aN as MiddlewareProps, s as PluginContextProps, e as RouteModule, aO as FarmContextFactory } from './client-plugins.d-WcMwOZGZ.mjs';
2
+ import { aF as MiddlewareProps, s as PluginContextProps, e as RouteModule, aG as FarmContextFactory } from './client-plugins.d-C1WM3ieD.mjs';
3
3
  import './types.d-euATAbE4.mjs';
4
4
  import { b as APIRouteParams } from './route-pattern.d-CVsVbq5n.mjs';
5
5
  import { ServerFn } from './server-fn.mjs';
@@ -31,6 +31,7 @@ import './workflows.mjs';
31
31
  import './server-http.d-rAe7lAQc.mjs';
32
32
  import './cron.mjs';
33
33
  import './env.mjs';
34
+ import './navigation-errors.d-DwHtoMyR.mjs';
34
35
  import './server-action-security.mjs';
35
36
  import './layers.d-CH0bC4QL.mjs';
36
37
  import 'rolldown/utils';
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { aN as MiddlewareProps, s as PluginContextProps, e as RouteModule, aO as FarmContextFactory } from './client-plugins.d-BYIovYqX.js';
2
+ import { aF as MiddlewareProps, s as PluginContextProps, e as RouteModule, aG as FarmContextFactory } from './client-plugins.d-DcmDzcSC.js';
3
3
  import './types.d-euATAbE4.js';
4
4
  import { b as APIRouteParams } from './route-pattern.d-CVsVbq5n.js';
5
5
  import { ServerFn } from './server-fn.js';
@@ -31,6 +31,7 @@ import './workflows.js';
31
31
  import './server-http.d-rAe7lAQc.js';
32
32
  import './cron.js';
33
33
  import './env.js';
34
+ import './navigation-errors.d-DwHtoMyR.js';
34
35
  import './server-action-security.js';
35
36
  import './layers.d-CH0bC4QL.js';
36
37
  import 'rolldown/utils';
package/dist/testing.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  resolveFarmRouteContext,
13
13
  withFarmRouteContext
14
14
  } from "./chunk-BMQAPZXD.mjs";
15
- import "./chunk-KKVRWNDH.mjs";
15
+ import "./chunk-NAHDG6UX.mjs";
16
16
  import "./chunk-NRWEY2CM.mjs";
17
17
  import "./chunk-URBP6DLH.mjs";
18
18
  import "./chunk-YX6AFPXC.mjs";
@@ -21,21 +21,22 @@ import "./chunk-VO55MMBX.mjs";
21
21
  import "./chunk-NR63PD3P.mjs";
22
22
  import {
23
23
  invokeAPIRouteEndpoint
24
- } from "./chunk-TYHWZOA2.mjs";
24
+ } from "./chunk-KWI3SQFX.mjs";
25
25
  import "./chunk-HD5FLXP2.mjs";
26
26
  import "./chunk-2LKUR5QJ.mjs";
27
27
  import "./chunk-D7Y63SOY.mjs";
28
28
  import "./chunk-ZIAWO6BC.mjs";
29
29
  import "./chunk-F7MJWW6A.mjs";
30
- import "./chunk-7VCLTNED.mjs";
30
+ import "./chunk-U6XYBTUT.mjs";
31
+ import "./chunk-PNMAD3OS.mjs";
31
32
  import "./chunk-UJWRXBVP.mjs";
32
33
  import "./chunk-DZXD6CYJ.mjs";
33
34
  import "./chunk-PKMUQ7LM.mjs";
34
35
  import {
35
36
  getFarmDataCache
36
37
  } from "./chunk-FS55CNTC.mjs";
37
- import "./chunk-7H2TXT2K.mjs";
38
38
  import "./chunk-VHIXGZYH.mjs";
39
+ import "./chunk-7H2TXT2K.mjs";
39
40
  import "./chunk-VJSXPN3W.mjs";
40
41
  import "./chunk-U6GMCDRS.mjs";
41
42
  import "./chunk-2I6PUKWJ.mjs";
@@ -60,10 +61,10 @@ import "./chunk-GLOICKDO.mjs";
60
61
  import "./chunk-AZQXXXDX.mjs";
61
62
  import "./chunk-OHWM2VI4.mjs";
62
63
  import "./chunk-FCAYYLAE.mjs";
63
- import "./chunk-VIXTAVEA.mjs";
64
64
  import "./chunk-4QBFYEDC.mjs";
65
65
  import "./chunk-SF3JB56B.mjs";
66
66
  import "./chunk-5KAEGBIL.mjs";
67
+ import "./chunk-VIXTAVEA.mjs";
67
68
  import "./chunk-TIZJYHB7.mjs";
68
69
 
69
70
  // src/testing.ts
@@ -1,4 +1,4 @@
1
- import { m as RouteSegment, P as ParsedRoute } from './client-plugins.d-BYIovYqX.js';
1
+ import { m as RouteSegment, P as ParsedRoute } from './client-plugins.d-DcmDzcSC.js';
2
2
 
3
3
  declare function parseRoutePath(filePath: string): ParsedRoute;
4
4
  declare function segmentsToPattern(segments: RouteSegment[]): string;
@@ -1,4 +1,4 @@
1
- import { m as RouteSegment, P as ParsedRoute } from './client-plugins.d-WcMwOZGZ.mjs';
1
+ import { m as RouteSegment, P as ParsedRoute } from './client-plugins.d-C1WM3ieD.mjs';
2
2
 
3
3
  declare function parseRoutePath(filePath: string): ParsedRoute;
4
4
  declare function segmentsToPattern(segments: RouteSegment[]): string;
package/dist/version.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
3
+ var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
4
4
  require('./chunk-UZM3PDKK.cjs');
5
5
 
6
6
 
7
- exports.FARM_VERSION = _chunkCCMP4JD2cjs.FARM_VERSION;
7
+ exports.FARM_VERSION = _chunkJK26IMT7cjs.FARM_VERSION;
package/dist/version.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-JGEN2FIT.mjs";
3
+ } from "./chunk-OP5VI4TP.mjs";
4
4
  import "./chunk-TIZJYHB7.mjs";
5
5
  export {
6
6
  FARM_VERSION