@farm.js/core 0.1.0-beta.6 → 0.1.0-beta.8

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 (447) hide show
  1. package/dist/after.cjs +227 -0
  2. package/dist/after.cjs.map +1 -0
  3. package/dist/after.d.mts +25 -0
  4. package/dist/after.d.ts +25 -0
  5. package/dist/after.mjs +14 -0
  6. package/dist/after.mjs.map +1 -0
  7. package/dist/agent-runtime.cjs +2379 -0
  8. package/dist/agent-runtime.cjs.map +1 -0
  9. package/dist/agent-runtime.d.mts +94 -0
  10. package/dist/agent-runtime.d.ts +94 -0
  11. package/dist/agent-runtime.mjs +479 -0
  12. package/dist/agent-runtime.mjs.map +1 -0
  13. package/dist/api/route-manager.d.mts +66 -0
  14. package/dist/api/route-manager.d.ts +66 -0
  15. package/dist/api/runtime.d.mts +3 -0
  16. package/dist/api/runtime.d.ts +3 -0
  17. package/dist/api.cjs +4100 -0
  18. package/dist/api.cjs.map +1 -0
  19. package/dist/api.d.mts +48 -0
  20. package/dist/api.d.ts +48 -0
  21. package/dist/api.mjs +93 -0
  22. package/dist/api.mjs.map +1 -0
  23. package/dist/app-BWtqQu3R.d.mts +302 -0
  24. package/dist/app-markdown.cjs +244 -0
  25. package/dist/app-markdown.cjs.map +1 -0
  26. package/dist/app-markdown.d.mts +22 -0
  27. package/dist/app-markdown.d.ts +22 -0
  28. package/dist/app-markdown.mjs +27 -0
  29. package/dist/app-markdown.mjs.map +1 -0
  30. package/dist/app-xltejvLY.d.ts +302 -0
  31. package/dist/cache.cjs +945 -0
  32. package/dist/cache.cjs.map +1 -0
  33. package/dist/cache.d.mts +192 -0
  34. package/dist/cache.d.ts +192 -0
  35. package/dist/cache.mjs +46 -0
  36. package/dist/cache.mjs.map +1 -0
  37. package/dist/chunk-2ED5Q2GH.mjs +422 -0
  38. package/dist/chunk-2ED5Q2GH.mjs.map +1 -0
  39. package/dist/chunk-32W4QEJP.mjs +158 -0
  40. package/dist/chunk-32W4QEJP.mjs.map +1 -0
  41. package/dist/chunk-3XNTL3FQ.mjs +452 -0
  42. package/dist/chunk-3XNTL3FQ.mjs.map +1 -0
  43. package/dist/chunk-44ZCFSKE.mjs +84 -0
  44. package/dist/chunk-44ZCFSKE.mjs.map +1 -0
  45. package/dist/chunk-4MGVSBRP.mjs +7787 -0
  46. package/dist/chunk-4MGVSBRP.mjs.map +1 -0
  47. package/dist/chunk-4S3ORGFA.mjs +44 -0
  48. package/dist/chunk-4S3ORGFA.mjs.map +1 -0
  49. package/dist/chunk-5BY76U2M.mjs +1 -0
  50. package/dist/chunk-5BY76U2M.mjs.map +1 -0
  51. package/dist/chunk-5ZGPRGWV.mjs +136 -0
  52. package/dist/chunk-5ZGPRGWV.mjs.map +1 -0
  53. package/dist/chunk-65A7QIKI.mjs +142 -0
  54. package/dist/chunk-65A7QIKI.mjs.map +1 -0
  55. package/dist/chunk-74YTBPTY.mjs +450 -0
  56. package/dist/chunk-74YTBPTY.mjs.map +1 -0
  57. package/dist/chunk-7FBJLMQH.mjs +338 -0
  58. package/dist/chunk-7FBJLMQH.mjs.map +1 -0
  59. package/dist/chunk-7HO6AEOP.mjs +74 -0
  60. package/dist/chunk-7HO6AEOP.mjs.map +1 -0
  61. package/dist/chunk-7MABZJIM.mjs +29 -0
  62. package/dist/chunk-7MABZJIM.mjs.map +1 -0
  63. package/dist/chunk-7N62DNSO.mjs +41 -0
  64. package/dist/chunk-7N62DNSO.mjs.map +1 -0
  65. package/dist/chunk-7ZY5AIJO.mjs +161 -0
  66. package/dist/chunk-7ZY5AIJO.mjs.map +1 -0
  67. package/dist/chunk-ALCLXXTY.mjs +187 -0
  68. package/dist/chunk-ALCLXXTY.mjs.map +1 -0
  69. package/dist/chunk-AZ7YUVNR.mjs +65 -0
  70. package/dist/chunk-AZ7YUVNR.mjs.map +1 -0
  71. package/dist/chunk-B232I2GP.mjs +163 -0
  72. package/dist/chunk-B232I2GP.mjs.map +1 -0
  73. package/dist/chunk-B4W3BNTL.mjs +483 -0
  74. package/dist/chunk-B4W3BNTL.mjs.map +1 -0
  75. package/dist/chunk-C2ROET2V.mjs +718 -0
  76. package/dist/chunk-C2ROET2V.mjs.map +1 -0
  77. package/dist/chunk-CGILA3WO.mjs +14 -0
  78. package/dist/chunk-CGILA3WO.mjs.map +1 -0
  79. package/dist/chunk-CGIXMLSY.mjs +184 -0
  80. package/dist/chunk-CGIXMLSY.mjs.map +1 -0
  81. package/dist/chunk-DJSGLHCN.mjs +597 -0
  82. package/dist/chunk-DJSGLHCN.mjs.map +1 -0
  83. package/dist/chunk-E2MPIBRE.mjs +149 -0
  84. package/dist/chunk-E2MPIBRE.mjs.map +1 -0
  85. package/dist/chunk-E6EPN5BT.mjs +203 -0
  86. package/dist/chunk-E6EPN5BT.mjs.map +1 -0
  87. package/dist/chunk-EI43C4RA.mjs +6277 -0
  88. package/dist/chunk-EI43C4RA.mjs.map +1 -0
  89. package/dist/chunk-EJ7T4TPB.mjs +622 -0
  90. package/dist/chunk-EJ7T4TPB.mjs.map +1 -0
  91. package/dist/chunk-FQYDHKKU.mjs +128 -0
  92. package/dist/chunk-FQYDHKKU.mjs.map +1 -0
  93. package/dist/chunk-FRPWCMMG.mjs +299 -0
  94. package/dist/chunk-FRPWCMMG.mjs.map +1 -0
  95. package/dist/chunk-GN72QAIH.mjs +146 -0
  96. package/dist/chunk-GN72QAIH.mjs.map +1 -0
  97. package/dist/chunk-GQVGIUSN.mjs +149 -0
  98. package/dist/chunk-GQVGIUSN.mjs.map +1 -0
  99. package/dist/chunk-GS6K5OCM.mjs +407 -0
  100. package/dist/chunk-GS6K5OCM.mjs.map +1 -0
  101. package/dist/chunk-GXASWWJU.mjs +364 -0
  102. package/dist/chunk-GXASWWJU.mjs.map +1 -0
  103. package/dist/chunk-GY2STC2S.mjs +180 -0
  104. package/dist/chunk-GY2STC2S.mjs.map +1 -0
  105. package/dist/chunk-H2FA2SBS.mjs +51 -0
  106. package/dist/chunk-H2FA2SBS.mjs.map +1 -0
  107. package/dist/chunk-I4CUBGVF.mjs +93 -0
  108. package/dist/chunk-I4CUBGVF.mjs.map +1 -0
  109. package/dist/chunk-ITN462YM.mjs +98 -0
  110. package/dist/chunk-ITN462YM.mjs.map +1 -0
  111. package/dist/chunk-J23HNLFY.mjs +72 -0
  112. package/dist/chunk-J23HNLFY.mjs.map +1 -0
  113. package/dist/chunk-J4FNJ5IU.mjs +179 -0
  114. package/dist/chunk-J4FNJ5IU.mjs.map +1 -0
  115. package/dist/chunk-J5YWQVI5.mjs +211 -0
  116. package/dist/chunk-J5YWQVI5.mjs.map +1 -0
  117. package/dist/chunk-JDEOUK5V.mjs +427 -0
  118. package/dist/chunk-JDEOUK5V.mjs.map +1 -0
  119. package/dist/chunk-JK25YEN6.mjs +219 -0
  120. package/dist/chunk-JK25YEN6.mjs.map +1 -0
  121. package/dist/chunk-K4667E2Q.mjs +1916 -0
  122. package/dist/chunk-K4667E2Q.mjs.map +1 -0
  123. package/dist/chunk-LGHEOHBU.mjs +218 -0
  124. package/dist/chunk-LGHEOHBU.mjs.map +1 -0
  125. package/dist/chunk-LM2YNO4U.mjs +24 -0
  126. package/dist/chunk-LM2YNO4U.mjs.map +1 -0
  127. package/dist/chunk-ME4MO2RJ.mjs +3540 -0
  128. package/dist/chunk-ME4MO2RJ.mjs.map +1 -0
  129. package/dist/chunk-MIUW47JX.mjs +639 -0
  130. package/dist/chunk-MIUW47JX.mjs.map +1 -0
  131. package/dist/chunk-NNLCAVB6.mjs +391 -0
  132. package/dist/chunk-NNLCAVB6.mjs.map +1 -0
  133. package/dist/chunk-P7QDS5AT.mjs +191 -0
  134. package/dist/chunk-P7QDS5AT.mjs.map +1 -0
  135. package/dist/chunk-PFE6GMNE.mjs +603 -0
  136. package/dist/chunk-PFE6GMNE.mjs.map +1 -0
  137. package/dist/chunk-QGOHVJ6J.mjs +63 -0
  138. package/dist/chunk-QGOHVJ6J.mjs.map +1 -0
  139. package/dist/chunk-QKVUNGAH.mjs +39 -0
  140. package/dist/chunk-QKVUNGAH.mjs.map +1 -0
  141. package/dist/chunk-QM746KUO.mjs +56 -0
  142. package/dist/chunk-QM746KUO.mjs.map +1 -0
  143. package/dist/chunk-QTZZ2ISQ.mjs +753 -0
  144. package/dist/chunk-QTZZ2ISQ.mjs.map +1 -0
  145. package/dist/chunk-RBRLLZL5.mjs +81 -0
  146. package/dist/chunk-RBRLLZL5.mjs.map +1 -0
  147. package/dist/chunk-RHIFZZUI.mjs +69 -0
  148. package/dist/chunk-RHIFZZUI.mjs.map +1 -0
  149. package/dist/chunk-RQ633A5I.mjs +187 -0
  150. package/dist/chunk-RQ633A5I.mjs.map +1 -0
  151. package/dist/chunk-SCFX4UTD.mjs +28 -0
  152. package/dist/chunk-SCFX4UTD.mjs.map +1 -0
  153. package/dist/chunk-SL6HTIOK.mjs +66 -0
  154. package/dist/chunk-SL6HTIOK.mjs.map +1 -0
  155. package/dist/chunk-SPBBQLXI.mjs +207 -0
  156. package/dist/chunk-SPBBQLXI.mjs.map +1 -0
  157. package/dist/chunk-SSA7THPX.mjs +10 -0
  158. package/dist/chunk-SSA7THPX.mjs.map +1 -0
  159. package/dist/chunk-T4QJQK76.mjs +459 -0
  160. package/dist/chunk-T4QJQK76.mjs.map +1 -0
  161. package/dist/chunk-TQAEEJB4.mjs +157 -0
  162. package/dist/chunk-TQAEEJB4.mjs.map +1 -0
  163. package/dist/chunk-UB5UOSHB.mjs +458 -0
  164. package/dist/chunk-UB5UOSHB.mjs.map +1 -0
  165. package/dist/chunk-USWZZUEH.mjs +25 -0
  166. package/dist/chunk-USWZZUEH.mjs.map +1 -0
  167. package/dist/chunk-UVCIEUJC.mjs +16 -0
  168. package/dist/chunk-UVCIEUJC.mjs.map +1 -0
  169. package/dist/chunk-UXUAWNO5.mjs +396 -0
  170. package/dist/chunk-UXUAWNO5.mjs.map +1 -0
  171. package/dist/chunk-V3XURYJO.mjs +756 -0
  172. package/dist/chunk-V3XURYJO.mjs.map +1 -0
  173. package/dist/chunk-V6WE6JSZ.mjs +352 -0
  174. package/dist/chunk-V6WE6JSZ.mjs.map +1 -0
  175. package/dist/chunk-V7RBCSDJ.mjs +170 -0
  176. package/dist/chunk-V7RBCSDJ.mjs.map +1 -0
  177. package/dist/chunk-VCANOYFI.mjs +588 -0
  178. package/dist/chunk-VCANOYFI.mjs.map +1 -0
  179. package/dist/chunk-VY2UYN5R.mjs +224 -0
  180. package/dist/chunk-VY2UYN5R.mjs.map +1 -0
  181. package/dist/chunk-W2CRQFF6.mjs +1352 -0
  182. package/dist/chunk-W2CRQFF6.mjs.map +1 -0
  183. package/dist/chunk-WDU6QXNK.mjs +872 -0
  184. package/dist/chunk-WDU6QXNK.mjs.map +1 -0
  185. package/dist/chunk-WZ5QFROO.mjs +23 -0
  186. package/dist/chunk-WZ5QFROO.mjs.map +1 -0
  187. package/dist/chunk-XIVV5IWN.mjs +541 -0
  188. package/dist/chunk-XIVV5IWN.mjs.map +1 -0
  189. package/dist/chunk-YW7OBE6Q.mjs +119 -0
  190. package/dist/chunk-YW7OBE6Q.mjs.map +1 -0
  191. package/dist/chunk-Z5CQMP54.mjs +365 -0
  192. package/dist/chunk-Z5CQMP54.mjs.map +1 -0
  193. package/dist/chunk-ZBE6MLHL.mjs +230 -0
  194. package/dist/chunk-ZBE6MLHL.mjs.map +1 -0
  195. package/dist/chunk-ZVWA4ZQ3.mjs +189 -0
  196. package/dist/chunk-ZVWA4ZQ3.mjs.map +1 -0
  197. package/dist/chunk-ZZ57EH5Z.mjs +173 -0
  198. package/dist/chunk-ZZ57EH5Z.mjs.map +1 -0
  199. package/dist/client-BT1mFQas.d.mts +447 -0
  200. package/dist/client-Nn0q4eO4.d.ts +447 -0
  201. package/dist/client-cache-CIlyBlmx.d.ts +6 -0
  202. package/dist/client-cache-D-EZ7XVW.d.mts +6 -0
  203. package/dist/client-plugins-BI2R6Eae.d.mts +1926 -0
  204. package/dist/client-plugins-DU9oMspX.d.ts +1926 -0
  205. package/dist/client-plugins.cjs +415 -0
  206. package/dist/client-plugins.cjs.map +1 -0
  207. package/dist/client-plugins.d.mts +22 -0
  208. package/dist/client-plugins.d.ts +22 -0
  209. package/dist/client-plugins.mjs +10 -0
  210. package/dist/client-plugins.mjs.map +1 -0
  211. package/dist/client.cjs +5402 -0
  212. package/dist/client.cjs.map +1 -0
  213. package/dist/client.d.mts +447 -0
  214. package/dist/client.d.ts +447 -0
  215. package/dist/client.mjs +110 -0
  216. package/dist/client.mjs.map +1 -0
  217. package/dist/config.cjs +38 -0
  218. package/dist/config.cjs.map +1 -0
  219. package/dist/config.d.mts +29 -0
  220. package/dist/config.d.ts +29 -0
  221. package/dist/config.mjs +10 -0
  222. package/dist/config.mjs.map +1 -0
  223. package/dist/cron.cjs +406 -0
  224. package/dist/cron.cjs.map +1 -0
  225. package/dist/cron.d.mts +78 -0
  226. package/dist/cron.d.ts +78 -0
  227. package/dist/cron.mjs +30 -0
  228. package/dist/cron.mjs.map +1 -0
  229. package/dist/deferred.cjs +438 -0
  230. package/dist/deferred.cjs.map +1 -0
  231. package/dist/deferred.d.mts +42 -0
  232. package/dist/deferred.d.ts +42 -0
  233. package/dist/deferred.mjs +28 -0
  234. package/dist/deferred.mjs.map +1 -0
  235. package/dist/deployment.cjs +199 -0
  236. package/dist/deployment.cjs.map +1 -0
  237. package/dist/deployment.d.mts +34 -0
  238. package/dist/deployment.d.ts +34 -0
  239. package/dist/deployment.mjs +38 -0
  240. package/dist/deployment.mjs.map +1 -0
  241. package/dist/devtools-REQTS3I7.mjs +371 -0
  242. package/dist/devtools-REQTS3I7.mjs.map +1 -0
  243. package/dist/devtools-client-3XRTBND5.mjs +216 -0
  244. package/dist/devtools-client-3XRTBND5.mjs.map +1 -0
  245. package/dist/devtools-ui-NJKFORTG.mjs +1349 -0
  246. package/dist/devtools-ui-NJKFORTG.mjs.map +1 -0
  247. package/dist/docs.cjs +5548 -0
  248. package/dist/docs.cjs.map +1 -0
  249. package/dist/docs.d.mts +69 -0
  250. package/dist/docs.d.ts +69 -0
  251. package/dist/docs.mjs +47 -0
  252. package/dist/docs.mjs.map +1 -0
  253. package/dist/env-types.cjs +232 -0
  254. package/dist/env-types.cjs.map +1 -0
  255. package/dist/env-types.d.mts +12 -0
  256. package/dist/env-types.d.ts +12 -0
  257. package/dist/env-types.mjs +11 -0
  258. package/dist/env-types.mjs.map +1 -0
  259. package/dist/env.cjs +215 -0
  260. package/dist/env.cjs.map +1 -0
  261. package/dist/env.d.mts +45 -0
  262. package/dist/env.d.ts +45 -0
  263. package/dist/env.mjs +22 -0
  264. package/dist/env.mjs.map +1 -0
  265. package/dist/environment/vite.d.mts +22 -0
  266. package/dist/environment/vite.d.ts +22 -0
  267. package/dist/environment.cjs +96 -0
  268. package/dist/environment.cjs.map +1 -0
  269. package/dist/environment.d.mts +18 -0
  270. package/dist/environment.d.ts +18 -0
  271. package/dist/environment.mjs +14 -0
  272. package/dist/environment.mjs.map +1 -0
  273. package/dist/headers.cjs +126 -0
  274. package/dist/headers.cjs.map +1 -0
  275. package/dist/headers.d.mts +22 -0
  276. package/dist/headers.d.ts +22 -0
  277. package/dist/headers.mjs +12 -0
  278. package/dist/headers.mjs.map +1 -0
  279. package/dist/i18n/client.d.mts +32 -0
  280. package/dist/i18n/client.d.ts +32 -0
  281. package/dist/i18n/index.d.mts +20 -0
  282. package/dist/i18n/index.d.ts +20 -0
  283. package/dist/i18n/server.d.mts +30 -0
  284. package/dist/i18n/server.d.ts +30 -0
  285. package/dist/image/server.d.mts +37 -0
  286. package/dist/image/server.d.ts +37 -0
  287. package/dist/image/sharp.d.mts +7 -0
  288. package/dist/image/sharp.d.ts +7 -0
  289. package/dist/image-config-Duob7wER.d.mts +50 -0
  290. package/dist/image-config-Duob7wER.d.ts +50 -0
  291. package/dist/image.cjs +209 -0
  292. package/dist/image.cjs.map +1 -0
  293. package/dist/image.d.mts +39 -0
  294. package/dist/image.d.ts +39 -0
  295. package/dist/image.mjs +165 -0
  296. package/dist/image.mjs.map +1 -0
  297. package/dist/index.cjs +42186 -0
  298. package/dist/index.cjs.map +1 -0
  299. package/dist/index.d.mts +454 -0
  300. package/dist/index.d.ts +454 -0
  301. package/dist/index.mjs +980 -0
  302. package/dist/index.mjs.map +1 -0
  303. package/dist/integration-api-CHT2OKAf.d.mts +93 -0
  304. package/dist/integration-api-CHT2OKAf.d.ts +93 -0
  305. package/dist/integration-orm-GQLGU66X.mjs +13 -0
  306. package/dist/integration-orm-GQLGU66X.mjs.map +1 -0
  307. package/dist/integrations.cjs +2820 -0
  308. package/dist/integrations.cjs.map +1 -0
  309. package/dist/integrations.d.mts +22 -0
  310. package/dist/integrations.d.ts +22 -0
  311. package/dist/integrations.mjs +51 -0
  312. package/dist/integrations.mjs.map +1 -0
  313. package/dist/internal/build-runtime.cjs +643 -322
  314. package/dist/internal/build-runtime.cjs.map +1 -1
  315. package/dist/internal/build-runtime.d.mts +39 -0
  316. package/dist/internal/build-runtime.d.ts +39 -0
  317. package/dist/internal/build-runtime.mjs +11 -10
  318. package/dist/internal/client-runtime.d.mts +2 -0
  319. package/dist/internal/client-runtime.d.ts +2 -0
  320. package/dist/internal/config-runtime.cjs +135 -39
  321. package/dist/internal/config-runtime.cjs.map +1 -1
  322. package/dist/internal/config-runtime.d.mts +39 -0
  323. package/dist/internal/config-runtime.d.ts +39 -0
  324. package/dist/internal/config-runtime.mjs +5 -4
  325. package/dist/internal/production-node-env.d.mts +12 -0
  326. package/dist/internal/production-node-env.d.ts +12 -0
  327. package/dist/internal/production-runtime.d.mts +39 -0
  328. package/dist/internal/production-runtime.d.ts +39 -0
  329. package/dist/layers-VWVDTPUZ.mjs +16 -0
  330. package/dist/layers-VWVDTPUZ.mjs.map +1 -0
  331. package/dist/manager-THKFTOFE.mjs +10 -0
  332. package/dist/manager-THKFTOFE.mjs.map +1 -0
  333. package/dist/markdown.cjs +364 -0
  334. package/dist/markdown.cjs.map +1 -0
  335. package/dist/markdown.d.mts +60 -0
  336. package/dist/markdown.d.ts +60 -0
  337. package/dist/markdown.mjs +18 -0
  338. package/dist/markdown.mjs.map +1 -0
  339. package/dist/metadata-Cm9ujH4I.d.ts +22 -0
  340. package/dist/metadata-DacXbnLA.d.mts +22 -0
  341. package/dist/middleware.cjs +2148 -0
  342. package/dist/middleware.cjs.map +1 -0
  343. package/dist/middleware.d.mts +164 -0
  344. package/dist/middleware.d.ts +164 -0
  345. package/dist/middleware.mjs +49 -0
  346. package/dist/middleware.mjs.map +1 -0
  347. package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
  348. package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
  349. package/dist/navigation.cjs +1329 -0
  350. package/dist/navigation.cjs.map +1 -0
  351. package/dist/navigation.d.mts +14 -0
  352. package/dist/navigation.d.ts +14 -0
  353. package/dist/navigation.mjs +33 -0
  354. package/dist/navigation.mjs.map +1 -0
  355. package/dist/nitro-QO5LV6QK.mjs +689 -0
  356. package/dist/nitro-QO5LV6QK.mjs.map +1 -0
  357. package/dist/observability.cjs +186 -0
  358. package/dist/observability.cjs.map +1 -0
  359. package/dist/observability.d.mts +335 -0
  360. package/dist/observability.d.ts +335 -0
  361. package/dist/observability.mjs +16 -0
  362. package/dist/observability.mjs.map +1 -0
  363. package/dist/params-BALtrRim.d.ts +15 -0
  364. package/dist/params-ry-lxqmy.d.mts +15 -0
  365. package/dist/plugin-BJDf43dc.d.mts +165 -0
  366. package/dist/plugin-BJDf43dc.d.ts +165 -0
  367. package/dist/plugin.cjs +23470 -0
  368. package/dist/plugin.cjs.map +1 -1
  369. package/dist/plugin.d.mts +22 -0
  370. package/dist/plugin.d.ts +22 -0
  371. package/dist/plugin.mjs +8 -7
  372. package/dist/production-runtime-4KKq1AVC.d.mts +79 -0
  373. package/dist/production-runtime-C_B79w2P.d.mts +28 -0
  374. package/dist/production-runtime-DDEM1D2q.d.ts +28 -0
  375. package/dist/production-runtime-DRsWDN2x.d.ts +79 -0
  376. package/dist/query/client.d.mts +61 -0
  377. package/dist/query/client.d.ts +61 -0
  378. package/dist/query/index.d.mts +90 -0
  379. package/dist/query/index.d.ts +90 -0
  380. package/dist/query/parsers.d.mts +25 -0
  381. package/dist/query/parsers.d.ts +25 -0
  382. package/dist/query/server.d.mts +55 -0
  383. package/dist/query/server.d.ts +55 -0
  384. package/dist/request-Dsq4kGW0.d.mts +6 -0
  385. package/dist/request-udtobOLv.d.ts +6 -0
  386. package/dist/request.d.mts +2 -0
  387. package/dist/request.d.ts +2 -0
  388. package/dist/resolver-DJqjLMg_.d.mts +14 -0
  389. package/dist/resolver-IH4RmPEl.d.ts +14 -0
  390. package/dist/route-runtime-DoOHzCAD.d.mts +38 -0
  391. package/dist/route-runtime-DoOHzCAD.d.ts +38 -0
  392. package/dist/router.d.mts +36 -0
  393. package/dist/router.d.ts +36 -0
  394. package/dist/routes.d.mts +224 -0
  395. package/dist/routes.d.ts +224 -0
  396. package/dist/runtime-9nQjVM7X.d.mts +206 -0
  397. package/dist/runtime-Cxpq6xZN.d.mts +27 -0
  398. package/dist/runtime-DgeS2skB.d.ts +206 -0
  399. package/dist/runtime-bv63eUiO.d.ts +27 -0
  400. package/dist/server-action-security.d.mts +43 -0
  401. package/dist/server-action-security.d.ts +43 -0
  402. package/dist/server-fn-client.d.mts +32 -0
  403. package/dist/server-fn-client.d.ts +32 -0
  404. package/dist/server-fn.d.mts +93 -0
  405. package/dist/server-fn.d.ts +93 -0
  406. package/dist/server-plugins.d.mts +55 -0
  407. package/dist/server-plugins.d.ts +55 -0
  408. package/dist/server-query-client.d.mts +50 -0
  409. package/dist/server-query-client.d.ts +50 -0
  410. package/dist/server-query.d.mts +36 -0
  411. package/dist/server-query.d.ts +36 -0
  412. package/dist/server.cjs +731 -447
  413. package/dist/server.cjs.map +1 -1
  414. package/dist/server.d.mts +48 -0
  415. package/dist/server.d.ts +48 -0
  416. package/dist/server.mjs +9 -8
  417. package/dist/server.mjs.map +1 -1
  418. package/dist/storage.d.mts +52 -0
  419. package/dist/storage.d.ts +52 -0
  420. package/dist/testing.d.mts +101 -0
  421. package/dist/testing.d.ts +101 -0
  422. package/dist/transport-BmbGTXA5.d.mts +49 -0
  423. package/dist/transport-BmbGTXA5.d.ts +49 -0
  424. package/dist/types-BMxWr97v.d.mts +81 -0
  425. package/dist/types-BMxWr97v.d.ts +81 -0
  426. package/dist/types-C9N-nk5R.d.mts +53 -0
  427. package/dist/types-C9N-nk5R.d.ts +53 -0
  428. package/dist/types-D1A6-XvH.d.mts +73 -0
  429. package/dist/types-D1A6-XvH.d.ts +73 -0
  430. package/dist/utils-B-cUHwoK.d.ts +23 -0
  431. package/dist/utils-Cm41AefV.d.mts +23 -0
  432. package/dist/version.cjs +1 -1
  433. package/dist/version.cjs.map +1 -1
  434. package/dist/version.d.mts +3 -0
  435. package/dist/version.d.ts +3 -0
  436. package/dist/version.mjs +1 -1
  437. package/dist/vite.cjs +682 -437
  438. package/dist/vite.cjs.map +1 -1
  439. package/dist/vite.d.mts +22 -0
  440. package/dist/vite.d.ts +22 -0
  441. package/dist/vite.mjs +6 -5
  442. package/dist/workflows.d.mts +110 -0
  443. package/dist/workflows.d.ts +110 -0
  444. package/package.json +3 -2
  445. package/types/client.d.ts +1 -1
  446. package/types/image.d.ts +4 -0
  447. package/types/images.d.ts +59 -0
