@sleeperhq/mini-core 1.9.9 → 3.0.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.
@@ -4,20 +4,20 @@ export interface AvatarProps {
4
4
  user: User;
5
5
  width?: number;
6
6
  }
7
- export declare const Avatar: React.MemoExoticComponent<(props: AvatarProps) => JSX.Element>;
7
+ export declare const Avatar: React.MemoExoticComponent<(props: AvatarProps) => React.JSX.Element>;
8
8
  export interface AvatarPlayerProps {
9
9
  player: Player;
10
10
  width?: number;
11
11
  }
12
- export declare const AvatarPlayer: React.MemoExoticComponent<(props: AvatarPlayerProps) => JSX.Element>;
12
+ export declare const AvatarPlayer: React.MemoExoticComponent<(props: AvatarPlayerProps) => React.JSX.Element>;
13
13
  export interface AvatarTeamProps {
14
14
  team: string;
15
15
  sport: string;
16
16
  width?: number;
17
17
  }
18
- export declare const AvatarTeam: React.MemoExoticComponent<(props: AvatarTeamProps) => JSX.Element>;
18
+ export declare const AvatarTeam: React.MemoExoticComponent<(props: AvatarTeamProps) => React.JSX.Element>;
19
19
  export interface AvatarLeagueProps {
20
20
  league: League;
21
21
  width?: number;
22
22
  }
23
- export declare const AvatarLeague: React.MemoExoticComponent<(props: AvatarLeagueProps) => JSX.Element>;
23
+ export declare const AvatarLeague: React.MemoExoticComponent<(props: AvatarLeagueProps) => React.JSX.Element>;
@@ -16,7 +16,7 @@ export interface ButtonProps {
16
16
  text?: string;
17
17
  }
