@openzeppelin/adapter-stellar 1.0.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openzeppelin/adapter-stellar",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Stellar Adapter for UI Builder",
5
5
  "keywords": [
6
6
  "openzeppelin",
@@ -35,25 +35,32 @@
35
35
  "dependencies": {
36
36
  "@creit.tech/stellar-wallets-kit": "^1.8.0",
37
37
  "@openzeppelin/relayer-sdk": "1.9.0",
38
- "@openzeppelin/ui-components": "^1.4.0",
39
- "@openzeppelin/ui-types": "^1.11.1",
40
- "@openzeppelin/ui-utils": "^1.3.0",
41
38
  "@stellar/stellar-sdk": "^14.1.1",
42
39
  "@stellar/stellar-xdr-json": "^23.0.0",
43
40
  "@web3icons/react": "^4.0.19",
44
- "lodash": "^4.17.21",
41
+ "lodash-es": "^4.17.23",
45
42
  "lossless-json": "^4.0.2",
46
- "lucide-react": "^0.510.0",
47
- "react-hook-form": "^7.62.0"
43
+ "lucide-react": "^0.510.0"
48
44
  },
49
45
  "devDependencies": {
50
- "@types/lodash": "^4.17.20",
46
+ "@openzeppelin/ui-components": "^1.7.0",
47
+ "@openzeppelin/ui-types": "^1.12.0",
48
+ "@openzeppelin/ui-utils": "^1.4.0",
49
+ "@types/lodash-es": "^4.17.12",
51
50
  "eslint": "^9.32.0",
51
+ "react": "^19.0.0",
52
+ "react-dom": "^19.0.0",
53
+ "react-hook-form": "^7.62.0",
52
54
  "typescript": "^5.9.2",
53
55
  "vitest": "^3.2.4"
54
56
  },
55
57
  "peerDependencies": {
56
- "react": "^19.0.0"
58
+ "@openzeppelin/ui-components": "^1.7.0",
59
+ "@openzeppelin/ui-types": "^1.12.0",
60
+ "@openzeppelin/ui-utils": "^1.4.0",
61
+ "react": "^19.0.0",
62
+ "react-dom": "^19.0.0",
63
+ "react-hook-form": "^7.62.0"
57
64
  },
58
65
  "exports": {
59
66
  ".": {
package/src/index.ts CHANGED
@@ -1,10 +1,30 @@
1
+ import { VERSION as UI_COMPONENTS_V } from '@openzeppelin/ui-components';
2
+ import { VERSION as UI_TYPES_V } from '@openzeppelin/ui-types';
1
3
  import type { EcosystemExport, StellarNetworkConfig } from '@openzeppelin/ui-types';
4
+ import { VERSION as UI_UTILS_V, validatePeerVersions } from '@openzeppelin/ui-utils';
2
5
 
3
6
  import { StellarAdapter } from './adapter';
4
7
  import { stellarAdapterConfig } from './config';
5
8
  import { ecosystemMetadata } from './metadata';
6
9
  import { stellarNetworks } from './networks';
7
10
 
11
+ declare const __OZ_PEER_MINIMUMS__: Record<string, string>;
12
+
13
+ validatePeerVersions('@openzeppelin/adapter-stellar', {
14
+ '@openzeppelin/ui-components': {
15
+ installed: UI_COMPONENTS_V,
16
+ minimum: __OZ_PEER_MINIMUMS__['@openzeppelin/ui-components'],
17
+ },
18
+ '@openzeppelin/ui-types': {
19
+ installed: UI_TYPES_V,
20
+ minimum: __OZ_PEER_MINIMUMS__['@openzeppelin/ui-types'],
21
+ },
22
+ '@openzeppelin/ui-utils': {
23
+ installed: UI_UTILS_V,
24
+ minimum: __OZ_PEER_MINIMUMS__['@openzeppelin/ui-utils'],
25
+ },
26
+ });
27
+
8
28
  export { ecosystemMetadata } from './metadata';
9
29
  export { StellarAdapter } from './adapter';
10
30
 
@@ -1,5 +1,5 @@
1
1
  import { xdr } from '@stellar/stellar-sdk';
2
- import { startCase } from 'lodash';
2
+ import startCase from 'lodash-es/startCase.js';
3
3
 
4
4
  import type {
5
5
  ContractSchema,
@@ -1,9 +1,9 @@
1
1
  import { LogOut } from 'lucide-react';
2
2
  import React from 'react';
3
3
 
4
- import { Button } from '@openzeppelin/ui-components';
4
+ import { AddressDisplay, Button } from '@openzeppelin/ui-components';
5
5
  import type { BaseComponentProps } from '@openzeppelin/ui-types';
6
- import { cn, getWalletAccountDisplaySizeProps, truncateMiddle } from '@openzeppelin/ui-utils';
6
+ import { cn, getWalletAccountDisplaySizeProps } from '@openzeppelin/ui-utils';
7
7
 
8
8
  import { useStellarAccount, useStellarDisconnect } from '../../hooks';
9
9
 
@@ -28,10 +28,17 @@ export const CustomAccountDisplay: React.FC<BaseComponentProps> = ({
28
28
 
29
29
  return (
30
30
  <div className={cn('flex items-center gap-2', fullWidth && 'w-full', className)}>
31
- <div className={cn('flex flex-col', fullWidth && 'flex-1')}>
32
- <span className={cn(sizeProps.textSize, 'font-medium')}>
33
- {truncateMiddle(address, 4, 4)}
34
- </span>
31
+ <div className={cn('group flex flex-col', fullWidth && 'flex-1')}>
32
+ <AddressDisplay
33
+ address={address}
34
+ variant="inline"
35
+ startChars={4}
36
+ endChars={4}
37
+ showTooltip
38
+ showCopyButton
39
+ showCopyButtonOnHover
40
+ className={cn(sizeProps.textSize, 'font-sans font-medium')}
41
+ />
35
42
  <span className={cn(sizeProps.subTextSize, 'text-muted-foreground -mt-0.5')}>
36
43
  Stellar Account
37
44
  </span>