@@ -0,0 +1,22 @@
1
+ export { aO as APIHandlerLifecyclePayload, aK as APIRouteDiscoveredPayload, aR as BundleLifecyclePayload, U as BundleResultPayload, aP as ErrorLifecyclePayload, V as FarmPlugin, aE as FarmPluginBuildHooks, aG as FarmPluginClientConfig, aj as FarmPluginContext, aF as FarmPluginDevHooks, aB as FarmPluginDiscoveredRoute, aD as FarmPluginRenderHooks, an as FarmPluginRouteRuntimePayload, aC as FarmPluginRouterHooks, at as FarmPluginRuntimeAfterEvent, aq as FarmPluginRuntimeBaseEvent, as as FarmPluginRuntimeBeforeEvent, aw as FarmPluginRuntimeCloseEvent, ar as FarmPluginRuntimeContextEvent, au as FarmPluginRuntimeErrorEvent, ax as FarmPluginRuntimeHooks, am as FarmPluginRuntimeKind, az as FarmPluginRuntimeRequestHandler, ay as FarmPluginRuntimeRequestOptions, aA as FarmPluginRuntimeSession, av as FarmPluginRuntimeStartEvent, ao as FarmPluginSetupContext, ap as FarmPluginStateContext, ak as FarmRequestPluginContext, al as FarmRequestStore, aQ as HMRUpdatePayload, aJ as MiddlewareDiscoveredPayload, aS as NitroBuildLifecyclePayload, a3 as PluginManager, ai as PluginRequestContext, aN as RenderLifecyclePayload, aH as RouteDiscoveredPayload, aL as RouteMatchPayload, aM as RouteMatchResultPayload, aI as RoutesGeneratedPayload, aT as ShutdownPayload, a2 as definePlugin, f as farmPlugin } from './client-plugins-BI2R6Eae.mjs';
2
+ import 'vite';
3
+ import './plugin-BJDf43dc.mjs';
4
+ import './env.mjs';
5
+ import 'react';
6
+ import 'http';
7
+ import './types-D1A6-XvH.mjs';
8
+ import 'db0';
9
+ import 'unstorage';
10
+ import './integration-api-CHT2OKAf.mjs';
11
+ import '@farming-labs/orm';
12
+ import './types-C9N-nk5R.mjs';
13
+ import '@farming-labs/docs';
14
+ import './markdown.mjs';
15
+ import './observability.mjs';
16
+ import './workflows.mjs';
17
+ import './cron.mjs';
18
+ import './server-action-security.mjs';
19
+ import './image-config-Duob7wER.mjs';
20
+ import './types-BMxWr97v.mjs';
21
+ import './cache.mjs';
22
+ import './route-runtime-DoOHzCAD.mjs';
@@ -0,0 +1,22 @@
1
+ export { aO as APIHandlerLifecyclePayload, aK as APIRouteDiscoveredPayload, aR as BundleLifecyclePayload, U as BundleResultPayload, aP as ErrorLifecyclePayload, V as FarmPlugin, aE as FarmPluginBuildHooks, aG as FarmPluginClientConfig, aj as FarmPluginContext, aF as FarmPluginDevHooks, aB as FarmPluginDiscoveredRoute, aD as FarmPluginRenderHooks, an as FarmPluginRouteRuntimePayload, aC as FarmPluginRouterHooks, at as FarmPluginRuntimeAfterEvent, aq as FarmPluginRuntimeBaseEvent, as as FarmPluginRuntimeBeforeEvent, aw as FarmPluginRuntimeCloseEvent, ar as FarmPluginRuntimeContextEvent, au as FarmPluginRuntimeErrorEvent, ax as FarmPluginRuntimeHooks, am as FarmPluginRuntimeKind, az as FarmPluginRuntimeRequestHandler, ay as FarmPluginRuntimeRequestOptions, aA as FarmPluginRuntimeSession, av as FarmPluginRuntimeStartEvent, ao as FarmPluginSetupContext, ap as FarmPluginStateContext, ak as FarmRequestPluginContext, al as FarmRequestStore, aQ as HMRUpdatePayload, aJ as MiddlewareDiscoveredPayload, aS as NitroBuildLifecyclePayload, a3 as PluginManager, ai as PluginRequestContext, aN as RenderLifecyclePayload, aH as RouteDiscoveredPayload, aL as RouteMatchPayload, aM as RouteMatchResultPayload, aI as RoutesGeneratedPayload, aT as ShutdownPayload, a2 as definePlugin, f as farmPlugin } from './client-plugins-DU9oMspX.js';
2
+ import 'vite';
3
+ import './plugin-BJDf43dc.js';
4
+ import './env.js';
5
+ import 'react';
6
+ import 'http';
7
+ import './types-D1A6-XvH.js';
8
+ import 'db0';
9
+ import 'unstorage';
10
+ import './integration-api-CHT2OKAf.js';
11
+ import '@farming-labs/orm';
12
+ import './types-C9N-nk5R.js';
13
+ import '@farming-labs/docs';
14
+ import './markdown.js';
15
+ import './observability.js';
16
+ import './workflows.js';
17
+ import './cron.js';
18
+ import './server-action-security.js';
19
+ import './image-config-Duob7wER.js';
20
+ import './types-BMxWr97v.js';
21
+ import './cache.js';
22
+ import './route-runtime-DoOHzCAD.js';
package/dist/plugin.mjs CHANGED
@@ -1,26 +1,27 @@
1
1
  import {
2
2
  PluginManager,
3
3
  definePlugin
4
- } from "./chunk-C3DLZMBU.mjs";
5
- import "./chunk-RSKVYESE.mjs";
4
+ } from "./chunk-DJSGLHCN.mjs";
5
+ import "./chunk-RQ633A5I.mjs";
6
6
  import {
7
7
  farmPlugin
8
- } from "./chunk-A2LUXHD2.mjs";
8
+ } from "./chunk-4MGVSBRP.mjs";
9
9
  import "./chunk-LGHEOHBU.mjs";
