@superlogic/spree-pay 0.1.39 → 0.1.42

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/build/index.css CHANGED
@@ -264,6 +264,9 @@
264
264
  .sl-spreepay .relative {
265
265
  position: relative;
266
266
  }
267
+ .sl-spreepay .static {
268
+ position: static;
269
+ }
267
270
  .sl-spreepay .inset-0 {
268
271
  inset: calc(var(--spacing) * 0);
269
272
  }
@@ -306,6 +309,9 @@
306
309
  .sl-spreepay .mr-1 {
307
310
  margin-right: calc(var(--spacing) * 1);
308
311
  }
312
+ .sl-spreepay .mb-2 {
313
+ margin-bottom: calc(var(--spacing) * 2);
314
+ }
309
315
  .sl-spreepay .mb-4 {
310
316
  margin-bottom: calc(var(--spacing) * 4);
311
317
  }
@@ -350,6 +356,10 @@
350
356
  width: calc(var(--spacing) * 6);
351
357
  height: calc(var(--spacing) * 6);
352
358
  }
359
+ .sl-spreepay .size-7 {
360
+ width: calc(var(--spacing) * 7);
361
+ height: calc(var(--spacing) * 7);
362
+ }
353
363
  .sl-spreepay .size-8 {
354
364
  width: calc(var(--spacing) * 8);
355
365
  height: calc(var(--spacing) * 8);
@@ -358,6 +368,10 @@
358
368
  width: calc(var(--spacing) * 9);
359
369
  height: calc(var(--spacing) * 9);
360
370
  }
