@pezkuwi/ui-settings 3.16.6

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.
Files changed (121) hide show
  1. package/README.md +40 -0
  2. package/build/LICENSE +201 -0
  3. package/build/README.md +40 -0
  4. package/build/Settings.d.ts +40 -0
  5. package/build/Settings.js +172 -0
  6. package/build/bundle-pezkuwi-ui-settings.js +1364 -0
  7. package/build/bundle.d.ts +5 -0
  8. package/build/bundle.js +5 -0
  9. package/build/cjs/Settings.d.ts +40 -0
  10. package/build/cjs/Settings.js +177 -0
  11. package/build/cjs/bundle.d.ts +5 -0
  12. package/build/cjs/bundle.js +19 -0
  13. package/build/cjs/defaults/chains.d.ts +3 -0
  14. package/build/cjs/defaults/chains.js +8 -0
  15. package/build/cjs/defaults/crypto.d.ts +4 -0
  16. package/build/cjs/defaults/crypto.js +35 -0
  17. package/build/cjs/defaults/endpoints.d.ts +3 -0
  18. package/build/cjs/defaults/endpoints.js +11 -0
  19. package/build/cjs/defaults/index.d.ts +15 -0
  20. package/build/cjs/defaults/index.js +80 -0
  21. package/build/cjs/defaults/ledger.d.ts +5 -0
  22. package/build/cjs/defaults/ledger.js +45 -0
  23. package/build/cjs/defaults/ss58.d.ts +3 -0
  24. package/build/cjs/defaults/ss58.js +16 -0
  25. package/build/cjs/defaults/type.d.ts +1 -0
  26. package/build/cjs/defaults/type.js +4 -0
  27. package/build/cjs/defaults/ui.d.ts +10 -0
  28. package/build/cjs/defaults/ui.js +62 -0
  29. package/build/cjs/index.d.ts +3 -0
  30. package/build/cjs/index.js +6 -0
  31. package/build/cjs/package.json +3 -0
  32. package/build/cjs/packageDetect.d.ts +1 -0
  33. package/build/cjs/packageDetect.js +5 -0
  34. package/build/cjs/packageInfo.d.ts +6 -0
  35. package/build/cjs/packageInfo.js +4 -0
  36. package/build/cjs/types.d.ts +35 -0
  37. package/build/cjs/types.js +2 -0
  38. package/build/defaults/chains.d.ts +3 -0
  39. package/build/defaults/chains.js +5 -0
  40. package/build/defaults/crypto.d.ts +4 -0
  41. package/build/defaults/crypto.js +32 -0
  42. package/build/defaults/endpoints.d.ts +3 -0
  43. package/build/defaults/endpoints.js +8 -0
  44. package/build/defaults/index.d.ts +15 -0
  45. package/build/defaults/index.js +58 -0
  46. package/build/defaults/ledger.d.ts +5 -0
  47. package/build/defaults/ledger.js +42 -0
  48. package/build/defaults/ss58.d.ts +3 -0
  49. package/build/defaults/ss58.js +13 -0
  50. package/build/defaults/type.d.ts +1 -0
  51. package/build/defaults/type.js +1 -0
  52. package/build/defaults/ui.d.ts +10 -0
  53. package/build/defaults/ui.js +59 -0
  54. package/build/index.d.ts +3 -0
  55. package/build/index.js +3 -0
  56. package/build/package.json +254 -0
  57. package/build/packageDetect.d.ts +1 -0
  58. package/build/packageDetect.js +3 -0
  59. package/build/packageInfo.d.ts +6 -0
  60. package/build/packageInfo.js +1 -0
  61. package/build/types.d.ts +35 -0
  62. package/build/types.js +1 -0
  63. package/build-tsc/Settings.d.ts +40 -0
  64. package/build-tsc/bundle.d.ts +5 -0
  65. package/build-tsc/defaults/chains.d.ts +3 -0
  66. package/build-tsc/defaults/crypto.d.ts +4 -0
  67. package/build-tsc/defaults/endpoints.d.ts +3 -0
  68. package/build-tsc/defaults/index.d.ts +15 -0
  69. package/build-tsc/defaults/ledger.d.ts +5 -0
  70. package/build-tsc/defaults/ss58.d.ts +3 -0
  71. package/build-tsc/defaults/type.d.ts +1 -0
  72. package/build-tsc/defaults/ui.d.ts +10 -0
  73. package/build-tsc/index.d.ts +3 -0
  74. package/build-tsc/packageDetect.d.ts +1 -0
  75. package/build-tsc/packageInfo.d.ts +6 -0
  76. package/build-tsc/types.d.ts +35 -0
  77. package/build-tsc-cjs/Settings.js +177 -0
  78. package/build-tsc-cjs/bundle.js +19 -0
  79. package/build-tsc-cjs/defaults/chains.js +8 -0
  80. package/build-tsc-cjs/defaults/crypto.js +35 -0
  81. package/build-tsc-cjs/defaults/endpoints.js +11 -0
  82. package/build-tsc-cjs/defaults/index.js +80 -0
  83. package/build-tsc-cjs/defaults/ledger.js +45 -0
  84. package/build-tsc-cjs/defaults/ss58.js +16 -0
  85. package/build-tsc-cjs/defaults/type.js +4 -0
  86. package/build-tsc-cjs/defaults/ui.js +62 -0
  87. package/build-tsc-cjs/index.js +6 -0
  88. package/build-tsc-cjs/packageDetect.js +5 -0
  89. package/build-tsc-cjs/packageInfo.js +4 -0
  90. package/build-tsc-cjs/types.js +2 -0
  91. package/build-tsc-esm/Settings.js +172 -0
  92. package/build-tsc-esm/bundle.js +5 -0
  93. package/build-tsc-esm/defaults/chains.js +5 -0
  94. package/build-tsc-esm/defaults/crypto.js +32 -0
  95. package/build-tsc-esm/defaults/endpoints.js +8 -0
  96. package/build-tsc-esm/defaults/index.js +58 -0
  97. package/build-tsc-esm/defaults/ledger.js +42 -0
  98. package/build-tsc-esm/defaults/ss58.js +13 -0
  99. package/build-tsc-esm/defaults/type.js +1 -0
  100. package/build-tsc-esm/defaults/ui.js +59 -0
  101. package/build-tsc-esm/index.js +3 -0
  102. package/build-tsc-esm/packageDetect.js +3 -0
  103. package/build-tsc-esm/packageInfo.js +1 -0
  104. package/build-tsc-esm/types.js +1 -0
  105. package/package.json +37 -0
  106. package/src/Settings.ts +236 -0
  107. package/src/bundle.ts +10 -0
  108. package/src/defaults/chains.ts +11 -0
  109. package/src/defaults/crypto.ts +39 -0
  110. package/src/defaults/endpoints.ts +14 -0
  111. package/src/defaults/index.ts +72 -0
  112. package/src/defaults/ledger.ts +50 -0
  113. package/src/defaults/ss58.ts +22 -0
  114. package/src/defaults/type.ts +5 -0
  115. package/src/defaults/ui.ts +73 -0
  116. package/src/index.ts +8 -0
  117. package/src/packageDetect.ts +11 -0
  118. package/src/packageInfo.ts +6 -0
  119. package/src/types.ts +42 -0
  120. package/tsconfig.build.json +9 -0
  121. package/tsconfig.build.tsbuildinfo +1 -0
