@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.
- package/dist/campaign/enums.d.ts +32 -0
- package/dist/campaign/index.cjs +67 -0
- package/dist/campaign/index.cjs.map +1 -1
- package/dist/campaign/index.d.ts +2 -0
- package/dist/campaign/index.js +60 -1
- package/dist/campaign/index.js.map +1 -1
- package/dist/campaign/schemas.d.ts +75 -0
- package/dist/campaign/types.d.ts +97 -0
- package/dist/core/frontend/types.d.ts +15 -1
- package/dist/index.cjs +67 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +60 -1
- package/dist/index.js.map +1 -1
- package/dist/store/types.d.ts +23 -0
- package/package.json +1 -1
package/dist/store/types.d.ts
CHANGED
|
@@ -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