@flemo/react 1.2.0 → 1.3.0

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,9 @@
1
+ import { StoreApi } from 'zustand/vanilla';
1
2
  export interface SharedBarPresence {
2
3
  appBar: boolean;
3
4
  navigationBar: boolean;
4
5
  }
5
- interface ScreenStore {
6
+ export interface ScreenStore {
6
7
  dragStatus: "IDLE" | "PENDING";
7
8
  replaceTransitionStatus: "IDLE" | "PENDING";
8
9
  sharedBars: Record<string, SharedBarPresence>;
@@ -11,5 +12,5 @@ interface ScreenStore {
11
12
  registerSharedBars: (id: string, presence: SharedBarPresence) => void;
12
13
  unregisterSharedBars: (id: string) => void;
13
14
  }
14
- declare const useScreenStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ScreenStore>>;
15
- export default useScreenStore;
15
+ export type ScreenStoreApi = StoreApi<ScreenStore>;
16
+ export default function createScreenStore(): ScreenStoreApi;
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from 'react';
2
+ declare function RouterScopeProvider({ children }: PropsWithChildren): import("react").JSX.Element;
3
+ export default RouterScopeProvider;
@@ -0,0 +1,10 @@
1
+ import { HistoryStoreApi, NavigateStoreApi, TransitionStoreApi } from '@flemo/core';
2
+ import { ScreenStoreApi } from '../screen/store';
3
+ export interface FlemoStores {
4
+ history: HistoryStoreApi;
5
+ navigate: NavigateStoreApi;
6
+ transition: TransitionStoreApi;
7
+ screen: ScreenStoreApi;
8
+ }
9
+ declare const StoreContext: import('react').Context<FlemoStores | null>;
10
+ export default StoreContext;
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { FlemoStores } from '../StoreContext';
3
+ export declare function createTestStores(): FlemoStores;
4
+ export declare function storesWrapper(stores: FlemoStores): ({ children }: PropsWithChildren) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { HistoryStore } from '@flemo/core';
2
+ export default function useHistoryStore<T>(selector: (state: HistoryStore) => T): T;
@@ -0,0 +1,2 @@
1
+ import { NavigateStore } from '@flemo/core';
2
+ export default function useNavigateStore<T>(selector: (state: NavigateStore) => T): T;
@@ -0,0 +1,2 @@
1
+ import { ScreenStore } from '../screen/store';
2
+ export default function useScreenStore<T>(selector: (state: ScreenStore) => T): T;
@@ -0,0 +1,2 @@
1
+ import { FlemoStores } from './StoreContext';
2
+ export default function useStores(): FlemoStores;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flemo/react",
3
- "version": "1.2.0",
4
- "description": "React bindings for flemo Router, Route, Screen, and the screen-transition runtime.",
3
+ "version": "1.3.0",
4
+ "description": "React bindings for flemo: Router, Route, Screen, and the screen-transition runtime.",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -34,32 +34,32 @@
34
34
  "homepage": "https://flemo.dev",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "path-to-regexp": "^8.2.0",
38
- "zustand": "^5.0.11",
39
- "@flemo/core": "1.3.0"
37
+ "path-to-regexp": "^8.4.2",
38
+ "zustand": "^5.0.14",
39
+ "@flemo/core": "1.4.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@testing-library/jest-dom": "^6.6.3",
43
- "@testing-library/react": "^16.1.0",
44
- "@types/node": "^24.3.0",
45
- "@types/react": "^19.2.0",
46
- "@types/react-dom": "^19.2.0",
47
- "@vitejs/plugin-react-swc": "^4.0.1",
48
- "@vitest/coverage-v8": "^2.1.8",
49
- "eslint": "^9.33.0",
50
- "jsdom": "^25.0.1",
51
- "react": "^19.2.0",
52
- "react-dom": "^19.2.0",
53
- "typescript": "^5.9.2",
54
- "vite": "^7.1.5",
55
- "vite-plugin-dts": "^4.5.4",
56
- "vitest": "^2.1.8",
42
+ "@testing-library/jest-dom": "^6.9.1",
43
+ "@testing-library/react": "^16.3.2",
44
+ "@types/node": "^24.13.1",
45
+ "@types/react": "^19.2.17",
46
+ "@types/react-dom": "^19.2.3",
47
+ "@vitejs/plugin-react-swc": "^4.3.1",
48
+ "@vitest/coverage-v8": "^4.1.8",
49
+ "eslint": "^9.39.4",
50
+ "jsdom": "^29.1.1",
51
+ "react": "^19.2.7",
52
+ "react-dom": "^19.2.7",
53
+ "typescript": "^6.0.3",
54
+ "vite": "^8.0.16",
55
+ "vite-plugin-dts": "^5.0.2",
56
+ "vitest": "^4.1.8",
57
57
  "@flemo/eslint-config": "0.0.0",
58
58
  "@flemo/tsconfig": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "react": "^19.2.0",
62
- "react-dom": "^19.2.0"
61
+ "react": "^19.2.7",
62
+ "react-dom": "^19.2.7"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"