@farm.js/core 0.1.42 → 0.1.43
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-ssVy_tea.d.mts → agent-mcp-3KDz4hr9.d.mts} +1 -1
- package/dist/{agent-mcp-SSD6L3VZ.d.ts → agent-mcp-6yRebHk7.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +2 -2
- package/dist/api.d.mts +8 -3
- package/dist/api.d.ts +8 -3
- package/dist/api.mjs +1 -1
- package/dist/{app-KjFzdCqy.d.ts → app-8Db1zR-2.d.ts} +8 -4
- package/dist/{app-1h3lVT4a.d.mts → app-DlTWv4cn.d.mts} +8 -4
- package/dist/{app-manifest-D3RkVNuS.d.mts → app-manifest-TRzS7ZZ9.d.mts} +1 -1
- package/dist/{app-manifest-DaW8-tvX.d.ts → app-manifest-cO2jkG1F.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{chunk-ECKF2BAM.cjs → chunk-2GVF3C2F.cjs} +255 -42
- package/dist/chunk-2NXO5SBY.mjs +57 -0
- package/dist/chunk-3BROEWFY.cjs +39 -0
- package/dist/{chunk-NU25TRIO.mjs → chunk-4MRQ5OKQ.mjs} +11 -7
- package/dist/{chunk-375K2ZVU.mjs → chunk-4OCEMK72.mjs} +259 -48
- package/dist/{chunk-6PKXK4TY.mjs → chunk-53ZV6K65.mjs} +1 -1
- package/dist/{chunk-LYIZHJTK.cjs → chunk-5LPHJZSI.cjs} +14 -14
- package/dist/chunk-5NIWBWDD.mjs +97 -0
- package/dist/{chunk-NRDBW4MP.mjs → chunk-7IQQIPRZ.mjs} +10 -0
- package/dist/{chunk-QTEJGB5A.mjs → chunk-7SCCY6SI.mjs} +79 -176
- package/dist/chunk-APDGOKKE.cjs +148 -0
- package/dist/chunk-AZBSVLRM.cjs +132 -0
- package/dist/{chunk-ZS6HDNOM.cjs → chunk-BKPXWRTT.cjs} +6 -6
- package/dist/chunk-CEDPEDNW.cjs +98 -0
- package/dist/chunk-D5RFPV2H.mjs +148 -0
- package/dist/{chunk-724JLMS4.mjs → chunk-F646BZ4Y.mjs} +4 -2
- package/dist/{chunk-C5KVWHIH.cjs → chunk-G2Z5DGMS.cjs} +5 -3
- package/dist/{chunk-7YHSD3Z6.cjs → chunk-GVNCWSQV.cjs} +83 -29
- package/dist/{chunk-24SP5TGU.mjs → chunk-H4LXPWI2.mjs} +2 -2
- package/dist/chunk-H7BLEEAE.cjs +57 -0
- package/dist/{chunk-QKZMB7LY.cjs → chunk-HUMEHX24.cjs} +2 -2
- package/dist/{chunk-BD3D7EZV.cjs → chunk-IXFOBGLQ.cjs} +9 -3
- package/dist/{chunk-JG3MEQUH.cjs → chunk-JDJAPCR2.cjs} +420 -209
- package/dist/{chunk-MHN4UR5U.cjs → chunk-KFZZFZ7J.cjs} +7 -7
- package/dist/chunk-LRJRXXQZ.cjs +109 -0
- package/dist/{chunk-BXJ5HJTJ.cjs → chunk-LVABUXLA.cjs} +15 -11
- package/dist/{chunk-HCSVR4YZ.mjs → chunk-M3BXTWJM.mjs} +18 -0
- package/dist/{chunk-2JZHQDUY.mjs → chunk-NXO75WY4.mjs} +1 -1
- package/dist/{chunk-TUL355PH.mjs → chunk-OYSGGV6O.mjs} +135 -160
- package/dist/{chunk-JR4QCLJY.cjs → chunk-PDU4P2IC.cjs} +19 -1
- package/dist/chunk-PJEHUSHA.mjs +229 -0
- package/dist/chunk-QGH2RQVF.mjs +132 -0
- package/dist/{chunk-YWMZUGIS.mjs → chunk-R3ZFQJEF.mjs} +247 -34
- package/dist/{chunk-ZATTDMBW.cjs → chunk-RACQTC7K.cjs} +270 -367
- package/dist/{chunk-WSOBCAYO.cjs → chunk-RQYTOFQM.cjs} +23 -23
- package/dist/chunk-S34OBRMZ.mjs +109 -0
- package/dist/{chunk-TS4JHGUJ.mjs → chunk-S3ZEMCE6.mjs} +9 -3
- package/dist/{chunk-WWFTAUFG.cjs → chunk-SBH2JLLF.cjs} +12 -2
- package/dist/{chunk-YSLWRWWP.cjs → chunk-SKK6UF5P.cjs} +200 -46
- package/dist/chunk-T7J7E63D.cjs +144 -0
- package/dist/{chunk-PIZXONIS.mjs → chunk-TESO7EFU.mjs} +55 -1
- package/dist/{chunk-TCJ4A4A2.cjs → chunk-VIVQERJ5.cjs} +318 -344
- package/dist/{chunk-JIYYX7WU.mjs → chunk-VLXNGUKO.mjs} +1 -1
- package/dist/{chunk-OFZUJMCU.mjs → chunk-WPJQN64R.mjs} +195 -41
- package/dist/chunk-XARSG2TG.mjs +144 -0
- package/dist/chunk-XUGFRFD2.mjs +39 -0
- package/dist/{chunk-AHFRQMRX.cjs → chunk-YBDSTNMH.cjs} +1 -1
- package/dist/{chunk-U2UC7UGP.mjs → chunk-YGZH4T2X.mjs} +1 -1
- package/dist/chunk-YKUEJ3MG.cjs +229 -0
- package/dist/{chunk-IVQY6UTY.mjs → chunk-ZYWJIPKQ.mjs} +1 -1
- package/dist/{client-plugins-C9Py_50W.d.mts → client-plugins-Cv0OJtnM.d.mts} +21 -2
- package/dist/{client-plugins-DIem0I0W.d.ts → client-plugins-kwQuZcWq.d.ts} +21 -2
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +4 -3
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +3 -2
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-Q3LBNUJ7.mjs → devtools-M22FEFPK.mjs} +3 -3
- package/dist/{devtools-2RY3EKHL.cjs → devtools-MLB3JJMC.cjs} +4 -4
- package/dist/docs.cjs +5 -5
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +4 -4
- package/dist/index-CQOp8EmB.d.mts +48 -0
- package/dist/index-DAl0QTZS.d.ts +48 -0
- package/dist/index.cjs +40 -23
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +45 -28
- 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 +28 -14
- package/dist/internal/build-runtime.d.mts +12 -16
- package/dist/internal/build-runtime.d.ts +12 -16
- package/dist/internal/build-runtime.mjs +27 -13
- package/dist/internal/cli-runtime.cjs +22 -10
- package/dist/internal/cli-runtime.mjs +22 -10
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -1
- package/dist/internal/client-runtime.d.mts +1 -0
- package/dist/internal/client-runtime.d.ts +1 -0
- package/dist/internal/client-runtime.mjs +4 -0
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +4 -4
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/form-actions-client.cjs +18 -0
- package/dist/internal/form-actions-client.d.mts +5 -0
- package/dist/internal/form-actions-client.d.ts +5 -0
- package/dist/internal/form-actions-client.mjs +18 -0
- package/dist/internal/form-actions.cjs +18 -0
- package/dist/internal/form-actions.d.mts +14 -0
- package/dist/internal/form-actions.d.ts +14 -0
- package/dist/internal/form-actions.mjs +18 -0
- package/dist/internal/island-codec.cjs +22 -0
- package/dist/internal/island-codec.d.mts +29 -0
- package/dist/internal/island-codec.d.ts +29 -0
- package/dist/internal/island-codec.mjs +22 -0
- package/dist/internal/island-value-store.cjs +13 -0
- package/dist/internal/island-value-store.d.mts +6 -0
- package/dist/internal/island-value-store.d.ts +6 -0
- package/dist/internal/island-value-store.mjs +13 -0
- package/dist/internal/islands-runtime.cjs +77 -0
- package/dist/internal/islands-runtime.d.mts +57 -0
- package/dist/internal/islands-runtime.d.ts +57 -0
- package/dist/internal/islands-runtime.mjs +77 -0
- package/dist/internal/islands-server.cjs +19 -0
- package/dist/internal/islands-server.d.mts +3 -0
- package/dist/internal/islands-server.d.ts +3 -0
- package/dist/internal/islands-server.mjs +19 -0
- package/dist/internal/islx-client.cjs +5 -0
- package/dist/internal/islx-client.d.mts +2 -0
- package/dist/internal/islx-client.d.ts +2 -0
- package/dist/internal/islx-client.mjs +3 -0
- package/dist/internal/islx-react.cjs +4 -0
- package/dist/internal/islx-react.d.mts +1 -0
- package/dist/internal/islx-react.d.ts +1 -0
- package/dist/internal/islx-react.mjs +2 -0
- package/dist/internal/islx-server.cjs +5 -0
- package/dist/internal/islx-server.d.mts +2 -0
- package/dist/internal/islx-server.d.ts +2 -0
- package/dist/internal/islx-server.mjs +3 -0
- package/dist/internal/isolated-boundary.cjs +4 -3
- package/dist/internal/isolated-boundary.d.mts +13 -1
- package/dist/internal/isolated-boundary.d.ts +13 -1
- package/dist/internal/isolated-boundary.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +23 -6
- package/dist/internal/production-runtime.d.mts +20 -10
- package/dist/internal/production-runtime.d.ts +20 -10
- package/dist/internal/production-runtime.mjs +23 -6
- package/dist/internal/server-tree.cjs +6 -3
- package/dist/internal/server-tree.d.mts +25 -2
- package/dist/internal/server-tree.d.ts +25 -2
- package/dist/internal/server-tree.mjs +7 -4
- package/dist/island-value-protocol-BRayRghM.d.mts +12 -0
- package/dist/island-value-protocol-BRayRghM.d.ts +12 -0
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/navigation.cjs +5 -4
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +4 -3
- package/dist/og.d.mts +5 -0
- package/dist/og.d.ts +5 -0
- package/dist/plugin.cjs +17 -11
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +16 -10
- package/dist/{production-runtime-bjjWq-DA.d.ts → production-runtime-5nArjFpn.d.ts} +1 -1
- package/dist/{production-runtime-CHFKIgpW.d.mts → production-runtime-BzsF2z5F.d.mts} +1 -1
- package/dist/query/client.cjs +6 -5
- package/dist/query/client.mjs +2 -1
- package/dist/{render-plan-DOHg6wdO.d.mts → render-plan-B9yQorV4.d.mts} +4 -2
- package/dist/{render-plan-B2UndB4x.d.ts → render-plan-fg6E_HvL.d.ts} +4 -2
- package/dist/renderer/react/server.cjs +7 -6
- package/dist/renderer/react/server.d.mts +3 -1
- package/dist/renderer/react/server.d.ts +3 -1
- package/dist/renderer/react/server.mjs +5 -4
- package/dist/renderer-client.cjs +5 -4
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +2 -1
- package/dist/renderer.d.mts +3 -1
- package/dist/renderer.d.ts +3 -1
- package/dist/{request-DQcGfdgQ.d.mts → request-C4j_g-BH.d.mts} +1 -1
- package/dist/{request-DVNXRQrI.d.ts → request-gz8vFK0n.d.ts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-B_6fj-GG.d.ts → route-rendering-DamyKVi3.d.ts} +1 -1
- package/dist/{route-rendering-CEX4mFn-.d.mts → route-rendering-iTTOwz1f.d.mts} +1 -1
- package/dist/{router-CKHPBKXX.d.mts → router-EoSzHlos.d.mts} +1 -1
- package/dist/{router-CHEMHm1P.d.ts → router-OVjDqVo8.d.ts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/rsc-pipeline-LK4K5JFK.mjs +77 -0
- package/dist/rsc-pipeline-YCDRJME4.cjs +77 -0
- package/dist/{runtime-Br2ZDTAv.d.ts → runtime-CwiuozLd.d.ts} +1 -1
- package/dist/{runtime-jj8TKNsy.d.mts → runtime-DDH4tiuF.d.mts} +1 -1
- package/dist/{schema-dev-notice-5JPE67AI.cjs → schema-dev-notice-77ZL23PL.cjs} +4 -4
- package/dist/{schema-dev-notice-WLPZ6WKU.mjs → schema-dev-notice-BLXOS6U2.mjs} +2 -2
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +55 -37
- package/dist/server.d.mts +15 -10
- package/dist/server.d.ts +15 -10
- package/dist/server.mjs +35 -17
- package/dist/{spa-router-BEvS9Erj.d.mts → spa-router-Br4qFCWf.d.mts} +8 -3
- package/dist/{spa-router-DmCuH5B7.d.ts → spa-router-BsWUKH73.d.ts} +8 -3
- package/dist/{ssg-gT093ETk.d.ts → ssg-Csy2vwpi.d.ts} +2 -2
- package/dist/{ssg-57v6cZcW.d.mts → ssg-Donyfcxy.d.mts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils-CCTKvR-P.d.ts → utils-Luk72LXC.d.ts} +1 -1
- package/dist/{utils-raHHQVyL.d.mts → utils-d_k1ZZw0.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +17 -11
- package/dist/vite.d.mts +6 -4
- package/dist/vite.d.ts +6 -4
- package/dist/vite.mjs +16 -10
- package/package.json +53 -1
- package/dist/{chunk-35WS7P2V.mjs → chunk-26CXZR6L.mjs} +3 -3
- package/dist/{chunk-QEILRWVV.cjs → chunk-3XEMGDBF.cjs} +2 -2
- package/dist/{chunk-BPOTSHDO.cjs → chunk-IOAUK4OI.cjs} +2 -2
- package/dist/{chunk-BYR3RQPB.mjs → chunk-T76H22WI.mjs} +4 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The reference for an action passed as a prop: one per action, so props keep their identity. */
|
|
2
|
+
declare function getFarmFormActionStub(id: string): (...args: any[]) => any;
|
|
3
|
+
declare function createFarmFormActionStub(id: string): (...args: any[]) => any;
|
|
4
|
+
|
|
5
|
+
export { createFarmFormActionStub, getFarmFormActionStub };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The reference for an action passed as a prop: one per action, so props keep their identity. */
|
|
2
|
+
declare function getFarmFormActionStub(id: string): (...args: any[]) => any;
|
|
3
|
+
declare function createFarmFormActionStub(id: string): (...args: any[]) => any;
|
|
4
|
+
|
|
5
|
+
export { createFarmFormActionStub, getFarmFormActionStub };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/form-actions-client.ts
|
|
6
|
+
import { createServerReference } from "@farm.js/islx/client";
|
|
7
|
+
function getFarmFormActionStub(id) {
|
|
8
|
+
return createServerReference(id);
|
|
9
|
+
}
|
|
10
|
+
__name(getFarmFormActionStub, "getFarmFormActionStub");
|
|
11
|
+
function createFarmFormActionStub(id) {
|
|
12
|
+
return createServerReference(id);
|
|
13
|
+
}
|
|
14
|
+
__name(createFarmFormActionStub, "createFarmFormActionStub");
|
|
15
|
+
export {
|
|
16
|
+
createFarmFormActionStub,
|
|
17
|
+
getFarmFormActionStub
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunk3BROEWFYcjs = require('../chunk-3BROEWFY.cjs');
|
|
6
|
+
require('../chunk-P4TYB4SF.cjs');
|
|
7
|
+
require('../chunk-SVRTJOUF.cjs');
|
|
8
|
+
require('../chunk-5NAVKJCZ.cjs');
|
|
9
|
+
require('../chunk-4TLUFAIP.cjs');
|
|
10
|
+
require('../chunk-ZEG3OPIB.cjs');
|
|
11
|
+
require('../chunk-OX6O6WVA.cjs');
|
|
12
|
+
require('../chunk-NO3WWW3N.cjs');
|
|
13
|
+
require('../chunk-S3JO3N4H.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.FARM_FORM_ACTION_HEADER = _chunk3BROEWFYcjs.FARM_FORM_ACTION_HEADER; exports.handleFarmFormActionRequest = _chunk3BROEWFYcjs.handleFarmFormActionRequest; exports.registerFarmFormAction = _chunk3BROEWFYcjs.registerFarmFormAction;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedFarmServerActionsConfig } from '../server-action-security.mjs';
|
|
2
|
+
import '../server-fn-error-DDh14a0V.mjs';
|
|
3
|
+
|
|
4
|
+
/** The header carrying the action id for calls from client components. */
|
|
5
|
+
declare const FARM_FORM_ACTION_HEADER = "F-Action";
|
|
6
|
+
/** Registers a `"use server"` export. Kept for modules compiled before islx registered them. */
|
|
7
|
+
declare function registerFarmFormAction<T>(action: T, id: string): T;
|
|
8
|
+
/**
|
|
9
|
+
* Runs a server action posted to a page: a form submission, or a call from a client component.
|
|
10
|
+
* Returns `null` for any other request, which then renders as usual.
|
|
11
|
+
*/
|
|
12
|
+
declare function handleFarmFormActionRequest(request: Request, config: ResolvedFarmServerActionsConfig): Promise<Response | null>;
|
|
13
|
+
|
|
14
|
+
export { FARM_FORM_ACTION_HEADER, handleFarmFormActionRequest, registerFarmFormAction };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedFarmServerActionsConfig } from '../server-action-security.js';
|
|
2
|
+
import '../server-fn-error-DDh14a0V.js';
|
|
3
|
+
|
|
4
|
+
/** The header carrying the action id for calls from client components. */
|
|
5
|
+
declare const FARM_FORM_ACTION_HEADER = "F-Action";
|
|
6
|
+
/** Registers a `"use server"` export. Kept for modules compiled before islx registered them. */
|
|
7
|
+
declare function registerFarmFormAction<T>(action: T, id: string): T;
|
|
8
|
+
/**
|
|
9
|
+
* Runs a server action posted to a page: a form submission, or a call from a client component.
|
|
10
|
+
* Returns `null` for any other request, which then renders as usual.
|
|
11
|
+
*/
|
|
12
|
+
declare function handleFarmFormActionRequest(request: Request, config: ResolvedFarmServerActionsConfig): Promise<Response | null>;
|
|
13
|
+
|
|
14
|
+
export { FARM_FORM_ACTION_HEADER, handleFarmFormActionRequest, registerFarmFormAction };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_FORM_ACTION_HEADER,
|
|
3
|
+
handleFarmFormActionRequest,
|
|
4
|
+
registerFarmFormAction
|
|
5
|
+
} from "../chunk-XUGFRFD2.mjs";
|
|
6
|
+
import "../chunk-WMHG64DA.mjs";
|
|
7
|
+
import "../chunk-FP2INE7H.mjs";
|
|
8
|
+
import "../chunk-ZZGQD7A4.mjs";
|
|
9
|
+
import "../chunk-P7XDC7UJ.mjs";
|
|
10
|
+
import "../chunk-4SIYUGRY.mjs";
|
|
11
|
+
import "../chunk-CBBLJMR5.mjs";
|
|
12
|
+
import "../chunk-55YI3RRB.mjs";
|
|
13
|
+
import "../chunk-LPEX4YW6.mjs";
|
|
14
|
+
export {
|
|
15
|
+
FARM_FORM_ACTION_HEADER,
|
|
16
|
+
handleFarmFormActionRequest,
|
|
17
|
+
registerFarmFormAction
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkYKUEJ3MGcjs = require('../chunk-YKUEJ3MG.cjs');
|
|
11
|
+
require('../chunk-H7BLEEAE.cjs');
|
|
12
|
+
require('../chunk-S3JO3N4H.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.NOT_A_FARM_MARKER = _chunkYKUEJ3MGcjs.NOT_A_FARM_MARKER; exports.decodeFarmJson = _chunkYKUEJ3MGcjs.decodeFarmJson; exports.decodeFarmTagged = _chunkYKUEJ3MGcjs.decodeFarmTagged; exports.encodeFarmJson = _chunkYKUEJ3MGcjs.encodeFarmJson; exports.encodeFarmLeaf = _chunkYKUEJ3MGcjs.encodeFarmLeaf; exports.farmPlainObject = _chunkYKUEJ3MGcjs.farmPlainObject; exports.farmTagged = _chunkYKUEJ3MGcjs.farmTagged; exports.needsFarmObjectTag = _chunkYKUEJ3MGcjs.needsFarmObjectTag;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** A tagged object. */
|
|
2
|
+
declare function farmTagged(tag: string, value?: unknown): Record<string, unknown>;
|
|
3
|
+
/** Whether a plain object must travel wrapped as `o`, because its own keys include `$`. */
|
|
4
|
+
declare function needsFarmObjectTag(object: object): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The tag for a value JSON cannot hold and that has no children (everything above but `M`, `S`
|
|
7
|
+
* and `o`), or undefined when the value needs none.
|
|
8
|
+
*/
|
|
9
|
+
declare function encodeFarmLeaf(value: unknown): Record<string, unknown> | undefined;
|
|
10
|
+
/** Returned by `decodeFarmTagged` for the runtime's reference tags (`r`, `s`, `a`). */
|
|
11
|
+
declare const NOT_A_FARM_MARKER: unique symbol;
|
|
12
|
+
/** A plain object from entries; `defineProperty`, so a "__proto__" key stays an ordinary key. */
|
|
13
|
+
declare function farmPlainObject(entries: Iterable<[string, unknown]>): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* The value a tagged object stands for, decoding children (a `Map`'s or `Set`'s entries, an `o`
|
|
16
|
+
* object's properties) with `decodeChild`. Returns `NOT_A_FARM_MARKER` for the runtime's reference
|
|
17
|
+
* tags, and throws for an unknown or malformed tag.
|
|
18
|
+
*/
|
|
19
|
+
declare function decodeFarmTagged(object: Record<string, unknown>, decodeChild: (value: unknown) => unknown): unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Encodes a value for JSON with the tags above: plain objects, arrays and the types listed.
|
|
22
|
+
* Functions, symbols, class instances and circular values throw. Used for server action
|
|
23
|
+
* arguments and results.
|
|
24
|
+
*/
|
|
25
|
+
declare function encodeFarmJson(value: unknown, seen?: Set<object>): unknown;
|
|
26
|
+
/** Decodes what `encodeFarmJson` produced, after `JSON.parse`. Reference tags are rejected. */
|
|
27
|
+
declare function decodeFarmJson(value: unknown): unknown;
|
|
28
|
+
|
|
29
|
+
export { NOT_A_FARM_MARKER, decodeFarmJson, decodeFarmTagged, encodeFarmJson, encodeFarmLeaf, farmPlainObject, farmTagged, needsFarmObjectTag };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** A tagged object. */
|
|
2
|
+
declare function farmTagged(tag: string, value?: unknown): Record<string, unknown>;
|
|
3
|
+
/** Whether a plain object must travel wrapped as `o`, because its own keys include `$`. */
|
|
4
|
+
declare function needsFarmObjectTag(object: object): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The tag for a value JSON cannot hold and that has no children (everything above but `M`, `S`
|
|
7
|
+
* and `o`), or undefined when the value needs none.
|
|
8
|
+
*/
|
|
9
|
+
declare function encodeFarmLeaf(value: unknown): Record<string, unknown> | undefined;
|
|
10
|
+
/** Returned by `decodeFarmTagged` for the runtime's reference tags (`r`, `s`, `a`). */
|
|
11
|
+
declare const NOT_A_FARM_MARKER: unique symbol;
|
|
12
|
+
/** A plain object from entries; `defineProperty`, so a "__proto__" key stays an ordinary key. */
|
|
13
|
+
declare function farmPlainObject(entries: Iterable<[string, unknown]>): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* The value a tagged object stands for, decoding children (a `Map`'s or `Set`'s entries, an `o`
|
|
16
|
+
* object's properties) with `decodeChild`. Returns `NOT_A_FARM_MARKER` for the runtime's reference
|
|
17
|
+
* tags, and throws for an unknown or malformed tag.
|
|
18
|
+
*/
|
|
19
|
+
declare function decodeFarmTagged(object: Record<string, unknown>, decodeChild: (value: unknown) => unknown): unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Encodes a value for JSON with the tags above: plain objects, arrays and the types listed.
|
|
22
|
+
* Functions, symbols, class instances and circular values throw. Used for server action
|
|
23
|
+
* arguments and results.
|
|
24
|
+
*/
|
|
25
|
+
declare function encodeFarmJson(value: unknown, seen?: Set<object>): unknown;
|
|
26
|
+
/** Decodes what `encodeFarmJson` produced, after `JSON.parse`. Reference tags are rejected. */
|
|
27
|
+
declare function decodeFarmJson(value: unknown): unknown;
|
|
28
|
+
|
|
29
|
+
export { NOT_A_FARM_MARKER, decodeFarmJson, decodeFarmTagged, encodeFarmJson, encodeFarmLeaf, farmPlainObject, farmTagged, needsFarmObjectTag };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NOT_A_FARM_MARKER,
|
|
3
|
+
decodeFarmJson,
|
|
4
|
+
decodeFarmTagged,
|
|
5
|
+
encodeFarmJson,
|
|
6
|
+
encodeFarmLeaf,
|
|
7
|
+
farmPlainObject,
|
|
8
|
+
farmTagged,
|
|
9
|
+
needsFarmObjectTag
|
|
10
|
+
} from "../chunk-PJEHUSHA.mjs";
|
|
11
|
+
import "../chunk-2NXO5SBY.mjs";
|
|
12
|
+
import "../chunk-LPEX4YW6.mjs";
|
|
13
|
+
export {
|
|
14
|
+
NOT_A_FARM_MARKER,
|
|
15
|
+
decodeFarmJson,
|
|
16
|
+
decodeFarmTagged,
|
|
17
|
+
encodeFarmJson,
|
|
18
|
+
encodeFarmLeaf,
|
|
19
|
+
farmPlainObject,
|
|
20
|
+
farmTagged,
|
|
21
|
+
needsFarmObjectTag
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
|
|
4
|
+
|
|
5
|
+
// src/client/island-value-store.ts
|
|
6
|
+
var _client = require('@farm.js/islx/client');
|
|
7
|
+
function getFarmIslandValueStore() {
|
|
8
|
+
return _client.getValueStore.call(void 0, );
|
|
9
|
+
}
|
|
10
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getFarmIslandValueStore, "getFarmIslandValueStore");
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.getFarmIslandValueStore = getFarmIslandValueStore;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/client/island-value-store.ts
|
|
6
|
+
import { getValueStore } from "@farm.js/islx/client";
|
|
7
|
+
function getFarmIslandValueStore() {
|
|
8
|
+
return getValueStore();
|
|
9
|
+
}
|
|
10
|
+
__name(getFarmIslandValueStore, "getFarmIslandValueStore");
|
|
11
|
+
export {
|
|
12
|
+
getFarmIslandValueStore
|
|
13
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
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 _chunkH7BLEEAEcjs = require('../chunk-H7BLEEAE.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
|
|
7
|
+
|
|
8
|
+
// src/client/islands-runtime.ts
|
|
9
|
+
var _client = require('@farm.js/islx/client');
|
|
10
|
+
var _react = require('@farm.js/islx/react');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _client3 = require('@farm.js/islx/react/client');
|
|
16
|
+
function createFarmIsolatedHydrationRuntime(options) {
|
|
17
|
+
const runtime = _client3.createHydrationRuntime.call(void 0, {
|
|
18
|
+
load: options.load,
|
|
19
|
+
schedule: options.schedule,
|
|
20
|
+
wrap: options.wrap,
|
|
21
|
+
report: options.report
|
|
22
|
+
});
|
|
23
|
+
const router = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => window.__FARM_SPA_ROUTER__, "router");
|
|
24
|
+
_client.setActionNavigator.call(void 0, {
|
|
25
|
+
refresh: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _optionalChain([router, 'call', _ => _(), 'optionalAccess', _2 => _2.refresh, 'optionalCall', _3 => _3({ scroll: false })]), "refresh"),
|
|
26
|
+
navigate: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (href) => {
|
|
27
|
+
const current = router();
|
|
28
|
+
return _optionalChain([current, 'optionalAccess', _4 => _4.navigate]) ? current.navigate(href) : location.assign(href);
|
|
29
|
+
}, "navigate")
|
|
30
|
+
});
|
|
31
|
+
_client.enhanceForms.call(void 0, );
|
|
32
|
+
return {
|
|
33
|
+
hydrate: runtime.hydrate,
|
|
34
|
+
carryOver: runtime.carryOver,
|
|
35
|
+
updateModule: runtime.update,
|
|
36
|
+
dispose: runtime.dispose,
|
|
37
|
+
rootCount: runtime.rootCount
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmIsolatedHydrationRuntime, "createFarmIsolatedHydrationRuntime");
|
|
41
|
+
function createFarmServerPageBoundary(_React, runtime) {
|
|
42
|
+
return _client3.createServerHtml.call(void 0, runtime);
|
|
43
|
+
}
|
|
44
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmServerPageBoundary, "createFarmServerPageBoundary");
|
|
45
|
+
function wrapFarmIsolatedClientGraph(_React, element) {
|
|
46
|
+
return _react.withinClientRoot.call(void 0, element);
|
|
47
|
+
}
|
|
48
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, wrapFarmIsolatedClientGraph, "wrapFarmIsolatedClientGraph");
|
|
49
|
+
function isolateFarmServerPageGraph(_React, element) {
|
|
50
|
+
return _react.isolateIslands.call(void 0, element);
|
|
51
|
+
}
|
|
52
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isolateFarmServerPageGraph, "isolateFarmServerPageGraph");
|
|
53
|
+
function renderFarmServerTreePage(_React, element, options) {
|
|
54
|
+
return _react.renderServerTree.call(void 0, element, {
|
|
55
|
+
isolate: options.isolate,
|
|
56
|
+
payloadOnly: options.payloadOnly,
|
|
57
|
+
// The values this request's browser holds (Farm's request store).
|
|
58
|
+
held: _nullishCoalesce(_optionalChain([_chunkH7BLEEAEcjs.getFarmIslandValuesServer.call(void 0, ), 'optionalAccess', _5 => _5.held, 'call', _6 => _6()]), () => ( null))
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmServerTreePage, "renderFarmServerTreePage");
|
|
62
|
+
function createFarmServerTreeElement(_React, source, options) {
|
|
63
|
+
return _client3.createServerTreeElement.call(void 0, source, {
|
|
64
|
+
load: options.load,
|
|
65
|
+
ServerHtml: options.ServerHtml,
|
|
66
|
+
key: options.key
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmServerTreeElement, "createFarmServerTreeElement");
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
exports.createFarmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime; exports.createFarmServerPageBoundary = createFarmServerPageBoundary; exports.createFarmServerTreeElement = createFarmServerTreeElement; exports.isolateFarmServerPageGraph = isolateFarmServerPageGraph; exports.renderFarmServerTreePage = renderFarmServerTreePage; exports.wrapFarmIsolatedClientGraph = wrapFarmIsolatedClientGraph;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { createServerHtml } from '@farm.js/islx/react/client';
|
|
3
|
+
import { F as FarmIslandStrategy } from '../island-CfGru1MO.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @internal Islands mode's runtime (`experimental.serverComponents: { mode: "islands" }`), run by
|
|
7
|
+
* islx. Generated code imports these in islands mode under the names the isolated-hydration
|
|
8
|
+
* runtime uses, so the rest of Farm's runtime stays the same; apps on isolated hydration without
|
|
9
|
+
* islands mode never load islx.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface FarmIslandsRuntimeOptions {
|
|
13
|
+
load(reference: string): Promise<Record<string, unknown>>;
|
|
14
|
+
schedule(options: {
|
|
15
|
+
container: Element;
|
|
16
|
+
strategy: FarmIslandStrategy;
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
hydrate(): Promise<void>;
|
|
19
|
+
}): Promise<unknown>;
|
|
20
|
+
wrap?(element: React__default.ReactElement): React__default.ReactNode;
|
|
21
|
+
report?(message: string, error?: unknown): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Hydrates islands with Farm's scheduler and providers; actions (from islands, and from forms in
|
|
25
|
+
* server components) refresh through Farm's router.
|
|
26
|
+
*/
|
|
27
|
+
declare function createFarmIsolatedHydrationRuntime(options: FarmIslandsRuntimeOptions): {
|
|
28
|
+
hydrate: (scope?: ParentNode, signal?: AbortSignal) => Promise<void>;
|
|
29
|
+
carryOver: (current: ParentNode, next: ParentNode) => number;
|
|
30
|
+
updateModule: (src: string, module: Record<string, unknown>) => number;
|
|
31
|
+
dispose: (scope: Node) => void;
|
|
32
|
+
rootCount: () => number;
|
|
33
|
+
};
|
|
34
|
+
/** A page a hydrating layout keeps as server HTML; its islands start inside it. */
|
|
35
|
+
declare function createFarmServerPageBoundary(_React: typeof React__default, runtime: Parameters<typeof createServerHtml>[0]): React__default.ComponentType<Record<string, unknown> & {
|
|
36
|
+
as?: string;
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: string;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
/** A layout that hydrates as one React root: its client components join that root. */
|
|
42
|
+
declare function wrapFarmIsolatedClientGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
|
|
43
|
+
/** The page such a layout keeps as server HTML: its client components are islands again. */
|
|
44
|
+
declare function isolateFarmServerPageGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
|
|
45
|
+
/** An async page under a hydrating layout, as a server tree the browser rebuilds in its root. */
|
|
46
|
+
declare function renderFarmServerTreePage(_React: typeof React__default, element: React__default.ReactNode, options: {
|
|
47
|
+
isolate?(element: React__default.ReactNode): React__default.ReactNode;
|
|
48
|
+
payloadOnly?: boolean;
|
|
49
|
+
}): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>>;
|
|
50
|
+
/** Rebuilds a server-tree page in the browser, inside the layout's React root. */
|
|
51
|
+
declare function createFarmServerTreeElement(_React: typeof React__default, source: ParentNode | string, options: {
|
|
52
|
+
load(reference: string): Promise<Record<string, unknown>>;
|
|
53
|
+
ServerHtml: React__default.ComponentType<any>;
|
|
54
|
+
key?: string;
|
|
55
|
+
}): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null>;
|
|
56
|
+
|
|
57
|
+
export { type FarmIslandsRuntimeOptions, createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, createFarmServerTreeElement, isolateFarmServerPageGraph, renderFarmServerTreePage, wrapFarmIsolatedClientGraph };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { createServerHtml } from '@farm.js/islx/react/client';
|
|
3
|
+
import { F as FarmIslandStrategy } from '../island-CfGru1MO.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @internal Islands mode's runtime (`experimental.serverComponents: { mode: "islands" }`), run by
|
|
7
|
+
* islx. Generated code imports these in islands mode under the names the isolated-hydration
|
|
8
|
+
* runtime uses, so the rest of Farm's runtime stays the same; apps on isolated hydration without
|
|
9
|
+
* islands mode never load islx.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface FarmIslandsRuntimeOptions {
|
|
13
|
+
load(reference: string): Promise<Record<string, unknown>>;
|
|
14
|
+
schedule(options: {
|
|
15
|
+
container: Element;
|
|
16
|
+
strategy: FarmIslandStrategy;
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
hydrate(): Promise<void>;
|
|
19
|
+
}): Promise<unknown>;
|
|
20
|
+
wrap?(element: React__default.ReactElement): React__default.ReactNode;
|
|
21
|
+
report?(message: string, error?: unknown): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Hydrates islands with Farm's scheduler and providers; actions (from islands, and from forms in
|
|
25
|
+
* server components) refresh through Farm's router.
|
|
26
|
+
*/
|
|
27
|
+
declare function createFarmIsolatedHydrationRuntime(options: FarmIslandsRuntimeOptions): {
|
|
28
|
+
hydrate: (scope?: ParentNode, signal?: AbortSignal) => Promise<void>;
|
|
29
|
+
carryOver: (current: ParentNode, next: ParentNode) => number;
|
|
30
|
+
updateModule: (src: string, module: Record<string, unknown>) => number;
|
|
31
|
+
dispose: (scope: Node) => void;
|
|
32
|
+
rootCount: () => number;
|
|
33
|
+
};
|
|
34
|
+
/** A page a hydrating layout keeps as server HTML; its islands start inside it. */
|
|
35
|
+
declare function createFarmServerPageBoundary(_React: typeof React__default, runtime: Parameters<typeof createServerHtml>[0]): React__default.ComponentType<Record<string, unknown> & {
|
|
36
|
+
as?: string;
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: string;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
/** A layout that hydrates as one React root: its client components join that root. */
|
|
42
|
+
declare function wrapFarmIsolatedClientGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
|
|
43
|
+
/** The page such a layout keeps as server HTML: its client components are islands again. */
|
|
44
|
+
declare function isolateFarmServerPageGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
|
|
45
|
+
/** An async page under a hydrating layout, as a server tree the browser rebuilds in its root. */
|
|
46
|
+
declare function renderFarmServerTreePage(_React: typeof React__default, element: React__default.ReactNode, options: {
|
|
47
|
+
isolate?(element: React__default.ReactNode): React__default.ReactNode;
|
|
48
|
+
payloadOnly?: boolean;
|
|
49
|
+
}): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>>;
|
|
50
|
+
/** Rebuilds a server-tree page in the browser, inside the layout's React root. */
|
|
51
|
+
declare function createFarmServerTreeElement(_React: typeof React__default, source: ParentNode | string, options: {
|
|
52
|
+
load(reference: string): Promise<Record<string, unknown>>;
|
|
53
|
+
ServerHtml: React__default.ComponentType<any>;
|
|
54
|
+
key?: string;
|
|
55
|
+
}): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null>;
|
|
56
|
+
|
|
57
|
+
export { type FarmIslandsRuntimeOptions, createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, createFarmServerTreeElement, isolateFarmServerPageGraph, renderFarmServerTreePage, wrapFarmIsolatedClientGraph };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFarmIslandValuesServer
|
|
3
|
+
} from "../chunk-2NXO5SBY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "../chunk-LPEX4YW6.mjs";
|
|
7
|
+
|
|
8
|
+
// src/client/islands-runtime.ts
|
|
9
|
+
import { enhanceForms, setActionNavigator } from "@farm.js/islx/client";
|
|
10
|
+
import { isolateIslands, renderServerTree, withinClientRoot } from "@farm.js/islx/react";
|
|
11
|
+
import {
|
|
12
|
+
createHydrationRuntime,
|
|
13
|
+
createServerHtml,
|
|
14
|
+
createServerTreeElement
|
|
15
|
+
} from "@farm.js/islx/react/client";
|
|
16
|
+
function createFarmIsolatedHydrationRuntime(options) {
|
|
17
|
+
const runtime = createHydrationRuntime({
|
|
18
|
+
load: options.load,
|
|
19
|
+
schedule: options.schedule,
|
|
20
|
+
wrap: options.wrap,
|
|
21
|
+
report: options.report
|
|
22
|
+
});
|
|
23
|
+
const router = /* @__PURE__ */ __name(() => window.__FARM_SPA_ROUTER__, "router");
|
|
24
|
+
setActionNavigator({
|
|
25
|
+
refresh: /* @__PURE__ */ __name(() => router()?.refresh?.({ scroll: false }), "refresh"),
|
|
26
|
+
navigate: /* @__PURE__ */ __name((href) => {
|
|
27
|
+
const current = router();
|
|
28
|
+
return current?.navigate ? current.navigate(href) : location.assign(href);
|
|
29
|
+
}, "navigate")
|
|
30
|
+
});
|
|
31
|
+
enhanceForms();
|
|
32
|
+
return {
|
|
33
|
+
hydrate: runtime.hydrate,
|
|
34
|
+
carryOver: runtime.carryOver,
|
|
35
|
+
updateModule: runtime.update,
|
|
36
|
+
dispose: runtime.dispose,
|
|
37
|
+
rootCount: runtime.rootCount
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
__name(createFarmIsolatedHydrationRuntime, "createFarmIsolatedHydrationRuntime");
|
|
41
|
+
function createFarmServerPageBoundary(_React, runtime) {
|
|
42
|
+
return createServerHtml(runtime);
|
|
43
|
+
}
|
|
44
|
+
__name(createFarmServerPageBoundary, "createFarmServerPageBoundary");
|
|
45
|
+
function wrapFarmIsolatedClientGraph(_React, element) {
|
|
46
|
+
return withinClientRoot(element);
|
|
47
|
+
}
|
|
48
|
+
__name(wrapFarmIsolatedClientGraph, "wrapFarmIsolatedClientGraph");
|
|
49
|
+
function isolateFarmServerPageGraph(_React, element) {
|
|
50
|
+
return isolateIslands(element);
|
|
51
|
+
}
|
|
52
|
+
__name(isolateFarmServerPageGraph, "isolateFarmServerPageGraph");
|
|
53
|
+
function renderFarmServerTreePage(_React, element, options) {
|
|
54
|
+
return renderServerTree(element, {
|
|
55
|
+
isolate: options.isolate,
|
|
56
|
+
payloadOnly: options.payloadOnly,
|
|
57
|
+
// The values this request's browser holds (Farm's request store).
|
|
58
|
+
held: getFarmIslandValuesServer()?.held() ?? null
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
__name(renderFarmServerTreePage, "renderFarmServerTreePage");
|
|
62
|
+
function createFarmServerTreeElement(_React, source, options) {
|
|
63
|
+
return createServerTreeElement(source, {
|
|
64
|
+
load: options.load,
|
|
65
|
+
ServerHtml: options.ServerHtml,
|
|
66
|
+
key: options.key
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
__name(createFarmServerTreeElement, "createFarmServerTreeElement");
|
|
70
|
+
export {
|
|
71
|
+
createFarmIsolatedHydrationRuntime,
|
|
72
|
+
createFarmServerPageBoundary,
|
|
73
|
+
createFarmServerTreeElement,
|
|
74
|
+
isolateFarmServerPageGraph,
|
|
75
|
+
renderFarmServerTreePage,
|
|
76
|
+
wrapFarmIsolatedClientGraph
|
|
77
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkAPDGOKKEcjs = require('../chunk-APDGOKKE.cjs');
|
|
4
|
+
require('../chunk-YKUEJ3MG.cjs');
|
|
5
|
+
require('../chunk-H7BLEEAE.cjs');
|
|
6
|
+
require('../chunk-6IZWX6ES.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
|
|
10
|
+
|
|
11
|
+
// src/client/islands-server.ts
|
|
12
|
+
var _server = require('@farm.js/islx/react/server');
|
|
13
|
+
function installFarmIslandsServer() {
|
|
14
|
+
_server.setRenderStateResolver.call(void 0, _chunkAPDGOKKEcjs.resolveFarmIslandRenderState);
|
|
15
|
+
}
|
|
16
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, installFarmIslandsServer, "installFarmIslandsServer");
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.installFarmIslandsServer = installFarmIslandsServer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveFarmIslandRenderState
|
|
3
|
+
} from "../chunk-D5RFPV2H.mjs";
|
|
4
|
+
import "../chunk-PJEHUSHA.mjs";
|
|
5
|
+
import "../chunk-2NXO5SBY.mjs";
|
|
6
|
+
import "../chunk-6LVRDOAW.mjs";
|
|
7
|
+
import {
|
|
8
|
+
__name
|
|
9
|
+
} from "../chunk-LPEX4YW6.mjs";
|
|
10
|
+
|
|
11
|
+
// src/client/islands-server.ts
|
|
12
|
+
import { setRenderStateResolver } from "@farm.js/islx/react/server";
|
|
13
|
+
function installFarmIslandsServer() {
|
|
14
|
+
setRenderStateResolver(resolveFarmIslandRenderState);
|
|
15
|
+
}
|
|
16
|
+
__name(installFarmIslandsServer, "installFarmIslandsServer");
|
|
17
|
+
export {
|
|
18
|
+
installFarmIslandsServer
|
|
19
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }require('../chunk-S3JO3N4H.cjs');
|
|
2
|
+
|
|
3
|
+
// src/islx/client.ts
|
|
4
|
+
var _client = require('@farm.js/islx/client'); _createStarExport(_client);
|
|
5
|
+
var _client3 = require('@farm.js/islx/react/client'); _createStarExport(_client3);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }require('../chunk-S3JO3N4H.cjs');
|
|
2
|
+
|
|
3
|
+
// src/islx/react.ts
|
|
4
|
+
var _react = require('@farm.js/islx/react'); _createStarExport(_react);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@farm.js/islx/react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@farm.js/islx/react';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }require('../chunk-S3JO3N4H.cjs');
|
|
2
|
+
|
|
3
|
+
// src/islx/server.ts
|
|
4
|
+
var _server = require('@farm.js/islx/server'); _createStarExport(_server);
|
|
5
|
+
var _server3 = require('@farm.js/islx/react/server'); _createStarExport(_server3);
|