10
10
  import "./chunk-FRPWCMMG.mjs";
11
11
  import "./chunk-V6WE6JSZ.mjs";
12
12
  import "./chunk-3XNTL3FQ.mjs";
13
- import "./chunk-BHG3LVHH.mjs";
13
+ import "./chunk-CGIXMLSY.mjs";
14
14
  import "./chunk-USWZZUEH.mjs";
15
15
  import "./chunk-7N62DNSO.mjs";
16
16
  import "./chunk-7HO6AEOP.mjs";
17
+ import "./chunk-I4CUBGVF.mjs";
17
18
  import "./chunk-74YTBPTY.mjs";
18
19
  import "./chunk-7MABZJIM.mjs";
19
20
  import "./chunk-YW7OBE6Q.mjs";
20
21
  import "./chunk-GY2STC2S.mjs";
21
22
  import "./chunk-UB5UOSHB.mjs";
22
- import "./chunk-LLC7BNXW.mjs";
23
- import "./chunk-QGQX7SFC.mjs";
23
+ import "./chunk-ZVWA4ZQ3.mjs";
24
+ import "./chunk-7FBJLMQH.mjs";
24
25
  import "./chunk-XIVV5IWN.mjs";
25
26
  import "./chunk-GXASWWJU.mjs";
26
27
  import "./chunk-K4667E2Q.mjs";
