Skip to content

Commit 049fd2e

Browse files
authored
feat: TypeScript 5.5, {N} 8.8, and @nativescript-community/perms with cleanup (#594)
1 parent 1237aab commit 049fd2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+463
-277
lines changed

apps/demo-angular/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
hooks
22
platforms
3-
!webpack.config.js
3+
!webpack.config.js
4+
!tailwind.config.js

apps/demo-angular/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"@nativescript/zip": "file:../../dist/packages/zip"
4040
},
4141
"devDependencies": {
42-
"@nativescript/android": "~8.7.0",
43-
"@nativescript/ios": "~8.7.0"
42+
"@nativescript/android": "~8.8.0",
43+
"@nativescript/ios": "~8.8.0",
44+
"@nativescript/tailwind": "~2.1.0",
45+
"tailwindcss": "~3.4.0"
4446
}
4547
}

apps/demo-angular/src/app.css

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/* Resets */
2+
* {
3+
/* @apply font-normal; */
4+
font-weight: normal;
5+
/* horizontal-alignment: 'left'; */
6+
margin-left: 0;
7+
margin-right: 0;
8+
margin-top: 0;
9+
margin-bottom: 0;
10+
padding-left: 0;
11+
padding-right: 0;
12+
padding-top: 0;
13+
padding-bottom: 0;
14+
}
15+
16+
Label {
17+
/* @apply align-top; */
18+
vertical-align: middle;
19+
}
20+
21+
/**
22+
* 1. set a default size for the ActivityIndicator to be similar on ios/android
23+
*/
24+
ActivityIndicator {
25+
/* @apply h-6 w-6; /* 1 */
26+
height: 24;
27+
width: 24;
28+
}
29+
30+
Button {
31+
/* @apply rounded-none border-0 bg-transparent normal-case; */
32+
border-radius: 0;
33+
border-width: 0;
34+
background: transparent;
35+
text-transform: capitalize;
36+
min-width: 0;
37+
min-height: 0;
38+
android-elevation: 0;
39+
android-dynamic-elevation-offset: 0;
40+
}
41+
42+
TextField,
43+
TextView {
44+
/* @apply bg-transparent text-base; */
45+
background-color: transparent;
46+
font-size: 16;
47+
placeholder-color: rgb(142, 142, 142); /*theme('colors.gray.400');*/
48+
}
49+
/* END Resets */
50+
51+
@tailwind base;
52+
@tailwind components;
53+
@tailwind utilities;
54+
55+
.v-top {
56+
vertical-align: top;
57+
}
58+
59+
.h-center {
60+
horizontal-align: center;
61+
}
62+
.h-right {
63+
horizontal-align: right;
64+
}
65+
.h-left {
66+
horizontal-align: left;
67+
}

apps/demo-angular/src/app.scss

-22
This file was deleted.

apps/demo-angular/tailwind.config.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
};

apps/demo/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ platforms/
77
*.js.map
88
*.js
99
!webpack.config.js
10+
!tailwind.config.js
1011

1112
# Logs
1213
logs

apps/demo/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@nativescript/iqkeyboardmanager": "file:../../packages/iqkeyboardmanager",
3232
"@nativescript/keyboard-toolbar": "file:../../packages/keyboard-toolbar",
3333
"@nativescript/local-notifications": "file:../../packages/local-notifications",
34-
"@nativescript/localize": "file:../../packages/localize",
34+
"@nativescript/localize": "file:../../dist/packages/localize",
3535
"@nativescript/pdf": "file:../../packages/pdf",
3636
"@nativescript/picker": "file:../../packages/picker",
3737
"@nativescript/secure-storage": "file:../../packages/secure-storage",
@@ -42,7 +42,9 @@
4242
"@nativescript/zip": "file:../../packages/zip"
4343
},
4444
"devDependencies": {
45-
"@nativescript/android": "~8.7.0",
46-
"@nativescript/ios": "~8.7.0"
45+
"@nativescript/android": "~8.8.0",
46+
"@nativescript/ios": "~8.8.0",
47+
"@nativescript/tailwind": "~2.1.0",
48+
"tailwindcss": "~3.4.0"
4749
}
4850
}

apps/demo/src/app.scss apps/demo/src/app.css

