koota 0.1.11 → 0.1.12
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/{chunk-WPSZAQ4Y.js → chunk-FAWXK4QV.js} +6 -4
- package/dist/index.cjs +6 -4
- package/dist/index.js +1 -1
- package/dist/react.cjs +6 -4
- package/dist/react.js +1 -1
- package/package.json +3 -3
- package/react/index.cjs +6 -4
- package/react/index.js +1 -1
|
@@ -1124,14 +1124,15 @@ function createQueryResult(query, world, params) {
|
|
|
1124
1124
|
const trait2 = traits[index];
|
|
1125
1125
|
const ctx = trait2[$internal];
|
|
1126
1126
|
const newValue = state[index];
|
|
1127
|
+
const store = stores[index];
|
|
1127
1128
|
let changed = false;
|
|
1128
1129
|
if (ctx.type === "aos") {
|
|
1129
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1130
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1130
1131
|
if (!changed) {
|
|
1131
|
-
changed = !shallowEqual(newValue, atomicSnapshots[
|
|
1132
|
+
changed = !shallowEqual(newValue, atomicSnapshots[index]);
|
|
1132
1133
|
}
|
|
1133
1134
|
} else {
|
|
1134
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1135
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1135
1136
|
}
|
|
1136
1137
|
if (changed) changedPairs.push([entity, trait2]);
|
|
1137
1138
|
}
|
|
@@ -1139,7 +1140,8 @@ function createQueryResult(query, world, params) {
|
|
|
1139
1140
|
const index = untrackedIndices[j];
|
|
1140
1141
|
const trait2 = traits[index];
|
|
1141
1142
|
const ctx = trait2[$internal];
|
|
1142
|
-
|
|
1143
|
+
const store = stores[index];
|
|
1144
|
+
ctx.fastSet(eid, store, state[index]);
|
|
1143
1145
|
}
|
|
1144
1146
|
}
|
|
1145
1147
|
for (let i = 0; i < changedPairs.length; i++) {
|
package/dist/index.cjs
CHANGED
|
@@ -1102,14 +1102,15 @@ function createQueryResult(query, world, params) {
|
|
|
1102
1102
|
const trait2 = traits[index];
|
|
1103
1103
|
const ctx = trait2[$internal];
|
|
1104
1104
|
const newValue = state[index];
|
|
1105
|
+
const store = stores[index];
|
|
1105
1106
|
let changed = false;
|
|
1106
1107
|
if (ctx.type === "aos") {
|
|
1107
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1108
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1108
1109
|
if (!changed) {
|
|
1109
|
-
changed = !shallowEqual(newValue, atomicSnapshots[
|
|
1110
|
+
changed = !shallowEqual(newValue, atomicSnapshots[index]);
|
|
1110
1111
|
}
|
|
1111
1112
|
} else {
|
|
1112
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1113
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1113
1114
|
}
|
|
1114
1115
|
if (changed) changedPairs.push([entity, trait2]);
|
|
1115
1116
|
}
|
|
@@ -1117,7 +1118,8 @@ function createQueryResult(query, world, params) {
|
|
|
1117
1118
|
const index = untrackedIndices[j];
|
|
1118
1119
|
const trait2 = traits[index];
|
|
1119
1120
|
const ctx = trait2[$internal];
|
|
1120
|
-
|
|
1121
|
+
const store = stores[index];
|
|
1122
|
+
ctx.fastSet(eid, store, state[index]);
|
|
1121
1123
|
}
|
|
1122
1124
|
}
|
|
1123
1125
|
for (let i = 0; i < changedPairs.length; i++) {
|
package/dist/index.js
CHANGED
package/dist/react.cjs
CHANGED
|
@@ -1094,14 +1094,15 @@ function createQueryResult(query, world, params) {
|
|
|
1094
1094
|
const trait2 = traits[index];
|
|
1095
1095
|
const ctx = trait2[$internal];
|
|
1096
1096
|
const newValue = state[index];
|
|
1097
|
+
const store = stores[index];
|
|
1097
1098
|
let changed = false;
|
|
1098
1099
|
if (ctx.type === "aos") {
|
|
1099
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1100
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1100
1101
|
if (!changed) {
|
|
1101
|
-
changed = !shallowEqual(newValue, atomicSnapshots[
|
|
1102
|
+
changed = !shallowEqual(newValue, atomicSnapshots[index]);
|
|
1102
1103
|
}
|
|
1103
1104
|
} else {
|
|
1104
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1105
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1105
1106
|
}
|
|
1106
1107
|
if (changed) changedPairs.push([entity, trait2]);
|
|
1107
1108
|
}
|
|
@@ -1109,7 +1110,8 @@ function createQueryResult(query, world, params) {
|
|
|
1109
1110
|
const index = untrackedIndices[j];
|
|
1110
1111
|
const trait2 = traits[index];
|
|
1111
1112
|
const ctx = trait2[$internal];
|
|
1112
|
-
|
|
1113
|
+
const store = stores[index];
|
|
1114
|
+
ctx.fastSet(eid, store, state[index]);
|
|
1113
1115
|
}
|
|
1114
1116
|
}
|
|
1115
1117
|
for (let i = 0; i < changedPairs.length; i++) {
|
package/dist/react.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koota",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "🌎 Performant real-time state management for React and TypeScript",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"rimraf": "^6.0.1",
|
|
41
41
|
"tsup": "^8.3.0",
|
|
42
42
|
"@koota/core": "0.0.1",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"@koota/react": "0.0.1",
|
|
44
|
+
"tsconfig": "0.1.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@react-three/fiber": "^8.17.10",
|
package/react/index.cjs
CHANGED
|
@@ -1094,14 +1094,15 @@ function createQueryResult(query, world, params) {
|
|
|
1094
1094
|
const trait2 = traits[index];
|
|
1095
1095
|
const ctx = trait2[$internal];
|
|
1096
1096
|
const newValue = state[index];
|
|
1097
|
+
const store = stores[index];
|
|
1097
1098
|
let changed = false;
|
|
1098
1099
|
if (ctx.type === "aos") {
|
|
1099
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1100
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1100
1101
|
if (!changed) {
|
|
1101
|
-
changed = !shallowEqual(newValue, atomicSnapshots[
|
|
1102
|
+
changed = !shallowEqual(newValue, atomicSnapshots[index]);
|
|
1102
1103
|
}
|
|
1103
1104
|
} else {
|
|
1104
|
-
changed = ctx.fastSetWithChangeDetection(eid,
|
|
1105
|
+
changed = ctx.fastSetWithChangeDetection(eid, store, newValue);
|
|
1105
1106
|
}
|
|
1106
1107
|
if (changed) changedPairs.push([entity, trait2]);
|
|
1107
1108
|
}
|
|
@@ -1109,7 +1110,8 @@ function createQueryResult(query, world, params) {
|
|
|
1109
1110
|
const index = untrackedIndices[j];
|
|
1110
1111
|
const trait2 = traits[index];
|
|
1111
1112
|
const ctx = trait2[$internal];
|
|
1112
|
-
|
|
1113
|
+
const store = stores[index];
|
|
1114
|
+
ctx.fastSet(eid, store, state[index]);
|
|
1113
1115
|
}
|
|
1114
1116
|
}
|
|
1115
1117
|
for (let i = 0; i < changedPairs.length; i++) {
|