@rsmax/web 1.0.1
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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +11 -0
- package/assets/app.css +154 -0
- package/assets/normalize.css +450 -0
- package/cjs/LoadingIcon.d.ts +6 -0
- package/cjs/LoadingIcon.js +39 -0
- package/cjs/PullToRefresh.d.ts +3 -0
- package/cjs/PullToRefresh.js +42 -0
- package/cjs/TabBar.d.ts +7 -0
- package/cjs/TabBar.js +57 -0
- package/cjs/api.d.ts +16 -0
- package/cjs/api.js +30 -0
- package/cjs/bootstrap.d.ts +2 -0
- package/cjs/bootstrap.js +18 -0
- package/cjs/bootstrapMpa.d.ts +1 -0
- package/cjs/bootstrapMpa.js +80 -0
- package/cjs/createApp.d.ts +4 -0
- package/cjs/createApp.js +72 -0
- package/cjs/createAppConfig.d.ts +54 -0
- package/cjs/createAppConfig.js +89 -0
- package/cjs/createPageConfig.d.ts +49 -0
- package/cjs/createPageConfig.js +162 -0
- package/cjs/hooks/useNativeEffect.d.ts +2 -0
- package/cjs/hooks/useNativeEffect.js +4 -0
- package/cjs/hooks/usePageInstance.d.ts +1 -0
- package/cjs/hooks/usePageInstance.js +6 -0
- package/cjs/hooks/useQuery.d.ts +3 -0
- package/cjs/hooks/useQuery.js +13 -0
- package/cjs/index.d.ts +10 -0
- package/cjs/index.js +39 -0
- package/cjs/types/index.d.ts +89 -0
- package/cjs/types/index.js +2 -0
- package/esm/LoadingIcon.d.ts +6 -0
- package/esm/LoadingIcon.js +13 -0
- package/esm/PullToRefresh.d.ts +3 -0
- package/esm/PullToRefresh.js +14 -0
- package/esm/TabBar.d.ts +7 -0
- package/esm/TabBar.js +30 -0
- package/esm/api.d.ts +16 -0
- package/esm/api.js +22 -0
- package/esm/bootstrap.d.ts +2 -0
- package/esm/bootstrap.js +12 -0
- package/esm/bootstrapMpa.d.ts +1 -0
- package/esm/bootstrapMpa.js +51 -0
- package/esm/createApp.d.ts +4 -0
- package/esm/createApp.js +43 -0
- package/esm/createAppConfig.d.ts +54 -0
- package/esm/createAppConfig.js +63 -0
- package/esm/createPageConfig.d.ts +49 -0
- package/esm/createPageConfig.js +133 -0
- package/esm/hooks/useNativeEffect.d.ts +2 -0
- package/esm/hooks/useNativeEffect.js +2 -0
- package/esm/hooks/usePageInstance.d.ts +1 -0
- package/esm/hooks/usePageInstance.js +3 -0
- package/esm/hooks/useQuery.d.ts +3 -0
- package/esm/hooks/useQuery.js +7 -0
- package/esm/index.d.ts +10 -0
- package/esm/index.js +10 -0
- package/esm/types/index.d.ts +89 -0
- package/esm/types/index.js +1 -0
- package/package.json +52 -0
- package/typings/index.d.ts +1 -0
- package/vitest.config.js +9 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ForwardRef } from 'react-is';
|
|
3
|
+
import { AppInstanceContext, AppLifecycle, callbackName, isClassComponent } from '@rsmax/framework-shared';
|
|
4
|
+
class DefaultAppComponent extends React.Component {
|
|
5
|
+
render() {
|
|
6
|
+
return React.createElement(React.Fragment, this.props);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export default function createAppConfig(App) {
|
|
10
|
+
const createConfig = (AppComponent = DefaultAppComponent) => {
|
|
11
|
+
const config = {
|
|
12
|
+
_instance: React.createRef(),
|
|
13
|
+
callLifecycle(lifecycle, ...args) {
|
|
14
|
+
const callbacks = AppInstanceContext.lifecycleCallback[lifecycle] || [];
|
|
15
|
+
let result;
|
|
16
|
+
callbacks.forEach((callback) => {
|
|
17
|
+
result = callback(...args);
|
|
18
|
+
});
|
|
19
|
+
if (result) {
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
const callback = callbackName(lifecycle);
|
|
23
|
+
if (this._instance.current && this._instance.current[callback]) {
|
|
24
|
+
return this._instance.current[callback](...args);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
return class AppConfig extends React.Component {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
this.visibilityChangeEvent = () => {
|
|
32
|
+
if (document.visibilityState === 'visible') {
|
|
33
|
+
config.callLifecycle(AppLifecycle.show);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
config.callLifecycle(AppLifecycle.hide);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this.handelVisibilityChange = () => {
|
|
40
|
+
document.addEventListener('visibilitychange', this.visibilityChangeEvent);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
componentDidMount() {
|
|
44
|
+
window.onerror = (...params) => {
|
|
45
|
+
config.callLifecycle(AppLifecycle.error, ...params);
|
|
46
|
+
};
|
|
47
|
+
config.callLifecycle(AppLifecycle.launch);
|
|
48
|
+
this.handelVisibilityChange();
|
|
49
|
+
}
|
|
50
|
+
componentWillUnmount() {
|
|
51
|
+
document.removeEventListener('visibilitychange', this.visibilityChangeEvent);
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
let ref;
|
|
55
|
+
if (isClassComponent(AppComponent) || AppComponent.$$typeof === ForwardRef) {
|
|
56
|
+
ref = config._instance;
|
|
57
|
+
}
|
|
58
|
+
return React.createElement(AppComponent, Object.assign({}, this.props, { ref: ref }));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
return createConfig(App);
|
|
63
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TabBarConfig, PageConfig } from './types';
|
|
3
|
+
interface PageConfigProps {
|
|
4
|
+
tabBar: TabBarConfig;
|
|
5
|
+
pageConfig: PageConfig;
|
|
6
|
+
location: any;
|
|
7
|
+
cacheLifecycles?: any;
|
|
8
|
+
}
|
|
9
|
+
export default function createPageConfig(Page: React.ComponentType<any>, name: string): {
|
|
10
|
+
new (props: any): {
|
|
11
|
+
state: {
|
|
12
|
+
refreshing: boolean;
|
|
13
|
+
};
|
|
14
|
+
title: string;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
componentDidCache: () => void;
|
|
18
|
+
componentDidRecover: () => void;
|
|
19
|
+
setTitle: () => void;
|
|
20
|
+
isPullDownRefreshEnabled: () => boolean | undefined;
|
|
21
|
+
getReachBottomDistance: () => number;
|
|
22
|
+
isReachBottom: boolean;
|
|
23
|
+
scrollEvent: () => void;
|
|
24
|
+
registerPageScroll: () => void;
|
|
25
|
+
unregisterPageScroll: () => void;
|
|
26
|
+
handleRefresh: () => Promise<void>;
|
|
27
|
+
checkReachBottom: () => void;
|
|
28
|
+
render(): React.JSX.Element;
|
|
29
|
+
context: unknown;
|
|
30
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<PageConfigProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
31
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
32
|
+
readonly props: Readonly<PageConfigProps>;
|
|
33
|
+
refs: {
|
|
34
|
+
[key: string]: React.ReactInstance;
|
|
35
|
+
};
|
|
36
|
+
shouldComponentUpdate?(nextProps: Readonly<PageConfigProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
37
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
38
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<PageConfigProps>, prevState: Readonly<{}>): any;
|
|
39
|
+
componentDidUpdate?(prevProps: Readonly<PageConfigProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
40
|
+
componentWillMount?(): void;
|
|
41
|
+
UNSAFE_componentWillMount?(): void;
|
|
42
|
+
componentWillReceiveProps?(nextProps: Readonly<PageConfigProps>, nextContext: any): void;
|
|
43
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<PageConfigProps>, nextContext: any): void;
|
|
44
|
+
componentWillUpdate?(nextProps: Readonly<PageConfigProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
45
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<PageConfigProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
46
|
+
};
|
|
47
|
+
contextType?: React.Context<any> | undefined;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
import { createPageWrapper, Lifecycle, callbackName } from '@rsmax/framework-shared';
|
|
4
|
+
import PullToRefresh from './PullToRefresh';
|
|
5
|
+
const DEFAULT_REACH_BOTTOM_DISTANCE = 50;
|
|
6
|
+
export default function createPageConfig(Page, name) {
|
|
7
|
+
const page = {
|
|
8
|
+
lifeCycleCallback: {},
|
|
9
|
+
wrapperRef: React.createRef(),
|
|
10
|
+
registerLifecycle(lifeCycle, callback) {
|
|
11
|
+
this.lifeCycleCallback[lifeCycle] = this.lifeCycleCallback[lifeCycle] || [];
|
|
12
|
+
this.lifeCycleCallback[lifeCycle].push(callback);
|
|
13
|
+
return () => {
|
|
14
|
+
this.lifeCycleCallback[lifeCycle].splice(this.lifeCycleCallback[lifeCycle].indexOf(callback), 1);
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
callLifecycle(lifeCycle, ...args) {
|
|
18
|
+
const callbacks = this.lifeCycleCallback[lifeCycle] || [];
|
|
19
|
+
let result;
|
|
20
|
+
callbacks.forEach((callback) => {
|
|
21
|
+
result = callback(...args);
|
|
22
|
+
});
|
|
23
|
+
if (result) {
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
const callback = callbackName(lifeCycle);
|
|
27
|
+
if (this.wrapperRef.current && this.wrapperRef.current[callback]) {
|
|
28
|
+
return this.wrapperRef.current[callback](...args);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const PageWrapper = createPageWrapper(Page, name);
|
|
33
|
+
return class PageConfig extends React.Component {
|
|
34
|
+
constructor(props) {
|
|
35
|
+
super(props);
|
|
36
|
+
this.state = {
|
|
37
|
+
refreshing: true,
|
|
38
|
+
};
|
|
39
|
+
this.title = this.props.pageConfig.defaultTitle || document.title;
|
|
40
|
+
this.componentDidCache = () => {
|
|
41
|
+
this.title = document.title;
|
|
42
|
+
page.callLifecycle(Lifecycle.hide);
|
|
43
|
+
this.unregisterPageScroll();
|
|
44
|
+
};
|
|
45
|
+
this.componentDidRecover = () => {
|
|
46
|
+
this.setTitle();
|
|
47
|
+
page.callLifecycle(Lifecycle.show);
|
|
48
|
+
};
|
|
49
|
+
this.setTitle = () => {
|
|
50
|
+
document.title = this.title;
|
|
51
|
+
};
|
|
52
|
+
this.isPullDownRefreshEnabled = () => {
|
|
53
|
+
const { pageConfig } = this.props;
|
|
54
|
+
return pageConfig.pullRefresh;
|
|
55
|
+
};
|
|
56
|
+
this.getReachBottomDistance = () => {
|
|
57
|
+
var _a;
|
|
58
|
+
const { pageConfig } = this.props;
|
|
59
|
+
return (_a = pageConfig.onReachBottomDistance) !== null && _a !== void 0 ? _a : DEFAULT_REACH_BOTTOM_DISTANCE;
|
|
60
|
+
};
|
|
61
|
+
this.isReachBottom = false;
|
|
62
|
+
this.scrollEvent = () => {
|
|
63
|
+
this.checkReachBottom();
|
|
64
|
+
const event = { scrollTop: window.scrollY };
|
|
65
|
+
page.callLifecycle(Lifecycle.pageScroll, event);
|
|
66
|
+
};
|
|
67
|
+
this.registerPageScroll = () => {
|
|
68
|
+
window.addEventListener('scroll', this.scrollEvent);
|
|
69
|
+
};
|
|
70
|
+
this.unregisterPageScroll = () => {
|
|
71
|
+
window.removeEventListener('scroll', this.scrollEvent);
|
|
72
|
+
};
|
|
73
|
+
this.handleRefresh = async () => {
|
|
74
|
+
this.setState({
|
|
75
|
+
refreshing: true,
|
|
76
|
+
});
|
|
77
|
+
try {
|
|
78
|
+
await page.callLifecycle(Lifecycle.pullDownRefresh);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
this.setState({
|
|
82
|
+
refreshing: false,
|
|
83
|
+
});
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
this.setState({
|
|
87
|
+
refreshing: false,
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.checkReachBottom = () => {
|
|
91
|
+
const isCurrentReachBottom = document.body.scrollHeight - (window.innerHeight + window.scrollY) <= this.getReachBottomDistance();
|
|
92
|
+
if (!this.isReachBottom && isCurrentReachBottom) {
|
|
93
|
+
this.isReachBottom = true;
|
|
94
|
+
page.callLifecycle(Lifecycle.reachBottom);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this.isReachBottom = isCurrentReachBottom;
|
|
98
|
+
};
|
|
99
|
+
props.cacheLifecycles.didCache(this.componentDidCache);
|
|
100
|
+
props.cacheLifecycles.didRecover(this.componentDidRecover);
|
|
101
|
+
}
|
|
102
|
+
componentDidMount() {
|
|
103
|
+
this.setTitle();
|
|
104
|
+
page.callLifecycle(Lifecycle.load);
|
|
105
|
+
page.callLifecycle(Lifecycle.show);
|
|
106
|
+
page.callLifecycle(Lifecycle.ready);
|
|
107
|
+
this.registerPageScroll();
|
|
108
|
+
}
|
|
109
|
+
componentWillUnmount() {
|
|
110
|
+
this.unregisterPageScroll();
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
const { tabBar, location } = this.props;
|
|
114
|
+
const { refreshing } = this.state;
|
|
115
|
+
const hasTabBar = !!tabBar;
|
|
116
|
+
const className = `remax-page ${hasTabBar ? 'with-tab-bar' : ''}`;
|
|
117
|
+
const query = qs.parse(location.search, { ignoreQueryPrefix: true });
|
|
118
|
+
if (this.isPullDownRefreshEnabled()) {
|
|
119
|
+
return (React.createElement(PullToRefresh, { onRefresh: this.handleRefresh, refreshing: refreshing, distanceToRefresh: 50 },
|
|
120
|
+
React.createElement("div", { className: className }, React.createElement(PageWrapper, {
|
|
121
|
+
page,
|
|
122
|
+
query,
|
|
123
|
+
ref: page.wrapperRef,
|
|
124
|
+
}))));
|
|
125
|
+
}
|
|
126
|
+
return (React.createElement("div", { className: className }, React.createElement(PageWrapper, {
|
|
127
|
+
page,
|
|
128
|
+
query,
|
|
129
|
+
ref: page.wrapperRef,
|
|
130
|
+
})));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePageInstance(): any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useLocation } from 'react-router-dom';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
import { RuntimeOptions } from '@rsmax/framework-shared';
|
|
4
|
+
export default function useQuery() {
|
|
5
|
+
const location = RuntimeOptions.get('mpa') ? window.location : useLocation();
|
|
6
|
+
return qs.parse(location.search, { ignoreQueryPrefix: true });
|
|
7
|
+
}
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { useAppEvent, usePageEvent } from '@rsmax/framework-shared';
|
|
2
|
+
export { default as createAppConfig } from './createAppConfig';
|
|
3
|
+
export { default as createPageConfig } from './createPageConfig';
|
|
4
|
+
export { default as useQuery } from './hooks/useQuery';
|
|
5
|
+
export { default as useNativeEffect } from './hooks/useNativeEffect';
|
|
6
|
+
export { default as usePageInstance } from './hooks/usePageInstance';
|
|
7
|
+
export { default as bootstrap } from './bootstrap';
|
|
8
|
+
export { default as bootstrapMpa } from './bootstrapMpa';
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './types';
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { useAppEvent, usePageEvent } from '@rsmax/framework-shared';
|
|
2
|
+
export { default as createAppConfig } from './createAppConfig';
|
|
3
|
+
export { default as createPageConfig } from './createPageConfig';
|
|
4
|
+
export { default as useQuery } from './hooks/useQuery';
|
|
5
|
+
export { default as useNativeEffect } from './hooks/useNativeEffect';
|
|
6
|
+
export { default as usePageInstance } from './hooks/usePageInstance';
|
|
7
|
+
export { default as bootstrap } from './bootstrap';
|
|
8
|
+
export { default as bootstrapMpa } from './bootstrapMpa';
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './types';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Page {
|
|
3
|
+
route: string;
|
|
4
|
+
config: PageConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const enum RouterType {
|
|
7
|
+
hash = "hash",
|
|
8
|
+
browser = "browser"
|
|
9
|
+
}
|
|
10
|
+
export interface BootstrapOptions {
|
|
11
|
+
async?: boolean;
|
|
12
|
+
appComponent: React.ComponentType;
|
|
13
|
+
appConfig: AppConfig;
|
|
14
|
+
plugins?: any[];
|
|
15
|
+
pageComponents: Array<() => Promise<{
|
|
16
|
+
default: React.ComponentType;
|
|
17
|
+
}> | React.ComponentType>;
|
|
18
|
+
pages: Page[];
|
|
19
|
+
}
|
|
20
|
+
export interface TabItem {
|
|
21
|
+
/**
|
|
22
|
+
* 设置页面路径
|
|
23
|
+
*/
|
|
24
|
+
url: string;
|
|
25
|
+
/**
|
|
26
|
+
* 名称
|
|
27
|
+
*/
|
|
28
|
+
title: string;
|
|
29
|
+
/**
|
|
30
|
+
* 平常图标路径
|
|
31
|
+
*/
|
|
32
|
+
image: string;
|
|
33
|
+
/**
|
|
34
|
+
* 高亮图标路径
|
|
35
|
+
*/
|
|
36
|
+
activeImage?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface TabBarConfig {
|
|
39
|
+
/**
|
|
40
|
+
* 标题颜色
|
|
41
|
+
*/
|
|
42
|
+
textColor?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 选中标题颜色
|
|
45
|
+
*/
|
|
46
|
+
selectedColor?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 背景色
|
|
49
|
+
*/
|
|
50
|
+
backgroundColor?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 每个 tab 配置
|
|
53
|
+
*/
|
|
54
|
+
items: TabItem[];
|
|
55
|
+
}
|
|
56
|
+
interface WindowConfig {
|
|
57
|
+
/**
|
|
58
|
+
* 页面默认标题
|
|
59
|
+
*/
|
|
60
|
+
defaultTitle?: string;
|
|
61
|
+
/**
|
|
62
|
+
* 默认值:false
|
|
63
|
+
* 是否开启全局的下拉刷新。
|
|
64
|
+
*/
|
|
65
|
+
pullRefresh?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 默认值:50
|
|
68
|
+
* 页面触底事件触发时距页面底部距离,单位为 px。
|
|
69
|
+
*/
|
|
70
|
+
onReachBottomDistance?: number;
|
|
71
|
+
}
|
|
72
|
+
/** 全局配置文件 */
|
|
73
|
+
export interface AppConfig {
|
|
74
|
+
/**
|
|
75
|
+
* 设置页面路径
|
|
76
|
+
*/
|
|
77
|
+
pages: string[];
|
|
78
|
+
window?: WindowConfig;
|
|
79
|
+
/**
|
|
80
|
+
* 设置底部 tab bar 的表现
|
|
81
|
+
*/
|
|
82
|
+
tabBar?: TabBarConfig;
|
|
83
|
+
router?: {
|
|
84
|
+
type: RouterType;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** 页面配置文件 */
|
|
88
|
+
export type PageConfig = WindowConfig;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rsmax/web",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Shim of web for rsmax",
|
|
5
|
+
"author": "Wei Zhu <yesmeck@gmail.com>",
|
|
6
|
+
"homepage": "https://github.com/remaxjs/remax#readme",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./cjs/index.js",
|
|
9
|
+
"esnext": "./esm/index.js",
|
|
10
|
+
"module": "./esm/index.js",
|
|
11
|
+
"typings": "./esm/index.d.ts",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/remaxjs/remax.git"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"clean": "rimraf cjs esm tsconfig.tsbuildinfo",
|
|
18
|
+
"prebuild": "npm run clean",
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"build:cjs": "tsc --module CommonJS --outDir cjs",
|
|
21
|
+
"test": "vitest run"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/remaxjs/remax/issues"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@loadable/component": "^5.12.0",
|
|
28
|
+
"@remax/react-router-cache-route": "^1.8.4",
|
|
29
|
+
"@rsmax/framework-shared": "1.0.1",
|
|
30
|
+
"history": "^5.3.0",
|
|
31
|
+
"qs": "^6.9.3",
|
|
32
|
+
"react-is": "^18.3.0",
|
|
33
|
+
"react-router-dom": "^5.2.0",
|
|
34
|
+
"rmc-pull-to-refresh": "^1.0.12",
|
|
35
|
+
"umi-hd": "^5.0.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/loadable__component": "^5.10.0",
|
|
39
|
+
"@types/qs": "^6.9.3",
|
|
40
|
+
"@types/react": "^18.3.0",
|
|
41
|
+
"@types/react-is": "^17.0.2",
|
|
42
|
+
"@types/react-router-dom": "^5.3.3",
|
|
43
|
+
"@types/react-test-renderer": "^18.3.0",
|
|
44
|
+
"jsdom": "^26.1.0",
|
|
45
|
+
"react": "^18.3.0",
|
|
46
|
+
"react-test-renderer": "^18.3.0"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"gitHead": "d2ff644810449152d124a9da76218bcd9fdfff46"
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'umi-hd';
|