cogsbox-state 0.5.28 → 0.5.29
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/CogsStateClient.d.ts +1 -1
- package/dist/CogsStateClient.jsx +13 -6
- package/dist/CogsStateClient.jsx.map +1 -1
- package/dist/index.js +17 -16
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ type ConfigType = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const config: ConfigType;
|
|
7
7
|
export declare const useCogsConfig: () => ConfigType;
|
|
8
|
-
export
|
|
8
|
+
export declare function CogsStateClient({ children, sessionId, }: {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
sessionId?: string;
|
|
11
11
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/CogsStateClient.jsx
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import { createContext as
|
|
4
|
-
const
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as s, useContext as i } from "react";
|
|
4
|
+
const r = {
|
|
5
5
|
sessionId: void 0
|
|
6
|
-
},
|
|
6
|
+
}, o = s(r), u = () => i(o);
|
|
7
|
+
function f({
|
|
8
|
+
children: t,
|
|
9
|
+
sessionId: e
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ n(o.Provider, { value: { sessionId: e }, children: t });
|
|
12
|
+
}
|
|
7
13
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
f as CogsStateClient,
|
|
15
|
+
r as config,
|
|
16
|
+
u as useCogsConfig
|
|
10
17
|
};
|
|
11
18
|
//# sourceMappingURL=CogsStateClient.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CogsStateClient.jsx","sources":["../src/CogsStateClient.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React, { createContext, useContext } from \"react\";\r\ntype ConfigType = { sessionId?: string };\r\nexport const config: ConfigType = {\r\n
|
|
1
|
+
{"version":3,"file":"CogsStateClient.jsx","sources":["../src/CogsStateClient.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React, { createContext, useContext } from \"react\";\r\ntype ConfigType = { sessionId?: string };\r\nexport const config: ConfigType = {\r\n sessionId: undefined,\r\n};\r\n\r\nconst CogsContext = createContext<ConfigType>(config);\r\n\r\nexport const useCogsConfig = () => useContext(CogsContext);\r\n\r\nexport function CogsStateClient({\r\n children,\r\n sessionId,\r\n}: {\r\n children: React.ReactNode;\r\n sessionId?: string;\r\n}) {\r\n return (\r\n <CogsContext.Provider value={{ sessionId }}>\r\n {children}\r\n </CogsContext.Provider>\r\n );\r\n}\r\n"],"names":["config","CogsContext","createContext","useCogsConfig","useContext","CogsStateClient","children","sessionId","jsx"],"mappings":";;;AAIO,MAAMA,IAAqB;AAAA,EAChC,WAAW;AACb,GAEMC,IAAcC,EAA0BF,CAAM,GAEvCG,IAAgB,MAAMC,EAAWH,CAAW;AAElD,SAASI,EAAgB;AAAA,EAC9B,UAAAC;AAAA,EACA,WAAAC;AACF,GAGG;AAEC,SAAA,gBAAAC,EAACP,EAAY,UAAZ,EAAqB,OAAO,EAAE,WAAAM,EAAA,GAC5B,UAAAD,GACH;AAEJ;"}
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { $cogsSignal as r, $cogsSignalStore as o, addStateOptions as n, createCogsState as s, notifyComponent as a, useCogsStateFn as i } from "./CogsState.jsx";
|
|
2
|
-
import {
|
|
3
|
-
import { debounce as
|
|
4
|
-
import { useCogsTrpcValidationLink as
|
|
2
|
+
import { CogsStateClient as f, config as c, useCogsConfig as p } from "./CogsStateClient.jsx";
|
|
3
|
+
import { debounce as u, deleteNestedProperty as y, getArrayLengthDifferences as C, getArrayLengthDifferencesArray as S, getDifferences as l, getDifferencesArray as m, getNestedValue as A, isArray as D, isDeepEqual as x, isFunction as F, isObject as L, transformStateFunc as N, updateNestedProperty as b } from "./utility.js";
|
|
4
|
+
import { useCogsTrpcValidationLink as O } from "./TRPCValidationLink.js";
|
|
5
5
|
export {
|
|
6
6
|
r as $cogsSignal,
|
|
7
7
|
o as $cogsSignalStore,
|
|
8
|
+
f as CogsStateClient,
|
|
8
9
|
n as addStateOptions,
|
|
9
|
-
|
|
10
|
+
c as config,
|
|
10
11
|
s as createCogsState,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
u as debounce,
|
|
13
|
+
y as deleteNestedProperty,
|
|
14
|
+
C as getArrayLengthDifferences,
|
|
14
15
|
S as getArrayLengthDifferencesArray,
|
|
15
16
|
l as getDifferences,
|
|
16
17
|
m as getDifferencesArray,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
A as getNestedValue,
|
|
19
|
+
D as isArray,
|
|
20
|
+
x as isDeepEqual,
|
|
21
|
+
F as isFunction,
|
|
22
|
+
L as isObject,
|
|
22
23
|
a as notifyComponent,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
N as transformStateFunc,
|
|
25
|
+
b as updateNestedProperty,
|
|
26
|
+
p as useCogsConfig,
|
|
26
27
|
i as useCogsStateFn,
|
|
27
|
-
|
|
28
|
+
O as useCogsTrpcValidationLink
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=index.js.map
|