@symbiote-native/application 1.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +43 -39
  2. package/package.json +14 -14
package/README.md CHANGED
@@ -16,6 +16,10 @@ composable/service to wrap — every adapter's entry point is a plain re-export
16
16
  npm install @symbiote-native/application
17
17
  ```
18
18
 
19
+ Scaffolding or extending a SymbioteNative app? `npx @symbiote-native/cli new --application` (or
20
+ `add --application` in an existing app) installs and wires this for you — see
21
+ [`@symbiote-native/cli`](../cli).
22
+
19
23
  `expo-application` and `expo-modules-core` come along as regular dependencies, pinned to exact
20
24
  versions — never install either yourself, and never add the `expo` meta-package to your project
21
25
  (it bundles its own Metro/Babel pipeline, which conflicts with this project's own).
@@ -62,7 +66,7 @@ stays a physical file/subpath since Angular ships through a separate `ngc`/AOT b
62
66
  ```tsx
63
67
  // React
64
68
  import { useEffect, useState } from 'react';
65
- import { Platform, Text, View } from '@symbiote-native/react';
69
+ import { Platform } from '@symbiote-native/react';
66
70
  import {
67
71
  applicationId,
68
72
  applicationName,
@@ -79,17 +83,17 @@ function ApplicationScreen() {
79
83
  }, []);
80
84
 
81
85
  return (
82
- <View>
83
- <Text>
86
+ <view>
87
+ <text>
84
88
  {applicationName} ({applicationId})
85
- </Text>
86
- <Text>
89
+ </text>
90
+ <text>
87
91
  v{nativeApplicationVersion} (build {nativeBuildVersion})
88
- </Text>
92
+ </text>
89
93
  {Platform.OS === 'android' && installedAt && (
90
- <Text>Installed {installedAt.toLocaleDateString()}</Text>
94
+ <text>Installed {installedAt.toLocaleDateString()}</text>
91
95
  )}
92
- </View>
96
+ </view>
93
97
  );
94
98
  }
95
99
  ```
@@ -98,7 +102,7 @@ function ApplicationScreen() {
98
102
  <!-- Vue -->
99
103
  <script setup lang="ts">
100
104
  import { onMounted, ref } from 'vue';
101
- import { Platform, Text, View } from '@symbiote-native/vue';
105
+ import { Platform } from '@symbiote-native/vue';
102
106
  import {
103
107
  applicationId,
104
108
  applicationName,
@@ -115,22 +119,22 @@ onMounted(() => {
115
119
  </script>
116
120
 
117
121
  <template>
118
- <View>
119
- <Text>{{ applicationName }} ({{ applicationId }})</Text>
120
- <Text
121
- >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
122
+ <view>
123
+ <text>{{ applicationName }} ({{ applicationId }})</text>
124
+ <text
125
+ >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</text
122
126
  >
123
- <Text v-if="Platform.OS === 'android' && installedAt">
127
+ <text v-if="Platform.OS === 'android' && installedAt">
124
128
  Installed {{ installedAt?.toLocaleDateString() }}
125
- </Text>
126
- </View>
129
+ </text>
130
+ </view>
127
131
  </template>
128
132
  ```
129
133
 
130
134
  ```ts
131
135
  // Angular
132
136
  import { Component, signal } from '@angular/core';
133
- import { Platform, Text, View } from '@symbiote-native/angular';
137
+ import { Platform, SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
134
138
  import {
135
139
  applicationId,
136
140
  applicationName,
@@ -141,17 +145,17 @@ import {
141
145
 
142
146
  @Component({
143
147
  standalone: true,
144
- imports: [Text, View],
148
+ imports: [SYMBIOTE_ELEMENTS],
145
149
  template: `
146
- <View>
147
- <Text>{{ applicationName }} ({{ applicationId }})</Text>
148
- <Text
149
- >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
150
+ <view>
151
+ <text>{{ applicationName }} ({{ applicationId }})</text>
152
+ <text
153
+ >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</text
150
154
  >
151
155
  @if (Platform.OS === 'android' && installedAt(); as date) {
152
- <Text>Installed {{ date.toLocaleDateString() }}</Text>
156
+ <text>Installed {{ date.toLocaleDateString() }}</text>
153
157
  }
154
- </View>
158
+ </view>
155
159
  `,
156
160
  })
157
161
  export class ApplicationScreen {
@@ -167,7 +171,7 @@ export class ApplicationScreen {
167
171
  ```svelte
168
172
  <!-- Svelte -->
169
173
  <script lang="ts">
170
- import { Platform, Text, View } from '@symbiote-native/svelte';
174
+ import { Platform } from '@symbiote-native/svelte';
171
175
  import {
172
176
  applicationId,
173
177
  applicationName,
@@ -183,19 +187,19 @@ export class ApplicationScreen {
183
187
  });
