@farm.js/core 0.1.65 → 0.1.67

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 (439) hide show
  1. package/dist/{agent-mcp-handler-QLFDDTYN.mjs → agent-mcp-handler-AZ7QW4UP.mjs} +5 -5
  2. package/dist/{agent-mcp-handler-OXT73ZBY.cjs → agent-mcp-handler-FER4MQDF.cjs} +6 -6
  3. package/dist/{agent-mcp.d-QD2WZ9BS.d.ts → agent-mcp.d-BFu9xHAi.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-DWyWkTSy.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +6 -5
  6. package/dist/agent-runtime.d.mts +6 -6
  7. package/dist/agent-runtime.d.ts +6 -6
  8. package/dist/agent-runtime.mjs +5 -4
  9. package/dist/analyzer-KVZGVY5Q.cjs +16 -0
  10. package/dist/{analyzer-PE33SK5W.mjs → analyzer-TTIIXXMQ.mjs} +3 -3
  11. package/dist/api/client.cjs +12 -2
  12. package/dist/api/client.d.mts +4 -4
  13. package/dist/api/client.d.ts +4 -4
  14. package/dist/api/client.mjs +12 -2
  15. package/dist/api/client.native.cjs +12 -2
  16. package/dist/api/client.native.d.mts +5 -5
  17. package/dist/api/client.native.d.ts +5 -5
  18. package/dist/api/client.native.mjs +12 -2
  19. package/dist/api/node.cjs +223 -0
  20. package/dist/api/node.d.mts +59 -0
  21. package/dist/api/node.d.ts +59 -0
  22. package/dist/api/node.mjs +223 -0
  23. package/dist/api/route-manager.cjs +11 -11
  24. package/dist/api/route-manager.d.mts +10 -9
  25. package/dist/api/route-manager.d.ts +10 -9
  26. package/dist/api/route-manager.mjs +10 -10
  27. package/dist/api/runtime.cjs +11 -7
  28. package/dist/api/runtime.d.mts +7 -7
  29. package/dist/api/runtime.d.ts +7 -7
  30. package/dist/api/runtime.mjs +10 -6
  31. package/dist/{api-client.d-BNLXNCXJ.d.mts → api-client.d-Bp35zMqR.d.mts} +1 -1
  32. package/dist/{api-client.d-ddQBNGtu.d.ts → api-client.d-CFI_xL0V.d.ts} +1 -1
  33. package/dist/api.cjs +17 -13
  34. package/dist/api.d.mts +11 -10
  35. package/dist/api.d.ts +11 -10
  36. package/dist/api.mjs +16 -12
  37. package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-CRmjN5j9.d.mts} +1 -1
  38. package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-CwfhGrVR.d.ts} +1 -1
  39. package/dist/app-markdown.cjs +5 -5
  40. package/dist/app-markdown.d.mts +7 -7
  41. package/dist/app-markdown.d.ts +7 -7
  42. package/dist/app-markdown.mjs +4 -4
  43. package/dist/{app.d-x68Cwr0_.d.ts → app.d-BX9LVTiP.d.ts} +50 -9
  44. package/dist/{app.d-kuoVWhWM.d.mts → app.d-uBBUxwyV.d.mts} +50 -9
  45. package/dist/{chunk-V56632LA.cjs → chunk-22IWL4YD.cjs} +19 -5
  46. package/dist/{chunk-CZF4XIRZ.cjs → chunk-23PVOIPT.cjs} +3 -3
  47. package/dist/{chunk-5C7XMKQ4.cjs → chunk-2AFW7673.cjs} +6 -1
  48. package/dist/{chunk-SYW346ZN.cjs → chunk-2LHZD3OP.cjs} +1 -21
  49. package/dist/{chunk-ZZI56IUY.mjs → chunk-2ZOYOYEE.mjs} +13 -13
  50. package/dist/{chunk-RVGSVQWT.mjs → chunk-3T5TLFCQ.mjs} +10 -5
  51. package/dist/{chunk-XBSKPLHF.cjs → chunk-3T7ALZJF.cjs} +2 -2
  52. package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
  53. package/dist/{chunk-7QVRWGBL.cjs → chunk-4DRINDGN.cjs} +319 -138
  54. package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
  55. package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
  56. package/dist/{chunk-JGAE5XPL.cjs → chunk-4JX3M4C6.cjs} +2 -1
  57. package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
  58. package/dist/{chunk-IMK32ERL.cjs → chunk-556H7JCE.cjs} +65 -48
  59. package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
  60. package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
  61. package/dist/{chunk-TZVUF5JJ.mjs → chunk-5TA63JD3.mjs} +4 -4
  62. package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
  63. package/dist/chunk-6I4BFRE7.cjs +51 -0
  64. package/dist/{chunk-OSFIUSYK.cjs → chunk-6R53ZWX2.cjs} +7 -7
  65. package/dist/{chunk-MGKW5XZE.cjs → chunk-6SQZXRJ2.cjs} +7 -7
  66. package/dist/{chunk-WNXVWXG3.cjs → chunk-6V5YWI4W.cjs} +2 -2
  67. package/dist/{chunk-BM2LH2JM.mjs → chunk-6YBYX4K4.mjs} +13 -12
  68. package/dist/{chunk-X3XUZWRB.mjs → chunk-724MGMIL.mjs} +17 -3
  69. package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
  70. package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
  71. package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
  72. package/dist/{chunk-TGULJSHD.mjs → chunk-AJNBTOVQ.mjs} +20 -9
  73. package/dist/{chunk-FBEBSAVI.cjs → chunk-AKIQ54FK.cjs} +82 -63
  74. package/dist/{chunk-2NGZFOKG.mjs → chunk-AOIUYHPH.mjs} +2 -2
  75. package/dist/{chunk-ZEXE4TGY.mjs → chunk-AQDLVHNF.mjs} +230 -110
  76. package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
  77. package/dist/chunk-AQIRXBBY.cjs +26 -0
  78. package/dist/chunk-AZ6IW6SF.mjs +28 -0
  79. package/dist/{chunk-QMDU6QHN.mjs → chunk-B6RBJJ5G.mjs} +1 -1
  80. package/dist/{chunk-I32V5CZL.cjs → chunk-BDYM2TN3.cjs} +28 -17
  81. package/dist/{chunk-JLDNXURZ.cjs → chunk-BZWTBELF.cjs} +32 -32
  82. package/dist/{chunk-ITV4QQL2.cjs → chunk-C6CUUBY5.cjs} +14 -3
  83. package/dist/{chunk-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
  84. package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
  85. package/dist/{chunk-ZX2JHEWW.mjs → chunk-CO3YMZFD.mjs} +20 -9
  86. package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
  87. package/dist/{chunk-CNNBFGL5.cjs → chunk-DB2HSHQA.cjs} +14 -14
  88. package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
  89. package/dist/{chunk-32RPJAAS.cjs → chunk-DCXSIEFE.cjs} +40 -41
  90. package/dist/{chunk-D4MRNBVF.cjs → chunk-DGOFR7D5.cjs} +2 -2
  91. package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
  92. package/dist/chunk-DXZ57EPE.mjs +375 -0
  93. package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
  94. package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
  95. package/dist/{chunk-HKNYNSOK.mjs → chunk-E6CD45JK.mjs} +30 -31
  96. package/dist/{chunk-752XUZIM.cjs → chunk-EGIY4A7V.cjs} +6 -6
  97. package/dist/chunk-EIVGPQN5.mjs +51 -0
  98. package/dist/{chunk-KPAJWD3N.mjs → chunk-EYPSKXO4.mjs} +1 -1
  99. package/dist/{chunk-E552H232.cjs → chunk-F43OG25P.cjs} +1 -1
  100. package/dist/{chunk-UAQD67HM.mjs → chunk-F7JKVHU2.mjs} +1 -1
  101. package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
  102. package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
  103. package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
  104. package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
  105. package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
  106. package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
  107. package/dist/{chunk-ZAUOOGER.mjs → chunk-GTV2ABO7.mjs} +218 -37
  108. package/dist/{chunk-72JSHQQQ.mjs → chunk-H37MDCPR.mjs} +1 -1
  109. package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
  110. package/dist/{chunk-25T5VXOE.mjs → chunk-HFHJJXSV.mjs} +106 -19
  111. package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
  112. package/dist/{chunk-A3G5IY2W.cjs → chunk-HM7AGSKU.cjs} +1 -1
  113. package/dist/{chunk-GL7N5UHF.cjs → chunk-HNVAZGQD.cjs} +20 -9
  114. package/dist/{chunk-GRBJ7VKH.mjs → chunk-HP2DQGQH.mjs} +1 -1
  115. package/dist/{chunk-E2TSYUHV.mjs → chunk-HRPTMX5C.mjs} +4 -4
  116. package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
  117. package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
  118. package/dist/{chunk-VQJHT2ND.mjs → chunk-IRA2CZAY.mjs} +2 -2
  119. package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
  120. package/dist/chunk-J6TZRYCO.cjs +22 -0
  121. package/dist/{chunk-WYAXRIYP.cjs → chunk-J7JHVCWA.cjs} +8 -8
  122. package/dist/chunk-JSOCDYER.cjs +375 -0
  123. package/dist/{chunk-YUW7F6SK.mjs → chunk-JVM3DKZE.mjs} +3 -3
  124. package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
  125. package/dist/{chunk-BQWBHWEW.mjs → chunk-JWSI5WO4.mjs} +1 -1
  126. package/dist/{chunk-OLGQZRW6.mjs → chunk-JZBU7V4D.mjs} +37 -17
  127. package/dist/{chunk-ONG4RDW3.mjs → chunk-JZGL2PIH.mjs} +13 -3
  128. package/dist/chunk-K63OWRY2.mjs +22 -0
  129. package/dist/{chunk-TUPKMMXT.mjs → chunk-K6HIIWUB.mjs} +1 -1
  130. package/dist/{chunk-MESQF2JC.mjs → chunk-K6SXMVXO.mjs} +2 -2
  131. package/dist/{chunk-L2JG337G.cjs → chunk-K6VFYFOY.cjs} +33 -31
  132. package/dist/{chunk-3CCAICF7.cjs → chunk-KCY52OUQ.cjs} +4 -4
  133. package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
  134. package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
  135. package/dist/{chunk-RFKTJTWZ.mjs → chunk-KWFNUODD.mjs} +2 -1
  136. package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
  137. package/dist/{chunk-C7DCMGC4.cjs → chunk-LPIZMU7D.cjs} +12 -12
  138. package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
  139. package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
  140. package/dist/{chunk-3KJPIO5D.cjs → chunk-N5DQMOAG.cjs} +589 -678
  141. package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
  142. package/dist/{chunk-CBOEJ5Z4.cjs → chunk-OB3IFUK6.cjs} +133 -46
  143. package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
  144. package/dist/{chunk-SYXPWJ7N.cjs → chunk-OFBLGH6V.cjs} +17 -18
  145. package/dist/{chunk-VQ4NWOWO.mjs → chunk-OGVTUGMU.mjs} +5 -13
  146. package/dist/{chunk-3UZVPO72.mjs → chunk-OIOPQ25L.mjs} +6 -7
  147. package/dist/{chunk-2XGBJSDV.cjs → chunk-OO7DYIJD.cjs} +73 -24
  148. package/dist/{chunk-IP2KHSGF.mjs → chunk-P2NBQ5JI.mjs} +57 -4
  149. package/dist/{chunk-ZQQK4U66.cjs → chunk-PDFFYZAT.cjs} +72 -19
  150. package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
  151. package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
  152. package/dist/{chunk-YD4J37RN.cjs → chunk-PL6RTBDE.cjs} +30 -19
  153. package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
  154. package/dist/{chunk-WMTBBQHY.cjs → chunk-PPX7UOFY.cjs} +271 -151
  155. package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
  156. package/dist/{chunk-7XGWBPQQ.cjs → chunk-Q37INCXG.cjs} +13 -8
  157. package/dist/{chunk-T4M52BA5.cjs → chunk-Q5UX55YA.cjs} +1457 -612
  158. package/dist/{chunk-53ZCZ46B.cjs → chunk-QGQP6QKO.cjs} +4 -3
  159. package/dist/{chunk-TZOGZKI7.cjs → chunk-QITSS4TD.cjs} +1381 -626
  160. package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
  161. package/dist/{chunk-HCGWDRZO.mjs → chunk-QJVW76JG.mjs} +17 -6
  162. package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
  163. package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +1 -1
  164. package/dist/chunk-RWR7SMD7.cjs +50 -0
  165. package/dist/{chunk-7PTISZSQ.cjs → chunk-S7MWSFFP.cjs} +4 -0
  166. package/dist/chunk-SD6JGJOM.mjs +50 -0
  167. package/dist/{chunk-7H4SVNC4.cjs → chunk-SPP3EZTJ.cjs} +46 -26
  168. package/dist/{chunk-E4RDMG3K.mjs → chunk-TEG6HJVF.mjs} +4 -4
  169. package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
  170. package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
  171. package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
  172. package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
  173. package/dist/{chunk-W2ZXMMHA.mjs → chunk-UHE5JUKB.mjs} +1 -1
  174. package/dist/{chunk-6X5NKNBE.mjs → chunk-UHNSY2PQ.mjs} +1304 -459
  175. package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
  176. package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
  177. package/dist/{chunk-Q75QPLBA.mjs → chunk-V5MQMQ2P.mjs} +1 -1
  178. package/dist/{chunk-TRIDJQ6A.cjs → chunk-V5RTHYJB.cjs} +30 -10
  179. package/dist/{chunk-QHRCR44V.mjs → chunk-VK54PDQ6.mjs} +25 -5
  180. package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
  181. package/dist/{chunk-2L54YV25.mjs → chunk-WDD5CTZW.mjs} +49 -32
  182. package/dist/{chunk-7GYCZRTH.mjs → chunk-WGHY3OL5.mjs} +355 -444
  183. package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
  184. package/dist/{chunk-3EEET2Q5.cjs → chunk-WUTFJOV7.cjs} +32 -12
  185. package/dist/chunk-WVQNXXNE.cjs +28 -0
  186. package/dist/{chunk-Y5TOT5F6.cjs → chunk-X3MHKLCO.cjs} +5 -5
  187. package/dist/{chunk-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
  188. package/dist/{chunk-VHHLKIDZ.mjs → chunk-XNZWMXCF.mjs} +1090 -335
  189. package/dist/{chunk-FIR62CR3.mjs → chunk-XUES6OET.mjs} +1 -1
  190. package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
  191. package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
  192. package/dist/{chunk-BT4SEFLC.cjs → chunk-YAEN3L2F.cjs} +3 -2
  193. package/dist/chunk-YFTGIHNC.mjs +26 -0
  194. package/dist/{chunk-KL7SHLQB.mjs → chunk-YGJ5P3TJ.mjs} +31 -1
  195. package/dist/{chunk-UYRI6U3P.mjs → chunk-YQYTQJZN.mjs} +3 -2
  196. package/dist/{chunk-X4K7TYN6.cjs → chunk-YVTS3S3F.cjs} +24 -23
  197. package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
  198. package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
  199. package/dist/client/lifecycle.cjs +2 -2
  200. package/dist/client/lifecycle.d.mts +1 -1
  201. package/dist/client/lifecycle.d.ts +1 -1
  202. package/dist/client/lifecycle.mjs +1 -1
  203. package/dist/{client-component.d-D74pqdea.d.mts → client-component.d-CDRvRmbU.d.mts} +2 -2
  204. package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DWRKyAp5.d.ts} +2 -2
  205. package/dist/client-plugins.cjs +2 -2
  206. package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-BNILjfX3.d.mts} +94 -140
  207. package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CrKZiNSN.d.ts} +94 -140
  208. package/dist/client-plugins.d.mts +6 -6
  209. package/dist/client-plugins.d.ts +6 -6
  210. package/dist/client-plugins.mjs +1 -1
  211. package/dist/client.cjs +11 -9
  212. package/dist/client.d.mts +13 -13
  213. package/dist/client.d.ts +13 -13
  214. package/dist/client.mjs +10 -8
  215. package/dist/{config.d-qt-mE8O5.d.mts → config.d-BKIhJtmr.d.mts} +7 -2
  216. package/dist/{config.d-qt-mE8O5.d.ts → config.d-BKIhJtmr.d.ts} +7 -2
  217. package/dist/config.d.mts +6 -6
  218. package/dist/config.d.ts +6 -6
  219. package/dist/cron.cjs +2 -2
  220. package/dist/cron.mjs +1 -1
  221. package/dist/deferred.cjs +2 -2
  222. package/dist/deferred.mjs +1 -1
  223. package/dist/deployment.cjs +2 -2
  224. package/dist/deployment.mjs +1 -1
  225. package/dist/desktop.d.mts +7 -7
  226. package/dist/desktop.d.ts +7 -7
  227. package/dist/{devtools-SGYOG36E.cjs → devtools-RZVT4JVN.cjs} +36 -32
  228. package/dist/{devtools-PUVZB3F2.mjs → devtools-UFQYT3VA.mjs} +31 -27
  229. package/dist/docs.cjs +26 -25
  230. package/dist/docs.d.mts +20 -8
  231. package/dist/docs.d.ts +20 -8
  232. package/dist/docs.mjs +25 -24
  233. package/dist/env-types.cjs +3 -3
  234. package/dist/env-types.mjs +2 -2
  235. package/dist/environment/vite.cjs +5 -5
  236. package/dist/environment/vite.mjs +4 -4
  237. package/dist/headers.cjs +3 -3
  238. package/dist/headers.mjs +2 -2
  239. package/dist/image/server.d.mts +1 -1
  240. package/dist/image/server.d.ts +1 -1
  241. package/dist/image/sharp.d.mts +1 -1
  242. package/dist/image/sharp.d.ts +1 -1
  243. package/dist/{image-config.d-CeDgNyX4.d.mts → image-config.d-ByhQ0TT7.d.mts} +3 -1
  244. package/dist/{image-config.d-CeDgNyX4.d.ts → image-config.d-ByhQ0TT7.d.ts} +3 -1
  245. package/dist/image.cjs +6 -6
  246. package/dist/image.d.mts +1 -1
  247. package/dist/image.d.ts +1 -1
  248. package/dist/image.mjs +1 -1
  249. package/dist/index.cjs +143 -128
  250. package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bdm6866n.d.mts} +1 -1
  251. package/dist/{index.d-A_x10zGS.d.ts → index.d-Dey5T14f.d.ts} +1 -1
  252. package/dist/index.d.mts +31 -82
  253. package/dist/index.d.ts +31 -82
  254. package/dist/index.mjs +214 -199
  255. package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
  256. package/dist/integrations/orm.d.mts +33 -0
  257. package/dist/integrations/orm.d.ts +33 -0
  258. package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
  259. package/dist/integrations.cjs +6 -5
  260. package/dist/integrations.d.mts +6 -6
  261. package/dist/integrations.d.ts +6 -6
  262. package/dist/integrations.mjs +5 -4
  263. package/dist/internal/app-markdown-runtime.cjs +4 -4
  264. package/dist/internal/app-markdown-runtime.d.mts +17 -8
  265. package/dist/internal/app-markdown-runtime.d.ts +17 -8
  266. package/dist/internal/app-markdown-runtime.mjs +3 -3
  267. package/dist/internal/build-runtime.cjs +70 -68
  268. package/dist/internal/build-runtime.d.mts +8 -8
  269. package/dist/internal/build-runtime.d.ts +8 -8
  270. package/dist/internal/build-runtime.mjs +69 -67
  271. package/dist/internal/cli-runtime.cjs +45 -44
  272. package/dist/internal/cli-runtime.mjs +44 -43
  273. package/dist/internal/client-error-overlay.cjs +6 -6
  274. package/dist/internal/client-error-overlay.mjs +2 -2
  275. package/dist/internal/client-runtime.cjs +60 -6
  276. package/dist/internal/client-runtime.d.mts +40 -11
  277. package/dist/internal/client-runtime.d.ts +40 -11
  278. package/dist/internal/client-runtime.mjs +58 -4
  279. package/dist/internal/compression-runtime.d.mts +6 -6
  280. package/dist/internal/compression-runtime.d.ts +6 -6
  281. package/dist/internal/config-runtime.cjs +25 -24
  282. package/dist/internal/config-runtime.d.mts +9 -9
  283. package/dist/internal/config-runtime.d.ts +9 -9
  284. package/dist/internal/config-runtime.mjs +24 -23
  285. package/dist/internal/docs-precompiled-runtime.cjs +16 -5
  286. package/dist/internal/docs-precompiled-runtime.d.mts +7 -0
  287. package/dist/internal/docs-precompiled-runtime.d.ts +7 -0
  288. package/dist/internal/docs-precompiled-runtime.mjs +15 -4
  289. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  290. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  291. package/dist/internal/islands-runtime.cjs +33 -4
  292. package/dist/internal/islands-runtime.d.mts +1 -1
  293. package/dist/internal/islands-runtime.d.ts +1 -1
  294. package/dist/internal/islands-runtime.mjs +31 -2
  295. package/dist/internal/native-server-fns.cjs +6 -6
  296. package/dist/internal/native-server-fns.mjs +5 -5
  297. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  298. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  299. package/dist/internal/production-runtime.cjs +54 -40
  300. package/dist/internal/production-runtime.d.mts +23 -15
  301. package/dist/internal/production-runtime.d.ts +23 -15
  302. package/dist/internal/production-runtime.mjs +69 -55
  303. package/dist/internal/react-cache.cjs +3 -3
  304. package/dist/internal/react-cache.mjs +1 -1
  305. package/dist/{lifecycle.d-C2aLBOwu.d.ts → lifecycle.d-keQs5Swc.d.mts} +7 -1
  306. package/dist/{lifecycle.d-C2aLBOwu.d.mts → lifecycle.d-keQs5Swc.d.ts} +7 -1
  307. package/dist/{manager-H5ZM3HAM.mjs → manager-JIA66YJ2.mjs} +4 -3
  308. package/dist/manager-JOHU6BQI.cjs +15 -0
  309. package/dist/markdown.cjs +7 -3
  310. package/dist/markdown.d.mts +6 -6
  311. package/dist/markdown.d.ts +6 -6
  312. package/dist/markdown.mjs +6 -2
  313. package/dist/middleware.cjs +10 -10
  314. package/dist/middleware.d.mts +8 -8
  315. package/dist/middleware.d.ts +8 -8
  316. package/dist/middleware.mjs +9 -9
  317. package/dist/mobile.d.mts +4 -4
  318. package/dist/mobile.d.ts +4 -4
  319. package/dist/mount.d-BP0nLYQO.d.mts +38 -0
  320. package/dist/mount.d-CkiPky_F.d.ts +38 -0
  321. package/dist/{native-server-fn-handler-GLRHAYWV.mjs → native-server-fn-handler-EP5AFJYE.mjs} +5 -5
  322. package/dist/{native-server-fn-handler-J5MYRXN6.cjs → native-server-fn-handler-QRTXGZA4.cjs} +6 -6
  323. package/dist/{native-tree-HE2FLS72.cjs → native-tree-W2SSJB3Y.cjs} +5 -5
  324. package/dist/{native-tree-YF2DSPKM.mjs → native-tree-Y5YQANW7.mjs} +4 -4
  325. package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-CdBP-hkZ.d.mts} +1 -1
  326. package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-DchcGzAQ.d.ts} +1 -1
  327. package/dist/navigation.cjs +8 -7
  328. package/dist/navigation.d.mts +9 -9
  329. package/dist/navigation.d.ts +9 -9
  330. package/dist/navigation.mjs +7 -6
  331. package/dist/{nitro-DD4QCA66.mjs → nitro-55YOZWRA.mjs} +11 -11
  332. package/dist/{nitro-VRDX2H4M.cjs → nitro-EEX2J3KB.cjs} +13 -13
  333. package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
  334. package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
  335. package/dist/plugin.cjs +61 -59
  336. package/dist/plugin.d.mts +8 -8
  337. package/dist/plugin.d.ts +8 -8
  338. package/dist/plugin.mjs +60 -58
  339. package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
  340. package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
  341. package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-Dou_Htas.d.ts} +1 -1
  342. package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-VwsBzIee.d.mts} +1 -1
  343. package/dist/query/client.cjs +9 -7
  344. package/dist/query/client.mjs +5 -3
  345. package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-D8UakAIk.d.ts} +1 -1
  346. package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-LKymStDJ.d.mts} +1 -1
  347. package/dist/renderer/none/server.cjs +35 -0
  348. package/dist/renderer/none/server.d.mts +21 -0
  349. package/dist/renderer/none/server.d.ts +21 -0
  350. package/dist/renderer/none/server.mjs +35 -0
  351. package/dist/renderer/react/server.cjs +2 -2
  352. package/dist/renderer/react/server.mjs +3 -3
  353. package/dist/renderer-client.cjs +8 -6
  354. package/dist/renderer-client.d.mts +9 -9
  355. package/dist/renderer-client.d.ts +9 -9
  356. package/dist/renderer-client.mjs +5 -3
  357. package/dist/renderer.cjs +6 -2
  358. package/dist/renderer.d.mts +20 -2
  359. package/dist/renderer.d.ts +20 -2
  360. package/dist/renderer.mjs +5 -1
  361. package/dist/request.cjs +2 -2
  362. package/dist/{request.d-B1RnTLri.d.ts → request.d-B928QjWy.d.ts} +1 -1
  363. package/dist/{request.d-DarDOCk9.d.mts → request.d-KG-4d2eG.d.mts} +1 -1
  364. package/dist/request.d.mts +7 -7
  365. package/dist/request.d.ts +7 -7
  366. package/dist/request.mjs +1 -1
  367. package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-DoEe_w9t.d.ts} +1 -1
  368. package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-NIHQeb4m.d.mts} +1 -1
  369. package/dist/{route.d-BaVH3V0w.d.mts → route.d-DrXkpvcg.d.mts} +1 -1
  370. package/dist/{route.d-DBTEqifW.d.ts → route.d-hs-_cyHn.d.ts} +1 -1
  371. package/dist/{router.d-Cuv1jntg.d.mts → router.d-B8PkJSGp.d.mts} +1 -1
  372. package/dist/{router.d-CMANF6da.d.ts → router.d-DYnRHQwz.d.ts} +1 -1
  373. package/dist/routes.cjs +3 -3
  374. package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-DgZ_jgGG.d.mts} +1 -1
  375. package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-uUBZyWoK.d.ts} +1 -1
  376. package/dist/routes.d.mts +6 -6
  377. package/dist/routes.d.ts +6 -6
  378. package/dist/routes.mjs +2 -2
  379. package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-4OJ5ZQNZ.mjs} +26 -25
  380. package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-7K5H2RPH.cjs} +27 -26
  381. package/dist/{runtime-LRIQ3XH7.mjs → runtime-U7O3HZOZ.mjs} +62 -36
  382. package/dist/{runtime-5AROV2C3.cjs → runtime-X52Q7JFR.cjs} +72 -46
  383. package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-BxQIzwfy.d.mts} +11 -3
  384. package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-DP7mEkEF.d.ts} +11 -3
  385. package/dist/{schema-dev-notice-JMXEQWIQ.mjs → schema-dev-notice-C2JINRZI.mjs} +3 -2
  386. package/dist/{schema-dev-notice-PLBFDTOF.cjs → schema-dev-notice-X7GG7QVB.cjs} +5 -4
  387. package/dist/schema.cjs +6 -2
  388. package/dist/schema.d-Dny9pnrm.d.mts +298 -0
  389. package/dist/schema.d-Dny9pnrm.d.ts +298 -0
  390. package/dist/schema.d.mts +1 -115
  391. package/dist/schema.d.ts +1 -115
  392. package/dist/schema.mjs +5 -1
  393. package/dist/server-fn-client.d.mts +2 -2
  394. package/dist/server-fn-client.d.ts +2 -2
  395. package/dist/server-fn.cjs +5 -5
  396. package/dist/server-fn.mjs +4 -4
  397. package/dist/server-plugins.cjs +7 -7
  398. package/dist/server-plugins.d.mts +16 -10
  399. package/dist/server-plugins.d.ts +16 -10
  400. package/dist/server-plugins.mjs +8 -8
  401. package/dist/server-query.cjs +6 -6
  402. package/dist/server-query.mjs +5 -5
  403. package/dist/server.cjs +160 -120
  404. package/dist/server.d.mts +20 -14
  405. package/dist/server.d.ts +20 -14
  406. package/dist/server.mjs +138 -98
  407. package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-BgHPVMhz.d.mts} +15 -5
  408. package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-DsFDHTsv.d.ts} +15 -5
  409. package/dist/testing.cjs +17 -17
  410. package/dist/testing.d.mts +6 -6
  411. package/dist/testing.d.ts +6 -6
  412. package/dist/testing.mjs +13 -13
  413. package/dist/theme/server.cjs +3 -3
  414. package/dist/theme/server.mjs +2 -2
  415. package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-BKyKDBR1.d.mts} +1 -1
  416. package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-zxAVcf_V.d.ts} +1 -1
  417. package/dist/version.cjs +2 -2
  418. package/dist/version.mjs +1 -1
  419. package/dist/vite.cjs +63 -61
  420. package/dist/vite.d.mts +32 -12
  421. package/dist/vite.d.ts +32 -12
  422. package/dist/vite.mjs +62 -60
  423. package/dist/workflows.cjs +4 -4
  424. package/dist/workflows.mjs +3 -3
  425. package/package.json +31 -1
  426. package/dist/analyzer-GHWK46LX.cjs +0 -16
  427. package/dist/chunk-5YPBFMBN.cjs +0 -19
  428. package/dist/chunk-OM7WILES.mjs +0 -100
  429. package/dist/chunk-Q5B4LNON.mjs +0 -19
  430. package/dist/chunk-QPJ4MZTO.mjs +0 -60
  431. package/dist/chunk-R53QDV6T.cjs +0 -100
  432. package/dist/chunk-UYTAP4FQ.cjs +0 -60
  433. package/dist/manager-2LUKNX2N.cjs +0 -14
  434. /package/dist/{chunk-QGOZLGVP.mjs → chunk-I6FIAWNT.mjs} +0 -0
  435. /package/dist/{chunk-XPIPMWY3.cjs → chunk-K5NI5YQR.cjs} +0 -0
  436. /package/dist/{chunk-NWUHS6GV.cjs → chunk-QEJWNXRI.cjs} +0 -0
  437. /package/dist/{chunk-FSXSQQTV.mjs → chunk-TXE4SAMV.mjs} +0 -0
  438. /package/dist/{chunk-ZXK2EYQW.cjs → chunk-UUQNJDGH.cjs} +0 -0
  439. /package/dist/{chunk-46P5KNTE.mjs → chunk-VZBAW44S.mjs} +0 -0
