@lemon-fe/mini-app 0.1.29 → 0.1.30

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.
@@ -138,7 +138,7 @@ function App(props) {
138
138
  }));
139
139
  return /*#__PURE__*/React.createElement(NavigationContext.Provider, {
140
140
  value: ctx
141
- }, children ? /*#__PURE__*/cloneElement(children, {}, screens) : screens, process.env.NODE_ENV === 'development' && /*#__PURE__*/React.createElement(Capsule, null));
141
+ }, children ? /*#__PURE__*/cloneElement(children, {}, screens) : screens, process.env.NODE_ENV === 'development' && window.ReactNativeWebView === undefined && /*#__PURE__*/React.createElement(Capsule, null));
142
142
  }
143
143
 
144
144
  export default App;
@@ -1,6 +1,6 @@
1
1
  .lemon-capsule {
2
2
  position: fixed;
3
- top: 7px;
3
+ top: calc(env(safe-area-inset-top) + 7px);
4
4
  right: 15px;
5
5
  height: 30px;
6
6
  background-color: rgba(255, 255, 255, 0.6);
package/es/global.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { UserInfo } from './typings';
1
2
  interface Mini {
2
3
  getSystemInfoSync(): {
3
4
  statusBarHeight: number;
@@ -20,12 +21,7 @@ interface Mini {
20
21
  }): void;
21
22
  exit(): void;
22
23
  getUserInfo(opt: {
23
- success?: (user: {
24
- id: number;
25
- companyId: number;
26
- roleNames: string[];
27
- branchIds: number[];
28
- }) => void;
24
+ success?: (user: UserInfo) => void;
29
25
  }): void;
30
26
  }
31
27
  declare global {
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './global';
2
2
  export { AppContainer } from './components';
3
3
  export * from './hooks';
4
- export type { NavigationStackScreen, Path } from './typings';
4
+ export type { NavigationStackScreen, Path, UserInfo } from './typings';
package/es/typings.d.ts CHANGED
@@ -12,3 +12,10 @@ export interface Path {
12
12
  search: string;
13
13
  hash: string;
14
14
  }
15
+
16
+ export interface UserInfo {
17
+ id: number;
18
+ companyId: number;
19
+ roleNames: string[];
20
+ branchIds: number[];
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/mini-app",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",
@@ -34,5 +34,5 @@
34
34
  "@types/react-transition-group": "^4.4.4",
35
35
  "color-string": "^1.9.0"
36
36
  },
37
- "gitHead": "76eb517b4b3fa047aa55e61f1793a0ffa8cfb2c5"
37
+ "gitHead": "956e0b9e3df65663119705860f67bed5651f5c38"
38
38
  }