@block-auth.io/angular 0.3.2 → 0.4.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/fesm2022/block-auth.io-angular.mjs +9828 -0
- package/fesm2022/block-auth.io-angular.mjs.map +1 -0
- package/index.d.ts +1144 -0
- package/package.json +16 -37
- package/.turbo/turbo-build.log +0 -37
- package/.turbo/turbo-lint.log +0 -4
- package/.turbo/turbo-test.log +0 -2001
- package/.turbo/turbo-typecheck.log +0 -19
- package/CHANGELOG.md +0 -245
- package/ng-package.json +0 -6
- package/scripts/css-to-ts.mjs +0 -14
- package/src/lib/__tests__/integration.test.ts +0 -45
- package/src/lib/block-auth.service.test.ts +0 -69
- package/src/lib/block-auth.service.ts +0 -81
- package/src/lib/components/btns/btn-base-provider.component.test.ts +0 -22
- package/src/lib/components/btns/btn-base-provider.component.ts +0 -55
- package/src/lib/components/btns/btn-block-auth.component.test.ts +0 -105
- package/src/lib/components/btns/btn-block-auth.component.ts +0 -117
- package/src/lib/components/btns/btn-gmail.component.test.ts +0 -16
- package/src/lib/components/btns/btn-gmail.component.ts +0 -41
- package/src/lib/components/btns/btn-google-base.component.test.ts +0 -16
- package/src/lib/components/btns/btn-google-base.component.ts +0 -73
- package/src/lib/components/btns/btn-metamask.component.test.ts +0 -20
- package/src/lib/components/btns/btn-metamask.component.ts +0 -98
- package/src/lib/components/btns/btn-microsoft.component.test.ts +0 -16
- package/src/lib/components/btns/btn-microsoft.component.ts +0 -77
- package/src/lib/components/btns/btn-phantom.component.test.ts +0 -20
- package/src/lib/components/btns/btn-phantom.component.ts +0 -93
- package/src/lib/components/btns/btn-signin.component.test.ts +0 -55
- package/src/lib/components/btns/btn-signin.component.ts +0 -108
- package/src/lib/components/btns/btn-wallet-connect.component.test.ts +0 -20
- package/src/lib/components/btns/btn-wallet-connect.component.ts +0 -109
- package/src/lib/components/btns/index.ts +0 -11
- package/src/lib/components/contents/content-signin.component.test.ts +0 -33
- package/src/lib/components/contents/content-signin.component.ts +0 -68
- package/src/lib/components/contents/content-signup.component.test.ts +0 -86
- package/src/lib/components/contents/content-signup.component.ts +0 -234
- package/src/lib/components/dds/change-account.component.test.ts +0 -66
- package/src/lib/components/dds/change-account.component.ts +0 -112
- package/src/lib/components/dds/dropdown-profile-btn.component.test.ts +0 -66
- package/src/lib/components/dds/dropdown-profile-btn.component.ts +0 -170
- package/src/lib/components/dds/dropdown-profile-item.component.test.ts +0 -75
- package/src/lib/components/dds/dropdown-profile-item.component.ts +0 -74
- package/src/lib/components/dds/dropdown-profile.component.test.ts +0 -110
- package/src/lib/components/dds/dropdown-profile.component.ts +0 -264
- package/src/lib/components/flow-block-auth.component.test.ts +0 -93
- package/src/lib/components/flow-block-auth.component.ts +0 -226
- package/src/lib/components/modals/modal-overlay.component.test.ts +0 -81
- package/src/lib/components/modals/modal-overlay.component.ts +0 -43
- package/src/lib/components/modals/modal-restoration-expired.component.test.ts +0 -71
- package/src/lib/components/modals/modal-restoration-expired.component.ts +0 -83
- package/src/lib/components/modals/modal-restore.component.test.ts +0 -74
- package/src/lib/components/modals/modal-restore.component.ts +0 -104
- package/src/lib/components/modals/modal-signin.component.test.ts +0 -66
- package/src/lib/components/modals/modal-signin.component.ts +0 -44
- package/src/lib/components/modals/modal-signup.component.test.ts +0 -56
- package/src/lib/components/modals/modal-signup.component.ts +0 -40
- package/src/lib/components/sections/footer-section.component.test.ts +0 -19
- package/src/lib/components/sections/footer-section.component.ts +0 -49
- package/src/lib/components/sections/internals/providers-buttons.component.test.ts +0 -27
- package/src/lib/components/sections/internals/providers-buttons.component.ts +0 -290
- package/src/lib/components/sections/internals/providers-filters.component.test.ts +0 -25
- package/src/lib/components/sections/internals/providers-filters.component.ts +0 -139
- package/src/lib/components/sections/internals/selected-button.component.test.ts +0 -36
- package/src/lib/components/sections/internals/selected-button.component.ts +0 -92
- package/src/lib/components/sections/login-section.component.test.ts +0 -49
- package/src/lib/components/sections/login-section.component.ts +0 -120
- package/src/lib/components/sections/providers-section.component.test.ts +0 -22
- package/src/lib/components/sections/providers-section.component.ts +0 -187
- package/src/lib/components/txns/internals/permissions-required-modal.component.test.ts +0 -36
- package/src/lib/components/txns/internals/permissions-required-modal.component.ts +0 -43
- package/src/lib/components/txns/internals/phone-input.component.test.ts +0 -119
- package/src/lib/components/txns/internals/phone-input.component.ts +0 -301
- package/src/lib/components/txns/internals/solicited-data-modal.component.test.ts +0 -661
- package/src/lib/components/txns/internals/solicited-data-modal.component.ts +0 -415
- package/src/lib/components/txns/internals/txn-error.component.test.ts +0 -127
- package/src/lib/components/txns/internals/txn-error.component.ts +0 -144
- package/src/lib/components/txns/internals/txn-type.component.test.ts +0 -52
- package/src/lib/components/txns/internals/txn-type.component.ts +0 -51
- package/src/lib/components/txns/internals/txn.component.test.ts +0 -580
- package/src/lib/components/txns/internals/txn.component.ts +0 -461
- package/src/lib/components/txns/txns-overview.component.test.ts +0 -421
- package/src/lib/components/txns/txns-overview.component.ts +0 -424
- package/src/lib/icons/ai-outline-disconnect.component.ts +0 -21
- package/src/lib/icons/bi-logo-gmail.component.ts +0 -21
- package/src/lib/icons/cg-profile.component.ts +0 -31
- package/src/lib/icons/check-icon.component.ts +0 -27
- package/src/lib/icons/ci-clock2.component.ts +0 -31
- package/src/lib/icons/fa-arrow-right.component.ts +0 -21
- package/src/lib/icons/fa-times.component.ts +0 -21
- package/src/lib/icons/fa-undo.component.ts +0 -21
- package/src/lib/icons/icons.test.ts +0 -25
- package/src/lib/icons/index.ts +0 -22
- package/src/lib/icons/io-ios-arrow-back.component.ts +0 -21
- package/src/lib/icons/io-ios-arrow-forward.component.ts +0 -21
- package/src/lib/icons/io-md-arrow-back.component.ts +0 -19
- package/src/lib/icons/io-md-arrow-forward.component.ts +0 -19
- package/src/lib/icons/pi-warning-fill.component.ts +0 -21
- package/src/lib/icons/tb-arrows-exchange2.component.ts +0 -30
- package/src/lib/icons/tb-copy-check-filled.component.ts +0 -21
- package/src/lib/icons/tb-copy.component.ts +0 -34
- package/src/lib/icons/ti-vendor-microsoft.component.ts +0 -21
- package/src/lib/inject-store.test.ts +0 -26
- package/src/lib/inject-store.ts +0 -16
- package/src/lib/primitives/arrow-icon.component.test.ts +0 -25
- package/src/lib/primitives/arrow-icon.component.ts +0 -45
- package/src/lib/primitives/btn-arrow-dir.component.test.ts +0 -22
- package/src/lib/primitives/btn-arrow-dir.component.ts +0 -65
- package/src/lib/primitives/btn-base.component.test.ts +0 -38
- package/src/lib/primitives/btn-base.component.ts +0 -140
- package/src/lib/primitives/divider-base.component.test.ts +0 -12
- package/src/lib/primitives/divider-base.component.ts +0 -74
- package/src/lib/primitives/dropdown-arrow.component.test.ts +0 -12
- package/src/lib/primitives/dropdown-arrow.component.ts +0 -46
- package/src/lib/primitives/dropdown-base.component.test.ts +0 -49
- package/src/lib/primitives/dropdown-base.component.ts +0 -329
- package/src/lib/primitives/helpers.ts +0 -151
- package/src/lib/primitives/horizontal-loader.component.test.ts +0 -19
- package/src/lib/primitives/horizontal-loader.component.ts +0 -70
- package/src/lib/primitives/icon-base.component.test.ts +0 -19
- package/src/lib/primitives/icon-base.component.ts +0 -58
- package/src/lib/primitives/img-loader.component.test.ts +0 -12
- package/src/lib/primitives/img-loader.component.ts +0 -118
- package/src/lib/primitives/index.ts +0 -29
- package/src/lib/primitives/input-base.component.test.ts +0 -20
- package/src/lib/primitives/input-base.component.ts +0 -210
- package/src/lib/primitives/lifetime-slider-base.component.test.ts +0 -88
- package/src/lib/primitives/lifetime-slider-base.component.ts +0 -75
- package/src/lib/primitives/oval-spinner.component.test.ts +0 -9
- package/src/lib/primitives/oval-spinner.component.ts +0 -158
- package/src/lib/primitives/pickers/dropdown-picker-animated-base.component.ts +0 -220
- package/src/lib/primitives/pickers/picker-button.component.ts +0 -74
- package/src/lib/primitives/pickers/time-picker-dropdown-selector.component.ts +0 -188
- package/src/lib/primitives/pickers/time-picker.component.ts +0 -124
- package/src/lib/primitives/pickers/time-unit-selector.component.ts +0 -82
- package/src/lib/primitives/progressbar.component.test.ts +0 -18
- package/src/lib/primitives/progressbar.component.ts +0 -93
- package/src/lib/primitives/providersStyles.ts +0 -268
- package/src/lib/primitives/slider-base.component.ts +0 -56
- package/src/lib/provide-block-auth.test.ts +0 -43
- package/src/lib/provide-block-auth.ts +0 -43
- package/src/lib/runtime/block-auth-runtime.directive.test.ts +0 -89
- package/src/lib/runtime/block-auth-runtime.directive.ts +0 -68
- package/src/lib/teleport-body.directive.test.ts +0 -29
- package/src/lib/teleport-body.directive.ts +0 -21
- package/src/lib/testing.ts +0 -15
- package/src/lib/transitions.css +0 -23
- package/src/public-api.ts +0 -86
- package/src/vitest.setup.ts +0 -8
- package/tailwind.config.cjs +0 -6
- package/tsconfig.json +0 -15
- package/tsconfig.lib.json +0 -9
- package/vite.config.mts +0 -44
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
// Port literal de packages/react/src/primitives/providersStyles.ts: mapa de
|
|
2
|
-
// estilos por provider, TS puro sin dependencias de React, copiado tal cual.
|
|
3
|
-
import { imgUrlByService } from './helpers';
|
|
4
|
-
|
|
5
|
-
export interface ProviderStyle {
|
|
6
|
-
/** Nombre para mostrar del provider. */
|
|
7
|
-
name: string;
|
|
8
|
-
/** Slug del provider. */
|
|
9
|
-
value: string;
|
|
10
|
-
/** URL del icono. */
|
|
11
|
-
imgSrc: string;
|
|
12
|
-
/** Color de fondo detrás del icono del provider en el loader. */
|
|
13
|
-
imgBgColor: string;
|
|
14
|
-
/** Color del loader (spinner). */
|
|
15
|
-
loaderColor: string;
|
|
16
|
-
/** Color base de marca. */
|
|
17
|
-
colorBase: string;
|
|
18
|
-
/** Clase `bas-*` de borde aplicada cuando el provider está seleccionado. */
|
|
19
|
-
borderStyles: string;
|
|
20
|
-
/** Clase `bas-*` de borde aplicada en hover. */
|
|
21
|
-
hoverBorderStyles: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const providersStyles: Record<string, ProviderStyle> = {
|
|
25
|
-
blockauth: {
|
|
26
|
-
name: 'BlockAuth',
|
|
27
|
-
value: 'blockauth',
|
|
28
|
-
imgSrc: imgUrlByService('blockauth'),
|
|
29
|
-
imgBgColor: '#eff6ff',
|
|
30
|
-
loaderColor: '#1961a4',
|
|
31
|
-
colorBase: '#1961a4',
|
|
32
|
-
borderStyles: 'bas-border-[var(--bal-primary-100)]',
|
|
33
|
-
hoverBorderStyles: 'hover:bas-border-[var(--bal-primary-300)]',
|
|
34
|
-
},
|
|
35
|
-
google: {
|
|
36
|
-
name: 'Google',
|
|
37
|
-
value: 'google',
|
|
38
|
-
imgSrc: imgUrlByService('google'),
|
|
39
|
-
imgBgColor: '#fef2f2',
|
|
40
|
-
loaderColor: '#ef4444',
|
|
41
|
-
colorBase: '#dc2626',
|
|
42
|
-
borderStyles: 'bas-border-red-400',
|
|
43
|
-
hoverBorderStyles: 'hover:bas-border-red-600',
|
|
44
|
-
},
|
|
45
|
-
metamask: {
|
|
46
|
-
name: 'MetaMask',
|
|
47
|
-
value: 'metamask',
|
|
48
|
-
imgSrc: imgUrlByService('metamask'),
|
|
49
|
-
imgBgColor: '#fff7ed',
|
|
50
|
-
loaderColor: '#f97316',
|
|
51
|
-
colorBase: '#ea580c',
|
|
52
|
-
borderStyles: 'bas-border-orange-400',
|
|
53
|
-
hoverBorderStyles: 'hover:bas-border-orange-600',
|
|
54
|
-
},
|
|
55
|
-
microsoft: {
|
|
56
|
-
name: 'Microsoft',
|
|
57
|
-
value: 'microsoft',
|
|
58
|
-
imgSrc: imgUrlByService('microsoft'),
|
|
59
|
-
imgBgColor: '#eff6ff',
|
|
60
|
-
loaderColor: '#106ebe',
|
|
61
|
-
colorBase: '#106ebe',
|
|
62
|
-
borderStyles: 'bas-border-[#1d8dec]',
|
|
63
|
-
hoverBorderStyles: 'hover:bas-border-[#106ebe]',
|
|
64
|
-
},
|
|
65
|
-
phantom: {
|
|
66
|
-
name: 'Phantom',
|
|
67
|
-
value: 'phantom',
|
|
68
|
-
imgSrc: imgUrlByService('phantom'),
|
|
69
|
-
imgBgColor: '#faf5ff',
|
|
70
|
-
loaderColor: '#9333ea',
|
|
71
|
-
colorBase: '#9333ea',
|
|
72
|
-
borderStyles: 'bas-border-purple-400',
|
|
73
|
-
hoverBorderStyles: 'hover:bas-border-purple-600',
|
|
74
|
-
},
|
|
75
|
-
trustWallet: {
|
|
76
|
-
name: 'Trust Wallet',
|
|
77
|
-
value: 'trustwallet',
|
|
78
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/trust-wallet.png',
|
|
79
|
-
imgBgColor: '#f0f9ff',
|
|
80
|
-
loaderColor: '#0b69ff',
|
|
81
|
-
colorBase: '#0b69ff',
|
|
82
|
-
borderStyles: 'bas-border-blue-400',
|
|
83
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
84
|
-
},
|
|
85
|
-
binance: {
|
|
86
|
-
name: 'Binance',
|
|
87
|
-
value: 'binance',
|
|
88
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/binance.png',
|
|
89
|
-
imgBgColor: '#f0f9ff',
|
|
90
|
-
loaderColor: '#0b69ff',
|
|
91
|
-
colorBase: '#0b69ff',
|
|
92
|
-
borderStyles: 'bas-border-blue-400',
|
|
93
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
94
|
-
},
|
|
95
|
-
uniswap: {
|
|
96
|
-
name: 'Uniswap',
|
|
97
|
-
value: 'uniswap',
|
|
98
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/uniswap.png',
|
|
99
|
-
imgBgColor: '#f0f9ff',
|
|
100
|
-
loaderColor: '#0b69ff',
|
|
101
|
-
colorBase: '#0b69ff',
|
|
102
|
-
borderStyles: 'bas-border-blue-400',
|
|
103
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
104
|
-
},
|
|
105
|
-
bitget: {
|
|
106
|
-
name: 'Bitget',
|
|
107
|
-
value: 'bitget',
|
|
108
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/bitget.png',
|
|
109
|
-
imgBgColor: '#f0f9ff',
|
|
110
|
-
loaderColor: '#0b69ff',
|
|
111
|
-
colorBase: '#0b69ff',
|
|
112
|
-
borderStyles: 'bas-border-blue-400',
|
|
113
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
114
|
-
},
|
|
115
|
-
legder: {
|
|
116
|
-
name: 'Legder',
|
|
117
|
-
value: 'legder',
|
|
118
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/legder.png',
|
|
119
|
-
imgBgColor: '#f0f9ff',
|
|
120
|
-
loaderColor: '#0b69ff',
|
|
121
|
-
colorBase: '#0b69ff',
|
|
122
|
-
borderStyles: 'bas-border-blue-400',
|
|
123
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
124
|
-
},
|
|
125
|
-
robinhood: {
|
|
126
|
-
name: 'Robinhood',
|
|
127
|
-
value: 'robinhood',
|
|
128
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/robinhood.png',
|
|
129
|
-
imgBgColor: '#f0f9ff',
|
|
130
|
-
loaderColor: '#0b69ff',
|
|
131
|
-
colorBase: '#0b69ff',
|
|
132
|
-
borderStyles: 'bas-border-blue-400',
|
|
133
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
134
|
-
},
|
|
135
|
-
blockchaincom: {
|
|
136
|
-
name: 'Blockchain.com',
|
|
137
|
-
value: 'blockchaincom',
|
|
138
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/blockchaincom.png',
|
|
139
|
-
imgBgColor: '#f0f9ff',
|
|
140
|
-
loaderColor: '#0b69ff',
|
|
141
|
-
colorBase: '#0b69ff',
|
|
142
|
-
borderStyles: 'bas-border-blue-400',
|
|
143
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
144
|
-
},
|
|
145
|
-
magiceden: {
|
|
146
|
-
name: 'Magic Eden',
|
|
147
|
-
value: 'magiceden',
|
|
148
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/magiceden.png',
|
|
149
|
-
imgBgColor: '#f0f9ff',
|
|
150
|
-
loaderColor: '#0b69ff',
|
|
151
|
-
colorBase: '#0b69ff',
|
|
152
|
-
borderStyles: 'bas-border-blue-400',
|
|
153
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
154
|
-
},
|
|
155
|
-
kraken: {
|
|
156
|
-
name: 'Kraken',
|
|
157
|
-
value: 'kraken',
|
|
158
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/kraken.png',
|
|
159
|
-
imgBgColor: '#f0f9ff',
|
|
160
|
-
loaderColor: '#0b69ff',
|
|
161
|
-
colorBase: '#0b69ff',
|
|
162
|
-
borderStyles: 'bas-border-blue-400',
|
|
163
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
164
|
-
},
|
|
165
|
-
coinbase: {
|
|
166
|
-
name: 'Coinbase',
|
|
167
|
-
value: 'coinbase',
|
|
168
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/coinbase.png',
|
|
169
|
-
imgBgColor: '#f0f9ff',
|
|
170
|
-
loaderColor: '#0b69ff',
|
|
171
|
-
colorBase: '#0b69ff',
|
|
172
|
-
borderStyles: 'bas-border-blue-400',
|
|
173
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
174
|
-
},
|
|
175
|
-
enjin: {
|
|
176
|
-
name: 'Enjin',
|
|
177
|
-
value: 'enjin',
|
|
178
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/enjin.png',
|
|
179
|
-
imgBgColor: '#f0f9ff',
|
|
180
|
-
loaderColor: '#0b69ff',
|
|
181
|
-
colorBase: '#0b69ff',
|
|
182
|
-
borderStyles: 'bas-border-blue-400',
|
|
183
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
184
|
-
},
|
|
185
|
-
coincircle: {
|
|
186
|
-
name: 'Coincircle',
|
|
187
|
-
value: 'coincircle',
|
|
188
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/coincircle.png',
|
|
189
|
-
imgBgColor: '#f0f9ff',
|
|
190
|
-
loaderColor: '#0b69ff',
|
|
191
|
-
colorBase: '#0b69ff',
|
|
192
|
-
borderStyles: 'bas-border-blue-400',
|
|
193
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
194
|
-
},
|
|
195
|
-
crossmint: {
|
|
196
|
-
name: 'Crossmint',
|
|
197
|
-
value: 'crossmint',
|
|
198
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/crossmint.png',
|
|
199
|
-
imgBgColor: '#f0f9ff',
|
|
200
|
-
loaderColor: '#0b69ff',
|
|
201
|
-
colorBase: '#0b69ff',
|
|
202
|
-
borderStyles: 'bas-border-blue-400',
|
|
203
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
204
|
-
},
|
|
205
|
-
ronin: {
|
|
206
|
-
name: 'Ronin',
|
|
207
|
-
value: 'ronin',
|
|
208
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/ronin.png',
|
|
209
|
-
imgBgColor: '#f0f9ff',
|
|
210
|
-
loaderColor: '#0b69ff',
|
|
211
|
-
colorBase: '#0b69ff',
|
|
212
|
-
borderStyles: 'bas-border-blue-400',
|
|
213
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
214
|
-
},
|
|
215
|
-
thirdweb: {
|
|
216
|
-
name: 'Thirdweb',
|
|
217
|
-
value: 'thirdweb',
|
|
218
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/thirdweb.png',
|
|
219
|
-
imgBgColor: '#f0f9ff',
|
|
220
|
-
loaderColor: '#0b69ff',
|
|
221
|
-
colorBase: '#0b69ff',
|
|
222
|
-
borderStyles: 'bas-border-blue-400',
|
|
223
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
224
|
-
},
|
|
225
|
-
wemix: {
|
|
226
|
-
name: 'Wemix',
|
|
227
|
-
value: 'wemix',
|
|
228
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/wemix.png',
|
|
229
|
-
imgBgColor: '#f0f9ff',
|
|
230
|
-
loaderColor: '#0b69ff',
|
|
231
|
-
colorBase: '#0b69ff',
|
|
232
|
-
borderStyles: 'bas-border-blue-400',
|
|
233
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
234
|
-
},
|
|
235
|
-
bitbox: {
|
|
236
|
-
name: 'Bitbox',
|
|
237
|
-
value: 'bitbox',
|
|
238
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/bitbox.png',
|
|
239
|
-
imgBgColor: '#f0f9ff',
|
|
240
|
-
loaderColor: '#0b69ff',
|
|
241
|
-
colorBase: '#0b69ff',
|
|
242
|
-
borderStyles: 'bas-border-blue-400',
|
|
243
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
244
|
-
},
|
|
245
|
-
moonpay: {
|
|
246
|
-
name: 'Moonpay',
|
|
247
|
-
value: 'moonpay',
|
|
248
|
-
imgSrc: 'https://dashboard.block-auth.io/img/providers/moonpay.png',
|
|
249
|
-
imgBgColor: '#f0f9ff',
|
|
250
|
-
loaderColor: '#0b69ff',
|
|
251
|
-
colorBase: '#0b69ff',
|
|
252
|
-
borderStyles: 'bas-border-blue-400',
|
|
253
|
-
hoverBorderStyles: 'hover:bas-border-blue-600',
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/** Etiquetas del panel editable, port literal de `editableTxts`. */
|
|
258
|
-
export const editableTxts: Record<string, { es: string; en: string }> = {
|
|
259
|
-
edit: { es: 'Editar', en: 'Edit' },
|
|
260
|
-
searchEngine: { es: 'Buscador', en: 'Search engine' },
|
|
261
|
-
webTypes: { es: 'Tipos de web', en: 'Web types' },
|
|
262
|
-
columns: { es: 'Columnas', en: 'Columns' },
|
|
263
|
-
order: { es: 'Orden', en: 'Order' },
|
|
264
|
-
activate: { es: 'Activar', en: 'Activate' },
|
|
265
|
-
providerName: { es: 'Nombre del provider', en: 'Provider name' },
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
export default providersStyles;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
// Slider de rango sobre un `<input type="range">` nativo cuyo track/relleno/thumb
|
|
4
|
-
// se estilan vía las reglas `.bas-slider-base` de `@block-auth.io/ui-styles`
|
|
5
|
-
// (src/input.css). La porción rellenada la maneja la custom property
|
|
6
|
-
// `--bas-slider-fill` (porcentaje del valor actual entre min/max), calculada
|
|
7
|
-
// acá para que el gradiente del track de WebKit y el `::-moz-range-progress`
|
|
8
|
-
// de Firefox queden alineados.
|
|
9
|
-
//
|
|
10
|
-
// `onSliderValueChanged` (callback prop en react) -> output `sliderValueChanged`.
|
|
11
|
-
// `:host { display: contents }`: el `<input>` es el hijo real del grid/flex del
|
|
12
|
-
// padre (como en react/vue), así `bas-w-full` mide el 100% del contenedor.
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'ba-slider-base',
|
|
15
|
-
standalone: true,
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
-
host: { style: 'display: contents' },
|
|
18
|
-
template: `
|
|
19
|
-
<input
|
|
20
|
-
[id]="id()"
|
|
21
|
-
type="range"
|
|
22
|
-
[attr.aria-label]="ariaLabel()"
|
|
23
|
-
[min]="min()"
|
|
24
|
-
[max]="max()"
|
|
25
|
-
[step]="step()"
|
|
26
|
-
[value]="sliderValue()"
|
|
27
|
-
[disabled]="disabled()"
|
|
28
|
-
[class]="'bas-slider-base bas-h-6 bas-w-full ' + classNames()"
|
|
29
|
-
[style.--bas-slider-fill.%]="fillPct()"
|
|
30
|
-
(input)="onInput($event)"
|
|
31
|
-
/>
|
|
32
|
-
`,
|
|
33
|
-
})
|
|
34
|
-
export class SliderBaseComponent {
|
|
35
|
-
id = input('slider-id');
|
|
36
|
-
sliderValue = input(150);
|
|
37
|
-
step = input(1);
|
|
38
|
-
min = input(0);
|
|
39
|
-
max = input(100);
|
|
40
|
-
disabled = input(false);
|
|
41
|
-
ariaLabel = input('slider');
|
|
42
|
-
classNames = input('');
|
|
43
|
-
|
|
44
|
-
sliderValueChanged = output<number>();
|
|
45
|
-
|
|
46
|
-
protected readonly fillPct = computed(() => {
|
|
47
|
-
const range = this.max() - this.min();
|
|
48
|
-
return range > 0
|
|
49
|
-
? Math.min(100, Math.max(0, ((this.sliderValue() - this.min()) / range) * 100))
|
|
50
|
-
: 0;
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
onInput(e: Event): void {
|
|
54
|
-
this.sliderValueChanged.emit(Number((e.target as HTMLInputElement).value));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { render, screen } from '@testing-library/angular';
|
|
4
|
-
|
|
5
|
-
vi.mock('@wagmi/core', () => ({
|
|
6
|
-
createConfig: vi.fn(() => ({ connectors: [] })),
|
|
7
|
-
connect: vi.fn(), disconnect: vi.fn(), getAccount: vi.fn(() => ({})),
|
|
8
|
-
signMessage: vi.fn(), watchAccount: vi.fn(() => () => undefined), http: vi.fn(),
|
|
9
|
-
}));
|
|
10
|
-
vi.mock('@wagmi/connectors', () => ({
|
|
11
|
-
injected: vi.fn(() => ({ id: 'injected' })), walletConnect: vi.fn(() => ({ id: 'walletConnect' })),
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
import { provideBlockAuth, injectBlockAuthClient } from './provide-block-auth';
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'ba-probe', standalone: true,
|
|
18
|
-
template: `<span data-testid="probe">{{ kind }}</span>`,
|
|
19
|
-
})
|
|
20
|
-
class ProbeComponent {
|
|
21
|
-
client = injectBlockAuthClient();
|
|
22
|
-
kind = typeof this.client.web3.signup;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
describe('provideBlockAuth', () => {
|
|
26
|
-
it('provee el client y injectBlockAuthClient lo inyecta', async () => {
|
|
27
|
-
await render(ProbeComponent, {
|
|
28
|
-
providers: [provideBlockAuth({ apiKey: 'k', apiSecret: 's', walletConnectProjectId: 'pid' })],
|
|
29
|
-
});
|
|
30
|
-
expect(screen.getByTestId('probe').textContent).toBe('function');
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('inyecta el stylesheet del SDK en head una sola vez', async () => {
|
|
34
|
-
await render(ProbeComponent, {
|
|
35
|
-
providers: [provideBlockAuth({ apiKey: 'k', apiSecret: 's', walletConnectProjectId: 'pid' })],
|
|
36
|
-
});
|
|
37
|
-
expect(document.head.querySelectorAll('style[data-blockauth]').length).toBe(1);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('injectBlockAuthClient sin provider lanza error claro', async () => {
|
|
41
|
-
await expect(render(ProbeComponent)).rejects.toThrow(/provideBlockAuth/);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import { InjectionToken, inject, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';
|
|
3
|
-
import { createBlockAuthClient, type BlockAuthClient, type BlockAuthClientConfig } from '@block-auth.io/core';
|
|
4
|
-
import { BLOCKAUTH_CSS } from '../styles.generated';
|
|
5
|
-
|
|
6
|
-
const BLOCK_AUTH_CLIENT = new InjectionToken<BlockAuthClient>('BLOCK_AUTH_CLIENT');
|
|
7
|
-
|
|
8
|
-
function injectSdkStyles(doc: Document): void {
|
|
9
|
-
if (doc.head.querySelector('style[data-blockauth]')) return;
|
|
10
|
-
const style = doc.createElement('style');
|
|
11
|
-
style.setAttribute('data-blockauth', '');
|
|
12
|
-
style.textContent = BLOCKAUTH_CSS;
|
|
13
|
-
doc.head.appendChild(style);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Registra el BlockAuthClient en el injector (equivalente Angular del plugin
|
|
18
|
-
* createBlockAuth de Vue / <BlockAuthProvider> de React) e inyecta el
|
|
19
|
-
* stylesheet del SDK en <head> (idempotente: solo una vez por documento).
|
|
20
|
-
*/
|
|
21
|
-
export function provideBlockAuth(config: BlockAuthClientConfig): EnvironmentProviders {
|
|
22
|
-
return makeEnvironmentProviders([
|
|
23
|
-
{
|
|
24
|
-
provide: BLOCK_AUTH_CLIENT,
|
|
25
|
-
useFactory: () => {
|
|
26
|
-
const doc = inject(DOCUMENT);
|
|
27
|
-
if (doc?.head) injectSdkStyles(doc); // SSR-safe: only touch <head> in browser
|
|
28
|
-
return createBlockAuthClient(config);
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
]);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function injectBlockAuthClient(): BlockAuthClient {
|
|
35
|
-
const client = inject(BLOCK_AUTH_CLIENT, { optional: true });
|
|
36
|
-
if (!client) {
|
|
37
|
-
throw new Error('[block-auth] injectBlockAuthClient() requiere provideBlockAuth(config) en los providers');
|
|
38
|
-
}
|
|
39
|
-
return client;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Test-only alias so lib/testing.ts (Task A7) can fabricate a fake-client provider.
|
|
43
|
-
export const BLOCK_AUTH_CLIENT_INTERNAL: InjectionToken<BlockAuthClient> = BLOCK_AUTH_CLIENT;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { render } from '@testing-library/angular';
|
|
4
|
-
import { map } from 'nanostores';
|
|
5
|
-
|
|
6
|
-
// Se mockea `@block-auth.io/core` PARCIALMENTE (patrón de content-signup.test):
|
|
7
|
-
// se conserva todo lo real y solo se espían `createAuthRuntime` (devuelve un
|
|
8
|
-
// runtime de mentira `{ start, stop }`) y `startExtensionSync` (devuelve un
|
|
9
|
-
// cleanup espía). Así `injectStore(client.state.$ws)` usa el nanostore real y
|
|
10
|
-
// no hace falta un client real ni los mocks de `@wagmi/*`.
|
|
11
|
-
const startSpy = vi.fn();
|
|
12
|
-
const stopSpy = vi.fn();
|
|
13
|
-
const extensionCleanupSpy = vi.fn();
|
|
14
|
-
const startExtensionSyncSpy = vi.fn(() => extensionCleanupSpy);
|
|
15
|
-
const createAuthRuntimeSpy = vi.fn(() => ({ start: startSpy, stop: stopSpy, logout: vi.fn() }));
|
|
16
|
-
|
|
17
|
-
vi.mock('@block-auth.io/core', async (importOriginal) => {
|
|
18
|
-
const actual = await importOriginal<typeof import('@block-auth.io/core')>();
|
|
19
|
-
return {
|
|
20
|
-
...actual,
|
|
21
|
-
createAuthRuntime: () => createAuthRuntimeSpy(),
|
|
22
|
-
startExtensionSync: () => startExtensionSyncSpy(),
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
import { BlockAuthRuntimeDirective } from './block-auth-runtime.directive';
|
|
27
|
-
import { provideBlockAuthClientForTest } from '../testing';
|
|
28
|
-
|
|
29
|
-
function makeClient(ready = false) {
|
|
30
|
-
return { state: { $ws: map<{ ready: boolean }>({ ready }) } } as any;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Component({
|
|
34
|
-
standalone: true,
|
|
35
|
-
imports: [BlockAuthRuntimeDirective],
|
|
36
|
-
template: `<ng-container baRuntime></ng-container>`,
|
|
37
|
-
})
|
|
38
|
-
class HostComponent {}
|
|
39
|
-
|
|
40
|
-
describe('BlockAuthRuntimeDirective', () => {
|
|
41
|
-
beforeEach(() => {
|
|
42
|
-
startSpy.mockClear();
|
|
43
|
-
stopSpy.mockClear();
|
|
44
|
-
extensionCleanupSpy.mockClear();
|
|
45
|
-
createAuthRuntimeSpy.mockClear();
|
|
46
|
-
startExtensionSyncSpy.mockClear();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('al montar arranca startExtensionSync + createAuthRuntime + start', async () => {
|
|
50
|
-
await render(HostComponent, { providers: [provideBlockAuthClientForTest(makeClient())] });
|
|
51
|
-
expect(startExtensionSyncSpy).toHaveBeenCalledTimes(1);
|
|
52
|
-
expect(createAuthRuntimeSpy).toHaveBeenCalledTimes(1);
|
|
53
|
-
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('al destruir llama runtime.stop() y el cleanup de startExtensionSync', async () => {
|
|
57
|
-
const { fixture } = await render(HostComponent, {
|
|
58
|
-
providers: [provideBlockAuthClientForTest(makeClient())],
|
|
59
|
-
});
|
|
60
|
-
fixture.destroy();
|
|
61
|
-
expect(stopSpy).toHaveBeenCalledTimes(1);
|
|
62
|
-
expect(extensionCleanupSpy).toHaveBeenCalledTimes(1);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('no reconecta en el `false` inicial (antes de la primera conexión)', async () => {
|
|
66
|
-
const { fixture } = await render(HostComponent, {
|
|
67
|
-
providers: [provideBlockAuthClientForTest(makeClient(false))],
|
|
68
|
-
});
|
|
69
|
-
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
70
|
-
fixture.detectChanges();
|
|
71
|
-
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('reconecta (re-start) cuando `ready` pasa de true a false tras el teardown', async () => {
|
|
75
|
-
const client = makeClient(false);
|
|
76
|
-
const { fixture } = await render(HostComponent, {
|
|
77
|
-
providers: [provideBlockAuthClientForTest(client)],
|
|
78
|
-
});
|
|
79
|
-
expect(startSpy).toHaveBeenCalledTimes(1); // conexión inicial
|
|
80
|
-
|
|
81
|
-
client.state.$ws.setKey('ready', true);
|
|
82
|
-
fixture.detectChanges();
|
|
83
|
-
expect(startSpy).toHaveBeenCalledTimes(1); // sin start extra al conectar
|
|
84
|
-
|
|
85
|
-
client.state.$ws.setKey('ready', false);
|
|
86
|
-
fixture.detectChanges();
|
|
87
|
-
expect(startSpy).toHaveBeenCalledTimes(2); // reconexión
|
|
88
|
-
});
|
|
89
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { PLATFORM_ID, Directive, OnDestroy, OnInit, effect, inject, output } from '@angular/core';
|
|
2
|
-
import { isPlatformBrowser } from '@angular/common';
|
|
3
|
-
import { createAuthRuntime, startExtensionSync, type AuthRuntime } from '@block-auth.io/core';
|
|
4
|
-
import { injectBlockAuthClient } from '../provide-block-auth';
|
|
5
|
-
import { injectStore } from '../inject-store';
|
|
6
|
-
|
|
7
|
-
// Inicializador fino del runtime dirigido por el core, como DIRECTIVA sin
|
|
8
|
-
// plantilla (`[baRuntime]`).
|
|
9
|
-
//
|
|
10
|
-
// Al montar arranca `startExtensionSync()` (lo que en React hace el
|
|
11
|
-
// `BlockAuthProvider` en su efecto de montaje — fusionado acá igual que en el
|
|
12
|
-
// composable de Vue) y `createAuthRuntime(client, callbacks).start()` (connect →
|
|
13
|
-
// signin → cablea todos los handlers `sdk:*`/`provider:*`/`user:txns*`/`signin:*`
|
|
14
|
-
// → dirige el estado nanostores que lee la UI). Al destruir llama `runtime.stop()`
|
|
15
|
-
// (limpia el timeout de unsign + el intervalo de polling de user:txns y
|
|
16
|
-
// desconecta) y el cleanup de `startExtensionSync()`.
|
|
17
|
-
//
|
|
18
|
-
// El `input` no reactivo no existe acá: los callbacks son OUTPUTS
|
|
19
|
-
// (`success`/`errored`/`loggedOut`) que `FlowBlockAuth` reenvía a sus propios
|
|
20
|
-
// outputs.
|
|
21
|
-
@Directive({ selector: '[baRuntime]', standalone: true })
|
|
22
|
-
export class BlockAuthRuntimeDirective implements OnInit, OnDestroy {
|
|
23
|
-
success = output<string | undefined>();
|
|
24
|
-
errored = output<void>();
|
|
25
|
-
loggedOut = output<void>();
|
|
26
|
-
|
|
27
|
-
private platformId = inject(PLATFORM_ID);
|
|
28
|
-
private client = injectBlockAuthClient();
|
|
29
|
-
private ws = injectStore(this.client.state.$ws);
|
|
30
|
-
private runtime: AuthRuntime | null = null;
|
|
31
|
-
private wasReady = false;
|
|
32
|
-
private stopExtensionSync: (() => void) | null = null;
|
|
33
|
-
|
|
34
|
-
constructor() {
|
|
35
|
-
// Reconexión tras el teardown del DeletionService (ready true→false),
|
|
36
|
-
// port del segundo useEffect de BlockAuthRuntime (react). Es no-op hasta
|
|
37
|
-
// que exista un runtime (p.ej. en SSR, donde ngOnInit sale temprano).
|
|
38
|
-
effect(() => {
|
|
39
|
-
const ready = this.ws().ready;
|
|
40
|
-
if (ready) { this.wasReady = true; return; }
|
|
41
|
-
if (this.wasReady && this.runtime) {
|
|
42
|
-
this.wasReady = false;
|
|
43
|
-
void this.runtime.start();
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
ngOnInit(): void {
|
|
49
|
-
// Angular Universal corre ngOnInit en el servidor; el trabajo de browser
|
|
50
|
-
// (startExtensionSync / runtime.start) nunca debe correr server-side.
|
|
51
|
-
if (!isPlatformBrowser(this.platformId)) return;
|
|
52
|
-
this.stopExtensionSync = startExtensionSync();
|
|
53
|
-
this.runtime = createAuthRuntime(this.client, {
|
|
54
|
-
onSuccess: (address) => this.success.emit(address),
|
|
55
|
-
onError: () => this.errored.emit(),
|
|
56
|
-
onLogout: () => this.loggedOut.emit(),
|
|
57
|
-
});
|
|
58
|
-
void this.runtime.start();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
ngOnDestroy(): void {
|
|
62
|
-
this.runtime?.stop();
|
|
63
|
-
this.runtime = null;
|
|
64
|
-
this.wasReady = false;
|
|
65
|
-
this.stopExtensionSync?.();
|
|
66
|
-
this.stopExtensionSync = null;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { render, screen } from '@testing-library/angular';
|
|
4
|
-
import { TeleportBodyDirective } from './teleport-body.directive';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'ba-teleport-host',
|
|
8
|
-
standalone: true,
|
|
9
|
-
imports: [TeleportBodyDirective],
|
|
10
|
-
template: `<div baTeleportBody data-testid="tp">content</div>`,
|
|
11
|
-
})
|
|
12
|
-
class TeleportHostComponent {}
|
|
13
|
-
|
|
14
|
-
describe('TeleportBodyDirective', () => {
|
|
15
|
-
it('mueve el host element a document.body al montar', async () => {
|
|
16
|
-
const { fixture } = await render(TeleportHostComponent);
|
|
17
|
-
const node = screen.getByTestId('tp');
|
|
18
|
-
expect(node.parentElement).toBe(document.body);
|
|
19
|
-
fixture.destroy();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('elimina el nodo de document.body al destruir', async () => {
|
|
23
|
-
const { fixture } = await render(TeleportHostComponent);
|
|
24
|
-
const node = screen.getByTestId('tp');
|
|
25
|
-
expect(document.body.contains(node)).toBe(true);
|
|
26
|
-
fixture.destroy();
|
|
27
|
-
expect(document.body.contains(node)).toBe(false);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, OnDestroy, OnInit, inject } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Mueve el host element a document.body al iniciar (equivalente a
|
|
6
|
-
* createPortal(..., document.body) / <Teleport to="body">) y lo elimina al
|
|
7
|
-
* destruir. Necesario para que el overlay fixed de los modales no quede
|
|
8
|
-
* atrapado en ancestros con transform.
|
|
9
|
-
*/
|
|
10
|
-
@Directive({ selector: '[baTeleportBody]', standalone: true })
|
|
11
|
-
export class TeleportBodyDirective implements OnInit, OnDestroy {
|
|
12
|
-
private readonly el = inject(ElementRef<HTMLElement>);
|
|
13
|
-
private readonly doc = inject(DOCUMENT);
|
|
14
|
-
|
|
15
|
-
ngOnInit(): void {
|
|
16
|
-
this.doc.body.appendChild(this.el.nativeElement);
|
|
17
|
-
}
|
|
18
|
-
ngOnDestroy(): void {
|
|
19
|
-
this.el.nativeElement.remove();
|
|
20
|
-
}
|
|
21
|
-
}
|
package/src/lib/testing.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Provider } from '@angular/core';
|
|
2
|
-
import type { BlockAuthClient } from '@block-auth.io/core';
|
|
3
|
-
// El token es privado de provide-block-auth; se reexporta desde allí con un
|
|
4
|
-
// nombre interno (`BLOCK_AUTH_CLIENT_INTERNAL`) para poder fabricar providers
|
|
5
|
-
// de test que inyecten un client falso sin arrancar el client real.
|
|
6
|
-
import { BLOCK_AUTH_CLIENT_INTERNAL } from './provide-block-auth';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Helper SOLO de tests (no se exporta en public-api): registra un client
|
|
10
|
-
* parcial/falso bajo el token de BlockAuth, de modo que
|
|
11
|
-
* `injectBlockAuthClient()` lo devuelva en lugar del client real.
|
|
12
|
-
*/
|
|
13
|
-
export function provideBlockAuthClientForTest(client: Partial<BlockAuthClient>): Provider {
|
|
14
|
-
return { provide: BLOCK_AUTH_CLIENT_INTERNAL, useValue: client };
|
|
15
|
-
}
|
package/src/lib/transitions.css
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* fade — sustituye a motion.div animate={{opacity}} */
|
|
2
|
-
.bas-fade-enter-active, .bas-fade-leave-active { transition: opacity 0.2s ease; }
|
|
3
|
-
.bas-fade-enter-from, .bas-fade-leave-to { opacity: 0; }
|
|
4
|
-
|
|
5
|
-
/* pop — sustituye al scale+fade de DropdownBase/DropdownProfile */
|
|
6
|
-
.bas-pop-enter-active, .bas-pop-leave-active {
|
|
7
|
-
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
8
|
-
transform-origin: top;
|
|
9
|
-
}
|
|
10
|
-
.bas-pop-enter-from, .bas-pop-leave-to { opacity: 0; transform: scale(0.95); }
|
|
11
|
-
|
|
12
|
-
/* slide-up — entrada de modales (bottom sheet en móvil) */
|
|
13
|
-
.bas-slide-up-enter-active, .bas-slide-up-leave-active { transition: transform 0.25s ease, opacity 0.25s ease; }
|
|
14
|
-
.bas-slide-up-enter-from, .bas-slide-up-leave-to { transform: translateY(16px); opacity: 0; }
|
|
15
|
-
|
|
16
|
-
/* expand — alto animado de ProvidersFilters/TxnsOverview */
|
|
17
|
-
.bas-expand-enter-active, .bas-expand-leave-active { transition: max-height 0.25s ease, opacity 0.25s ease; overflow: hidden; }
|
|
18
|
-
.bas-expand-enter-from, .bas-expand-leave-to { max-height: 0; opacity: 0; }
|
|
19
|
-
.bas-expand-enter-to, .bas-expand-leave-from { max-height: 600px; }
|
|
20
|
-
|
|
21
|
-
/* spinner oval — sustituye a react-loader-spinner */
|
|
22
|
-
@keyframes bas-spin { to { transform: rotate(360deg); } }
|
|
23
|
-
.bas-oval-spin { animation: bas-spin 0.8s linear infinite; }
|