@momo-kits/foundation 0.81.1-optimize.21 → 0.81.1-rc.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 (45) hide show
  1. package/Application/BottomSheet.tsx +27 -23
  2. package/Application/BottomTab/BottomTabBar.tsx +2 -2
  3. package/Application/BottomTab/index.tsx +2 -3
  4. package/Application/Components.tsx +288 -42
  5. package/Application/Localize.ts +44 -0
  6. package/Application/ModalScreen.tsx +2 -2
  7. package/Application/Navigation.ts +4 -18
  8. package/Application/NavigationContainer.tsx +10 -21
  9. package/Application/Navigator.ts +14 -16
  10. package/Application/StackScreen.tsx +211 -113
  11. package/Application/index.ts +5 -3
  12. package/Application/types.ts +30 -11
  13. package/Application/utils.tsx +60 -18
  14. package/Badge/BadgeDotAnimation.tsx +95 -0
  15. package/Badge/index.tsx +2 -1
  16. package/Badge/styles.ts +50 -6
  17. package/Button/index.tsx +0 -1
  18. package/Icon/types.ts +0 -1
  19. package/Input/Input.tsx +51 -17
  20. package/Input/InputDropDown.tsx +44 -47
  21. package/Input/InputMoney.tsx +56 -6
  22. package/Input/InputOTP.tsx +10 -6
  23. package/Input/InputSearch.tsx +259 -146
  24. package/Input/TextTyping.tsx +113 -0
  25. package/Input/common.tsx +29 -10
  26. package/Input/index.tsx +75 -74
  27. package/Input/styles.ts +43 -7
  28. package/Layout/FloatingButton.tsx +1 -1
  29. package/Layout/GridSystem.tsx +1 -1
  30. package/Layout/ItemList.tsx +3 -2
  31. package/Layout/Screen.tsx +174 -91
  32. package/Layout/styles.ts +0 -6
  33. package/Layout/types.ts +1 -1
  34. package/Pagination/PaginationScroll.tsx +2 -2
  35. package/Pagination/styles.ts +1 -1
  36. package/Popup/PopupNotify.tsx +3 -3
  37. package/Tag/index.tsx +9 -2
  38. package/Tag/styles.ts +3 -2
  39. package/Tag/types.ts +12 -0
  40. package/Title/index.tsx +6 -9
  41. package/Title/styles.ts +4 -4
  42. package/code-scanner.js +4 -4
  43. package/package.json +6 -5
  44. package/publish.sh +12 -22
  45. package/verify.js +36 -42
package/publish.sh CHANGED
@@ -1,28 +1,18 @@
1
1
  #!/bin/bash
2
2
 