+58-32
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,70 @@
1-
@import 'nativescript-theme-core/scss/light';
2-
@import 'nativescript-theme-core/scss/index';
1+
/* Resets */
2+
* {
3+
/* @apply font-normal; */
4+
font-weight: normal;
5+
/* horizontal-alignment: 'left'; */
6+
margin-left: 0;
7+
margin-right: 0;
8+
margin-top: 0;
9+
margin-bottom: 0;
10+
padding-left: 0;
11+
padding-right: 0;
12+
padding-top: 0;
13+
padding-bottom: 0;
14+
}
15+
16+
Label {
17+
/* @apply align-top; */
18+
vertical-align: middle;
19+
}
20+
21+
/**
22+
* 1. set a default size for the ActivityIndicator to be similar on ios/android
23+
*/
24+
ActivityIndicator {
25+
/* @apply h-6 w-6; /* 1 */
26+
height: 24;
27+
width: 24;
28+
}
329

430
Button {
5-
text-transform: none;
6-
height: 54;
31+
/* @apply rounded-none border-0 bg-transparent normal-case; */
32+
border-radius: 0;
33+
border-width: 0;
34+
background: transparent;
35+
text-transform: capitalize;
36+
min-width: 0;
37+
min-height: 0;
738
android-elevation: 0;
839
android-dynamic-elevation-offset: 0;
9-
padding: 0;
10-
margin: 0;
11-
12-
&.btn {
13-
padding: 0;
14-
margin: 2 0 2 0;
15-
16-
&.btn-primary {
17-
background-color: rgb(95, 185, 249);
18-
}
19-
}
20-
}
21-
TextField {
22-
border-bottom-width: 1;
23-
border-bottom-color: transparent;
24-
font-size: 17;
25-
placeholder-color: rgb(201, 201, 201);
26-
padding-top: 0;
27-
padding-bottom: 0;
28-
margin-top: 0;
29-
margin-bottom: 0;
30-
height: 29;
3140
}
3241

42+
TextField,
3343
TextView {
34-
font-size: 13;
35-
padding: 6 0;
44+
/* @apply bg-transparent text-base; */
45+
background-color: transparent;
46+
font-size: 16;
47+
placeholder-color: rgb(142, 142, 142); /*theme('colors.gray.400');*/
48+
}
49+
/* END Resets */
50+
51+
@tailwind base;
52+
@tailwind components;
53+
@tailwind utilities;
54+
55+
.v-top {
56+
vertical-align: top;
3657
}
3758

38-
// TextField {
39-
// font-size: 13;
40-
// padding: 6;
41-
// }
59+
.h-center {
60+
horizontal-align: center;
61+
}
62+
.h-right {
63+
horizontal-align: right;
64+
}
65+
.h-left {
66+
horizontal-align: left;
67+
}
4268

