@granite-js/react-native 0.1.0 → 0.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @granite-js/react-native
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - d675415: Improve scaffolding to provide a better showcase UI
8
+ - 10a5f3f: empty
9
+ - Updated dependencies [d675415]
10
+ - Updated dependencies [10a5f3f]
11
+ - @granite-js/style-utils@0.1.1
12
+ - @granite-js/native@0.1.1
13
+ - @granite-js/image@0.1.1
14
+ - @granite-js/mpack@0.1.1
15
+ - @granite-js/jest@0.1.1
16
+ - @granite-js/cli@0.1.1
17
+
3
18
  ## 0.1.0
4
19
 
5
20
  ### Minor Changes
@@ -8,14 +8,6 @@
8
8
  * @typedef {'light' | 'dark'} ColorPreference
9
9
  */
10
10
  export type ColorPreference = 'light' | 'dark';
11
- /**
12
- * @name NetworkStatus
13
- * @description
14
- * Type representing the network status.
15
- *
16
- * @typedef {'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE'} NetworkStatus
17
- */
18
- type NetworkStatus = 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE';
19
11
  /**
20
12
  * @category Types
21
13
  * @name BaseInitialProps
@@ -24,18 +16,12 @@ type NetworkStatus = 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE';
24
16
  *
25
17
  * @interface
26
18
  * @property {'ios' | 'android'} platform - Platform type
27
- * @property {string} appVersion - App version
28
19
  * @property {ColorPreference} initialColorPreference - Initial color
29
- * @property {NetworkStatus} networkStatus - Network status
30
- * @property {number} loadingStartTs - Timestamp when ReactNativeView started rendering in native
31
20
  * @property {string} [scheme] - Executed scheme
32
21
  */
33
22
  type BaseInitialProps = {
34
23
  platform: 'ios' | 'android';
35
- appVersion: string;
36
24
  initialColorPreference: ColorPreference;
37
- networkStatus: NetworkStatus;
38
- loadingStartTs: number;
39
25
  scheme?: string;
40
26
  };
41
27
  /**
@@ -47,13 +33,9 @@ type BaseInitialProps = {
47
33
  * @interface
48
34
  * @augments BaseInitialProps
49
35
  * @property {'android'} platform - Platform name (Android)
50
- * @property {string} initialFontScale - Font scale set on the device
51
- * @property {string} distributionGroup - Distribution group
52
36
  */
53
37
  export type AndroidInitialProps = BaseInitialProps & {
54
38
  platform: 'android';
55
- initialFontScale: string;
56
- distributionGroup: string;
57
39
  };
58
40
  /**
59
41
  * @category Types
@@ -64,23 +46,10 @@ export type AndroidInitialProps = BaseInitialProps & {
64
46
  * @interface
65
47
  * @augments BaseInitialProps
66
48
  * @property {'ios'} platform - Platform (iOS)
67
- * @property {IOSFontSizeType} initialFontSize - Initial font size
68
- * @property {boolean} isVisible - Visibility status
69
49
  */
70
50
  export type IOSInitialProps = BaseInitialProps & {
71
51
  platform: 'ios';
72
- initialFontSize: IOSFontSizeType;
73
- isVisible: boolean;
74
52
  };
