@plyaz/types 1.34.1 → 1.35.1

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.
@@ -120,3 +120,26 @@ export interface RootStoreConfig {
120
120
  /** DevTools store name */
121
121
  devtoolsName?: string;
122
122
  }
123
+ /**
124
+ * Type for the root store hook (useRootStore).
125
+ *
126
+ * This is a minimal interface capturing what Core needs from the store hook.
127
+ * The actual `useRootStore` from @plyaz/store is `UseBoundStore<StoreApi<RootStoreSlice>>`
128
+ * but we define a minimal type here to avoid depending on Zustand types.
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * import { useRootStore } from '@plyaz/store';
133
+ *
134
+ * // Pass to PlyazProvider
135
+ * <PlyazProvider store={useRootStore} config={...}>
136
+ * ```
137
+ */
138
+ export interface RootStoreHook {
139
+ /** Get current state snapshot */
140
+ getState: () => RootStoreSlice;
141
+ /** Subscribe to state changes */
142
+ subscribe: (listener: (state: RootStoreSlice) => void) => () => void;
143
+ /** Set state (optional, for store mutations) */
144
+ setState?: (partial: Partial<RootStoreSlice> | ((state: RootStoreSlice) => Partial<RootStoreSlice>)) => void;
145
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.34.1",
3
+ "version": "1.35.1",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",