@symbiote-native/local-auth 1.0.0 → 2.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 +68 -67
  2. package/package.json +13 -13
package/README.md CHANGED
@@ -65,7 +65,7 @@ src/angular/ @symbiote-native/local-auth/angular — export * from '../core'
65
65
  ```tsx
66
66
  // React
67
67
  import { useEffect, useState } from 'react';
68
- import { Platform, Pressable, Text, View } from '@symbiote-native/react';
68
+ import { Platform } from '@symbiote-native/react';
69
69
  import {
70
70
  authenticateAsync,
71
71
  cancelAuthenticate,
@@ -92,26 +92,26 @@ function LocalAuthScreen() {
92
92
  };
93
93
 
94
94
  return (
95
- <View>
96
- <Text>
95
+ <view>
96
+ <text>
97
97
  {hasHardware && isEnrolled
98
98
  ? 'Ready to authenticate'
99
99
  : 'No biometrics enrolled'}
100
- </Text>
101
- <Pressable onPress={handleAuthenticate}>
102
- <Text>Authenticate</Text>
103
- </Pressable>
100
+ </text>
101
+ <pressable onPress={handleAuthenticate}>
102
+ <text>Authenticate</text>
103
+ </pressable>
104
104
  {Platform.OS === 'android' && (
105
- <Pressable onPress={() => cancelAuthenticate()}>
106
- <Text>Cancel</Text>
107
- </Pressable>
105
+ <pressable onPress={() => cancelAuthenticate()}>
106
+ <text>Cancel</text>
107
+ </pressable>
108
108
  )}
109
109
  {authResult && (
110
- <Text>
110
+ <text>
111
111
  {authResult.success ? 'Success' : `Failed: ${authResult.error}`}
112
- </Text>
112
+ </text>
113
113
  )}
114
- </View>
114
+ </view>
115
115
  );
116
116
  }
117
117
  ```
