cogsbox-state 0.5.394 → 0.5.396
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/CogsState.d.ts +4 -1
- package/dist/CogsState.jsx +188 -188
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +3 -3
package/package.json
CHANGED
package/src/CogsState.tsx
CHANGED
|
@@ -185,7 +185,7 @@ export type ArrayEndType<TShape extends unknown> = {
|
|
|
185
185
|
callbackfn: (
|
|
186
186
|
value: InferArrayElement<TShape>,
|
|
187
187
|
setter: StateObject<InferArrayElement<TShape>>,
|
|
188
|
-
index: number,
|
|
188
|
+
index: { localIndex: number; originalIndex: number },
|
|
189
189
|
array: TShape,
|
|
190
190
|
arraySetter: StateObject<TShape>
|
|
191
191
|
) => void
|
|
@@ -2345,7 +2345,7 @@ function createProxyHandler<T>(
|
|
|
2345
2345
|
callbackfn: (
|
|
2346
2346
|
value: InferArrayElement<T>,
|
|
2347
2347
|
setter: StateObject<InferArrayElement<T>>,
|
|
2348
|
-
index: number,
|
|
2348
|
+
index: { localIndex: number; originalIndex: number },
|
|
2349
2349
|
array: T,
|
|
2350
2350
|
arraySetter: StateObject<T>
|
|
2351
2351
|
) => any
|
|
@@ -2379,7 +2379,7 @@ function createProxyHandler<T>(
|
|
|
2379
2379
|
children: callbackfn(
|
|
2380
2380
|
item,
|
|
2381
2381
|
setter,
|
|
2382
|
-
localIndex,
|
|
2382
|
+
{ localIndex, originalIndex },
|
|
2383
2383
|
arrayToMap as any,
|
|
2384
2384
|
rebuildStateShape(arrayToMap as any, path, meta)
|
|
2385
2385
|
),
|