@akanjs/next 0.0.38 → 0.0.40
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/csrTypes-B6ATv9-y.d.ts +88 -0
- package/index.d.ts +33 -0
- package/index.js +20 -2723
- package/package.json +2 -35
- package/src/bootCsr.d.ts +3 -0
- package/src/bootCsr.js +206 -0
- package/src/createNextMiddleware.d.ts +5 -0
- package/src/createNextMiddleware.js +88 -0
- package/src/createRobotPage.d.ts +5 -0
- package/src/createRobotPage.js +39 -0
- package/src/createSitemapPage.d.ts +5 -0
- package/src/createSitemapPage.js +34 -0
- package/src/index.d.ts +33 -0
- package/src/index.js +82 -0
- package/src/lazy.d.ts +8 -0
- package/src/lazy.js +40 -0
- package/src/makePageProto.d.ts +42 -0
- package/src/makePageProto.js +147 -0
- package/src/types.d.ts +9 -0
- package/src/types.js +15 -0
- package/src/useCamera.d.ts +11 -0
- package/src/useCamera.js +114 -0
- package/src/useCodepush.d.ts +51 -0
- package/src/useCodepush.js +115 -0
- package/src/useContact.d.ts +10 -0
- package/src/useContact.js +73 -0
- package/src/useCsrValues.d.ts +44 -0
- package/src/useCsrValues.js +924 -0
- package/src/useDebounce.d.ts +3 -0
- package/src/useDebounce.js +42 -0
- package/src/useFetch.d.ts +8 -0
- package/src/useFetch.js +54 -0
- package/src/useGeoLocation.d.ts +12 -0
- package/src/useGeoLocation.js +51 -0
- package/src/useHistory.d.ts +24 -0
- package/src/useHistory.js +88 -0
- package/src/useInterval.d.ts +5 -0
- package/src/useInterval.js +49 -0
- package/src/useLocation.d.ts +12 -0
- package/src/useLocation.js +92 -0
- package/src/usePurchase.d.ts +20 -0
- package/src/usePurchase.js +139 -0
- package/src/usePushNoti.d.ts +8 -0
- package/src/usePushNoti.js +68 -0
- package/src/useThrottle.d.ts +3 -0
- package/src/useThrottle.js +44 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ReactNode, ExoticComponent } from 'react';
|
|
2
|
+
import { AnimatedComponent } from 'react-spring';
|
|
3
|
+
|
|
4
|
+
type TransitionType = "none" | "fade" | "bottomUp" | "stack" | "scaleOut";
|
|
5
|
+
interface CsrState {
|
|
6
|
+
transition: TransitionType;
|
|
7
|
+
topSafeArea: number;
|
|
8
|
+
bottomSafeArea: number;
|
|
9
|
+
topInset: number;
|
|
10
|
+
bottomInset: number;
|
|
11
|
+
gesture: boolean;
|
|
12
|
+
cache: boolean;
|
|
13
|
+
}
|
|
14
|
+
type TransitionStyle = NonNullable<AnimatedComponent<ExoticComponent>["defaultProps"]>["style"];
|
|
15
|
+
interface SafeAreaTransition {
|
|
16
|
+
containerStyle: TransitionStyle;
|
|
17
|
+
}
|
|
18
|
+
interface ContainerTransition {
|
|
19
|
+
containerStyle: TransitionStyle;
|
|
20
|
+
contentStyle: TransitionStyle;
|
|
21
|
+
prevContentStyle: TransitionStyle;
|
|
22
|
+
}
|
|
23
|
+
interface PageTransition {
|
|
24
|
+
containerStyle: TransitionStyle;
|
|
25
|
+
contentStyle: TransitionStyle;
|
|
26
|
+
}
|
|
27
|
+
type PageState = CsrState & {
|
|
28
|
+
topInset: number;
|
|
29
|
+
bottomInset: number;
|
|
30
|
+
};
|
|
31
|
+
interface Location {
|
|
32
|
+
pathname: string;
|
|
33
|
+
search: string;
|
|
34
|
+
params: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
searchParams: {
|
|
38
|
+
[key: string]: string | string[];
|
|
39
|
+
};
|
|
40
|
+
pathRoute: PathRoute;
|
|
41
|
+
}
|
|
42
|
+
interface History {
|
|
43
|
+
type: "initial" | "forward" | "back";
|
|
44
|
+
locations: Location[];
|
|
45
|
+
scrollMap: Map<string, number>;
|
|
46
|
+
idxMap: Map<string, number>;
|
|
47
|
+
cachedLocationMap: Map<string, Location>;
|
|
48
|
+
idx: number;
|
|
49
|
+
}
|
|
50
|
+
interface PathRoute {
|
|
51
|
+
path: string;
|
|
52
|
+
pathSegments: string[];
|
|
53
|
+
Page: (({ params, searchParams }: {
|
|
54
|
+
params: any;
|
|
55
|
+
searchParams: any;
|
|
56
|
+
}) => ReactNode) | (({ params, searchParams }: {
|
|
57
|
+
params: any;
|
|
58
|
+
searchParams: any;
|
|
59
|
+
}) => Promise<ReactNode>);
|
|
60
|
+
pageState: PageState;
|
|
61
|
+
RootLayouts: ((({ children, params, searchParams }: {
|
|
62
|
+
children: any;
|
|
63
|
+
params: any;
|
|
64
|
+
searchParams: any;
|
|
65
|
+
}) => ReactNode) | (({ children, params, searchParams }: {
|
|
66
|
+
children: any;
|
|
67
|
+
params: any;
|
|
68
|
+
searchParams: any;
|
|
69
|
+
}) => Promise<ReactNode>))[];
|
|
70
|
+
Layouts: ((({ children, params, searchParams }: {
|
|
71
|
+
children: any;
|
|
72
|
+
params: any;
|
|
73
|
+
searchParams: any;
|
|
74
|
+
}) => ReactNode) | (({ children, params, searchParams }: {
|
|
75
|
+
children: any;
|
|
76
|
+
params: any;
|
|
77
|
+
searchParams: any;
|
|
78
|
+
}) => Promise<ReactNode>))[];
|
|
79
|
+
}
|
|
80
|
+
interface RouteGuide {
|
|
81
|
+
pathSegment: string;
|
|
82
|
+
pathRoute?: PathRoute;
|
|
83
|
+
children: {
|
|
84
|
+
[key: string]: RouteGuide;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type { ContainerTransition as C, History as H, Location as L, PathRoute as P, RouteGuide as R, SafeAreaTransition as S, TransitionType as T, PageTransition as a };
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { LoginAuth, LoginForm } from './src/types.js';
|
|
2
|
+
export { useFetch } from './src/useFetch.js';
|
|
3
|
+
export { lazy } from './src/lazy.js';
|
|
4
|
+
export { makePageProto } from './src/makePageProto.js';
|
|
5
|
+
export { useDebounce } from './src/useDebounce.js';
|
|
6
|
+
export { useInterval } from './src/useInterval.js';
|
|
7
|
+
export { bootCsr } from './src/bootCsr.js';
|
|
8
|
+
export { useCamera } from './src/useCamera.js';
|
|
9
|
+
export { useContact } from './src/useContact.js';
|
|
10
|
+
export { usePushNoti } from './src/usePushNoti.js';
|
|
11
|
+
export { useGeoLocation } from './src/useGeoLocation.js';
|
|
12
|
+
export { useCodepush } from './src/useCodepush.js';
|
|
13
|
+
export { CdvProductType, PlatformType, ProductType, usePurchase } from './src/usePurchase.js';
|
|
14
|
+
export { useCsrValues } from './src/useCsrValues.js';
|
|
15
|
+
export { createRobotPage } from './src/createRobotPage.js';
|
|
16
|
+
export { createSitemapPage } from './src/createSitemapPage.js';
|
|
17
|
+
export { createNextMiddleware } from './src/createNextMiddleware.js';
|
|
18
|
+
export { useThrottle } from './src/useThrottle.js';
|
|
19
|
+
export { useHistory } from './src/useHistory.js';
|
|
20
|
+
export { useLocation } from './src/useLocation.js';
|
|
21
|
+
import 'next/dynamic';
|
|
22
|
+
import 'react';
|
|
23
|
+
import '@capacitor/camera';
|
|
24
|
+
import '@capacitor-community/contacts';
|
|
25
|
+
import '@capacitor/geolocation';
|
|
26
|
+
import '@capacitor/core';
|
|
27
|
+
import 'dayjs';
|
|
28
|
+
import '@react-spring/web';
|
|
29
|
+
import '@use-gesture/react/dist/declarations/src/types';
|
|
30
|
+
import './csrTypes-B6ATv9-y.js';
|
|
31
|
+
import 'react-spring';
|
|
32
|
+
import 'next';
|
|
33
|
+
import 'next/server';
|