@logixjs/react 0.1.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.
Files changed (42) hide show
  1. package/README.md +64 -0
  2. package/dist/Hooks.cjs +2194 -0
  3. package/dist/Hooks.d.cts +77 -0
  4. package/dist/Hooks.d.ts +77 -0
  5. package/dist/Hooks.js +27 -0
  6. package/dist/ModuleRef-wZSQ3Wwo.d.cts +73 -0
  7. package/dist/ModuleRef-wZSQ3Wwo.d.ts +73 -0
  8. package/dist/ModuleScope.cjs +2695 -0
  9. package/dist/ModuleScope.d.cts +62 -0
  10. package/dist/ModuleScope.d.ts +62 -0
  11. package/dist/ModuleScope.js +9 -0
  12. package/dist/Platform.cjs +60 -0
  13. package/dist/Platform.d.cts +6 -0
  14. package/dist/Platform.d.ts +6 -0
  15. package/dist/Platform.js +6 -0
  16. package/dist/ReactPlatform.cjs +2813 -0
  17. package/dist/ReactPlatform.d.cts +40 -0
  18. package/dist/ReactPlatform.d.ts +40 -0
  19. package/dist/ReactPlatform.js +11 -0
  20. package/dist/RuntimeProvider.cjs +1618 -0
  21. package/dist/RuntimeProvider.d.cts +66 -0
  22. package/dist/RuntimeProvider.d.ts +66 -0
  23. package/dist/RuntimeProvider.js +8 -0
  24. package/dist/chunk-2WFULYPJ.js +856 -0
  25. package/dist/chunk-4G7H66OY.js +54 -0
  26. package/dist/chunk-G5MRIFKK.js +95 -0
  27. package/dist/chunk-JXAJTWSZ.js +773 -0
  28. package/dist/chunk-PYWHL7TA.js +351 -0
  29. package/dist/chunk-UFFCJGSZ.js +981 -0
  30. package/dist/chunk-VFWWMK67.js +0 -0
  31. package/dist/chunk-ZANGOPUQ.js +34 -0
  32. package/dist/global.d.cjs +1 -0
  33. package/dist/global.d.d.cts +9 -0
  34. package/dist/global.d.d.ts +9 -0
  35. package/dist/global.d.js +0 -0
  36. package/dist/index.cjs +3118 -0
  37. package/dist/index.d.cts +10 -0
  38. package/dist/index.d.ts +10 -0
  39. package/dist/index.js +44 -0
  40. package/dist/useDispatch-BnzYVkRE.d.ts +81 -0
  41. package/dist/useDispatch-CnO5-66H.d.cts +81 -0
  42. package/package.json +58 -0
@@ -0,0 +1,40 @@
1
+ import { RuntimeProviderProps } from './RuntimeProvider.cjs';
2
+ import { ManagedRuntime } from 'effect';
3
+ import { u as useModule, a as useLocalModule, b as useSelector, c as useDispatch } from './useDispatch-CnO5-66H.cjs';
4
+ import React from 'react';
5
+ import '@logixjs/core';
6
+ import './ModuleRef-wZSQ3Wwo.cjs';
7
+
8
+ declare const ReactPlatform: {
9
+ /**
10
+ * Creates a React component that provides the Logix runtime to its children.
11
+ */
12
+ Provider: React.FC<RuntimeProviderProps>;
13
+ /**
14
+ * Hook to use a module from the provided runtime.
15
+ */
16
+ useModule: typeof useModule;
17
+ /**
18
+ * Hook to create and use a local module instance.
19
+ */
20
+ useLocalModule: typeof useLocalModule;
21
+ /**
22
+ * Hook to select a slice of state from a module.
23
+ */
24
+ useSelector: typeof useSelector;
25
+ /**
26
+ * Hook to get the dispatch function for a module.
27
+ */
28
+ useDispatch: typeof useDispatch;
29
+ /**
30
+ * Creates a root provider component for a given runtime.
31
+ *
32
+ * The caller is responsible for constructing and managing the Runtime lifecycle
33
+ * (typically via Logix.Runtime.make). ReactPlatform only provides that Runtime within the React tree.
34
+ */
35
+ createRoot: (runtime: ManagedRuntime.ManagedRuntime<any, any>) => ({ children }: {
36
+ children: React.ReactNode;
37
+ }) => React.FunctionComponentElement<RuntimeProviderProps>;
38
+ };
39
+
40
+ export { ReactPlatform };
@@ -0,0 +1,40 @@
1
+ import { RuntimeProviderProps } from './RuntimeProvider.js';
2
+ import { ManagedRuntime } from 'effect';
3
+ import { u as useModule, a as useLocalModule, b as useSelector, c as useDispatch } from './useDispatch-BnzYVkRE.js';
4
+ import React from 'react';
5
+ import '@logixjs/core';
6
+ import './ModuleRef-wZSQ3Wwo.js';
7
+
8
+ declare const ReactPlatform: {
9
+ /**
10
+ * Creates a React component that provides the Logix runtime to its children.
11
+ */
12
+ Provider: React.FC<RuntimeProviderProps>;
13
+ /**
14
+ * Hook to use a module from the provided runtime.
15
+ */
16
+ useModule: typeof useModule;
17
+ /**
18
+ * Hook to create and use a local module instance.
19
+ */
20
+ useLocalModule: typeof useLocalModule;
21
+ /**
22
+ * Hook to select a slice of state from a module.
23
+ */
24
+ useSelector: typeof useSelector;
25
+ /**
26
+ * Hook to get the dispatch function for a module.
27
+ */
28
+ useDispatch: typeof useDispatch;
29
+ /**
30
+ * Creates a root provider component for a given runtime.
31
+ *
32
+ * The caller is responsible for constructing and managing the Runtime lifecycle
33
+ * (typically via Logix.Runtime.make). ReactPlatform only provides that Runtime within the React tree.
34
+ */
35
+ createRoot: (runtime: ManagedRuntime.ManagedRuntime<any, any>) => ({ children }: {
36
+ children: React.ReactNode;
37
+ }) => React.FunctionComponentElement<RuntimeProviderProps>;
38
+ };
39
+
40
+ export { ReactPlatform };
@@ -0,0 +1,11 @@
1
+ import {
2
+ ReactPlatform
3
+ } from "./chunk-4G7H66OY.js";
4
+ import "./chunk-PYWHL7TA.js";
5
+ import "./chunk-UFFCJGSZ.js";
6
+ import "./chunk-VFWWMK67.js";
7
+ import "./chunk-JXAJTWSZ.js";
8
+ import "./chunk-2WFULYPJ.js";
9
+ export {
10
+ ReactPlatform
11
+ };