@cofhe/react 0.4.0 → 0.5.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 +12 -13
- package/dist/index.cjs +2832 -1815
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +173 -154
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +187 -62
- package/dist/index.d.ts +187 -62
- package/dist/index.js +2488 -1465
- package/dist/index.js.map +1 -1
- package/dist/styles.css +163 -144
- package/package.json +34 -36
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# @cofhe/react
|
|
2
2
|
|
|
3
|
-
React component and hook for the CoFHE SDK - featuring the advanced
|
|
3
|
+
React component and hook for the CoFHE SDK - featuring the advanced CofheEncryptInput component.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @cofhe/react @cofhe/sdk
|
|
8
|
+
npm install @cofhe/react @cofhe/sdk
|
|
9
9
|
# or
|
|
10
|
-
pnpm add @cofhe/react @cofhe/sdk
|
|
10
|
+
pnpm add @cofhe/react @cofhe/sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
@@ -30,14 +30,14 @@ function App() {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
### 2. Use the
|
|
33
|
+
### 2. Use the CofheEncryptInput component
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
|
-
import {
|
|
36
|
+
import { CofheEncryptInput, FheTypesList } from '@cofhe/react';
|
|
37
37
|
|
|
38
38
|
function MyComponent() {
|
|
39
39
|
return (
|
|
40
|
-
<
|
|
40
|
+
<CofheEncryptInput
|
|
41
41
|
placeholder="Enter value to encrypt..."
|
|
42
42
|
options={FheTypesList} // Pre-defined FHE types
|
|
43
43
|
showProgressBar={true}
|
|
@@ -75,7 +75,7 @@ function CustomComponent() {
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
##
|
|
78
|
+
## CofheEncryptInput Component
|
|
79
79
|
|
|
80
80
|
Advanced input component with integrated features:
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ Advanced input component with integrated features:
|
|
|
85
85
|
- ✅ **Real-time Input Validation** - Validates input against selected FHE type
|
|
86
86
|
- ✅ **Progress Tracking** - Shows encryption steps with progress bar
|
|
87
87
|
- ✅ **Copy to Clipboard** - Copy encrypted results with one click
|
|
88
|
-
- ✅ **
|
|
88
|
+
- ✅ **Bundled Iconography** - Consistent icons with no extra consumer install
|
|
89
89
|
- ✅ **Responsive Design** - Works on desktop and mobile
|
|
90
90
|
- ✅ **Dark Mode Support** - Automatic dark/light theme support
|
|
91
91
|
- ✅ **TypeScript Support** - Full type safety
|
|
@@ -93,7 +93,7 @@ Advanced input component with integrated features:
|
|
|
93
93
|
### Props
|
|
94
94
|
|
|
95
95
|
```tsx
|
|
96
|
-
interface
|
|
96
|
+
interface CofheEncryptInputProps {
|
|
97
97
|
placeholder?: string;
|
|
98
98
|
initialValue?: string;
|
|
99
99
|
options?: FheTypeOption[]; // Use FheTypesList or custom options
|
|
@@ -143,10 +143,9 @@ If you're using Tailwind CSS in your project, the component classes will work au
|
|
|
143
143
|
|
|
144
144
|
### Required Peer Dependencies
|
|
145
145
|
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
- `
|
|
149
|
-
- `react-dom` ^16.8.0 || ^17.0.0 || ^18.0.0
|
|
146
|
+
- `react` ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
|
147
|
+
- `react-dom` ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
|
148
|
+
- `viem` ^2.38.6
|
|
150
149
|
|
|
151
150
|
### CoFHE SDK Dependencies
|
|
152
151
|
|