@@ -1,4 +1,49 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/client/plugin.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/client/route-announcer.ts
2
+ var FARM_ROUTE_ANNOUNCER_ID = "farm-route-announcer";
3
+ var FARM_ROUTE_ANNOUNCEMENT_DELAY_MS = 60;
4
+ var VISUALLY_HIDDEN = "position:absolute;top:0;left:0;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap";
5
+ function readFarmRouteAnnouncement(target) {
6
+ const document = target.document;
7
+ const heading = document.querySelector("h1");
8
+ return document.title.trim() || (_optionalChain([heading, 'optionalAccess', _ => _.innerText]) || _optionalChain([heading, 'optionalAccess', _2 => _2.textContent]) || "").trim() || target.location.pathname;
9
+ }
10
+ function getAnnouncerRegion(document) {
11
+ let region = document.getElementById(FARM_ROUTE_ANNOUNCER_ID);
12
+ if (!region) {
13
+ region = document.createElement("div");
14
+ region.id = FARM_ROUTE_ANNOUNCER_ID;
15
+ region.setAttribute("aria-live", "assertive");
16
+ region.setAttribute("aria-atomic", "true");
17
+ region.style.cssText = VISUALLY_HIDDEN;
18
+ document.body.appendChild(region);
19
+ }
20
+ return region;
21
+ }
22
+ function createFarmRouteAnnouncer(target = typeof window === "undefined" ? void 0 : window) {
23
+ if (!_optionalChain([target, 'optionalAccess', _3 => _3.document])) return () => {
24
+ };
25
+ let pathname = target.location.pathname;
26
+ let title = target.document.title;
27
+ let timer;
28
+ return () => {
29
+ const document = target.document;
30
+ if (!document.body) return;
31
+ const nextPathname = target.location.pathname;
32
+ const nextTitle = document.title;
33
+ if (nextPathname === pathname && nextTitle === title) return;
34
+ pathname = nextPathname;
35
+ title = nextTitle;
36
+ const message = readFarmRouteAnnouncement(target);
37
+ const region = getAnnouncerRegion(document);
38
+ region.textContent = "";
39
+ clearTimeout(timer);
40
+ timer = setTimeout(() => {
41
+ region.textContent = message;
42
+ }, FARM_ROUTE_ANNOUNCEMENT_DELAY_MS);
43
+ };
44
+ }
45
+
46
+ // src/client/plugin.ts
2
47
  function defineClient(definition) {
3
48
  return definition;
4
49
  }
