@symbiote-native/system-ui 0.1.0 → 0.3.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/README.md +13 -11
- package/build-ngc/core/native-module.js.map +1 -1
- package/build-ngc/core/system-ui.js.map +1 -1
- package/package.json +46 -18
- package/src/core/native-module.ts +3 -1
- package/src/core/system-ui.ts +3 -1
- package/build/react/index.d.ts +0 -1
- package/build/react/index.js +0 -6
- package/build/vue/index.d.ts +0 -1
- package/build/vue/index.js +0 -4
- package/src/react/index.ts +0 -6
- package/src/vue/index.ts +0 -4
package/README.md
CHANGED
|
@@ -27,12 +27,12 @@ Unlike a plain RN native module, `expo-system-ui`'s native code is discovered by
|
|
|
27
27
|
into the native host app **once**, covering this package and every other `expo-modules-core`
|
|
28
28
|
package with zero further changes:
|
|
29
29
|
|
|
30
|
-
| Platform | Touches
|
|
31
|
-
|
|
32
|
-
| iOS
|
|
33
|
-
| iOS
|
|
34
|
-
| Android
|
|
35
|
-
| Android
|
|
30
|
+
| Platform | Touches |
|
|
31
|
+
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| iOS | `ios/Podfile` — add `use_expo_modules!` |
|
|
33
|
+
| iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
|
|
34
|
+
| Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
|
|
35
|
+
| Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
|
|
36
36
|
|
|
37
37
|
Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
|
|
38
38
|
implementation: `examples/expo-react/ios/Podfile` and
|
|
@@ -46,13 +46,12 @@ background color, nothing gated by a permission prompt.
|
|
|
46
46
|
```
|
|
47
47
|
src/core/ setBackgroundColorAsync / getBackgroundColorAsync. native-module.ts resolves the
|
|
48
48
|
native module via expo-modules-core's requireNativeModule.
|
|
49
|
-
src/react/ @symbiote-native/system-ui/react — export * from '../core'
|
|
50
|
-
src/vue/ @symbiote-native/system-ui/vue — export * from '../core'
|
|
51
49
|
src/angular/ @symbiote-native/system-ui/angular — export * from '../core'
|
|
52
50
|
```
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
`./react`, `./vue`, and `./svelte` are `exports`-map aliases straight onto `src/core/` — no
|
|
53
|
+
physical per-framework file, since there's nothing to subscribe to or clean up. `./angular` stays
|
|
54
|
+
a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
|
|
56
55
|
|
|
57
56
|
## Use it
|
|
58
57
|
|
|
@@ -105,7 +104,10 @@ getBackgroundColorAsync(): Promise<ColorValue | null>
|
|
|
105
104
|
```
|
|
106
105
|
|
|
107
106
|
```ts
|
|
108
|
-
import {
|
|
107
|
+
import {
|
|
108
|
+
getBackgroundColorAsync,
|
|
109
|
+
setBackgroundColorAsync,
|
|
110
|
+
} from '@symbiote-native/system-ui';
|
|
109
111
|
// or the framework-scoped entry points — identical surface, re-exported verbatim:
|
|
110
112
|
import { setBackgroundColorAsync } from '@symbiote-native/system-ui/react';
|
|
111
113
|
import { setBackgroundColorAsync } from '@symbiote-native/system-ui/vue';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAYlD,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAYlD,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAC7C,0BAA0B,CAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-ui.js","sourceRoot":"","sources":["../../src/core/system-ui.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,
|
|
1
|
+
{"version":3,"file":"system-ui.js","sourceRoot":"","sources":["../../src/core/system-ui.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAAwB;IAExB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,MAAM,YAAY,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,MAAM,WAAW,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACxE,OAAO,MAAM,YAAY,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,OAAO,MAAM,YAAY,CAAC,uBAAuB,EAAE,CAAC;AACtD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/system-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "expo-system-ui wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Sets and reads the root view's background color.",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "expo-system-ui wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Sets and reads the root view's background color.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,12 +23,20 @@
|
|
|
23
23
|
"default": "./build/core/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./vue": {
|
|
26
|
-
"types": "./build/
|
|
27
|
-
"default": "./build/
|
|
26
|
+
"types": "./build/core/index.d.ts",
|
|
27
|
+
"default": "./build/core/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./react": {
|
|
30
|
-
"types": "./build/
|
|
31
|
-
"default": "./build/
|
|
30
|
+
"types": "./build/core/index.d.ts",
|
|
31
|
+
"default": "./build/core/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./svelte": {
|
|
34
|
+
"types": "./build/core/index.d.ts",
|
|
35
|
+
"default": "./build/core/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./solid": {
|
|
38
|
+
"types": "./build/core/index.d.ts",
|
|
39
|
+
"default": "./build/core/index.js"
|
|
32
40
|
},
|
|
33
41
|
"./angular": {
|
|
34
42
|
"types": "./build-ngc/angular/index.d.ts",
|
|
@@ -53,15 +61,19 @@
|
|
|
53
61
|
"expo-modules-core": "57.0.5"
|
|
54
62
|
},
|
|
55
63
|
"peerDependencies": {
|
|
64
|
+
"@symbiote-native/angular": ">=0.6.2",
|
|
56
65
|
"@symbiote-native/engine": ">=0.1.7",
|
|
66
|
+
"@symbiote-native/react": ">=0.2.8",
|
|
67
|
+
"@symbiote-native/solid": ">=0.0.1",
|
|
68
|
+
"@symbiote-native/svelte": ">=0.1.0",
|
|
69
|
+
"@symbiote-native/vue": ">=0.3.8",
|
|
57
70
|
"@angular/core": ">=20",
|
|
58
71
|
"@vue/runtime-core": "^3.5.13",
|
|
59
72
|
"react": ">=19.0.0",
|
|
60
73
|
"react-native": ">=0.86",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"@symbiote-native/vue": "0.3.8"
|
|
74
|
+
"solid-js": ">=1.9.0",
|
|
75
|
+
"svelte": ">=5.56.0",
|
|
76
|
+
"vue": ">=3.5.0"
|
|
65
77
|
},
|
|
66
78
|
"peerDependenciesMeta": {
|
|
67
79
|
"@symbiote-native/angular": {
|
|
@@ -70,6 +82,12 @@
|
|
|
70
82
|
"@symbiote-native/react": {
|
|
71
83
|
"optional": true
|
|
72
84
|
},
|
|
85
|
+
"@symbiote-native/solid": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@symbiote-native/svelte": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
73
91
|
"@symbiote-native/vue": {
|
|
74
92
|
"optional": true
|
|
75
93
|
},
|
|
@@ -82,24 +100,34 @@
|
|
|
82
100
|
"react": {
|
|
83
101
|
"optional": true
|
|
84
102
|
},
|
|
103
|
+
"solid-js": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"svelte": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
85
109
|
"vue": {
|
|
86
110
|
"optional": true
|
|
87
111
|
}
|
|
88
112
|
},
|
|
89
113
|
"devDependencies": {
|
|
90
|
-
"@angular/compiler": "
|
|
91
|
-
"@angular/compiler-cli": "
|
|
92
|
-
"@angular/core": "
|
|
114
|
+
"@angular/compiler": "~22.0.8",
|
|
115
|
+
"@angular/compiler-cli": "~22.0.8",
|
|
116
|
+
"@angular/core": "~22.0.8",
|
|
93
117
|
"@types/node": "^26.0.0",
|
|
94
118
|
"@types/react": "^19.2.0",
|
|
95
119
|
"@vue/runtime-core": "^3.5.13",
|
|
96
120
|
"react": "19.2.3",
|
|
121
|
+
"solid-js": "^1.9.14",
|
|
122
|
+
"svelte": "^5.56.0",
|
|
97
123
|
"typescript": "~6.0.0",
|
|
98
|
-
"@symbiote-native/angular": "0.
|
|
99
|
-
"@symbiote-native/engine": "0.
|
|
100
|
-
"@symbiote-native/react": "0.
|
|
101
|
-
"@symbiote-native/
|
|
102
|
-
"@symbiote-native/
|
|
124
|
+
"@symbiote-native/angular": "0.8.0",
|
|
125
|
+
"@symbiote-native/engine": "0.3.0",
|
|
126
|
+
"@symbiote-native/react": "0.4.0",
|
|
127
|
+
"@symbiote-native/solid": "0.1.0",
|
|
128
|
+
"@symbiote-native/svelte": "0.3.0",
|
|
129
|
+
"@symbiote-native/test-utils": "0.2.0",
|
|
130
|
+
"@symbiote-native/vue": "0.5.0"
|
|
103
131
|
},
|
|
104
132
|
"scripts": {
|
|
105
133
|
"typecheck": "tsc --build",
|
|
@@ -13,4 +13,6 @@ export type INativeSystemUIModule = {
|
|
|
13
13
|
getBackgroundColorAsync(): Promise<ColorValue | null>;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const expoSystemUI = requireNativeModule<INativeSystemUIModule>(
|
|
16
|
+
export const expoSystemUI = requireNativeModule<INativeSystemUIModule>(
|
|
17
|
+
EXPO_SYSTEM_UI_MODULE_NAME,
|
|
18
|
+
);
|
package/src/core/system-ui.ts
CHANGED
|
@@ -17,7 +17,9 @@ import { expoSystemUI } from './native-module';
|
|
|
17
17
|
* @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color), or
|
|
18
18
|
* `null` to clear the override.
|
|
19
19
|
*/
|
|
20
|
-
export async function setBackgroundColorAsync(
|
|
20
|
+
export async function setBackgroundColorAsync(
|
|
21
|
+
color: ColorValue | null,
|
|
22
|
+
): Promise<void> {
|
|
21
23
|
if (color == null) {
|
|
22
24
|
return await expoSystemUI.setBackgroundColorAsync(null);
|
|
23
25
|
} else {
|
package/build/react/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../core';
|
package/build/react/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/system-ui/react: the React entry over the framework-agnostic core. Both
|
|
2
|
-
// exports are plain async functions with no per-instance state and no event stream (unlike
|
|
3
|
-
// @symbiote-native/sensors) — there is nothing for a hook to wrap, so this is a plain
|
|
4
|
-
// re-export, mirroring how @symbiote-native/device's React entry passes its own free
|
|
5
|
-
// functions through untouched.
|
|
6
|
-
export * from '../core/index.js';
|
package/build/vue/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../core';
|
package/build/vue/index.js
DELETED
package/src/react/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/system-ui/react: the React entry over the framework-agnostic core. Both
|
|
2
|
-
// exports are plain async functions with no per-instance state and no event stream (unlike
|
|
3
|
-
// @symbiote-native/sensors) — there is nothing for a hook to wrap, so this is a plain
|
|
4
|
-
// re-export, mirroring how @symbiote-native/device's React entry passes its own free
|
|
5
|
-
// functions through untouched.
|
|
6
|
-
export * from '../core';
|
package/src/vue/index.ts
DELETED