371
+ .sl-spreepay .size-10 {
372
+ width: calc(var(--spacing) * 10);
373
+ height: calc(var(--spacing) * 10);
374
+ }
361
375
  .sl-spreepay .size-12 {
362
376
  width: calc(var(--spacing) * 12);
363
377
  height: calc(var(--spacing) * 12);
@@ -369,6 +383,9 @@
369
383
  .sl-spreepay .h-4 {
370
384
  height: calc(var(--spacing) * 4);
371
385
  }
386
+ .sl-spreepay .h-7 {
387
+ height: calc(var(--spacing) * 7);
388
+ }
372
389
  .sl-spreepay .h-8 {
373
390
  height: calc(var(--spacing) * 8);
374
391
  }
@@ -393,6 +410,9 @@
393
410
  .sl-spreepay .h-\[1\.15rem\] {
394
411
  height: 1.15rem;
395
412
  }
413
+ .sl-spreepay .h-\[30px\] {
414
+ height: 30px;
415
+ }
396
416
  .sl-spreepay .h-\[74px\] {
397
417
  height: 74px;
398
418
  }
@@ -429,6 +449,9 @@
429
449
  .sl-spreepay .w-11 {
430
450
  width: calc(var(--spacing) * 11);
431
451
  }
452
+ .sl-spreepay .w-\[76px\] {
453
+ width: 76px;
454
+ }
432
455
  .sl-spreepay .w-\[180px\] {
433
456
  width: 180px;
434
457
  }
@@ -681,6 +704,9 @@
681
704
  .sl-spreepay .p-6 {
682
705
  padding: calc(var(--spacing) * 6);
683
706
  }
707
+ .sl-spreepay .p-8 {
708
+ padding: calc(var(--spacing) * 8);
709
+ }
684
710
  .sl-spreepay .px-1 {
685
711
  padding-inline: calc(var(--spacing) * 1);
686
712
  }
package/build/index.d.cts CHANGED
@@ -64,7 +64,7 @@ type Card = {
64
64
  issuer: string;
65
65
  issuerCountry: string;
66
66
  lastFourNumbers: string;
67
- metadata: Record<string, any>;
67
+ metadata: Record<string, unknown>;
68
68
  name: string;
69
69
  paymentProvider: string;
70
70
  schema: string | undefined;
@@ -145,4 +145,78 @@ declare global {
145
145
  }
146
146
  }
147
147
 
148
- export { type ENV, type PaymentMethodResult, PaymentType, type ProcessFn, type ProcessFnParams, type SelectedPaymentMethod, SlapiPaymentStatus, SpreePay, type SpreePayProps, SpreePayProvider, useCapture3DS, useSpreePay };
148
+ declare enum LogLevel {
149
+ DEBUG = 0,
150
+ INFO = 1,
151
+ WARN = 2,
152
+ ERROR = 3,
153
+ NONE = 4
154
+ }
155
+ type LogContext = Record<string, unknown>;
156
+ type LoggerConfig = {
157
+ minLevel: LogLevel;
158
+ prefix: string;
159
+ environment?: Environment;
160
+ };
161
+ declare class Logger {
162
+ private config;
163
+ constructor(config?: Partial<LoggerConfig>);
164
+ /**
165
+ * Determines default log level based on environment
166
+ * - Production: Only ERROR and version info
167
+ * - Development/Staging: All logs
168
+ */
169
+ private getDefaultLogLevel;
170
+ /**
171
+ * Set the environment and update log level accordingly
172
+ */
173
+ setEnvironment(environment: Environment): void;
174
+ private shouldLog;
175
+ private formatMessage;
176
+ /**
177
+ * Log debug information (only in dev/stg)
178
+ */
179
+ debug(message: string, context?: LogContext): void;
180
+ /**
181
+ * Log informational messages (only in dev/stg)
182
+ */
183
+ info(message: string, context?: LogContext): void;
184
+ /**
185
+ * Log warnings (only in dev/stg)
186
+ */
187
+ warn(message: string, context?: LogContext): void;
188
+ /**
189
+ * Log errors (shows in all environments)
190
+ */
191
+ error(message: string, error?: Error | unknown, context?: LogContext): void;
192
+ /**
193
+ * Always logs the version, regardless of environment
194
+ */
195
+ logVersion(): void;
196
+ /**
197
+ * Creates a child logger with additional context
198
+ * Useful for component-specific logging
199
+ */
200
+ child(prefix: string): Logger;
201
+ /**
202
+ * Override log level (useful for testing or debugging)
203
+ */
204
+ setLogLevel(level: LogLevel): void;
205
+ }
206
+ declare const logger: Logger;
207
+ /**
208
+ * Configure the global logger instance
209
+ * @param config - Configuration options including environment
210
+ *
211
+ * @example
212
+ * ```typescript
213
+ * configureLogger({ environment: 'prod' }); // Only ERROR logs
214
+ * configureLogger({ environment: 'dev' }); // All logs
215
+ * configureLogger({ minLevel: LogLevel.DEBUG }); // Custom level
216
+ * ```
217
+ */
218
+ declare const configureLogger: (config: Partial<LoggerConfig> & {
219
+ environment?: Environment;
220
+ }) => void;
221
+
222
+ export { type ENV, LogLevel, type PaymentMethodResult, PaymentType, type ProcessFn, type ProcessFnParams, type SelectedPaymentMethod, SlapiPaymentStatus, SpreePay, type SpreePayProps, SpreePayProvider, configureLogger, logger, useCapture3DS, useSpreePay };
package/build/index.d.ts CHANGED
@@ -64,7 +64,7 @@ type Card = {
64
64
  issuer: string;
65
65
  issuerCountry: string;
66
66
  lastFourNumbers: string;
67
- metadata: Record<string, any>;
67
+ metadata: Record<string, unknown>;
68
68
  name: string;
69
69
  paymentProvider: string;
70
70
  schema: string | undefined;
@@ -145,4 +145,78 @@ declare global {
145
145
  }
146
146
  }
147
147
 
148
- export { type ENV, type PaymentMethodResult, PaymentType, type ProcessFn, type ProcessFnParams, type SelectedPaymentMethod, SlapiPaymentStatus, SpreePay, type SpreePayProps, SpreePayProvider, useCapture3DS, useSpreePay };
148
+ declare enum LogLevel {
149
+ DEBUG = 0,
150
+ INFO = 1,
151
+ WARN = 2,
152
+ ERROR = 3,
153
+ NONE = 4
154
+ }
155
+ type LogContext = Record<string, unknown>;
156
+ type LoggerConfig = {
157
+ minLevel: LogLevel;
158
+ prefix: string;
159
+ environment?: Environment;
160
+ };
161
+ declare class Logger {
162
+ private config;
163
+ constructor(config?: Partial<LoggerConfig>);
164
+ /**
165
+ * Determines default log level based on environment
166
+ * - Production: Only ERROR and version info
167
+ * - Development/Staging: All logs
168
+ */
169
+ private getDefaultLogLevel;
170
+ /**
171
+ * Set the environment and update log level accordingly
172
+ */
173
+ setEnvironment(environment: Environment): void;
174
+ private shouldLog;
175
+ private formatMessage;
176
+ /**
177
+ * Log debug information (only in dev/stg)
178
+ */
179
+ debug(message: string, context?: LogContext): void;
180
+ /**
181
+ * Log informational messages (only in dev/stg)
182
+ */
183
+ info(message: string, context?: LogContext): void;
184
+ /**
185
+ * Log warnings (only in dev/stg)
186
+ */
187
+ warn(message: string, context?: LogContext): void;
188
+ /**
189
+ * Log errors (shows in all environments)
190
+ */
191
+ error(message: string, error?: Error | unknown, context?: LogContext): void;
192
+ /**
193
+ * Always logs the version, regardless of environment
194
+ */
195
+ logVersion(): void;
196
+ /**
197
+ * Creates a child logger with additional context
198
+ * Useful for component-specific logging
199
+ */
200
+ child(prefix: string): Logger;
201
+ /**
202
+ * Override log level (useful for testing or debugging)
203
+ */
204
+ setLogLevel(level: LogLevel): void;
205
+ }
206
+ declare const logger: Logger;
207
+ /**
208
+ * Configure the global logger instance
209
+ * @param config - Configuration options including environment
210
+ *
211
+ * @example
212
+ * ```typescript
213
+ * configureLogger({ environment: 'prod' }); // Only ERROR logs
214
+ * configureLogger({ environment: 'dev' }); // All logs
215
+ * configureLogger({ minLevel: LogLevel.DEBUG }); // Custom level
216
+ * ```
217
+ */
218
+ declare const configureLogger: (config: Partial<LoggerConfig> & {
219
+ environment?: Environment;
220
+ }) => void;
221
+
222
+ export { type ENV, LogLevel, type PaymentMethodResult, PaymentType, type ProcessFn, type ProcessFnParams, type SelectedPaymentMethod, SlapiPaymentStatus, SpreePay, type SpreePayProps, SpreePayProvider, configureLogger, logger, useCapture3DS, useSpreePay };