@mantle-rwa/react 0.1.0 → 0.1.1

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/LICENSE ADDED
File without changes
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
1
  {
2
- "name": "@mantle-rwa/react",
3
- "version": "0.1.0",
4
- "description": "React components for RWA tokenization on Mantle Network",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "./dist/cjs/index.js",
8
- "module": "./dist/esm/index.js",
9
- "types": "./dist/types/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": "./dist/esm/index.js",
13
- "require": "./dist/cjs/index.js",
14
- "types": "./dist/types/index.d.ts"
15
- },
16
- "./styles.css": "./dist/styles.css"
2
+ "name": "@mantle-rwa/react",
3
+ "version": "0.1.1",
4
+ "description": "React components for RWA tokenization on Mantle Network",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/cjs/index.js",
8
+ "module": "./dist/esm/index.js",
9
+ "types": "./dist/types/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/esm/index.js",
13
+ "require": "./dist/cjs/index.js",
14
+ "types": "./dist/types/index.d.ts"
17
15
  },
18
- "files": [
19
- "dist",
20
- "src"
21
- ],
22
- "scripts": {
23
- "build": "npm run build:esm && npm run build:cjs && npm run build:types && npm run build:css",
24
- "build:esm": "tsc -p tsconfig.esm.json",
25
- "build:cjs": "tsc -p tsconfig.cjs.json",
26
- "build:types": "tsc -p tsconfig.types.json",
27
- "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/styles.css --minify",
28
- "test": "vitest run",
29
- "test:watch": "vitest",
30
- "lint": "eslint src --ext .ts,.tsx",
31
- "clean": "rm -rf dist coverage",
32
- "typecheck": "tsc --noEmit"
33
- },
34
- "dependencies": {
35
- "@mantle-rwa/sdk": "^0.1.0"
36
- },
37
- "devDependencies": {
38
- "@testing-library/jest-dom": "^6.2.0",
39
- "@testing-library/react": "^14.1.2",
40
- "@types/react": "^18.2.48",
41
- "@types/react-dom": "^18.2.18",
42
- "@typescript-eslint/eslint-plugin": "^6.19.0",
43
- "@typescript-eslint/parser": "^6.19.0",
44
- "@vitejs/plugin-react": "^4.2.1",
45
- "@vitest/coverage-v8": "^1.2.0",
46
- "autoprefixer": "^10.4.17",
47
- "eslint": "^8.56.0",
48
- "eslint-plugin-react": "^7.33.2",
49
- "eslint-plugin-react-hooks": "^4.6.0",
50
- "fast-check": "^3.15.0",
51
- "jsdom": "^24.0.0",
52
- "postcss": "^8.4.33",
53
- "tailwindcss": "^3.4.1",
54
- "typescript": "^5.3.3",
55
- "vitest": "^1.2.0"
56
- },
57
- "peerDependencies": {
58
- "react": "^18.0.0",
59
- "react-dom": "^18.0.0",
60
- "wagmi": "^2.0.0",
61
- "viem": "^2.0.0"
62
- },
63
- "engines": {
64
- "node": ">=18.0.0"
65
- }
16
+ "./styles.css": "./dist/styles.css"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "src"
21
+ ],
22
+ "dependencies": {
23
+ "@mantle-rwa/sdk": "^0.1.0"
24
+ },
25
+ "devDependencies": {
26
+ "@testing-library/jest-dom": "^6.2.0",
27
+ "@testing-library/react": "^14.1.2",
28
+ "@types/react": "^18.2.48",
29
+ "@types/react-dom": "^18.2.18",
30
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
31
+ "@typescript-eslint/parser": "^6.19.0",
32
+ "@vitejs/plugin-react": "^4.2.1",
33
+ "@vitest/coverage-v8": "^1.2.0",
34
+ "autoprefixer": "^10.4.17",
35
+ "eslint": "^8.56.0",
36
+ "eslint-plugin-react": "^7.33.2",
37
+ "eslint-plugin-react-hooks": "^4.6.0",
38
+ "fast-check": "^3.15.0",
39
+ "jsdom": "^24.0.0",
40
+ "postcss": "^8.4.33",
41
+ "tailwindcss": "^3.4.1",
42
+ "typescript": "^5.3.3",
43
+ "vitest": "^1.2.0"
44
+ },
45
+ "peerDependencies": {
46
+ "react": "^18.0.0",
47
+ "react-dom": "^18.0.0",
48
+ "wagmi": "^2.0.0",
49
+ "viem": "^2.0.0"
50
+ },
51
+ "engines": {
52
+ "node": ">=18.0.0"
53
+ },
54
+ "scripts": {
55
+ "build": "npm run build:esm && npm run build:cjs && npm run build:types && npm run build:css",
56
+ "build:esm": "tsc -p tsconfig.esm.json",
57
+ "build:cjs": "tsc -p tsconfig.cjs.json",
58
+ "build:types": "tsc -p tsconfig.types.json",
59
+ "build:css": "tailwindcss -i ./src/styles/index.css -o ./dist/styles.css --minify",
60
+ "test": "vitest run",
61
+ "test:watch": "vitest",
62
+ "lint": "eslint src --ext .ts,.tsx",
63
+ "clean": "rm -rf dist coverage",
64
+ "typecheck": "tsc --noEmit"
65
+ }
66
66
  }
