@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.
- package/Application/BottomSheet.tsx +27 -23
- package/Application/BottomTab/BottomTabBar.tsx +2 -2
- package/Application/BottomTab/index.tsx +2 -3
- package/Application/Components.tsx +288 -42
- package/Application/Localize.ts +44 -0
- package/Application/ModalScreen.tsx +2 -2
- package/Application/Navigation.ts +4 -18
- package/Application/NavigationContainer.tsx +10 -21
- package/Application/Navigator.ts +14 -16
- package/Application/StackScreen.tsx +211 -113
- package/Application/index.ts +5 -3
- package/Application/types.ts +30 -11
- package/Application/utils.tsx +60 -18
- package/Badge/BadgeDotAnimation.tsx +95 -0
- package/Badge/index.tsx +2 -1
- package/Badge/styles.ts +50 -6
- package/Button/index.tsx +0 -1
- package/Icon/types.ts +0 -1
- package/Input/Input.tsx +51 -17
- package/Input/InputDropDown.tsx +44 -47
- package/Input/InputMoney.tsx +56 -6
- package/Input/InputOTP.tsx +10 -6
- package/Input/InputSearch.tsx +259 -146
- package/Input/TextTyping.tsx +113 -0
- package/Input/common.tsx +29 -10
- package/Input/index.tsx +75 -74
- package/Input/styles.ts +43 -7
- package/Layout/FloatingButton.tsx +1 -1
- package/Layout/GridSystem.tsx +1 -1
- package/Layout/ItemList.tsx +3 -2
- package/Layout/Screen.tsx +174 -91
- package/Layout/styles.ts +0 -6
- package/Layout/types.ts +1 -1
- package/Pagination/PaginationScroll.tsx +2 -2
- package/Pagination/styles.ts +1 -1
- package/Popup/PopupNotify.tsx +3 -3
- package/Tag/index.tsx +9 -2
- package/Tag/styles.ts +3 -2
- package/Tag/types.ts +12 -0
- package/Title/index.tsx +6 -9
- package/Title/styles.ts +4 -4
- package/code-scanner.js +4 -4
- package/package.json +6 -5
- package/publish.sh +12 -22
- package/verify.js +36 -42
package/publish.sh
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|