3
- # Prepare dist files
4
- rm -rf dist
5
- mkdir dist
6
- rsync -r --exclude=/dist ./* dist
7
- cd dist
8
-
9
- #if [ "$1" == "stable" ]; then
10
- # npm version $(npm view @momo-kits/foundation@stable version)
11
- # npm version patch
12
- # npm publish --tag stable --access=public
13
- #elif [ "$1" == "latest" ]; then
14
- # npm version $(npm view @momo-kits/foundation@latest version)
15
- # npm version prerelease --preid=rc
16
- # npm publish --tag latest --access=public
17
- #else
18
- # npm version $(npm view @momo-kits/foundation@beta version)
19
- # npm version prerelease --preid=beta
3
+ if [ "$1" == "stable" ]; then
4
+ npm version $(npm view @momo-kits/foundation@stable version)
5
+ npm version patch
6
+ npm publish --tag stable --access=public
7
+ elif [ "$1" == "latest" ]; then
8
+ npm version $(npm view @momo-kits/foundation@latest version)
9
+ npm version prerelease --preid=rc
10
+ npm publish --tag latest --access=public
11
+ else
12
+ npm version $(npm view @momo-kits/foundation@beta version)
13
+ npm version prerelease --preid=beta
20
14
  npm publish --tag beta --access=public
21
- #fi
15
+ fi
22
16
 
23
17
  PACKAGE_NAME=$(npm pkg get name)
24
18
  NEW_PACKAGE_VERSION=$(npm pkg get version)
25
-
26
- # Clean up
27
- cd ..
28
- rm -rf dist
package/verify.js CHANGED
@@ -1,47 +1,41 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- try {
5
- const packageInfo = JSON.parse(
6
- fs.readFileSync(path.join(`${__dirname}`, 'package.json'), 'utf8'),
4
+ const packageInfo = JSON.parse(
5
+ fs.readFileSync(path.join(`${__dirname}`, 'package.json'), 'utf8')
6
+ );
7
+ const packageVersion = parseInt(packageInfo?.version.split('.')?.[1]);
8
+
9
+ const app = path.join(`${__dirname}/../../../`, 'app.json');
10
+ const miniJson = path.join(`${__dirname}/../../../`, 'package.json');
11
+
12
+ if (!fs.existsSync(app) || !fs.existsSync(miniJson)) {
13
+ return;
14
+ }
15
+
16
+ const appInfo = JSON.parse(fs.readFileSync(app, 'utf8'));
17
+ const miniInfo = JSON.parse(fs.readFileSync(miniJson, 'utf8'));
18
+
19
+ const iOSAppTarget = appInfo?.client?.ios.deploymentTarget;
20
+ const androidAppTarget = appInfo?.client?.android.deploymentTarget;
21
+
22
+ if (
23
+ miniInfo?.dependencies?.['@momo-platform/momo-core']?.includes('optimize')
24
+ ) {
25
+ return;
26
+ }
27
+
28
+ if (packageVersion > iOSAppTarget || packageVersion > androidAppTarget) {
29
+ throw new Error(
30
+ `\x1b[41m Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`
31
+ );
32
+ }
33
+
34
+ if (
35
+ miniInfo?.dependencies?.['@momo-platform/momo-core'] &&
36
+ miniInfo?.dependencies?.['@momo-platform/momo-core'] !== packageInfo?.version
37
+ ) {
38
+ throw new Error(
39
+ `\x1b[41m Package ${packageInfo.name} version: ${packageInfo.version} require install resolutions @momo-platform/momo-core ${packageInfo.version}`
7
40
  );
8
- const packageVersion = parseInt(packageInfo?.version.split('.')?.[1]);
9
-
10
- const app = path.join(`${__dirname}/../../../`, 'app.json');
11
- const miniJson = path.join(`${__dirname}/../../../`, 'package.json');
12
-
13
- if (!fs.existsSync(app) || fs.existsSync(miniJson)) {
14
- return;
15
- }
16
-
17
- const appInfo = JSON.parse(fs.readFileSync(app, 'utf8'));
18
- const miniInfo = JSON.parse(fs.readFileSync(miniJson, 'utf8'));
19
-
20
- const iOSAppTarget = appInfo?.client?.ios.deploymentTarget;
21
- const androidAppTarget = appInfo?.client?.android.deploymentTarget;
22
-
23
- if (packageVersion > iOSAppTarget || packageVersion > androidAppTarget) {
24
- console.error(
25
- `Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`,
26
- );
27
- throw new Error(
28
- `Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`,
29
- );
30
- }
31
-
32
- if (
33
- miniInfo?.dependencies?.['@momo-platform/momo-core'] &&
34
- miniInfo?.dependencies?.['@momo-platform/momo-core'] !==
35
- packageInfo?.version
36
- ) {
37
- console.error(
38
- `Package ${packageInfo.name} version: ${packageInfo.version} require install resolutions @momo-platform/momo-core ${packageInfo.version}`,
39
- );
40
- throw new Error(
41
- `Package ${packageInfo.name} version: ${packageInfo.version} require install resolutions @momo-platform/momo-core ${packageInfo.version}`,
42
- );
43
- }
44
- } catch (error) {
45
- console.error(`Installation failed: ${error.message}`);
46
- process.exit(1);
47
41
  }