@farm.js/react 0.1.0-beta.4 → 0.1.0-beta.41
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/README.md +825 -15
- package/dist/client.d.mts +1 -0
- package/dist/client.d.ts +1 -0
- package/dist/compiled-root.cjs +17 -0
- package/dist/compiled-root.cjs.map +1 -0
- package/dist/compiled-root.d.mts +12 -0
- package/dist/compiled-root.d.ts +12 -0
- package/dist/compiled-root.mjs +14 -0
- package/dist/compiled-root.mjs.map +1 -0
- package/dist/compiler-runtime.cjs +7245 -1174
- package/dist/compiler-runtime.cjs.map +1 -1
- package/dist/compiler-runtime.d.mts +275 -6
- package/dist/compiler-runtime.d.ts +275 -6
- package/dist/compiler-runtime.mjs +7124 -1175
- package/dist/compiler-runtime.mjs.map +1 -1
- package/dist/index.cjs +45 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.mjs +45 -5
- package/dist/index.mjs.map +1 -1
- package/dist/list.cjs +6 -0
- package/dist/list.cjs.map +1 -1
- package/dist/list.mjs +6 -0
- package/dist/list.mjs.map +1 -1
- package/dist/server.d.mts +0 -1
- package/dist/server.d.ts +0 -1
- package/dist/vite.cjs +5298 -477
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +10 -1
- package/dist/vite.d.ts +10 -1
- package/dist/vite.mjs +5300 -480
- package/dist/vite.mjs.map +1 -1
- package/package.json +18 -10
package/dist/client.d.mts
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var compilerRuntime = require('@farm.js/react/compiler-runtime');
|
|
4
|
+
|
|
5
|
+
// src/compiled-root.ts
|
|
6
|
+
var loadReactDOM = () => import('react-dom/client');
|
|
7
|
+
function createCompiledRoot(container, options = {}) {
|
|
8
|
+
return compilerRuntime.createCompiledRoot(container, options, loadReactDOM);
|
|
9
|
+
}
|
|
10
|
+
function createRoot(container, options) {
|
|
11
|
+
return createCompiledRoot(container, { reactRootOptions: options });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.createCompiledRoot = createCompiledRoot;
|
|
15
|
+
exports.createRoot = createRoot;
|
|
16
|
+
//# sourceMappingURL=compiled-root.cjs.map
|
|
17
|
+
//# sourceMappingURL=compiled-root.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/compiled-root.ts"],"names":["createCompiledRootWithLoader"],"mappings":";;;;;AAYA,IAAM,YAAA,GAAe,MAAM,OAAO,kBAAkB,CAAA;AAG7C,SAAS,kBAAA,CACd,SAAA,EACA,OAAA,GAA+B,EAAC,EAClB;AACd,EAAA,OAAOA,kCAAA,CAA6B,SAAA,EAAW,OAAA,EAAS,YAAY,CAAA;AACtE;AAMO,SAAS,UAAA,CAAW,WAAoB,OAAA,EAAiC;AAC9E,EAAA,OAAO,kBAAA,CAAmB,SAAA,EAAW,EAAE,gBAAA,EAAkB,SAAS,CAAA;AACpE","file":"compiled-root.cjs","sourcesContent":["// Experimental: mount fully compiled trees without React DOM; see createCompiledRoot() in the\n// compiler runtime. The build points the runtime import at @farm.js/react/compiler-runtime, so an\n// app shares one copy of the compiler runtime with the components it compiled.\nimport {\n createCompiledRoot as createCompiledRootWithLoader,\n type CompiledRoot,\n type CompiledRootOptions,\n} from \"./compiler-runtime\";\n\nexport type { CompiledRoot, CompiledRootOptions };\n\n// React DOM is loaded only when a root needs it.\nconst loadReactDOM = () => import(\"react-dom/client\");\n\n/** Mounts a fully compiled tree without React DOM, falling back to React DOM when it must. */\nexport function createCompiledRoot(\n container: Element,\n options: CompiledRootOptions = {},\n): CompiledRoot {\n return createCompiledRootWithLoader(container, options, loadReactDOM);\n}\n\n/**\n * Drop-in for `createRoot` from `react-dom/client`. With the compiler on, the build points an\n * app's own `createRoot` import here. React DOM's root options apply if the root falls back to it.\n */\nexport function createRoot(container: Element, options?: unknown): CompiledRoot {\n return createCompiledRoot(container, { reactRootOptions: options });\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CompiledRootOptions, CompiledRoot } from './compiler-runtime.mjs';
|
|
2
|
+
import 'react';
|
|
3
|
+
|
|
4
|
+
/** Mounts a fully compiled tree without React DOM, falling back to React DOM when it must. */
|
|
5
|
+
declare function createCompiledRoot(container: Element, options?: CompiledRootOptions): CompiledRoot;
|
|
6
|
+
/**
|
|
7
|
+
* Drop-in for `createRoot` from `react-dom/client`. With the compiler on, the build points an
|
|
8
|
+
* app's own `createRoot` import here. React DOM's root options apply if the root falls back to it.
|
|
9
|
+
*/
|
|
10
|
+
declare function createRoot(container: Element, options?: unknown): CompiledRoot;
|
|
11
|
+
|
|
12
|
+
export { CompiledRoot, CompiledRootOptions, createCompiledRoot, createRoot };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CompiledRootOptions, CompiledRoot } from './compiler-runtime.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
|
|
4
|
+
/** Mounts a fully compiled tree without React DOM, falling back to React DOM when it must. */
|
|
5
|
+
declare function createCompiledRoot(container: Element, options?: CompiledRootOptions): CompiledRoot;
|
|
6
|
+
/**
|
|
7
|
+
* Drop-in for `createRoot` from `react-dom/client`. With the compiler on, the build points an
|
|
8
|
+
* app's own `createRoot` import here. React DOM's root options apply if the root falls back to it.
|
|
9
|
+
*/
|
|
10
|
+
declare function createRoot(container: Element, options?: unknown): CompiledRoot;
|
|
11
|
+
|
|
12
|
+
export { CompiledRoot, CompiledRootOptions, createCompiledRoot, createRoot };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createCompiledRoot as createCompiledRoot$1 } from '@farm.js/react/compiler-runtime';
|
|
2
|
+
|
|
3
|
+
// src/compiled-root.ts
|
|
4
|
+
var loadReactDOM = () => import('react-dom/client');
|
|
5
|
+
function createCompiledRoot(container, options = {}) {
|
|
6
|
+
return createCompiledRoot$1(container, options, loadReactDOM);
|
|
7
|
+
}
|
|
8
|
+
function createRoot(container, options) {
|
|
9
|
+
return createCompiledRoot(container, { reactRootOptions: options });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { createCompiledRoot, createRoot };
|
|
13
|
+
//# sourceMappingURL=compiled-root.mjs.map
|
|
14
|
+
//# sourceMappingURL=compiled-root.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/compiled-root.ts"],"names":["createCompiledRootWithLoader"],"mappings":";;;AAYA,IAAM,YAAA,GAAe,MAAM,OAAO,kBAAkB,CAAA;AAG7C,SAAS,kBAAA,CACd,SAAA,EACA,OAAA,GAA+B,EAAC,EAClB;AACd,EAAA,OAAOA,oBAAA,CAA6B,SAAA,EAAW,OAAA,EAAS,YAAY,CAAA;AACtE;AAMO,SAAS,UAAA,CAAW,WAAoB,OAAA,EAAiC;AAC9E,EAAA,OAAO,kBAAA,CAAmB,SAAA,EAAW,EAAE,gBAAA,EAAkB,SAAS,CAAA;AACpE","file":"compiled-root.mjs","sourcesContent":["// Experimental: mount fully compiled trees without React DOM; see createCompiledRoot() in the\n// compiler runtime. The build points the runtime import at @farm.js/react/compiler-runtime, so an\n// app shares one copy of the compiler runtime with the components it compiled.\nimport {\n createCompiledRoot as createCompiledRootWithLoader,\n type CompiledRoot,\n type CompiledRootOptions,\n} from \"./compiler-runtime\";\n\nexport type { CompiledRoot, CompiledRootOptions };\n\n// React DOM is loaded only when a root needs it.\nconst loadReactDOM = () => import(\"react-dom/client\");\n\n/** Mounts a fully compiled tree without React DOM, falling back to React DOM when it must. */\nexport function createCompiledRoot(\n container: Element,\n options: CompiledRootOptions = {},\n): CompiledRoot {\n return createCompiledRootWithLoader(container, options, loadReactDOM);\n}\n\n/**\n * Drop-in for `createRoot` from `react-dom/client`. With the compiler on, the build points an\n * app's own `createRoot` import here. React DOM's root options apply if the root falls back to it.\n */\nexport function createRoot(container: Element, options?: unknown): CompiledRoot {\n return createCompiledRoot(container, { reactRootOptions: options });\n}\n"]}
|