@farm.js/core 0.1.86 → 0.2.0-beta.0
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.d-7uKdOttc.d.ts → agent-mcp.d-BdM0pIrD.d.ts} +1 -1
- package/dist/{agent-mcp.d-LChlR2au.d.mts → agent-mcp.d-CMGqpUbk.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/analyzer-B2TRJT3B.cjs +17 -0
- package/dist/{analyzer-I5S5YKHM.mjs → analyzer-PWHYGER6.mjs} +2 -2
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +5 -5
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +4 -4
- package/dist/{app-manifest.d-QMdmqqCr.d.mts → app-manifest.d-BeDB2OVm.d.mts} +1 -1
- package/dist/{app-manifest.d-CRp21oAz.d.ts → app-manifest.d-COhjPgHn.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-Bvpc2eJq.d.mts → app.d-AVZXCfcO.d.mts} +5 -4
- package/dist/{app.d-DEKpJEp4.d.ts → app.d-b3A4cca5.d.ts} +5 -4
- package/dist/{chunk-B7L24VPX.cjs → chunk-22KXTL3I.cjs} +6 -4
- package/dist/chunk-2HTNASSB.cjs +134 -0
- package/dist/{chunk-FULX5RYX.cjs → chunk-2OR5WAD5.cjs} +19 -13
- package/dist/{chunk-5P65LXGU.cjs → chunk-3MY6TNNE.cjs} +15 -14
- package/dist/{chunk-A4WWKG2B.cjs → chunk-5ZWXTIGE.cjs} +2 -2
- package/dist/{chunk-2NKNP4AH.cjs → chunk-6266WH6X.cjs} +1 -1
- package/dist/chunk-65LZRVCZ.mjs +18 -0
- package/dist/{chunk-L2IULWKV.cjs → chunk-7LBNWL3L.cjs} +3 -3
- package/dist/{chunk-KHIEGVG7.mjs → chunk-BGEA4K7C.mjs} +10 -4
- package/dist/{chunk-CVKTYG4L.mjs → chunk-BJHXFEAF.mjs} +2 -2
- package/dist/chunk-BQHIJOZM.cjs +13 -0
- package/dist/{chunk-IAERD73G.cjs → chunk-CFLRUCN7.cjs} +384 -339
- package/dist/{chunk-NXOZRI3B.cjs → chunk-CNGGEHXY.cjs} +2 -2
- package/dist/{chunk-3RVLJTFZ.mjs → chunk-D7LXBLUW.mjs} +1 -1
- package/dist/{chunk-B5QRNCIE.mjs → chunk-DATICPTO.mjs} +1 -1
- package/dist/{chunk-XMVZXZ32.cjs → chunk-ERV422FO.cjs} +2 -2
- package/dist/{chunk-BAD6T5NU.cjs → chunk-FEWCWBOF.cjs} +4 -4
- package/dist/{chunk-FLMALEY2.mjs → chunk-GGD57DJA.mjs} +3 -25
- package/dist/{chunk-HQ2VAJLW.mjs → chunk-GV5D5EM6.mjs} +1 -1
- package/dist/{chunk-6MZSTPD2.mjs → chunk-H47EH24T.mjs} +1 -1
- package/dist/{chunk-OBVBII5K.cjs → chunk-HU4R2PPW.cjs} +2 -2
- package/dist/{chunk-7H2TXT2K.mjs → chunk-HX5HLFBZ.mjs} +7 -0
- package/dist/{chunk-N3VMHPIY.mjs → chunk-HZY63K5C.mjs} +2 -2
- package/dist/{chunk-25JGHAGH.cjs → chunk-I2RBHZF7.cjs} +15 -8
- package/dist/{chunk-FDU4Q4QP.cjs → chunk-IRPXOTEN.cjs} +10 -4
- package/dist/{chunk-NAHDG6UX.mjs → chunk-JDO3X7RB.mjs} +6 -5
- package/dist/{chunk-TQJ35BBW.cjs → chunk-JGUMFTZT.cjs} +4 -4
- package/dist/chunk-JIGWHFA5.mjs +32 -0
- package/dist/{chunk-YBXIVQCE.cjs → chunk-JP5TWUK2.cjs} +4 -4
- package/dist/chunk-K6RMOB25.mjs +134 -0
- package/dist/{chunk-UGD53SNO.cjs → chunk-KQ6TYQU7.cjs} +16 -12
- package/dist/{chunk-6QYPP5KC.mjs → chunk-L6ZL35ZJ.mjs} +7 -5
- package/dist/{chunk-7UTRNV6R.mjs → chunk-LUGQUU4S.mjs} +1 -1
- package/dist/{chunk-QYWP5KDY.mjs → chunk-M4CNAZMS.mjs} +74 -29
- package/dist/{chunk-3TKGMIPX.mjs → chunk-MM4U2NNI.mjs} +91 -12
- package/dist/{chunk-CFKAYV7B.mjs → chunk-MRULVIH3.mjs} +1 -1
- package/dist/{chunk-UAQQUQWE.mjs → chunk-MZPPT5NA.mjs} +1 -1
- package/dist/{chunk-2UYYXSUS.mjs → chunk-N5NRXLCX.mjs} +4 -2
- package/dist/chunk-NDMPGFKL.cjs +47 -0
- package/dist/{chunk-YHM4PXJY.mjs → chunk-O5YM6GU3.mjs} +1 -1
- package/dist/{chunk-QYDGIXQ5.cjs → chunk-PA3VZNWU.cjs} +9 -9
- package/dist/{chunk-2PJVEL56.cjs → chunk-PCAEJNQF.cjs} +5 -27
- package/dist/{chunk-P253SZJF.cjs → chunk-PQ6DBVJ2.cjs} +360 -281
- package/dist/chunk-PTAGDZ7I.mjs +13 -0
- package/dist/{chunk-3AV4DCXY.mjs → chunk-PWTBXYJY.mjs} +12 -6
- package/dist/{chunk-PO5MZIWK.mjs → chunk-QBXS4TNG.mjs} +6 -2
- package/dist/chunk-QZUCVJZJ.cjs +18 -0
- package/dist/{chunk-45ANSCTO.mjs → chunk-SCOKBXHS.mjs} +98 -56
- package/dist/{chunk-BLZCAFGJ.cjs → chunk-SG5RFGV6.cjs} +2 -2
- package/dist/{chunk-U54REWMJ.cjs → chunk-SUACCCZG.cjs} +18 -16
- package/dist/chunk-TCGPBSVY.mjs +47 -0
- package/dist/{chunk-CN2JOTRO.cjs → chunk-THGSPDFD.cjs} +7 -7
- package/dist/{chunk-FWLXYNWA.cjs → chunk-TQFIZRON.cjs} +387 -345
- package/dist/{chunk-VGHDPEPQ.cjs → chunk-UA77C2ZA.cjs} +2 -2
- package/dist/{chunk-Q3YWQEUS.cjs → chunk-VMGQOP7X.cjs} +2 -2
- package/dist/{chunk-4SJ22WTT.mjs → chunk-W3ZBLFLU.mjs} +1 -1
- package/dist/{chunk-SB74WCKC.mjs → chunk-WOTAU3BN.mjs} +4 -4
- package/dist/{chunk-JB4BHRFK.cjs → chunk-WP77JDKI.cjs} +16 -16
- package/dist/{chunk-YMAE32O7.mjs → chunk-WPB6HJC7.mjs} +1 -1
- package/dist/{chunk-VPGEYX5Y.mjs → chunk-WX752VMN.mjs} +2 -2
- package/dist/{chunk-VTEAUQMT.mjs → chunk-X2SMVPLH.mjs} +19 -3
- package/dist/{chunk-DJ3PVHTW.cjs → chunk-XGPRM7OK.cjs} +3 -3
- package/dist/{chunk-GWPANDW3.mjs → chunk-XJJQAFZX.mjs} +1 -1
- package/dist/{chunk-UDWBTABT.cjs → chunk-XRYLMTYF.cjs} +3 -3
- package/dist/{chunk-PAENAKTC.mjs → chunk-YCHIR3X6.mjs} +1 -1
- package/dist/chunk-YIGUFJMR.cjs +32 -0
- package/dist/{chunk-CPSFDQKJ.cjs → chunk-Z43CIBUR.cjs} +20 -4
- package/dist/{chunk-RA5OUXOJ.mjs → chunk-ZOD6EYWE.mjs} +2 -2
- package/dist/{cli-runtime.d-DaElKjaL.d.ts → cli-runtime.d-jqZ7YCsm.d.ts} +5 -5
- package/dist/{cli-runtime.d-C7aMfoTq.d.mts → cli-runtime.d-qL44rqYO.d.mts} +5 -5
- package/dist/{client-component.d-miqIXyQv.d.mts → client-component.d-B2L2LyAr.d.mts} +1 -1
- package/dist/{client-component.d-CZG02pIh.d.ts → client-component.d-BDD5aiUb.d.ts} +1 -1
- package/dist/{client-plugins.d-BVXjyIkY.d.ts → client-plugins.d-Crct3m_r.d.ts} +14 -5
- package/dist/{client-plugins.d-BwKwuO_0.d.mts → client-plugins.d-Dzc3vOw_.d.mts} +14 -5
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +8 -6
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +7 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-DGC2247E.mjs → devtools-2CRVXV7E.mjs} +4 -2
- package/dist/{devtools-A3L7WNTB.cjs → devtools-RL4AU5KD.cjs} +5 -3
- package/dist/docs.cjs +6 -4
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +5 -3
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.mjs +3 -3
- package/dist/font.cjs +4 -2
- package/dist/font.d.mts +13 -1
- package/dist/font.d.ts +13 -1
- package/dist/font.mjs +3 -1
- package/dist/{handler.d-BKTWzzNA.d.mts → handler.d-B1S1ZBqS.d.mts} +1 -1
- package/dist/{handler.d-Dzpyg3-N.d.ts → handler.d-ZweCBJD4.d.ts} +1 -1
- package/dist/{headers.d-PZyXcDAH.d.ts → headers.d-BgBdQN8x.d.ts} +1 -1
- package/dist/{headers.d-5opjyhXw.d.mts → headers.d-C-yGl_f6.d.mts} +1 -1
- package/dist/i18n/client.cjs +11 -10
- package/dist/i18n/client.mjs +3 -2
- package/dist/image-attributes.d-BMPDQO1q.d.mts +55 -0
- package/dist/image-attributes.d-BMPDQO1q.d.ts +55 -0
- package/dist/image.cjs +5 -127
- package/dist/image.d.mts +3 -13
- package/dist/image.d.ts +3 -13
- package/dist/image.mjs +5 -127
- package/dist/index.cjs +40 -36
- package/dist/{index.d-C0Mie66f.d.mts → index.d-13h3oDu7.d.mts} +1 -1
- package/dist/{index.d-DV2q-0mE.d.ts → index.d-CtoniAXT.d.ts} +1 -1
- package/dist/index.d.mts +24 -23
- package/dist/index.d.ts +24 -23
- package/dist/index.mjs +35 -31
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +22 -22
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +21 -21
- package/dist/internal/cli-runtime.cjs +8 -6
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +7 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +77 -52
- package/dist/internal/client-runtime.d.mts +9 -7
- package/dist/internal/client-runtime.d.ts +9 -7
- package/dist/internal/client-runtime.mjs +64 -39
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +6 -4
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +5 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-boot.cjs +51 -18
- package/dist/internal/islands-boot.d.mts +3 -1
- package/dist/internal/islands-boot.d.ts +3 -1
- package/dist/internal/islands-boot.mjs +34 -1
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +6 -6
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +5 -5
- package/dist/internal/renderer-islands.cjs +35 -8
- package/dist/internal/renderer-islands.d.mts +9 -1
- package/dist/internal/renderer-islands.d.ts +9 -1
- package/dist/internal/renderer-islands.mjs +35 -8
- package/dist/internal/spa-router.cjs +4 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/spa-router.mjs +3 -2
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/{island-runtime.d-BA7EPo1v.d.ts → island-runtime.d-D2Mh5eTU.d.ts} +5 -1
- package/dist/{island-runtime.d-BBS_YUSX.d.mts → island-runtime.d-lrpEJlgg.d.mts} +5 -1
- package/dist/{manager-PX4QN4HK.cjs → manager-D4DZRBRS.cjs} +4 -4
- package/dist/{manager-OMTC5FOJ.mjs → manager-PKPQGBAE.mjs} +3 -3
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.mjs +3 -3
- package/dist/{mount.d-gWul1GA1.d.ts → mount.d-DyKlRR6z.d.ts} +1 -1
- package/dist/{mount.d-CZ_qL1iS.d.mts → mount.d-_6Un9wdK.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BBTzhJLj.d.mts → navigation-delegate.d-B9GjWbov.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BZsYEAet.d.ts → navigation-delegate.d-BbW1_pf_.d.ts} +1 -1
- package/dist/navigation.cjs +6 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +5 -4
- package/dist/{plugin-QOTAPTVV.mjs → plugin-EVKQZBNW.mjs} +1 -1
- package/dist/{plugin-3PT7I26P.cjs → plugin-MWO3G2XM.cjs} +2 -2
- package/dist/plugin.cjs +19 -19
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +18 -18
- package/dist/query/client.cjs +8 -7
- package/dist/query/client.mjs +3 -2
- package/dist/{render-plan.d-AaJsYPX-.d.ts → render-plan.d-D0FV9lDT.d.ts} +1 -1
- package/dist/{render-plan.d-bnWxS12w.d.mts → render-plan.d-DaM1NPnm.d.mts} +1 -1
- package/dist/renderer-client.cjs +19 -13
- package/dist/renderer-client.d.mts +6 -5
- package/dist/renderer-client.d.ts +6 -5
- package/dist/renderer-client.mjs +10 -4
- package/dist/renderer.cjs +3 -3
- package/dist/renderer.mjs +2 -2
- package/dist/{request.d-CAeitOG1.d.ts → request.d-CrXC7voZ.d.ts} +1 -1
- package/dist/{request.d-C2HOn3Hi.d.mts → request.d-DVSLilGx.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-CYA-ulnX.d.mts → route-rendering.d-CWi3UYtR.d.mts} +1 -1
- package/dist/{route-rendering.d-A1dIkUK5.d.ts → route-rendering.d-OfbM_rj8.d.ts} +1 -1
- package/dist/{router.d-A_Yt6jYz.d.ts → router.d-Bm9FNSu3.d.ts} +1 -1
- package/dist/{router.d-8lxnzlkr.d.mts → router.d-YKVirmj4.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-SNGPAXGW.cjs → rsc-pipeline-3DYC5ZXW.cjs} +6 -4
- package/dist/{rsc-pipeline-BROS3NEB.mjs → rsc-pipeline-LRB4ZG6I.mjs} +5 -3
- package/dist/{runtime-SLJLW37A.mjs → runtime-3WJNNAAR.mjs} +5 -3
- package/dist/{runtime-7T5TRAWL.cjs → runtime-CRFF32H6.cjs} +7 -5
- package/dist/{runtime.d-C_rZ9_DD.d.mts → runtime.d-BVj6apd0.d.mts} +1 -1
- package/dist/{runtime.d-BPyvWrgQ.d.ts → runtime.d-D7QYVJGO.d.ts} +1 -1
- package/dist/{server-components-status.d-BpxiEMQE.d.mts → server-components-status.d-BDVcxi0z.d.mts} +1 -1
- package/dist/{server-components-status.d-C2UEKJn7.d.ts → server-components-status.d-CfKDpmCH.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +54 -40
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +34 -20
- package/dist/{spa-router.d-BD-6WX1R.d.mts → spa-router.d-DGmropfK.d.mts} +5 -3
- package/dist/{spa-router.d-Cw5i_15e.d.ts → spa-router.d-nE1jHNGt.d.ts} +5 -3
- package/dist/{ssg.d-CCE9aob5.d.mts → ssg.d-DS-gXUbf.d.mts} +2 -2
- package/dist/{ssg.d-Bifiq0EL.d.ts → ssg.d-jXlUAKzg.d.ts} +2 -2
- package/dist/{store-core.d-5tVn5vi1.d.ts → store-core.d-B5cwOd8g.d.ts} +3 -2
- package/dist/{store-core.d-BN2MxSG9.d.mts → store-core.d-C-gATBwd.d.mts} +3 -2
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +3 -3
- package/dist/{utils.d-BUjpSNIO.d.ts → utils.d-BODwBtkz.d.ts} +1 -1
- package/dist/{utils.d-wGPLeVbq.d.mts → utils.d-Cmj-fzds.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +24 -22
- package/dist/vite.d.mts +21 -7
- package/dist/vite.d.ts +21 -7
- package/dist/vite.mjs +23 -21
- package/package.json +3 -3
- package/dist/analyzer-OEMQSLYT.cjs +0 -17
- package/dist/chunk-7EPYN7GW.cjs +0 -30
- package/dist/chunk-HZOMT5DY.mjs +0 -30
- package/dist/chunk-SBDWCDS6.cjs +0 -8
- package/dist/chunk-YX6AFPXC.mjs +0 -8
- package/dist/{chunk-4B6YJ5DS.cjs → chunk-4ZVKDHS6.cjs} +3 -3
- package/dist/{chunk-4EEAPBNV.mjs → chunk-PEQJ4UUT.mjs} +3 -3
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
createFarmMetadataHeadReconciler,
|
|
6
6
|
reconcileFarmDocumentHead
|
|
7
7
|
} from "../chunk-SE7HPBYK.mjs";
|
|
8
|
+
import {
|
|
9
|
+
readFarmLinkNavigateOptions,
|
|
10
|
+
targetsCurrentContext
|
|
11
|
+
} from "../chunk-65LZRVCZ.mjs";
|
|
8
12
|
import {
|
|
9
13
|
installChunkErrorRecovery
|
|
10
14
|
} from "../chunk-J7EUGGTY.mjs";
|
|
@@ -16,11 +20,14 @@ import {
|
|
|
16
20
|
getHashTargetElement,
|
|
17
21
|
runFarmNavigationDelegates
|
|
18
22
|
} from "../chunk-RSEAX5MW.mjs";
|
|
23
|
+
import {
|
|
24
|
+
rememberFarmLinkLocale
|
|
25
|
+
} from "../chunk-GGD57DJA.mjs";
|
|
19
26
|
import {
|
|
20
27
|
isFarmBlockedNavigationURL,
|
|
21
28
|
isFarmExternalNavigationURL,
|
|
22
|
-
|
|
23
|
-
} from "../chunk-
|
|
29
|
+
isFarmSameDocumentFragment
|
|
30
|
+
} from "../chunk-JIGWHFA5.mjs";
|
|
24
31
|
import {
|
|
25
32
|
createClientCancellation
|
|
26
33
|
} from "../chunk-H227LYHT.mjs";
|
|
@@ -177,7 +184,12 @@ function replayInteraction(interaction) {
|
|
|
177
184
|
function replayFarmQueuedInteraction(target, kind) {
|
|
178
185
|
replayInteraction({ target, kind: toReplayKind(kind) });
|
|
179
186
|
}
|
|
180
|
-
|
|
187
|
+
var FARM_ISLANDS_FORM_REF_PREFIX = "$F_REF_";
|
|
188
|
+
function postsServerAction(form, submitter) {
|
|
189
|
+
const named = (element) => !!element?.getAttribute("name")?.startsWith(FARM_ISLANDS_FORM_REF_PREFIX);
|
|
190
|
+
return named(submitter) || Array.from(form.elements).some(named);
|
|
191
|
+
}
|
|
192
|
+
function holdFarmIslandInteractions(island, load) {
|
|
181
193
|
const scope = window;
|
|
182
194
|
const queue = scope.__FARM_PREHYDRATION_CLICK_QUEUE__ ?? (scope.__FARM_PREHYDRATION_CLICK_QUEUE__ = []);
|
|
183
195
|
const pending = (node) => !!node.closest(island) && !node.closest('[data-farm-island-hydrated="true"]');
|
|
@@ -204,11 +216,36 @@ function holdFarmIslandInteractions(island) {
|
|
|
204
216
|
if (event.defaultPrevented || !(form instanceof Element) || form.nodeName !== "FORM") return;
|
|
205
217
|
if (pending(form)) hold(event, form, "submit");
|
|
206
218
|
};
|
|
219
|
+
const heldForms = /* @__PURE__ */ new Set();
|
|
220
|
+
const onServerFormSubmit = (event) => {
|
|
221
|
+
const form = event.target;
|
|
222
|
+
if (!load || event.defaultPrevented || !(form instanceof HTMLFormElement)) return;
|
|
223
|
+
const submitter = event.submitter ?? null;
|
|
224
|
+
if (!postsServerAction(form, submitter)) return;
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
if (heldForms.has(form)) return;
|
|
227
|
+
heldForms.add(form);
|
|
228
|
+
const submit = () => {
|
|
229
|
+
heldForms.delete(form);
|
|
230
|
+
if (!form.isConnected) return;
|
|
231
|
+
const button = submitter;
|
|
232
|
+
form.requestSubmit(button?.isConnected && button.form === form ? button : void 0);
|
|
233
|
+
};
|
|
234
|
+
load().then(submit, (error) => {
|
|
235
|
+
console.error(
|
|
236
|
+
"[Farm.js] The client runtime failed to load, so the form posts without it.",
|
|
237
|
+
error
|
|
238
|
+
);
|
|
239
|
+
submit();
|
|
240
|
+
});
|
|
241
|
+
};
|
|
207
242
|
document.addEventListener("click", onClick, true);
|
|
208
243
|
document.addEventListener("submit", onSubmit, true);
|
|
244
|
+
document.addEventListener("submit", onServerFormSubmit, false);
|
|
209
245
|
return () => {
|
|
210
246
|
document.removeEventListener("click", onClick, true);
|
|
211
247
|
document.removeEventListener("submit", onSubmit, true);
|
|
248
|
+
document.removeEventListener("submit", onServerFormSubmit, false);
|
|
212
249
|
};
|
|
213
250
|
}
|
|
214
251
|
function watchFarmIslandTriggers(scope, island, due) {
|
|
@@ -291,13 +328,6 @@ function scheduleFarmIslandHydration({
|
|
|
291
328
|
}) {
|
|
292
329
|
const resolvedStrategy = strategy ?? "load";
|
|
293
330
|
if (signal?.aborted) return Promise.resolve(void 0);
|
|
294
|
-
if (resolvedStrategy === "load") {
|
|
295
|
-
return Promise.resolve().then(() => signal?.aborted ? void 0 : hydrate()).then((value) => {
|
|
296
|
-
if (signal?.aborted) return void 0;
|
|
297
|
-
finishIslandHydration(container);
|
|
298
|
-
return value;
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
331
|
return new Promise((resolve, reject) => {
|
|
302
332
|
let started = false;
|
|
303
333
|
let cancelled = false;
|
|
@@ -323,7 +353,7 @@ function scheduleFarmIslandHydration({
|
|
|
323
353
|
if (started || cancelled) return;
|
|
324
354
|
started = true;
|
|
325
355
|
cleanupTriggers();
|
|
326
|
-
Promise.resolve().then(hydrate).then(
|
|
356
|
+
Promise.resolve().then(() => cancelled || signal?.aborted ? void 0 : hydrate()).then(
|
|
327
357
|
(value) => {
|
|
328
358
|
cleanup();
|
|
329
359
|
if (cancelled || signal?.aborted) return;
|
|
@@ -346,23 +376,6 @@ function scheduleFarmIslandHydration({
|
|
|
346
376
|
signal.addEventListener("abort", abort, { once: true });
|
|
347
377
|
removeAbortListener = () => signal.removeEventListener("abort", abort);
|
|
348
378
|
}
|
|
349
|
-
if (resolvedStrategy === "idle") {
|
|
350
|
-
triggerCleanups.add(runWhenIdle(start));
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
if (resolvedStrategy === "visible") {
|
|
354
|
-
if (typeof IntersectionObserver !== "function") {
|
|
355
|
-
start();
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
const targets = container.getClientRects().length > 0 ? [container] : Array.from(container.children);
|
|
359
|
-
if (targets.length === 0) {
|
|
360
|
-
start();
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
triggerCleanups.add(observeIslandVisibility(container.ownerDocument, targets, start));
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
379
|
const hold = (event, target, kind) => {
|
|
367
380
|
const interaction = { target, kind };
|
|
368
381
|
if (!submitsForm(interaction) || !held.some((item) => item.target === target)) {
|
|
@@ -412,7 +425,27 @@ function scheduleFarmIslandHydration({
|
|
|
412
425
|
listen(type, activationHandlers[type], true);
|
|
413
426
|
}
|
|
414
427
|
listen("farm:island-interaction", activateFromInteraction, false);
|
|
415
|
-
if (hasQueuedTarget(container))
|
|
428
|
+
if (resolvedStrategy === "load" || hasQueuedTarget(container)) {
|
|
429
|
+
start();
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
if (resolvedStrategy === "idle") {
|
|
433
|
+
triggerCleanups.add(runWhenIdle(start));
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (resolvedStrategy === "visible") {
|
|
437
|
+
if (typeof IntersectionObserver !== "function") {
|
|
438
|
+
start();
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
const targets = container.getClientRects().length > 0 ? [container] : Array.from(container.children);
|
|
442
|
+
if (targets.length === 0) {
|
|
443
|
+
start();
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
triggerCleanups.add(observeIslandVisibility(container.ownerDocument, targets, start));
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
416
449
|
});
|
|
417
450
|
}
|
|
418
451
|
|
|
@@ -467,16 +500,6 @@ function createPluginlessClientRuntime() {
|
|
|
467
500
|
};
|
|
468
501
|
}
|
|
469
502
|
|
|
470
|
-
// src/client/link-navigation.ts
|
|
471
|
-
function readFarmLinkNavigateOptions(anchor) {
|
|
472
|
-
const viewTransition = anchor.getAttribute("data-view-transition");
|
|
473
|
-
return {
|
|
474
|
-
replace: anchor.hasAttribute("data-replace"),
|
|
475
|
-
scroll: !anchor.hasAttribute("data-no-scroll"),
|
|
476
|
-
viewTransition: viewTransition === "auto" ? "auto" : viewTransition === "true"
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
|
|
480
503
|
// src/mobile/client.ts
|
|
481
504
|
var farmMobileShellClient = {
|
|
482
505
|
setup() {
|
|
@@ -505,6 +528,7 @@ export {
|
|
|
505
528
|
installFarmLinkPrefetch,
|
|
506
529
|
isFarmBlockedNavigationURL,
|
|
507
530
|
isFarmExternalNavigationURL,
|
|
531
|
+
isFarmSameDocumentFragment,
|
|
508
532
|
keepFarmIslandValues,
|
|
509
533
|
readFarmLinkNavigateOptions,
|
|
510
534
|
reconcileFarmDocumentHead,
|
|
@@ -517,5 +541,6 @@ export {
|
|
|
517
541
|
setFarmBasePath,
|
|
518
542
|
setFarmTrailingSlashPreference,
|
|
519
543
|
stripFarmBasePath,
|
|
544
|
+
targetsCurrentContext,
|
|
520
545
|
watchFarmIslandTriggers
|
|
521
546
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as FarmRequest, G as FarmResponse, I as FarmPluginContext, F as FarmPlugin } from '../client-plugins.d-
|
|
1
|
+
import { E as FarmRequest, G as FarmResponse, I as FarmPluginContext, F as FarmPlugin } from '../client-plugins.d-Dzc3vOw_.mjs';
|
|
2
2
|
import '../lifecycle.d-OtGWAvJT.mjs';
|
|
3
3
|
import '../route.d-ShmtqqVQ.mjs';
|
|
4
4
|
import '../endpoint.d-BXbBpKoh.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as FarmRequest, G as FarmResponse, I as FarmPluginContext, F as FarmPlugin } from '../client-plugins.d-
|
|
1
|
+
import { E as FarmRequest, G as FarmResponse, I as FarmPluginContext, F as FarmPlugin } from '../client-plugins.d-Crct3m_r.js';
|
|
2
2
|
import '../lifecycle.d-OtGWAvJT.js';
|
|
3
3
|
import '../route.d-Cd4Fi6BA.js';
|
|
4
4
|
import '../endpoint.d-Dx_1k6Du.js';
|
|
@@ -5,7 +5,7 @@ var _chunkMF3IA2AWcjs = require('../chunk-MF3IA2AW.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkIRPXOTENcjs = require('../chunk-IRPXOTEN.cjs');
|
|
9
9
|
require('../chunk-OZC2JPW6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -21,6 +21,7 @@ require('../chunk-L2GUEYHR.cjs');
|
|
|
21
21
|
require('../chunk-IIHZ2BEE.cjs');
|
|
22
22
|
require('../chunk-LSHX2H5G.cjs');
|
|
23
23
|
require('../chunk-STF6VDYQ.cjs');
|
|
24
|
+
require('../chunk-Z43CIBUR.cjs');
|
|
24
25
|
require('../chunk-EACD6ND7.cjs');
|
|
25
26
|
require('../chunk-BTVDYS4B.cjs');
|
|
26
27
|
require('../chunk-OLKYHTLN.cjs');
|
|
@@ -28,7 +29,7 @@ require('../chunk-6JHZPB52.cjs');
|
|
|
28
29
|
require('../chunk-MNUYXZV7.cjs');
|
|
29
30
|
require('../chunk-52Q4OB4A.cjs');
|
|
30
31
|
require('../chunk-T7UC2ORA.cjs');
|
|
31
|
-
require('../chunk-
|
|
32
|
+
require('../chunk-7KJJ4SBS.cjs');
|
|
32
33
|
require('../chunk-HQKCSJEH.cjs');
|
|
33
34
|
require('../chunk-XRFGOYXG.cjs');
|
|
34
35
|
require('../chunk-3EIPOTZV.cjs');
|
|
@@ -64,6 +65,7 @@ require('../chunk-PLJMEUAN.cjs');
|
|
|
64
65
|
require('../chunk-HA7YRO53.cjs');
|
|
65
66
|
require('../chunk-L6E5BSNU.cjs');
|
|
66
67
|
require('../chunk-PMJSG4JS.cjs');
|
|
68
|
+
require('../chunk-MCSRMEQV.cjs');
|
|
67
69
|
require('../chunk-6FXBJPF5.cjs');
|
|
68
70
|
require('../chunk-NLBHLPEO.cjs');
|
|
69
71
|
require('../chunk-DVJM55D2.cjs');
|
|
@@ -81,7 +83,7 @@ require('../chunk-UZM3PDKK.cjs');
|
|
|
81
83
|
|
|
82
84
|
// src/config-runtime.ts
|
|
83
85
|
function loadFarmMobileRuntime() {
|
|
84
|
-
return import("../runtime-
|
|
86
|
+
return import("../runtime-CRFF32H6.cjs");
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
|
|
@@ -97,4 +99,4 @@ function loadFarmMobileRuntime() {
|
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
|
|
100
|
-
exports.createFarmDesktopContext = _chunkAQLHD6HZcjs.createFarmDesktopContext; exports.getFarmDesktopOutputDirs = _chunkAQLHD6HZcjs.getFarmDesktopOutputDirs; exports.installFarmDesktopSetup = _chunkAQLHD6HZcjs.installFarmDesktopSetup; exports.loadConfig =
|
|
102
|
+
exports.createFarmDesktopContext = _chunkAQLHD6HZcjs.createFarmDesktopContext; exports.getFarmDesktopOutputDirs = _chunkAQLHD6HZcjs.getFarmDesktopOutputDirs; exports.installFarmDesktopSetup = _chunkAQLHD6HZcjs.installFarmDesktopSetup; exports.loadConfig = _chunkIRPXOTENcjs.loadConfig; exports.loadFarmMobileRuntime = loadFarmMobileRuntime; exports.loadFarmProductionVite = _chunkMF3IA2AWcjs.loadFarmProductionVite; exports.logger = _chunk7U4XF76Rcjs.logger; exports.resolveConfig = _chunkIRPXOTENcjs.resolveConfig; exports.resolveDeployConfig = _chunkIRPXOTENcjs.resolveDeployConfig; exports.resolveFarmDesktopBlock = _chunkAQLHD6HZcjs.resolveFarmDesktopBlock; exports.resolveFarmDesktopConfig = _chunkAQLHD6HZcjs.resolveFarmDesktopConfig; exports.setFarmDesktopDevSession = _chunkAQLHD6HZcjs.setFarmDesktopDevSession; exports.validateFarmDesktopConfig = _chunkAQLHD6HZcjs.validateFarmDesktopConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { J as ResolvedFarmConfig, x as FarmUserConfig } from '../client-plugins.d-
|
|
2
|
-
export { bu as FarmDesktopDevSession, bv as FarmDesktopSetupOptions, bw as createFarmDesktopContext, bx as getFarmDesktopOutputDirs, by as installFarmDesktopSetup, K as loadConfig, N as resolveConfig, O as resolveDeployConfig, bz as resolveFarmDesktopBlock, bA as resolveFarmDesktopConfig, bB as setFarmDesktopDevSession, bC as validateFarmDesktopConfig } from '../client-plugins.d-
|
|
1
|
+
import { J as ResolvedFarmConfig, x as FarmUserConfig } from '../client-plugins.d-Dzc3vOw_.mjs';
|
|
2
|
+
export { bu as FarmDesktopDevSession, bv as FarmDesktopSetupOptions, bw as createFarmDesktopContext, bx as getFarmDesktopOutputDirs, by as installFarmDesktopSetup, K as loadConfig, N as resolveConfig, O as resolveDeployConfig, bz as resolveFarmDesktopBlock, bA as resolveFarmDesktopConfig, bB as setFarmDesktopDevSession, bC as validateFarmDesktopConfig } from '../client-plugins.d-Dzc3vOw_.mjs';
|
|
3
3
|
import { P as PlatformRouteFiles } from '../generate-route-types.d-BFOMM8Ef.mjs';
|
|
4
4
|
import { F as FarmMobileOS, i as FarmMobileNativeEngine, g as FarmMobileNativeAuto, o as FarmMobileRouteScreen, p as FarmMobileScreen, e as FarmMobileContext, R as ResolvedFarmMobileConfig, a as FarmMobileAppModules, x as FarmMobileBlockCache, c as FarmMobileBudgets, d as FarmMobileConfigInput, y as FarmMobileContextOptions, h as FarmMobileNativeConfig, j as FarmMobileNativeRouteConfig, k as FarmMobilePageConfig, l as FarmMobilePrefetch, m as FarmMobilePresentation, z as FarmMobileResolveOptions, n as FarmMobileRouteConfig, q as FarmMobileTab, r as FarmMobileUserConfig, A as ResolvedFarmMobileNativeConfig, B as createFarmMobileContext, C as resolveFarmMobileBlock, D as resolveFarmMobileConfig, E as resolveFarmMobileServer, G as validateFarmMobileConfig, H as validateFarmMobilePageConfig } from '../config.d-BKIhJtmr.mjs';
|
|
5
5
|
import { c as FarmMobileTier, d as FarmMobileScreenSource, e as FarmMobileRouteAnalysis, f as FarmMobileScreenDecision, g as FarmMobileAnalyzerStats, b as FarmMobileShellManifest, F as FarmMobileRouteManifest, h as FarmMobileBlocker, i as FarmMobileBlockerRule, j as FarmMobilePageExport, k as FarmMobileRouteManifestOptions, a as FarmMobileRouteRule, l as FarmMobileScreens, m as FarmMobileScreensOptions, n as FarmUiNode, o as createFarmMobileModuleId, p as createFarmMobileRouteManifest, q as createFarmMobileRoutePattern, r as readFarmMobilePageExport, s as resolveFarmMobileScreens } from '../routes.d-BWvpUoYu.mjs';
|
|
6
6
|
import { F as FARM_SHELL_PARAM_SEGMENT, a as FARM_SHELL_RENDER_HEADER, b as FARM_SHELL_ROUTE_HEADER, c as createFarmMobileShellRenderPath } from '../shell-render.d-CG6bPiiA.mjs';
|
|
7
7
|
export { F as FarmProductionViteRuntime, l as loadFarmProductionVite } from '../production-vite.d-BQFAlG7n.mjs';
|
|
8
|
-
export { l as logger } from '../utils.d-
|
|
8
|
+
export { l as logger } from '../utils.d-Cmj-fzds.mjs';
|
|
9
9
|
import '../lifecycle.d-OtGWAvJT.mjs';
|
|
10
10
|
import '../route.d-ShmtqqVQ.mjs';
|
|
11
11
|
import '../endpoint.d-BXbBpKoh.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { J as ResolvedFarmConfig, x as FarmUserConfig } from '../client-plugins.d-
|
|
2
|
-
export { bu as FarmDesktopDevSession, bv as FarmDesktopSetupOptions, bw as createFarmDesktopContext, bx as getFarmDesktopOutputDirs, by as installFarmDesktopSetup, K as loadConfig, N as resolveConfig, O as resolveDeployConfig, bz as resolveFarmDesktopBlock, bA as resolveFarmDesktopConfig, bB as setFarmDesktopDevSession, bC as validateFarmDesktopConfig } from '../client-plugins.d-
|
|
1
|
+
import { J as ResolvedFarmConfig, x as FarmUserConfig } from '../client-plugins.d-Crct3m_r.js';
|
|
2
|
+
export { bu as FarmDesktopDevSession, bv as FarmDesktopSetupOptions, bw as createFarmDesktopContext, bx as getFarmDesktopOutputDirs, by as installFarmDesktopSetup, K as loadConfig, N as resolveConfig, O as resolveDeployConfig, bz as resolveFarmDesktopBlock, bA as resolveFarmDesktopConfig, bB as setFarmDesktopDevSession, bC as validateFarmDesktopConfig } from '../client-plugins.d-Crct3m_r.js';
|
|
3
3
|
import { P as PlatformRouteFiles } from '../generate-route-types.d-C2m8myHb.js';
|
|
4
4
|
import { F as FarmMobileOS, i as FarmMobileNativeEngine, g as FarmMobileNativeAuto, o as FarmMobileRouteScreen, p as FarmMobileScreen, e as FarmMobileContext, R as ResolvedFarmMobileConfig, a as FarmMobileAppModules, x as FarmMobileBlockCache, c as FarmMobileBudgets, d as FarmMobileConfigInput, y as FarmMobileContextOptions, h as FarmMobileNativeConfig, j as FarmMobileNativeRouteConfig, k as FarmMobilePageConfig, l as FarmMobilePrefetch, m as FarmMobilePresentation, z as FarmMobileResolveOptions, n as FarmMobileRouteConfig, q as FarmMobileTab, r as FarmMobileUserConfig, A as ResolvedFarmMobileNativeConfig, B as createFarmMobileContext, C as resolveFarmMobileBlock, D as resolveFarmMobileConfig, E as resolveFarmMobileServer, G as validateFarmMobileConfig, H as validateFarmMobilePageConfig } from '../config.d-BKIhJtmr.js';
|
|
5
5
|
import { c as FarmMobileTier, d as FarmMobileScreenSource, e as FarmMobileRouteAnalysis, f as FarmMobileScreenDecision, g as FarmMobileAnalyzerStats, b as FarmMobileShellManifest, F as FarmMobileRouteManifest, h as FarmMobileBlocker, i as FarmMobileBlockerRule, j as FarmMobilePageExport, k as FarmMobileRouteManifestOptions, a as FarmMobileRouteRule, l as FarmMobileScreens, m as FarmMobileScreensOptions, n as FarmUiNode, o as createFarmMobileModuleId, p as createFarmMobileRouteManifest, q as createFarmMobileRoutePattern, r as readFarmMobilePageExport, s as resolveFarmMobileScreens } from '../routes.d-D7RWvfqL.js';
|
|
6
6
|
import { F as FARM_SHELL_PARAM_SEGMENT, a as FARM_SHELL_RENDER_HEADER, b as FARM_SHELL_ROUTE_HEADER, c as createFarmMobileShellRenderPath } from '../shell-render.d-CG6bPiiA.js';
|
|
7
7
|
export { F as FarmProductionViteRuntime, l as loadFarmProductionVite } from '../production-vite.d-BQFAlG7n.js';
|
|
8
|
-
export { l as logger } from '../utils.d-
|
|
8
|
+
export { l as logger } from '../utils.d-BODwBtkz.js';
|
|
9
9
|
import '../lifecycle.d-OtGWAvJT.js';
|
|
10
10
|
import '../route.d-Cd4Fi6BA.js';
|
|
11
11
|
import '../endpoint.d-Dx_1k6Du.js';
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
resolveConfig,
|
|
7
7
|
resolveDeployConfig
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-BGEA4K7C.mjs";
|
|
9
9
|
import "../chunk-VISQDC6W.mjs";
|
|
10
10
|
import {
|
|
11
11
|
createFarmDesktopContext,
|
|
@@ -21,6 +21,7 @@ import "../chunk-5V6HSJFG.mjs";
|
|
|
21
21
|
import "../chunk-YVVY276M.mjs";
|
|
22
22
|
import "../chunk-XR2ZIBQK.mjs";
|
|
23
23
|
import "../chunk-CU5SYTJG.mjs";
|
|
24
|
+
import "../chunk-X2SMVPLH.mjs";
|
|
24
25
|
import "../chunk-NQ3Y6E2T.mjs";
|
|
25
26
|
import "../chunk-SQ5O7I3L.mjs";
|
|
26
27
|
import "../chunk-XGL42MQ7.mjs";
|
|
@@ -28,7 +29,7 @@ import "../chunk-22W4FNTG.mjs";
|
|
|
28
29
|
import "../chunk-RJBUI5AN.mjs";
|
|
29
30
|
import "../chunk-Z3RM3VA2.mjs";
|
|
30
31
|
import "../chunk-HV6CYSMF.mjs";
|
|
31
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-S32PDOLO.mjs";
|
|
32
33
|
import "../chunk-7VJXYB6S.mjs";
|
|
33
34
|
import "../chunk-NLATR3T3.mjs";
|
|
34
35
|
import "../chunk-N33DLJBC.mjs";
|
|
@@ -64,6 +65,7 @@ import "../chunk-EILUVBKS.mjs";
|
|
|
64
65
|
import "../chunk-GYMGK467.mjs";
|
|
65
66
|
import "../chunk-GLVDXRG2.mjs";
|
|
66
67
|
import "../chunk-W6QLRQ3V.mjs";
|
|
68
|
+
import "../chunk-AOIUYHPH.mjs";
|
|
67
69
|
import "../chunk-WCLLPR6H.mjs";
|
|
68
70
|
import "../chunk-IWJONXPF.mjs";
|
|
69
71
|
import "../chunk-4O26BPUY.mjs";
|
|
@@ -81,7 +83,7 @@ import "../chunk-TIZJYHB7.mjs";
|
|
|
81
83
|
|
|
82
84
|
// src/config-runtime.ts
|
|
83
85
|
function loadFarmMobileRuntime() {
|
|
84
|
-
return import("../runtime-
|
|
86
|
+
return import("../runtime-3WJNNAAR.mjs");
|
|
85
87
|
}
|
|
86
88
|
export {
|
|
87
89
|
createFarmDesktopContext,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkFEWCWBOFcjs = require('../chunk-FEWCWBOF.cjs');
|
|
5
|
+
require('../chunk-JGUMFTZT.cjs');
|
|
6
6
|
require('../chunk-W53Z4WDI.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-CNGGEHXY.cjs');
|
|
8
8
|
require('../chunk-BTVDYS4B.cjs');
|
|
9
9
|
require('../chunk-OLKYHTLN.cjs');
|
|
10
10
|
require('../chunk-2NOHVIJ3.cjs');
|
|
@@ -16,7 +16,7 @@ require('../chunk-2OF5RPVU.cjs');
|
|
|
16
16
|
require('../chunk-7Q7UB4TL.cjs');
|
|
17
17
|
require('../chunk-JYT7AN37.cjs');
|
|
18
18
|
require('../chunk-PLJMEUAN.cjs');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-6266WH6X.cjs');
|
|
20
20
|
require('../chunk-L6E5BSNU.cjs');
|
|
21
21
|
require('../chunk-PMJSG4JS.cjs');
|
|
22
22
|
require('../chunk-NLBHLPEO.cjs');
|
|
@@ -30,8 +30,8 @@ require('../chunk-3BIASUGR.cjs');
|
|
|
30
30
|
require('../chunk-UZM3PDKK.cjs');
|
|
31
31
|
|
|
32
32
|
// src/infra-analytics-runtime.ts
|
|
33
|
-
var createFarmInfraAnalyticsPlugin2 = (options) =>
|
|
34
|
-
var createFarmInfraAnalyticsRecorder2 = (options) =>
|
|
33
|
+
var createFarmInfraAnalyticsPlugin2 = (options) => _chunkFEWCWBOFcjs.createFarmInfraAnalyticsPlugin.call(void 0, void 0, void 0, options);
|
|
34
|
+
var createFarmInfraAnalyticsRecorder2 = (options) => _chunkFEWCWBOFcjs.createFarmInfraAnalyticsRecorder.call(void 0, void 0, void 0, options);
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmInfraAnalyticsPlugin,
|
|
3
3
|
createFarmInfraAnalyticsRecorder
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-MRULVIH3.mjs";
|
|
5
|
+
import "../chunk-BJHXFEAF.mjs";
|
|
6
6
|
import "../chunk-HR4N2K4V.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-LUGQUU4S.mjs";
|
|
8
8
|
import "../chunk-SQ5O7I3L.mjs";
|
|
9
9
|
import "../chunk-XGL42MQ7.mjs";
|
|
10
10
|
import "../chunk-YU2MNIIY.mjs";
|
|
@@ -16,7 +16,7 @@ import "../chunk-2I6PUKWJ.mjs";
|
|
|
16
16
|
import "../chunk-YT2ZMLXK.mjs";
|
|
17
17
|
import "../chunk-D2LCAV6L.mjs";
|
|
18
18
|
import "../chunk-EILUVBKS.mjs";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-XJJQAFZX.mjs";
|
|
20
20
|
import "../chunk-GLVDXRG2.mjs";
|
|
21
21
|
import "../chunk-W6QLRQ3V.mjs";
|
|
22
22
|
import "../chunk-IWJONXPF.mjs";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
|
|
2
|
+
|
|
3
|
+
var _chunkYIGUFJMRcjs = require('../chunk-YIGUFJMR.cjs');
|
|
4
|
+
require('../chunk-UZM3PDKK.cjs');
|
|
2
5
|
|
|
3
6
|
// src/client/islands-boot.ts
|
|
4
7
|
var FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = 'button,[role="button"],input[type="button"],input[type="submit"],input[type="reset"]';
|
|
@@ -7,6 +10,11 @@ var FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER = "x-farm-deployment-id";
|
|
|
7
10
|
var FARM_ISLANDS_BOOT_PREFETCHING_LINK = 'a[data-farm-link]:not([data-farm-prefetch="none"])';
|
|
8
11
|
var ISLAND = "f-island";
|
|
9
12
|
var HYDRATED_ISLAND = '[data-farm-island-hydrated="true"]';
|
|
13
|
+
var FARM_ISLANDS_BOOT_FORM_REF_PREFIX = "$F_REF_";
|
|
14
|
+
function postsServerAction(form, submitter) {
|
|
15
|
+
const named = (element) => !!_optionalChain([element, 'optionalAccess', _ => _.getAttribute, 'call', _2 => _2("name"), 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4(FARM_ISLANDS_BOOT_FORM_REF_PREFIX)]);
|
|
16
|
+
return named(submitter) || Array.from(form.elements).some(named);
|
|
17
|
+
}
|
|
10
18
|
function submitsForm(target, kind) {
|
|
11
19
|
if (kind === "submit") return true;
|
|
12
20
|
const control = target;
|
|
@@ -17,25 +25,26 @@ function isModified(event) {
|
|
|
17
25
|
}
|
|
18
26
|
function heldClickTarget(target) {
|
|
19
27
|
const link = target.closest("a[href]");
|
|
20
|
-
if (link) return _optionalChain([link, 'access',
|
|
28
|
+
if (link) return _optionalChain([link, 'access', _5 => _5.getAttribute, 'call', _6 => _6("href"), 'optionalAccess', _7 => _7.startsWith, 'call', _8 => _8("#")]) ? link : null;
|
|
21
29
|
return target.closest(FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR);
|
|
22
30
|
}
|
|
23
31
|
function pendingIsland(node, root) {
|
|
24
32
|
if (node.closest(HYDRATED_ISLAND)) return null;
|
|
25
|
-
return _nullishCoalesce(node.closest(ISLAND), () => ( (_optionalChain([root, 'optionalAccess',
|
|
33
|
+
return _nullishCoalesce(node.closest(ISLAND), () => ( (_optionalChain([root, 'optionalAccess', _9 => _9.contains, 'call', _10 => _10(node)]) ? root : null)));
|
|
26
34
|
}
|
|
27
35
|
function routedLink(target) {
|
|
28
36
|
const anchor = target instanceof Element ? target.closest("a") : null;
|
|
29
|
-
const href = _optionalChain([anchor, 'optionalAccess',
|
|
37
|
+
const href = _optionalChain([anchor, 'optionalAccess', _11 => _11.getAttribute, 'call', _12 => _12("href")]);
|
|
30
38
|
if (!anchor || !href) return null;
|
|
31
39
|
if (anchor.hasAttribute("download") || href.startsWith("#") || href.startsWith("//")) return null;
|
|
32
40
|
if (/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(href)) return null;
|
|
33
|
-
|
|
41
|
+
const linkTarget = anchor.target || _optionalChain([document, 'access', _13 => _13.querySelector, 'call', _14 => _14("base[target]"), 'optionalAccess', _15 => _15.target]);
|
|
42
|
+
if (linkTarget && linkTarget !== "_self") return null;
|
|
34
43
|
return anchor;
|
|
35
44
|
}
|
|
36
45
|
function loadFarmClientEntry() {
|
|
37
46
|
const boot = document.querySelector("script[data-farm-runtime]");
|
|
38
|
-
const src = _optionalChain([boot, 'optionalAccess',
|
|
47
|
+
const src = _optionalChain([boot, 'optionalAccess', _16 => _16.dataset, 'access', _17 => _17.farmRuntime]);
|
|
39
48
|
if (!boot || !src) {
|
|
40
49
|
return Promise.reject(new Error("The boot script has no data-farm-runtime attribute."));
|
|
41
50
|
}
|
|
@@ -58,19 +67,19 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
58
67
|
const cleanups = [];
|
|
59
68
|
let loading;
|
|
60
69
|
const script = document.querySelector("script[data-farm-runtime]");
|
|
61
|
-
const rootId = _optionalChain([script, 'optionalAccess',
|
|
70
|
+
const rootId = _optionalChain([script, 'optionalAccess', _18 => _18.dataset, 'access', _19 => _19.farmRoot]);
|
|
62
71
|
const root = rootId ? document.getElementById(rootId) : null;
|
|
63
72
|
const preloaded = /* @__PURE__ */ new Set();
|
|
64
|
-
const runtime = new URL(_nullishCoalesce(_optionalChain([script, 'optionalAccess',
|
|
73
|
+
const runtime = new URL(_nullishCoalesce(_optionalChain([script, 'optionalAccess', _20 => _20.dataset, 'access', _21 => _21.farmRuntime]), () => ( "")), document.baseURI);
|
|
65
74
|
const modulepreload = (file) => {
|
|
66
75
|
const link = document.createElement("link");
|
|
67
76
|
link.rel = "modulepreload";
|
|
68
77
|
link.href = new URL(file, runtime).href;
|
|
69
|
-
if (_optionalChain([script, 'optionalAccess',
|
|
78
|
+
if (_optionalChain([script, 'optionalAccess', _22 => _22.nonce])) link.nonce = script.nonce;
|
|
70
79
|
document.head.append(link);
|
|
71
80
|
};
|
|
72
81
|
const preload = (group) => {
|
|
73
|
-
const files = _optionalChain([script, 'optionalAccess',
|
|
82
|
+
const files = _optionalChain([script, 'optionalAccess', _23 => _23.dataset, 'access', _24 => _24[group]]);
|
|
74
83
|
if (!script || !files || preloaded.has(group)) return;
|
|
75
84
|
preloaded.add(group);
|
|
76
85
|
for (const file of files.split(" ")) modulepreload(file);
|
|
@@ -146,10 +155,11 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
146
155
|
};
|
|
147
156
|
for (const type of ["pointerdown", "focusin", "mouseover"]) listen(type, observe, true);
|
|
148
157
|
const requestPage = (href) => {
|
|
158
|
+
if (_chunkYIGUFJMRcjs.isFarmSameDocumentFragment.call(void 0, href, location.href)) return;
|
|
149
159
|
const scope = window;
|
|
150
160
|
const early = scope.__FARM_EARLY_NAVIGATION__;
|
|
151
|
-
if (_optionalChain([early, 'optionalAccess',
|
|
152
|
-
_optionalChain([early, 'optionalAccess',
|
|
161
|
+
if (_optionalChain([early, 'optionalAccess', _25 => _25.url]) === href && Date.now() - early.at <= 3e4) return;
|
|
162
|
+
_optionalChain([early, 'optionalAccess', _26 => _26.controller, 'access', _27 => _27.abort, 'call', _28 => _28()]);
|
|
153
163
|
const headers = { accept: "text/html" };
|
|
154
164
|
const content = _nullishCoalesce(document.getElementById("root"), () => ( document.body));
|
|
155
165
|
const held = new Set(
|
|
@@ -179,7 +189,7 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
179
189
|
(event) => {
|
|
180
190
|
const press = event;
|
|
181
191
|
const anchor = routedLink(press.target);
|
|
182
|
-
if (press.button || isModified(press) || !_optionalChain([anchor, 'optionalAccess',
|
|
192
|
+
if (press.button || isModified(press) || !_optionalChain([anchor, 'optionalAccess', _29 => _29.matches, 'call', _30 => _30(FARM_ISLANDS_BOOT_PREFETCHING_LINK)])) {
|
|
183
193
|
return;
|
|
184
194
|
}
|
|
185
195
|
requestPage(anchor.href);
|
|
@@ -207,6 +217,28 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
207
217
|
},
|
|
208
218
|
false
|
|
209
219
|
);
|
|
220
|
+
const heldForms = /* @__PURE__ */ new Set();
|
|
221
|
+
listen(
|
|
222
|
+
"submit",
|
|
223
|
+
(event) => {
|
|
224
|
+
const form = event.target;
|
|
225
|
+
if (event.defaultPrevented || !(form instanceof HTMLFormElement)) return;
|
|
226
|
+
const submitter = _nullishCoalesce(event.submitter, () => ( null));
|
|
227
|
+
if (!postsServerAction(form, submitter)) return;
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
if (heldForms.has(form)) return;
|
|
230
|
+
heldForms.add(form);
|
|
231
|
+
const submit = () => {
|
|
232
|
+
heldForms.delete(form);
|
|
233
|
+
if (!form.isConnected) return;
|
|
234
|
+
const button = submitter;
|
|
235
|
+
form.requestSubmit(_optionalChain([button, 'optionalAccess', _31 => _31.isConnected]) && button.form === form ? button : void 0);
|
|
236
|
+
};
|
|
237
|
+
start().then(submit, submit);
|
|
238
|
+
forTarget(form);
|
|
239
|
+
},
|
|
240
|
+
false
|
|
241
|
+
);
|
|
210
242
|
const visibility = typeof IntersectionObserver === "function" ? new IntersectionObserver(
|
|
211
243
|
(entries) => {
|
|
212
244
|
if (entries.some((entry) => entry.isIntersecting)) void start();
|
|
@@ -218,7 +250,7 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
218
250
|
const idleWindow = window;
|
|
219
251
|
if (typeof idleWindow.requestIdleCallback === "function") {
|
|
220
252
|
const handle = idleWindow.requestIdleCallback(callback, { timeout: 2e3 });
|
|
221
|
-
cleanups.push(() => _optionalChain([idleWindow, 'access',
|
|
253
|
+
cleanups.push(() => _optionalChain([idleWindow, 'access', _32 => _32.cancelIdleCallback, 'optionalCall', _33 => _33(handle)]));
|
|
222
254
|
} else {
|
|
223
255
|
const handle = window.setTimeout(callback, 1);
|
|
224
256
|
cleanups.push(() => window.clearTimeout(handle));
|
|
@@ -237,7 +269,7 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
237
269
|
else for (const target of targets) visibility.observe(target);
|
|
238
270
|
};
|
|
239
271
|
const considerIsland = (island) => {
|
|
240
|
-
if (_optionalChain([island, 'access',
|
|
272
|
+
if (_optionalChain([island, 'access', _34 => _34.parentElement, 'optionalAccess', _35 => _35.closest, 'call', _36 => _36(ISLAND)])) return;
|
|
241
273
|
const strategy = island.getAttribute("strategy");
|
|
242
274
|
if (strategy === "interaction") return;
|
|
243
275
|
if (strategy === "idle") startWhenIdle();
|
|
@@ -260,7 +292,7 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
260
292
|
consider(document.documentElement);
|
|
261
293
|
if (rootId && !root) void start();
|
|
262
294
|
else if (root && !loading) {
|
|
263
|
-
const strategy = _optionalChain([script, 'optionalAccess',
|
|
295
|
+
const strategy = _optionalChain([script, 'optionalAccess', _37 => _37.dataset, 'access', _38 => _38.farmRootStrategy]);
|
|
264
296
|
if (strategy === "idle") startWhenIdle();
|
|
265
297
|
else if (strategy === "visible") observeVisible(root);
|
|
266
298
|
else if (strategy !== "interaction") void start();
|
|
@@ -284,7 +316,7 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
284
316
|
}
|
|
285
317
|
const prefetch = () => {
|
|
286
318
|
const connection = navigator.connection;
|
|
287
|
-
if (loading || !_optionalChain([script, 'optionalAccess',
|
|
319
|
+
if (loading || !_optionalChain([script, 'optionalAccess', _39 => _39.dataset, 'access', _40 => _40.farmRuntime]) || _optionalChain([connection, 'optionalAccess', _41 => _41.saveData])) return;
|
|
288
320
|
modulepreload(runtime.href);
|
|
289
321
|
preload("farmPreload");
|
|
290
322
|
preload("farmPreloadRouter");
|
|
@@ -302,4 +334,5 @@ function startFarmIslandsBoot(load = loadFarmClientEntry) {
|
|
|
302
334
|
|
|
303
335
|
|
|
304
336
|
|
|
305
|
-
|
|
337
|
+
|
|
338
|
+
exports.FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER = FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER; exports.FARM_ISLANDS_BOOT_FORM_REF_PREFIX = FARM_ISLANDS_BOOT_FORM_REF_PREFIX; exports.FARM_ISLANDS_BOOT_PREFETCHING_LINK = FARM_ISLANDS_BOOT_PREFETCHING_LINK; exports.FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR; exports.FARM_ISLANDS_BOOT_VISIBLE_MARGIN = FARM_ISLANDS_BOOT_VISIBLE_MARGIN; exports.startFarmIslandsBoot = startFarmIslandsBoot;
|
|
@@ -22,7 +22,9 @@ interface FarmEarlyNavigation {
|
|
|
22
22
|
declare const FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER = "x-farm-deployment-id";
|
|
23
23
|
/** A `Link` that prefetches, as its attributes say (resolveLinkAttributes); a test compares them. */
|
|
24
24
|
declare const FARM_ISLANDS_BOOT_PREFETCHING_LINK = "a[data-farm-link]:not([data-farm-prefetch=\"none\"])";
|
|
25
|
+
/** Kept equal to islx's FORM_REF_PREFIX, which names a server form's action field; a test compares them. */
|
|
26
|
+
declare const FARM_ISLANDS_BOOT_FORM_REF_PREFIX = "$F_REF_";
|
|
25
27
|
/** Starts the runtime when the page first needs it. `load` runs it; it starts as it runs. */
|
|
26
28
|
declare function startFarmIslandsBoot(load?: () => Promise<unknown>): void;
|
|
27
29
|
|
|
28
|
-
export { FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER, FARM_ISLANDS_BOOT_PREFETCHING_LINK, FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, type FarmEarlyNavigation, startFarmIslandsBoot };
|
|
30
|
+
export { FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER, FARM_ISLANDS_BOOT_FORM_REF_PREFIX, FARM_ISLANDS_BOOT_PREFETCHING_LINK, FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, type FarmEarlyNavigation, startFarmIslandsBoot };
|
|
@@ -22,7 +22,9 @@ interface FarmEarlyNavigation {
|
|
|
22
22
|
declare const FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER = "x-farm-deployment-id";
|
|
23
23
|
/** A `Link` that prefetches, as its attributes say (resolveLinkAttributes); a test compares them. */
|
|
24
24
|
declare const FARM_ISLANDS_BOOT_PREFETCHING_LINK = "a[data-farm-link]:not([data-farm-prefetch=\"none\"])";
|
|
25
|
+
/** Kept equal to islx's FORM_REF_PREFIX, which names a server form's action field; a test compares them. */
|
|
26
|
+
declare const FARM_ISLANDS_BOOT_FORM_REF_PREFIX = "$F_REF_";
|
|
25
27
|
/** Starts the runtime when the page first needs it. `load` runs it; it starts as it runs. */
|
|
26
28
|
declare function startFarmIslandsBoot(load?: () => Promise<unknown>): void;
|
|
27
29
|
|
|
28
|
-
export { FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER, FARM_ISLANDS_BOOT_PREFETCHING_LINK, FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, type FarmEarlyNavigation, startFarmIslandsBoot };
|
|
30
|
+
export { FARM_ISLANDS_BOOT_DEPLOYMENT_HEADER, FARM_ISLANDS_BOOT_FORM_REF_PREFIX, FARM_ISLANDS_BOOT_PREFETCHING_LINK, FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, type FarmEarlyNavigation, startFarmIslandsBoot };
|