cogsbox-state 0.5.476 → 0.5.479

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.
@@ -271,6 +271,7 @@ export function FormElementWrapper({
271
271
 
272
272
  useEffect(() => {
273
273
  const { getShadowMetadata, setShadowMetadata } = getGlobalStore.getState();
274
+ console.log('FormElementWrapper effect running for:', stateKey, path);
274
275
 
275
276
  // Initialize clientActivityState if needed
276
277
  const currentMeta = getShadowMetadata(stateKey, path) || {};
@@ -302,7 +303,7 @@ export function FormElementWrapper({
302
303
  inputType: formElementRef.current?.type,
303
304
  mountedAt: Date.now(),
304
305
  });
305
-
306
+ console.log('currentMeta', currentMeta);
306
307
  setShadowMetadata(stateKey, path, currentMeta);
307
308
 
308
309
  // Subscribe to path updates
@@ -551,6 +552,7 @@ export function FormElementWrapper({
551
552
  </ValidationWrapper>
552
553
  );
553
554
  }
555
+
554
556
  export function useRegisterComponent(
555
557
  stateKey: string,
556
558
  componentId: string,
@@ -8,7 +8,6 @@ import {
8
8
  } from './plugins';
9
9
  import type { CogsPlugin } from './plugins';
10
10
  import type { StateObject, UpdateTypeDetail } from './CogsState';
11
- import { ClientActivityState, FormEventType } from './store';
12
11
 
13
12
  const { setHookResult, removeHookResult } = pluginStore.getState();
14
13
 
@@ -20,7 +19,7 @@ const PluginInstance = React.memo(
20
19
  stateHandler,
21
20
  }: {
22
21
  stateKey: string;
23
- plugin: CogsPlugin<any, any, any, any, any>;
22
+ plugin: CogsPlugin<any, any, any, any, any, any, any>;
24
23
  options: any;
25
24
  stateHandler: StateObject<any>;
26
25
  }) => {
@@ -118,7 +117,7 @@ const PluginInstance = React.memo(
118
117
  options,
119
118
  hookData: hookDataRef.current,
120
119
  ...deconstructed,
121
- ...scopedMetadata, // <-- Use the new scoped context
120
+ ...scopedMetadata,
122
121
  });
123
122
  }
124
123
  };
@@ -177,6 +176,7 @@ export function PluginRunner({ children }: { children: React.ReactNode }) {
177
176
  // this component will re-render to update the list of PluginInstances.
178
177
  useEffect(() => {
179
178
  const unsubscribe = pluginStore.subscribe(forceUpdate);
179
+
180
180
  return unsubscribe;
181
181
  }, []);
182
182