cogsbox-state 0.5.399 → 0.5.401

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.
@@ -2,7 +2,7 @@ import { jsx as V, Fragment as M } from "react/jsx-runtime";
2
2
  import "./CogsState.jsx";
3
3
  import { getNestedValue as N, isFunction as U, updateNestedProperty as T } from "./utility.js";
4
4
  import I, { useRef as b, useState as z, useEffect as R } from "react";
5
- import { formRefStore as O, getGlobalStore as d } from "./store.js";
5
+ import { getGlobalStore as d, formRefStore as O } from "./store.js";
6
6
  import { validateZodPathFunc as W } from "./useValidateZodPath.js";
7
7
  function j(n, e, t, r) {
8
8
  n(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-state",
3
- "version": "0.5.399",
3
+ "version": "0.5.401",
4
4
  "description": "React state management library with form controls and server sync",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/CogsState.tsx CHANGED
@@ -1984,7 +1984,12 @@ function createProxyHandler<T>(
1984
1984
  .getShadowMetadata(stateKey, path) || [];
1985
1985
  const lastItemHeight =
1986
1986
  shadowArray[lastItemIndex]?.virtualizer?.itemHeight || 0;
1987
-
1987
+ console.log(
1988
+ "ACTION (GETTING_HEIGHTS): lastItemHeight =",
1989
+ lastItemHeight,
1990
+ " index =",
1991
+ lastItemIndex
1992
+ );
1988
1993
  if (lastItemHeight > 0) {
1989
1994
  clearInterval(intervalId);
1990
1995
  if (!shouldNotScroll.current) {
@@ -2376,20 +2381,13 @@ function createProxyHandler<T>(
2376
2381
  stateKey,
2377
2382
  itemComponentId,
2378
2383
  itemPath: finalPath,
2379
- children: createElement(FormControlComponent, {
2380
- setState: effectiveSetState as any,
2381
- stateKey: stateKey,
2382
- path: finalPath,
2383
- child: () =>
2384
- callbackfn(
2385
- item,
2386
- setter,
2387
- { localIndex, originalIndex },
2388
- arrayToMap as any,
2389
- rebuildStateShape(arrayToMap as any, path, meta)
2390
- ),
2391
- formOpts: undefined,
2392
- }),
2384
+ children: callbackfn(
2385
+ item,
2386
+ setter,
2387
+ { localIndex, originalIndex },
2388
+ arrayToMap as any,
2389
+ rebuildStateShape(arrayToMap as any, path, meta)
2390
+ ),
2393
2391
  });
2394
2392
  });
2395
2393
  };