@symbiote-native/standard-web-crypto 0.3.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.
- package/README.md +13 -6
- package/package.json +28 -16
package/README.md
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
A wrapper package for [SymbioteNative](../../README.md) that makes
|
|
4
4
|
[`expo-standard-web-crypto`](https://github.com/expo/expo/tree/main/packages/expo-standard-web-crypto)
|
|
5
5
|
— a partial W3C [Web Crypto API](https://www.w3.org/TR/WebCryptoAPI/) polyfill exposing
|
|
6
|
-
`crypto.getRandomValues` — usable from **every** adapter, React, Vue, and Angular,
|
|
6
|
+
`crypto.getRandomValues` — usable from **every** adapter, React, Vue, Svelte, Solid, and Angular,
|
|
7
|
+
not just React.
|
|
7
8
|
Unlike this repo's other Expo ports, this package needs **no native module of its own** — upstream
|
|
8
9
|
is a ~15-line pure-JS shim that delegates straight to `expo-crypto`'s own `getRandomValues`; this
|
|
9
10
|
port delegates to [`@symbiote-native/crypto`](../crypto)'s `getRandomValues` instead, since this
|
|
10
11
|
repo already ships that native random source as a sibling package. Like `@symbiote-native/crypto`,
|
|
11
12
|
every export here is a plain function/object with no per-instance state or event stream, so there
|
|
12
|
-
is no hook/composable/service to wrap — the React, Vue, and Angular entry points are
|
|
13
|
-
re-exports of the same `core`.
|
|
13
|
+
is no hook/composable/service to wrap — the React, Vue, Svelte, Solid, and Angular entry points are
|
|
14
|
+
plain re-exports of the same `core`.
|
|
14
15
|
|
|
15
16
|
## Install
|
|
16
17
|
|
|
@@ -34,8 +35,8 @@ src/core/ web-crypto.ts — the Crypto class + webCrypto singleton (default
|
|
|
34
35
|
src/angular/ @symbiote-native/standard-web-crypto/angular — export * from '../core'
|
|
35
36
|
```
|
|
36
37
|
|
|
37
|
-
`./react`, `./vue`, and `./
|
|
38
|
-
physical per-framework file, since there's nothing to subscribe to or clean up. (The `webCrypto`
|
|
38
|
+
`./react`, `./vue`, `./svelte`, and `./solid` are `exports`-map aliases straight onto `src/core/` —
|
|
39
|
+
no physical per-framework file, since there's nothing to subscribe to or clean up. (The `webCrypto`
|
|
39
40
|
named re-export used to live only in those three per-framework barrels; it now lives once in
|
|
40
41
|
`src/core/index.ts` instead.) `./angular` stays a physical file/subpath since Angular ships
|
|
41
42
|
through a separate `ngc`/AOT build (`build-ngc/`).
|
|
@@ -57,7 +58,7 @@ polyfillWebCrypto();
|
|
|
57
58
|
crypto.getRandomValues(bytes);
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
The React/Vue/Angular entry points re-export the identical surface:
|
|
61
|
+
The React/Vue/Svelte/Solid/Angular entry points re-export the identical surface:
|
|
61
62
|
|
|
62
63
|
```ts
|
|
63
64
|
import webCrypto, {
|
|
@@ -66,6 +67,12 @@ import webCrypto, {
|
|
|
66
67
|
import webCrypto, {
|
|
67
68
|
polyfillWebCrypto,
|
|
68
69
|
} from '@symbiote-native/standard-web-crypto/vue';
|
|
70
|
+
import webCrypto, {
|
|
71
|
+
polyfillWebCrypto,
|
|
72
|
+
} from '@symbiote-native/standard-web-crypto/svelte';
|
|
73
|
+
import webCrypto, {
|
|
74
|
+
polyfillWebCrypto,
|
|
75
|
+
} from '@symbiote-native/standard-web-crypto/solid';
|
|
69
76
|
import webCrypto, {
|
|
70
77
|
polyfillWebCrypto,
|
|
71
78
|
} from '@symbiote-native/standard-web-crypto/angular';
|
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/standard-web-crypto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "expo-standard-web-crypto ported for SymbioteNative — a Web Crypto API getRandomValues polyfill built on @symbiote-native/crypto's native random source.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react-native",
|
|
8
|
+
"symbiote-native",
|
|
9
|
+
"react",
|
|
10
|
+
"vue",
|
|
11
|
+
"svelte",
|
|
12
|
+
"solid",
|
|
13
|
+
"angular",
|
|
14
|
+
"web-crypto",
|
|
15
|
+
"polyfill",
|
|
16
|
+
"getrandomvalues"
|
|
17
|
+
],
|
|
6
18
|
"repository": {
|
|
7
19
|
"type": "git",
|
|
8
20
|
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
@@ -56,22 +68,22 @@
|
|
|
56
68
|
"access": "public"
|
|
57
69
|
},
|
|
58
70
|
"dependencies": {
|
|
59
|
-
"@symbiote-native/crypto": "0.
|
|
71
|
+
"@symbiote-native/crypto": "2.0.0"
|
|
60
72
|
},
|
|
61
73
|
"peerDependencies": {
|
|
62
|
-
"@symbiote-native/angular": ">=0.6.2",
|
|
63
|
-
"@symbiote-native/engine": ">=0.1.7",
|
|
64
|
-
"@symbiote-native/react": ">=0.2.8",
|
|
65
|
-
"@symbiote-native/solid": ">=0.0.1",
|
|
66
|
-
"@symbiote-native/svelte": ">=0.1.0",
|
|
67
|
-
"@symbiote-native/vue": ">=0.3.8",
|
|
68
74
|
"@angular/core": ">=20",
|
|
69
75
|
"@vue/runtime-core": "^3.5.13",
|
|
70
76
|
"react": ">=19.0.0",
|
|
71
77
|
"react-native": ">=0.86",
|
|
72
78
|
"solid-js": ">=1.9.0",
|
|
73
79
|
"svelte": ">=5.56.0",
|
|
74
|
-
"vue": ">=3.5.0"
|
|
80
|
+
"vue": ">=3.5.0",
|
|
81
|
+
"@symbiote-native/angular": "^2.0.0",
|
|
82
|
+
"@symbiote-native/engine": "^0.5.0",
|
|
83
|
+
"@symbiote-native/react": "^2.0.0",
|
|
84
|
+
"@symbiote-native/solid": "^2.0.0",
|
|
85
|
+
"@symbiote-native/svelte": "^2.0.0",
|
|
86
|
+
"@symbiote-native/vue": "^2.0.0"
|
|
75
87
|
},
|
|
76
88
|
"peerDependenciesMeta": {
|
|
77
89
|
"@symbiote-native/angular": {
|
|
@@ -119,13 +131,13 @@
|
|
|
119
131
|
"solid-js": "^1.9.14",
|
|
120
132
|
"svelte": "^5.56.0",
|
|
121
133
|
"typescript": "~6.0.0",
|
|
122
|
-
"@symbiote-native/angular": "0.
|
|
123
|
-
"@symbiote-native/engine": "0.
|
|
124
|
-
"@symbiote-native/react": "0.
|
|
125
|
-
"@symbiote-native/solid": "0.
|
|
126
|
-
"@symbiote-native/svelte": "0.
|
|
127
|
-
"@symbiote-native/test-utils": "0.
|
|
128
|
-
"@symbiote-native/vue": "0.
|
|
134
|
+
"@symbiote-native/angular": "2.0.0",
|
|
135
|
+
"@symbiote-native/engine": "0.5.0",
|
|
136
|
+
"@symbiote-native/react": "2.0.0",
|
|
137
|
+
"@symbiote-native/solid": "2.0.0",
|
|
138
|
+
"@symbiote-native/svelte": "2.0.0",
|
|
139
|
+
"@symbiote-native/test-utils": "0.3.0",
|
|
140
|
+
"@symbiote-native/vue": "2.0.0"
|
|
129
141
|
},
|
|
130
142
|
"scripts": {
|
|
131
143
|
"typecheck": "tsc --build",
|