state-jet 1.0.8 → 1.0.9
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/index.cjs +36 -0
- package/dist/store.js +1 -1
- package/package.json +17 -12
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
__export(index_exports, {
|
|
21
|
+
decrypt: () => import_encryption.decrypt,
|
|
22
|
+
encrypt: () => import_encryption.encrypt,
|
|
23
|
+
loadEncryptedState: () => import_encryption.loadEncryptedState,
|
|
24
|
+
optimisticUpdate: () => import_optimistic.optimisticUpdate,
|
|
25
|
+
restoreState: () => import_persistence.restoreState,
|
|
26
|
+
saveEncryptedState: () => import_encryption.saveEncryptedState,
|
|
27
|
+
saveState: () => import_persistence.saveState,
|
|
28
|
+
syncCRDT: () => import_crdt.syncCRDT,
|
|
29
|
+
useStateGlobal: () => import_store.useStateGlobal
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
var import_store = require("./store");
|
|
33
|
+
var import_persistence = require("./persistence");
|
|
34
|
+
var import_optimistic = require("./optimistic");
|
|
35
|
+
var import_encryption = require("./encryption");
|
|
36
|
+
var import_crdt = require("./crdt");
|
package/dist/store.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { produce } from "immer";
|
|
2
2
|
import { saveState, restoreState } from "./persistence";
|
|
3
|
-
import { useSyncExternalStore } from
|
|
3
|
+
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
|
4
4
|
import { notifyDevTools, undoState, redoState, measurePerformance } from "./devtools";
|
|
5
5
|
import { globalObject } from "./global";
|
|
6
6
|
const store = new Map();
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "state-jet",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Ultra-lightweight global state management for React",
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"types": "dist/types/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
7
6
|
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"exports": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"require": "./dist/index.js"
|
|
15
|
-
}
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
16
14
|
},
|
|
17
15
|
"repository": {
|
|
18
16
|
"type": "git",
|
|
@@ -33,7 +31,8 @@
|
|
|
33
31
|
"url": "https://github.com/venkateshsundaram/state-jet/issues"
|
|
34
32
|
},
|
|
35
33
|
"scripts": {
|
|
36
|
-
"build": "tsc",
|
|
34
|
+
"build": "tsc && npm run build:cjs",
|
|
35
|
+
"build:cjs": "esbuild src/index.ts --format=cjs --outfile=dist/index.cjs",
|
|
37
36
|
"test": "vitest",
|
|
38
37
|
"clean": "rm -rf dist/*",
|
|
39
38
|
"prepare": "npm run build",
|
|
@@ -41,17 +40,22 @@
|
|
|
41
40
|
"lint": "eslint src --ext .ts,.tsx"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^
|
|
43
|
+
"@types/react": "^19.0.10",
|
|
44
|
+
"@types/react-dom": "^19.0.4",
|
|
45
|
+
"@types/use-sync-external-store": "^0.0.6",
|
|
46
|
+
"esbuild": "^0.25.0",
|
|
45
47
|
"eslint": "^8.57.1",
|
|
46
48
|
"immer": "^10.1.1",
|
|
47
|
-
"react": "
|
|
49
|
+
"react": "19.0.0",
|
|
50
|
+
"react-dom": "19.0.0",
|
|
48
51
|
"typescript": "^5.7.3",
|
|
49
52
|
"vitest": "^2.1.8"
|
|
50
53
|
},
|
|
51
54
|
"peerDependencies": {
|
|
52
55
|
"@types/react": ">=18.0.0",
|
|
53
56
|
"immer": ">=9.0.6",
|
|
54
|
-
"react": ">=18.0.0"
|
|
57
|
+
"react": ">=18.0.0",
|
|
58
|
+
"use-sync-external-store": ">=1.2.0"
|
|
55
59
|
},
|
|
56
60
|
"peerDependenciesMeta": {
|
|
57
61
|
"@types/react": {
|
|
@@ -63,5 +67,6 @@
|
|
|
63
67
|
"react": {
|
|
64
68
|
"optional": true
|
|
65
69
|
}
|
|
66
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"type": "commonjs"
|
|
67
72
|
}
|