@flemo/core 1.2.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.
@@ -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
- declare const useNavigateStore: import('zustand').UseBoundStore<import('zustand').StoreApi<NavigateStore>>;
9
- export default useNavigateStore;
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
- declare const useTransitionStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TransitionStore>>;
7
- export default useTransitionStore;
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 fast, read-only,
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.2.0",
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.0",
36
- "zustand": "^5.0.11"
35
+ "path-to-regexp": "^8.4.2",
36
+ "zustand": "^5.0.14"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/node": "^24.3.0",
40
- "@vitest/coverage-v8": "^2.1.8",
39
+ "@types/node": "^24.13.1",
40
+ "@vitest/coverage-v8": "^4.1.8",
41
41
  "csstype": "^3.2.3",
42
- "eslint": "^9.33.0",
43
- "jsdom": "^25.0.1",
44
- "typescript": "^5.9.2",
45
- "vite": "^7.1.5",
46
- "vite-plugin-dts": "^4.5.4",
47
- "vitest": "^2.1.8",
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
  },