@granite-js/react-native 1.0.21 → 1.0.23
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 +30 -0
- package/dist/async-bridges.js +2 -5
- package/dist/async-bridges.mjs +2 -5
- package/dist/constant-bridges.js +2 -5
- package/dist/constant-bridges.mjs +2 -5
- package/package.json +12 -14
- package/src/native-modules/natives/closeView.ts +2 -2
- package/src/native-modules/natives/getSchemeUri.ts +2 -2
- package/src/visibility/VisibilityProvider.tsx +2 -2
- package/src/visibility/onVisibilityChanged.ts +2 -2
- package/dist/chunk-NTCOC5WG.mjs +0 -7
- package/dist/spec/GraniteBrownfieldModule.brick.d.ts +0 -14
- package/src/spec/GraniteBrownfieldModule.brick.ts +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @granite-js/react-native
|
|
2
2
|
|
|
3
|
+
## 1.0.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d4d3993: feat(brownfield): sep brownfield module
|
|
8
|
+
- Updated dependencies [63217da]
|
|
9
|
+
- Updated dependencies [d4d3993]
|
|
10
|
+
- @granite-js/mpack@1.0.23
|
|
11
|
+
- @granite-js/brownfield-module@1.0.23
|
|
12
|
+
- @granite-js/native@1.0.23
|
|
13
|
+
- @granite-js/cli@1.0.23
|
|
14
|
+
- @granite-js/blur-view@1.0.23
|
|
15
|
+
- @granite-js/jest@1.0.23
|
|
16
|
+
- @granite-js/style-utils@1.0.23
|
|
17
|
+
- @granite-js/plugin-core@1.0.23
|
|
18
|
+
- @granite-js/video@1.0.23
|
|
19
|
+
|
|
20
|
+
## 1.0.22
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- @granite-js/blur-view@1.0.22
|
|
25
|
+
- @granite-js/cli@1.0.22
|
|
26
|
+
- @granite-js/jest@1.0.22
|
|
27
|
+
- @granite-js/mpack@1.0.22
|
|
28
|
+
- @granite-js/native@1.0.22
|
|
29
|
+
- @granite-js/plugin-core@1.0.22
|
|
30
|
+
- @granite-js/style-utils@1.0.22
|
|
31
|
+
- @granite-js/video@1.0.22
|
|
32
|
+
|
|
3
33
|
## 1.0.21
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/async-bridges.js
CHANGED
|
@@ -25,13 +25,10 @@ __export(async_bridges_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(async_bridges_exports);
|
|
27
27
|
|
|
28
|
-
// src/spec/GraniteBrownfieldModule.brick.ts
|
|
29
|
-
var import_brick_module = require("brick-module");
|
|
30
|
-
var GraniteModule = import_brick_module.BrickModule.get("GraniteBrownfieldModule");
|
|
31
|
-
|
|
32
28
|
// src/native-modules/natives/closeView.ts
|
|
29
|
+
var import_brownfield_module = require("@granite-js/brownfield-module");
|
|
33
30
|
async function closeView() {
|
|
34
|
-
return
|
|
31
|
+
return import_brownfield_module.GraniteBrownfieldModule?.closeView();
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
// src/native-modules/natives/openURL.ts
|
package/dist/async-bridges.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GraniteModule
|
|
3
|
-
} from "./chunk-NTCOC5WG.mjs";
|
|
4
|
-
|
|
5
1
|
// src/native-modules/natives/closeView.ts
|
|
2
|
+
import { GraniteBrownfieldModule } from "@granite-js/brownfield-module";
|
|
6
3
|
async function closeView() {
|
|
7
|
-
return
|
|
4
|
+
return GraniteBrownfieldModule?.closeView();
|
|
8
5
|
}
|
|
9
6
|
|
|
10
7
|
// src/native-modules/natives/openURL.ts
|
package/dist/constant-bridges.js
CHANGED
|
@@ -24,13 +24,10 @@ __export(constant_bridges_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(constant_bridges_exports);
|
|
26
26
|
|
|
27
|
-
// src/spec/GraniteBrownfieldModule.brick.ts
|
|
28
|
-
var import_brick_module = require("brick-module");
|
|
29
|
-
var GraniteModule = import_brick_module.BrickModule.get("GraniteBrownfieldModule");
|
|
30
|
-
|
|
31
27
|
// src/native-modules/natives/getSchemeUri.ts
|
|
28
|
+
var import_brownfield_module = require("@granite-js/brownfield-module");
|
|
32
29
|
function getSchemeUri() {
|
|
33
|
-
return
|
|
30
|
+
return import_brownfield_module.GraniteBrownfieldModule.getConstants().schemeUri;
|
|
34
31
|
}
|
|
35
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
33
|
0 && (module.exports = {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GraniteModule
|
|
3
|
-
} from "./chunk-NTCOC5WG.mjs";
|
|
4
|
-
|
|
5
1
|
// src/native-modules/natives/getSchemeUri.ts
|
|
2
|
+
import { GraniteBrownfieldModule } from "@granite-js/brownfield-module";
|
|
6
3
|
function getSchemeUri() {
|
|
7
|
-
return
|
|
4
|
+
return GraniteBrownfieldModule.getConstants().schemeUri;
|
|
8
5
|
}
|
|
9
6
|
export {
|
|
10
7
|
getSchemeUri
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granite-js/react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "The Granite Framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"granite": "./bin/cli.js"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@babel/core": "7.28.5",
|
|
92
92
|
"@babel/preset-env": "7.28.5",
|
|
93
93
|
"@babel/preset-typescript": "7.28.5",
|
|
94
|
-
"@granite-js/native": "1.0.
|
|
94
|
+
"@granite-js/native": "1.0.23",
|
|
95
95
|
"@testing-library/dom": "^10.4.0",
|
|
96
96
|
"@testing-library/react": "^16.1.0",
|
|
97
97
|
"@types/babel__core": "^7",
|
|
@@ -113,20 +113,21 @@
|
|
|
113
113
|
"zod": "^4.1.12"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@granite-js/native": "1.0.
|
|
116
|
+
"@granite-js/native": "1.0.23",
|
|
117
117
|
"@types/react": "*",
|
|
118
118
|
"brick-module": "*",
|
|
119
119
|
"react": "*",
|
|
120
120
|
"react-native": "*"
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@granite-js/blur-view": "1.0.
|
|
124
|
-
"@granite-js/
|
|
125
|
-
"@granite-js/
|
|
126
|
-
"@granite-js/
|
|
127
|
-
"@granite-js/
|
|
128
|
-
"@granite-js/
|
|
129
|
-
"@granite-js/
|
|
123
|
+
"@granite-js/blur-view": "1.0.23",
|
|
124
|
+
"@granite-js/brownfield-module": "1.0.23",
|
|
125
|
+
"@granite-js/cli": "1.0.23",
|
|
126
|
+
"@granite-js/jest": "1.0.23",
|
|
127
|
+
"@granite-js/mpack": "1.0.23",
|
|
128
|
+
"@granite-js/plugin-core": "1.0.23",
|
|
129
|
+
"@granite-js/style-utils": "1.0.23",
|
|
130
|
+
"@granite-js/video": "1.0.23",
|
|
130
131
|
"@standard-schema/spec": "^1.0.0",
|
|
131
132
|
"es-toolkit": "^1.39.8",
|
|
132
133
|
"react-native-url-polyfill": "3.0.0"
|
|
@@ -135,8 +136,5 @@
|
|
|
135
136
|
"dist/async-bridges.*",
|
|
136
137
|
"dist/constant-bridges.*",
|
|
137
138
|
"src/types/global.ts"
|
|
138
|
-
]
|
|
139
|
-
"brickModule": {
|
|
140
|
-
"specSrc": "./src/spec"
|
|
141
|
-
}
|
|
139
|
+
]
|
|
142
140
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
@@ -21,5 +21,5 @@ import { GraniteModule } from '../../spec/GraniteBrownfieldModule.brick';
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export async function closeView() {
|
|
24
|
-
return
|
|
24
|
+
return GraniteBrownfieldModule?.closeView();
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
@@ -23,5 +23,5 @@ import { GraniteModule } from '../../spec/GraniteBrownfieldModule.brick';
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export function getSchemeUri() {
|
|
26
|
-
return
|
|
26
|
+
return GraniteBrownfieldModule.getConstants().schemeUri;
|
|
27
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';
|
|
1
2
|
import { ReactElement, ReactNode, useEffect, useState } from 'react';
|
|
2
3
|
import { AppStateProvider } from './useIsAppForeground';
|
|
3
4
|
import { VisibilityChangedProvider } from './useVisibilityChanged';
|
|
4
|
-
import { GraniteModule } from '../spec/GraniteBrownfieldModule.brick';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
isVisible: boolean;
|
|
@@ -33,7 +33,7 @@ export function VisibilityProvider({ isVisible, children }: Props): ReactElement
|
|
|
33
33
|
const [visible, setVisible] = useState(isVisible);
|
|
34
34
|
|
|
35
35
|
useEffect(() => {
|
|
36
|
-
const subscription =
|
|
36
|
+
const subscription = GraniteBrownfieldModule.onVisibilityChanged(({ visible }) => {
|
|
37
37
|
setVisible(visible);
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';
|
|
2
2
|
|
|
3
|
-
export const onVisibilityChanged =
|
|
3
|
+
export const onVisibilityChanged = GraniteBrownfieldModule.onVisibilityChanged;
|
package/dist/chunk-NTCOC5WG.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BrickModuleSpec } from 'brick-module';
|
|
2
|
-
import { CodegenTypes } from 'react-native';
|
|
3
|
-
interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {
|
|
4
|
-
readonly moduleName: 'GraniteBrownfieldModule';
|
|
5
|
-
readonly onVisibilityChanged: CodegenTypes.EventEmitter<{
|
|
6
|
-
visible: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
getConstants(): {
|
|
9
|
-
schemeUri: string;
|
|
10
|
-
};
|
|
11
|
-
closeView(): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export declare const GraniteModule: GraniteBrownfieldModuleSpec;
|
|
14
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
|
-
import { CodegenTypes } from 'react-native';
|
|
3
|
-
|
|
4
|
-
interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {
|
|
5
|
-
readonly moduleName: 'GraniteBrownfieldModule';
|
|
6
|
-
readonly onVisibilityChanged: CodegenTypes.EventEmitter<{ visible: boolean }>;
|
|
7
|
-
|
|
8
|
-
getConstants(): {
|
|
9
|
-
schemeUri: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
closeView(): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const GraniteModule = BrickModule.get<GraniteBrownfieldModuleSpec>('GraniteBrownfieldModule');
|