@@ -40,7 +41,7 @@ import "./chunk-J4FNJ5IU.mjs";
40
41
  import "./chunk-PFE6GMNE.mjs";
41
42
  import "./chunk-RHIFZZUI.mjs";
42
43
  import "./chunk-LM2YNO4U.mjs";
43
- import "./chunk-EEABSBKK.mjs";
44
+ import "./chunk-SSA7THPX.mjs";
44
45
  import "./chunk-QTZZ2ISQ.mjs";
45
46
  import "./chunk-ITN462YM.mjs";
46
47
  import "./chunk-B232I2GP.mjs";
@@ -0,0 +1,79 @@
1
+ import { X as ReadonlyMiddlewareStore, Y as FarmMiddlewareConfig, Z as MiddlewareModule } from './client-plugins-BI2R6Eae.mjs';
2
+ import { R as ResolvedFarmI18nConfig } from './types-BMxWr97v.mjs';
3
+
4
+ /**
5
+ * Server-side middleware utilities for accessing middleware data in pages
6
+ */
7
+
8
+ type MiddlewareStoreInput = Record<string, any> | Map<string, any>;
9
+ /**
10
+ * Internal: Run code with middleware data available
11
+ * This is called by the server renderer
12
+ */
13
+ declare function _runWithMiddlewareData<T>(data: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
14
+ /** Internal: Run code with server-only middleware context available. */
15
+ declare function _runWithMiddlewareContext<T>(context: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
16
+ /**
17
+ * Get middleware data in a server component
18
+ * No props needed - uses global storage!
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { getMiddlewareData } from 'farm/middleware';
23
+ *
24
+ * export default function Page() {
25
+ * const data = getMiddlewareData(); // ← No props needed!
26
+ * const user = data.get('user');
27
+ * const demoInfo = data.get('demoInfo');
28
+ *
29
+ * return <div>Welcome {user?.name}</div>;
30
+ * }
31
+ * ```
32
+ */
33
+ declare function getMiddlewareData<T extends Record<string, any> = Record<string, any>>(): Map<keyof T, T[keyof T]>;
34
+ /**
35
+ * Get a specific value from middleware data (synchronous)
36
+ * Uses AsyncLocalStorage for request scoping - no props needed.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { getMiddlewareValue } from 'farm/middleware';
41
+ *
42
+ * export default function Page() {
43
+ * const user = getMiddlewareValue<User>('user'); // ← No props needed!
44
+ * const stats = getMiddlewareValue('dashboardStats');
45
+ *
46
+ * return <div>Welcome {user?.name}</div>;
47
+ * }
48
+ * ```
49
+ */
50
+ declare function getMiddlewareValue<T = any>(key: string): T | undefined;
51
+ /**
52
+ * Read server-only values set by route middleware for the current request.
53
+ * The returned store is available to the matched page, layouts, and nested
54
+ * Server Components, but is never added to hydration props.
55
+ */
56
+ declare function getMiddlewareContext<T extends Record<string, any> = Record<string, any>>(): ReadonlyMiddlewareStore<T>;
57
+
58
+ interface ProductionMiddlewareModuleEntry {
59
+ path: string;
60
+ filePath?: string;
61
+ module: MiddlewareModule | Record<string, any>;
62
+ }
63
+ interface ProductionMiddlewareRunnerOptions {
64
+ config?: FarmMiddlewareConfig | null;
65
+ modules?: ProductionMiddlewareModuleEntry[];
66
+ i18n?: ResolvedFarmI18nConfig;
67
+ }
68
+ interface ProductionMiddlewareResult {
69
+ request: Request;
70
+ response: Response | null;
71
+ data: Map<string, any>;
72
+ context: Map<string, any>;
73
+ headers: Headers;
74
+ handled: boolean;
75
+ }
76
+ declare function createProductionMiddlewareRunner(options?: ProductionMiddlewareRunnerOptions): (request: Request) => Promise<ProductionMiddlewareResult>;
77
+ declare function applyProductionMiddlewareHeaders(response: Response, middlewareHeaders?: Headers | null): Response;
78
+
79
+ export { _runWithMiddlewareContext as _, applyProductionMiddlewareHeaders as a, _runWithMiddlewareData as b, createProductionMiddlewareRunner as c, getMiddlewareData as d, getMiddlewareValue as e, getMiddlewareContext as g };
@@ -0,0 +1,28 @@
1
+ import './plugin-BJDf43dc.mjs';
2
+
3
+ interface FarmChunkRecoveryOptions {
4
+ /**
5
+ * How long a page is considered already recovered before another chunk
6
+ * failure may trigger a reload. Defaults to 30 seconds.
7
+ */
8
+ maxAgeMs?: number;
9
+ /**
10
+ * Override the storage key. Mostly useful for tests and embedded runtimes.
11
+ */
12
+ storageKey?: string;
13
+ /**
14
+ * Called right before Farm reloads the page.
15
+ */
16
+ onRecover?: (error: unknown) => void;
17
+ /**
18
+ * Test hooks for browser globals.
19
+ */
20
+ reload?: () => void;
21
+ storage?: Pick<Storage, "getItem" | "setItem" | "removeItem"> | null;
22
+ location?: Pick<Location, "pathname" | "search" | "reload">;
23
+ now?: () => number;
24
+ }
25
+ declare function isChunkLoadError(errorLike: unknown): boolean;
26
+ declare function installChunkErrorRecovery(options?: FarmChunkRecoveryOptions): () => void;
27
+
28
+ export { type FarmChunkRecoveryOptions as F, isChunkLoadError as a, installChunkErrorRecovery as i };
@@ -0,0 +1,28 @@
1
+ import './plugin-BJDf43dc.js';
2
+
3
+ interface FarmChunkRecoveryOptions {
4
+ /**
5
+ * How long a page is considered already recovered before another chunk
6
+ * failure may trigger a reload. Defaults to 30 seconds.
7
+ */
8
+ maxAgeMs?: number;
9
+ /**
10
+ * Override the storage key. Mostly useful for tests and embedded runtimes.
11
+ */
12
+ storageKey?: string;
13
+ /**
14
+ * Called right before Farm reloads the page.
15
+ */
16
+ onRecover?: (error: unknown) => void;
17
+ /**
18
+ * Test hooks for browser globals.
19
+ */
20
+ reload?: () => void;
21
+ storage?: Pick<Storage, "getItem" | "setItem" | "removeItem"> | null;
22
+ location?: Pick<Location, "pathname" | "search" | "reload">;
23
+ now?: () => number;
24
+ }
25
+ declare function isChunkLoadError(errorLike: unknown): boolean;
26
+ declare function installChunkErrorRecovery(options?: FarmChunkRecoveryOptions): () => void;
27
+
28
+ export { type FarmChunkRecoveryOptions as F, isChunkLoadError as a, installChunkErrorRecovery as i };
@@ -0,0 +1,79 @@
1
+ import { X as ReadonlyMiddlewareStore, Y as FarmMiddlewareConfig, Z as MiddlewareModule } from './client-plugins-DU9oMspX.js';
2
+ import { R as ResolvedFarmI18nConfig } from './types-BMxWr97v.js';
3
+
4
+ /**
5
+ * Server-side middleware utilities for accessing middleware data in pages
6
+ */
7
+
8
+ type MiddlewareStoreInput = Record<string, any> | Map<string, any>;
9
+ /**
10
+ * Internal: Run code with middleware data available
11
+ * This is called by the server renderer
12
+ */
13
+ declare function _runWithMiddlewareData<T>(data: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
14
+ /** Internal: Run code with server-only middleware context available. */
15
+ declare function _runWithMiddlewareContext<T>(context: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
16
+ /**
17
+ * Get middleware data in a server component
18
+ * No props needed - uses global storage!
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { getMiddlewareData } from 'farm/middleware';
23
+ *
24
+ * export default function Page() {
25
+ * const data = getMiddlewareData(); // ← No props needed!
26
+ * const user = data.get('user');
27
+ * const demoInfo = data.get('demoInfo');
28
+ *
29
+ * return <div>Welcome {user?.name}</div>;
30
+ * }
31
+ * ```
32
+ */
33
+ declare function getMiddlewareData<T extends Record<string, any> = Record<string, any>>(): Map<keyof T, T[keyof T]>;
34
+ /**
35
+ * Get a specific value from middleware data (synchronous)
36
+ * Uses AsyncLocalStorage for request scoping - no props needed.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { getMiddlewareValue } from 'farm/middleware';
41
+ *
42
+ * export default function Page() {
43
+ * const user = getMiddlewareValue<User>('user'); // ← No props needed!
44
+ * const stats = getMiddlewareValue('dashboardStats');
45
+ *
46
+ * return <div>Welcome {user?.name}</div>;
47
+ * }
48
+ * ```
49
+ */
50
+ declare function getMiddlewareValue<T = any>(key: string): T | undefined;
51
+ /**
52
+ * Read server-only values set by route middleware for the current request.
53
+ * The returned store is available to the matched page, layouts, and nested
54
+ * Server Components, but is never added to hydration props.
55
+ */
56
+ declare function getMiddlewareContext<T extends Record<string, any> = Record<string, any>>(): ReadonlyMiddlewareStore<T>;
57
+
58
+ interface ProductionMiddlewareModuleEntry {
59
+ path: string;
60
+ filePath?: string;
61
+ module: MiddlewareModule | Record<string, any>;
62
+ }
63
+ interface ProductionMiddlewareRunnerOptions {
64
+ config?: FarmMiddlewareConfig | null;
65
+ modules?: ProductionMiddlewareModuleEntry[];
66
+ i18n?: ResolvedFarmI18nConfig;
67
+ }
68
+ interface ProductionMiddlewareResult {
69
+ request: Request;
70
+ response: Response | null;
71
+ data: Map<string, any>;
72
+ context: Map<string, any>;
73
+ headers: Headers;
74
+ handled: boolean;
75
+ }
76
+ declare function createProductionMiddlewareRunner(options?: ProductionMiddlewareRunnerOptions): (request: Request) => Promise<ProductionMiddlewareResult>;
77
+ declare function applyProductionMiddlewareHeaders(response: Response, middlewareHeaders?: Headers | null): Response;
78
+
79
+ export { _runWithMiddlewareContext as _, applyProductionMiddlewareHeaders as a, _runWithMiddlewareData as b, createProductionMiddlewareRunner as c, getMiddlewareData as d, getMiddlewareValue as e, getMiddlewareContext as g };
@@ -0,0 +1,61 @@
1
+ export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-ry-lxqmy.mjs';
2
+ import { Parser } from './parsers.mjs';
3
+ export { asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.mjs';
4
+
5
+ /**
6
+ * Farm.js Client-Side Query State Management
7
+ *
8
+ * Type-safe URL search parameter state management - Like useState, but stored in the URL query string.
9
+ * Client-only hooks for managing query parameters in the browser.
10
+ * Inspired by nuqs implementation patterns.
11
+ */
12
+
13
+ type UrlUpdateType = "push" | "replace";
14
+ type HistoryMethod = "pushState" | "replaceState";
15
+ interface Options {
16
+ history?: HistoryMethod;
17
+ shallow?: boolean;
18
+ scroll?: boolean;
19
+ throttleMs?: number;
20
+ }
21
+ declare function useQueryState<TParser extends Parser<any>>(key: string, parser: TParser, options?: Options): [
22
+ NonNullable<ReturnType<TParser["parse"]>> | null,
23
+ (value: NonNullable<ReturnType<TParser["parse"]>> | null) => void
24
+ ];
25
+ declare function useQueryState<T>(key: string, parser: Parser<T>, options?: Options): [T | null, (value: T | null) => void];
26
+ declare function useQueryStates<T extends Record<string, Parser<any>>>(parsers: T, options?: Options): [
27
+ {
28
+ [K in keyof T]: ReturnType<T[K]["parse"]>;
29
+ },
30
+ (updates: Partial<{
31
+ [K in keyof T]: ReturnType<T[K]["parse"]> | null;
32
+ }>) => void
33
+ ];
34
+ declare function usePagination(options?: {
35
+ defaultPage?: number;
36
+ defaultLimit?: number;
37
+ pageKey?: string;
38
+ limitKey?: string;
39
+ }): {
40
+ page: number;
41
+ setPage: (value: number | null) => void;
42
+ limit: number;
43
+ setLimit: (value: number | null) => void;
44
+ offset: number;
45
+ resetPagination: () => void;
46
+ };
47
+ declare function useSearchFilters<T extends Record<string, any>>(options?: {
48
+ searchKey?: string;
49
+ defaultFilters?: T;
50
+ filterKeys?: (keyof T)[];
51
+ }): {
52
+ search: string | null;
53
+ setSearch: (value: string | null) => void;
54
+ filters: T;
55
+ setFilters: (updates: Partial<{
56
+ [x: string]: string | null;
57
+ }>) => void;
58
+ clearFilters: () => void;
59
+ };
60
+
61
+ export { type HistoryMethod, type Options, Parser, type UrlUpdateType, usePagination, useQueryState, useQueryStates, useSearchFilters };
@@ -0,0 +1,61 @@
1
+ export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-BALtrRim.js';
2
+ import { Parser } from './parsers.js';
3
+ export { asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.js';
4
+
5
+ /**
6
+ * Farm.js Client-Side Query State Management
7
+ *
8
+ * Type-safe URL search parameter state management - Like useState, but stored in the URL query string.
9
+ * Client-only hooks for managing query parameters in the browser.
10
+ * Inspired by nuqs implementation patterns.
11
+ */
12
+
13
+ type UrlUpdateType = "push" | "replace";
14
+ type HistoryMethod = "pushState" | "replaceState";
15
+ interface Options {
16
+ history?: HistoryMethod;
17
+ shallow?: boolean;
18
+ scroll?: boolean;
19
+ throttleMs?: number;
20
+ }
21
+ declare function useQueryState<TParser extends Parser<any>>(key: string, parser: TParser, options?: Options): [
22
+ NonNullable<ReturnType<TParser["parse"]>> | null,
23
+ (value: NonNullable<ReturnType<TParser["parse"]>> | null) => void
24
+ ];
25
+ declare function useQueryState<T>(key: string, parser: Parser<T>, options?: Options): [T | null, (value: T | null) => void];
26
+ declare function useQueryStates<T extends Record<string, Parser<any>>>(parsers: T, options?: Options): [
27
+ {
28
+ [K in keyof T]: ReturnType<T[K]["parse"]>;
29
+ },
30
+ (updates: Partial<{
31
+ [K in keyof T]: ReturnType<T[K]["parse"]> | null;
32
+ }>) => void
33
+ ];
34
+ declare function usePagination(options?: {
35
+ defaultPage?: number;
36
+ defaultLimit?: number;
37
+ pageKey?: string;
38
+ limitKey?: string;
39
+ }): {
40
+ page: number;
41
+ setPage: (value: number | null) => void;
42
+ limit: number;
43
+ setLimit: (value: number | null) => void;
44
+ offset: number;
45
+ resetPagination: () => void;
46
+ };
47
+ declare function useSearchFilters<T extends Record<string, any>>(options?: {
48
+ searchKey?: string;
49
+ defaultFilters?: T;
50
+ filterKeys?: (keyof T)[];
51
+ }): {
52
+ search: string | null;
53
+ setSearch: (value: string | null) => void;
54
+ filters: T;
55
+ setFilters: (updates: Partial<{
56
+ [x: string]: string | null;
57
+ }>) => void;
58
+ clearFilters: () => void;
59
+ };
60
+
61
+ export { type HistoryMethod, type Options, Parser, type UrlUpdateType, usePagination, useQueryState, useQueryStates, useSearchFilters };
@@ -0,0 +1,90 @@
1
+ export { Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.mjs';
2
+ export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-ry-lxqmy.mjs';
3
+ import { ReactNode, ComponentType } from 'react';
4
+
5
+ /**
6
+ * Farm.js Query State Types
7
+ */
8
+
9
+ /**
10
+ * Props for Farm.js page components with search params
11
+ */
12
+ /**
13
+ * Props for Farm.js layout components
14
+ */
15
+ interface LayoutPropsSafe {
16
+ children: ReactNode;
17
+ params: Record<string, string>;
18
+ }
19
+ interface PagePropsSafe {
20
+ params: Record<string, string>;
21
+ searchParams: Promise<URLSearchParams | Record<string, string | string[] | undefined>>;
22
+ }
23
+ /**
24
+ * Query state configuration for Farm.js
25
+ */
26
+ interface QueryStateConfig {
27
+ /**
28
+ * Default history method for URL updates
29
+ * @default 'push'
30
+ */
31
+ defaultHistoryMethod?: "push" | "replace";
32
+ /**
33
+ * Default shallow routing behavior
34
+ * @default true
35
+ */
36
+ shallow?: boolean;
37
+ /**
38
+ * Default scroll behavior
39
+ * @default true
40
+ */
41
+ scroll?: boolean;
42
+ /**
43
+ * Custom serialization options
44
+ */
45
+ serialization?: {
46
+ /**
47
+ * Custom URL key mappings
48
+ */
49
+ urlKeys?: Record<string, string>;
50
+ /**
51
+ * Custom base URL for serialization
52
+ */
53
+ baseUrl?: string;
54
+ };
55
+ }
56
+ /**
57
+ * Farm.js specific query state context
58
+ */
59
+ interface FarmQueryStateContext {
60
+ /**
61
+ * Current search parameters
62
+ */
63
+ searchParams: URLSearchParams;
64
+ /**
65
+ * Current pathname
66
+ */
67
+ pathname: string;
68
+ /**
69
+ * Update URL with new search parameters
70
+ */
71
+ updateUrl: (params: Record<string, any>, options?: {
72
+ method?: "push" | "replace";
73
+ shallow?: boolean;
74
+ scroll?: boolean;
75
+ }) => void;
76
+ /**
77
+ * Clear all search parameters
78
+ */
79
+ clearParams: () => void;
80
+ }
81
+ /**
82
+ * Higher-order component for providing query state context
83
+ */
84
+ type QueryStateProvider = ComponentType<{
85
+ children: ReactNode;
86
+ searchParams?: URLSearchParams;
87
+ pathname?: string;
88
+ }>;
89
+
90
+ export type { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider };
@@ -0,0 +1,90 @@
1
+ export { Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.js';
2
+ export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-BALtrRim.js';
3
+ import { ReactNode, ComponentType } from 'react';
4
+
5
+ /**
6
+ * Farm.js Query State Types
7
+ */
8
+
9
+ /**
10
+ * Props for Farm.js page components with search params
11
+ */
12
+ /**
13
+ * Props for Farm.js layout components
14
+ */
15
+ interface LayoutPropsSafe {
16
+ children: ReactNode;
17
+ params: Record<string, string>;
18
+ }
19
+ interface PagePropsSafe {
20
+ params: Record<string, string>;
21
+ searchParams: Promise<URLSearchParams | Record<string, string | string[] | undefined>>;
22
+ }
23
+ /**
24
+ * Query state configuration for Farm.js
25
+ */
26
+ interface QueryStateConfig {
27
+ /**
28
+ * Default history method for URL updates
29
+ * @default 'push'
30
+ */
31
+ defaultHistoryMethod?: "push" | "replace";
32
+ /**
33
+ * Default shallow routing behavior
34
+ * @default true
35
+ */
36
+ shallow?: boolean;
37
+ /**
38
+ * Default scroll behavior
39
+ * @default true
40
+ */
41
+ scroll?: boolean;
42
+ /**
43
+ * Custom serialization options
44
+ */
45
+ serialization?: {
46
+ /**
47
+ * Custom URL key mappings
48
+ */
49
+ urlKeys?: Record<string, string>;
50
+ /**
51
+ * Custom base URL for serialization
52
+ */
53
+ baseUrl?: string;
54
+ };
55
+ }
56
+ /**
57
+ * Farm.js specific query state context
58
+ */
59
+ interface FarmQueryStateContext {
60
+ /**
61
+ * Current search parameters
62
+ */
63
+ searchParams: URLSearchParams;
64
+ /**
65
+ * Current pathname
66
+ */
67
+ pathname: string;
68
+ /**
69
+ * Update URL with new search parameters
70
+ */
71
+ updateUrl: (params: Record<string, any>, options?: {
72
+ method?: "push" | "replace";
73
+ shallow?: boolean;
74
+ scroll?: boolean;
75
+ }) => void;
76
+ /**
77
+ * Clear all search parameters
78
+ */
79
+ clearParams: () => void;
80
+ }
81
+ /**
82
+ * Higher-order component for providing query state context
83
+ */
84
+ type QueryStateProvider = ComponentType<{
85
+ children: ReactNode;
86
+ searchParams?: URLSearchParams;
87
+ pathname?: string;
88
+ }>;
89
+
90
+ export type { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Farm.js Query State Parsers
3
+ *
4
+ * Shared parsers that can be used in both client and server contexts
5
+ */
6
+ interface Parser<T> {
7
+ parse: (value: string) => T | null;
8
+ serialize: (value: T) => string;
9
+ withDefault?: (defaultValue: T) => Parser<T>;
10
+ }
11
+ declare const asString: Parser<string>;
12
+ declare const asInteger: Parser<number>;
13
+ declare const asFloat: Parser<number>;
14
+ declare const asBoolean: Parser<boolean>;
15
+ declare function asArrayOf<T>(itemParser: Parser<T>): Parser<T[]>;
16
+ declare function asJson<T>(): Parser<T>;
17
+ declare const asIsoDate: Parser<Date>;
18
+ declare const asIsoDateTime: Parser<Date>;
19
+ declare function createParser<T>(config: {
20
+ parse: (value: string) => T | null;
21
+ serialize: (value: T) => string;
22
+ }): Parser<T>;
23
+ type inferParserType<T> = T extends Parser<infer U> ? U : never;
24
+
25
+ export { type Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, type inferParserType };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Farm.js Query State Parsers
3
+ *
4
+ * Shared parsers that can be used in both client and server contexts
5
+ */
6
+ interface Parser<T> {
7
+ parse: (value: string) => T | null;
8
+ serialize: (value: T) => string;
9
+ withDefault?: (defaultValue: T) => Parser<T>;
10
+ }
11
+ declare const asString: Parser<string>;
12
+ declare const asInteger: Parser<number>;
13
+ declare const asFloat: Parser<number>;
14
+ declare const asBoolean: Parser<boolean>;
15
+ declare function asArrayOf<T>(itemParser: Parser<T>): Parser<T[]>;
16
+ declare function asJson<T>(): Parser<T>;
17
+ declare const asIsoDate: Parser<Date>;
18
+ declare const asIsoDateTime: Parser<Date>;
19
+ declare function createParser<T>(config: {
20
+ parse: (value: string) => T | null;
21
+ serialize: (value: T) => string;
22
+ }): Parser<T>;
23
+ type inferParserType<T> = T extends Parser<infer U> ? U : never;
24
+
25
+ export { type Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, type inferParserType };