@flemo/core 1.3.0 → 1.4.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/dist/history/store.d.ts +4 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +822 -1046
- package/dist/navigate/store.d.ts +4 -3
- package/dist/transition/store.d.ts +4 -3
- package/dist/utils/findScrollable.d.ts +1 -1
- package/package.json +11 -11
package/dist/navigate/store.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { StoreApi } from 'zustand/vanilla';
|
|
1
2
|
export type NavigateStatus = "IDLE" | "PUSHING" | "REPLACING" | "POPPING" | "COMPLETED";
|
|
2
|
-
interface NavigateStore {
|
|
3
|
+
export interface NavigateStore {
|
|
3
4
|
status: NavigateStatus;
|
|
4
5
|
transitionTaskId: string | null;
|
|
5
6
|
setStatus: (status: NavigateStatus) => void;
|
|
6
7
|
setTransitionTaskId: (transitionTaskId: string | null) => void;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
export default
|
|
9
|
+
export type NavigateStoreApi = StoreApi<NavigateStore>;
|
|
10
|
+
export default function createNavigateStore(): NavigateStoreApi;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { StoreApi } from 'zustand/vanilla';
|
|
1
2
|
import { TransitionName } from './typing';
|
|
2
|
-
interface TransitionStore {
|
|
3
|
+
export interface TransitionStore {
|
|
3
4
|
defaultTransitionName: TransitionName;
|
|
4
5
|
setDefaultTransitionName: (defaultTransitionName: TransitionName) => void;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
export default
|
|
7
|
+
export type TransitionStoreApi = StoreApi<TransitionStore>;
|
|
8
|
+
export default function createTransitionStore(defaultTransitionName?: TransitionName): TransitionStoreApi;
|
|
@@ -12,7 +12,7 @@ export declare function overflowsAxis(element: HTMLElement, direction: "y" | "x"
|
|
|
12
12
|
/**
|
|
13
13
|
* Whether the element actually scrolls on the given axis.
|
|
14
14
|
*
|
|
15
|
-
* Reads `overflowX` / `overflowY` from computed style
|
|
15
|
+
* Reads `overflowX` / `overflowY` from computed style: fast, read-only,
|
|
16
16
|
* and free of side effects. The previous implementation probed by writing
|
|
17
17
|
* to `scrollTop` / `scrollLeft` and reverting, which fired scroll events
|
|
18
18
|
* and interfered with `scroll-snap` / `scroll-behavior: smooth` consumers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flemo/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Framework-agnostic primitives for flemo: history, navigation, transitions, task manager.",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"homepage": "https://flemo.dev",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"path-to-regexp": "^8.2
|
|
36
|
-
"zustand": "^5.0.
|
|
35
|
+
"path-to-regexp": "^8.4.2",
|
|
36
|
+
"zustand": "^5.0.14"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^24.
|
|
40
|
-
"@vitest/coverage-v8": "^
|
|
39
|
+
"@types/node": "^24.13.1",
|
|
40
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
41
41
|
"csstype": "^3.2.3",
|
|
42
|
-
"eslint": "^9.
|
|
43
|
-
"jsdom": "^
|
|
44
|
-
"typescript": "^
|
|
45
|
-
"vite": "^
|
|
46
|
-
"vite-plugin-dts": "^
|
|
47
|
-
"vitest": "^
|
|
42
|
+
"eslint": "^9.39.4",
|
|
43
|
+
"jsdom": "^29.1.1",
|
|
44
|
+
"typescript": "^6.0.3",
|
|
45
|
+
"vite": "^8.0.16",
|
|
46
|
+
"vite-plugin-dts": "^5.0.2",
|
|
47
|
+
"vitest": "^4.1.8",
|
|
48
48
|
"@flemo/eslint-config": "0.0.0",
|
|
49
49
|
"@flemo/tsconfig": "0.0.0"
|
|
50
50
|
},
|