@@ -42,6 +87,8 @@ var FarmClientPluginManager = class {
42
87
  isProd: _nullishCoalesce(options.isProd, () => ( !options.isDev)),
43
88
  window: _nullishCoalesce(options.window, () => ( (typeof window !== "undefined" ? window : void 0)))
44
89
  };
90
+ this.announceRoute = options.announceRoutes === false ? () => {
91
+ } : createFarmRouteAnnouncer(this.options.window);
45
92
  }
46
93
  start() {
47
94
  if (this.startPromise) return this.startPromise;
@@ -57,7 +104,7 @@ var FarmClientPluginManager = class {
57
104
  };
58
105
  await this.runHook(
59
106
  "hydration.before",
60
- (instance) => _optionalChain([instance, 'access', _ => _.plugin, 'access', _2 => _2.hydration, 'optionalAccess', _3 => _3.before, 'optionalCall', _4 => _4({
107
+ (instance) => _optionalChain([instance, 'access', _4 => _4.plugin, 'access', _5 => _5.hydration, 'optionalAccess', _6 => _6.before, 'optionalCall', _7 => _7({
61
108
  ...this.createStateEvent(instance),
62
109
  ...session
63
110
  })])
@@ -67,7 +114,7 @@ var FarmClientPluginManager = class {
67
114
  async completeHydration(session, options = {}) {
68
115
  await this.runHook(
69
116
  "hydration.after",
70
- (instance) => _optionalChain([instance, 'access', _5 => _5.plugin, 'access', _6 => _6.hydration, 'optionalAccess', _7 => _7.after, 'optionalCall', _8 => _8({
117
+ (instance) => _optionalChain([instance, 'access', _8 => _8.plugin, 'access', _9 => _9.hydration, 'optionalAccess', _10 => _10.after, 'optionalCall', _11 => _11({
71
118
  ...this.createStateEvent(instance),
72
119
  ...session,
73
120
  durationMs: now() - session.startedAt,
@@ -80,7 +127,7 @@ var FarmClientPluginManager = class {
80
127
  }
81
128
  async beginNavigation(input) {
82
129
  await this.start();
83
- _optionalChain([this, 'access', _9 => _9.currentNavigation, 'optionalAccess', _10 => _10.controller, 'access', _11 => _11.abort, 'call', _12 => _12("superseded")]);
130
+ _optionalChain([this, 'access', _12 => _12.currentNavigation, 'optionalAccess', _13 => _13.controller, 'access', _14 => _14.abort, 'call', _15 => _15("superseded")]);
84
131
  const controller = new AbortController();
85
132
  const session = {
86
133
  id: `navigation:${++this.navigationSequence}`,
@@ -94,7 +141,7 @@ var FarmClientPluginManager = class {
94
141
  this.currentNavigation = { controller, session };
95
142
  await this.runHook(
96
143
  "navigation.before",
97
- (instance) => _optionalChain([instance, 'access', _13 => _13.plugin, 'access', _14 => _14.navigation, 'optionalAccess', _15 => _15.before, 'optionalCall', _16 => _16({
144
+ (instance) => _optionalChain([instance, 'access', _16 => _16.plugin, 'access', _17 => _17.navigation, 'optionalAccess', _18 => _18.before, 'optionalCall', _19 => _19({
98
145
  ...this.createStateEvent(instance),
99
146
  ...session
100
147
  })])
@@ -105,7 +152,7 @@ var FarmClientPluginManager = class {
105
152
  if (session.signal.aborted) return;
106
153
  await this.runHook(
107
154
  "navigation.loaded",
108
- (instance) => _optionalChain([instance, 'access', _17 => _17.plugin, 'access', _18 => _18.navigation, 'optionalAccess', _19 => _19.loaded, 'optionalCall', _20 => _20({
155
+ (instance) => _optionalChain([instance, 'access', _20 => _20.plugin, 'access', _21 => _21.navigation, 'optionalAccess', _22 => _22.loaded, 'optionalCall', _23 => _23({
109
156
  ...this.createStateEvent(instance),
110
157
  ...session,
111
158
  data,
@@ -123,7 +170,7 @@ var FarmClientPluginManager = class {
123
170
  if (session.signal.aborted) return;
124
171
  await this.runHook(
125
172
  "navigation.resolved",
126
- (instance) => _optionalChain([instance, 'access', _21 => _21.plugin, 'access', _22 => _22.navigation, 'optionalAccess', _23 => _23.resolved, 'optionalCall', _24 => _24({
173
+ (instance) => _optionalChain([instance, 'access', _24 => _24.plugin, 'access', _25 => _25.navigation, 'optionalAccess', _26 => _26.resolved, 'optionalCall', _27 => _27({
127
174
  ...this.createStateEvent(instance),
128
175
  ...session,
129
176
  durationMs: now() - session.startedAt
@@ -133,22 +180,23 @@ var FarmClientPluginManager = class {
133
180
  scheduleNavigationRendered(session) {
134
181
  if (session.signal.aborted) return Promise.resolve();
135
182
  const clientWindow = this.options.window;
136
- const schedule = _optionalChain([clientWindow, 'optionalAccess', _25 => _25.requestAnimationFrame]) ? (callback) => clientWindow.requestAnimationFrame(() => clientWindow.requestAnimationFrame(callback)) : (callback) => setTimeout(callback, 0);
183
+ const schedule = _optionalChain([clientWindow, 'optionalAccess', _28 => _28.requestAnimationFrame]) ? (callback) => clientWindow.requestAnimationFrame(() => clientWindow.requestAnimationFrame(callback)) : (callback) => setTimeout(callback, 0);
137
184
  return new Promise((resolve) => {
138
185
  schedule(() => {
139
186
  if (session.signal.aborted || this.closed) {
140
187
  resolve();
141
188
  return;
142
189
  }
190
+ this.announceRoute();
143
191
  void this.runHook(
144
192
  "navigation.rendered",
145
- (instance) => _optionalChain([instance, 'access', _26 => _26.plugin, 'access', _27 => _27.navigation, 'optionalAccess', _28 => _28.rendered, 'optionalCall', _29 => _29({
193
+ (instance) => _optionalChain([instance, 'access', _29 => _29.plugin, 'access', _30 => _30.navigation, 'optionalAccess', _31 => _31.rendered, 'optionalCall', _32 => _32({
146
194
  ...this.createStateEvent(instance),
147
195
  ...session,
148
196
  durationMs: now() - session.startedAt
149
197
  })])
150
198
  ).finally(() => {
151
- if (_optionalChain([this, 'access', _30 => _30.currentNavigation, 'optionalAccess', _31 => _31.session]) === session) {
199
+ if (_optionalChain([this, 'access', _33 => _33.currentNavigation, 'optionalAccess', _34 => _34.session]) === session) {
152
200
  this.currentNavigation = void 0;
153
201
  }
154
202
  resolve();
@@ -160,7 +208,7 @@ var FarmClientPluginManager = class {
160
208
  if (!session.signal.aborted) {
161
209
  await this.runHook(
162
210
  "navigation.error",
163
- (instance) => _optionalChain([instance, 'access', _32 => _32.plugin, 'access', _33 => _33.navigation, 'optionalAccess', _34 => _34.error, 'optionalCall', _35 => _35({
211
+ (instance) => _optionalChain([instance, 'access', _35 => _35.plugin, 'access', _36 => _36.navigation, 'optionalAccess', _37 => _37.error, 'optionalCall', _38 => _38({
164
212
  ...this.createStateEvent(instance),
165
213
  ...session,
166
214
  durationMs: now() - session.startedAt,
@@ -169,7 +217,7 @@ var FarmClientPluginManager = class {
169
217
  );
170
218
  await this.reportError(error, "navigation", session, session.to);
171
219
  }
172
- if (_optionalChain([this, 'access', _36 => _36.currentNavigation, 'optionalAccess', _37 => _37.session]) === session) {
220
+ if (_optionalChain([this, 'access', _39 => _39.currentNavigation, 'optionalAccess', _40 => _40.session]) === session) {
173
221
  this.currentNavigation = void 0;
174
222
  }
175
223
  }
@@ -219,7 +267,7 @@ var FarmClientPluginManager = class {
219
267
  plugin: definition,
220
268
  state: void 0
221
269
  };
222
- instance.state = await _optionalChain([definition, 'access', _38 => _38.setup, 'optionalCall', _39 => _39(this.createSetupEvent(instance))]);
270
+ instance.state = await _optionalChain([definition, 'access', _41 => _41.setup, 'optionalCall', _42 => _42(this.createSetupEvent(instance))]);
223
271
  this.instances.push(instance);
224
272
  } catch (error) {
225
273
  this.logHookError(registration.name, "setup", error);
@@ -258,7 +306,7 @@ var FarmClientPluginManager = class {
258
306
  for (const entry of list.getEntries()) {
259
307
  void this.runHook(
260
308
  "performance",
261
- (instance) => _optionalChain([instance, 'access', _40 => _40.plugin, 'access', _41 => _41.performance, 'optionalCall', _42 => _42({
309
+ (instance) => _optionalChain([instance, 'access', _43 => _43.plugin, 'access', _44 => _44.performance, 'optionalCall', _45 => _45({
262
310
  ...this.createStateEvent(instance),
263
311
  entry,
264
312
  location: this.getLocation()
@@ -277,18 +325,18 @@ var FarmClientPluginManager = class {
277
325
  if (this.closed) return;
278
326
  if (this.startPromise) await this.startPromise;
279
327
  this.closed = true;
280
- _optionalChain([this, 'access', _43 => _43.currentNavigation, 'optionalAccess', _44 => _44.controller, 'access', _45 => _45.abort, 'call', _46 => _46(reason)]);
328
+ _optionalChain([this, 'access', _46 => _46.currentNavigation, 'optionalAccess', _47 => _47.controller, 'access', _48 => _48.abort, 'call', _49 => _49(reason)]);
281
329
  this.currentNavigation = void 0;
282
330
  const clientWindow = this.options.window;
283
- _optionalChain([clientWindow, 'optionalAccess', _47 => _47.removeEventListener, 'call', _48 => _48("error", this.handleWindowError)]);
284
- _optionalChain([clientWindow, 'optionalAccess', _49 => _49.removeEventListener, 'call', _50 => _50("unhandledrejection", this.handleUnhandledRejection)]);
285
- _optionalChain([clientWindow, 'optionalAccess', _51 => _51.removeEventListener, 'call', _52 => _52("pagehide", this.handlePageHide)]);
331
+ _optionalChain([clientWindow, 'optionalAccess', _50 => _50.removeEventListener, 'call', _51 => _51("error", this.handleWindowError)]);
332
+ _optionalChain([clientWindow, 'optionalAccess', _52 => _52.removeEventListener, 'call', _53 => _53("unhandledrejection", this.handleUnhandledRejection)]);
333
+ _optionalChain([clientWindow, 'optionalAccess', _54 => _54.removeEventListener, 'call', _55 => _55("pagehide", this.handlePageHide)]);
286
334
  for (const observer of this.performanceObservers) observer.disconnect();
287
335
  this.performanceObservers.length = 0;
288
- _optionalChain([this, 'access', _53 => _53.runtimeErrorOverlay, 'optionalAccess', _54 => _54.destroy, 'call', _55 => _55()]);
336
+ _optionalChain([this, 'access', _56 => _56.runtimeErrorOverlay, 'optionalAccess', _57 => _57.destroy, 'call', _58 => _58()]);
289
337
  for (const instance of [...this.instances].reverse()) {
290
338
  try {
291
- await _optionalChain([instance, 'access', _56 => _56.plugin, 'access', _57 => _57.close, 'optionalCall', _58 => _58({
339
+ await _optionalChain([instance, 'access', _59 => _59.plugin, 'access', _60 => _60.close, 'optionalCall', _61 => _61({
292
340
  ...this.createStateEvent(instance),
293
341
  reason
294
342
  })]);
@@ -315,7 +363,7 @@ var FarmClientPluginManager = class {
315
363
  }
316
364
  }
317
365
  async runErrorHooks(event, excluded, sourceEvent) {
318
- _optionalChain([this, 'access', _59 => _59.runtimeErrorOverlay, 'optionalAccess', _60 => _60.show, 'call', _61 => _61(event.error, {
366
+ _optionalChain([this, 'access', _62 => _62.runtimeErrorOverlay, 'optionalAccess', _63 => _63.show, 'call', _64 => _64(event.error, {
319
367
  phase: event.phase,
320
368
  location: event.location,
321
369
  sourceEvent
@@ -352,11 +400,11 @@ var FarmClientPluginManager = class {
352
400
  };
353
401
  }
354
402
  getLocation() {
355
- const href = _nullishCoalesce(_optionalChain([this, 'access', _62 => _62.options, 'access', _63 => _63.window, 'optionalAccess', _64 => _64.location, 'access', _65 => _65.href]), () => ( "http://localhost/"));
403
+ const href = _nullishCoalesce(_optionalChain([this, 'access', _65 => _65.options, 'access', _66 => _66.window, 'optionalAccess', _67 => _67.location, 'access', _68 => _68.href]), () => ( "http://localhost/"));
356
404
  return toClientLocation(href, href);
357
405
  }
358
406
  getBaseUrl() {
359
- return _nullishCoalesce(_optionalChain([this, 'access', _66 => _66.options, 'access', _67 => _67.window, 'optionalAccess', _68 => _68.location, 'access', _69 => _69.href]), () => ( "http://localhost/"));
407
+ return _nullishCoalesce(_optionalChain([this, 'access', _69 => _69.options, 'access', _70 => _70.window, 'optionalAccess', _71 => _71.location, 'access', _72 => _72.href]), () => ( "http://localhost/"));
360
408
  }
361
409
  logHookError(name, hook, error) {
362
410
  console.error(`[Farm.js] Client plugin "${name}" failed in ${hook}:`, error);
@@ -405,4 +453,5 @@ function isObject(value) {
405
453
 
406
454
 
407
455
 
408
- exports.defineClient = defineClient; exports.FarmClientPluginManager = FarmClientPluginManager; exports.createClientPluginManager = createClientPluginManager;
456
+
457
+ exports.createFarmRouteAnnouncer = createFarmRouteAnnouncer; exports.defineClient = defineClient; exports.FarmClientPluginManager = FarmClientPluginManager; exports.createClientPluginManager = createClientPluginManager;
@@ -4,13 +4,13 @@ import {
4
4
  parseFarmNativeStylesheet,
5
5
  resolveFarmNativeClasses,
6
6
  resolveFarmNativeInlineStyle
7
- } from "./chunk-JCEFKP5M.mjs";
7
+ } from "./chunk-423SSBYQ.mjs";
8
8
  import {
9
9
  FARM_NATIVE_TREE_CONTENT_TYPE
10
10
  } from "./chunk-LLZSYFOM.mjs";
11
11
  import {
12
12
  _readFarmRenderedHtml
13
- } from "./chunk-K7OZAVOI.mjs";
13
+ } from "./chunk-IFR74W6S.mjs";
14
14
 
15
15
  // src/mobile/native-tree.ts
16
16
  var URLENCODED = "application/x-www-form-urlencoded";
@@ -26,12 +26,16 @@ var VOID_TAGS = new Set(
26
26
  "area base br col embed hr img input link meta source track wbr".split(" ")
27
27
  );
28
28
  var SKIPPED_TAGS = new Set("link meta template title".split(" "));
29
+ var TABLE_GROUP_TAGS = new Set("table thead tbody tfoot".split(" "));
30
+ var TABLE_CELL_TAGS = new Set("th td".split(" "));
29
31
  var INLINE_DEFAULTS = {
30
32
  strong: { fontWeight: 700 },
31
33
  b: { fontWeight: 700 },
32
34
  em: { fontStyle: "italic" },
33
35
  i: { fontStyle: "italic" },
34
- code: { fontFamily: "mono" }
36
+ code: { fontFamily: "mono" },
37
+ th: { fontWeight: 700, textAlign: "center" },
38
+ caption: { textAlign: "center" }
35
39
  };
36
40
  var ENTITIES = {
37
41
  amp: "&",
@@ -369,6 +373,52 @@ var Converter = class {
369
373
  else node.submit = this.submitter(element);
370
374
  return node;
371
375
  }
376
+ /**
377
+ * A table as native views: the table and its row groups are columns, a row is a row, and its
378
+ * cells share the row's width, `colspan` cells a wider share, so columns line up from row to row
379
+ * (as `table-layout: fixed` lays them out). A cell's content draws as any block content does.
380
+ */
381
+ tablePart(element, passed, box, boxDark, flex) {
382
+ const { tag } = element;
383
+ if (TABLE_CELL_TAGS.has(tag)) {
384
+ if (element.parent?.tag !== "tr") this.problem(`<${tag}> outside a row`);
385
+ const rowspan = Number(element.attributes.rowspan ?? 1);
386
+ if (rowspan !== 1) this.problem(`<${tag}> rowspan="${element.attributes.rowspan}"`);
387
+ const colspan = Number(element.attributes.colspan ?? 1);
388
+ const share = Number.isInteger(colspan) && colspan >= 1 ? colspan : 1;
389
+ const cell = box?.width !== void 0 ? { flexGrow: 0, flexShrink: 0, ...box } : { flexGrow: share, flexShrink: 1, flexBasis: 0, ...box };
390
+ const node2 = this.node("View", element, cell, boxDark);
391
+ const children2 = this.blocks(element.children, passed, flex);
392
+ if (children2.length > 0) node2.children = children2;
393
+ return node2;
394
+ }
395
+ const row = tag === "tr";
396
+ const node = this.node("View", element, row ? { ...box, flexDirection: "row" } : box, boxDark);
397
+ const children = [];
398
+ for (const child of element.children) {
399
+ if (typeof child === "string") {
400
+ if (child.trim()) this.problem(`text directly inside <${tag}>`);
401
+ continue;
402
+ }
403
+ if (child.tag === "colgroup" || child.tag === "col") {
404
+ for (const column of [child, ...child.children]) {
405
+ if (typeof column === "string") continue;
406
+ const { width, style, class: className } = column.attributes;
407
+ if (width || style || className) this.problem(`<${column.tag}> sets column styles`);
408
+ }
409
+ continue;
410
+ }
411
+ const allowed = row ? TABLE_CELL_TAGS.has(child.tag) : child.tag === "tr" || tag === "table" && (TABLE_GROUP_TAGS.has(child.tag) || child.tag === "caption");
412
+ if (!allowed && !SKIPPED_TAGS.has(child.tag)) {
413
+ this.problem(`<${child.tag}> inside <${tag}>`);
414
+ continue;
415
+ }
416
+ const part = this.element(child, passed);
417
+ if (part) children.push(part);
418
+ }
419
+ if (children.length > 0) node.children = children;
420
+ return node;
421
+ }
372
422
  element(element, inherited, flexItem = false) {
373
423
  if (SKIPPED_TAGS.has(element.tag)) return void 0;
374
424
  if (element.attributes.form !== void 0 && CONTROL_TAGS.has(element.tag)) {
@@ -408,7 +458,7 @@ var Converter = class {
408
458
  return node;
409
459
  }
410
460
  const textBox = flexItem && INLINE_TAGS.has(element.tag) && element.tag !== "a" && element.tag !== "br";
411
- if (BLOCK_TEXT_TAGS.has(element.tag) || textBox) {
461
+ if (BLOCK_TEXT_TAGS.has(element.tag) || element.tag === "caption" || textBox) {
412
462
  if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
413
463
  this.problem(`<${element.tag}> holds block elements`);
414
464
  }
@@ -507,6 +557,9 @@ var Converter = class {
507
557
  boxDark
508
558
  );
509
559
  }
560
+ if (TABLE_GROUP_TAGS.has(element.tag) || element.tag === "tr" || TABLE_CELL_TAGS.has(element.tag)) {
561
+ return this.tablePart(element, passed, box, boxDark, flex);
562
+ }
510
563
  if (VIEW_TAGS.has(element.tag)) {
511
564
  const node = this.node("View", element, box, boxDark);
512
565
  const children = this.blocks(element.children, passed, flex);
@@ -4,13 +4,13 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkV727H3RIcjs = require('./chunk-V727H3RI.cjs');
7
+ var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
8
8
 
9
9
 
10
10
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
11
11
 
12
12
 
13
- var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
13
+ var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
14
14
 
15
15
  // src/mobile/native-tree.ts
16
16
  var URLENCODED = "application/x-www-form-urlencoded";
@@ -26,12 +26,16 @@ var VOID_TAGS = new Set(
26
26
  "area base br col embed hr img input link meta source track wbr".split(" ")
27
27
  );
28
28
  var SKIPPED_TAGS = new Set("link meta template title".split(" "));
29
+ var TABLE_GROUP_TAGS = new Set("table thead tbody tfoot".split(" "));
30
+ var TABLE_CELL_TAGS = new Set("th td".split(" "));
29
31
  var INLINE_DEFAULTS = {
30
32
  strong: { fontWeight: 700 },
31
33
  b: { fontWeight: 700 },
32
34
  em: { fontStyle: "italic" },
33
35
  i: { fontStyle: "italic" },
34
- code: { fontFamily: "mono" }
36
+ code: { fontFamily: "mono" },
37
+ th: { fontWeight: 700, textAlign: "center" },
38
+ caption: { textAlign: "center" }
35
39
  };
36
40
  var ENTITIES = {
37
41
  amp: "&",
@@ -107,11 +111,11 @@ function find(element, test) {
107
111
  }
108
112
  function textOnly(style) {
109
113
  return Object.fromEntries(
110
- Object.entries(style).filter(([key]) => _chunkV727H3RIcjs.FARM_NATIVE_TEXT_KEYS.has(key))
114
+ Object.entries(style).filter(([key]) => _chunkCCAUIBIScjs.FARM_NATIVE_TEXT_KEYS.has(key))
111
115
  );
112
116
  }
113
117
  function withoutText(style) {
114
- const rest = Object.entries(style).filter(([key]) => !_chunkV727H3RIcjs.FARM_NATIVE_TEXT_KEYS.has(key));
118
+ const rest = Object.entries(style).filter(([key]) => !_chunkCCAUIBIScjs.FARM_NATIVE_TEXT_KEYS.has(key));
115
119
  return rest.length > 0 ? Object.fromEntries(rest) : void 0;
116
120
  }
117
121
  function settleLineHeight(style) {
@@ -157,8 +161,8 @@ var Converter = class {
157
161
  if (this.reporting && !this.unsupported.includes(message)) this.unsupported.push(message);
158
162
  }
159
163
  stylesOf(element) {
160
- const classes = _chunkV727H3RIcjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
161
- const cascade = this.sheets ? _chunkV727H3RIcjs.cascadeFarmNativeStylesheets.call(void 0, this.sheets, element) : void 0;
164
+ const classes = _chunkCCAUIBIScjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
165
+ const cascade = this.sheets ? _chunkCCAUIBIScjs.cascadeFarmNativeStylesheets.call(void 0, this.sheets, element) : void 0;
162
166
  for (const token of classes.unsupported) {
163
167
  if (!cascade || cascade.layered.includes(token.split(":").pop())) {
164
168
  this.problem(`<${element.tag}> class "${token}"`);
@@ -167,7 +171,7 @@ var Converter = class {
167
171
  for (const problem of _nullishCoalesce(_optionalChain([cascade, 'optionalAccess', _ => _.unsupported]), () => ( []))) {
168
172
  this.problem(`<${element.tag}> ${problem}`);
169
173
  }
170
- const inline = _chunkV727H3RIcjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")), this.vars);
174
+ const inline = _chunkCCAUIBIScjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")), this.vars);
171
175
  for (const declaration of inline.unsupported) {
172
176
  this.problem(`<${element.tag}> style "${declaration}"`);
173
177
  }
@@ -369,12 +373,58 @@ var Converter = class {
369
373
  else node.submit = this.submitter(element);
370
374
  return node;
371
375
  }
376
+ /**
377
+ * A table as native views: the table and its row groups are columns, a row is a row, and its
378
+ * cells share the row's width, `colspan` cells a wider share, so columns line up from row to row
379
+ * (as `table-layout: fixed` lays them out). A cell's content draws as any block content does.
380
+ */
381
+ tablePart(element, passed, box, boxDark, flex) {
382
+ const { tag } = element;
383
+ if (TABLE_CELL_TAGS.has(tag)) {
384
+ if (_optionalChain([element, 'access', _18 => _18.parent, 'optionalAccess', _19 => _19.tag]) !== "tr") this.problem(`<${tag}> outside a row`);
385
+ const rowspan = Number(_nullishCoalesce(element.attributes.rowspan, () => ( 1)));
386
+ if (rowspan !== 1) this.problem(`<${tag}> rowspan="${element.attributes.rowspan}"`);
387
+ const colspan = Number(_nullishCoalesce(element.attributes.colspan, () => ( 1)));
388
+ const share = Number.isInteger(colspan) && colspan >= 1 ? colspan : 1;
389
+ const cell = _optionalChain([box, 'optionalAccess', _20 => _20.width]) !== void 0 ? { flexGrow: 0, flexShrink: 0, ...box } : { flexGrow: share, flexShrink: 1, flexBasis: 0, ...box };
390
+ const node2 = this.node("View", element, cell, boxDark);
391
+ const children2 = this.blocks(element.children, passed, flex);
392
+ if (children2.length > 0) node2.children = children2;
393
+ return node2;
394
+ }
395
+ const row = tag === "tr";
396
+ const node = this.node("View", element, row ? { ...box, flexDirection: "row" } : box, boxDark);
397
+ const children = [];
398
+ for (const child of element.children) {
399
+ if (typeof child === "string") {
400
+ if (child.trim()) this.problem(`text directly inside <${tag}>`);
401
+ continue;
402
+ }
403
+ if (child.tag === "colgroup" || child.tag === "col") {
404
+ for (const column of [child, ...child.children]) {
405
+ if (typeof column === "string") continue;
406
+ const { width, style, class: className } = column.attributes;
407
+ if (width || style || className) this.problem(`<${column.tag}> sets column styles`);
408
+ }
409
+ continue;
410
+ }
411
+ const allowed = row ? TABLE_CELL_TAGS.has(child.tag) : child.tag === "tr" || tag === "table" && (TABLE_GROUP_TAGS.has(child.tag) || child.tag === "caption");
412
+ if (!allowed && !SKIPPED_TAGS.has(child.tag)) {
413
+ this.problem(`<${child.tag}> inside <${tag}>`);
414
+ continue;
415
+ }
416
+ const part = this.element(child, passed);
417
+ if (part) children.push(part);
418
+ }
419
+ if (children.length > 0) node.children = children;
420
+ return node;
421
+ }
372
422
  element(element, inherited, flexItem = false) {
373
423
  if (SKIPPED_TAGS.has(element.tag)) return void 0;
374
424
  if (element.attributes.form !== void 0 && CONTROL_TAGS.has(element.tag)) {
375
425
  this.problem(`<${element.tag}> form="${element.attributes.form}"`);
376
426
  }
377
- if (element.tag === "input" && _optionalChain([element, 'access', _18 => _18.attributes, 'access', _19 => _19.type, 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21()]) === "hidden") {
427
+ if (element.tag === "input" && _optionalChain([element, 'access', _21 => _21.attributes, 'access', _22 => _22.type, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) === "hidden") {
378
428
  const { name, value, disabled } = element.attributes;
379
429
  if (this.form && name && disabled === void 0) {
380
430
  this.form.fields.push({ name, value: _nullishCoalesce(value, () => ( "")) });
@@ -408,7 +458,7 @@ var Converter = class {
408
458
  return node;
409
459
  }
410
460
  const textBox = flexItem && INLINE_TAGS.has(element.tag) && element.tag !== "a" && element.tag !== "br";
411
- if (BLOCK_TEXT_TAGS.has(element.tag) || textBox) {
461
+ if (BLOCK_TEXT_TAGS.has(element.tag) || element.tag === "caption" || textBox) {
412
462
  if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
413
463
  this.problem(`<${element.tag}> holds block elements`);
414
464
  }
@@ -507,6 +557,9 @@ var Converter = class {
507
557
  boxDark
508
558
  );
509
559
  }
560
+ if (TABLE_GROUP_TAGS.has(element.tag) || element.tag === "tr" || TABLE_CELL_TAGS.has(element.tag)) {
561
+ return this.tablePart(element, passed, box, boxDark, flex);
562
+ }
510
563
  if (VIEW_TAGS.has(element.tag)) {
511
564
  const node = this.node("View", element, box, boxDark);
512
565
  const children = this.blocks(element.children, passed, flex);
@@ -578,15 +631,15 @@ var parsedSheets = /* @__PURE__ */ new Map();
578
631
  function parsedStylesheet(css) {
579
632
  let sheet = parsedSheets.get(css);
580
633
  if (!sheet) {
581
- sheet = _chunkV727H3RIcjs.parseFarmNativeStylesheet.call(void 0, css);
634
+ sheet = _chunkCCAUIBIScjs.parseFarmNativeStylesheet.call(void 0, css);
582
635
  if (parsedSheets.size >= 16) parsedSheets.delete(parsedSheets.keys().next().value);
583
636
  parsedSheets.set(css, sheet);
584
637
  }
585
638
  return sheet;
586
639
  }
587
640
  function createFarmNativeTree(html, pageUrl, stylesheets) {
588
- const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _22 => _22.exec, 'call', _23 => _23(html), 'optionalAccess', _24 => _24[1]]);
589
- const document = parseHtml(_chunk2C5L5RPMcjs._readFarmRenderedHtml.call(void 0, html, { keepAriaHidden: true }));
641
+ const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _25 => _25.exec, 'call', _26 => _26(html), 'optionalAccess', _27 => _27[1]]);
642
+ const document = parseHtml(_chunkFT6KJHS3cjs._readFarmRenderedHtml.call(void 0, html, { keepAriaHidden: true }));
590
643
  const page = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(find(document, (element) => element.attributes.id === "__farm_page__"), () => ( find(document, (element) => element.attributes.id === "root"))), () => ( find(document, (element) => element.tag === "body"))), () => ( document));
591
644
  const labels = /* @__PURE__ */ new Map();
592
645
  const collectLabels = (element) => {
@@ -597,7 +650,7 @@ function createFarmNativeTree(html, pageUrl, stylesheets) {
597
650
  for (const child of element.children) if (typeof child !== "string") collectLabels(child);
598
651
  };
599
652
  collectLabels(page);
600
- const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess', _25 => _25.map, 'call', _26 => _26(parsedStylesheet)]), labels);
653
+ const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess', _28 => _28.map, 'call', _29 => _29(parsedStylesheet)]), labels);
601
654
  const ancestors = [];
602
655
  for (let element = page.parent; element; element = element.parent) ancestors.unshift(element);
603
656
  const inherited = { style: {}, dark: {} };
@@ -624,14 +677,14 @@ function createFarmNativeTree(html, pageUrl, stylesheets) {
624
677
  if (children.length > 0) root.children = children;
625
678
  return {
626
679
  version: 1,
627
- ..._optionalChain([title, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
680
+ ..._optionalChain([title, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]) ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
628
681
  root,
629
682
  unsupported: converter.unsupported
630
683
  };
631
684
  }
632
685
  function readFarmPageStylesheets(html, pageUrl) {
633
686
  const out = [];
634
- const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access', _29 => _29.exec, 'call', _30 => _30(html), 'optionalAccess', _31 => _31[1]]), () => ( html));
687
+ const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access', _32 => _32.exec, 'call', _33 => _33(html), 'optionalAccess', _34 => _34[1]]), () => ( html));
635
688
  for (const match of head.matchAll(/<link\b([^>]*)>|<style\b[^>]*>([\s\S]*?)<\/style>/gi)) {
636
689
  if (match[2] !== void 0) {
637
690
  out.push({ inline: match[2] });
@@ -639,7 +692,7 @@ function readFarmPageStylesheets(html, pageUrl) {
639
692
  }
640
693
  const attributes = match[1];
641
694
  if (!/\brel\s*=\s*["']?stylesheet\b/i.test(attributes)) continue;
642
- const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access', _32 => _32.exec, 'call', _33 => _33(attributes), 'optionalAccess', _34 => _34[1]]);
695
+ const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access', _35 => _35.exec, 'call', _36 => _36(attributes), 'optionalAccess', _37 => _37[1]]);
643
696
  if (!href) continue;
644
697
  const resolved = new URL(decode(href), pageUrl);
645
698
  if (resolved.origin === pageUrl.origin) out.push({ href: resolved.pathname + resolved.search });
@@ -659,7 +712,7 @@ async function createFarmNativeTreeResponse(options) {
659
712
  const page = await options.renderPage(
660
713
  new Request(options.request.url, { ...init, signal: options.request.signal })
661
714
  );
662
- const cookies = _nullishCoalesce(_optionalChain([page, 'access', _35 => _35.headers, 'access', _36 => _36.getSetCookie, 'optionalCall', _37 => _37()]), () => ( []));
715
+ const cookies = _nullishCoalesce(_optionalChain([page, 'access', _38 => _38.headers, 'access', _39 => _39.getSetCookie, 'optionalCall', _40 => _40()]), () => ( []));
663
716
  const type = _nullishCoalesce(page.headers.get("content-type"), () => ( ""));
664
717
  const drawn = page.status === 200 || submitted && page.status >= 400 && page.status < 500;
665
718
  if (!drawn || !type.includes("text/html")) return page;
@@ -673,7 +726,7 @@ async function createFarmNativeTreeResponse(options) {
673
726
  signal: options.request.signal
674
727
  })
675
728
  );
676
- return response.status === 200 && _optionalChain([response, 'access', _38 => _38.headers, 'access', _39 => _39.get, 'call', _40 => _40("content-type"), 'optionalAccess', _41 => _41.includes, 'call', _42 => _42("text/css")]) ? response.text() : void 0;
729
+ return response.status === 200 && _optionalChain([response, 'access', _41 => _41.headers, 'access', _42 => _42.get, 'call', _43 => _43("content-type"), 'optionalAccess', _44 => _44.includes, 'call', _45 => _45("text/css")]) ? response.text() : void 0;
677
730
  })));
678
731
  const stylesheets = [];
679
732
  for (const source of readFarmPageStylesheets(html, pageUrl)) {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk5YPBFMBNcjs = require('./chunk-5YPBFMBN.cjs');
3
+ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
4
4
 
5
5
  // src/env-types.ts
6
6
  var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
@@ -31,7 +31,7 @@ async function generateEnvTypes(options) {
31
31
  const outPath = path.isAbsolute(outFile) ? outFile : path.join(root, srcDir, outFile);
32
32
  const content = createEnvTypeDeclarations(options, outPath);
33
33
  fs.mkdirSync(path.dirname(outPath), { recursive: true });
34
- _chunk5YPBFMBNcjs.writeFileIfChanged.call(void 0, outPath, content);
34
+ _chunkAQIRXBBYcjs.writeFileIfChanged.call(void 0, outPath, content);
35
35
  return outPath;
36
36
  }
37
37
  function createEnvTypeDeclarations(options, outPath) {
@@ -129,5 +129,6 @@ export {
129
129
  getFarmRouteRuntimeConfig,
130
130
  createFarmRouteRuntimeKey,
131
131
  resolveFarmRouteRuleRuntimeConfig,
132
- farmRouteRuleMatches
132
+ farmRouteRuleMatches,
133
+ compareFarmRouteRuleSpecificity
133
134
  };