75
- /**
76
- * @category Types
77
- * @name IOSFontSizeType
78
- * @description
79
- * Type representing iOS font size type.
80
- *
81
- * @typedef {'xSmall' | 'Small' | 'Medium' | 'Large' | 'xLarge' | 'xxLarge' | 'xxxLarge' | 'A11y_Medium' | 'A11y_Large' | 'A11y_xLarge' | 'A11y_xxLarge' | 'A11y_xxxLarge'} IOSFontSizeType
82
- */
83
- type IOSFontSizeType = 'xSmall' | 'Small' | 'Medium' | 'Large' | 'xLarge' | 'xxLarge' | 'xxxLarge' | 'A11y_Medium' | 'A11y_Large' | 'A11y_xLarge' | 'A11y_xxLarge' | 'A11y_xxxLarge';
84
53
  /**
85
54
  * @public
86
55
  * @category Core
@@ -93,11 +62,7 @@ type IOSFontSizeType = 'xSmall' | 'Small' | 'Medium' | 'Large' | 'xLarge' | 'xxL
93
62
  *
94
63
  * @property {'ios' | 'android'} platform - The platform on which the app is currently running. Has a value of either `ios` or `android`.
95
64
  * @property {ColorPreference} initialColorPreference - The initial color theme. Represents the color theme set by the user.
96
- * @property {NetworkStatus} networkStatus - The current device's network connection status and connected network.
97
65
  * @property {string} [scheme] - The URL scheme used to enter the current screen.
98
- * @property {`xSmall` | `Small` | `Medium` | `Large` | `xLarge` | `xxLarge` | `xxxLarge` | `A11y_Medium` | `A11y_Large` | `A11y_xLarge` | `A11y_xxLarge` | `A11y_xxxLarge`} initialFontSize (iOS only) iOS system font size. Each value represents a specific font size. Default value is `Large`.
99
- * @property {boolean} isVisible (iOS only) Whether the screen is currently visible in iOS. Initial value is passed as `true`.
100
- * @property {string} initialFontScale (Android only) Android system font scale. The font size scale adjusted by the user in Android device's accessibility settings. This value is multiplied by the base font size to determine the final font size.
101
66
  *
102
67
  * @example
103
68
  *
@@ -120,8 +85,8 @@ type IOSFontSizeType = 'xSmall' | 'Small' | 'Medium' | 'Large' | 'xLarge' | 'xxL
120
85
  * appName: APP_NAME,
121
86
  * context,
122
87
  * });
123
- * :::
124
88
  * ```
89
+ * :::
125
90
  */
126
91
  export type InitialProps = AndroidInitialProps | IOSInitialProps;
127
92
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/react-native",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The Granite Framework",
5
5
  "bin": {
6
6
  "granite": "./bin/cli.js"
@@ -56,7 +56,7 @@
56
56
  "@babel/core": "^7.24.9",
57
57
  "@babel/preset-env": "^7.24.8",
58
58
  "@babel/preset-typescript": "^7.24.7",
59
- "@granite-js/native": "0.1.0",
59
+ "@granite-js/native": "0.1.1",
60
60
  "@testing-library/dom": "^10.4.0",
61
61
  "@testing-library/react": "^16.1.0",
62
62
  "@types/babel__core": "^7",
@@ -81,11 +81,11 @@
81
81
  "react-native": "*"
82
82
  },
83
83
  "dependencies": {
84
- "@granite-js/cli": "0.1.0",
85
- "@granite-js/image": "0.1.0",
86
- "@granite-js/jest": "0.1.0",
87
- "@granite-js/mpack": "0.1.0",
88
- "@granite-js/style-utils": "0.1.0",
84
+ "@granite-js/cli": "0.1.1",
85
+ "@granite-js/image": "0.1.1",
86
+ "@granite-js/jest": "0.1.1",
87
+ "@granite-js/mpack": "0.1.1",
88
+ "@granite-js/style-utils": "0.1.1",
89
89
  "es-toolkit": "^1.34.1",
90
90
  "react-native-url-polyfill": "1.3.0"
91
91
  }
@@ -9,15 +9,6 @@
9
9
  */
10
10
  export type ColorPreference = 'light' | 'dark';
11
11
 
12
- /**
13
- * @name NetworkStatus
14
- * @description
15
- * Type representing the network status.
16
- *
17
- * @typedef {'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE'} NetworkStatus
18
- */
19
- type NetworkStatus = 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE';
20
-
21
12
  /**
22
13
  * @category Types
23
14
  * @name BaseInitialProps
@@ -26,18 +17,12 @@ type NetworkStatus = 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'UNKNOWN' | 'OFFLINE';
26
17
  *
27
18
  * @interface
28
19
  * @property {'ios' | 'android'} platform - Platform type
29
- * @property {string} appVersion - App version
30
20
  * @property {ColorPreference} initialColorPreference - Initial color
31
- * @property {NetworkStatus} networkStatus - Network status
32
- * @property {number} loadingStartTs - Timestamp when ReactNativeView started rendering in native
33
21
  * @property {string} [scheme] - Executed scheme
34
22
  */
