@openzeppelin/ui-types 1.10.0 → 1.11.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 +14 -6
- package/dist/index.d.cts +435 -250
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +435 -250
- package/dist/index.d.mts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,17 +33,20 @@ The package is organized into namespaces for better organization and to prevent
|
|
|
33
33
|
|
|
34
34
|
```typescript
|
|
35
35
|
// Import everything
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
// Import specific types from their respective namespaces
|
|
37
|
+
import {
|
|
38
|
+
adapters,
|
|
39
|
+
ContractAdapter,
|
|
40
|
+
contracts,
|
|
41
|
+
FieldType,
|
|
42
|
+
FormFieldType,
|
|
43
|
+
forms,
|
|
44
|
+
} from '@openzeppelin/ui-types';
|
|
38
45
|
// Import specific namespaces
|
|
39
46
|
import * as contracts from '@openzeppelin/ui-types';
|
|
40
47
|
import * as adapters from '@openzeppelin/ui-types';
|
|
41
48
|
import * as forms from '@openzeppelin/ui-types';
|
|
42
49
|
|
|
43
|
-
// Import specific types from their respective namespaces
|
|
44
|
-
import { ContractAdapter } from '@openzeppelin/ui-types';
|
|
45
|
-
import { FieldType, FormFieldType } from '@openzeppelin/ui-types';
|
|
46
|
-
|
|
47
50
|
// Example usage in a function
|
|
48
51
|
function validateField(field: forms.FormFieldType): boolean {
|
|
49
52
|
// Implementation
|
|
@@ -108,6 +111,11 @@ Interfaces for blockchain-specific adapters:
|
|
|
108
111
|
### Common Types (`./src/common`)
|
|
109
112
|
|
|
110
113
|
- `NetworkEcosystem`: Enum or type defining supported blockchain ecosystems (e.g., 'evm', 'solana').
|
|
114
|
+
- `AddressLabelResolver`: Interface for synchronous address-to-label resolution. Consumed by `AddressLabelContext` in `@openzeppelin/ui-components`.
|
|
115
|
+
- `AddressSuggestion`: A single autocomplete suggestion (label, value, optional description).
|
|
116
|
+
- `AddressSuggestionResolver`: Interface for resolving address suggestions from a query string. Consumed by `AddressSuggestionContext` in `@openzeppelin/ui-components`.
|
|
117
|
+
- `AddressBookAlias`: Plain data shape for an alias record as consumed by the Address Book widget.
|
|
118
|
+
- `AddressBookWidgetProps`: Props contract shared between `AddressBookWidget` (ui-renderer) and `useAddressBookWidgetProps` (ui-storage).
|
|
111
119
|
|
|
112
120
|
### Contract Types (`./src/contracts`)
|
|
113
121
|
|