@symbiote-native/application 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 +25 -15
- package/build/core/index.d.ts +1 -1
- package/build/core/index.js +1 -1
- package/build-ngc/core/application.js.map +1 -1
- package/build-ngc/core/index.d.ts +1 -1
- package/build-ngc/core/index.js +1 -1
- package/build-ngc/core/index.js.map +1 -1
- package/build-ngc/core/native-module.js.map +1 -1
- package/package.json +46 -18
- package/src/core/application.ts +26 -8
- package/src/core/index.ts +4 -1
- package/src/core/native-module.ts +4 -1
- package/src/core/types.ts +2 -1
- package/build/react/index.d.ts +0 -1
- package/build/react/index.js +0 -5
- package/build/vue/index.d.ts +0 -1
- package/build/vue/index.js +0 -4
- package/src/react/index.ts +0 -5
- package/src/vue/index.ts +0 -4
package/README.md
CHANGED
|
@@ -28,12 +28,12 @@ Unlike a plain RN native module, `expo-application`'s native code is discovered
|
|
|
28
28
|
into the native host app **once**, covering this package and every other `expo-modules-core`
|
|
29
29
|
package with zero further changes:
|
|
30
30
|
|
|
31
|
-
| Platform | Touches
|
|
32
|
-
|
|
33
|
-
| iOS
|
|
34
|
-
| iOS
|
|
35
|
-
| Android
|
|
36
|
-
| Android
|
|
31
|
+
| Platform | Touches |
|
|
32
|
+
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| iOS | `ios/Podfile` — add `use_expo_modules!` |
|
|
34
|
+
| iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
|
|
35
|
+
| Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
|
|
36
|
+
| 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) |
|
|
37
37
|
|
|
38
38
|
Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
|
|
39
39
|
implementation: `examples/expo-react/ios/Podfile` and
|
|
@@ -51,13 +51,12 @@ src/core/ nativeApplicationVersion / nativeBuildVersion / applicationName /
|
|
|
51
51
|
getInstallationTimeAsync, getLastUpdateTimeAsync, plus ApplicationReleaseType and
|
|
52
52
|
PushNotificationServiceEnvironment. native-module.ts resolves the native module via
|
|
53
53
|
expo-modules-core's requireNativeModule.
|
|
54
|
-
src/react/ @symbiote-native/application/react — export * from '../core'
|
|
55
|
-
src/vue/ @symbiote-native/application/vue — export * from '../core'
|
|
56
54
|
src/angular/ @symbiote-native/application/angular — export * from '../core'
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
`./react`, `./vue`, and `./svelte` are `exports`-map aliases straight onto `src/core/` — no
|
|
58
|
+
physical per-framework file, since there's nothing to subscribe to or clean up. `./angular` stays
|
|
59
|
+
a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
|
|
61
60
|
|
|
62
61
|
## Use it
|
|
63
62
|
|
|
@@ -82,8 +81,12 @@ function ApplicationScreen() {
|
|
|
82
81
|
|
|
83
82
|
return (
|
|
84
83
|
<View>
|
|
85
|
-
<Text>
|
|
86
|
-
|
|
84
|
+
<Text>
|
|
85
|
+
{applicationName} ({applicationId})
|
|
86
|
+
</Text>
|
|
87
|
+
<Text>
|
|
88
|
+
v{nativeApplicationVersion} (build {nativeBuildVersion})
|
|
89
|
+
</Text>
|
|
87
90
|
{Platform.OS === 'android' && installedAt && (
|
|
88
91
|
<Text>Installed {installedAt.toLocaleDateString()}</Text>
|
|
89
92
|
)}
|
|
@@ -115,7 +118,9 @@ onMounted(() => {
|
|
|
115
118
|
<template>
|
|
116
119
|
<View>
|
|
117
120
|
<Text>{{ applicationName }} ({{ applicationId }})</Text>
|
|
118
|
-
<Text
|
|
121
|
+
<Text
|
|
122
|
+
>v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
|
|
123
|
+
>
|
|
119
124
|
<Text v-if="Platform.OS === 'android' && installedAt">
|
|
120
125
|
Installed {{ installedAt?.toLocaleDateString() }}
|
|
121
126
|
</Text>
|
|
@@ -141,7 +146,9 @@ import {
|
|
|
141
146
|
template: `
|
|
142
147
|
<View>
|
|
143
148
|
<Text>{{ applicationName }} ({{ applicationId }})</Text>
|
|
144
|
-
<Text
|
|
149
|
+
<Text
|
|
150
|
+
>v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
|
|
151
|
+
>
|
|
145
152
|
@if (Platform.OS === 'android' && installedAt(); as date) {
|
|
146
153
|
<Text>Installed {{ date.toLocaleDateString() }}</Text>
|
|
147
154
|
}
|
|
@@ -191,7 +198,10 @@ Plus `ApplicationReleaseType` and `PushNotificationServiceEnvironment` — porte
|
|
|
191
198
|
carries no `I` prefix; `ts-js-best-practices`).
|
|
192
199
|
|
|
193
200
|
```ts
|
|
194
|
-
import {
|
|
201
|
+
import {
|
|
202
|
+
getInstallationTimeAsync,
|
|
203
|
+
nativeApplicationVersion,
|
|
204
|
+
} from '@symbiote-native/application';
|
|
195
205
|
// or the framework-scoped entry points — identical surface, re-exported verbatim:
|
|
196
206
|
import { getInstallationTimeAsync } from '@symbiote-native/application/react';
|
|
197
207
|
import { getInstallationTimeAsync } from '@symbiote-native/application/vue';
|
package/build/core/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
|
|
2
|
-
export { ApplicationReleaseType, type PushNotificationServiceEnvironment } from './types';
|
|
2
|
+
export { ApplicationReleaseType, type PushNotificationServiceEnvironment, } from './types';
|
package/build/core/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application.js';
|
|
2
|
-
export { ApplicationReleaseType } from './types.js';
|
|
2
|
+
export { ApplicationReleaseType, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/core/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/core/application.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
|
|
2
|
-
export { ApplicationReleaseType, type PushNotificationServiceEnvironment } from './types';
|
|
2
|
+
export { ApplicationReleaseType, type PushNotificationServiceEnvironment, } from './types';
|
package/build-ngc/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
|
|
2
|
-
export { ApplicationReleaseType } from './types';
|
|
2
|
+
export { ApplicationReleaseType, } from './types';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,6CAA6C,EAC7C,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,6CAA6C,EAC7C,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,sBAAsB,GAEvB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAoBvD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAChD,4BAA4B,CAC7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/application",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "expo-application wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Native app version/build/name/ID constants, the Android ID, install-referrer and install/update-time lookups, and the iOS vendor ID, release type, and push-notification-service environment.",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "expo-application wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Native app version/build/name/ID constants, the Android ID, install-referrer and install/update-time lookups, and the iOS vendor ID, release type, and push-notification-service environment.",
|
|
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",
|
package/src/core/application.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Platform, UnavailabilityError } from 'expo-modules-core';
|
|
2
2
|
|
|
3
3
|
import { expoApplication } from './native-module';
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
ApplicationReleaseType,
|
|
6
|
+
PushNotificationServiceEnvironment,
|
|
7
|
+
} from './types';
|
|
5
8
|
|
|
6
9
|
const NATIVE_MODULE_NAME = 'expo-application';
|
|
7
10
|
|
|
@@ -20,21 +23,24 @@ export const nativeApplicationVersion: string | null =
|
|
|
20
23
|
* the `Info.plist` value for `CFBundleVersion` (`ios.buildNumber` in the app config).
|
|
21
24
|
* @example `"114"`
|
|
22
25
|
*/
|
|
23
|
-
export const nativeBuildVersion: string | null =
|
|
26
|
+
export const nativeBuildVersion: string | null =
|
|
27
|
+
expoApplication.nativeBuildVersion ?? null;
|
|
24
28
|
|
|
25
29
|
/**
|
|
26
30
|
* The human-readable name of the application, displayed with the app's icon on the device's
|
|
27
31
|
* home screen.
|
|
28
32
|
* @example `"Expo"`, `"Yelp"`, `"Instagram"`
|
|
29
33
|
*/
|
|
30
|
-
export const applicationName: string | null =
|
|
34
|
+
export const applicationName: string | null =
|
|
35
|
+
expoApplication.applicationName ?? null;
|
|
31
36
|
|
|
32
37
|
/**
|
|
33
38
|
* The ID of the application. On Android, this is the application ID. On iOS, this is the
|
|
34
39
|
* bundle ID.
|
|
35
40
|
* @example `"com.cocoacasts.scribbles"`, `"com.apple.Pages"`
|
|
36
41
|
*/
|
|
37
|
-
export const applicationId: string | null =
|
|
42
|
+
export const applicationId: string | null =
|
|
43
|
+
expoApplication.applicationId ?? null;
|
|
38
44
|
|
|
39
45
|
/**
|
|
40
46
|
* Gets the value of `Settings.Secure.ANDROID_ID` — a hexadecimal string unique to each
|
|
@@ -61,7 +67,10 @@ export function getAndroidId(): string {
|
|
|
61
67
|
*/
|
|
62
68
|
export async function getInstallReferrerAsync(): Promise<string> {
|
|
63
69
|
if (!expoApplication.getInstallReferrerAsync) {
|
|
64
|
-
throw new UnavailabilityError(
|
|
70
|
+
throw new UnavailabilityError(
|
|
71
|
+
NATIVE_MODULE_NAME,
|
|
72
|
+
'getInstallReferrerAsync',
|
|
73
|
+
);
|
|
65
74
|
}
|
|
66
75
|
return expoApplication.getInstallReferrerAsync();
|
|
67
76
|
}
|
|
@@ -87,7 +96,10 @@ export async function getIosIdForVendorAsync(): Promise<string | null> {
|
|
|
87
96
|
*/
|
|
88
97
|
export async function getIosApplicationReleaseTypeAsync(): Promise<ApplicationReleaseType> {
|
|
89
98
|
if (!expoApplication.getApplicationReleaseTypeAsync) {
|
|
90
|
-
throw new UnavailabilityError(
|
|
99
|
+
throw new UnavailabilityError(
|
|
100
|
+
NATIVE_MODULE_NAME,
|
|
101
|
+
'getApplicationReleaseTypeAsync',
|
|
102
|
+
);
|
|
91
103
|
}
|
|
92
104
|
return expoApplication.getApplicationReleaseTypeAsync();
|
|
93
105
|
}
|
|
@@ -100,7 +112,10 @@ export async function getIosApplicationReleaseTypeAsync(): Promise<ApplicationRe
|
|
|
100
112
|
*/
|
|
101
113
|
export async function getIosPushNotificationServiceEnvironmentAsync(): Promise<PushNotificationServiceEnvironment> {
|
|
102
114
|
if (!expoApplication.getPushNotificationServiceEnvironmentAsync) {
|
|
103
|
-
throw new UnavailabilityError(
|
|
115
|
+
throw new UnavailabilityError(
|
|
116
|
+
NATIVE_MODULE_NAME,
|
|
117
|
+
'getPushNotificationServiceEnvironmentAsync',
|
|
118
|
+
);
|
|
104
119
|
}
|
|
105
120
|
return expoApplication.getPushNotificationServiceEnvironmentAsync();
|
|
106
121
|
}
|
|
@@ -114,7 +129,10 @@ export async function getIosPushNotificationServiceEnvironmentAsync(): Promise<P
|
|
|
114
129
|
*/
|
|
115
130
|
export async function getInstallationTimeAsync(): Promise<Date> {
|
|
116
131
|
if (!expoApplication.getInstallationTimeAsync) {
|
|
117
|
-
throw new UnavailabilityError(
|
|
132
|
+
throw new UnavailabilityError(
|
|
133
|
+
NATIVE_MODULE_NAME,
|
|
134
|
+
'getInstallationTimeAsync',
|
|
135
|
+
);
|
|
118
136
|
}
|
|
119
137
|
const installationTime = await expoApplication.getInstallationTimeAsync();
|
|
120
138
|
return new Date(installationTime);
|
package/src/core/index.ts
CHANGED
|
@@ -11,4 +11,7 @@ export {
|
|
|
11
11
|
getInstallationTimeAsync,
|
|
12
12
|
getLastUpdateTimeAsync,
|
|
13
13
|
} from './application';
|
|
14
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
ApplicationReleaseType,
|
|
16
|
+
type PushNotificationServiceEnvironment,
|
|
17
|
+
} from './types';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { requireNativeModule } from 'expo-modules-core';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
ApplicationReleaseType,
|
|
4
|
+
PushNotificationServiceEnvironment,
|
|
5
|
+
} from './types';
|
|
3
6
|
|
|
4
7
|
const EXPO_APPLICATION_MODULE_NAME = 'ExpoApplication';
|
|
5
8
|
|
package/src/core/types.ts
CHANGED
|
@@ -19,4 +19,5 @@ export enum ApplicationReleaseType {
|
|
|
19
19
|
* Maps to the `aps-environment` key in the native target's registered entitlements.
|
|
20
20
|
* @platform ios
|
|
21
21
|
*/
|
|
22
|
-
export type PushNotificationServiceEnvironment =
|
|
22
|
+
export type PushNotificationServiceEnvironment =
|
|
23
|
+
'development' | 'production' | null;
|
package/build/react/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../core';
|
package/build/react/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/application/react: the React entry over the framework-agnostic core.
|
|
2
|
-
// Upstream ships plain constants and one-shot async functions, no per-instance state and no
|
|
3
|
-
// event stream — there is nothing for a hook to wrap, so this is a plain re-export, mirroring
|
|
4
|
-
// packages/local-auth/src/react/index.ts.
|
|
5
|
-
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,5 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/application/react: the React entry over the framework-agnostic core.
|
|
2
|
-
// Upstream ships plain constants and one-shot async functions, no per-instance state and no
|
|
3
|
-
// event stream — there is nothing for a hook to wrap, so this is a plain re-export, mirroring
|
|
4
|
-
// packages/local-auth/src/react/index.ts.
|
|
5
|
-
export * from '../core';
|
package/src/vue/index.ts
DELETED