35
23
  type BaseInitialProps = {
36
24
  platform: 'ios' | 'android';
37
- appVersion: string;
38
25
  initialColorPreference: ColorPreference;
39
- networkStatus: NetworkStatus;
40
- loadingStartTs: number;
41
26
  scheme?: string;
42
27
  };
43
28
 
@@ -50,13 +35,9 @@ type BaseInitialProps = {
50
35
  * @interface
51
36
  * @augments BaseInitialProps
52
37
  * @property {'android'} platform - Platform name (Android)
53
- * @property {string} initialFontScale - Font scale set on the device
54
- * @property {string} distributionGroup - Distribution group
55
38
  */
56
39
  export type AndroidInitialProps = BaseInitialProps & {
57
40
  platform: 'android';
58
- initialFontScale: string;
59
- distributionGroup: string;
60
41
  };
61
42
 
62
43
  /**
@@ -68,37 +49,11 @@ export type AndroidInitialProps = BaseInitialProps & {
68
49
  * @interface
69
50
  * @augments BaseInitialProps
70
51
  * @property {'ios'} platform - Platform (iOS)
71
- * @property {IOSFontSizeType} initialFontSize - Initial font size
72
- * @property {boolean} isVisible - Visibility status
73
52
  */
74
53
  export type IOSInitialProps = BaseInitialProps & {
75
54
  platform: 'ios';
76
- initialFontSize: IOSFontSizeType;
77
- isVisible: boolean;
78
55
  };
79
56
 
80
- /**
81
- * @category Types
82
- * @name IOSFontSizeType
83
- * @description
84
- * Type representing iOS font size type.
85
- *
86
- * @typedef {'xSmall' | 'Small' | 'Medium' | 'Large' | 'xLarge' | 'xxLarge' | 'xxxLarge' | 'A11y_Medium' | 'A11y_Large' | 'A11y_xLarge' | 'A11y_xxLarge' | 'A11y_xxxLarge'} IOSFontSizeType
87
- */
88
- type IOSFontSizeType =
89
- | 'xSmall'
90
- | 'Small'
91
- | 'Medium'
92
- | 'Large'
93
- | 'xLarge'
94
- | 'xxLarge'
95
- | 'xxxLarge'
96
- | 'A11y_Medium'
97
- | 'A11y_Large'
98
- | 'A11y_xLarge'
99
- | 'A11y_xxLarge'
100
- | 'A11y_xxxLarge';
101
-
102
57
  /**
103
58
  * @public
104
59
  * @category Core
@@ -111,11 +66,7 @@ type IOSFontSizeType =
111
66
  *
112
67
  * @property {'ios' | 'android'} platform - The platform on which the app is currently running. Has a value of either `ios` or `android`.
113
68
  * @property {ColorPreference} initialColorPreference - The initial color theme. Represents the color theme set by the user.
114
- * @property {NetworkStatus} networkStatus - The current device's network connection status and connected network.
115
69
  * @property {string} [scheme] - The URL scheme used to enter the current screen.
116
- * @property {`xSmall` | `Small` | `Medium` | `Large` | `xLarge` | `xxLarge` | `xxxLarge` | `A11y_Medium` | `A11y_Large` | `A11y_xLarge` | `A11y_xxLarge` | `A11y_xxxLarge`} initialFontSize (iOS only) iOS system font size. Each value represents a specific font size. Default value is `Large`.
117
- * @property {boolean} isVisible (iOS only) Whether the screen is currently visible in iOS. Initial value is passed as `true`.
118
- * @property {string} initialFontScale (Android only) Android system font scale. The font size scale adjusted by the user in Android device's accessibility settings. This value is multiplied by the base font size to determine the final font size.
119
70
  *
120
71
  * @example
121
72
  *
@@ -138,7 +89,7 @@ type IOSFontSizeType =
138
89
  * appName: APP_NAME,
139
90
  * context,
140
91
  * });
141
- * :::
142
92
  * ```
93
+ * :::
143
94
  */
144
95
  export type InitialProps = AndroidInitialProps | IOSInitialProps;