@granite-js/react-native 0.1.23-next.15 → 0.1.23-next.18
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 +45 -0
- package/dist/async-bridges.js +2 -2
- package/dist/async-bridges.mjs +1 -1
- package/dist/chunk-7GFSQK76.mjs +7 -0
- package/dist/constant-bridges.js +2 -2
- package/dist/constant-bridges.mjs +1 -1
- package/dist/native-modules/natives/GraniteBrownfieldModule.brick.d.ts +11 -0
- package/dist/polyfills/index.d.ts +1 -0
- package/package.json +11 -11
- package/src/native-modules/natives/GraniteBrownfieldModule.brick.ts +15 -0
- package/src/native-modules/natives/closeView.ts +1 -1
- package/src/native-modules/natives/getSchemeUri.ts +1 -1
- package/src/visibility/useVisibilityChanged.tsx +6 -2
- package/src/native-modules/natives/GraniteModule.brick.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @granite-js/react-native
|
|
2
2
|
|
|
3
|
+
## 0.1.23-next.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @granite-js/plugin-core@0.1.23-next.18
|
|
10
|
+
- @granite-js/style-utils@0.1.23-next.18
|
|
11
|
+
- @granite-js/lottie@0.1.23-next.18
|
|
12
|
+
- @granite-js/native@0.1.23-next.18
|
|
13
|
+
- @granite-js/image@0.1.23-next.18
|
|
14
|
+
- @granite-js/mpack@0.1.23-next.18
|
|
15
|
+
- @granite-js/jest@0.1.23-next.18
|
|
16
|
+
- @granite-js/cli@0.1.23-next.18
|
|
17
|
+
|
|
18
|
+
## 0.1.23-next.17
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- fix
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @granite-js/plugin-core@0.1.23-next.17
|
|
25
|
+
- @granite-js/style-utils@0.1.23-next.17
|
|
26
|
+
- @granite-js/lottie@0.1.23-next.17
|
|
27
|
+
- @granite-js/native@0.1.23-next.17
|
|
28
|
+
- @granite-js/image@0.1.23-next.17
|
|
29
|
+
- @granite-js/mpack@0.1.23-next.17
|
|
30
|
+
- @granite-js/jest@0.1.23-next.17
|
|
31
|
+
- @granite-js/cli@0.1.23-next.17
|
|
32
|
+
|
|
33
|
+
## 0.1.23-next.16
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- update
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
- @granite-js/plugin-core@0.1.23-next.16
|
|
40
|
+
- @granite-js/style-utils@0.1.23-next.16
|
|
41
|
+
- @granite-js/lottie@0.1.23-next.16
|
|
42
|
+
- @granite-js/native@0.1.23-next.16
|
|
43
|
+
- @granite-js/image@0.1.23-next.16
|
|
44
|
+
- @granite-js/mpack@0.1.23-next.16
|
|
45
|
+
- @granite-js/jest@0.1.23-next.16
|
|
46
|
+
- @granite-js/cli@0.1.23-next.16
|
|
47
|
+
|
|
3
48
|
## 0.1.23-next.15
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/dist/async-bridges.js
CHANGED
|
@@ -25,9 +25,9 @@ __export(async_bridges_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(async_bridges_exports);
|
|
27
27
|
|
|
28
|
-
// src/native-modules/natives/
|
|
28
|
+
// src/native-modules/natives/GraniteBrownfieldModule.brick.ts
|
|
29
29
|
var import_brick_module = require("brick-module");
|
|
30
|
-
var GraniteModule = import_brick_module.BrickModule.get("
|
|
30
|
+
var GraniteModule = import_brick_module.BrickModule.get("GraniteBrownfieldModule");
|
|
31
31
|
|
|
32
32
|
// src/native-modules/natives/closeView.ts
|
|
33
33
|
async function closeView() {
|
package/dist/async-bridges.mjs
CHANGED
package/dist/constant-bridges.js
CHANGED
|
@@ -24,9 +24,9 @@ __export(constant_bridges_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(constant_bridges_exports);
|
|
26
26
|
|
|
27
|
-
// src/native-modules/natives/
|
|
27
|
+
// src/native-modules/natives/GraniteBrownfieldModule.brick.ts
|
|
28
28
|
var import_brick_module = require("brick-module");
|
|
29
|
-
var GraniteModule = import_brick_module.BrickModule.get("
|
|
29
|
+
var GraniteModule = import_brick_module.BrickModule.get("GraniteBrownfieldModule");
|
|
30
30
|
|
|
31
31
|
// src/native-modules/natives/getSchemeUri.ts
|
|
32
32
|
function getSchemeUri() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BrickModuleSpec } from 'brick-module';
|
|
2
|
+
import { CodegenTypes } from 'react-native';
|
|
3
|
+
interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {
|
|
4
|
+
readonly moduleName: 'GraniteBrownfieldModule';
|
|
5
|
+
readonly supportedEvents: ['visibilityChanged'];
|
|
6
|
+
onVisibilityChanged: CodegenTypes.EventEmitter<boolean>;
|
|
7
|
+
closeView(): Promise<void>;
|
|
8
|
+
schemeUri: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const GraniteModule: GraniteBrownfieldModuleSpec;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupPolyfills(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granite-js/react-native",
|
|
3
|
-
"version": "0.1.23-next.
|
|
3
|
+
"version": "0.1.23-next.18",
|
|
4
4
|
"description": "The Granite Framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"granite": "./bin/cli.js"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@babel/core": "^7.24.9",
|
|
87
87
|
"@babel/preset-env": "^7.24.8",
|
|
88
88
|
"@babel/preset-typescript": "^7.24.7",
|
|
89
|
-
"@granite-js/native": "0.1.23-next.
|
|
89
|
+
"@granite-js/native": "0.1.23-next.18",
|
|
90
90
|
"@testing-library/dom": "^10.4.0",
|
|
91
91
|
"@testing-library/react": "^16.1.0",
|
|
92
92
|
"@types/babel__core": "^7",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@types/node": "^22.10.2",
|
|
95
95
|
"@types/react": "npm:19.1.0",
|
|
96
96
|
"@vitest/coverage-v8": "^2.1.8",
|
|
97
|
-
"brick-module": "
|
|
97
|
+
"brick-module": "npm:0.2.1-next.1",
|
|
98
98
|
"esbuild": "0.25.9",
|
|
99
99
|
"eslint": "^9.7.0",
|
|
100
100
|
"jsdom": "^25.0.1",
|
|
@@ -105,20 +105,20 @@
|
|
|
105
105
|
"vitest": "^2.1.8"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"@granite-js/native": "0.1.23-next.
|
|
108
|
+
"@granite-js/native": "0.1.23-next.18",
|
|
109
109
|
"@types/react": "*",
|
|
110
110
|
"brick-module": "*",
|
|
111
111
|
"react": "*",
|
|
112
112
|
"react-native": "*"
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@granite-js/cli": "0.1.23-next.
|
|
116
|
-
"@granite-js/image": "0.1.23-next.
|
|
117
|
-
"@granite-js/jest": "0.1.23-next.
|
|
118
|
-
"@granite-js/lottie": "0.1.23-next.
|
|
119
|
-
"@granite-js/mpack": "0.1.23-next.
|
|
120
|
-
"@granite-js/plugin-core": "0.1.23-next.
|
|
121
|
-
"@granite-js/style-utils": "0.1.23-next.
|
|
115
|
+
"@granite-js/cli": "0.1.23-next.18",
|
|
116
|
+
"@granite-js/image": "0.1.23-next.18",
|
|
117
|
+
"@granite-js/jest": "0.1.23-next.18",
|
|
118
|
+
"@granite-js/lottie": "0.1.23-next.18",
|
|
119
|
+
"@granite-js/mpack": "0.1.23-next.18",
|
|
120
|
+
"@granite-js/plugin-core": "0.1.23-next.18",
|
|
121
|
+
"@granite-js/style-utils": "0.1.23-next.18",
|
|
122
122
|
"es-toolkit": "^1.39.8",
|
|
123
123
|
"react-native-url-polyfill": "1.3.0"
|
|
124
124
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
|
+
import { CodegenTypes } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {
|
|
5
|
+
readonly moduleName: 'GraniteBrownfieldModule';
|
|
6
|
+
|
|
7
|
+
readonly supportedEvents: ['visibilityChanged'];
|
|
8
|
+
|
|
9
|
+
onVisibilityChanged: CodegenTypes.EventEmitter<boolean>;
|
|
10
|
+
|
|
11
|
+
closeView(): Promise<void>;
|
|
12
|
+
schemeUri: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const GraniteModule = BrickModule.get<GraniteBrownfieldModuleSpec>('GraniteBrownfieldModule');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, PropsWithChildren, ReactElement, useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { GraniteModule } from '../native-modules/natives/
|
|
2
|
+
import { GraniteModule } from '../native-modules/natives/GraniteBrownfieldModule.brick';
|
|
3
3
|
|
|
4
4
|
const VisibilityChangedContext = createContext<boolean | undefined>(undefined);
|
|
5
5
|
|
|
@@ -31,9 +31,13 @@ export function VisibilityChangedProvider({
|
|
|
31
31
|
const [visible, setVisible] = useState(isVisible);
|
|
32
32
|
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
|
|
34
|
+
const subscription = GraniteModule.onVisibilityChanged((nextVisible: boolean) => {
|
|
35
35
|
setVisible(nextVisible);
|
|
36
36
|
});
|
|
37
|
+
|
|
38
|
+
return () => {
|
|
39
|
+
subscription.remove();
|
|
40
|
+
};
|
|
37
41
|
}, []);
|
|
38
42
|
|
|
39
43
|
return <VisibilityChangedContext.Provider value={visible}>{children}</VisibilityChangedContext.Provider>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
|
-
|
|
3
|
-
interface GraniteModuleSpec extends BrickModuleSpec {
|
|
4
|
-
readonly moduleName: 'GraniteModule';
|
|
5
|
-
|
|
6
|
-
readonly supportedEvents: ['visibilityChanged'];
|
|
7
|
-
|
|
8
|
-
closeView(): Promise<void>;
|
|
9
|
-
schemeUri: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const GraniteModule = BrickModule.get<GraniteModuleSpec>('GraniteModule');
|