@flemo/core 1.7.0 → 1.9.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.
Files changed (27) hide show
  1. package/dist/core/__tests__/createRouterScope.test.d.ts +1 -0
  2. package/dist/core/__tests__/taskManagerBranches.test.d.ts +1 -0
  3. package/dist/core/createRouterScope.d.ts +26 -0
  4. package/dist/core/engine/__tests__/createSwipeController.gestures.test.d.ts +1 -0
  5. package/dist/core/engine/__tests__/createTransitionEngine.branches.test.d.ts +1 -0
  6. package/dist/history/__tests__/historyDriverBranches.test.d.ts +1 -0
  7. package/dist/index.d.ts +9 -0
  8. package/dist/index.mjs +389 -217
  9. package/dist/navigate/__tests__/createStepController.test.d.ts +1 -0
  10. package/dist/navigate/createStepController.d.ts +21 -0
  11. package/dist/screen/__tests__/observeBarHeight.test.d.ts +1 -0
  12. package/dist/screen/__tests__/observeViewportScrollHeight.test.d.ts +1 -0
  13. package/dist/screen/observeBarHeight.d.ts +1 -0
  14. package/dist/screen/observeViewportScrollHeight.d.ts +1 -0
  15. package/dist/transition/__tests__/coverageBranches.test.d.ts +6 -0
  16. package/dist/transition/__tests__/enteringInitialStyle.test.d.ts +1 -0
  17. package/dist/transition/__tests__/presetSwipeCallbacks.test.d.ts +1 -0
  18. package/dist/transition/__tests__/registerTransitionDefinitions.test.d.ts +6 -0
  19. package/dist/transition/enteringInitialStyle.d.ts +11 -0
  20. package/dist/transition/registerTransitionDefinitions.d.ts +4 -0
  21. package/dist/transition/resolveTransition.d.ts +2 -0
  22. package/dist/utils/__tests__/buildRoutePath.test.d.ts +1 -0
  23. package/dist/utils/__tests__/findScrollableEvent.test.d.ts +1 -0
  24. package/dist/utils/__tests__/matchesPathname.test.d.ts +1 -0
  25. package/dist/utils/buildRoutePath.d.ts +5 -0
  26. package/dist/utils/matchesPathname.d.ts +2 -0
  27. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import { HistoryDriver } from '../history/historyDriver';
2
+ import { HistoryStoreApi } from '../history/store';
3
+ import { NavigateStoreApi } from './store';
4
+ export declare const readStepParams: <P>(state: unknown) => P | null;
5
+ export declare const appendParamsQuery: (pathname: string, params: object) => string;
6
+ export interface StepControllerDeps {
7
+ stores: {
8
+ history: HistoryStoreApi;
9
+ navigate: NavigateStoreApi;
10
+ };
11
+ driver: HistoryDriver;
12
+ markSelfInduced: () => void;
13
+ buildStepPathname: (params: object) => string;
14
+ applyParams: (params: object) => void;
15
+ }
16
+ export default function createStepController(deps: StepControllerDeps): {
17
+ pushStep: (params: object) => Promise<void>;
18
+ replaceStep: (params: object) => Promise<void>;
19
+ popStep: () => Promise<void>;
20
+ };
21
+ export declare function subscribeStepParamsRestore(driver: HistoryDriver, onParams: (params: object) => void): () => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export default function observeBarHeight(element: HTMLElement, onHeight: (height: number) => void): () => void;
@@ -0,0 +1 @@
1
+ export default function observeViewportScrollHeight(onChange: (viewportScrollHeight: number, changedViewportScrollHeight: number) => void): () => void;
@@ -0,0 +1,6 @@
1
+ declare module '../partTransition/typing' {
2
+ interface RegisterPartTransition {
3
+ "coverage-branch-part": "coverage-branch-part";
4
+ }
5
+ }
6
+ export {};
@@ -0,0 +1,6 @@
1
+ declare module '../typing' {
2
+ interface RegisterTransition {
3
+ "register-test-slide": "register-test-slide";
4
+ }
5
+ }
6
+ export {};
@@ -0,0 +1,11 @@
1
+ import { NavigateStatus } from '../navigate/store';
2
+ import { InitialTarget } from './cssTypes';
3
+ export interface EnteringInitialStyleInput {
4
+ initial: InitialTarget;
5
+ isActive: boolean;
6
+ status: NavigateStatus;
7
+ }
8
+ export default function enteringInitialStyle(input: EnteringInitialStyleInput): {
9
+ transform?: string;
10
+ opacity?: string;
11
+ };
@@ -0,0 +1,4 @@
1
+ import { Transition } from './typing';
2
+ import { Decorator } from './decorator/typing';
3
+ import { PartTransition } from './partTransition/typing';
4
+ export default function registerTransitionDefinitions(transitions: Transition[], decorators: Decorator[], partTransitions?: PartTransition[]): () => void;
@@ -0,0 +1,2 @@
1
+ import { Transition, TransitionName } from './typing';
2
+ export default function resolveTransition(transitionName: TransitionName): Transition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Path } from 'path-to-regexp';
2
+ export default function buildRoutePath(path: Path, params: Record<string, unknown> | undefined): {
3
+ pathname: string;
4
+ toPathname: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { Path } from 'path-to-regexp';
2
+ export default function matchesPathname(path: Path | Path[], pathname: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flemo/core",
3
- "version": "1.7.0",
3
+ "version": "1.9.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",