@yiin/reactive-proxy-state 1.0.20 → 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 +1 -33
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1 -33
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -29,43 +29,30 @@ var __export = (target, all) => {
|
|
|
29
29
|
// src/index.ts
|
|
30
30
|
var exports_src = {};
|
|
31
31
|
__export(exports_src, {
|
|
32
|
-
wrapperCache: () => wrapperCache,
|
|
33
|
-
wrapSet: () => wrapSet,
|
|
34
|
-
wrapMap: () => wrapMap,
|
|
35
|
-
wrapArray: () => wrapArray,
|
|
36
32
|
watchEffect: () => watchEffect,
|
|
37
33
|
watch: () => watch,
|
|
38
34
|
updateState: () => updateState,
|
|
39
35
|
unref: () => unref,
|
|
40
36
|
triggerRef: () => triggerRef,
|
|
41
37
|
trigger: () => trigger,
|
|
42
|
-
traverse: () => traverse,
|
|
43
38
|
track: () => track,
|
|
44
39
|
toRefs: () => toRefs,
|
|
45
40
|
toRef: () => toRef,
|
|
46
41
|
toRaw: () => toRaw,
|
|
47
|
-
setPathConcat: () => setPathConcat,
|
|
48
|
-
setInPathCache: () => setInPathCache,
|
|
49
42
|
setActiveEffect: () => setActiveEffect,
|
|
50
43
|
runCleanupFunctions: () => runCleanupFunctions,
|
|
51
44
|
ref: () => ref,
|
|
52
45
|
reactive: () => reactive,
|
|
53
|
-
pathConcatCache: () => pathConcatCache,
|
|
54
|
-
pathCache: () => pathCache,
|
|
55
46
|
markRaw: () => markRaw,
|
|
56
47
|
isRefSymbol: () => isRefSymbol,
|
|
57
48
|
isRef: () => isRef,
|
|
58
49
|
isReactive: () => isReactive,
|
|
59
50
|
isComputed: () => isComputed,
|
|
60
|
-
globalSeen: () => globalSeen,
|
|
61
|
-
getPathConcat: () => getPathConcat,
|
|
62
|
-
getFromPathCache: () => getFromPathCache,
|
|
63
51
|
deepEqual: () => deepEqual,
|
|
64
52
|
deepClone: () => deepClone,
|
|
65
53
|
computed: () => computed,
|
|
66
54
|
cleanupEffect: () => cleanupEffect,
|
|
67
|
-
activeEffect: () => activeEffect
|
|
68
|
-
ReactiveFlags: () => ReactiveFlags
|
|
55
|
+
activeEffect: () => activeEffect
|
|
69
56
|
});
|
|
70
57
|
module.exports = __toCommonJS(exports_src);
|
|
71
58
|
|
|
@@ -157,17 +144,6 @@ function deepEqual(a, b, seen = globalSeen) {
|
|
|
157
144
|
deepEqualCache.get(a).set(b, result);
|
|
158
145
|
return result;
|
|
159
146
|
}
|
|
160
|
-
function getFromPathCache(root, pathKey) {
|
|
161
|
-
const cache = pathCache.get(root);
|
|
162
|
-
if (!cache)
|
|
163
|
-
return;
|
|
164
|
-
const result = cache.get(pathKey);
|
|
165
|
-
if (result !== undefined) {
|
|
166
|
-
cache.delete(pathKey);
|
|
167
|
-
cache.set(pathKey, result);
|
|
168
|
-
}
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
147
|
function setInPathCache(root, pathKey, value) {
|
|
172
148
|
if (!pathCache.has(root)) {
|
|
173
149
|
pathCache.set(root, new Map);
|
|
@@ -1291,14 +1267,6 @@ function wrapArray(arr, emit, path = []) {
|
|
|
1291
1267
|
return proxy;
|
|
1292
1268
|
}
|
|
1293
1269
|
|
|
1294
|
-
// src/constants.ts
|
|
1295
|
-
var ReactiveFlags;
|
|
1296
|
-
((ReactiveFlags2) => {
|
|
1297
|
-
ReactiveFlags2["RAW"] = "__v_raw";
|
|
1298
|
-
ReactiveFlags2["IS_REACTIVE"] = "__v_isReactive";
|
|
1299
|
-
ReactiveFlags2["SKIP"] = "__v_skip";
|
|
1300
|
-
})(ReactiveFlags ||= {});
|
|
1301
|
-
|
|
1302
1270
|
// src/reactive.ts
|
|
1303
1271
|
function isObject3(v) {
|
|
1304
1272
|
return v && typeof v === "object";
|
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
|
};
|