package/src/index.ts CHANGED
@@ -13,20 +13,4 @@ export { YieldCalculator } from './components/YieldCalculator';
13
13
  export { useRWA } from './hooks/useRWA';
14
14
 
15
15
  // Types
16
- export type {
17
- Theme,
18
- KYCProviderType,
19
- KYCRequiredField,
20
- KYCResult,
21
- KYCFlowProps,
22
- KYCFlowStyles,
23
- InvestorDashboardProps,
24
- YieldHistoryEntry,
25
- TokenMintFormProps,
26
- BatchMintEntry,
27
- YieldCalculatorProps,
28
- PaymentToken,
29
- DistributionConfig,
30
- DistributionPreviewEntry,
31
- UseRWAReturn,
32
- } from './types';
16
+ export type * from './types';
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  .rwa-button {
11
- @apply inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed;
11
+ @apply inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
12
12
  }
13
13
 
14
14
  .rwa-button-primary {
@@ -25,173 +25,4 @@
25
25
 
26
26
  .rwa-label {
27
27
  @apply block text-sm font-medium text-gray-700 dark:text-gray-200;
28
- }
29
-
30
- /* KYCFlow Component Styles */
31
- .rwa-kyc-flow {
32
- @apply rounded-lg border border-gray-200 bg-white p-6 shadow-sm;
33
- }
34
-
35
- .rwa-kyc-flow.dark {
36
- @apply border-gray-700 bg-gray-800;
37
- }
38
-
39
- .rwa-kyc-header {
40
- @apply text-lg font-semibold text-gray-900 mb-4;
41
- }
42
-
43
- .rwa-kyc-flow.dark .rwa-kyc-header {
44
- @apply text-white;
45
- }
46
-
47
- .rwa-kyc-error {
48
- @apply flex items-center gap-2 mb-4 p-3 bg-red-50 text-red-700 rounded-md border border-red-200;
49
- }
50
-
51
- .rwa-kyc-flow.dark .rwa-kyc-error {
52
- @apply bg-red-900/20 text-red-300 border-red-800;
53
- }
54
-
55
- .rwa-kyc-error-icon {
56
- @apply flex-shrink-0;
57
- }
58
-
59
- .rwa-kyc-provider {
60
- @apply flex items-center gap-3 mb-6 p-3 bg-gray-50 rounded-md;
61
- }
62
-
63
- .rwa-kyc-flow.dark .rwa-kyc-provider {
64
- @apply bg-gray-700/50;
65
- }
66
-
67
- .rwa-kyc-provider-logo {
68
- @apply text-2xl;
69
- }
70
-
71
- .rwa-kyc-provider-details {
72
- @apply flex flex-col;
73
- }
74
-
75
- .rwa-kyc-provider-name {
76
- @apply font-medium text-gray-900;
77
- }
78
-
79
- .rwa-kyc-flow.dark .rwa-kyc-provider-name {
80
- @apply text-white;
81
- }
82
-
83
- .rwa-kyc-provider-description {
84
- @apply text-sm text-gray-500;
85
- }
86
-
87
- .rwa-kyc-flow.dark .rwa-kyc-provider-description {
88
- @apply text-gray-400;
89
- }
90
-
91
- .rwa-kyc-steps {
92
- @apply space-y-3 mb-6;
93
- }
94
-
95
- .rwa-kyc-step {
96
- @apply flex items-start gap-3 p-3 rounded-md transition-colors;
97
- }
98
-
99
- .rwa-kyc-step.pending {
100
- @apply bg-gray-50;
101
- }
102
-
103
- .rwa-kyc-flow.dark .rwa-kyc-step.pending {
104
- @apply bg-gray-700/30;
105
- }
106
-
107
- .rwa-kyc-step.in_progress {
108
- @apply bg-blue-50 border border-blue-200;
109
- }
110
-
111
- .rwa-kyc-flow.dark .rwa-kyc-step.in_progress {
112
- @apply bg-blue-900/20 border-blue-800;
113
- }
114
-
115
- .rwa-kyc-step.completed {
116
- @apply bg-green-50;
117
- }
118
-
119
- .rwa-kyc-flow.dark .rwa-kyc-step.completed {
120
- @apply bg-green-900/20;
121
- }
122
-
123
- .rwa-kyc-step.failed {
124
- @apply bg-red-50;
125
- }
126
-
127
- .rwa-kyc-flow.dark .rwa-kyc-step.failed {
128
- @apply bg-red-900/20;
129
- }
130
-
131
- .rwa-kyc-step-indicator {
132
- @apply flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium;
133
- }
134
-
135
- .rwa-kyc-step.pending .rwa-kyc-step-indicator {
136
- @apply bg-gray-200 text-gray-600;
137
- }
138
-
139
- .rwa-kyc-flow.dark .rwa-kyc-step.pending .rwa-kyc-step-indicator {
140
- @apply bg-gray-600 text-gray-300;
141
- }
142
-
143
- .rwa-kyc-step.in_progress .rwa-kyc-step-indicator {
144
- @apply bg-blue-500 text-white;
145
- }
146
-
147
- .rwa-kyc-step.completed .rwa-kyc-step-indicator {
148
- @apply bg-green-500 text-white;
149
- }
150
-
151
- .rwa-kyc-step.failed .rwa-kyc-step-indicator {
152
- @apply bg-red-500 text-white;
153
- }
154
-
155
- .rwa-kyc-step-content {
156
- @apply flex flex-col;
157
- }
158
-
159
- .rwa-kyc-step-label {
160
- @apply font-medium text-gray-900;
161
- }
162
-
163
- .rwa-kyc-flow.dark .rwa-kyc-step-label {
164
- @apply text-white;
165
- }
166
-
167
- .rwa-kyc-step-description {
168
- @apply text-sm text-gray-500 mt-0.5;
169
- }
170
-
171
- .rwa-kyc-flow.dark .rwa-kyc-step-description {
172
- @apply text-gray-400;
173
- }
174
-
175
- .rwa-kyc-actions {
176
- @apply mt-6;
177
- }
178
-
179
- .rwa-kyc-actions button {
180
- @apply w-full;
181
- }
182
-
183
- .rwa-kyc-success {
184
- @apply flex items-center justify-center gap-2 p-3 bg-green-50 text-green-700 rounded-md font-medium;
185
- }
186
-
187
- .rwa-kyc-flow.dark .rwa-kyc-success {
188
- @apply bg-green-900/20 text-green-300;
189
- }
190
-
191
- .rwa-kyc-success-icon {
192
- @apply text-lg;
193
- }
194
-
195
- .rwa-kyc-session {
196
- @apply mt-4 text-center;
197
28
  }