@reclack/walletkit 0.2.0 → 0.2.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/dist/element/index.d.ts +2 -1
- package/dist/element/props.d.ts +36 -0
- package/dist/element.js +437 -420
- package/package.json +1 -1
package/dist/element/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { ReclackConnectAttributes, ReclackConnectProps, } from './attributes.js';
|
|
2
2
|
export { ATTRIBUTES, attributesOf, EVENTS } from './props.js';
|
|
3
|
-
export
|
|
3
|
+
export { NETWORK_ATTRIBUTES, NETWORK_EVENTS, networkAttributesOf, } from './props.js';
|
|
4
|
+
export type { ConnectProps, NetworkProps } from './props.js';
|
|
4
5
|
export { connectWallet, defineWalletElement, ReclackConnectElement, type ConnectWalletOptions, } from './element.js';
|
|
5
6
|
export { defineNetworkElement, ReclackNetworkElement, } from './network-element.js';
|
package/dist/element/props.d.ts
CHANGED
|
@@ -65,3 +65,39 @@ export declare const EVENTS: {
|
|
|
65
65
|
readonly cancel: "onCancel";
|
|
66
66
|
readonly 'connect-error': "onError";
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* The chain picker's props, and how each becomes an attribute.
|
|
70
|
+
*
|
|
71
|
+
* Shared for the same reason the picker's are: two wrappers writing their own
|
|
72
|
+
* mapping is two mappings to keep in step with the element.
|
|
73
|
+
*/
|
|
74
|
+
export interface NetworkProps {
|
|
75
|
+
/** The chains to choose between, in the order they are offered. */
|
|
76
|
+
networks?: string[] | string;
|
|
77
|
+
/** The chain chosen. The first is used when this names none of them. */
|
|
78
|
+
value?: string;
|
|
79
|
+
/** Empty renders no label at all. */
|
|
80
|
+
label?: string;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
themeMode?: 'light' | 'dark' | 'system';
|
|
83
|
+
brand?: string;
|
|
84
|
+
radius?: string;
|
|
85
|
+
fontFamily?: string;
|
|
86
|
+
assetBase?: string;
|
|
87
|
+
onChange?: (network: string) => void;
|
|
88
|
+
}
|
|
89
|
+
/** The network props that are plain attributes, and their DOM names. */
|
|
90
|
+
export declare const NETWORK_ATTRIBUTES: {
|
|
91
|
+
readonly value: "value";
|
|
92
|
+
readonly label: "label";
|
|
93
|
+
readonly themeMode: "theme-mode";
|
|
94
|
+
readonly brand: "brand";
|
|
95
|
+
readonly radius: "radius";
|
|
96
|
+
readonly fontFamily: "font";
|
|
97
|
+
readonly assetBase: "asset-base";
|
|
98
|
+
};
|
|
99
|
+
export declare function networkAttributesOf(props: NetworkProps): Record<string, string>;
|
|
100
|
+
/** The one event the chain picker dispatches. */
|
|
101
|
+
export declare const NETWORK_EVENTS: {
|
|
102
|
+
readonly change: "onChange";
|
|
103
|
+
};
|