184
188
  </script>
185
189
 
186
- <View>
187
- <Text>{applicationName} ({applicationId})</Text>
188
- <Text>v{nativeApplicationVersion} (build {nativeBuildVersion})</Text>
190
+ <view>
191
+ <text>{applicationName} ({applicationId})</text>
192
+ <text>v{nativeApplicationVersion} (build {nativeBuildVersion})</text>
189
193
  {#if Platform.OS === 'android' && installedAt !== null}
190
- <Text>Installed {installedAt.toLocaleDateString()}</Text>
194
+ <text>Installed {installedAt.toLocaleDateString()}</text>
191
195
  {/if}
192
- </View>
196
+ </view>
193
197
  ```
194
198
 
195
199
  ```tsx
196
200
  // Solid
197
201
  import { createSignal } from 'solid-js';
198
- import { Platform, Text, View } from '@symbiote-native/solid';
202
+ import { Platform } from '@symbiote-native/solid';
199
203
  import {
200
204
  applicationId,
201
205
  applicationName,
@@ -210,24 +214,24 @@ function ApplicationScreen() {
210
214
  getInstallationTimeAsync().then(setInstalledAt);
211
215
 
212
216
  return (
213
- <View>
214
- <Text>
217
+ <view>
218
+ <text>
215
219
  {applicationName} ({applicationId})
216
- </Text>
217
- <Text>
220
+ </text>
221
+ <text>
218
222
  v{nativeApplicationVersion} (build {nativeBuildVersion})
219
- </Text>
223
+ </text>
220
224
  {Platform.OS === 'android' && installedAt() !== null && (
221
- <Text>Installed {installedAt()!.toLocaleDateString()}</Text>
225
+ <text>Installed {installedAt()!.toLocaleDateString()}</text>
222
226
  )}
223
- </View>
227
+ </view>
224
228
  );
225
229
  }
226
230
  ```
227
231
 
228
232
  There's no per-instance service to `inject()` in the Angular case — every function is a plain
229
233
  free function off the core package, called straight from the constructor (or, on Solid, straight
230
- from the component body). All five examples mirror the real canary demo screens —
234
+ from the component body). All six examples mirror the real canary demo screens —
231
235
  `examples/expo-react/screens/ApplicationScreen.tsx`,
232
236
  `examples/expo-vue-sfc/screens/ApplicationScreen.vue`,
233
237
  `examples/expo-vue-tsx/screens/ApplicationScreen.tsx`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/application",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
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": {
@@ -80,12 +80,12 @@
80
80
  "solid-js": ">=1.9.0",
81
81
  "svelte": ">=5.56.0",
82
82
  "vue": ">=3.5.0",
83
- "@symbiote-native/angular": "^1.0.0",
84
- "@symbiote-native/engine": "^0.4.0",
85
- "@symbiote-native/react": "^1.0.0",
86
- "@symbiote-native/solid": "^1.0.0",
87
- "@symbiote-native/svelte": "^1.0.0",
88
- "@symbiote-native/vue": "^1.0.0"
83
+ "@symbiote-native/angular": "^3.0.0",
84
+ "@symbiote-native/engine": "^1.0.0",
85
+ "@symbiote-native/react": "^3.0.0",
86
+ "@symbiote-native/solid": "^3.0.0",
87
+ "@symbiote-native/svelte": "^3.0.0",
88
+ "@symbiote-native/vue": "^3.0.0"
89
89
  },
90
90
  "peerDependenciesMeta": {
91
91
  "@symbiote-native/angular": {
@@ -133,13 +133,13 @@
133
133
  "solid-js": "^1.9.14",
134
134
  "svelte": "^5.56.0",
135
135
  "typescript": "~6.0.0",
136
- "@symbiote-native/angular": "1.0.0",
137
- "@symbiote-native/engine": "0.4.0",
138
- "@symbiote-native/react": "1.0.0",
139
- "@symbiote-native/solid": "1.0.0",
140
- "@symbiote-native/svelte": "1.0.0",
141
- "@symbiote-native/test-utils": "0.3.0",
142
- "@symbiote-native/vue": "1.0.0"
136
+ "@symbiote-native/angular": "3.0.0",
137
+ "@symbiote-native/engine": "1.0.0",
138
+ "@symbiote-native/react": "3.0.0",
139
+ "@symbiote-native/solid": "3.0.0",
140
+ "@symbiote-native/svelte": "3.0.0",
141
+ "@symbiote-native/test-utils": "0.3.1",
142
+ "@symbiote-native/vue": "3.0.0"
143
143
  },
144
144
  "scripts": {
145
145
  "typecheck": "tsc --build",