4369
Label.scroll-text {
4470
font-size: 13;

apps/demo/src/main-page.xml

+39-41
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,43 @@
22
<Page.actionBar>
33
<ActionBar title="Plugin Demos" icon="" class="action-bar"/>
44
</Page.actionBar>
5-
<StackLayout class="p-t-20 p-x-20">
6-
<ScrollView class="h-full">
7-
<StackLayout>
8-
<Button text="animated-circle" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
9-
<Button text="appavailability" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
10-
<Button text="apple-sign-in" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
11-
<Button text="auto-fit-text" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
12-
<Button text="background-http" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
13-
<Button text="biometrics" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
14-
<Button text="brightness" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
15-
<Button text="camera" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
16-
<Button text="contacts" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
17-
<Button text="datetimepicker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
18-
<Button text="debug-android" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
19-
<Button text="debug-ios" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
20-
<Button text="detox" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
21-
<Button text="directions" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
22-
<Button text="email" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
23-
<Button text="facebook" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
24-
<Button text="fingerprint-auth" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
25-
<Button text="geolocation" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
26-
<Button text="google-maps" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
27-
<Button text="google-signin" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
28-
<Button text="haptics" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
29-
<Button text="imagepicker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
30-
<Button text="ios-security" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
31-
<Button text="iqkeyboardmanager" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
32-
<Button text="keyboard-toolbar" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
33-
<Button text="local-notifications" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
34-
<Button text="localize" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
35-
<Button text="pdf" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
36-
<Button text="picker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
37-
<Button text="secure-storage" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
38-
<Button text="shared-notification-delegate" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
39-
<Button text="social-share" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
40-
<Button text="theme-switcher" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
41-
<Button text="twitter" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
42-
<Button text="zip" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
43-
</StackLayout>
44-
</ScrollView>
45-
</StackLayout>
5+
<ScrollView class="h-full">
6+
<StackLayout class="p-4">
7+
<Button text="animated-circle" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
8+
<Button text="appavailability" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
9+
<Button text="apple-sign-in" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
10+
<Button text="auto-fit-text" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
11+
<Button text="background-http" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
12+
<Button text="biometrics" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
13+
<Button text="brightness" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
14+
<Button text="camera" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
15+
<Button text="contacts" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
16+
<Button text="datetimepicker" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
17+
<Button text="debug-android" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
18+
<Button text="debug-ios" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
19+
<Button text="detox" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
20+
<Button text="directions" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
21+
<Button text="email" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
22+
<Button text="facebook" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
23+
<Button text="fingerprint-auth" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
24+
<Button text="geolocation" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
25+
<Button text="google-maps" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
26+
<Button text="google-signin" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
27+
<Button text="haptics" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
28+
<Button text="imagepicker" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
29+
<Button text="ios-security" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
30+
<Button text="iqkeyboardmanager" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
31+
<Button text="keyboard-toolbar" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
32+
<Button text="local-notifications" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
33+
<Button text="localize" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
34+
<Button text="pdf" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
35+
<Button text="picker" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
36+
<Button text="secure-storage" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
37+
<Button text="shared-notification-delegate" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
38+
<Button text="social-share" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
39+
<Button text="theme-switcher" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
40+
<Button text="twitter" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
41+
<Button text="zip" tap="{{ viewDemo }}" class="bg-blue-500 rounded-full text-white p-4 mb-4"/>
42+
</StackLayout>
43+
</ScrollView>
4644
</Page>

apps/demo/src/plugin-demos/animated-circle.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<ActionBar title="animated-circle" icon="" class="action-bar">
55
</ActionBar>
66
</Page.actionBar>
7-
<StackLayout class="p-20">
7+
<StackLayout class="p-4">
88
<ScrollView class="h-full">
9-
<StackLayout class="p-20">
9+
<StackLayout class="p-4">
1010
<Label text="Animated Circle Demo" marginBottom="20" class="t-20 text-center c-black" textWrap="true"/>
1111
<AC:AnimatedCircle backgroundColor="transparent" width="200" height="200" animated="true" animateFrom="0" rimColor="#fff000" barColor="#ff4081" rimWidth="25" progress="{{ progress }}" />
1212
</StackLayout>

apps/demo/src/plugin-demos/appavailability.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ActionBar title="appavailability" icon="" class="action-bar">
44
</ActionBar>
55
</Page.actionBar>
6-
<StackLayout class="p-20">
6+
<StackLayout class="p-4">
77
<ScrollView class="h-full">
88
<StackLayout>
99
<Button text="Test Plugin" tap="{{ testIt }}" class="btn btn-primary"/>

apps/demo/src/plugin-demos/apple-sign-in.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ActionBar title="apple-sign-in" icon="" class="action-bar">
44
</ActionBar>
55
</Page.actionBar>
6-
<StackLayout class="p-20">
6+
<StackLayout class="p-4">
77
<ui:SignInButton tap="{{ login }}" height="56"/>
88
</StackLayout>
99
</Page>

apps/demo/src/plugin-demos/auto-fit-text.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ActionBar title="auto-fit-text" icon="" class="action-bar">
55
</ActionBar>
66
</Page.actionBar>
7-
<GridLayout rows="*, *, *, *" columns="*" class="p-20">
7+
<GridLayout rows="*, *, *, *" columns="*" class="p-2">
88
<Label row="0" fontSize="36" text="This is a standard NS Label with textWrap enabled." textWrap="true"></Label>
99
<AFT:AutoFitText row="1" text="Lorem Ipsum this is a long string of text that will shrink to fit this line." textWrap="false"></AFT:AutoFitText>
1010
<AFT:AutoFitText row="2" fontSize="48" text="Lorem Ipsum this line of text with fontSize ignored because the text is so long." textWrap="false"></AFT:AutoFitText>

apps/demo/src/plugin-demos/brightness.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ActionBar title="brightness" icon="" class="action-bar">
44
</ActionBar>
55
</Page.actionBar>
6-
<StackLayout class="p-20">
6+
<StackLayout class="p-4">
77
<ScrollView class="h-full">
88
<StackLayout>
99
<Label text="{{ message }}" class="t-20 text-center c-black" textWrap="true"/>

0 commit comments

Comments
 (0)