@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.
- package/README.md +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +1180 -1263
- package/dist/screen/__tests__/Screen.test.d.ts +1 -0
- package/dist/screen/__tests__/ScreenDecorator.test.d.ts +1 -0
- package/dist/screen/store.d.ts +4 -3
- package/dist/stores/RouterScopeProvider.d.ts +3 -0
- package/dist/stores/StoreContext.d.ts +10 -0
- package/dist/stores/__tests__/RouterScopeProvider.test.d.ts +1 -0
- package/dist/stores/__tests__/testUtils.d.ts +4 -0
- package/dist/stores/useHistoryStore.d.ts +2 -0
- package/dist/stores/useNavigateStore.d.ts +2 -0
- package/dist/stores/useScreenStore.d.ts +2 -0
- package/dist/stores/useStores.d.ts +2 -0
- package/package.json +22 -22
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/screen/store.d.ts
CHANGED
|
@@ -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
|
-
|
|
15
|
-
export default
|
|
15
|
+
export type ScreenStoreApi = StoreApi<ScreenStore>;
|
|
16
|
+
export default function createScreenStore(): ScreenStoreApi;
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flemo/react",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "React bindings for flemo
|
|
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
|
|
38
|
-
"zustand": "^5.0.
|
|
39
|
-
"@flemo/core": "1.
|
|
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.
|
|
43
|
-
"@testing-library/react": "^16.
|
|
44
|
-
"@types/node": "^24.
|
|
45
|
-
"@types/react": "^19.2.
|
|
46
|
-
"@types/react-dom": "^19.2.
|
|
47
|
-
"@vitejs/plugin-react-swc": "^4.
|
|
48
|
-
"@vitest/coverage-v8": "^
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"jsdom": "^
|
|
51
|
-
"react": "^19.2.
|
|
52
|
-
"react-dom": "^19.2.
|
|
53
|
-
"typescript": "^
|
|
54
|
-
"vite": "^
|
|
55
|
-
"vite-plugin-dts": "^
|
|
56
|
-
"vitest": "^
|
|
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.
|
|
62
|
-
"react-dom": "^19.2.
|
|
61
|
+
"react": "^19.2.7",
|
|
62
|
+
"react-dom": "^19.2.7"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|