@@ -120,7 +120,7 @@ function LocalAuthScreen() {
120
120
  <!-- Vue -->
121
121
  <script setup lang="ts">
122
122
  import { onMounted, ref } from 'vue';
123
- import { Platform, Pressable, Text, View } from '@symbiote-native/vue';
123
+ import { Platform } from '@symbiote-native/vue';
124
124
  import {
125
125
  authenticateAsync,
126
126
  cancelAuthenticate,
@@ -146,29 +146,29 @@ function handleAuthenticate(): void {
146
146
  </script>
147
147
 
148
148
  <template>
149
- <View>
150
- <Text>{{
149
+ <view>
150
+ <text>{{
151
151
  hasHardware && isEnrolled
152
152
  ? 'Ready to authenticate'
153
153
  : 'No biometrics enrolled'
154
- }}</Text>
155
- <Pressable @press="handleAuthenticate">
156
- <Text>Authenticate</Text>
157
- </Pressable>
158
- <Pressable v-if="Platform.OS === 'android'" @press="cancelAuthenticate">
159
- <Text>Cancel</Text>
160
- </Pressable>
161
- <Text v-if="authResult">{{
154
+ }}</text>
155
+ <pressable @press="handleAuthenticate">
156
+ <text>Authenticate</text>
157
+ </pressable>
158
+ <pressable v-if="Platform.OS === 'android'" @press="cancelAuthenticate">
159
+ <text>Cancel</text>
160
+ </pressable>
161
+ <text v-if="authResult">{{
162
162
  authResult.success ? 'Success' : `Failed: ${authResult.error}`
163
- }}</Text>
164
- </View>
163
+ }}</text>
164
+ </view>
165
165
  </template>
166
166
  ```
167
167
 
168
168
  ```svelte
169
169
  <!-- Svelte -->
170
170
  <script lang="ts">
171
- import { Platform, Pressable, Text, View } from '@symbiote-native/svelte';
171
+ import { Platform } from '@symbiote-native/svelte';
172
172
  import {
173
173
  authenticateAsync,
174
174
  cancelAuthenticate,
@@ -193,28 +193,31 @@ function handleAuthenticate(): void {
193
193
  }
194
194
  </script>
195
195
 
196
- <View>
197
- <Text>
198
- {hasHardware && isEnrolled ? 'Ready to authenticate' : 'No biometrics enrolled'}
199
- </Text>
200
- <Pressable onPress={handleAuthenticate}>
201
- <Text>Authenticate</Text>
202
- </Pressable>
196
+ <view>
197
+ <text>
198
+ {hasHardware && isEnrolled
199
+ ? 'Ready to authenticate'
200
+ : 'No biometrics enrolled'}
201
+ </text>
202
+ <pressable onPress={handleAuthenticate}>
203
+ <text>Authenticate</text>
204
+ </pressable>
203
205
  {#if Platform.OS === 'android'}
204
- <Pressable onPress={() => cancelAuthenticate()}>
205
- <Text>Cancel</Text>
206
- </Pressable>
206
+ <pressable onPress={() => cancelAuthenticate()}>
207
+ <text>Cancel</text>
208
+ </pressable>
207
209
  {/if}
208
210
  {#if authResult}
209
- <Text>{authResult.success ? 'Success' : `Failed: ${authResult.error}`}</Text>
211
+ <text>{authResult.success ? 'Success' : `Failed: ${authResult.error}`}</text
212
+ >
210
213
  {/if}
211
- </View>
214
+ </view>
212
215
  ```
213
216
 
214
217
  ```tsx
215
218
  // Solid
216
219
  import { Show, createSignal, onMount } from 'solid-js';
217
- import { Platform, Pressable, Text, View } from '@symbiote-native/solid';
220
+ import { Platform } from '@symbiote-native/solid';
218
221
  import {
219
222
  authenticateAsync,
220
223
  cancelAuthenticate,
@@ -241,28 +244,26 @@ function LocalAuthScreen() {
241
244
  };
242
245
 
243
246
  return (
244
- <View>
245
- <Text>
247
+ <view>
248
+ <text>
246
249
  {hasHardware() && isEnrolled()
247
250
  ? 'Ready to authenticate'
248
251
  : 'No biometrics enrolled'}
249
- </Text>
250
- <Pressable onPress={handleAuthenticate}>
251
- <Text>Authenticate</Text>
252
- </Pressable>
252
+ </text>
253
+ <pressable onPress={handleAuthenticate}>
254
+ <text>Authenticate</text>
255
+ </pressable>
253
256
  {Platform.OS === 'android' && (
254
- <Pressable onPress={() => cancelAuthenticate()}>
255
- <Text>Cancel</Text>
256
- </Pressable>
257
+ <pressable onPress={() => cancelAuthenticate()}>
258
+ <text>Cancel</text>
259
+ </pressable>
257
260
  )}
258
261
  <Show when={authResult()} keyed>
259
262
  {result => (
260
- <Text>
261
- {result.success ? 'Success' : `Failed: ${result.error}`}
262
- </Text>
263
+ <text>{result.success ? 'Success' : `Failed: ${result.error}`}</text>
263
264
  )}
264
265
  </Show>
265
- </View>
266
+ </view>
266
267
  );
267
268
  }
268
269
  ```
@@ -270,7 +271,7 @@ function LocalAuthScreen() {
270
271
  ```ts
271
272
  // Angular
272
273
  import { Component, signal } from '@angular/core';
273
- import { Platform, Pressable, Text, View } from '@symbiote-native/angular';
274
+ import { Platform, SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
274
275
  import {
275
276
  authenticateAsync,
276
277
  cancelAuthenticate,
@@ -281,28 +282,28 @@ import type { ILocalAuthenticationResult } from '@symbiote-native/local-auth/ang
281
282
 
282
283
  @Component({
283
284
  standalone: true,
284
- imports: [Pressable, Text, View],
285
+ imports: [SYMBIOTE_ELEMENTS],
285
286
  template: `
286
- <View>
287
- <Text>{{
287
+ <view>
288
+ <text>{{
288
289
  hasHardware() && isEnrolled()
289
290
  ? 'Ready to authenticate'
290
291
  : 'No biometrics enrolled'
291
- }}</Text>
292
- <Pressable (press)="handleAuthenticate()">
293
- <Text>Authenticate</Text>
294
- </Pressable>
292
+ }}</text>
293
+ <pressable (press)="handleAuthenticate()">
294
+ <text>Authenticate</text>
295
+ </pressable>
295
296
  @if (Platform.OS === 'android') {
296
- <Pressable (press)="handleCancel()">
297
- <Text>Cancel</Text>
298
- </Pressable>
297
+ <pressable (press)="handleCancel()">
298
+ <text>Cancel</text>
299
+ </pressable>
299
300
  }
300
301
  @if (authResult(); as result) {
301
- <Text>{{
302
+ <text>{{
302
303
  result.success ? 'Success' : 'Failed: ' + result.error
303
- }}</Text>
304
+ }}</text>
304
305
  }
305
- </View>
306
+ </view>
306
307
  `,
307
308
  })
308
309
  export class LocalAuthScreen {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/local-auth",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "expo-local-authentication wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. FaceID/TouchID on iOS, the Fingerprint/Biometric API on Android.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -81,12 +81,12 @@
81
81
  "solid-js": ">=1.9.0",
82
82
  "svelte": ">=5.56.0",
83
83
  "vue": ">=3.5.0",
84
- "@symbiote-native/angular": "^1.0.0",
85
- "@symbiote-native/engine": "^0.4.0",
86
- "@symbiote-native/react": "^1.0.0",
87
- "@symbiote-native/solid": "^1.0.0",
88
- "@symbiote-native/svelte": "^1.0.0",
89
- "@symbiote-native/vue": "^1.0.0"
84
+ "@symbiote-native/angular": "^2.0.0",
85
+ "@symbiote-native/engine": "^0.5.0",
86
+ "@symbiote-native/react": "^2.0.0",
87
+ "@symbiote-native/solid": "^2.0.0",
88
+ "@symbiote-native/svelte": "^2.0.0",
89
+ "@symbiote-native/vue": "^2.0.0"
90
90
  },
91
91
  "peerDependenciesMeta": {
92
92
  "@symbiote-native/angular": {
@@ -135,13 +135,13 @@
135
135
  "solid-js": "^1.9.14",
136
136
  "svelte": "^5.56.0",
137
137
  "typescript": "~6.0.0",
138
- "@symbiote-native/angular": "1.0.0",
139
- "@symbiote-native/engine": "0.4.0",
140
- "@symbiote-native/react": "1.0.0",
141
- "@symbiote-native/solid": "1.0.0",
142
- "@symbiote-native/svelte": "1.0.0",
138
+ "@symbiote-native/angular": "2.0.0",
139
+ "@symbiote-native/engine": "0.5.0",
140
+ "@symbiote-native/react": "2.0.0",
141
+ "@symbiote-native/solid": "2.0.0",
142
+ "@symbiote-native/svelte": "2.0.0",
143
143
  "@symbiote-native/test-utils": "0.3.0",
144
- "@symbiote-native/vue": "1.0.0"
144
+ "@symbiote-native/vue": "2.0.0"
145
145
  },
146
146
  "scripts": {
147
147
  "typecheck": "tsc --build",