@@ -0,0 +1,35 @@
1
+ export interface Option {
2
+ disabled?: boolean;
3
+ info: string;
4
+ text: string;
5
+ value: string | number;
6
+ }
7
+ export interface SettingsStruct {
8
+ apiType: Endpoint;
9
+ apiUrl: string;
10
+ camera: string;
11
+ i18nLang: string;
12
+ icon: string;
13
+ ledgerApp: string;
14
+ ledgerConn: string;
15
+ locking: string;
16
+ metadataUp: string;
17
+ notification: string;
18
+ prefix: number;
19
+ storage: string;
20
+ uiMode: string;
21
+ uiTheme: string;
22
+ }
23
+ export interface NetworkSpecsStruct {
24
+ color: string;
25
+ decimals: number;
26
+ genesisHash: string;
27
+ prefix: number;
28
+ title: string;
29
+ unit: string;
30
+ }
31
+ export interface Endpoint {
32
+ type: EndpointType;
33
+ param: string;
34
+ }
35
+ export type EndpointType = 'json-rpc' | 'substrate-connect';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ type ChainDef = string[];
2
+ export declare const chains: Record<string, ChainDef>;
3
+ export {};
@@ -0,0 +1,5 @@
1
+ import { selectableNetworks } from '@pezkuwi/networks';
2
+ import { objectSpread } from '@pezkuwi/util';
3
+ export const chains = /*#__PURE__*/ selectableNetworks
4
+ .filter((n) => n.genesisHash.length)
5
+ .reduce((chains, { genesisHash, network }) => objectSpread(chains, { [network]: genesisHash }), {});
@@ -0,0 +1,4 @@
1
+ import type { Option } from '../types.js';
2
+ export declare const CRYPTOS: Option[];
3
+ export declare const CRYPTOS_ETH: Option[];
4
+ export declare const CRYPTOS_LEDGER: Option[];
@@ -0,0 +1,32 @@
1
+ export const CRYPTOS = [
2
+ {
3
+ info: 'sr25519',
4
+ text: 'Schnorrkel (sr25519, recommended)',
5
+ value: 'sr25519'
6
+ },
7
+ {
8
+ info: 'ed25519',
9
+ text: 'Edwards (ed25519, alternative)',
10
+ value: 'ed25519'
11
+ },
12
+ {
13
+ info: 'ecdsa',
14
+ text: 'ECDSA (Non BTC/ETH compatible)',
15
+ value: 'ecdsa'
16
+ }
17
+ ];
18
+ export const CRYPTOS_ETH = [
19
+ {
20
+ info: 'ethereum',
21
+ text: 'ECDSA (ETH compatible)',
22
+ value: 'ethereum'
23
+ }
24
+ ];
25
+ export const CRYPTOS_LEDGER = [
26
+ ...CRYPTOS,
27
+ {
28
+ info: 'ed25519-ledger',
29
+ text: 'Ledger (ed25519, BIP32 derivation)',
30
+ value: 'ed25519-ledger'
31
+ }
32
+ ];
@@ -0,0 +1,3 @@
1
+ import type { Option } from '../types.js';
2
+ export declare const ENDPOINTS: Option[];
3
+ export declare const ENDPOINT_DEFAULT: Option;
@@ -0,0 +1,8 @@
1
+ export const ENDPOINTS = [
2
+ {
3
+ info: 'local',
4
+ text: 'Local Node (Own, 127.0.0.1:9944)',
5
+ value: 'ws://127.0.0.1:9944/'
6
+ }
7
+ ];
8
+ export const ENDPOINT_DEFAULT = ENDPOINTS[0];
@@ -0,0 +1,15 @@
1
+ import type { Option } from '../types.js';
2
+ export { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto.js';
3
+ export { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints.js';
4
+ export { LEDGER_APP, LEDGER_APP_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger.js';
5
+ export { PREFIX_DEFAULT, PREFIXES } from './ss58.js';
6
+ export { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui.js';
7
+ export declare const CAMERA_DEFAULT = "off";
8
+ export declare const CAMERA: Option[];
9
+ export declare const LANGUAGE_DEFAULT = "default";
10
+ export declare const LOCKING_DEFAULT = "session";
11
+ export declare const LOCKING: Option[];
12
+ export declare const METADATA_UP_DEFAULT = "off";
13
+ export declare const METADATA_UP: Option[];
14
+ export declare const STORAGE_DEFAULT = "off";
15
+ export declare const STORAGE: Option[];
@@ -0,0 +1,58 @@
1
+ export { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto.js';
2
+ export { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints.js';
3
+ export { LEDGER_APP, LEDGER_APP_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger.js';
4
+ export { PREFIX_DEFAULT, PREFIXES } from './ss58.js';
5
+ export { ICON_DEFAULT, ICON_DEFAULT_HOST, ICONS, NOTIFICATION_DEFAULT, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './ui.js';
6
+ export const CAMERA_DEFAULT = 'off';
7
+ export const CAMERA = [
8
+ {
9
+ info: 'on',
10
+ text: 'Allow camera access',
11
+ value: 'on'
12
+ },
13
+ {
14
+ info: 'off',
15
+ text: 'Do not allow camera access',
16
+ value: 'off'
17
+ }
18
+ ];
19
+ export const LANGUAGE_DEFAULT = 'default';
20
+ export const LOCKING_DEFAULT = 'session';
21
+ export const LOCKING = [
22
+ {
23
+ info: 'session',
24
+ text: 'Once per session',
25
+ value: 'session'
26
+ },
27
+ {
28
+ info: 'tx',
29
+ text: 'On each transaction',
30
+ value: 'tx'
31
+ }
32
+ ];
33
+ export const METADATA_UP_DEFAULT = 'off';
34
+ export const METADATA_UP = [
35
+ {
36
+ info: 'off',
37
+ text: 'Do not auto-update extension metadata',
38
+ value: 'off'
39
+ },
40
+ {
41
+ info: 'on',
42
+ text: 'Auto-update extension metadata',
43
+ value: 'on'
44
+ }
45
+ ];
46
+ export const STORAGE_DEFAULT = 'off';
47
+ export const STORAGE = [
48
+ {
49
+ info: 'on',
50
+ text: 'Allow local in-browser account storage',
51
+ value: 'on'
52
+ },
53
+ {
54
+ info: 'off',
55
+ text: 'Do not allow local in-browser account storage',
56
+ value: 'off'
57
+ }
58
+ ];
@@ -0,0 +1,5 @@
1
+ import type { Option } from '../types.js';
2
+ export declare const LEDGER_CONN_DEFAULT = "none";
3
+ export declare const LEDGER_CONN: Option[];
4
+ export declare const LEDGER_APP_DEFAULT = "generic";
5
+ export declare const LEDGER_APP: Option[];
@@ -0,0 +1,42 @@
1
+ export const LEDGER_CONN_DEFAULT = 'none';
2
+ export const LEDGER_CONN = [
3
+ {
4
+ info: 'none',
5
+ text: 'Do not attach Ledger devices',
6
+ value: 'none'
7
+ },
8
+ // Deprecated
9
+ // {
10
+ // info: 'u2f',
11
+ // text: 'Attach Ledger via U2F',
12
+ // value: 'u2f'
13
+ // },
14
+ {
15
+ info: 'webusb',
16
+ text: 'Attach Ledger via WebUSB (Chrome, recommended)',
17
+ value: 'webusb'
18
+ },
19
+ {
20
+ info: 'hid',
21
+ text: 'Attach Ledger via WebHID (Chrome, experimental)',
22
+ value: 'hid'
23
+ }
24
+ ];
25
+ export const LEDGER_APP_DEFAULT = 'generic';
26
+ export const LEDGER_APP = [
27
+ {
28
+ info: 'generic',
29
+ text: 'Use the Ledger Polkadot Generic App',
30
+ value: 'generic'
31
+ },
32
+ {
33
+ info: 'migration',
34
+ text: 'Use the Ledger Migration App',
35
+ value: 'migration'
36
+ },
37
+ {
38
+ info: 'chainSpecific',
39
+ text: 'Use the Chain Specific Ledger App',
40
+ value: 'chainSpecific'
41
+ }
42
+ ];
@@ -0,0 +1,3 @@
1
+ import type { Option } from '../types.js';
2
+ export declare const PREFIX_DEFAULT = -1;
3
+ export declare const PREFIXES: Option[];
@@ -0,0 +1,13 @@
1
+ import { availableNetworks } from '@pezkuwi/networks';
2
+ export const PREFIX_DEFAULT = -1;
3
+ const defaultNetwork = {
4
+ info: 'default',
5
+ text: 'Default for the connected node',
6
+ value: -1
7
+ };
8
+ const networks = availableNetworks.map(({ displayName, network, prefix }) => ({
9
+ info: network,
10
+ text: displayName,
11
+ value: prefix
12
+ }));
13
+ export const PREFIXES = [defaultNetwork, ...networks];
@@ -0,0 +1 @@
1
+ export declare const isPolkadot: boolean;
@@ -0,0 +1 @@
1
+ export const isPolkadot = typeof window !== 'undefined' && window.location.host.includes('polkadot');
@@ -0,0 +1,10 @@
1
+ import type { Option } from '../types.js';
2
+ export declare const LANGUAGE_DEFAULT = "default";
3
+ export declare const UIMODE_DEFAULT: string;
4
+ export declare const UIMODES: Option[];
5
+ export declare const UITHEME_DEFAULT: string;
6
+ export declare const UITHEMES: Option[];
7
+ export declare const ICON_DEFAULT = "default";
8
+ export declare const ICON_DEFAULT_HOST: string;
9
+ export declare const ICONS: Option[];
10
+ export declare const NOTIFICATION_DEFAULT = "popup";
@@ -0,0 +1,59 @@
1
+ import { isPolkadot } from './type.js';
2
+ export const LANGUAGE_DEFAULT = 'default';
3
+ export const UIMODE_DEFAULT = !isPolkadot && typeof window !== 'undefined' && window.location.host.includes('ui-light')
4
+ ? 'light'
5
+ : 'full';
6
+ export const UIMODES = [
7
+ {
8
+ info: 'full',
9
+ text: 'Fully featured',
10
+ value: 'full'
11
+ },
12
+ {
13
+ info: 'light',
14
+ text: 'Basic features only',
15
+ value: 'light'
16
+ }
17
+ ];
18
+ export const UITHEME_DEFAULT = isPolkadot
19
+ ? 'polkadot'
20
+ : 'substrate';
21
+ export const UITHEMES = [
22
+ {
23
+ info: 'polkadot',
24
+ text: 'Polkadot',
25
+ value: 'polkadot'
26
+ },
27
+ {
28
+ info: 'substrate',
29
+ text: 'Substrate',
30
+ value: 'substrate'
31
+ }
32
+ ];
33
+ export const ICON_DEFAULT = 'default';
34
+ export const ICON_DEFAULT_HOST = isPolkadot
35
+ ? 'polkadot'
36
+ : 'substrate';
37
+ export const ICONS = [
38
+ {
39
+ info: 'default',
40
+ text: 'Default for the connected node',
41
+ value: 'default'
42
+ },
43
+ {
44
+ info: 'polkadot',
45
+ text: 'Polkadot',
46
+ value: 'polkadot'
47
+ },
48
+ {
49
+ info: 'substrate',
50
+ text: 'Substrate',
51
+ value: 'substrate'
52
+ },
53
+ {
54
+ info: 'beachball',
55
+ text: 'Beachball',
56
+ value: 'beachball'
57
+ }
58
+ ];
59
+ export const NOTIFICATION_DEFAULT = 'popup';
@@ -0,0 +1,3 @@
1
+ import { settings } from './bundle.js';
2
+ export * from './bundle.js';
3
+ export default settings;
package/build/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { settings } from './bundle.js';
2
+ export * from './bundle.js';
3
+ export default settings;
@@ -0,0 +1,254 @@
1
+ {
2
+ "author": "Jaco Greeff <jacogr@gmail.com>",
3
+ "bugs": "https://github.com/pezkuwichain/ui/issues",
4
+ "description": "Manages app settings",
5
+ "engines": {
6
+ "node": ">=18"
7
+ },
8
+ "homepage": "https://github.com/pezkuwichain/ui/tree/master/packages/ui-settings#readme",
9
+ "license": "Apache-2.0",
10
+ "name": "@pezkuwi/ui-settings",
11
+ "repository": {
12
+ "directory": "packages/ui-settings",
13
+ "type": "git",
14
+ "url": "https://github.com/pezkuwichain/ui.git"
15
+ },
16
+ "sideEffects": [
17
+ "./packageDetect.js",
18
+ "./cjs/packageDetect.js"
19
+ ],
20
+ "type": "module",
21
+ "version": "3.16.6",
22
+ "main": "./cjs/index.js",
23
+ "module": "./index.js",
24
+ "types": "./index.d.ts",
25
+ "exports": {
26
+ "./cjs/package.json": "./cjs/package.json",
27
+ "./cjs/*": "./cjs/*.js",
28
+ ".": {
29
+ "module": {
30
+ "types": "./index.d.ts",
31
+ "default": "./index.js"
32
+ },
33
+ "require": {
34
+ "types": "./cjs/index.d.ts",
35
+ "default": "./cjs/index.js"
36
+ },
37
+ "default": {
38
+ "types": "./index.d.ts",
39
+ "default": "./index.js"
40
+ }
41
+ },
42
+ "./bundle": {
43
+ "module": {
44
+ "types": "./bundle.d.ts",
45
+ "default": "./bundle.js"
46
+ },
47
+ "require": {
48
+ "types": "./cjs/bundle.d.ts",
49
+ "default": "./cjs/bundle.js"
50
+ },
51
+ "default": {
52
+ "types": "./bundle.d.ts",
53
+ "default": "./bundle.js"
54
+ }
55
+ },
56
+ "./defaults": {
57
+ "module": {
58
+ "types": "./defaults/index.d.ts",
59
+ "default": "./defaults/index.js"
60
+ },
61
+ "require": {
62
+ "types": "./cjs/defaults/index.d.ts",
63
+ "default": "./cjs/defaults/index.js"
64
+ },
65
+ "default": {
66
+ "types": "./defaults/index.d.ts",
67
+ "default": "./defaults/index.js"
68
+ }
69
+ },
70
+ "./defaults/chains": {
71
+ "module": {
72
+ "types": "./defaults/chains.d.ts",
73
+ "default": "./defaults/chains.js"
74
+ },
75
+ "require": {
76
+ "types": "./cjs/defaults/chains.d.ts",
77
+ "default": "./cjs/defaults/chains.js"
78
+ },
79
+ "default": {
80
+ "types": "./defaults/chains.d.ts",
81
+ "default": "./defaults/chains.js"
82
+ }
83
+ },
84
+ "./defaults/crypto": {
85
+ "module": {
86
+ "types": "./defaults/crypto.d.ts",
87
+ "default": "./defaults/crypto.js"
88
+ },
89
+ "require": {
90
+ "types": "./cjs/defaults/crypto.d.ts",
91
+ "default": "./cjs/defaults/crypto.js"
92
+ },
93
+ "default": {
94
+ "types": "./defaults/crypto.d.ts",
95
+ "default": "./defaults/crypto.js"
96
+ }
97
+ },
98
+ "./defaults/endpoints": {
99
+ "module": {
100
+ "types": "./defaults/endpoints.d.ts",
101
+ "default": "./defaults/endpoints.js"
102
+ },
103
+ "require": {
104
+ "types": "./cjs/defaults/endpoints.d.ts",
105
+ "default": "./cjs/defaults/endpoints.js"
106
+ },
107
+ "default": {
108
+ "types": "./defaults/endpoints.d.ts",
109
+ "default": "./defaults/endpoints.js"
110
+ }
111
+ },
112
+ "./defaults/ledger": {
113
+ "module": {
114
+ "types": "./defaults/ledger.d.ts",
115
+ "default": "./defaults/ledger.js"
116
+ },
117
+ "require": {
118
+ "types": "./cjs/defaults/ledger.d.ts",
119
+ "default": "./cjs/defaults/ledger.js"
120
+ },
121
+ "default": {
122
+ "types": "./defaults/ledger.d.ts",
123
+ "default": "./defaults/ledger.js"
124
+ }
125
+ },
126
+ "./defaults/ss58": {
127
+ "module": {
128
+ "types": "./defaults/ss58.d.ts",
129
+ "default": "./defaults/ss58.js"
130
+ },
131
+ "require": {
132
+ "types": "./cjs/defaults/ss58.d.ts",
133
+ "default": "./cjs/defaults/ss58.js"
134
+ },
135
+ "default": {
136
+ "types": "./defaults/ss58.d.ts",
137
+ "default": "./defaults/ss58.js"
138
+ }
139
+ },
140
+ "./defaults/type": {
141
+ "module": {
142
+ "types": "./defaults/type.d.ts",
143
+ "default": "./defaults/type.js"
144
+ },
145
+ "require": {
146
+ "types": "./cjs/defaults/type.d.ts",
147
+ "default": "./cjs/defaults/type.js"
148
+ },
149
+ "default": {
150
+ "types": "./defaults/type.d.ts",
151
+ "default": "./defaults/type.js"
152
+ }
153
+ },
154
+ "./defaults/ui": {
155
+ "module": {
156
+ "types": "./defaults/ui.d.ts",
157
+ "default": "./defaults/ui.js"
158
+ },
159
+ "require": {
160
+ "types": "./cjs/defaults/ui.d.ts",
161
+ "default": "./cjs/defaults/ui.js"
162
+ },
163
+ "default": {
164
+ "types": "./defaults/ui.d.ts",
165
+ "default": "./defaults/ui.js"
166
+ }
167
+ },
168
+ "./package.json": {
169
+ "require": "./cjs/package.json",
170
+ "default": "./package.json"
171
+ },
172
+ "./packageDetect": {
173
+ "module": {
174
+ "types": "./packageDetect.d.ts",
175
+ "default": "./packageDetect.js"
176
+ },
177
+ "require": {
178
+ "types": "./cjs/packageDetect.d.ts",
179
+ "default": "./cjs/packageDetect.js"
180
+ },
181
+ "default": {
182
+ "types": "./packageDetect.d.ts",
183
+ "default": "./packageDetect.js"
184
+ }
185
+ },
186
+ "./packageInfo.js": {
187
+ "module": {
188
+ "types": "./packageInfo.d.ts",
189
+ "default": "./packageInfo.js"
190
+ },
191
+ "require": {
192
+ "types": "./cjs/packageInfo.d.ts",
193
+ "default": "./cjs/packageInfo.js"
194
+ },
195
+ "default": {
196
+ "types": "./packageInfo.d.ts",
197
+ "default": "./packageInfo.js"
198
+ }
199
+ },
200
+ "./packageInfo": {
201
+ "module": {
202
+ "types": "./packageInfo.d.ts",
203
+ "default": "./packageInfo.js"
204
+ },
205
+ "require": {
206
+ "types": "./cjs/packageInfo.d.ts",
207
+ "default": "./cjs/packageInfo.js"
208
+ },
209
+ "default": {
210
+ "types": "./packageInfo.d.ts",
211
+ "default": "./packageInfo.js"
212
+ }
213
+ },
214
+ "./Settings": {
215
+ "module": {
216
+ "types": "./Settings.d.ts",
217
+ "default": "./Settings.js"
218
+ },
219
+ "require": {
220
+ "types": "./cjs/Settings.d.ts",
221
+ "default": "./cjs/Settings.js"
222
+ },
223
+ "default": {
224
+ "types": "./Settings.d.ts",
225
+ "default": "./Settings.js"
226
+ }
227
+ },
228
+ "./types": {
229
+ "module": {
230
+ "types": "./types.d.ts",
231
+ "default": "./types.js"
232
+ },
233
+ "require": {
234
+ "types": "./cjs/types.d.ts",
235
+ "default": "./cjs/types.js"
236
+ },
237
+ "default": {
238
+ "types": "./types.d.ts",
239
+ "default": "./types.js"
240
+ }
241
+ }
242
+ },
243
+ "dependencies": {
244
+ "@pezkuwi/networks": "^14.0.5",
245
+ "@pezkuwi/util": "^14.0.5",
246
+ "eventemitter3": "^5.0.1",
247
+ "store": "^2.0.12",
248
+ "tslib": "^2.8.1"
249
+ },
250
+ "peerDependencies": {
251
+ "@pezkuwi/networks": "*",
252
+ "@pezkuwi/util": "*"
253
+ }
254
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { detectPackage } from '@pezkuwi/util';
2
+ import { packageInfo } from './packageInfo.js';
3
+ detectPackage(packageInfo, null, []);
@@ -0,0 +1,6 @@
1
+ export declare const packageInfo: {
2
+ name: string;
3
+ path: string;
4
+ type: string;
5
+ version: string;
6
+ };
@@ -0,0 +1 @@
1
+ export const packageInfo = { name: '@pezkuwi/ui-settings', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.16.6' };
@@ -0,0 +1,35 @@
1
+ export interface Option {
2
+ disabled?: boolean;
3
+ info: string;
4
+ text: string;
5
+ value: string | number;
6
+ }
7
+ export interface SettingsStruct {
8
+ apiType: Endpoint;
9
+ apiUrl: string;
10
+ camera: string;
11
+ i18nLang: string;
12
+ icon: string;
13
+ ledgerApp: string;
14
+ ledgerConn: string;
15
+ locking: string;
16
+ metadataUp: string;
17
+ notification: string;
18
+ prefix: number;
19
+ storage: string;
20
+ uiMode: string;
21
+ uiTheme: string;
22
+ }
23
+ export interface NetworkSpecsStruct {
24
+ color: string;
25
+ decimals: number;
26
+ genesisHash: string;
27
+ prefix: number;
28
+ title: string;
29
+ unit: string;
30
+ }
31
+ export interface Endpoint {
32
+ type: EndpointType;
33
+ param: string;
34
+ }
35
+ export type EndpointType = 'json-rpc' | 'substrate-connect';
package/build/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};