18
18
  declare const Button: {
19
- (props: ButtonProps): JSX.Element;
19
+ (props: ButtonProps): React.JSX.Element;
20
20
  defaultProps: {
21
21
  height: number;
22
22
  shadowHeight: number;
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
2
+ import React from "react";
3
+
4
+ declare const _default: (props: any) => React.JSX.Element;
3
5
  export default _default;
@@ -1,5 +1,6 @@
1
- import { PureComponent } from 'react';
1
+ import React, { PureComponent } from 'react';
2
2
  import { TextProps } from 'react-native';
3
+
3
4
  type Props = {
4
5
  color?: string;
5
6
  inheritStyles?: boolean;
@@ -8,6 +9,6 @@ type Props = {
8
9
  export type AppTextProps = Props;
9
10
  export default class AppText extends PureComponent<Props> {
10
11
  private getStyles;
11
- render(): JSX.Element;
12
+ render(): React.JSX.Element;
12
13
  }
13
14
  export {};
@@ -21,4 +21,4 @@ export type Props = {
21
21
  aspectRatio?: number;
22
22
  confirmationFunction?: (nextSelection: 'on' | 'off', continueAction: () => void) => void;
23
23
  };
24
- export declare const AppIconSwitch: React.MemoExoticComponent<({ height, options, value, width, onChange, containerStyle, toggleStyle, aspectRatio, confirmationFunction }: Props) => JSX.Element>;
24
+ export declare const AppIconSwitch: React.MemoExoticComponent<({ height, options, value, width, onChange, containerStyle, toggleStyle, aspectRatio, confirmationFunction }: Props) => React.JSX.Element>;
@@ -1,38 +1,39 @@
1
1
  {
2
2
  "packages": {
3
- "@babel/runtime": "7.15.4",
4
- "@babel/plugin-transform-runtime": "7.15.0",
5
- "@mattermost/react-native-paste-input": "0.6.4",
3
+ "@babel/runtime": "7.26.0",
4
+ "@babel/plugin-transform-runtime": "7.25.9",
5
+ "@mattermost/react-native-paste-input": "0.8.0",
6
6
  "@notifee/react-native": "7.8.0",
7
7
  "@ptomasroos/react-native-multi-slider": "2.2.2",
8
8
  "@react-native-camera-roll/camera-roll": "5.2.0",
9
- "@react-native-community/blur": "4.3.2",
9
+ "@react-native-community/blur": "4.4.0",
10
10
  "@react-native-community/datetimepicker": "2.6.2",
11
11
  "@react-native-community/hooks": "2.8.0",
12
- "@react-native-community/netinfo": "9.3.7",
12
+ "@react-native-community/netinfo": "11.3.2",
13
13
  "@react-native-masked-view/masked-view": "0.3.1",
14
14
  "@react-native-picker/picker": "1.16.8",
15
- "@react-navigation/bottom-tabs": "6.5.4",
15
+ "@react-navigation/bottom-tabs": "6.6.0",
16
16
  "@react-navigation/compat": "5.3.20",
17
- "@react-navigation/native": "6.1.3",
18
- "@react-navigation/stack": "6.3.12",
19
- "@shopify/flash-list": "1.4.1",
20
- "@sleeperhq/mini-core": "1.9.9",
17
+ "@react-navigation/drawer": "6.7.0",
18
+ "@react-navigation/elements": "1.3.30",
19
+ "@react-navigation/native": "6.1.17",
20
+ "@react-navigation/stack": "6.4.0",
21
+ "@shopify/flash-list": "1.7.0",
22
+ "@sleeperhq/mini-core": "0.0.7",
21
23
  "amazon-cognito-identity-js": "6.3.2",
22
24
  "crypto-js": "3.3.0",
23
25
  "decimal.js-light": "2.5.1",
24
26
  "deep-diff": "1.0.2",
25
27
  "he": "1.2.0",
26
- "moment-timezone": "0.5.11",
27
28
  "path": "0.12.7",
28
- "react": "18.2.0",
29
- "react-freeze": "1.0.3",
30
- "react-native": "0.72.14",
29
+ "react": "18.3.1",
30
+ "react-freeze": "1.0.4",
31
+ "react-native": "0.76.3",
31
32
  "react-native-action-sheet": "2.2.0",
32
33
  "react-native-animatable": "1.3.3",
33
34
  "react-native-check-version": "1.0.20",
34
35
  "react-native-color-matrix-image-filters": "5.2.10",
35
- "react-native-compressor": "1.5.2",
36
+ "react-native-compressor": "1.9.0",
36
37
  "react-native-confirmation-code-field": "6.7.0",
37
38
  "react-native-contacts": "5.2.8",
38
39
  "react-native-create-thumbnail": "2.0.0-rc.2",
@@ -43,15 +44,15 @@
43
44
  "react-native-draggable-reanimated": "1.0.5",
44
45
  "react-native-dropdownalert": "4.3.0",
45
46
  "react-native-emoji-rain": "0.0.1",
46
- "react-native-extra-dimensions-android": "1.2.5",
47
47
  "react-native-fs": "2.18.0",
48
- "react-native-gesture-handler": "2.14.0",
48
+ "react-native-gesture-handler": "2.21.0",
49
49
  "react-native-google-places-autocomplete": "2.4.1",
50
50
  "react-native-haptic-feedback": "1.6.0",
51
51
  "react-native-image-crop-picker": "0.39.0",
52
52
  "react-native-image-pan-zoom": "2.1.12",
53
53
  "react-native-image-picker": "4.10.3",
54
54
  "react-native-image-resizer": "1.4.5",
55
+ "react-native-interactable": "2.0.1",
55
56
  "react-native-iphone-x-helper": "1.3.1",
56
57
  "react-native-json-tree": "1.3.0",
57
58
  "react-native-keep-awake": "4.0.0",
@@ -67,11 +68,10 @@
67
68
  "react-native-popup-menu": "0.16.1",
68
69
  "react-native-progress": "4.1.2",
69
70
  "react-native-qrcode-svg": "6.1.1",
70
- "react-native-reanimated": "3.5.4",
71
+ "react-native-reanimated": "3.16.1",
71
72
  "react-native-redash": "18.1.0",
72
- "react-native-safe-area-context": "4.7.4",
73
- "react-native-screens": "3.29.0",
74
- "react-native-search-bar": "3.5.1",
73
+ "react-native-safe-area-context": "4.10.5",
74
+ "react-native-screens": "4.1.0",
75
75
  "react-native-section-list-get-item-layout": "2.2.3",
76
76
  "react-native-shake": "5.3.1",
77
77
  "react-native-share": "7.3.9",
@@ -82,28 +82,29 @@
82
82
  "react-native-sound": "0.11.1",
83
83
  "react-native-sound-level": "1.1.5",
84
84
  "react-native-spinkit": "1.5.1",
85
- "react-native-svg": "13.14.0",
85
+ "react-native-svg": "15.8.0",
86
86
  "react-native-swiper": "1.6.0-rc.3",
87
87
  "react-native-tab-view": "3.5.0",
88
88
  "react-native-tcp-socket": "6.0.6",
89
89
  "react-native-triangle": "0.0.9",
90
- "react-native-vector-icons": "10.0.0",
91
- "react-native-video": "5.2.1",
90
+ "react-native-vector-icons": "10.1.0",
91
+ "react-native-video": "6.4.2",
92
92
  "react-native-view-shot": "3.7.0",
93
- "react-native-webview": "11.23.1",
93
+ "react-native-webview": "13.10.4",
94
94
  "react-native-webp-format": "1.1.2",
95
95
  "regenerator-runtime": "0.13.11",
96
96
  "recyclerlistview": "4.2.0",
97
97
  "rn-prompt": "1.0.4"
98
98
  },
99
99
  "overrides": {
100
- "@callstack/repack": "3.1.0",
100
+ "@callstack/repack": "0.5.3",
101
101
  "@react-native-async-storage/async-storage": "1.15.15",
102
102
  "@react-native-community/audio-toolkit": "2.0.3",
103
103
  "react-native-chart-kit": "6.7.0",
104
104
  "react-native-circular-progress": "1.3.6",
105
- "react-native-fast-image": "8.5.11",
106
- "react-native-interactable": "2.0.1",
107
- "react-native-recyclerview-list": "0.3.4"
105
+ "react-native-fast-image": "8.5.11"
106
+ },
107
+ "requiredBy": {
108
+ "amazon-cognito-identity-js": "flexfantasy"
108
109
  }
109
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleeperhq/mini-core",
3
- "version": "1.9.9",
3
+ "version": "3.0.0",
4
4
  "description": "Core library frameworks for developing Sleeper Mini Apps.",
5
5
  "main": "index.ts",
6
6
  "types": "index.d.ts",
@@ -28,57 +28,60 @@
28
28
  "bugs": {
29
29
  "url": "https://github.com/blitzstudios/sleeper-mini-core/issues"
30
30
  },
31
- "homepage": "https://github.com/blitzstudios/sleeper-mini-core#readme",
31
+ "homepage": "https://github.com/blitzstudios/sleeper-mini-core#readme",
32
32
  "publishConfig": {
33
33
  "registry": "https://registry.npmjs.org/",
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@babel/runtime": "7.15.4",
38
- "@babel/plugin-transform-runtime": "7.15.0",
39
- "@callstack/repack": "blitzstudios/repack.git#callstack-repack-v3.1.0-gitpkg",
40
- "@callstack/repack-dev-server": "blitzstudios/repack.git#callstack-repack-dev-server-v1.0.7-gitpkg",
41
- "@react-native-community/cli": "6.1.0",
42
- "@react-native-community/cli-types": "6.0.0",
43
- "@react-native-community/netinfo": "9.3.7",
37
+ "@babel/plugin-transform-runtime": "7.25.9",
38
+ "@babel/runtime": "7.26.0",
39
+ "@callstack/repack": "blitzstudios/repack.git#callstack-repack-v5.0.0-gitpkg",
40
+ "@react-native-community/cli": "15.0.1",
41
+ "@react-native-community/cli-platform-android": "15.0.1",
42
+ "@react-native-community/cli-platform-apple": "15.0.1",
43
+ "@react-native-community/cli-platform-ios": "15.0.1",
44
+ "@react-native-community/netinfo": "11.3.2",
45
+ "@rspack/plugin-react-refresh": "1.0.0",
44
46
  "axios": "0.15.3",
45
- "babel-loader": "9.1.2",
46
- "react-native-fast-image": "https://github.com/blitzstudios/react-native-fast-image.git#release/1.2",
47
- "react-native-interactable": "https://github.com/blitzstudios/react-native-interactable#release/1.1",
47
+ "babel-loader": "9.1.3",
48
+ "react-native-fast-image": "https://github.com/blitzstudios/react-native-fast-image.git#release/1.4",
48
49
  "react-native-linear-gradient": "2.8.3",
49
- "react-native-rename": "blitzstudios/react-native-rename.git#react-native-rename-v3.2.14-gitpkg",
50
- "react-refresh": "0.14.0",
50
+ "react-native-rename": "blitzstudios/react-native-rename.git#react-native-rename-v3.2.17-gitpkg",
51
51
  "regenerator-runtime": "0.13.11",
52
52
  "rx": "4.1.0",
53
53
  "string-replace-loader": "3.1.0",
54
- "terser-webpack-plugin": "5.3.6",
55
- "webpack": "5.75.0"
54
+ "terser-webpack-plugin": "5.3.10",
55
+ "webpack": "5.94.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "react": "18.2.0",
59
- "react-native": "0.72.14",
60
- "react-native-svg": "13.14.0"
58
+ "react": "18.3.1",
59
+ "react-native": "0.76.3",
60
+ "react-native-svg": "15.8.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@babel/core": "7.15.8",
64
- "@babel/preset-typescript": "7.21.4",
65
- "@react-native-community/eslint-config": "^2.0.0",
63
+ "@babel/core": "7.26.0",
64
+ "@babel/preset-typescript": "7.26.0",
65
+ "@react-native-community/eslint-config": "2.0.0",
66
+ "@react-native/babel-preset": "0.76.3",
67
+ "@react-native/typescript-config": "0.76.3",
66
68
  "@types/react": "18.2.31",
67
- "@types/react-native": "0.72.8",
68
- "@typescript-eslint/eslint-plugin": "^5.31.0",
69
- "@typescript-eslint/parser": "^5.31.0",
70
- "babel-jest": "^26.6.3",
69
+ "@typescript-eslint/eslint-plugin": "5.62.0",
70
+ "@typescript-eslint/parser": "5.62.0",
71
+ "babel-jest": "26.6.3",
71
72
  "eslint": "8.38.0",
72
- "jest": "^26.6.3",
73
+ "jest": "29.6.3",
73
74
  "lodash": "4.17.21",
74
- "metro-react-native-babel-preset": "^0.66.2",
75
75
  "react-native-tcp-socket": "6.0.6",
76
- "typescript": "5.0.4"
76
+ "typescript": "5.2.2"
77
77
  },
78
78
  "resolutions": {
79
79
  "react-devtools-core": "4.23.0"
80
80
  },
81
81
  "jest": {
82
82
  "preset": "react-native"
83
+ },
84
+ "engines": {
85
+ "node": ">=18"
83
86
  }
84
87
  }
@@ -7,10 +7,10 @@ import type {SwitchProps} from '../../declarations/switch';
7
7
  import { AvatarProps, AvatarLeagueProps, AvatarPlayerProps, AvatarTeamProps } from '../../declarations/avatar';
8
8
 
9
9
  const _SleeperModule = React.lazy(() =>
10
- Federated.importModule('sleeper', 'index').catch(() => ({
10
+ Federated.importModule('sleeper', 'index').catch((e) => ({
11
11
  default: props => {
12
12
  console.log(
13
- `[Sleeper] Failed to load <${props?.component}>. Check connection to the app.`,
13
+ `[Sleeper] Failed to load <${props?.component}>. Check connection to the app. (${e})`,
14
14
  );
15
15
  return <View />;
16
16
  },
package/webpack.config.js CHANGED
@@ -80,17 +80,7 @@ module.exports = env => {
80
80
  */
81
81
  devtool: false,
82
82
  context,
83
- /**
84
- * `getInitializationEntries` will return necessary entries with setup and initialization code.
85
- * If you don't want to use Hot Module Replacement, set `hmr` option to `false`. By default,
86
- * HMR will be enabled in development mode.
87
- */
88
- entry: [
89
- ...Repack.getInitializationEntries(reactNativePath, {
90
- hmr: devServer && devServer.hmr,
91
- }),
92
- entry,
93
- ],
83
+ entry,
94
84
  resolve: {
95
85
  /**
96
86
  * `getResolveOptions` returns additional resolution configuration for React Native.
@@ -130,6 +120,7 @@ module.exports = env => {
130
120
  : 'index.ios.bundle',
131
121
  chunkFilename: '[name].chunk.bundle',
132
122
  publicPath: Repack.getPublicPath({platform, devServer}),
123
+ uniqueName: config.name,
133
124
  },
134
125
  /**
135
126
  * Configures optimization of the built bundle.
@@ -193,11 +184,12 @@ module.exports = env => {
193
184
  loader: 'babel-loader',
194
185
  options: {
195
186
  presets: [
196
- 'module:metro-react-native-babel-preset',
187
+ '@react-native/babel-preset',
197
188
  ['@babel/preset-typescript', { allowDeclareFields: true }],
198
189
  ],
199
190
  babelrc: false,
200
191
  cacheDirectory: true,
192
+ sourceMaps: true,
201
193
  },
202
194
  },
203
195
  },
@@ -214,18 +206,17 @@ module.exports = env => {
214
206
  loader: 'babel-loader',
215
207
  options: {
216
208
  presets: [
217
- 'module:metro-react-native-babel-preset',
209
+ '@react-native/babel-preset',
218
210
  ['@babel/preset-typescript', { allowDeclareFields: true }],
219
211
  ],
220
212
  // sourceType: "unambiguous",
221
- /** Add React Refresh transform only when HMR is enabled. */
222
- plugins:
223
- devServer && devServer.hmr
224
- ? ['@babel/plugin-transform-runtime', 'module:react-refresh/babel']
225
- : ['@babel/plugin-transform-runtime'],
213
+ plugins: devServer && devServer.hmr
214
+ ? ['@babel/plugin-transform-runtime', 'module:react-refresh/babel']
215
+ : ['@babel/plugin-transform-runtime'],
226
216
  babelrc: false,
227
217
  comments: true, // necessary for named chunks
228
218
  cacheDirectory: true,
219
+ sourceMaps: true,
229
220
  },
230
221
  },
231
222
  },