@symbiote-native/crypto 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 +42 -42
  2. package/package.json +14 -14
package/README.md CHANGED
@@ -14,6 +14,10 @@ no hook/composable/service to wrap — every adapter's entry point is a plain re
14
14
  npm install @symbiote-native/crypto
15
15
  ```
16
16
 
17
+ Scaffolding or extending a SymbioteNative app? `npx @symbiote-native/cli new --crypto` (or
18
+ `add --crypto` in an existing app) installs and wires this for you — see
19
+ [`@symbiote-native/cli`](../cli).
20
+
17
21
  `expo-crypto` and `expo-modules-core` come along as regular dependencies, pinned to exact
18
22
  versions — never install either yourself, and never add the `expo` meta-package to your project
19
23
  (it bundles its own Metro/Babel pipeline, which conflicts with this project's own).
@@ -59,7 +63,6 @@ stays a physical file/subpath since Angular ships through a separate `ngc`/AOT b
59
63
  ```tsx
60
64
  // React
61
65
  import { useEffect, useState } from 'react';
62
- import { Pressable, Text, View } from '@symbiote-native/react';
63
66
  import {
64
67
  CryptoDigestAlgorithm,
65
68
  digestStringAsync,
@@ -81,13 +84,13 @@ function CryptoScreen() {
81
84
  };
82
85
 
83
86
  return (
84
- <View>
85
- <Text>UUID: {uuid}</Text>
86
- <Pressable onPress={handleHash}>
87
- <Text>Hash a string</Text>
88
- </Pressable>
89
- {hash && <Text>SHA-256: {hash}</Text>}
90
- </View>
87
+ <view>
88
+ <text>UUID: {uuid}</text>
89
+ <pressable onPress={handleHash}>
90
+ <text>Hash a string</text>
91
+ </pressable>
92
+ {hash && <text>SHA-256: {hash}</text>}
93
+ </view>
91
94
  );
92
95
  }
93
96
  ```
@@ -96,7 +99,6 @@ function CryptoScreen() {
96
99
  <!-- Vue -->
97
100
  <script setup lang="ts">
98
101
  import { onMounted, ref } from 'vue';
99
- import { Pressable, Text, View } from '@symbiote-native/vue';
100
102
  import {
101
103
  CryptoDigestAlgorithm,
102
104
  digestStringAsync,
@@ -121,20 +123,19 @@ function handleHash(): void {
121
123
  </script>
122
124
 
123
125
  <template>
124
- <View>
125
- <Text>UUID: {{ uuid }}</Text>
126
- <Pressable @press="handleHash">
127
- <Text>Hash a string</Text>
128
- </Pressable>
129
- <Text v-if="hash">SHA-256: {{ hash }}</Text>
130
- </View>
126
+ <view>
127
+ <text>UUID: {{ uuid }}</text>
128
+ <pressable @press="handleHash">
129
+ <text>Hash a string</text>
130
+ </pressable>
131
+ <text v-if="hash">SHA-256: {{ hash }}</text>
132
+ </view>
131
133
  </template>
132
134
  ```
133
135
 
134
136
  ```svelte
135
137
  <!-- Svelte -->
136
138
  <script lang="ts">
137
- import { Pressable, Text, View } from '@symbiote-native/svelte';
138
139
  import {
139
140
  CryptoDigestAlgorithm,
140
141
  digestStringAsync,
@@ -151,19 +152,18 @@ function handleHash(): void {
151
152
  }
152
153
  </script>
153
154
 
154
- <View>
155
- <Text>UUID: {uuid}</Text>
156
- <Pressable onPress={handleHash}>
157
- <Text>Hash a string</Text>
158
- </Pressable>
159
- {#if hash}<Text>SHA-256: {hash}</Text>{/if}
160
- </View>
155
+ <view>
156
+ <text>UUID: {uuid}</text>
157
+ <pressable onPress={handleHash}>
158
+ <text>Hash a string</text>
159
+ </pressable>
160
+ {#if hash}<text>SHA-256: {hash}</text>{/if}
161
+ </view>
161
162
  ```
162
163
 
163
164
  ```tsx
164
165
  // Solid
165
166
  import { createSignal } from 'solid-js';
166
- import { Pressable, Text, View } from '@symbiote-native/solid';
167
167
  import {
168
168
  CryptoDigestAlgorithm,
169
169
  digestStringAsync,
@@ -181,13 +181,13 @@ function CryptoScreen() {
181
181
  };
182
182
 
183
183
  return (
184
- <View>
185
- <Text>UUID: {uuid()}</Text>
186
- <Pressable onPress={handleHash}>
187
- <Text>Hash a string</Text>
188
- </Pressable>
189
- {hash() && <Text>SHA-256: {hash()}</Text>}
190
- </View>
184
+ <view>
185
+ <text>UUID: {uuid()}</text>
186
+ <pressable onPress={handleHash}>
187
+ <text>Hash a string</text>
188
+ </pressable>
189
+ {hash() && <text>SHA-256: {hash()}</text>}
190
+ </view>
191
191
  );
192
192
  }
193
193
  ```
@@ -195,7 +195,7 @@ function CryptoScreen() {
195
195
  ```ts
196
196
  // Angular
197
197
  import { Component, signal } from '@angular/core';
198
- import { Pressable, Text, View } from '@symbiote-native/angular';
198
+ import { SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
199
199
  import {
200
200
  CryptoDigestAlgorithm,
201
201
  digestStringAsync,
@@ -204,17 +204,17 @@ import {
204
204
 
205
205
  @Component({
206
206
  standalone: true,
207
- imports: [Pressable, Text, View],
207
+ imports: [SYMBIOTE_ELEMENTS],
208
208
  template: `
209
- <View>
210
- <Text>UUID: {{ uuid() }}</Text>
211
- <Pressable (press)="handleHash()">
212
- <Text>Hash a string</Text>
213
- </Pressable>
209
+ <view>
210
+ <text>UUID: {{ uuid() }}</text>
211
+ <pressable (press)="handleHash()">
212
+ <text>Hash a string</text>
213
+ </pressable>
214
214
  @if (hash()) {
215
- <Text>SHA-256: {{ hash() }}</Text>
215
+ <text>SHA-256: {{ hash() }}</text>
216
216
  }
217
- </View>
217
+ </view>
218
218
  `,
219
219
  })
220
220
  export class CryptoScreen {
@@ -231,7 +231,7 @@ export class CryptoScreen {
231
231
 
232
232
  There's no per-instance service to `inject()` in the Angular case — every function is a plain
233
233
  free function off the core package, called straight from the component body (or the constructor,
234
- on Angular). All five examples mirror the real canary demo screens —
234
+ on Angular). All six examples mirror the real canary demo screens —
235
235
  `examples/expo-react/screens/CryptoScreen.tsx`, `examples/expo-vue-sfc/screens/CryptoScreen.vue`,
236
236
  `examples/expo-vue-tsx/screens/CryptoScreen.tsx`, `examples/expo-svelte/screens/CryptoScreen.svelte`,
237
237
  `examples/expo-solid/screens/CryptoScreen.tsx`, `examples/expo-angular/src/screens/CryptoScreen.ts`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/crypto",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "expo-crypto wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Cryptographically secure random bytes, randomUUID, and string/buffer digest hashing (SHA-1/256/384/512, MD2/MD4/MD5).",
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/solid": "^3.0.0",
86
+ "@symbiote-native/react": "^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",