@farm.js/core 0.1.51-beta.3 → 0.1.60
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.
- package/dist/{agent-mcp-handler-7JSKGSOW.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
- package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
- package/dist/{agent-mcp.d-BJKChOrO.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
- package/dist/{agent-mcp.d-BAR9njbJ.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
- package/dist/agent-runtime.cjs +5 -5
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.mjs +4 -4
- package/dist/{analyzer-OTPEWH5W.mjs → analyzer-22BEYV7S.mjs} +116 -13
- package/dist/{analyzer-TSQXZCZN.cjs → analyzer-LCSI3NSH.cjs} +123 -20
- package/dist/api/client.cjs +5 -4
- package/dist/api/client.d.mts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.mjs +3 -2
- package/dist/api/client.native.cjs +45 -0
- package/dist/api/client.native.d.mts +23 -0
- package/dist/api/client.native.d.ts +23 -0
- package/dist/api/client.native.mjs +45 -0
- package/dist/api/route-manager.cjs +7 -7
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/route-manager.mjs +6 -6
- package/dist/api/runtime.cjs +5 -5
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +4 -4
- package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
- package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
- package/dist/api.cjs +11 -11
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/api.mjs +10 -10
- package/dist/{app-manifest.d-DEQNnNhV.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
- package/dist/{app-manifest.d-BLFbaqx8.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
- package/dist/app-markdown.cjs +7 -7
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +6 -6
- package/dist/{app.d-CNPaUYaa.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
- package/dist/{app.d-CT7xDkj2.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
- package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
- package/dist/{chunk-OAMUSC7H.cjs → chunk-2FRLSDBT.cjs} +1 -1
- package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
- package/dist/{chunk-ZD2VKAUI.mjs → chunk-2KTYMMWT.mjs} +1 -1
- package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
- package/dist/{chunk-UQF3OJVE.mjs → chunk-37PYUEK5.mjs} +173 -29
- package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
- package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
- package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
- package/dist/chunk-3YMLUNL2.cjs +251 -0
- package/dist/chunk-4JTQPOKO.cjs +137 -0
- package/dist/{chunk-7MD37P5V.cjs → chunk-4P23B7DU.cjs} +5 -5
- package/dist/{chunk-3BLEXUGE.mjs → chunk-55U5QIXQ.mjs} +1 -1
- package/dist/{chunk-TWHXBMLJ.cjs → chunk-5JNUYGNF.cjs} +4 -4
- package/dist/{chunk-53SACYBY.cjs → chunk-6BJJYOFL.cjs} +7 -7
- package/dist/chunk-6UUH4N4J.mjs +251 -0
- package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
- package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
- package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
- package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
- package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
- package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
- package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
- package/dist/{chunk-UJL4JOXV.cjs → chunk-CI4UNQHO.cjs} +2 -2
- package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
- package/dist/chunk-D2X5MUF5.cjs +1457 -0
- package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
- package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
- package/dist/{chunk-4SEHMBL4.cjs → chunk-DPJ66FSI.cjs} +22 -22
- package/dist/{chunk-FFE2EMF7.cjs → chunk-DZPR2W6U.cjs} +5 -5
- package/dist/{chunk-3Z63X45F.mjs → chunk-E72UD6ME.mjs} +1 -1
- package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
- package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
- package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
- package/dist/{chunk-5FXPJIOT.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
- package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
- package/dist/{chunk-3SMXQNFD.mjs → chunk-FORSVMEJ.mjs} +2 -2
- package/dist/{chunk-R4PHCZ3G.mjs → chunk-HPWB57PZ.mjs} +1 -1
- package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
- package/dist/{chunk-3XQ57EFI.cjs → chunk-IFXSBJPN.cjs} +16 -16
- package/dist/{chunk-3WSIYBMG.mjs → chunk-ILMTRGBG.mjs} +279 -48
- package/dist/{chunk-HLWOWZFX.cjs → chunk-JBK7UJOI.cjs} +14 -11
- package/dist/chunk-JI5D7MXY.mjs +137 -0
- package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
- package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
- package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
- package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
- package/dist/chunk-KPOMS5RO.cjs +237 -0
- package/dist/{chunk-YAJTD3ZG.mjs → chunk-KVW2M6PI.mjs} +1 -1
- package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
- package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
- package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
- package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
- package/dist/{chunk-D7UQC4O6.cjs → chunk-LT4VAF5Z.cjs} +2 -2
- package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
- package/dist/{chunk-H33PJEXN.cjs → chunk-MEQN6DDA.cjs} +5 -5
- package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
- package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
- package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
- package/dist/{chunk-WGUHDWT5.cjs → chunk-MTWXOEI4.cjs} +527 -366
- package/dist/chunk-NHD7BAKD.mjs +1457 -0
- package/dist/{chunk-KLNFJDFM.cjs → chunk-NQJDO7K7.cjs} +31 -31
- package/dist/{chunk-TSFMFPRU.cjs → chunk-O27PLNQZ.cjs} +10 -10
- package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
- package/dist/{chunk-YUEYBL35.mjs → chunk-PCXIJKPM.mjs} +8 -8
- package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
- package/dist/{chunk-B3GM5I6N.cjs → chunk-PRFNLQSP.cjs} +4 -4
- package/dist/{chunk-46KXZBOG.cjs → chunk-QAS7KE7J.cjs} +7 -7
- package/dist/chunk-QGOZLGVP.mjs +0 -0
- package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
- package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
- package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
- package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
- package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
- package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
- package/dist/chunk-SJRCWF4Z.mjs +237 -0
- package/dist/{chunk-4353ZRE5.mjs → chunk-SX7EECTS.mjs} +8 -5
- package/dist/{chunk-LDNSSHEG.mjs → chunk-T4TBK5NY.mjs} +2 -2
- package/dist/{chunk-NOTSHVRN.mjs → chunk-T7I62A4C.mjs} +293 -132
- package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
- package/dist/{chunk-4CGOMZP3.cjs → chunk-UDJY2ZGY.cjs} +487 -256
- package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
- package/dist/{chunk-TQMI6BYO.cjs → chunk-UYSTTPYJ.cjs} +1262 -936
- package/dist/{chunk-E5DXF5GE.mjs → chunk-UZZ6IEQP.mjs} +3 -3
- package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
- package/dist/{chunk-GAO7MS5O.mjs → chunk-VPTWKOCY.mjs} +19 -19
- package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
- package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
- package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
- package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
- package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
- package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
- package/dist/chunk-XPIPMWY3.cjs +1 -0
- package/dist/{chunk-JXEPLIXD.cjs → chunk-XTG73QZA.cjs} +183 -39
- package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
- package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
- package/dist/{chunk-LPDKG6RA.mjs → chunk-YSXTNSXS.mjs} +1 -1
- package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
- package/dist/{chunk-3TLKUBXG.mjs → chunk-ZFUKPWFC.mjs} +912 -586
- package/dist/{chunk-4TKAIO2F.mjs → chunk-ZMHAFH4R.mjs} +8 -8
- package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
- package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
- package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
- package/dist/{chunk-MRNDAJEV.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
- package/dist/{client-plugins.d-DllmH8eM.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +10 -2
- package/dist/{client-plugins.d-n3iWY1EJ.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +10 -2
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.cjs +9 -9
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +9 -9
- package/dist/{config.d-DqKaCr1r.d.ts → config.d-DqZkLwef.d.mts} +139 -1
- package/dist/{config.d-DqKaCr1r.d.mts → config.d-DqZkLwef.d.ts} +139 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/cron.cjs +3 -3
- package/dist/cron.d.mts +10 -0
- package/dist/cron.d.ts +10 -0
- package/dist/cron.mjs +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-UESYARTF.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
- package/dist/{devtools-TO6TAO32.cjs → devtools-UF6JYHUN.cjs} +18 -18
- package/dist/docs.cjs +19 -19
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +18 -18
- package/dist/index.cjs +96 -96
- package/dist/{index.d-BXsAXm1U.d.ts → index.d-DlCELfhf.d.ts} +1 -1
- package/dist/{index.d-BL7KKiwa.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.mjs +139 -139
- package/dist/integrations.cjs +5 -5
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.mjs +4 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -6
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +5 -5
- package/dist/internal/build-runtime.cjs +50 -50
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +49 -49
- package/dist/internal/cli-runtime.cjs +28 -28
- package/dist/internal/cli-runtime.mjs +28 -28
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +20 -15
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +8 -3
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +18 -18
- package/dist/internal/config-runtime.d.mts +94 -6
- package/dist/internal/config-runtime.d.ts +94 -6
- package/dist/internal/config-runtime.mjs +17 -17
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-boot.cjs +211 -0
- package/dist/internal/islands-boot.d.mts +8 -0
- package/dist/internal/islands-boot.d.ts +8 -0
- package/dist/internal/islands-boot.mjs +211 -0
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +37 -101
- package/dist/internal/production-runtime.d.mts +17 -11
- package/dist/internal/production-runtime.d.ts +17 -11
- package/dist/internal/production-runtime.mjs +47 -111
- package/dist/markdown.cjs +5 -5
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +4 -4
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +27 -5
- package/dist/mobile.d.ts +27 -5
- package/dist/modules-VHD7BELU.mjs +13 -0
- package/dist/modules-WT5D3AWY.cjs +13 -0
- package/dist/native-specs-BD7HOTMJ.mjs +15 -0
- package/dist/native-specs-IQQRJOOW.cjs +15 -0
- package/dist/native-tree-6G5O53O3.cjs +27 -0
- package/dist/{native-tree-EBPDFTRW.mjs → native-tree-VWNW2MQ2.mjs} +10 -8
- package/dist/native.cjs +87 -0
- package/dist/native.d.mts +72 -0
- package/dist/native.d.ts +72 -0
- package/dist/native.mjs +87 -0
- package/dist/{navigation-delegate.d-C76gXTmO.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DIyDslxt.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
- package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
- package/dist/plugin.cjs +42 -42
- package/dist/plugin.d.mts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.mjs +41 -41
- package/dist/port-C6GBH4C6.cjs +419 -0
- package/dist/port-WOOQ3V56.mjs +419 -0
- package/dist/{production-runtime.d-CDHztggO.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
- package/dist/{production-runtime.d-tyaGdbk6.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-XfmIrCK1.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-aAWiDd64.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-Dr5WRjoV.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
- package/dist/{render-plan.d-Diwybxo8.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +6 -6
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request.d-D01fRn--.d.ts → request.d-BiicaNxb.d.ts} +1 -1
- package/dist/{request.d-Dd3AFR79.d.mts → request.d-DV0oeUit.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-BQ53lJ_D.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
- package/dist/{route-rendering.d-Bhx4QoJt.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
- package/dist/{router.d-DQ3k7EYn.d.ts → router.d-DjGn_al7.d.ts} +1 -1
- package/dist/{router.d-Bi23a6Xc.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
- package/dist/{routes.d-C7jMJFvP.d.ts → routes.d-BKSjHuH9.d.ts} +25 -2
- package/dist/{routes.d-BgTd7vI4.d.mts → routes.d-qd8Qf4LG.d.mts} +25 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-OCZIT5OF.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
- package/dist/{rsc-pipeline-K3ER3Q4N.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
- package/dist/{runtime-DKNSIH7V.cjs → runtime-DGUOWSMF.cjs} +293 -41
- package/dist/{runtime-MKYDEUZT.mjs → runtime-HFZTVNFF.mjs} +283 -31
- package/dist/{runtime.d-B2Js6qZ2.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
- package/dist/{runtime.d-BL-CGwoi.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
- package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
- package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
- package/dist/server-fn-client.d.mts +1 -1
- package/dist/server-fn-client.d.ts +1 -1
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server.cjs +81 -81
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +64 -64
- package/dist/session-2Q72D4QV.cjs +23 -0
- package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
- package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
- package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
- package/dist/{spa-router.d-DqZ6Lfs0.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
- package/dist/{spa-router.d-B2rIFGs0.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
- package/dist/testing.cjs +7 -7
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.mjs +6 -6
- package/dist/{utils.d-Bv2MPeLR.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
- package/dist/{utils.d-fqXe8lNc.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +42 -42
- package/dist/vite.d.mts +10 -5
- package/dist/vite.d.ts +10 -5
- package/dist/vite.mjs +41 -41
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +17 -3
- package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
- package/dist/chunk-MIGFX2FN.mjs +0 -758
- package/dist/chunk-P6MHI5O2.cjs +0 -758
- package/dist/native-tree-MMZS7S6W.cjs +0 -25
- package/dist/session-AAU7RNRO.cjs +0 -23
- package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
- package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
- package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
- package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cascadeFarmNativeStylesheetsForElement,
|
|
3
|
+
createFarmNativeTheme,
|
|
4
|
+
farmNativeClassProblem,
|
|
5
|
+
inspectFarmNativeStylesheets,
|
|
6
|
+
parseFarmNativeStylesheet,
|
|
7
|
+
resolveFarmNativeClasses
|
|
8
|
+
} from "./chunk-NHD7BAKD.mjs";
|
|
9
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
10
|
+
|
|
11
|
+
// src/mobile/port.ts
|
|
12
|
+
import { readFileSync } from "fs";
|
|
13
|
+
import path from "path";
|
|
14
|
+
var DOM_TAGS = new Set(
|
|
15
|
+
"div section main article header footer nav aside figure hr p h1 h2 h3 h4 h5 h6 span strong em b i small code label br a button input textarea img ul ol li".split(" ")
|
|
16
|
+
);
|
|
17
|
+
var DOM_PROPS = new Set(
|
|
18
|
+
"key style href src alt width height value defaultValue placeholder type disabled readOnly autoFocus maxLength rows name id title role htmlFor target rel tabIndex lang dir onClick onChange onInput onFocus onBlur onLoad onError".split(" ")
|
|
19
|
+
);
|
|
20
|
+
var REACT_NAMES = new Set(
|
|
21
|
+
"default Fragment StrictMode memo forwardRef useState useReducer useMemo useCallback useEffect useRef useId useTransition useDeferredValue startTransition".split(" ")
|
|
22
|
+
);
|
|
23
|
+
var PURE_PACKAGES = /* @__PURE__ */ new Set([
|
|
24
|
+
"zod",
|
|
25
|
+
"valibot",
|
|
26
|
+
"date-fns",
|
|
27
|
+
"dayjs",
|
|
28
|
+
"lodash",
|
|
29
|
+
"lodash-es",
|
|
30
|
+
"nanoid",
|
|
31
|
+
"uuid",
|
|
32
|
+
"clsx",
|
|
33
|
+
"classnames",
|
|
34
|
+
"tailwind-merge",
|
|
35
|
+
"zustand",
|
|
36
|
+
"jotai",
|
|
37
|
+
"immer"
|
|
38
|
+
]);
|
|
39
|
+
var CORE_LINK = /* @__PURE__ */ new Set(["@farm.js/core", "@farm.js/core/client"]);
|
|
40
|
+
var SCRIPT = /\.(?:tsx|ts|jsx|js|mjs)$/;
|
|
41
|
+
function packageName(specifier) {
|
|
42
|
+
const parts = specifier.split("/");
|
|
43
|
+
return specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
|
|
44
|
+
}
|
|
45
|
+
function posix(file) {
|
|
46
|
+
return file.split(path.sep).join("/");
|
|
47
|
+
}
|
|
48
|
+
function withoutExtension(file) {
|
|
49
|
+
return file.replace(SCRIPT, "");
|
|
50
|
+
}
|
|
51
|
+
function specifierBetween(fromFile, toFile) {
|
|
52
|
+
const relative = posix(path.relative(path.dirname(fromFile), withoutExtension(toFile)));
|
|
53
|
+
return relative.startsWith(".") ? relative : `./${relative}`;
|
|
54
|
+
}
|
|
55
|
+
function walk(node, visit) {
|
|
56
|
+
if (Array.isArray(node)) {
|
|
57
|
+
for (const child of node) walk(child, visit);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!node || typeof node !== "object") return;
|
|
61
|
+
const current = node;
|
|
62
|
+
if (typeof current.type === "string") visit(current);
|
|
63
|
+
for (const [key, value] of Object.entries(current)) {
|
|
64
|
+
if (key !== "type" && key !== "start" && key !== "end" && value && typeof value === "object") {
|
|
65
|
+
walk(value, visit);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function hasJsx(program) {
|
|
70
|
+
let found = false;
|
|
71
|
+
walk(program, (node) => {
|
|
72
|
+
if (node.type === "JSXElement" || node.type === "JSXFragment") found = true;
|
|
73
|
+
});
|
|
74
|
+
return found;
|
|
75
|
+
}
|
|
76
|
+
function staticString(value) {
|
|
77
|
+
if (!value) return void 0;
|
|
78
|
+
if ((value.type === "Literal" || value.type === "StringLiteral") && typeof value.value === "string") {
|
|
79
|
+
return value.value;
|
|
80
|
+
}
|
|
81
|
+
if (value.type === "JSXExpressionContainer") return staticString(value.expression);
|
|
82
|
+
if (value.type === "TemplateLiteral" && value.expressions.length === 0) {
|
|
83
|
+
return value.quasis.map((quasi) => quasi.value.cooked).join("");
|
|
84
|
+
}
|
|
85
|
+
return void 0;
|
|
86
|
+
}
|
|
87
|
+
function lineColumn(source, offset) {
|
|
88
|
+
const before = source.slice(0, offset).split("\n");
|
|
89
|
+
return `${before.length}:${before.at(-1).length + 1}`;
|
|
90
|
+
}
|
|
91
|
+
async function emitFarmMobilePort(options) {
|
|
92
|
+
const { root, graph, portsDir } = options;
|
|
93
|
+
const read = options.readFile ?? ((file) => readFileSync(file, "utf8"));
|
|
94
|
+
const { parseSync } = await import("rolldown/utils");
|
|
95
|
+
const problems = [];
|
|
96
|
+
const copyOf = (file) => path.join(portsDir, path.relative(root, file));
|
|
97
|
+
const parsed = /* @__PURE__ */ new Map();
|
|
98
|
+
for (const module of graph.modules) {
|
|
99
|
+
const source = read(module.file);
|
|
100
|
+
const lang = module.file.endsWith(".tsx") ? "tsx" : module.file.endsWith(".ts") ? "ts" : "jsx";
|
|
101
|
+
parsed.set(module.file, { source, program: parseSync(module.file, source, { lang }).program });
|
|
102
|
+
}
|
|
103
|
+
const copied = new Set(
|
|
104
|
+
graph.modules.filter((module) => module.file === graph.page || hasJsx(parsed.get(module.file).program)).map((module) => module.file)
|
|
105
|
+
);
|
|
106
|
+
const files = {};
|
|
107
|
+
const tags = /* @__PURE__ */ new Set();
|
|
108
|
+
const classNames = [];
|
|
109
|
+
const outputs = [];
|
|
110
|
+
for (const module of graph.modules) {
|
|
111
|
+
const label = posix(path.relative(root, module.file));
|
|
112
|
+
if (module.serverBoundary) {
|
|
113
|
+
problems.push(`${label} defines server functions, which ports do not call yet`);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (!copied.has(module.file)) continue;
|
|
117
|
+
const { source, program } = parsed.get(module.file);
|
|
118
|
+
const at = (node) => `${label}:${lineColumn(source, node.start)}`;
|
|
119
|
+
const edits = [];
|
|
120
|
+
const resolvedBySource = new Map(module.imports.map((entry2) => [entry2.source, entry2.file]));
|
|
121
|
+
const linkNames = /* @__PURE__ */ new Set();
|
|
122
|
+
const reactObjects = /* @__PURE__ */ new Set();
|
|
123
|
+
let usesDom = false;
|
|
124
|
+
const rewriteSource = (node, kind) => {
|
|
125
|
+
const specifier = node.value;
|
|
126
|
+
const target = resolvedBySource.get(specifier);
|
|
127
|
+
if (target) {
|
|
128
|
+
if (kind === "value" && !SCRIPT.test(target)) {
|
|
129
|
+
problems.push(`${at(node)} imports "${specifier}", an asset ports do not load yet`);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const next = specifierBetween(
|
|
133
|
+
copyOf(module.file),
|
|
134
|
+
copied.has(target) ? copyOf(target) : target
|
|
135
|
+
);
|
|
136
|
+
edits.push({ start: node.start, end: node.end, text: JSON.stringify(next) });
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
140
|
+
if (kind === "value") {
|
|
141
|
+
problems.push(`${at(node)} imports "${specifier}", an asset ports do not load yet`);
|
|
142
|
+
}
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (kind === "type" || specifier === "react" || PURE_PACKAGES.has(packageName(specifier))) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (!CORE_LINK.has(specifier)) {
|
|
149
|
+
problems.push(`${at(node)} imports "${specifier}", which ports do not map yet`);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
for (const statement of program.body) {
|
|
153
|
+
if (statement.type === "ImportDeclaration") {
|
|
154
|
+
const typeOnly = statement.importKind === "type";
|
|
155
|
+
const specifier = statement.source.value;
|
|
156
|
+
if (!typeOnly && specifier === "react") {
|
|
157
|
+
for (const imported of statement.specifiers) {
|
|
158
|
+
if (imported.importKind === "type") continue;
|
|
159
|
+
if (imported.type !== "ImportSpecifier") reactObjects.add(imported.local.name);
|
|
160
|
+
const name = imported.type === "ImportSpecifier" ? imported.imported.name ?? imported.imported.value : "default";
|
|
161
|
+
if (!REACT_NAMES.has(name)) {
|
|
162
|
+
problems.push(
|
|
163
|
+
`${at(imported)} uses ${name} from "react", which ports do not support yet`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (/\.css$/i.test(specifier)) {
|
|
169
|
+
if (statement.specifiers.length > 0) {
|
|
170
|
+
problems.push(`${at(statement)} imports CSS module names, which ports do not map yet`);
|
|
171
|
+
} else edits.push({ start: statement.start, end: statement.end, text: "" });
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (!typeOnly && CORE_LINK.has(specifier)) {
|
|
175
|
+
const values = statement.specifiers.filter(
|
|
176
|
+
(imported) => imported.importKind !== "type"
|
|
177
|
+
);
|
|
178
|
+
for (const imported of values) {
|
|
179
|
+
const name = imported.type === "ImportSpecifier" ? imported.imported.name : "default";
|
|
180
|
+
if (name === "Link") linkNames.add(imported.local.name);
|
|
181
|
+
else
|
|
182
|
+
problems.push(
|
|
183
|
+
`${at(imported)} uses ${name} from "${specifier}", which ports do not map yet`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
const types = statement.specifiers.filter(
|
|
187
|
+
(imported) => imported.importKind === "type"
|
|
188
|
+
);
|
|
189
|
+
edits.push({
|
|
190
|
+
start: statement.start,
|
|
191
|
+
end: statement.end,
|
|
192
|
+
text: types.length === 0 ? "" : `import type { ${types.map(
|
|
193
|
+
(imported) => source.slice(imported.start, imported.end).replace(/^type\s+/, "")
|
|
194
|
+
).join(", ")} } from ${JSON.stringify(specifier)};`
|
|
195
|
+
});
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
rewriteSource(statement.source, typeOnly ? "type" : "value");
|
|
199
|
+
} else if ((statement.type === "ExportNamedDeclaration" || statement.type === "ExportAllDeclaration") && statement.source) {
|
|
200
|
+
rewriteSource(statement.source, statement.exportKind === "type" ? "type" : "value");
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
walk(program, (node) => {
|
|
204
|
+
if (node.type === "MemberExpression" && node.object?.type === "Identifier" && reactObjects.has(node.object.name) && node.property?.type === "Identifier" && !REACT_NAMES.has(node.property.name)) {
|
|
205
|
+
problems.push(
|
|
206
|
+
`${at(node)} uses ${node.property.name} from "react", which ports do not support yet`
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
if (node.type === "ImportExpression") {
|
|
210
|
+
problems.push(`${at(node)} imports a module at runtime, which ports do not follow yet`);
|
|
211
|
+
}
|
|
212
|
+
if (node.type === "JSXOpeningElement" || node.type === "JSXClosingElement") {
|
|
213
|
+
const name = node.name;
|
|
214
|
+
if (name.type !== "JSXIdentifier") return;
|
|
215
|
+
const className = (tag) => {
|
|
216
|
+
if (node.type !== "JSXOpeningElement") return;
|
|
217
|
+
for (const attribute of node.attributes) {
|
|
218
|
+
if (attribute.type !== "JSXAttribute" || attribute.name.name !== "className") continue;
|
|
219
|
+
const classes = staticString(attribute.value);
|
|
220
|
+
if (classes === void 0) {
|
|
221
|
+
problems.push(`${at(attribute)} <${tag}> builds its class names at runtime`);
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
classNames.push({
|
|
225
|
+
edits,
|
|
226
|
+
attribute,
|
|
227
|
+
tag,
|
|
228
|
+
classes: classes.split(/\s+/).filter(Boolean),
|
|
229
|
+
at: at(attribute)
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
if (linkNames.has(name.name)) {
|
|
234
|
+
edits.push({ start: name.start, end: name.end, text: "__FarmLink" });
|
|
235
|
+
tags.add("a");
|
|
236
|
+
className("a");
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (!/^[a-z]/.test(name.name)) return;
|
|
240
|
+
if (!DOM_TAGS.has(name.name)) {
|
|
241
|
+
if (node.type === "JSXOpeningElement") {
|
|
242
|
+
problems.push(`${at(node)} renders <${name.name}>, which ports do not draw yet`);
|
|
243
|
+
}
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
usesDom = true;
|
|
247
|
+
tags.add(name.name);
|
|
248
|
+
edits.push({ start: name.start, end: name.end, text: `__FarmDom.${name.name}` });
|
|
249
|
+
if (node.type !== "JSXOpeningElement") return;
|
|
250
|
+
for (const attribute of node.attributes) {
|
|
251
|
+
if (attribute.type === "JSXSpreadAttribute") {
|
|
252
|
+
problems.push(`${at(attribute)} spreads props on <${name.name}>`);
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
const prop = attribute.name.type === "JSXNamespacedName" ? `${attribute.name.namespace.name}:${attribute.name.name.name}` : attribute.name.name;
|
|
256
|
+
if (prop !== "className" && !DOM_PROPS.has(prop) && !/^(?:aria|data)-/.test(prop)) {
|
|
257
|
+
problems.push(`${at(attribute)} <${name.name} ${prop}> has no port mapping yet`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
className(name.name);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
if (linkNames.size > 0 || usesDom) {
|
|
264
|
+
const names = [
|
|
265
|
+
...usesDom ? ["FarmDom as __FarmDom"] : [],
|
|
266
|
+
...linkNames.size > 0 ? ["Link as __FarmLink"] : []
|
|
267
|
+
];
|
|
268
|
+
const body = program.body;
|
|
269
|
+
const first = body.find(
|
|
270
|
+
(statement) => !(statement.type === "ExpressionStatement" && statement.directive)
|
|
271
|
+
);
|
|
272
|
+
edits.push({
|
|
273
|
+
start: first?.start ?? source.length,
|
|
274
|
+
end: first?.start ?? source.length,
|
|
275
|
+
text: `import { ${names.join(", ")} } from "@farm.js/native/elements";
|
|
276
|
+
`
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
outputs.push({
|
|
280
|
+
key: posix(path.relative(portsDir, copyOf(module.file))),
|
|
281
|
+
label,
|
|
282
|
+
source,
|
|
283
|
+
edits
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
const page = parsed.get(graph.page);
|
|
287
|
+
const hasDefault = page.program.body.some(
|
|
288
|
+
(statement) => statement.type === "ExportDefaultDeclaration"
|
|
289
|
+
);
|
|
290
|
+
if (!hasDefault) problems.push(`${posix(path.relative(root, graph.page))} has no default export`);
|
|
291
|
+
const sheets = [];
|
|
292
|
+
const themeDeclarations = [];
|
|
293
|
+
let tailwind = false;
|
|
294
|
+
for (const file of options.stylesheets ?? []) {
|
|
295
|
+
let css = read(file).replace(/\/\*[\s\S]*?\*\//g, "");
|
|
296
|
+
css = css.replace(/@import\s+(["'])tailwindcss\1[^;]*;/g, () => {
|
|
297
|
+
tailwind = true;
|
|
298
|
+
return "";
|
|
299
|
+
});
|
|
300
|
+
css = css.replace(/@source\b[^;]*;/g, "");
|
|
301
|
+
css = css.replace(/@theme\b[^{;]*\{([^{}]*)\}/g, (_block, body) => {
|
|
302
|
+
for (const match of body.matchAll(/(--[\w*-]+)\s*:\s*([^;]+);?/g)) {
|
|
303
|
+
themeDeclarations.push([match[1], match[2].trim()]);
|
|
304
|
+
}
|
|
305
|
+
return "";
|
|
306
|
+
});
|
|
307
|
+
const directive = /@(?:import|layer|tailwind|apply|theme|utility|plugin|config|custom-variant|variant|reference)\b/.exec(
|
|
308
|
+
css
|
|
309
|
+
);
|
|
310
|
+
if (directive) {
|
|
311
|
+
problems.push(
|
|
312
|
+
`${posix(path.relative(root, file))} uses ${directive[0]}, which ports do not read yet`
|
|
313
|
+
);
|
|
314
|
+
} else sheets.push(parseFarmNativeStylesheet(css));
|
|
315
|
+
}
|
|
316
|
+
for (const specifier of options.unreadStylesheets ?? []) {
|
|
317
|
+
problems.push(`the app imports "${specifier}", which ports cannot read as plain CSS`);
|
|
318
|
+
}
|
|
319
|
+
const sheet = {};
|
|
320
|
+
const rootVars = {
|
|
321
|
+
light: Object.assign(
|
|
322
|
+
{},
|
|
323
|
+
...sheets.map((sheet2) => sheet2.vars.light),
|
|
324
|
+
Object.fromEntries(themeDeclarations)
|
|
325
|
+
),
|
|
326
|
+
dark: Object.assign({}, ...sheets.map((sheet2) => sheet2.vars.dark))
|
|
327
|
+
};
|
|
328
|
+
const theme = themeDeclarations.length > 0 ? createFarmNativeTheme(themeDeclarations, rootVars) : void 0;
|
|
329
|
+
const contextClasses = /* @__PURE__ */ new Set([
|
|
330
|
+
...graph.layoutClasses,
|
|
331
|
+
...classNames.flatMap((entry2) => entry2.classes)
|
|
332
|
+
]);
|
|
333
|
+
for (const { edits, attribute, tag, classes, at } of classNames) {
|
|
334
|
+
const utilities = [];
|
|
335
|
+
const appClasses = [];
|
|
336
|
+
for (const token of classes) {
|
|
337
|
+
const inTable = resolveFarmNativeClasses(token, theme).unsupported.length === 0;
|
|
338
|
+
const styled = inspectFarmNativeStylesheets(sheets, { class: token }).styled;
|
|
339
|
+
if (tailwind && inTable) utilities.push(token);
|
|
340
|
+
if (styled) appClasses.push(token);
|
|
341
|
+
else if (tailwind && !inTable) {
|
|
342
|
+
problems.push(
|
|
343
|
+
`${at} ${farmNativeClassProblem(token, theme) ?? `class "${token}" has no port style`}`
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
const tw = resolveFarmNativeClasses(utilities.join(" "), theme);
|
|
348
|
+
const css = cascadeFarmNativeStylesheetsForElement(
|
|
349
|
+
sheets,
|
|
350
|
+
{ tag, classes: appClasses },
|
|
351
|
+
contextClasses
|
|
352
|
+
);
|
|
353
|
+
problems.push(...css.problems.map((message) => `${at} ${message}`));
|
|
354
|
+
const resolved = {
|
|
355
|
+
...utilities.length > 0 ? { tw: { style: tw.style, ...tw.dark ? { dark: tw.dark } : {} } } : {},
|
|
356
|
+
css: {
|
|
357
|
+
style: css.style,
|
|
358
|
+
...Object.keys(css.dark).length > 0 ? { dark: css.dark } : {},
|
|
359
|
+
...css.inherit.length > 0 ? { inherit: css.inherit } : {}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
edits.push({
|
|
363
|
+
start: attribute.start,
|
|
364
|
+
end: attribute.end,
|
|
365
|
+
text: `__farm={${JSON.stringify(resolved)}}`
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
for (const { key, label, source, edits } of outputs) {
|
|
369
|
+
let output = source;
|
|
370
|
+
for (const edit of edits.sort(
|
|
371
|
+
(left, right) => right.start - left.start || right.end - left.end
|
|
372
|
+
)) {
|
|
373
|
+
output = output.slice(0, edit.start) + edit.text + output.slice(edit.end);
|
|
374
|
+
}
|
|
375
|
+
files[key] = `// Generated by Farm from ${label} for its React Native port. Do not edit.
|
|
376
|
+
${output}`;
|
|
377
|
+
}
|
|
378
|
+
for (const tag of ["html", "body", ...[...tags].sort()]) {
|
|
379
|
+
const cascaded = cascadeFarmNativeStylesheetsForElement(sheets, { tag }, contextClasses);
|
|
380
|
+
problems.push(...cascaded.problems);
|
|
381
|
+
const entry2 = {
|
|
382
|
+
...Object.keys(cascaded.style).length > 0 ? { style: cascaded.style } : {},
|
|
383
|
+
...Object.keys(cascaded.dark).length > 0 ? { dark: cascaded.dark } : {},
|
|
384
|
+
...cascaded.inherit.length > 0 ? { inherit: cascaded.inherit } : {}
|
|
385
|
+
};
|
|
386
|
+
if (Object.keys(entry2).length > 0) sheet[tag] = entry2;
|
|
387
|
+
}
|
|
388
|
+
if (problems.length > 0) return { problems: [...new Set(problems)] };
|
|
389
|
+
const hasMetadata = page.program.body.some(
|
|
390
|
+
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration?.declarations?.some(
|
|
391
|
+
(declaration) => declaration.id?.name === "metadata"
|
|
392
|
+
)
|
|
393
|
+
);
|
|
394
|
+
const entry = `${options.module}.port.tsx`;
|
|
395
|
+
const pageImport = specifierBetween(path.join(portsDir, entry), copyOf(graph.page));
|
|
396
|
+
files[entry] = [
|
|
397
|
+
`// Generated by Farm: the React Native port of ${posix(path.relative(root, graph.page))}. Do not edit.`,
|
|
398
|
+
'import { useRouteParams } from "@farm.js/native";',
|
|
399
|
+
'import { FarmDomScreen } from "@farm.js/native/elements";',
|
|
400
|
+
`import Page from ${JSON.stringify(pageImport)};`,
|
|
401
|
+
...hasMetadata ? [`export { metadata } from ${JSON.stringify(pageImport)};`] : [],
|
|
402
|
+
"",
|
|
403
|
+
"// The app's CSS for each element the page renders, light and dark.",
|
|
404
|
+
`const sheet = ${JSON.stringify(sheet)};`,
|
|
405
|
+
"",
|
|
406
|
+
"export default function FarmPort() {",
|
|
407
|
+
" return (",
|
|
408
|
+
` <FarmDomScreen sheet={sheet}${tailwind ? " preflight" : ""}>`,
|
|
409
|
+
" <Page params={useRouteParams()} />",
|
|
410
|
+
" </FarmDomScreen>",
|
|
411
|
+
" );",
|
|
412
|
+
"}",
|
|
413
|
+
""
|
|
414
|
+
].join("\n");
|
|
415
|
+
return { port: { entry, files } };
|
|
416
|
+
}
|
|
417
|
+
export {
|
|
418
|
+
emitFarmMobilePort
|
|
419
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bi as ReadonlyMiddlewareStore, bj as FarmMiddlewareConfig, bk as MiddlewareModule, bl as MiddlewareConfig, bm as MiddlewareContext } from './client-plugins.d-
|
|
1
|
+
import { bi as ReadonlyMiddlewareStore, bj as FarmMiddlewareConfig, bk as MiddlewareModule, bl as MiddlewareConfig, bm as MiddlewareContext } from './client-plugins.d-CgQQ-EAv.mjs';
|
|
2
2
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.mjs';
|
|
3
3
|
import { R as ResolvedFarmServerConfig } from './workflows.d-CRMzQZ3k.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bi as ReadonlyMiddlewareStore, bj as FarmMiddlewareConfig, bk as MiddlewareModule, bl as MiddlewareConfig, bm as MiddlewareContext } from './client-plugins.d-
|
|
1
|
+
import { bi as ReadonlyMiddlewareStore, bj as FarmMiddlewareConfig, bk as MiddlewareModule, bl as MiddlewareConfig, bm as MiddlewareContext } from './client-plugins.d-vXrbcfJ1.js';
|
|
2
2
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.js';
|
|
3
3
|
import { R as ResolvedFarmServerConfig } from './workflows.d-CRMzQZ3k.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-
|
|
2
|
-
import { i as RouteModule, b6 as SSGCollectionResult, b7 as SSGPage } from './client-plugins.d-
|
|
1
|
+
import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-Iss0C7GR.js';
|
|
2
|
+
import { i as RouteModule, b6 as SSGCollectionResult, b7 as SSGPage } from './client-plugins.d-vXrbcfJ1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Farm.js SSG (Static Site Generation) Module
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-
|
|
2
|
-
import { i as RouteModule, b6 as SSGCollectionResult, b7 as SSGPage } from './client-plugins.d-
|
|
1
|
+
import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-BrIKA51A.mjs';
|
|
2
|
+
import { i as RouteModule, b6 as SSGCollectionResult, b7 as SSGPage } from './client-plugins.d-CgQQ-EAv.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Farm.js SSG (Static Site Generation) Module
|
package/dist/query/client.cjs
CHANGED
|
@@ -18,9 +18,9 @@ var _chunkSXCL2MINcjs = require('../chunk-SXCL2MIN.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkCBOEJ5Z4cjs = require('../chunk-CBOEJ5Z4.cjs');
|
|
22
22
|
require('../chunk-RI3EVPKD.cjs');
|
|
23
|
-
require('../chunk-
|
|
23
|
+
require('../chunk-JIBEFLQ7.cjs');
|
|
24
24
|
require('../chunk-QQ44FYRO.cjs');
|
|
25
25
|
require('../chunk-PENBZAHJ.cjs');
|
|
26
26
|
require('../chunk-6IOZPJ3I.cjs');
|
|
@@ -210,7 +210,7 @@ var commitURLUpdate = (updates, options, emitUpdate) => {
|
|
|
210
210
|
const currentUrl = url.pathname + url.search + url.hash;
|
|
211
211
|
if (newUrl === currentUrl) return;
|
|
212
212
|
const historyAction = history === "replaceState" ? "replace" : "push";
|
|
213
|
-
if (!
|
|
213
|
+
if (!_chunkCBOEJ5Z4cjs.writeFarmURLSearchHistory.call(void 0, historyAction, newUrl)) {
|
|
214
214
|
const historyState = window.history.state;
|
|
215
215
|
const nextHistoryState = historyState && typeof historyState === "object" && "path" in historyState ? { ...historyState, path: newUrl } : historyState;
|
|
216
216
|
window.history[history](nextHistoryState, "", newUrl);
|
|
@@ -221,7 +221,7 @@ var commitURLUpdate = (updates, options, emitUpdate) => {
|
|
|
221
221
|
}
|
|
222
222
|
emitter.emitUpdate(getCurrentSearchParams());
|
|
223
223
|
}
|
|
224
|
-
if (shallow)
|
|
224
|
+
if (shallow) _chunkCBOEJ5Z4cjs.notifyHistoryChange.call(void 0, "url-search");
|
|
225
225
|
if (scroll) {
|
|
226
226
|
window.scrollTo(0, 0);
|
|
227
227
|
}
|
|
@@ -305,7 +305,7 @@ function useQueryState(key, parser, options) {
|
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
307
|
onPopState();
|
|
308
|
-
const unsubscribeHistory =
|
|
308
|
+
const unsubscribeHistory = _chunkCBOEJ5Z4cjs.subscribeHistoryChange.call(void 0, onPopState);
|
|
309
309
|
emitter.on("update", onEmitterUpdate);
|
|
310
310
|
emitter.onKey(key, onKeyUpdate);
|
|
311
311
|
return () => {
|
|
@@ -398,7 +398,7 @@ function useQueryStates(parsers, options = {}) {
|
|
|
398
398
|
applyChange2(searchParams);
|
|
399
399
|
};
|
|
400
400
|
applyChange2(getCurrentSearchParams());
|
|
401
|
-
const unsubscribeHistory =
|
|
401
|
+
const unsubscribeHistory = _chunkCBOEJ5Z4cjs.subscribeHistoryChange.call(void 0, onPopState);
|
|
402
402
|
emitter.on("update", onEmitterUpdate);
|
|
403
403
|
const unsubscribeKeys = Object.entries(parsers).map(([key, parser]) => {
|
|
404
404
|
const onKeyUpdate = (payload) => {
|
package/dist/query/client.mjs
CHANGED
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
notifyHistoryChange,
|
|
19
19
|
subscribeHistoryChange,
|
|
20
20
|
writeFarmURLSearchHistory
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-25T5VXOE.mjs";
|
|
22
22
|
import "../chunk-PTLXHRJZ.mjs";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-RSEAX5MW.mjs";
|
|
24
24
|
import "../chunk-NCIAP562.mjs";
|
|
25
25
|
import "../chunk-H227LYHT.mjs";
|
|
26
26
|
import "../chunk-S6O2L47H.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
+
var _chunk72KCTHLVcjs = require('../../chunk-72KCTHLV.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunkEGHPFXPZcjs = require('../../chunk-EGHPFXPZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkEGHPFXPZcjs = require('../../chunk-EGHPFXPZ.cjs');
|
|
8
8
|
require('../../chunk-ATYTLVSI.cjs');
|
|
9
9
|
require('../../chunk-CQL5ZGFU.cjs');
|
|
10
10
|
require('../../chunk-BTZ5O6VM.cjs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderFarmServerTreePage
|
|
3
|
+
} from "../../chunk-QGJ4FI2G.mjs";
|
|
1
4
|
import {
|
|
2
5
|
isolateFarmServerPageGraph,
|
|
3
6
|
wrapFarmIsolatedClientGraph
|
|
4
7
|
} from "../../chunk-SVCUSOEF.mjs";
|
|
5
|
-
import {
|
|
6
|
-
renderFarmServerTreePage
|
|
7
|
-
} from "../../chunk-QGJ4FI2G.mjs";
|
|
8
8
|
import "../../chunk-FHURJABM.mjs";
|
|
9
9
|
import "../../chunk-NBIVGHAT.mjs";
|
|
10
10
|
import "../../chunk-Y6FXYEAI.mjs";
|
package/dist/renderer-client.cjs
CHANGED
|
@@ -23,14 +23,14 @@ var _chunk53EHWHT2cjs = require('./chunk-53EHWHT2.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkCBOEJ5Z4cjs = require('./chunk-CBOEJ5Z4.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkRI3EVPKDcjs = require('./chunk-RI3EVPKD.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkJIBEFLQ7cjs = require('./chunk-JIBEFLQ7.cjs');
|
|
34
34
|
require('./chunk-QQ44FYRO.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
@@ -67,7 +67,7 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
67
67
|
function createRendererRouter(options = {}) {
|
|
68
68
|
const basePath = options.basePath === void 0 ? _chunkD22BUQKWcjs.getFarmBasePath.call(void 0, ) : _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
|
|
69
69
|
const matcher = _optionalChain([options, 'access', _ => _.routes, 'optionalAccess', _2 => _2.length]) ? _chunk53EHWHT2cjs.createFarmRouter.call(void 0, [...options.routes]) : null;
|
|
70
|
-
const router =
|
|
70
|
+
const router = _chunkCBOEJ5Z4cjs.getRouter.call(void 0, );
|
|
71
71
|
let snapshot = readRendererRouterSnapshot(basePath, matcher, router.getNavigationState());
|
|
72
72
|
const read = () => {
|
|
73
73
|
snapshot = readRendererRouterSnapshot(basePath, matcher, router.getNavigationState());
|
|
@@ -83,7 +83,7 @@ function createRendererRouter(options = {}) {
|
|
|
83
83
|
listener();
|
|
84
84
|
};
|
|
85
85
|
const unsubscribeNavigation = router.subscribeNavigation(notify);
|
|
86
|
-
const unsubscribeHistory =
|
|
86
|
+
const unsubscribeHistory = _chunkCBOEJ5Z4cjs.subscribeHistoryChange.call(void 0, notify);
|
|
87
87
|
read();
|
|
88
88
|
return () => {
|
|
89
89
|
unsubscribeNavigation();
|
|
@@ -314,7 +314,7 @@ function readRendererRouterSnapshot(basePath, matcher, navigation) {
|
|
|
314
314
|
pathname,
|
|
315
315
|
searchParams: url.searchParams,
|
|
316
316
|
params: _optionalChain([matcher, 'optionalAccess', _20 => _20.match, 'call', _21 => _21(routePathname), 'optionalAccess', _22 => _22.params]) || {},
|
|
317
|
-
pageState:
|
|
317
|
+
pageState: _chunkCBOEJ5Z4cjs.readPageState.call(void 0, ),
|
|
318
318
|
navigation
|
|
319
319
|
};
|
|
320
320
|
}
|
|
@@ -344,4 +344,4 @@ function isRendererFormData(value) {
|
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
|
|
347
|
-
exports.createRendererAction = createRendererAction; exports.createRendererI18n = createRendererI18n; exports.createRendererQuery = createRendererQuery; exports.createRendererRouter = createRendererRouter; exports.createRendererTheme = createRendererTheme; exports.delegateNavigation =
|
|
347
|
+
exports.createRendererAction = createRendererAction; exports.createRendererI18n = createRendererI18n; exports.createRendererQuery = createRendererQuery; exports.createRendererRouter = createRendererRouter; exports.createRendererTheme = createRendererTheme; exports.delegateNavigation = _chunkJIBEFLQ7cjs.delegateNavigation;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FarmRouterRouteInput } from './router.mjs';
|
|
2
|
-
import { a as FarmNavigationState, b as FarmNavigateOptions } from './spa-router.d-
|
|
2
|
+
import { a as FarmNavigationState, b as FarmNavigateOptions } from './spa-router.d-DHDoXxDE.mjs';
|
|
3
3
|
import { F as FarmClientCacheStatus } from './client-cache.d-di_Nasxa.mjs';
|
|
4
4
|
import { ServerFn } from './server-fn.mjs';
|
|
5
5
|
import { ServerQuery } from './server-query.mjs';
|
|
6
6
|
import { S as ServerQueryFetchOptions } from './server-query-runtime.d-aP52iuL5.mjs';
|
|
7
7
|
import { F as FarmThemeSnapshot, a as FarmThemePreference } from './types.d-DQnyD3VD.mjs';
|
|
8
8
|
import { a as FarmI18nClientSnapshot, d as FarmTranslator, c as FarmI18nLocale } from './types.d-C41ePjvP.mjs';
|
|
9
|
-
export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-
|
|
10
|
-
import './client-plugins.d-
|
|
9
|
+
export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-CnOTWOyi.mjs';
|
|
10
|
+
import './client-plugins.d-CgQQ-EAv.mjs';
|
|
11
11
|
import './lifecycle.d-C2aLBOwu.mjs';
|
|
12
12
|
import './route.d-BaVH3V0w.mjs';
|
|
13
13
|
import './endpoint.d-BkMSCRf6.mjs';
|
|
@@ -34,10 +34,10 @@ import './layers.d-CcS42OGR.mjs';
|
|
|
34
34
|
import 'rolldown/utils';
|
|
35
35
|
import 'rolldown';
|
|
36
36
|
import './image-config.d-CeDgNyX4.mjs';
|
|
37
|
-
import './config.d-
|
|
37
|
+
import './config.d-DqZkLwef.mjs';
|
|
38
38
|
import './font.mjs';
|
|
39
39
|
import './island.d-CfGru1MO.mjs';
|
|
40
|
-
import './render-plan.d-
|
|
40
|
+
import './render-plan.d-DZ-qjjdG.mjs';
|
|
41
41
|
|
|
42
42
|
interface FarmClientStore<TSnapshot> {
|
|
43
43
|
getSnapshot(): TSnapshot;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FarmRouterRouteInput } from './router.js';
|
|
2
|
-
import { a as FarmNavigationState, b as FarmNavigateOptions } from './spa-router.d-
|
|
2
|
+
import { a as FarmNavigationState, b as FarmNavigateOptions } from './spa-router.d-DAtnNoBe.js';
|
|
3
3
|
import { F as FarmClientCacheStatus } from './client-cache.d-Deoqq-nM.js';
|
|
4
4
|
import { ServerFn } from './server-fn.js';
|
|
5
5
|
import { ServerQuery } from './server-query.js';
|
|
6
6
|
import { S as ServerQueryFetchOptions } from './server-query-runtime.d-DXRNhX_3.js';
|
|
7
7
|
import { F as FarmThemeSnapshot, a as FarmThemePreference } from './types.d-DQnyD3VD.js';
|
|
8
8
|
import { a as FarmI18nClientSnapshot, d as FarmTranslator, c as FarmI18nLocale } from './types.d-C41ePjvP.js';
|
|
9
|
-
export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-
|
|
10
|
-
import './client-plugins.d-
|
|
9
|
+
export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-JXx40JzR.js';
|
|
10
|
+
import './client-plugins.d-vXrbcfJ1.js';
|
|
11
11
|
import './lifecycle.d-C2aLBOwu.js';
|
|
12
12
|
import './route.d-DBTEqifW.js';
|
|
13
13
|
import './endpoint.d-BgHn0lhl.js';
|
|
@@ -34,10 +34,10 @@ import './layers.d-CcS42OGR.js';
|
|
|
34
34
|
import 'rolldown/utils';
|
|
35
35
|
import 'rolldown';
|
|
36
36
|
import './image-config.d-CeDgNyX4.js';
|
|
37
|
-
import './config.d-
|
|
37
|
+
import './config.d-DqZkLwef.js';
|
|
38
38
|
import './font.js';
|
|
39
39
|
import './island.d-CfGru1MO.js';
|
|
40
|
-
import './render-plan.d-
|
|
40
|
+
import './render-plan.d-B9lAP3uX.js';
|
|
41
41
|
|
|
42
42
|
interface FarmClientStore<TSnapshot> {
|
|
43
43
|
getSnapshot(): TSnapshot;
|