@farm.js/react 0.1.0-beta.4 → 0.1.0-beta.40

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/vite.d.mts CHANGED
@@ -2,8 +2,17 @@ import { Plugin } from 'vite';
2
2
 
3
3
  interface RendererPluginOptions {
4
4
  ssr?: boolean;
5
+ /** Build-owned disposal signal shared by discovery, client and SSR graphs. */
6
+ buildLifetime?: AbortSignal;
5
7
  rendererOptions?: Readonly<Record<string, unknown>>;
6
8
  }
9
+ /**
10
+ * Points `import { createRoot } from "react-dom/client"` at the compiled root. Imports that also
11
+ * name anything else (hydrateRoot, a default or namespace import) are left to React DOM.
12
+ */
13
+ declare function rewriteCompiledRootImports(code: string, program: {
14
+ body: readonly unknown[];
15
+ }): string | null;
7
16
  declare function createFarmRendererPlugin(options?: RendererPluginOptions): Plugin[];
8
17
 
9
- export { createFarmRendererPlugin };
18
+ export { createFarmRendererPlugin, rewriteCompiledRootImports };
package/dist/vite.d.ts CHANGED
@@ -2,8 +2,17 @@ import { Plugin } from 'vite';
2
2
 
3
3
  interface RendererPluginOptions {
4
4
  ssr?: boolean;
5
+ /** Build-owned disposal signal shared by discovery, client and SSR graphs. */
6
+ buildLifetime?: AbortSignal;
5
7
  rendererOptions?: Readonly<Record<string, unknown>>;
6
8
  }
9
+ /**
10
+ * Points `import { createRoot } from "react-dom/client"` at the compiled root. Imports that also
11
+ * name anything else (hydrateRoot, a default or namespace import) are left to React DOM.
12
+ */
13
+ declare function rewriteCompiledRootImports(code: string, program: {
14
+ body: readonly unknown[];
15
+ }): string | null;
7
16
  declare function createFarmRendererPlugin(options?: RendererPluginOptions): Plugin[];
8
17
 
9
- export { createFarmRendererPlugin };
18
+ export { createFarmRendererPlugin, rewriteCompiledRootImports };