@octanejs/redux-toolkit 0.1.31 → 0.1.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/redux-toolkit",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,10 +37,10 @@
37
37
  "@reduxjs/toolkit": "^2.12.0",
38
38
  "redux": "^5.0.1",
39
39
  "reselect": "5.2.0",
40
- "@octanejs/redux": "0.1.33"
40
+ "@octanejs/redux": "0.1.35"
41
41
  },
42
42
  "peerDependencies": {
43
- "octane": "0.1.36"
43
+ "octane": "0.1.38"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@tsrx/react": "^0.2.56",
@@ -49,7 +49,7 @@
49
49
  "react-dom": "^19.2.7",
50
50
  "react-redux": "9.3.0",
51
51
  "vitest": "^4.1.10",
52
- "octane": "0.1.36"
52
+ "octane": "0.1.38"
53
53
  },
54
54
  "scripts": {
55
55
  "test": "vitest run --root ../.. --project redux-toolkit --project redux-toolkit-ssr"
@@ -1,11 +1,17 @@
1
1
  // Port of RTK Query's ApiProvider. It owns an isolated Toolkit store and uses
2
2
  // @octanejs/redux's Provider; query hooks can also use a caller-supplied context.
3
3
  import { useContext, useEffect, useState } from 'octane';
4
+ import type { Context, OctaneNode } from 'octane';
4
5
  import { configureStore } from '@reduxjs/toolkit';
5
- import { Provider, ReactReduxContext } from '@octanejs/redux';
6
- import { setupListeners } from '@reduxjs/toolkit/query';
6
+ import { Provider, ReactReduxContext, type ReactReduxContextValue } from '@octanejs/redux';
7
+ import { setupListeners, type Api } from '@reduxjs/toolkit/query';
7
8
 
8
- export function ApiProvider(props) @{
9
+ export function ApiProvider(props: {
10
+ children?: OctaneNode;
11
+ api: Api<any, {}, any, any>;
12
+ setupListeners?: Parameters<typeof setupListeners>[1] | false;
13
+ context?: Context<ReactReduxContextValue | null>;
14
+ }) @{
9
15
  const context = props.context || ReactReduxContext;
10
16
  const existingContext = useContext(context);
11
17
  if (existingContext) {