@yiin/reactive-proxy-state 1.0.19 → 1.0.21
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 +1580 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1 -33
- package/package.json +7 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
-
export
|
|
2
|
+
export { deepClone, deepEqual } from './utils';
|
|
3
3
|
export * from './state';
|
|
4
4
|
export * from './reactive';
|
|
5
|
-
export * from './wrap-array';
|
|
6
|
-
export * from './wrap-map';
|
|
7
|
-
export * from './wrap-set';
|
|
8
5
|
export * from './watch';
|
|
9
6
|
export * from './watch-effect';
|
|
10
7
|
export * from './ref';
|
|
11
8
|
export * from './computed';
|
|
12
|
-
export * from './constants';
|
|
13
9
|
export * from './mark-raw';
|
package/dist/index.js
CHANGED
|
@@ -86,17 +86,6 @@ function deepEqual(a, b, seen = globalSeen) {
|
|
|
86
86
|
deepEqualCache.get(a).set(b, result);
|
|
87
87
|
return result;
|
|
88
88
|
}
|
|
89
|
-
function getFromPathCache(root, pathKey) {
|
|
90
|
-
const cache = pathCache.get(root);
|
|
91
|
-
if (!cache)
|
|
92
|
-
return;
|
|
93
|
-
const result = cache.get(pathKey);
|
|
94
|
-
if (result !== undefined) {
|
|
95
|
-
cache.delete(pathKey);
|
|
96
|
-
cache.set(pathKey, result);
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
89
|
function setInPathCache(root, pathKey, value) {
|
|
101
90
|
if (!pathCache.has(root)) {
|
|
102
91
|
pathCache.set(root, new Map);
|
|
@@ -1220,14 +1209,6 @@ function wrapArray(arr, emit, path = []) {
|
|
|
1220
1209
|
return proxy;
|
|
1221
1210
|
}
|
|
1222
1211
|
|
|
1223
|
-
// src/constants.ts
|
|
1224
|
-
var ReactiveFlags;
|
|
1225
|
-
((ReactiveFlags2) => {
|
|
1226
|
-
ReactiveFlags2["RAW"] = "__v_raw";
|
|
1227
|
-
ReactiveFlags2["IS_REACTIVE"] = "__v_isReactive";
|
|
1228
|
-
ReactiveFlags2["SKIP"] = "__v_skip";
|
|
1229
|
-
})(ReactiveFlags ||= {});
|
|
1230
|
-
|
|
1231
1212
|
// src/reactive.ts
|
|
1232
1213
|
function isObject3(v) {
|
|
1233
1214
|
return v && typeof v === "object";
|
|
@@ -1540,41 +1521,28 @@ function markRaw(obj) {
|
|
|
1540
1521
|
return obj;
|
|
1541
1522
|
}
|
|
1542
1523
|
export {
|
|
1543
|
-
wrapperCache,
|
|
1544
|
-
wrapSet,
|
|
1545
|
-
wrapMap,
|
|
1546
|
-
wrapArray,
|
|
1547
1524
|
watchEffect,
|
|
1548
1525
|
watch,
|
|
1549
1526
|
updateState,
|
|
1550
1527
|
unref,
|
|
1551
1528
|
triggerRef,
|
|
1552
1529
|
trigger,
|
|
1553
|
-
traverse,
|
|
1554
1530
|
track,
|
|
1555
1531
|
toRefs,
|
|
1556
1532
|
toRef,
|
|
1557
1533
|
toRaw,
|
|
1558
|
-
setPathConcat,
|
|
1559
|
-
setInPathCache,
|
|
1560
1534
|
setActiveEffect,
|
|
1561
1535
|
runCleanupFunctions,
|
|
1562
1536
|
ref,
|
|
1563
1537
|
reactive,
|
|
1564
|
-
pathConcatCache,
|
|
1565
|
-
pathCache,
|
|
1566
1538
|
markRaw,
|
|
1567
1539
|
isRefSymbol,
|
|
1568
1540
|
isRef,
|
|
1569
1541
|
isReactive,
|
|
1570
1542
|
isComputed,
|
|
1571
|
-
globalSeen,
|
|
1572
|
-
getPathConcat,
|
|
1573
|
-
getFromPathCache,
|
|
1574
1543
|
deepEqual,
|
|
1575
1544
|
deepClone,
|
|
1576
1545
|
computed,
|
|
1577
1546
|
cleanupEffect,
|
|
1578
|
-
activeEffect
|
|
1579
|
-
ReactiveFlags
|
|
1547
|
+
activeEffect
|
|
1580
1548
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yiin/reactive-proxy-state",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"author": "Yiin <stanislovas@yiin.lt>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Yiin/reactive-proxy-state.git"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"type": "module",
|
|
10
12
|
"devDependencies": {
|
|
11
13
|
"bun-types": "^1.2.8",
|
|
12
14
|
"typescript": "^5.0.4",
|
|
@@ -16,7 +18,9 @@
|
|
|
16
18
|
"exports": {
|
|
17
19
|
".": {
|
|
18
20
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"require": "./dist/index.cjs",
|
|
23
|
+
"default": "./dist/index.js"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
"bugs": {
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
"access": "public"
|
|
46
50
|
},
|
|
47
51
|
"scripts": {
|
|
48
|
-
"build": "bun build src/index.ts --outdir dist --target node --format esm && tsc --emitDeclarationOnly --outDir dist",
|
|
52
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm && bun build src/index.ts --outfile dist/index.cjs --target node --format cjs && tsc --emitDeclarationOnly --outDir dist",
|
|
49
53
|
"test": "bun test",
|
|
50
54
|
"test:watch": "bun test --watch",
|
|
51
55
|
"test:bench": "bun --bun ./benchmarks/state-sync.bench.ts",
|